1/*! For license information please see 1732.myeroad.71bd9838f484034e4100.js.LICENSE.txt */ 2!function(){try{("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).__faroGitHash_myeroad="5ce3e63ee526711d9fdee9e150f093852f3a7cc4"}catch(t){}}(),function(){try{("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).__faroBundleId_myeroad="10.1.5092-apac"}catch(t){}}();try{let t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="df9a250c-389e-45cd-a3df-d24178ebe9b5",t._sentryDebugIdIdentifier="sentry-dbid-df9a250c-389e-45cd-a3df-d24178ebe9b5")}catch(t){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"10.1.5092-apac"},(self.webpackChunk_eroad_myeroad=self.webpackChunk_eroad_myeroad||[]).push([[1732],{463:(t,e,n)=>{"use strict";function r(t,e){if(!t)throw new Error(e||"deck.gl: assertion failed.")}n.d(e,{A:()=>r})},668:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var r=n(24586),i=n(1285);const o=/([0-9]+\.?[0-9]*)(%|px)/;function s(t){switch(typeof t){case"number":return{position:t,relative:!1};case"string":const e=o.exec(t);if(e&&e.length>=3){const t="%"===e[2],n=parseFloat(e[1]);return{position:t?n/100:n,relative:t}}default:throw new Error("Could not parse position string ".concat(t))}}function a(t,e){return t.relative?Math.round(t.position*e):t.position}var u=n(22398),l=n(463);class c{constructor(t){(0,r.A)(this,"id",void 0),(0,r.A)(this,"viewportInstance",void 0),(0,r.A)(this,"_x",void 0),(0,r.A)(this,"_y",void 0),(0,r.A)(this,"_width",void 0),(0,r.A)(this,"_height",void 0),(0,r.A)(this,"_padding",void 0),(0,r.A)(this,"props",void 0);const{id:e,x:n=0,y:o=0,width:a="100%",height:u="100%",padding:c=null,viewportInstance:h}=t||{};(0,l.A)(!h||h instanceof i.A),this.viewportInstance=h,this.id=e||this.constructor.displayName||"view",this.props={...t,id:this.id},this._x=s(n),this._y=s(o),this._width=s(a),this._height=s(u),this._padding=c&&{left:s(c.left||0),right:s(c.right||0),top:s(c.top||0),bottom:s(c.bottom||0)},this.equals=this.equals.bind(this),Object.seal(this)}equals(t){return this===t||(this.viewportInstance?!!t.viewportInstance&&this.viewportInstance.equals(t.viewportInstance):this.ViewportType===t.ViewportType&&(0,u.b)(this.props,t.props,2))}makeViewport({width:t,height:e,viewState:n}){if(this.viewportInstance)return this.viewportInstance;n=this.filterViewState(n);const r=this.getDimensions({width:t,height:e});return r.height&&r.width?new this.ViewportType({...n,...this.props,...r}):null}getViewStateId(){const{viewState:t}=this.props;return"string"==typeof t?t:(null==t?void 0:t.id)||this.id}filterViewState(t){if(this.props.viewState&&"object"==typeof this.props.viewState){if(!this.props.viewState.id)return this.props.viewState;const e={...t};for(const t in this.props.viewState)"id"!==t&&(e[t]=this.props.viewState[t]);return e}return t}getDimensions({width:t,height:e}){const n={x:a(this._x,t),y:a(this._y,e),width:a(this._width,t),height:a(this._height,e)};return this._padding&&(n.padding={left:a(this._padding.left,t),top:a(this._padding.top,e),right:a(this._padding.right,t),bottom:a(this._padding.bottom,e)}),n}get controller(){const t=this.props.controller;return t?!0===t?{type:this.ControllerType}:"function"==typeof t?{type:t}:{type:this.ControllerType,...t}:null}}},932:(t,e,n)=>{"use strict";function r(t,e){if(!t)throw new Error(e||"assert failed: gltf")}n.d(e,{v:()=>r})},1050:(t,e,n)=>{"use strict";n.d(e,{$:()=>v});var r=n(78580),i=n(75784);const{_parseImageNode:o}=globalThis,s="undefined"!=typeof Image,a="undefined"!=typeof ImageBitmap,u=Boolean(o),l=!!i.Bd||u;function c(t){const e=function(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&t instanceof Image?"image":t&&"object"==typeof t&&t.data&&t.width&&t.height?"data":null}(t);if(!e)throw new Error("Not an image");return e}const h=/^data:image\/svg\+xml/,A=/\.svg((\?|#).*)?$/;function f(t){return t&&(h.test(t)||A.test(t))}function d(t,e){if(f(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function p(t,e,n){const r=function(t,e){if(f(e)){let e=(new TextDecoder).decode(t);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(e=unescape(encodeURIComponent(e)))}catch(t){throw new Error(t.message)}return"data:image/svg+xml;base64,".concat(btoa(e))}return d(t,e)}
2(t,n),i=self.URL||self.webkitURL,o="string"!=typeof r&&i.createObjectURL(r);try{return await async function(t,e){const n=new Image;return n.src=t,e.image&&e.image.decode&&n.decode?(await n.decode(),n):await new Promise((e,r)=>{try{n.onload=()=>e(n),n.onerror=e=>r(new Error("Could not load image ".concat(t,": ").concat(e)))}catch(t){r(t)}})}(o||r,e)}finally{o&&i.revokeObjectURL(o)}}const g={};let m=!0;var y=n(23973);const v={id:"image",module:"images",name:"Images",version:"3.4.15",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],parse:async function(t,e,n){const i=((e=e||{}).image||{}).type||"auto",{url:o}=n||{};let u;switch(function(t){switch(t){case"auto":case"data":return function(){if(a)return"imagebitmap";if(s)return"image";if(l)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return a||s||l;case"imagebitmap":return a;case"image":return s;case"data":return l;default:throw new Error("@loaders.gl/images: image ".concat(t," not supported in this environment"))}}(t),t}}(i)){case"imagebitmap":u=await async function(t,e,n){let r;r=f(n)?await p(t,e,n):d(t,n);const i=e&&e.imagebitmap;return await async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!function(t){for(const e in t||g)return!1;return!0}(e)&&m||(e=null),e)try{return await createImageBitmap(t,e)}catch(t){console.warn(t),m=!1}return await createImageBitmap(t)}(r,i)}(t,e,o);break;case"image":u=await p(t,e,o);break;case"data":u=await async function(t){const{mimeType:e}=(0,y.m)(t)||{},n=globalThis._parseImageNode;return(0,r.v)(n),await n(t,e)}(t);break;default:(0,r.v)(!1)}return"data"===i&&(u=function(t){switch(c(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),n=e.getContext("2d");if(!n)throw new Error("getImageData");return e.width=t.width,e.height=t.height,n.drawImage(t,0,0),n.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}(u)),u},tests:[t=>Boolean((0,y.m)(new DataView(t)))],options:{image:{type:"auto",decode:!0}}}},1285:(t,e,n)=>{"use strict";n.d(e,{A:()=>g});var r=n(24586),i=n(23615),o=n(86655),s=n(9946),a=n(34081),u=n(60033),l=n(39095),c=n(84075),h=n(93314);const A=Math.PI/180,f=(0,o.$M)(),d=[0,0,0],p={unitsPerMeter:[1,1,1],metersPerUnit:[1,1,1]};class g{constructor(t={}){(0,r.A)(this,"id",void 0),(0,r.A)(this,"x",void 0),(0,r.A)(this,"y",void 0),(0,r.A)(this,"width",void 0),(0,r.A)(this,"height",void 0),(0,r.A)(this,"padding",void 0),(0,r.A)(this,"isGeospatial",void 0),(0,r.A)(this,"zoom",void 0),(0,r.A)(this,"focalDistance",void 0),(0,r.A)(this,"position",void 0),(0,r.A)(this,"modelMatrix",void 0),(0,r.A)(this,"distanceScales",void 0),(0,r.A)(this,"scale",void 0),(0,r.A)(this,"center",void 0),(0,r.A)(this,"cameraPosition",void 0),(0,r.A)(this,"projectionMatrix",void 0),(0,r.A)(this,"viewMatrix",void 0),(0,r.A)(this,"viewMatrixUncentered",void 0),(0,r.A)(this,"viewMatrixInverse",void 0),(0,r.A)(this,"viewProjectionMatrix",void 0),(0,r.A)(this,"pixelProjectionMatrix",void 0),(0,r.A)(this,"pixelUnprojectionMatrix",void 0),(0,r.A)(this,"resolution",void 0),(0,r.A)(this,"_frustumPlanes",{}),this.id=t.id||this.constructor.displayName||"viewport",this.x=t.x||0,this.y=t.y||0,this.width=t.width||1,this.height=t.height||1,this.zoom=t.zoom||0,this.padding=t.padding,this.distanceScales=t.distanceScales||p,this.focalDistance=t.focalDistance||1,this.position=t.position||d,this.modelMatrix=t.modelMatrix||null;const{longitude:e,latitude:n}=t;this.isGeospatial=Number.isFinite(n)&&Number.isFinite(e),this._initProps(t),this._initMatrices(t),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}get subViewports(){return null}get metersPerPixel(){return this.distanceScales.metersPerUnit[2]/this.scale}get projectionMode(){return this.isGeospatial?this.zoom<12?h.Kx.WEB_MERCATOR:h.Kx.WEB_MERCATOR_AUTO_OFFSET:h.Kx.IDENTITY}equals(t){return t instanceof g&&(this===t||t.width===this.width&&t.height===this.height&&t.scale===this.scale&&(0,a.aI)(t.projectionMatrix,this.projectionMatrix)&&(0,a.aI)(t.viewMatrix,this.viewMatrix))}project(t,{topLeft:e=!0}={}){const n=this.projectPosition(t),r=(0,c.VJ)(n,this.pixelProjectionMatrix),[i,o]=r,s=e?o:this.height-o;return 2===t.length?[i,s]:[i,s,r[2]]}unproject(t,{topLeft:e=!0,targetZ:n}={}){const[r,i,o]=t,s=e?i:this.height-i,a=n&&n*this.distanceScales.unitsPerMeter[2],u=(0,c.xJ)([r,s,o],this.pixelUnprojectionMatrix,a),[l,h,A]=this.unprojectPosition(u);return Number.isFinite(o)?[l,h,A]:Number.isFinite(n)?[l,h,n]:[l,h]}projectPosition(t){const[e,n]=this.projectFlat(t);return[e,n,(t[2]||0)*this.distanceScales.unitsPerMeter[2]]}unprojectPosition(t){const[e,n]=this.unprojectFlat(t);return[e,n,(t[2]||0)*this.distanceScales.metersPerUnit[2]]}projectFlat(t){if(this.isGeospatial){const e=(0,c.Gw)(t);return e[1]=(0,a.qE)(e[1],-318,830),e}return t}unprojectFlat(t){return this.isGeospatial?(0,c.iV)(t):t}getBounds(t={}){const e={targetZ:t.z||0},n=this.unproject([0,0],e),r=this.unproject([this.width,0],e),i=this.unproject([0,this.height],e),o=this.unproject([this.width,this.height],e);return[Math.min(n[0],r[0],i[0],o[0]),Math.min(n[1],r[1],i[1],o[1]),Math.max(n[0],r[0],i[0],o[0]),Math.max(n[1],r[1],i[1],o[1])]}getDistanceScales(t){return t?(0,c.nI)({longitude:t[0],latitude:t[1],highPrecision:!0}):this.distanceScales}containsPixel({x:t,y:e,width:n=1,height:r=1}){return t<this.x+this.width&&this.x<t+n&&e<this.y+this.height&&this.y<e+r}getFrustumPlanes(){return this._frustumPlanes.near||Object.assign(this._frustumPlanes,(0,o.on)(this.viewProjectionMatrix)),this._frustumPlanes}panByPosition(t,e){return null}_initProps(t){const e=t.longitude,n=t.latitude;this.isGeospatial&&(Number.isFinite(t.zoom)||(this.zoom=(0,c.fO)({latitude:n})+Math.log2(this.focalDistance)),this.distanceScales=t.distanceScales||(0,c.nI)({latitude:n,longitude:e}));const r=Math.pow(2,this.zoom);this.scale=r;const{position:i,modelMatrix:o}=t;let a=d;if(i&&(a=o?new s.A(o).transformAsVector(i,[]):i),this.isGeospatial){const t=this.projectPosition([e,n,0]);this.center=new u.A(a).scale(this.distanceScales.unitsPerMeter).add(t)}else this.center=this.projectPosition(a)}_initMatrices(t){const{viewMatrix:e=f,projectionMatrix:n=null,orthographic:r=!1,fovyRadians:c,fovy:h=75,near:d=.1,far:p=1e3,padding:g=null,focalDistance:m=1}=t;this.viewMatrixUncentered=e,this.viewMatrix=(new s.A).multiplyRight(e).translate(new u.A(this.center).negate()),this.projectionMatrix=n||function({width:t,height:e,orthographic:n,fovyRadians:r,focalDistance:i,padding:o,near:u,far:l}){const c=t/e,h=n?(new s.A).orthographic({fovy:r,aspect:c,focalDistance:i,near:u,far:l}):(new s.A).perspective({fovy:r,aspect:c,near:u,far:l});if(o){const{left:n=0,right:r=0,top:i=0,bottom:s=0}=o,u=(0,a.qE)((n+t-r)/2,0,t)-t/2,l=(0,a.qE)((i+e-s)/2,0,e)-e/2;h[8]-=2*u/t,h[9]+=2*l/e}return h}({width:this.width,height:this.height,orthographic:r,fovyRadians:c||h*A,focalDistance:m,padding:g,near:d,far:p});const y=(0,o.$M)();l.lw(y,y,this.projectionMatrix),l.lw(y,y,this.viewMatrix),this.viewProjectionMatrix=y,this.viewMatrixInverse=l.B8([],this.viewMatrix)||this.viewMatrix,this.cameraPosition=(0,o.
2Vl)(this.viewMatrixInverse);const v=(0,o.$M)(),_=(0,o.$M)();l.hs(v,v,[this.width/2,-this.height/2,1]),l.Tl(v,v,[1,-1,0]),l.lw(_,v,this.viewProjectionMatrix),this.pixelProjectionMatrix=_,this.pixelUnprojectionMatrix=l.B8((0,o.$M)(),this.pixelProjectionMatrix),this.pixelUnprojectionMatrix||i.A.warn("Pixel project matrix not invertible")()}}(0,r.A)(g,"displayName","Viewport")},1455:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},2205:(t,e,n)=>{"use strict";n.d(e,{Q:()=>i});var r=n(77359);function i(t,e={}){if(null!=t.bbox&&!0!==e.recompute)return t.bbox;const n=[1/0,1/0,-1/0,-1/0];return(0,r.Fh)(t,t=>{n[0]>t[0]&&(n[0]=t[0]),n[1]>t[1]&&(n[1]=t[1]),n[2]<t[0]&&(n[2]=t[0]),n[3]<t[1]&&(n[3]=t[1])}),n}(0,Object.defineProperty)(i,"name",{value:"bbox",configurable:!0})},2351:(t,e,n)=>{"use strict";n.d(e,{A:()=>v});var r=n(11129),i=n(23615),o=n(99608),s=n(27371),a=n(79669),u=n(10707),l=n(67069),c=n(44454),h=n(79266),A=n(25330),f=n(10836),d=n(46429),p=n(67267),g=n(21714);function m(t,e){(t.COLOR_0||t.colors)&&e||(t.colors={constant:!0,value:new Float32Array([1,1,1])}),i.A.assert(t.positions||t.POSITION,'no "postions" or "POSITION" attribute in mesh')}function y(t,e){if(t.attributes)return m(t.attributes,e),t instanceof l.A?t:new l.A(t);if(t.positions||t.POSITION)return m(t,e),new l.A({attributes:t});throw Error("Invalid mesh")}class v extends o.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}getShaders(){const t=!(0,c.C6)(this.context.gl),e={};return(0,f.jI)(this.context.gl,d.G.GLSL_DERIVATIVES)&&(e.DERIVATIVES_AVAILABLE=1),super.getShaders({vs:"#version 300 es\n#define SHADER_NAME simple-mesh-layer-vs\nuniform float sizeScale;\nuniform bool composeModelMatrix;\nin vec3 positions;\nin vec3 normals;\nin vec3 colors;\nin vec2 texCoords;\nin vec3 instancePositions;\nin vec3 instancePositions64Low;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nin vec3 instanceTranslation;\nout vec2 vTexCoord;\nout vec3 cameraPosition;\nout vec3 normals_commonspace;\nout vec4 position_commonspace;\nout vec4 vColor;\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.uv = texCoords;\n geometry.pickingColor = instancePickingColors;\n\n vTexCoord = texCoords;\n cameraPosition = project_uCameraPosition;\n vColor = vec4(colors * instanceColors.rgb, instanceColors.a);\n\n vec3 pos = (instanceModelMatrix * positions) * sizeScale + instanceTranslation;\n\n if (composeModelMatrix) {\n DECKGL_FILTER_SIZE(pos, geometry);\n normals_commonspace = project_normal(instanceModelMatrix * normals);\n geometry.worldPosition += pos;\n gl_Position = project_position_to_clipspace(pos + instancePositions, instancePositions64Low, vec3(0.0), position_commonspace);\n geometry.position = position_commonspace;\n }\n else {\n pos = project_size(pos);\n DECKGL_FILTER_SIZE(pos, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, pos, position_commonspace);\n geometry.position = position_commonspace;\n normals_commonspace = project_normal(instanceModelMatrix * normals);\n }\n\n geometry.normal = normals_commonspace;\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n#define SHADER_NAME simple-mesh-layer-fs\n\nprecision highp float;\n\nuniform bool hasTexture;\nuniform sampler2D sampler;\nuniform bool flatShading;\nuniform float opacity;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n geometry.uv = vTexCoord;\n\n vec3 normal;\n if (flatShading) {\n#ifdef DERIVATIVES_AVAILABLE\n normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n#else\n normal = vec3(0.0, 0.0, 1.0);\n#endif\n } else {\n normal = normals_commonspace;\n }\n\n vec4 color = hasTexture ? texture(sampler, vTexCoord) : vColor;\n DECKGL_FILTER_COLOR(color, geometry);\n\n vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor, color.a * opacity);\n}\n",modules:[s.A,a.p,u.A],transpileToGLSL100:t,defines:e})}getBounds(){var t;if(this.props._instanced)return super.getBounds();let e=this.state.positionBounds;if(e)return e;const{mesh:n}=this.props;if(!n)return null;if(e=null===(t=n.header)||void 0===t?void 0:t.boundingBox,!e){const{attributes:t}=y(n,this.props._useMeshColors);t.POSITION=t.POSITION||t.positions,e=(0,g.l)(t)}return this.state.positionBounds=e,e}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{transition:!0,type:5130,fp64:this.use64bitPositions(),size:3,accessor:"getPosition"},instanceColors:{type:5121,transition:!0,size:this.props.colorFormat.length,normalized:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceModelMatrix:p.U}),this.setState({emptyTexture:new h.A(this.context.gl,{data:new Uint8Array(4),width:1,height:1})})}updateState(t){super.updateState(t);const{props:e,oldProps:n,changeFlags:r}=t;if(e.mesh!==n.mesh||r.extensionsChanged){var i;if(this.state.positionBounds=null,null===(i=this.state.model)||void 0===i||i.delete(),e.mesh){this.state.model=this.getModel(e.mesh);const t=e.mesh.attributes||e.mesh;this.setState({hasNormals:Boolean(t.NORMAL||t.normals)})}this.getAttributeManager().invalidateAll()}e.texture!==n.texture&&this.setTexture(e.texture),this.state.model&&this.state.model.setDrawMode(this.props.wireframe?3:4)}finalizeState(t){super.finalizeState(t),this.state.emptyTexture.delete()}draw({uniforms:t}){if(!this.state.model)return;const{viewport:e}=this.context,{sizeScale:n,coordinateSystem:r,_instanced:i}=this.props;this.state.model.setUniforms(t).setUniforms({sizeScale:n,composeModelMatrix:!i||(0,p.w)(e,r),flatShading:!this.state.hasNormals}).draw()}get isLoaded(){var t;return(null===(t=this.state)||void 0===t?void 0:t.model)&&super.isLoaded}
2getModel(t){const e=new A.A(this.context.gl,{...this.getShaders(),id:this.props.id,geometry:y(t,this.props._useMeshColors),isInstanced:!0}),{texture:n}=this.props,{emptyTexture:r}=this.state;return e.setUniforms({sampler:n||r,hasTexture:Boolean(n)}),e}setTexture(t){const{emptyTexture:e,model:n}=this.state;n&&n.setUniforms({sampler:t||e,hasTexture:Boolean(t)})}}(0,r.A)(v,"defaultProps",{mesh:{type:"object",value:null,async:!0},texture:{type:"image",value:null,async:!0},sizeScale:{type:"number",value:1,min:0},_useMeshColors:{type:"boolean",value:!1},_instanced:!0,wireframe:!1,material:!0,getPosition:{type:"accessor",value:t=>t.position},getColor:{type:"accessor",value:[0,0,0,255]},getOrientation:{type:"accessor",value:[0,0,0]},getScale:{type:"accessor",value:[1,1,1]},getTranslation:{type:"accessor",value:[0,0,0]},getTransformMatrix:{type:"accessor",value:[]},textureParameters:{type:"object",ignore:!0}}),(0,r.A)(v,"layerName","SimpleMeshLayer")},2583:t=>{"use strict";var e,n="function"==typeof Map&&Map.prototype?Map:null,r="function"==typeof Set&&Set.prototype?Set:null;r||(e=function(t){return!1});var i=n?Map.prototype.has:null,o=r?Set.prototype.has:null;e||o||(e=function(t){return!1}),t.exports=e||function(t){if(!t||"object"!=typeof t)return!1;try{if(o.call(t),i)try{i.call(t)}catch(t){return!0}return t instanceof r}catch(t){}return!1}},2592:(t,e,n)=>{"use strict";n.d(e,{Ld:()=>o,ZF:()=>a,r6:()=>s});var r=n(94939);const i={};function o(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";i[t]=i[t]||1;const e=i[t]++;return"".concat(t,"-").concat(e)}function s(t){return(0,r.v)("number"==typeof t,"Input must be a number"),t&&!(t&t-1)}function a(t){let e=!0;for(const n in t){e=!1;break}return e}},3895:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(44454),i=n(84407),o=n(68818),s=n(63564);class a extends i.A{get[Symbol.toStringTag](){return"Texture3D"}static isSupported(t){return(0,r.C6)(t)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.Dz)(t),e=Object.assign({depth:1},e,{target:32879,unpackFlipY:!1}),super(t,e),this.initialize(e),Object.seal(this)}setImageData(t){let{level:e=0,dataFormat:n=6408,width:i,height:a,depth:u=1,border:l=0,format:c,type:h=5121,offset:A=0,data:f,parameters:d={}}=t;if(this._trackDeallocatedMemory("Texture"),this.gl.bindTexture(this.target,this.handle),(0,r.zv)(this.gl,d,()=>{ArrayBuffer.isView(f)&&this.gl.texImage3D(this.target,e,n,i,a,u,l,c,h,f),f instanceof s.A&&(this.gl.bindBuffer(35052,f.handle),this.gl.texImage3D(this.target,e,n,i,a,u,l,c,h,A))}),f&&f.byteLength)this._trackAllocatedMemory(f.byteLength,"Texture");else{const t=o.gI[this.dataFormat]||4,e=o.Ce[this.type]||1;this._trackAllocatedMemory(this.width*this.height*this.depth*t*e,"Texture")}return this.loaded=!0,this}}},3932:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7784),i=n(54023),o=n(41522),s=n(93141),a=n(6963),u=n(78345),l=n(82314),c=n(7339);function h(t,e,n){if(n=n||{},!c.isObject.call(void 0,n))throw new Error("options is invalid");const h=n.pivot,A=n.mutate;if(!t)throw new Error("geojson is required");if(null==e||isNaN(e))throw new Error("angle is required");if(0===e)return t;const f=null!=h?h:r.centroid.call(void 0,t);return!1!==A&&void 0!==A||(t=a.clone.call(void 0,t)),u.coordEach.call(void 0,t,function(t){const n=i.rhumbBearing.call(void 0,f,t)+e,r=o.rhumbDistance.call(void 0,f,t),a=l.getCoords.call(void 0,s.rhumbDestination.call(void 0,f,r,n));t[0]=a[0],t[1]=a[1]}),t}var A=h;e.default=A,e.transformRotate=h},4350:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}
2){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invali
2d");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},4572:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Euler:()=>m,Matrix3:()=>s.A,Matrix4:()=>a.A,Pose:()=>y,Quaternion:()=>u.A,SphericalCoordinates:()=>l.A,Vector2:()=>r.A,Vector3:()=>i.A,Vector4:()=>o.A,_Euler:()=>m,_MathUtils:()=>v.A,_Pose:()=>y,_SphericalCoordinates:()=>l.A,acos:()=>A.HQ,asin:()=>A.qR,assert:()=>_.A,atan:()=>A.rY,clamp:()=>A.qE,clone:()=>A.o8,config:()=>A.$W,configure:()=>A.jK,cos:()=>A.gn,degrees:()=>A.uj,equals:()=>A.aI,exactEquals:()=>A.t2,formatValue:()=>A.Fl,isArray:()=>A.cy,lerp:()=>A.Cc,radians:()=>A.F2,sin:()=>A.F8,tan:()=>A.Ml,toDegrees:()=>A.xW,toRadians:()=>A.eh,withEpsilon:()=>A.ZK});var r=n(40306),i=n(60033),o=n(46164),s=n(87459),a=n(9946),u=n(64086),l=n(73748),c=n(24586),h=n(44341),A=n(34081),f=n(95855);const d="Unknown Euler angle order",p=.99999;var g;!function(t){t[t.ZYX=0]="ZYX",t[t.YXZ=1]="YXZ",t[t.XZY=2]="XZY",t[t.ZXY=3]="ZXY",t[t.YZX=4]="YZX",t[t.XYZ=5]="XYZ"}(g||(g={}));class m extends h.A{static get ZYX(){return g.ZYX}static get YXZ(){return g.YXZ}static get XZY(){return g.XZY}static get ZXY(){return g.ZXY}static get YZX(){return g.YZX}static get XYZ(){return g.XYZ}static get RollPitchYaw(){return g.ZYX}static get DefaultOrder(){return g.ZYX}static get RotationOrders(){return g}static rotationOrder(t){return g[t]}get ELEMENTS(){return 4}constructor(t=0,e=0,n=0,r=m.DefaultOrder){super(-0,-0,-0,-0),arguments.length>0&&Array.isArray(arguments[0])?this.fromVector3(...arguments):this.set(t,e,n,r)}fromQuaternion(t){const[e,n,r,i]=t,o=n*n,s=-2*(o+r*r)+1,a=2*(e*n+i*r);let u=-2*(e*r-i*n);const l=2*(n*r+i*e),c=-2*(e*e+o)+1;u=u>1?1:u,u=u<-1?-1:u;const h=Math.atan2(l,c),A=Math.asin(u),f=Math.atan2(a,s);return this.set(h,A,f,m.RollPitchYaw)}fromObject(t){throw new Error("not implemented")}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=Number.isFinite(t[3])||this.order,this.check()}set(t=0,e=0,n=0,r){return this[0]=t,this[1]=e,this[2]=n,this[3]=Number.isFinite(r)?r:this[3],this.check()}validate(){return(t=this[3])>=0&&t<6&&Number.isFinite(this[0])&&Number.isFinite(this[1])&&Number.isFinite(this[2]);var t}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t}toArray4(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t[e+3]=this[3],t}toVector3(t=[-0,-0,-0]){return t[0]=this[0],t[1]=this[1],t[2]=this[2],t}get x(){return this[0]}set x(t){this[0]=(0,f.ws)(t)}get y(){return this[1]}set y(t){this[1]=(0,f.ws)(t)}get z(){return this[2]}set z(t){this[2]=(0,f.ws)(t)}get alpha(){return this[0]}set alpha(t){this[0]=(0,f.ws)(t)}get beta(){return this[1]}set beta(t){this[1]=(0,f.ws)(t)}get gamma(){return this[2]}set gamma(t){this[2]=(0,f.ws)(t)}get phi(){return this[0]}set phi(t){this[0]=(0,f.ws)(t)}get theta(){return this[1]}set theta(t){this[1]=(0,f.ws)(t)}get psi(){return this[2]}set psi(t){this[2]=(0,f.ws)(t)}get roll(){return this[0]}set roll(t){this[0]=(0,f.ws)(t)}get pitch(){return this[1]}set pitch(t){this[1]=(0,f.ws)(t)}get yaw(){return this[2]}set yaw(t){this[2]=(0,f.ws)(t)}get order(){return this[3]}set order(t){this[3]=function(t){if(t<0&&t>=6)throw new Error(d);return t}(t)}fromVector3(t,e){return this.set(t[0],t[1],t[2],Number.isFinite(e)?e:this[3])}fromArray(t,e=0){return this[0]=t[0+e],this[1]=t[1+e],this[2]=t[2+e],void 0!==t[3]&&(this[3]=t[3]),this.check()}fromRollPitchYaw(t,e,n){return this.set(t,e,n,g.ZYX)}fromRotationMatrix(t,e=m.DefaultOrder){return this._fromRotationMatrix(t,e),this.check()}getRotationMatrix(t){return this._getRotationMatrix(t)}getQuaternion(){const t=new u.A;switch(this[4]){case g.XYZ:return t.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);case g.YXZ:return t.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);case g.ZXY:return t.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);case g.ZYX:return t.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);case g.YZX:return t.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);case g.XZY:return t.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);default:throw new Error(d)}}_fromRotationMatrix(t,e=m.DefaultOrder){const n=t[0],r=t[4],i=t[8],o=t[1],s=t[5],a=t[9],u=t[2],l=t[6],c=t[10];switch(e=e||this[3]){case m.XYZ:this[1]=Math.asin((0,A.qE)(i,-1,1)),Math.abs(i)<p?(this[0]=Math.atan2(-a,c),this[2]=Math.atan2(-r,n)):(this[0]=Math.atan2(l,s),this[2]=0);break;case m.YXZ:this[0]=Math.asin(-(0,A.qE)(a,-1,1)),Math.abs(a)<p?(this[1]=Math.atan2(i,c),this[2]=Math.atan2(o,s)):(this[1]=Math.atan2(-u,n),this[2]=0);break;case m.ZXY:this[0]=Math.asin((0,A.qE)(l,-1,1)),Math.abs(l)<p?(this[1]=Math.atan2(-u,c),this[2]=Math.atan2(-r,s)):(this[1]=0,this[2]=Math.atan2(o,n));break;case m.ZYX:this[1]=Math.asin(-(0,A.qE)(u,-1,1)),Math.abs(u)<p?(this[0]=Math.atan2(l,c),this[2]=Math.atan2(o,n)):(this[0]=0,this[2]=Math.atan2(-r,s));break;case m.YZX:this[2]=Math.asin((0,A.qE)(o,-1,1)),Math.abs(o)<p?(this[0]=Math.atan2(-a,s),this[1]=Math.atan2(-u,n)):(this[0]=0,this[1]=Math.atan2(i,c));break;case m.XZY:this[2]=Math.asin(-(0,A.qE)(r,-1,1)),Math.abs(r)<p?(this[0]=Math.atan2(l,s),this[1]=Math.atan2(i,n)):(this[0]=Math.atan2(-a,c),this[1]=0);break;default:throw new Error(d)}return this[3]=e,this}_getRotationMatrix(t){const e=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],n=this.x,r=this.y,i=this.z,o=Math.cos(n),s=Math.cos(r),a=Math.cos(i),u=Math.sin(n),l=Math.sin(r),c=Math.sin(i);switch(this[3]){case m.XYZ:{const t=o*a,n=o*c,r=u*a,i=u*c;e[0]=s*a,e[4]=-s*c,e[8]=l,e[1]=n+r*l,e[5]=t-i*l,e[9]=-u*s,e[2]=i-t*l,e[6]=r+n*l,e[10]=o*s;break}case m.YXZ:{const t=s*a,n=s*c,r=l*a,i=l*c;e[0]=t+i*u,e[4]=r*u-n,e[8]=o*l,e[1]=o*c,e[5]=o*a,e[9]=-u,e[2]=n*u-r,e[6]=i+t*u,e[10]=o*s;break}case m.ZXY:{const t=s*a,n=s*c,r=l*a,i=l*c;e[0]=t-i*u,e[4]=-o*c,e[8]=r+n*u,e[1]=n+r*u,e[5]=o*a,e[9]=i-t*u,e[2]=-o*l,e[6]=u,e[10]=o*s;break}case m.ZYX:{const t=o*a,n=o*c,r=u*a,i=u*c;e[0]=s*a,e[4]=r*l-n,e[8]=t*l+i,e[1]=s*c,e[5]=i*l+t,e[9]=n*l-r,e[2]=-l,e[6]=u*s,e[10]=o*s;break}case m.YZX:{const t=o*s,n=o*l,r=u*s,i=u*l;e[0]=s*a,e[4]=i-t*c,e[8]=r*c+n,e[1]=c,e[5]=o*a,e[9]=-u*a,e[2]=-l*a,e[6]=n*c+r,e[10]=t-i*c;break}case m.XZY:{const t=o*s,n=o*l,r=u*s,i=u*l;e[0]=s*a,e[4]=-c,e[8]=l*a,e[1]=t*c+i,e[5]=o*a,e[9]=n*c-r,e[2]=r*c-n,e[6]=u*a,e[10]=i*c+t;break}default:throw new Error(d)}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}toQuaternion(){const t=Math.cos(.5*this.yaw),e=Math.sin(.5*this.yaw),n=Math.cos(.5*this.roll),r=Math.sin(.5*this.roll),i=Math.cos(.5*this.pitch),o=Math.sin(.5*this.pitch),s=t*n*i+e*r*o,a=t*r*i-e*n*o,l=t*n*o+e*r*i,c=e*n*i-t*r*o;return new u.A(a,l,c,s)}}class y{constructor({x:t=0,y:e=0,z:n=0,roll:r=0,pitch:o=0,yaw:s=0,position:a,orientation:u}={}){(0,c.A)(this,"position",void 0),(0,c.A)(this,"orientation",void 0),Array.isArray(a)&&3===a.length?this.position=new i.A(a):this.position=new i.A(t,e,n),Array.isArray(u)&&4===u.length?this.orientation=new m(u,u[3]):this.orientation=new m(r,o,s,m.RollPitchYaw)}get x(){return this.position.x}set x(t){this.position.x=t}get y(){return this.position.y}set y(t){this.position.y=t}get z(){return this.position.z}set z(t){this.position.z=t}get roll(){return this.orientation.roll}set roll(t){this.orientation.roll=t}get pitch(){return this.orientation.pitch}set pitch(t){this.orientation.pitch=t}get yaw(){return this.orientation.yaw}set yaw(t){this.orientation.yaw=t}getPosition(){return this.position}getOrientation(){return this.orientation}equals(t){return!!t&&this.position.equals(t.position)&&this.orientation.equals(t.orientation)}exactEquals(t){return!!t&&this.position.exactEquals(t.position)&&this.orientation.exactEquals(t.orientation)}getTransformationMatrix(){const t=Math.sin(this.roll),e=Math.sin(this.pitch),n=Math.sin(this.yaw),r=Math.cos(this.roll),i=Math.cos(this.pitch),o=Math.cos(this.yaw);return(new a.A).setRowMajor(o*i,-n*r+o*e*t,n*t+o*e*r,this.x,n*i,o*r+n*e*t,-o*t+n*e*r,this.y,-e,i*t,i*r,this.z,0,0,0,1)}getTransformationMatrixFromPose(t){return(new a.A).multiplyRight(this.getTransformationMatrix()).multiplyRight(t.getTransformationMatrix().invert())}getTransformationMatrixToPose(t){return(new a.A).multiplyRight(t.getTransformationMatrix()).multiplyRight(this.getTransformationMatrix().invert())}}var v=n(21554),_=n(97458)},4728:(t,e,n)=>{"use strict";var r=n(528),i=n(14607),o=r("%WeakSet%",!0),s=i("WeakSet.prototype.has",!0);if(s){var a=i("WeakMap.prototype.has",!0);t.exports=function(t){if(!t||"object"!=typeof t)return!1;try{if(s(t,s),a)try{a(t,a)}catch(t){return!0}return t instanceof o}catch(t){}return!1}}
2else t.exports=function(t){return!1}},4746:(t,e,n)=>{"use strict";n.d(e,{R:()=>i});var r=n(44454);function i(t,e,n,i){const o="See luma.gl ".concat(n," Upgrade Guide at https://luma.gl/docs/upgrade-guide"),s=Object.getPrototypeOf(t);i.forEach(t=>{s.methodName||(s[t]=()=>{throw r.Rm.removed("Calling removed method ".concat(e,".").concat(t,": "),o)(),new Error(t)})})}},4891:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ViewMode=void 0;var s=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n=(e=s,function(){var t,n=i(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var o=i(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),n.apply(this,arguments)}return s}(n(96146).GeoJsonEditMode);e.ViewMode=s},5259:(t,e,n)=>{"use strict";n.d(e,{A:()=>B});var r=n(55890),i=n(84407),o=n(48091),s=n(44454),a=n(65758),u=n(94939);const l={5126:E.bind(null,"uniform1fv",p,1,x),35664:E.bind(null,"uniform2fv",p,2,x),35665:E.bind(null,"uniform3fv",p,3,x),35666:E.bind(null,"uniform4fv",p,4,x),5124:E.bind(null,"uniform1iv",g,1,x),35667:E.bind(null,"uniform2iv",g,2,x),35668:E.bind(null,"uniform3iv",g,3,x),35669:E.bind(null,"uniform4iv",g,4,x),35670:E.bind(null,"uniform1iv",g,1,x),35671:E.bind(null,"uniform2iv",g,2,x),35672:E.bind(null,"uniform3iv",g,3,x),35673:E.bind(null,"uniform4iv",g,4,x),35674:E.bind(null,"uniformMatrix2fv",p,4,S),35675:E.bind(null,"uniformMatrix3fv",p,9,S),35676:E.bind(null,"uniformMatrix4fv",p,16,S),35678:w,35680:w,5125:E.bind(null,"uniform1uiv",m,1,x),36294:E.bind(null,"uniform2uiv",m,2,x),36295:E.bind(null,"uniform3uiv",m,3,x),36296:E.bind(null,"uniform4uiv",m,4,x),35685:E.bind(null,"uniformMatrix2x3fv",p,6,S),35686:E.bind(null,"uniformMatrix2x4fv",p,8,S),35687:E.bind(null,"uniformMatrix3x2fv",p,6,S),35688:E.bind(null,"uniformMatrix3x4fv",p,12,S),35689:E.bind(null,"uniformMatrix4x2fv",p,8,S),35690:E.bind(null,"uniformMatrix4x3fv",p,12,S),35678:w,35680:w,35679:w,35682:w,36289:w,36292:w,36293:w,36298:w,36299:w,36300:w,36303:w,36306:w,36307:w,36308:w,36311:w},c={},h={},A={},f=[0];function d(t,e,n,r){1===e&&"boolean"==typeof t&&(t=t?1:0),Number.isFinite(t)&&(f[0]=t,t=f);const i=t.length;if(i%e&&s.Rm.warn("Uniform size should be multiples of ".concat(e),t)(),t instanceof n)return t;let o=r[i];o||(o=new n(i),r[i]=o);for(let e=0;e<i;e++)o[e]=t[e];return o}function p(t,e){return d(t,e,Float32Array,c)}function g(t,e){return d(t,e,Int32Array,h)}function m(t,e){return d(t,e,Uint32Array,A)}function y(t,e,n){const r=l[n.type];if(!r)throw new Error("Unknown GLSL uniform type ".concat(n.type));return r().bind(null,t,e)}function v(t){if("]"!==t[t.length-1])return{name:t,length:1,isArray:!1};const e=t.match(/([^[]*)(\[[0-9]+\])?/);if(!e||e.length<2)throw new Error("Failed to parse GLSL uniform name ".concat(t));return{name:e[1],length:e[2]||1,isArray:Boolean(e[2])}}function _(t){return Array.isArray(t)||ArrayBuffer.isView(t)?function(t){if(0===t.length)return!1;const e=Math.min(t.length,16);for(let n=0;n<e;++n)if(!Number.isFinite(t[n]))return!1;return!0}(t):!!isFinite(t)||!0===t||!1===t||t instanceof i.A||t instanceof a.A||t instanceof o.A&&Boolean(t.texture)}function b(t,e,n){if(Array.isArray(n)||ArrayBuffer.isView(n))if(t[e]){const r=t[e];for(let t=0,e=n.length;t<e;++t)r[t]=n[t]}else t[e]=n.slice();else t[e]=n}function w(){let t=null;return(e,n,r)=>{const i=t!==r;return i&&(e.uniform1i(n,r),t=r),i}}function E(t,e,n,r){let i=null,o=null;return(s,a,l)=>{const c=e(l,n),h=c.length;let A=!1;if(null===i)i=new Float32Array(h),o=h,A=!0;else{(0,u.v)(o===h,"Uniform length cannot change.");for(let t=0;t<h;++t)if(c[t]!==i[t]){A=!0;break}}return A&&(r(s,t,a,c),i.set(c)),A}}function x(t,e,n,r){t[e](n,r)}function S(t,e,n,r){t[e](n,!1,r)}
2var T=n(23363),P=n(6105),C=n(70145);class M{constructor(t){this.id=t.id,this.attributeInfos=[],this.attributeInfosByName={},this.attributeInfosByLocation=[],this.varyingInfos=[],this.varyingInfosByName={},Object.seal(this),this._readAttributesFromProgram(t),this._readVaryingsFromProgram(t)}getAttributeInfo(t){const e=Number(t);return Number.isFinite(e)?this.attributeInfosByLocation[e]:this.attributeInfosByName[t]||null}getAttributeLocation(t){const e=this.getAttributeInfo(t);return e?e.location:-1}getAttributeAccessor(t){const e=this.getAttributeInfo(t);return e?e.accessor:null}getVaryingInfo(t){const e=Number(t);return Number.isFinite(e)?this.varyingInfos[e]:this.varyingInfosByName[t]||null}getVaryingIndex(t){const e=this.getVaryingInfo();return e?e.location:-1}getVaryingAccessor(t){const e=this.getVaryingInfo();return e?e.accessor:null}_readAttributesFromProgram(t){const{gl:e}=t,n=e.getProgramParameter(t.handle,35721);for(let r=0;r<n;r++){const{name:n,type:i,size:o}=e.getActiveAttrib(t.handle,r),s=e.getAttribLocation(t.handle,n);s>=0&&this._addAttribute(s,n,i,o)}this.attributeInfos.sort((t,e)=>t.location-e.location)}_readVaryingsFromProgram(t){const{gl:e}=t;if(!(0,s.C6)(e))return;const n=e.getProgramParameter(t.handle,35971);for(let r=0;r<n;r++){const{name:n,type:i,size:o}=e.getTransformFeedbackVarying(t.handle,r);this._addVarying(r,n,i,o)}this.varyingInfos.sort((t,e)=>t.location-e.location)}_addAttribute(t,e,n,r){const{type:i,components:o}=(0,C.ir)(n),s={type:i,size:r*o};this._inferProperties(t,e,s);const a={location:t,name:e,accessor:new P.A(s)};this.attributeInfos.push(a),this.attributeInfosByLocation[t]=a,this.attributeInfosByName[a.name]=a}_inferProperties(t,e,n){/instance/i.test(e)&&(n.divisor=1)}_addVarying(t,e,n,r){const{type:i,components:o}=(0,C.ir)(n),s={location:t,name:e,accessor:new P.A({type:i,size:r*o})};this.varyingInfos.push(s),this.varyingInfosByName[s.name]=s}}var I=n(82073),O=n(2592);const R=35981,L=["setVertexArray","setAttributes","setBuffers","unsetBuffers","use","getUniformCount","getUniformInfo","getUniformLocation","getUniformValue","getVarying","getFragDataLocation","getAttachedShaders","getAttributeCount","getAttributeLocation","getAttributeInfo"];class B extends r.A{get[Symbol.toStringTag](){return"Program"}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.stubRemovedMethods("Program","v6.0",L),this._isCached=!1,this.initialize(e),Object.seal(this),this._setId(e.id)}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{hash:e,vs:n,fs:r,varyings:i,bufferMode:o=R}=t;return this.hash=e||"",this.vs="string"==typeof n?new T.o0(this.gl,{id:"".concat(t.id,"-vs"),source:n}):n,this.fs="string"==typeof r?new T._Y(this.gl,{id:"".concat(t.id,"-fs"),source:r}):r,(0,u.v)(this.vs instanceof T.o0),(0,u.v)(this.fs instanceof T._Y),this.uniforms={},this._textureUniforms={},i&&i.length>0&&((0,s.Dz)(this.gl),this.varyings=i,this.gl2.transformFeedbackVaryings(this.handle,i,o)),this._compileAndLink(),this._readUniformLocationsFromLinkedProgram(),this.configuration=new M(this),this.setProps(t)}delete(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._isCached?this:super.delete(t)}setProps(t){return"uniforms"in t&&this.setUniforms(t.uniforms),this}draw(t){let{logPriority:e,drawMode:n=4,vertexCount:r,offset:i=0,start:o,end:a,isIndexed:l=!1,indexType:c=5123,instanceCount:h=0,isInstanced:A=h>0,vertexArray:f=null,transformFeedback:d,framebuffer:p,parameters:g={},uniforms:m,samplers:y}=t;if((m||y)&&(s.Rm.deprecated("Program.draw({uniforms})","Program.setUniforms(uniforms)")(),this.setUniforms(m||{})),s.Rm.priority>=e){const t=p?p.id:"default",i="mode=".concat((0,I.i7)(this.gl,n)," verts=").concat(r," ")+"instances=".concat(h," indexType=").concat((0,I.i7)(this.gl,c)," ")+"isInstanced=".concat(A," isIndexed=").concat(l," ")+"Framebuffer=".concat(t);s.Rm.log(e,i)()}return(0,u.v)(f),this.gl.useProgram(this.handle),!(!this._areTexturesRenderable()||0===r||A&&0===h||(f.bindForDraw(r,h,()=>{if(void 0!==p&&(g=Object.assign({},g,{framebuffer:p})),d){const t=(0,C.F4)(n);d.begin(t)}this._bindTextures(),(0,s.zv)(this.gl,g,()=>{l&&A?this.gl2.drawElementsInstanced(n,r,c,i,h):l&&(0,s.C6)(this.gl)&&!isNaN(o)&&!isNaN(a)?this.gl2.drawRangeElements(n,o,a,r,c,i):l?this.gl.drawElements(n,r,c,i):A?this.gl2.drawArraysInstanced(n,i,r,h):this.gl.drawArrays(n,i,r)}),d&&d.end()}),0))}setUniforms(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s.Rm.priority>=2&&function(t,e,n){for(const r in t){const i=t[r];
2if((!n||Boolean(n[r]))&&!_(i))throw e=e?"".concat(e," "):"",console.error("".concat(e," Bad uniform ").concat(r),i),new Error("".concat(e," Bad uniform ").concat(r))}}(t,this.id,this._uniformSetters),this.gl.useProgram(this.handle);for(const e in t){const n=t[e],r=this._uniformSetters[e];if(r){let t=n,s=!1;if(t instanceof o.A&&(t=t.texture),t instanceof i.A)if(s=this.uniforms[e]!==n,s){void 0===r.textureIndex&&(r.textureIndex=this._textureIndexCounter++);const n=t,{textureIndex:i}=r;n.bind(i),t=i,this._textureUniforms[e]=n}else t=r.textureIndex;else this._textureUniforms[e]&&delete this._textureUniforms[e];(r(t)||s)&&b(this.uniforms,e,n)}}return this}_areTexturesRenderable(){let t=!0;for(const e in this._textureUniforms){const n=this._textureUniforms[e];n.update(),t=t&&n.loaded}return t}_bindTextures(){for(const t in this._textureUniforms){const e=this._uniformSetters[t].textureIndex;this._textureUniforms[t].bind(e)}}_createHandle(){return this.gl.createProgram()}_deleteHandle(){this.gl.deleteProgram(this.handle)}_getOptionsFromHandle(t){const e=this.gl.getAttachedShaders(t),n={};for(const t of e)switch(this.gl.getShaderParameter(this.handle,35663)){case 35633:n.vs=new T.o0({handle:t});break;case 35632:n.fs=new T._Y({handle:t})}return n}_getParameter(t){return this.gl.getProgramParameter(this.handle,t)}_setId(t){if(!t){const t=this._getName();this.id=(0,O.Ld)(t)}}_getName(){let t=this.vs.getName()||this.fs.getName();return t=t.replace(/shader/i,""),t=t?"".concat(t,"-program"):"program",t}_compileAndLink(){const{gl:t}=this;if(t.attachShader(this.handle,this.vs.handle),t.attachShader(this.handle,this.fs.handle),s.Rm.time(4,"linkProgram for ".concat(this._getName()))(),t.linkProgram(this.handle),s.Rm.timeEnd(4,"linkProgram for ".concat(this._getName()))(),t.debug||s.Rm.level>0){if(!t.getProgramParameter(this.handle,35714))throw new Error("Error linking: ".concat(t.getProgramInfoLog(this.handle)));if(t.validateProgram(this.handle),!t.getProgramParameter(this.handle,35715))throw new Error("Error validating: ".concat(t.getProgramInfoLog(this.handle)))}}_readUniformLocationsFromLinkedProgram(){const{gl:t}=this;this._uniformSetters={},this._uniformCount=this._getParameter(35718);for(let e=0;e<this._uniformCount;e++){const n=this.gl.getActiveUniform(this.handle,e),{name:r}=v(n.name);let i=t.getUniformLocation(this.handle,r);if(this._uniformSetters[r]=y(t,i,n),n.size>1)for(let e=0;e<n.size;e++)i=t.getUniformLocation(this.handle,"".concat(r,"[").concat(e,"]")),this._uniformSetters["".concat(r,"[").concat(e,"]")]=y(t,i,n)}this._textureIndexCounter=0}getActiveUniforms(t,e){return this.gl2.getActiveUniforms(this.handle,t,e)}getUniformBlockIndex(t){return this.gl2.getUniformBlockIndex(this.handle,t)}getActiveUniformBlockParameter(t,e){return this.gl2.getActiveUniformBlockParameter(this.handle,t,e)}uniformBlockBinding(t,e){this.gl2.uniformBlockBinding(this.handle,t,e)}}},5371:(t,e,n)=>{"use strict";function r(t,e=()=>!0){return Array.isArray(t)?i(t,e,[]):e(t)?[t]:[]}function i(t,e,n){let r=-1;for(;++r<t.length;){const o=t[r];Array.isArray(o)?i(o,e,n):e(o)&&n.push(o)}return n}function o({target:t,source:e,start:n=0,count:r=1}){const i=e.length,o=r*i;let s=0;for(let r=n;s<i;s++)t[r++]=e[s];for(;s<o;)s<o-s?(t.copyWithin(n+s,n,n+s),s*=2):(t.copyWithin(n+s,n,n+o-s),s=o);return t}n.d(e,{B:()=>r,R:()=>o})},5424:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(24586),i=n(99608),o=n(90455),s=n(5371),a=n(14557);class u extends i.A{get isComposite(){return!0}get isLoaded(){return super.isLoaded&&this.getSubLayers().every(t=>t.isLoaded)}getSubLayers(){return this.internalState&&this.internalState.subLayers||[]}initializeState(t){}setState(t){super.setState(t),this.setNeedsUpdate()}getPickingInfo({info:t}){const{object:e}=t;return e&&e.__source&&e.__source.parent&&e.__source.parent.id===this.id?(t.object=e.__source.object,t.index=e.__source.index,t):t}filterSubLayer(t){return!0}shouldRenderSubLayer(t,e){return e&&e.length}getSubLayerClass(t,e){const{_subLayerProps:n}=this.props;return n&&n[t]&&n[t].type||e}getSubLayerRow(t,e,n){return t.__source={parent:this,object:e,index:n},t}getSubLayerAccessor(t){if("function"==typeof t){const e={index:-1,data:this.props.data,target:[]};return(n,r)=>n&&n.__source?(e.index=n.__source.index,t(n.__source.object,e)):t(n,r)}return t}getSubLayerProps(t={}){var e;const{opacity:n,pickable:r,visible:i,parameters:o,getPolygonOffset:s,highlightedObjectIndex:u,autoHighlight:l,highlightColor:c,coordinateSystem:h,coordinateOrigin:A,wrapLongitude:f,positionFormat:d,modelMatrix:p,extensions:g,fetch:m,operation:y,_subLayerProps:v}=this.props,_={id:"",updateTriggers:{},opacity:n,pickable:r,visible:i,parameters:o,getPolygonOffset:s,highlightedObjectIndex:u,autoHighlight:l,highlightColor:c,coordinateSystem:h,coordinateOrigin:A,wrapLongitude:f,positionFormat:d,modelMatrix:p,extensions:g,fetch:m,operation:y},b=v&&t.id&&v[t.id],w=b&&b.updateTriggers,E=t.id||"sublayer";if(b){const e=this.props[a.fW],n=t.type?t.type._propTypes:{};for(const t in b){const r=n[t]||e[t];r&&"accessor"===r.type&&(b[t]=this.getSubLayerAccessor(b[t]))}}Object.assign(_,t,b),_.id="".concat(this.props.id,"-").concat(E),_.updateTriggers={all:null===(e=this.props.updateTriggers)||void 0===e?void 0:e.all,...t.updateTriggers,...w};for(const t of g){const e=t.getSubLayerProps.call(this,t);e&&Object.assign(_,e,{updateTriggers:Object.assign(_.updateTriggers,e.updateTriggers)})}return _}
2_updateAutoHighlight(t){for(const e of this.getSubLayers())e.updateAutoHighlight(t)}_getAttributeManager(){return null}_postUpdate(t,e){let n=this.internalState.subLayers;const r=!n||this.needsUpdate();if(r){const t=this.renderLayers();n=(0,s.B)(t,Boolean),this.internalState.subLayers=n}(0,o.A)("compositeLayer.renderLayers",this,r,n);for(const t of n)t.parent=this}}(0,r.A)(u,"layerName","CompositeLayer")},5514:(t,e,n)=>{"use strict";n.d(e,{A:()=>a,b:()=>u});var r=n(89666);const i={number:{validate:(t,e)=>Number.isFinite(t)&&(!("max"in e)||t<=e.max)&&(!("min"in e)||t>=e.min)},array:{validate:(t,e)=>Array.isArray(t)||ArrayBuffer.isView(t)}};function o(t){let e=s(t);return"object"===e?t?"type"in t?Object.assign({},t,i[t.type]):"value"in t?(e=s(t.value),Object.assign({type:e},t,i[e])):{type:"object",value:t}:{type:"object",value:null}:Object.assign({type:e,value:t},i[e])}function s(t){return Array.isArray(t)||ArrayBuffer.isView(t)?"array":typeof t}class a{constructor(t){let{name:e,vs:n,fs:i,dependencies:s=[],uniforms:a,getUniforms:u,deprecations:l=[],defines:c={},inject:h={},vertexShader:A,fragmentShader:f}=t;(0,r.A)("string"==typeof e),this.name=e,this.vs=n||A,this.fs=i||f,this.getModuleUniforms=u,this.dependencies=s,this.deprecations=this._parseDeprecationDefinitions(l),this.defines=c,this.injections=function(t){const e={vs:{},fs:{}};for(const n in t){let r=t[n];"string"==typeof r&&(r={order:0,injection:r}),e[n.slice(0,2)][n]=r}return e}(h),a&&(this.uniforms=function(t){const e={};for(const n in t){const r=o(t[n]);e[n]=r}return e}(a))}getModuleSource(t){let e;switch(t){case"vs":e=this.vs||"";break;case"fs":e=this.fs||"";break;default:(0,r.A)(!1)}return"#define MODULE_".concat(this.name.toUpperCase().replace(/[^0-9a-z]/gi,"_"),"\n").concat(e,"// END MODULE_").concat(this.name,"\n\n")}getUniforms(t,e){return this.getModuleUniforms?this.getModuleUniforms(t,e):this.uniforms?this._defaultGetUniforms(t):{}}getDefines(){return this.defines}checkDeprecations(t,e){this.deprecations.forEach(n=>{n.regex.test(t)&&(n.deprecated?e.deprecated(n.old,n.new)():e.removed(n.old,n.new)())})}_parseDeprecationDefinitions(t){return t.forEach(t=>{"function"===t.type?t.regex=new RegExp("\\b".concat(t.old,"\\(")):t.regex=new RegExp("".concat(t.type," ").concat(t.old,";"))}),t}_defaultGetUniforms(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e={},n=this.uniforms;for(const i in n){const o=n[i];i in t&&!o.private?(o.validate&&(0,r.A)(o.validate(t[i],o),"".concat(this.name,": invalid ").concat(i)),e[i]=t[i]):e[i]=o.value}return e}}function u(t){if(!t.normalized&&(t.normalized=!0,t.uniforms&&!t.getUniforms)){const e=new a(t);t.getUniforms=e.getUniforms.bind(e)}return t}},5664:(t,e,n)=>{"use strict";n.d(e,{_:()=>s});const r="#if (defined(SHADER_TYPE_FRAGMENT) && defined(LIGHTING_FRAGMENT)) || (defined(SHADER_TYPE_VERTEX) && defined(LIGHTING_VERTEX))\n\nstruct AmbientLight {\n vec3 color;\n};\n\nstruct PointLight {\n vec3 color;\n vec3 position;\n vec3 attenuation;\n};\n\nstruct DirectionalLight {\n vec3 color;\n vec3 direction;\n};\n\nuniform AmbientLight lighting_uAmbientLight;\nuniform PointLight lighting_uPointLight[MAX_LIGHTS];\nuniform DirectionalLight lighting_uDirectionalLight[MAX_LIGHTS];\nuniform int lighting_uPointLightCount;\nuniform int lighting_uDirectionalLightCount;\n\nuniform bool lighting_uEnabled;\n\nfloat getPointLightAttenuation(PointLight pointLight, float distance) {\n return pointLight.attenuation.x\n + pointLight.attenuation.y * distance\n + pointLight.attenuation.z * distance * distance;\n}\n\n#endif\n",i={lightSources:{}};function o(){let{color:t=[0,0,0],intensity:e=1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.map(t=>t*e/255)}const s={name:"lights",vs:r,fs:r,getUniforms:function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;if("lightSources"in e){const{ambientLight:t,pointLights:n,directionalLights:r}=e.lightSources||{};return t||n&&n.length>0||r&&r.length>0?Object.assign({},function(t){let{ambientLight:e,pointLights:n=[],directionalLights:r=[]}=t;const i={};return i["lighting_uAmbientLight.color"]=e?o(e):[0,0,0],n.forEac
2h((t,e)=>{i["lighting_uPointLight[".concat(e,"].color")]=o(t),i["lighting_uPointLight[".concat(e,"].position")]=t.position,i["lighting_uPointLight[".concat(e,"].attenuation")]=t.attenuation||[1,0,0]}),i.lighting_uPointLightCount=n.length,r.forEach((t,e)=>{i["lighting_uDirectionalLight[".concat(e,"].color")]=o(t),i["lighting_uDirectionalLight[".concat(e,"].direction")]=t.direction}),i.lighting_uDirectionalLightCount=r.length,i}({ambientLight:t,pointLights:n,directionalLights:r}),{lighting_uEnabled:!0}):{lighting_uEnabled:!1}}if("lights"in e){const n={pointLights:[],directionalLights:[]};for(const t of e.lights||[])switch(t.type){case"ambient":n.ambientLight=t;break;case"directional":n.directionalLights.push(t);break;case"point":n.pointLights.push(t)}return t({lightSources:n})}return{}},defines:{MAX_LIGHTS:3}}},6105:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(31185),i=n(94939),o=n(40822);const s={offset:0,stride:0,type:5126,size:1,divisor:0,normalized:!1,integer:!1},a={deprecatedProps:{instanced:"divisor",isInstanced:"divisor"}};class u{static getBytesPerElement(t){return(0,r.Xj)(t.type||5126).BYTES_PER_ELEMENT}static getBytesPerVertex(t){return(0,i.v)(t.size),(0,r.Xj)(t.type||5126).BYTES_PER_ELEMENT*t.size}static resolve(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new u(...[s,...e])}constructor(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(t=>this._assign(t)),Object.freeze(this)}toString(){return JSON.stringify(this)}get BYTES_PER_ELEMENT(){return u.getBytesPerElement(this)}get BYTES_PER_VERTEX(){return u.getBytesPerVertex(this)}_assign(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=(0,o.N)("Accessor",t,a),void 0!==t.type&&(this.type=t.type,5124!==t.type&&5125!==t.type||(this.integer=!0)),void 0!==t.size&&(this.size=t.size),void 0!==t.offset&&(this.offset=t.offset),void 0!==t.stride&&(this.stride=t.stride),void 0!==t.normalized&&(this.normalized=t.normalized),void 0!==t.integer&&(this.integer=t.integer),void 0!==t.divisor&&(this.divisor=t.divisor),void 0!==t.buffer&&(this.buffer=t.buffer),void 0!==t.index&&("boolean"==typeof t.index?this.index=t.index?1:0:this.index=t.index),void 0!==t.instanced&&(this.divisor=t.instanced?1:0),void 0!==t.isInstanced&&(this.divisor=t.isInstanced?1:0),this}}},6809:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(24586);class i{constructor(t){(0,r.A)(this,"_inProgress",void 0),(0,r.A)(this,"_handle",void 0),(0,r.A)(this,"_timeline",void 0),(0,r.A)(this,"time",void 0),(0,r.A)(this,"settings",void 0),this._inProgress=!1,this._handle=null,this._timeline=t,this.time=0,this.settings={duration:0}}get inProgress(){return this._inProgress}start(t){var e,n;this.cancel(),this.settings=t,this._inProgress=!0,null===(e=(n=this.settings).onStart)||void 0===e||e.call(n,this)}end(){var t,e;this._inProgress&&(this._timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1,null===(t=(e=this.settings).onEnd)||void 0===t||t.call(e,this))}cancel(){var t,e;this._inProgress&&(null===(t=(e=this.settings).onInterrupt)||void 0===t||t.call(e,this),this._timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1)}update(){var t,e;if(!this._inProgress)return!1;if(null===this._handle){const{_timeline:t,settings:e}=this;this._handle=t.addChannel({delay:t.getTime(),duration:e.duration})}return this.time=this._timeline.getTime(this._handle),this._onUpdate(),null===(t=(e=this.settings).onUpdate)||void 0===t||t.call(e,this),this._timeline.isFinished(this._handle)&&this.end(),!0}_onUpdate(){}}},6963:(t,e)=>{"use strict";function n(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return r(t);case"FeatureCollection":return function(t){const e={type:"FeatureCollection"};return Object.keys(t).forEach(n=>{switch(n){case"type":case"features":return;default:e[n]=t[n]}}),e.features=t.features.map(t=>r(t)),e}(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return o(t);default:throw new Error("unknown GeoJSON type")}}function r(t){const e={type:"Feature"};return Object.keys(t).forEach(n=>{switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}}),e.properties=i(t.properties),null==t.geometry?e.geometry=null:e.geometry=o(t.geometry),e}function i(t){const e={};return t?(Object.keys(t).forEach(n=>{const r=t[n];"object"==typeof r?null===r?e[n]=null:Array.isArray(r)?e[n]=r.map(t=>t):e[n]=i(r):e[n]=r}),e):e}function o(t){const e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map(t=>o(t)),e):(e.coordinates=s(t.coordinates),e)}function s(t){const e=t;return"object"!=typeof e[0]?e.slice():e.map(t=>s(t))}
2Object.defineProperty(e,"__esModule",{value:!0});var a=n;e.clone=n,e.cloneProperties=i,e.default=a},7339:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},7552:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawSquareMode=void 0;var r=a(n(43788)),i=a(n(71123)),o=a(n(32955)),s=n(89595);function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}var A=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(f,t);var e,n,a,A=(a=f,function(){var t,e=c(a);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=c(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function f(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),A.apply(this,arguments)}return e=f,(n=[{key:"getTwoClickPolygon",value:function(t,e,n){var a=[e[0],t[1]],u=[t[0],e[1]],l=(0,i.default)((0,s.point)(a),(0,s.point)(t)),c=(0,i.default)((0,s.point)(u),(0,s.point)(t)),h=l<=c?l:c,A=l<=c?a:u,f=(0,s.lineString)([A,e]),d=(0,o.default)(f,h).geometry.coordinates,p=(0,r.default)([t[0],t[1],d[0],d[1]]);return p.properties=p.properties||{},p.properties.shape="Square",p}}])&&l(e.prototype,n),f}(n(42166).TwoClickPolygonMode);e.DrawSquareMode=A},7784:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var r=n(29423),i=n(78345);function o(t,e={}){let n=0,o=0,s=0;return i.coordEach.call(void 0,t,function(t){n+=t[0],o+=t[1],s++},!0),r.point.call(void 0,[n/s,o/s],e.properties)}var s=o;e.centroid=o,e.default=s},8033:(t,e,n)=>{"use strict";n.d(e,{A:()=>x});var r=n(24586),i=n(99608),o=n(27371),s=n(79669),a=n(10707),u=n(93314),l=n(10836),c=n(46429),h=n(25330),A=n(67069),f=n(84481),d=n(57401),p=n(24448);class g extends d.A{constructor(t){const{fp64:e,IndexType:n=Uint32Array}=t;super({...t,attributes:{positions:{size:3,type:e?Float64Array:Float32Array},vertexValid:{type:Uint8ClampedArray,size:1},indices:{type:n,size:1}}})}get(t){const{attributes:e}=this;return"indices"===t?e.indices&&e.indices.subarray(0,this.vertexCount):e[t]}updateGeometry(t){super.updateGeometry(t);const e=this.buffers.indices;if(e)this.vertexCount=(e.value||e).length;else if(this.data&&!this.getGeometry)throw new Error("missing indices buffer")}normalizeGeometry(t){if(this.normalize){const e=f.S8(t,this.positionSize);return this.opts.resolution?(0,p.wk)(f.Dt(e),f.A4(e),{size:this.positionSize,gridResolution:this.opts.resolution,edgeTypes:!0}):this.opts.wrapLongitude?(0,p.Eg)(f.Dt(e),f.A4(e),{size:this.positionSize,maxLatitude:86,edgeTypes:!0}):e}return t}getGeometrySize(t){if(m(t)){let e=0;for(const n of t)e+=this.getGeometrySize(n);return e}return f.Dt(t).length/this.positionSize}getGeometryFromBuffer(t){return this.normalize||!this.buffers.indices?super.getGeometryFromBuffer(t):null}updateGeometryAttributes(t,e){if(t&&m(t))for(const n of t){const t=this.getGeometrySize(n);e.geometrySize=t,this.updateGeometryAttributes(n,e),e.vertexStart+=t,e.indexStart=this.indexStarts[e.geometryIndex+1]}else this._updateIndices(t,e),this._updatePositions(t,e),this._updateVertexValid(t,e)}_updateIndices(t,{geometryIndex:e,vertexStart:n,indexStart:r}){const{attributes:i,indexStarts:o,typedArrayManager:s}=this;let a=i.indices;if(!a||!t)return;let u=r;const l=f.$q(t,this.positionSize,this.opts.preproject,this.opts.full3d);a=s.allocate(a,r+l.length,{copy:!0});for(let t=0;t<l.length;t++)a[u++]=l[t]+n;o[e+1]=r+l.length,i.indices=a}_updatePositions(t,{vertexStart:e,geometrySize:n}){const{attributes:{positions:r},positionSize:i}=this;if(!r||!t)return;const o=f.Dt(t);for(let t=e,s=0;s<n;t++,s++){const e=o[s*i],n=o[s*i+1],a=i>2?o[s*i+2]:0;r[3*t]=e,r[3*t+1]=n,r[3*t+2]=a}}_updateVertexValid(t,{vertexStart:e,geometrySize:n}){const{positionSize:r}=this,i=this.attributes.vertexValid,o=t&&f.A4(t);if(t&&t.edgeTypes?i.set(t.edgeTypes,e):i.fill(1,e,e+n),o)for(let t=0;t<o.length;t++)i[e+o[t]/r-1]=0;i[e+n-1]=0}}function m(t){return Array.isArray(t)&&t.length>0&&!Number.isFinite(t[0])}const y="\nattribute vec2 vertexPositions;\nattribute float vertexValid;\n\nuniform bool extruded;\nuniform bool isWireframe;\nuniform float elevationScale;\nuniform float opacity;\n\nvarying vec4 vColor;\n\nstruct PolygonProps {\n vec4 fillColors;\n vec4 lineColors;\n vec3 positions;\n vec3 nextPositions;\n vec3 pickingColors;\n vec3 positions64Low;\n vec3 nextPositions64Low;\n float elevations;\n};\n\nvec3 project_offset_normal(vec3 vector) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSETS) {\n return normalize(vector * project_uCommonUnitsPerWorldUnit);\n }\n return project_normal(vector);\n}\n\nvoid calculatePosition(PolygonProps props) {\n#ifdef IS_SIDE_VERTEX\n if(vertexValid < 0.5){\n gl_Position = vec4(0.);\n return;\n }\n#endif\n\n vec3 pos;\n vec3 pos64Low;\n vec3 normal;\n vec4 colors = isWireframe ? props.lineColors : props.fillColors;\n\n geometry.worldPosition = props.positions;\n geometry.worldPositionAlt = props.nextPositions;\n geometry.pickingColor = props.pickingColors;\n\n#ifdef IS_SIDE_VERTEX\n pos = mix(props.positions, props.nextPositions, vertexPositions.x);\n pos64Low = mix(props.positions64Low, props.nextPositions64Low, vertexPositions.x);\n#else\n pos = props.positions;\n pos64Low = props.positions64Low;\n#endif\n\n if (extruded) {\n pos.z += props.elevations * vertexPositions.y * elevationScale;\n }\n gl_Position = project_position_to_clipspace(pos, pos64Low, vec3(0.), geometry.position);\n\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n if (extruded) {\n #ifdef IS_SIDE_VERTEX\n normal = vec3(\n props.positions.y - props.nextPositions.y + (props.positions64Low.y - props.nextPositions64Low.y),\n props.nextPositions.x - props.positions.x + (props.nextPositions64Low.x - props.positions64Low.x),\n 0.0);\n normal = project_offset_normal(normal);\n #else\n normal = project_normal(vec3(0.0, 0.0, 1.0));\n #endif\n geometry.normal = normal;\n vec3 lightColor = lighting_getLightColor(colors.rgb, project_uCameraPosition, geometry.position.xyz, normal);\n vColor = vec4(lightColor, colors.a * opacity);\n } else {\n vColor = vec4(colors.rgb, colors.a * opacity);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",v="#define SHADER_NAME solid-polygon-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 positions64Low;\nattribute float elevations;\nattribute vec4 fillColors;\nattribute vec4 lineColors;\nattribute vec3 pickingColors;\n\n".concat(y,"\n\nvoid main(void) {\n PolygonProps props;\n\n props.positions = positions;\n props.positions64Low = positions64Low;\n props.elevations = elevations;\n props.fillColors = fillColors;\n props.lineColors = lineColors;\n props.pickingColors = pickingColors;\n\n calculatePosition(props);\n}\n"),_="#define SHADER_NAME solid-polygon-layer-vertex-shader-side\n#define IS_SIDE_VERTEX\n\n\nattribute vec3 instancePositions;\nattribute vec3 nextPositions;\nattribute vec3 instancePositions64Low;\nattribute vec3 nextPositions64Low;\nattribute float instanceElevations;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\n".concat(y,"\n\nvoid main(void) {\n PolygonProps props;\n\n #if RING_WINDING_ORDER_CW == 1\n props.positions = instancePositions;\n props.positions64Low = instancePositions64Low;\n props.nextPositions = nextPositions;\n props.nextPositions64Low = nextPositions64Low;\n #else\n props.positions = nextPositions;\n props.positions64Low = nextPositions64Low;\n props.nextPositions = instancePositions;\n props.nextPositions64Low = instancePositions64Low;\n #endif\n props.elevations = instanceElevations;\n props.fillColors = instanceFillColors;\n props.lineColors = instanceLineColors;\n props.pickingColors = instancePickingColors;\n\n calculatePosition(props);\n}\n"),b=[0,0,0,255],w={filled:!0,extruded:!1,wireframe:!1,_normalize:!0,_windingOrder:"CW",_full3d:!1,elevationScale:{type:"number",min:0,value:1},getPolygon:{type:"accessor",value:t=>t.polygon},getElevation:{type:"accessor",value:1e3},getFillColor:{type:"accessor",value:b},getLineColor:{type:"accessor",value:b},material:!0},E={enter:(t,e)=>e.length?e.subarray(e.length-t.length):t};class x extends i.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}getShaders(t){return super.getShaders({vs:"top"===t?v:_,fs:"#define SHADER_NAME solid-polygon-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",defines:{RING_WINDING_ORDER_CW:this.props._normalize||"CCW"!==this.props._windingOrder?1:0},modules:[o.A,s.K,a.A]})}get wrapLongitude(){return!1}initializeState(){const{gl:t,viewport:e}=this.context;let{coordinateSystem:n}=this.props;const{_full3d:r}=this.props;let i;e.isGeospatial&&n===u.rf.DEFAULT&&(n=u.rf.LNGLAT),n===u.rf.LNGLAT&&(i=r?e.projectPosition.bind(e):e.projectFlat.bind(e)),this.setState({numInstances:0,polygonTesselator:new g({preproject:i,fp64:this.use64bitPositions(),IndexType:!t||(0,l.QN)(t,c.G.ELEMENT_INDEX_UINT32)?Uint32Array:Uint16Array})});const o=this.getAttributeManager(),s=!0;o.remove(["instancePickingColors"]),o.add({indices:{size:1,isIndexed:!0,update:this.calculateIndices,noAlloc:s},positions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:E,accessor:"getPolygon",update:this.calculatePositions,noAlloc:s,shaderAttributes:{positions:{vertexOffset:0,divisor:0},instancePositions:{vertexOffset:0,divisor:1},nextPositions:{vertexOffset:1,divisor:1}}},vertexValid:{size:1,divisor:1,type:5121,update:this.calculateVertexValid,noAlloc:s},elevations:{size:1,transition:E,accessor:"getElevation",shaderAttributes:{elevations:{divisor:0},instanceElevations:{divisor:1}}},fillColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:E,accessor:"getFillColor",defaultValue:b,shaderAttributes:{fillColors:{divisor:0},instanceFillColors:{divisor:1}}},lineColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:E,accessor:"getLineColor",defaultValue:b,shaderAttributes:{lineColors:{divisor:0},instanceLineColors:{divisor:1}}},pickingColors:{size:3,type:5121,accessor:(t,{index:e,target:n})=>this.encodePickingColor(t&&t.__source?t.__source.index:e,n),shaderAttributes:{pickingColors:{divisor:0},instancePickingColors:{divisor:1}}}})}getPickingInfo(t){const e=super.getPickingInfo(t),{index:n}=e,{data:r}=this.props;return r[0]&&r[0].__source&&(e.object=r.find(t=>t.__source.index===n)),e}disablePickingIndex(t){const{data:e}=this.props;if(e[0]&&e[0].__source)for(let n=0;n<e.length;n++)e[n].__source.index===t&&this._disablePickingIndex(n);else super.disablePickingIndex(t)}draw({uniforms:t}){const{extruded:e,filled:n,wireframe:r,elevationScale:i}=this.props,{topModel:o,sideModel:s,polygonTesselator:a}=this.state,u={...t,extruded:Boolean(e),elevationScale:i};s&&(s.setInstanceCount(a.instanceCount-1),s.setUniforms(u),r&&(s.setDrawMode(3),s.setUniforms({isWireframe:!0}).draw()),n&&(s.setDrawMode(6),s.setUniforms({isWireframe:!1}).draw())),o&&(o.setVertexCount(a.vertexCount),o.setUniforms(u).draw())}updateState(t){super.updateState(t),this.updateGeometry(t);const{props:e,oldProps:n,changeFlags:r}=t,i=this.getAttributeManager();var o;(r.extensionsChanged||e.filled!==n.filled||e.extruded!==n.extruded)&&(null===(o=this.state.models)||void 0===o||o.forEach(t=>t.delete()),this.setState(this._getModels(this.context.gl)),i.invalidateAll())}updateGeometry({props:t,oldProps:e,changeFlags:n}){if(n.dataChanged||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getPolygon)){const{polygonTesselator:e}=this.state,r=t.data.attributes||{};e.updateGeometry({data:t.data,normalize:t._normalize,geometryBuffer:r.getPolygon,buffers:r,getGeometry:t.getPolygon,positionFormat:t.positionFormat,wrapLongitude:t.wrapLongitude,resolution:this.context.viewport.resolution,fp64:this.use64bitPositions(),dataChanged:n.dataChanged,full3d:t._full3d}),this.setState({numInstances:e.instanceCount,startIndices:e.vertexStarts}),n.dataChanged||this.getAttributeManager().invalidateAll()}}_getModels(t){const{id:e,filled:n,extruded:r}=this.props;let i,o;if(n){const n=this.getShaders("top");n.defines.NON_INSTANCED_MODEL=1,i=new h.A(t,{...n,id:"".concat(e,"-top"),drawMode:4,attributes:{vertexPositions:new Float32Array([0,1])},uniforms:{isWireframe:!1,isSideVertex:!1},vertexCount:0,isIndexed:!0})}
2return r&&(o=new h.A(t,{...this.getShaders("side"),id:"".concat(e,"-side"),geometry:new A.A({drawMode:1,vertexCount:4,attributes:{vertexPositions:{size:2,value:new Float32Array([1,0,0,0,0,1,1,1])}}}),instanceCount:0,isInstanced:1}),o.userData.excludeAttributes={indices:!0}),{models:[o,i].filter(Boolean),topModel:i,sideModel:o}}calculateIndices(t){const{polygonTesselator:e}=this.state;t.startIndices=e.indexStarts,t.value=e.get("indices")}calculatePositions(t){const{polygonTesselator:e}=this.state;t.startIndices=e.vertexStarts,t.value=e.get("positions")}calculateVertexValid(t){t.value=this.state.polygonTesselator.get("vertexValid")}}(0,r.A)(x,"defaultProps",w),(0,r.A)(x,"layerName","SolidPolygonLayer")},8120:(t,e,n)=>{"use strict";var r=n(14607),i=r("String.prototype.valueOf"),o=r("Object.prototype.toString"),s=n(51913)();t.exports=function(t){return"string"==typeof t||!(!t||"object"!=typeof t)&&(s?function(t){try{return i(t),!0}catch(t){return!1}}(t):"[object String]"===o(t))}},8473:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(24586),i=n(53320),o=n(44454),s=n(86849);class a extends i.A{constructor(...t){super(...t),(0,r.A)(this,"_lastRenderIndex",-1)}render(t){const e=this.gl;return(0,o.Rz)(e,{framebuffer:t.target}),this._drawLayers(t)}_drawLayers(t){const{target:e,moduleParameters:n,viewports:r,views:i,onViewportActive:s,clearStack:a=!0,clearCanvas:u=!0}=t;t.pass=t.pass||"unknown";const l=this.gl;u&&function(t,e){const n=e?e.width:t.drawingBufferWidth,r=e?e.height:t.drawingBufferHeight;(0,o.Rz)(t,{viewport:[0,0,n,r]}),t.clear(16640)}(l,e),a&&(this._lastRenderIndex=-1);const c=[];for(const o of r){const r=i&&i[o.id];null==s||s(o);const a=this._getDrawLayerParams(o,t),u=o.subViewports||[o];for(const i of u){const o=this._drawLayersInViewport(l,{target:e,moduleParameters:n,viewport:i,view:r,pass:t.pass,layers:t.layers},a);c.push(o)}}return c}_getDrawLayerParams(t,{layers:e,pass:n,isPicking:r=!1,layerFilter:i,cullRect:o,effects:s,moduleParameters:a},l=!1){const c=[],h=u(this._lastRenderIndex+1),A={layer:e[0],viewport:t,isPicking:r,renderPass:n,cullRect:o},f={};for(let r=0;r<e.length;r++){const o=e[r],u=this._shouldDrawLayer(o,A,i,f),d={shouldDrawLayer:u};u&&!l&&(d.layerRenderIndex=h(o,u),d.moduleParameters=this._getModuleParameters(o,s,n,a),d.layerParameters=this.getLayerParameters(o,r,t)),c[r]=d}return c}_drawLayersInViewport(t,{layers:e,moduleParameters:n,pass:r,target:i,viewport:a,view:u},l){const c=function(t,{moduleParameters:e,target:n,viewport:r}){const i=n&&"default-framebuffer"!==n.id,s=e&&e.devicePixelRatio||(0,o.o0)(t),a=i?n.height:t.drawingBufferHeight,u=r;return[u.x*s,a-(u.y+u.height)*s,u.width*s,u.height*s]}(t,{moduleParameters:n,target:i,viewport:a});if(u&&u.props.clear){const e=!0===u.props.clear?{color:!0,depth:!0}:u.props.clear;(0,o.zv)(t,{scissorTest:!0,scissor:c},()=>(0,s.I)(t,e))}const h={totalCount:e.length,visibleCount:0,compositeCount:0,pickableCount:0};(0,o.Rz)(t,{viewport:c});for(let t=0;t<e.length;t++){const n=e[t],{shouldDrawLayer:i,layerRenderIndex:o,moduleParameters:s,layerParameters:u}=l[t];if(i&&n.props.pickable&&h.pickableCount++,n.isComposite)h.compositeCount++;else if(i){h.visibleCount++,this._lastRenderIndex=Math.max(this._lastRenderIndex,o),s.viewport=a;try{n._drawLayer({moduleParameters:s,uniforms:{layerIndex:o},parameters:u})}catch(t){n.raiseError(t,"drawing ".concat(n," to ").concat(r))}}}return h}shouldDrawLayer(t){return!0}getModuleParameters(t,e){return null}getLayerParameters(t,e,n){return t.props.parameters}_shouldDrawLayer(t,e,n,r){if(!t.props.visible||!this.shouldDrawLayer(t))return!1;e.layer=t;let i=t.parent;for(;i;){if(!i.props.visible||!i.filterSubLayer(e))return!1;e.layer=i,i=i.parent}if(n){const t=e.layer.id;if(t in r||(r[t]=n(e)),!r[t])return!1}return t.activateViewport(e.viewport),!0}_getModuleParameters(t,e,n,r){var i;const s=Object.assign(Object.create((null===(i=t.internalState)||void 0===i?void 0:i.propsInTransition)||t.props),{autoWrapLongitude:t.wrapLongitude,viewport:t.context.viewport,mousePosition:t.context.mousePosition,pickingActive:0,devicePixelRatio:(0,o.o0)(this.gl)});if(e)for(const n of e){var a;Object.assign(s,null===(a=n.getModuleParameters)||void 0===a?void 0:a.call(n,t))}return Object.assign(s,this.getModuleParameters(t,e),r)}}function u(t=0,e={}){const n={},r=(i,o)=>{const s=i.props._offset,a=i.id,l=i.parent&&i.parent.id;let c;if(l&&!(l in e)&&r(i.parent,!1),l in n){const t=n[l]=n[l]||u(e[l],e);c=t(i,o),n[a]=t}else Number.isFinite(s)?(c=s+(e[l]||0),n[a]=null):c=t;return o&&c>=t&&(t=c+1),e[a]=c,c};return r}},8554:(t,e,n)=>{"use strict";n.d(e,{t:()=>_});var r=n(24586),i=n(90669);const o="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source";(0,i.A)();class s{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";(0,r.A)(this,"storage",void 0),(0,r.A)(this,"id",void 0),(0,r.A)(this,"config",void 0),this.storage=function(t){try{const e=window[t],n="__storage_test__";return e.setItem(n,n),e.removeItem(n),e}catch(t){return null}}(n),this.id=t,this.config=e,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let t={};
2if(this.storage){const e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}}function a(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600;const i=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>r&&(n=Math.min(n,r/t.width));const o=t.width*n,s=t.height*n,a=["font-size:1px;","padding:".concat(Math.floor(s/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(s,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(s,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),a]}let u;function l(t){return"string"==typeof t?u[t.toUpperCase()]||u.WHITE:t}function c(t,e){if(!t)throw new Error(e||"Assertion failed")}!function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(u||(u={}));const h={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==n.g&&n.g,document:"undefined"!=typeof document&&document,process:"object"==typeof process&&process},A=h.window||h.self||h.global,f=h.process||{};function d(){let t;var e,n;if(i.A&&"performance"in A)t=null==A||null===(e=A.performance)||void 0===e||null===(n=e.now)||void 0===n?void 0:n.call(e);else if("hrtime"in f){var r;const e=null==f||null===(r=f.hrtime)||void 0===r?void 0:r.call(f);t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}const p={debug:i.A&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},g={enabled:!0,level:0};function m(){}const y={},v={once:!0};class _{constructor(){let{id:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""};(0,r.A)(this,"id",void 0),(0,r.A)(this,"VERSION",o),(0,r.A)(this,"_startTs",d()),(0,r.A)(this,"_deltaTs",d()),(0,r.A)(this,"_storage",void 0),(0,r.A)(this,"userData",{}),(0,r.A)(this,"LOG_THROTTLE_TIMEOUT",0),this.id=t,this.userData={},this._storage=new s("__probe-".concat(this.id,"__"),g),this.timeStamp("".concat(this.id," started")),function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"];const n=Object.getPrototypeOf(t),r=Object.getOwnPropertyNames(n);for(const n of r)"function"==typeof t[n]&&(e.find(t=>n===t)||(t[n]=t[n].bind(t)))}(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((d()-this._startTs).toPrecision(10))}getDelta(){return Number((d()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,e){this._storage.setConfiguration({[t]:e})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,e){c(t,e)}warn(t){return this._getLogFunction(0,t,p.warn,arguments,v)}error(t){return this._getLogFunction(0,t,p.error,arguments)}deprecated(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}removed(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}probe(t,e){return this._getLogFunction(t,e,p.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,p.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return this._getLogFunction(t,e,p.debug||p.info,arguments,v)}table(t,e,n){return e?this._getLogFunction(t,e,console.table||m,n&&[n],{tag:E(e)}):m}image(t){let{logLevel:e,priority:n,image:r,message:o="",scale:s=1}=t;return this._shouldLog(e||n)?i.A?function(t){let{image:e,message:n="",scale:r=1}=t;if("string"==typeof e){const t=new Image;return t.onload=()=>{const e=a(t,n,r);console.log(...e)},t.src=e,m}const i=e.nodeName||"";if("img"===i.toLowerCase())return console.log(...a(e,n,r)),m;if("canvas"===i.toLowerCase()){const t=new Image;return t.onload=()=>console.log(...a(t,n,r)),t.src=e.toDataURL(),m}return m}({image:r,message:o,scale:s}):function(t){let{image:e,message:n="",scale:r=1}=t;return console.warn("removed"),m}({image:r,message:o,scale:s}):m}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||m)}group(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1};const r=w({logLevel:t,message:e,opts:n}
2),{collapsed:i}=n;return r.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(t,e,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||m)}withGroup(t,e,n){this.group(t,e)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=b(t)}_getLogFunction(t,e,n,r,o){if(this._shouldLog(t)){o=w({logLevel:t,message:e,args:r,opts:o}),c(n=n||o.method),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=d();const s=o.tag||o.message;if(o.once){if(y[s])return m;y[s]=d()}return e=function(t,e,n){if("string"==typeof e){const a=n.time?function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const n=Math.max(e-t.length,0);return"".concat(" ".repeat(n)).concat(t)}(function(t){let e;return e=t<10?"".concat(t.toFixed(2),"ms"):t<100?"".concat(t.toFixed(1),"ms"):t<1e3?"".concat(t.toFixed(0),"ms"):"".concat((t/1e3).toFixed(2),"s"),e}(n.total)):"";r=e=n.time?"".concat(t,": ").concat(a," ").concat(e):"".concat(t,": ").concat(e),o=n.color,s=n.background,i.A||"string"!=typeof r||(o&&(o=l(o),r="�[".concat(o,"m").concat(r,"�[39m")),s&&(o=l(s),r="�[".concat(s+10,"m").concat(r,"�[49m"))),e=r}var r,o,s;return e}(this.id,o.message,o),n.bind(console,e,...o.args)}return m}}function b(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return c(Number.isFinite(e)&&e>=0),e}function w(t){const{logLevel:e,message:n}=t;t.logLevel=b(e);const r=t.args?Array.from(t.args):[];for(;r.length&&r.shift()!==n;);switch(typeof e){case"string":case"function":void 0!==n&&r.unshift(n),t.message=e;break;case"object":Object.assign(t,e)}"function"==typeof t.message&&(t.message=t.message());const i=typeof t.message;return c("string"===i||"object"===i),Object.assign(t,{args:r},t.opts)}function E(t){for(const e in t)for(const n in t[e])return n||"untitled";return"empty"}(0,r.A)(_,"VERSION",o)},8668:t=>{var e;e=class{constructor(t){t=this.normalizeCoordinateNumbers(t),this.sign=this.normalizedSignOf(t[0]),[this.degrees,this.minutes,this.seconds,this.milliseconds]=t.map(Math.abs)}normalizeCoordinateNumbers(t){var e,n,r,i,o;for(o=[0,0,0,0],n=r=0,i=t.length;r<i;n=++r)e=t[n],o[n]=parseFloat(e);return o}normalizedSignOf(t){return t>=0?1:-1}detectSpecialFormats(){if(this.degreesCanBeSpecial()){if(this.degreesCanBeMilliseconds())return this.degreesAsMilliseconds();if(this.degreesCanBeDegreesMinutesAndSeconds())return this.degreesAsDegreesMinutesAndSeconds();if(this.degreesCanBeDegreesAndMinutes())return this.degreesAsDegreesAndMinutes()}}degreesCanBeSpecial(){var t;return t=!1,this.minutes||this.seconds||(t=!0),t}degreesCanBeMilliseconds(){return this.degrees>909090}degreesAsMilliseconds(){return this.milliseconds=this.degrees,this.degrees=0}degreesCanBeDegreesMinutesAndSeconds(){return this.degrees>9090}degreesAsDegreesMinutesAndSeconds(){var t;return t=Math.floor(this.degrees/1e4),this.minutes=Math.floor((this.degrees-1e4*t)/100),this.seconds=Math.floor(this.degrees-1e4*t-100*this.minutes),this.degrees=t}degreesCanBeDegreesAndMinutes(){return this.degrees>360}degreesAsDegreesAndMinutes(){var t;return t=Math.floor(this.degrees/100),this.minutes=this.degrees-100*t,this.degrees=t}toDecimal(){return this.sign*(this.degrees+this.minutes/60+this.seconds/3600+this.milliseconds/36e5)}},t.exports=e},8755:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(55808)),i=n(72830),o=n(78345);function s(t){const e=[];if(o.geomEach.call(void 0,t,t=>{e.push(t.coordinates)}
2),e.length<2)throw new Error("Must have at least two features");const n=t.features[0].properties||{},s=r.difference(e[0],...e.slice(1));return 0===s.length?null:1===s.length?i.polygon.call(void 0,s[0],n):i.multiPolygon.call(void 0,s,n)}var a=s;e.default=a,e.difference=s},8800:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},o(t,e,n||t)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ThreeClickPolygonMode=void 0;var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(c,t);var e,n,u,l=(u=c,function(){var t,e=s(u);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),l.apply(this,arguments)}return e=c,(n=[{key:"handleClick",value:function(t,e){this.addClickSequence(t);var n=this.getClickSequence(),r=this.getTentativeGuide(e);if(n.length>2&&r&&"Polygon"===r.geometry.type){var i=this.getAddFeatureOrBooleanPolygonAction(r.geometry,e);this.resetClickSequence(),i&&e.onEdit(i)}}},{key:"getGuides",value:function(t){var e=t.lastPointerMoveEvent,n=t.modeConfig,r=this.getClickSequence(),i={type:"FeatureCollection",features:[]};if(0===r.length)return i;var o=e.mapCoords;if(1===r.length)i.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[0],o]}});else{var s=this.getThreeClickPolygon(r[0],r[1],o,n);s&&i.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:s.geometry})}return i}},{key:"getThreeClickPolygon",value:function(t,e,n,r){return null}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),o(s(c.prototype),"handlePointerMove",this).call(this,t,e)}},{key:"createTentativeFeature",value:function(t){var e,n=t.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 2===r.length&&(e=this.getThreeClickPolygon(r[0],r[1],i[0],t.modeConfig)),e}}])&&i(e.prototype,n),c}(n(96146).GeoJsonEditMode);e.ThreeClickPolygonMode=u},8945:(t,e,n)=>{"use strict";n.r(e),n.d(e,{UNITS:()=>m,cellArea:()=>dt,compact:()=>$,degsToRads:()=>bt,edgeLength:()=>mt,exactEdgeLength:()=>pt,experimentalH3ToLocalIj:()=>ht,experimentalLocalIjToH3:()=>At,geoToH3:()=>z,getDestinationH3IndexFromUnidirectionalEdge:()=>it,getH3IndexesFromUnidirectionalEdge:()=>st,getH3UnidirectionalEdge:()=>nt,getH3UnidirectionalEdgeBoundary:()=>ut,getH3UnidirectionalEdgesFromHexagon:()=>at,getOriginH3IndexFromUnidirectionalEdge:()=>rt,getPentagonIndexes:()=>_t,getRes0Indexes:()=>vt,h3Distance:()=>lt,h3GetBaseCell:()=>j,h3GetFaces:()=>U,h3GetResolution:()=>G,h3IndexToSplitLong:()=>
2_,h3IndexesAreNeighbors:()=>et,h3IsPentagon:()=>F,h3IsResClassIII:()=>D,h3IsValid:()=>N,h3Line:()=>ct,h3SetToMultiPolygon:()=>K,h3ToCenterChild:()=>X,h3ToChildren:()=>W,h3ToGeo:()=>V,h3ToGeoBoundary:()=>H,h3ToParent:()=>q,h3UnidirectionalEdgeIsValid:()=>ot,hexArea:()=>gt,hexRing:()=>J,kRing:()=>Y,kRingDistances:()=>Q,numHexagons:()=>yt,pointDist:()=>ft,polyfill:()=>Z,radsToDegs:()=>wt,splitLongToh3Index:()=>w,uncompact:()=>tt});var r=function(t){var e,n=void 0!==(t=t||{})?t:{},r={};for(e in n)n.hasOwnProperty(e)&&(r[e]=n[e]);var i,o=[],s="";document.currentScript&&(s=document.currentScript.src),s=0!==s.indexOf("blob:")?s.substr(0,s.lastIndexOf("/")+1):"",i=function(t,e,n){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||0==r.status&&r.response)e(r.response);else{var i=Q(t);i?e(i.buffer):n()}},r.onerror=n,r.send(null)};var a=n.print||console.log.bind(console),u=n.printErr||console.warn.bind(console);for(e in r)r.hasOwnProperty(e)&&(n[e]=r[e]);r=null,n.arguments&&(o=n.arguments);var l=0,c=function(){return l},h=!1;function A(t){var e=n["_"+t];return e||ut("Assertion failed: "+("Cannot call unknown function "+t+", make sure it is exported")),e}var f,d,p,g,m,y,v,_="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function b(t,e){return t?function(t,e,n){for(var r=e+n,i=e;t[i]&&!(i>=r);)++i;if(i-e>16&&t.subarray&&_)return _.decode(t.subarray(e,i));for(var o="";e<i;){var s=t[e++];if(128&s){var a=63&t[e++];if(192!=(224&s)){var u=63&t[e++];if((s=224==(240&s)?(15&s)<<12|a<<6|u:(7&s)<<18|a<<12|u<<6|63&t[e++])<65536)o+=String.fromCharCode(s);else{var l=s-65536;o+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else o+=String.fromCharCode((31&s)<<6|a)}else o+=String.fromCharCode(s)}return o}(p,t,e):""}function w(t,e){return t%e>0&&(t+=e-t%e),t}function E(t){f=t,n.HEAP8=d=new Int8Array(t),n.HEAP16=g=new Int16Array(t),n.HEAP32=m=new Int32Array(t),n.HEAPU8=p=new Uint8Array(t),n.HEAPU16=new Uint16Array(t),n.HEAPU32=new Uint32Array(t),n.HEAPF32=y=new Float32Array(t),n.HEAPF64=v=new Float64Array(t)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var x=n.TOTAL_MEMORY||33554432;function S(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var r=e.func;"number"==typeof r?void 0===e.arg?n.dynCall_v(r):n.dynCall_vi(r,e.arg):r(void 0===e.arg?null:e.arg)}else e()}}x=(f=n.buffer?n.buffer:new ArrayBuffer(x)).byteLength,E(f),m[6004]=5266928;var T=[],P=[],C=[],M=[];function I(t){T.unshift(t)}function O(t){M.unshift(t)}var R=Math.abs,L=Math.ceil,B=Math.floor,k=Math.min,N=0,F=null,D=null;n.preloadedImages={},n.preloadedAudios={};var j,U,G=null,z="data:application/octet-stream;base64,";function V(t){return String.prototype.startsWith?t.startsWith(z):0===t.indexOf(z)}function H(t){return t.replace(/\b__Z[\w\d_]+/g,function(t){return t==t?t:t+" ["+t+"]"})}function q(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}function W(){return d.length}function X(t){try{var e=new ArrayBuffer(t);if(e.byteLength!=t)return;return new Int8Array(e).set(d),$(e),E(e),1}catch(t){}}G="data:application/octet-stream;base64,AAAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAABAAAAAMAAAAGAAAABQAAAAIAAAAAAAAAAgAAAAMAAAABAAAABAAAAAYAAAAAAAAABQAAAAMAAAAGAAAABAAAAAUAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAABAAAABQAAAAIAAAAAAAAAAQAAAAMAAAAGAAAABAAAAAYAAAAAAAAABQAAAAIAAAABAAAABAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAgAAAAMAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAABgAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAAAAAAABgAAAAAAAAADAAAAAgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAUAAAAEAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAEAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAUAAAACAAAABAAAAAMAAAAIAAAAAQAAAAcAAAAGAAAACQAAAAAAAAADAAAAAgAAAAIAAAAGAAAACgAAAAsAAAAAAAAAAQAAAAUAAAADAAAADQAAAAEAAAAHAAAABAAAAAwAAAAAAAAABAAAAH8AAAAPAAAACAAAAAMAAAAAAAAADAAAAAUAAAACAAAAEgAAAAoAAAAIAAAAAAAAABAAAAAGAAAADgAAAAsAAAARAAAAAQAAAAkAAAACAAAABwAAABUAAAAJAAAAEwAAAAMAAAANAAAAAQAAAAgAAAAFAAAAFgAAABAAAAAEAAAAAAAAAA8AAAAJAAAAEwAAAA4AAAAUAAAAAQAAAAcAAAAGAAAACgAAAAsAAAAYAAAAFwAAAAUAAAACAAAAEgAAAAsAAAARAAAAFwAAABkAAAACAAAABgAAAAoAAAAMAAAAHAAAAA0AAAAaAAAABAAAAA8AAAADAAAADQAAABoAAAAVAAAAHQAAAAMAAAAMAAAABwAAAA4AAAB/AAAAEQAAABsAAAAJAAAAFAAAAAYAAAAPAAAAFgAAABwAAAAfAAAABAAAAAgAAAAMAAAAEAAAABIAAAAhAAAAHgAAAAgAAAAFAAAAFgAAABEAAAALAAAADgAAAAYAAAAjAAAAGQAAABsAAAASAAAAGAAAAB4AAAAgAAAABQAAAAoAAAAQAAAAEwAAACIAAAAUAAAAJAAAAAcAAAAVAAAACQAAABQAAAAOAAAAEwAAAAkAAAAoAAAAGwAAACQAAAAVAAAAJgAAABMAAAAiAAAADQAAAB0AAAAHAAAAFgAAABAAAAApAAAAIQAAAA8AAAAIAAAAHwAAABcAAAAYAAAACwAAAAoAAAAnAAAAJQAAABkAAAAYAAAAfwAAACAAAAAlAAAACgAAABcAAAASAAAAGQAAABcAAAARAAAACwAAAC0AAAAnAAAAIwAAABoAAAAqAAAAHQAAACsAAAAMAAAAHAAAAA0AAAAbAAAAKAAAACMAAAAuAAAADgAAABQAAAARAAAAHAAAAB8AAAAqAAAALAAAAAwAAAAPAAAAGgAAAB0AAAArAAAAJgAAAC8AAAANAAAAGgAAABUAAAAeAAAAIAAAADAAAAAyAAAAEAAAABIAAAAhAAAAHwAAACkAAAAsAAAANQAAAA8AAAAWAAAAHAAAACAAAAAeAAAAGAAAABIAAAA0AAAAMgAAACUAAAAhAAAAHgAAADEAAAAwAAAAFgAAABAAAAApAAAAIgAAABMAAAAmAAAAFQAAADYAAAAkAAAAMwAAACMAAAAuAAAALQAAADgAAAARAAAAGwAAABkAAAAkAAAAFAAAACIAAAATAAAANwAAACgAAAA2AAAAJQAAACcAAAA0AAAAOQAAABgAAAAXAAAAIAAAACYAAAB/AAAAIgAAADMAAAAdAAAALwAAABUAAAAnAAAAJQAAABkAAAAXAAAAOwAAADkAAAAtAAAAKAAAABsAAAAkAAAAFAAAADwAAAAuAAAANwAAACkAAAAxAAAANQAAAD0AAAAWAAAAIQAAAB8AAAAqAAAAOgAAACsAAAA+AAAAHAAAACwAAAAaAAAAKwAAAD4AAAAvAAAAQAAAABoAAAAqAAAAHQAAACwAAAA1AAAAOgAAAEEAAAAcAAAAHwAAACoAAAAtAAAAJwAAACMAAAAZAAAAPwAAADsAAAA4AAAALgAAADwAAAA4AAAARAAAABsAAAAoAAAAIwAAAC8AAAAmAAAAKwAAAB0AAAB
2FAAAAMwAAAEAAAAAwAAAAMQAAAB4AAAAhAAAAQwAAAEIAAAAyAAAAMQAAAH8AAAA9AAAAQgAAACEAAAAwAAAAKQAAADIAAAAwAAAAIAAAAB4AAABGAAAAQwAAADQAAAAzAAAARQAAADYAAABHAAAAJgAAAC8AAAAiAAAANAAAADkAAABGAAAASgAAACAAAAAlAAAAMgAAADUAAAA9AAAAQQAAAEsAAAAfAAAAKQAAACwAAAA2AAAARwAAADcAAABJAAAAIgAAADMAAAAkAAAANwAAACgAAAA2AAAAJAAAAEgAAAA8AAAASQAAADgAAABEAAAAPwAAAE0AAAAjAAAALgAAAC0AAAA5AAAAOwAAAEoAAABOAAAAJQAAACcAAAA0AAAAOgAAAH8AAAA+AAAATAAAACwAAABBAAAAKgAAADsAAAA/AAAATgAAAE8AAAAnAAAALQAAADkAAAA8AAAASAAAAEQAAABQAAAAKAAAADcAAAAuAAAAPQAAADUAAAAxAAAAKQAAAFEAAABLAAAAQgAAAD4AAAArAAAAOgAAACoAAABSAAAAQAAAAEwAAAA/AAAAfwAAADgAAAAtAAAATwAAADsAAABNAAAAQAAAAC8AAAA+AAAAKwAAAFQAAABFAAAAUgAAAEEAAAA6AAAANQAAACwAAABWAAAATAAAAEsAAABCAAAAQwAAAFEAAABVAAAAMQAAADAAAAA9AAAAQwAAAEIAAAAyAAAAMAAAAFcAAABVAAAARgAAAEQAAAA4AAAAPAAAAC4AAABaAAAATQAAAFAAAABFAAAAMwAAAEAAAAAvAAAAWQAAAEcAAABUAAAARgAAAEMAAAA0AAAAMgAAAFMAAABXAAAASgAAAEcAAABZAAAASQAAAFsAAAAzAAAARQAAADYAAABIAAAAfwAAAEkAAAA3AAAAUAAAADwAAABYAAAASQAAAFsAAABIAAAAWAAAADYAAABHAAAANwAAAEoAAABOAAAAUwAAAFwAAAA0AAAAOQAAAEYAAABLAAAAQQAAAD0AAAA1AAAAXgAAAFYAAABRAAAATAAAAFYAAABSAAAAYAAAADoAAABBAAAAPgAAAE0AAAA/AAAARAAAADgAAABdAAAATwAAAFoAAABOAAAASgAAADsAAAA5AAAAXwAAAFwAAABPAAAATwAAAE4AAAA/AAAAOwAAAF0AAABfAAAATQAAAFAAAABEAAAASAAAADwAAABjAAAAWgAAAFgAAABRAAAAVQAAAF4AAABlAAAAPQAAAEIAAABLAAAAUgAAAGAAAABUAAAAYgAAAD4AAABMAAAAQAAAAFMAAAB/AAAASgAAAEYAAABkAAAAVwAAAFwAAABUAAAARQAAAFIAAABAAAAAYQAAAFkAAABiAAAAVQAAAFcAAABlAAAAZgAAAEIAAABDAAAAUQAAAFYAAABMAAAASwAAAEEAAABoAAAAYAAAAF4AAABXAAAAUwAAAGYAAABkAAAAQwAAAEYAAABVAAAAWAAAAEgAAABbAAAASQAAAGMAAABQAAAAaQAAAFkAAABhAAAAWwAAAGcAAABFAAAAVAAAAEcAAABaAAAATQAAAFAAAABEAAAAagAAAF0AAABjAAAAWwAAAEkAAABZAAAARwAAAGkAAABYAAAAZwAAAFwAAABTAAAATgAAAEoAAABsAAAAZAAAAF8AAABdAAAATwAAAFoAAABNAAAAbQAAAF8AAABqAAAAXgAAAFYAAABRAAAASwAAAGsAAABoAAAAZQAAAF8AAABcAAAATwAAAE4AAABtAAAAbAAAAF0AAABgAAAAaAAAAGIAAABuAAAATAAAAFYAAABSAAAAYQAAAH8AAABiAAAAVAAAAGcAAABZAAAAbwAAAGIAAABuAAAAYQAAAG8AAABSAAAAYAAAAFQAAABjAAAAUAAAAGkAAABYAAAAagAAAFoAAABxAAAAZAAAAGYAAABTAAAAVwAAAGwAAAByAAAAXAAAAGUAAABmAAAAawAAAHAAAABRAAAAVQAAAF4AAABmAAAAZQAAAFcAAABVAAAAcgAAAHAAAABkAAAAZwAAAFsAAABhAAAAWQAAAHQAAABpAAAAbwAAAGgAAABrAAAAbgAAAHMAAABWAAAAXgAAAGAAAABpAAAAWAAAAGcAAABbAAAAcQAAAGMAAAB0AAAAagAAAF0AAABjAAAAWgAAAHUAAABtAAAAcQAAAGsAAAB/AAAAZQAAAF4AAABzAAAAaAAAAHAAAABsAAAAZAAAAF8AAABcAAAAdgAAAHIAAABtAAAAbQAAAGwAAABdAAAAXwAAAHUAAAB2AAAAagAAAG4AAABiAAAAaAAAAGAAAAB3AAAAbwAAAHMAAABvAAAAYQAAAG4AAABiAAAAdAAAAGcAAAB3AAAAcAAAAGsAAABmAAAAZQAAAHgAAABzAAAAcgAAAHEAAABjAAAAdAAAAGkAAAB1AAAAagAAAHkAAAByAAAAcAAAAGQAAABmAAAAdgAAAHgAAABsAAAAcwAAAG4AAABrAAAAaAAAAHgAAAB3AAAAcAAAAHQAAABnAAAAdwAAAG8AAABxAAAAaQAAAHkAAAB1AAAAfwAAAG0AAAB2AAAAcQAAAHkAAABqAAAAdgAAAHgAAABsAAAAcgAAAHUAAAB5AAAAbQAAAHcAAABvAAAAcwAAAG4AAAB5AAAAdAAAAHgAAAB4AAAAcwAAAHIAAABwAAAAeQAAAHcAAAB2AAAAeQAAAHQAAAB4AAAAdwAAAHUAAABxAAAAdgAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAQAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAADAAAABQAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAgAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAABQAAAAUAAAAAAAAAAAAAAP////8BAAAAAAAAAAMAAAAEAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAQAAAP//////////AQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAIAAAAAAAAAAAAAAAEAAAACAAAABgAAAAQAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAAAAAABAAAAAQAAAAUAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAAAAAAAAAAAAAEAAAADAAAABwAAAAYAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAJAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAAAAAAAAAAAAQAAAAQAAAAIAAAACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAAAAAAAAAAABAAAACwAAAA8AAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAAAAAAAAAAABAAAADAAAABAAAAAMAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAEAAAAKAAAAEwAAAAgAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAgAAAAAAAAAAAAAAAQAAAA0AAAARAAAADQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAAAAAAAAAAAAAEAAAAOAAAAEgAAAA8AAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAAAAAABAAAA//////
2////8TAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABIAAAAAAAAAGAAAAAAAAAAhAAAAAAAAAB4AAAAAAAAAIAAAAAMAAAAxAAAAAQAAADAAAAADAAAAMgAAAAMAAAAIAAAAAAAAAAUAAAAFAAAACgAAAAUAAAAWAAAAAAAAABAAAAAAAAAAEgAAAAAAAAApAAAAAQAAACEAAAAAAAAAHgAAAAAAAAAEAAAAAAAAAAAAAAAFAAAAAgAAAAUAAAAPAAAAAQAAAAgAAAAAAAAABQAAAAUAAAAfAAAAAQAAABYAAAAAAAAAEAAAAAAAAAACAAAAAAAAAAYAAAAAAAAADgAAAAAAAAAKAAAAAAAAAAsAAAAAAAAAEQAAAAMAAAAYAAAAAQAAABcAAAADAAAAGQAAAAMAAAAAAAAAAAAAAAEAAAAFAAAACQAAAAUAAAAFAAAAAAAAAAIAAAAAAAAABgAAAAAAAAASAAAAAQAAAAoAAAAAAAAACwAAAAAAAAAEAAAAAQAAAAMAAAAFAAAABwAAAAUAAAAIAAAAAQAAAAAAAAAAAAAAAQAAAAUAAAAQAAAAAQAAAAUAAAAAAAAAAgAAAAAAAAAHAAAAAAAAABUAAAAAAAAAJgAAAAAAAAAJAAAAAAAAABMAAAAAAAAAIgAAAAMAAAAOAAAAAQAAABQAAAADAAAAJAAAAAMAAAADAAAAAAAAAA0AAAAFAAAAHQAAAAUAAAABAAAAAAAAAAcAAAAAAAAAFQAAAAAAAAAGAAAAAQAAAAkAAAAAAAAAEwAAAAAAAAAEAAAAAgAAAAwAAAAFAAAAGgAAAAUAAAAAAAAAAQAAAAMAAAAAAAAADQAAAAUAAAACAAAAAQAAAAEAAAAAAAAABwAAAAAAAAAaAAAAAAAAACoAAAAAAAAAOgAAAAAAAAAdAAAAAAAAACsAAAAAAAAAPgAAAAMAAAAmAAAAAQAAAC8AAAADAAAAQAAAAAMAAAAMAAAAAAAAABwAAAAFAAAALAAAAAUAAAANAAAAAAAAABoAAAAAAAAAKgAAAAAAAAAVAAAAAQAAAB0AAAAAAAAAKwAAAAAAAAAEAAAAAwAAAA8AAAAFAAAAHwAAAAUAAAADAAAAAQAAAAwAAAAAAAAAHAAAAAUAAAAHAAAAAQAAAA0AAAAAAAAAGgAAAAAAAAAfAAAAAAAAACkAAAAAAAAAMQAAAAAAAAAsAAAAAAAAADUAAAAAAAAAPQAAAAMAAAA6AAAAAQAAAEEAAAADAAAASwAAAAMAAAAPAAAAAAAAABYAAAAFAAAAIQAAAAUAAAAcAAAAAAAAAB8AAAAAAAAAKQAAAAAAAAAqAAAAAQAAACwAAAAAAAAANQAAAAAAAAAEAAAABAAAAAgAAAAFAAAAEAAAAAUAAAAMAAAAAQAAAA8AAAAAAAAAFgAAAAUAAAAaAAAAAQAAABwAAAAAAAAAHwAAAAAAAAAyAAAAAAAAADAAAAAAAAAAMQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAIQAAAAMAAAAYAAAAAwAAABIAAAADAAAAEAAAAAMAAABGAAAAAAAAAEMAAAAAAAAAQgAAAAMAAAA0AAAAAwAAADIAAAAAAAAAMAAAAAAAAAAlAAAAAwAAACAAAAAAAAAAHgAAAAMAAABTAAAAAAAAAFcAAAADAAAAVQAAAAMAAABKAAAAAwAAAEYAAAAAAAAAQwAAAAAAAAA5AAAAAQAAADQAAAADAAAAMgAAAAAAAAAZAAAAAAAAABcAAAAAAAAAGAAAAAMAAAARAAAAAAAAAAsAAAADAAAACgAAAAMAAAAOAAAAAwAAAAYAAAADAAAAAgAAAAMAAAAtAAAAAAAAACcAAAAAAAAAJQAAAAMAAAAjAAAAAwAAABkAAAAAAAAAFwAAAAAAAAAbAAAAAwAAABEAAAAAAAAACwAAAAMAAAA/AAAAAAAAADsAAAADAAAAOQAAAAMAAAA4AAAAAwAAAC0AAAAAAAAAJwAAAAAAAAAuAAAAAwAAACMAAAADAAAAGQAAAAAAAAAkAAAAAAAAABQAAAAAAAAADgAAAAMAAAAiAAAAAAAAABMAAAADAAAACQAAAAMAAAAmAAAAAwAAABUAAAADAAAABwAAAAMAAAA3AAAAAAAAACgAAAAAAAAAGwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAFAAAAAAAAAAzAAAAAwAAACIAAAAAAAAAEwAAAAMAAABIAAAAAAAAADwAAAADAAAALgAAAAMAAABJAAAAAwAAADcAAAAAAAAAKAAAAAAAAABHAAAAAwAAADYAAAADAAAAJAAAAAAAAABAAAAAAAAAAC8AAAAAAAAAJgAAAAMAAAA+AAAAAAAAACsAAAADAAAAHQAAAAMAAAA6AAAAAwAAACoAAAADAAAAGgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAMwAAAAMAAABSAAAAAwAAAEAAAAAAAAAALwAAAAAAAABMAAAAAwAAAD4AAAAAAAAAKwAAAAMAAABhAAAAAAAAAFkAAAADAAAARwAAAAMAAABiAAAAAwAAAFQAAAAAAAAARQAAAAAAAABgAAAAAwAAAFIAAAADAAAAQAAAAAAAAABLAAAAAAAAAEEAAAAAAAAAOgAAAAMAAAA9AAAAAAAAADUAAAADAAAALAAAAAMAAAAxAAAAAwAAACkAAAADAAAAHwAAAAMAAABeAAAAAAAAAFYAAAAAAAAATAAAAAMAAABRAAAAAwAAAEsAAAAAAAAAQQAAAAAAAABCAAAAAwAAAD0AAAAAAAAANQAAAAMAAABrAAAAAAAAAGgAAAADAAAAYAAAAAMAAABlAAAAAwAAAF4AAAAAAAAAVgAAAAAAAABVAAAAAwAAAFEAAAADAAAASwAAAAAAAAA5AAAAAAAAADsAAAAAAAAAPwAAAAMAAABKAAAAAAAAAE4AAAADAAAATwAAAAMAAABTAAAAAwAAAFwAAAADAAAAXwAAAAMAAAAlAAAAAAAAACcAAAADAAAALQAAAAMAAAA0AAAAAAAAADkAAAAAAAAAOwAAAAAAAABGAAAAAwAAAEoAAAAAAAAATgAAAAMAAAAYAAAAAAAAABcAAAADAAAAGQAAAAMAAAAgAAAAAwAAACUAAAAAAAAAJwAAAAMAAAAyAAAAAwAAADQAAAAAAAAAOQAAAAAAAAAuAAAAAAAAADwAAAAAAAAASAAAAAMAAAA4AAAAAAAAAEQAAAADAAAAUAAAAAMAAAA/AAAAAwAAAE0AAAADAAAAWgAAAAMAAAAbAAAAAAAAACgAAAADAAAANwAAAAMAAAAjAAAAAAAAAC4AAAAAAAAAPAAAAAAAAAAtAAAAAwAAADgAAAAAAAAARAAAAAMAAAAOAAAAAAAAABQAAAADAAAAJAAAAAMAAAARAAAAAwAAABsAAAAAAAAAKAAAAAMAAAAZAAAAAwAAACMAAAAAAAAALgAAAAAAAABHAAAAAAAAAFkAAAAAAAAAYQAAAAMAAABJAAAAAAAAAFsAAAADAAAAZwAAAAMAAABIAAAAAwAAAFgAAAADAAAAaQAAAAMAAAAzAAAAAAAAAEUAAAADAAAAVAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAWQAAAAAAAAA3AAAAAwAAAEkAAAAAAAAAWwAAAAMAAAAmAAAAAAAAAC8AAAADAAAAQAAAAAMAAAAiAAAAAwAAADMAAAAAAAAARQAAAAMAAAAkAAAAAwAAADYAAAAAAAAARwAAAAAAAABgAAAAAAAAAGgAAAAAAAAAawAAAAMAAABiAAAAAAAAAG4AAAADAAAAcwAAAAMAAABhAAAAAwAAAG8AAAADAAAAdwAAAAMAAABMAAAAAAAAAFYAAAADAAAAXgAAAAMAAABSAAAAAAAAAGAAAAAAAAAAaAAAAAAAAABUAAAAAwAAAGIAAAAAAAAAbgAAAAMAAAA6AAAAAAAAAEEAAAADAAAASwAAAAMAAAA+AAAAAwAAAEwAAAAAAAAAVgAAAAMAAABAAAAAAwAAAFIAAAAAAAAAYAAAAAAAAABVAAAAAAAAAFcAAAAAAAAAUwAAAAMAAABlAAAAAAAAAGYAAAADAAAAZAAAAAMAAABrAAAAAwAAAHAAAAADAAAAcgAAAAMAAABCAAAAAAAAAEMAAAADAAAARgAAAAMAAABRAAAAAAAAAFUAAAAAAAAAVwAAAAAAAABeAAAAAwAAAGUAAAAAAAAAZgAAAAMAAAAxAAAAAAAAADAAAAADAAAAMgAAAAMAAAA9AAAAAwAAAEIAAAAAAAAAQwAAAAMAAABLAAAAAwAAAFEAAAAAAAAAVQAAAAAAAABfAAAAAAAAAFwAAAAAAAAAUwAAAAAAAABPAAAAAAAAAE4AAAAAAAAASgAAAAMAAAA/AAAAAQAAADsAAAADAAAAOQAAAAMAAABtAAAAAAAAAGwAAAAAAAAAZAAAAAUAAABdAAAAAQAAAF8AAAAAAAAAXAAAAAAAAABNAAAAAQAAAE8AAAAAAAAATgAAAAAAAAB1AAAABAAAAHYAAAAFAAAAcgAAAAUAAABqAAAAAQAAAG0AAAAAAAAAbAAAAAAAAABaAAAAAQAAAF0AAAABAAAAXwAAAAAAAABaAAAAAAAAAE0AAAAAAAAAPwAAAAAAAABQAAAAAAAAAEQAAAAAAAAAOAAAAAMAAABIAAAAAQAAADwAAAADAAAALgAAAAMAAABqAAAAAAAAAF0AAAAAAAAATwAAAAUAAABjAAAAAQAAAFoAAAAAAAAATQAAAAAAAABYAAAAAQAAAFAAAAAAAAAARAAAAAAAAAB1AAAAAwAAAG0AAAAFAAAAXwAAAAUAAABxAAAAAQAAAGoAAAAAAAAAXQAAAAAAAABpAAAAAQAAAGMAAAABAAAAWgAAAAAAAABpAAAAAAAAAFgAAAAAAAAASAAAAAAAAABnAAAAAAAAAFsAAAAAAAAASQAAAAMAAABhAAAAAQAAAFkAAAADAAAARwAAAAMAAABxAAAAAAAAAGMAAAAAAAAAUAAAAAUAAAB0AAAAAQAAAGkAAAAAAAAAWAAAAAAAAABvAAAAAQAAAGcAAAAAAAAAWwAAAAAAAAB1AAAAAgAAAGoAAAAFAAAAWgAAAAUAAAB5AAAAAQAAAHEAAAAAAAAAYwAAAAAAAAB3AAAAAQAAAHQAAAABAAAAaQAAAAAAAAB3AAAAAAAAAG8AAAAAAAAAYQAAAAAAAABzAAAAAAAAAG4AAAAAAAAAYgAAAAMAAABrAAAAAQAAAGgAAAADAAAAYAAAAAMAAAB5AAAAAAAAAHQAAAAAAAAAZwAAAAUAAAB4AAAAAQAAAHcAAAAAAAAAbwAAAAAAAABwAAAAAQAAAHMAAAAAAAAAbgAAAAAAAAB1AAAAAQAAAHEAAAAFAAAAaQAAAAUAAAB2AAAAAQAAAHkAAAAAAAAAdAAAAAAAAAByAAAAAQAAAHgAAAABAAAAdwAAAAAAAAByAAAAAAAAAHAAAAAAAAAAawAAAAAAAABkAAAAAAAAAGYAAAAAAAAAZQAAAAMAAABTAAAAAQAAAFcAAAADAAAAVQAAAAMAAAB2AAAAAAAAAHgAAAAAAAAAcwAAAAUAAABsAAAAAQAAAHIAAAAAAAAAcAAAAAAAAABcAAAAAQAAAGQAAAAAAAAAZgAAAAAAAAB1AAAAAAAAAHkAAAAFAAAAdwAAAAUAAABtAAAAAQAAAHYAAAAAAAAAeAAAAAAAAABfAAAAAQAAAGwAAAABAAAAcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAB+ogX28rbpPxqumpJv+fM/165tC4ns9D+XaEnTqUsEQFrOtNlC4PA/3U+0XG6P9b9TdUUBxTTjP4PUp8ex1ty/B1rD/EN43z+lcDi6LLrZP/a45NWEHMY/oJ5ijLDZ+j/xw3rjxWPjP2B8A46ioQdAotff3wla2z+FMSpA1jj+v6b5Y1mtPbS/cIu8K0F457/2esiyJpDNv98k5Ts2NeA/pvljWa09tD88ClUJ60MDQPZ6yLImkM0/4ONKxa0UBcD2uOTVhBzGv5G7JRxGave/8cN648Vj47+HCwtkjAXIv6LX398JWtu/qyheaCAL9D9TdUUBxTTjv4gyTxslhwVAB1rD/EN4378EH/28teoFwH6iBfbytum/F6ztFYdK/r/Xrm0Liez0vwcS6wNGWeO/Ws602ULg8L9TCtRLiLT8P8pi5RexJsw/BlIKPVwR5T95Wyu0/QjnP5PjoT7YYcu/mBhKZ6zrwj8wRYS7NebuP3qW6geh+Ls/SLrixebL3r+pcyymN9XrPwmkNHp7xec/GWNMZVAA17+82s+x2BLiPwn2ytbJ9ek/LgEH1sMS1j8yp/2LhTfeP+SnWwtQBbu/d38gkp5X7z8ytsuHaADGPzUYObdf1+m/7IauECWhwz+cjSACjzniP76Z+wUhN9K/1+GEKzup67+/GYr/04baPw6idWOvsuc/ZedTWsRa5b/EJQOuRzi0v/OncYhHPes/h49PixY53j+i8wWfC03Nvw2idWOvsue/ZedTWsRa5T/EJQOuRzi0P/KncYhHPeu/iY9PixY53r+i8wWfC03NP9anWwtQBbs/d38gkp5X778ytsuHaADGvzUYObdf1+k/74auECWhw7+cjSACjzniv8CZ+wUhN9I/1uGEKzup6z+/GYr/04bavwmkNHp7xee/F2NMZVAA1z+82s+x2BLivwr2ytbJ9em/KwEH1sMS1r8yp/2LhTfev81i5
2RexJsy/BlIKPVwR5b95Wyu0/Qjnv5DjoT7YYcs/nBhKZ6zrwr8wRYS7Nebuv3OW6geh+Lu/SLrixebL3j+pcyymN9Xrv8rHIFfWehZAMBwUdlo0DECTUc17EOb2PxpVB1SWChdAzjbhb9pTDUDQhmdvECX5P9FlMKCC9+g/IIAzjELgE0DajDngMv8GQFhWDmDPjNs/y1guLh96EkAxPi8k7DIEQJCc4URlhRhA3eLKKLwkEECqpNAyTBD/P6xpjXcDiwVAFtl//cQm4z+Ibt3XKiYTQM7mCLUb3QdAoM1t8yVv7D8aLZv2Nk8UQEAJPV5nQwxAtSsfTCoE9z9TPjXLXIIWQBVanC5W9AtAYM3d7Adm9j++5mQz1FoWQBUThyaVBghAwH5muQsV7T89Q1qv82MUQJoWGOfNuBdAzrkClkmwDkDQjKq77t37Py+g0dtitsE/ZwAMTwVPEUBojepluNwBQGYbtuW+t9w/HNWIJs6MEkDTNuQUSlgEQKxktPP5TcQ/ixbLB8JjEUCwuWjXMQYCQAS/R09FkRdAowpiZjhhDkB7LmlczD/7P01iQmhhsAVAnrtTwDy84z/Z6jfQ2TgTQChOCXMnWwpAhrW3daoz8z/HYJvVPI4VQLT3ik5FcA5Angi7LOZd+z+NNVzDy5gXQBXdvVTFUA1AYNMgOeYe+T8+qHXGCwkXQKQTOKwa5AJA8gFVoEMW0T+FwzJyttIRQAEAAAD/////BwAAAP////8xAAAA/////1cBAAD/////YQkAAP////+nQQAA/////5HLAQD/////95AMAP/////B9lcAAAAAAAAAAAAAAAAAAgAAAP////8OAAAA/////2IAAAD/////rgIAAP/////CEgAA/////06DAAD/////IpcDAP/////uIRkA/////4LtrwAAAAAAAAAAAAAAAAAAAAAAAgAAAP//////////AQAAAAMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////wIAAAD//////////wEAAAAAAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA/////////////////////wEAAAD///////////////8CAAAA////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD///////////////////////////////8CAAAA////////////////AQAAAP////////////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAAAQAAAP//////////AgAAAP//////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAAEAAAD//////////wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAgAAAAAAAAACAAAAAQAAAAEAAAACAAAAAgAAAAAAAAAFAAAABQAAAAAAAAACAAAAAgAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAABAAAAAgAAAAIAAAACAAAAAAAAAAUAAAAGAAAAAAAAAAIAAAACAAAAAwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAAAAAAAgAAAAEAAAADAAAAAgAAAAIAAAAAAAAABQAAAAcAAAAAAAAAAgAAAAIAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAACAAAAAQAAAAQAAAACAAAAAgAAAAAAAAAFAAAACAAAAAAAAAACAAAAAgAAAAMAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAUAAAAJAAAAAAAAAAIAAAACAAAAAwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAIAAAACAAAAAAAAAAMAAAAOAAAAAgAAAAAAAAACAAAAAwAAAAAAAAAAAAAAAgAAAAIAAAADAAAABgAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAgAAAAIAAAAAAAAAAwAAAAoAAAACAAAAAAAAAAIAAAADAAAAAQAAAAAAAAACAAAAAgAAAAMAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAgAAAAAAAAADAAAACwAAAAIAAAAAAAAAAgAAAAMAAAACAAAAAAAAAAIAAAACAAAAAwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAACAAAAAAAAAAMAAAAMAAAAAgAAAAAAAAACAAAAAwAAAAMAAAAAAAAAAgAAAAIAAAADAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAIAAAAAAAAAAwAAAA0AAAACAAAAAAAAAAIAAAADAAAABAAAAAAAAAACAAAAAgAAAAMAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAgAAAAAAAAADAAAABgAAAAIAAAAAAAAAAgAAAAMAAAAPAAAAAAAAAAIAAAACAAAAAwAAAAsAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAIAAAACAAAAAAAAAAMAAAAHAAAAAgAAAAAAAAACAAAAAwAAABAAAAAAAAAAAgAAAAIAAAADAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAIAAAAAAAAAAwAAAAgAAAACAAAAAAAAAAIAAAADAAAAEQAAAAAAAAACAAAAAgAAAAMAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAACAAAAAgAAAAAAAAADAAAACQAAAAIAAAAAAAAAAgAAAAMAAAASAAAAAAAAAAIAAAACAAAAAwAAAA4AAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAACAAAAAAAAAAMAAAAFAAAAAgAAAAAAAAACAAAAAwAAABMAAAAAAAAAAgAAAAIAAAADAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAgAAAAAAAAACAAAAAQAAABMAAAACAAAAAgAAAAAAAAAFAAAACgAAAAAAAAACAAAAAgAAAAMAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABEAAAACAAAAAAAAAAIAAAABAAAADwAAAAIAAAACAAAAAAAAAAUAAAALAAAAAAAAAAIAAAACAAAAAwAAABEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAIAAAAAAAAAAgAAAAEAAAAQAAAAAgAAAAIAAAAAAAAABQAAAAwAAAAAAAAAAgAAAAIAAAADAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAACAAAAAQAAABEAAAACAAAAAgAAAAAAAAAFAAAADQAAAAAAAAACAAAAAgAAAAMAAAATAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAACAAAAAAAAAAIAAAABAAAAEgAAAAIAAAACAAAAAAAAAAUAAAAOAAAAAAAAAAIAAAACAAAAAwAAAAIAAAABAAAAAAAAAAEAAAACAAAAAAAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAEAAAAAAAAAAgAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAFAAAAAAAAAAEAAAAAAAAAAAAAAMuhRbbsNlBBYqHW9OmHIkF9XBuqnS31QAK37uYhNMhAOSo3UUupm0DC+6pc6JxvQHV9eseEEEJAzURsCyqlFEB8BQ4NMJjnPyy3tBoS97o/xawXQznRjj89J2K2CZxhP6vX43RIIDQ/S8isgygEBz+LvFHQkmzaPjFFFO7wMq4+AADMLkTtjkIAAOgkJqxhQgAAU7B0MjRCAADwpBcVB0IAAACYP2HaQQAAAIn/Ja5BzczM4Eg6gUHNzMxMU7BTQTMzMzNfgCZBAAAAAEi3+UAAAAAAwGPNQDMzMzMzy6BAmpmZmZkxc0AzMzMzM/N
2FQDMzMzMzMxlAzczMzMzM7D+ygXSx2U6RQKimJOvQKnpA23hmONTHY0A/AGcxyudNQNb3K647mzZA+S56rrwWIUAm4kUQ+9UJQKre9hGzh/M/BLvoy9WG3T+LmqMf8VHGP2m3nYNV37A/gbFHcyeCmT+cBPWBckiDP61tZACjKW0/q2RbYVUYVj8uDypVyLNAP6jGS5cA5zBBwcqhBdCNGUEGEhQ/JVEDQT6WPnRbNO1AB/AWSJgT1kDfUWNCNLDAQNk+5C33OqlAchWL34QSk0DKvtDIrNV8QNF0G3kFzGVASSeWhBl6UED+/0mNGuk4QGjA/dm/1CJALPLPMql6DEDSHoDrwpP1P2jouzWST+A/egAAAAAAAABKAwAAAAAAAPoWAAAAAAAAyqAAAAAAAAB6ZQQAAAAAAErGHgAAAAAA+mvXAAAAAADK8+MFAAAAAHqqOykAAAAASqmhIAEAAAD6oGvkBwAAAMpm8T43AAAAes+ZuIIBAABKrDQMkwoAAPq1cFUFSgAAyvkUViUGAgAAAAAAAwAAAAYAAAACAAAABQAAAAEAAAAEAAAAAAAAAAAAAAAFAAAAAwAAAAEAAAAGAAAABAAAAAIAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAA/////wAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAP////8AAAAAAAAAAAEAAAABAAAAAAAAAAAAAAD/////AAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAAAAAABAAEAAAEBAAAAAAABAAAAAQAAAAEAAQAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAHAAAABwAAAAEAAAACAAAABAAAAAMAAAAAAAAAAAAAAAcAAAADAAAAAQAAAAIAAAAFAAAABAAAAAAAAAAAAAAAYWxnb3MuYwBfcG9seWZpbGxJbnRlcm5hbABhZGphY2VudEZhY2VEaXJbdG1wRmlqay5mYWNlXVtmaWprLmZhY2VdID09IEtJAGZhY2VpamsuYwBfZmFjZUlqa1BlbnRUb0dlb0JvdW5kYXJ5AGFkamFjZW50RmFjZURpcltjZW50ZXJJSksuZmFjZV1bZmFjZTJdID09IEtJAF9mYWNlSWprVG9HZW9Cb3VuZGFyeQBwb2x5Z29uLT5uZXh0ID09IE5VTEwAbGlua2VkR2VvLmMAYWRkTmV3TGlua2VkUG9seWdvbgBuZXh0ICE9IE5VTEwAbG9vcCAhPSBOVUxMAGFkZE5ld0xpbmtlZExvb3AAcG9seWdvbi0+Zmlyc3QgPT0gTlVMTABhZGRMaW5rZWRMb29wAGNvb3JkICE9IE5VTEwAYWRkTGlua2VkQ29vcmQAbG9vcC0+Zmlyc3QgPT0gTlVMTABpbm5lckxvb3BzICE9IE5VTEwAbm9ybWFsaXplTXVsdGlQb2x5Z29uAGJib3hlcyAhPSBOVUxMAGNhbmRpZGF0ZXMgIT0gTlVMTABmaW5kUG9seWdvbkZvckhvbGUAY2FuZGlkYXRlQkJveGVzICE9IE5VTEwAcmV2RGlyICE9IElOVkFMSURfRElHSVQAbG9jYWxpai5jAGgzVG9Mb2NhbElqawBiYXNlQ2VsbCAhPSBvcmlnaW5CYXNlQ2VsbAAhKG9yaWdpbk9uUGVudCAmJiBpbmRleE9uUGVudCkAcGVudGFnb25Sb3RhdGlvbnMgPj0gMABkaXJlY3Rpb25Sb3RhdGlvbnMgPj0gMABiYXNlQ2VsbCA9PSBvcmlnaW5CYXNlQ2VsbABiYXNlQ2VsbCAhPSBJTlZBTElEX0JBU0VfQ0VMTABsb2NhbElqa1RvSDMAIV9pc0Jhc2VDZWxsUGVudGFnb24oYmFzZUNlbGwpAGJhc2VDZWxsUm90YXRpb25zID49IDAAd2l0aGluUGVudGFnb25Sb3RhdGlvbnMgPj0gMABncmFwaC0+YnVja2V0cyAhPSBOVUxMAHZlcnRleEdyYXBoLmMAaW5pdFZlcnRleEdyYXBoAG5vZGUgIT0gTlVMTABhZGRWZXJ0ZXhOb2Rl";var Y="function"==typeof atob?atob:function(t){var e,n,r,i,o,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",l=0;t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{e=a.indexOf(t.charAt(l++))<<2|(i=a.indexOf(t.charAt(l++)))>>4,n=(15&i)<<4|(o=a.indexOf(t.charAt(l++)))>>2,r=(3&o)<<6|(s=a.indexOf(t.charAt(l++))),u+=String.fromCharCode(e),64!==o&&(u+=String.fromCharCode(n)),64!==s&&(u+=String.fromCharCode(r))}while(l<t.length);return u};function Q(t){if(V(t))return function(t){try{for(var e=Y(t),n=new Uint8Array(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}catch(t){throw new Error("Converting base64 string to bytes failed.")}}(t.slice(z.length))}var J,Z,K=function(t,e,n){var r=new t.Int8Array(n),i=new t.Int32Array(n),o=(new t.Uint8Array(n),new t.Float32Array(n),new t.Float64Array(n)),s=0|e.p,a=t.Math.floor,u=t.Math.abs,l=t.Math.sqrt,c=t.Math.pow,h=t.Math.cos,A=t.Math.sin,f=t.Math.tan,d=t.Math.acos,p=t.Math.asin,g=t.Math.atan,m=t.Math.atan2,y=t.Math.ceil,v=t.Math.imul,_=t.Math.min,b=t.Math.clz32,w=e.b,E=e.c,x=e.d,S=e.e,T=e.f,P=e.g,C=e.h,M=e.i,I=24048;function O(t,e,n,r){var i,o;0|R(t|=0,e|=0,n|=0,r|=0,0)&&(Ce(0|r,0,(o=1+(0|v(3*n|0,n+1|0))|0)<<3),(i=0|ve(o,4))&&(L(t,e,n,r,i,o,0),ye(i)))}function R(t,e,n,r,o){t|=0,e|=0,n|=0,o|=0;var s,a=0,u=0,l=0,c=0,h=0,A=0,f=0,d=0;if(s=I,I=I+16|0,d=s,i[(a=r|=0)>>2]=t,i[a+4>>2]=e,(a=!!(0|o))&&(i[o>>2]=0),0|Bt(t,e))return I=s,1;i[d>>2]=0;
2t:do{if((0|n)>=1)if(a)for(h=0,A=1,f=1,u=0,a=t;;){if(!(u|h)){if(!(0|(a=0|B(a,e,4,d)))&!(0|(e=0|E()))){a=2;break t}if(0|Bt(a,e)){a=1;break t}}if(!(0|(a=0|B(a,e,0|i[16+(h<<2)>>2],d)))&!(0|(e=0|E()))){a=2;break t}if(i[(t=r+(f<<3)|0)>>2]=a,i[t+4>>2]=e,i[o+(f<<2)>>2]=A,t=(0|(u=u+1|0))==(0|A),c=6==(0|(l=h+1|0)),0|Bt(a,e)){a=1;break t}if((0|(A=A+(c&t&1)|0))>(0|n)){a=0;break}h=t?c?0:l:h,f=f+1|0,u=t?0:u}else for(h=0,A=1,f=1,u=0,a=t;;){if(!(u|h)){if(!(0|(a=0|B(a,e,4,d)))&!(0|(e=0|E()))){a=2;break t}if(0|Bt(a,e)){a=1;break t}}if(!(0|(a=0|B(a,e,0|i[16+(h<<2)>>2],d)))&!(0|(e=0|E()))){a=2;break t}if(i[(t=r+(f<<3)|0)>>2]=a,i[t+4>>2]=e,t=(0|(u=u+1|0))==(0|A),c=6==(0|(l=h+1|0)),0|Bt(a,e)){a=1;break t}if((0|(A=A+(c&t&1)|0))>(0|n)){a=0;break}h=t?c?0:l:h,f=f+1|0,u=t?0:u}else a=0}while(0);return I=s,0|a}function L(t,e,n,r,o,s,a){n|=0,r|=0,o|=0,s|=0,a|=0;var u,l,c=0,h=0,A=0,f=0,d=0;if(l=I,I=I+16|0,u=l,!(0|(t|=0))&!(0|(e|=0)))I=l;else{if(c=0|we(0|t,0|e,0|s,((0|s)<0)<<31>>31),E(),!(!(0|(d=0|i[(f=h=r+(c<<3)|0)>>2]))&!(0|(f=0|i[f+4>>2]))|(A=(0|d)==(0|t)&(0|f)==(0|e))))do{A=(0|(f=0|i[(d=h=r+((c=(c+1|0)%(0|s)|0)<<3)|0)>>2]))==(0|t)&(0|(d=0|i[d+4>>2]))==(0|e)}while(!(!(0|f)&!(0|d)|A));c=o+(c<<2)|0,A&&(0|i[c>>2])<=(0|a)||(i[(d=h)>>2]=t,i[d+4>>2]=e,i[c>>2]=a,(0|a)>=(0|n)||(d=a+1|0,i[u>>2]=0,L(f=0|B(t,e,2,u),0|E(),n,r,o,s,d),i[u>>2]=0,L(f=0|B(t,e,3,u),0|E(),n,r,o,s,d),i[u>>2]=0,L(f=0|B(t,e,1,u),0|E(),n,r,o,s,d),i[u>>2]=0,L(f=0|B(t,e,5,u),0|E(),n,r,o,s,d),i[u>>2]=0,L(f=0|B(t,e,4,u),0|E(),n,r,o,s,d),i[u>>2]=0,L(f=0|B(t,e,6,u),0|E(),n,r,o,s,d))),I=l}}function B(t,e,n,r){t|=0,e|=0,n|=0;var o,s,a=0,u=0,l=0,c=0,h=0,A=0,f=0;if((0|i[(r|=0)>>2])>0){a=0;do{n=0|ut(n),a=a+1|0}while((0|a)<(0|i[r>>2]))}o=0|Ee(0|t,0|e,45),E(),s=127&o,u=0|kt(t,e),a=0|Ee(0|t,0|e,52),E(),a&=15;t:do{if(a)for(;;){if(A=0|Ee(0|t,0|e,0|(h=3*(15-a|0)|0)),E(),A&=7,f=!(0|Ut(a)),a=a+-1|0,c=0|xe(7,0,0|h),e&=~E(),t=(h=0|xe(0|i[(f?464:48)+(28*A|0)+(n<<2)>>2],0,0|h))|t&~c,e|=0|E(),!(n=0|i[(f?672:256)+(28*A|0)+(n<<2)>>2])){n=0;break t}if(!a){l=6;break}}else l=6}while(0);6==(0|l)&&(t|=A=0|xe(0|(f=0|i[880+(28*s|0)+(n<<2)>>2]),0,45),e=E()|-1040385&e,n=0|i[4304+(28*s|0)+(n<<2)>>2],127&~f||(f=0|xe(0|i[880+(28*s|0)+20>>2],0,45),e=E()|-1040385&e,n=0|i[4304+(28*s|0)+20>>2],t=0|Ft(f|t,e),e=0|E(),i[r>>2]=1+(0|i[r>>2]))),l=0|Ee(0|t,0|e,45),E(),l&=127;t:do{if(0|N(l)){e:do{if(1==(0|kt(t,e))){if((0|s)!=(0|l)){if(0|U(l,0|i[7728+(28*s|0)>>2])){t=0|jt(t,e),u=1,e=0|E();break}t=0|Ft(t,e),u=1,e=0|E();break}switch(0|u){case 5:t=0|jt(t,e),e=0|E(),i[r>>2]=5+(0|i[r>>2]),u=0;break e;case 3:t=0|Ft(t,e),e=0|E(),i[r>>2]=1+(0|i[r>>2]),u=0;break e;default:return f=0,w(0|(A=0)),0|f}}else u=0}while(0);if((0|n)>0){a=0;do{t=0|Nt(t,e),e=0|E(),a=a+1|0}while((0|a)!=(0|n))}if((0|s)!=(0|l)){if(!(0|F(l))){if(!!(0|u)|5!=(0|kt(t,e)))break;i[r>>2]=1+(0|i[r>>2]);break}switch(127&o){case 8:case 118:break t}3!=(0|kt(t,e))&&(i[r>>2]=1+(0|i[r>>2]))}}else if((0|n)>0){a=0;do{t=0|Ft(t,e),e=0|E(),a=a+1|0}while((0|a)!=(0|n))}}while(0);return i[r>>2]=((0|i[r>>2])+n|0)%6|0,f=t,w(0|(A=e)),0|f}function k(t,e,n,r,s,a){e|=0,n|=0,r|=0,s|=0,a|=0;var u,l,c,h,A,f,d,p,g,m=0,y=0,v=0,_=0,b=0,w=0,x=0,S=0,T=0,P=0,C=0,M=0,O=0,R=0;if(g=I,I=I+48|0,f=g+32|0,d=g+16|0,p=g,(0|(m=0|i[(t|=0)>>2]))<=0)return I=g,0;u=t+4|0,l=f+8|0,c=d+8|0,h=p+8|0,A=((0|e)<0)<<31>>31,C=0;t:for(;;){T=(y=0|i[u>>2])+(C<<4)|0,i[f>>2]=i[T>>2],i[f+4>>2]=i[T+4>>2],i[f+8>>2]=i[T+8>>2],i[f+12>>2]=i[T+12>>2],(0|C)==(m+-1|0)?(i[d>>2]=i[y>>2],i[d+4>>2]=i[y+4>>2],i[d+8>>2]=i[y+8>>2],i[d+12>>2]=i[y+12>>2]):(T=y+(C+1<<4)|0,i[d>>2]=i[T>>2],i[d+4>>2]=i[T+4>>2],i[d+8>>2]=i[T+8>>2],i[d+12>>2]=i[T+12>>2]),T=0|W(f,d,n);e:do{if((0|T)>0){P=+(0|T),S=0;n:for(;;){R=+(T-S|0),O=+(0|S),o[p>>3]=+o[f>>3]*R/P+ +o[d>>3]*O/P,o[h>>3]=+o[l>>3]*R/P+ +o[c>>3]*O/P,y=0|we(0|(w=0|Gt(p,n)),0|(x=0|E()),0|e,0|A),E(),_=0|i[(v=m=a+(y<<3)|0)>>2],v=0|i[v+4>>2];r:do{if(!(0|_)&!(0|v))M=14;else for(b=0;;){if((0|b)>(0|e)){m=1;break r}if((0|_)==(0|w)&(0|v)==(0|x)){m=7;break r}if(!(0|(_=0|i[(v=m=a+((y=(y+1|0)%(0|e)|0)<<3)|0)>>2]))&!(0|(v=0|i[v+4>>2]))){M=14;break}b=b+1|0}}while(0);switch(14==(0|M)&&(M=0,!(0|w)&!(0|x)?m=7:(i[m>>2]=w,i[m+4>>2]=x,m=0|i[r>>2],i[(b=s+(m<<3)|0)>>2]=w,i[b+4>>2]=x,i[r>>2]=m+1,m=0)),7&m){case 7:case 0:break;default:break n}if((0|T)<=(0|(S=S+1|0))){M=8;break e}}if(0|m){m=-1,M=20;break t}}else M=8}while(0);if(8==(0|M)&&(M=0),(0|(C=C+1|0))>=(0|(m=0|i[t>>2]))){m=0,M=20;break}}return 20==(0|M)?(I=g,0|m):0}function N(t){return 0|i[7728+(28*(t|=0)|0)+16>>2]}function F(t){return 4==(0|(t|=0))|117==(0|t)|0}function D(t){return 0|i[11152+(216*(0|i[(t|=0)>>2])|0)+(72*(0|i[t+4>>2])|0)+(24*(0|i[t+8>>2])|0)+(i[t+12>>2]<<3)>>2]}function j(t){return 0|i[11152+(216*(0|i[(t|=0)>>2])|0)+(72*(0|i[t+4>>2])|0)+(24*(0|i[t+8>>2])|0)+(i[t+12>>2]<<3)+4>>2]}function U(t,e){return e|=0,(0|i[7728+(28*(t|=0)|0)+20>>2])==(0|e)?0|(e=1):0|(e=(0|i[7728+(28*t|0)+24>>2])==(0|e))}function G(t,e){return 0|i[880+(28*(t|=0)|0)+((e|=0)<<2)>>2]}function z(t,e){return e|=0,(0|i[880+(28*(t|=0)|0)>>2])==(0|e)?0|(e=0):(0|i[880+(28*t|0)+4>>2])==(0|e)?0|(e=1):(0|i[880+(28*t|0)+8>>2])==(0|e)?0|(e=2):(0|i[880+(28*t|0)+12>>2])==(0|e)?0|(e=3):(0|i[880+(28*t|0)+16>>2])==(0|e)?0|(e=4):(0|i[880+(28*t|0)+20>>2])==(0|e)?0|(e=5):0|((0|i[880+(28*t|0)+24>>2])==(0|e)?6:7)}function V(t){return+o[16+(t|=0)>>3]<+o[t+24>>3]|0}function H(t,e){t|=0;var n,r,i=0;return(i=+o[(e|=0)>>3])>=+o[t+8>>3]&&i<=+o[t>>3]?(n=+o[t+16>>3],i=+o[t+24>>3],e=(r=+o[e+8>>3])>=i,t=r<=n&1,n<i?e&&(t=1):e||(t=0),0|(e=!!(0|t))):0|(e=0)}function q(t,e){t|=0,e|=0;var n,r,s,a,l,c,h=0,A=0;
vendor: 13,383 bytes, line 2
2a=I,I=I+288|0,n=a+264|0,r=a+96|0,A=(h=s=a)+96|0;do{i[h>>2]=0,h=h+4|0}while((0|h)<(0|A));return Wt(e,s),Ht(A=0|i[(h=s)>>2],h=0|i[h+4>>2],n),qt(A,h,r),l=+Ct(n,r+8|0),o[n>>3]=+o[t>>3],o[(h=n+8|0)>>3]=+o[t+16>>3],o[r>>3]=+o[t+8>>3],o[(A=r+8|0)>>3]=+o[t+24>>3],c=+Ct(n,r),A=~~+y(+c*c/+Se(+ +u(+(+o[h>>3]-+o[A>>3])/(+o[n>>3]-+o[r>>3])),3)/(l*(2.59807621135*l)*.8)),I=a,0|(0|A?A:1)}function W(t,e,n){t|=0,e|=0,n|=0;var r,o,s,a,u,l=0,c=0;a=I,I=I+288|0,r=a+264|0,o=a+96|0,c=(l=s=a)+96|0;do{i[l>>2]=0,l=l+4|0}while((0|l)<(0|c));return Wt(n,s),Ht(l=0|i[(c=s)>>2],c=0|i[c+4>>2],r),qt(l,c,o),u=+Ct(r,o+8|0),c=~~+y(+ +Ct(t,e)/(2*u)),I=a,0|(0|c?c:1)}function X(t,e,n,r){e|=0,n|=0,r|=0,i[(t|=0)>>2]=e,i[t+4>>2]=n,i[t+8>>2]=r}function Y(t,e){t|=0;var n,r,s,a,l=0,c=0,h=0,A=0,f=0,d=0,p=0;i[(a=8+(e|=0)|0)>>2]=0,r=+o[t>>3],A=+u(+r),s=+o[t+8>>3],A+=.5*(f=+u(+s)/.8660254037844386),A-=+(0|(l=~~A)),f-=+(0|(t=~~f));do{if(A<.5){if(A<.3333333333333333){if(i[e>>2]=l,f<.5*(A+1)){i[e+4>>2]=t;break}t=t+1|0,i[e+4>>2]=t;break}if(t=(1&!(f<(p=1-A)))+t|0,i[e+4>>2]=t,p<=f&f<2*A){l=l+1|0,i[e>>2]=l;break}i[e>>2]=l;break}if(!(A<.6666666666666666)){if(l=l+1|0,i[e>>2]=l,f<.5*A){i[e+4>>2]=t;break}t=t+1|0,i[e+4>>2]=t;break}if(f<1-A){if(i[e+4>>2]=t,2*A-1<f){i[e>>2]=l;break}}else t=t+1|0,i[e+4>>2]=t;l=l+1|0,i[e>>2]=l}while(0);do{if(r<0){if(1&t){l=~~(+(0|l)-(2*(+((d=0|_e(0|l,((0|l)<0)<<31>>31,0|(d=(t+1|0)/2|0),((0|d)<0)<<31>>31))>>>0)+4294967296*+(0|E()))+1)),i[e>>2]=l;break}l=~~(+(0|l)-2*(+((d=0|_e(0|l,((0|l)<0)<<31>>31,0|(d=(0|t)/2|0),((0|d)<0)<<31>>31))>>>0)+4294967296*+(0|E()))),i[e>>2]=l;break}}while(0);d=e+4|0,s<0&&(l=l-((1|t<<1)/2|0)|0,i[e>>2]=l,t=0-t|0,i[d>>2]=t),c=t-l|0,(0|l)<0?(h=0-l|0,i[d>>2]=c,i[a>>2]=h,i[e>>2]=0,t=c,l=0):h=0,(0|t)<0&&(l=l-t|0,i[e>>2]=l,h=h-t|0,i[a>>2]=h,i[d>>2]=0,t=0),n=l-h|0,c=t-h|0,(0|h)<0&&(i[e>>2]=n,i[d>>2]=c,i[a>>2]=0,t=c,l=n,h=0),(0|(c=(0|h)<(0|(c=(0|t)<(0|l)?t:l))?h:c))<=0||(i[e>>2]=l-c,i[d>>2]=t-c,i[a>>2]=h-c)}function Q(t){var e,n=0,r=0,o=0,s=0,a=0;n=0|i[(t|=0)>>2],r=0|i[(e=t+4|0)>>2],(0|n)<0&&(r=r-n|0,i[e>>2]=r,i[(a=t+8|0)>>2]=(0|i[a>>2])-n,i[t>>2]=0,n=0),(0|r)<0?(n=n-r|0,i[t>>2]=n,s=(0|i[(a=t+8|0)>>2])-r|0,i[a>>2]=s,i[e>>2]=0,r=0):(a=s=t+8|0,s=0|i[s>>2]),(0|s)<0&&(n=n-s|0,i[t>>2]=n,r=r-s|0,i[e>>2]=r,i[a>>2]=0,s=0),(0|(o=(0|s)<(0|(o=(0|r)<(0|n)?r:n))?s:o))<=0||(i[t>>2]=n-o,i[e>>2]=r-o,i[a>>2]=s-o)}function J(t,e){var n,r;e|=0,r=0|i[8+(t|=0)>>2],n=+((0|i[t+4>>2])-r|0),o[e>>3]=+((0|i[t>>2])-r|0)-.5*n,o[e+8>>3]=.8660254037844386*n}function Z(t,e,n){t|=0,e|=0,i[(n|=0)>>2]=(0|i[e>>2])+(0|i[t>>2]),i[n+4>>2]=(0|i[e+4>>2])+(0|i[t+4>>2]),i[n+8>>2]=(0|i[e+8>>2])+(0|i[t+8>>2])}function K(t,e,n){t|=0,e|=0,i[(n|=0)>>2]=(0|i[t>>2])-(0|i[e>>2]),i[n+4>>2]=(0|i[t+4>>2])-(0|i[e+4>>2]),i[n+8>>2]=(0|i[t+8>>2])-(0|i[e+8>>2])}function $(t,e){e|=0;var n,r=0;r=0|v(0|i[(t|=0)>>2],e),i[t>>2]=r,n=0|v(0|i[(r=t+4|0)>>2],e),i[r>>2]=n,e=0|v(0|i[(t=t+8|0)>>2],e),i[t>>2]=e}function tt(t){var e,n,r=0,o=0,s=0,a=0,u=0;u=(0|(n=0|i[(t|=0)>>2]))<0,t=(t=(o=(0|(a=((e=(0|(s=(0|i[t+4>>2])-(u?n:0)|0))<0)?0-s|0:0)+((0|i[t+8>>2])-(u?n:0))|0))<0)?0:a)-((s=(0|(o=(0|t)<(0|(o=(0|(r=(e?0:s)-(o?a:0)|0))<(0|(a=(u?0:n)-(e?s:0)-(o?a:0)|0))?r:a))?t:o))>0)?o:0)|0,r=r-(s?o:0)|0;t:do{switch(a-(s?o:0)|0){case 0:switch(0|r){case 0:return 0|(0|t?1==(0|t)?1:7:0);case 1:return 0|(0|t?1==(0|t)?3:7:2);default:break t}case 1:switch(0|r){case 0:return 0|(0|t?1==(0|t)?5:7:4);case 1:if(t)break t;return 6;default:break t}}}while(0);return 7}function et(t){var e,n,r=0,o=0,s=0,a=0,u=0;o=0|i[(e=8+(t|=0)|0)>>2],s=0|ge(+((3*(r=(0|i[t>>2])-o|0)|0)-(o=(0|i[(n=t+4|0)>>2])-o|0)|0)/7),i[t>>2]=s,r=0|ge(+((o<<1)+r|0)/7),i[n>>2]=r,i[e>>2]=0,o=r-s|0,(0|s)<0?(u=0-s|0,i[n>>2]=o,i[e>>2]=u,i[t>>2]=0,r=o,s=0,o=u):o=0,(0|r)<0&&(s=s-r|0,i[t>>2]=s,o=o-r|0,i[e>>2]=o,i[n>>2]=0,r=0),u=s-o|0,a=r-o|0,(0|o)<0?(i[t>>2]=u,i[n>>2]=a,i[e>>2]=0,r=a,a=u,o=0):a=s,(0|(s=(0|o)<(0|(s=(0|r)<(0|a)?r:a))?o:s))<=0||(i[t>>2]=a-s,i[n>>2]=r-s,i[e>>2]=o-s)}function nt(t){var e,n,r=0,o=0,s=0,a=0,u=0;o=0|i[(e=8+(t|=0)|0)>>2],s=0|ge(+(((r=(0|i[t>>2])-o|0)<<1)+(o=(0|i[(n=t+4|0)>>2])-o|0)|0)/7),i[t>>2]=s,r=0|ge(+((3*o|0)-r|0)/7),i[n>>2]=r,i[e>>2]=0,o=r-s|0,(0|s)<0?(u=0-s|0,i[n>>2]=o,i[e>>2]=u,i[t>>2]=0,r=o,s=0,o=u):o=0,(0|r)<0&&(s=s-r|0,i[t>>2]=s,o=o-r|0,i[e>>2]=o,i[n>>2]=0,r=0),u=s-o|0,a=r-o|0,(0|o)<0?(i[t>>2]=u,i[n>>2]=a,i[e>>2]=0,r=a,a=u,o=0):a=s,(0|(s=(0|o)<(0|(s=(0|r)<(0|a)?r:a))?o:s))<=0||(i[t>>2]=a-s,i[n>>2]=r-s,i[e>>2]=o-s)}function rt(t){var e,n,r,o=0,s=0,a=0,u=0;o=0|i[(t|=0)>>2],s=0|i[(n=t+4|0)>>2],a=0|i[(r=t+8|0)>>2],u=s+(3*o|0)|0,i[t>>2]=u,s=a+(3*s|0)|0,i[n>>2]=s,o=(3*a|0)+o|0,i[r>>2]=o,a=s-u|0,(0|u)<0?(o=o-u|0,i[n>>2]=a,i[r>>2]=o,i[t>>2]=0,s=a,a=0):a=u,(0|s)<0&&(a=a-s|0,i[t>>2]=a,o=o-s|0,i[r>>2]=o,i[n>>2]=0,s=0),e=a-o|0,u=s-o|0,(0|o)<0?(i[t>>2]=e,i[n>>2]=u,i[r>>2]=0,a=e,o=0):u=s,(0|(s=(0|o)<(0|(s=(0|u)<(0|a)?u:a))?o:s))<=0||(i[t>>2]=a-s,i[n>>2]=u-s,i[r>>2]=o-s)}function it(t){var e,n,r,o=0,s=0,a=0,u=0;u=0|i[(t|=0)>>2],a=(3*(o=0|i[(n=t+4|0)>>2])|0)+u|0,u=(s=0|i[(r=t+8|0)>>2])+(3*u|0)|0,i[t>>2]=u,i[n>>2]=a,o=(3*s|0)+o|0,i[r>>2]=o,s=a-u|0,(0|u)<0?(o=o-u|0,i[n>>2]=s,i[r>>2]=o,i[t>>2]=0,u=0):s=a,(0|s)<0&&(u=u-s|0,i[t>>2]=u,o=o-s|0,i[r>>2]=o,i[n>>2]=0,s=0),e=u-o|0,a=s-o|0,(0|o)<0?(i[t>>2]=e,i[n>>2]=a,i[r>>2]=0,u=e,o=0):a=s,(0|(s=(0|o)<(0|(s=(0|a)<(0|u)?a:u))?o:s))<=0||(i[t>>2]=u-s,i[n>>2]=a-s,i[r>>2]=o-s)}function ot(t,e){t|=0;var n,r,o,s=0,a=0,u=0;((e|=0)-1|0)>>>0>=6||(u=(0|i[15472+(12*e|0)>>2])+(0|i[t>>2])|0,i[t>>2]=u,o=t+4|0,a=(0|i[15472+(12*e|0)+4>>2])+(0|i[o>>2])|0,i[o>>2]=a,r=t+8|0,e=(0|i[15472+(12*e|0)+8>>2])+(0|i[r>>2])|0,i[r>>2]=e,s=a-u|0,(0|u)<0?(e=e-u|0,i[o>>2]=s,i[r>>2]=e,i[t>>2]=0,a=0):(s=a,a=u),(0|s)<0&&(a=a-s|0,i[t>>2]=a,e=e-s|0,i[r>>2]=e,i[o>>2]=0,s=0),n=a-e|0,u=s-e|0,(0|e)<0?(i[t>>2]=n,i[o>>2]=u,i[r>>2]=0,a=n,e=0):u=s,(0|(s=(0|e)<(0|(s=(0|u)<(0|a)?u:a))?e:s))<=0||(i[t>>2]=a-s,i[o>>2]=u-s,i[r>>2]=e-s))}function st(t){var e,n,r,o=0,s=0,a=0,u=0;u=0|i[(t|=0)>>2],a=(o=0|i[(n=t+4|0)>>2])+u|0,u=(s=0|i[(r=t+8|0)>>2])+u|0,i[t>>2]=u,i[n>>2]=a,o=s+o|0,i[r>>2]=o,s=a-u|0,(0|u)<0?(o=o-u|0,i[n>>2]=s,i[r>>2]=o,i[t>>2]=0,a=0):(s=a,a=u),(0|s)<0&&(a=a-s|0,i[t>>2]=a,o=o-s|0,i[r>>2]=o,i[n>>2]=0,s=0),e=a-o|0,u=s-o|0,(0|o)<0?(i[t>>2]=e,i[n>>2]=u,i[r>>2]=0,a=e,o=0):u=s,(0|(s=(0|o)<(0|(s=(0|u)<(0|a)?u:a))?o:s))<=0||(i[t>>2]=a-s,i[n>>2]=u-s,i[r>>2]=o-s)}function at(t){var e,n,r,o=0,s=0,a=0,u=0;o=0|i[(t|=0)>>2],a=0|i[(n=t+4|0)>>2],s=0|i[(r=t+8|0)>>2],u=a+o|0,i[t>>2]=u,a=s+a|0,i[n>>2]=a,o=s+o|0,i[r>>2]=o,s=a-u|0,(0|u)<0?(o=o-u|0,i[n>>2]=s,i[r>>2]=o,i[t>>2]=0,a=0):(s=a,a=u),(0|s)<0&&(a=a-s|0,i[t>>2]=a,o=o-s|0,i[r>>2]=o,i[n>>2]=0,s=0),e=a-o|0,u=s-o|0,(0|o)<0?(i[t>>2]=e,i[n>>2]=u,i[r>>2]=0,a=e,o=0):u=s,(0|(s=(0|o)<(0|(s=(0|u)<(0|a)?u:a))?o:s))<=0||(i[t>>2]=a-s,i[n>>2]=u-s,i[r>>2]=o-s)}function ut(t){switch(0|(t|=0)){case 1:t=5;break;case 5:t=4;break;case 4:t=6;break;case 6:t=2;break;case 2:t=3;break;case 3:t=1}return 0|t}function lt(t){switch(0|(t|=0)){case 1:t=3;break;case 3:t=2;break;case 2:t=6;break;case 6:t=4;break;case 4:t=5;break;case 5:t=1}return 0|t}function ct(t){var e,n,r,o=0,s=0,a=0,u=0;o=0|i[(t|=0)>>2],s=0|i[(n=t+4|0)>>2],a=0|i[(r=t+8|0)>>2],u=s+(o<<1)|0,i[t>>2]=u,s=a+(s<<1)|0,i[n>>2]=s,o=(a<<1)+o|0,i[r>>2]=o,a=s-u|0,(0|u)<0?(o=o-u|0,i[n>>2]=a,i[r>>2]=o,i[t>>2]=0,s=a,a=0):a=u,(0|s)<0&&(a=a-s|0,i[t>>2]=a,o=o-s|0,i[r>>2]=o,i[n>>2]=0,s=0),e=a-o|0,u=s-o|0,(0|o)<0?(i[t>>2]=e,i[n>>2]=u,i[r>>2]=0,a=e,o=0):u=s,(0|(s=(0|o)<(0|(s=(0|u)<(0|a)?u:a))?o:s))<=0||(i[t>>2]=a-s,i[n>>2]=u-s,i[r>>2]=o-s)}function ht(t){var e,n,r,o=0,s=0,a=0,u=0;u=0|i[(t|=0)>>2],a=((o=0|i[(n=t+4|0)>>2])<<1)+u|0,u=(s=0|i[(r=t+8|0)>>2])+(u<<1)|0,i[t>>2]=u,i[n>>2]=a,o=(s<<1)+o|0,i[r>>2]=o,s=a-u|0,(0|u)<0?(o=o-u|0,i[n>>2]=s,i[r>>2]=o,i[t>>2]=0,u=0):s=a,(0|s)<0&&(u=u-s|0,i[t>>2]=u,o=o-s|0,i[r>>2]=o,i[n>>2]=0,s=0),e=u-o|0,a=s-o|0,(0|o)<0?(i[t>>2]=e,i[n>>2]=a,i[r>>2]=0,u=e,o=0):a=s,(0|(s=(0|o)<(0|(s=(0|a)<(0|u)?a:u))?o:s))<=0||(i[t>>2]=u-s,i[n>>2]=a-s,i[r>>2]=o-s)}function At(t,e){e|=0;var n,r,o,s=0,a=0,u=0;return o=(0|(r=(0|i[(t|=0)>>2])-(0|i[e>>2])|0))<0,n=(0|(a=(0|i[t+4>>2])-(0|i[e+4>>2])-(o?r:0)|0))<0,e=(e=(t=(0|(u=(o?0-r|0:0)+(0|i[t+8>>2])-(0|i[e+8>>2])+(n?0-a|0:0)|0))<0)?0:u)-((a=(0|(t=(0|e)<(0|(t=(0|(s=(n?0:a)-(t?u:0)|0))<(0|(u=(o?0:r)-(n?a:0)-(t?u:0)|0))?s:u))?e:t))>0)?t:0)|0,s=s-(a?t:0)|0,0|((0|(t=(0|(t=u-(a?t:0)|0))>-1?t:0-t|0))>(0|(e=(0|(s=(0|s)>-1?s:0-s|0))>(0|(e=(0|e)>-1?e:0-e|0))?s:e))?t:e)}function ft(t,e){var n;e|=0,n=0|i[8+(t|=0)>>2],i[e>>2]=(0|i[t>>2])-n,i[e+4>>2]=(0|i[t+4>>2])-n}function dt(t,e){e|=0;var n,r,o,s=0,a=0,u=0;a=0|i[(t|=0)>>2],i[e>>2]=a,t=0|i[t+4>>2],i[(r=e+4|0)>>2]=t,i[(o=e+8|0)>>2]=0,s=t-a|0,(0|a)<0?(t=0-a|0,i[r>>2]=s,i[o>>2]=t,i[e>>2]=0,a=0):(s=t,t=0),(0|s)<0&&(a=a-s|0,i[e>>2]=a,t=t-s|0,i[o>>2]=t,i[r>>2]=0,s=0),n=a-t|0,u=s-t|0,(0|t)<0?(i[e>>2]=n,i[r>>2]=u,i[o>>2]=0,s=u,u=n,t=0):u=a,(0|(a=(0|t)<(0|(a=(0|s)<(0|u)?s:u))?t:a))<=0||(i[e>>2]=u-a,i[r>>2]=s-a,i[o>>2]=t-a)}function pt(t){var e,n,r,o;n=(o=0|i[(e=8+(t|=0)|0)>>2])-(0|i[t>>2])|0,i[t>>2]=n,t=(0|i[(r=t+4|0)>>2])-o|0,i[r>>2]=t,i[e>>2]=0-(t+n)}function gt(t){var e,n,r=0,o=0,s=0,a=0,u=0;r=0-(o=0|i[(t|=0)>>2])|0,i[t>>2]=r,i[(e=t+8|0)>>2]=0,a=(s=0|i[(n=t+4|0)>>2])+o|0,(0|o)>0?(i[n>>2]=a,i[e>>2]=o,i[t>>2]=0,r=0,s=a):o=0,(0|s)<0?(u=r-s|0,i[t>>2]=u,o=o-s|0,i[e>>2]=o,i[n>>2]=0,a=u-o|0,r=0-o|0,(0|o)<0?(i[t>>2]=a,i[n>>2]=r,i[e>>2]=0,s=r,o=0):(s=0,a=u)):a=r,(0|(r=(0|o)<(0|(r=(0|s)<(0|a)?s:a))?o:r))<=0||(i[t>>2]=a-r,i[n>>2]=s-r,i[e>>2]=o-r)}function mt(t,e,n,r){e|=0,n|=0,r|=0;var s,a=0,u=0,l=0,c=0;if(s=I,I=I+32|0,function(t,e){e|=0;var n,r,i=0;i=+o[(t|=0)>>3],n=+h(+i),i=+A(+i),o[e+16>>3]=i,i=+o[t+8>>3],r=n*+h(+i),o[e>>3]=r,i=n*+A(+i),o[e+8>>3]=i}(t|=0,u=s),i[n>>2]=0,a=+ue(15888,u),(l=+ue(15912,u))<a&&(i[n>>2]=1,a=l),(l=+ue(15936,u))<a&&(i[n>>2]=2,a=l),(l=+ue(15960,u))<a&&(i[n>>2]=3,a=l),(l=+ue(15984,u))<a&&(i[n>>2]=4,a=l),(l=+ue(16008,u))<a&&(i[n>>2]=5,a=l),(l=+ue(16032,u))<a&&(i[n>>2]=6,a=l),(l=+ue(16056,u))<a&&(i[n>>2]=7,a=l),(l=+ue(16080,u))<a&&(i[n>>2]=8,a=l),(l=+ue(16104,u))<a&&(i[n>>2]=9,a=l),(l=+ue(16128,u))<a&&(i[n>>2]=10,a=l),(l=+ue(16152,u))<a&&(i[n>>2]=11,a=l),(l=+ue(16176,u))<a&&(i[n>>2]=12,a=l),(l=+ue(16200,u))<a&&(i[n>>2]=13,a=l),(l=+ue(16224,u))<a&&(i[n>>2]=14,a=l),(l=+ue(16248,u))<a&&(i[n>>2]=15,a=l),(l=+ue(16272,u))<a&&(i[n>>2]=16,a=l),(l=+ue(16296,u))<a&&(i[n>>2]=17,a=l),(l=+ue(16320,u))<a&&(i[n>>2]=18,a=l),(l=+ue(16344,u))<a&&(i[n>>2]=19,a=l),(l=+d(+(1-.5*a)))<1e-16)return i[r>>2]=0,i[r+4>>2]=0,i[r+8>>2]=0,i[r+12>>2]=0,void(I=s);if(n=0|i[n>>2],a=+Tt((a=+o[16368+(24*n|0)>>3])-+Tt(+function(t,e){t|=0;var n,r,i,s,a;return s=+o[(e|=0)>>3],r=+h(+s),i=+o[e+8>>3]-+o[t+8>>3],a=r*+A(+i),n=+o[t>>3],+ +m(+a,+(+A(+s)*+h(+n)-+h(+i)*(r*+A(+n))))}(15568+(n<<4)|0,t))),c=0|Ut(e)?+Tt(a+-.3334731722518321):a,a=+f(+l)/.381966011250105,(0|e)>0){u=0;do{a*=2.6457513110645907,u=u+1|0}while((0|u)!=(0|e))}l=+h(+c)*a,o[r>>3]=l,c=+A(+c)*a,o[r+8>>3]=c,I=s}function yt(t,e,n,r,s){e|=0,n|=0,r|=0,s|=0;var a=0,c=0;if(a=+function(t){var e,n;return n=+o[(t|=0)>>3],e=+o[t+8>>3],+ +l(+(n*n+e*e))}(t|=0),a<1e-16)return e=15568+(e<<4)|0,i[s>>2]=i[e>>2],i[s+4>>2]=i[e+4>>2],i[s+8>>2]=i[e+8>>2],void(i[s+12>>2]=i[e+12>>2]);if(c=+m(+ +o[t+8>>3],+ +o[t>>3]),(0|n)>0){t=0;do{a/=2.6457513110645907,t=t+1|0}while((0|t)!=(0|n))}r?(a/=3,n=!(0|Ut(n)),a=+g(.381966011250105*(n?a:a/2.6457513110645907))):(a=+g(.381966011250105*a),0|Ut(n)&&(c=+Tt(c+.3334731722518321))),function(t,e,n,r){t|=0,e=+e,r|=0;var s=0,a=0,l=0,c=0;if((n=+n)<1e-16)return i[r>>2]=i[t>>2],i[r+4>>2]=i[t+4>>2],i[r+8>>2]=i[t+8>>2],void(i[r+12>>2]=i[t+12>>2]);a=e<0?e+6.283185307179586:e,a=e>=6.283185307179586?a+-6.283185307179586:a;do{if(!(a<1e-16)){if(s=+u(+(a+-3.141592653589793))<1e-16,e=+o[t>>3],s){e-=n,o[r>>3]=e,s=r;break}if(l=+h(+n),n=+A(+n),e=l*+A(+e)+ +h(+a)*(n*+h(+e)),e=+p(+((e=e>1?1:e)<-1?-1:e)),o[r>>3]=e,+u(+(e+-1.5707963267948966))<1e-16)return o[r>>3]=1.5707963267948966,void(o[r+8>>3]=0);if(+u(+(e+1.5707963267948966))<1e-16)return o[r>>3]=-1.5707963267948966,void(o[r+8>>3]=0);if(c=+h(+e),a=n*+A(+a)/c,n=+o[t>>3],e=(l-+A(+e)*+A(+n))/+h(+n)/c,l=a>1?1:a,e=e>1?1:e,(e=+o[t+8>>3]+ +m(+(l<-1?-1:l),+(e<-1?-1:e)))>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);return void(o[r+8>>3]=e)}e=+o[t>>3]+n,o[r>>3]=e,s=r}while(0);if(+u(+(e+-1.5707963267948966))<1e-16)return o[s>>3]=1.5707963267948966,void(o[r+8>>3]=0);if(+u(+(e+1.5707963267948966))<1e-16)return o[s>>3]=-1.5707963267948966,void(o[r+8>>3]=0);if((e=+o[t+8>>3])>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);o[r+8>>3]=e}(15568+(e<<4)|0,+Tt(+o[16368+(24*e|0)>>3]-c),a,s)}function vt(t,e,n){var r,o;e|=0,n|=0,r=I,I=I+16|0,J(4+(t|=0)|0,o=r),yt(o,0|i[t>>2],e,0,n),I=r}function _t(t,e,n,r,s){t|=0,e|=0,n|=0,r|=0,s|=0;var a,u,l,c,h,A,f,d,p,g,m,y,v,_,b,w,E,S,T,P,C,M,O=0,R=0,L=0,B=0,k=0,N=0;if(M=I,I=I+272|0,B=M+240|0,T=M,P=M+224|0,C=M+208|0,m=M+176|0,y=M+160|0,v=M+192|0,_=M+144|0,b=M+128|0,w=M+112|0,E=M+96|0,S=M+80|0,i[(O=M+256|0)>>2]=e,i[B>>2]=i[t>>2],i[B+4>>2]=i[t+4>>2],i[B+8>>2]=i[t+8>>2],i[B+12>>2]=i[t+12>>2],bt(B,O,T),i[s>>2]=0,(0|(B=r+n+(5==(0|r)&1)|0))<=(0|n))I=M;else{u=P+4|0,l=m+4|0,c=n+5|0,h=16848+((a=0|i[O>>2])<<2)|0,A=16928+(a<<2)|0,f=b+8|0,d=w+8|0,p=E+8|0,g=C+4|0,L=n;t:for(;;){R=T+((0|L)%5<<4)|0,i[C>>2]=i[R>>2],i[C+4>>2]=i[R+4>>2],i[C+8>>2]=i[R+8>>2],i[C+12>>2]=i[R+12>>2];do{}while(2==(0|wt(C,a,0,1)));if((0|L)>(0|n)&!!(0|Ut(e))){if(i[m>>2]=i[C>>2],i[m+4>>
vendor: 5,244 bytes, line 2
22]=i[C+4>>2],i[m+8>>2]=i[C+8>>2],i[m+12>>2]=i[C+12>>2],J(u,y),r=0|i[m>>2],O=0|i[17008+(80*r|0)+(i[P>>2]<<2)>>2],i[m>>2]=i[18608+(80*r|0)+(20*O|0)>>2],(0|(R=0|i[18608+(80*r|0)+(20*O|0)+16>>2]))>0){t=0;do{st(l),t=t+1|0}while((0|t)<(0|R))}switch(R=18608+(80*r|0)+(20*O|0)+4|0,i[v>>2]=i[R>>2],i[v+4>>2]=i[R+4>>2],i[v+8>>2]=i[R+8>>2],$(v,3*(0|i[h>>2])|0),Z(l,v,l),Q(l),J(l,_),k=+(0|i[A>>2]),o[b>>3]=3*k,o[f>>3]=0,N=-1.5*k,o[w>>3]=N,o[d>>3]=2.598076211353316*k,o[E>>3]=N,o[p>>3]=-2.598076211353316*k,0|i[17008+(80*(0|i[m>>2])|0)+(i[C>>2]<<2)>>2]){case 1:t=w,r=b;break;case 3:t=E,r=w;break;case 2:t=b,r=E;break;default:t=12;break t}se(y,_,r,t,S),yt(S,0|i[m>>2],a,1,s+8+(i[s>>2]<<4)|0),i[s>>2]=1+(0|i[s>>2])}if((0|L)<(0|c)&&(J(g,m),yt(m,0|i[C>>2],a,1,s+8+(i[s>>2]<<4)|0),i[s>>2]=1+(0|i[s>>2])),i[P>>2]=i[C>>2],i[P+4>>2]=i[C+4>>2],i[P+8>>2]=i[C+8>>2],i[P+12>>2]=i[C+12>>2],(0|(L=L+1|0))>=(0|B)){t=3;break}}3!=(0|t)?12==(0|t)&&x(22474,22521,581,22531):I=M}}function bt(t,e,n){t|=0,e|=0,n|=0;var r,o=0,s=0,a=0,u=0,l=0;r=I,I=I+128|0,s=r,u=20208,l=60+(a=o=r+64|0)|0;do{i[a>>2]=i[u>>2],a=a+4|0,u=u+4|0}while((0|a)<(0|l));u=20272,l=(a=s)+60|0;do{i[a>>2]=i[u>>2],a=a+4|0,u=u+4|0}while((0|a)<(0|l));o=(l=!(0|Ut(0|i[e>>2])))?o:s,ct(s=t+4|0),ht(s),0|Ut(0|i[e>>2])&&(it(s),i[e>>2]=1+(0|i[e>>2])),i[n>>2]=i[t>>2],Z(s,o,e=n+4|0),Q(e),i[n+16>>2]=i[t>>2],Z(s,o+12|0,e=n+20|0),Q(e),i[n+32>>2]=i[t>>2],Z(s,o+24|0,e=n+36|0),Q(e),i[n+48>>2]=i[t>>2],Z(s,o+36|0,e=n+52|0),Q(e),i[n+64>>2]=i[t>>2],Z(s,o+48|0,n=n+68|0),Q(n),I=r}function wt(t,e,n,r){n|=0,r|=0;var o,s,a,u,l,c,h=0,A=0,f=0,d=0,p=0;if(c=I,I=I+32|0,l=c+12|0,s=c,p=4+(t|=0)|0,d=0|i[16928+((e|=0)<<2)>>2],d=(u=!!(0|r))?3*d|0:d,h=0|i[p>>2],o=0|i[(a=t+8|0)>>2],u){if((0|(h=o+h+(r=0|i[(A=t+12|0)>>2])|0))==(0|d))return I=c,1;f=A}else h=o+h+(r=0|i[(f=t+12|0)>>2])|0;if((0|h)<=(0|d))return I=c,0;do{if((0|r)>0){if(r=0|i[t>>2],(0|o)>0){A=18608+(80*r|0)+60|0,r=t;break}r=18608+(80*r|0)+40|0,n?(X(l,d,0,0),K(p,l,s),at(s),Z(s,l,p),A=r,r=t):(A=r,r=t)}else A=18608+(80*(0|i[t>>2])|0)+20|0,r=t}while(0);if(i[r>>2]=i[A>>2],(0|i[(h=A+16|0)>>2])>0){r=0;do{st(p),r=r+1|0}while((0|r)<(0|i[h>>2]))}return t=A+4|0,i[l>>2]=i[t>>2],i[l+4>>2]=i[t+4>>2],i[l+8>>2]=i[t+8>>2],e=0|i[16848+(e<<2)>>2],$(l,u?3*e|0:e),Z(p,l,p),Q(p),r=u&&((0|i[a>>2])+(0|i[p>>2])+(0|i[f>>2])|0)==(0|d)?1:2,I=c,0|r}function Et(t,e){t|=0,e|=0;var n=0;do{n=0|wt(t,e,0,1)}while(2==(0|n));return 0|n}function xt(t,e,n,r,s){t|=0,e|=0,n|=0,r|=0,s|=0;var a,u,l,c,h,A,f,d,p,g,m,y,v,_,b,w,E,S,T=0,P=0,C=0,M=0,O=0;if(S=I,I=I+240|0,_=S+208|0,b=S,w=S+192|0,E=S+176|0,p=S+160|0,g=S+144|0,m=S+128|0,y=S+112|0,v=S+96|0,i[(T=S+224|0)>>2]=e,i[_>>2]=i[t>>2],i[_+4>>2]=i[t+4>>2],i[_+8>>2]=i[t+8>>2],i[_+12>>2]=i[t+12>>2],St(_,T,b),i[s>>2]=0,(0|(d=r+n+(6==(0|r)&1)|0))<=(0|n))I=S;else{u=n+6|0,l=16928+((a=0|i[T>>2])<<2)|0,c=g+8|0,h=m+8|0,A=y+8|0,f=w+4|0,P=0,C=n,r=-1;t:for(;;){if(t=b+((T=(0|C)%6|0)<<4)|0,i[w>>2]=i[t>>2],i[w+4>>2]=i[t+4>>2],i[w+8>>2]=i[t+8>>2],i[w+12>>2]=i[t+12>>2],t=P,P=0|wt(w,a,0,1),(0|C)>(0|n)&!!(0|Ut(e))&&1!=(0|t)&&(0|i[w>>2])!=(0|r)){switch(J(b+((T+5|0)%6<<4)+4|0,E),J(b+(T<<4)+4|0,p),M=+(0|i[l>>2]),o[g>>3]=3*M,o[c>>3]=0,O=-1.5*M,o[m>>3]=O,o[h>>3]=2.598076211353316*M,o[y>>3]=O,o[A>>3]=-2.598076211353316*M,T=0|i[_>>2],0|i[17008+(80*T|0)+(((0|r)==(0|T)?i[w>>2]:r)<<2)>>2]){case 1:t=m,r=g;break;case 3:t=y,r=m;break;case 2:t=g,r=y;break;default:t=8;break t}se(E,p,r,t,v),0|ae(E,v)||0|ae(p,v)||(yt(v,0|i[_>>2],a,1,s+8+(i[s>>2]<<4)|0),i[s>>2]=1+(0|i[s>>2]))}if((0|C)<(0|u)&&(J(f,E),yt(E,0|i[w>>2],a,1,s+8+(i[s>>2]<<4)|0),i[s>>2]=1+(0|i[s>>2])),(0|(C=C+1|0))>=(0|d)){t=3;break}r=0|i[w>>2]}3!=(0|t)?8==(0|t)&&x(22557,22521,746,22602):I=S}}function St(t,e,n){t|=0,e|=0,n|=0;var r,o=0,s=0,a=0,u=0,l=0;r=I,I=I+160|0,s=r,u=20336,l=72+(a=o=r+80|0)|0;do{i[a>>2]=i[u>>2],a=a+4|0,u=u+4|0}while((0|a)<(0|l));u=20416,l=(a=s)+72|0;do{i[a>>2]=i[u>>2],a=a+4|0,u=u+4|0}while((0|a)<(0|l));o=(l=!(0|Ut(0|i[e>>2])))?o:s,ct(s=t+4|0),ht(s),0|Ut(0|i[e>>2])&&(it(s),i[e>>2]=1+(0|i[e>>2])),i[n>>2]=i[t>>2],Z(s,o,e=n+4|0),Q(e),i[n+16>>2]=i[t>>2],Z(s,o+12|0,e=n+20|0),Q(e),i[n+32>>2]=i[t>>2],Z(s,o+24|0,e=n+36|0),Q(e),i[n+48>>2]=i[t>>2],Z(s,o+36|0,e=n+52|0),Q(e),i[n+64>>2]=i[t>>2],Z(s,o+48|0,e=n+68|0),Q(e),i[n+80>>2]=i[t>>2],Z(s,o+60|0,n=n+84|0),Q(n),I=r}function Tt(t){var e;return e=(t=+t)<0?t+6.283185307179586:t,+(t>=6.283185307179586?e+-6.283185307179586:e)}function Pt(t,e){return e|=0,+u(+(+o[(t|=0)>>3]-+o[e>>3]))<17453292519943298e-27?0|(e=+u(+(+o[t+8>>3]-+o[e+8>>3]))<17453292519943298e-27):0|(e=0)}function Ct(t,e){t|=0;var n,r,i,s=0;return r=+o[(e|=0)>>3],n=+o[t>>3],s=(i=+A(.5*(r-n)))*i+(s=+A(.5*(+o[e+8>>3]-+o[t+8>>3])))*(+h(+r)*+h(+n)*s),2*+m(+ +l(+s),+ +l(+(1-s)))*6371.007180918475}function Mt(t,e,n){t|=0,n|=0;var r,i,s,a,u=0,c=0,d=0,p=0,y=0,v=0;return v=+o[(e|=0)>>3],s=+o[t>>3],y=+A(.5*(v-s)),d=+o[e+8>>3],i=+o[t+8>>3],p=+A(.5*(d-i)),r=+h(+s),a=+h(+v),p=2*+m(+ +l(+(p=y*y+p*(a*r*p))),+ +l(+(1-p))),y=+o[n>>3],v=+A(.5*(y-v)),u=+o[n+8>>3],d=+A(.5*(u-d)),c=+h(+y),d=2*+m(+ +l(+(d=v*v+d*(a*c*d))),+ +l(+(1-d))),y=+A(.5*(s-y)),u=+A(.5*(i-u)),u=2*+m(+ +l(+(u=y*y+u*(r*c*u))),+ +l(+(1-u))),4*+g(+ +l(+ +f(.5*(c=.5*(p+d+u)))*+f(.5*(c-p))*+f(.5*(c-d))*+f(.5*(c-u))))}function It(t,e){return e=0|Ee(0|(t|=0),0|(e|=0),45),E(),127&e}function Ot(t,e){var n=0,r=0,i=0,o=0,s=0,a=0;
2if(!(!0&134217728==(-16777216&(e|=0))))return 0;if(s=0|Ee(0|(t|=0),0|e,45),E(),(s&=127)>>>0>121)return 0;n=0|Ee(0|t,0|e,52),E(),n&=15;do{if(0|n){for(i=1,r=0;;){if(o=0|Ee(0|t,0|e,3*(15-i|0)|0),E(),!!(0|(o&=7))&(1^r)){if(1==(0|o)&!!(0|N(s))){a=0,r=13;break}r=1}if(7==(0|o)){a=0,r=13;break}if(!(i>>>0<n>>>0)){r=9;break}i=i+1|0}if(9==(0|r)){if(15!=(0|n))break;return 1}if(13==(0|r))return 0|a}}while(0);for(;;){if(a=0|Ee(0|t,0|e,3*(14-n|0)|0),E(),!(!0&!(7&~a))){a=0,r=13;break}if(!(n>>>0<14)){a=1,r=13;break}n=n+1|0}return 13==(0|r)?0|a:0}function Rt(t,e,n){n|=0;var r=0,i=0;if(r=0|Ee(0|(t|=0),0|(e|=0),52),E(),(0|(r&=15))>=(0|n)){if((0|r)!=(0|n))if(n>>>0<=15){if(t|=i=0|xe(0|n,0,52),e=E()|-15728641&e,(0|r)>(0|n))do{i=0|xe(7,0,3*(14-n|0)|0),n=n+1|0,t|=i,e=0|E()|e}while((0|n)<(0|r))}else e=0,t=0}else e=0,t=0;return w(0|e),0|t}function Lt(t,e,n,r){n|=0,r|=0;var o,s=0,a=0,u=0,l=0,c=0,h=0;if(u=0|Ee(0|(t|=0),0|(e|=0),52),E(),(0|n)<16&(0|(u&=15))<=(0|n)){if((0|u)==(0|n))return i[(n=r)>>2]=t,void(i[n+4>>2]=e);if(o=(0|(c=0|ee(7,n-u|0)))/7|0,l=0|Ee(0|t,0|e,45),E(),0|N(127&l)){t:do{if(u)for(a=1;;){if(s=0|Ee(0|t,0|e,3*(15-a|0)|0),E(),0|(s&=7))break t;if(!(a>>>0<u>>>0)){s=0;break}a=a+1|0}else s=0}while(0);a=!(0|s)}else a=0;if(h=0|xe(u+1|0,0,52),s=E()|-15728641&e,Lt(e=(h|t)&~(e=0|xe(7,0,0|(l=3*(14-u|0)|0))),u=s&~E(),n,r),s=r+(o<<3)|0,!a)return Lt((h=0|xe(1,0,0|l))|e,0|E()|u,n,s),h=s+(o<<3)|0,Lt((c=0|xe(2,0,0|l))|e,0|E()|u,n,h),h=h+(o<<3)|0,Lt((c=0|xe(3,0,0|l))|e,0|E()|u,n,h),h=h+(o<<3)|0,Lt((c=0|xe(4,0,0|l))|e,0|E()|u,n,h),h=h+(o<<3)|0,Lt((c=0|xe(5,0,0|l))|e,0|E()|u,n,h),void Lt((c=0|xe(6,0,0|l))|e,0|E()|u,n,h+(o<<3)|0);a=s+(o<<3)|0,(0|c)>6&&(Ce(0|s,0,8+(h=(a>>>0>(c=s+8|0)>>>0?a:c)+-1+(0-s)|0)&-8),s=c+(h>>>3<<3)|0),Lt((h=0|xe(2,0,0|l))|e,0|E()|u,n,s),h=s+(o<<3)|0,Lt((c=0|xe(3,0,0|l))|e,0|E()|u,n,h),h=h+(o<<3)|0,Lt((c=0|xe(4,0,0|l))|e,0|E()|u,n,h),h=h+(o<<3)|0,Lt((c=0|xe(5,0,0|l))|e,0|E()|u,n,h),Lt((c=0|xe(6,0,0|l))|e,0|E()|u,n,h+(o<<3)|0)}}function Bt(t,e){var n=0,r=0,i=0;if(i=0|Ee(0|(t|=0),0|(e|=0),45),E(),!(0|N(127&i)))return 0;i=0|Ee(0|t,0|e,52),E(),i&=15;t:do{if(i)for(r=1;;){if(n=0|Ee(0|t,0|e,3*(15-r|0)|0),E(),0|(n&=7))break t;if(!(r>>>0<i>>>0)){n=0;break}r=r+1|0}else n=0}while(0);return 1&!(0|n)}function kt(t,e){var n=0,r=0,i=0;if(i=0|Ee(0|(t|=0),0|(e|=0),52),E(),!(i&=15))return 0;for(r=1;;){if(n=0|Ee(0|t,0|e,3*(15-r|0)|0),E(),0|(n&=7)){r=5;break}if(!(r>>>0<i>>>0)){n=0,r=5;break}r=r+1|0}return 5==(0|r)?0|n:0}function Nt(t,e){var n=0,r=0,i=0,o=0,s=0,a=0,u=0;if(u=0|Ee(0|(t|=0),0|(e|=0),52),E(),!(u&=15))return u=t,w(0|(a=e)),0|u;for(a=1,n=0;;){r=0|xe(7,0,0|(o=3*(15-a|0)|0)),i=0|E(),s=0|Ee(0|t,0|e,0|o),E(),t=(o=0|xe(0|ut(7&s),0,0|o))|t&~r,e=(s=0|E())|e&~i;t:do{if(!n)if(!(o&r|0)&!(s&i|0))n=0;else if(r=0|Ee(0|t,0|e,52),E(),r&=15){n=1;e:for(;;){switch(s=0|Ee(0|t,0|e,3*(15-n|0)|0),E(),7&s){case 1:break e;case 0:break;default:n=1;break t}if(!(n>>>0<r>>>0)){n=1;break t}n=n+1|0}for(n=1;;){if(i=0|Ee(0|t,0|e,0|(s=3*(15-n|0)|0)),E(),o=0|xe(7,0,0|s),e&=~E(),t=t&~o|(s=0|xe(0|ut(7&i),0,0|s)),e=0|e|E(),!(n>>>0<r>>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(a>>>0<u>>>0))break;a=a+1|0}return w(0|e),0|t}function Ft(t,e){var n=0,r=0,i=0,o=0,s=0;if(r=0|Ee(0|(t|=0),0|(e|=0),52),E(),!(r&=15))return r=t,w(0|(n=e)),0|r;for(n=1;s=0|Ee(0|t,0|e,0|(o=3*(15-n|0)|0)),E(),i=0|xe(7,0,0|o),e&=~E(),t=(o=0|xe(0|ut(7&s),0,0|o))|t&~i,e=0|E()|e,n>>>0<r>>>0;)n=n+1|0;return w(0|e),0|t}function Dt(t,e){var n=0,r=0,i=0,o=0,s=0,a=0,u=0;if(u=0|Ee(0|(t|=0),0|(e|=0),52),E(),!(u&=15))return u=t,w(0|(a=e)),0|u;for(a=1,n=0;;){r=0|xe(7,0,0|(o=3*(15-a|0)|0)),i=0|E(),s=0|Ee(0|t,0|e,0|o),E(),t=(o=0|xe(0|lt(7&s),0,0|o))|t&~r,e=(s=0|E())|e&~i;t:do{if(!n)if(!(o&r|0)&!(s&i|0))n=0;else if(r=0|Ee(0|t,0|e,52),E(),r&=15){n=1;e:for(;;){switch(s=0|Ee(0|t,0|e,3*(15-n|0)|0),E(),7&s){case 1:break e;case 0:break;default:n=1;break t}if(!(n>>>0<r>>>0)){n=1;break t}n=n+1|0}for(n=1;;){if(o=0|xe(7,0,0|(i=3*(15-n|0)|0)),s=e&~E(),e=0|Ee(0|t,0|e,0|i),E(),t=t&~o|(e=0|xe(0|lt(7&e),0,0|i)),e=0|s|E(),!(n>>>0<r>>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(a>>>0<u>>>0))break;a=a+1|0}return w(0|e),0|t}function jt(t,e){var n=0,r=0,i=0,o=0,s=0;if(r=0|Ee(0|(t|=0),0|(e|=0),52),E(),!(r&=15))return r=t,w(0|(n=e)),0|r;for(n=1;o=0|xe(7,0,0|(s=3*(15-n|0)|0)),i=e&~E(),e=0|Ee(0|t,0|e,0|s),E(),t=(e=0|xe(0|lt(7&e),0,0|s))|t&~o,e=0|E()|i,n>>>0<r>>>0;)n=n+1|0;
vendor: 1,079 bytes, line 2
2return w(0|e),0|t}function Ut(t){return(0|(t|=0))%2|0}function Gt(t,e){var n,r;return t|=0,r=I,I=I+16|0,n=r,(e|=0)>>>0<=15&&2146435072&~i[t+4>>2]&&2146435072&~i[t+8+4>>2]?(function(t,e,n){var r,i;r=I,I=I+16|0,mt(t|=0,e|=0,n|=0,i=r),Y(i,n+4|0),I=r}(t,e,n),e=0|function(t,e){t|=0;var n,r=0,o=0,s=0,a=0,u=0,l=0,c=0,h=0;if(n=I,I=I+64|0,l=n+40|0,o=n+24|0,s=n+12|0,a=n,xe(0|(e|=0),0,52),r=134225919|E(),!e)return(0|i[t+4>>2])>2||(0|i[t+8>>2])>2||(0|i[t+12>>2])>2?(l=0,w(0|(u=0)),I=n,0|l):(xe(0|D(t),0,45),u=0|E()|r,l=-1,w(0|u),I=n,0|l);if(i[l>>2]=i[t>>2],i[l+4>>2]=i[t+4>>2],i[l+8>>2]=i[t+8>>2],i[l+12>>2]=i[t+12>>2],u=l+4|0,(0|e)>0)for(t=-1;i[o>>2]=i[u>>2],i[o+4>>2]=i[u+4>>2],i[o+8>>2]=i[u+8>>2],1&e?(et(u),i[s>>2]=i[u>>2],i[s+4>>2]=i[u+4>>2],i[s+8>>2]=i[u+8>>2],rt(s)):(nt(u),i[s>>2]=i[u>>2],i[s+4>>2]=i[u+4>>2],i[s+8>>2]=i[u+8>>2],it(s)),K(o,s,a),Q(a),c=0|xe(7,0,0|(h=3*(15-e|0)|0)),r&=~E(),t=(h=0|xe(0|tt(a),0,0|h))|t&~c,r=0|E()|r,(0|e)>1;)e=e+-1|0;else t=-1;t:do{if((0|i[u>>2])<=2&&(0|i[l+8>>2])<=2&&(0|i[l+12>>2])<=2){if(e=0|xe(0|(o=0|D(l)),0,45),e|=t,t=E()|-1040385&r,a=0|j(l),
2!(0|N(o))){if((0|a)<=0)break;for(s=0;;){if(o=0|Ee(0|e,0|t,52),E(),o&=15)for(r=1;l=0|Ee(0|e,0|t,0|(h=3*(15-r|0)|0)),E(),c=0|xe(7,0,0|h),t&=~E(),e=e&~c|(h=0|xe(0|ut(7&l),0,0|h)),t=0|t|E(),r>>>0<o>>>0;)r=r+1|0;if((0|(s=s+1|0))==(0|a))break t}}s=0|Ee(0|e,0|t,52),E(),s&=15;e:do{if(s){r=1;n:for(;;){switch(h=0|Ee(0|e,0|t,3*(15-r|0)|0),E(),7&h){case 1:break n;case 0:break;default:break e}if(!(r>>>0<s>>>0))break e;r=r+1|0}if(0|U(o,0|i[l>>2]))for(r=1;c=0|xe(7,0,0|(l=3*(15-r|0)|0)),h=t&~E(),t=0|Ee(0|e,0|t,0|l),E(),e=e&~c|(t=0|xe(0|lt(7&t),0,0|l)),t=0|h|E(),r>>>0<s>>>0;)r=r+1|0;else for(r=1;l=0|Ee(0|e,0|t,0|(h=3*(15-r|0)|0)),E(),c=0|xe(7,0,0|h),t&=~E(),e=e&~c|(h=0|xe(0|ut(7&l),0,0|h)),t=0|t|E(),r>>>0<s>>>0;)r=r+1|0}}while(0);if((0|a)>0){r=0;do{e=0|Nt(e,t),t=0|E(),r=r+1|0}while((0|r)!=(0|a))}}else e=0,t=0}while(0);return h=e,w(0|(c=t)),I=n,0|h}(n,e),t=0|E()):(t=0,e=0),w(0|t),I=r,0|e}function zt(t,e,n){var r,o=0,s=0,a=0;if(r=4+(n|=0)|0,s=0|Ee(0|(t|=0),0|(e|=0),52),E(),s&=15,a=0|Ee(0|t,0|e,45),E(),o=!(0|s),0|N(127&a)){if(o)return 1;o=1}else{if(o)return 0;o=0|i[r>>2]||0|i[n+8>>2]?1:1&!!(0|i[n+12>>2])}for(n=1;1&n?rt(r):it(r),a=0|Ee(0|t,0|e,3*(15-n|0)|0),E(),ot(r,7&a),n>>>0<s>>>0;)n=n+1|0;return 0|o}function Vt(t,e,n){n|=0;var r,o,s=0,a=0,u=0,l=0,c=0,h=0;o=I,I=I+16|0,r=o,h=0|Ee(0|(t|=0),0|(e|=0),45),E(),h&=127;t:do{if(0|N(h)&&(u=0|Ee(0|t,0|e,52),E(),0|(u&=15))){s=1;e:for(;;){switch(c=0|Ee(0|t,0|e,3*(15-s|0)|0),E(),7&c){case 5:break e;case 0:break;default:s=e;break t}if(!(s>>>0<u>>>0)){s=e;break t}s=s+1|0}for(a=1,s=e;l=0|xe(7,0,0|(e=3*(15-a|0)|0)),c=s&~E(),s=0|Ee(0|t,0|s,0|e),E(),t=t&~l|(s=0|xe(0|lt(7&s),0,0|e)),s=0|c|E(),a>>>0<u>>>0;)a=a+1|0}else s=e}while(0);if(c=7728+(28*h|0)|0,i[n>>2]=i[c>>2],i[n+4>>2]=i[c+4>>2],i[n+8>>2]=i[c+8>>2],i[n+12>>2]=i[c+12>>2],0|zt(t,s,n)){if(l=n+4|0,i[r>>2]=i[l>>2],i[r+4>>2]=i[l+4>>2],i[r+8>>2]=i[l+8>>2],u=0|Ee(0|t,0|s,52),E(),c=15&u,1&u?(it(l),u=c+1|0):u=c,0|N(h)){t:do{if(c)for(e=1;;){if(a=0|Ee(0|t,0|s,3*(15-e|0)|0),E(),0|(a&=7)){s=a;break t}if(!(e>>>0<c>>>0)){s=0;break}e=e+1|0}else s=0}while(0);s=4==(0|s)&1}else s=0;if(0|wt(n,u,s,0)){if(0|N(h))do{}while(0|wt(n,u,0,0));(0|u)!=(0|c)&&nt(l)}else(0|u)!=(0|c)&&(i[l>>2]=i[r>>2],i[l+4>>2]=i[r+4>>2],i[l+8>>2]=i[r+8>>2]);I=o}else I=o}function Ht(t,e,n){var r,i;n|=0,r=I,I=I+16|0,Vt(t|=0,e|=0,i=r),e=0|Ee(0|t,0|e,52),E(),vt(i,15&e,n),I=r}function qt(t,e,n){n|=0;var r,i,o=0,s=0;i=I,I=I+16|0,Vt(t|=0,e|=0,r=i),o=0|Ee(0|t,0|e,45),E(),o=!(0|N(127&o)),s=0|Ee(0|t,0|e,52),E(),s&=15;t:do{if(!o){if(0|s)for(o=1;;){if(!(!((0|xe(7,0,3*(15-o|0)|0))&t)&!((0|E())&e)))break t;if(!(o>>>0<s>>>0))break;o=o+1|0}return _t(r,s,0,5,n),void(I=i)}}while(0);xt(r,s,0,6,n),I=i}function Wt(t,e){e|=0;var n,r=0,o=0,s=0,a=0,u=0,l=0;if(xe(0|(t|=0),0,52),n=134225919|E(),(0|t)<1){o=0,r=0;do{0|N(o)&&(xe(0|o,0,45),u=0|n|E(),i[(t=e+(r<<3)|0)>>2]=-1,i[t+4>>2]=u,r=r+1|0),o=o+1|0}while(122!=(0|o))}else{u=0,r=0;do{if(0|N(u)){for(xe(0|u,0,45),o=1,s=-1,a=0|n|E();s&=~(l=0|xe(7,0,3*(15-o|0)|0)),a&=~E(),(0|o)!=(0|t);)o=o+1|0;i[(l=e+(r<<3)|0)>>2]=s,i[l+4>>2]=a,r=r+1|0}u=u+1|0}while(122!=(0|u))}}function Xt(t,e,n,r){var o,s=0,a=0,u=0,l=0,c=0;if(o=I,I=I+64|0,u=o,(0|(t|=0))==(0|(n|=0))&(0|(e|=0))==(0|(r|=0))|!1|134217728!=(2013265920&e)|!1|134217728!=(2013265920&r))return I=o,0;if(s=0|Ee(0|t,0|e,52),E(),s&=15,a=0|Ee(0|n,0|r,52),E(),(0|s)!=(15&a))return I=o,0;if(a=s+-1|0,s>>>0>1&&(c=0|Rt(t,e,a),l=0|E(),(0|c)==(0|(a=0|Rt(n,r,a)))&(0|l)==(0|E()))){if(s=0|Ee(0|t,0|e,0|(a=3*(15^s)|0)),E(),s&=7,a=0|Ee(0|n,0|r,0|a),E(),!(0|s)|!(0|(a&=7)))return I=o,1;if((0|i[21136+(s<<2)>>2])==(0|a))return I=o,1;if((0|i[21168+(s<<2)>>2])==(0|a))return I=o,1}a=(s=u)+56|0;do{i[s>>2]=0,s=s+4|0}while((0|s)<(0|a));return O(t,e,1,u),s=(0|i[(c=u)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+8|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+16|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+24|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+32|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+40|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)?1:1&((0|i[(s=u+48|0)>>2])==(0|n)?(0|i[s+4>>2])==(0|r):0),I=o,0|s}function Yt(t,e,n){n|=0;var r,o,s,a,u=0;if(s=I,I=I+16|0,o=s,u=0|Ee(0|(t|=0),0|(e|=0),56),E(),e=0|function(t,e,n){n|=0;var r,o=0;return o=0|Bt(t|=0,e|=0),(n+-1|0)>>>0>5||1==(0|n)&(r=!!(0|o))?-1:(o=0|function(t,e){var n,r,o,s=0,a=0,u=0,l=0,c=0;if(o=I,I=I+32|0,r=o,Vt(t|=0,e|=0,n=o+16|0),u=0|It(t,e),c=0|kt(t,e),function(t,e){t=7728+(28*(t|=0)|0)|0,i[(e|=0)>>2]=i[t>>2],i[e+4>>2]=i[t+4>>2],i[e+8>>2]=i[t+8>>2],i[e+12>>2]=i[t+12>>2]}(u,r),e=0|function(t,e){t|=0;var n=0,r=0;if((e|=0)>>>0>20)return-1;do{if((0|i[11152+(216*e|0)>>2])!=(0|t))if((0|i[11152+(216*e|0)+8>>2])!=(0|t))if((0|i[11152+(216*e|0)+16>>2])!=(0|t))if((0|i[11152+(216*e|0)+24>>2])!=(0|t))if((0|i[11152+(216*e|0)+32>>2])!=(0|t))if((0|i[11152+(216*e|0)+40>>2])!=(0|t))if((0|i[11152+(216*e|0)+48>>2])!=(0|t))if((0|i[11152+(216*e|0)+56>>2])!=(0|t))if((0|i[11152+(216*e|0)+64>>2])!=(0|t))if((0|i[11152+(216*e|0)+72>>2])!=(0|t))if((0|i[11152+(216*e|0)+80>>2])!=(0|t))if((0|i[11152+(216*e|0)+88>>2])!=(0|t))if((0|i[11152+(216*e|0)+96>>2])!=(0|t))if((0|i[11152+(216*e|0)+104>>2])!=(0|t))if((0|i[11152+(216*e|0)+112>>2])!=(0|t))if((0|i[11152+(216*e|0)+120>>2])!=(0|t))if((0|i[11152+(216*e|0)+128>>
22])!=(0|t)){if((0|i[11152+(216*e|0)+136>>2])!=(0|t)){if((0|i[11152+(216*e|0)+144>>2])==(0|t)){t=0,n=2,r=0;break}if((0|i[11152+(216*e|0)+152>>2])==(0|t)){t=0,n=2,r=1;break}if((0|i[11152+(216*e|0)+160>>2])==(0|t)){t=0,n=2,r=2;break}if((0|i[11152+(216*e|0)+168>>2])==(0|t)){t=1,n=2,r=0;break}if((0|i[11152+(216*e|0)+176>>2])==(0|t)){t=1,n=2,r=1;break}if((0|i[11152+(216*e|0)+184>>2])==(0|t)){t=1,n=2,r=2;break}if((0|i[11152+(216*e|0)+192>>2])==(0|t)){t=2,n=2,r=0;break}if((0|i[11152+(216*e|0)+200>>2])==(0|t)){t=2,n=2,r=1;break}if((0|i[11152+(216*e|0)+208>>2])==(0|t)){t=2,n=2,r=2;break}return-1}t=2,n=1,r=2}else t=2,n=1,r=1;else t=2,n=1,r=0;else t=1,n=1,r=2;else t=1,n=1,r=1;else t=1,n=1,r=0;else t=0,n=1,r=2;else t=0,n=1,r=1;else t=0,n=1,r=0;else t=2,n=0,r=2;else t=2,n=0,r=1;else t=2,n=0,r=0;else t=1,n=0,r=2;else t=1,n=0,r=1;else t=1,n=0,r=0;else t=0,n=0,r=2;else t=0,n=0,r=1;else t=0,n=0,r=0}while(0);return 0|i[11152+(216*e|0)+(72*n|0)+(24*t|0)+(r<<3)+4>>2]}(u,0|i[n>>2]),!(0|N(u)))return I=o,0|e;switch(0|u){case 4:t=0,s=14;break;case 14:t=1,s=14;break;case 24:t=2,s=14;break;case 38:t=3,s=14;break;case 49:t=4,s=14;break;case 58:t=5,s=14;break;case 63:t=6,s=14;break;case 72:t=7,s=14;break;case 83:t=8,s=14;break;case 97:t=9,s=14;break;case 107:t=10,s=14;break;case 117:t=11,s=14;break;default:l=0,a=0}return 14==(0|s)&&(l=0|i[22096+(24*t|0)+8>>2],a=0|i[22096+(24*t|0)+16>>2]),(0|(t=0|i[n>>2]))!=(0|i[r>>2])&&(u=0|F(u))|(0|(t=0|i[n>>2]))==(0|a)&&(e=(e+1|0)%6|0),3==(0|c)&(0|t)==(0|a)?(I=o,0|(e+5|0)%6):5==(0|c)&(0|t)==(0|l)?(I=o,0|(c=(e+1|0)%6|0)):(I=o,0|e)}(t,e),r?0|(n=(5-o+(0|i[22384+(n<<2)>>2])|0)%5|0):0|(n=(6-o+(0|i[22416+(n<<2)>>2])|0)%6|0))}(r=(a=!0&268435456==(2013265920&e))?t:0,t=a?-2130706433&e|134217728:0,7&u),-1==(0|e))return i[n>>2]=0,void(I=s);Vt(r,t,o),u=0|Ee(0|r,0|t,52),E(),u&=15,0|Bt(r,t)?_t(o,u,e,2,n):xt(o,u,e,2,n),I=s}function Qt(t){t|=0;var e,n,r=0;return(e=0|ve(1,12))||x(22691,22646,49,22704),0|(r=0|i[(n=t+4|0)>>2])?(i[(r=r+8|0)>>2]=e,i[n>>2]=e,0|e):(0|i[t>>2]&&x(22721,22646,61,22744),i[(r=t)>>2]=e,i[n>>2]=e,0|e)}function Jt(t,e){var n,r;return t|=0,e|=0,(r=0|me(24))||x(22758,22646,78,22772),i[r>>2]=i[e>>2],i[r+4>>2]=i[e+4>>2],i[r+8>>2]=i[e+8>>2],i[r+12>>2]=i[e+12>>2],i[r+16>>2]=0,0|(n=0|i[(e=t+4|0)>>2])?(i[n+16>>2]=r,i[e>>2]=r,0|r):(0|i[t>>2]&&x(22787,22646,82,22772),i[t>>2]=r,i[e>>2]=r,0|r)}function Zt(t){var e,n,r=0,s=0,a=0,l=0,c=0,h=0,A=0,f=0,d=0,p=0,g=0,m=0,y=0,v=0,_=0,b=0,w=0,E=0,S=0,T=0,P=0,C=0,M=0,I=0,O=0,R=0,L=0,B=0,k=0,N=0;if(0|i[(l=8+(t|=0)|0)>>2])return 1;if(!(a=0|i[t>>2]))return 0;r=a,s=0;do{s=s+1|0,r=0|i[r+8>>2]}while(0|r);if(s>>>0<2)return 0;(n=0|me(s<<2))||x(22807,22646,317,22826),(e=0|me(s<<5))||x(22848,22646,321,22826),i[t>>2]=0,i[(C=t+4|0)>>2]=0,i[l>>2]=0,s=0,B=0,P=0,g=0;t:for(;;){if(p=0|i[a>>2]){c=0,h=p;do{if(f=+o[h+8>>3],r=h,h=0|i[h+16>>2],A=+o[(l=(d=!(0|h))?p:h)+8>>3],+u(+(f-A))>3.141592653589793){N=14;break}c+=(A-f)*(+o[r>>3]+ +o[l>>3])}while(!d);if(14==(0|N)){N=0,c=0,r=p;do{T=+o[r+8>>3],R=0|i[(L=r+16|0)>>2],S=+o[(R=0|R?R:p)+8>>3],c+=(+o[r>>3]+ +o[R>>3])*((S<0?S+6.283185307179586:S)-(T<0?T+6.283185307179586:T)),r=0|i[(0|r?L:a)>>2]}while(0|r)}c>0?(i[n+(B<<2)>>2]=a,B=B+1|0,l=P,r=g):N=19}else N=19;if(19==(0|N)){N=0;do{if(!s){if(g){l=C,h=g+8|0,r=a,s=t;break}if(0|i[t>>2]){N=27;break t}l=C,h=t,r=a,s=t;break}if(0|i[(r=s+8|0)>>2]){N=21;break t}if(!(s=0|ve(1,12))){N=23;break t}i[r>>2]=s,l=s+4|0,h=s,r=g}while(0);if(i[h>>2]=a,i[l>>2]=a,h=e+(P<<5)|0,d=0|i[a>>2]){for(o[(p=e+(P<<5)+8|0)>>3]=17976931348623157e292,o[(g=e+(P<<5)+24|0)>>3]=17976931348623157e292,o[h>>3]=-17976931348623157e292,o[(m=e+(P<<5)+16|0)>>3]=-17976931348623157e292,w=17976931348623157e292,E=-17976931348623157e292,l=0,y=d,f=17976931348623157e292,_=17976931348623157e292,b=-17976931348623157e292,A=-17976931348623157e292;c=+o[y>>3],T=+o[y+8>>3],y=0|i[y+16>>2],S=+o[((v=!(0|y))?d:y)+8>>3],c<f&&(o[p>>3]=c,f=c),T<_&&(o[g>>3]=T,_=T),c>b?o[h>>3]=c:c=b,T>A&&(o[m>>3]=T,A=T),w=T>0&T<w?T:w,E=T<0&T>E?T:E,l|=+u(+(T-S))>3.141592653589793,!v;)b=c;l&&(o[m>>3]=E,o[g>>3]=w)}else i[h>>2]=0,i[h+4>>2]=0,i[h+8>>2]=0,i[h+12>>2]=0,i[h+16>>2]=0,i[h+20>>2]=0,i[h+24>>2]=0,i[h+28>>2]=0;l=P+1|0}if(a=0|i[(L=a+8|0)>>2],i[L>>2]=0,!a){N=45;break}P=l,g=r}if(21==(0|N))x(22624,22646,35,22658);else if(23==(0|N))x(22678,22646,37,22658);else if(27==(0|N))x(22721,22646,61,22744);else if(45==(0|N)){t:do{if((0|B)>0){for(L=!(0|l),O=l<<2,R=!(0|t),I=0,r=0;;){if(M=0|i[n+(I<<2)>>2],L)N=73;else{if(!(P=0|me(O))){N=50;break}if(!(C=0|me(O))){N=52;break}e:do{if(R)s=0;else{for(l=0,s=0,h=t;a=e+(l<<5)|0,0|Kt(0|i[h>>2],a,0|i[M>>2])?(i[P+(s<<2)>>2]=h,i[C+(s<<2)>>2]=a,v=s+1|0):v=s,h=0|i[h+8>>2];)l=l+1|0,s=v;if((0|v)>0)if(a=0|i[P>>2],1==(0|v))s=a;else for(m=0,y=-1,s=a,g=a;;){for(d=0|i[g>>2],a=0,h=0;p=(0|(l=0|i[i[P+(h<<2)>>2]>>2]))==(0|d)?a:a+(1&Kt(l,0|i[C+(h<<2)>>2],0|i[d>>2]))|0,(0|(h=h+1|0))!=(0|v);)a=p;if(s=(l=(0|p)>(0|y))?g:s,(0|(a=m+1|0))==(0|v))break e;m=a,y=l?p:y,g=0|i[P+(a<<2)>>2]}else s=0}}while(0);if(ye(P),ye(C),s){if(a=0|i[(l=s+4|0)>>2])s=a+8|0;else if(0|i[s>>2]){N=70;break}i[s>>2]=M,i[l>>2]=M}else N=73}if(73==(0|N)){if(N=0,0|(r=0|i[M>>2]))do{C=r,r=0|i[r+16>>2],ye(C)}while(0|r);ye(M),r=2}if((0|(I=I+1|0))>=(0|B)){k=r;break t}}50==(0|N)?x(22863,22646,249,22882):52==(0|N)?x(22901,22646,252,22882):70==(0|N)&&x(22721,22646,61,22744)}else k=0}while(0);return ye(n),ye(e),0|k}return 0}function Kt(t,e,n){t|=0;var r,s=0,a=0,u=0,l=0,c=0,h=0,A=0;if(!(0|H(e|=0,n|=0)))return 0;if(e=0|V(e),r=+o[n>>3],s=e&(s=+o[n+8>>3])<0?s+6.283185307179586:s,!(t=0|i[t>>2]))return 0;if(e){e=0,n=t;t:for(;;){for(;l=+o[n>>3],h=+o[n+8>>3],A=0|i[(n=n+16|0)>>2],u=+o[(A=0|A?A:t)>>3],a=+o[A+8>>3],l>u?(c=l,l=h):(c=u,u=l,l=a,a=h),r<u|r>c;)if(!(n=0|i[n>>2])){n=22;break t}if(s=(l=l<0?l+6.283185307179586:l)==s|(h=a<0?a+6.283185307179586:a)==s?s+-2220446049250313e-31:s,((h+=(r-u)/(c-u)*(l-h))<0?h+6.283185307179586:h)>s&&(e^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|e}else{e=0,n=t;t:for(;;){for(;l=+o[n>>3],h=+o[n+8>>3],A=0|i[(n=n+16|0)>>2],u=+o[(A=0|A?A:t)>>3],a=+o[A+8>>3],l>u?(c=l,l=h):(c=u,u=l,l=a,a=h),r<u|r>c;)if(!(n=0|i[n>>2])){n=22;break t}if(a+(r-u)/(c-u)*(l-a)>(s=l==s|a==s?s+-2220446049250313e-31:s)&&(e^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|e}return 0}function $t(t,e,n,o,s){n|=0,o|=0,s|=0;var a,u,l,c,h=0,A=0,f=0,d=0,p=0,g=0,m=0,y=0,v=0,_=0;if(c=I,I=I+32|0,_=c+16|0,l=c,h=0|Ee(0|(t|=0),0|(e|=0),52),E(),h&=15,m=0|Ee(0|n,0|o,52),E(),(0|h)!=(15&m))return I=c,1;
2if(p=0|Ee(0|t,0|e,45),E(),p&=127,g=0|Ee(0|n,0|o,45),E(),m=(0|p)!=(0|(g&=127))){if(7==(0|(f=0|z(p,g))))return I=c,2;7==(0|(d=0|z(g,p)))?x(22925,22949,151,22959):(y=f,A=d)}else y=0,A=0;a=0|N(p),u=0|N(g),i[_>>2]=0,i[_+4>>2]=0,i[_+8>>2]=0,i[_+12>>2]=0;do{if(y){if(f=(0|(g=0|i[4304+(28*p|0)+(y<<2)>>2]))>0,u)if(f){p=0,d=n,f=o;do{d=0|Dt(d,f),f=0|E(),1==(0|(A=0|lt(A)))&&(A=0|lt(1)),p=p+1|0}while((0|p)!=(0|g));g=A,p=d,d=f}else g=A,p=n,d=o;else if(f){p=0,d=n,f=o;do{d=0|jt(d,f),f=0|E(),A=0|lt(A),p=p+1|0}while((0|p)!=(0|g));g=A,p=d,d=f}else g=A,p=n,d=o;if(zt(p,d,_),m||x(22972,22949,181,22959),(f=!!(0|a))&(A=!!(0|u))&&x(22999,22949,182,22959),f){if(A=0|kt(t,e),0|r[22032+(7*A|0)+y|0]){h=3;break}p=d=0|i[21200+(28*A|0)+(y<<2)>>2],v=26}else if(A){if(A=0|kt(p,d),0|r[22032+(7*A|0)+g|0]){h=4;break}p=0,d=0|i[21200+(28*g|0)+(A<<2)>>2],v=26}else A=0;if(26==(0|v))if((0|d)<=-1&&x(23030,22949,212,22959),(0|p)<=-1&&x(23053,22949,213,22959),(0|d)>0){f=_+4|0,A=0;do{at(f),A=A+1|0}while((0|A)!=(0|d));A=p}else A=p;if(i[l>>2]=0,i[l+4>>2]=0,i[l+8>>2]=0,ot(l,y),0|h)for(;0|Ut(h)?rt(l):it(l),(0|h)>1;)h=h+-1|0;if((0|A)>0){h=0;do{at(l),h=h+1|0}while((0|h)!=(0|A))}Z(v=_+4|0,l,v),Q(v),v=50}else if(zt(n,o,_),!!(0|a)&!!(0|u))if((0|g)!=(0|p)&&x(23077,22949,243,22959),A=0|kt(t,e),h=0|kt(n,o),0|r[22032+(7*A|0)+h|0])h=5;else if((0|(A=0|i[21200+(28*A|0)+(h<<2)>>2]))>0){f=_+4|0,h=0;do{at(f),h=h+1|0}while((0|h)!=(0|A));v=50}else v=50;else v=50}while(0);return 50==(0|v)&&(h=_+4|0,i[s>>2]=i[h>>2],i[s+4>>2]=i[h+4>>2],i[s+8>>2]=i[h+8>>2],h=0),I=c,0|h}function te(t,e,n,r){n|=0,r|=0;var o,s,a=0,u=0,l=0,c=0,h=0,A=0,f=0,d=0,p=0,g=0,m=0,y=0,v=0;if(s=I,I=I+48|0,l=s+36|0,c=s+24|0,h=s+12|0,A=s,u=0|Ee(0|(t|=0),0|(e|=0),52),E(),u&=15,d=0|Ee(0|t,0|e,45),E(),o=0|N(d&=127),xe(0|u,0,52),m=134225919|E(),i[(g=r)>>2]=-1,i[g+4>>2]=m,!u)return(0|i[n>>2])>1||(0|i[n+4>>2])>1||(0|i[n+8>>2])>1||127==(0|(a=0|G(d,0|tt(n))))?(I=s,0|(m=1)):(p=0|xe(0|a,0,45),g=0|E(),g=-1040385&i[(d=r)+4>>2]|g,i[(m=r)>>2]=i[d>>2]|p,i[m+4>>2]=g,I=s,0|(m=0));for(i[l>>2]=i[n>>2],i[l+4>>2]=i[n+4>>2],i[l+8>>2]=i[n+8>>2];i[c>>2]=i[l>>2],i[c+4>>2]=i[l+4>>2],i[c+8>>2]=i[l+8>>2],0|Ut(u)?(et(l),i[h>>2]=i[l>>2],i[h+4>>2]=i[l+4>>2],i[h+8>>2]=i[l+8>>2],rt(h)):(nt(l),i[h>>2]=i[l>>2],i[h+4>>2]=i[l+4>>2],i[h+8>>2]=i[l+8>>2],it(h)),K(c,h,A),Q(A),y=0|i[(g=r)>>2],g=0|i[g+4>>2],n=0|xe(7,0,0|(v=3*(15-u|0)|0)),g&=~E(),v=0|xe(0|tt(A),0,0|v),g=0|E()|g,i[(m=r)>>2]=v|y&~n,i[m+4>>2]=g,(0|u)>1;)u=u+-1|0;t:do{if((0|i[l>>2])<=1&&(0|i[l+4>>2])<=1&&(0|i[l+8>>2])<=1){A=127==(0|(c=0|G(d,u=0|tt(l))))?0:0|N(c);e:do{if(u){if(o){if(l=21408+(28*(0|kt(t,e))|0)+(u<<2)|0,(0|(l=0|i[l>>2]))>0){n=0;do{u=0|ut(u),n=n+1|0}while((0|n)!=(0|l))}if(1==(0|u)){a=3;break t}127==(0|(n=0|G(d,u)))&&x(23104,22949,376,23134),0|N(n)?x(23147,22949,377,23134):(p=l,f=u,a=n)}else p=0,f=u,a=c;if((0|(h=0|i[4304+(28*d|0)+(f<<2)>>2]))<=-1&&x(23178,22949,384,23134),!A){if((0|p)<=-1&&x(23030,22949,417,23134),0|p){u=0,n=0|i[(l=r)>>2],l=0|i[l+4>>2];do{n=0|Ft(n,l),l=0|E(),i[(v=r)>>2]=n,i[v+4>>2]=l,u=u+1|0}while((0|u)<(0|p))}if((0|h)<=0){u=54;break}for(u=0,n=0|i[(l=r)>>2],l=0|i[l+4>>2];;)if(n=0|Ft(n,l),l=0|E(),i[(v=r)>>2]=n,i[v+4>>2]=l,(0|(u=u+1|0))==(0|h)){u=54;break e}}if(7==(0|(c=0|z(a,d)))&&x(22925,22949,393,23134),n=0|i[(u=r)>>2],u=0|i[u+4>>2],(0|h)>0){l=0;do{n=0|Ft(n,u),u=0|E(),i[(v=r)>>2]=n,i[v+4>>2]=u,l=l+1|0}while((0|l)!=(0|h))}if(n=0|kt(n,u),v=0|F(a),(0|(n=0|i[(v?21824:21616)+(28*c|0)+(n<<2)>>2]))<=-1&&x(23030,22949,412,23134),n){u=0,l=0|i[(c=r)>>2],c=0|i[c+4>>2];do{l=0|Nt(l,c),c=0|E(),i[(v=r)>>2]=l,i[v+4>>2]=c,u=u+1|0}while((0|u)<(0|n));u=54}else u=54}else if(!!(0|o)&!!(0|A))if(u=21408+(28*(v=0|kt(t,e))|0)+(kt(0|i[(u=r)>>2],0|i[u+4>>2])<<2)|0,(0|(u=0|i[u>>2]))<=-1&&x(23201,22949,433,23134),u){a=0,n=0|i[(l=r)>>2],l=0|i[l+4>>2];do{n=0|Ft(n,l),l=0|E(),i[(v=r)>>2]=n,i[v+4>>2]=l,a=a+1|0}while((0|a)<(0|u));a=c,u=54}else a=c,u=55;else a=c,u=54}while(0);if(54==(0|u)&&A&&(u=55),55==(0|u)&&1==(0|kt(0|i[(v=r)>>2],0|i[v+4>>2]))){a=4;break}m=0|i[(v=r)>>2],v=-1040385&i[v+4>>2],y=0|xe(0|a,0,45),v=0|v|E(),i[(a=r)>>2]=m|y,i[a+4>>2]=v,a=0}else a=2}while(0);return I=s,0|a}function ee(t,e){var n=0;if(!(e|=0))return 1;n=t|=0,t=1;do{t=0|v(1&e?n:1,t),e>>=1,n=0|v(n,n)}while(0|e);return 0|t}function ne(t,e,n){t|=0;var r,s,a=0,u=0,l=0,c=0,h=0,A=0,f=0,d=0;if(!(0|H(e|=0,n|=0)))return 0;if(e=0|V(e),s=+o[n>>3],a=e&(a=+o[n+8>>3])<0?a+6.283185307179586:a,(0|(d=0|i[t>>2]))<=0)return 0;if(r=0|i[t+4>>2],e){e=0,n=-1,t=0;t:for(;;){for(f=t;c=+o[r+(f<<4)>>3],A=+o[r+(f<<4)+8>>3],l=+o[r+((t=(n+2|0)%(0|d)|0)<<4)>>3],u=+o[r+(t<<4)+8>>3],c>l?(h=c,c=A):(h=l,l=c,c=u,u=A),s<l|s>h;){if(!((0|(n=f+1|0))<(0|d))){n=22;break t}t=f,f=n,n=t}if(a=(c=c<0?c+6.283185307179586:c)==a|(A=u<0?u+6.283185307179586:u)==a?a+-2220446049250313e-31:a,((A+=(s-l)/(h-l)*(c-A))<0?A+6.283185307179586:A)>a&&(e^=1),(0|(t=f+1|0))>=(0|d)){n=22;break}n=f}if(22==(0|n))return 0|e}else{e=0,n=-1,t=0;t:for(;;){for(f=t;c=+o[r+(f<<4)>>3],A=+o[r+(f<<4)+8>>3],l=+o[r+((t=(n+2|0)%(0|d)|0)<<4)>>3],u=+o[r+(t<<4)+8>>3],c>l?(h=c,c=A):(h=l,l=c,c=u,u=A),s<l|s>h;){if(!((0|(n=f+1|0))<(0|d))){n=22;break t}t=f,f=n,n=t}if(u+(s-l)/(h-l)*(c-u)>(a=c==a|u==a?a+-2220446049250313e-31:a)&&(e^=1),(0|(t=f+1|0))>=(0|d)){n=22;break}n=f}if(22==(0|n))return 0|e}return 0}function re(t,e){e|=0;var n,r,s,a,l,c=0,h=0,A=0,f=0,d=0,p=0,g=0,m=0,y=0,v=0,_=0,b=0;if(!(r=0|i[(t|=0)>>2]))return i[e>>2]=0,i[e+4>>2]=0,i[e+8>>2]=0,i[e+12>>2]=0,i[e+16>>2]=0,i[e+20>>2]=0,i[e+24>>2]=0,void(i[e+28>>2]=0);if(o[(s=e+8|0)>>3]=17976931348623157e292,o[(a=e+24|0)>>3]=17976931348623157e292,o[e>>3]=-17976931348623157e292,o[(l=e+16|0)>>3]=-17976931348623157e292,!((0|r)<=0)){for(n=0|i[t+4>>2],m=17976931348623157e292,y=-17976931348623157e292,v=0,t=-1,f=17976931348623157e292,d=17976931348623157e292,g=-17976931348623157e292,h=-17976931348623157e292,_=0;c=+o[n+(_<<4)>>3],p=+o[n+(_<<4)+8>>3],A=+o[n+(((0|(t=t+2|0))==(0|r)?0:t)<<4)+8>>3],c<f&&(o[s>>3]=c,f=c),p<d&&(o[a>>3]=p,d=p),c>g?o[e>>3]=c:c=g,p>h&&(o[l>>3]=p,h=p),m=p>0&p<m?p:m,y=p<0&p>y?p:y,v|=+u(+(p-A))>3.141592653589793,(0|(t=_+1|0))!=(0|r);)b=_,g=c,_=t,t=b;v&&(o[l>>3]=y,o[a>>3]=m)}}function ie(t,e){e|=0;var n,r=0,s=0,a=0,l=0,c=0,h=0,A=0,f=0,d=0,p=0,g=0,m=0,y=0,v=0,_=0,b=0,w=0,E=0,x=0,S=0,T=0;if(y=0|i[(t|=0)>>2]){if(o[(v=e+8|0)>>3]=17976931348623157e292,o[(_=e+24|0)>>3]=17976931348623157e292,o[e>>3]=-17976931348623157e292,o[(b=e+16|0)>>3]=-17976931348623157e292,(0|y)>0){for(a=0|i[t+4>>2],g=17976931348623157e292,m=-17976931348623157e292,s=0,r=-1,A=17976931348623157e292,f=17976931348623157e292,p=-17976931348623157e292,c=-17976931348623157e292,w=0;l=+o[a+(w<<4)>>3],d=+o[a+(w<<4)+8>>3],h=+o[a+(((0|(S=r+2|0))==(0|y)?0:S)<<4)+8>>3],l<A&&(o[v>>3]=l,A=l),d<f&&(o[_>>3]=d,f=d),l>p?o[e>>3]=l:l=p,d>c&&(o[b>>3]=d,c=d),g=d>0&d<g?d:g,m=d<0&d>m?d:m,s|=+u(+(d-h))>3.141592653589793,(0|(r=w+1|0))!=(0|y);)S=w,p=l,w=r,r=S;
vendor: 22,990 bytes, line 2
2s&&(o[b>>3]=m,o[_>>3]=g)}}else i[e>>2]=0,i[e+4>>2]=0,i[e+8>>2]=0,i[e+12>>2]=0,i[e+16>>2]=0,i[e+20>>2]=0,i[e+24>>2]=0,i[e+28>>2]=0;if(!((0|(r=0|i[(S=t+8|0)>>2]))<=0)){n=t+12|0,x=0;do{if(a=0|i[n>>2],s=x,_=e+((x=x+1|0)<<5)|0,b=0|i[a+(s<<3)>>2]){if(o[(w=e+(x<<5)+8|0)>>3]=17976931348623157e292,o[(t=e+(x<<5)+24|0)>>3]=17976931348623157e292,o[_>>3]=-17976931348623157e292,o[(E=e+(x<<5)+16|0)>>3]=-17976931348623157e292,(0|b)>0){for(y=0|i[a+(s<<3)+4>>2],g=17976931348623157e292,m=-17976931348623157e292,a=0,s=-1,v=0,A=17976931348623157e292,f=17976931348623157e292,d=-17976931348623157e292,c=-17976931348623157e292;l=+o[y+(v<<4)>>3],p=+o[y+(v<<4)+8>>3],h=+o[y+(((0|(s=s+2|0))==(0|b)?0:s)<<4)+8>>3],l<A&&(o[w>>3]=l,A=l),p<f&&(o[t>>3]=p,f=p),l>d?o[_>>3]=l:l=d,p>c&&(o[E>>3]=p,c=p),g=p>0&p<g?p:g,m=p<0&p>m?p:m,a|=+u(+(p-h))>3.141592653589793,(0|(s=v+1|0))!=(0|b);)T=v,v=s,d=l,s=T;a&&(o[E>>3]=m,o[t>>3]=g)}}else i[_>>2]=0,i[_+4>>2]=0,i[_+8>>2]=0,i[_+12>>2]=0,i[_+16>>2]=0,i[_+20>>2]=0,i[_+24>>2]=0,i[_+28>>2]=0,r=0|i[S>>2]}while((0|x)<(0|r))}}function oe(t,e,n){var r=0,o=0,s=0;if(!(0|ne(t|=0,e|=0,n|=0)))return 0;if((0|i[(o=t+8|0)>>2])<=0)return 1;for(r=t+12|0,t=0;;){if(s=t,t=t+1|0,0|ne((0|i[r>>2])+(s<<3)|0,e+(t<<5)|0,n)){t=0,r=6;break}if((0|t)>=(0|i[o>>2])){t=1,r=6;break}}return 6==(0|r)?0|t:0}function se(t,e,n,r,i){e|=0,n|=0,r|=0,i|=0;var s,a,u,l,c,h,A,f=0;l=+o[(t|=0)>>3],u=+o[e>>3]-l,a=+o[t+8>>3],s=+o[e+8>>3]-a,h=+o[n>>3],f=((f=+o[r>>3]-h)*(a-(A=+o[n+8>>3]))-(l-h)*(c=+o[r+8>>3]-A))/(u*c-s*f),o[i>>3]=l+u*f,o[i+8>>3]=a+s*f}function ae(t,e){return e|=0,+o[(t|=0)>>3]!=+o[e>>3]?0|(e=0):0|(e=+o[t+8>>3]==+o[e+8>>3])}function ue(t,e){var n,r,i;return e|=0,+((i=+o[(t|=0)>>3]-+o[e>>3])*i+(r=+o[t+8>>3]-+o[e+8>>3])*r+(n=+o[t+16>>3]-+o[e+16>>3])*n)}function le(t,e,n){t|=0,n|=0;var r=0;(0|(e|=0))>0?(r=0|ve(e,4),i[t>>2]=r,r||x(23230,23253,40,23267)):i[t>>2]=0,i[t+4>>2]=e,i[t+8>>2]=0,i[t+12>>2]=n}function ce(t){var e,n,r,s=0,a=0,l=0,h=0;e=4+(t|=0)|0,n=t+12|0,r=t+8|0;t:for(;;){for(a=0|i[e>>2],s=0;;){if((0|s)>=(0|a))break t;if(l=0|i[t>>2],h=0|i[l+(s<<2)>>2])break;s=s+1|0}s=l+(~~(+u(+ +c(10,+ +(15-(0|i[n>>2])|0))*(+o[h>>3]+ +o[h+8>>3]))%+(0|a))>>>0<<2)|0,a=0|i[s>>2];e:do{if(0|a){if(l=h+32|0,(0|a)==(0|h))i[s>>2]=i[l>>2];else{if(!(s=0|i[(a=a+32|0)>>2]))break;for(;(0|s)!=(0|h);)if(!(s=0|i[(a=s+32|0)>>2]))break e;i[a>>2]=i[l>>2]}ye(h),i[r>>2]=(0|i[r>>2])-1}}while(0)}ye(0|i[t>>2])}function he(t){var e,n=0,r=0;for(e=0|i[4+(t|=0)>>2],r=0;;){if((0|r)>=(0|e)){n=0,r=4;break}if(n=0|i[(0|i[t>>2])+(r<<2)>>2]){r=4;break}r=r+1|0}return 4==(0|r)?0|n:0}function Ae(t,e){e|=0;var n=0,r=0,s=0,a=0;if(n=~~(+u(+ +c(10,+ +(15-(0|i[12+(t|=0)>>2])|0))*(+o[e>>3]+ +o[e+8>>3]))%+(0|i[t+4>>2]))>>>0,n=(0|i[t>>2])+(n<<2)|0,!(r=0|i[n>>2]))return 1;a=e+32|0;do{if((0|r)!=(0|e)){if(!(n=0|i[r+32>>2]))return 1;for(s=n;;){if((0|s)==(0|e)){s=8;break}if(!(n=0|i[s+32>>2])){n=1,s=10;break}r=s,s=n}if(8==(0|s)){i[r+32>>2]=i[a>>2];break}if(10==(0|s))return 0|n}else i[n>>2]=i[a>>2]}while(0);return ye(e),i[(a=t+8|0)>>2]=(0|i[a>>2])-1,0}function fe(t,e,n){t|=0,e|=0,n|=0;var r,s=0,a=0,l=0;(r=0|me(40))||x(23283,23253,98,23296),i[r>>2]=i[e>>2],i[r+4>>2]=i[e+4>>2],i[r+8>>2]=i[e+8>>2],i[r+12>>2]=i[e+12>>2],i[(a=r+16|0)>>2]=i[n>>2],i[a+4>>2]=i[n+4>>2],i[a+8>>2]=i[n+8>>2],i[a+12>>2]=i[n+12>>2],i[r+32>>2]=0,a=~~(+u(+ +c(10,+ +(15-(0|i[t+12>>2])|0))*(+o[e>>3]+ +o[e+8>>3]))%+(0|i[t+4>>2]))>>>0,a=(0|i[t>>2])+(a<<2)|0,s=0|i[a>>2];do{if(s){for(;!(0|Pt(s,e)&&0|Pt(s+16|0,n));)if(a=0|i[s+32>>2],!(0|i[(s=0|a?a:s)+32>>2])){l=10;break}if(10==(0|l)){i[s+32>>2]=r;break}return ye(r),0|s}i[a>>2]=r}while(0);return i[(l=t+8|0)>>2]=1+(0|i[l>>2]),0|r}function de(t,e,n){e|=0,n|=0;var r=0,s=0;if(s=~~(+u(+ +c(10,+ +(15-(0|i[12+(t|=0)>>2])|0))*(+o[e>>3]+ +o[e+8>>3]))%+(0|i[t+4>>2]))>>>0,!(s=0|i[(0|i[t>>2])+(s<<2)>>2]))return 0;if(!n){for(t=s;;){if(0|Pt(t,e)){r=10;break}if(!(t=0|i[t+32>>2])){t=0,r=10;break}}if(10==(0|r))return 0|t}for(t=s;;){if(0|Pt(t,e)&&0|Pt(t+16|0,n)){r=10;break}if(!(t=0|i[t+32>>2])){t=0,r=10;break}}return 10==(0|r)?0|t:0}function pe(t,e){e|=0;var n=0;if(n=~~(+u(+ +c(10,+ +(15-(0|i[12+(t|=0)>>2])|0))*(+o[e>>3]+ +o[e+8>>3]))%+(0|i[t+4>>2]))>>>0,!(t=0|i[(0|i[t>>2])+(n<<2)>>2]))return 0;for(;;){if(0|Pt(t,e)){e=5;break}if(!(t=0|i[t+32>>2])){t=0,e=5;break}}return 5==(0|e)?0|t:0}function ge(t){return 0|+function(t){return+ +Me(+(t=+t))}(t=+t)}function me(t){t|=0;var e,n=0,r=0,o=0,s=0,a=0,u=0,l=0,c=0,h=0,A=0,f=0,d=0,p=0,g=0,m=0,y=0,v=0,_=0,b=0,w=0;e=I,I=I+16|0,d=e;do{if(t>>>0<245){if(t=(h=t>>>0<11?16:t+11&-8)>>>3,3&(r=(f=0|i[5829])>>>t))return o=0|i[(r=8+(t=23356+((n=(1&r^1)+t|0)<<1<<2)|0)|0)>>2],(0|(a=0|i[(s=o+8|0)>>2]))==(0|t)?i[5829]=f&~(1<<n):(i[a+12>>2]=t,i[r>>2]=a),w=n<<3,i[o+4>>2]=3|w,i[(w=o+w+4|0)>>2]=1|i[w>>2],I=e,0|s;if(h>>>0>(A=0|i[5831])>>>0){if(0|r)return n=((n=r<<t&((n=2<<t)|0-n))&0-n)-1|0,a=0|i[(t=8+(n=23356+((o=((r=(n>>>=l=n>>>12&16)>>>5&8)|l|(a=(n>>>=r)>>>2&4)|(t=(n>>>=a)>>>1&2)|(o=(n>>>=t)>>>1&1))+(n>>>o)|0)<<1<<2)|0)|0)>>2],(0|(r=0|i[(l=a+8|0)>>2]))==(0|n)?(t=f&~(1<<o),i[5829]=t):(i[r+12>>2]=n,i[t>>2]=r,t=f),u=(w=o<<3)-h|0,i[a+4>>2]=3|h,i[4+(s=a+h|0)>>2]=1|u,i[a+w>>2]=u,0|A&&(o=0|i[5834],r=23356+((n=A>>>3)<<1<<2)|0,t&(n=1<<n)?n=0|i[(t=r+8|0)>>2]:(i[5829]=t|n,n=r,t=r+8|0),i[t>>2]=o,i[n+12>>2]=o,i[o+8>>2]=n,i[o+12>>2]=r),i[5831]=u,i[5834]=s,I=e,0|l;if(a=0|i[5830]){for(r=(a&0-a)-1|0,r=c=0|i[23620+(((o=(r>>>=s=r>>>12&16)>>>5&8)|s|(u=(r>>>=o)>>>2&4)|(l=(r>>>=u)>>>1&2)|(c=(r>>>=l)>>>1&1))+(r>>>c)<<2)>>2],l=c,c=(-8&i[c+4>>2])-h|0;(t=0|i[r+16>>2])||(t=0|i[r+20>>2]);)r=t,l=(s=(u=(-8&i[t+4>>2])-h|0)>>>0<c>>>0)?t:l,c=s?u:c;if((u=l+h|0)>>>0>l>>>0){s=0|i[l+24>>2],n=0|i[l+12>>2];do{if((0|n)==(0|l)){if(!(n=0|i[(t=l+20|0)>>2])&&!(n=0|i[(t=l+16|0)>>2])){r=0;break}for(;;)if(r=0|i[(o=n+20|0)>>2])n=r,t=o;else{if(!(r=0|i[(o=n+16|0)>>2]))break;n=r,t=o}i[t>>2]=0,r=n}else r=0|i[l+8>>2],i[r+12>>2]=n,i[n+8>>2]=r,r=n}while(0);do{if(0|s){if(n=0|i[l+28>>2],(0|l)==(0|i[(t=23620+(n<<2)|0)>>2])){if(i[t>>2]=r,!r){i[5830]=a&~(1<<n);break}}else if(i[((0|i[(w=s+16|0)>>2])==(0|l)?w:s+20)>>2]=r,!r)break;i[r+24>>2]=s,0|(n=0|i[l+16>>2])&&(i[r+16>>2]=n,i[n+24>>2]=r),0|(n=0|i[l+20>>2])&&(i[r+20>>2]=n,i[n+24>>2]=r)}}while(0);return c>>>0<16?(w=c+h|0,i[l+4>>2]=3|w,i[(w=l+w+4|0)>>2]=1|i[w>>2]):(i[l+4>>2]=3|h,i[u+4>>2]=1|c,i[u+c>>2]=c,0|A&&(o=0|i[5834],r=23356+((n=A>>>3)<<1<<2)|0,(n=1<<n)&f?n=0|i[(t=r+8|0)>>2]:(i[5829]=n|f,n=r,t=r+8|0),i[t>>2]=o,i[n+12>>2]=o,i[o+8>>2]=n,i[o+12>>2]=r),i[5831]=c,i[5834]=u),I=e,0|l+8}f=h}else f=h}else f=h}else if(t>>>0<=4294967231)if(h=-8&(t=t+11|0),o=0|i[5830]){s=0-h|0,c=(t>>>=8)?h>>>0>16777215?31:h>>>(7+(c=14-((l=(520192+(m=t<<(f=(t+1048320|0)>>>16&8))|0)>>>16&4)|f|(c=(245760+(m<<=l)|0)>>>16&2))+(m<<c>>>15)|0)|0)&1|c<<1:0,r=0|i[23620+(c<<2)>>2];t:do{if(r)for(t=0,l=h<<(31==(0|c)?0:25-(c>>>1)|0),a=0;;){if((u=(-8&i[r+4>>2])-h|0)>>>0<s>>>0){if(!u){t=r,s=0,m=65;break t}t=r,s=u}if(a=!(0|(m=0|i[r+20>>2]))|(0|m)==(0|(r=0|i[r+16+(l>>>31<<2)>>2]))?a:m,!r){r=a,m=61;break}l<<=1}else r=0,t=0,m=61}while(0);if(61==(0|m)){if(!(0|r)&!(0|t)){if(!(t=((t=2<<c)|0-t)&o)){f=h;break}f=(t&0-t)-1|0,t=0,r=0|i[23620+(((a=(f>>>=u=f>>>12&16)>>>5&8)|u|(l=(f>>>=a)>>>2&4)|(c=(f>>>=l)>>>1&2)|(r=(f>>>=c)>>>1&1))+(f>>>r)<<2)>>2]}r?m=65:(l=t,u=s)}if(65==(0|m))for(a=r;;){if(s=(r=(f=(-8&i[a+4>>2])-h|0)>>>0<s>>>0)?f:s,t=r?a:t,(r=0|i[a+16>>2])||(r=0|i[a+20>>2]),!r){l=t,u=s;break}a=r}if(0|l&&u>>>0<((0|i[5831])-h|0)>>>0&&(A=l+h|0)>>>0>l>>>0){a=0|i[l+24>>2],n=0|i[l+12>>2];do{if((0|n)==(0|l)){if(!(n=0|i[(t=l+20|0)>>2])&&!(n=0|i[(t=l+16|0)>>2])){n=0;break}for(;;)if(r=0|i[(s=n+20|0)>>2])n=r,t=s;else{if(!(r=0|i[(s=n+16|0)>>2]))break;n=r,t=s}i[t>>2]=0}else w=0|i[l+8>>2],i[w+12>>2]=n,i[n+8>>2]=w}while(0);do{if(a){if(t=0|i[l+28>>2],(0|l)==(0|i[(r=23620+(t<<2)|0)>>2])){if(i[r>>2]=n,!n){o&=~(1<<t),i[5830]=o;break}}else if(i[((0|i[(w=a+16|0)>>2])==(0|l)?w:a+20)>>2]=n,!n)break;i[n+24>>2]=a,0|(t=0|i[l+16>>2])&&(i[n+16>>2]=t,i[t+24>>2]=n),(t=0|i[l+20>>2])&&(i[n+20>>2]=t,i[t+24>>2]=n)}}while(0);t:do{if(u>>>0<16)w=u+h|0,i[l+4>>2]=3|w,i[(w=l+w+4|0)>>2]=1|i[w>>2];else{if(i[l+4>>2]=3|h,i[A+4>>2]=1|u,i[A+u>>2]=u,n=u>>>3,u>>>0<256){r=23356+(n<<1<<2)|0,(t=0|i[5829])&(n=1<<n)?n=0|i[(t=r+8|0)>>2]:(i[5829]=t|n,n=r,t=r+8|0),i[t>>2]=A,i[n+12>>2]=A,i[A+8>>2]=n,i[A+12>>2]=r;break}if(n=23620+((r=(n=u>>>8)?u>>>0>16777215?31:u>>>(7+(r=14-((_=(520192+(w=n<<(b=(n+1048320|0)>>>16&8))|0)>>>16&4)|b|(r=(245760+(w<<=_)|0)>>>16&2))+(w<<r>>>15)|0)|0)&1|r<<1:0)<<2)|0,i[A+28>>2]=r,i[4+(t=A+16|0)>>2]=0,i[t>>2]=0,!(o&(t=1<<r))){i[5830]=o|t,i[n>>2]=A,i[A+24>>2]=n,i[A+12>>2]=A,i[A+8>>2]=A;break}n=0|i[n>>2];e:do{if((-8&i[n+4>>2])!=(0|u)){for(o=u<<(31==(0|r)?0:25-(r>>>1)|0);t=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[t+4>>2])==(0|u)){n=t;break e}o<<=1,n=t}i[r>>2]=A,i[A+24>>2]=n,i[A+12>>2]=A,i[A+8>>2]=A;break t}}while(0);w=0|i[(b=n+8|0)>>2],i[w+12>>2]=A,i[b>>2]=A,i[A+8>>2]=w,i[A+12>>2]=n,i[A+24>>2]=0}}while(0);return I=e,0|l+8}f=h}else f=h;else f=-1}while(0);if((r=0|i[5831])>>>0>=f>>>0)return n=r-f|0,t=0|i[5834],n>>>0>15?(w=t+f|0,i[5834]=w,i[5831]=n,i[w+4>>2]=1|n,i[t+r>>2]=n,i[t+4>>2]=3|f):(i[5831]=0,i[5834]=0,i[t+4>>2]=3|r,i[(w=t+r+4|0)>>2]=1|i[w>>2]),I=e,0|t+8;if((u=0|i[5832])>>>0>f>>>0)return _=u-f|0,i[5832]=_,b=(w=0|i[5835])+f|0,i[5835]=b,i[b+4>>2]=1|_,i[w+4>>2]=3|f,I=e,0|w+8;if(0|i[5947]?t=0|i[5949]:(i[5949]=4096,i[5948]=4096,i[5950]=-1,i[5951]=-1,i[5952]=0,i[5940]=0,i[5947]=-16&d^1431655768,t=4096),l=f+48|0,(h=(a=t+(c=f+47|0)|0)&(s=0-t|0))>>>0<=f>>>0)return I=e,0;if(0|(t=0|i[5939])&&(d=(A=0|i[5937])+h|0)>>>0<=A>>>0|d>>>0>t>>>0)return I=e,0;t:do{if(4&i[5940])n=0,m=143;else{r=0|i[5835];e:do{if(r){for(o=23764;!((d=0|i[o>>2])>>>0<=r>>>0&&(d+(0|i[o+4>>2])|0)>>>0>r>>>0);){if(!(t=0|i[o+8>>2])){m=128;break e}o=t}if((n=a-u&s)>>>0<2147483647)if((0|(t=0|Ie(0|n)))==((0|i[o>>2])+(0|i[o+4>>2])|0)){if(-1!=(0|t)){u=n,a=t,m=145;break t}}else o=t,m=136;else n=0}else m=128}while(0);do{if(128==(0|m))if(-1!=(0|(r=0|Ie(0)))&&(n=r,g=(n=((g=(p=0|i[5948])-1|0)&n?(g+n&0-p)-n|0:0)+h|0)+(p=0|i[5937])|0,n>>>0>f>>>0&n>>>0<2147483647)){if(0|(d=0|i[5939])&&g>>>0<=p>>>0|g>>>0>d>>>0){n=0;break}if((0|(t=0|Ie(0|n)))==(0|r)){u=n,a=r,m=145;break t}o=t,m=136}else n=0}while(0);do{if(136==(0|m)){if(r=0-n|0,!(l>>>0>n>>>0&n>>>0<2147483647&-1!=(0|o))){if(-1==(0|o)){n=0;break}u=n,a=o,m=145;break t}if((t=c-n+(t=0|i[5949])&0-t)>>>0>=2147483647){u=n,a=o,m=145;break t}if(-1==(0|Ie(0|t))){Ie(0|r),n=0;break}u=t+n|0,a=o,m=145;break t}}while(0);i[5940]=4|i[5940],m=143}}while(0);if(143==(0|m)&&h>>>0<2147483647&&!(-1==(0|(_=0|Ie(0|h)))|1^(v=(y=(g=0|Ie(0))-_|0)>>>0>(f+40|0)>>>0)|_>>>0<g>>>0&-1!=(0|_)&-1!=(0|g)^1)&&(u=v?y:n,a=_,m=145),145==(0|m)){n=(0|i[5937])+u|0,i[5937]=n,n>>>0>(0|i[5938])>>>0&&(i[5938]=n),c=0|i[5835];t:do{if(c){for(n=23764;;){if((0|a)==((t=0|i[n>>2])+(r=0|i[n+4>>2])|0)){m=154;break}if(!(o=0|i[n+8>>2]))break;n=o}if(!(154!=(0|m)||(b=n+4|0,8&i[n+12>>2]))&&a>>>0>c>>>0&t>>>0<=c>>>0){i[b>>2]=r+u,b=c+(_=7&(_=c+8|0)?0-_&7:0)|0,_=(w=(0|i[5832])+u|0)-_|0,i[5835]=b,i[5832]=_,i[b+4>>2]=1|_,i[c+w+4>>2]=40,i[5836]=i[5951];break}for(a>>>0<(0|i[5833])>>>0&&(i[5833]=a),r=a+u|0,n=23764;;){if((0|i[n>>2])==(0|r)){m=162;break}if(!(t=0|i[n+8>>2]))break;n=t}if(162==(0|m)&&!(8&i[n+12>>2])){i[n>>2]=a,i[(A=n+4|0)>>2]=(0|i[A>>2])+u,h=(A=a+(7&(A=a+8|0)?0-A&7:0)|0)+f|0,l=(n=r+(7&(n=r+8|0)?0-n&7:0)|0)-A-f|0,i[A+4>>2]=3|f;e:do{if((0|c)==(0|n))w=(0|i[5832])+l|0,i[5832]=w,i[5835]=h,i[h+4>>2]=1|w;else{if((0|i[5834])==(0|n)){w=(0|i[5831])+l|0,i[5831]=w,i[5834]=h,i[h+4>>2]=1|w,i[h+w>>2]=w;break}if(1==(3&(t=0|i[n+4>>2]))){u=-8&t,o=t>>>3;n:do{if(t>>>0<256){if(t=0|i[n+8>>2],(0|(r=0|i[n+12>>2]))==(0|t)){i[5829]=i[5829]&~(1<<o);break}i[t+12>>2]=r,i[r+8>>2]=t;break}a=0|i[n+24>>2],t=0|i[n+12>>2];do{if((0|t)==(0|n)){if(t=0|i[(o=4+(r=n+16|0)|0)>>2])r=o;else if(!(t=0|i[r>>2])){t=0;break}for(;;)if(o=0|i[(s=t+20|0)>>2])t=o,r=s;else{if(!(o=0|i[(s=t+16|0)>>2]))break;t=o,r=s}i[r>>2]=0}else w=0|i[n+8>>2],i[w+12>>2]=t,i[t+8>>2]=w}while(0);if(!a)break;o=23620+((r=0|i[n+28>>2])<<2)|0;do{if((0|i[o>>2])==(0|n)){if(i[o>>2]=t,0|t)break;i[5830]=i[5830]&~(1<<r);break n}if(i[((0|i[(w=a+16|0)>>2])==(0|n)?w:a+20)>>2]=t,!t)break n}while(0);if(i[t+24>>2]=a,0|(o=0|i[(r=n+16|0)>>2])&&(i[t+16>>2]=o,i[o+24>>2]=t),!(r=0|i[r+4>>2]))break;i[t+20>>2]=r,i[r+24>>2]=t}while(0);n=n+u|0,s=u+l|0}else s=l;if(i[(n=n+4|0)>>2]=-2&i[n>>2],i[h+4>>2]=1|s,i[h+s>>2]=s,n=s>>>3,s>>>0<256){r=23356+(n<<1<<2)|0,(t=0|i[5829])&(n=1<<n)?n=0|i[(t=r+8|0)>>2]:(i[5829]=t|n,n=r,t=r+8|0),i[t>>2]=h,i[n+12>>2]=h,i[h+8>>2]=n,i[h+12>>2]=r;break}n=s>>>8;do{if(n){if(s>>>0>16777215){o=31;break}o=s>>>(7+(o=14-((_=(520192+(w=n<<(b=(n+1048320|0)>>>16&8))|0)>>>16&4)|b|(o=(245760+(w<<=_)|0)>>>16&2))+(w<<o>>>15)|0)|0)&1|o<<1}else o=0}while(0);if(n=23620+(o<<2)|0,i[h+28>>2]=o,i[4+(t=h+16|0)>>2]=0,i[t>>2]=0,!((t=0|i[5830])&(r=1<<o))){i[5830]=t|r,i[n>>2]=h,i[h+24>>2]=n,i[h+12>>2]=h,i[h+8>>2]=h;break}n=0|i[n>>2];n:do{if((-8&i[n+4>>2])!=(0|s)){for(o=s<<(31==(0|o)?0:25-(o>>>1)|0);t=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[t+4>>2])==(0|s)){n=t;break n}o<<=1,n=t}i[r>>2]=h,i[h+24>>2]=n,i[h+12>>2]=h,i[h+8>>2]=h;break e}}while(0);w=0|i[(b=n+8|0)>>2],i[w+12>>2]=h,i[b>>2]=h,i[h+8>>2]=w,i[h+12>>2]=n,i[h+24>>2]=0}}while(0);return I=e,0|A+8}for(n=23764;!((t=0|i[n>>2])>>>0<=c>>>0&&(w=t+(0|i[n+4>>2])|0)>>>0>c>>>0);)n=0|i[n+8>>2];n=(t=(t=(s=w+-47|0)+(7&(t=s+8|0)?0-t&7:0)|0)>>>0<(s=c+16|0)>>>0?c:t)+8|0,b=a+(_=7&(_=a+8|0)?0-_&7:0)|0,_=(r=u+-40|0)-_|0,i[5835]=b,i[5832]=_,i[b+4>>2]=1|_,i[a+r+4>>2]=40,i[5836]=i[5951],i[(r=t+4|0)>>2]=27,i[n>>2]=i[5941],i[n+4>>2]=i[5942],i[n+8>>2]=i[5943],i[n+12>>2]=i[5944],i[5941]=a,i[5942]=u,i[5944]=0,i[5943]=n,n=t+24|0;do{b=n,i[(n=n+4|0)>>2]=7}while((b+8|0)>>>0<w>>>0);if((0|t)!=(0|c)){if(a=t-c|0,i[r>>2]=-2&i[r>>2],i[c+4>>2]=1|a,i[t>>2]=a,n=a>>>3,a>>>0<256){r=23356+(n<<1<<2)|0,(t=0|i[5829])&(n=1<<n)?n=0|i[(t=r+8|0)>>2]:(i[5829]=t|n,n=r,t=r+8|0),i[t>>2]=c,i[n+12>>2]=c,i[c+8>>2]=n,i[c+12>>2]=r;break}if(r=23620+((o=(n=a>>>8)?a>>>0>16777215?31:a>>>(7+(o=14-((_=(520192+(w=n<<(b=(n+1048320|0)>>>16&8))|0)>>>16&4)|b|(o=(245760+(w<<=_)|0)>>>16&2))+(w<<o>>>15)|0)|0)&1|o<<1:0)<<2)|0,i[c+28>>2]=o,i[c+20>>2]=0,i[s>>2]=0,!((n=0|i[5830])&(t=1<<o))){i[5830]=n|t,i[r>>2]=c,i[c+24>>2]=r,i[c+12>>2]=c,i[c+8>>2]=c;break}n=0|i[r>>2];e:do{if((-8&i[n+4>>2])!=(0|a)){for(o=a<<(31==(0|o)?0:25-(o>>>1)|0);t=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[t+4>>2])==(0|a)){n=t;break e}o<<=1,n=t}i[r>>2]=c,i[c+24>>2]=n,i[c+12>>2]=c,i[c+8>>2]=c;break t}}while(0);w=0|i[(b=n+8|0)>>2],i[w+12>>2]=c,i[b>>2]=c,i[c+8>>2]=w,i[c+12>>2]=n,i[c+24>>2]=0}}else!(0|(w=0|i[5833]))|a>>>0<w>>>0&&(i[5833]=a),i[5941]=a,i[5942]=u,i[5944]=0,i[5838]=i[5947],i[5837]=-1,i[5842]=23356,i[5841]=23356,i[5844]=23364,i[5843]=23364,i[5846]=23372,i[5845]=23372,i[5848]=23380,i[5847]=23380,i[5850]=23388,i[5849]=23388,i[5852]=23396,i[5851]=23396,i[5854]=23404,i[5853]=23404,i[5856]=23412,i[5855]=23412,i[5858]=23420,i[5857]=23420,i[5860]=23428,i[5859]=23428,i[5862]=23436,i[5861]=23436,i[5864]=23444,i[5863]=23444,i[5866]=23452,i[5865]=23452,i[5868]=23460,i[5867]=23460,i[5870]=23468,i[5869]=23468,i[5872]=23476,i[5871]=23476,i[5874]=23484,i[5873]=23484,i[5876]=23492,i[5875]=23492,i[5878]=23500,i[5877]=23500,i[5880]=23508,i[5879]=23508,i[5882]=23516,i[5881]=23516,i[5884]=23524,i[5883]=23524,i[5886]=23532,i[5885]=23532,i[5888]=23540,i[5887]=23540,i[5890]=23548,i[5889]=23548,i[5892]=23556,i[5891]=23556,i[5894]=23564,i[5893]=23564,i[5896]=23572,i[5895]=23572,i[5898]=23580,i[5897]=23580,i[5900]=23588,i[5899]=23588,i[5902]=23596,i[5901]=23596,i[5904]=23604,i[5903]=23604,b=a+(_=7&(_=a+8|0)?0-_&7:0)|0,_=(w=u+-40|0)-_|0,i[5835]=b,i[5832]=_,i[b+4>>2]=1|_,i[a+w+4>>2]=40,i[5836]=i[5951]}while(0);if((n=0|i[5832])>>>0>f>>>0)return _=n-f|0,i[5832]=_,b=(w=0|i[5835])+f|0,i[5835]=b,i[b+4>>2]=1|_,i[w+4>>2]=3|f,I=e,0|w+8}return i[(w=23312)>>2]=12,I=e,0}function ye(t){var e=0,n=0,r=0,o=0,s=0,a=0,u=0,l=0;if(t|=0){n=t+-8|0,o=0|i[5833],l=n+(e=-8&(t=0|i[t+-4>>2]))|0;do{if(1&t)u=n,a=n;else{if(r=0|i[n>>2],!(3&t))return;if(s=r+e|0,(a=n+(0-r)|0)>>>0<o>>>0)return;if((0|i[5834])==(0|a)){if(3&~(e=0|i[(t=l+4|0)>>2])){u=a,e=s;break}return i[5831]=s,i[t>>2]=-2&e,i[a+4>>2]=1|s,void(i[a+s>>2]=s)}if(n=r>>>3,r>>>0<256){if(t=0|i[a+8>>2],(0|(e=0|i[a+12>>2]))==(0|t)){i[5829]=i[5829]&~(1<<n),u=a,e=s;break}i[t+12>>2]=e,i[e+8>>2]=t,u=a,e=s;break}o=0|i[a+24>>2],t=0|i[a+12>>2];do{if((0|t)==(0|a)){if(t=0|i[(n=4+(e=a+16|0)|0)>>2])e=n;else if(!(t=0|i[e>>2])){t=0;break}for(;;)if(n=0|i[(r=t+20|0)>>2])t=n,e=r;else{if(!(n=0|i[(r=t+16|0)>>2]))break;t=n,e=r}i[e>>2]=0}else u=0|i[a+8>>2],i[u+12>>2]=t,i[t+8>>2]=u}while(0);if(o){if(e=0|i[a+28>>2],(0|i[(n=23620+(e<<2)|0)>>2])==(0|a)){if(i[n>>2]=t,!t){i[5830]=i[5830]&~(1<<e),u=a,e=s;break}}else if(i[((0|i[(u=o+16|0)>>2])==(0|a)?u:o+20)>>2]=t,!t){u=a,e=s;break}i[t+24>>2]=o,0|(n=0|i[(e=a+16|0)>>2])&&(i[t+16>>2]=n,i[n+24>>2]=t),(e=0|i[e+4>>2])?(i[t+20>>2]=e,i[e+24>>2]=t,u=a,e=s):(u=a,e=s)}else u=a,e=s}}while(0);if(!(a>>>0>=l>>>0)&&1&(r=0|i[(t=l+4|0)>>2])){if(2&r)i[t>>2]=-2&r,i[u+4>>2]=1|e,i[a+e>>2]=e,o=e;else{if((0|i[5835])==(0|l)){if(l=(0|i[5832])+e|0,i[5832]=l,i[5835]=u,i[u+4>>2]=1|l,(0|u)!=(0|i[5834]))return;return i[5834]=0,void(i[5831]=0)}if((0|i[5834])==(0|l))return l=(0|i[5831])+e|0,i[5831]=l,i[5834]=a,i[u+4>>2]=1|l,void(i[a+l>>2]=l);o=(-8&r)+e|0,n=r>>>3;do{if(r>>>0<256){if(e=0|i[l+8>>2],(0|(t=0|i[l+12>>2]))==(0|e)){i[5829]=i[5829]&~(1<<n);break}i[e+12>>2]=t,i[t+8>>2]=e;break}s=0|i[l+24>>2],t=0|i[l+12>>2];do{if((0|t)==(0|l)){if(t=0|i[(n=4+(e=l+16|0)|0)>>2])e=n;else if(!(t=0|i[e>>2])){n=0;break}for(;;)if(n=0|i[(r=t+20|0)>>2])t=n,e=r;else{if(!(n=0|i[(r=t+16|0)>>2]))break;t=n,e=r}i[e>>2]=0,n=t}else n=0|i[l+8>>2],i[n+12>>2]=t,i[t+8>>2]=n,n=t}while(0);if(0|s){if(t=0|i[l+28>>2],(0|i[(e=23620+(t<<2)|0)>>2])==(0|l)){if(i[e>>2]=n,!n){i[5830]=i[5830]&~(1<<t);break}}else if(i[((0|i[(r=s+16|0)>>2])==(0|l)?r:s+20)>>2]=n,!n)break;i[n+24>>2]=s,0|(e=0|i[(t=l+16|0)>>2])&&(i[n+16>>2]=e,i[e+24>>2]=n),0|(t=0|i[t+4>>2])&&(i[n+20>>2]=t,i[t+24>>2]=n)}}while(0);if(i[u+4>>2]=1|o,i[a+o>>2]=o,(0|u)==(0|i[5834]))return void(i[5831]=o)}if(t=o>>>3,o>>>0<256)return n=23356+(t<<1<<2)|0,(e=0|i[5829])&(t=1<<t)?t=0|i[(e=n+8|0)>>2]:(i[5829]=e|t,t=n,e=n+8|0),i[e>>2]=u,i[t+12>>2]=u,i[u+8>>2]=t,void(i[u+12>>2]=n);t=23620+((r=(t=o>>>8)?o>>>0>16777215?31:o>>>(7+(r=14-((s=(520192+(l=t<<(a=(t+1048320|0)>>>16&8))|0)>>>16&4)|a|(r=(245760+(l<<=s)|0)>>>16&2))+(l<<r>>>15)|0)|0)&1|r<<1:0)<<2)|0,i[u+28>>2]=r,i[u+20>>2]=0,i[u+16>>2]=0,e=0|i[5830],n=1<<r;t:do{if(e&n){t=0|i[t>>2];e:do{if((-8&i[t+4>>2])!=(0|o)){for(r=o<<(31==(0|r)?0:25-(r>>>1)|0);e=0|i[(n=t+16+(r>>>31<<2)|0)>>2];){if((-8&i[e+4>>2])==(0|o)){t=e;break e}r<<=1,t=e}i[n>>2]=u,i[u+24>>2]=t,i[u+12>>2]=u,i[u+8>>2]=u;break t}}while(0);l=0|i[(a=t+8|0)>>2],i[l+12>>2]=u,i[a>>2]=u,i[u+8>>2]=l,i[u+12>>2]=t,i[u+24>>2]=0}else i[5830]=e|n,i[t>>2]=u,i[u+24>>2]=t,i[u+12>>2]=u,i[u+8>>2]=u}while(0);if(l=(0|i[5837])-1|0,i[5837]=l,!(0|l)){for(t=23772;t=0|i[t>>2];)t=t+8|0;i[5837]=-1}}}}function ve(t,e){e|=0;var n=0;return(t|=0)?(n=0|v(e,t),(e|t)>>>0>65535&&(n=((n>>>0)/(t>>>0)|0)==(0|e)?n:-1)):n=0,(t=0|me(n))&&3&i[t+-4>>2]?(Ce(0|t,0,0|n),0|t):0|t}function _e(t,e,n,r){return 0|(w(0|(r=(e|=0)-(r|=0)-((n|=0)>>>0>(t|=0)>>>0|0)>>>0)),t-n>>>0)}function be(t){return 0|((t|=0)?31-(0|b(t^t-1)):32)}function we(t,e,n,r){var o,s;return s=I,I=I+16|0,function(t,e,n,r,o){o|=0;var s=0,a=0,u=0,l=0,c=0,h=0,A=0,f=0,d=0,p=0;if(h=t|=0,a=n|=0,u=f=r|=0,!(c=l=e|=0))return s=!!(0|o),u?s?(i[o>>2]=0|t,i[o+4>>2]=0&e,o=0,0|(w(0|(f=0)),o)):(o=0,0|(w(0|(f=0)),o)):(s&&(i[o>>2]=(h>>>0)%(a>>>0),i[o+4>>2]=0),o=(h>>>0)/(a>>>0)>>>0,0|(w(0|(f=0)),o));s=!(0|u);do{if(a){if(!s){if((s=(0|b(0|u))-(0|b(0|c))|0)>>>0<=31){a=A=s+1|0,t=h>>>(A>>>0)&(e=s-31>>31)|c<<(u=31-s|0),e&=c>>>(A>>>0),s=0,u=h<<u;break}return o?(i[o>>2]=0|t,i[o+4>>2]=l|0&e,o=0,0|(w(0|(f=0)),o)):(o=0,0|(w(0|(f=0)),o))}if((s=a-1|0)&a){a=u=33+(0|b(0|a))-(0|b(0|c))|0,t=(A=32-u|0)-1>>31&c>>>((d=u-32|0)>>>0)|(c<<A|h>>>(u>>>0))&(e=d>>31),e&=c>>>(u>>>0),s=h<<(p=64-u|0)&(l=A>>31),u=(c<<p|h>>>(d>>>0))&l|h<<A&u-33>>31;break}return 0|o&&(i[o>>2]=s&h,i[o+4>>2]=0),1==(0|a)?(p=0|t,0|(w(0|(d=l|0&e)),p)):(d=c>>>((p=0|be(0|a))>>>0)|0,p=c<<32-p|h>>>(p>>>0),0|(w(0|d),p))}if(s)return 0|o&&(i[o>>2]=(c>>>0)%(a>>>0),i[o+4>>2]=0),p=(c>>>0)/(a>>>0)>>>0,0|(w(0|(d=0)),p);if(!h)return 0|o&&(i[o>>2]=0,i[o+4>>2]=(c>>>0)%(u>>>0)),p=(c>>>0)/(u>>>0)>>>0,0|(w(0|(d=0)),p);if(!((s=u-1|0)&u))return 0|o&&(i[o>>2]=0|t,i[o+4>>2]=s&c|0&e),d=0,p=c>>>((0|be(0|u))>>>0),0|(w(0|d),p);if((s=(0|b(0|u))-(0|b(0|c))|0)>>>0<=30){a=e=s+1|0,t=c<<(u=31-s|0)|h>>>(e>>>0),e=c>>>(e>>>0),s=0,u=h<<u;break}return o?(i[o>>2]=0|t,i[o+4>>2]=l|0&e,p=0,0|(w(0|(d=0)),p)):(p=0,0|(w(0|(d=0)),p))}while(0);if(a){c=0|function(t,e,n,r){return 0|(w((e|=0)+(r|=0)+((n=(t|=0)+(n|=0)>>>0)>>>0<t>>>0|0)>>>0|0),n)}(0|(A=0|n),0|(h=f|0&r),-1,-1),n=0|E(),l=u,u=0;do{r=l,l=s>>>31|l<<1,s=u|s<<1,_e(0|c,0|n,0|(r=t<<1|r>>>31),0|(f=t>>>31|e<<1)),u=1&(d=(p=0|E())>>31|((0|p)<0?-1:0)<<1),t=0|_e(0|r,0|f,d&A|0,(((0|p)<0?-1:0)>>31|((0|p)<0?-1:0)<<1)&h),e=0|E(),a=a-1|0}while(0|a);c=l,l=0}else c=u,l=0,u=0;a=0,0|o&&(i[o>>2]=t,i[o+4>>2]=e),p=s<<1&-2|u,w(0|(d=(0|s)>>>31|(c|a)<<1|l))}(t|=0,e|=0,n|=0,r|=0,o=0|s),I=s,0|(w(0|i[o+4>>2]),i[o>>2])}function Ee(t,e,n){return t|=0,e|=0,(0|(n|=0))<32?(w(e>>>n|0),t>>>n|(e&(1<<n)-1)<<32-n):(w(0),e>>>n-32|0)}function xe(t,e,n){return t|=0,(0|(n|=0))<32?(w((e|=0)<<n|(t&(1<<n)-1<<32-n)>>>32-n),t<<n):(w(t<<n-32),0)}function Se(t,e){return e=+e,(t=+t)!=t?+e:e!=e?+t:+_(+t,+e)}function Te(t){return(t=+t)>=0?+a(t+.5):+y(t-.5)}function Pe(t,e,n){t|=0,e|=0;var o,s,a=0;if((0|(n|=0))>=8192)return P(0|t,0|e,0|n),0|t;if(s=0|t,o=t+n|0,(3&t)==(3&e)){for(;3&t;){if(!n)return 0|s;r[0|t]=0|r[0|e],t=t+1|0,e=e+1|0,n=n-1|0}for(a=(n=-4&o)-64|0;(0|t)<=(0|a);)i[t>>2]=i[e>>2],i[t+4>>2]=i[e+4>>2],i[t+8>>2]=i[e+8>>2],i[t+12>>2]=i[e+12>>2],i[t+16>>2]=i[e+16>>2],i[t+20>>2]=i[e+20>>2],i[t+24>>2]=i[e+24>>2],i[t+28>>2]=i[e+28>>2],i[t+32>>2]=i[e+32>>2],i[t+36>>2]=i[e+36>>2],i[t+40>>2]=i[e+40>>2],i[t+44>>2]=i[e+44>>2],i[t+48>>2]=i[e+48>>2],i[t+52>>2]=i[e+52>>2],i[t+56>>2]=i[e+56>>2],i[t+60>>2]=i[e+60>>2],t=t+64|0,e=e+64|0;for(;(0|t)<(0|n);)i[t>>2]=i[e>>2],t=t+4|0,e=e+4|0}else for(n=o-4|0;(0|t)<(0|n);)r[0|t]=0|r[0|e],r[t+1|0]=0|r[e+1|0],r[t+2|0]=0|r[e+2|0],r[t+3|0]=0|r[e+3|0],t=t+4|0,e=e+4|0;for(;(0|t)<(0|o);)r[0|t]=0|r[0|e],t=t+1|0,e=e+1|0;return 0|s}function Ce(t,e,n){e|=0;var o,s=0,a=0,u=0;if(o=(t|=0)+(n|=0)|0,e&=255,(0|n)>=67){for(;3&t;)r[0|t]=e,t=t+1|0;for(u=e|e<<8|e<<16|e<<24,a=(s=-4&o)-64|0;(0|t)<=(0|a);)i[t>>2]=u,i[t+4>>2]=u,i[t+8>>2]=u,i[t+12>>2]=u,i[t+16>>2]=u,i[t+20>>2]=u,i[t+24>>2]=u,i[t+28>>2]=u,i[t+32>>2]=u,i[t+36>>2]=u,i[t+40>>2]=u,i[t+44>>2]=u,i[t+48>>2]=u,i[t+52>>2]=u,i[t+56>>2]=u,i[t+60>>2]=u,t=t+64|0;for(;(0|t)<(0|s);)i[t>>2]=u,t=t+4|0}for(;(0|t)<(0|o);)r[0|t]=e,t=t+1|0;return o-n|0}function Me(t){return(t=+t)>=0?+a(t+.5):+y(t-.5)}function Ie(t){var e,n,r;return t|=0,r=0|T(),(0|t)>0&(0|(e=(n=0|i[s>>2])+t|0))<(0|n)|(0|e)<0?(M(0|e),S(12),-1):(0|e)>(0|r)&&!(0|C(0|e))?(S(12),-1):(i[s>>2]=e,0|n)}return{___uremdi3:we,_bitshift64Lshr:Ee,_bitshift64Shl:xe,_calloc:ve,_cellAreaKm2:function(t,e){var n,r,o,s=0;if(o=I,I=I+192|0,r=o,Ht(t|=0,e|=0,n=o+168|0),qt(t,e,r),(0|(e=0|i[r>>2]))>0){if(s=+Mt(r+8|0,r+8+((1!=(0|e)&1)<<4)|0,n)+0,1!=(0|e)){t=1;
2do{s+=+Mt(r+8+(t<<4)|0,r+8+((0|(t=t+1|0))%(0|e)<<4)|0,n)}while((0|t)<(0|e))}}else s=0;return I=o,6371.007180918475*s*6371.007180918475},_cellAreaM2:function(t,e){var n,r,o,s=0;if(o=I,I=I+192|0,r=o,Ht(t|=0,e|=0,n=o+168|0),qt(t,e,r),(0|(e=0|i[r>>2]))>0){if(s=+Mt(r+8|0,r+8+((1!=(0|e)&1)<<4)|0,n)+0,1!=(0|e)){t=1;do{s+=+Mt(r+8+(t<<4)|0,r+8+((0|(t=t+1|0))%(0|e)<<4)|0,n)}while((0|t)<(0|e))}}else s=0;return I=o,6371.007180918475*s*6371.007180918475*1e3*1e3},_cellAreaRads2:function(t,e){var n,r,o,s=0;if(o=I,I=I+192|0,r=o,Ht(t|=0,e|=0,n=o+168|0),qt(t,e,r),(0|(e=0|i[r>>2]))<=0)return I=o,+(s=0);if(s=+Mt(r+8|0,r+8+((1!=(0|e)&1)<<4)|0,n)+0,1==(0|e))return I=o,+s;t=1;do{s+=+Mt(r+8+(t<<4)|0,r+8+((0|(t=t+1|0))%(0|e)<<4)|0,n)}while((0|t)<(0|e));return I=o,+s},_compact:function(t,e,n){e|=0;var r,o=0,s=0,a=0,u=0,l=0,c=0,h=0,A=0,f=0,d=0,p=0,g=0,m=0,y=0,v=0,_=0,b=0,w=0,x=0,S=0,T=0;if(!(n|=0))return 0;if(o=0|i[(s=t|=0)>>2],!0&!(15728640&(s=0|i[s+4>>2]))){if((0|n)<=0)return 0;if(i[(S=e)>>2]=o,i[S+4>>2]=s,1==(0|n))return 0;o=1;do{x=0|i[4+(w=t+(o<<3)|0)>>2],i[(S=e+(o<<3)|0)>>2]=i[w>>2],i[S+4>>2]=x,o=o+1|0}while((0|o)!=(0|n));return 0}if(!(x=0|me(w=n<<3)))return-3;if(Pe(0|x,0|t,0|w),!(r=0|ve(n,8)))return ye(x),-3;o=n;t:for(;;){_=0|Ee(0|(A=0|i[(u=x)>>2]),0|(u=0|i[u+4>>2]),52),E(),b=(_&=15)-1|0,v=(0|o)>0;e:do{if(v){if(y=((0|o)<0)<<31>>31,g=0|xe(0|b,0,52),m=0|E(),b>>>0>15)for(s=0,t=A,n=u;;){if(!(!(0|t)&!(0|n))){if(a=0|Ee(0|t,0|n,52),E(),l=(0|(a&=15))<(0|b),a=(0|a)==(0|b),n=0|we(0|(h=l?0:a?t:0),0|(t=l?0:a?n:0),0|o,0|y),E(),!(0|(c=0|i[(l=a=r+(n<<3)|0)>>2]))&!(0|(l=0|i[l+4>>2])))n=h;else for(g=0,p=n,d=l,n=h;;){if((0|g)>(0|o)){S=41;break t}if((0|c)==(0|n)&(-117440513&d)==(0|t)){h=0|Ee(0|c,0|d,56),E(),f=1+(h&=7)|0,m=0|Ee(0|c,0|d,45),E();n:do{if(0|N(127&m)){if(c=0|Ee(0|c,0|d,52),E(),!(c&=15)){l=6;break}for(l=1;;){if(!(!((m=0|xe(7,0,3*(15-l|0)|0))&n)&!((0|E())&t))){l=7;break n}if(!(l>>>0<c>>>0)){l=6;break}l=l+1|0}}else l=7}while(0);if((h+2|0)>>>0>l>>>0){S=51;break t}m=0|xe(0|f,0,56),t=E()|-117440513&t,i[(l=a)>>2]=0,i[l+4>>2]=0,l=p,n|=m}else l=(p+1|0)%(0|o)|0;if(!(0|(c=0|i[(d=a=r+(l<<3)|0)>>2]))&!(0|(d=0|i[d+4>>2])))break;g=g+1|0,p=l}i[(m=a)>>2]=n,i[m+4>>2]=t}if((0|(s=s+1|0))>=(0|o))break e;t=0|i[(n=x+(s<<3)|0)>>2],n=0|i[n+4>>2]}for(s=0,t=A,n=u;;){if(!(!(0|t)&!(0|n))){if(l=0|Ee(0|t,0|n,52),E(),(0|(l&=15))>=(0|b)){if((0|l)!=(0|b)&&(t|=g,n=-15728641&n|m,l>>>0>=_>>>0)){a=b;do{p=0|xe(7,0,3*(14-a|0)|0),a=a+1|0,t|=p,n=0|E()|n}while(a>>>0<l>>>0)}}else t=0,n=0;if(l=0|we(0|t,0|n,0|o,0|y),E(),!(!(0|(h=0|i[(c=a=r+(l<<3)|0)>>2]))&!(0|(c=0|i[c+4>>2]))))for(p=0;;){if((0|p)>(0|o)){S=41;break t}if((0|h)==(0|t)&(-117440513&c)==(0|n)){f=0|Ee(0|h,0|c,56),E(),d=1+(f&=7)|0,T=0|Ee(0|h,0|c,45),E();n:do{if(0|N(127&T)){if(h=0|Ee(0|h,0|c,52),E(),!(h&=15)){c=6;break}for(c=1;;){if(!(!((T=0|xe(7,0,3*(15-c|0)|0))&t)&!((0|E())&n))){c=7;break n}if(!(c>>>0<h>>>0)){c=6;break}c=c+1|0}}else c=7}while(0);if((f+2|0)>>>0>c>>>0){S=51;break t}T=0|xe(0|d,0,56),n=E()|-117440513&n,i[(d=a)>>2]=0,i[d+4>>2]=0,t|=T}else l=(l+1|0)%(0|o)|0;if(!(0|(h=0|i[(c=a=r+(l<<3)|0)>>2]))&!(0|(c=0|i[c+4>>2])))break;p=p+1|0}i[(T=a)>>2]=t,i[T+4>>2]=n}if((0|(s=s+1|0))>=(0|o))break e;t=0|i[(n=x+(s<<3)|0)>>2],n=0|i[n+4>>2]}}}while(0);if((o+5|0)>>>0<11){S=99;break}if(!(m=0|ve((0|o)/6|0,8))){S=58;break}e:do{if(v){p=0,d=0;do{if(!(!(0|(s=0|i[(t=l=r+(p<<3)|0)>>2]))&!(0|(t=0|i[t+4>>2])))){c=0|Ee(0|s,0|t,56),E(),n=1+(c&=7)|0,h=-117440513&t,T=0|Ee(0|s,0|t,45),E();n:do{if(0|N(127&T)){if(f=0|Ee(0|s,0|t,52),E(),0|(f&=15))for(a=1;;){if(!(!(s&(T=0|xe(7,0,3*(15-a|0)|0)))&!(h&(0|E()))))break n;if(!(a>>>0<f>>>0))break;a=a+1|0}s|=t=0|xe(0|n,0,56),t=0|E()|h,i[(n=l)>>2]=s,i[n+4>>2]=t,n=c+2|0}}while(0);7==(0|n)&&(i[(T=m+(d<<3)|0)>>2]=s,i[T+4>>2]=-117440513&t,d=d+1|0)}p=p+1|0}while((0|p)!=(0|o));if(v){if(g=((0|o)<0)<<31>>31,f=0|xe(0|b,0,52),p=0|E(),b>>>0>15)for(t=0,s=0;;){do{if(!(!(0|A)&!(0|u))){for(c=0|Ee(0|A,0|u,52),E(),a=(0|(c&=15))<(0|b),c=(0|c)==(0|b),a=0|we(0|(l=a?0:c?A:0),0|(c=a?0:c?u:0),0|o,0|g),E(),n=0;;){if((0|n)>(0|o)){S=98;break t}if((-117440513&(h=0|i[4+(T=r+(a<<3)|0)>>2]))==(0|c)&&(0|i[T>>2])==(0|l)){S=70;break}if((0|i[(T=r+((a=(a+1|0)%(0|o)|0)<<3)|0)>>2])==(0|l)&&(0|i[T+4>>
22])==(0|c))break;n=n+1|0}if(70==(0|S)&&(S=0,!0&100663296==(117440512&h)))break;i[(T=e+(s<<3)|0)>>2]=A,i[T+4>>2]=u,s=s+1|0}}while(0);if((0|(t=t+1|0))>=(0|o)){o=d;break e}A=0|i[(u=x+(t<<3)|0)>>2],u=0|i[u+4>>2]}for(t=0,s=0;;){do{if(!(!(0|A)&!(0|u))){if(c=0|Ee(0|A,0|u,52),E(),(0|(c&=15))>=(0|b))if((0|c)!=(0|b))if(n=A|f,a=-15728641&u|p,c>>>0<_>>>0)c=a;else{l=b;do{T=0|xe(7,0,3*(14-l|0)|0),l=l+1|0,n|=T,a=0|E()|a}while(l>>>0<c>>>0);c=a}else n=A,c=u;else n=0,c=0;for(l=0|we(0|n,0|c,0|o,0|g),E(),a=0;;){if((0|a)>(0|o)){S=98;break t}if((-117440513&(h=0|i[4+(T=r+(l<<3)|0)>>2]))==(0|c)&&(0|i[T>>2])==(0|n)){S=93;break}if((0|i[(T=r+((l=(l+1|0)%(0|o)|0)<<3)|0)>>2])==(0|n)&&(0|i[T+4>>2])==(0|c))break;a=a+1|0}if(93==(0|S)&&(S=0,!0&100663296==(117440512&h)))break;i[(T=e+(s<<3)|0)>>2]=A,i[T+4>>2]=u,s=s+1|0}}while(0);if((0|(t=t+1|0))>=(0|o)){o=d;break e}A=0|i[(u=x+(t<<3)|0)>>2],u=0|i[u+4>>2]}}else s=0,o=d}else s=0,o=0}while(0);if(Ce(0|r,0,0|w),Pe(0|x,0|m,o<<3),ye(m),!o)break;e=e+(s<<3)|0}return 41==(0|S)?(ye(x),ye(r),0|(T=-1)):51==(0|S)?(ye(x),ye(r),0|(T=-2)):58==(0|S)?(ye(x),ye(r),0|(T=-3)):98==(0|S)?(ye(m),ye(x),ye(r),0|(T=-1)):(99==(0|S)&&Pe(0|e,0|x,o<<3),ye(x),ye(r),0|(T=0))},_destroyLinkedPolygon:function(t){var e=0,n=0,r=0,o=0;if(t|=0)for(r=1;;){if(0|(e=0|i[t>>2]))do{if(0|(n=0|i[e>>2]))do{o=n,n=0|i[n+16>>2],ye(o)}while(0|n);o=e,e=0|i[e+8>>2],ye(o)}while(0|e);if(e=t,t=0|i[t+8>>2],r||ye(e),!t)break;r=0}},_edgeLengthKm:function(t){return+ +o[20752+((t|=0)<<3)>>3]},_edgeLengthM:function(t){return+ +o[20880+((t|=0)<<3)>>3]},_emscripten_replace_memory:function(t){return r=new Int8Array(t),new Uint8Array(t),i=new Int32Array(t),new Float32Array(t),o=new Float64Array(t),n=t,!0},_exactEdgeLengthKm:function(t,e){var n,r,s=0,a=0,u=0,c=0,f=0,d=0;if(r=I,I=I+176|0,Yt(t|=0,e|=0,n=r),(0|(t=0|i[n>>2]))<=1)return I=r,+(u=0);e=t+-1|0,t=0,s=0,a=+o[n+8>>3],u=+o[n+16>>3];do{f=a,a=+o[n+8+((t=t+1|0)<<4)>>3],d=+A(.5*(a-f)),c=u,u=+o[n+8+(t<<4)+8>>3],c=d*d+(c=+A(.5*(u-c)))*(+h(+f)*+h(+a)*c),s+=2*+m(+ +l(+c),+ +l(+(1-c)))}while((0|t)!=(0|e));return I=r,+(d=6371.007180918475*s)},_exactEdgeLengthM:function(t,e){var n,r,s=0,a=0,u=0,c=0,f=0,d=0;if(r=I,I=I+176|0,Yt(t|=0,e|=0,n=r),(0|(t=0|i[n>>2]))<=1)return I=r,+(u=0);e=t+-1|0,t=0,s=0,a=+o[n+8>>3],u=+o[n+16>>3];do{f=a,a=+o[n+8+((t=t+1|0)<<4)>>3],d=+A(.5*(a-f)),c=u,u=+o[n+8+(t<<4)+8>>3],c=d*d+(c=+A(.5*(u-c)))*(+h(+f)*+h(+a)*c),s+=2*+m(+ +l(+c),+ +l(+(1-c)))}while((0|t)!=(0|e));return I=r,+(d=6371.007180918475*s*1e3)},_exactEdgeLengthRads:function(t,e){var n,r,s=0,a=0,u=0,c=0,f=0,d=0;if(r=I,I=I+176|0,Yt(t|=0,e|=0,n=r),(0|(t=0|i[n>>2]))<=1)return I=r,+(u=0);e=t+-1|0,t=0,s=0,a=+o[n+8>>3],u=+o[n+16>>3];do{f=a,a=+o[n+8+((t=t+1|0)<<4)>>3],d=+A(.5*(a-f)),c=u,u=+o[n+8+(t<<4)+8>>3],c=d*d+(c=+A(.5*(u-c)))*(+h(+a)*+h(+f)*c),s+=2*+m(+ +l(+c),+ +l(+(1-c)))}while((0|t)<(0|e));return I=r,+s},_experimentalH3ToLocalIj:function(t,e,n,r,i){var o,s;return i|=0,s=I,I=I+16|0,(t=0|$t(t|=0,e|=0,n|=0,r|=0,o=s))||(ft(o,i),t=0),I=s,0|t},_experimentalLocalIjToH3:function(t,e,n,r){var i,o;return t|=0,e|=0,r|=0,i=I,I=I+16|0,dt(n|=0,o=i),r=0|te(t,e,o,r),I=i,0|r},_free:ye,_geoToH3:Gt,_getDestinationH3IndexFromUnidirectionalEdge:function(t,e){t|=0;var n,r,o=0;return n=I,I=I+16|0,o=n,!0&268435456==(2013265920&(e|=0))?(r=0|Ee(0|t,0|e,56),E(),i[o>>2]=0,o=0|B(t,-2130706433&e|134217728,7&r,o),e=0|E(),w(0|e),I=n,0|o):(o=0,w(0|(e=0)),I=n,0|o)},_getH3IndexesFromUnidirectionalEdge:function(t,e,n){t|=0;var r,o,s,a,u=0;s=I,I=I+16|0,r=s,a=!0&268435456==(2013265920&(e|=0)),o=-2130706433&e|134217728,i[(u=n|=0)>>2]=a?t:0,i[u+4>>2]=a?o:0,a?(e=0|Ee(0|t,0|e,56),E(),i[r>>2]=0,t=0|B(t,o,7&e,r),e=0|E()):(t=0,e=0),i[(u=n+8|0)>>2]=t,i[u+4>>2]=e,I=s},_getH3UnidirectionalEdge:function(t,e,n,r){var o,s,a=0,u=0,l=0,c=0,h=0;if(s=I,I=I+16|0,o=s,!(0|Xt(t|=0,e|=0,n|=0,r|=0)))return c=0,w(0|(l=0)),I=s,0|c;for(l=-2130706433&e,a=(a=!(0|Bt(t,e)))?1:2;i[o>>2]=0,u=a+1|0,!((0|(h=0|B(t,e,a,o)))==(0|n)&(0|E())==(0|r));){if(!(u>>>0<7)){a=0,t=0,c=6;break}a=u}return 6==(0|c)?(w(0|a),I=s,0|t):(h=0|xe(0|a,0,56),c=0|l|E()|268435456,h|=t,w(0|c),I=s,0|h)},_getH3UnidirectionalEdgeBoundary:Yt,_getH3UnidirectionalEdgesFromHexagon:function(t,e,n){n|=0;var r,o=0;r=!(0|Bt(t|=0,e|=0)),e&=-2130706433,i[(o=n)>>2]=r?t:0,i[o+4>>2]=r?285212672|e:0,i[(o=n+8|0)>>2]=t,i[o+4>>2]=301989888|e,i[(o=n+16|0)>>2]=t,i[o+4>>2]=318767104|e,i[(o=n+24|0)>>2]=t,i[o+4>>2]=335544320|e,i[(o=n+32|0)>>2]=t,i[o+4>>2]=352321536|e,i[(n=n+40|0)>>2]=t,i[n+4>>2]=369098752|e},_getOriginH3IndexFromUnidirectionalEdge:function(t,e){var n;
2return t|=0,w(0|((n=!0&268435456==(2013265920&(e|=0)))?-2130706433&e|134217728:0)),0|(n?t:0)},_getPentagonIndexes:Wt,_getRes0Indexes:function(t){t|=0;var e=0,n=0,r=0;e=0;do{xe(0|e,0,45),r=134225919|E(),i[(n=t+(e<<3)|0)>>2]=-1,i[n+4>>2]=r,e=e+1|0}while(122!=(0|e))},_h3Distance:function(t,e,n,r){var i,o,s;return n|=0,r|=0,s=I,I=I+32|0,o=s,t=0|$t(t|=0,e|=0,t,e,i=s+12|0)||0|$t(t,e,n,r,o)?-1:0|At(i,o),I=s,0|t},_h3GetBaseCell:It,_h3GetFaces:function t(e,n,r){r|=0;var o,s=0,a=0,u=0,l=0,c=0,h=0,A=0,f=0;o=I,I=I+128|0,A=o+112|0,u=o+96|0,f=o,a=0|Ee(0|(e|=0),0|(n|=0),52),E(),c=15&a,i[A>>2]=c,l=0|Ee(0|e,0|n,45),E(),l&=127;t:do{if(0|N(l)){if(0|c)for(s=1;;){if(!(!((h=0|xe(7,0,3*(15-s|0)|0))&e)&!((0|E())&n))){a=0;break t}if(!(s>>>0<c>>>0))break;s=s+1|0}if(!(1&a))return h=0|xe(c+1|0,0,52),f=E()|-15728641&n,t((h|e)&~(A=0|xe(7,0,3*(14-c|0)|0)),f&~E(),r),void(I=o);a=1}else a=0}while(0);Vt(e,n,u),a?(bt(u,A,f),h=5):(St(u,A,f),h=6);t:do{if(0|N(l))if(c)for(s=1;;){if(!(!((l=0|xe(7,0,3*(15-s|0)|0))&e)&!((0|E())&n))){s=8;break t}if(!(s>>>0<c>>>0)){s=20;break}s=s+1|0}else s=20;else s=8}while(0);if(Ce(0|r,-1,0|s),a){a=0;do{for(Et(u=f+(a<<4)|0,0|i[A>>2]),u=0|i[u>>2],s=0;!(-1==(0|(c=0|i[(l=r+(s<<2)|0)>>2]))|(0|c)==(0|u));)s=s+1|0;i[l>>2]=u,a=a+1|0}while((0|a)!=(0|h))}else{a=0;do{for(wt(u=f+(a<<4)|0,0|i[A>>2],0,1),u=0|i[u>>2],s=0;!(-1==(0|(c=0|i[(l=r+(s<<2)|0)>>2]))|(0|c)==(0|u));)s=s+1|0;i[l>>2]=u,a=a+1|0}while((0|a)!=(0|h))}I=o},_h3GetResolution:function(t,e){return e=0|Ee(0|(t|=0),0|(e|=0),52),E(),15&e},_h3IndexesAreNeighbors:Xt,_h3IsPentagon:Bt,_h3IsResClassIII:function(t,e){return e=0|Ee(0|(t|=0),0|(e|=0),52),E(),1&e},_h3IsValid:Ot,_h3Line:function(t,e,n,r,o){n|=0,r|=0,o|=0;var s,a=0,l=0,c=0,h=0,A=0,f=0,d=0,p=0,g=0,m=0,y=0,v=0,_=0,b=0,w=0,E=0,x=0;if(s=I,I=I+48|0,l=s+12|0,E=s,!(0|$t(t|=0,e|=0,t,e,a=s+24|0)||0|$t(t,e,n,r,l))){if((0|(w=0|At(a,l)))<0)return I=s,0|w;for(i[a>>2]=0,i[a+4>>2]=0,i[a+8>>2]=0,i[l>>2]=0,i[l+4>>2]=0,i[l+8>>2]=0,$t(t,e,t,e,a),$t(t,e,n,r,l),pt(a),pt(l),w?(g=+(0|w),b=a,n=f=0|i[a>>2],r=d=0|i[(v=a+4|0)>>2],a=p=0|i[(_=a+8|0)>>2],m=+((0|i[l>>2])-f|0)/g,y=+((0|i[l+4>>2])-d|0)/g,g=+((0|i[l+8>>2])-p|0)/g):(v=r=a+4|0,_=p=a+8|0,b=a,n=0|i[a>>2],r=0|i[r>>2],a=0|i[p>>2],m=0,y=0,g=0),i[E>>2]=n,i[(p=E+4|0)>>2]=r,i[(d=E+8|0)>>2]=a,f=0;;){x=m*(h=+(0|f))+ +(0|n),c=y*h+ +(0|i[v>>2]),h=g*h+ +(0|i[_>>2]),r=~~+Te(+x),l=~~+Te(+c),n=~~+Te(+h),x=+u(+(+(0|r)-x)),c=+u(+(+(0|l)-c)),h=+u(+(+(0|n)-h));do{if(!(x>c&x>h)){if(A=0-r|0,c>h){a=A-n|0;break}a=l,n=A-l|0;break}r=0-(l+n)|0,a=l}while(0);if(i[E>>2]=r,i[p>>2]=a,i[d>>2]=n,gt(E),te(t,e,E,o+(f<<3)|0),(0|f)==(0|w))break;f=f+1|0,n=0|i[b>>2]}return I=s,0}return I=s,-1},_h3LineSize:function(t,e,n,r){var i,o,s;return n|=0,r|=0,s=I,I=I+32|0,o=s,t=0|$t(t|=0,e|=0,t,e,i=s+12|0)||0|$t(t,e,n,r,o)?-1:0|At(i,o),I=s,(t>>>31^1)+t|0},_h3SetToLinkedGeo:function(t,e,n){n|=0;var r,o,s,a=0;if(s=I,I=I+32|0,r=s,function(t,e,n){t|=0,n|=0;var r,o,s=0,a=0,u=0,l=0,c=0;if(o=I,I=I+176|0,r=o,(0|(e|=0))<1)return le(n,0,0),void(I=o);l=0|Ee(0|i[(l=t)>>2],0|i[l+4>>2],52),E(),le(n,(0|e)>6?e:6,15&l),l=0;do{if(qt(0|i[(s=t+(l<<3)|0)>>2],0|i[s+4>>2],r),(0|(s=0|i[r>>2]))>0){c=0;do{u=r+8+(c<<4)|0,(a=0|de(n,s=r+8+((0|(c=c+1|0))%(0|s)<<4)|0,u))?Ae(n,a):fe(n,u,s),s=0|i[r>>2]}while((0|c)<(0|s))}l=l+1|0}while((0|l)!=(0|e));I=o}(t|=0,e|=0,o=s+16|0),i[n>>2]=0,i[n+4>>2]=0,i[n+8>>2]=0,!(t=0|he(o)))return Zt(n),ce(o),void(I=s);do{e=0|Qt(n);do{Jt(e,t),a=t+16|0,i[r>>2]=i[a>>2],i[r+4>>2]=i[a+4>>2],i[r+8>>2]=i[a+8>>2],i[r+12>>2]=i[a+12>>2],Ae(o,t),t=0|pe(o,r)}while(0|t);t=0|he(o)}while(0|t);Zt(n),ce(o),I=s},_h3ToCenterChild:function(t,e,n){n|=0;var r=0,i=0;if(r=0|Ee(0|(t|=0),0|(e|=0),52),E(),(0|n)<16&(0|(r&=15))<=(0|n)){if((0|r)!=(0|n)&&(t|=i=0|xe(0|n,0,52),e=E()|-15728641&e,(0|r)<(0|n)))do{i=0|xe(7,0,3*(14-r|0)|0),r=r+1|0,t&=~i,e&=~E()}while((0|r)<(0|n))}else e=0,t=0;return w(0|e),0|t},_h3ToChildren:Lt,_h3ToGeo:Ht,_h3ToGeoBoundary:qt,_h3ToParent:Rt,_h3UnidirectionalEdgeIsValid:function(t,e){var n=0;if(!(!0&268435456==(2013265920&(e|=0))))return 0;switch(n=0|Ee(0|(t|=0),0|e,56),E(),7&n){case 0:case 7:return 0}return!0&16777216==(117440512&e)&!!(0|Bt(t,n=-2130706433&e|134217728))?0|(n=0):0|(n=0|Ot(t,n))},_hexAreaKm2:function(t){return+ +o[20496+((t|=0)<<3)>
2>3]},_hexAreaM2:function(t){return+ +o[20624+((t|=0)<<3)>>3]},_hexRing:function(t,e,n,r){t|=0,e|=0,r|=0;var o,s=0,a=0,u=0,l=0,c=0,h=0,A=0;if(o=I,I=I+16|0,A=o,!(n|=0))return i[(A=r)>>2]=t,i[A+4>>2]=e,I=o,0;i[A>>2]=0;t:do{if(0|Bt(t,e))t=1;else{if(a=(0|n)>0){s=0,h=t;do{if(!(0|(h=0|B(h,e,4,A)))&!(0|(e=0|E()))){t=2;break t}if(s=s+1|0,0|Bt(h,e)){t=1;break t}}while((0|s)<(0|n));if(i[(c=r)>>2]=h,i[c+4>>2]=e,c=n+-1|0,a){a=0,u=1,s=h,t=e;do{if(!(0|(s=0|B(s,t,2,A)))&!(0|(t=0|E()))){t=2;break t}if(i[(l=r+(u<<3)|0)>>2]=s,i[l+4>>2]=t,u=u+1|0,0|Bt(s,t)){t=1;break t}a=a+1|0}while((0|a)<(0|n));l=0,a=u;do{if(!(0|(s=0|B(s,t,3,A)))&!(0|(t=0|E()))){t=2;break t}if(i[(u=r+(a<<3)|0)>>2]=s,i[u+4>>2]=t,a=a+1|0,0|Bt(s,t)){t=1;break t}l=l+1|0}while((0|l)<(0|n));u=0;do{if(!(0|(s=0|B(s,t,1,A)))&!(0|(t=0|E()))){t=2;break t}if(i[(l=r+(a<<3)|0)>>2]=s,i[l+4>>2]=t,a=a+1|0,0|Bt(s,t)){t=1;break t}u=u+1|0}while((0|u)<(0|n));u=0;do{if(!(0|(s=0|B(s,t,5,A)))&!(0|(t=0|E()))){t=2;break t}if(i[(l=r+(a<<3)|0)>>2]=s,i[l+4>>2]=t,a=a+1|0,0|Bt(s,t)){t=1;break t}u=u+1|0}while((0|u)<(0|n));u=0;do{if(!(0|(s=0|B(s,t,4,A)))&!(0|(t=0|E()))){t=2;break t}if(i[(l=r+(a<<3)|0)>>2]=s,i[l+4>>2]=t,a=a+1|0,0|Bt(s,t)){t=1;break t}u=u+1|0}while((0|u)<(0|n));for(u=0;;){if(!(0|(s=0|B(s,t,6,A)))&!(0|(t=0|E()))){t=2;break t}if((0|u)!=(0|c)){if(i[(l=r+(a<<3)|0)>>2]=s,i[l+4>>2]=t,0|Bt(s,t)){t=1;break t}a=a+1|0}if((0|(u=u+1|0))>=(0|n)){u=h,a=e;break}}}else u=h,s=h,a=e,t=e}else i[(u=r)>>
22]=t,i[u+4>>2]=e,u=t,s=t,a=e,t=e;t=1&((0|u)!=(0|s)|(0|a)!=(0|t))}}while(0);return I=o,0|t},_i64Subtract:_e,_kRing:O,_kRingDistances:function(t,e,n,r,i){var o;if(0|R(t|=0,e|=0,n|=0,r|=0,i|=0)){if(Ce(0|r,0,(o=1+(0|v(3*n|0,n+1|0))|0)<<3),0|i)return Ce(0|i,0,o<<2),void L(t,e,n,r,i,o,0);(i=0|ve(o,4))&&(L(t,e,n,r,i,o,0),ye(i))}},_llvm_minnum_f64:Se,_llvm_round_f64:Te,_malloc:me,_maxFaceCount:function(t,e){var n=0,r=0;if(r=0|Ee(0|(t|=0),0|(e|=0),45),E(),!(0|N(127&r)))return 2;if(r=0|Ee(0|t,0|e,52),E(),!(r&=15))return 5;for(n=1;;){if(!(!((0|xe(7,0,3*(15-n|0)|0))&t)&!((0|E())&e))){n=2,t=6;break}if(!(n>>>0<r>>>0)){n=5,t=6;break}n=n+1|0}return 6==(0|t)?0|n:0},_maxH3ToChildrenSize:function(t,e,n){return n|=0,t=0|Ee(0|(t|=0),0|(e|=0),52),E(),(0|n)<16&(0|(t&=15))<=(0|n)?0|(n=0|ee(7,n-t|0)):0|(n=0)},_maxKringSize:function(t){return 1+(0|v(3*(t|=0)|0,t+1|0))|0},_maxPolyfillSize:function(t,e){e|=0;var n,r=0,o=0,s=0,a=0,u=0;if(n=I,I=I+48|0,s=n+8|0,o=n,a=0|i[4+(u=t|=0)>>2],i[(r=o)>>2]=i[u>>2],i[r+4>>2]=a,re(o,s),s=0|q(s,e),e=0|i[o>>2],(0|(o=0|i[t+8>>2]))<=0)return I=n,0|(u=(a=(0|s)<(0|(u=e)))?u:s)+12;r=0|i[t+12>>2],t=0;do{e=(0|i[r+(t<<3)>>2])+e|0,t=t+1|0}while((0|t)<(0|o));return I=n,0|(u=(u=(0|s)<(0|e))?e:s)+12},_maxUncompactSize:function(t,e,n){t|=0;var r=0,o=0,s=0,a=0;if((0|(e|=0))<=0)return 0;if((0|(n|=0))>=16){for(r=0;;){if(!(!(0|i[(a=t+(r<<3)|0)>>2])&!(0|i[a+4>>2]))){r=-1,o=13;break}if((0|(r=r+1|0))>=(0|e)){r=0,o=13;break}}if(13==(0|o))return 0|r}r=0,a=0;t:for(;;){s=0|i[(o=t+(a<<3)|0)>>2],o=0|i[o+4>>2];do{if(!(!(0|s)&!(0|o))){if(o=0|Ee(0|s,0|o,52),E(),(0|(o&=15))>(0|n)){r=-1,o=13;break t}if((0|o)==(0|n)){r=r+1|0;break}r=(0|ee(7,n-o|0))+r|0;break}}while(0);if((0|(a=a+1|0))>=(0|e)){o=13;break}}return 13==(0|o)?0|r:0},_memcpy:Pe,_memset:Ce,_numHexagons:function(t){var e;return t=0|i[(e=21008+((t|=0)<<3)|0)>>2],w(0|i[e+4>>2]),0|t},_pentagonIndexCount:function(){return 12},_pointDistKm:Ct,_pointDistM:function(t,e){t|=0;var n,r,i,s=0;return r=+o[(e|=0)>>3],n=+o[t>>3],s=(i=+A(.5*(r-n)))*i+(s=+A(.5*(+o[e+8>>3]-+o[t+8>>3])))*(+h(+r)*+h(+n)*s),2*+m(+ +l(+s),+ +l(+(1-s)))*6371.007180918475*1e3},_pointDistRads:function(t,e){t|=0;var n,r,i,s=0;return r=+o[(e|=0)>>3],n=+o[t>>3],s=(i=+A(.5*(r-n)))*i+(s=+A(.5*(+o[e+8>>3]-+o[t+8>>3])))*(+h(+r)*+h(+n)*s),2*+m(+ +l(+s),+ +l(+(1-s)))},_polyfill:function(t,e,n){var r,o=0,s=0,a=0,u=0,l=0;if(r=I,I=I+48|0,o=r+8|0,s=r,0|function(t,e,n){e|=0,n|=0;var r,o,s,a,u,l=0,c=0,h=0,A=0,f=0,d=0,p=0,g=0,m=0,y=0,v=0,_=0,b=0,w=0,S=0,T=0,P=0,C=0,M=0,O=0,B=0,N=0,F=0,D=0,j=0;if(u=I,I=I+112|0,o=u+80|0,d=u+72|0,s=u,a=u+56|0,(j=0|me(32+(i[(p=(t|=0)+8|0)>>2]<<5)|0))||x(22848,22448,800,22456),ie(t,j),l=0|i[(h=t)+4>>2],i[(f=d)>>2]=i[h>>2],i[f+4>>2]=l,re(d,o),f=0|q(o,e),l=0|i[d>>2],(0|(h=0|i[p>>2]))>0){A=0|i[t+12>>2],c=0;do{l=(0|i[A+(c<<3)>>2])+l|0,c=c+1|0}while((0|c)!=(0|h))}if(c=0|ve(r=(f=(0|f)<(0|l)?l:f)+12|0,8),g=0|ve(r,8),i[o>>2]=0,D=0|i[(F=t)+4>>2],i[(l=d)>>2]=i[F>>2],i[l+4>>2]=D,0|(l=0|k(d,r,e,o,c,g)))return ye(c),ye(g),ye(j),I=u,0|l;t:do{if((0|i[p>>2])>0){for(h=t+12|0,l=0;A=0|k((0|i[h>>2])+(l<<3)|0,r,e,o,c,g),l=l+1|0,!(0|A);)if((0|l)>=(0|i[p>>2]))break t;return ye(c),ye(g),ye(j),I=u,0|A}}while(0);(0|f)>-12&&Ce(0|g,0,((0|r)>1?r:1)<<3);t:do{if((0|i[o>>2])>0){D=((0|r)<0)<<31>>31,C=c,M=g,O=c,B=c,N=g,F=c,l=c,w=c,S=g,T=g,P=g,c=g;e:for(;;){for(b=0|i[o>>2],v=0,_=0,h=0;;){f=(A=s)+56|0;do{i[A>>2]=0,A=A+4|0}while((0|A)<(0|f));if(0|R(d=0|i[(e=C+(v<<3)|0)>>2],e=0|i[e+4>>2],1,s,0)){f=(A=s)+56|0;do{i[A>>2]=0,A=A+4|0}while((0|A)<(0|f));0|(A=0|ve(7,4))&&(L(d,e,1,s,A,7,0),ye(A))}y=0;do{g=0|i[(m=s+(y<<3)|0)>>2],m=0|i[m+4>>2];
2n:do{if(!(!(0|g)&!(0|m))){if(d=0|we(0|g,0|m,0|r,0|D),E(),!(!(0|(e=0|i[(f=A=n+(d<<3)|0)>>2]))&!(0|(f=0|i[f+4>>2]))))for(p=0;;){if((0|p)>(0|r))break e;if((0|e)==(0|g)&(0|f)==(0|m))break n;if(!(0|(e=0|i[(f=A=n+((d=(d+1|0)%(0|r)|0)<<3)|0)>>2]))&!(0|(f=0|i[f+4>>2])))break;p=p+1|0}!(0|g)&!(0|m)||(Ht(g,m,a),0|oe(t,j,a)&&(i[(p=A)>>2]=g,i[p+4>>2]=m,i[(p=M+(h<<3)|0)>>2]=g,i[p+4>>2]=m,h=h+1|0))}}while(0);y=y+1|0}while(y>>>0<7);if((0|(_=_+1|0))>=(0|b))break;v=v+1|0}if((0|b)>0&&Ce(0|O,0,b<<3),i[o>>2]=h,!((0|h)>0))break t;g=c,m=P,y=F,v=T,_=S,b=M,c=w,P=l,T=B,S=O,w=g,l=m,F=N,N=y,B=v,O=_,M=C,C=b}return ye(B),ye(N),ye(j),I=u,-1}l=g}while(0);return ye(j),ye(c),ye(l),I=u,0|(j=0)}(t|=0,e|=0,n|=0)){if(a=0|i[(l=t)+4>>2],i[(u=s)>>2]=i[l>>2],i[u+4>>2]=a,re(s,o),u=0|q(o,e),e=0|i[s>>2],(0|(a=0|i[t+8>>2]))>0){s=0|i[t+12>>2],o=0;do{e=(0|i[s+(o<<3)>>2])+e|0,o=o+1|0}while((0|o)!=(0|a))}(0|(e=(0|u)<(0|e)?e:u))<=-12||Ce(0|n,0,8+(((0|(l=e+11|0))>0?l:0)<<3)|0),I=r}else I=r},_res0IndexCount:function(){return 122},_round:Me,_sbrk:Ie,_sizeOfCoordIJ:function(){return 8},_sizeOfGeoBoundary:function(){return 168},_sizeOfGeoCoord:function(){return 16},_sizeOfGeoPolygon:function(){return 16},_sizeOfGeofence:function(){return 8},_sizeOfH3Index:function(){return 8},_sizeOfLinkedGeoPolygon:function(){return 12},_uncompact:function(t,e,n,r,o){t|=0,n|=0,r|=0;var s=0,a=0,u=0,l=0,c=0,h=0;if((0|(e|=0))<=0)return 0;if((0|(o|=0))>=16){for(s=0;;){if(!(!(0|i[(h=t+(s<<3)|0)>>2])&!(0|i[h+4>>2]))){s=14;break}if((0|(s=s+1|0))>=(0|e)){a=0,s=16;break}}if(14==(0|s))return 0|((0|r)>0?-2:-1);if(16==(0|s))return 0|a}s=0,h=0;t:for(;;){a=0|i[(u=c=t+(h<<3)|0)>>2],u=0|i[u+4>>2];do{if(!(!(0|a)&!(0|u))){if((0|s)>=(0|r)){a=-1,s=16;break t}if(l=0|Ee(0|a,0|u,52),E(),(0|(l&=15))>(0|o)){a=-2,s=16;break t}if((0|l)==(0|o)){i[(c=n+(s<<3)|0)>>2]=a,i[c+4>>2]=u,s=s+1|0;break}if((0|(a=(0|ee(7,o-l|0))+s|0))>(0|r)){a=-1,s=16;break t}Lt(0|i[c>>2],0|i[c+4>>2],o,n+(s<<3)|0),s=a}}while(0);if((0|(h=h+1|0))>=(0|e)){a=0,s=16;break}}return 16==(0|s)?0|a:0},establishStackSpace:function(t,e){I=t|=0},stackAlloc:function(t){var e;return e=I,I=15+(I=I+(t|=0)|0)&-16,0|e},stackRestore:function(t){I=t|=0},stackSave:function(){return 0|I}}}({Math,Int8Array,Int32Array,Uint8Array,Float32Array,Float64Array},{a:ut,b:function(t){l=t},c,d:function(t,e,n,r){ut("Assertion failed: "+b(t)+", at: "+[e?b(e):"unknown filename",n,r?b(r):"unknown function"])},e:function(t){return n.___errno_location&&(m[n.___errno_location()>>2]=t),t},f:W,g:function(t,e,n){p.set(p.subarray(e,e+n),t)},h:function(t){var e=W(),n=16777216,r=2130706432;if(t>r)return!1;for(var i=Math.max(e,16777216);i<t;)i=i<=536870912?w(2*i,n):Math.min(w((3*i+2147483648)/4,n),r);return!!X(i)},i:function(t){ut("OOM")},j:function(t){return t},k:H,l:X,m:q,n:function(){var t=q();return n.extraStackTrace&&(t+="\n"+n.extraStackTrace()),H(t)},o:24032,p:24016},f),$=(n.___uremdi3=K.___uremdi3,n._bitshift64Lshr=K._bitshift64Lshr,n._bitshift64Shl=K._bitshift64Shl,n._calloc=K._calloc,n._cellAreaKm2=K._cellAreaKm2,n._cellAreaM2=K._cellAreaM2,n._cellAreaRads2=K._cellAreaRads2,n._compact=K._compact,n._destroyLinkedPolygon=K._destroyLinkedPolygon,n._edgeLengthKm=K._edgeLengthKm,n._edgeLengthM=K._edgeLengthM,n._emscripten_replace_memory=K._emscripten_replace_memory),tt=(n._exactEdgeLengthKm=K._exactEdgeLengthKm,n._exactEdgeLengthM=K._exactEdgeLengthM,n._exactEdgeLengthRads=K._exactEdgeLengthRads,n._experimentalH3ToLocalIj=K._experimentalH3ToLocalIj,n._experimentalLocalIjToH3=K._experimentalLocalIjToH3,n._free=K._free,n._geoToH3=K._geoToH3,n._getDestinationH3IndexFromUnidirectionalEdge=K._getDestinationH3IndexFromUnidirectionalEdge,n._getH3IndexesFromUnidirectionalEdge=K._getH3IndexesFromUnidirectionalEdge,n._getH3UnidirectionalEdge=K._getH3UnidirectionalEdge,n._getH3UnidirectionalEdgeBoundary=K._getH3UnidirectionalEdgeBoundary,n._getH3UnidirectionalEdgesFromHexagon=K._getH3UnidirectionalEdgesFromHexagon,n._getOriginH3IndexFromUnidirectionalEdge=K._getOriginH3IndexFromUnidirectionalEdge,n._getPentagonIndexes=K._getPentagonIndexes,n._getRes0Indexes=K._getRes0Indexes,n._h3Distance=K._h3Distance,n._h3GetBaseCell=K._h3GetBaseCell,n._h3GetFaces=K._h3GetFaces,n._h3GetResolution=K._h3GetResolution,n._h3Indexe
2sAreNeighbors=K._h3IndexesAreNeighbors,n._h3IsPentagon=K._h3IsPentagon,n._h3IsResClassIII=K._h3IsResClassIII,n._h3IsValid=K._h3IsValid,n._h3Line=K._h3Line,n._h3LineSize=K._h3LineSize,n._h3SetToLinkedGeo=K._h3SetToLinkedGeo,n._h3ToCenterChild=K._h3ToCenterChild,n._h3ToChildren=K._h3ToChildren,n._h3ToGeo=K._h3ToGeo,n._h3ToGeoBoundary=K._h3ToGeoBoundary,n._h3ToParent=K._h3ToParent,n._h3UnidirectionalEdgeIsValid=K._h3UnidirectionalEdgeIsValid,n._hexAreaKm2=K._hexAreaKm2,n._hexAreaM2=K._hexAreaM2,n._hexRing=K._hexRing,n._i64Subtract=K._i64Subtract,n._kRing=K._kRing,n._kRingDistances=K._kRingDistances,n._llvm_minnum_f64=K._llvm_minnum_f64,n._llvm_round_f64=K._llvm_round_f64,n._malloc=K._malloc,n._maxFaceCount=K._maxFaceCount,n._maxH3ToChildrenSize=K._maxH3ToChildrenSize,n._maxKringSize=K._maxKringSize,n._maxPolyfillSize=K._maxPolyfillSize,n._maxUncompactSize=K._maxUncompactSize,n._memcpy=K._memcpy,n._memset=K._memset,n._numHexagons=K._numHexagons,n._pentagonIndexCount=K._pentagonIndexCount,n._pointDistKm=K._pointDistKm,n._pointDistM=K._pointDistM,n._pointDistRads=K._pointDistRads,n._polyfill=K._polyfill,n._res0IndexCount=K._res0IndexCount,n._round=K._round,n._sbrk=K._sbrk,n._sizeOfCoordIJ=K._sizeOfCoordIJ,n._sizeOfGeoBoundary=K._sizeOfGeoBoundary,n._sizeOfGeoCoord=K._sizeOfGeoCoord,n._sizeOfGeoPolygon=K._sizeOfGeoPolygon,n._sizeOfGeofence=K._sizeOfGeofence,n._sizeOfH3Index=K._sizeOfH3Index,n._sizeOfLinkedGeoPolygon=K._sizeOfLinkedGeoPolygon,n._uncompact=K._uncompact,n.establishStackSpace=K.establishStackSpace,n.stackAlloc=K.stackAlloc),et=n.stackRestore=K.stackRestore,nt=n.stackSave=K.stackSave;if(n.asm=K,n.cwrap=function(t,e,n,r){var i=(n=n||[]).every(function(t){return"number"===t});return"string"!==e&&i&&!r?A(t):function(){return function(t,e,n,r){var i={string:function(t){var e=0;if(null!=t&&0!==t){var n=1+(t.length<<2);!function(t,e,n){!function(t,e,n,r){if(!(r>0))return 0;for(var i=n+r-1,o=0;o<t.length;++o){var s=t.charCodeAt(o);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++o)),s<=127){if(n>=i)break;e[n++]=s}else if(s<=2047){if(n+1>=i)break;e[n++]=192|s>>6,e[n++]=128|63&s}else if(s<=65535){if(n+2>=i)break;e[n++]=224|s>>12,e[n++]=128|s>>6&63,e[n++]=128|63&s}else{if(n+3>=i)break;e[n++]=240|s>>18,e[n++]=128|s>>12&63,e[n++]=128|s>>6&63,e[n++]=128|63&s}}e[n]=0}(t,p,e,n)}(t,e=tt(n),n)}return e},array:function(t){var e=tt(t.length);return function(t,e){d.set(t,e)}(t,e),e}},o=A(t),s=[],a=0;if(r)for(var u=0;u<r.length;u++){var l=i[n[u]];l?(0===a&&(a=nt()),s[u]=l(r[u])):s[u]=r[u]}var c=o.apply(null,s);return c=function(t){return"string"===e?b(t):"boolean"===e?Boolean(t):t}(c),0!==a&&et(a),c}(t,e,n,arguments)}},n.setValue=function(t,e,n,r){switch("*"===(n=n||"i8").charAt(n.length-1)&&(n="i32"),n){case"i1":case"i8":d[0|t]=e;break;case"i16":g[t>>1]=e;break;case"i32":m[t>>2]=e;break;case"i64":U=[e>>>0,(j=e,+R(j)>=1?j>0?(0|k(+B(j/4294967296),4294967295))>>>0:~~+L((j-+(~~j>>>0))/4294967296)>>>0:0)],m[t>>2]=U[0],m[t+4>>2]=U[1];break;case"float":y[t>>2]=e;break;case"double":v[t>>3]=e;break;default:ut("invalid type for setValue: "+n)}},n.getValue=function(t,e,n){switch("*"===(e=e||"i8").charAt(e.length-1)&&(e="i32"),e){case"i1":case"i8":return d[0|t];case"i16":return g[t>>1];case"i32":case"i64":return m[t>>2];case"float":return y[t>>2];case"double":return v[t>>3];default:ut("invalid type for getValue: "+e)}return null},n.getTempRet0=c,G){V(G)||(J=G,G=n.locateFile?n.locateFile(J,s):s+J),N++,n.monitorRunDependencies&&n.monitorRunDependencies(N);var rt=function(t){t.byteLength&&(t=new Uint8Array(t)),p.set(t,8),n.memoryInitializerRequest&&delete n.memoryInitializerRequest.response,function(){if(N--,n.monitorRunDependencies&&n.monitorRunDependencies(N),0==N&&(null!==F&&(clearInterval(F),F=null),D)){var t=D;D=null,t()}}()},it=function(){i(G,rt,function(){throw"could not load memory initializer "+G})},ot=Q(G);if(ot)rt(ot.buffer);else if(n.memoryInitializerRequest){var st=function(){var t=n.memoryInitializerRequest,e=t.response;if(200!==t.status&&0!==t.status){var r=Q(n.memoryInitializerRequestURL);if(!r)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+t.status+", retrying "+G),void it();e=r.buffer}rt(e)};n.memoryInitializerRequest.response?setTimeout(st,0):n.memoryInitializerRequest.addEventListener("load",st)}else it()}function at(t){function e(){Z||(Z=!0,h||(S(P),S(C),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRu
2n&&(n.postRun=[n.postRun]);n.postRun.length;)O(n.postRun.shift());S(M)}()))}t=t||o,N>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)I(n.preRun.shift());S(T)}(),N>0||(n.setStatus?(n.setStatus("Running..."),setTimeout(function(){setTimeout(function(){n.setStatus("")},1),e()},1)):e()))}function ut(t){throw n.onAbort&&n.onAbort(t),a(t+=""),u(t),h=!0,"abort("+t+"). Build with -s ASSERTIONS=1 for more info."}if(D=function t(){Z||at(),Z||(D=t)},n.run=at,n.abort=ut,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return at(),t}("object"==typeof r?r:{}),i="number",o={};[["sizeOfH3Index",i],["sizeOfGeoCoord",i],["sizeOfGeoBoundary",i],["sizeOfGeoPolygon",i],["sizeOfGeofence",i],["sizeOfLinkedGeoPolygon",i],["sizeOfCoordIJ",i],["h3IsValid",i,[i,i]],["geoToH3",i,[i,i,i]],["h3ToGeo",null,[i,i,i]],["h3ToGeoBoundary",null,[i,i,i]],["maxKringSize",i,[i]],["kRing",null,[i,i,i,i]],["kRingDistances",null,[i,i,i,i,i]],["hexRing",null,[i,i,i,i]],["maxPolyfillSize",i,[i,i]],["polyfill",null,[i,i,i]],["h3SetToLinkedGeo",null,[i,i,i]],["destroyLinkedPolygon",null,[i]],["compact",i,[i,i,i]],["uncompact",i,[i,i,i,i,i]],["maxUncompactSize",i,[i,i,i]],["h3IsPentagon",i,[i,i]],["h3IsResClassIII",i,[i,i]],["h3GetBaseCell",i,[i,i]],["h3GetResolution",i,[i,i]],["maxFaceCount",i,[i,i]],["h3GetFaces",null,[i,i,i]],["h3ToParent",i,[i,i,i]],["h3ToChildren",null,[i,i,i,i]],["h3ToCenterChild",i,[i,i,i]],["maxH3ToChildrenSize",i,[i,i,i]],["h3IndexesAreNeighbors",i,[i,i,i,i]],["getH3UnidirectionalEdge",i,[i,i,i,i]],["getOriginH3IndexFromUnidirectionalEdge",i,[i,i]],["getDestinationH3IndexFromUnidirectionalEdge",i,[i,i]],["h3UnidirectionalEdgeIsValid",i,[i,i]],["getH3IndexesFromUnidirectionalEdge",null,[i,i,i]],["getH3UnidirectionalEdgesFromHexagon",null,[i,i,i]],["getH3UnidirectionalEdgeBoundary",null,[i,i,i]],["h3Distance",i,[i,i,i,i]],["h3Line",i,[i,i,i,i,i]],["h3LineSize",i,[i,i,i,i]],["experimentalH3ToLocalIj",i,[i,i,i,i,i]],["experimentalLocalIjToH3",i,[i,i,i,i]],["hexAreaM2",i,[i]],["hexAreaKm2",i,[i]],["edgeLengthM",i,[i]],["edgeLengthKm",i,[i]],["pointDistM",i,[i,i]],["pointDistKm",i,[i,i]],["pointDistRads",i,[i,i]],["cellAreaM2",i,[i,i]],["cellAreaKm2",i,[i,i]],["cellAreaRads2",i,[i,i]],["exactEdgeLengthM",i,[i,i]],["exactEdgeLengthKm",i,[i,i]],["exactEdgeLengthRads",i,[i,i]],["numHexagons",i,[i]],["getRes0Indexes",null,[i]],["res0IndexCount",i],["getPentagonIndexes",null,[i,i]],["pentagonIndexCount",i]].forEac
2h(function(t){o[t[0]]=r.cwrap.apply(r,t)});var s=16,a=4,u=4,l=8,c=o.sizeOfH3Index(),h=o.sizeOfGeoCoord(),A=o.sizeOfGeoBoundary(),f=o.sizeOfGeoPolygon(),d=o.sizeOfGeofence(),p=o.sizeOfLinkedGeoPolygon(),g=o.sizeOfCoordIJ(),m={m:"m",m2:"m2",km:"km",km2:"km2",rads:"rads",rads2:"rads2"};function y(t){if("number"!=typeof t||t<0||t>15||Math.floor(t)!==t)throw new Error("Invalid resolution: "+t)}var v=/[^0-9a-fA-F]/;function _(t){if(Array.isArray(t)&&2===t.length&&Number.isInteger(t[0])&&Number.isInteger(t[1]))return t;if("string"!=typeof t||v.test(t))return[0,0];var e=parseInt(t.substring(0,t.length-8),s);return[parseInt(t.substring(t.length-8),s),e]}function b(t){if(t>=0)return t.toString(s);var e=E(8,(t&=2147483647).toString(s));return(parseInt(e[0],s)+8).toString(s)+e.substring(1)}function w(t,e){return b(e)+E(8,b(t))}function E(t,e){for(var n=t-e.length,r="",i=0;i<n;i++)r+="0";return r+e}function x(t,e,n){for(var i=t.length,o=r._calloc(i,h),s=n?1:0,u=n?0:1,c=0;c<2*i;c+=2)r.HEAPF64.set([t[c/2][s],t[c/2][u]].map(bt),o/l+c);return r.HEAPU32.set([i,o],e/a),e}function S(t){return[t,r.getTempRet0()]}function T(t){var e=S(t),n=e[0],r=e[1];return r?w(n,r):null}function P(t,e){void 0===e&&(e=0);var n=r.getValue(t+a*e*2,"i32"),i=r.getValue(t+a*(2*e+1),"i32");return i?w(n,i):null}function C(t,e,n){r.HEAPU32.set(_(t),e/a+2*n)}function M(t,e){for(var n=[],r=0;r<e;r++){var i=P(t,r);null!==i&&n.push(i)}return n}function I(t,e){for(var n=e.length,r=0;r<n;r++)C(e[r],t,r)}function O(t,e){var n=r._calloc(1,h);return r.HEAPF64.set([t,e].map(bt),n/l),n}function R(t){return wt(r.getValue(t,"double"))}function L(t){return[R(t),R(t+l)]}function B(t){return[R(t+l),R(t)]}function k(t,e,n){for(var i=r.getValue(t,"i32"),o=t+l,s=[],a=e?B:L,u=0;u<2*i;u+=2)s.push(a(o+l*u));return n&&s.push(s[0]),s}function N(t){var e=_(t),n=e[0],r=e[1];return Boolean(o.h3IsValid(n,r))}function F(t){var e=_(t),n=e[0],r=e[1];return Boolean(o.h3IsPentagon(n,r))}function D(t){var e=_(t),n=e[0],r=e[1];return Boolean(o.h3IsResClassIII(n,r))}function j(t){var e=_(t),n=e[0],r=e[1];return o.h3GetBaseCell(n,r)}function U(t){var e=_(t),n=e[0],i=e[1],s=o.maxFaceCount(n,i),u=r._malloc(a*s);o.h3GetFaces(n,i,u);var l=function(t,e){for(var n=[],i=0;i<e;i++){var o=r.getValue(t+a*i,"i32");o>=0&&n.push(o)}return n}(u,s);return r._free(u),l}function G(t){var e=_(t),n=e[0],r=e[1];return o.h3IsValid(n,r)?o.h3GetResolution(n,r):-1}function z(t,e,n){var i=r._malloc(h);r.HEAPF64.set([t,e].map(bt),i/l);var s=T(o.geoToH3(i,n));return r._free(i),s}function V(t){var e=r._malloc(h),n=_(t),i=n[0],s=n[1];o.h3ToGeo(i,s,e);var a=L(e);return r._free(e),a}function H(t,e){var n=r._malloc(A),i=_(t),s=i[0],a=i[1];o.h3ToGeoBoundary(s,a,n);var u=k(n,e,e);return r._free(n),u}function q(t,e){var n=_(t),r=n[0],i=n[1];return T(o.h3ToParent(r,i,e))}function W(t,e){if(!N(t))return[];var n=_(t),i=n[0],s=n[1],a=o.maxH3ToChildrenSize(i,s,e),u=r._calloc(a,c);o.h3ToChildren(i,s,e,u);var l=M(u,a);return r._free(u),l}function X(t,e){var n=_(t),r=n[0],i=n[1];return T(o.h3ToCenterChild(r,i,e))}function Y(t,e){var n=_(t),i=n[0],s=n[1],a=o.maxKringSize(e),u=r._calloc(a,c);o.kRing(i,s,e,u);var l=M(u,a);return r._free(u),l}function Q(t,e){var n=_(t),i=n[0],s=n[1],u=o.maxKringSize(e),l=r._calloc(u,c),h=r._calloc(u,a);o.kRingDistances(i,s,e,l,h);for(var A=[],f=0;f<e+1;f++)A.push([]);for(var d=0;d<2*u;d+=2){var p=r.getValue(l+a*d,"i32"),g=r.getValue(l+a*(d+1),"i32"),m=r.getValue(h+a*(d/2),"i32");0===p&&0===g||A[m].push(w(p,g))}return r._free(l),r._free(h),A}function J(t,e){var n=0===e?1:6*e,i=r._calloc(n,c);if(0!==o.hexRing.apply(o,_(t).concat([e],[i])))throw r._free(i),new Error("Failed to get hexRing (encountered a pentagon?)");var s=M(i,n);return r._free(i),s}function Z(t,e,n){if(y(e),n=Boolean(n),0===t.length||0===t[0].length)return[];"number"==typeof t[0][0]&&(t=[t]);var i=function(t,e){var n,i=t.length-1,o=r._calloc(f),s=0+d,u=s+a;if(x(t[0],o+0,e),i>0){n=r._calloc(i,d);for(var l=0;l<i;l++)x(t[l+1],n+d*l,e)}return r.setValue(o+s,i,"i32"),r.setValue(o+u,n,"i32"),o}(t,n),s=o.maxPolyfillSize(i,e),u=r._calloc(s,c);o.polyfill(i,e,u);var l=M(u,s);return r._free(u),function(t){var e=0+d,n=e+a,i=a;r._free(r.getValue(t+0+i,"i8*"));var o=r.getValue(t+e,"i32");if(o>0){for(var s=r.getValue(t+n,"i32"),u=0;u<o;u++)r._free(r.getValue(s+d*u+i,"i8*"));r._free(s)}r._free(t)}(i),l}function K(t,e){if(!t||!t.length)return[];var n=t.length,i=r._calloc(n,c);I(i,t);var s=r._calloc(p),a=s;o.h3SetToLinkedGeo(i,n,s);var h=function(t,e){for(var n,i,o,s,a=[],c=e?B:L;t;){for(a.push(n=[]),i=r.getValue(t,"i8*");i;){for(n.push(o=[]),s=r.getValue(i,"i8*");s;)o.push(c(s)),s=r.getValue(s+2*l,"i8*");e&&o.push(o[0]),i=r.getValue(i+2*u,"i8*")}t=r.getValue(t+2*u,"i8*")}return a}(s,e);return o.destroyLinkedPolygon(a),r._free(a),r._free(i),h}function $(t){if(!t||!t.length)return[];var e=t.length,n=r._calloc(e,c);I(n,t);var i=r._calloc(e,c);if(0!==o.compact(n,i,e))throw r._free(n),r._free(i),new Error("Failed to compact, malformed input data (duplicate hexagons?)");var s=M(i,e);return r._free(n),r._free(i),s}function tt(t,e){if(y(e),!t||!t.length)return[];var n=t.length,i=r._calloc(n,c);I(i,t);var s=o.maxUncompactSize(i,n,e),a=r._calloc(s,c);if(0!==o.uncompact(i,n,a,s,e))throw r._free(i),r._free(a),new Error("Failed to uncompact (bad resolution?)");var u=M(a,s);return r._free(i),r._free(a),u}function et(t,e){var n=_(t),r=n[0],i=n[1],s=_(e),a=s[0],u=s[1];
2return Boolean(o.h3IndexesAreNeighbors(r,i,a,u))}function nt(t,e){var n=_(t),r=n[0],i=n[1],s=_(e),a=s[0],u=s[1];return T(o.getH3UnidirectionalEdge(r,i,a,u))}function rt(t){var e=_(t),n=e[0],r=e[1];return T(o.getOriginH3IndexFromUnidirectionalEdge(n,r))}function it(t){var e=_(t),n=e[0],r=e[1];return T(o.getDestinationH3IndexFromUnidirectionalEdge(n,r))}function ot(t){var e=_(t),n=e[0],r=e[1];return Boolean(o.h3UnidirectionalEdgeIsValid(n,r))}function st(t){var e=_(t),n=e[0],i=e[1],s=r._calloc(2,c);o.getH3IndexesFromUnidirectionalEdge(n,i,s);var a=M(s,2);return r._free(s),a}function at(t){var e=_(t),n=e[0],i=e[1],s=r._calloc(6,c);o.getH3UnidirectionalEdgesFromHexagon(n,i,s);var a=M(s,6);return r._free(s),a}function ut(t,e){var n=r._malloc(A),i=_(t),s=i[0],a=i[1];o.getH3UnidirectionalEdgeBoundary(s,a,n);var u=k(n,e);return r._free(n),u}function lt(t,e){var n=_(t),r=n[0],i=n[1],s=_(e),a=s[0],u=s[1];return o.h3Distance(r,i,a,u)}function ct(t,e){var n=_(t),i=n[0],s=n[1],a=_(e),u=a[0],l=a[1],h=o.h3LineSize(i,s,u,l);if(h<0)throw new Error("Line cannot be calculated");var A=r._calloc(h,c);o.h3Line(i,s,u,l,A);var f=M(A,h);return r._free(A),f}function ht(t,e){var n,i=r._malloc(g),s=o.experimentalH3ToLocalIj.apply(o,_(t).concat(_(e),[i])),u=(n=i,{i:r.getValue(n,"i32"),j:r.getValue(n+a,"i32")});switch(r._free(i),s){case 0:return u;case 1:throw new Error("Incompatible origin and index.");case 2:default:throw new Error("Local IJ coordinates undefined for this origin and index pair. The index may be too far from the origin.");case 3:case 4:case 5:throw new Error("Encountered possible pentagon distortion")}}function At(t,e){if(!e||"number"!=typeof e.i||"number"!=typeof e.j)throw new Error("Coordinates must be provided as an {i, j} object");var n,i,s,u,l=r._malloc(g),h=r._malloc(c);n=l,s=(i=e).i,u=i.j,r.setValue(n,s,"i32"),r.setValue(n+a,u,"i32");var A=o.experimentalLocalIjToH3.apply(o,_(t).concat([l],[h])),f=P(h);if(r._free(l),r._free(h),0!==A)throw new Error("Index not defined for this origin and IJ coordinates pair. IJ coordinates may be too far from origin, or a pentagon distortion was encountered.");return f}function ft(t,e,n){var i,s=O(t[0],t[1]),a=O(e[0],e[1]);switch(n){case m.m:i=o.pointDistM(s,a);break;case m.km:i=o.pointDistKm(s,a);break;case m.rads:i=o.pointDistRads(s,a);break;default:i=null}if(r._free(s),r._free(a),null===i)throw new Error("Unknown unit: "+n);return i}function dt(t,e){var n=_(t),r=n[0],i=n[1];switch(e){case m.m2:return o.cellAreaM2(r,i);case m.km2:return o.cellAreaKm2(r,i);case m.rads2:return o.cellAreaRads2(r,i);default:throw new Error("Unknown unit: "+e)}}function pt(t,e){var n=_(t),r=n[0],i=n[1];switch(e){case m.m:return o.exactEdgeLengthM(r,i);case m.km:return o.exactEdgeLengthKm(r,i);case m.rads:return o.exactEdgeLengthRads(r,i);default:throw new Error("Unknown unit: "+e)}}function gt(t,e){switch(y(t),e){case m.m2:return o.hexAreaM2(t);case m.km2:return o.hexAreaKm2(t);default:throw new Error("Unknown unit: "+e)}}function mt(t,e){switch(y(t),e){case m.m:return o.edgeLengthM(t);case m.km:return o.edgeLengthKm(t);default:throw new Error("Unknown unit: "+e)}}function yt(t){y(t);var e=S(o.numHexagons(t)),n=e[0],r=e[1];return r?r*Math.pow(2,32)+n:n}function vt(){var t=o.res0IndexCount(),e=r._malloc(c*t);o.getRes0Indexes(e);var n=M(e,t);return r._free(e),n}function _t(t){y(t);var e=o.pentagonIndexCount(),n=r._malloc(c*e);o.getPentagonIndexes(t,n);var i=M(n,e);return r._free(n),i}function bt(t){return t*Math.PI/180}function wt(t){return 180*t/Math.PI}},8968:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_ARROWS=e.DEFAULT_ARROWS=e.ArrowStyles=void 0,e.ArrowStyles={NONE:0,FORWARD:1,BACKWARD:2,BOTH:3},e.DEFAULT_ARROWS=1,e.MAX_ARROWS=3},9946:(t,e,n)=>{"use strict";n.d(e,{A:()=>g});var r,i=n(90154),o=n(95855),s=n(94421),a=n(39095),u=n(90333),l=n(64062),c=n(70911);!function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL0ROW3=3]="COL0ROW3",t[t.COL1ROW0=4]="COL1ROW0",t[t.COL1ROW1=5]="COL1ROW1",t[t.COL1ROW2=6]="COL1ROW2",t[t.COL1ROW3=7]="COL1ROW3",t[t.COL2ROW0=8]="COL2ROW0",t[t.COL2ROW1=9]="COL2ROW1",t[t.COL2ROW2=10]="COL2ROW2",t[t.COL2ROW3=11]="COL2ROW3",t[t.COL3ROW0=12]="COL3ROW0",t[t.COL3ROW1=13]="COL3ROW1",t[t.COL3ROW2=14]="COL3ROW2",t[t.COL3ROW3=15]="COL3ROW3"}(r||(r={}));const h=45*Math.PI/180,A=1,f=.1,d=500,p=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);class g extends i.A{static get IDENTITY(){return y||(y=new g,Object.freeze(y)),y}static get ZERO(){return m||(m=new g([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(m)),m}get ELEMENTS(){return 16}get RANK(){return 4}get INDICES(){return r}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5
2]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,n,r,i,o,s,a,u,l,c,h,A,f,d,p){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this[4]=i,this[5]=o,this[6]=s,this[7]=a,this[8]=u,this[9]=l,this[10]=c,this[11]=h,this[12]=A,this[13]=f,this[14]=d,this[15]=p,this.check()}setRowMajor(t,e,n,r,i,o,s,a,u,l,c,h,A,f,d,p){return this[0]=t,this[1]=i,this[2]=u,this[3]=A,this[4]=e,this[5]=o,this[6]=l,this[7]=f,this[8]=n,this[9]=s,this[10]=c,this[11]=d,this[12]=r,this[13]=a,this[14]=h,this[15]=p,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(p)}fromObject(t){return this.check()}fromQuaternion(t){return a.I0(this,t),this.check()}frustum(t){const{left:e,right:n,bottom:r,top:i,near:o=f,far:s=d}=t;return s===1/0?function(t,e,n,r,i,o){const s=2*o/(n-e),a=2*o/(i-r),u=(n+e)/(n-e),l=(i+r)/(i-r),c=-2*o;t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=u,t[9]=l,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=c,t[15]=0}(this,e,n,r,i,o):a.$h(this,e,n,r,i,o,s),this.check()}lookAt(t){const{eye:e,center:n=[0,0,0],up:r=[0,1,0]}=t;return a.t5(this,e,n,r),this.check()}ortho(t){const{left:e,right:n,bottom:r,top:i,near:o=f,far:s=d}=t;return a.v3(this,e,n,r,i,o,s),this.check()}orthographic(t){const{fovy:e=h,aspect:n=A,focalDistance:r=1,near:i=f,far:o=d}=t;v(e);const s=e/2,a=r*Math.tan(s),u=a*n;return this.ortho({left:-u,right:u,bottom:-a,top:a,near:i,far:o})}perspective(t){const{fovy:e=45*Math.PI/180,aspect:n=1,near:r=.1,far:i=500}=t;return v(e),a.fN(this,e,n,r,i),this.check()}determinant(){return a.a4(this)}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),r=1/n[0],i=1/n[1],o=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=0,t[4]=this[4]*r,t[5]=this[5]*i,t[6]=this[6]*o,t[7]=0,t[8]=this[8]*r,t[9]=this[9]*i,t[10]=this[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),r=1/n[0],i=1/n[1],o=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=this[4]*r,t[4]=this[5]*i,t[5]=this[6]*o,t[6]=this[8]*r,t[7]=this[9]*i,t[8]=this[10]*o,t}transpose(){return a.mg(this,this),this.check()}invert(){return a.B8(this,this),this.check()}multiplyLeft(t){return a.lw(this,t,this),this.check()}multiplyRight(t){return a.lw(this,this,t),this.check()}rotateX(t){return a.eL(this,this,t),this.check()}rotateY(t){return a.Z8(this,this,t),this.check()}rotateZ(t){return a.Qr(this,this,t),this.check()}rotateXYZ(t){return this.rotateX(t[0]).rotateY(t[1]).rotateZ(t[2])}rotateAxis(t,e){return a.e$(this,this,t,e),this.check()}scale(t){return a.hs(this,this,Array.isArray(t)?t:[t,t,t]),this.check()}translate(t){return a.Tl(this,this,t),this.check()}transform(t,e){return 4===t.length?(e=c.Z0(e||[-0,-0,-0,-0],t,this),(0,o.qk)(e,4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:n}=t;let r;switch(n){case 2:r=u.Z0(e||[-0,-0],t,this);break;case 3:r=l.Z0(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,o.qk)(r,t.length),r}transformAsVector(t,e){let n;switch(t.length){case 2:n=(0,s.B$)(e||[-0,-0],t,this);break;case 3:n=(0,s.cL)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,o.qk)(n,t.length),n}transformPoint(t,e){return this.transformAsPoint(t,e)}transformVector(t,e){return this.transformAsPoint(t,e)}transformDirection(t,e){return this.transformAsVector(t,e)}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,n){return this.identity().translate([t,e,n])}}let m,y;function v(t){if(t>2*Math.PI)throw Error("expected radians")}},10380:(t,e,n)=>{"use strict";function r(t,e,n,o,s,a){if(s-o<=n)return;const u=o+s>>1;i(t,e,u,o,s,a%2),r(t,e,n,o,u-1,a+1),r(t,e,n,u+1,s,a+1)}function i(t,e,n,r,s,a){for(;s>r;){if(s-r>600){const o=s-r+1,u=n-r+1,l=Math.log(o),c=.5*Math.exp(2*l/3),h=.5*Math.sqrt(l*c*(o-c)/o)*(u-o/2<0?-1:1);i(t,e,n,Math.max(r,Math.floor(n-u*c/o+h)),Math.min(s,Math.floor(n+(o-u)*c/o+h)),a)}const u=e[2*n+a];let l=r,c=s;for(o(t,e,r,n),e[2*s+a]>u&&o(t,e,r,s);l<c;){for(o(t,e,l,c),l++,c--;e[2*l+a]<u;)l++;for(;e[2*c+a]>u;)c--}e[2*r+a]===u?o(t,e,r,c):(c++,o(t,e,c,s)),c<=n&&(r=c+1),n<=c&&(s=c-1)}}function o(t,e,n,r){s(t,n,r),s(e,2*n,2*r),s(e,2*n+1,2*r+1)}function s(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function a(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}n.d(e,{A:()=>d});const u=t=>t[0],l=t=>t[1];class c{constructor(t,e=u,n=l,i=64,o=Float64Array){this.nodeSize=i,this.points=t;const s=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new s(t.length),c=this.coords=new o(2*t.length);for(let r=0;r<t.length;r++)a[r]=r,c[2*r]=e(t[r]),c[2*r+1]=n(t[r]);r(a,c,i,0,a.length-1,0)}range(t,e,n,r){return function(t,e,n,r,i,o,s){const a=[0,t.length-1,0],u=[];let l,c;for(;a.length;){const h=a.pop(),A=a.pop(),f=a.pop();if(A-f<=s){for(let s=f;s<=A;s++)l=e[2*s],c=e[2*s+1],l>=n&&l<=i&&c>=r&&c<=o&&u.push(t[s]);continue}const d=Math.floor((f+A)/2);l=e[2*d],c=e[2*d+1],l>=n&&l<=i&&c>=r&&c<=o&&u.push(t[d]);const p=(h+1)%2;(0===h?n<=l:r<=c)&&(a.push(f),a.push(d-1),a.push(p)),(0===h?i>=l:o>=c)&&(a.push(d+1),a.push(A),a.push(p))}return u}(this.ids,this.coords,t,e,n,r,this.nodeSize)}within(t,e,n){return function(t,e,n,r,i,o){const s=[0,t.length-1,0],u=[],l=i*i;for(;s.length;){const c=s.pop(),h=s.pop(),A=s.pop();if(h-A<=o){for(let i=A;i<=h;i++)a(e[2*i],e[2*i+1],n,r)<=l&&u.push(t[i]);continue}const f=Math.floor((A+h)/2),d=e[2*f],p=e[2*f+1];a(d,p,n,r)<=l&&u.push(t[f]);const g=(c+1)%2;(0===c?n-i<=d:r-i<=p)&&(s.push(A),s.push(f-1),s.push(g)),(0===c?n+i>=d:r+i>=p)&&(s.push(f+1),s.push(h),s.push(g))}return u}(this.ids,this.coords,t,e,n,this.nodeSize)}}const h={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},A=Math.fround||(f=new Float32Array(1),t=>(f[0]=+t,f[0]));var f;class d{constructor(t){this.options=w(Object.create(h),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:e,minZoom:n,maxZoom:r,nodeSize:i}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;let s=[];for(let e=0;e<t.length;e++)t[e].geometry&&s.push(g(t[e],e));this.trees[r+1]=new c(s,E,x,i,Float32Array),e&&console.timeEnd(o);for(let t=r;t>=n;t--){const n=+Date.now();s=this._cluster(s,t),this.trees[t]=new c(s,E,x,i,Float32Array),e&&console.log("z%d: %d clusters in %dms",t,s.length,+Date.now()-n)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let n=((t[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[1]));let i=180===t[2]?180:((t[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){const t=this.getClusters([n,r,180,o],e),s=this.getClusters([-180,r,i,o],e);return t.concat(s)}const s=this.trees[this._limitZoom(e)],a=s.range(v(n),_(o),v(i),_(r)),u=[];for(const t of a){const e=s.points[t];u.push(e.numPoints?m(e):this.points[e.index])}return u}getChildren(t){const e=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);const o=i.points[e];if(!o)throw new Error(r);const s=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=i.within(o.x,o.y,s),u=[];for(const e of a){const n=i.points[e];n.parentId===t&&u.push(n.numPoints?m(n):this.points[n.index])}if(0===u.length)throw new Error(r);return u}getLeaves(t,e,n){e=e||10,n=n||0;const r=[];return this._appendLeaves(r,t,e,n,0),r}getTile(t,e,n){const r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:o,radius:s}=this.options,a=s/o,u=(n-a)/i,l=(n+1+a)/i,c={features:[]};return this._addTileFeatures(r.range((e-a)/i,u,(e+1+a)/i,l),r.points,e,n,i,c),0===e&&this._addTileFeatures(r.range(1-a/i,u,1,l),r.points,i,n,i,c),e===i-1&&this._addTileFeatures(r.range(0,u,a/i,l),r.points,-1,n,i,c),c.features.length?c:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e}_appendLeaves(t,e,n,r,i){const o=this.getChildren(e);for(const e of o){const o=e.properties;if(o&&o.cluster?i+o.point_count<=r?i+=o.point_count:i=this._appendLeaves(t,o.cluster_id,n,r,i):i<r?i++:t.push(e),t.length===n)break}return i}_addTileFeatures(t,e,n,r,i,o){for(const s of t){const t=e[s],a=t.numPoints;let u,l,c;if(a)u=y(t),l=t.x,c=t.y;else{const e=this.points[t.index];u=e.properties,l=v(e.geometry.coordinates[0]),c=_(e.geometry.coordinates[1])}const h={type:1,geometry:[[Math.round(this.options.extent*(l*i-n)),Math.round(this.options.extent*(c*i-r))]],tags:u};let A;a?A=t.id:this.options.generateId?A=t.index:this.points[t.index].id&&(A=this.points[t.index].id),void 0!==A&&(h.id=A),o.features.push(h)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const n=[],{radius:r,extent:i,reduce:o,minPoints:s}=this.options,a=r/(i*Math.pow(2,e));for(let r=0;r<t.length;r++){const i=t[r];
2if(i.zoom<=e)continue;i.zoom=e;const u=this.trees[e+1],l=u.within(i.x,i.y,a),c=i.numPoints||1;let h=c;for(const t of l){const n=u.points[t];n.zoom>e&&(h+=n.numPoints||1)}if(h>c&&h>=s){let t=i.x*c,s=i.y*c,a=o&&c>1?this._map(i,!0):null;const A=(r<<5)+(e+1)+this.points.length;for(const n of l){const r=u.points[n];if(r.zoom<=e)continue;r.zoom=e;const l=r.numPoints||1;t+=r.x*l,s+=r.y*l,r.parentId=A,o&&(a||(a=this._map(i,!0)),o(a,this._map(r)))}i.parentId=A,n.push(p(t/h,s/h,A,h,a))}else if(n.push(i),h>1)for(const t of l){const r=u.points[t];r.zoom<=e||(r.zoom=e,n.push(r))}}return n}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e){if(t.numPoints)return e?w({},t.properties):t.properties;const n=this.points[t.index].properties,r=this.options.map(n);return e&&r===n?w({},r):r}}function p(t,e,n,r,i){return{x:A(t),y:A(e),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function g(t,e){const[n,r]=t.geometry.coordinates;return{x:A(v(n)),y:A(_(r)),zoom:1/0,index:e,parentId:-1}}function m(t){return{type:"Feature",id:t.id,properties:y(t),geometry:{type:"Point",coordinates:[(e=t.x,360*(e-.5)),b(t.y)]}};var e}function y(t){const e=t.numPoints,n=e>=1e4?`${Math.round(e/1e3)}k`:e>=1e3?Math.round(e/100)/10+"k":e;return w(w({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function v(t){return t/360+.5}function _(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function b(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function w(t,e){for(const n in e)t[n]=e[n];return t}function E(t){return t.x}function x(t){return t.y}},10567:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawCircleByDiameterMode=void 0;var r=s(n(32132)),i=s(n(71123)),o=n(96146);function s(t){return t&&t.__esModule?t:{default:t}}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(A,t);var e,n,s,h=(s=A,function(){var t,e=l(s);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function A(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,A),h.apply(this,arguments)}return e=A,(n=[{key:"getTwoClickPolygon",value:function(t,e,n){var s=(n||{}).steps,a=void 0===s?64:s,u={steps:a};a<4&&(console.warn("Minimum steps to draw a circle is 4 "),u.steps=4);var l=(0,o.getIntermediatePosition)(t,e),c=Math.max((0,i.default)(t,l),.001),h=(0,r.default)(l,c,u);return h.properties=h.properties||{},h.properties.shape="Circle",h}}])&&u(e.prototype,n),A}(n(42166).TwoClickPolygonMode);e.DrawCircleByDiameterMode=h},10672:(t,e,n)=>{"use strict";n.d(e,{Pv:()=>u,Tf:()=>A,VN:()=>c,jc:()=>h,kZ:()=>r,l4:()=>s,mI:()=>o,rW:()=>l,xu:()=>a,zH:()=>i});const r={ADD:"add",MOVE:"move",DRAG:"drag",POINTER:"pointer",NONE:"none"},i={FEATURE:"Feature",POLYGON:"Polygon",LINE_STRING:"LineString",POINT:"Point",FEATURE_COLLECTION:"FeatureCollection",MULTI_PREFIX:"Multi",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon"},o={FEATURE:"feature",MIDPOINT:"midpoint",VERTEX:"vertex"},s={ACTIVE:"true",INACTIVE:"false"},a=-90,u=-85,l=90,c=85,h=-270,A=270},10707:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r={inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n // for picking depth values\n picking_setPickingAttribute(position.z / position.w);\n ","vs:DECKGL_FILTER_COLOR":"\n picking_setPickingColor(geometry.pickingColor);\n ","fs:#decl":"\nuniform bool picking_uAttribute;\n ","fs:DECKGL_FILTER_COLOR":{order:99,injection:"\n // use highlight color if this fragment belongs to the selected object.\n color = picking_filterHighlightColor(color);\n\n // use picking color if rendering to picking FBO.\n color = picking_filterPickingColor(color);\n "}},...n(27209).q}},10836:(t,e,n)=>{"use strict";n.d(e,{QN:()=>u,i:()=>l,jI:()=>a});var r=n(46429),i=n(44454),o=n(94939);const s=2;function a(t,e){return u(t,e)}function u(t,e){return(e=Array.isArray(e)?e:[e]).every(e=>c(t,e))}function l(t){t.luma=t.luma||{},t.luma.caps=t.luma.caps||{};for(const e in r.A)void 0===t.luma.caps[e]&&(t.luma.caps[e]=c(t,e));return t.luma.caps}function c(t,e){return t.luma=t.luma||{},t.luma.caps=t.luma.caps||{},void 0===t.luma.caps[e]&&(t.luma.caps[e]=function(t,e){const n=r.A[e];let s;(0,o.v)(n,e);const a=(0,i.C6)(t)&&n[1]||n[0];if("function"==typeof a)s=a(t);else if(Array.isArray(a)){s=!0;for(const e of a)s=s&&Boolean(t.getExtension(e))}else"string"==typeof a?s=Boolean(t.getExtension(a)):"boolean"==typeof a?s=a:(0,o.v)(!1);return s}(t,e)),t.luma.caps[e]||i.Rm.log(s,"Feature: ".concat(e," not supported"))(),t.luma.caps[e]}},11085:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var r=n(67069),i=n(2592);const o=new Uint16Array([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]),s=new Float32Array([-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1]),a=new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0]),u=new Float32Array([0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1]),l={POSITION:{size:3,value:new Float32Array(s)},NORMAL:{size:3,value:new Float32Array(a)},TEXCOORD_0:{size:2,value:new Float32Array(u)}};class c extends r.A{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=(0,i.Ld)("cube-geometry")}=t;super({...t,id:e,indices:{size:1,value:new Uint16Array(o)},attributes:{...l,...t.attributes}})}}},11129:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e,n){return(e=function(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{A:()=>i})},11482:(t,e,n)=>{"use strict";n.d(e,{A:()=>v});var r=n(24586),i=n(31938);const o="\nuniform DATAFILTER_TYPE filter_min;\nuniform DATAFILTER_TYPE filter_softMin;\nuniform DATAFILTER_TYPE filter_softMax;\nuniform DATAFILTER_TYPE filter_max;\nuniform bool filter_useSoftMargin;\nuniform bool filter_enabled;\nuniform bool filter_transformSize;\n\n#ifdef NON_INSTANCED_MODEL\n #define DATAFILTER_ATTRIB filterValues\n #define DATAFILTER_ATTRIB_64LOW filterValues64Low\n#else\n #define DATAFILTER_ATTRIB instanceFilterValues\n #define DATAFILTER_ATTRIB_64LOW instanceFilterValues64Low\n#endif\n\nattribute DATAFILTER_TYPE DATAFILTER_ATTRIB;\n#ifdef DATAFILTER_DOUBLE\n attribute DATAFILTER_TYPE DATAFILTER_ATTRIB_64LOW;\n\n uniform DATAFILTER_TYPE filter_min64High;\n uniform DATAFILTER_TYPE filter_max64High;\n#endif\n\nvarying float dataFilter_value;\n\nfloat dataFilter_reduceValue(float value) {\n return value;\n}\nfloat dataFilter_reduceValue(vec2 value) {\n return min(value.x, value.y);\n}\nfloat dataFilter_reduceValue(vec3 value) {\n return min(min(value.x, value.y), value.z);\n}\nfloat dataFilter_reduceValue(vec4 value) {\n return min(min(value.x, value.y), min(value.z, value.w));\n}\nvoid dataFilter_setValue(DATAFILTER_TYPE valueFromMin, DATAFILTER_TYPE valueFromMax) {\n if (filter_enabled) {\n if (filter_useSoftMargin) {\n dataFilter_value = dataFilter_reduceValue(\n smoothstep(filter_min, filter_softMin, valueFromMin) *\n (1.0 - smoothstep(filter_softMax, filter_max, valueFromMax))\n );\n } else {\n dataFilter_value = dataFilter_reduceValue(\n step(filter_min, valueFromMin) * step(valueFromMax, filter_max)\n );\n }\n } else {\n dataFilter_value = 1.0;\n }\n}\n",s="\nuniform bool filter_transformColor;\nvarying float dataFilter_value;\n";function a(t){if(!t||!("extensions"in t))return{};const{filterRange:e=[-1,1],filterEnabled:n=!0,filterTransformSize:r=!0,filterTransformColor:i=!0}=t,o=t.filterSoftRange||e;return{...Number.isFinite(e[0])?{filter_min:e[0],filter_softMin:o[0],filter_softMax:o[1],filter_max:e[1]}:{filter_min:e.map(t=>t[0]),filter_softMin:o.map(t=>t[0]),filter_softMax:o.map(t=>t[1]),filter_max:e.map(t=>t[1])},filter_enabled:n,filter_useSoftMargin:Boolean(t.filterSoftRange),filter_transformSize:n&&r,filter_transformColor:n&&i}}const u={"vs:#main-start":"\n #ifdef DATAFILTER_DOUBLE\n dataFilter_setValue(\n DATAFILTER_ATTRIB - filter_min64High + DATAFILTER_ATTRIB_64LOW,\n DATAFILTER_ATTRIB - filter_max64High + DATAFILTER_ATTRIB_64LOW\n );\n #else\n dataFilter_setValue(DATAFILTER_ATTRIB, DATAFILTER_ATTRIB);\n #endif\n ","vs:#main-end":"\n if (dataFilter_value == 0.0) {\n gl_Position = vec4(0.);\n }\n ","vs:DECKGL_FILTER_SIZE":"\n if (filter_transformSize) {\n size = size * dataFilter_value;\n }\n ","fs:DECKGL_FILTER_COLOR":"\n if (dataFilter_value == 0.0) discard;\n if (filter_transformColor) {\n color.a *= dataFilter_value;\n }\n "},l={name:"data-filter",vs:o,fs:s,inject:u,getUniforms:a},c={name:"data-filter-fp64",vs:o,fs:s,inject:u,getUniforms:function(t){if(!t||!("extensions"in t))return{};const e=a(t);if(Number.isFinite(e.filter_min)){const t=Math.fround(e.filter_min);e.filter_min-=t,e.filter_softMin-=t,e.filter_min64High=t;const n=Math.fround(e.filter_max);e.filter_max-=n,e.filter_softMax-=n,e.filter_max64High=n}else{const t=e.filter_min.map(Math.fround);e.filter_min=e.filter_min.map((e,n)=>e-t[n]),e.filter_softMin=e.filter_softMin.map((e,n)=>e-t[n]),e.filter_min64High=t;const n=e.filter_max.map(Math.fround);e.filter_max=e.filter_max.map((t,e)=>t-n[e]),e.filter_softMax=e.filter_softMax.map((t,e)=>t-n[e]),e.filter_max64High=n}return e}};var h=n(48091),A=n(79266),f=n(44454),d=n(25330);const p={blend:!0,blendFunc:[1,1,1,1],blendEquation:[32774,32774],depthTest:!1};var g=n(86849),m=n(23861);const y={1:"float",2:"vec2",3:"vec3",4:"vec4"};class v extends i.A{constructor({filterSize:t=1,fp64:e=!1,countItems:n=!1}={}){if(!y[t])throw new Error("filterSize out of range");super({filterSize:t,fp64:e,countItems:n})}getShaders(t){const{filterSize:e,fp64:n}=t.opts;return{modules:[n?c:l],defines:{DATAFILTER_TYPE:y[e],DATAFILTER_DOUBLE:Boolean(n)}}}initializeState(t,e){const n=this.getAttributeManager();n&&n.add({filterValues:{size:e.opts.filterSize,type:e.opts.fp64?5130:5126,accessor:"getFilterValue",shaderAttributes:{filterValues:{divisor:0},instanceFilterValues:{divisor:1}}}});const{gl:r}=this.context;if(n&&e.opts.countItems){const t=function(t){return Boolean(t.getExtension("EXT_float_blend")&&(t.getExtension("EXT_color_buffer_float")||t.getExtension("WEBGL_color_buffer_float")))}(r);n.add({filterIndices:{size:t?1:2,vertexOffset:1,type:5121,normalized:!0,accessor:(e,{index:n})=>{const r=e&&e.__source?e.__source.index:n;return t?(r+1)%255:[(r+1)%255,Math.floor(r/255)%255]},shaderAttributes:{filterPrevIndices:{vertexOffset:0},filterIndices:{vertexOffset:1}}}});const i=function(t,e){return e?new h.A(t,{width:1,height:1,attachments:{36064:new A.A(t,{format:(0,f.C6)(t)?34836:6408,type:5126,mipmaps:!1})}}):new h.A(t,{width:256,height:64,depth:!1}
2)}(r,t),o=function(t,e,n){return e.defines.NON_INSTANCED_MODEL=1,n&&(e.defines.FLOAT_TARGET=1),new d.A(t,{id:"data-filter-aggregation-model",vertexCount:1,isInstanced:!1,drawMode:0,vs:"#define SHADER_NAME data-filter-vertex-shader\n\n#ifdef FLOAT_TARGET\n attribute float filterIndices;\n attribute float filterPrevIndices;\n#else\n attribute vec2 filterIndices;\n attribute vec2 filterPrevIndices;\n#endif\n\nvarying vec4 vColor;\nconst float component = 1.0 / 255.0;\n\nvoid main() {\n #ifdef FLOAT_TARGET\n dataFilter_value *= float(filterIndices != filterPrevIndices);\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n vColor = vec4(0.0, 0.0, 0.0, 1.0);\n #else\n // Float texture is not supported: pack result into 4 channels x 256 px x 64px\n dataFilter_value *= float(filterIndices.x != filterPrevIndices.x);\n float col = filterIndices.x;\n float row = filterIndices.y * 4.0;\n float channel = floor(row);\n row = fract(row);\n vColor = component * vec4(bvec4(channel == 0.0, channel == 1.0, channel == 2.0, channel == 3.0));\n gl_Position = vec4(col * 2.0 - 1.0, row * 2.0 - 1.0, 0.0, 1.0);\n #endif\n gl_PointSize = 1.0;\n}\n",fs:"#define SHADER_NAME data-filter-fragment-shader\nprecision highp float;\n\nvarying vec4 vColor;\n\nvoid main() {\n if (dataFilter_value < 0.5) {\n discard;\n }\n gl_FragColor = vColor;\n}\n",...e})}(r,e.getShaders.call(this,e),t);this.setState({filterFBO:i,filterModel:o})}}updateState({props:t,oldProps:e}){if(this.state.filterModel){const n=this.getAttributeManager().attributes.filterValues.needsUpdate()||t.filterEnabled!==e.filterEnabled||t.filterRange!==e.filterRange||t.filterSoftRange!==e.filterSoftRange;n&&this.setState({filterNeedsUpdate:n})}}draw(t,e){const{filterFBO:n,filterModel:r,filterNeedsUpdate:i}=this.state,{onFilteredItemsChange:o}=this.props;if(i&&o&&r){const{attributes:{filterValues:e,filterIndices:i}}=this.getAttributeManager();r.setVertexCount(this.getNumInstances());const{gl:s}=this.context;(0,g.I)(s,{framebuffer:n,color:[0,0,0,0]}),r.updateModuleSettings(t.moduleParameters).setAttributes({...e.getShaderAttributes(),...i&&i.getShaderAttributes()}).draw({framebuffer:n,parameters:{...p,viewport:[0,0,n.width,n.height]}});const a=(0,m.sy)(n);let u=0;for(let t=0;t<a.length;t++)u+=a[t];
2o({id:this.id,count:u}),this.state.filterNeedsUpdate=!1}}finalizeState(){const{filterFBO:t,filterModel:e}=this.state;t&&(t.color.delete(),t.delete(),e.delete())}}(0,r.A)(v,"defaultProps",{getFilterValue:{type:"accessor",value:0},onFilteredItemsChange:{type:"function",value:null,optional:!0},filterEnabled:!0,filterRange:[-1,1],filterSoftRange:null,filterTransformSize:!0,filterTransformColor:!0}),(0,r.A)(v,"extensionName","DataFilterExtension")},11866:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(90317),i=n(82314);function o(t,e,n,o={}){const s=i.getCoord.call(void 0,t),a=r.degreesToRadians.call(void 0,s[0]),u=r.degreesToRadians.call(void 0,s[1]),l=r.degreesToRadians.call(void 0,n),c=r.lengthToRadians.call(void 0,e,o.units),h=Math.asin(Math.sin(u)*Math.cos(c)+Math.cos(u)*Math.sin(c)*Math.cos(l)),A=a+Math.atan2(Math.sin(l)*Math.sin(c)*Math.cos(u),Math.cos(c)-Math.sin(u)*Math.sin(h)),f=r.radiansToDegrees.call(void 0,A),d=r.radiansToDegrees.call(void 0,h);return void 0!==s[2]?r.point.call(void 0,[f,d,s[2]],o.properties):r.point.call(void 0,[f,d],o.properties)}var s=o;e.default=s,e.destination=o},12187:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},12703:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(39906),i=n(78345),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(55808));function s(t,e={}){const n=[];if(i.geomEach.call(void 0,t,t=>{n.push(t.coordinates)}
2),n.length<2)throw new Error("Must specify at least 2 geometries");const s=o.intersection(n[0],...n.slice(1));return 0===s.length?null:1===s.length?r.polygon.call(void 0,s[0],e.properties):r.multiPolygon.call(void 0,s,e.properties)}var a=s;e.default=a,e.intersect=s},12848:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.defineProperty,i=Object.defineProperties,o=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,l=(t,e,n)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,c=(t,e)=>{for(var n in e||(e={}))a.call(e,n)&&l(t,n,e[n]);if(s)for(var n of s(e))u.call(e,n)&&l(t,n,e[n]);return t},h=(t,e)=>i(t,o(e)),A=n(49167),f=n(78345),d=n(45303),p=n(82314);function g(t,e,n={}){if(!t||!e)throw new Error("lines and inputPoint are required arguments");const r=p.getCoord.call(void 0,e);let i=d.point.call(void 0,[1/0,1/0],{lineStringIndex:-1,segmentIndex:-1,totalDistance:-1,lineDistance:-1,segmentDistance:-1,pointDistance:1/0,multiFeatureIndex:-1,index:-1,location:-1,dist:1/0}),o=0,s=0,a=-1;return f.flattenEach.call(void 0,t,function(t,u,l){a!==l&&(a=l,s=0);const f=p.getCoords.call(void 0,t);for(let t=0;t<f.length-1;t++){const a=d.point.call(void 0,f[t]),u=p.getCoord.call(void 0,a),g=d.point.call(void 0,f[t+1]),m=p.getCoord.call(void 0,g),y=A.distance.call(void 0,a,g,n);let v,_;m[0]===r[0]&&m[1]===r[1]?[v,_]=[m,!0]:u[0]===r[0]&&u[1]===r[1]?[v,_]=[u,!1]:[v,_]=w(u,m,r);const b=A.distance.call(void 0,e,v,n);if(b<i.properties.pointDistance){const e=A.distance.call(void 0,a,v,n);i=d.point.call(void 0,v,{lineStringIndex:l,segmentIndex:_?t+1:t,totalDistance:o+e,lineDistance:s+e,segmentDistance:e,pointDistance:b,multiFeatureIndex:-1,index:-1,location:-1,dist:1/0}),i.properties=h(c({},i.properties),{multiFeatureIndex:i.properties.lineStringIndex,index:i.properties.segmentIndex,location:i.properties.totalDistance,dist:i.properties.pointDistance})}o+=y,s+=y}}),i}function m(t,e){const[n,r,i]=t,[o,s,a]=e;return n*o+r*s+i*a}function y(t,e){const[n,r,i]=t,[o,s,a]=e;return[r*a-i*s,i*o-n*a,n*s-r*o]}function v(t){const e=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2))}(t);return[t[0]/e,t[1]/e,t[2]/e]}function _(t){const e=d.degreesToRadians.call(void 0,t[1]),n=d.degreesToRadians.call(void 0,t[0]);return[Math.cos(e)*Math.cos(n),Math.cos(e)*Math.sin(n),Math.sin(e)]}function b(t){const[e,n,r]=t,i=Math.min(Math.max(r,-1),1),o=d.radiansToDegrees.call(void 0,Math.asin(i));return[d.radiansToDegrees.call(void 0,Math.atan2(n,e)),o]}function w(t,e,n){const r=_(t),i=_(e),o=_(n),s=y(r,i);if(0===s[0]&&0===s[1]&&0===s[2])return m(r,i)>0?[[...e],!0]:[[...n],!1];const a=y(s,o);if(0===a[0]&&0===a[1]&&0===a[2])return[[...e],!0];const u=v(y(a,s)),l=[-u[0],-u[1],-u[2]],c=m(o,u)>m(o,l)?u:l,h=v(s),A=m(y(r,c),h),f=m(y(c,i),h);return A>=0&&f>=0?[b(c),!1]:m(r,o)>m(i,o)?[[...t],!1]:[[...e],!0]}var E=g;e.default=E,e.nearestPointOnLine=g},12899:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(82314),i=n(78475);function o(t,e,n={}){var o=r.getCoord.call(void 0,t),s=r.getCoord.call(void 0,e),a=i.degreesToRadians.call(void 0,s[1]-o[1]),u=i.degreesToRadians.call(void 0,s[0]-o[0]),l=i.degreesToRadians.call(void 0,o[1]),c=i.degreesToRadians.call(void 0,s[1]),h=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(l)*Math.cos(c);return i.radiansToLength.call(void 0,2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),n.units)}var s=o;e.default=s,e.distance=o},13419:(t,e,n)=>{"use strict";n.d(e,{A:()=>h});var r=n(24586),i=n(99608),o=n(27371),s=n(10707),a=n(93314),u=n(25330),l=n(67069);const c={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPixels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,padding:{type:"array",value:[0,0,0,0]},getPosition:{type:"accessor",value:t=>t.position},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]},getBoundingRect:{type:"accessor",value:[0,0,0,0]},getFillColor:{type:"accessor",value:[0,0,0,255]},getLineColor:{type:"accessor",value:[0,0,0,255]},getLineWidth:{type:"accessor",value:1}};class h extends i.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME text-background-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute vec4 instanceRects;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec2 instancePixelOffsets;\nattribute float instanceLineWidths;
2\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\nuniform bool billboard;\nuniform float opacity;\nuniform float sizeScale;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform vec4 padding;\nuniform int sizeUnits;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying float vLineWidth;\nvarying vec2 uv;\nvarying vec2 dimensions;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n float angle_radian = radians(angle);\n float cos_angle = cos(angle_radian);\n float sin_angle = sin(angle_radian);\n mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.uv = positions;\n geometry.pickingColor = instancePickingColors;\n uv = positions;\n vLineWidth = instanceLineWidths;\n float sizePixels = clamp(\n project_size_to_pixel(instanceSizes * sizeScale, sizeUnits),\n sizeMinPixels, sizeMaxPixels\n );\n\n dimensions = instanceRects.zw * sizePixels + padding.xy + padding.zw;\n\n vec2 pixelOffset = (positions * instanceRects.zw + instanceRects.xy) * sizePixels + mix(-padding.xy, padding.zw, positions);\n pixelOffset = rotate_by_angle(pixelOffset, instanceAngles);\n pixelOffset += instancePixelOffsets;\n pixelOffset.y *= -1.0;\n\n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vec3 offset = vec3(pixelOffset, 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n } else {\n vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);\n DECKGL_FILTER_SIZE(offset_common, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * opacity);\n DECKGL_FILTER_COLOR(vFillColor, geometry);\n vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * opacity);\n DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n",fs:"#define SHADER_NAME text-background-layer-fragment-shader\n\nprecision highp float;\n\nuniform bool stroked;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying float vLineWidth;\nvarying vec2 uv;\nvarying vec2 dimensions;\n\nvoid main(void) {\n geometry.uv = uv;\n\n vec2 pixelPosition = uv * dimensions;\n if (stroked) {\n float distToEdge = min(\n min(pixelPosition.x, dimensions.x - pixelPosition.x),\n min(pixelPosition.y, dimensions.y - pixelPosition.y)\n );\n float isBorder = smoothedge(distToEdge, vLineWidth);\n gl_FragColor = mix(vFillColor, vLineColor, isBorder);\n } else {\n gl_FragColor = vFillColor;\n }\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.A,s.A]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceSizes:{size:1,transition:!0,accessor:"getSize",defaultValue:1},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instanceRects:{size:4,accessor:"getBoundingRect"},instancePixelOffsets:{size:2,transition:!0,accessor:"getPixelOffset"},instanceFillColors:{size:4,transition:!0,normalized:!0,type:5121,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:4,transition:!0,normalized:!0,type:5121,accessor:"getLineColor",defaultValue:[0,0,0,255]},instanceLineWidths:{size:1,transition:!0,accessor:"getLineWidth",defaultValue:1}})}updateState(t){super.updateState(t);const{changeFlags:e}=t;if(e.extensionsChanged){var n;const{gl:t}=this.context;null===(n=this.state.model)||void 0===n||n.delete(),this.state.model=this._getModel(t),this.getAttributeManager().invalidateAll()}}draw({uniforms:t}){const{billboard:e,sizeScale:n,sizeUnits:r,sizeMinPixels:i,sizeMaxPixels:o,getLineWidth:s}=this.props;let{padding:u}=this.props;u.length<4&&(u=[u[0],u[1],u[0],u[1]]),this.state.model.setUniforms(t).setUniforms({b
2illboard:e,stroked:Boolean(s),padding:u,sizeUnits:a.p5[r],sizeScale:n,sizeMinPixels:i,sizeMaxPixels:o}).draw()}_getModel(t){return new u.A(t,{...this.getShaders(),id:this.props.id,geometry:new l.A({drawMode:6,vertexCount:4,attributes:{positions:{size:2,value:new Float32Array([0,0,1,0,1,1,0,1])}}}),isInstanced:!0})}}(0,r.A)(h,"defaultProps",c),(0,r.A)(h,"layerName","TextBackgroundLayer")},14012:t=>{"use strict";t.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},14030:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureAreaMode=void 0;var r=s(n(33533)),i=s(n(7784)),o=n(61607);function s(t){return t&&t.__esModule?t:{default:t}}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=A(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},h(t,e,n||t)}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var d=[],p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(p,t);var e,n,o,s=(o=p,function(){var t,e=A(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=A(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function p(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),s.apply(this,arguments)}return e=p,n=[{key:"handleClick",value:function(t,e){var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e,{onEdit:function(){}});h(A(p.prototype),"handleClick",this).call(this,t,n)}},{key:"getTooltips",value:function(t){var e=this.getTentativeGuide(t);if(e&&"Polygon"===e.geometry.type){var n,o=t.modeConfig||{},s=o.formatTooltip,a=o.measurementCallback,u=(0,i.default)(e),l=(0,r.default)(e);return n=s?s(l):"".concat(parseFloat(l).toFixed(2)," ").concat("sq. m"),a&&a(l),[{position:u.geometry.coordinates,text:n}]}return d}}],n&&c(e.prototype,n),p}(o.DrawPolygonMode);e.MeasureAreaMode=p},14061:(t,e,n)=>{"use strict";n.d(e,{dJ:()=>a});var r=n(44454),i=n(52421),o=n(90669);const s="8.5.21",a=new class{constructor(){this.stats=new Map}get(t){return this.stats.has(t)||this.stats.set(t,new i.A({id:t})),this.stats.get(t)}};if(globalThis.luma&&globalThis.luma.VERSION!==s)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat(s));globalThis.luma||((0,o.A)()&&r.Rm.log(1,"luma.gl ".concat(s," - ").concat("set luma.log.level=1 (or higher) to trace rendering"))(),globalThis.luma=globalThis.luma||{VERSION:s,version:s,log:r.Rm,stats:a,globals:{modules:{},nodeIO:{}}}),globalThis.luma},14166:(t,e,n)=>{"use strict";n.r(e),n.d(e,{GeohashLayer:()=>Zo,GreatCircleLayer:()=>V,H3ClusterLayer:()=>Ve,H3HexagonLayer:()=>ze,MVTLayer:()=>qo,QuadkeyLayer:()=>it,S2Layer:()=>rt,TerrainLayer:()=>wo,Tile3DLayer:()=>mo,TileLayer:()=>Le,TripsLayer:()=>Be.A,_GeoCellLayer:()=>W,_Tile2DHeader:()=>At,_Tileset2D:()=>Me,_WMSLayer:()=>G,_getURLFromTemplate:()=>pe});var r=n(24586),i=n(5424),o=n(22398),s=n(93314),a=n(87693);class u{constructor(t){(0,r.A)(this,"fetch",void 0),(0,r.A)(this,"loadOptions",void 0),(0,r.A)(this,"_needsRefresh",!0),(0,r.A)(this,"props",void 0),this.props={...t},this.loadOptions={...t.loadOptions},this.fetch=function(t){const e=null==t?void 0:t.fetch;if(e&&"function"==typeof e)return(t,n)=>e(t,n);const n=null==t?void 0:t.fetch;return n&&"function"!=typeof n?t=>
2fetch(t,n):t=>fetch(t)}(this.loadOptions)}setProps(t){this.props=Object.assign(this.props,t),this.setNeedsRefresh()}setNeedsRefresh(){this._needsRefresh=!0}getNeedsRefresh(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=this._needsRefresh;return t&&(this._needsRefresh=!1),e}}class l extends u{}var c=n(1050);class h extends l{constructor(t){super(t)}async getMetadata(){throw new Error("ImageSource.getMetadata not implemented")}async getImage(t){const e=this.getGranularParameters(t),n=this.getURLFromTemplate(e),r=await this.fetch(n),i=await r.arrayBuffer();return await c.$.parse(i)}getGranularParameters(t){const[e,n,r,i]=t.bbox;return{...t,east:e,north:n,south:i,west:r}}getURLFromTemplate(t){let e=this.props.url;for(const[n,r]of Object.entries(t))e=e.replace("${".concat(n,"}"),String(r)),e=e.replace("{".concat(n,"}"),String(r));return e}}(0,r.A)(h,"type","template"),(0,r.A)(h,"testURL",t=>t.toLowerCase().includes("{"));var A=n(36482);function f(t){return"string"==typeof t?t.charAt(0).toLowerCase()+t.slice(1):t}function d(t){if(Array.isArray(t))return t.map(t=>d(t));if(t&&"object"==typeof t){const e={};for(const[n,r]of Object.entries(t))e[f(n)]=d(r);return e}return t}const p={name:"XML",id:"xml",module:"xml",version:"3.4.15",worker:!1,extensions:["xml"],mimeTypes:["application/xml","text/xml"],testText:function(t){return t.startsWith("<?xml")},options:{xml:{parser:"fast-xml-parser",uncapitalizeKeys:!1,removeNSPrefix:!1,textNodeName:"value",arrayPaths:[]}},parse:async(t,e)=>g((new TextDecoder).decode(t),e),parseTextSync:(t,e)=>g(t,e)};function g(t,e){var n;const r={...p.options.xml,...null==e?void 0:e.xml};if("fast-xml-parser"===r.parser){const n={allowBooleanAttributes:!0,ignoreDeclaration:!0,removeNSPrefix:r.removeNSPrefix,textNodeName:r.textNodeName,isArray:(t,e,n,i)=>{var o;const s=Boolean(null==r||null===(o=r.arrayPaths)||void 0===o?void 0:o.some(t=>e===t));return s},...null==e?void 0:e._fastXML},i=function(t,e){return new A.XMLParser({ignoreAttributes:!1,attributeNamePrefix:"",...e}).parse(t)}(t,n);return r.uncapitalizeKeys?d(i):i}throw new Error(null==e||null===(n=e.xml)||void 0===n?void 0:n.parser)}function m(t){return Array.isArray(t)?t:t?[t]:[]}function y(t){const e=m(t);return e.length>0&&e.every(t=>"string"==typeof t)?e:[]}function v(t){switch(typeof t){case"number":return t;case"string":return parseFloat(t);default:return}}function _(t){switch(typeof t){case"number":return t;case"string":return parseInt(t,10);default:return}}function b(t){switch(t){case"true":case"1":return!0;default:return!1}}function w(t,e){const n=p.parseTextSync(t,e),r=n.WMT_MS_Capabilities||n.WMS_Capabilities||n,i=function(t){var e,n,r,i,o,s,a,u,l,c,h,A,f,d,p,g;const v={version:String(t.version||""),name:String((null===(e=t.Service)||void 0===e?void 0:e.Name)||"unnamed"),title:null!==(n=t.Service)&&void 0!==n&&n.Title?String(null===(r=t.Service)||void 0===r?void 0:r.Title):void 0,abstract:null!==(i=t.Service)&&void 0!==i&&i.Abstract?String(null===(o=t.Service)||void 0===o?void 0:o.Abstract):void 0,keywords:y(null===(s=t.Service)||void 0===s||null===(a=s.KeywordList)||void 0===a?void 0:a.Keyword),fees:null!==(u=t.Service)&&void 0!==u&&u.Fees?JSON.stringify(null===(l=t.Service)||void 0===l?void 0:l.Fees):void 0,accessConstraints:null!==(c=t.Service)&&void 0!==c&&c.AccessConstraints?JSON.stringify(null===(h=t.Service)||void 0===h?void 0:h.AccessConstraints):void 0,layerLimit:_(null===(A=t.Service)||void 0===A?void 0:A.LayerLimit),maxWidth:_(null===(f=t.Service)||void 0===f?void 0:f.maxWidth),maxHeight:_(null===(d=t.Service)||void 0===d?void 0:d.maxHeight),layers:[],requests:E(null===(p=t.Capability)||void 0===p?void 0:p.Request),exceptions:x(t.Exception)},b=m(null===(g=t.Capability)||void 0===g?void 0:g.Layer);for(const t of b)v.layers.push(S(t));for(const[t,e]of Object.entries(v))void 0===e&&delete v[t];return v}(r);if(null!=e&&e.inheritedLayerProps)for(const t of i.layers)T(t,null);return(null!=e&&e.includeRawData||null!=e&&e.raw)&&(i.raw=r),null!=e&&e.includeXMLText&&(i.xml=t),i}function E(t){const e={};for(const[n,r]of Object.entries(t||{})){const t=y(null==r?void 0:r.Format);e[n]={mimeTypes:t}}return e}function x(t){if(m(null==t?void 0:t.Format).length>0)return{mimeTypes:y(t)}}function S(t){var e;const n={title:String((null==t?void 0:t.Title)||""),name:(null==t?void 0:t.Name)&&String(null==t?void 0:t.Name),abstract:(null==t?void 0:t.Name)&&String(null==t?void 0:t.Abstract),keywords:y(null===(e=t.KeywordList)||void 0===e?void 0:e.Keyword)},r=(null==t?void 0:t.CRS)||(null==t?void 0:t.SRS);r&&Array.isArray(r)&&r.every(t=>"string"==typeof t)&&(n.crs=r);let i=(null==t?void 0:t.EX_GeographicBoundingBox)&&function(t){const{westBoundLongitude:e,northBoundLatitude:n,eastBoundLongitude:r,southBoundLatitude:i}=t;return[[e,i],[r,n]]}(null==t?void 0:t.EX_GeographicBoundingBox);i&&(n.geographicBoundingBox=i),i=(null==t?void 0:t.LatLonBoundingBox)&&function(t){const{minx:e,miny:n,maxx:r,maxy:i}=t;return[[e,n],[r,i]]}(null==t?void 0:t.LatLonBoundingBox),i&&(n.geographicBoundingBox=i);const o=(null==t?void 0:t.BoundingBox)&&m(null==t?void 0:t.BoundingBox).map(t=>function(t){const{CRS:e,SRS:n,minx:r,miny:i,maxx:o,maxy:s,resx:a,resy:u}=t,l={crs:e||n,boundingBox:[[v(r),v(i)],[v(o),v(s)]]};return a&&(l.xResolution=a),u&&(l.yResolution=u),l}(t));o&&o.length>0&&(n.boundingBoxes=o);const s=m(null==t?void 0:t.Dimension).map(t=>function(t){const{name:e,units:n,value:r}=t,i={name:e,units:n,extent:r};return t.unitSymbol&&(i.unitSymbol=t.unitSymbol),t.default&&(i.defaultValue=t.default),t.multipleValues&&(i.multipleValues=b(t.multipleValues)),t.nearestValue&&(i.nearestValue=b(t.nearestValue)),t.current&&(i.current=b(t.current)),i}(t));s.length&&(n.dimensions=s),null!=t&&t.opaque&&(n.opaque=b(null==t?void 0:t.opaque)),null!=t&&t.cascaded&&(n.cascaded=b(null==t?void 0:t.cascaded)),null!=t&&t.queryable&&(n.queryable=b(null==t?void 0:t.queryable));const a=m(null==t?void 0:t.Layer),u=[];for(const t of a)u.push(S(t));u.length>0&&(n.layers=u);for(const[t,e]of Object.entries(n))void 0===e&&delete n[t];return n}function T(t,e){null!=e&&e.geographicBoundingBox&&!t.geographicBoundingBox&&
2(t.geographicBoundingBox=[...e.geographicBoundingBox]),null!=e&&e.crs&&!t.crs&&(t.crs=[...e.crs]),null!=e&&e.boundingBoxes&&!t.boundingBoxes&&(t.boundingBoxes=[...e.boundingBoxes]),null!=e&&e.dimensions&&!t.dimensions&&(t.dimensions=[...e.dimensions]);for(const e of t.layers||[])T(e,t)}const P={id:"wms-capabilities",name:"WMS Capabilities",module:"wms",version:"3.4.15",worker:!1,extensions:["xml"],mimeTypes:["application/vnd.ogc.wms_xml","application/xml","text/xml"],testText:function(t){return t.startsWith("<?xml")},options:{wms:{}},parse:async(t,e)=>w((new TextDecoder).decode(t),null==e?void 0:e.wms),parseTextSync:(t,e)=>w(t,null==e?void 0:e.wms)};function C(t,e){var n;const r=(null===(n=p.parseTextSync(t,e).FeatureInfoResponse)||void 0===n?void 0:n.FIELDS)||[];return{features:(Array.isArray(r)?r:[r]).map(t=>function(t){return{attributes:t||{},type:"",bounds:{bottom:0,top:0,left:0,right:0}}}(t))}}const M={...P,id:"wms-feature-info",name:"WMS FeatureInfo",parse:async(t,e)=>C((new TextDecoder).decode(t),e),parseTextSync:(t,e)=>C(t,e)};function I(t,e){var n;return null===(n=p.parseTextSync)||void 0===n?void 0:n.call(p,t,e)}const O={...P,id:"wms-layer-description",name:"WMS DescribeLayer",parse:async(t,e)=>I((new TextDecoder).decode(t),e),parseTextSync:(t,e)=>I(t,e)},R={id:"wms-error",name:"WMS Error",module:"wms",version:"3.4.15",worker:!1,extensions:["xml"],mimeTypes:["application/vnd.ogc.se_xml","application/xml","text/xml"],testText:function(t){return t.startsWith("<?xml")},options:{wms:{throwOnError:!1}},parse:async(t,e)=>L((new TextDecoder).decode(t),e),parseSync:(t,e)=>L((new TextDecoder).decode(t),e),parseTextSync:(t,e)=>L(t,e)};function L(t,e){const n={...R.options.wms,...null==e?void 0:e.wms},r=function(t,e){var n,r,i;const o=null===(n=p.parseTextSync)||void 0===n?void 0:n.call(p,t,e),s=(null==o||null===(r=o.ServiceExceptionReport)||void 0===r?void 0:r.ServiceException)||(null==o||null===(i=o["ogc:ServiceExceptionReport"])||void 0===i?void 0:i["ogc:ServiceException"]);return"string"==typeof s?s:s.value||s.code||"Unknown error"}(t,n),i=n.minimalErrors?r:"WMS Service error: ".concat(r);if(n.throwOnError)throw new Error(i);return i}class B extends l{constructor(t){var e;super(t),(0,r.A)(this,"url",void 0),(0,r.A)(this,"substituteCRS84",void 0),(0,r.A)(this,"flipCRS",void 0),(0,r.A)(this,"wmsParameters",void 0),(0,r.A)(this,"vendorParameters",void 0),(0,r.A)(this,"capabilities",null),this.url=t.url,this.substituteCRS84=null!==(e=t.substituteCRS84)&&void 0!==e&&e,this.flipCRS=["EPSG:4326"],this.wmsParameters={layers:void 0,query_layers:void 0,styles:void 0,version:"1.3.0",crs:"EPSG:4326",format:"image/png",info_format:"text/plain",transparent:void 0,time:void 0,elevation:void 0,...t.wmsParameters},this.vendorParameters=t.vendorParameters||{}}async getMetadata(){const t=await this.getCapabilities();return this.normalizeMetadata(t)}async getImage(t){return await this.getMap(t)}normalizeMetadata(t){return t}async getCapabilities(t,e){const n=this.getCapabilitiesURL(t,e),r=await this.fetch(n),i=await r.arrayBuffer();this._checkResponse(r,i);const o=await P.parse(i,this.loadOptions);return this.capabilities=o,o}async getMap(t,e){const n=this.getMapURL(t,e),r=await this.fetch(n),i=await r.arrayBuffer();this._checkResponse(r,i);try{return await c.$.parse(i,this.loadOptions)}catch{throw this._parseError(i)}}async getFeatureInfo(t,e){const n=this.getFeatureInfoURL(t,e),r=await this.fetch(n),i=await r.arrayBuffer();return this._checkResponse(r,i),await M.parse(i,this.loadOptions)}async getFeatureInfoText(t,e){const n=this.getFeatureInfoURL(t,e),r=await this.fetch(n),i=await r.arrayBuffer();return this._checkResponse(r,i),(new TextDecoder).decode(i)}async describeLayer(t,e){const n=this.describeLayerURL(t,e),r=await this.fetch(n),i=await r.arrayBuffer();return this._checkResponse(r,i),await O.parse(i,this.loadOptions)}async getLegendGraphic(t,e){const n=this.getLegendGraphicURL(t,e),r=await this.fetch(n),i=await r.arrayBuffer();this._checkResponse(r,i);try{return await c.$.parse(i,this.loadOptions)}catch{throw this._parseError(i)}}getCapabilitiesURL(t,e){const n={version:this.wmsParameters.version,...t};return this._getWMSUrl("GetCapabilities",n,e)}getMapURL(t,e){t=this._getWMS130Parameters(t);const n={version:this.wmsParameters.version,format:this.wmsParameters.format,transparent:this.wmsParameters.transparent,time:this.wmsParameters.time,elevation:this.wmsParameters.elevation,layers:this.wmsParameters.layers,styles:this.wmsParameters.styles,crs:this.wmsParameters.crs,...t};return this._getWMSUrl("GetMap",n,e)}getFeatureInfoURL(t,e){const n={version:this.wmsParameters.version,info_format:this.wmsParameters.info_format,layers:this.wmsParameters.layers,query_layers:this.wmsParameters.query_layers,styles:this.wmsParameters.styles,crs:this.wmsParameters.crs,...t};return this._getWMSUrl("GetFeatureInfo",n,e)}
2describeLayerURL(t,e){const n={version:this.wmsParameters.version,...t};return this._getWMSUrl("DescribeLayer",n,e)}getLegendGraphicURL(t,e){const n={version:this.wmsParameters.version,...t};return this._getWMSUrl("GetLegendGraphic",n,e)}_parseWMSUrl(t){const[e,n]=t.split("?"),r=n.split("&"),i={};for(const t of r){const[e,n]=t.split("=");i[e]=n}return{url:e,parameters:i}}_getWMSUrl(t,e,n){let r=this.url,i=!0;const o={service:"WMS",version:e.version,request:t,...e,...this.vendorParameters,...n},s=["transparent","time","elevation"];for(const[t,n]of Object.entries(o))s.includes(t)&&!n||(r+=i?"?":"&",i=!1,r+=this._getURLParameter(t,n,e));return encodeURI(r)}_getWMS130Parameters(t){const e={...t};return e.srs&&(e.crs=e.crs||e.srs,delete e.srs),e}_getURLParameter(t,e,n){switch(t){case"crs":"1.3.0"!==n.version?t="srs":this.substituteCRS84&&"EPSG:4326"===e&&(e="CRS:84");break;case"srs":"1.3.0"===n.version&&(t="crs");break;case"bbox":const r=this._flipBoundingBox(e,n);r&&(e=r)}return t=t.toUpperCase(),Array.isArray(e)?"".concat(t,"=").concat(e.join(",")):"".concat(t,"=").concat(e?String(e):"")}_flipBoundingBox(t,e){if(!Array.isArray(t)||4!==t.length)return null;const n=t;return"1.3.0"!==e.version||!this.flipCRS.includes(e.crs||"")||this.substituteCRS84&&"EPSG:4326"===e.crs?n:[n[1],n[0],n[3],n[2]]}async _fetchArrayBuffer(t){const e=await this.fetch(t),n=await e.arrayBuffer();return this._checkResponse(e,n),n}_checkResponse(t,e){const n=t.headers["content-type"];if(!t.ok||R.mimeTypes.includes(n)){const t=function(t,e){const n={...t};for(const[t,r]of Object.entries(e))r&&"object"==typeof r?(n[t]=n[t]||{},Object.assign(n[t],e[t])):n[t]=e[t];return n}(this.loadOptions,{wms:{throwOnError:!0}}),n=R.parseSync(e,t);throw new Error(n)}}_parseError(t){const e=R.parseSync(t,this.loadOptions);return new Error(e)}}(0,r.A)(B,"type","wms"),(0,r.A)(B,"testURL",t=>t.toLowerCase().includes("wms"));class k extends l{constructor(t){super(t)}async getMetadata(){return await this.metadata()}async getImage(t){throw new Error("not implemented")}async metadata(){throw new Error("not implemented")}exportImage(t){throw new Error("not implemented")}metadataURL(t){return"".concat(this.props.url,"?f=pjson")}exportImageURL(t){const e="bbox=".concat(t.bbox[0],",").concat(t.bbox[1],",").concat(t.bbox[2],",").concat(t.bbox[3]),n="size=".concat(t.width,",").concat(t.height),r={...t,bbox:e,size:n};return delete r.width,delete r.height,this.getUrl("exportImage",r)}getUrl(t,e,n){let r="".concat(this.props.url,"/").concat(t),i=!0;for(const[t,n]of Object.entries(e))r+=i?"?":"&",i=!1,Array.isArray(n)?r+="".concat(t.toUpperCase(),"=").concat(n.join(",")):r+="".concat(t.toUpperCase(),"=").concat(n?String(n):"");return r}async checkResponse(t){if(!t.ok)throw new Error("error")}}(0,r.A)(k,"type","arcgis-image-server"),(0,r.A)(k,"testURL",t=>t.toLowerCase().includes("ImageServer"));const N=[B,k,h];var F=n(84075);const D=6378137*Math.PI;function j(t){const e=(0,F.Gw)(t);return e[0]=(e[0]/256-1)*D,e[1]=(e[1]/256-1)*D,e}const U={id:"imagery-layer",data:"",serviceType:"auto",srs:"auto",layers:{type:"array",compare:!0,value:[]},onMetadataLoad:{type:"function",value:()=>{}},onMetadataLoadError:{type:"function",value:console.error},onImageLoadStart:{type:"function",value:()=>{}},onImageLoad:{type:"function",value:()=>{}},onImageLoadError:{type:"function",compare:!1,value:(t,e)=>console.error(e,t)}};class G extends i.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}get isLoaded(){return Boolean(this.state)&&0===this.state.loadCounter&&super.isLoaded}shouldUpdateState(){return!0}initializeState(){this.state._nextRequestId=0,this.state.lastRequestId=-1,this.state.loadCounter=0}updateState({changeFlags:t,props:e,oldProps:n}){const{viewport:r}=this.context;t.dataChanged||e.serviceType!==n.serviceType?(this.state.imageSource=this._createImageSource(e),this._loadMetadata(),this.debounce(()=>this.loadImage(r,"image source changed"),0)):(0,o.b)(e.layers,n.layers,1)?t.viewportChanged&&this.debounce(()=>this.loadImage(r,"viewport changed")):this.debounce(()=>this.loadImage(r,"layers changed"),0)}finalizeState(){}renderLayers(){const{bounds:t,image:e,lastRequestParameters:n}=this.state;
2return e&&new a.A({...this.getSubLayerProps({id:"bitmap"}),_imageCoordinateSystem:"EPSG:4326"===n.srs?s.rf.LNGLAT:s.rf.CARTESIAN,bounds:t,image:e})}async getFeatureInfoText(t,e){const{lastRequestParameters:n}=this.state;var r,i;return n?await(null===(r=(i=this.state.imageSource).getFeatureInfoText)||void 0===r?void 0:r.call(i,{...n,query_layers:n.layers,x:t,y:e,info_format:"application/vnd.ogc.gml"})):""}_createImageSource(t){if(t.data instanceof l)return t.data;if("string"==typeof t.data)return function(t){const{type:e="auto"}=t;switch("auto"===e?function(t){for(const e of N)if(e.testURL&&e.testURL(t))return e.type;return"wms"}(t.url):e){case"template":return new h(t);case"wms":return new B(t);default:throw new Error("Not a valid image source type")}}({url:t.data,loadOptions:t.loadOptions,type:t.serviceType});throw new Error("invalid image source in props.data")}async _loadMetadata(){const{imageSource:t}=this.state;try{this.state.loadCounter++;const n=await t.getMetadata();var e;this.state.imageSource===t&&(null===(e=this.getCurrentLayer())||void 0===e||e.props.onMetadataLoad(n))}catch(t){var n;null===(n=this.getCurrentLayer())||void 0===n||n.props.onMetadataLoadError(t)}finally{this.state.loadCounter--}}async loadImage(t,e){const{layers:n,serviceType:r}=this.props;if("wms"===r&&0===n.length)return;const i=t.getBounds(),{width:o,height:s}=t,a=this.getRequestId();let{srs:u}=this.props;"auto"===u&&(u=t.resolution?"EPSG:4326":"EPSG:3857");const l={width:o,height:s,bbox:i,layers:n,srs:u};if("EPSG:3857"===u){const[t,e]=j([i[0],i[1]]),[n,r]=j([i[2],i[3]]);l.bbox=[t,e,n,r]}try{this.state.loadCounter++,this.props.onImageLoadStart(a);const t=await this.state.imageSource.getImage(l);var c;this.state.lastRequestId<a&&(null===(c=this.getCurrentLayer())||void 0===c||c.props.onImageLoad(a),this.setState({image:t,bounds:i,lastRequestParameters:l,lastRequestId:a}))}catch(t){var h;this.raiseError(t,"Load image"),null===(h=this.getCurrentLayer())||void 0===h||h.props.onImageLoadError(a,t)}finally{this.state.loadCounter--}}getRequestId(){return this.state._nextRequestId++}debounce(t,e=500){clearTimeout(this.state._timeoutId),this.state._timeoutId=setTimeout(()=>t(),e)}}(0,r.A)(G,"layerName","WMSLayer"),(0,r.A)(G,"defaultProps",U);var z=n(52343);class V extends z.A{}(0,r.A)(V,"layerName","GreatCircleLayer"),(0,r.A)(V,"defaultProps",{getHeight:{type:"accessor",value:0},greatCircle:!0});var H=n(70851);const q={...H.A.defaultProps};class W extends i.A{indexToBounds(){return null}renderLayers(){const{elevationScale:t,extruded:e,wireframe:n,filled:r,stroked:i,lineWidthUnits:o,lineWidthScale:s,lineWidthMinPixels:a,lineWidthMaxPixels:u,lineJointRounded:l,lineMiterLimit:c,lineDashJustified:h,getElevation:A,getFillColor:f,getLineColor:d,getLineWidth:p}=this.props,{updateTriggers:g,material:m,transitions:y}=this.props,v=this.getSubLayerClass("cell",H.A),{updateTriggers:_,...b}=this.indexToBounds()||{};return new v({filled:r,wireframe:n,extruded:e,elevationScale:t,stroked:i,lineWidthUnits:o,lineWidthScale:s,lineWidthMinPixels:a,lineWidthMaxPixels:u,lineJointRounded:l,lineMiterLimit:c,lineDashJustified:h,material:m,transitions:y,getElevation:A,getFillColor:f,getLineColor:d,getLineWidth:p},this.getSubLayerProps({id:"cell",updateTriggers:g&&{..._,getElevation:g.getElevation,getFillColor:g.getFillColor,getLineColor:g.getLineColor,getLineWidth:g.getLineWidth}}),b)}}(0,r.A)(W,"layerName","GeoCellLayer"),(0,r.A)(W,"defaultProps",q);var X=n(52507),Y=n.n(X);const Q=180/Math.PI;function J(t,e,n){const r=1<<e;return[(t[0]+n[0])/r,(t[1]+n[1])/r]}function Z(t){return t>=.5?1/3*(4*t*t-1):1/3*(1-4*(1-t)*(1-t))}function K(t){return[Z(t[0]),Z(t[1])]}function $(t,[e,n]){switch(t){case 0:return[1,e,n];case 1:return[-e,1,n];case 2:return[-e,-n,1];case 3:return[-1,-n,-e];case 4:return[n,-1,-e];case 5:return[n,e,-1];default:throw new Error("Invalid face")}}function tt([t,e,n]){const r=Math.atan2(n,Math.sqrt(t*t+e*e));return[Math.atan2(e,t)*Q,r*Q]}function et(t,e,n,r){if(0===r){1===n&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);const r=e[0];e[0]=e[1],e[1]=r}}function nt(t){const e=function(t){const e=t.split("/"),n=parseInt(e[0],10),r=e[1],i=r.length,o=[0,0];let s;for(let t=i-1;t>=0;t--){s=i-t;const e=r[t];let n=0,a=0;"1"===e?a=1:"2"===e?(n=1,a=1):"3"===e&&(n=1);const u=Math.pow(2,s-1);et(u,o,n,a),o[0]+=u*n,o[1]+=u*a}if(n%2==1){const t=o[0];o[0]=o[1],o[1]=t}return{face:n,ij:o,level:s}}(function(t){if("string"==typeof t){if(t.indexOf("/")>0)return t;t=function(t){const e=t.padEnd(16,"0");return Y().fromString(e,16)}(t)}return function(t){let e=Y().fromString(t,!0,10).toString(2);for(;e.length<64;)e="0"+e;const n=e.lastIndexOf("1"),r=e.substring(0,3),i=e.substring(3,n),o=i.length/2,s=Y().fromString(r,!0,2).toString(10);let a=Y().fromString(i,!0,2).toString(4);for(;a.length<o;)a="0"+a;return"".concat(s,"/").concat(a)}(t.toString())}(t));return function({face:t,ij:e,level:n}){const r=[[0,0],[0,1],[1,1],[1,0],[0,0]],i=Math.max(1,Math.ceil(100*Math.pow(2,-n))),o=new Float64Array(4*i*2+2);let s=0,a=0;for(let u=0;u<4;u++){const l=r[u].slice(0),c=r[u+1],h=(c[0]-l[0])/i,A=(c[1]-l[1])/i;for(let r=0;r<i;r++){l[0]+=h,l[1]+=A;const r=tt($(t,K(J(e,n,l))));Math.abs(r[1])>89.999&&(r[0]=a);const i=r[0]-a;r[0]+=i>180?-360:i<-180?360:0,o[s++]=r[0],o[s++]=r[1],a=r[0]}}return o[s++]=o[0],o[s++]=o[1],o}(e)}class rt extends W{indexToBounds(){const{data:t,getS2Token:e}=this.props;return{data:t,_normalize:!1,positionFormat:"XY",getPolygon:(t,n)=>nt(e(t,n))}}}(0,r.A)(rt,"layerName","S2Layer"),(0,r.A)(rt,"defaultProps",{getS2Token:{type:"accessor",value:t=>t.token}});class it extends W{indexToBounds(){const{data:t,extruded:e,getQuadkey:n}=this.props,r=e?.99:1;return{data:t,_normalize:!1,positionFormat:"XY",getPolygon:(t,e)=>function(t,e=1){const[n,r]=function(t,e){let n=0,r=0,i=1<<t.length;const o=i/512;for(let e=0;e<t.length;e++){i>>=1;const o=parseInt(t[e]);o%2&&(n|=i),o>1&&(r|=i)}return[[n/o,512-r/o],[(n+e)/o,512-(r+e)/o]]}(t,e),[i,o]=(0,F.iV)(n),[s,a]=(0,F.iV)(r);return[s,o,s,a,i,a,i,o,s,o]}(n(t,e),r),updateTriggers:{getPolygon:r}}}}(0,r.A)(it,"layerName","QuadkeyLayer"),(0,r.A)(it,"defaultProps",{getQuadkey:{type:"accessor",value:t=>t.quadkey}});var ot=n(5371),st=n(65695),at=n(52421);const ut={id:"request-scheduler",throttleRequests:!0,maxRequests:6};class lt{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.A)(this,"props",void 0),(0,r.A)(this,"stats",void 0),(0,r.A)(this,"activeRequestCount",0),(0,r.A)(this,"requestQueue",[]),(0,r.A)(this,"requestMap",new Map),(0,r.A)(this,"deferredUpdate",null),this.props={...ut,...t},this.stats=new at.A({id:this.props.id}),this.stats.get("Queued Requests"),this.stats.get("Active Requests"),this.stats.get("Cancelled Requests"),this.stats.get("Queued Requests Ever"),this.stats.get("Active Requests Ever")}scheduleRequest(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>0;if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(t))return this.requestMap.get(t);
2const n={handle:t,priority:0,getPriority:e},r=new Promise(t=>(n.resolve=t,n));return this.requestQueue.push(n),this.requestMap.set(t,r),this._issueNewRequests(),r}_issueRequest(t){const{handle:e,resolve:n}=t;let r=!1;const i=()=>{r||(r=!0,this.requestMap.delete(e),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,n?n({done:i}):Promise.resolve({done:i})}_issueNewRequests(){this.deferredUpdate||(this.deferredUpdate=setTimeout(()=>this._issueNewRequestsAsync(),0))}_issueNewRequestsAsync(){this.deferredUpdate=null;const t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==t){this._updateAllRequests();for(let e=0;e<t;++e){const t=this.requestQueue.shift();t&&this._issueRequest(t)}}}_updateAllRequests(){const t=this.requestQueue;for(let e=0;e<t.length;++e){const n=t[e];this._updateRequest(n)||(t.splice(e,1),this.requestMap.delete(n.handle),e--)}t.sort((t,e)=>t.priority-e.priority)}_updateRequest(t){return t.priority=t.getPriority(t.handle),!(t.priority<0&&(t.resolve(null),1))}}var ct=n(9946),ht=n(34081);class At{constructor(t){(0,r.A)(this,"index",void 0),(0,r.A)(this,"isVisible",void 0),(0,r.A)(this,"isSelected",void 0),(0,r.A)(this,"parent",void 0),(0,r.A)(this,"children",void 0),(0,r.A)(this,"content",void 0),(0,r.A)(this,"state",void 0),(0,r.A)(this,"layers",void 0),(0,r.A)(this,"id",void 0),(0,r.A)(this,"zoom",void 0),(0,r.A)(this,"userData",void 0),(0,r.A)(this,"boundingBox",void 0),(0,r.A)(this,"_abortController",void 0),(0,r.A)(this,"_loader",void 0),(0,r.A)(this,"_loaderId",void 0),(0,r.A)(this,"_isLoaded",void 0),(0,r.A)(this,"_isCancelled",void 0),(0,r.A)(this,"_needsReload",void 0),(0,r.A)(this,"_bbox",void 0),this.index=t,this.isVisible=!1,this.isSelected=!1,this.parent=null,this.children=[],this.content=null,this._loader=void 0,this._abortController=null,this._loaderId=0,this._isLoaded=!1,this._isCancelled=!1,this._needsReload=!1}get bbox(){return this._bbox}set bbox(t){this._bbox||(this._bbox=t,this.boundingBox="west"in t?[[t.west,t.south],[t.east,t.north]]:[[t.left,t.top],[t.right,t.bottom]])}get data(){return this.isLoading&&this._loader?this._loader.then(()=>this.data):this.content}get isLoaded(){return this._isLoaded&&!this._needsReload}get isLoading(){return Boolean(this._loader)&&!this._isCancelled}get needsReload(){return this._needsReload||this._isCancelled}get byteLength(){const t=this.content?this.content.byteLength:0;return Number.isFinite(t)||console.error("byteLength not defined in tile data"),t}async _loadData({getData:t,requestScheduler:e,onLoad:n,onError:r}){const{index:i,id:o,bbox:s,userData:a,zoom:u}=this,l=this._loaderId;this._abortController=new AbortController;const{signal:c}=this._abortController,h=await e.scheduleRequest(this,t=>t.isSelected?1:-1);if(!h)return void(this._isCancelled=!0);if(this._isCancelled)return void h.done();let A,f=null;try{f=await t({index:i,id:o,bbox:s,userData:a,zoom:u,signal:c})}catch(t){A=t||!0}finally{h.done()}l===this._loaderId&&(this._loader=void 0,this.content=f,!this._isCancelled||f?(this._isLoaded=!0,this._isCancelled=!1,A?r(A,this):n(this)):this._isLoaded=!1)}loadData(t){return this._isLoaded=!1,this._isCancelled=!1,this._needsReload=!1,this._loaderId++,this._loader=this._loadData(t),this._loader}setNeedsReload(){this.isLoading&&(this.abort(),this._loader=void 0),this._needsReload=!0}abort(){var t;this.isLoaded||(this._isCancelled=!0,null===(t=this._abortController)||void 0===t||t.abort())}}var ft=n(15293),dt=n(80458);const pt=-1;var gt=n(60033);const mt=new gt.A,yt=new gt.A;class vt{constructor(t=[0,0,0],e=[0,0,0],n){(0,r.A)(this,"center",void 0),(0,r.A)(this,"halfDiagonal",void 0),(0,r.A)(this,"minimum",void 0),(0,r.A)(this,"maximum",void 0),n=n||mt.copy(t).add(e).scale(.5),this.center=new gt.A(n),this.halfDiagonal=new gt.A(e).subtract(this.center),this.minimum=new gt.A(t),this.maximum=new gt.A(e)}clone(){return new vt(this.minimum,this.maximum,this.center)}equals(t){return this===t||Boolean(t)&&this.minimum.equals(t.minimum)&&this.maximum.equals(t.maximum)}transform(t){return this.center.transformAsPoint(t),this.halfDiagonal.transform(t),this.minimum.transform(t),this.maximum.transform(t),this}intersectPlane(t){const{halfDiagonal:e}
2=this,n=yt.from(t.normal),r=e.x*Math.abs(n.x)+e.y*Math.abs(n.y)+e.z*Math.abs(n.z),i=this.center.dot(n)+t.distance;return i-r>0?1:i+r<0?pt:0}distanceTo(t){return Math.sqrt(this.distanceSquaredTo(t))}distanceSquaredTo(t){const e=mt.from(t).subtract(this.center),{halfDiagonal:n}=this;let r,i=0;return r=Math.abs(e.x)-n.x,r>0&&(i+=r*r),r=Math.abs(e.y)-n.y,r>0&&(i+=r*r),r=Math.abs(e.z)-n.z,r>0&&(i+=r*r),i}}var _t=n(39095);const bt=new gt.A,wt=new gt.A;class Et{constructor(t=[0,0,0],e=0){(0,r.A)(this,"center",void 0),(0,r.A)(this,"radius",void 0),this.radius=-0,this.center=new gt.A,this.fromCenterRadius(t,e)}fromCenterRadius(t,e){return this.center.from(t),this.radius=e,this}fromCornerPoints(t,e){return e=bt.from(e),this.center=(new gt.A).from(t).add(e).scale(.5),this.radius=this.center.distance(e),this}equals(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.radius===t.radius}clone(){return new Et(this.center,this.radius)}union(t){const e=this.center,n=this.radius,r=t.center,i=t.radius,o=bt.copy(r).subtract(e),s=o.magnitude();if(n>=s+i)return this.clone();if(i>=s+n)return t.clone();const a=.5*(n+s+i);return wt.copy(o).scale((-n+a)/s).add(e),this.center.copy(wt),this.radius=a,this}expand(t){const e=bt.from(t).subtract(this.center).magnitude();return e>this.radius&&(this.radius=e),this}transform(t){this.center.transform(t);const e=_t.IL(bt,t);return this.radius=Math.max(e[0],Math.max(e[1],e[2]))*this.radius,this}distanceSquaredTo(t){const e=this.distanceTo(t);return e*e}distanceTo(t){const e=bt.from(t).subtract(this.center);return Math.max(0,e.len()-this.radius)}intersectPlane(t){const e=this.center,n=this.radius,r=t.normal.dot(e)+t.distance;return r<-n?pt:r<n?0:1}}var xt=n(87459),St=n(64086);const Tt=new gt.A,Pt=new gt.A,Ct=new gt.A,Mt=new gt.A,It=new gt.A,Ot=new gt.A,Rt=new gt.A;class Lt{constructor(t=[0,0,0],e=[0,0,0,0,0,0,0,0,0]){(0,r.A)(this,"center",void 0),(0,r.A)(this,"halfAxes",void 0),this.center=(new gt.A).from(t),this.halfAxes=new xt.A(e)}get halfSize(){const t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),n=this.halfAxes.getColumn(2);return[new gt.A(t).len(),new gt.A(e).len(),new gt.A(n).len()]}get quaternion(){const t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),n=this.halfAxes.getColumn(2),r=new gt.A(t).normalize(),i=new gt.A(e).normalize(),o=new gt.A(n).normalize();return(new St.A).fromMatrix3(new xt.A([...r,...i,...o]))}fromCenterHalfSizeQuaternion(t,e,n){const r=new St.A(n),i=(new xt.A).fromQuaternion(r);return i[0]=i[0]*e[0],i[1]=i[1]*e[0],i[2]=i[2]*e[0],i[3]=i[3]*e[1],i[4]=i[4]*e[1],i[5]=i[5]*e[1],i[6]=i[6]*e[2],i[7]=i[7]*e[2],i[8]=i[8]*e[2],this.center=(new gt.A).from(t),this.halfAxes=i,this}clone(){return new Lt(this.center,this.halfAxes)}equals(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.halfAxes.equals(t.halfAxes)}getBoundingSphere(t=new Et){const e=this.halfAxes,n=e.getColumn(0,Ct),r=e.getColumn(1,Mt),i=e.getColumn(2,It),o=Tt.copy(n).add(r).add(i);return t.center.copy(this.center),t.radius=o.magnitude(),t}intersectPlane(t){const e=this.center,n=t.normal,r=this.halfAxes,i=n.x,o=n.y,s=n.z,a=Math.abs(i*r[0]+o*r[1]+s*r[2])+Math.abs(i*r[3]+o*r[4]+s*r[5])+Math.abs(i*r[6]+o*r[7]+s*r[8]),u=n.dot(e)+t.distance;return u<=-a?pt:u>=a?1:0}distanceTo(t){return Math.sqrt(this.distanceSquaredTo(t))}distanceSquaredTo(t){const e=Pt.from(t).subtract(this.center),n=this.halfAxes,r=n.getColumn(0,Ct),i=n.getColumn(1,Mt),o=n.getColumn(2,It),s=r.magnitude(),a=i.magnitude(),u=o.magnitude();r.normalize(),i.normalize(),o.normalize();let l,c=0;return l=Math.abs(e.dot(r))-s,l>0&&(c+=l*l),l=Math.abs(e.dot(i))-a,l>0&&(c+=l*l),l=Math.abs(e.dot(o))-u,l>0&&(c+=l*l),c}computePlaneDistances(t,e,n=[-0,-0]){let r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const o=this.center,s=this.halfAxes,a=s.getColumn(0,Ct),u=s.getColumn(1,Mt),l=s.getColumn(2,It),c=Ot.copy(a).add(u).add(l).add(o),h=Rt.copy(c).subtract(t);let A=e.dot(h);return r=Math.min(A,r),i=Math.max(A,i),c.copy(o).add(a).add(u).subtract(l),h.copy(c).subtract(t),A=e.dot(h),r=Math.min(A,r),i=Math.max(A,i),c.copy(o).add(a).subtract(u).add(l),h.copy(c).subtract(t),A=e.dot
2(h),r=Math.min(A,r),i=Math.max(A,i),c.copy(o).add(a).subtract(u).subtract(l),h.copy(c).subtract(t),A=e.dot(h),r=Math.min(A,r),i=Math.max(A,i),o.copy(c).subtract(a).add(u).add(l),h.copy(c).subtract(t),A=e.dot(h),r=Math.min(A,r),i=Math.max(A,i),o.copy(c).subtract(a).add(u).subtract(l),h.copy(c).subtract(t),A=e.dot(h),r=Math.min(A,r),i=Math.max(A,i),o.copy(c).subtract(a).subtract(u).add(l),h.copy(c).subtract(t),A=e.dot(h),r=Math.min(A,r),i=Math.max(A,i),o.copy(c).subtract(a).subtract(u).subtract(l),h.copy(c).subtract(t),A=e.dot(h),r=Math.min(A,r),i=Math.max(A,i),n[0]=r,n[1]=i,n}transform(t){this.center.transformAsPoint(t);const e=this.halfAxes.getColumn(0,Ct);e.transformAsPoint(t);const n=this.halfAxes.getColumn(1,Mt);n.transformAsPoint(t);const r=this.halfAxes.getColumn(2,It);return r.transformAsPoint(t),this.halfAxes=new xt.A([...e,...n,...r]),this}getTransform(){throw new Error("not implemented")}}var Bt=n(97458);const kt=new gt.A,Nt=new gt.A;class Ft{constructor(t=[0,0,1],e=0){(0,r.A)(this,"normal",void 0),(0,r.A)(this,"distance",void 0),this.normal=new gt.A,this.distance=-0,this.fromNormalDistance(t,e)}fromNormalDistance(t,e){return(0,Bt.A)(Number.isFinite(e)),this.normal.from(t).normalize(),this.distance=e,this}fromPointNormal(t,e){t=kt.from(t),this.normal.from(e).normalize();const n=-this.normal.dot(t);return this.distance=n,this}fromCoefficients(t,e,n,r){return this.normal.set(t,e,n),(0,Bt.A)((0,ht.aI)(this.normal.len(),1)),this.distance=r,this}clone(){return new Ft(this.normal,this.distance)}equals(t){return(0,ht.aI)(this.distance,t.distance)&&(0,ht.aI)(this.normal,t.normal)}getPointDistance(t){return this.normal.dot(t)+this.distance}transform(t){const e=Nt.copy(this.normal).transformAsVector(t).normalize(),n=this.normal.scale(-this.distance).transform(t);return this.fromPointNormal(n,e)}projectPointOntoPlane(t,e=[0,0,0]){t=kt.from(t);const n=this.getPointDistance(t),r=Nt.copy(this.normal).scale(n);return t.subtract(r).to(e)}}
2const Dt=[new gt.A([1,0,0]),new gt.A([0,1,0]),new gt.A([0,0,1])],jt=new gt.A,Ut=new gt.A;new Ft(new gt.A(1,0,0),0);class Gt{constructor(t=[]){(0,r.A)(this,"planes",void 0),this.planes=t}fromBoundingSphere(t){this.planes.length=2*Dt.length;const e=t.center,n=t.radius;let r=0;for(const t of Dt){let i=this.planes[r],o=this.planes[r+1];i||(i=this.planes[r]=new Ft),o||(o=this.planes[r+1]=new Ft);const s=jt.copy(t).scale(-n).add(e);t.dot(s),i.fromPointNormal(s,t);const a=jt.copy(t).scale(n).add(e),u=Ut.copy(t).negate();u.dot(a),o.fromPointNormal(a,u),r+=2}return this}computeVisibility(t){let e=1;for(const n of this.planes)switch(t.intersectPlane(n)){case pt:return pt;case 0:e=0}return e}computeVisibilityWithPlaneMask(t,e){if((0,Bt.A)(Number.isFinite(e),"parentPlaneMask is required."),e===Gt.MASK_OUTSIDE||e===Gt.MASK_INSIDE)return e;let n=Gt.MASK_INSIDE;const r=this.planes;for(let i=0;i<this.planes.length;++i){const o=i<31?1<<i:0;if(i<31&&0===(e&o))continue;const s=r[i],a=t.intersectPlane(s);if(a===pt)return Gt.MASK_OUTSIDE;0===a&&(n|=o)}return n}}(0,r.A)(Gt,"MASK_OUTSIDE",4294967295),(0,r.A)(Gt,"MASK_INSIDE",0),(0,r.A)(Gt,"MASK_INDETERMINATE",2147483647),new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,new gt.A,Math.PI;var zt=n(21554);const Vt=new xt.A,Ht=new xt.A,qt=new xt.A,Wt=new xt.A,Xt=new xt.A;const Yt=[1,0,0],Qt=[2,2,1];function Jt(t){let e=0;for(let n=0;n<3;++n){const r=t[Vt.getElementIndex(Qt[n],Yt[n])];e+=2*r*r}return Math.sqrt(e)}function Zt(t,e){const n=zt.A.EPSILON15;let r=0,i=1;for(let e=0;e<3;++e){const n=Math.abs(t[Vt.getElementIndex(Qt[e],Yt[e])]);n>r&&(i=e,r=n)}const o=Yt[i],s=Qt[i];let a=1,u=0;if(Math.abs(t[Vt.getElementIndex(s,o)])>n){const e=(t[Vt.getElementIndex(s,s)]-t[Vt.getElementIndex(o,o)])/2/t[Vt.getElementIndex(s,o)];let n;n=e<0?-1/(-e+Math.sqrt(1+e*e)):1/(e+Math.sqrt(1+e*e)),a=1/Math.sqrt(1+n*n),u=n*a}return xt.A.IDENTITY.to(e),e[Vt.getElementIndex(o,o)]=e[Vt.getElementIndex(s,s)]=a,e[Vt.getElementIndex(s,o)]=u,e[Vt.getElementIndex(o,s)]=-u,e}const Kt=new gt.A,$t=new gt.A,te=new gt.A,ee=new gt.A,ne=new gt.A,re=new xt.A,ie={diagonal:new xt.A,unitary:new xt.A};function oe(t,e=new Lt){if(!t||0===t.length)return e.halfAxes=new xt.A([0,0,0,0,0,0,0,0,0]),e.center=new gt.A,e;const n=t.length,r=new gt.A(0,0,0);for(const e of t)r.add(e);const i=1/n;r.multiplyByScalar(i);let o=0,s=0,a=0,u=0,l=0,c=0;for(const e of t){const t=Kt.copy(e).subtract(r);o+=t.x*t.x,s+=t.x*t.y,a+=t.x*t.z,u+=t.y*t.y,l+=t.y*t.z,c+=t.z*t.z}o*=i,s*=i,a*=i,u*=i,l*=i,c*=i;const h=re;h[0]=o,h[1]=s,h[2]=a,h[3]=s,h[4]=u,h[5]=l,h[6]=a,h[7]=l,h[8]=c;const{unitary:A}=function(t,e={}){const n=zt.A.EPSILON20;let r=0,i=0;const o=Ht,s=qt;o.identity(),s.copy(t);const a=n*function(t){let e=0;for(let n=0;n<9;++n){const r=t[n];e+=r*r}return Math.sqrt(e)}(s);for(;i<10&&Jt(s)>a;)Zt(s,Wt),Xt.copy(Wt).transpose(),s.multiplyRight(Wt),s.multiplyLeft(Xt),o.multiplyRight(Wt),++r>2&&(++i,r=0);return e.unitary=o.toTarget(e.unitary),e.diagonal=s.toTarget(e.diagonal),e}(h,ie),f=e.halfAxes.copy(A);let d=f.getColumn(0,te),p=f.getColumn(1,ee),g=f.getColumn(2,ne),m=-Number.MAX_VALUE,y=-Number.MAX_VALUE,v=-Number.MAX_VALUE,_=Number.MAX_VALUE,b=Number.MAX_VALUE,w=Number.MAX_VALUE;for(const e of t)Kt.copy(e),m=Math.max(Kt.dot(d),m),y=Math.max(Kt.dot(p),y),v=Math.max(Kt.dot(g),v),_=Math.min(Kt.dot(d),_),b=Math.min(Kt.dot(p),b),w=Math.min(Kt.dot(g),w);d=d.multiplyByScalar(.5*(_+m)),p=p.multiplyByScalar(.5*(b+y)),g=g.multiplyByScalar(.5*(w+v)),e.center.copy(d).add(p).add(g);const E=$t.set(m-_,y-b,v-w).multiplyByScalar(.5),x=new xt.A([E[0],0,0,0,E[1],0,0,0,E[2]]);return e.halfAxes.multiplyRight(x),e}const se=512,ae=[[.5,.5],[0,0],[0,1],[1,0],[1,1]],ue=ae.concat([[0,.5],[.5,0],[1,.5],[.5,1]]),le=ue.concat([[.25,.5],[.75,.5]]);class ce{constructor(t,e,n){(0,r.A)(this,"x",void 0),(0,r.A)(this,"y",void 0),(0,r.A)(this,"z",void 0),(0,r.A)(this,"childVisible",void 0),(0,r.A)(this,"selected",void 0),(0,r.A)(this,"_children",void 0),this.x=t,this.y=e,this.z=n}get children(){if(!this._children){const t=2*this.x,e=2*this.y,n=this.z+1;this._children=[new ce(t,e,n),new ce(t,e+1,n),new ce(t+1,e,n),new ce(t+1,e+1,n)]}return this._children}update(t){const{viewport:e,cullingVolume:n,elevationBounds:r,minZ:i,maxZ:o,bounds:s,offset:a,project:u}=t,l=this.getBoundingVolume(r,a,u);
2if(s&&!this.insideBounds(s))return!1;if(n.computeVisibility(l)<0)return!1;if(!this.childVisible){let{z:t}=this;if(t<o&&t>=i){const n=l.distanceTo(e.cameraPosition)*e.scale/e.height;t+=Math.floor(Math.log2(n))}if(t>=o)return this.selected=!0,!0}this.selected=!1,this.childVisible=!0;for(const e of this.children)e.update(t);return!0}getSelected(t=[]){if(this.selected&&t.push(this),this._children)for(const e of this._children)e.getSelected(t);return t}insideBounds([t,e,n,r]){const i=Math.pow(2,this.z),o=se/i;return this.x*o<n&&this.y*o<r&&(this.x+1)*o>t&&(this.y+1)*o>e}getBoundingVolume(t,e,n){if(n){const e=this.z<1?le:this.z<2?ue:ae,r=[];for(const i of e){const e=ve(this.x+i[0],this.y+i[1],this.z);e[2]=t[0],r.push(n(e)),t[0]!==t[1]&&(e[2]=t[1],r.push(n(e)))}return oe(r)}const r=Math.pow(2,this.z),i=se/r,o=this.x*i+e*se,s=se-(this.y+1)*i;return new vt([o,s,t[0]],[o+i,s+i,t[1]])}}const he=512,Ae=[-1/0,-1/0,1/0,1/0],fe={type:"object",value:null,validate:(t,e)=>e.optional&&null===t||"string"==typeof t||Array.isArray(t)&&t.every(t=>"string"==typeof t),equal:(t,e)=>{if(t===e)return!0;if(!Array.isArray(t)||!Array.isArray(e))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}};function de(t,e){const n=[e.transformAsPoint([t[0],t[1]]),e.transformAsPoint([t[2],t[1]]),e.transformAsPoint([t[0],t[3]]),e.transformAsPoint([t[2],t[3]])],r=[Math.min(...n.map(t=>t[0])),Math.min(...n.map(t=>t[1])),Math.max(...n.map(t=>t[0])),Math.max(...n.map(t=>t[1]))];return r}function pe(t,e){if(!t||!t.length)return null;const{index:n,id:r}=e;var i;Array.isArray(t)&&(t=t[i=r,Math.abs(i.split("").reduce((t,e)=>(t<<5)-t+e.charCodeAt(0)|0,0))%t.length]);let o=t;for(const t of Object.keys(n)){const e=new RegExp("{".concat(t,"}"),"g");o=o.replace(e,String(n[t]))}return Number.isInteger(n.y)&&Number.isInteger(n.z)&&(o=o.replace(/\{-y\}/g,String(Math.pow(2,n.z)-n.y-1))),o}function ge({viewport:t,z:e=0,cullRect:n}){return(t.subViewports||[t]).map(t=>me(t,e,n))}function me(t,e,n){if(!Array.isArray(e)){const r=n.x-t.x,i=n.y-t.y,{width:o,height:s}=n,a={targetZ:e},u=t.unproject([r,i],a),l=t.unproject([r+o,i],a),c=t.unproject([r,i+s],a),h=t.unproject([r+o,i+s],a);return[Math.min(u[0],l[0],c[0],h[0]),Math.min(u[1],l[1],c[1],h[1]),Math.max(u[0],l[0],c[0],h[0]),Math.max(u[1],l[1],c[1],h[1])]}const r=me(t,e[0],n),i=me(t,e[1],n);return[Math.min(r[0],i[0]),Math.min(r[1],i[1]),Math.max(r[2],i[2]),Math.max(r[3],i[3])]}function ye(t,e){return Math.pow(2,t)*he/e}function ve(t,e,n){const r=ye(n,he),i=t/r*360-180,o=Math.PI-2*Math.PI*e/r;return[i,180/Math.PI*Math.atan(.5*(Math.exp(o)-Math.exp(-o)))]}function _e(t,e,n,r){const i=ye(n,r);return[t/i*he,e/i*he]}function be(t,e,n,r,i=he){if(t.isGeospatial){const[t,i]=ve(e,n,r),[o,s]=ve(e+1,n+1,r);return{west:t,north:i,east:o,south:s}}const[o,s]=_e(e,n,r,i),[a,u]=_e(e+1,n+1,r,i);return{left:o,top:s,right:a,bottom:u}}function we({viewport:t,maxZoom:e,minZoom:n,zRange:r,extent:i,tileSize:o=he,modelMatrix:s,modelMatrixInverse:a,zoomOffset:u=0}){let l=t.isGeospatial?Math.round(t.zoom+Math.log2(he/o))+u:Math.ceil(t.zoom)+u;if("number"==typeof n&&Number.isFinite(n)&&l<n){if(!i)return[];l=n}"number"==typeof e&&Number.isFinite(e)&&l>e&&(l=e);let c=i;return s&&a&&i&&!t.isGeospatial&&(c=de(i,s)),t.isGeospatial?function(t,e,n,r){const i=t instanceof ft.A&&t.resolution?t.projectPosition:null,o=Object.values(t.getFrustumPlanes()).map(({normal:t,distance:e})=>new Ft(t.clone().negate(),e)),s=new Gt(o),a=t.distanceScales.unitsPerMeter[2],u=n&&n[0]*a||0,l=n&&n[1]*a||0,c=t instanceof dt.A&&t.pitch<=60?e:0;if(r){const[t,e,n,i]=r,o=(0,F.Gw)([t,i]),s=(0,F.Gw)([n,e]);r=[o[0],se-o[1],s[0],se-s[1]]}const h=new ce(0,0,0),A={viewport:t,project:i,cullingVolume:s,elevationBounds:[u,l],minZ:c,maxZ:e,bounds:r,offset:0};if(h.update(A),t instanceof dt.A&&t.subViewports&&t.subViewports.length>1){for(A.offset=-1;h.update(A)&&!(--A.offset<-3););for(A.offset=1;h.update(A)&&!(++A.offset>3););}return h.getSelected()}(t,l,r,i):function(t,e,n,r,i){const o=function(t,e,n){let r;return r=t.getBounds(),t.isGeospatial?[Math.max(r[0],n[0]),Math.max(r[1],n[1]),Math.min(r[2],n[2]),Math.min(r[3],n[3])]:[Math.max(Math.min(r[0],n[2]),n[0]),Math.max(Math.min(r[1],n[3]),n[1]),Math.min(Math.max(r[2],n[0]),n[2]),Math.min(Math.max(r[3],n[1]),n[3])]}(t,0,r),s=ye(e,n),[a,u,l,c]=function(t,e,n){if(n){const r=de(t,n).map(t=>t*e/he);return r}return t.map(t=>t*e/he)}(o,s,i),h=[];for(let t=Math.floor(a);t<l;t++)for(let n=Math.floor(u);n<c;n++)h.push({x:t,y:n,z:e});return h}(t,l,o,c||Ae,a)}function Ee(t,e){if(t===e)return!0;
2if(Array.isArray(t)){const n=t.length;if(!e||e.length!==n)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}return!1}const xe="never",Se="no-overlap",Te="best-available",Pe={[Te]:function(t){for(const e of t)e.state=0;for(const e of t)e.isSelected&&!Ie(e)&&Oe(e);for(const e of t)e.isVisible=Boolean(2&e.state)},[Se]:function(t){for(const e of t)e.state=0;for(const e of t)e.isSelected&&Ie(e);const e=Array.from(t).sort((t,e)=>t.zoom-e.zoom);for(const t of e)if(t.isVisible=Boolean(2&t.state),t.children&&(t.isVisible||1&t.state))for(const e of t.children)e.state=1;else t.isSelected&&Oe(t)},[xe]:()=>{}},Ce={extent:null,tileSize:512,maxZoom:null,minZoom:null,maxCacheSize:null,maxCacheByteSize:null,refinementStrategy:"best-available",zRange:null,maxRequests:6,zoomOffset:0,onTileLoad:()=>{},onTileUnload:()=>{},onTileError:()=>{}};class Me{constructor(t){(0,r.A)(this,"opts",void 0),(0,r.A)(this,"_requestScheduler",void 0),(0,r.A)(this,"_cache",void 0),(0,r.A)(this,"_dirty",void 0),(0,r.A)(this,"_tiles",void 0),(0,r.A)(this,"_cacheByteSize",void 0),(0,r.A)(this,"_viewport",void 0),(0,r.A)(this,"_zRange",void 0),(0,r.A)(this,"_selectedTiles",void 0),(0,r.A)(this,"_frameNumber",void 0),(0,r.A)(this,"_modelMatrix",void 0),(0,r.A)(this,"_modelMatrixInverse",void 0),(0,r.A)(this,"_maxZoom",void 0),(0,r.A)(this,"_minZoom",void 0),(0,r.A)(this,"onTileLoad",void 0),(0,r.A)(this,"_getCullBounds",function(t){let e,n={};return r=>{for(const i in r)if(!Ee(r[i],n[i])){e=t(r),n=r;break}return e}}(ge)),this.opts={...Ce,...t},this.onTileLoad=t=>{var e,n;null===(e=(n=this.opts).onTileLoad)||void 0===e||e.call(n,t),this.opts.maxCacheByteSize&&(this._cacheByteSize+=t.byteLength,this._resizeCache())},this._requestScheduler=new lt({maxRequests:t.maxRequests,throttleRequests:Boolean(t.maxRequests&&t.maxRequests>0)}),this._cache=new Map,this._tiles=[],this._dirty=!1,this._cacheByteSize=0,this._viewport=null,this._selectedTiles=null,this._frameNumber=0,this._modelMatrix=new ct.A,this._modelMatrixInverse=new ct.A,this.setOptions(t)}get tiles(){return this._tiles}get selectedTiles(){return this._selectedTiles}get isLoaded(){return null!==this._selectedTiles&&this._selectedTiles.every(t=>t.isLoaded)}get needsReload(){return null!==this._selectedTiles&&this._selectedTiles.some(t=>t.needsReload)}setOptions(t){Object.assign(this.opts,t),Number.isFinite(t.maxZoom)&&(this._maxZoom=Math.floor(t.maxZoom)),Number.isFinite(t.minZoom)&&(this._minZoom=Math.ceil(t.minZoom))}finalize(){for(const t of this._cache.values())t.isLoading&&t.abort();this._cache.clear(),this._tiles=[],this._selectedTiles=null}reloadAll(){for(const t of this._cache.keys()){const e=this._cache.get(t);this._selectedTiles&&this._selectedTiles.includes(e)?e.setNeedsReload():this._cache.delete(t)}}update(t,{zRange:e,modelMatrix:n}={}){const r=new ct.A(n),i=!r.equals(this._modelMatrix);if(this._viewport&&t.equals(this._viewport)&&(0,ht.aI)(this._zRange,e)&&!i)this.needsReload&&(this._selectedTiles=this._selectedTiles.map(t=>this._getTile(t.index,!0)));else{i&&(this._modelMatrixInverse=r.clone().invert(),this._modelMatrix=r),this._viewport=t,this._zRange=e;const n=this.getTileIndices({viewport:t,maxZoom:this._maxZoom,minZoom:this._minZoom,zRange:e,modelMatrix:this._modelMatrix,modelMatrixInverse:this._modelMatrixInverse});this._selectedTiles=n.map(t=>this._getTile(t,!0)),this._dirty&&this._rebuildTree()}const o=this.updateTileStates();return this._pruneRequests(),this._dirty&&this._resizeCache(),o&&this._frameNumber++,this._frameNumber}isTileVisible(t,e){if(!t.isVisible)return!1;if(e&&this._viewport){const n=this._getCullBounds({viewport:this._viewport,z:this._zRange,cullRect:e}),{bbox:r}=t;for(const[t,e,i,o]of n){let n;if("west"in r)n=r.west<i&&r.east>t&&r.south<o&&r.north>e;else{const s=Math.min(r.top,r.bottom),a=Math.max(r.top,r.bottom);n=r.left<i&&r.right>t&&s<o&&a>e}if(n)return!0}return!1}return!0}getTileIndices({viewport:t,maxZoom:e,minZoom:n,zRange:r,modelMatrix:i,modelMatrixInverse:o}){const{tileSize:s,extent:a,zoomOffset:u}=this.opts;return we({viewport:t,maxZoom:e,minZoom:n,zRange:r,tileSize:s,extent:a,modelMatrix:i,modelMatrixInverse:o,zoomOffset:u})}getTileId(t){return"".concat(t.x,"-").concat(t.y,"-").concat(t.z)}getTileZoom(t){return t.z}getTileMetadata(t){const{tileSize:e}=this.opts;return{bbox:be(this._viewport,t.x,t.y,t.z,e)}}getParentIndex(t){return{x:Math.floor(t.x/2),y:Math.floor(t.y/2),z:t.z-1}}updateTileStates(){const t=this.opts.refinementStrategy||Te,e=new Array(this._cache.size);let n=0;for(const t of this._cache.values())e[n++]=t.isVisible,t.isSelected=!1,t.isVisible=!1;for(const t of this._selectedTiles)t.isSelected=!0,t.isVisible=!0;
2("function"==typeof t?t:Pe[t])(Array.from(this._cache.values())),n=0;for(const t of this._cache.values())if(e[n++]!==t.isVisible)return!0;return!1}_pruneRequests(){const{maxRequests:t=0}=this.opts,e=[];let n=0;for(const t of this._cache.values())t.isLoading&&(n++,t.isSelected||t.isVisible||e.push(t));for(;t>0&&n>t&&e.length>0;)e.shift().abort(),n--}_rebuildTree(){const{_cache:t}=this;for(const e of t.values())e.parent=null,e.children&&(e.children.length=0);for(const e of t.values()){const t=this._getNearestAncestor(e);e.parent=t,null!=t&&t.children&&t.children.push(e)}}_resizeCache(){const{_cache:t,opts:e}=this,n=e.maxCacheSize||(e.maxCacheByteSize?1/0:5*this.selectedTiles.length),r=e.maxCacheByteSize||1/0;if(t.size>n||this._cacheByteSize>r){for(const[s,a]of t){var i,o;if(a.isVisible||a.isSelected||(this._cacheByteSize-=e.maxCacheByteSize?a.byteLength:0,t.delete(s),null===(i=(o=this.opts).onTileUnload)||void 0===i||i.call(o,a)),t.size<=n&&this._cacheByteSize<=r)break}this._rebuildTree(),this._dirty=!0}this._dirty&&(this._tiles=Array.from(this._cache.values()).sort((t,e)=>t.zoom-e.zoom),this._dirty=!1)}_getTile(t,e){const n=this.getTileId(t);let r=this._cache.get(n),i=!1;return!r&&e?(r=new At(t),Object.assign(r,this.getTileMetadata(r.index)),Object.assign(r,{id:n,zoom:this.getTileZoom(r.index)}),i=!0,this._cache.set(n,r),this._dirty=!0):r&&r.needsReload&&(i=!0),r&&i&&r.loadData({getData:this.opts.getTileData,requestScheduler:this._requestScheduler,onLoad:this.onTileLoad,onError:this.opts.onTileError}),r}_getNearestAncestor(t){const{_minZoom:e=0}=this;let n=t.index;for(;this.getTileZoom(n)>e;){n=this.getParentIndex(n);const t=this._getTile(n);if(t)return t}return null}}function Ie(t){let e=t;for(;e;){if(e.isLoaded||e.content)return e.state|=2,!0;e=e.parent}return!1}function Oe(t){for(const e of t.children)e.isLoaded||e.content?e.state|=2:Oe(e)}const Re={TilesetClass:Me,data:{type:"data",value:[]},dataComparator:fe.equal,renderSubLayers:{type:"function",value:t=>new st.A(t)},getTileData:{type:"function",optional:!0,value:null},onViewportLoad:{type:"function",optional:!0,value:null},onTileLoad:{type:"function",value:t=>{}},onTileUnload:{type:"function",value:t=>{}},onTileError:{type:"function",value:t=>console.error(t)},extent:{type:"array",optional:!0,value:null,compare:!0},tileSize:512,maxZoom:null,minZoom:0,maxCacheSize:null,maxCacheByteSize:null,refinementStrategy:Te,zRange:null,maxRequests:6,zoomOffset:0};class Le extends i.A{initializeState(){this.state={tileset:null,isLoaded:!1}}finalizeState(){var t,e;null===(t=this.state)||void 0===t||null===(e=t.tileset)||void 0===e||e.finalize()}get isLoaded(){var t,e;return null===(t=this.state)||void 0===t||null===(e=t.tileset)||void 0===e?void 0:e.selectedTiles.every(t=>t.isLoaded&&t.layers&&t.layers.every(t=>t.isLoaded))}shouldUpdateState({changeFlags:t}){return t.somethingChanged}updateState({changeFlags:t}){let{tileset:e}=this.state;const n=t.propsOrDataChanged||t.updateTriggersChanged,r=t.dataChanged||t.updateTriggersChanged&&(t.updateTriggersChanged.all||t.updateTriggersChanged.getTileData);e?n&&(e.setOptions(this._getTilesetOptions()),r?e.reloadAll():this.state.tileset.tiles.forEach(t=>{t.layers=null})):(e=new this.props.TilesetClass(this._getTilesetOptions()),this.setState({tileset:e})),this._updateTileset()}_getTilesetOptions(){const{tileSize:t,maxCacheSize:e,maxCacheByteSize:n,refinementStrategy:r,extent:i,maxZoom:o,minZoom:s,maxRequests:a,zoomOffset:u}=this.props;return{maxCacheSize:e,maxCacheByteSize:n,maxZoom:o,minZoom:s,tileSize:t,refinementStrategy:r,extent:i,maxRequests:a,zoomOffset:u,getTileData:this.getTileData.bind(this),onTileLoad:this._onTileLoad.bind(this),onTileError:this._onTileError.bind(this),onTileUnload:this._onTileUnload.bind(this)}}_updateTileset(){const{tileset:t}=this.state,{zRange:e,modelMatrix:n}=this.props,r=t.update(this.context.viewport,{zRange:e,modelMatrix:n}),{isLoaded:i}=t,o=this.state.isLoaded!==i,s=this.state.frameNumber!==r;i&&(o||s)&&this._onViewportLoad(),s&&this.setState({frameNumber:r}),this.state.isLoaded=i}_onViewportLoad(){const{tileset:t}=this.state,{onViewportLoad:e}=this.props;e&&e(t.selectedTiles)}_onTileLoad(t){this.props.onTileLoad(t),t.layers=null,this.setNeedsUpdate()}_onTileError(t,e){this.props.onTileError(t),e.layers=null,this.setNeedsUpdate()}_onTileUnload(t){this.props.onTileUnload(t)}getTileData(t){const{data:e,getTileData:n,fetch:r}=this.props,{signal:i}=t;return t.url="string"==typeof e||Array.isArray(e)?pe(e,t):null,n?n(t):r&&t.url?r(t.url,{propName:"data",layer:this,signal:i}):null}renderSubLayers(t){return this.props.renderSubLayers(t)}getSubLayerPropsByTile(t){return null}getPickingInfo({info:t,sourceLayer:e}){const n=e.props.tile;return t.picked&&(t.tile=n),t.sourceTile=n,t}_updateAutoHighlight(t){const e=t.sourceTile;if(e&&e.layers)for(const n of e.layers)n.updateAutoHighlight(t)}renderLayers(){return this.state.tileset.tiles.map(t=>{const e=this.getSubLayerPropsByTile(t);if(t.isLoaded||t.content)if(t.layers)e&&t.layers[0]&&Object.keys(e).some(n=>t.layers[0].props[n]!==e[n])&&(t.layers=t.layers.map(t=>t.clone(e)));
2else{const n=this.renderSubLayers({...this.props,...this.getSubLayerProps({id:t.id,updateTriggers:this.props.updateTriggers}),data:t.content,_offset:0,tile:t});t.layers=(0,ot.B)(n,Boolean).map(n=>n.clone({tile:t,...e}))}return t.layers})}filterSubLayer({layer:t,cullRect:e}){const{tile:n}=t.props;return this.state.tileset.isTileVisible(n,e)}}(0,r.A)(Le,"defaultProps",Re),(0,r.A)(Le,"layerName","TileLayer");var Be=n(41087),ke=n(8945),Ne=n(32968),Fe=n(31870);function De(t,e){e=void 0===e?t[0][0]:e;for(const n of t){const t=n[0]-e;t>180?n[0]-=360:t<-180&&(n[0]+=360)}}function je(t,e,n){const r=t(e,n),[i,o]=(0,ke.h3ToGeo)(r);return[o,i]}function Ue(t,e=1){const n=(0,ke.h3ToGeoBoundary)(t,!0);return 1!==e?function(t,e,n){const[r,i]=(0,ke.h3ToGeo)(t),o=e.length;De(e,i);const s=e[0]===e[o-1]?o-1:o;for(let t=0;t<s;t++)e[t][0]=(0,ht.Cc)(i,e[t][0],n),e[t][1]=(0,ht.Cc)(r,e[t][1],n)}(t,n,e):De(n),n}const Ge={...H.A.defaultProps,highPrecision:"auto",coverage:{type:"number",min:0,max:1,value:1},centerHexagon:null,getHexagon:{type:"accessor",value:t=>t.hexagon},extruded:!0};class ze extends i.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}initializeState(){ze._checkH3Lib(),this.state={edgeLengthKM:0,resolution:-1}}shouldUpdateState({changeFlags:t}){return this._shouldUseHighPrecision()?t.propsOrDataChanged:t.somethingChanged}updateState({props:t,changeFlags:e}){if(!0!==t.highPrecision&&(e.dataChanged||e.updateTriggersChanged&&e.updateTriggersChanged.getHexagon)){const t=this._calculateH3DataProps();this.setState(t)}this._updateVertices(this.context.viewport)}_calculateH3DataProps(){let t=-1,e=!1,n=!1;const{iterable:r,objectInfo:i}=(0,Ne.X)(this.props.data);for(const o of r){i.index++;const r=this.props.getHexagon(o,i),s=(0,ke.h3GetResolution)(r);if(t<0){if(t=s,!this.props.highPrecision)break}else if(t!==s){n=!0;break}if((0,ke.h3IsPentagon)(r)){e=!0;break}}return{resolution:t,edgeLengthKM:t>=0?(0,ke.edgeLength)(t,"km"):0,hasMultipleRes:n,hasPentagon:e}}_shouldUseHighPrecision(){if("auto"===this.props.highPrecision){const{resolution:t,hasPentagon:e,hasMultipleRes:n}=this.state,{viewport:r}=this.context;return Boolean(null==r?void 0:r.resolution)||n||e||t>=0&&t<=5}return this.props.highPrecision}_updateVertices(t){if(this._shouldUseHighPrecision())return;const{resolution:e,edgeLengthKM:n,centerHex:r}=this.state;if(e<0)return;const i=this.props.centerHexagon||(0,ke.geoToH3)(t.latitude,t.longitude,e);if(r===i)return;if(r){const t=(0,ke.h3Distance)(r,i);if(t>=0&&t*n<10)return}const{unitsPerMeter:o}=t.distanceScales;let s=Ue(i);const[a,u]=(0,ke.h3ToGeo)(i),[l,c]=t.projectFlat([u,a]);s=s.map(e=>{const n=t.projectFlat(e);return[(n[0]-l)/o[0],(n[1]-c)/o[1]]}),this.setState({centerHex:i,vertices:s})}renderLayers(){return this._shouldUseHighPrecision()?this._renderPolygonLayer():this._renderColumnLayer()}_getForwardProps(){const{elevationScale:t,material:e,coverage:n,extruded:r,wireframe:i,stroked:o,filled:s,lineWidthUnits:a,lineWidthScale:u,lineWidthMinPixels:l,lineWidthMaxPixels:c,getFillColor:h,getElevation:A,getLineColor:f,getLineWidth:d,transitions:p,updateTriggers:g}=this.props;return{elevationScale:t,extruded:r,coverage:n,wireframe:i,stroked:o,filled:s,lineWidthUnits:a,lineWidthScale:u,lineWidthMinPixels:l,lineWidthMaxPixels:c,material:e,getElevation:A,getFillColor:h,getLineColor:f,getLineWidth:d,transitions:p,updateTriggers:{getFillColor:g.getFillColor,getElevation:g.getElevation,getLineColor:g.getLineColor,getLineWidth:g.getLineWidth}}}_renderPolygonLayer(){const{data:t,getHexagon:e,updateTriggers:n,coverage:r}=this.props,i=this.getSubLayerClass("hexagon-cell-hifi",H.A),o=this._getForwardProps();return o.updateTriggers.getPolygon=function(t,e){let n;return n=null==t?e:"object"==typeof t?{...t,coverage:e}:{getHexagon:t,coverage:e},n}(n.getHexagon,r),new i(o,this.getSubLayerProps({id:"hexagon-cell-hifi",updateTriggers:o.updateTriggers}),{data:t,_normalize:!1,_windingOrder:"CCW",positionFormat:"XY",getPolygon:(t,n)=>function(t){const e=new Float64Array(2*t.length);let n=0;for(const r of t)e[n++]=r[0],e[n++]=r[1];return e}(Ue(e(t,n),r))})}_renderColumnLayer(){const{data:t,getHexagon:e,updateTriggers:n}=this.props,r=this.getSubLayerClass("hexagon-cell",Fe.A),i=this._getForwardProps();return i.updateTriggers.getPosition=n.getHexagon,new r(i,this.get
2SubLayerProps({id:"hexagon-cell",flatShading:!0,updateTriggers:i.updateTriggers}),{data:t,diskResolution:6,radius:1,vertices:this.state.vertices,getPosition:je.bind(null,e)})}}(0,r.A)(ze,"defaultProps",Ge),(0,r.A)(ze,"layerName","H3HexagonLayer"),(0,r.A)(ze,"_checkH3Lib",()=>{});class Ve extends W{initializeState(){ze._checkH3Lib()}updateState({props:t,changeFlags:e}){if(e.dataChanged||e.updateTriggersChanged&&e.updateTriggersChanged.getHexagons){const{data:e,getHexagons:n}=t,r=[],{iterable:i,objectInfo:o}=(0,Ne.X)(e);for(const t of i){o.index++;const e=n(t,o),i=(0,ke.h3SetToMultiPolygon)(e,!0);for(const e of i)r.push(this.getSubLayerRow({polygon:e},t,o.index))}this.setState({polygons:r})}}indexToBounds(){const{getElevation:t,getFillColor:e,getLineColor:n,getLineWidth:r}=this.props;return{data:this.state.polygons,getPolygon:t=>t.polygon,getElevation:this.getSubLayerAccessor(t),getFillColor:this.getSubLayerAccessor(e),getLineColor:this.getSubLayerAccessor(n),getLineWidth:this.getSubLayerAccessor(r)}}}(0,r.A)(Ve,"layerName","H3ClusterLayer"),(0,r.A)(Ve,"defaultProps",{getHexagons:{type:"accessor",value:t=>t.hexagons}});var He=n(67069),qe=n(23615),We=n(41302),Xe=n(37278),Ye=n(71465),Qe=n(32411),Je=n(25330),Ze=n(2351);class Ke extends Ze.A{getShaders(){const t=super.getShaders();return t.modules.push(Qe.R),{...t,vs:"#version 300 es\n#define SHADER_NAME simple-mesh-layer-vs\nuniform float sizeScale;\nuniform bool composeModelMatrix;\nuniform bool pickFeatureIds;\nin vec3 positions;\nin vec3 normals;\nin vec3 colors;\nin vec2 texCoords;\nin vec4 uvRegions;\nin vec3 featureIdsPickingColors;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nout vec2 vTexCoord;\nout vec3 cameraPosition;\nout vec3 normals_commonspace;\nout vec4 position_commonspace;\nout vec4 vColor;\n\nvec2 applyUVRegion(vec2 uv) {\n #ifdef HAS_UV_REGIONS\n return fract(uv) * (uvRegions.zw - uvRegions.xy) + uvRegions.xy;\n #else\n return uv;\n #endif\n}\n\nvoid main(void) {\n vec2 uv = applyUVRegion(texCoords);\n geometry.uv = uv;\n\n if (pickFeatureIds) {\n geometry.pickingColor = featureIdsPickingColors;\n } else {\n geometry.pickingColor = instancePickingColors;\n }\n\n vTexCoord = uv;\n cameraPosition = project_uCameraPosition;\n vColor = vec4(colors * instanceColors.rgb, instanceColors.a);\n\n vec3 pos = (instanceModelMatrix * positions) * sizeScale;\n vec3 projectedPosition = project_position(positions);
2\n position_commonspace = vec4(projectedPosition, 1.0);\n gl_Position = project_common_position_to_clipspace(position_commonspace);\n\n geometry.position = position_commonspace;\n normals_commonspace = project_normal(instanceModelMatrix * normals);\n geometry.normal = normals_commonspace;\n\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n #ifdef MODULE_PBR\n pbr_vPosition = geometry.position.xyz;\n #ifdef HAS_NORMALS\n pbr_vNormal = geometry.normal;\n #endif\n\n #ifdef HAS_UV\n pbr_vUV = uv;\n #else\n pbr_vUV = vec2(0., 0.);\n #endif\n geometry.uv = pbr_vUV;\n #endif\n\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n#define SHADER_NAME simple-mesh-layer-fs\n\nprecision highp float;\n\nuniform bool hasTexture;\nuniform sampler2D sampler;\nuniform bool flatShading;\nuniform float opacity;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n \n#ifdef MODULE_PBR\n\n fragColor = vColor * pbr_filterColor(vec4(0));\n geometry.uv = pbr_vUV;\n fragColor.a *= opacity;\n\n#else\n\n geometry.uv = vTexCoord;\n\n vec3 normal;\n if (flatShading) {\n#ifdef DERIVATIVES_AVAILABLE\n normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n#else\n normal = vec3(0.0, 0.0, 1.0);\n#endif\n } else {\n normal = normals_commonspace;\n }\n\n vec4 color = hasTexture ? texture(sampler, vTexCoord) : vColor;\n vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor, color.a * opacity);\n\n#endif\n\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n"}}initializeState(){const{featureIds:t}=this.props;super.initializeState();const e=this.getAttributeManager();t&&e.add({featureIdsPickingColors:{type:5121,size:3,noAlloc:!0,update:this.calculateFeatureIdsPickingColors}})}updateState(t){super.updateState(t);const{props:e,oldProps:n}=t;e.pbrMaterial!==n.pbrMaterial&&this.updatePbrMaterialUniforms(e.pbrMaterial)}draw(t){const{featureIds:e}=this.props;this.state.model&&(this.state.model.setUniforms({u_Camera:this.state.model.getUniforms().project_uCameraPosition,pickFeatureIds:Boolean(e)}),super.draw(t))}getModel(t){const{id:e,pbrMaterial:n}=this.props,r=this.parseMaterial(n,t);this.setState({materialParser:r});const i=this.getShaders();var o;return(o=t.attributes).COLOR_0||o.colors||(o.colors={constant:!0,value:new Float32Array([1,1,1])}),new Je.A(this.context.gl,{...this.getShaders(),id:e,geometry:t,defines:{...i.defines,...null==r?void 0:r.defines,HAS_UV_REGIONS:t.attributes.uvRegions},parameters:null==r?void 0:r.parameters,isInstanced:!0})}updatePbrMaterialUniforms(t){const{model:e}=this.state;if(e){const{mesh:n}=this.props,r=this.parseMaterial(t,n);this.setState({materialParser:r}),e.setUniforms(r.uniforms)}}parseMaterial(t,e){var n;const r=Boolean(t.pbrMetallicRoughness&&t.pbrMetallicRoughness.baseColorTexture);return null===(n=this.state.materialParser)||void 0===n||n.delete(),new Ye.A(this.context.gl,{attributes:{NORMAL:e.attributes.normals,TEXCOORD_0:e.attributes.texCoords},material:{unlit:r,...t},pbrDebug:!1,imageBasedLightingEnvironment:null,lights:!0,useTangents:!1})}calculateFeatureIdsPickingColors(t){const e=this.props.featureIds,n=new Uint8ClampedArray(e.length*t.size),r=[];for(let t=0;t<e.length;t++)this.encodePickingColor(e[t],r),n[3*t]=r[0],n[3*t+1]=r[1],n[3*t+2]=r[2];t.value=n}finalizeState(t){var e;super.finalizeState(t),null===(e=this.state.materialParser)||void 0===e||e.delete(),this.setState({materialParser:null})}}(0,r.A)(Ke,"layerName","MeshLayer"),(0,r.A)(Ke,"defaultProps",{pbrMaterial:{type:"object",value:null},featureIds:{type:"array",value:null,optional:!0}});var $e=n(53629);function tn(t){return tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tn(t)}function en(t,e,n){return(e=function(t){var e=function(t){if("object"!=tn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=tn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==tn(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nn=n(64062);const rn=6378137,on=6378137,sn=6356752.314245179;function an(t){return t}Math.max(rn,on,sn),new gt.A;const un=new gt.A,ln=new gt.A,cn=new gt.A,hn=new gt.A,An={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},fn={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},dn={east:new gt.A,north:new gt.A,up:new gt.A,west:new gt.A,south:new gt.A,down:new gt.A},pn=new gt.A,gn=new gt.A,mn=new gt.A;function yn(t,e,n,r,i,o){const s=An[e]&&An[e][n];let a,u,l;(0,Bt.A)(s&&(!r||r===s));const c=hn.copy(i);if((0,ht.aI)(c.x,0,1e-14)&&(0,ht.aI)(c.y,0,1e-14)){const t=Math.sign(c.z);a=pn.fromArray(fn[e]),"east"!==e&&"west"!==e&&a.scale(t),u=gn.fromArray(fn[n]),"east"!==n&&"west"!==n&&u.scale(t),l=mn.fromArray(fn[r]),"east"!==r&&"west"!==r&&l.scale(t)}else{const{up:i,east:o,north:s}=dn;o.set(-c.y,c.x,0).normalize(),t.geodeticSurfaceNormal(c,i),s.copy(i).cross(o);
2const{down:h,west:A,south:f}=dn;h.copy(i).scale(-1),A.copy(o).scale(-1),f.copy(s).scale(-1),a=dn[e],u=dn[n],l=dn[r]}return o[0]=a.x,o[1]=a.y,o[2]=a.z,o[3]=0,o[4]=u.x,o[5]=u.y,o[6]=u.z,o[7]=0,o[8]=l.x,o[9]=l.y,o[10]=l.z,o[11]=0,o[12]=c.x,o[13]=c.y,o[14]=c.z,o[15]=1,o}const vn=new gt.A,_n=new gt.A,bn=new gt.A,wn=new gt.A,En=new gt.A,xn=new gt.A;class Sn{constructor(t=0,e=0,n=0){en(this,"radii",void 0),en(this,"radiiSquared",void 0),en(this,"radiiToTheFourth",void 0),en(this,"oneOverRadii",void 0),en(this,"oneOverRadiiSquared",void 0),en(this,"minimumRadius",void 0),en(this,"maximumRadius",void 0),en(this,"centerToleranceSquared",zt.A.EPSILON1),en(this,"squaredXOverSquaredZ",void 0),(0,Bt.A)(t>=0),(0,Bt.A)(e>=0),(0,Bt.A)(n>=0),this.radii=new gt.A(t,e,n),this.radiiSquared=new gt.A(t*t,e*e,n*n),this.radiiToTheFourth=new gt.A(t*t*t*t,e*e*e*e,n*n*n*n),this.oneOverRadii=new gt.A(0===t?0:1/t,0===e?0:1/e,0===n?0:1/n),this.oneOverRadiiSquared=new gt.A(0===t?0:1/(t*t),0===e?0:1/(e*e),0===n?0:1/(n*n)),this.minimumRadius=Math.min(t,e,n),this.maximumRadius=Math.max(t,e,n),0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}toString(){return this.radii.toString()}cartographicToCartesian(t,e=[0,0,0]){const n=_n,r=bn,[,,i]=t;this.geodeticSurfaceNormalCartographic(t,n),r.copy(this.radiiSquared).scale(n);const o=Math.sqrt(n.dot(r));return r.scale(1/o),n.scale(i),r.add(n),r.to(e)}cartesianToCartographic(t,e=[0,0,0]){xn.from(t);const n=this.scaleToGeodeticSurface(xn,wn);if(!n)return;const r=this.geodeticSurfaceNormal(n,_n),i=En;i.copy(xn).subtract(n);return function(t,e,n=an){return"longitude"in e?(e.longitude=n(t[0]),e.latitude=n(t[1]),e.height=t[2]):"x"in e?(e.x=n(t[0]),e.y=n(t[1]),e.z=t[2]):(e[0]=n(t[0]),e[1]=n(t[1]),e[2]=t[2]),e}([Math.atan2(r.y,r.x),Math.asin(r.z),Math.sign(nn.Om(i,xn))*nn.Bw(i)],e,ht.$W._cartographicRadians?an:ht.xW)}eastNorthUpToFixedFrame(t,e=new ct.A){return yn(this,"east","north","up",t,e)}localFrameToFixedFrame(t,e,n,r,i=new ct.A){return yn(this,t,e,n,r,i)}geocentricSurfaceNormal(t,e=[0,0,0]){return vn.from(t).normalize().to(e)}geodeticSurfaceNormalCartographic(t,e=[0,0,0]){const n=function(t,e=[]){return function(t,e=[],n=an){return"longitude"in t?(e[0]=n(t.longitude),e[1]=n(t.latitude),e[2]=t.height):"x"in t?(e[0]=n(t.x),e[1]=n(t.y),e[2]=t.z):(e[0]=n(t[0]),e[1]=n(t[1]),e[2]=t[2]),e}(t,e,ht.$W._cartographicRadians?an:ht.eh)}(t),r=n[0],i=n[1],o=Math.cos(i);return vn.set(o*Math.cos(r),o*Math.sin(r),Math.sin(i)).normalize(),vn.to(e)}geodeticSurfaceNormal(t,e=[0,0,0]){return vn.from(t).scale(this.oneOverRadiiSquared).normalize().to(e)}scaleToGeodeticSurface(t,e){return function(t,e,n=[]){const{oneOverRadii:r,oneOverRadiiSquared:i,centerToleranceSquared:o}=e;un.from(t);const s=un.x,a=un.y,u=un.z,l=r.x,c=r.y,h=r.z,A=s*s*l*l,f=a*a*c*c,d=u*u*h*h,p=A+f+d,g=Math.sqrt(1/p);if(!Number.isFinite(g))return;const m=ln;if(m.copy(t).scale(g),p<o)return m.to(n);const y=i.x,v=i.y,_=i.z,b=cn;b.set(m.x*y*2,m.y*v*2,m.z*_*2);let w,E,x,S,T=(1-g)*un.len()/(.5*b.len()),P=0;do{T-=P,w=1/(1+T*y),E=1/(1+T*v),x=1/(1+T*_);const t=w*w,e=E*E,n=x*x;S=A*t+f*e+d*n-1,P=S/(-2*(A*(t*w)*y+f*(e*E)*v+d*(n*x)*_))}while(Math.abs(S)>zt.A.EPSILON12);return un.scale([w,E,x]).to(n)}(t,this,e)}scaleToGeocentricSurface(t,e=[0,0,0]){wn.from(t);const n=wn.x,r=wn.y,i=wn.z,o=this.oneOverRadiiSquared,s=1/Math.sqrt(n*n*o.x+r*r*o.y+i*i*o.z);return wn.multiplyScalar(s).to(e)}transformPositionToScaledSpace(t,e=[0,0,0]){return wn.from(t).scale(this.oneOverRadii).to(e)}transformPositionFromScaledSpace(t,e=[0,0,0]){return wn.from(t).scale(this.radii).to(e)}getSurfaceNormalIntersectionWithZAxis(t,e=0,n=[0,0,0]){(0,Bt.A)((0,ht.aI)(this.radii.x,this.radii.y,zt.A.EPSILON15)),(0,Bt.A)(this.radii.z>0),wn.from(t);const r=wn.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(r)>=this.radii.z-e))return wn.set(0,0,r).to(n)}}en(Sn,"WGS84",new Sn(rn,on,sn));var Tn=n(35687);class Pn{constructor(t,e,n){(0,r.A)(this,"item",void 0),(0,r.A)(this,"previous",void 0),(0,r.A)(this,"next",void 0),this.item=t,this.previous=e,this.next=n}}class Cn{constructor(){(0,r.A)(this,"head",null),(0,r.A)(this,"tail",null),(0,r.A)(this,"_length",0)}get length(){return this._length}add(t){const e=new Pn(t,this.tail,null);return this.tail?(this.tail.next=e,this.tail=e):(this.head=e,this.tail=e),++this._length,e}
2remove(t){t&&(t.previous&&t.next?(t.previous.next=t.next,t.next.previous=t.previous):t.previous?(t.previous.next=null,this.tail=t.previous):t.next?(t.next.previous=null,this.head=t.next):(this.head=null,this.tail=null),t.next=null,t.previous=null,--this._length)}splice(t,e){t!==e&&(this.remove(e),this._insert(t,e))}_insert(t,e){const n=t.next;t.next=e,this.tail===t?this.tail=e:n.previous=e,e.next=n,e.previous=t,++this._length}}class Mn{constructor(){(0,r.A)(this,"_list",void 0),(0,r.A)(this,"_sentinel",void 0),(0,r.A)(this,"_trimTiles",void 0),this._list=new Cn,this._sentinel=this._list.add("sentinel"),this._trimTiles=!1}reset(){this._list.splice(this._list.tail,this._sentinel)}touch(t){const e=t._cacheNode;e&&this._list.splice(this._sentinel,e)}add(t,e,n){e._cacheNode||(e._cacheNode=this._list.add(e),n&&n(t,e))}unloadTile(t,e,n){const r=e._cacheNode;r&&(this._list.remove(r),e._cacheNode=null,n&&n(t,e))}unloadTiles(t,e){const n=this._trimTiles;this._trimTiles=!1;const r=this._list,i=1024*t.maximumMemoryUsage*1024,o=this._sentinel;let s=r.head;for(;s!==o&&(t.gpuMemoryUsageInBytes>i||n);){const n=s.item;s=s.next,this.unloadTile(t,n,e)}}trim(){this._trimTiles=!0}}var In=n(78580);const On=new gt.A,Rn=new gt.A,Ln=new Gt([new Ft,new Ft,new Ft,new Ft,new Ft,new Ft]);function Bn(t,e){const{cameraDirection:n,cameraUp:r,height:i}=t,{metersPerUnit:o}=t.distanceScales,s=Nn(t,t.center),a=Sn.WGS84.eastNorthUpToFixedFrame(s),u=t.unprojectPosition(t.cameraPosition),l=Sn.WGS84.cartographicToCartesian(u,new gt.A),c=new gt.A(a.transformAsVector(new gt.A(n).scale(o))).normalize(),h=new gt.A(a.transformAsVector(new gt.A(r).scale(o))).normalize();!function(t){const e=t.getFrustumPlanes(),n=kn(e.near,t.cameraPosition),r=Nn(t,n),i=Nn(t,t.cameraPosition,Rn);let o=0;Ln.planes[o++].fromPointNormal(r,On.copy(r).subtract(i));for(const i in e){if("near"===i)continue;const s=Nn(t,kn(e[i],n,Rn),Rn);Ln.planes[o++].fromPointNormal(s,On.copy(r).subtract(s))}}(t);const A=t.constructor,{longitude:f,latitude:d,width:p,bearing:g,zoom:m}=t;return{camera:{position:l,direction:c,up:h},viewport:t,topDownViewport:new A({longitude:f,latitude:d,height:i,width:p,bearing:g,zoom:m,pitch:0}),height:i,cullingVolume:Ln,frameNumber:e,sseDenominator:1.15}}function kn(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new gt.A;const r=t.normal.dot(e);return n.copy(t.normal).scale(t.distance-r).add(e),n}function Nn(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new gt.A;const r=t.unprojectPosition(e);return Sn.WGS84.cartographicToCartesian(r,n)}const Fn=6356752.314245179,Dn=new gt.A;function jn(t,e,n){const r=Sn.WGS84.cartographicToCartesian([t.xmax,t.ymax,t.zmax],new gt.A),i=Math.sqrt(Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2)+Math.pow(r[2]-n[2],2));return Math.log2(Fn/(i+e[2]))}const Un="scenegraph",Gn="pointcloud",zn="I3S",Vn="TILES3D",Hn="geometricError";function qn(t){return null!=t}const Wn=new gt.A,Xn=new gt.A,Yn=new gt.A,Qn=new gt.A;function Jn(t,e,n){if((0,In.v)(t,"3D Tile: boundingVolume must be defined"),t.box)return function(t,e,n){const r=new gt.A(t[0],t[1],t[2]);e.transform(r,r);let i=[];if(10===t.length){const e=t.slice(3,6),n=new St.A;n.fromArray(t,6);const r=new gt.A([1,0,0]),o=new gt.A([0,1,0]),s=new gt.A([0,0,1]);r.transformByQuaternion(n),r.scale(e[0]),o.transformByQuaternion(n),o.scale(e[1]),s.transformByQuaternion(n),s.scale(e[2]),i=[...r.toArray(),...o.toArray(),...s.toArray()]}else i=[...t.slice(3,6),...t.slice(6,9),...t.slice(9,12)];const o=e.transformAsVector(i.slice(0,3)),s=e.transformAsVector(i.slice(3,6)),a=e.transformAsVector(i.slice(6,9)),u=new xt.A([o[0],o[1],o[2],s[0],s[1],s[2],a[0],a[1],a[2]]);return qn(n)?(n.center=r,n.halfAxes=u,n):new Lt(r,u)}(t.box,e,n);if(t.region){const[e,n,r,i,o,s]=t.region,a=Sn.WGS84.cartographicToCartesian([(0,ht.uj)(e),(0,ht.uj)(i),o],Yn),u=Sn.WGS84.cartographicToCartesian([(0,ht.uj)(r),(0,ht.uj)(n),s],Qn),l=(new gt.A).addVectors(a,u).multiplyScalar(.5),c=(new gt.A).subVectors(a,u).len()/2;return Zn([l[0],l[1],l[2],c],new ct.A)}if(t.sphere)return Zn(t.sphere,e,n);throw new Error("3D Tile: boundingVolume must contain a sphere, region, or box")}function Zn(t,e,n){const r=new gt.A(t[0],t[1],t[2]);e.transform(r,r);const i=e.getScale(Xn),o=Math.max(Math.max(i[0],i[1]),i[2]),s=t[3]*o;return qn(n)?(n.center=r,n.radius=s,n):new Et(r,s)}function Kn(t,e){Sn.WGS84.cartesianToCartographic(e,Wn),t[0][0]=Math.min(t[0][0],Wn[0]),t[0][1]=Math.min(t[0][1],Wn[1]),t[0][2]=Math.min(t[0][2],Wn[2]),t[1][0]=Math.max(t[1][0],Wn[0]),t[1][1]=Math.max(t[1][1],Wn[1]),t[1][2]=Math.max(t[1][2],Wn[2])}new gt.A,new gt.A,new ct.A,new gt.A,new gt.A,new gt.A;const $n=new gt.A,tr=new gt.A,er=new gt.A,nr=new gt.A,rr=new gt.A,ir=new ct.A,or=ne
2w ct.A;function sr(t,e){const{topDownViewport:n}=e,r=t.header.mbs[1],i=t.header.mbs[0],o=t.header.mbs[2],s=t.header.mbs[3],a=[...t.boundingVolume.center],u=n.unprojectPosition(n.cameraPosition);Sn.WGS84.cartographicToCartesian(u,$n),tr.copy($n).subtract(a).normalize(),Sn.WGS84.eastNorthUpToFixedFrame(a,ir),or.copy(ir).invert(),er.copy($n).transform(or);const l=Math.sqrt(er[0]*er[0]+er[1]*er[1]),c=l*l/er[2];nr.copy([er[0],er[1],c]);const h=nr.transform(ir).subtract(a).normalize(),A=tr.cross(h).normalize().scale(s).add(a),f=Sn.WGS84.cartesianToCartographic(A),d=n.project([i,r,o]),p=n.project(f);return rr.copy(d).subtract(p).magnitude()}class ar{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(0,r.A)(this,"_map",new Map),(0,r.A)(this,"_array",void 0),(0,r.A)(this,"_length",void 0),this._array=new Array(t),this._length=t}get length(){return this._length}set length(t){this._length=t,t>this._array.length&&(this._array.length=t)}get values(){return this._array}get(t){return(0,In.v)(t<this._array.length),this._array[t]}set(t,e){(0,In.v)(t>=0),t>=this.length&&(this.length=t+1),this._map.has(this._array[t])&&this._map.delete(this._array[t]),this._array[t]=e,this._map.set(e,t)}delete(t){const e=this._map.get(t);e>=0&&(this._array.splice(e,1),this._map.delete(t),this.length--)}peek(){return this._array[this._length-1]}push(t){if(!this._map.has(t)){const e=this.length++;this._array[e]=t,this._map.set(t,e)}}pop(){const t=this._array[--this.length];return this._map.delete(t),t}reserve(t){(0,In.v)(t>=0),t>this._array.length&&(this._array.length=t)}resize(t){(0,In.v)(t>=0),this.length=t}trim(t){null==t&&(t=this.length),this._array.length=t}reset(){this._array=[],this._map=new Map,this._length=0}find(t){return this._map.has(t)}}const ur={loadSiblings:!1,skipLevelOfDetail:!1,maximumScreenSpaceError:2,updateTransforms:!0,onTraversalEnd:()=>{},viewportTraversersMap:{},basePath:""};class lr{traversalFinished(t){return!0}constructor(t){(0,r.A)(this,"options",void 0),(0,r.A)(this,"root",null),(0,r.A)(this,"selectedTiles",{}),(0,r.A)(this,"requestedTiles",{}),(0,r.A)(this,"emptyTiles",{}),(0,r.A)(this,"lastUpdate",(new Date).getTime()),(0,r.A)(this,"updateDebounceTime",1e3),(0,r.A)(this,"_traversalStack",new ar),(0,r.A)(this,"_emptyTraversalStack",new ar),(0,r.A)(this,"_frameNumber",null),this.options={...ur,...t}}traverse(t,e,n){this.root=t,this.options={...this.options,...n},this.reset(),this.updateTile(t,e),this._frameNumber=e.frameNumber,this.executeTraversal(t,e)}reset(){this.requestedTiles={},this.selectedTiles={},this.emptyTiles={},this._traversalStack.reset(),this._emptyTraversalStack.reset()}executeTraversal(t,e){const n=this._traversalStack;for(t._selectionDepth=1,n.push(t);n.length>0;){const t=n.pop();let r=!1;this.canTraverse(t,e)&&(this.updateChildTiles(t,e),r=this.updateAndPushChildren(t,e,n,t.hasRenderContent?t._selectionDepth+1:t._selectionDepth));const i=t.parent,o=Boolean(!i||i._shouldRefine),s=!r;t.hasRenderContent?1===t.refine?(this.loadTile(t,e),this.selectTile(t,e)):2===t.refine&&(this.loadTile(t,e),s&&this.selectTile(t,e)):(this.emptyTiles[t.id]=t,this.loadTile(t,e),s&&this.selectTile(t,e)),this.touchTile(t,e),t._shouldRefine=r&&o}const r=(new Date).getTime();(this.traversalFinished(e)||r-this.lastUpdate>this.updateDebounceTime)&&(this.lastUpdate=r,this.options.onTraversalEnd(e))}updateChildTiles(t,e){const n=t.children;for(const t of n)this.updateTile(t,e)}updateAndPushChildren(t,e,n,r){const{loadSiblings:i,skipLevelOfDetail:o}=this.options,s=t.children;s.sort(this.compareDistanceToCamera.bind(this));const a=2===t.refine&&t.hasRenderContent&&!o;let u=!1,l=!0;for(const t of s)if(t._selectionDepth=r,t.isVisibleAndInRequestVolume?(n.find(t)&&n.delete(t),n.push(t),u=!0):(a||i)&&(this.loadTile(t,e),this.touchTile(t,e)),a){let n;if(n=!!t._inRequestVolume&&(t.hasRenderContent?t.contentAvailable:this.executeEmptyTraversal(t,e)),l=l&&n,!l)return!1}return u||(l=!1),l}updateTile(t,e){this.updateTileVisibility(t,e)}selectTile(t,e){this.shouldSelectTile(t)&&(t._selectedFrame=e.frameNumber,this.selectedTiles[t.id]=t)}loadTile(t,e){this.shouldLoadTile(t)&&(t._requestedFrame=e.frameNumber,t._priority=t._getPri
2ority(),this.requestedTiles[t.id]=t)}touchTile(t,e){t.tileset._cache.touch(t),t._touchedFrame=e.frameNumber}canTraverse(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return!!t.hasChildren&&(t.hasTilesetContent?!t.contentExpired:!(!r&&!t.isVisibleAndInRequestVolume)&&this.shouldRefine(t,e,n))}shouldLoadTile(t){return t.hasUnloadedContent||t.contentExpired}shouldSelectTile(t){return t.contentAvailable&&!this.options.skipLevelOfDetail}shouldRefine(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t._screenSpaceError;return n&&(r=t.getScreenSpaceError(e,!0)),r>this.options.maximumScreenSpaceError}updateTileVisibility(t,e){const n=[];if(this.options.viewportTraversersMap)for(const t in this.options.viewportTraversersMap)this.options.viewportTraversersMap[t]===e.viewport.id&&n.push(t);else n.push(e.viewport.id);t.updateVisibility(e,n)}compareDistanceToCamera(t,e){return t._distanceToCamera-e._distanceToCamera}anyChildrenVisible(t,e){let n=!1;for(const r of t.children)r.updateVisibility(e),n=n||r.isVisibleAndInRequestVolume;return n}executeEmptyTraversal(t,e){let n=!0;const r=this._emptyTraversalStack;for(r.push(t);r.length>0&&n;){const t=r.pop();if(this.updateTile(t,e),t.isVisibleAndInRequestVolume||this.loadTile(t,e),this.touchTile(t,e),!t.hasRenderContent&&this.canTraverse(t,e,!1,!0)){const e=t.children;for(const t of e)r.find(t)&&r.delete(t),r.push(t)}else t.contentAvailable||t.hasEmptyContent||(n=!1)}return n}}const cr=new gt.A;class hr{constructor(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";(0,r.A)(this,"tileset",void 0),(0,r.A)(this,"header",void 0),(0,r.A)(this,"id",void 0),(0,r.A)(this,"url",void 0),(0,r.A)(this,"parent",void 0),(0,r.A)(this,"refine",void 0),(0,r.A)(this,"type",void 0),(0,r.A)(this,"contentUrl",void 0),(0,r.A)(this,"lodMetricType","geometricError"),(0,r.A)(this,"lodMetricValue",0),(0,r.A)(this,"boundingVolume",null),(0,r.A)(this,"content",null),(0,r.A)(this,"contentState",0),(0,r.A)(this,"gpuMemoryUsageInBytes",0),(0,r.A)(this,"children",[]),(0,r.A)(this,"depth",0),(0,r.A)(this,"viewportIds",[]),(0,r.A)(this,"transform",new ct.A),(0,r.A)(this,"extensions",null),(0,r.A)(this,"implicitTiling",null),(0,r.A)(this,"userData",{}),(0,r.A)(this,"computedTransform",void 0),(0,r.A)(this,"hasEmptyContent",!1),(0,r.A)(this,"hasTilesetContent",!1),(0,r.A)(this,"traverser",new lr({})),(0,r.A)(this,"_cacheNode",null),(0,r.A)(this,"_frameNumber",null),(0,r.A)(this,"_expireDate",null),(0,r.A)(this,"_expiredContent",null),(0,r.A)(this,"_boundingBox",void 0),(0,r.A)(this,"_distanceToCamera",0),(0,r.A)(this,"_screenSpaceError",0),(0,r.A)(this,"_visibilityPlaneMask",void 0),(0,r.A)(this,"_visible",void 0),(0,r.A)(this,"_contentBoundingVolume",void 0),(0,r.A)(this,"_viewerRequestVolume",void 0),(0,r.A)(this,"_initialTransform",new ct.A),(0,r.A)(this,"_priority",0),(0,r.A)(this,"_selectedFrame",0),(0,r.A)(this,"_requestedFrame",0),(0,r.A)(this,"_selectionDepth",0),(0,r.A)(this,"_touchedFrame",0),(0,r.A)(this,"_centerZDepth",0),(0,r.A)(this,"_shouldRefine",!1),(0,r.A)(this,"_stackLength",0),(0,r.A)(this,"_visitedFrame",0),(0,r.A)(this,"_inRequestVolume",!1),(0,r.A)(this,"_lodJudge",null),this.header=e,this.tileset=t,this.id=i||e.id,this.url=e.url,this.parent=n,this.refine=this._getRefine(e.refine),this.type=e.type,this.contentUrl=e.contentUrl,this._initializeLodMetric(e),this._initializeTransforms(e),this._initializeBoundingVolumes(e),this._initializeContent(e),this._initializeRenderingState(e),Object.seal(this)}destroy(){this.header=null}isDestroyed(){return null===this.header}get selected(){return this._selectedFrame===this.tileset._frameNumber}get isVisible(){return this._visible}get isVisibleAndInRequestVolume(){return this._visible&&this._inRequestVolume}get hasRenderContent(){return!this.hasEmptyContent&&!this.hasTilesetContent}get hasChildren(){return this.children.length>0||this.header.children&&this.header.children.length>0}get contentReady(){return 3===this.contentState||this.hasEmptyContent}
2get contentAvailable(){return Boolean(this.contentReady&&this.hasRenderContent||this._expiredContent&&!this.contentFailed)}get hasUnloadedContent(){return this.hasRenderContent&&this.contentUnloaded}get contentUnloaded(){return 0===this.contentState}get contentExpired(){return 4===this.contentState}get contentFailed(){return 5===this.contentState}get distanceToCamera(){return this._distanceToCamera}get screenSpaceError(){return this._screenSpaceError}get boundingBox(){return this._boundingBox||(this._boundingBox=function(t,e){if(t.box)return function(t){const e=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],{halfAxes:n}=t,r=new gt.A(n.getColumn(0)),i=new gt.A(n.getColumn(1)),o=new gt.A(n.getColumn(2));for(let n=0;n<2;n++){for(let n=0;n<2;n++){for(let n=0;n<2;n++)Wn.copy(t.center),Wn.add(r),Wn.add(i),Wn.add(o),Kn(e,Wn),o.negate();i.negate()}r.negate()}return e}(e);if(t.region){const[e,n,r,i,o,s]=t.region;return[[(0,ht.uj)(e),(0,ht.uj)(n),o],[(0,ht.uj)(r),(0,ht.uj)(i),s]]}if(t.sphere)return function(t){const e=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],{center:n,radius:r}=t,i=Sn.WGS84.scaleToGeodeticSurface(n,Wn);let o;o=i?Sn.WGS84.geodeticSurfaceNormal(i):new gt.A(0,0,1);let s=new gt.A(o[2],-o[1],0);s.len()>0?s.normalize():s=new gt.A(0,1,0);const a=s.clone().cross(o);for(const t of[s,a,o]){Xn.copy(t).scale(r);for(let t=0;t<2;t++)Wn.copy(n),Wn.add(Xn),Kn(e,Wn),Xn.negate()}return e}(e);throw new Error("Unkown boundingVolume type")}(this.header.boundingVolume,this.boundingVolume)),this._boundingBox}getScreenSpaceError(t,e){switch(this.tileset.type){case zn:return sr(this,t);case Vn:return function(t,e,n){const r=t.tileset,i=t.parent&&t.parent.lodMetricValue||t.lodMetricValue,o=n?i:t.lodMetricValue;if(0===o)return 0;const s=Math.max(t._distanceToCamera,1e-7),{height:a,sseDenominator:u}=e,{viewDistanceScale:l}=r.options;let c=o*a*(l||1)/(s*u);return c-=function(t,e){if(t.dynamicScreenSpaceError&&t.dynamicScreenSpaceErrorComputedDensity){const n=t.dynamicScreenSpaceErrorComputedDensity,r=t.dynamicScreenSpaceErrorFactor,i=function(t,e){const n=t*e;return 1-Math.exp(-n*n)}(e,n)*r;return i}return 0}(r,s),c}(this,t,e);default:throw new Error("Unsupported tileset type")}}unselect(){this._selectedFrame=0}_getGpuMemoryUsageInBytes(){return this.content.gpuMemoryUsageInBytes||this.content.byteLength||0}_getPriority(){const t=this.tileset._traverser,{skipLevelOfDetail:e}=t.options,n=1===this.refine||e;if(n&&!this.isVisible&&void 0!==this._visible)return-1;if(this.tileset._frameNumber-this._touchedFrame>=1)return-1;if(0===this.contentState)return-1;const r=this.parent,i=!r||n&&0!==this._screenSpaceError&&!r.hasTilesetContent?this._screenSpaceError:r._screenSpaceError,o=t.root?t.root._screenSpaceError:0;return Math.max(o-i,0)}async loadContent(){if(this.hasEmptyContent)return!1;if(this.content)return!0;this.contentExpired&&(this._expireDate=null),this.contentState=1;const t=await this.tileset._requestScheduler.scheduleRequest(this.id,this._getPriority.bind(this));if(!t)return this.contentState=0,!1;try{const t=this.tileset.getTileUrl(this.contentUrl),e=this.tileset.loader,n={...this.tileset.loadOptions,[e.id]:{...this.tileset.loadOptions[e.id],isTileset:"json"===this.type,...this._getLoaderSpecificOptions(e.id)}};return this.content=await(0,$e.H)(t,e,n),this.tileset.options.contentLoader&&await this.tileset.options.contentLoader(this),this._isTileset()&&this.tileset._initializeTileHeaders(this.content,this),this.contentState=3,this._onContentLoaded(),!0}catch(t){throw this.contentState=5,t}finally{t.done()}}unloadContent(){return this.content&&this.content.destroy&&this.content.destroy(),this.content=null,this.header.content&&this.header.content.destroy&&this.header.content.destroy(),this.header.content=null,this.contentState=0,!0}updateVisibility(t,e){if(this._frameNumber===t.frameNumber)return;const n=this.parent,r=n?n._visibilityPlaneMask:Gt.MASK_INDETERMINATE;if(this.tileset._traverser.options.updateTransforms){const t=n?n.computedTransform:this.tileset.modelMatrix;this._updateTransform(t)}this._distanceToCamera=this.distanceToTile(t),this._screenSpaceError=this.getScreenSpaceError(t,!1),this._visibilityPlaneMask=this.visibility(t,r),this._visible=this._visibilityPlaneMask!==Gt.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(t),this._frameNumber=t.frameNumber,this.viewportIds=e}visibility(t,e){const{cullingVolume:n}=t,{boundingVolume:r}=this;return n.computeVisibilityWithPlaneMask(r,e)}contentVisibility(){return!0}distanceToTile(t){const e=this.boundingVolume;return Math.sqrt(Math.max(e.distanceSquaredTo(t.camera.position),0))}cameraSpaceZDepth(t){let{camera:e}=t;const n=this.boundingVolume;return cr.subVectors(n.center,e.position),e.direction.dot(cr)}insideViewerRequestVolume(t){const e=this._viewerRequestVolume;return!e||e.distanceSquaredTo(t.camera.position)<=0}updateExpiration(){if(function(t){return null!=t}(this._expireDate)&&this.contentReady&&!this.hasEmptyContent){const t=Date.now();Date.lessThan(this._expireDate,t)&&(this.contentState=4,this._expiredContent=this.content)}}get extras(){return this.header.extras}_initializeLodMetric(t){"lodMetricType"in t?this.lodMetricType=t.lodMetricType:(this.lodMetricType=this.parent&&this.parent.lodMetricType||this.tileset.lodMetricType,console.warn("3D Tile: Required prop lodMetricType is undefined. Using parent lodMetricType")),"lodMetricValue"in t?this.lodMetricValue=t.lodMetricValue:(this.lodMetricValue=this.parent&&this.parent.lodMetricValue||this.tileset.lodMetricValue,console.warn("3D Tile: Required prop lodMetricValue is undefined. Using parent lodMetricValue"))}_initializeTransforms(t){this.transform=t.transform?new ct.A(t.transform):new ct.A;const e=this.parent,n=this.tileset,r=e&&e.computedTransform?e.computedTransform.clone():n.modelMatrix.clone();this.computedTransform=new ct.A(r).multiplyRight(this.transform);const i=e&&e._initialTransform?e._initialTransform.clone():new ct.A;this._initialTransform=new ct.A(i).multiplyRight(this.transform)}_initializeBoundingVolumes(t){this._contentBoundingVolume=null,this._viewerRequestVolume=null,this._updateBoundingVolume(t)}_initializeContent(t){this.content={_tileset:this.tileset,_tile:this},this.hasEmptyContent=!0,this.contentState=0,this.hasTilesetContent=!1,t.contentUrl&&(this.content=null,this.hasEmptyContent=!1)}_initializeRenderingState(t){this.depth=t.level||(this.parent?this.parent.depth+1:0),this._shouldRefine=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._visibilityPlaneMask=Gt.MASK_INDETERMINATE,this._visible=void 0,this._inRequestVolume=!1,this._stackLength=0,this._selectionDepth=0,this._frameNumber=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._priority=0}_getRefine(t){return t||this.parent&&this.parent.refine||2}_isTileset(){return-1!==this.contentUrl.indexOf(".json")}_onContentLoaded(){switch(this.content&&this.content.type){case"vctr":case"geom":this.tileset._traverser.disableSkipLevelOfDetail=!0}this._isTileset()?this.hasTilesetContent=!0:this.gpuMemoryUsageInBytes=this._getGpuMemoryUsageInBytes()}_updateBoundingVolume(t){this.boundingVolume=Jn(t.boundingVolume,this.computedTransform,this.boundingVolume);const e=t.content;e&&(e.boundingVolume&&(this._contentBoundingVolume=Jn(e.boundingVolume,this.computedTransform,this._contentBoundingVolume)),t.viewerRequestVolume&&(this._viewerRequestVolume=Jn(t.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)))}_updateTransform(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ct.A).clone().multiplyRight(this.transform);!t.equals(this.computedTransform)&&(this.computedTransform=t,this._updateBoundingVolume(this.header))}_getLoaderSpecificOptions(t){return"i3s"===t?{...this.tileset.options.i3s,_tileOptions:{attributeUrls:this.header.attributeUrls,textureUrl:this.header.textureUrl,textureFormat:this.header.textureFormat,textureLoaderOptions:this.header.textureLoaderOptions,materialDefinition:this.header.materialDefinition,isDracoGeometry:this.header.isDracoGeometry,mbs:this.header.mbs},_tilesetOptions:{store:this.tileset.tileset.store,attributeStorageInfo:this.tileset.tileset.attributeStorageInfo,fields:this.tileset.tileset.fields},isTileHeader:!1}:{assetGltfUpAxis:(e=this.tileset.tileset).asset&&e.asset.gltfUpAxis||"Y"};var e}}class Ar extends lr{compareDistanceToCamera(t,e){return 0===e._distanceToCamera&&0===t._distanceToCamera?e._centerZDepth-t._centerZDepth:e._distanceToCamera-t._distanceToCamera}updateTileVisibility(t,e){if(super.updateTileVisibility(t,e),!t.isVisibleAndInRequestVolume)return;const n=t.children.length>0;if(t.hasTilesetContent&&n){const n=t.children[0];return this.updateTileVisibility(n,e),void(t._visible=n._visible)}if(this.meetsScreenSpaceErrorEarly(t,e))return void(t._visible=!1);const r=2===t.refine,i=1===t._optimChildrenWithinParent;r&&i&&n&&!this.anyChildrenVisible(t,e)&&(t._visible=!1)}meetsScreenSpaceErrorEarly(t,e){const{parent:n}=t;return!(!n||n.hasTilesetContent||1!==n.refine||this.shouldRefine(t,e,!0))}}
2class fr{constructor(){(0,r.A)(this,"frameNumberMap",new Map)}register(t,e){const n=this.frameNumberMap.get(t)||new Map,r=n.get(e)||0;n.set(e,r+1),this.frameNumberMap.set(t,n)}deregister(t,e){const n=this.frameNumberMap.get(t);if(!n)return;const r=n.get(e)||1;n.set(e,r-1)}isZero(t,e){var n;return 0===((null===(n=this.frameNumberMap.get(t))||void 0===n?void 0:n.get(e))||0)}}class dr{constructor(){(0,r.A)(this,"_statusMap",void 0),(0,r.A)(this,"pendingTilesRegister",new fr),this._statusMap={}}add(t,e,n,r){if(!this._statusMap[e]){const{frameNumber:i,viewport:{id:o}}=r;this._statusMap[e]={request:t,callback:n,key:e,frameState:r,status:"REQUESTED"},this.pendingTilesRegister.register(o,i),t().then(t=>{this._statusMap[e].status="COMPLETED";const{frameNumber:n,viewport:{id:i}}=this._statusMap[e].frameState;this.pendingTilesRegister.deregister(i,n),this._statusMap[e].callback(t,r)}).catch(t=>{this._statusMap[e].status="ERROR";const{frameNumber:r,viewport:{id:i}}=this._statusMap[e].frameState;this.pendingTilesRegister.deregister(i,r),n(t)})}}update(t,e){if(this._statusMap[t]){const{frameNumber:n,viewport:{id:r}}=this._statusMap[t].frameState;this.pendingTilesRegister.deregister(r,n);const{frameNumber:i,viewport:{id:o}}=e;this.pendingTilesRegister.register(o,i),this._statusMap[t].frameState=e}}find(t){return this._statusMap[t]}hasPendingTiles(t,e){return!this.pendingTilesRegister.isZero(t,e)}}class pr extends lr{constructor(t){super(t),(0,r.A)(this,"_tileManager",void 0),this._tileManager=new dr}traversalFinished(t){return!this._tileManager.hasPendingTiles(t.viewport.id,this._frameNumber||0)}shouldRefine(t,e){return t._lodJudge=function(t,e){if(0===t.lodMetricValue||isNaN(t.lodMetricValue))return"DIG";const n=2*sr(t,e);return n<2?"OUT":!t.header.children||n<=t.lodMetricValue?"DRAW":t.header.children?"DIG":"OUT"}(t,e),"DIG"===t._lodJudge}updateChildTiles(t,e){const n=t.header.children||[],r=t.children,i=t.tileset;for(const o of n){const n="".concat(o.id,"-").concat(e.viewport.id),s=r&&r.find(t=>t.id===n);if(s)s&&this.updateTile(s,e);else{let r=()=>this._loadTile(o.id,i);this._tileManager.find(n)?this._tileManager.update(n,e):(i.tileset.nodePages&&(r=()=>i.tileset.nodePagesTile.formTileFromNodePages(o.id)),this._tileManager.add(r,n,e=>this._onTileLoad(e,t,n),e))}}return!1}async _loadTile(t,e){const{loader:n}=e,r=e.getTileUrl("".concat(e.url,"/nodes/").concat(t)),i={...e.loadOptions,i3s:{...e.loadOptions.i3s,isTileHeader:!0}};return await(0,$e.H)(r,n,i)}_onTileLoad(t,e,n){const r=new hr(e.tileset,t,e,n);e.children.push(r);const i=this._tileManager.find(r.id).frameState;this.updateTile(r,i),this._frameNumber===i.frameNumber&&(this.traversalFinished(i)||(new Date).getTime()-this.lastUpdate>this.updateDebounceTime)&&this.executeTraversal(r,i)}}const gr={description:"",ellipsoid:Sn.WGS84,modelMatrix:new ct.A,throttleRequests:!0,maxRequests:64,maximumMemoryUsage:32,maximumTilesSelected:0,debounceTime:0,onTileLoad:()=>{},onTileUnload:()=>{},onTileError:()=>{},onTraversalComplete:t=>t,contentLoader:void 0,viewDistanceScale:1,maximumScreenSpaceError:8,loadTiles:!0,updateTransforms:!0,viewportTraversersMap:null,loadOptions:{fetch:{}},attributions:[],basePath:"",i3s:{}},mr="Tiles In Tileset(s)",yr="Tiles In Memory",vr="Tiles In View",_r="Tiles To Render",br="Tiles Loaded",wr="Tiles Loading",Er="Tiles Unloaded",xr="Failed Tile Loads",Sr="Points/Vertices",Tr="Tile Memory Use";class Pr{constructor(t,e){(0,r.A)(this,"options",void 0),(0,r.A)(this,"loadOptions",void 0),(0,r.A)(this,"type",void 0),(0,r.A)(this,"tileset",void 0),(0,r.A)(this,"loader",void 0),(0,r.A)(this,"url",void 0),(0,r.A)(this,"basePath",void 0),(0,r.A)(this,"modelMatrix",void 0),(0,r.A)(this,"ellipsoid",void 0),(0,r.A)(this,"lodMetricType",void 0),(0,r.A)(this,"lodMetricValue",void 0),(0,r.A)(this,"refine",void 0),(0,r.A)(this,"root",null),(0,r.A)(this,"roots",{}),(0,r.A)(this,"asset",{}),(0,r.A)(this,"description",""),(0,r.A)(this,"properties",void 0),(0,r.A)(this,"extras",null),(0,r.A)(this,"attributions",{}),(0,r.A)(this,"credits",{}),(0,r.A)(this,"stats",void 0),(0,r.A)(this,"contentFormats",{draco:!1,meshopt:!1,dds:!1,ktx2:!1}),(0,r.A)(this,"cartographicCenter",null),(0,r.A)(this,"cartesianCenter",null),(0,r.A)(this,"zoom",1),(0,r.A)(this,"boundingVolume",null),(0,r.A)(this,"dynamicScreenSpaceErrorComputedDensity",0),(0,r.A)(this,"maximumMemoryUsage",32),(0,r.A)(this,"gpuMemoryUsageInBytes",0),(0,r.A)(this,"_frameNumber",0),(0,r.A)(this,"_queryParams",{}),(0,r.A)(this,"_extensionsUsed",[]),(0,r.A)(this,"_tiles",{}),(0,r.A)(this,"_pendingCount",0),(0,r.A)(this,"selectedTiles",[]),(0,r.A)(this,"traverseCounter",0),(0,r.A)(this,"geometricError",0),(0,r.A)(this,"lastUpdatedVieports",null),(0,r.A)(this,"_requestedTiles",[]),(0,r.A)(this,"_emptyTiles",[]),(0,r.A)(this,"frameStateData",{}),(0,r.A)(this,"_traverser",void 0),(0,r.A)(this,"_cache",new Mn),(0,r.A)(this,"_requestScheduler",void 0),(0,r.A)(this,"updatePromise",null),(0,r.A)(this,"tilesetInitializationPromise",void 0),this.options={...gr,...e},this.tileset=t,this.loader=t.loader,this.type=t.type,this.url=t.url,this.basePath=t.basePath||Tn.pD(this.url),this.modelMatrix=this.options.modelMatrix,this.ellipsoid=this.options.ellipsoid,this.lodMetricType=t.lodMetricType,this.lodMetricValue=t.lodMetricValue,this.refine=t.root.refine,this.loadOptions=this.options.loadOptions||{},this._traverser=this._initializeTraverser(),this._requestScheduler
2=new lt({throttleRequests:this.options.throttleRequests,maxRequests:this.options.maxRequests}),this.stats=new at.A({id:this.url}),this._initializeStats(),this.tilesetInitializationPromise=this._initializeTileSet(t)}destroy(){this._destroy()}isLoaded(){return 0===this._pendingCount&&0!==this._frameNumber&&0===this._requestedTiles.length}get tiles(){return Object.values(this._tiles)}get frameNumber(){return this._frameNumber}get queryParams(){return new URLSearchParams(this._queryParams).toString()}setProps(t){this.options={...this.options,...t}}setOptions(t){this.options={...this.options,...t}}getTileUrl(t){return t.startsWith("data:")?t:"".concat(t).concat(t.includes("?")?"&":"?").concat(this.queryParams)}hasExtension(t){return Boolean(this._extensionsUsed.indexOf(t)>-1)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.tilesetInitializationPromise.then(()=>{!t&&this.lastUpdatedVieports?t=this.lastUpdatedVieports:this.lastUpdatedVieports=t,t&&this.doUpdate(t)})}async selectTiles(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return await this.tilesetInitializationPromise,t&&(this.lastUpdatedVieports=t),this.updatePromise||(this.updatePromise=new Promise(t=>{setTimeout(()=>{this.lastUpdatedVieports&&this.doUpdate(this.lastUpdatedVieports),t(this._frameNumber),this.updatePromise=null},this.options.debounceTime)})),this.updatePromise}doUpdate(t){if("loadTiles"in this.options&&!this.options.loadTiles)return;if(this.traverseCounter>0)return;const e=t instanceof Array?t:[t];this._cache.reset(),this._frameNumber++,this.traverseCounter=e.length;const n=[];for(const t of e){const e=t.id;this._needTraverse(e)?n.push(e):this.traverseCounter--}for(const t of e){const e=t.id;if(this.roots[e]||(this.roots[e]=this._initializeTileHeaders(this.tileset,null)),!n.includes(e))continue;const r=Bn(t,this._frameNumber);this._traverser.traverse(this.roots[e],r,this.options)}}_needTraverse(t){let e=t;return this.options.viewportTraversersMap&&(e=this.options.viewportTraversersMap[t]),e===t}_onTraversalEnd(t){const e=t.viewport.id;this.frameStateData[e]||(this.frameStateData[e]={selectedTiles:[],_requestedTiles:[],_emptyTiles:[]});const n=this.frameStateData[e],r=Object.values(this._traverser.selectedTiles),[i,o]=function(t,e,n){if(0===n||t.length<=n)return[t,[]];const r=[],{longitude:i,latitude:o}=e.viewport;for(const[e,n]of t.entries()){const[t,s]=n.header.mbs,a=Math.abs(i-t),u=Math.abs(o-s),l=Math.sqrt(u*u+a*a);r.push([e,l])}const s=r.sort((t,e)=>t[1]-e[1]),a=[];for(let e=0;e<n;e++)a.push(t[s[e][0]]);const u=[];for(let e=n;e<s.length;e++)u.push(t[s[e][0]]);return[a,u]}(r,t,this.options.maximumTilesSelected);n.selectedTiles=i;for(const t of o)t.unselect();n._requestedTiles=Object.values(this._traverser.requestedTiles),n._emptyTiles=Object.values(this._traverser.emptyTiles),this.traverseCounter--,this.traverseCounter>0||this._updateTiles()}_updateTiles(){this.selectedTiles=[],this._requestedTiles=[],this._emptyTiles=[];for(const t in this.frameStateData){const e=this.frameStateData[t];this.selectedTiles=this.selectedTiles.concat(e.selectedTiles),this._requestedTiles=this._requestedTiles.concat(e._requestedTiles),this._emptyTiles=this._emptyTiles.concat(e._emptyTiles)}this.selectedTiles=this.options.onTraversalComplete(this.selectedTiles);for(const t of this.selectedTiles)this._tiles[t.id]=t;this._loadTiles(),this._unloadTiles(),this._updateStats()}_tilesChanged(t,e){if(t.length!==e.length)return!0;const n=new Set(t.map(t=>t.id)),r=new Set(e.map(t=>t.id));let i=t.filter(t=>!r.has(t.id)).length>0;return i=i||e.filter(t=>!n.has(t.id)).length>0,i}_loadTiles(){for(const t of this._requestedTiles)t.contentUnloaded&&this._loadTile(t)}_unloadTiles(){this._cache.unloadTiles(this,(t,e)=>t._unloadTile(e))}_updateStats(){let t=0,e=0;for(const n of this.selectedTiles)n.contentAvailable&&n.content&&(t++,n.content.pointCount?e+=n.content.pointCount:e+=n.content.vertexCount);this.stats.get(vr).count=this.selectedTiles.length,this.stats.get(_r).count=t,this.stats.get(Sr).count=e}async _initializeTileSet(t){this.type===zn&&(this.calculateViewPropsI3S(),t.root=await t.root),this.root=this._initializeTileHeaders(t,null),this.type===Vn&&(this._initializeTiles3DTileset(t),this.calculateViewPropsTiles3D()),this.type===zn&&this._initializeI3STileset()}calculateViewPropsI3S(){var t;const e=this.tileset.fullExtent;if(e){const{xmin:t,xmax:n,ymin:r,ymax:i,zmin:o,zmax:s}=e;return this.cartographicCenter=new gt.A(t+(n-t)/2,r+(i-r)/2,o+(s-o)/2),this.cartesianCenter=Sn.WGS84.cartographicToCartesian(this.cartographicCenter,new gt.A),void(this.zoom=jn(e,this.cartographicCenter,this.cartesianCenter))}const n=null===(t=this.tileset.store)||void 0===t?void 0:t.extent;if(n){const[t,e,r,i]=n;return this.cartographicCenter=new gt.A(t+(r-t)/2,e+(i-e)/2,0),this.cartesianCenter=Sn.WGS84.cartographicToCartesian(this.cartographicCenter,new gt.A),void(this.zoom=function(t,e,n){const[r,i,o,s]=t;return jn({xmin:r,xmax:o,ymin:i,ymax:s,zmin:0,zmax:0},e,n)}(n,this.cartographicCenter,this.cartesianCenter))}console.warn("Extent is not defined in the tileset header"),this.cartographicCenter=new gt.A,this.zoom=1}calculateViewPropsTiles3D(){const t=this.root,{center:e}=t.boundingVolume;if(!e)return console.warn("center was not pre-calculated for the root tile"),this.cartographicCenter=new gt.A,void(this.zoom=1);0!==e[0]||0!==e[1]||0!==e[2]?this.cartographicCenter=Sn.WGS84.cartesianToCartographic(e,new gt.A):this.cartographicCenter=new gt.A(0,0,-Sn.WGS84.radii[0]),this.cartesianCenter=e,this.zoom=function(t,e){if(t instanceof Lt){const{halfAxes:n}=t,r=function(t){t.getColumn(0,Dn);const e=t.getColumn(1),n=t.getColumn(2);return Dn.add(e).add(n).len()}(n);return Math.log2(Fn/(r+e[2]))}if(t instanceof Et){const{radius:n}=t;return Math.log2(Fn/(n+e[2]))}if(t.width&&t.height){const{width:e,height:n}=t;return(Math.log2(6378137/e)+Math.log2(6378137/n))/2}return 1}(t.boundingVolume,this.cartographicCenter)}_initializeStats(){this.stats.get(mr),this.stats.get(wr),this.stats.get(yr),this.stats.get(vr),this.stats.get(_r),this.stats.get(br),this.stats.get(Er),this.stats.get(xr),this.stats.get(Sr),this.stats.get(Tr,"memory")}_initializeTileHeaders(t,e){const n=new hr(this,t.root,e);if(e&&(e.children.push(n),n.depth=e.depth+1),this.type===Vn){const t=[];for(t.push(n);t.length>0;){const e=t.pop();this.stats.get(mr).incrementCount();const n=e.header.children||[];for(const i of n){var r;const n=new hr(this,i,e);if(null!==(r=n.contentUrl)&&void 0!==r&&r.includes("?session=")){const t=new URL(n.contentUrl).searchParams.get("session");t&&(this._queryParams.session=t)}e.children.push(n),n.depth=e.depth+1,t.push(n)}}}return n}_initializeTraverser(){let t;switch(this.type){case Vn:t=Ar;break;case zn:t=pr;break;default:t=lr}return new t({basePath:this.basePath,onTraversalEnd:this._onTraversalEnd.bind(this)})}_destroyTileHeaders(t){this._destroySubtree(t)}async _loadTile(t){let e;try{this._onStartTileLoading(),e=await t.loadContent()}catch(e){this._onTileLoadError(t,e instanceof Error?e:new Error("load failed"))}finally{this._onEndTileLoading(),this._onTileLoad(t,e)}}_onTileLoadError(t,e){this.stats.get(xr).incrementCount();const n=e.message||e.toString(),r=t.url;console.error("A 3D tile failed to load: ".concat(t.url," ").concat(n)),this.options.onT
2ileError(t,n,r)}_onTileLoad(t,e){if(e){if(this.type===zn){var n,r;const t=(null===(n=this.tileset)||void 0===n||null===(r=n.nodePagesTile)||void 0===r?void 0:r.nodesInNodePages)||0;this.stats.get(mr).reset(),this.stats.get(mr).addCount(t)}t&&t.content&&function(t,e){(0,In.v)(t),(0,In.v)(e);const{rtcCenter:n,gltfUpAxis:r}=e,{computedTransform:i,boundingVolume:{center:o}}=t;let s=new ct.A(i);switch(n&&s.translate(n),r){case"Z":default:break;case"Y":const t=(new ct.A).rotateX(Math.PI/2);s=s.multiplyRight(t);break;case"X":const e=(new ct.A).rotateY(-Math.PI/2);s=s.multiplyRight(e)}e.isQuantized&&s.translate(e.quantizedVolumeOffset).scale(e.quantizedVolumeScale);const a=new gt.A(o);e.cartesianModelMatrix=s,e.cartesianOrigin=a;const u=Sn.WGS84.cartesianToCartographic(a,new gt.A),l=Sn.WGS84.eastNorthUpToFixedFrame(a).invert();e.cartographicModelMatrix=l.multiplyRight(s),e.cartographicOrigin=u,e.coordinateSystem||(e.modelMatrix=e.cartographicModelMatrix)}(t,t.content),this.updateContentTypes(t),this._addTileToCache(t),this.options.onT
2ileLoad(t)}}updateContentTypes(t){if(this.type===zn)switch(t.header.isDracoGeometry&&(this.contentFormats.draco=!0),t.header.textureFormat){case"dds":this.contentFormats.dds=!0;break;case"ktx2":this.contentFormats.ktx2=!0}else if(this.type===Vn){var e;const{extensionsRemoved:n=[]}=(null===(e=t.content)||void 0===e?void 0:e.gltf)||{};n.includes("KHR_draco_mesh_compression")&&(this.contentFormats.draco=!0),n.includes("EXT_meshopt_compression")&&(this.contentFormats.meshopt=!0),n.includes("KHR_texture_basisu")&&(this.contentFormats.ktx2=!0)}}_onStartTileLoading(){this._pendingCount++,this.stats.get(wr).incrementCount()}_onEndTileLoading(){this._pendingCount--,this.stats.get(wr).decrementCount()}_addTileToCache(t){this._cache.add(this,t,e=>e._updateCacheStats(t))}_updateCacheStats(t){this.stats.get(br).incrementCount(),this.stats.get(yr).incrementCount(),this.gpuMemoryUsageInBytes+=t.gpuMemoryUsageInBytes||0,this.stats.get(Tr).count=this.gpuMemoryUsageInBytes}_unloadTile(t){this.gpuMemoryUsageInBytes-=t.gpuMemoryUsageInBytes||0,this.stats.get(yr).decrementCount(),this.stats.get(Er).incrementCount(),this.stats.get(Tr).count=this.gpuMemoryUsageInBytes,this.options.onT
vendor: 4,149 bytes, line 2
2ileUnload(t),t.unloadContent()}_destroy(){const t=[];for(this.root&&t.push(this.root);t.length>0;){const e=t.pop();for(const n of e.children)t.push(n);this._destroyTile(e)}this.root=null}_destroySubtree(t){const e=t,n=[];for(n.push(e);n.length>0;){t=n.pop();for(const e of t.children)n.push(e);t!==e&&this._destroyTile(t)}e.children=[]}_destroyTile(t){this._cache.unloadTile(this,t),this._unloadTile(t),t.destroy()}_initializeTiles3DTileset(t){if(t.queryString){const e=new URLSearchParams(t.queryString),n=Object.fromEntries(e.entries());this._queryParams={...this._queryParams,...n}}if(this.asset=t.asset,!this.asset)throw new Error("Tileset must have an asset property.");if("0.0"!==this.asset.version&&"1.0"!==this.asset.version)throw new Error("The tileset must be 3D Tiles version 0.0 or 1.0.");"tilesetVersion"in this.asset&&(this._queryParams.v=this.asset.tilesetVersion),this.credits={attributions:this.options.attributions||[]},this.description=this.options.description||"",this.properties=t.properties,this.geometricError=t.geometricError,this._extensionsUsed=t.extensionsUsed||[],this.extras=t.extras}_initializeI3STileset(){this.loadOptions.i3s&&"token"in this.loadOptions.i3s&&(this._queryParams.token=this.loadOptions.i3s.token)}}const Cr="3.4.15",Mr={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect",GLTF:"glTF"};function Ir(t,e,n){(0,In.v)(t instanceof ArrayBuffer);const r=new TextDecoder("utf8"),i=new Uint8Array(t,e,n);return r.decode(i)}Object.keys(Mr);var Or=n(87941);const Rr={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},Lr={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,...Rr},Br={[Rr.DOUBLE]:Float64Array,[Rr.FLOAT]:Float32Array,[Rr.UNSIGNED_SHORT]:Uint16Array,[Rr.UNSIGNED_INT]:Uint32Array,[Rr.UNSIGNED_BYTE]:Uint8Array,[Rr.BYTE]:Int8Array,[Rr.SHORT]:Int16Array,[Rr.INT]:Int32Array},kr={DOUBLE:Rr.DOUBLE,FLOAT:Rr.FLOAT,UNSIGNED_SHORT:Rr.UNSIGNED_SHORT,UNSIGNED_INT:Rr.UNSIGNED_INT,UNSIGNED_BYTE:Rr.UNSIGNED_BYTE,BYTE:Rr.BYTE,SHORT:Rr.SHORT,INT:Rr.INT},Nr="Failed to convert GL type";class Fr{static fromTypedArray(t){t=ArrayBuffer.isView(t)?t.constructor:t;for(const e in Br)if(Br[e]===t)return e;throw new Error(Nr)}static fromName(t){const e=kr[t];if(!e)throw new Error(Nr);return e}static getArrayType(t){switch(t){case Rr.UNSIGNED_SHORT_5_6_5:case Rr.UNSIGNED_SHORT_4_4_4_4:case Rr.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:const e=Br[t];if(!e)throw new Error(Nr);return e}}static getByteSize(t){return Fr.getArrayType(t).BYTES_PER_ELEMENT}static validate(t){return Boolean(Fr.getArrayType(t))}static createTypedArray(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;return void 0===r&&(r=(e.byteLength-n)/Fr.getByteSize(t)),new(Fr.getArrayType(t))(e,n,r)}}class Dr{constructor(t,e){(0,r.A)(this,"json",void 0),(0,r.A)(this,"buffer",void 0),(0,r.A)(this,"featuresLength",0),(0,r.A)(this,"_cachedTypedArrays",{}),this.json=t,this.buffer=e}getExtension(t){return this.json.extensions&&this.json.extensions[t]}hasProperty(t){return Boolean(this.json[t])}getGlobalProperty(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lr.UNSIGNED_INT,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=this.json[t];return r&&Number.isFinite(r.byteOffset)?this._getTypedArrayFromBinary(t,e,n,1,r.byteOffset):r}getPropertyArray(t,e,n){const r=this.json[t];return r&&Number.isFinite(r.byteOffset)?("componentType"in r&&(e=Fr.fromName(r.componentType)),this._getTypedArrayFromBinary(t,e,n,this.featuresLength,r.byteOffset)):this._getTypedArrayFromArray(t,e,r)}getProperty(t,e,n,r,i){const o=this.json[t];if(!o)return o;const s=this.getPropertyArray(t,e,n);if(1===n)return s[r];for(let t=0;t<n;++t)i[t]=s[n*r+t];return i}_getTypedArrayFromBinary(t,e,n,r,i){const o=this._cachedTypedArrays;let s=o[t];return s||(s=Fr.createTypedArray(e,this.buffer.buffer,this.buffer.byteOffset+i,r*n),o[t]=s),s}_getTypedArrayFromArray(t,e,n){const r=this._cachedTypedArrays;let i=r[t];
2return i||(i=Fr.createTypedArray(e,n),r[t]=i),i}}const jr={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ur={SCALAR:(t,e)=>t[e],VEC2:(t,e)=>[t[2*e+0],t[2*e+1]],VEC3:(t,e)=>[t[3*e+0],t[3*e+1],t[3*e+2]],VEC4:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT2:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT3:(t,e)=>[t[9*e+0],t[9*e+1],t[9*e+2],t[9*e+3],t[9*e+4],t[9*e+5],t[9*e+6],t[9*e+7],t[9*e+8]],MAT4:(t,e)=>[t[16*e+0],t[16*e+1],t[16*e+2],t[16*e+3],t[16*e+4],t[16*e+5],t[16*e+6],t[16*e+7],t[16*e+8],t[16*e+9],t[16*e+10],t[16*e+11],t[16*e+12],t[16*e+13],t[16*e+14],t[16*e+15]]},Gr={SCALAR:(t,e,n)=>{e[n]=t},VEC2:(t,e,n)=>{e[2*n+0]=t[0],e[2*n+1]=t[1]},VEC3:(t,e,n)=>{e[3*n+0]=t[0],e[3*n+1]=t[1],e[3*n+2]=t[2]},VEC4:(t,e,n)=>{e[4*n+0]=t[0],e[4*n+1]=t[1],e[4*n+2]=t[2],e[4*n+3]=t[3]},MAT2:(t,e,n)=>{e[4*n+0]=t[0],e[4*n+1]=t[1],e[4*n+2]=t[2],e[4*n+3]=t[3]},MAT3:(t,e,n)=>{e[9*n+0]=t[0],e[9*n+1]=t[1],e[9*n+2]=t[2],e[9*n+3]=t[3],e[9*n+4]=t[4],e[9*n+5]=t[5],e[9*n+6]=t[6],e[9*n+7]=t[7],e[9*n+8]=t[8],e[9*n+9]=t[9]},MAT4:(t,e,n)=>{e[16*n+0]=t[0],e[16*n+1]=t[1],e[16*n+2]=t[2],e[16*n+3]=t[3],e[16*n+4]=t[4],e[16*n+5]=t[5],e[16*n+6]=t[6],e[16*n+7]=t[7],e[16*n+8]=t[8],e[16*n+9]=t[9],e[16*n+10]=t[10],e[16*n+11]=t[11],e[16*n+12]=t[12],e[16*n+13]=t[13],e[16*n+14]=t[14],e[16*n+15]=t[15]}},zr=t=>void 0!==t;function Vr(t,e,n){if(!t)return;const r=t.parentCounts;return t.parentIds?n(t,e):r>0?function(t,e,n){const r=t.classIds,i=t.parentCounts,o=t.parentIds,s=t.parentIndexes,a=r.length,u=scratchVisited;u.length=Math.max(u.length,a);const l=++marker,c=scratchStack;for(c.length=0,c.push(e);c.length>0;){if(u[e=c.pop()]===l)continue;u[e]=l;const r=n(t,e);if(zr(r))return r;const a=i[e],h=s[e];for(let t=0;t<a;++t){const n=o[h+t];n!==e&&c.push(n)}}return null}(t,e,n):function(t,e,n){let r=!0;for(;r;){const i=n(t,e);if(zr(i))return i;const o=t.parentIds[e];r=o!==e,e=o}throw new Error("traverseHierarchySingleParent")}(t,e,n)}function Hr(t,e,n){const r=t.parentCounts,i=t.parentIds,o=t.parentIndexes,s=t.classIds.length;if(!zr(i))return;assert(e<s,"Parent index ".concat(e," exceeds the total number of instances: ").concat(s)),assert(-1===n.indexOf(e),"Circular dependency detected in the batch table hierarchy."),n.push(e);const a=zr(r)?r[e]:1,u=zr(r)?o[e]:e;for(let r=0;r<a;++r){const o=i[u+r];o!==e&&Hr(t,o,n)}n.pop(e)}function qr(t){return null!=t}const Wr=(t,e)=>t,Xr={HIERARCHY:!0,extensions:!0,extras:!0};class Yr{constructor(t,e,n){var i;let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};(0,r.A)(this,"json",void 0),(0,r.A)(this,"binary",void 0),(0,r.A)(this,"featureCount",void 0),(0,r.A)(this,"_extensions",void 0),(0,r.A)(this,"_properties",void 0),(0,r.A)(this,"_binaryProperties",void 0),(0,r.A)(this,"_hierarchy",void 0),(0,In.v)(n>=0),this.json=t||{},this.binary=e,this.featureCount=n,this._extensions=(null===(i=this.json)||void 0===i?void 0:i.extensions)||{},this._properties={};for(const t in this.json)Xr[t]||(this._properties[t]=this.json[t]);this._binaryProperties=this._initializeBinaryProperties(),o["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=function(t,e,n){if(!e)return null;let r=t.getExtension("3DTILES_batch_table_hierarchy");const i=e.HIERARCHY;return i&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),e.extensions=e.extensions||{},e.extensions["3DTILES_batch_table_hierarchy"]=i,r=i),r?function(t,e){let n,r,i;const o=t.instancesLength,s=t.classes;let a,u=t.classIds,l=t.parentCounts,c=t.parentIds,h=o;if(zr(u.byteOffset)&&(u.componentType=defaultValue(u.componentType,GL.UNSIGNED_SHORT),u.type=AttributeType.SCALAR,i=getBinaryAccessor(u),u=i.createArrayBufferView(e.buffer,e.byteOffset+u.byteOffset,o)),zr(l))for(zr(l.byteOffset)&&(l.componentType=defaultValue(l.componentType,GL.UNSIGNED_SHORT),l.type=AttributeType.SCALAR,i=getBinaryAccessor(l),l=i.createArrayBufferView(e.buffer,e.byteOffset+l.byteOffset,o)),a=new Uint16Array(o),h=0,n=0;n<o;++n)a[n]=h,h+=l[n];zr(c)&&zr(c.byteOffset)&&(c.componentType=defaultValue(c.componentType,GL.UNSIGNED_SHORT),c.type=AttributeType.SCALAR,i=getBinaryAccessor(c),c=i.createArrayBufferView(e.buffer,e.byteOffset+c.byteOffset,h));const A=s.length;for(n=0;n<A;++n){const t=s[n].length,r=s[n].instances,i=getBinaryProperties(t,r,e);s[n].instances=combine(i,r)}const f=new Array(A).fill(0),d=new Uint16Array(o);for(n=0;n<o;++n)r=u[n],d[n]=f[r],++f[r];const p={classes:s,classIds:u,classIndexes:d,parentCounts:l,parentIndexes:a,parentIds:c};return function(t){const e=t.classIds.length;for(let n=0;n<e;++n)Hr(t,n,stack)}(p),p}(r,n):null}(this,this.json,this.binary))}getExtension(t){return this.json&&this.json.extensions&&this.json.extensions[t]}memorySizeInBytes(){return 0}isClass(t,e){return this._checkBatchId(t),(0,In.v)("string"==typeof e,e),!!this._hierarchy&&qr(Vr(this._hierarchy,t,(t,n)=>{const r=t.classIds[n];return t.classes[r].name===e}))}isExactClass(t,e){return(0,In.v)("string"==typeof e,e),this.getExactClassName(t)===e}getExactClassName(t){if(this._checkBatchId(t),this._hierarchy){const e=this._hierarchy.classIds[t];return this._hierarchy.classes[e].name}}hasProperty(t,e){return this._checkBatchId(t),(0,In.v)("string"==typeof e,e),qr(this._properties[e])||this._hasPropertyInHierarchy(t,e)}getPropertyNames(t,e){this._checkBatchId(t),(e=qr(e)?e:[]).length=0;const n=Object.keys(this._properties);return e.push(...n),this._hierarchy&&this._getPropertyNamesInHierarchy(t,e),e}getProperty(t,e){if(this._checkBatchId(t),(0,In.v)("string"==typeof e,e),this._binaryProperties){const n=this._binaryProperties[e];if(qr(n))return this._getBinaryProperty(n,t)}const n=this._properties[e];if(qr(n))return Wr(n[t]);if(this._hierarchy){const n=this._getHierarchyProperty(t,e);if(qr(n))return n}}setProperty(t,e,n){const r=this.featureCount;if(this._checkBatchId(t),(0,In.v)("string"==typeof e,e),this._binaryProperties){const r=this._binaryProperties[e];if(r)return void this._setBinaryProperty(r,t,n)}if(this._hierarchy&&this._setHierarchyProperty(this,t,e,n))return;let i=this._properties[e];qr(i)||(this._properties[e]=new Array(r),i=this._properties[e]),i[t]=Wr(n)}_checkBatchId(t){if(!(t>=0&&t<this.featureCount))throw new Error("batchId not in range [0, featureCount - 1].")}_getBinaryProperty(t,e){return t.unpack(t.typedArray,e)}_setBinaryProperty(t,e,n){t.pack(n,t.typedArray,e)}_initializeBinaryProperties(){let t=null;for(const e in this._properties){const n=this._properties[e],r=this._initializeBinaryProperty(e,n);r&&(t=t||{},t[e]=r)}return t}_initializeBinaryProperty(t,e){if("byteOffset"in e){const n=e;(0,In.v)(this.binary,"Property ".concat(t," requires a batch table binary.")),(0,In.v)(n.type,"Property ".concat(t," requires a type."));const r=function(t,e,n,r){const{componentType:i}=t;(0,In.v)(t.componentType);const o="string"==typeof i?Fr.fromName(i):i,s=jr[t.type],a=Ur[t.type],u=Gr[t.type];return n+=t.byteOffset,{values:Fr.createTypedArray(o,e,n,s*r),type:o,size:s,unpacker:a,packer:u}}(n,this.binary.buffer,0|this.binary.byteOffset,this.featureCount);return{typedArray:r.values,componentCount:r.size,unpack:r.unpacker,pack:r.packer}}return null}_hasPropertyInHierarchy(t,e){if(!this._hierarchy)return!1;const n=Vr(this._hierarchy,t,(t,n)=>{const r=t.classIds[n];return qr(t.classes[r].instances[e])});return qr(n)}_getPropertyNamesInHierarchy(t,e){Vr(this._hierarchy,t,(t,n)=>{const r=t.classIds[n],i=t.classes[r].instances;for(const t in i)i.hasOwnProperty(t)&&-1===e.indexOf(t)&&e.push(t)})}_getHierarchyProperty(t,e){return Vr(this._hierarchy,t,(t,n)=>{const r=t.classIds[n],i=t.classes[r],o=t.classIndexes[n],s=i.instances[e];return qr(s)?qr(s.typedArray)?this._getBinaryProperty(s,o):Wr(s[o]):null})}_setHierarchyProperty(t,e,n,r){const i=Vr(this._hierarchy,e,(t,i)=>{const o=t.classIds[i],s=t.classes[o],a=t.classIndexes[i],u=s.instances[n];return!!qr(u)&&((0,In.v)(i===e,'Inherited property "'.concat(n,'" is read-only.')),qr(u.typedArray)?this._setBinaryProperty(u,a,r):u[a]=Wr(r),!0)});return qr(i)}}function Qr(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=new DataView(e);if(t.magic=r.getUint32(n,!0),n+=4,t.version=r.getUint32(n,!0),n+=4,t.byteLength=r.getUint32(n,!0),n+=4,1!==t.version)throw new Error("3D Tile Version ".concat(t.version," not supported"));return n}const Jr="b3dm tile in legacy format.";function Zr(t,e,n){const r=new DataView(e);let i;t.header=t.header||{};let o=r.getUint32(n,!0);n+=4;let s=r.getUint32(n,!0);n+=4;let a=r.getUint32(n,!0);n+=4;let u=r.getUint32(n,!0);return n+=4,a>=570425344?(n-=8,i=o,a=s,u=0,o=0,s=0,console.warn(Jr)):u>=570425344&&(n-=4,i=a,a=o,u=s,o=0,s=0,console.warn(Jr)),t.header.featureTableJsonByteLength=o,t.header.featureTableBinaryByteLength=s,t.header.batchTableJsonByteLength=a,t.header.batchTableBinaryByteLength=u,t.header.batchLength=i,n}function Kr(t,e,n,r){return n=function(t,e,n){const{featureTableJsonByteLength:r,featureTableBinaryByteLength:i,batchLength:o}=t.header;if(t.featureTableJson={BATCH_LENGTH:o||0},r>0){const i=Ir(e,n,r);t.featureTableJson=JSON.parse(i)}return n+=r,t.featureTableBinary=new Uint8Array(e,n,i),n+=i}(t,e,n),n=function(t,e,n){const{batchTableJsonByteLength:r,batchTableBinaryByteLength:i}=t.header;if(r>0){const o=Ir(e,n,r);t.batchTableJson=JSON.parse(o),n+=r,i>0&&(t.batchTableBinary=new Uint8Array(e,n,i),t.batchTableBinary=new Uint8Array(t.batchTableBinary),n+=i)}return n}(t,e,n),n}function $r(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];const n=t>>11&31,r=t>>5&63,i=31&t;return e[0]=n<<3,e[1]=r<<2,e[2]=i<<3,e}function ti(t,e,n){if(!(e||t&&t.batchIds&&n))return null;const{batchIds:r,isRGB565:i,pointCount:o}=t;if(r&&n){const t=new Uint8ClampedArray(3*o);for(let e=0;e<o;e++){const i=r[e],o=n.getProperty(i,"dimensions").map(t=>255*t);t[3*e]=o[0],t[3*e+1]=o[1],t[3*e+2]=o[2]}return{type:Lr.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}if(i){const t=new Uint8ClampedArray(3*o);for(let n=0;n<o;n++){const r=$r(e[n]);t[3*n]=r[0],t[3*n+1]=r[1],t[3*n+2]=r[2]}return{type:Lr.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}return e&&e.length===3*o?{type:Lr.UNSIGNED_BYTE,value:e,size:3,normalized:!0}:{type:Lr.UNSIGNED_BYTE,value:e,size:4,normalized:!0}}var ei=n(40306);function ni(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:255;return(0,ht.qE)(t,0,e)/e*2-1}function ri(t){return t<0?-1:1}function ii(t,e,n){return function(t,e,n,r){if(function(t){if(!t)throw new Error("math.gl assertion failed. ".concat(void 0))}(r),t<0||t>n||e<0||e>n)throw new Error("x and y must be unsigned normalized integers between 0 and ".concat(n));if(r.x=ni(t,n),r.y=ni(e,n),r.z=1-(Math.abs(r.x)+Math.abs(r.y)),r.z<0){const t=r.x;r.x=(1-Math.abs(r.y))*ri(t),r.y=(1-Math.abs(t))*ri(r.y)}return r.normalize()}(t,e,255,n)}new ei.A,new gt.A,new ei.A,new ei.A,new Uint8Array(1);const oi=new gt.A;async function si(t,e,n,r,i){n=Kr(t,e,n=Zr(t,e,n=Qr(t,e,n))),function(t){t.attributes={positions:null,colors:null,normals:null,batchIds:null}
2,t.isQuantized=!1,t.isTranslucent=!1,t.isRGB565=!1,t.isOctEncoded16P=!1}(t);const{featureTable:o,batchTable:s}=function(t){const e=new Dr(t.featureTableJson,t.featureTableBinary),n=e.getGlobalProperty("POINTS_LENGTH");if(!Number.isFinite(n))throw new Error("POINTS_LENGTH must be defined");e.featuresLength=n,t.featuresLength=n,t.pointsLength=n,t.pointCount=n,t.rtcCenter=e.getGlobalProperty("RTC_CENTER",Lr.FLOAT,3);const r=function(t,e){let n=null;if(!t.batchIds&&e.hasProperty("BATCH_ID")&&(t.batchIds=e.getPropertyArray("BATCH_ID",Lr.UNSIGNED_SHORT,1),t.batchIds)){const r=e.getGlobalProperty("BATCH_LENGTH");if(!r)throw new Error("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");const{batchTableJson:i,batchTableBinary:o}=t;n=new Yr(i,o,r)}return n}(t,e);return{featureTable:e,batchTable:r}}(t);return await async function(t,e,n,r,i){let o,s,a;const u=t.batchTableJson&&t.batchTableJson.extensions&&t.batchTableJson.extensions["3DTILES_draco_point_compression"];u&&(a=u.properties);const l=e.getExtension("3DTILES_draco_point_compression");if(l){s=l.properties;const e=l.byteOffset,n=l.byteLength;if(!s||!Number.isFinite(e)||!n)throw new Error("Draco properties, byteOffset, and byteLength must be defined");o=t.featureTableBinary.slice(e,e+n),t.hasPositions=Number.isFinite(s.POSITION),t.hasColors=Number.isFinite(s.RGB)||Number.isFinite(s.RGBA),t.hasNormals=Number.isFinite(s.NORMAL),t.hasBatchIds=Number.isFinite(s.BATCH_ID),t.isTranslucent=Number.isFinite(s.RGBA)}if(!o)return!0;const c={buffer:o,properties:{...s,...a},featureTableProperties:s,batchTableProperties:a,dequantizeInShader:!1};return await async function(t,e,n,r){const{parse:i}=r,o={...n,draco:{...n.draco,extraAttributes:e.batchTableProperties||{}}};delete o["3d-tiles"];const s=await i(e.buffer,Or.Vl,o),a=s.attributes.POSITION&&s.attributes.POSITION.value,u=s.attributes.COLOR_0&&s.attributes.COLOR_0.value,l=s.attributes.NORMAL&&s.attributes.NORMAL.value,c=s.attributes.BATCH_ID&&s.attributes.BATCH_ID.value,h=a&&s.attributes.POSITION.value.quantization,A=l&&s.attributes.NORMAL.value.quantization;if(h){const e=s.POSITION.data.quantization,n=e.range;t.quantizedVolumeScale=new gt.A(n,n,n),t.quantizedVolumeOffset=new gt.A(e.minValues),t.quantizedRange=(1<<e.quantizationBits)-1,t.isQuantizedDraco=!0}A&&(t.octEncodedRange=(1<<s.NORMAL.data.quantization.quantizationBits)-1,t.isOctEncodedDraco=!0);const f={};if(e.batchTableProperties)for(const t of Object.keys(e.batchTableProperties))s.attributes[t]&&s.attributes[t].value&&(f[t.toLowerCase()]=s.attributes[t].value);t.attributes={positions:a,colors:ti(t,u,void 0),normals:l,batchIds:c,...f}}(t,c,r,i)}(t,o,0,r,i),function(t,e,n){if(!t.attributes.positions)if(e.hasProperty("POSITION"))t.attributes.positions=e.getPropertyArray("POSITION",Lr.FLOAT,3);else if(e.hasProperty("POSITION_QUANTIZED")){const r=e.getPropertyArray("POSITION_QUANTIZED",Lr.UNSIGNED_SHORT,3);if(t.isQuantized=!0,t.quantizedRange=65535,t.quantizedVolumeScale=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Lr.FLOAT,3),!t.quantizedVolumeScale)throw new Error("QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(t.quantizedVolumeOffset=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Lr.FLOAT,3),!t.quantizedVolumeOffset)throw new Error("QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");t.attributes.positions=function(t,e,n){return t.isQuantized?n["3d-tiles"]&&n["3d-tiles"].decodeQuantizedPositions?(t.isQuantized=!1,function(t,e){const n=new gt.A,r=new Float32Array(3*t.pointCount);for(let i=0;i<t.pointCount;i++)n.set(e[3*i],e[3*i+1],e[3*i+2]).scale(1/t.quantizedRange).multiply(t.quantizedVolumeScale).add(t.quantizedVolumeOffset).toArray(r,3*i);return r}(t,e)):{type:Lr.UNSIGNED_SHORT,value:e,size:3,normalized:!0}:e}(t,r,n)}if(!t.attributes.positions)throw new Error("Either POSITION or POSITION_QUANTIZED must be defined.")}(t,o,r),function(t,e,n){if(!t.attributes.colors){let r=null;e.hasProperty("RGBA")?(r=e.getPropertyArray("RGBA",Lr.UNSIGNED_BYTE,4),t.isTranslucent=!0):e.hasProperty("RGB")?r=e.getPropertyArray("RGB",Lr.UNSIGNED_BYTE,3):e.hasProperty("RGB565")&&(r=e.getPropertyArray("RGB565",Lr.UNSIGNED_SHORT,1),t.isRGB565=!0),t.attributes.colors=ti(t,r,n)}e.hasProperty("CONSTANT_RGBA")&&(t.constantRGBA=e.getGlobalProperty("CONSTANT_RGBA",Lr.UNSIGNED_BYTE,4))}(t,o,s),function(t,e){if(!t.attributes.normals){let n=null;e.hasProperty("NORMAL")?n=e.getPropertyArray("NORMAL",Lr.FLOAT,3):e.hasProperty("NORMAL_OCT16P")&&(n=e.getPropertyArray("NORMAL_OCT16P",Lr.UNSIGNED_BYTE,2),t.isOctEncoded16P=!0),t.attributes.normals=function(t,e){if(!e)return null;if(t.isOctEncoded16P){const n=new Float32Array(3*t.pointsLength);for(let r=0;r<t.pointsLength;r++)ii(e[2*r],e[2*r+1],oi),oi.toArray(n,3*r);return{type:Lr.FLOAT,size:2,value:n}}return{type:Lr.FLOAT,size:2,value:e}}(t,n)}}(t,o),n}var ai=n(34898),ui=n(29465),li=n(19044);function ci(t,e,n,r){t.rotateYtoZ=!0;const i=t.byteOffset+t.byteLength-n;if(0===i)throw new Error("glTF byte length must be greater than 0.");return t.gltfUpAxis=r["3d-tiles"]&&r["3d-tiles"].assetGltfUpAxis?r["3d-tiles"].assetGltfUpAxis:"Y",t.gltfArrayBuffer=(0,li._m)(e,n,i),t.gltfByteOffset=0,t.gltfByteLength=i,n%4==0||console.warn("".concat(t.type,": embedded glb is not aligned to a 4-byte boundary.")),t.byteOffset+t.byteLength}async function hi(t,e,n,r){const i=n["3d-tiles"]||{};if(function(t,e){switch(e){case 0:const e=new Uint8Array(t.gltfArrayBuffer,t.gltfByteOffset),n=(new TextDecoder).decode(e);t.gltfUrl=n.replace(/[\s\0]+$/,""),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength;break;case 1:break;default:throw new Error("b3dm: Illegal glTF format field")}}(t,e),i.loadGLTF){const{parse:e,fetch:i}=r;t.gltfUrl&&(t.gltfArrayBuffer=await i(t.gltfUrl,n),t.gltfByteOffset=0),t.gltfArrayBuffer&&(t.gltf=await e(t.gltfArrayBuffer,ai.B,n,r),t.gpuMemoryUsageInBytes=(0,ui.S3)(t.gltf),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength)}}async function Ai(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};switch(i.byteOffset=e,i.type=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=new DataView(t);return"".concat(String.fromCharCode(n.getUint8(e+0))).concat(String.fromCharCode(n.getUint8(e+1))).concat(String.fromCharCode(n.getUint8(e+2))).concat(String.fromCharCode(n.getUint8(e+3)))}(t,e),i.type){case Mr.COMPOSITE:return await async function(t,e,n,r,i,o){n=Qr(t,e,n);const s=new DataView(e);for(t.tilesLength=s.getUint32(n,!0),n+=4,t.tiles=[];t.tiles.length<t.tilesLength&&t.byteLength-n>12;){const s={};t.tiles.push(s),n=await o(e,n,r,i,s)}return n}(i,t,e,n,r,Ai);case Mr.BATCHED_3D_MODEL:return await async function(t,e,n,r,i){var o;n=function(t,e,n,r){n=ci(t,e,n=Kr(t,e,n=Zr(t,e,n=Qr(t,e,n))),r);const i=new Dr(t.featureTableJson,t.featureTableBinary);return t.rtcCenter=i.getGlobalProperty("RTC_CENTER",Lr.FLOAT,3),n}(t,e,n,r),await hi(t,1,r,i);const s=null==t||null===(o=t.gltf)||void 0===o?void 0:o.extensions;return s&&s.CESIUM_RTC&&(t.rtcCenter=s.CESIUM_RTC.center),n}(i,t,e,n,r);case Mr.GLTF:return await async function(t,e,n,r){t.rotateYtoZ=!0,t.gltfUpAxis=n["3d-tiles"]&&n["3d-tiles"].assetGltfUpAxis?n["3d-tiles"].assetGltfUpAxis:"Y";const{parse:i}=r;t.gltf=await i(e,ai.B,n,r),t.gpuMemoryUsageInBytes=(0,ui.S3)(t.gltf)}(i,t,n,r);case Mr.INSTANCED_3D_MODEL:return await async function(t,e,n,r,i){return n=function(t,e,n,r){if(n=Qr(t,e,n),1!==t.version)throw new Error("Instanced 3D Model version ".concat(t.version," is not supported"));n=Zr(t,e,n);const i=new DataView(e);if(t.gltfFormat=i.getUint32(n,!0),n=ci(t,e,n=Kr(t,e,n+=4),r),0===t.featureTableJsonByteLength)throw new Error("i3dm parser: featureTableJsonByteLength is zero.");const o=new Dr(t.featureTableJson,t.featureTableBinary),s=o.getGlobalProperty("INSTANCES_LENGTH");
2if(o.featuresLength=s,!Number.isFinite(s))throw new Error("i3dm parser: INSTANCES_LENGTH must be defined");return t.eastNorthUp=o.getGlobalProperty("EAST_NORTH_UP"),t.rtcCenter=o.getGlobalProperty("RTC_CENTER",Lr.FLOAT,3),new Yr(t.batchTableJson,t.batchTableBinary,s),function(t,e,n,r){const i=[new Array(r),t._batchTable][0],o=new gt.A,s=new gt.A,a=new gt.A,u=new gt.A,l=new xt.A,c=new St.A,h=new gt.A,A={},f=new ct.A,d=[],p=[],g=new gt.A,m=new gt.A;for(let n=0;n<r;n++){let r;if(e.hasProperty("POSITION"))r=e.getProperty("POSITION",Lr.FLOAT,3,n,o);else if(e.hasProperty("POSITION_QUANTIZED")){r=e.getProperty("POSITION_QUANTIZED",Lr.UNSIGNED_SHORT,3,n,o);const t=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Lr.FLOAT,3,g);if(!t)throw new Error("i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");const i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Lr.FLOAT,3,m);if(!i)throw new Error("i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");const s=65535;for(let e=0;e<3;e++)r[e]=r[e]/s*i[e]+t[e]}if(!r)throw new Error("i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.");o.copy(r),A.translation=o,t.normalUp=e.getProperty("NORMAL_UP",Lr.FLOAT,3,n,d),t.normalRight=e.getProperty("NORMAL_RIGHT",Lr.FLOAT,3,n,p);const y=!1;if(t.normalUp){if(!t.normalRight)throw new Error("i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.");t.hasCustomOrientation=!0}else{if(t.octNormalUp=e.getProperty("NORMAL_UP_OCT32P",Lr.UNSIGNED_SHORT,2,d),t.octNormalRight=e.getProperty("NORMAL_RIGHT_OCT32P",Lr.UNSIGNED_SHORT,2,p),t.octNormalUp){if(!t.octNormalRight)throw new Error("i3dm: oct-encoded orientation requires NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P");throw new Error("i3dm: oct-encoded orientation not implemented")}t.eastNorthUp?(Sn.WGS84.eastNorthUpToFixedFrame(o,f),f.getRotationMatrix3(l)):l.identity()}y&&(u.copy(s).cross(a).normalize(),l.setColumn(0,s),l.setColumn(1,a),l.setColumn(2,u)),c.fromMatrix3(l),A.rotation=c,h.set(1,1,1);const v=e.getProperty("SCALE",Lr.FLOAT,1,n);Number.isFinite(v)&&h.multiplyByScalar(v);const _=e.getProperty("SCALE_NON_UNIFORM",Lr.FLOAT,3,n,d);_&&h.scale(_),A.scale=h;let b=e.getProperty("BATCH_ID",Lr.UNSIGNED_SHORT,1,n);void 0===b&&(b=n);const w=(new ct.A).fromQuaternion(A.rotation);f.identity(),f.translate(A.translation),f.multiplyRight(w),f.scale(A.scale);const E=f.clone();i[n]={modelMatrix:E,batchId:b}}t.instances=i}(t,o,0,s),n}(t,e,n,r),await hi(t,t.gltfFormat,r,i),n}(i,t,e,n,r);case Mr.POINT_CLOUD:return await si(i,t,e,n,r);default:throw new Error("3DTileLoader: unknown type ".concat(i.type))}}async function fi(t,e,n,r){const i=t[e].bufferView,o=t.bufferViews[i],s=t.buffers[o.buffer];if(null==r||!r.url||!r.fetch)throw new Error("Url is not provided");if(!r.fetch)throw new Error("fetch is not provided");if(s.uri){const t=function(t,e){if(e.startsWith("http")){const n=new URL(t,e);return decodeURI(n.toString())}const n="http://".concat(e),r=new URL(t,n);return"/".concat(r.host).concat(r.pathname)}(s.uri,null==r?void 0:r.url),e=await r.fetch(t),n=await e.arrayBuffer();return new Uint8Array(n,o.byteOffset,o.byteLength)}return new Uint8Array(n,o.byteOffset,o.byteLength)}function di(t){const e=new DataView(t);return e.getUint32(0,!0)+2**32*e.getUint32(4,!0)}const pi={id:"3d-tiles-subtree",name:"3D Tiles Subtree",module:"3d-tiles",version:Cr,extensions:["subtree"],mimeTypes:["application/octet-stream"],tests:["subtree"],parse:async function(t,e,n){if(1952609651!==new Uint32Array(t.slice(0,4))[0])throw new Error("Wrong subtree file magic number");if(1!==new Uint32Array(t.slice(4,8))[0])throw new Error("Wrong subtree file verson, must be 1");const r=di(t.slice(8,16)),i=new Uint8Array(t,24,r),o=new TextDecoder("utf8").decode(i),s=JSON.parse(o),a=di(t.slice(16,24));let u=new ArrayBuffer(0);return a&&(u=t.slice(24+r)),"bufferView"in s.tileAvailability&&(s.tileAvailability.explicitBitstream=await fi(s,"tileAvailability",u,n)),"bufferView"in s.contentAvailability&&(s.contentAvailability.explicitBitstream=await fi(s,"contentAvailability",u,n)),"bufferView"in s.childSubtreeAvailability&&(s.childSubtreeAvailability.explicitBitstream=await fi(s,"childSubtreeAvailability",u,n)),s},options:{}};var gi=null;try{gi=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function mi(t,e,n){this.low=0|t,this.high=0|e,this.unsigned=!!n}function yi(t){return!0===(t&&t.__isLong__)}function vi(t){var e=Math.clz32(t&-t);return t?31-e:e}
vendor: 7,872 bytes, line 2
2mi.prototype.__isLong__,Object.defineProperty(mi.prototype,"__isLong__",{value:!0}),mi.isLong=yi;var _i={},bi={};function wi(t,e){var n,r,i;return e?(i=0<=(t>>>=0)&&t<256)&&(r=bi[t])?r:(n=xi(t,0,!0),i&&(bi[t]=n),n):(i=-128<=(t|=0)&&t<128)&&(r=_i[t])?r:(n=xi(t,t<0?-1:0,!1),i&&(_i[t]=n),n)}function Ei(t,e){if(isNaN(t))return e?Li:Ri;if(e){if(t<0)return Li;if(t>=Mi)return Di}else{if(t<=-Ii)return ji;if(t+1>=Ii)return Fi}return t<0?Ei(-t,e).neg():xi(t%Ci|0,t/Ci|0,e)}function xi(t,e,n){return new mi(t,e,n)}mi.fromInt=wi,mi.fromNumber=Ei,mi.fromBits=xi;var Si=Math.pow;function Ti(t,e,n){if(0===t.length)throw Error("empty string");if("number"==typeof e?(n=e,e=!1):e=!!e,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e?Li:Ri;if((n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return Ti(t.substring(1),e,n).neg();for(var i=Ei(Si(n,8)),o=Ri,s=0;s<t.length;s+=8){var a=Math.min(8,t.length-s),u=parseInt(t.substring(s,s+a),n);if(a<8){var l=Ei(Si(n,a));o=o.mul(l).add(Ei(u))}else o=(o=o.mul(i)).add(Ei(u))}return o.unsigned=e,o}function Pi(t,e){return"number"==typeof t?Ei(t,e):"string"==typeof t?Ti(t,e):xi(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}mi.fromString=Ti,mi.fromValue=Pi;var Ci=4294967296,Mi=Ci*Ci,Ii=Mi/2,Oi=wi(1<<24),Ri=wi(0);mi.ZERO=Ri;var Li=wi(0,!0);mi.UZERO=Li;var Bi=wi(1);mi.ONE=Bi;var ki=wi(1,!0);mi.UONE=ki;var Ni=wi(-1);mi.NEG_ONE=Ni;var Fi=xi(-1,2147483647,!1);mi.MAX_VALUE=Fi;var Di=xi(-1,-1,!0);mi.MAX_UNSIGNED_VALUE=Di;var ji=xi(0,-2147483648,!1);mi.MIN_VALUE=ji;var Ui=mi.prototype;Ui.toInt=function(){return this.unsigned?this.low>>>0:this.low},Ui.toNumber=function(){return this.unsigned?(this.high>>>0)*Ci+(this.low>>>0):this.high*Ci+(this.low>>>0)},Ui.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(ji)){var e=Ei(t),n=this.div(e),r=n.mul(e).sub(this);return n.toString(t)+r.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=Ei(Si(t,6),this.unsigned),o=this,s="";;){var a=o.div(i),u=(o.sub(a.mul(i)).toInt()>>>0).toString(t);if((o=a).isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},Ui.getHighBits=function(){return this.high},Ui.getHighBitsUnsigned=function(){return this.high>>>0},Ui.getLowBits=function(){return this.low},Ui.getLowBitsUnsigned=function(){return this.low>>>0},Ui.getNumBitsAbs=function(){if(this.isNegative())return this.eq(ji)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},Ui.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&-1===t&&!(0===this.low&&-2097152===this.high)},Ui.isZero=function(){return 0===this.high&&0===this.low},Ui.eqz=Ui.isZero,Ui.isNegative=function(){return!this.unsigned&&this.high<0},Ui.isPositive=function(){return this.unsigned||this.high>=0},Ui.isOdd=function(){return!(1&~this.low)},Ui.isEven=function(){return!(1&this.low)},Ui.equals=function(t){return yi(t)||(t=Pi(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},Ui.eq=Ui.equals,Ui.notEquals=function(t){return!this.eq(t)},Ui.neq=Ui.notEquals,Ui.ne=Ui.notEquals,Ui.lessThan=function(t){return this.comp(t)<0},Ui.lt=Ui.lessThan,Ui.lessThanOrEqual=function(t){return this.comp(t)<=0},Ui.lte=Ui.lessThanOrEqual,Ui.le=Ui.lessThanOrEqual,Ui.greaterThan=function(t){return this.comp(t)>0},Ui.gt=Ui.greaterThan,Ui.greaterThanOrEqual=function(t){return this.comp(t)>=0},Ui.gte=Ui.greaterThanOrEqual,Ui.ge=Ui.greaterThanOrEqual,Ui.compare=function(t){if(yi(t)||(t=Pi(t)),this.eq(t))return 0;var e=this.isNegative(),n=t.isNegative();return e&&!n?-1:!e&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},Ui.comp=Ui.compare,Ui.negate=function(){return!this.unsigned&&this.eq(ji)?ji:this.not().add(Bi)},Ui.neg=Ui.negate,Ui.add=function(t){yi(t)||(t=Pi(t));var e=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,o=t.high>>>16,s=65535&t.high,a=t.low>>>16,u=0,l=0,c=0,h=0;return c+=(h+=i+(65535&t.low))>>>16,l+=(c+=r+a)>>>16,u+=(l+=n+s)>>>16,u+=e+o,xi((c&=65535)<<16|(h&=65535),(u&=65535)<<16|(l&=65535),this.unsigned)},Ui.subtract=function(t){return yi(t)||(t=Pi(t)),this.add(t.neg())},Ui.sub=Ui.subtract,Ui.multiply=function(t){if(this.isZero())return this;if(yi(t)||(t=Pi(t)),gi)return xi(gi.mul(this.low,this.high,t.low,t.high),gi.get_high(),this.unsigned);if(t.isZero())return this.unsigned?Li:Ri;if(this.eq(ji))return t.isOdd()?ji:Ri;if(t.eq(ji))return this.isOdd()?ji:Ri;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Oi)&&t.lt(Oi))return Ei(this.toNumber()*t.toNumber(),this.unsigned);var e=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,o=t.high>>>16,s=65535&t.high,a=t.low>>>16,u=65535&t.low,l=0,c=0,h=0,A=0;return h+=(A+=i*u)>>>16,c+=(h+=r*u)>>>16,h&=65535,c+=(h+=i*a)>>>16,l+=(c+=n*u)>>>16,c&=65535,l+=(c+=r*a)>>>16,c&=65535,l+=(c+=i*s)>>>16,l+=e*u+n*a+r*s+i*o,xi((h&=65535)<<16|(A&=65535),(l&=65535)<<16|(c&=65535),this.unsigned)},Ui.mul=Ui.multiply,Ui.divide=function(t){if(yi(t)||(t=Pi(t)),t.isZero())throw Error("division by zero");var e,n,r;if(gi)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?xi((this.unsigned?gi.div_u:gi.div_s)(this.low,this.high,t.low,t.high),gi.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?Li:Ri;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Li;if(t.gt(this.shru(1)))return ki;r=Li}else{if(this.eq(ji))return t.eq(Bi)||t.eq(Ni)?ji:t.eq(ji)?Bi:(e=this.shr(1).div(t).shl(1)).eq(Ri)?t.isNegative()?Bi:Ni:(n=this.sub(t.mul(e)),r=e.add(n.div(t)));if(t.eq(ji))return this.unsigned?Li:Ri;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=Ri}for(n=this;n.gte(t);){e=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var i=Math.ceil(Math.log(e)/Math.LN2),o=i<=48?1:Si(2,i-48),s=Ei(e),a=s.mul(t);a.isNegative()||a.gt(n);)a=(s=Ei(e-=o,this.unsigned)).mul(t);s.isZero()&&(s=Bi),r=r.add(s),n=n.sub(a)}return r},Ui.div=Ui.divide,Ui.modulo=function(t){return yi(t)||(t=Pi(t)),gi?xi((this.unsigned?gi.rem_u:gi.rem_s)(this.low,this.high,t.low,t.high),gi.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},Ui.mod=Ui.modulo,Ui.rem=Ui.modulo,Ui.not=function(){return xi(~this.low,~this.high,this.unsigned)},Ui.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},Ui.clz=Ui.countLeadingZeros,Ui.countTrailingZeros=function(){return this.low?vi(this.low):vi(this.high)+32},Ui.ctz=Ui.countTrailingZeros,Ui.and=function(t){return yi(t)||(t=Pi(t)),xi(this.low&t.low,this.high&t.high,this.unsigned)},Ui.or=function(t){return yi(t)||(t=Pi(t)),xi(this.low|t.low,this.high|t.high,this.unsigned)},Ui.xor=function(t){return yi(t)||(t=Pi(t)),xi(this.low^t.low,this.high^t.high,this.unsigned)},Ui.shiftLeft=function(t){return yi(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?xi(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):xi(0,this.low<<t-32,this.unsigned)},Ui.shl=Ui.shiftLeft,Ui.shiftRight=function(t){return yi(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?xi(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):xi(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Ui.shr=Ui.shiftRight,Ui.shiftRightUnsigned=function(t){return yi(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?xi(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):xi(32===t?this.high:this.high>>>t-32,0,this.unsigned)},Ui.shru=Ui.shiftRightUnsigned,Ui.shr_u=Ui.shiftRightUnsigned,Ui.rotateLeft=function(t){var e;return yi(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?xi(this.high,this.low,this.unsigned):t<32?
2(e=32-t,xi(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned)):(e=32-(t-=32),xi(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned))},Ui.rotl=Ui.rotateLeft,Ui.rotateRight=function(t){var e;return yi(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?xi(this.high,this.low,this.unsigned):t<32?(e=32-t,xi(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned)):(e=32-(t-=32),xi(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned))},Ui.rotr=Ui.rotateRight,Ui.toSigned=function(){return this.unsigned?xi(this.low,this.high,!1):this},Ui.toUnsigned=function(){return this.unsigned?this:xi(this.low,this.high,!0)},Ui.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Ui.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},Ui.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},mi.fromBytes=function(t,e,n){return n?mi.fromBytesLE(t,e):mi.fromBytesBE(t,e)},mi.fromBytesLE=function(t,e){return new mi(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},mi.fromBytesBE=function(t,e){return new mi(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)},"function"==typeof BigInt&&(mi.fromBigInt=function(t,e){return xi(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),e)},mi.fromValue=function(t,e){return"bigint"==typeof t?mi.fromBigInt(t,e):Pi(t,e)},Ui.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t});const Gi=mi;function zi(t){"X"===t&&(t="");const e=t.padEnd(16,"0");return Gi.fromString(e,!0,16)}const Vi=180/Math.PI;function Hi(t,e,n){const r=1<<e;return[(t[0]+n[0])/r,(t[1]+n[1])/r]}function qi(t){return t>=.5?1/3*(4*t*t-1):1/3*(1-4*(1-t)*(1-t))}function Wi(t){return[qi(t[0]),qi(t[1])]}function Xi(t,e){let[n,r]=e;switch(t){case 0:return[1,n,r];case 1:return[-n,1,r];case 2:return[-n,-r,1];case 3:return[-1,-r,-n];case 4:return[r,-1,-n];case 5:return[r,n,-1];default:throw new Error("Invalid face")}}function Yi(t){let[e,n,r]=t;const i=Math.atan2(r,Math.sqrt(e*e+n*n));return[Math.atan2(n,e)*Vi,i*Vi]}function Qi(t,e,n,r){if(0===r){1===n&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);const r=e[0];e[0]=e[1],e[1]=r}}function Ji(t){const e=function(t){if(t.indexOf("/")>0)return t;return function(t){if(t.isZero())return"";let e=t.toString(2);for(;e.length<64;)e="0"+e;const n=e.lastIndexOf("1"),r=e.substring(0,3),i=e.substring(3,n),o=i.length/2,s=Gi.fromString(r,!0,2).toString(10);let a="";if(0!==o)for(a=Gi.fromString(i,!0,2).toString(4);a.length<o;)a="0"+a;return"".concat(s,"/").concat(a)}(zi(t))}(t),n=function(t){if(0===t.length)throw new Error("Invalid Hilbert quad key ".concat(t));const e=t.split("/"),n=parseInt(e[0],10),r=e[1],i=r.length;let o=0;const s=[0,0];for(let t=i-1;t>=0;t--){o=i-t;const e=r[t];let n=0,a=0;"1"===e?a=1:"2"===e?(n=1,a=1):"3"===e&&(n=1);const u=Math.pow(2,o-1);Qi(u,s,n,a),s[0]+=u*n,s[1]+=u*a}if(n%2==1){const t=s[0];s[0]=s[1],s[1]=t}return{face:n,ij:s,level:o}}(e);return n}function Zi(t){const{face:e,ij:n,level:r}=t,i=[[0,0],[0,1],[1,1],[1,0],[0,0]],o=Math.max(1,Math.ceil(100*Math.pow(2,-r))),s=new Float64Array(4*o*2+2);let a=0,u=0;for(let t=0;t<4;t++){const l=i[t].slice(0),c=i[t+1],h=(c[0]-l[0])/o,A=(c[1]-l[1])/o;for(let t=0;t<o;t++){l[0]+=h,l[1]+=A;const t=Yi(Xi(e,Wi(Hi(n,r,l))));Math.abs(t[1])>89.999&&(t[0]=u);const i=t[0]-u;t[0]+=i>180?-360:i<-180?360:0,s[a++]=t[0],s[a++]=t[1],u=t[0]}}return s[a++]=s[0],s[a++]=s[1],s}function Ki(t){if(t.length%2!=0)throw new Error("Invalid corners");const e=[],n=[];for(let r=0;r<t.length;r+=2)e.push(t[r]),n.push(t[r+1]);return e.sort((t,e)=>t-e),n.sort((t,e)=>t-e),{west:e[0],east:e[e.length-1],north:n[n.length-1],south:n[0]}}function $i(t){const e=t.token,n={minimumHeight:t.minimumHeight,maximumHeight:t.maximumHeight},r=function(t,e){const n=(null==e?void 0:e.minimumHeight)||0,r=(null==e?void 0:e.maximumHeight)||0,i=function(t){let e;if(2===t.face||5===t.face){let n=null,r=0;for(let e=0;e<4;e++){const i=Zi(Ji("".concat(t.face,"/").concat(e)));null==n&&(n=new Float64Array(4*i.length)),n.set(i,r),r+=i.length}e=Ki(n)}else e=Ki(Zi(t));return e}(Ji(t)),o=i.west,s=i.south,a=i.east,u=i.north,l=[];return l.push(new gt.A(o,u,n)),l.push(new gt.A(a,u,n)),l.push(new gt.A(a,s,n)
2),l.push(new gt.A(o,s,n)),l.push(new gt.A(o,u,r)),l.push(new gt.A(a,u,r)),l.push(new gt.A(a,s,r)),l.push(new gt.A(o,s,r)),l}(e,n),i=function(t){const e=Wi(Hi(t.ij,t.level,[.5,.5]));return Yi(Xi(t.face,e))}(Ji(e)),o=i[0],s=i[1],a=Sn.WGS84.cartographicToCartesian([o,s,n.maximumHeight]),u=new gt.A(a[0],a[1],a[2]);r.push(u);const l=oe(r);return[...l.center,...l.halfAxes]}const to={QUADTREE:4,OCTREE:8};function eo(t,e,n){if(null!=t&&t.box){const r=function(t,e){const n=function(t){return t.and(t.not().add(1))}(t).shiftRightUnsigned(2);return t.add(Gi.fromNumber(2*e+1-4).multiply(n))}(zi(t.s2VolumeInfo.token),e),i=function(t){if(t.isZero())return"X";let e=t.countTrailingZeros();e=(e-e%4)/4;const n=e;e*=4;const r=t.shiftRightUnsigned(e).toString(16).replace(/0+$/,"");return Array(17-n-r.length).join("0")+r}(r),o={...t.s2VolumeInfo};if(o.token=i,"OCTREE"===n){const e=t.s2VolumeInfo,n=e.maximumHeight-e.minimumHeight,r=n/2,i=e.minimumHeight+n/2;e.minimumHeight=i-r,e.maximumHeight=i+r}return{box:$i(o),s2VolumeInfo:o}}}async function no(t){const{options:e,parentData:n={mortonIndex:0,x:0,y:0,z:0},childIndex:r=0,globalData:i={level:0,mortonIndex:0,x:0,y:0,z:0},s2VolumeBox:o}=t;let{subtree:s,level:a=0}=t;const{subdivisionScheme:u,subtreeLevels:l,maximumLevel:c,contentUrlTemplate:h,subtreesUriTemplate:A,basePath:f}=e,d={children:[],lodMetricValue:0,contentUrl:""},p=to[u],g=1&r,m=r>>1&1,y=r>>2&1,v=(p**a-1)/(p-1);let _=oo(n.mortonIndex,r),b=v+_,w=oo(n.x,g),E=oo(n.y,m),x=oo(n.z,y),S=!1;a+1>l&&(S=ro(s.childSubtreeAvailability,_));const T=oo(i.x,w),P=oo(i.y,E),C=oo(i.z,x),M=a+i.level;if(S){const t=so("".concat(f,"/").concat(A),M,T,P,C);s=await(0,$e.H)(t,pi),i.mortonIndex=_,i.x=w,i.y=E,i.z=x,i.level=a,_=0,b=0,w=0,E=0,x=0,a=0}if(!ro(s.tileAvailability,b)||a>c)return d;ro(s.contentAvailability,b)&&(d.contentUrl=so(h,M,T,P,C));const I=a+1,O={mortonIndex:_,x:w,y:E,z:x};for(let t=0;t<p;t++){const n=eo(o,t,u),r=await no({subtree:s,options:e,parentData:O,childIndex:t,level:I,globalData:i,s2VolumeBox:n});if(r.contentUrl||r.children.length){const t=io(r,M+1,{childTileX:w,childTileY:E,childTileZ:x},e,o);d.children.push(t)}}return d}function ro(t,e){return"constant"in t?Boolean(t.constant):!!t.explicitBitstream&&function(t,e){const n=t%8;return 1==(e[Math.floor(t/8)]>>n&1)}(e,t.explicitBitstream)}function io(t,e,n,r,i){const{basePath:o,refine:s,getRefine:a,lodMetricType:u,getTileType:l,rootLodMetricValue:c,rootBoundingVolume:h}=r,A=t.contentUrl&&t.contentUrl.replace("".concat(o,"/"),""),f=c/2**e,d=function(t,e,n){if(e.region){const{childTileX:r,childTileY:i,childTileZ:o}=n,[s,a,u,l,c,h]=e.region,A=2**t,f=(u-s)/A,d=(l-a)/A,p=(h-c)/A,[g,m]=[s+f*r,s+f*(r+1)],[y,v]=[a+d*i,a+d*(i+1)],[_,b]=[c+p*o,c+p*(o+1)];return{region:[g,y,m,v,_,b]}}if(e.box)return e;throw new Error("Unsupported bounding volume type ".concat(e))}(e,null!=i&&i.box?{box:i.box}:h,n);return{children:t.children,contentUrl:t.contentUrl,content:{uri:A},id:t.contentUrl,refine:a(s),type:l(t),lodMetricType:u,lodMetricValue:f,geometricError:f,transform:t.transform,boundingVolume:d}}function oo(t,e){return parseInt(t.toString(2)+e.toString(2),2)}function so(t,e,n,r,i){const o=function(t){const e={};for(const n in t)e["{".concat(n,"}")]=t[n];return e}({level:e,x:n,y:r,z:i});return t.replace(/{level}|{x}|{y}|{z}/gi,t=>o[t])}function ao(t){if(!t.contentUrl)return"empty";const e=t.contentUrl.split("?")[0].split(".").pop();switch(e){case"pnts":return Gn;case"i3dm":case"b3dm":case"glb":case"gltf":return Un;default:return e}}function uo(t){switch(t){case"REPLACE":case"replace":return 2;case"ADD":case"add":return 1;default:return t}}function lo(t,e){if(/^[a-z][0-9a-z+.-]*:/i.test(e)){const n=new URL(t,"".concat(e,"/"));return decodeURI(n.toString())}return t.startsWith("/")?t:"".concat(e,"/").concat(t)}function co(t,e){if(!t)return null;if(t.content){const n=t.content.uri||t.content.url;t.contentUrl=lo(n,e.basePath)}return t.id=t.contentUrl,t.lodMetricType=Hn,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=ao(t),t.refine=uo(t.refine),t}async function ho(t,e,n,r){var i,o;const s=e.basePath,{subdivisionScheme:a,maximumLevel:u,subtreeLevels:l,subtrees:{uri:c}}=n,h=lo(so(c,0,0,0,0),s),A=await(0,$e.H)(h,pi,r),f=lo(t.content.uri,s),d=null==e||null===(i=e.root)||void 0===i?void 0:i.refine,p=t.geometricError,g=null===(o=t.boundingVolume.extensions)||void 0===o?void 0:o["3DTILES_boun
2ding_volume_S2"];if(g){const e={box:$i(g),s2VolumeInfo:g};t.boundingVolume=e}const m=t.boundingVolume,y={contentUrlTemplate:f,subtreesUriTemplate:c,subdivisionScheme:a,subtreeLevels:l,maximumLevel:u,refine:d,basePath:s,lodMetricType:Hn,rootLodMetricValue:p,rootBoundingVolume:m,getTileType:ao,getRefine:uo};return await async function(t,e,n){if(!t)return null;t.lodMetricType=Hn,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform;const{children:r,contentUrl:i}=await no({subtree:e,options:n,s2VolumeBox:t});return i&&(t.contentUrl=i,t.content={uri:i.replace("".concat(n.basePath,"/"),"")}),t.refine=uo(t.refine),t.type=ao(t),t.children=r,t.id=t.contentUrl,t}(t,A,y)}function Ao(t){var e;return(null==t||null===(e=t.extensions)||void 0===e?void 0:e["3DTILES_implicit_tiling"])||(null==t?void 0:t.implicitTiling)}const fo={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:Cr,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:async function(t,e,n){const r=e["3d-tiles"]||{};let i;return i="auto"===r.isTileset?n.url&&-1!==n.url.indexOf(".json"):r.isTileset,t=i?await async function(t,e,n){var r;const i=JSON.parse((new TextDecoder).decode(t));return i.loader=e.loader||fo,i.url=n.url,i.queryString=n.queryString,i.basePath=(o=i,Tn.pD(o.url)),i.root=await async function(t,e){const n=t.basePath;let r;const i=Ao(null==t?void 0:t.root);r=i&&t.root?await ho(t.root,t,i,e):co(t.root,t);const o=[];for(o.push(r);o.length>0;){const r=(o.pop()||{}).children||[];for(let i of r){const r=Ao(i);r?i=await ho(i,t,r,e):co(i,{basePath:n}),o.push(i)}}return r}(i,e),i.type=Vn,i.lodMetricType=Hn,i.lodMetricValue=(null===(r=i.root)||void 0===r?void 0:r.lodMetricValue)||0,i;var o}(t,e,n):await async function(t,e,n){const r={content:{featureIds:null}};return await Ai(t,0,e,n,r.content),r.content}(t,e,n),t},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}},po=[0],go={getPointColor:{type:"accessor",value:[0,0,0,255]},pointSize:1,data:"",loader:fo,onTilesetLoad:{type:"function",value:t=>{}},onTileLoad:{type:"function",value:t=>{}},onTileUnload:{type:"function",value:t=>{}},onTileError:{type:"function",value:(t,e,n)=>{}},_getMeshColor:{type:"function",value:t=>[255,255,255]}};class mo extends i.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}initializeState(){"onTileLoadFail"in this.props&&qe.A.removed("onTileLoadFail","onTileError")(),this.state={layerMap:{},tileset3d:null,activeViewports:{},lastUpdatedViewports:null}}get isLoaded(){const{tileset3d:t}=this.state;return null!==t&&t.isLoaded()}shouldUpdateState({changeFlags:t}){return t.somethingChanged}updateState({props:t,oldProps:e,changeFlags:n}){if(t.data&&t.data!==e.data&&this._loadTileset(t.data),n.viewportChanged){const{activeViewports:t}=this.state;Object.keys(t).length&&(this._updateTileset(t),this.state.lastUpdatedViewports=t,this.state.activeViewports={})}if(n.propsChanged){const{layerMap:t}=this.state;for(const e in t)t[e].needsUpdate=!0}}activateViewport(t){const{activeViewports:e,lastUpdatedViewports:n}=this.state;this.internalState.viewport=t,e[t.id]=t;const r=null==n?void 0:n[t.id];r&&t.equals(r)||(this.setChangeFlags({viewportChanged:!0}),this.setNeedsUpdate())}getPickingInfo({info:t,sourceLayer:e}){const n=e&&e.props.tile;return t.picked&&(t.object=n),t.sourceTile=n,t}filterSubLayer({layer:t,viewport:e}){const{tile:n}=t.props,{id:r}=e;return n.selected&&n.viewportIds.includes(r)}_updateAutoHighlight(t){const e=t.sourceTile,n=this.state.layerMap[null==e?void 0:e.id];n&&n.layer&&n.layer.updateAutoHighlight(t)}async _loadTileset(t){const{loadOptions:e={}}=this.props;let n=this.props.loader||this.props.loaders;Array.isArray(n)&&(n=n[0]);const r={loadOptions:{...e}};let i=t;if(n.preload){const o=await n.preload(t,e);o.url&&(i=o.url),o.headers&&(r.loadOptions.fetch={...r.loadOptions.fetch,headers:o.headers}),Object.assign(r,o)}const o=await(0,$e.H)(i,n,r.loadOptions),s=new Pr(o,{onTileLoad:this._onTileLoad.bind(this),onTileUnload:this._onTileUnload.bind(this),onTileError:this.props.onTileError,...r});this.setState({tileset3d:s,layerMap:{}}),this._updateTileset(this.state.activeViewports),this.props.onTilesetLoad(s)}_onTileLoad(t){const{lastUpdatedViewports:e}=this.state;this.props.onTileLoad(t),this._updateTileset(e),this.setNeedsUpdate()}_onTileUnload(t){delete this.state.layerMap[t.id],this.props.onTileUnload(t)}_updateTileset(t){if(!t)return;const{tileset3d:e}=this.state,{timeline:n}=this.context,r=Object.keys(t).length;n&&r&&e&&e.selectTiles(Object.values(t)).then(t=>{this.state.frameNumber!==t&&this.setState({frameNumber:t})})}_getSubLayer(t,e){if(!t.content)return null;switch(t.type){case Gn:return this._makePointCloudLayer(t,e);case Un:return this._make3DModelLayer(t);case"mesh":return this._makeSimpleMeshLayer(t,e);default:throw new Error("Tile3DLayer: Failed to render layer of type ".concat(t.content.type))}}_makePointCloudLayer(t,e){const{attributes:n,pointCount:r,constantRGBA:i,cartographicOrigin:o,modelMatrix:a}=t.content,{positions:u,normals:l,colors:c}=n;if(!u)return null;const h=e&&e.props.data||{header:{vertexCount:r},attributes:{POSITION:u,NORMAL:l,COLOR_0:c}
2},{pointSize:A,getPointColor:f}=this.props;return new(this.getSubLayerClass("pointcloud",We.A))({pointSize:A},this.getSubLayerProps({id:"pointcloud"}),{id:"".concat(this.id,"-pointcloud-").concat(t.id),tile:t,data:h,coordinateSystem:s.rf.METER_OFFSETS,coordinateOrigin:o,modelMatrix:a,getColor:i||f,_offset:0})}_make3DModelLayer(t){const{gltf:e,instances:n,cartographicOrigin:r,modelMatrix:i}=t.content;return new(this.getSubLayerClass("scenegraph",Xe.A))({_lighting:"pbr"},this.getSubLayerProps({id:"scenegraph"}),{id:"".concat(this.id,"-scenegraph-").concat(t.id),tile:t,data:n||po,scenegraph:e,coordinateSystem:s.rf.METER_OFFSETS,coordinateOrigin:r,modelMatrix:i,getTransformMatrix:t=>t.modelMatrix,getPosition:[0,0,0],_offset:0})}_makeSimpleMeshLayer(t,e){const n=t.content,{attributes:r,indices:i,modelMatrix:o,cartographicOrigin:a,coordinateSystem:u=s.rf.METER_OFFSETS,material:l,featureIds:c}=n,{_getMeshColor:h}=this.props,A=e&&e.props.mesh||new He.A({drawMode:4,attributes:yo(r),indices:i});return new(this.getSubLayerClass("mesh",Ke))(this.getSubLayerProps({id:"mesh"}),{id:"".concat(this.id,"-mesh-").concat(t.id),tile:t,mesh:A,data:po,getColor:h(t),pbrMaterial:l,modelMatrix:o,coordinateOrigin:a,coordinateSystem:u,featureIds:c,_offset:0})}renderLayers(){const{tileset3d:t,layerMap:e}=this.state;return t?t.tiles.map(t=>{const n=e[t.id]=e[t.id]||{tile:t};let{layer:r}=n;return t.selected&&(r?n.needsUpdate&&(r=this._getSubLayer(t,r),n.needsUpdate=!1):r=this._getSubLayer(t)),n.layer=r,r}).filter(Boolean):null}}function yo(t){const e={};return e.positions={...t.positions,value:new Float32Array(t.positions.value)},t.normals&&(e.normals=t.normals),t.texCoords&&(e.texCoords=t.texCoords),t.colors&&(e.colors=t.colors),t.uvRegions&&(e.uvRegions=t.uvRegions),e}(0,r.A)(mo,"defaultProps",go),(0,r.A)(mo,"layerName","Tile3DLayer");const vo=[1],_o={...Le.defaultProps,elevationData:fe,texture:{...fe,optional:!0},meshMaxError:{type:"number",value:4},bounds:{type:"array",value:null,optional:!0,compare:!0},color:{type:"color",value:[255,255,255]},elevationDecoder:{type:"object",value:{rScaler:1,gScaler:0,bScaler:0,offset:0}},workerUrl:"",wireframe:!1,material:!0,loaders:[{name:"Terrain",id:"terrain",module:"terrain",version:"3.4.15",worker:!0,extensions:["png","pngraw","jpg","jpeg","gif","webp","bmp"],mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp"],options:{terrain:{tesselator:"auto",bounds:null,meshMaxError:10,elevationDecoder:{rScaler:1,gScaler:0,bScaler:0,offset:0},skirtHeight:null}}}]};function bo(t){return Array.isArray(t)?t.join(";"):t||""}class wo extends i.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}updateState({props:t,oldProps:e}){const n=t.elevationData!==e.elevationData;if(n){const{elevationData:e}=t,n=e&&(Array.isArray(e)||e.includes("{x}")&&e.includes("{y}"));this.setState({isTiled:n})}const r=n||t.meshMaxError!==e.meshMaxError||t.elevationDecoder!==e.elevationDecoder||t.bounds!==e.bounds;if(!this.state.isTiled&&r){const e=this.loadTerrain(t);this.setState({terrain:e})}t.workerUrl&&qe.A.removed("workerUrl","loadOptions.terrain.workerUrl")()}loadTerrain({elevationData:t,bounds:e,elevationDecoder:n,meshMaxError:r,signal:i}){var o;if(!t)return null;let s=this.getLoadOptions();s={...s,terrain:{skirtHeight:this.state.isTiled?2*r:0,...null===(o=s)||void 0===o?void 0:o.terrain,bounds:e,meshMaxError:r,elevationDecoder:n}};const{fetch:a}=this.props;return a(t,{propName:"elevationData",layer:this,loadOptions:s,signal:i})}getTiledTerrainData(t){const{elevationData:e,fetch:n,texture:r,elevationDecoder:i,meshMaxError:o}=this.props,{viewport:s}=this.context,a=pe(e,t),u=r&&pe(r,t),{signal:l}=t;let c=[0,0],h=[0,0];if(s.isGeospatial){const e=t.bbox;c=s.projectFlat([e.west,e.south]),h=s.projectFlat([e.east,e.north])}else{const e=t.bbox;c=[e.left,e.bottom],h=[e.right,e.top]}const A=[c[0],c[1],h[0],h[1]],f=this.loadTerrain({elevationData:a,bounds:A,elevationDecoder:i,meshMaxError:o,signal:l}),d=u?n(u,{propName:"texture",layer:this,loaders:[],signal:l}).catch(t=>null):Promise.resolve(null);return Promise.all([f,d])}renderSubLayers(t){const e=this.getSubLayerClass("mesh",Ze.A),{color:n,wireframe:r,material:i}
2=this.props,{data:o}=t;if(!o)return null;const[a,u]=o;return new e(t,{data:vo,mesh:a,texture:u,_instanced:!1,coordinateSystem:s.rf.CARTESIAN,getPosition:t=>[0,0,0],getColor:n,wireframe:r,material:i})}onViewportLoad(t){if(!t)return;const{zRange:e}=this.state,n=t.map(t=>t.content).filter(Boolean).map(t=>t[0].header.boundingBox.map(t=>t[2]));if(0===n.length)return;const r=Math.min(...n.map(t=>t[0])),i=Math.max(...n.map(t=>t[1]));(!e||r<e[0]||i>e[1])&&this.setState({zRange:[r,i]})}renderLayers(){const{color:t,material:e,elevationData:n,texture:r,wireframe:i,meshMaxError:o,elevationDecoder:s,tileSize:a,maxZoom:u,minZoom:l,extent:c,maxRequests:h,onTileLoad:A,onTileUnload:f,onTileError:d,maxCacheSize:p,maxCacheByteSize:g,refinementStrategy:m}=this.props;return this.state.isTiled?new Le(this.getSubLayerProps({id:"tiles"}),{getTileData:this.getTiledTerrainData.bind(this),renderSubLayers:this.renderSubLayers.bind(this),updateTriggers:{getTileData:{elevationData:bo(n),texture:bo(r),meshMaxError:o,elevationDecoder:s}},onViewportLoad:this.onViewportLoad.bind(this),zRange:this.state.zRange||null,tileSize:a,maxZoom:u,minZoom:l,extent:c,maxRequests:h,onTileLoad:A,onTileUnload:f,onTileError:d,maxCacheSize:p,maxCacheByteSize:g,refinementStrategy:m}):new(this.getSubLayerClass("mesh",Ze.A))(this.getSubLayerProps({id:"mesh"}),{data:vo,mesh:this.state.terrain,texture:r,_instanced:!1,getPosition:t=>[0,0,0],getColor:t,material:e,wireframe:i})}}(0,r.A)(wo,"defaultProps",_o),(0,r.A)(wo,"layerName","TerrainLayer");var Eo=n(31938);const xo="\nuniform vec4 clip_bounds;\n\nbool clip_isInBounds(vec2 position) {\n return position.x >= clip_bounds[0] && position.y >= clip_bounds[1] && position.x < clip_bounds[2] && position.y < clip_bounds[3];\n}\n",So={name:"clip-vs",vs:xo},To={"vs:#decl":"\nvarying float clip_isVisible;\n","vs:DECKGL_FILTER_GL_POSITION":"\n clip_isVisible = float(clip_isInBounds(geometry.worldPosition.xy));\n","fs:#decl":"\nvarying float clip_isVisible;\n","fs:DECKGL_FILTER_COLOR":"\n if (clip_isVisible < 0.5) discard;\n"},Po={name:"clip-fs",fs:xo},Co={"vs:#decl":"\nvarying vec2 clip_commonPosition;\n","vs:DECKGL_FILTER_GL_POSITION":"\n clip_commonPosition = geometry.position.xy;\n","fs:#decl":"\nvarying vec2 clip_commonPosition;\n","fs:DECKGL_FILTER_COLOR":"\n if (!clip_isInBounds(clip_commonPosition)) discard;\n"};class Mo extends Eo.A{getShaders(){let t="instancePositions"in this.getAttributeManager().attributes;return void 0!==this.props.clipByInstance&&(t=Boolean(this.props.clipByInstance)),this.state.clipByInstance=t,t?{modules:[So],inject:To}:{modules:[Po],inject:Co}}draw({uniforms:t}){const{clipBounds:e}=this.props;if(this.state.clipByInstance)t.clip_bounds=e;else{const n=this.projectPosition([e[0],e[1],0]),r=this.projectPosition([e[2],e[3],0]);t.clip_bounds=[Math.min(n[0],r[0]),Math.min(n[1],r[1]),Math.max(n[0],r[0]),Math.max(n[1],r[1])]}}}(0,r.A)(Mo,"defaultProps",{clipBounds:[0,0,1,1],clipByInstance:void 0}),(0,r.A)(Mo,"extensionName","ClipExtension");n(24448);n(38286);function Io(t,e){const n=null==e?void 0:e.globalFeatureId;return void 0!==n?function(t,e){const n=Ro(t);for(const t of n){let n=0,r=t.featureIds.value[0];for(let i=0;i<t.featureIds.value.length;i++){const o=t.featureIds.value[i];if(o!==r){if(e===t.globalFeatureIds.value[n])return Lo(t,n,i);n=i,r=o}}if(e===t.globalFeatureIds.value[n])return Lo(t,n,t.featureIds.value.length)}throw new Error("featureId:".concat(e," not found"))}(t,n):function(t,e){return function(t){const e=[];for(const n of t){if(0===n.featureIds.value.length)continue;let t=0,r=n.featureIds.value[0];for(let i=0;i<n.featureIds.value.length;i++){const o=n.featureIds.value[i];o!==r&&(e.push(Lo(n,t,i)),t=i,r=o)}e.push(Lo(n,t,n.featureIds.value.length))}return e}(Ro(t,e))}(t,null==e?void 0:e.type)}function Oo(t,e,n){switch(t.type){case"Point":return function(t,e,n){const{positions:r}=t,i=ko(r,e,n);return i.length>1?{type:"MultiPoint",coordinates:i}:{type:"Point",coordinates:i[0]}}(t,e,n);case"LineString":return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;const{positions:r}=t,i=t.pathIndices.value.filter(t=>t>=e&&t<=n);if(!(i.length>2))return{type:"LineString",coordinates:ko(r,i[0],i[1])};const o=[];for(let t=0;t<i.length-1;t++){const e=ko(r,i[t],i[t+1]);o.push(e)}return{type:"MultiLineString",coordinates:o}}(t,e,n);case"Polygon":return Bo(t,e,n);default:throw new Error("Unsupported geometry type: ".concat(null==t?void 0:t.type))}}function Ro(t,e){if(!Boolean(t.points||t.lines||t.polygons))return t.type=e||function(t){return t.pathIndices?"LineString":t.polygonIndices?"Polygon":"Point"}(t),[t];const n=[];return t.points&&(t.points.type="Point",n.push(t.points)),t.lines&&
2(t.lines.type="LineString",n.push(t.lines)),t.polygons&&(t.polygons.type="Polygon",n.push(t.polygons)),n}function Lo(t,e,n){const r=Oo(t,e,n),i=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=Object.assign({},t.properties[t.featureIds.value[e]]);for(const r in t.numericProps)n[r]=t.numericProps[r].value[e];return n}(t,e,n),o=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.fields&&t.fields[t.featureIds.value[e]]}(t,e,n);return{type:"Feature",geometry:r,properties:i,...o}}function Bo(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;const{positions:r}=t,i=t.polygonIndices.value.filter(t=>t>=e&&t<=n),o=t.primitivePolygonIndices.value.filter(t=>t>=e&&t<=n);if(!(i.length>2)){const t=[];for(let e=0;e<o.length-1;e++){const n=ko(r,o[e],o[e+1]);t.push(n)}return{type:"Polygon",coordinates:t}}const s=[];for(let e=0;e<i.length-1;e++){const n=Bo(t,i[e],i[e+1]).coordinates;s.push(n)}return{type:"MultiPolygon",coordinates:s}}function ko(t,e,n){e=e||0,n=n||t.value.length/t.size;const r=[];for(let i=e;i<n;i++){const e=Array();for(let n=i*t.size;n<(i+1)*t.size;n++)e.push(Number(t.value[n]));r.push(e)}return r}const No={Point:Fo,MultiPoint:function(t,e,n){return Do(t,e,n)},LineString:jo,MultiLineString:function(t,e,n){return t.map(t=>jo(t,e,n))},Polygon:Uo,MultiPolygon:function(t,e,n){return t.map(t=>Uo(t,e,n))}};function Fo([t,e],[n,r],i){const o=(0,ht.Cc)(n[0],r[0],t),s=(0,ht.Cc)(n[1],r[1],e);return i.unprojectFlat([o,s])}function Do(t,e,n){return t.map(t=>Fo(t,e,n))}function jo(t,e,n){return Do(t,e,n)}function Uo(t,e,n){return t.map(t=>Do(t,e,n))}const Go=["points","lines","polygons"];function zo(t,e,n,r){const i=t.featureIds.value;if(!i.length)return-1;let o=0,s=i[i.length-1]+1;if(r){const e=function(t,e){if(!t.__layers){const e={},{properties:n}=t;for(let t=0;t<n.length;t++){const{layerName:r}=n[t];r&&(e[r]?e[r][1]=t:e[r]=[t,t])}t.__layers=e}return t.__layers[e]}(t,r);if(!e)return-1;o=e[0],s=e[1]+1}let a=-1;if(e in t.numericProps){const r=t.numericProps[e].value.findIndex((t,e)=>t===n&&i[e]>=o&&i[e]<s);return r>=0?t.globalFeatureIds.value[r]:-1}return e?a=Vo(t.properties,t=>t[e]===n,o,s):t.fields&&(a=Vo(t.fields,t=>t.id===n,o,s)),a>=0?function(t,e){if(!t.__ids){const e=[],n=t.featureIds.value,r=t.globalFeatureIds.value;for(let t=0;t<n.length;t++)e[n[t]]=r[t];t.__ids=e}return t.__ids[e]}(t,a):-1}function Vo(t,e,n,r){for(let i=n;i<r;i++)if(e(t[i],i))return i;return-1}const Ho={...st.A.defaultProps,data:fe,onDataLoad:{type:"function",value:null,optional:!0,compare:!1},uniqueIdProperty:"",highlightedFeatureId:null,loaders:[{name:"Mapbox Vector Tile",id:"mvt",module:"mvt",version:"3.4.15",extensions:["mvt","pbf"],mimeTypes:["application/vnd.mapbox-vector-tile","application/x-protobuf"],worker:!0,category:"geometry",options:{mvt:{shape:"geojson",coordinates:"local",layerProperty:"layerName",layers:void 0,tileIndex:null}}}],binary:!0};class qo extends Le{initializeState(){super.initializeState();const t=void 0===this.context.viewport.resolution&&this.props.binary;this.setState({binary:t,data:null,tileJSON:null})}get isLoaded(){return this.state&&this.state.data&&this.state.tileset&&super.isLoaded}updateState({props:t,oldProps:e,context:n,changeFlags:r}){var i;r.dataChanged&&this._updateTileData(),null!==(i=this.state)&&void 0!==i&&i.data&&(super.updateState({props:t,oldProps:e,context:n,changeFlags:r}),this._setWGS84PropertyForTiles());const{highlightColor:o}=t;o!==e.highlightColor&&Array.isArray(o)&&this.setState({highlightColor:o})}async _updateTileData(){let t=this.props.data,e=null;if("string"!=typeof t||/(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(t))t.tilejson&&(e=t);else{const{onDataLoad:n,fetch:r}=this.props;this.setState({data:null,tileJSON:null});try{e=await r(t,{propName:"data",layer:this,loaders:[]})}catch(e){this.raiseError(e,"loading TileJSON"),t=null}n&&n(e,{propName:"data",layer:this})}e&&(t=e.tiles),this.setState({data:t,tileJSON:e})}_getTilesetOptions(){const t=super._getTilesetOptions(),e=this.state.tileJSON,{minZoom:n,maxZoom:r}=this.props;return e&&(Number.isFinite(e.minzoom)&&e.minzoom>n&&(t.minZoom=e.minzoom),Number.isFinite(e.maxzoom)&&(!Number.isFinite(r)||e.maxzoom<r)&&(t.maxZoom=e.maxzoom)),t}renderLayers(){var t;return null!==(t=this.state)&&void 0!==t&&t.data?super.renderLayers():null}getTileData(t){var e;const{data:n,binary:r}=this.state,{index:i,signal:o}=t,s=pe(n,t);if(!s)return Promise.reject("Invalid URL");let a=this.getLoadOptions();const{fetch:u}=this.props;return a={...a,mimeType:"application/x-protobuf",mvt:{...null===(e=a)||void 0===e?void 0:e.mvt,coordinates:this.context.viewport.resolution?"wgs84":"local",tileIndex:i},gis:r?{format:"binary"}:{}},u(s,{propName:"data",layer:this,loadOptions:a,signal:o})}renderSubLayers(t){const{x:e,y:n,z:r}=t.tile.index,i=Math.pow(2,r),o=512/i,a=-o,u=512*e/i,l=512*(1-n/i),c=(new ct.A).scale([o,a,1]);t.autoHighlight=!1,this.context.viewport.resolution||(t.modelMatrix=c,t.co
2ordinateOrigin=[u,l,0],t.coordinateSystem=s.rf.CARTESIAN,t.extensions=[...t.extensions||[],new Mo]);const h=super.renderSubLayers(t);return!this.state.binary||h instanceof st.A||qe.A.warn("renderSubLayers() must return GeoJsonLayer when using binary:true")(),h}_updateAutoHighlight(t){const{uniqueIdProperty:e}=this.props,{hoveredFeatureId:n,hoveredFeatureLayerName:r}=this.state,i=t.object;let o,s;i&&(o=Wo(i,e),s=Xo(i));let{highlightColor:a}=this.props;"function"==typeof a&&(a=a(t)),n===o&&r===s||this.setState({highlightColor:a,hoveredFeatureId:o,hoveredFeatureLayerName:s})}getPickingInfo(t){const e=super.getPickingInfo(t),n=Boolean(this.context.viewport.resolution);if(this.state.binary&&-1!==e.index){const{data:n}=t.sourceLayer.props;e.object=Io(n,{globalFeatureId:e.index})}return e.object&&!n&&(e.object=Qo(e.object,e.tile.bbox,this.context.viewport)),e}getSubLayerPropsByTile(t){return{highlightedObjectIndex:this.getHighlightedObjectIndex(t),highlightColor:this.state.highlightColor}}getHighlightedObjectIndex(t){const{hoveredFeatureId:e,hoveredFeatureLayerName:n,binary:r}=this.state,{uniqueIdProperty:i,highlightedFeatureId:o}=this.props,s=t.content,a=Yo(o);if(!Yo(e)&&!a)return-1;const u=a?o:e;return Array.isArray(s)?s.findIndex(t=>{const e=Wo(t,i)===u,r=a||Xo(t)===n;return e&&r}):s&&r?function(t,e,n,r){for(const i of Go){const o=t[i]&&zo(t[i],e,n,r);if(o>=0)return o}return-1}(s,i,u,a?"":n):-1}_pickObjects(t){const{deck:e,viewport:n}=this.context,r=n.width,i=n.height,o=n.x,s=n.y,a=[this.id];return e.pickObjects({x:o,y:s,width:r,height:i,layerIds:a,maxObjects:t})}getRenderedFeatures(t=null){const e=this._pickObjects(t),n=new Set,r=[];for(const t of e){const e=Wo(t.object,this.props.uniqueIdProperty);void 0===e?r.push(t.object):n.has(e)||(n.add(e),r.push(t.object))}return r}_setWGS84PropertyForTiles(){const t="dataInWGS84";this.state.tileset.selectedTiles.forEach(e=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{get:()=>{if(!e.content)return null;if(this.state.binary&&Array.isArray(e.content)&&!e.content.length)return[];const{bbox:t}=e;if(void 0===e._contentWGS84&&(n=t,Number.isFinite(n.west)&&Number.isFinite(n.north)&&Number.isFinite(n.east)&&Number.isFinite(n.south))){const n=this.state.binary?Io(e.content):e.content;e._contentWGS84=n.map(e=>Qo(e,t,this.context.viewport))}var n;return e._contentWGS84}})})}}function Wo(t,e){return t.properties&&e?t.properties[e]:"id"in t?t.id:void 0}function Xo(t){var e;return(null===(e=t.properties)||void 0===e?void 0:e.layerName)||null}function Yo(t){return null!=t&&""!==t}function Qo(t,e,n){const r={...t,geometry:{type:t.geometry.type}};return Object.defineProperty(r.geometry,"coordinates",{get:()=>{const r=function(t,e,n){const r=[n.projectFlat([e.west,e.north]),n.projectFlat([e.east,e.south])];return{...t,coordinates:No[t.type](t.coordinates,r,n)}}(t.geometry,e,n);return r.coordinates}}),r}(0,r.A)(qo,"layerName","MVTLayer"),(0,r.A)(qo,"defaultProps",Ho);const Jo={};for(let t=0;t<32;t++)Jo["0123456789bcdefghjkmnpqrstuvwxyz".charAt(t)]=t;class Zo extends W{indexToBounds(){const{data:t,getGeohash:e}=this.props;return{data:t,_normalize:!1,positionFormat:"XY",getPolygon:(t,n)=>function(t){const[e,n,r,i]=function(t){let e,n=!0,r=90,i=-90,o=180,s=-180,a=0;for(let u=0,l=t.length;u<l;u++){const l=t[u].toLowerCase();a=Jo[l];for(let t=4;t>=0;t--){const u=a>>t&1;n?(e=(o+s)/2,1===u?s=e:o=e):(e=(r+i)/2,1===u?i=e:r=e),n=!n}}return[i,s,r,o]}(t);return[i,r,i,e,n,e,n,r,i,r]}(e(t,n))}}}(0,r.A)(Zo,"layerName","GeohashLayer"),(0,r.A)(Zo,"defaultProps",{getGeohash:{type:"accessor",value:t=>t.geohash}})},14557:(t,e,n)=>{"use strict";n.d(e,{VD:()=>r,YN:()=>u,fW:()=>o,jA:()=>a,r3:()=>i,uH:()=>s,vf:()=>l});const r={NO_STATE:"Awaiting state",MATCHED:"Matched. State transferred from previous layer",INITIALIZED:"Initialized",AWAITING_GC:"Discarded. Awaiting garbage collection",AWAITING_FINALIZATION:"No longer matched. Awaiting garbage collection",FINALIZED:"Finalized! Awaiting garbage collection"},i=Symbol.for("component"),o=Symbol.for("propTypes"),s=Symbol.for("deprecatedProps"),a=Symbol.for("asyncPropDefaults"),u=Symbol.for("asyncPropOriginal"),l=Symbol.for("asyncPropResolved")},14834:(t,e,n)=>{"use strict";var r=n(69501),i="undefined"==typeof globalThis?n.g:globalThis;t.exports=function(){for(var t=[],e=0;e<r.length;e++)"function"==typeof i[r[e]]&&(t[t.length]=r[e]);return t}},15293:(t,e,n)=>{"use strict";n.d(e,{A:()=>d});var r=n(24586),i=n(9946),o=n(1285),s=n(93314),a=n(64062),u=n(70911);const l=Math.PI/180,c=180/Math.PI,h=6370972,A=256;function f(){const t=4018225162502676e-20,e=Math.PI/180*A;
2return{unitsPerMeter:[t,t,t],unitsPerMeter2:[0,0,0],metersPerUnit:[24886.609375,24886.609375,24886.609375],unitsPerDegree:[e,e,t],unitsPerDegree2:[0,0,0],degreesPerUnit:[1/e,1/e,24886.609375]}}class d extends o.A{constructor(t={}){const{latitude:e=0,longitude:n=0,zoom:o=0,nearZMultiplier:s=.1,farZMultiplier:a=2,resolution:u=10}=t;let{height:c,altitude:h=1.5}=t;c=c||1,h=Math.max(.75,h);const A=(new i.A).lookAt({eye:[0,-h,0],up:[0,0,1]}),d=Math.pow(2,o);A.rotateX(e*l),A.rotateZ(-n*l),A.scale(d/c);const p=Math.atan(.5/h),g=512*d/c;super({...t,height:c,viewMatrix:A,longitude:n,latitude:e,zoom:o,distanceScales:f(),fovyRadians:2*p,focalDistance:h,near:s,far:Math.min(2,1/g+1)*h*a}),(0,r.A)(this,"longitude",void 0),(0,r.A)(this,"latitude",void 0),(0,r.A)(this,"resolution",void 0),this.latitude=e,this.longitude=n,this.resolution=u}get projectionMode(){return s.Kx.GLOBE}getDistanceScales(){return this.distanceScales}getBounds(t={}){const e={targetZ:t.z||0},n=this.unproject([0,this.height/2],e),r=this.unproject([this.width/2,0],e),i=this.unproject([this.width,this.height/2],e),o=this.unproject([this.width/2,this.height],e);return i[0]<this.longitude&&(i[0]+=360),n[0]>this.longitude&&(n[0]-=360),[Math.min(n[0],i[0],r[0],o[0]),Math.min(n[1],i[1],r[1],o[1]),Math.max(n[0],i[0],r[0],o[0]),Math.max(n[1],i[1],r[1],o[1])]}unproject(t,{topLeft:e=!0,targetZ:n}={}){const[r,i,o]=t,s=e?i:this.height-i,{pixelUnprojectionMatrix:u}=this;let l;if(Number.isFinite(o))l=p(u,[r,s,o,1]);else{const t=p(u,[r,s,-1,1]),e=p(u,[r,s,1,1]),i=((n||0)/h+1)*A,o=a.uE(a.jb([],t,e)),c=a.uE(t),f=a.uE(e),d=(4*c*f-(o-c-f)**2)/16*4/o,g=(Math.sqrt(c-d)-Math.sqrt(Math.max(0,i*i-d)))/Math.sqrt(o);l=a.Cc([],t,e,g)}const[c,f,d]=this.unprojectPosition(l);return Number.isFinite(o)?[c,f,d]:Number.isFinite(n)?[c,f,n]:[c,f]}projectPosition(t){const[e,n,r=0]=t,i=e*l,o=n*l,s=Math.cos(o),a=(r/h+1)*A;return[Math.sin(i)*s*a,-Math.cos(i)*s*a,Math.sin(o)*a]}unprojectPosition(t){const[e,n,r]=t,i=a.Il(t),o=Math.asin(r/i);return[Math.atan2(e,-n)*c,o*c,(i/A-1)*h]}projectFlat(t){return t}unprojectFlat(t){return t}panByPosition(t,e){const n=this.unproject(e);return{longitude:t[0]-n[0]+this.longitude,latitude:t[1]-n[1]+this.latitude}}}function p(t,e){const n=u.Z0([],e,t);return u.hs(n,n,1/n[3]),n}},15317:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(44454),i=n(84407);const o=[34069,34070,34071,34072,34073,34074];class s extends i.A{get[Symbol.toStringTag](){return"TextureCube"}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.tj)(t),super(t,Object.assign({},e,{target:34067})),this.initialize(e),Object.seal(this)}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mipmaps:e=!0,parameters:n={}}=t;return this.opts=t,this.setCubeMapImageData(t).then(()=>{this.loaded=!0,e&&this.generateMipmap(t),this.setParameters(n)}),this}subImage(t){let{face:e,data:n,x:r=0,y:i=0,mipmapLevel:o=0}=t;return this._subImage({target:e,data:n,x:r,y:i,mipmapLevel:o})}async setCubeMapImageData(t){let{width:e,height:n,pixels:i,data:s,border:a=0,format:u=6408,type:l=5121}=t;const{gl:c}=this,h=i||s,A=await Promise.all(o.map(t=>{const e=h[t];return Promise.all(Array.isArray(e)?e:[e])}));this.bind(),o.forEach((t,i)=>{A[i].length>1&&!1!==this.opts.mipmaps&&r.Rm.warn("".concat(this.id," has mipmap and multiple LODs."))(),A[i].forEach((r,i)=>{e&&n?c.texImage2D(t,i,u,e,n,a,u,l,r):c.texImage2D(t,i,u,u,l,r)})}),this.unbind()}setImageDataForFace(t){const{face:e,width:n,height:r,pixels:i,data:o,border:s=0,format:a=6408,type:u=5121}=t,{gl:l}=this,c=i||o;return this.bind(),c instanceof Promise?c.then(n=>this.setImageDataForFace(Object.assign({},t,{face:e,data:n,pixels:n}))):this.width||this.height?l.texImage2D(e,0,a,n,r,s,a,u,c):l.texImage2D(e,0,a,a,u,c),this}}s.FACES=o},15348:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TranslateMode=void 0;var r=h(n(25128)),i=h(n(71123)),o=h(n(42641)),s=n(89595),a=h(n(88548)),u=n(71169),l=n(96146),c=n(78768);function h(t){return t&&t.__esModule?t:{default:t}}function A(t){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(t)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}
2function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}(y,t);var e,n,l,h=(l=y,function(){var t,e=p(l);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=p(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==A(e)&&"function"!=typeof e?d(t):e}(this,t)});function y(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,y);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return m(d(t=h.call.apply(h,[this].concat(n))),"_geometryBeforeTranslate",void 0),m(d(t),"_isTranslatable",void 0),t}return e=y,(n=[{key:"handleDragging",value:function(t,e){if(this._isTranslatable){if(this._geometryBeforeTranslate){var n=this.getTranslateAction(t.pointerDownMapCoords,t.mapCoords,"translating",e);n&&e.onEdit(n)}t.cancelPan()}}},{key:"handlePointerMove",value:function(t,e){this._isTranslatable=this.isSelectionPicked(t.pointerDownPicks||t.picks,e),this.updateCursor(e)}},{key:"handleStartDragging",value:function(t,e){this._isTranslatable&&(this._geometryBeforeTranslate=this.getSelectedFeaturesAsFeatureCollection(e))}},{key:"handleStopDragging",value:function(t,e){if(this._geometryBeforeTranslate){var n=this.getTranslateAction(t.pointerDownMapCoords,t.mapCoords,"translated",e);n&&e.onEdit(n),this._geometryBeforeTranslate=null}}},{key:"updateCursor",value:function(t){this._isTranslatable?t.onUpdateCursor("move"):t.onUpdateCursor(null)}},{key:"getTranslateAction",value:function(t,e,n,l){var h=this;if(!this._geometryBeforeTranslate)return null;var A=new c.ImmutableFeatureCollection(l.data),f=l.selectedIndexes,d=l.modeConfig||{},p=d.viewport,g=d.screenSpace;if(p&&g)!function(){for(var n=p.project?p:new a.default(p),r=n.project(t),i=n.project(e),o=i[0]-r[0],s=i[1]-r[1],l=0;l<f.length;l++){var c=f[l],d=h._geometryBeforeTranslate.features[l],g=d.geometry.coordinates;g&&(g=(0,u.mapCoords)(g,function(t){var e=n.project(t);return e?(e[0]+=o,e[1]+=s,n.unproject(e)):null}),A=A.replaceGeometry(c,{type:d.geometry.type,coordinates:g}))}}();else for(var m=(0,s.point)(t),y=(0,s.point)(e),v=(0,i.default)(m,y),_=(0,r.default)(m,y),b=(0,o.default)(this._geometryBeforeTranslate,v,_),w=0;w<f.length;w++){var E=f[w],x=b.features[w];A=A.replaceGeometry(E,x.geometry)}return{updatedData:A.getObject(),editType:n,editContext:{featureIndexes:f}}}}])&&f(e.prototype,n),y}(l.GeoJsonEditMode);e.TranslateMode=y},15985:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(24586),i=n(8473),o=n(44454),s=n(23615);const a={blendFunc:[1,0,32771,0],blendEquation:32774};class u extends i.A{constructor(...t){super(...t),(0,r.A)(this,"pickZ",void 0),(0,r.A)(this,"_colorEncoderState",null)}render(t){return"pickingFBO"in t?this._drawPickingBuffer(t):super.render(t)}_drawPickingBuffer({layers:t,layerFilter:e,views:n,viewports:r,onViewportActive:i,pickingFBO:s,deviceRect:{x:u,y:c,width:h,height:A},cullRect:f,effects:d,pass:p="picking",pickZ:g,moduleParameters:m}){const y=this.gl;this.pickZ=g;const v=this._resetColorEncoder(g),_=(0,o.zv)(y,{scissorTest:!0,scissor:[u,c,h,A],clearColor:[0,0,0,0],depthMask:!0,depthTest:!0,depthRange:[0,1],colorMask:[!0,!0,!0,!0],...a,blend:!g},()=>super.render({target:s,layers:t,layerFilter:e,views:n,viewports:r,onViewportActive:i,cullRect:f,effects:null==d?void 0:d.filter(t=>t.useInPicking),pass:p,isPicking:!0,moduleParameters:m}));
2return this._colorEncoderState=null,{decodePickingColor:v&&l.bind(null,v),stats:_}}shouldDrawLayer(t){const{pickable:e,operation:n}=t.props;return e&&n.includes("draw")||n.includes("terrain")}getModuleParameters(){return{pickingActive:1,pickingAttribute:this.pickZ,lightSources:{}}}getLayerParameters(t,e,n){const r={...t.props.parameters},{pickable:i,operation:o}=t.props;return this._colorEncoderState?i&&o.includes("draw")&&(Object.assign(r,a),r.blend=!0,r.blendColor=function(t,e,n){const{byLayer:r,byAlpha:i}=t;let o,a=r.get(e);return a?(a.viewports.push(n),o=a.a):(o=r.size+1,o<=255?(a={a:o,layer:e,viewports:[n]},r.set(e,a),i[o]=a):(s.A.warn("Too many pickable layers, only picking the first 255")(),o=0)),[0,0,0,o/255]}(this._colorEncoderState,t,n)):r.blend=!1,o.includes("terrain")&&(r.blend=!1),r}_resetColorEncoder(t){return this._colorEncoderState=t?null:{byLayer:new Map,byAlpha:[]},this._colorEncoderState}}function l(t,e){const n=t.byAlpha[e[3]];return n&&{pickedLayer:n.layer,pickedViewports:n.viewports,pickedObjectIndex:n.layer.decodePickingColor(e)}}},17239:(t,e,n)=>{"use strict";var r=n(64940),i=function(){return!!r};i.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},17321:(t,e,n)=>{"use strict";n.d(e,{D:()=>o,l:()=>i});var r=n(78580);function i(t){var e;return!!t&&(Array.isArray(t)&&(t=t[0]),Array.isArray(null===(e=t)||void 0===e?void 0:e.extensions))}function o(t){var e,n;let o;return(0,r.v)(t,"null loader"),(0,r.v)(i(t),"invalid loader"),Array.isArray(t)&&(o=t[1],t=t[0],t={...t,options:{...t.options,...o}}),(null!==(e=t)&&void 0!==e&&e.parseTextSync||null!==(n=t)&&void 0!==n&&n.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}},17389:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(63606),i=n(40228);function o(t,e={}){const n=r.bbox.call(void 0,t),o=(n[0]+n[2])/2,s=(n[1]+n[3])/2;return i.point.call(void 0,[o,s],e.properties,e)}var s=o;e.center=o,e.default=s},18078:(t,e,n)=>{"use strict";if(n(33955)()){var r=BigInt.prototype.valueOf;t.exports=function(t){return null!=t&&"boolean"!=typeof t&&"string"!=typeof t&&"number"!=typeof t&&"symbol"!=typeof t&&"function"!=typeof t&&("bigint"==typeof t||function(t){try{return r.call(t),!0}catch(t){}return!1}(t))}}else t.exports=function(t){return!1}},18264:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizeCircleMode=void 0;var r=h(n(12848)),i=n(89595),o=h(n(32132)),s=h(n(71123)),a=h(n(17389)),u=n(71169),l=n(96146),c=n(78768);function h(t){return t&&t.__esModule?t:{default:t}}function A(t){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(t)}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(v,t);var e,n,l,h=(l=v,function(){var t,e=g(l);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==A(e)&&"function"!=typeof e?p(t):e}(this,t)});function v(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,v);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return y(p(t=h.call.apply(h,[this].concat(n))),"_selectedEditHandle",void 0),y(p(t),"_isResizing",!1),t}return e=v,(n=[{key:"getGuides",value:function(t){var e,n=this,r=[],o=t.selectedIndexes,s=t.lastPointerMoveEvent,a=s&&s.picks,l=s&&s.mapCoords;if(a&&a.length&&l&&1===o.length&&!this._isResizing){var c=a.find(function(t){return!t.isGuide});if(c&&c.object.properties.shape&&c.object.properties.shape.includes("Circle")&&t.selectedIndexes.includes(c.index)){var h=null,A=[],d=(0,i.point)(l);if((0,u.recursivelyTraverseNestedArrays)(c.object.geometry.coordinates,[],function(e,r){var o=(0,i.lineString)(e),s=n.getNearestPoint(o,d,t.modeConfig&&t.modeConfig.viewport);(!h||s.properties.dist<h.properties.dist)&&(h=s,A=r)}),h){var p=h,g=p.geometry.coordinates,m=p.properties.index;r.push({type:"Feature",properties:{guideType:"editHandle",editHandleType:"intermediate",featureIndex:c.index,positionIndexes:[].concat((e=A,function(t){if(Array.isArray(t))return f(t)}(e)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[m+1])},geometry:{type:"Point",coordinates:g}})}}}return{type:"FeatureCollection",features:r}}},{key:"getNearestPoint",value:function(t,e,n){if(t.geometry.coordinates.some(function(t){return t.length>2})){if(n)return(0,u.nearestPointOnProjectedLine)(t,e,n);console.log("Editing 3D point but modeConfig.viewport not provided. Falling back to 2D logic.")}return(0,r.default)(t,e)}},{key:"handleDragging",value:function(t,e){var n=(0,u.getPickedEditHandle)(t.pointerDownPicks);if(n){t.cancelPan();var r=n.properties,i=this.getSelectedFeature(e),l=(0,a.default)(i).geometry.coordinates,h=Object.entries(i.geometry.coordinates[0]).length-1,A=Math.max((0,s.default)(l,t.mapCoords),.001),f={}.steps,d={steps:void 0===f?h:f},p=(0,o.default)(l,A,d).geometry,g=new c.ImmutableFeatureCollection(e.data).replaceGeometry(r.featureIndex,p).getObject();e.onEdit({updatedData:g,editType:"unionGeometry",editContext:{featureIndexes:[r.featureIndex]}})}}},{key:"handlePointerMove",value:function(t,e){if(!this._isResizing){var n=(0,u.getPickedEditHandle)(t.picks);this._selectedEditHandle=n&&"intermediate"===n.properties.editHandleType?n:null}var r=this.getCursor(t);e.onUpdateCursor(r)}},{key:"handleStartDragging",value:function(t,e){this._selectedEditHandle&&(this._isResizing=!0)}},{key:"handleStopDragging",value:function(t,e){this._isResizing&&(this._selectedEditHandle=null,this._isResizing=!1)}},{key:"getCursor",value:function(t){var e=t&&t.picks||[];return(0,u.getPickedEditHandles)(e).length?"cell":null}}])&&d(e.prototype,n),v}(l.GeoJsonEditMode);e.ResizeCircleMode=v},18320:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.DrawRectangleUsingThreePointsMode=void 0;var r=n(71169);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(h,t);var e,n,l,c=(l=h,function(){var t,e=a(l);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function h(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),c.apply(this,arguments)}return e=h,(n=[{key:"getThreeClickPolygon",value:function(t,e,n,i){var s,a,u=(s=(0,r.generatePointsParallelToLinePoints)(t,e,n),a=2,function(t){if(Array.isArray(t))return t}(s)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(s,a)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(s,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return{type:"Feature",properties:{shape:"Rectangle"},geometry:{type:"Polygon",coordinates:[[t,e,u[0],u[1],t]]}}}}])&&s(e.prototype,n),h}(n(8800).ThreeClickPolygonMode);e.DrawRectangleUsingThreePointsMode=l},19044:(t,e,n)=>{"use strict";function r(t,e,n){if(n=n||t.byteLength,t.byteLength<n||e.byteLength<n)return!1;const r=new Uint8Array(t),i=new Uint8Array(e);for(let t=0;t<r.length;++t)if(r[t]!==i[t])return!1;return!0}function i(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=e.map(t=>t instanceof ArrayBuffer?new Uint8Array(t):t),i=r.reduce((t,e)=>t+e.byteLength,0),o=new Uint8Array(i);let s=0;for(const t of r)o.set(t,s),s+=t.byteLength;return o.buffer}function o(t,e,n){const r=void 0!==n?new Uint8Array(t).subarray(e,e+n):new Uint8Array(t).subarray(e);return new Uint8Array(r).buffer}n.d(e,{AQ:()=>i,YV:()=>r,_m:()=>o})},19144:(t,e,n)=>{const{DANGEROUS_PROPERTY_NAMES:r,criticalProperties:i}=n(37866),o=t=>r.includes(t)?"__"+t:t,s={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,onDangerousProperty:o};function a(t,e){if("string"!=typeof t)return;const n=t.toLowerCase();if(r.some(t=>n===t.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);if(i.some(t=>n===t.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`)}function u(t){return"boolean"==typeof t?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,allowedTags:null,tagFilter:null}:"object"==typeof t&&null!==t?{enabled:!1!==t.enabled,maxEntitySize:Math.max(1,t.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,t.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,t.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,t.maxExpandedLength??1e5),maxEntityCount:Math.max(1,t.maxEntityCount??1e3),allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null}:u(!0)}e.buildOptions=function(t){const e=Object.assign({},s,t),n=[{value:e.attributeNamePrefix,name:"attributeNamePrefix"},{value:e.attributesGroupName,name:"attributesGroupName"},{value:e.textNodeName,name:"textNodeName"},{value:e.cdataPropName,name:"cdataPropName"},{value:e.commentPropName,name:"commentPropName"}];for(const{value:t,name:e}of n)t&&a(t,e);return null===e.onDangerousProperty&&(e.onDangerousProperty=o),e.processEntities=u(e.processEntities),e},e.defaultOptions=s},19343:(t,e,n)=>{"use strict";var r=n(70686),i=n(17239)(),o=n(68993).functionsHaveConfigurableNames(),s=n(3468);t.exports=function(t,e){if("function"!=typeof t)throw new s("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(i?r(t,"name",e,!0,!0):r(t,"name",e)),t}},19543:(t,e,n)=>{"use strict";var r=n(14607),i=r("Date.prototype.getDay"),o=r("Object.prototype.toString"),s=n(51913)();t.exports=function(t){return"object"==typeof t&&null!==t&&(s?function(t){try{return i(t),!0}catch(t){return!1}}(t):"[object Date]"===o(t))}},19634:(t,e,n)=>{"use strict";n.d(e,{Me:()=>a,mg:()=>o,zo:()=>i});var r=n(14557);function i(t){const e=t[r.fW];for(const n in e){const r=e[n],{validate:i}=r;if(i&&!i(t[n],r))throw new Error("Invalid prop ".concat(n,": ").concat(t[n]))}}
2function o(t,e){const n=a({newProps:t,oldProps:e,propTypes:t[r.fW],ignoreProps:{data:null,updateTriggers:null,extensions:null,transitions:null}}),i=function(t,e){if(null===e)return"oldProps is null, initial diff";let n=!1;const{dataComparator:r,_dataDiff:i}=t;return r?r(t.data,e.data)||(n="Data comparator detected a change"):t.data!==e.data&&(n="A new data container was supplied"),n&&i&&(n=i(t.data,e.data)||n),n}(t,e);let o=!1;return i||(o=function(t,e){if(null===e)return{all:!0};if("all"in t.updateTriggers&&c(t,e,"all"))return{all:!0};const n={};let r=!1;for(const i in t.updateTriggers)"all"!==i&&c(t,e,i)&&(n[i]=!0,r=!0);return!!r&&n}(t,e)),{dataChanged:i,propsChanged:n,updateTriggersChanged:o,extensionsChanged:l(t,e),transitionsChanged:s(t,e)}}function s(t,e){if(!t.transitions)return!1;const n={},i=t[r.fW];let o=!1;for(const r in t.transitions){const s=i[r],a=s&&s.type;("number"===a||"color"===a||"array"===a)&&u(t[r],e[r],s)&&(n[r]=!0,o=!0)}return!!o&&n}function a({newProps:t,oldProps:e,ignoreProps:n={},propTypes:r={},triggerName:i="props"}){if(e===t)return!1;if("object"!=typeof t||null===t)return"".concat(i," changed shallowly");if("object"!=typeof e||null===e)return"".concat(i," changed shallowly");for(const o of Object.keys(t))if(!(o in n)){if(!(o in e))return"".concat(i,".").concat(o," added");const n=u(t[o],e[o],r[o]);if(n)return"".concat(i,".").concat(o," ").concat(n)}for(const o of Object.keys(e))if(!(o in n)){if(!(o in t))return"".concat(i,".").concat(o," dropped");if(!Object.hasOwnProperty.call(t,o)){const n=u(t[o],e[o],r[o]);if(n)return"".concat(i,".").concat(o," ").concat(n)}}return!1}function u(t,e,n){let r=n&&n.equal;return r&&!r(t,e,n)?"changed deeply":r||(r=t&&e&&t.equals,!r||r.call(t,e))?r||e===t?null:"changed shallowly":"changed deeply"}function l(t,e){if(null===e)return!0;const n=e.extensions,{extensions:r}=t;if(r===n)return!1;if(!n||!r)return!0;if(r.length!==n.length)return!0;for(let t=0;t<r.length;t++)if(!r[t].equals(n[t]))return!0;return!1}function c(t,e,n){let r=t.updateTriggers[n];r=r??{};let i=e.updateTriggers[n];return i=i??{},a({oldProps:i,newProps:r,triggerName:n})}},19767:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},o(t,e,n||t)}
2function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.DrawPointMode=void 0;var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(c,t);var e,n,u,l=(u=c,function(){var t,e=s(u);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),l.apply(this,arguments)}return e=c,(n=[{key:"createTentativeFeature",value:function(t){var e=t.lastPointerMoveEvent;return{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Point",coordinates:(e?[e.mapCoords]:[])[0]}}}},{key:"handleClick",value:function(t,e){var n={type:"Point",coordinates:t.mapCoords};e.onEdit(this.getAddFeatureAction(n,e.data))}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),o(s(c.prototype),"handlePointerMove",this).call(this,t,e)}}])&&i(e.prototype,n),c}(n(96146).GeoJsonEditMode);e.DrawPointMode=u},20952:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"GeoJsonEditMode",{enumerable:!0,get:function(){return o.GeoJsonEditMode}}),Object.defineProperty(e,"ModifyMode",{enumerable:!0,get:function(){return s.ModifyMode}}),Object.defineProperty(e,"ResizeCircleMode",{enumerable:!0,get:function(){return a.ResizeCircleMode}}),Object.defineProperty(e,"TranslateMode",{enumerable:!0,get:function(){return u.TranslateMode}}),Object.defineProperty(e,"ScaleMode",{enumerable:!0,get:function(){return l.ScaleMode}}),Object.defineProperty(e,"RotateMode",{enumerable:!0,get:function(){return c.RotateMode}}),Object.defineProperty(e,"DuplicateMode",{enumerable:!0,get:function(){return h.DuplicateMode}}),Object.defineProperty(e,"ExtendLineStringMode",{enumerable:!0,get:function(){return A.ExtendLineStringMode}}),Object.defineProperty(e,"SplitPolygonMode",{enumerable:!0,get:function(){return f.SplitPolygonMode}}),Object.defineProperty(e,"ExtrudeMode",{enumerable:!0,get:function(){return d.ExtrudeMode}}),Object.defineProperty(e,"ElevationMode",{enumerable:!0,get:function(){return p.ElevationMode}}),Object.defineProperty(e,"TransformMode",{enumerable:!0,get:function(){return g.TransformMode}}),Object.defineProperty(e,"DrawPointMode",{enumerable:!0,get:function(){return m.DrawPointMode}}),Object.defineProperty(e,"DrawLineStringMode",{enumerable:!0,get:function(){return y.DrawLineStringMode}}),Object.defineProperty(e,"DrawPolygonMode",{enumerable:!0,get:function(){return v.DrawPolygonMode}}),Object.defineProperty(e,"DrawRectangleMode",{enumerable:!0,get:function(){return _.DrawRectangleMode}}),Object.defineProperty(e,"DrawSquareMode",{enumerable:!0,get:function(){return b.DrawSquareMode}}),Object.defineProperty(e,"DrawRectangleFromCenterMode",{enumerable:!0,get:function(){return w.DrawRectangleFromCenterMode}}),Object.defineProperty(e,"DrawSquareFromCenterMode",{enumerable:!0,get:function(){return E.DrawSquareFromCenterMode}}),Object.defineProperty(e,"DrawCircleByDiameterMode",{enumerable:!0,get:function(){return x.DrawCircleByDiameterMode}}),Object.defineProperty(e,"DrawCircleFromCenterMode",{enumerable:!0,get:function(){return S.DrawCircleFromCenterMode}}),Object.defineProperty(e,"DrawEllipseByBoundingBoxMode",{enumerable:!0,get:function(){return T.DrawEllipseByBoundingBoxMode}}),Object.defineProperty(e,"DrawEllipseUsingThreePointsMode",{enumerable:!0,get:function(){return P.DrawEllipseUsingThreePointsMode}}),Object.defineProperty(e,"DrawRectangleUsingThreePointsMode",{enumerable:!0,get:function(){return C.DrawRectangleUsingThreePointsMode}}),Object.defineProperty(e,"Draw90DegreePolygonMode",{enumerable:!0,get:function(){return M.Draw90DegreePolygonMode}}),Object.defineProperty(e,"DrawPolygonByDraggingMode",{enumerable:!0,get:function(){return I.DrawPolygonByDraggingMode}}),Object.defineProperty(e,"ImmutableFeatureCollection",{enumerable:!0,get:function(){return O.ImmutableFeatureCollection}}),Object.defineProperty(e,"ViewMode",{enumerable:!0,get:function(){return R.ViewMode}}),Object.defineProperty(e,"MeasureDistanceMode",{enumerable:!0,get:function(){return L.MeasureDistanceMode}}),Object.defineProperty(e,"MeasureAreaMode",{enumerable:!0,get:function(){return B.MeasureAreaMode}}),Object.defineProperty(e,"MeasureAngleMode",{enumerable:!0,get:function(){return k.MeasureAngleMode}}),Object.defineProperty(e,"CompositeMode",{enumerable:!0,get:function(){return N.CompositeMode}}),Object.defineProperty(e,"SnappableMode",{enumerable:!0,get:function(){return F.SnappableMode}}),Object.defineProperty(e,"_memoize",{enumerable:!0,get:function(){return D.default}}),e.utils=void 0;var i,o=n(96146),s=n(59582),a=n(18264),u=n(15348),l=n(80456),c=n(33913),h=n(80013),A=n(68239),f=n(63367),d=n(61185),p=n(41279),g=n(28310),m=n(19767),y=n(40777),v=n(61607),_=n(38678),b=n(7552),w=n(29955),E=n(40037),x=n(10567),S=n(60976),T=n(98248),P=n(97971),C=n(18320),M=n(49171),I=n(54539),O=n(78768),R=n(4891),L=n(35020),B=n(14030),k=n(77836),N=n(68367),F=n(52926),D=(i=n(79848))&&i.__esModule?i:{default:i},j=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var e=U();if(e&&e.has(t))return e.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;
2s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,e&&e.set(t,n),n}(n(71169));function U(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return U=function(){return t},t}e.utils=j},21026:(t,e,n)=>{"use strict";var r=n(41857),i=n(28498),o=n(78394),s=n(90243),a=n(99669),u=i(s());r(u,{getPolyfill:s,implementation:o,shim:a}),t.exports=u},21554:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,PI_OVER_TWO:Math.PI/2,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,TWO_PI:2*Math.PI}},21580:t=>{"use strict";var e=11102230246251565e-32,n=134217729,r=(3+8*e)*e;function i(t,e,n,r,i){var o,s,a,u,l=e[0],c=r[0],h=0,A=0;c>l==c>-l?(o=l,l=e[++h]):(o=c,c=r[++A]);var f=0;if(h<t&&A<n)for(c>l==c>-l?(a=o-((s=l+o)-l),l=e[++h]):(a=o-((s=c+o)-c),c=r[++A]),o=s,0!==a&&(i[f++]=a);h<t&&A<n;)c>l==c>-l?(a=o-((s=o+l)-(u=s-o))+(l-u),l=e[++h]):(a=o-((s=o+c)-(u=s-o))+(c-u),c=r[++A]),o=s,0!==a&&(i[f++]=a);for(;h<t;)a=o-((s=o+l)-(u=s-o))+(l-u),l=e[++h],o=s,0!==a&&(i[f++]=a);for(;A<n;)a=o-((s=o+c)-(u=s-o))+(c-u),c=r[++A],o=s,0!==a&&(i[f++]=a);return 0===o&&0!==f||(i[f++]=o),f}function o(t){return new Float64Array(t)}var s=o(4),a=o(8),u=o(12),l=o(16),c=o(4);function h(t,e,o,h,A,f){var d=(e-f)*(o-A),p=(t-A)*(h-f),g=d-p,m=Math.abs(d+p);return Math.abs(g)>=33306690738754716e-32*m?g:-function(t,e,o,h,A,f,d){var p,g,m,y,v,_,b,w,E,x,S,T,P,C,M,I,O,R,L=t-A,B=o-A,k=e-f,N=h-f;v=(M=(w=L-(b=(_=n*L)-(_-L)))*(x=N-(E=(_=n*N)-(_-N)))-((C=L*N)-b*E-w*E-b*x))-(S=M-(O=(w=k-(b=(_=n*k)-(_-k)))*(x=B-(E=(_=n*B)-(_-B)))-((I=k*B)-b*E-w*E-b*x))),s[0]=M-(S+v)+(v-O),v=(P=C-((T=C+S)-(v=T-C))+(S-v))-(S=P-I),s[1]=P-(S+v)+(v-I),v=(R=T+S)-T,s[2]=T-(R-v)+(S-v),s[3]=R;var F=function(t,e){for(var n=e[0],r=1;r<4;r++)n+=e[r];return n}(0,s),D=22204460492503146e-32*d;if(F>=D||-F>=D)return F;if(p=t-(L+(v=t-L))+(v-A),m=o-(B+(v=o-B))+(v-A),g=e-(k+(v=e-k))+(v-f),y=h-(N+(v=h-N))+(v-f),0===p&&0===g&&0===m&&0===y)return F;if(D=11093356479670487e-47*d+r*Math.abs(F),(F+=L*y+N*p-(k*m+B*g))>=D||-F>=D)return F;v=(M=(w=p-(b=(_=n*p)-(_-p)))*(x=N-(E=(_=n*N)-(_-N)))-((C=p*N)-b*E-w*E-b*x))-(S=M-(O=(w=g-(b=(_=n*g)-(_-g)))*(x=B-(E=(_=n*B)-(_-B)))-((I=g*B)-b*E-w*E-b*x))),c[0]=M-(S+v)+(v-O),v=(P=C-((T=C+S)-(v=T-C))+(S-v))-(S=P-I),c[1]=P-(S+v)+(v-I),v=(R=T+S)-T,c[2]=T-(R-v)+(S-v),c[3]=R;var j=i(4,s,4,c,a);v=(M=(w=L-(b=(_=n*L)-(_-L)))*(x=y-(E=(_=n*y)-(_-y)))-((C=L*y)-b*E-w*E-b*x))-(S=M-(O=(w=k-(b=(_=n*k)-(_-k)))*(x=m-(E=(_=n*m)-(_-m)))-((I=k*m)-b*E-w*E-b*x))),c[0]=M-(S+v)+(v-O),v=(P=C-((T=C+S)-(v=T-C))+(S-v))-(S=P-I),c[1]=P-(S+v)+(v-I),v=(R=T+S)-T,c[2]=T-(R-v)+(S-v),c[3]=R;var U=i(j,a,4,c,u);v=(M=(w=p-(b=(_=n*p)-(_-p)))*(x=y-(E=(_=n*y)-(_-y)))-((C=p*y)-b*E-w*E-b*x))-(S=M-(O=(w=g-(b=(_=n*g)-(_-g)))*(x=m-(E=(_=n*m)-(_-m)))-((I=g*m)-b*E-w*E-b*x))),c[0]=M-(S+v)+(v-O),v=(P=C-((T=C+S)-(v=T-C))+(S-v))-(S=P-I),c[1]=P-(S+v)+(v-I),v=(R=T+S)-T,c[2]=T-(R-v)+(S-v),c[3]=R;var G=i(U,u,4,c,l);return l[G-1]}(t,e,o,h,A,f,m)}t.exports=function(t,e){var n,r,i,o,s,a,u,l,c,A=0,f=t[0],d=t[1],p=e.length;for(n=0;n<p;n++){r=0;var g=e[n],m=g.length-1;if((l=g[0])[0]!==g[m][0]&&l[1]!==g[m][1])throw new Error("First and last coordinates in a ring must be the same");for(o=l[0]-f,s=l[1]-d;r<m;r++){if(a=(c=g[r+1])[0]-f,u=c[1]-d,0===s&&0===u){if(a<=0&&o>=0||o<=0&&a>=0)return 0}else if(u>=0&&s<=0||u<=0&&s>=0){if(0===(i=h(o,a,s,u,0,0)))return 0;(i>0&&u>0&&s<=0||i<0&&u<=0&&s>0)&&A++}l=c,s=u,o=a}}return A%2!=0}},21714:(t,e,n)=>{"use strict";function r(t){let e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,s=-1/0;const a=t.POSITION?t.POSITION.value:[],u=a&&a.length;for(let t=0;t<u;t+=3){const u=a[t],l=a[t+1],c=a[t+2];e=u<e?u:e,n=l<n?l:n,r=c<r?c:r,i=u>i?u:i,o=l>o?l:o,s=c>s?c:s}return[[e,n,r],[i,o,s]]}n.d(e,{l:()=>r})},22296:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(24586);class i{constructor(t,e){(0,r.A)(this,"_viewportProps",void 0),(0,r.A)(this,"_state",void 0),this._viewportProps=this.applyConstraints(t),this._state=e}getViewportProps(){return this._viewportProps}getState(){return this._state}}},22398:(t,e,n)=>{"use strict";function r(t,e,n){if(t===e)return!0;
2if(!n||!t||!e)return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(!r(t[i],e[i],n-1))return!1;return!0}if(Array.isArray(e))return!1;if("object"==typeof t&&"object"==typeof e){const i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(const o of i){if(!e.hasOwnProperty(o))return!1;if(!r(t[o],e[o],n-1))return!1}return!0}return!1}n.d(e,{b:()=>r})},22424:(t,e,n)=>{"use strict";n.d(e,{A:()=>xt});var r=n(24586),i=n(95823),o=n(22398),s=n(23615),a=n(5371);class u{constructor(t){(0,r.A)(this,"width",void 0),(0,r.A)(this,"height",void 0),(0,r.A)(this,"views",void 0),(0,r.A)(this,"viewState",void 0),(0,r.A)(this,"controllers",void 0),(0,r.A)(this,"timeline",void 0),(0,r.A)(this,"_viewports",void 0),(0,r.A)(this,"_viewportMap",void 0),(0,r.A)(this,"_isUpdating",void 0),(0,r.A)(this,"_needsRedraw",void 0),(0,r.A)(this,"_needsUpdate",void 0),(0,r.A)(this,"_eventManager",void 0),(0,r.A)(this,"_eventCallbacks",void 0),this.views=[],this.width=100,this.height=100,this.viewState={},this.controllers={},this.timeline=t.timeline,this._viewports=[],this._viewportMap={},this._isUpdating=!1,this._needsRedraw="First render",this._needsUpdate="Initialize",this._eventManager=t.eventManager,this._eventCallbacks={onViewStateChange:t.onViewStateChange,onInteractionStateChange:t.onInteractionStateChange},Object.seal(this),this.setProps(t)}finalize(){for(const t in this.controllers){const e=this.controllers[t];e&&e.finalize()}this.controllers={}}needsRedraw(t={clearRedrawFlags:!1}){const e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}setNeedsUpdate(t){this._needsUpdate=this._needsUpdate||t,this._needsRedraw=this._needsRedraw||t}updateViewStates(){for(const t in this.controllers){const e=this.controllers[t];e&&e.updateTransition()}}getViewports(t){return t?this._viewports.filter(e=>e.containsPixel(t)):this._viewports}getViews(){const t={};return this.views.forEach(e=>{t[e.id]=e}),t}getView(t){return this.views.find(e=>e.id===t)}getViewState(t){const e="string"==typeof t?this.getView(t):t,n=e&&this.viewState[e.getViewStateId()]||this.viewState;return e?e.filterViewState(n):n}getViewport(t){return this._viewportMap[t]}unproject(t,e){const n=this.getViewports(),r={x:t[0],y:t[1]};for(let i=n.length-1;i>=0;--i){const o=n[i];if(o.containsPixel(r)){const n=t.slice();return n[0]-=o.x,n[1]-=o.y,o.unproject(n,e)}}return null}setProps(t){t.views&&this._setViews(t.views),t.viewState&&this._setViewState(t.viewState),("width"in t||"height"in t)&&this._setSize(t.width,t.height),this._isUpdating||this._update()}_update(){this._isUpdating=!0,this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._isUpdating=!1}_setSize(t,e){t===this.width&&e===this.height||(this.width=t,this.height=e,this.setNeedsUpdate("Size changed"))}_setViews(t){t=(0,a.B)(t,Boolean),this._diffViews(t,this.views)&&this.setNeedsUpdate("views changed"),this.views=t}_setViewState(t){t?(!(0,o.b)(t,this.viewState,3)&&this.setNeedsUpdate("viewState changed"),this.viewState=t):s.A.warn("missing `viewState` or `initialViewState`")()}_onViewStateChange(t,e){this._eventCallbacks.onViewStateChange&&this._eventCallbacks.onViewStateChange({...e,viewId:t})}_createController(t,e){return new(0,e.type)({timeline:this.timeline,eventManager:this._eventManager,onViewStateChange:this._onViewStateChange.bind(this,e.id),onStateChange:this._eventCallbacks.onInteractionStateChange,makeViewport:e=>{var n;return null===(n=this.getView(t.id))||void 0===n?void 0:n.makeViewport({viewState:e,width:this.width,height:this.height})}})}_updateController(t,e,n,r){const i=t.controller;if(i&&n){const o={...e,...i,id:t.id,x:n.x,y:n.y,width:n.width,height:n.height};return r&&r.constructor===i.type||(r=this._createController(t,o)),r&&r.setProps(o),r}return null}_rebuildViewports(){const{views:t}=this,e=this.controllers;this._viewports=[],this.controllers={};let n=!1;for(let r=t.length;r--;){const i=t[r],o=this.getViewState(i),s=i.makeViewport({viewState:o,width:this.width,height:this.height});let a=e[i.id];const u=Boolean(i.controller);u&&!a&&(n=!0),!n&&u||!a||(a.finalize(),a=null),this.controllers[i.id]=this._updateController(i,o,s,a),s&&this._viewports.unshift(s)}for(const t in e){const n=e[t];n&&!this.controllers[t]&&n.finalize()}this._buildViewportMap()}_buildViewportMap(){this._viewportMap={}
2,this._viewports.forEach(t=>{t.id&&(this._viewportMap[t.id]=this._viewportMap[t.id]||t)})}_diffViews(t,e){return t.length!==e.length||t.some((n,r)=>!t[r].equals(e[r]))}}var l=n(72380),c=n(46680);const h=new c.A;class A{constructor(){(0,r.A)(this,"effects",void 0),(0,r.A)(this,"_resolvedEffects",[]),(0,r.A)(this,"_defaultEffects",[]),(0,r.A)(this,"_needsRedraw",void 0),this.effects=[],this._needsRedraw="Initial render",this._setEffects([])}addDefaultEffect(t){const e=this._defaultEffects;if(!e.find(e=>e.id===t.id)){const n=e.findIndex(e=>{return n=t,(null!==(r=e.order)&&void 0!==r?r:1/0)-(null!==(i=n.order)&&void 0!==i?i:1/0)>0;var n,r,i});n<0?e.push(t):e.splice(n,0,t),this._setEffects(this.effects)}}setProps(t){"effects"in t&&((0,o.b)(t.effects,this.effects,1)||this._setEffects(t.effects))}needsRedraw(t={clearRedrawFlags:!1}){const e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}getEffects(){return this._resolvedEffects}_setEffects(t){const e={};for(const t of this.effects)e[t.id]=t;const n=[];for(const r of t){const t=e[r.id];t&&t!==r?t.setProps?(t.setProps(r.props),n.push(t)):(t.cleanup(),n.push(r)):n.push(r),delete e[r.id]}for(const t in e)e[t].cleanup();this.effects=n,this._resolvedEffects=n.concat(this._defaultEffects),t.some(t=>t instanceof c.A)||this._resolvedEffects.push(h),this._needsRedraw="effects changed"}finalize(){for(const t of this._resolvedEffects)t.cleanup();this.effects.length=0,this._resolvedEffects.length=0,this._defaultEffects.length=0}}var f=n(45202),d=n(48091),p=n(79266),g=n(44454),m=n(23861),y=n(15985);const v={pickedColor:null,pickedObjectIndex:-1};function _({pickedColors:t,decodePickingColor:e,deviceX:n,deviceY:r,deviceRadius:i,deviceRect:o}){const{x:a,y:u,width:l,height:c}=o;let h=i*i,A=-1,f=0;for(let e=0;e<c;e++){const i=e+u-r,o=i*i;if(o>h)f+=4*l;else for(let e=0;e<l;e++){if(t[f+3]-1>=0){const t=e+a-n,r=t*t+o;r<=h&&(h=r,A=f)}f+=4}}if(A>=0){const n=t.slice(A,A+4),r=e(n);if(r){const t=Math.floor(A/4/l),e=A/4-t*l;return{...r,pickedColor:n,pickedX:a+e,pickedY:u+t}}s.A.error("Picked non-existent layer. Is picking buffer corrupt?")()}return v}function b({pickInfo:t,viewports:e,pixelRatio:n,x:r,y:i,z:o}){let s,a=e[0];if(e.length>1&&(a=function(t,e){for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.containsPixel(e))return r}return t[0]}((null==t?void 0:t.pickedViewports)||e,{x:r,y:i})),a){const t=[r-a.x,i-a.y];void 0!==o&&(t[2]=o),s=a.unproject(t)}
2return{color:null,layer:null,viewport:a,index:-1,picked:!1,x:r,y:i,pixel:[r,i],coordinate:s,devicePixel:t&&"pickedX"in t?[t.pickedX,t.pickedY]:void 0,pixelRatio:n}}function w(t){const{pickInfo:e,lastPickedInfo:n,mode:r,layers:i}=t,{pickedColor:o,pickedLayer:s,pickedObjectIndex:a}=e,u=s?[s]:[];if("hover"===r){const t=n.index,e=n.layerId,r=s?s.props.id:null;if(r!==e||a!==t){if(r!==e){const t=i.find(t=>t.props.id===e);t&&u.unshift(t)}n.layerId=r,n.index=a,n.info=null}}const l=b(t),c=new Map;return c.set(null,l),u.forEach(t=>{let e={...l};t===s&&(e.color=o,e.index=a,e.picked=!0),e=E({layer:t,info:e,mode:r});const i=e.layer;t===s&&"hover"===r&&(n.info=e),c.set(i.id,e),"hover"===r&&i.updateAutoHighlight(e)}),c}function E({layer:t,info:e,mode:n}){for(;t&&e;){const r=e.layer||null;e.sourceLayer=r,e.layer=t,e=t.getPickingInfo({info:e,mode:n,sourceLayer:r}),t=t.parent}return e}class x{constructor(t){(0,r.A)(this,"gl",void 0),(0,r.A)(this,"pickingFBO",void 0),(0,r.A)(this,"depthFBO",void 0),(0,r.A)(this,"pickLayersPass",void 0),(0,r.A)(this,"layerFilter",void 0),(0,r.A)(this,"lastPickedInfo",void 0),(0,r.A)(this,"_pickable",!0),this.gl=t,this.pickLayersPass=new y.A(t),this.lastPickedInfo={index:-1,layerId:null,info:null}}setProps(t){"layerFilter"in t&&(this.layerFilter=t.layerFilter),"_pickable"in t&&(this._pickable=t._pickable)}finalize(){this.pickingFBO&&this.pickingFBO.delete(),this.depthFBO&&(this.depthFBO.color.delete(),this.depthFBO.delete())}
2pickObject(t){return this._pickClosestObject(t)}pickObjects(t){return this._pickVisibleObjects(t)}getLastPickedObject({x:t,y:e,layers:n,viewports:r},i=this.lastPickedInfo.info){const o=i&&i.layer&&i.layer.id,s=i&&i.viewport&&i.viewport.id,a=o?n.find(t=>t.id===o):null,u=s&&r.find(t=>t.id===s)||r[0],l=u&&u.unproject([t-u.x,e-u.y]),c={x:t,y:e,viewport:u,coordinate:l,layer:a};return{...i,...c}}_resizeBuffer(){var t,e;const{gl:n}=this;if(!this.pickingFBO&&(this.pickingFBO=new d.A(n),d.A.isSupported(n,{colorBufferFloat:!0}))){const t=new d.A(n);t.attach({36064:new p.A(n,{format:(0,g.C6)(n)?34836:6408,type:5126})}),this.depthFBO=t}null===(t=this.pickingFBO)||void 0===t||t.resize({width:n.canvas.width,height:n.canvas.height}),null===(e=this.depthFBO)||void 0===e||e.resize({width:n.canvas.width,height:n.canvas.height})}_getPickable(t){if(!1===this._pickable)return null;const e=t.filter(t=>this.pickLayersPass.shouldDrawLayer(t)&&!t.isComposite);return e.length?e:null}_pickClosestObject({layers:t,views:e,viewports:n,x:r,y:i,radius:o=0,depth:s=1,mode:a="query",unproject3D:u,onViewportActive:l,effects:c}){const h=this._getPickable(t),A=(0,g.o0)(this.gl);if(!h)return{result:[],emptyInfo:b({viewports:n,x:r,y:i,pixelRatio:A})};this._resizeBuffer();const f=(0,g.w8)(this.gl,[r,i],!0),d=[f.x+Math.floor(f.width/2),f.y+Math.floor(f.height/2)],p=Math.round(o*A),{width:m,height:y}=this.pickingFBO,v=this._getPickingRect({deviceX:d[0],deviceY:d[1],deviceRadius:p,deviceWidth:m,deviceHeight:y}),E={x:r-o,y:i-o,width:2*o+1,height:2*o+1};let x;const S=[],T=new Set;for(let t=0;t<s;t++){let o,f;if(o=v?_({...this._drawAndSample({layers:h,views:e,viewports:n,onViewportActive:l,deviceRect:v,cullRect:E,effects:c,pass:"picking:".concat(a)}),deviceX:d[0],deviceY:d[1],deviceRadius:p,deviceRect:v}):{pickedColor:null,pickedObjectIndex:-1},o.pickedLayer&&u&&this.depthFBO){const{pickedColors:t}=this._drawAndSample({layers:[o.pickedLayer],views:e,viewports:n,onViewportActive:l,deviceRect:{x:o.pickedX,y:o.pickedY,width:1,height:1},cullRect:E,effects:c,pass:"picking:".concat(a,":z")},!0);t[3]&&(f=t[0])}o.pickedLayer&&t+1<s&&(T.add(o.pickedLayer),o.pickedLayer.disablePickingIndex(o.pickedObjectIndex)),x=w({pickInfo:o,lastPickedInfo:this.lastPickedInfo,mode:a,layers:h,viewports:n,x:r,y:i,z:f,pixelRatio:A});for(const t of x.values())t.layer&&S.push(t);if(!o.pickedColor)break}for(const t of T)t.restorePickingColors();return{result:S,emptyInfo:x.get(null)}}_pickVisibleObjects({layers:t,views:e,viewports:n,x:r,y:i,width:o=1,height:a=1,mode:u="query",maxObjects:l=null,onViewportActive:c,effects:h}){const A=this._getPickable(t);if(!A)return[];this._resizeBuffer();const f=(0,g.o0)(this.gl),d=(0,g.w8)(this.gl,[r,i],!0),p=d.x,m=d.y+d.height,y=(0,g.w8)(this.gl,[r+o,i+a],!0),v=y.x+y.width,_=y.y,b={x:p,y:_,width:v-p,height:m-_},w=function({pickedColors:t,decodePickingColor:e}){const n=new Map;if(t)for(let r=0;r<t.length;r+=4)if(t[r+3]-1>=0){const i=t.slice(r,r+4),o=i.join(",");if(!n.has(o)){const t=e(i);t?n.set(o,{...t,color:i}):s.A.error("Picked non-existent layer. Is picking buffer corrupt?")()}}return Array.from(n.values())}(this._drawAndSample({layers:A,views:e,viewports:n,onViewportActive:c,deviceRect:b,cullRect:{x:r,y:i,width:o,height:a},effects:h,pass:"picking:".concat(u)})),x=new Map,S=Number.isFinite(l);for(let t=0;t<w.length&&!(S&&l&&x.size>=l);t++){const e=w[t];let n={color:e.pickedColor,layer:null,index:e.pickedObjectIndex,picked:!0,x:r,y:i,pixelRatio:f};n=E({layer:e.pickedLayer,info:n,mode:u}),x.has(n.object)||x.set(n.object,n)}return Array.from(x.values())}_drawAndSample({layers:t,views:e,viewports:n,onViewportActive:r,deviceRect:i,cullRect:o,effects:s,pass:a},u=!1){const l=u?this.depthFBO:this.pickingFBO,c={layers:t,layerFilter:this.layerFilter,views:e,viewports:n,onViewportActive:r,pickingFBO:l,deviceRect:i,cullRect:o,effects:s,pass:a,pickZ:u,preRenderStats:{}};for(const t of s)t.useInPicking&&(c.preRenderStats[t.id]=t.preRender(this.gl,c));const{decodePickingColor:h}=this.pickLayersPass.render(c),{x:A,y:f,width:d,height:p}=i,g=new(u?Float32Array:Uint8Array)(d*p*4);
2return(0,m.sy)(l,{sourceX:A,sourceY:f,sourceWidth:d,sourceHeight:p,target:g}),{pickedColors:g,decodePickingColor:h}}_getPickingRect({deviceX:t,deviceY:e,deviceRadius:n,deviceWidth:r,deviceHeight:i}){const o=Math.max(0,t-n),s=Math.max(0,e-n),a=Math.min(r,t+n+1)-o,u=Math.min(i,e+n+1)-s;return a<=0||u<=0?null:{x:o,y:s,width:a,height:u}}}const S={zIndex:"1",position:"absolute",pointerEvents:"none",color:"#a0a7b4",backgroundColor:"#29323c",padding:"10px",top:"0",left:"0",display:"none"};class T{constructor(t){(0,r.A)(this,"el",null),(0,r.A)(this,"isVisible",!1);const e=t.parentElement;e&&(this.el=document.createElement("div"),this.el.className="deck-tooltip",Object.assign(this.el.style,S),e.appendChild(this.el))}setTooltip(t,e,n){const r=this.el;if(r){if("string"==typeof t)r.innerText=t;else{if(!t)return this.isVisible=!1,void(r.style.display="none");t.text&&(r.innerText=t.text),t.html&&(r.innerHTML=t.html),t.className&&(r.className=t.className)}this.isVisible=!0,r.style.display="block",r.style.transform="translate(".concat(e,"px, ").concat(n,"px)"),t&&"object"==typeof t&&"style"in t&&Object.assign(r.style,t.style)}}remove(){this.el&&(this.el.remove(),this.el=null)}}var P=n(35423),C=n(43168),M=n(87967),I=n(67970),O=n(38466),R=n(14061),L=n(52421),B=n(99545);const k={mousedown:1,mousemove:2,mouseup:4};!function(t){const e=t.prototype.handler;t.prototype.handler=function(t){const n=this.store;t.button>0&&"pointerdown"===t.type&&(function(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return!0;return!1}(n,e=>e.pointerId===t.pointerId)||n.push(t)),e.call(this,t)}}(B.PointerEventInput),B.MouseInput.prototype.handler=function(t){let e=k[t.type];1&e&&t.button>=0&&(this.pressed=!0),2&e&&0===t.buttons&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))};const N=B.Manager,F=B;class D{constructor(t,e,n){this.element=t,this.callback=e,this.options={enable:!0,...n}}}const j=F?[[F.Pan,{event:"tripan",pointers:3,threshold:0,enable:!1}],[F.Rotate,{enable:!1}],[F.Pinch,{enable:!1}],[F.Swipe,{enable:!1}],[F.Pan,{threshold:0,enable:!1}],[F.Press,{enable:!1}],[F.Tap,{event:"doubletap",taps:2,enable:!1}],[F.Tap,{event:"anytap",enable:!1}],[F.Tap,{enable:!1}]]:null,U={tripan:["rotate","pinch","pan"],rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},G={doubletap:["tap"]},z={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},V={KEY_EVENTS:["keydown","keyup"],MOUSE_EVENTS:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],WHEEL_EVENTS:["wheel","mousewheel"]},H={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",tripan:"tripan",tripanstart:"tripan",tripanmove:"tripan",tripanup:"tripan",tripandown:"tripan",tripanleft:"tripan",tripanright:"tripan",tripanend:"tripan",tripancancel:"tripan",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},q={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},W="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",X="undefined"!=typeof window?window:n.g;void 0!==n.g?n.g:window,"undefined"!=typeof document&&document;let Y=!1;try{const t={get passive(){return Y=!0,!0}};X.addEventListener("test",null,t),X.removeEventListener("test",null)}catch(t){Y=!1}const Q=-1!==W.indexOf("firefox"),{WHEEL_EVENTS:J}=V,Z="wheel",K=4.000244140625;class $ extends D{constructor(t,e,n){super(t,e,n),this.handleEvent=t=>{if(!this.options.enable)return;let e=t.deltaY;X.WheelEvent&&(Q&&t.deltaMode===X.WheelEvent.DOM_DELTA_PIXEL&&(e/=X.devicePixelRatio),t.deltaMode===X.WheelEvent.DOM_DELTA_LINE&&(e*=40)),0!==e&&e%K===0&&(e=Math.floor(e/K)),t.shiftKey&&e&&(e*=.25),this.callback({type:Z,center:{x:t.clientX,y:t.clientY},delta:-e,srcEvent:t,pointerType:"mouse",target:t.target})},this.events=(this.options.events||[]).concat(J),this.events.forEac
vendor: 5,604 bytes, line 2
2h(e=>t.addEventListener(e,this.handleEvent,!!Y&&{passive:!1}))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){t===Z&&(this.options.enable=e)}}const{MOUSE_EVENTS:tt}=V,et="pointermove",nt="pointerover",rt="pointerout",it="pointerenter",ot="pointerleave";class st extends D{constructor(t,e,n){super(t,e,n),this.handleEvent=t=>{this.handleOverEvent(t),this.handleOutEvent(t),this.handleEnterEvent(t),this.handleLeaveEvent(t),this.handleMoveEvent(t)},this.pressed=!1;const{enable:r}=this.options;this.enableMoveEvent=r,this.enableLeaveEvent=r,this.enableEnterEvent=r,this.enableOutEvent=r,this.enableOverEvent=r,this.events=(this.options.events||[]).concat(tt),this.events.forEach(e=>t.addEventListener(e,this.handleEvent))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){t===et&&(this.enableMoveEvent=e),t===nt&&(this.enableOverEvent=e),t===rt&&(this.enableOutEvent=e),t===it&&(this.enableEnterEvent=e),t===ot&&(this.enableLeaveEvent=e)}handleOverEvent(t){this.enableOverEvent&&"mouseover"===t.type&&this._emit(nt,t)}handleOutEvent(t){this.enableOutEvent&&"mouseout"===t.type&&this._emit(rt,t)}handleEnterEvent(t){this.enableEnterEvent&&"mouseenter"===t.type&&this._emit(it,t)}handleLeaveEvent(t){this.enableLeaveEvent&&"mouseleave"===t.type&&this._emit(ot,t)}handleMoveEvent(t){if(this.enableMoveEvent)switch(t.type){case"mousedown":t.button>=0&&(this.pressed=!0);break;case"mousemove":0===t.buttons&&(this.pressed=!1),this.pressed||this._emit(et,t);break;case"mouseup":this.pressed=!1}}_emit(t,e){this.callback({type:t,center:{x:e.clientX,y:e.clientY},srcEvent:e,pointerType:"mouse",target:e.target})}}const{KEY_EVENTS:at}=V,ut="keydown",lt="keyup";class ct extends D{constructor(t,e,n){super(t,e,n),this.handleEvent=t=>{const e=t.target||t.srcElement;"INPUT"===e.tagName&&"text"===e.type||"TEXTAREA"===e.tagName||(this.enableDownEvent&&"keydown"===t.type&&this.callback({type:ut,srcEvent:t,key:t.key,target:t.target}),this.enableUpEvent&&"keyup"===t.type&&this.callback({type:lt,srcEvent:t,key:t.key,target:t.target}))},this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=(this.options.events||[]).concat(at),t.tabIndex=this.options.tabIndex||0,t.style.outline="none",this.events.forEach(e=>t.addEventListener(e,this.handleEvent))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){t===ut&&(this.enableDownEvent=e),t===lt&&(this.enableUpEvent=e)}}const ht="contextmenu";class At extends D{constructor(t,e,n){super(t,e,n),this.handleEvent=t=>{this.options.enable&&this.callback({type:ht,center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})},t.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(t,e){t===ht&&(this.options.enable=e)}}const ft={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4};function dt(t){const e=ft[t.srcEvent.type];if(!e)return null;const{buttons:n,button:r}=t.srcEvent;let i=!1,o=!1,s=!1;return 2===e?(i=Boolean(1&n),o=Boolean(4&n),s=Boolean(2&n)):(i=0===r,o=1===r,s=2===r),{leftButton:i,middleButton:o,rightButton:s}}function pt(t,e){const n=t.center;if(!n)return null;const r=e.getBoundingClientRect(),i=r.width/e.offsetWidth||1,o=r.height/e.offsetHeight||1;return{center:n,offsetCenter:{x:(n.x-r.left-e.clientLeft)/i,y:(n.y-r.top-e.clientTop)/o}}}const gt={srcElement:"root",priority:0};class mt{constructor(t){this.handleEvent=t=>{if(this.isEmpty())return;const e=this._normalizeEvent(t);let n=t.srcEvent.target;for(;n&&n!==e.rootElement;){if(this._emit(e,n),e.handled)return;n=n.parentNode}this._emit(e,"root")},this.eventManager=t,this.handlers=[],this.handlersByElement=new Map,this._active=!1}isEmpty(){return!this._active}add(t,e,n,r=!1,i=!1){const{handlers:o,handlersByElement:s}=this;let a=gt;"string"==typeof n||n&&n.addEventListener?a={...gt,srcElement:n}:n&&(a={...gt,...n});let u=s.get(a.srcElement);u||(u=[],s.set(a.srcElement,u));const l={type:t,handler:e,srcElement:a.srcElement,priority:a.priority};r&&(l.once=!0),i&&(l.passive=!0),o.push(l),this._active=this._active||!l.passive;let c=u.length-1;for(;c>=0&&!(u[c].priority>=l.priority);)c--;u.splice(c+1,0,l)}remove(t,e){const{handlers:n,handlersByElement:r}=this;for(let i=n.length-1;i>=0;i--){const o=n[i];if(o.type===t&&o.handler===e){n.splice(i,1);const t=r.get(o.srcElement);t.splice(t.indexOf(o),1),0===t.length&&r.delete(o.srcElement)}}this._active=n.some(t=>!t.passive)}_emit(t,e){const n=this.handlersByElement.get(e);if(n){let e=!1;const r=()=>{t.handled=!0},i=()=>{t.handled=!0,e=!0},o=[];for(let s=0;s<n.length;s++){const{type:a,handler:u,once:l}=n[s];if(u({...t,type:a,stopPropagation:r,stopImmediatePropagation:i}),l&&o.push(n[s]),e)break}for(let t=0;t<o.length;t++){const{type:e,handler:n}=o[t];this.remove(e,n)}}}_normalizeEvent(t){const e=this.eventManager.getElement();return{...t,...dt(t),...pt(t,e),preventDefault:()=>{t.srcEvent.preventDefault()},stopImmediatePropagation:null,stopPropagation:null,handled:!1,rootElement:e}}}const yt={events:null,recognizers:null,recognizerOptions:{},Manager:N,touchAction:"none",tabIndex:0};class vt{constructor(t=null,e){this._onBasicInput=t=>{const{srcEvent:e}=t,n=z[e.type];n&&this.manager.emit(n,t)},this._onOtherEvent=t=>{this.manager.emit(t.type,t)},this.options={...yt,...e},this.events=new Map,this.setElement(t);const{events:n}=this.options;n&&this.on(n)}getElement(){return this.element}
2setElement(t){if(this.element&&this.destroy(),this.element=t,!t)return;const{options:e}=this,n=e.Manager;this.manager=new n(t,{touchAction:e.touchAction,recognizers:e.recognizers||j}).on("hammer.input",this._onBasicInput),e.recognizers||Object.keys(U).forEach(t=>{const e=this.manager.get(t);e&&U[t].forEach(t=>{e.recognizeWith(t)})});for(const t in e.recognizerOptions){const n=this.manager.get(t);if(n){const r=e.recognizerOptions[t];delete r.enable,n.set(r)}}this.wheelInput=new $(t,this._onOtherEvent,{enable:!1}),this.moveInput=new st(t,this._onOtherEvent,{enable:!1}),this.keyInput=new ct(t,this._onOtherEvent,{enable:!1,tabIndex:e.tabIndex}),this.contextmenuInput=new At(t,this._onOtherEvent,{enable:!1});for(const[t,e]of this.events)e.isEmpty()||(this._toggleRecognizer(e.recognizerName,!0),this.manager.on(t,e.handleEvent))}destroy(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}on(t,e,n){this._addEventHandler(t,e,n,!1)}once(t,e,n){this._addEventHandler(t,e,n,!0)}watch(t,e,n){this._addEventHandler(t,e,n,!1,!0)}off(t,e){this._removeEventHandler(t,e)}_toggleRecognizer(t,e){const{manager:n}=this;if(!n)return;const r=n.get(t);if(r&&r.options.enable!==e){r.set({enable:e});const i=G[t];i&&!this.options.recognizers&&i.forEach(i=>{const o=n.get(i);e?(o.requireFailure(t),r.dropRequireFailure(i)):o.dropRequireFailure(t)})}this.wheelInput.enableEventType(t,e),this.moveInput.enableEventType(t,e),this.keyInput.enableEventType(t,e),this.contextmenuInput.enableEventType(t,e)}_addEventHandler(t,e,n,r,i){if("string"!=typeof t){n=e;for(const e in t)this._addEventHandler(e,t[e],n,r,i);return}const{manager:o,events:s}=this,a=q[t]||t;let u=s.get(a);u||(u=new mt(this),s.set(a,u),u.recognizerName=H[a]||a,o&&o.on(a,u.handleEvent)),u.add(t,e,n,r,i),u.isEmpty()||this._toggleRecognizer(u.recognizerName,!0)}_removeEventHandler(t,e){if("string"!=typeof t){for(const e in t)this._removeEventHandler(e,t[e]);return}const{events:n}=this,r=q[t]||t,i=n.get(r);if(i&&(i.remove(t,e),i.isEmpty())){const{recognizerName:t}=i;let e=!1;for(const r of n.values())if(r.recognizerName===t&&!r.isEmpty()){e=!0;break}e||this._toggleRecognizer(t,!1)}}}var _t=n(463),bt=n(93314);function wt(){}const Et={id:"",width:"100%",height:"100%",style:null,viewState:null,initialViewState:null,pickingRadius:0,layerFilter:null,glOptions:{},parameters:{},parent:null,gl:null,canvas:null,layers:[],effects:[],views:null,controller:null,useDevicePixels:!0,touchAction:"none",eventRecognizerOptions:{},_framebuffer:null,_animate:!1,_pickable:!0,_typedArrayManagerProps:{},_customRender:null,onWebGLInitialized:wt,onResize:wt,onViewStateChange:wt,onInteractionStateChange:wt,onBeforeRender:wt,onAfterRender:wt,onLoad:wt,onError:t=>s.A.error(t.message,t.cause)(),onHover:null,onClick:null,onDragStart:null,onDrag:null,onDragEnd:null,_onMetrics:null,getCursor:({isDragging:t})=>t?"grabbing":"grab",getTooltip:null,debug:!1,drawPickingColors:!1};class xt{constructor(t){(0,r.A)(this,"props",void 0),(0,r.A)(this,"width",0),(0,r.A)(this,"height",0),(0,r.A)(this,"userData",{}),(0,r.A)(this,"canvas",null),(0,r.A)(this,"viewManager",null),(0,r.A)(this,"layerManager",null),(0,r.A)(this,"effectManager",null),(0,r.A)(this,"deckRenderer",null),(0,r.A)(this,"deckPicker",null),(0,r.A)(this,"eventManager",null),(0,r.A)(this,"tooltip",null),(0,r.A)(this,"metrics",void 0),(0,r.A)(this,"animationLoop",void 0),(0,r.A)(this,"stats",void 0),(0,r.A)(this,"viewState",void 0),(0,r.A)(this,"cursorState",void 0),(0,r.A)(this,"_needsRedraw",void 0),(0,r.A)(this,"_pickRequest",void 0),(0,r.A)(this,"_lastPointerDownInfo",null),(0,r.A)(this,"_metricsCounter",void 0),(0,r.A)(this,"_onPointerMove",t=>{const{_pickRequest:e}=this;if("pointerleave"===t.type)e.x=-1,e.y=-1,e.radius=0;else{if(t.leftButton||t.rightButton)return;{const n=t.offsetCenter;if(!n)return;e.x=n.x,e.y=n.y,e.radius=this.props.pickingRadius}}this.layerManager&&(this.layerManager.context.mousePosition={x:e.x,y:e.y}),e.event=t}),(0,r.A)(this,"_onEvent",t=>{const e=bt.qY[t.type],n=t.offsetCenter;if(!e||!n||!this.layerManager)return;const r=this.layerManager.getLayers(),i=this.deckPicker.getLastPickedObject({x:n.x,y:n.y,layers:r,viewports:this.getViewports(n)},this._lastPointerDownInfo),{layer:o}=i,s=o&&(o[e.handler]||o.props[e.handler]),a=this.props[e.handler];let u=!1;
2s&&(u=s.call(o,i,t)),!u&&a&&a(i,t)}),(0,r.A)(this,"_onPointerDown",t=>{const e=t.offsetCenter,n=this._pick("pickObject","pickObject Time",{x:e.x,y:e.y,radius:this.props.pickingRadius});this._lastPointerDownInfo=n.result[0]||n.emptyInfo}),this.props={...Et,...t},t=this.props,this._needsRedraw="Initial render",this._pickRequest={mode:"hover",x:-1,y:-1,radius:0,event:null},this.cursorState={isHovering:!1,isDragging:!1},t.viewState&&t.initialViewState&&s.A.warn("View state tracking is disabled. Use either `initialViewState` for auto update or `viewState` for manual update.")(),"IE"===(0,M.A)()&&s.A.warn("IE 11 is not supported")(),this.viewState=t.initialViewState,t.gl||"undefined"!=typeof document&&(this.canvas=this._createCanvas(t)),this.animationLoop=this._createAnimationLoop(t),this.stats=new L.A({id:"deck.gl"}),this.metrics={fps:0,setPropsTime:0,updateAttributesTime:0,framesRedrawn:0,pickTime:0,pickCount:0,gpuTime:0,gpuTimePerFrame:0,cpuTime:0,cpuTimePerFrame:0,bufferMemory:0,textureMemory:0,renderbufferMemory:0,gpuMemory:0},this._metricsCounter=0,this.setProps(t),t._typedArrayManagerProps&&P.A.setOptions(t._typedArrayManagerProps),this.animationLoop.start()}finalize(){var t,e,n,r,i,o,s,a,u;null===(t=this.animationLoop)||void 0===t||t.stop(),this.animationLoop=null,this._lastPointerDownInfo=null,null===(e=this.layerManager)||void 0===e||e.finalize(),this.layerManager=null,null===(n=this.viewManager)||void 0===n||n.finalize(),this.viewManager=null,null===(r=this.effectManager)||void 0===r||r.finalize(),this.effectManager=null,null===(i=this.deckRenderer)||void 0===i||i.finalize(),this.deckRenderer=null,null===(o=this.deckPicker)||void 0===o||o.finalize(),this.deckPicker=null,null===(s=this.eventManager)||void 0===s||s.destroy(),this.eventManager=null,null===(a=this.tooltip)||void 0===a||a.remove(),this.tooltip=null,this.props.canvas||this.props.gl||!this.canvas||(null===(u=this.canvas.parentElement)||void 0===u||u.removeChild(this.canvas),this.canvas=null)}setProps(t){this.stats.get("setProps Time").timeStart(),"onLayerHover"in t&&s.A.removed("onLayerHover","onHover")(),"onLayerClick"in t&&s.A.removed("onLayerClick","onClick")(),t.initialViewState&&!(0,o.b)(this.props.initialViewState,t.initialViewState,3)&&(this.viewState=t.initialViewState),Object.assign(this.props,t),this._setCanvasSize(this.props);const e=Object.create(this.props);Object.assign(e,{views:this._getViews(),width:this.width,height:this.height,viewState:this._getViewState()}),this.animationLoop.setProps(e),this.layerManager&&(this.viewManager.setProps(e),this.layerManager.activateViewport(this.getViewports()[0]),this.layerManager.setProps(e),this.effectManager.setProps(e),this.deckRenderer.setProps(e),this.deckPicker.setProps(e)),this.stats.get("setProps Time").timeEnd()}needsRedraw(t={clearRedrawFlags:!1}){if(!this.layerManager)return!1;if(this.props._animate)return"Deck._animate";let e=this._needsRedraw;t.clearRedrawFlags&&(this._needsRedraw=!1);const n=this.viewManager.needsRedraw(t),r=this.layerManager.needsRedraw(t),i=this.effectManager.needsRedraw(t),o=this.deckRenderer.needsRedraw(t);return e=e||n||r||i||o,e}redraw(t){if(!this.layerManager)return;let e=this.needsRedraw({clearRedrawFlags:!0});e=t||e,e&&(this.stats.get("Redraw Count").incrementCount(),this.props._customRender?this.props._customRender(e):this._drawLayers(e))}get isInitialized(){return null!==this.viewManager}getViews(){return(0,_t.A)(this.viewManager),this.viewManager.views}getViewports(t){return(0,_t.A)(this.viewManager),this.viewManager.getViewports(t)}pickObject(t){const e=this._pick("pickObject","pickObject Time",t).result;return e.length?e[0]:null}pickMultipleObjects(t){return t.depth=t.depth||10,this._pick("pickObject","pickMultipleObjects Time",t).result}pickObjects(t){return this._pick("pickObjects","pickObjects Time",t)}_addResources(t,e=!1){for(const n in t)this.layerManager.resourceManager.add({resourceId:n,data:t[n],forceUpdate:e})}_removeResources(t){for(const e of t)this.layerManager.resourceManager.remove(e)}_addDefaultEffect(t){this.effectManager.addDefaultEffect(t)}_pick(t,e,n){(0,_t.A)(this.deckPicker);const{stats:r}=this;r.get("Pick Count").incrementCount(),r.get(e).timeStart();const i=this.deckPicker[t]({layers:this.layerManager.getLayers(n),views:this.viewManager.getViews(),viewports:this.getViewports(n),onViewportActive:this.layerManager.activateViewport,effects:this.effectManager.getEffects(),...n});return r.get(e).timeEnd(),i}_createCanvas(t){let e=t.canvas;return"string"==typeof e&&(e=document.getElementById(e),(0,_t.A)(e)),e||(e=document.createElement("canvas"),e.id=t.
2id||"deckgl-overlay",(t.parent||document.body).appendChild(e)),Object.assign(e.style,t.style),e}_setCanvasSize(t){if(!this.canvas)return;const{width:e,height:n}=t;if(e||0===e){const t=Number.isFinite(e)?"".concat(e,"px"):e;this.canvas.style.width=t}if(n||0===n){var r;const e=Number.isFinite(n)?"".concat(n,"px"):n;this.canvas.style.position=(null===(r=t.style)||void 0===r?void 0:r.position)||"absolute",this.canvas.style.height=e}}_updateCanvasSize(){var t,e;const{canvas:n}=this;if(!n)return;const r=null!==(t=n.clientWidth)&&void 0!==t?t:n.width,i=null!==(e=n.clientHeight)&&void 0!==e?e:n.height;var o,s;r===this.width&&i===this.height||(this.width=r,this.height=i,null===(o=this.viewManager)||void 0===o||o.setProps({width:r,height:i}),null===(s=this.layerManager)||void 0===s||s.activateViewport(this.getViewports()[0]),this.props.onResize({width:r,height:i}))}_createAnimationLoop(t){const{width:e,height:n,gl:r,glOptions:i,debug:o,onError:s,onBeforeRender:a,onAfterRender:u,useDevicePixels:l}=t;return new I.A({width:e,height:n,useDevicePixels:l,autoResizeDrawingBuffer:!r,autoResizeViewport:!1,gl:r,onCreateContext:t=>(0,g.XZ)({...i,...t,canvas:this.canvas,debug:o,onContextLost:()=>this._onContextLost()}),onInitialize:t=>this._setGLContext(t.gl),onRender:this._onRenderFrame.bind(this),onBeforeRender:a,onAfterRender:u,onError:s})}_getViewState(){return this.props.viewState||this.viewState}_getViews(){let t=this.props.views||[new l.A({id:"default-view"})];return t=Array.isArray(t)?t:[t],t.length&&this.props.controller&&(t[0].props.controller=this.props.controller),t}_onContextLost(){const{onError:t}=this.props;this.animationLoop&&t&&t(new Error("WebGL context is lost"))}_pickAndCallback(){const{_pickRequest:t}=this;if(t.event){const{result:n,emptyInfo:r}=this._pick("pickObject","pickObject Time",t);this.cursorState.isHovering=n.length>0;let i=r,o=!1;for(const r of n){var e;i=r,o=(null===(e=r.layer)||void 0===e?void 0:e.onHover(r,t.event))||o}if(!o&&this.props.onHover&&this.props.onHover(i,t.event),this.props.getTooltip&&this.tooltip){const t=this.props.getTooltip(i);this.tooltip.setTooltip(t,i.x,i.y)}t.event=null}}_updateCursor(){const t=this.props.parent||this.canvas;t&&(t.style.cursor=this.props.getCursor(this.cursorState))}_setGLContext(t){if(this.layerManager)return;this.canvas||(this.canvas=t.canvas,(0,g.uZ)(t,{enable:!0,copyState:!0})),this.tooltip=new T(this.canvas),(0,g.Rz)(t,{blend:!0,blendFunc:[770,771,1,771],polygonOffsetFill:!0,depthTest:!0,depthFunc:515}),this.props.onWebGLInitialized(t);const e=new O.K;e.play(),this.animationLoop.attachTimeline(e),this.eventManager=new vt(this.props.parent||t.canvas,{touchAction:this.props.touchAction,recognizerOptions:this.props.eventRecognizerOptions,events:{pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerleave:this._onPointerMove}});for(const t in bt.qY)this.eventManager.on(t,this._onEvent);this.viewManager=new u({timeline:e,eventManager:this.eventManager,onViewStateChange:this._onViewStateChange.bind(this),onInteractionStateChange:this._onInteractionStateChange.bind(this),views:this._getViews(),viewState:this._getViewState(),width:this.width,height:this.height});const n=this.viewManager.getViewports()[0];this.layerManager=new i.A(t,{deck:this,stats:this.stats,viewport:n,timeline:e}),this.effectManager=new A,this.deckRenderer=new f.A(t),this.deckPicker=new x(t),this.setProps(this.props),this._updateCanvasSize(),this.props.onLoad()}_drawLayers(t,e){const{gl:n}=this.layerManager.context;(0,g.Rz)(n,this.props.parameters),this.props.onBeforeRender({gl:n}),this.deckRenderer.renderLayers({target:this.props._framebuffer,layers:this.layerManager.getLayers(),viewports:this.viewManager.getViewports(),onViewportActive:this.layerManager.activateViewport,views:this.viewManager.getViews(),pass:"screen",effects:this.effectManager.getEffects(),...e}),this.props.onAfterRender({gl:n})}_onRenderFrame(t){this._getFrameStats(),this._metricsCounter++%60==0&&(this._getMetrics(),this.stats.reset(),s.A.table(4,this.metrics)(),this.props._onMetrics&&this.props._onMetrics(this.metrics)),this._updateCanvasSize(),this._updateCursor(
2),this.tooltip.isVisible&&this.viewManager.needsRedraw()&&this.tooltip.setTooltip(null),this.layerManager.updateLayers(),this._pickAndCallback(),this.redraw(),this.viewManager&&this.viewManager.updateViewStates()}_onViewStateChange(t){const e=this.props.onViewStateChange(t)||t.viewState;this.viewState&&(this.viewState={...this.viewState,[t.viewId]:e},this.props.viewState||this.viewManager&&this.viewManager.setProps({viewState:this.viewState}))}_onInteractionStateChange(t){this.cursorState.isDragging=t.isDragging||!1,this.props.onInteractionStateChange(t)}_getFrameStats(){const{stats:t}=this;t.get("frameRate").timeEnd(),t.get("frameRate").timeStart();const e=this.animationLoop.stats;t.get("GPU Time").addTime(e.get("GPU Time").lastTiming),t.get("CPU Time").addTime(e.get("CPU Time").lastTiming)}_getMetrics(){const{metrics:t,stats:e}=this;t.fps=e.get("frameRate").getHz(),t.setPropsTime=e.get("setProps Time").time,t.updateAttributesTime=e.get("Update Attributes").time,t.framesRedrawn=e.get("Redraw Count").count,t.pickTime=e.get("pickObject Time").time+e.get("pickMultipleObjects Time").time+e.get("pickObjects Time").time,t.pickCount=e.get("Pick Count").count,t.gpuTime=e.get("GPU Time").time,t.cpuTime=e.get("CPU Time").time,t.gpuTimePerFrame=e.get("GPU Time").getAverageTime(),t.cpuTimePerFrame=e.get("CPU Time").getAverageTime();const n=R.dJ.get("Memory Usage");t.bufferMemory=n.get("Buffer Memory").count,t.textureMemory=n.get("Texture Memory").count,t.renderbufferMemory=n.get("Renderbuffer Memory").count,t.gpuMemory=n.get("GPU Memory").count}}(0,r.A)(xt,"defaultProps",Et),(0,r.A)(xt,"VERSION",C.x)},23172:(t,e,n)=>{"use strict";n.d(e,{p8:()=>r,tb:()=>i});var r=1e-6,i="undefined"!=typeof Float32Array?Float32Array:Array;Math.random,Math.PI,Math.PI},23225:(t,e,n)=>{"use strict";var r=n(25164);t.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),n={},r=0;r<e.length;++r)n[e[r]]=e[r];var i=Object.assign({},n),o="";for(var s in i)o+=s;return t!==o}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch(e){return"y"===t[1]}return!1}()?r:Object.assign:r}},23363:(t,e,n)=>{"use strict";n.d(e,{_Y:()=>A,o0:()=>h});var r=n(44454);function i(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unnamed";const n=t.match(/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/);return n?n[1]:e}function o(t,e){let n="";for(let r=0;r<e.length;r++){const i=e[r];if((t[r+3]||t[r+2]||t[r+1])&&(n+="".concat(i,"\n"),t[r+1])){const e=t[r+1],i=e.split(":",3),o=i[0],a=parseInt(i[1],10)||0,u=e.substring(i.join(":").length+1).trim();n+=s("^^^ ".concat(o,": ").concat(u,"\n\n"),a)}}return n}function s(t,e){let n="";for(let t=0;t<e;++t)n+=" ";return"".concat(n).concat(t)}var a=n(94939),u=n(2592),l=n(55890);class c extends l.A{get[Symbol.toStringTag](){return"Shader"}static getTypeName(t){switch(t){case 35633:return"vertex-shader";case 35632:return"fragment-shader";default:return(0,a.v)(!1),"unknown"}}constructor(t,e){(0,r.tj)(t),(0,a.v)("string"==typeof e.source,"Shader: GLSL source code must be a JavaScript string"),super(t,{id:i(e.source,null)||e.id||(0,u.Ld)("unnamed ".concat(c.getTypeName(e.shaderType)))}),this.shaderType=e.shaderType,this.source=e.source,this.initialize(e)}initialize(t){let{source:e}=t;const n=i(e,null);n&&(this.id=(0,u.Ld)(n)),this._compile(e)}getParameter(t){return this.gl.getShaderParameter(this.handle,t)}toString(){return"".concat(c.getTypeName(this.shaderType),":").concat(this.id)}getName(){return i(this.source)||"unnamed-shader"}getSource(){return this.gl.getShaderSource(this.handle)}getTranslatedSource(){const t=this.gl.getExtension("WEBGL_debug_shaders");return t?t.getTranslatedShaderSource(this.handle):"No translated source available. WEBGL_debug_shaders not implemented"}_compile(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.source;if(t.startsWith("#version ")||(t="#version 100\n".concat(t)),this.source=t,this.gl.shaderSource(this.handle,this.source),this.gl.compileShader(this.handle),!this.getParameter(35713)){const t=this.gl.getShaderInfoLog(this.handle),{shaderName:e,errors:n,warnings:a}=function(t,e,n,r){const a=t.split(/\r?\n/),u={},l={},c=r||i(e)||"(unnamed)",h="".concat(function(t){switch(t){case 35632:return"fragment";case 35633:return"vertex";default:return"unknown type"}}(n)," shader ").concat(c);for(let e=0;e<a.length;e++){const n=a[e];if(n.length<=1)continue;const r=n.split(":"),i=r[0],o=parseInt(r[2],10);if(isNaN(o))throw new Error("GLSL compilation error in ".concat(h,": ").concat(t));"WARNING"!==i?u[o]=n:l[o]=n}const A=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:": ";const r=t.split(/\r?\n/),i=String(r.length+e-1).length;return r.map((t,r)=>{const o=String(r+e),a=o.length;return s(o,i-a)+n+t})}(e);return{shaderName:h,errors:o(u,A),warnings:o(l,A)}}(t,this.source,this.shaderType,this.id);throw r.Rm.error("GLSL compilation errors in ".concat(e,"\n").concat(n))(),r.Rm.w
2arn("GLSL compilation warnings in ".concat(e,"\n").concat(a))(),new Error("GLSL compilation errors in ".concat(e))}}_deleteHandle(){this.gl.deleteShader(this.handle)}_getOptsFromHandle(){return{type:this.getParameter(35663),source:this.getSource()}}}class h extends c{get[Symbol.toStringTag](){return"VertexShader"}constructor(t,e){"string"==typeof e&&(e={source:e}),super(t,Object.assign({},e,{shaderType:35633}))}_createHandle(){return this.gl.createShader(35633)}}class A extends c{get[Symbol.toStringTag](){return"FragmentShader"}constructor(t,e){"string"==typeof e&&(e={source:e}),super(t,Object.assign({},e,{shaderType:35632}))}_createHandle(){return this.gl.createShader(35632)}}},23615:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=new(n(8554).t)({id:"deck"})},23861:(t,e,n)=>{"use strict";n.d(e,{Cj:()=>f,ob:()=>d,sy:()=>h,fY:()=>A});var r=n(63564),i=n(48091),o=n(84407),s=n(44454),a=n(31185),u=n(94939);function l(t){switch(t){case 6406:case 33326:case 6403:return 1;case 33328:case 33319:return 2;case 6407:case 34837:return 3;case 6408:case 34836:return 4;default:return(0,u.v)(!1),0}}var c=n(49282);function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{sourceX:n=0,sourceY:r=0,sourceFormat:i=6408}=e;let{sourceAttachment:o=36064,target:s=null,sourceWidth:c,sourceHeight:h,sourceType:A}=e;const{framebuffer:f,deleteFramebuffer:d}=p(t);(0,u.v)(f);const{gl:g,handle:m,attachments:y}=f;c=c||f.width,h=h||f.height,36064===o&&null===m&&(o=1028),(0,u.v)(y[o]),A=A||y[o].type,s=function(t,e,n,r,i){if(t)return t;e=e||5121;return new((0,a.Xj)(e,{clamped:!1}))(r*i*l(n))}(s,A,i,c,h),A=A||(0,a.jX)(s);const v=g.bindFramebuffer(36160,m);return g.readPixels(n,r,c,h,i,A,s),g.bindFramebuffer(36160,v||null),d&&f.delete(),s}function A(t,e){let{sourceX:n=0,sourceY:i=0,sourceFormat:o=6408,target:a=null,targetByteOffset:c=0,sourceWidth:h,sourceHeight:A,sourceType:f}=e;const{framebuffer:d,deleteFramebuffer:g}=p(t);(0,u.v)(d),h=h||d.width,A=A||d.height;const m=(0,s.Dz)(d.gl);if(f=f||(a?a.type:5121),!a){const t=l(o),e=function(t){switch(t){case 5121:return 1;case 33635:case 32819:case 32820:return 2;case 5126:return 4;default:return(0,u.v)(!1),0}}(f),n=c+h*A*t*e;a=new r.A(m,{byteLength:n,accessor:{type:f,size:t}})}return a.bind({target:35051}),(0,s.zv)(m,{framebuffer:d},()=>{m.readPixels(n,i,h,A,o,f,c)}),a.unbind({target:35051}),g&&d.delete(),a}function f(t){let{sourceAttachment:e=36064,targetMaxHeight:n=Number.MAX_SAFE_INTEGER}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=h(t,{sourceAttachment:e}),{width:i,height:o}=t;for(;o>n;)({data:r,width:i,height:o}=(0,a.Ij)({data:r,width:i,height:o}));(0,a.H)({data:r,width:i,height:o});const s=document.createElement("canvas");s.width=i,s.height=o;const u=s.getContext("2d"),l=u.createImageData(i,o);return l.data.set(r),u.putImageData(l,0,0),s.toDataURL()}function d(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{sourceX:r=0,sourceY:i=0,targetMipmaplevel:a=0,targetInternalFormat:l=6408}=n;let{targetX:c,targetY:h,targetZ:A,width:f,height:d}=n;const{framebuffer:g,deleteFramebuffer:m}=p(t);(0,u.v)(g);const{gl:y,handle:v}=g,_=void 0!==c||void 0!==h||void 0!==A;c=c||0,h=h||0,A=A||0;const b=y.bindFramebuffer(36160,v);(0,u.v)(e);let w=null;if(e instanceof o.A&&(w=e,f=Number.isFinite(f)?f:w.width,d=Number.isFinite(d)?d:w.height,w.bind(0),e=w.target),_)switch(e){case 3553:case 34067:y.copyTexSubImage2D(e,a,c,h,r,i,f,d);break;case 35866:case 32879:(0,s.Dz)(y).copyTexSubImage3D(e,a,c,h,A,r,i,f,d)}else y.copyTexImage2D(e,a,l,r,i,f,d,0);return w&&w.unbind(),y.bindFramebuffer(36160,b||null),m&&g.delete(),w}function p(t){return t instanceof i.A?{framebuffer:t,deleteFramebuffer:!1}:{framebuffer:(0,c.$)(t),deleteFramebuffer:!0}}},23973:(t,e,n)=>{"use strict";n.d(e,{m:()=>o});const r=!1,i=!0;function o(t){const e=s(t);return function(t){const e=s(t);return e.byteLength>=24&&2303741511===e.getUint32(0,r)?{mimeType:"image/png",width:e.getUint32(16,r),height:e.getUint32(20,r)}:null}(e)||function(t){const e=s(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,r)&&255===e.getUint8(2)))return null;const{tableMarkers:n,sofMarkers:i}=function(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);return{tableMarkers:t,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}();let o=2;for(;o+9<e.byteLength;){const t=e.getUint16(o,r);if(i.has(t))return{mimeType:"image/jpeg",height:e.getUint16(o+5,r),width:e.getUint16(o+7,r)};if(!n.has(t))return null;o+=2,o+=e.getUint16(o,r)}return null}(e)||function(t){const e=s(t);return e.byteLength>=10&&1195984440===e.getUint32(0,r)?{mimeType:"image/gif",width:e.getUint16(6,i),height:e.getUint16(8,i)}:null}(e)||function(t){const e=s(t);return e.byteLength>=14&&16973===e.getUint16(0,r)&&e.getUint32(2,i)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,i),height:e.getUint32(22,i
2)}:null}(e)||function(t){const e=function(t){return function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=(i=e,[...i].map(t=>t.charCodeAt(0)));var i;for(let e=0;e<r.length;++e)if(r[e]!==t[e+n])return!1;return!0}(t,"ftyp",4)&&96&t[8]?function(t){switch((e=t,String.fromCharCode(...e.slice(8,12))).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}var e}(t):null}(new Uint8Array(t instanceof DataView?t.buffer:t));return e?{mimeType:e.mimeType,width:0,height:0}:null}(e)}function s(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}},24448:(t,e,n)=>{"use strict";n.d(e,{rJ:()=>r,wk:()=>U,Eg:()=>X,Mk:()=>N,Iy:()=>W,hY:()=>s,IC:()=>o,UD:()=>i});const r={CLOCKWISE:1,COUNTER_CLOCKWISE:-1};function i(t,e,n={}){const r=function(t,e={}){return Math.sign(o(t,e))}(t,n);return r!==e&&(function(t,e){const{start:n=0,end:r=t.length,size:i=2}=e,o=(r-n)/i,s=Math.floor(o/2);for(let e=0;e<s;++e){const r=n+e*i,s=n+(o-1-e)*i;for(let e=0;e<i;++e){const n=t[r+e];t[r+e]=t[s+e],t[s+e]=n}}}(t,n),!0)}function o(t,e={}){const{start:n=0,end:r=t.length}=e,i=e.size||2;let o=0;for(let e=n,s=r-i;e<r;e+=i)o+=(t[e]-t[s])*(t[e+1]+t[s+1]),s=e;return o/2}function s(t,e,n=2,r){const i=e&&e.length,o=i?e[0]*n:t.length;let s=a(t,0,o,n,!0,r&&r[0]);const c=[];if(!s||s.next===s.prev)return c;let h,A,f,g,m,v,_;if(i&&(s=function(t,e,n,r,i){const o=[];let s,l,c,h,A;for(s=0,l=e.length;s<l;s++)c=e[s]*r,h=s<l-1?e[s+1]*r:t.length,A=a(t,c,h,r,!1,i&&i[s+1]),A===A.next&&(A.steiner=!0),o.push(y(A));for(o.sort(d),s=0;s<o.length;s++)p(o[s],n),n=u(n,n.next);return n}(t,e,s,n,r)),t.length>80*n){g=A=t[0],m=f=t[1];for(let e=n;e<o;e+=n)v=t[e],_=t[e+1],v<g&&(g=v),_<m&&(m=_),v>A&&(A=v),_>f&&(f=_);h=Math.max(A-g,f-m),h=0!==h?1/h:0}return l(s,c,n,g,m,h),c}function a(t,e,n,r,i,s){let a,u;if(void 0===s&&(s=o(t,{start:e,end:n,size:r})),i===s<0)for(a=e;a<n;a+=r)u=C(a,t[a],t[a+1],u);else for(a=n-r;a>=e;a-=r)u=C(a,t[a],t[a+1],u);return u&&w(u,u.next)&&(M(u),u=u.next),u}function u(t,e){if(!t)return t;e||(e=t);let n,r=t;do{if(n=!1,r.steiner||!w(r,r.next)&&0!==b(r.prev,r,r.next))r=r.next;else{if(M(r),r=e=r.prev,r===r.next)break;n=!0}}while(n||r!==e);return e}function l(t,e,n,r,i,o,s){if(!t)return;!s&&o&&function(t,e,n,r){let i=t;do{null===i.z&&(i.z=m(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){let e,n,r,i,o,s,a,u,l=1;do{for(i=t,t=null,u=null,r=0;i;){for(r++,s=i,o=0,n=0;n<l&&(o++,s=s.nextZ,s);n++);for(a=l;o>0||a>0&&s;)0!==o&&(0===a||!s||i.z<=s.z)?(e=i,i=i.nextZ,o--):(e=s,s=s.nextZ,a--),u?u.nextZ=e:t=e,e.prevZ=u,u=e;i=s}u.nextZ=null,l*=2}while(r>1)}(i)}(t,r,i,o);let a,d,p=t;for(;t.prev!==t.next;)if(a=t.prev,d=t.next,o?h(t,r,i,o):c(t))e.push(a.i/n),e.push(t.i/n),e.push(d.i/n),M(t),t=d.next,p=d.next;else if((t=d)===p){s?1===s?l(t=A(u(t),e,n),e,n,r,i,o,2):2===s&&f(t,e,n,r,i,o):l(u(t),e,n,r,i,o,1);break}}function c(t){const e=t.prev,n=t,r=t.next;if(b(e,n,r)>=0)return!1;let i=t.next.next;for(;i!==t.prev;){if(v(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&b(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function h(t,e,n,r){const i=t.prev,o=t,s=t.next;if(b(i,o,s)>=0)return!1;const a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,u=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,l=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,c=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,h=m(a,u,e,n,r),A=m(l,c,e,n,r);let f=t.prevZ,d=t.nextZ;for(;f&&f.z>=h&&d&&d.z<=A;){if(f!==t.prev&&f!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&b(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=h;){if(f!==t.prev&&f!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=A;){if(d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&b(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function A(t,e,n){let r=t;do{const i=r.prev,o=r.next.next;!w(i,o)&&E(i,r,r.next,o)&&T(i,o)&&T(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),M(r),M(r.next),r=t=o),r=r.next}
vendor: 7,184 bytes, line 2
2while(r!==t);return u(r)}function f(t,e,n,r,i,o){let s=t;do{let t=s.next.next;for(;t!==s.prev;){if(s.i!==t.i&&_(s,t)){let a=P(s,t);return s=u(s,s.next),a=u(a,a.next),l(s,e,n,r,i,o),void l(a,e,n,r,i,o)}t=t.next}s=s.next}while(s!==t)}function d(t,e){return t.x-e.x}function p(t,e){if(e=function(t,e){let n=e;const r=t.x,i=t.y;let o,s=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const t=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=r&&t>s){if(s=t,t===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!o)return null;if(r===s)return o;const a=o,u=o.x,l=o.y;let c,h=1/0;n=o;do{r>=n.x&&n.x>=u&&r!==n.x&&v(i<l?r:s,i,u,l,i<l?s:r,i,n.x,n.y)&&(c=Math.abs(i-n.y)/(r-n.x),T(n,t)&&(c<h||c===h&&(n.x>o.x||n.x===o.x&&g(o,n)))&&(o=n,h=c)),n=n.next}while(n!==a);return o}(t,e),e){const n=P(e,t);u(e,e.next),u(n,n.next)}}function g(t,e){return b(t.prev,t,e.prev)<0&&b(e.next,t,t.next)<0}function m(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function y(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function v(t,e,n,r,i,o,s,a){return(i-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(r-a)-(n-s)*(e-a)>=0&&(n-s)*(o-a)-(i-s)*(r-a)>=0}function _(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&E(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(T(t,e)&&T(e,t)&&function(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(b(t.prev,t,e.prev)||b(t,e.prev,e))||w(t,e)&&b(t.prev,t,t.next)>0&&b(e.prev,e,e.next)>0)}function b(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function E(t,e,n,r){const i=S(b(t,e,n)),o=S(b(t,e,r)),s=S(b(n,r,t)),a=S(b(n,r,e));return i!==o&&s!==a||!(0!==i||!x(t,n,e))||!(0!==o||!x(t,r,e))||!(0!==s||!x(n,t,r))||!(0!==a||!x(n,e,r))}function x(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function S(t){return t>0?1:t<0?-1:0}function T(t,e){return b(t.prev,t,t.next)<0?b(t,e,t.next)>=0&&b(t,t.prev,e)>=0:b(t,e,t.prev)<0||b(t,t.next,e)<0}function P(t,e){const n=new I(t.i,t.x,t.y),r=new I(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function C(t,e,n,r){const i=new I(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function M(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function I(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(t,e,n,r,i=[]){let o,s;if(8&n)o=(r[3]-t[1])/(e[1]-t[1]),s=3;else if(4&n)o=(r[1]-t[1])/(e[1]-t[1]),s=1;else if(2&n)o=(r[2]-t[0])/(e[0]-t[0]),s=2;else{if(!(1&n))return null;o=(r[0]-t[0])/(e[0]-t[0]),s=0}for(let n=0;n<t.length;n++)i[n]=(1&s)===n?r[s]:o*(e[n]-t[n])+t[n];return i}function R(t,e){let n=0;return t[0]<e[0]?n|=1:t[0]>e[2]&&(n|=2),t[1]<e[1]?n|=4:t[1]>e[3]&&(n|=8),n}function L(t,e){const n=e.length,r=t.length;if(r>0){let i=!0;for(let o=0;o<n;o++)if(t[r-n+o]!==e[o]){i=!1;break}if(i)return!1}for(let i=0;i<n;i++)t[r+i]=e[i];return!0}function B(t,e){const n=e.length;for(let r=0;r<n;r++)t[r]=e[r]}function k(t,e,n,r,i=[]){const o=r+e*n;for(let e=0;e<n;e++)i[e]=t[o+e];return i}function N(t,e){const{size:n=2,broken:r=!1,gridResolution:i=10,gridOffset:o=[0,0],startIndex:s=0,endIndex:a=t.length}=e||{},u=(a-s)/n;let l=[];const c=[l],h=k(t,0,n,s);let A,f;const d=z(h,i,o,[]),p=[];L(l,h);for(let e=1;e<u;e++){for(A=k(t,e,n,s,A),f=R(A,d);f;){O(h,A,f,d,p);const t=R(p,d);t&&(O(h,p,t,d,p),f=t),L(l,p),B(h,p),V(d,i,f),r&&l.length>n&&(l=[],c.push(l),L(l,h)),f=R(A,d)}L(l,A),B(h,A)}return r?c:c[0]}const F=0,D=1;function j(t,e){for(let n=0;n<e.length;n++)t.push(e[n]);return t}function U(t,e=null,n){if(!t.length)return[];const{size:r=2,gridResolution:i=10,gridOffset:o=[0,0],edgeTypes:s=!1}=n||{},a=[],u=[{pos:t,types:s?new Array(t.length/r).fill(D):null,holes:e||[]}],l=[[],[]];let c=[];for(;u.length;){const{pos:t,types:e,holes:n}=u.shift();H(t,r,n[0]||t.length,l),c=z(l[0],i,o,c);const h=R(l[1],c);if(h){let i=G(t,e,r,0,n[0]||t.length,c,h);const o={pos:i[0].pos,types:i[0].types,holes:[]},a={pos:i[1].pos,types:i[1].types,holes:[]};u.push(o,a);for(let u=0;u<n.length;u++)i=G(t,e,r,n[u],n[u+1]||t.length,c,h),i[0]&&(o.holes.push(o.pos.length),o.pos=j(o.pos,i[0].pos),s&&(o.types=j(o.types,i[0].types))),i[1]&&(a.holes.push(a.pos.length),a.pos=j(a.pos,i[1].pos),s&&(a.types=j(a.types,i[1].types)))}else{const r={positions:t};s&&(r.edgeTypes=e),n.length&&(r.holeIndices=n),a.push(r)}}return a}function G(t,e,n,r,i,o,s){const a=(i-r)/n,u=[],l=[],c=[],h=[],A=[];let f,d,p;const g=k(t,a-1,n,r);let m=Math.sign(8&s?g[1]-o[3]:g[0]-o[2]),y=e&&e[a-1],v=0,_=0;for(let i=0;i<a;i++)f=k(t,i,n,r,f),d=Math.sign(8&s?f[1]-o[3]:f[0]-o[2]),p=e&&e[r/n+i],d&&m&&m!==d&&(O(g,f,s,o,A),L(u,A)&&c.push(y),L(l,A)&&h.push(y)),d<=0?(L(u,f)&&c.push(p),v-=d):c.length&&(c[c.length-1]=F),d>=0?(L(l,f)&&h.push(p),_+=d):h.length&&(h[h.length-1]=F),B(g,f),m=d,y=p;return[v?{pos:u,types:e&&c}:null,_?{pos:l,types:e&&h}:null]}function z(t,e,n,r){const i=Math.floor((t[0]-n[0])/e)*e+n[0],o=Math.floor((t[1]-n[1])/e)*e+n[1];return r[0]=i,r[1]=o,r[2]=i+e,r[3]=o+e,r}function V(t,e,n){8&n?(t[1]+=e,t[3]+=e):4&n?(t[1]-=e,t[3]-=e):2&n?(t[0]+=e,t[2]+=e):1&n&&(t[0]-=e,t[2]-=e)}function H(t,e,n,r){let i=1/0,o=-1/0,s=1/0,a=-1/0;for(let r=0;r<n;r+=e){const e=t[r],n=t[r+1];i=e<i?e:i,o=e>o?e:o,s=n<s?n:s,a=n>a?n:a}return r[0][0]=i,r[0][1]=s,r[1][0]=o,r[1][1]=a,r}const q=85.051129;function W(t,e){const{size:n=2,startIndex:r=0,endIndex:i=t.length,normalize:o=!0}=e||{},s=t.slice(r,i);J(s,n,0,i-r);const a=N(s,{size:n,broken:!0,gridResolution:360,gridOffset:[-180,-180]});if(o)for(const t of a)Z(t,n);return a}function X(t,e=null,n){const{size:r=2,normalize:i=!0,edgeTypes:o=!1}=n||{};e=e||[];const s=[],a=[];let u=0,l=0;for(let i=0;i<=e.length;i++){const o=e[i]||t.length,c=l,h=Y(t,r,u,o);for(let e=h;e<o;e++)s[l++]=t[e];for(let e=u;e<h;e++)s[l++]=t[e];J(s,r,c,l),Q(s,r,c,l,null==n?void 0:n.maxLatitude),u=o,a[i]=l}a.pop();const c=U(s,a,{size:r,gridResolution:360,gridOffset:[-180,-180],edgeTypes:o});if(i)for(const t of c)Z(t.positions,r);return c}function Y(t,e,n,r){let i=-1,o=-1;for(let s=n+1;s<r;s+=e){const e=Math.abs(t[s]);e>i&&(i=e,o=s-1)}return o}function Q(t,e,n,r,i=q){const o=t[n],s=t[r-e];if(Math.abs(o-s)>180){const r=k(t,0,e,n);r[0]+=360*Math.round((s-o)/360),L(t,r),r[1]=Math.sign(r[1])*i,L(t,r),r[0]=o,L(t,r)}}function J(t,e,n,r){let i,o=t[0];for(let s=n;s<r;s+=e){i=t[s];const e=i-o;(e>180||e<-180)&&(i-=360*Math.round(e/360)),t[s]=o=i}}function Z(t,e){let n;const r=t.length/e;for(let i=0;i<r&&(n=t[i*e],(n+180)%360==0);i++);const i=360*-Math.round(n/360);if(0!==i)for(let n=0;n<r;n++)t[n*e]+=i}},25128:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var r=n(1455),i=n(82314);function o(t,e,n={}){if(!0===n.final)return function(t,e){let n=o(e,t);return n=(n+180)%360,n}(t,e);const s=i.getCoord.call(void 0,t),a=i.getCoord.call(void 0,e),u=r.degreesToRadians.call(void 0,s[0]),l=r.degreesToRadians.call(void 0,a[0]),c=r.degreesToRadians.call(void 0,s[1]),h=r.degreesToRadians.call(void 0,a[1]),A=Math.sin(l-u)*Math.cos(h),f=Math.cos(c)*Math.sin(h)-Math.sin(c)*Math.cos(h)*Math.cos(l-u);return r.radiansToDegrees.call(void 0,Math.atan2(A,f))}var s=o;e.bearing=o,e.default=s},25164:(t,e,n)=>{"use strict";var r=n(49228),i=n(62908)(),o=n(14607),s=n(9629),a=o("Array.prototype.push"),u=o("Object.prototype.propertyIsEnumerable"),l=i?s.getOwnPropertySymbols:null;t.exports=function(t,e){if(null==t)throw new TypeError("target must be an object");var n=s(t);if(1===arguments.length)return n;for(var o=1;o<arguments.length;++o){var c=s(arguments[o]),h=r(c),A=i&&(s.getOwnPropertySymbols||l);if(A)for(var f=A(c),d=0;d<f.length;++d){var p=f[d];u(c,p)&&a(h,p)}for(var g=0;g<h.length;++g){var m=h[g];if(u(c,m)){var y=c[m];n[m]=y}}}return n}},25198:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(24586),i=n(60033);const o=[255,255,255],s=1,a=[0,0,-1];let u=0;class l{constructor(t={}){(0,r.A)(this,"id",void 0),(0,r.A)(this,"color",void 0),(0,r.A)(this,"intensity",void 0),(0,r.A)(this,"type","directional"),(0,r.A)(this,"direction",void 0),(0,r.A)(this,"shadow",void 0);const{color:e=o}=t,{intensity:n=s}=t,{direction:l=a}=t,{_shadow:c=!1}=t;this.id=t.id||"directional-".concat(u++),this.color=e,this.intensity=n,this.type="directional",this.direction=new i.A(l).normalize().toArray(),this.shadow=c}getProjectedLight(t){return this}}},25214:(t,e,n)=>{"use strict";function r(){return new i}function i(){this.reset()}n.r(e),n.d(e,{geoAlbers:()=>wr,geoAlbersUsa:()=>Er,geoArea:()=>Q,geoAzimuthalEqualArea:()=>Pr,geoAzimuthalEqualAreaRaw:()=>Tr,geoAzimuthalEquidistant:()=>Mr,geoAzimuthalEquidistantRaw:()=>Cr,geoBounds:()=>Gt,geoCentroid:()=>ee,geoCircle:()=>Ae,geoClipExtent:()=>Se,geoConicConformal:()=>kr,geoConicConformalRaw:()=>Br,geoConicEqualArea:()=>br,geoConicEqualAreaRaw:()=>_r,geoConicEquidistant:()=>jr,geoConicEquidistantRaw:()=>Dr,geoContains:()=>Ye,geoDistance:()=>je,geoEquirectangular:()=>Fr,geoEquirectangularRaw:()=>Nr,geoGnomonic:()=>Gr,geoGnomonicRaw:()=>Ur,geoGraticule:()=>Ze,geoGraticule10:()=>Ke,geoIdentity:()=>Vr,geoInterpolate:()=>$e,geoLength:()=>Ne,geoMercator:()=>Or,geoMercatorRaw:()=>Ir,geoNaturalEarth1:()=>qr,geoNaturalEarth1Raw:()=>Hr,geoOrthographic:()=>Xr,geoOrthographicRaw:()=>Wr,geoPath:()=>rr,geoProjection:()=>mr,geoProjectionMutator:()=>yr,geoRotation:()=>le,geoStereographic:()=>Qr,geoStereographicRaw:()=>Yr,geoStream:()=>N,geoTransform:()=>ur,geoTransverseMercator:()=>Zr,geoTransverseMercatorRaw:()=>Jr}),i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(t){s(o,t,this.t),s(this,o.s,this.s),this.s?this.t+=o.t:this.s=o.t},valueOf:function(){return this.s}};var o=new i;function s(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var a=1e-6,u=1e-12,l=Math.PI,c=l/2,h=l/4,A=2*l,f=180/l,d=l/180,p=Math.abs,g=Math.atan,m=Math.atan2,y=Math.cos,v=Math.ceil,_=Math.exp,b=(Math.floor,Math.log),w=Math.pow,E=Math.sin,x=Math.sign||function(t){return t>0?1:t<0?-1:0},S=Math.sqrt,T=Math.tan;function P(t){return t>1?0:t<-1?l:Math.acos(t)}function C(t){return t>1?c:t<-1?-c:Math.asin(t)}function M(t){return(t=E(t/2))*t}function I(){}function O(t,e){t&&L.hasOwnProperty(t.type)&&L[t.type](t,e)}var R={Feature:function(t,e){O(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)O(n[r].geometry,e)}},L={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){B(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)B(n[r],e,0)},Polygon:function(t,e){k(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)k(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)O(n[r],e)}};function B(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function k(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)B(t[n],e,1);e.polygonEnd()}function N(t,e){t&&R.hasOwnProperty(t.type)?R[t.type](t,e):O(t,e)}var F,D,j,U,G,z=r(),V=r(),H={point:I,lineStart:I,lineEnd:I,polygonStart:function(){z.reset(),H.lineStart=q,H.lineEnd=W},polygonEnd:function(){var t=+z;V.add(t<0?A+t:t),this.lineStart=this.lineEnd=this.point=I},sphere:function(){V.add(A)}};function q(){H.point=X}function W(){Y(F,D)}function X(t,e){H.point=Y,F=t,D=e,j=t*=d,U=y(e=(e*=d)/2+h),G=E(e)}function Y(t,e){var n=(t*=d)-j,r=n>=0?1:-1,i=r*n,o=y(e=(e*=d)/2+h),s=E(e),a=G*s,u=U*o+a*y(i),l=a*r*E(i);z.add(m(l,u)),j=t,U=o,G=s}function Q(t){return V.reset(),N(t,H),2*V}function J(t){return[m(t[1],t[0]),C(t[2])]}function Z(t){var e=t[0],n=t[1],r=y(n);return[r*y(e),r*E(e),E(n)]}function K(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function $(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function tt(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}
vendor: 8,264 bytes, line 2
2function et(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function nt(t){var e=S(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var rt,it,ot,st,at,ut,lt,ct,ht,At,ft,dt,pt,gt,mt,yt,vt,_t,bt,wt,Et,xt,St,Tt,Pt,Ct,Mt=r(),It={point:Ot,lineStart:Lt,lineEnd:Bt,polygonStart:function(){It.point=kt,It.lineStart=Nt,It.lineEnd=Ft,Mt.reset(),H.polygonStart()},polygonEnd:function(){H.polygonEnd(),It.point=Ot,It.lineStart=Lt,It.lineEnd=Bt,z<0?(rt=-(ot=180),it=-(st=90)):Mt>a?st=90:Mt<-a&&(it=-90),At[0]=rt,At[1]=ot}};function Ot(t,e){ht.push(At=[rt=t,ot=t]),e<it&&(it=e),e>st&&(st=e)}function Rt(t,e){var n=Z([t*d,e*d]);if(ct){var r=$(ct,n),i=$([r[1],-r[0],0],r);nt(i),i=J(i);var o,s=t-at,a=s>0?1:-1,u=i[0]*f*a,l=p(s)>180;l^(a*at<u&&u<a*t)?(o=i[1]*f)>st&&(st=o):l^(a*at<(u=(u+360)%360-180)&&u<a*t)?(o=-i[1]*f)<it&&(it=o):(e<it&&(it=e),e>st&&(st=e)),l?t<at?Dt(rt,t)>Dt(rt,ot)&&(ot=t):Dt(t,ot)>Dt(rt,ot)&&(rt=t):ot>=rt?(t<rt&&(rt=t),t>ot&&(ot=t)):t>at?Dt(rt,t)>Dt(rt,ot)&&(ot=t):Dt(t,ot)>Dt(rt,ot)&&(rt=t)}else ht.push(At=[rt=t,ot=t]);e<it&&(it=e),e>st&&(st=e),ct=n,at=t}function Lt(){It.point=Rt}function Bt(){At[0]=rt,At[1]=ot,It.point=Ot,ct=null}function kt(t,e){if(ct){var n=t-at;Mt.add(p(n)>180?n+(n>0?360:-360):n)}else ut=t,lt=e;H.point(t,e),Rt(t,e)}function Nt(){H.lineStart()}function Ft(){kt(ut,lt),H.lineEnd(),p(Mt)>a&&(rt=-(ot=180)),At[0]=rt,At[1]=ot,ct=null}function Dt(t,e){return(e-=t)<0?e+360:e}function jt(t,e){return t[0]-e[0]}function Ut(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function Gt(t){var e,n,r,i,o,s,a;if(st=ot=-(rt=it=1/0),ht=[],N(t,It),n=ht.length){for(ht.sort(jt),e=1,o=[r=ht[0]];e<n;++e)Ut(r,(i=ht[e])[0])||Ut(r,i[1])?(Dt(r[0],i[1])>Dt(r[0],r[1])&&(r[1]=i[1]),Dt(i[0],r[1])>Dt(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(s=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(a=Dt(r[1],i[0]))>s&&(s=a,rt=i[0],ot=r[1])}return ht=At=null,rt===1/0||it===1/0?[[NaN,NaN],[NaN,NaN]]:[[rt,it],[ot,st]]}var zt,Vt,Ht={sphere:I,point:qt,lineStart:Xt,lineEnd:Jt,polygonStart:function(){Ht.lineStart=Zt,Ht.lineEnd=Kt},polygonEnd:function(){Ht.lineStart=Xt,Ht.lineEnd=Jt}};function qt(t,e){t*=d;var n=y(e*=d);Wt(n*y(t),n*E(t),E(e))}function Wt(t,e,n){++ft,pt+=(t-pt)/ft,gt+=(e-gt)/ft,mt+=(n-mt)/ft}function Xt(){Ht.point=Yt}function Yt(t,e){t*=d;var n=y(e*=d);Tt=n*y(t),Pt=n*E(t),Ct=E(e),Ht.point=Qt,Wt(Tt,Pt,Ct)}function Qt(t,e){t*=d;var n=y(e*=d),r=n*y(t),i=n*E(t),o=E(e),s=m(S((s=Pt*o-Ct*i)*s+(s=Ct*r-Tt*o)*s+(s=Tt*i-Pt*r)*s),Tt*r+Pt*i+Ct*o);dt+=s,yt+=s*(Tt+(Tt=r)),vt+=s*(Pt+(Pt=i)),_t+=s*(Ct+(Ct=o)),Wt(Tt,Pt,Ct)}function Jt(){Ht.point=qt}function Zt(){Ht.point=$t}function Kt(){te(xt,St),Ht.point=qt}function $t(t,e){xt=t,St=e,t*=d,e*=d,Ht.point=te;var n=y(e);Tt=n*y(t),Pt=n*E(t),Ct=E(e),Wt(Tt,Pt,Ct)}function te(t,e){t*=d;var n=y(e*=d),r=n*y(t),i=n*E(t),o=E(e),s=Pt*o-Ct*i,a=Ct*r-Tt*o,u=Tt*i-Pt*r,l=S(s*s+a*a+u*u),c=C(l),h=l&&-c/l;bt+=h*s,wt+=h*a,Et+=h*u,dt+=c,yt+=c*(Tt+(Tt=r)),vt+=c*(Pt+(Pt=i)),_t+=c*(Ct+(Ct=o)),Wt(Tt,Pt,Ct)}function ee(t){ft=dt=pt=gt=mt=yt=vt=_t=bt=wt=Et=0,N(t,Ht);var e=bt,n=wt,r=Et,i=e*e+n*n+r*r;return i<u&&(e=yt,n=vt,r=_t,dt<a&&(e=pt,n=gt,r=mt),(i=e*e+n*n+r*r)<u)?[NaN,NaN]:[m(n,e)*f,C(r/S(i))*f]}function ne(t){return function(){return t}}function re(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function ie(t,e){return[t>l?t-A:t<-l?t+A:t,e]}function oe(t,e,n){return(t%=A)?e||n?re(ae(t),ue(e,n)):ae(t):e||n?ue(e,n):ie}function se(t){return function(e,n){return[(e+=t)>l?e-A:e<-l?e+A:e,n]}}function ae(t){var e=se(t);return e.invert=se(-t),e}function ue(t,e){var n=y(t),r=E(t),i=y(e),o=E(e);function s(t,e){var s=y(e),a=y(t)*s,u=E(t)*s,l=E(e),c=l*n+a*r;return[m(u*i-c*o,a*n-l*r),C(c*i+u*o)]}return s.invert=function(t,e){var s=y(e),a=y(t)*s,u=E(t)*s,l=E(e),c=l*i-u*o;return[m(u*i+l*o,a*n+c*r),C(c*n-a*r)]},s}function le(t){function e(e){return(e=t(e[0]*d,e[1]*d))[0]*=f,e[1]*=f,e}return t=oe(t[0]*d,t[1]*d,t.length>2?t[2]*d:0),e.invert=function(e){return(e=t.invert(e[0]*d,e[1]*d))[0]*=f,e[1]*=f,e},e}function ce(t,e,n,r,i,o){if(n){var s=y(e),a=E(e),u=r*n;null==i?(i=e+r*A,o=e-u/2):(i=he(s,i),o=he(s,o),(r>0?i<o:i>o)&&(i+=r*A));for(var l,c=i;r>0?c>o:c<o;c-=u)l=J([s,-a*y(c),-a*E(c)]),t.point(l[0],l[1])}}function he(t,e){(e=Z(e))[0]-=t,nt(e);var n=P(-e[1]);return((-e[2]<0?-n:n)+A-a)%A}function Ae(){var t,e,n=ne([0,0]),r=ne(90),i=ne(6),o={point:function(n,r){t.push(n=e(n,r)),n[0]*=f,n[1]*=f}};function s(){var s=n.apply(this,arguments),a=r.apply(this,arguments)*d,u=i.apply(this,arguments)*d;return t=[],e=oe(-s[0]*d,-s[1]*d,0).invert,ce(o,a,u,1),s={type:"Polygon",coordinates:[t]},t=e=null,s}return s.center=function(t){return arguments.length?(n="function"==typeof t?t:ne([+t[0],+t[1]]),s):n},s.radius=function(t){return arguments.length?(r="function"==typeof t?t:ne(+t),s):r},s.precision=function(t){return arguments.length?(i="function"==typeof t?t:ne(+t),s):i},s}function fe(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:I,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function de(t,e){return p(t[0]-e[0])<a&&p(t[1]-e[1])<a}function pe(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function ge(t,e,n,r,i){var o,s,a=[],u=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],s=t[e];if(de(r,s)){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd()}else a.push(n=new pe(r,t,null,!0)),u.push(n.o=new pe(r,null,n,!1)),a.push(n=new pe(s,t,null,!1)),u.push(n.o=new pe(s,null,n,!0))}}),a.length){for(u.sort(e),me(a),me(u),o=0,s=u.length;o<s;++o)u[o].e=n=!n;for(var l,c,h=a[0];;){for(var A=h,f=!0;A.v;)if((A=A.n)===h)return;l=A.z,i.lineStart();do{if(A.v=A.o.v=!0,A.e){if(f)for(o=0,s=l.length;o<s;++o)i.point((c=l[o])[0],c[1]);else r(A.x,A.n.x,1,i);A=A.n}else{if(f)for(l=A.p.z,o=l.length-1;o>=0;--o)i.point((c=l[o])[0],c[1]);else r(A.x,A.p.x,-1,i);A=A.p}l=(A=A.o).z,f=!f}while(!A.v);i.lineEnd()}}}function me(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function ye(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}ie.invert=ie,1===(zt=ye).length&&(Vt=zt,zt=function(t,e){return ye(Vt(t),e)});var ve=Array.prototype;function _e(t){for(var e,n,r,i=t.length,o=-1,s=0;++o<i;)s+=t[o].length;for(n=new Array(s);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--s]=r[e];return n}function be(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}ve.slice,ve.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var we=1e9,Ee=-we;function xe(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,a,u){var c=0,h=0;if(null==i||(c=s(i,a))!==(h=s(o,a))||l(i,o)<0^a>0)do{u.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+a+4)%4)!==h);else u.point(o[0],o[1])}function s(r,i){return p(r[0]-t)<a?i>0?0:3:p(r[0]-n)<a?i>0?2:1:p(r[1]-e)<a?i>0?1:0:i>0?3:2}function u(t,e){return l(t.x,e.x)}function l(t,e){var n=s(t,1),r=s(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){var a,l,c,h,A,f,d,p,g,m,y,v=s,_=fe(),b={point:w,lineStart:function(){b.point=E,l&&l.push(c=[]),m=!0,g=!1,d=p=NaN},lineEnd:function(){a&&(E(h,A),f&&g&&_.rejoin(),a.push(_.result())),b.point=w,g&&v.lineEnd()},polygonStart:function(){v=_,a=[],l=[],y=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;n<i;++n)for(var o,s,a=l[n],u=1,c=a.length,h=a[0],A=h[0],f=h[1];u<c;++u)o=A,s=f,A=(h=a[u])[0],f=h[1],s<=r?f>r&&(A-o)*(r-s)>(f-s)*(t-o)&&++e:f<=r&&(A-o)*(r-s)<(f-s)*(t-o)&&--e;return e}(),n=y&&e,i=(a=_e(a)).length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),i&&ge(a,u,e,o,s),s.polygonEnd()),v=s,a=l=c=null}};function w(t,e){i(t,e)&&v.point(t,e)}function E(o,s){var a=i(o,s);if(l&&c.push([o,s]),m)h=o,A=s,f=a,m=!1,a&&(v.lineStart(),v.point(o,s));else if(a&&g)v.point(o,s);else{var u=[d=Math.max(Ee,Math.min(we,d)),p=Math.max(Ee,Math.min(we,p))],_=[o=Math.max(Ee,Math.min(we,o)),s=Math.max(Ee,Math.min(we,s))];!function(t,e,n,r,i,o){var s,a=t[0],u=t[1],l=0,c=1,h=e[0]-a,A=e[1]-u;if(s=n-a,h||!(s>0)){if(s/=h,h<0){if(s<l)return;s<c&&(c=s)}else if(h>0){if(s>c)return;s>l&&(l=s)}
vendor: 5,416 bytes, line 2
2if(s=i-a,h||!(s<0)){if(s/=h,h<0){if(s>c)return;s>l&&(l=s)}else if(h>0){if(s<l)return;s<c&&(c=s)}if(s=r-u,A||!(s>0)){if(s/=A,A<0){if(s<l)return;s<c&&(c=s)}else if(A>0){if(s>c)return;s>l&&(l=s)}if(s=o-u,A||!(s<0)){if(s/=A,A<0){if(s>c)return;s>l&&(l=s)}else if(A>0){if(s<l)return;s<c&&(c=s)}return l>0&&(t[0]=a+l*h,t[1]=u+l*A),c<1&&(e[0]=a+c*h,e[1]=u+c*A),!0}}}}}(u,_,t,e,n,r)?a&&(v.lineStart(),v.point(o,s),y=!1):(g||(v.lineStart(),v.point(u[0],u[1])),v.point(_[0],_[1]),a||v.lineEnd(),y=!1)}d=o,p=s,g=a}return b}}function Se(){var t,e,n,r=0,i=0,o=960,s=500;return n={stream:function(n){return t&&e===n?t:t=xe(r,i,o,s)(e=n)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],o=+a[1][0],s=+a[1][1],t=e=null,n):[[r,i],[o,s]]}}}var Te=r();function Pe(t,e){var n=e[0],r=e[1],i=[E(n),-y(n),0],o=0,s=0;Te.reset();for(var u=0,c=t.length;u<c;++u)if(d=(f=t[u]).length)for(var f,d,p=f[d-1],g=p[0],v=p[1]/2+h,_=E(v),b=y(v),w=0;w<d;++w,g=S,_=P,b=M,p=x){var x=f[w],S=x[0],T=x[1]/2+h,P=E(T),M=y(T),I=S-g,O=I>=0?1:-1,R=O*I,L=R>l,B=_*P;if(Te.add(m(B*O*E(R),b*M+B*y(R))),o+=L?I+O*A:I,L^g>=n^S>=n){var k=$(Z(p),Z(x));nt(k);var N=$(i,k);nt(N);var F=(L^I>=0?-1:1)*C(N[2]);(r>F||r===F&&(k[0]||k[1]))&&(s+=L^I>=0?1:-1)}}return(o<-a||o<a&&Te<-a)^1&s}var Ce,Me,Ie,Oe=r(),Re={sphere:I,point:I,lineStart:function(){Re.point=Be,Re.lineEnd=Le},lineEnd:I,polygonStart:I,polygonEnd:I};function Le(){Re.point=Re.lineEnd=I}function Be(t,e){Ce=t*=d,Me=E(e*=d),Ie=y(e),Re.point=ke}function ke(t,e){t*=d;var n=E(e*=d),r=y(e),i=p(t-Ce),o=y(i),s=r*E(i),a=Ie*n-Me*r*o,u=Me*n+Ie*r*o;Oe.add(m(S(s*s+a*a),u)),Ce=t,Me=n,Ie=r}function Ne(t){return Oe.reset(),N(t,Re),+Oe}var Fe=[null,null],De={type:"LineString",coordinates:Fe};function je(t,e){return Fe[0]=t,Fe[1]=e,Ne(De)}var Ue={Feature:function(t,e){return ze(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(ze(n[r].geometry,e))return!0;return!1}},Ge={Sphere:function(){return!0},Point:function(t,e){return Ve(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Ve(n[r],e))return!0;return!1},LineString:function(t,e){return He(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(He(n[r],e))return!0;return!1},Polygon:function(t,e){return qe(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(qe(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(ze(n[r],e))return!0;return!1}};function ze(t,e){return!(!t||!Ge.hasOwnProperty(t.type))&&Ge[t.type](t,e)}function Ve(t,e){return 0===je(t,e)}function He(t,e){var n=je(t[0],t[1]);return je(t[0],e)+je(e,t[1])<=n+a}function qe(t,e){return!!Pe(t.map(We),Xe(e))}function We(t){return(t=t.map(Xe)).pop(),t}function Xe(t){return[t[0]*d,t[1]*d]}function Ye(t,e){return(t&&Ue.hasOwnProperty(t.type)?Ue[t.type]:ze)(t,e)}function Qe(t,e,n){var r=be(t,e-a,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function Je(t,e,n){var r=be(t,e-a,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function Ze(){var t,e,n,r,i,o,s,u,l,c,h,A,f=10,d=f,g=90,m=360,y=2.5;function _(){return{type:"MultiLineString",coordinates:b()}}function b(){return be(v(r/g)*g,n,g).map(h).concat(be(v(u/m)*m,s,m).map(A)).concat(be(v(e/f)*f,t,f).filter(function(t){return p(t%g)>a}).map(l)).concat(be(v(o/d)*d,i,d).filter(function(t){return p(t%m)>a}).map(c))}return _.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},_.outline=function(){return{type:"Polygon",coordinates:[h(r).concat(A(s).slice(1),h(n).reverse().slice(1),A(u).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],u=+t[0][1],s=+t[1][1],r>n&&(t=r,r=n,n=t),u>s&&(t=u,u=s,s=t),_.precision(y)):[[r,u],[n,s]]},_.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),_.precision(y)):[[e,o],[t,i]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(g=+t[0],m=+t[1],_):[g,m]},_.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],_):[f,d]},_.precision=function(a){return arguments.length?(y=+a,l=Qe(o,i,90),c=Je(e,t,y),h=Qe(u,s,90),A=Je(r,n,y),_):y},_.extentMajor([[-180,-90+a],[180,90-a]]).extentMinor([[-180,-80-a],[180,80+a]])}function Ke(){return Ze()()}function $e(t,e){var n=t[0]*d,r=t[1]*d,i=e[0]*d,o=e[1]*d,s=y(r),a=E(r),u=y(o),l=E(o),c=s*y(n),h=s*E(n),A=u*y(i),p=u*E(i),g=2*C(S(M(o-r)+s*u*M(i-n))),v=E(g),_=g?function(t){var e=E(t*=g)/v,n=E(g-t)/v,r=n*c+e*A,i=n*h+e*p,o=n*a+e*l;return[m(i,r)*f,m(o,S(r*r+i*i))*f]}:function(){return[n*f,r*f]};return _.distance=g,_}function tn(t){return t}var en,nn,rn,on,sn=r(),an=r(),un={point:I,lineStart:I,lineEnd:I,polygonStart:function(){un.lineStart=ln,un.lineEnd=An},polygonEnd:function(){un.lineStart=un.lineEnd=un.point=I,sn.add(p(an)),an.reset()},result:function(){var t=sn/2;return sn.reset(),t}};function ln(){un.point=cn}function cn(t,e){un.point=hn,en=rn=t,nn=on=e}function hn(t,e){an.add(on*t-rn*e),rn=t,on=e}function An(){hn(en,nn)}const fn=un;var dn=1/0,pn=dn,gn=-dn,mn=gn,yn={point:function(t,e){t<dn&&(dn=t),t>gn&&(gn=t),e<pn&&(pn=e),e>
vendor: 15,535 bytes, line 2
2mn&&(mn=e)},lineStart:I,lineEnd:I,polygonStart:I,polygonEnd:I,result:function(){var t=[[dn,pn],[gn,mn]];return gn=mn=-(pn=dn=1/0),t}};const vn=yn;var _n,bn,wn,En,xn=0,Sn=0,Tn=0,Pn=0,Cn=0,Mn=0,In=0,On=0,Rn=0,Ln={point:Bn,lineStart:kn,lineEnd:Dn,polygonStart:function(){Ln.lineStart=jn,Ln.lineEnd=Un},polygonEnd:function(){Ln.point=Bn,Ln.lineStart=kn,Ln.lineEnd=Dn},result:function(){var t=Rn?[In/Rn,On/Rn]:Mn?[Pn/Mn,Cn/Mn]:Tn?[xn/Tn,Sn/Tn]:[NaN,NaN];return xn=Sn=Tn=Pn=Cn=Mn=In=On=Rn=0,t}};function Bn(t,e){xn+=t,Sn+=e,++Tn}function kn(){Ln.point=Nn}function Nn(t,e){Ln.point=Fn,Bn(wn=t,En=e)}function Fn(t,e){var n=t-wn,r=e-En,i=S(n*n+r*r);Pn+=i*(wn+t)/2,Cn+=i*(En+e)/2,Mn+=i,Bn(wn=t,En=e)}function Dn(){Ln.point=Bn}function jn(){Ln.point=Gn}function Un(){zn(_n,bn)}function Gn(t,e){Ln.point=zn,Bn(_n=wn=t,bn=En=e)}function zn(t,e){var n=t-wn,r=e-En,i=S(n*n+r*r);Pn+=i*(wn+t)/2,Cn+=i*(En+e)/2,Mn+=i,In+=(i=En*t-wn*e)*(wn+t),On+=i*(En+e),Rn+=3*i,Bn(wn=t,En=e)}const Vn=Ln;function Hn(t){this._context=t}Hn.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,A)}},result:I};var qn,Wn,Xn,Yn,Qn,Jn=r(),Zn={point:I,lineStart:function(){Zn.point=Kn},lineEnd:function(){qn&&$n(Wn,Xn),Zn.point=I},polygonStart:function(){qn=!0},polygonEnd:function(){qn=null},result:function(){var t=+Jn;return Jn.reset(),t}};function Kn(t,e){Zn.point=$n,Wn=Yn=t,Xn=Qn=e}function $n(t,e){Yn-=t,Qn-=e,Jn.add(S(Yn*Yn+Qn*Qn)),Yn=t,Qn=e}const tr=Zn;function er(){this._string=[]}function nr(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function rr(t,e){var n,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),N(t,n(r))),r.result()}return o.area=function(t){return N(t,n(fn)),fn.result()},o.measure=function(t){return N(t,n(tr)),tr.result()},o.bounds=function(t){return N(t,n(vn)),vn.result()},o.centroid=function(t){return N(t,n(Vn)),Vn.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,tn):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new er):new Hn(e=t),"function"!=typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)}function ir(t,e,n,r){return function(i,o){var s,a,u,l=e(o),c=i.invert(r[0],r[1]),h=fe(),A=e(h),f=!1,d={point:p,lineStart:m,lineEnd:y,polygonStart:function(){d.point=v,d.lineStart=_,d.lineEnd=b,a=[],s=[]},polygonEnd:function(){d.point=p,d.lineStart=m,d.lineEnd=y,a=_e(a);var t=Pe(s,c);a.length?(f||(o.polygonStart(),f=!0),ge(a,sr,t,n,o)):t&&(f||(o.polygonStart(),f=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),f&&(o.polygonEnd(),f=!1),a=s=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function p(e,n){var r=i(e,n);t(e=r[0],n=r[1])&&o.point(e,n)}function g(t,e){var n=i(t,e);l.point(n[0],n[1])}function m(){d.point=g,l.lineStart()}function y(){d.point=p,l.lineEnd()}function v(t,e){u.push([t,e]);var n=i(t,e);A.point(n[0],n[1])}function _(){A.lineStart(),u=[]}function b(){v(u[0][0],u[0][1]),A.lineEnd();var t,e,n,r,i=A.clean(),l=h.result(),c=l.length;if(u.pop(),s.push(u),u=null,c)if(1&i){if((e=(n=l[0]).length-1)>0){for(f||(o.polygonStart(),f=!0),o.lineStart(),t=0;t<e;++t)o.point((r=n[t])[0],r[1]);o.lineEnd()}}else c>1&&2&i&&l.push(l.pop().concat(l.shift())),a.push(l.filter(or))}return d}}function or(t){return t.length>1}function sr(t,e){return((t=t.x)[0]<0?t[1]-c-a:c-t[1])-((e=e.x)[0]<0?e[1]-c-a:c-e[1])}er.prototype={_radius:4.5,_circle:nr(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=nr(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};const ar=ir(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var u=o>0?l:-l,h=p(o-n);p(h-l)<a?(t.point(n,r=(r+s)/2>0?c:-c),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),e=0):i!==u&&h>=l&&(p(n-i)<a&&(n-=i*a),p(o-u)<a&&(o-=u*a),r=function(t,e,n,r){var i,o,s=E(t-n);return p(s)>a?g((E(e)*(o=y(r))*E(n)-E(r)*(i=y(e))*E(t))/(i*o*s)):(e+r)/2}(n,r,o,s),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),e=0),t.point(n=o,r=s),i=u},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*c,r.point(-l,i),r.point(0,i),r.point(l,i),r.point(l,0),r.point(l,-i),r.point(0,-i),r.point(-l,-i),r.point(-l,0),r.point(-l,i);else if(p(t[0]-e[0])>a){var o=t[0]<e[0]?l:-l;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-l,-c]);function ur(t){return{stream:lr(t)}}function lr(t){return function(e){var n=new cr;for(var r in t)n[r]=t[r];return n.stream=e,n}}function cr(){}function hr(t,e,n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=o&&t.clipExtent(null),N(n,t.stream(vn));var s=vn.result(),a=Math.min(r/(s[1][0]-s[0][0]),i/(s[1][1]-s[0][1])),u=+e[0][0]+(r-a*(s[1][0]+s[0][0]))/2,l=+e[0][1]+(i-a*(s[1][1]+s[0][1]))/2;return null!=o&&t.clipExtent(o),t.scale(150*a).translate([u,l])}function Ar(t,e,n){return hr(t,[[0,0],e],n)}cr.prototype={constructor:cr,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var fr=16,dr=y(30*d);function pr(t,e){return+e?function(t,e){function n(r,i,o,s,u,l,c,h,A,f,d,g,y,v){var _=c-r,b=h-i,w=_*_+b*b;if(w>4*e&&y--){var E=s+f,x=u+d,T=l+g,P=S(E*E+x*x+T*T),M=C(T/=P),I=p(p(T)-1)<a||p(o-A)<a?(o+A)/2:m(x,E),O=t(I,M),R=O[0],L=O[1],B=R-r,k=L-i,N=b*B-_*k;(N*N/w>e||p((_*B+b*k)/w-.5)>.3||s*f+u*d+l*g<dr)&&(n(r,i,o,s,u,l,R,L,I,E/=P,x/=P,T,y,v),v.point(R,L),n(R,L,I,E,x,T,c,h,A,f,d,g,y,v))}}return function(e){var r,i,o,s,a,u,l,c,h,A,f,d,p={point:g,lineStart:m,lineEnd:v,polygonStart:function(){e.polygonStart(),p.lineStart=_},polygonEnd:function(){e.polygonEnd(),p.lineStart=m}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function m(){c=NaN,p.point=y,e.lineStart()}function y(r,i){var o=Z([r,i]),s=t(r,i);n(c,h,l,A,f,d,c=s[0],h=s[1],l=r,A=o[0],f=o[1],d=o[2],fr,e),e.point(c,h)}function v(){p.point=g,e.lineEnd()}function _(){m(),p.point=b,p.lineEnd=w}function b(t,e){y(r=t,e),i=c,o=h,s=A,a=f,u=d,p.point=y}function w(){n(c,h,l,A,f,d,i,o,r,s,a,u,fr,e),p.lineEnd=v,v()}return p}}(t,e):function(t){return lr({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var gr=lr({point:function(t,e){this.stream.point(t*d,e*d)}});function mr(t){return yr(function(){return t})()}function yr(t){var e,n,r,i,o,s,u,c,h,A,g=150,m=480,v=250,_=0,b=0,w=0,E=0,x=0,T=null,P=ar,C=null,M=tn,I=.5,O=pr(B,I);function R(t){return[(t=o(t[0]*d,t[1]*d))[0]*g+n,r-t[1]*g]}function L(t){return(t=o.invert((t[0]-n)/g,(r-t[1])/g))&&[t[0]*f,t[1]*f]}function B(t,i){return[(t=e(t,i))[0]*g+n,r-t[1]*g]}function k(){o=re(i=oe(w,E,x),e);var t=e(_,b);return n=m-t[0]*g,r=v+t[1]*g,N()}function N(){return h=A=null,R}return R.stream=function(t){return h&&A===t?h:h=gr(P(i,O(M(A=t))))},R.clipAngle=function(t){return arguments.length?(P=+t?function(t,e){var n=y(t),r=n>0,i=p(n)>a;function o(t,e){return y(t)*y(e)>n}function s(t,e,r){var i=[1,0,0],o=$(Z(t),Z(e)),s=K(o,o),u=o[0],c=s-u*u;if(!c)return!r&&t;var h=n*s/c,A=-n*u/c,f=$(i,o),d=et(i,h);tt(d,et(o,A));var g=f,m=K(d,g),y=K(g,g),v=m*m-y*(K(d,d)-1);if(!(v<0)){var _=S(v),b=et(g,(-m-_)/y);if(tt(b,d),b=J(b),!r)return b;var w,E=t[0],x=e[0],T=t[1],P=e[1];x<E&&(w=E,E=x,x=w);var C=x-E,M=p(C-l)<a;if(!M&&P<T&&(w=T,T=P,P=w),M||C<a?M?T+P>0^b[1]<(p(b[0]-E)<a?T:P):T<=b[1]&&b[1]<=P:C>l^(E<=b[0]&&b[0]<=x)){var I=et(g,(-m+_)/y);return tt(I,d),[b,J(I)]}}}function u(e,n){var i=r?t:l-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return ir(o,function(t){var e,n,c,h,A;return{lineStart:function(){h=c=!1,A=1},point:function(f,d){var p,g=[f,d],m=o(f,d),y=r?m?0:u(f,d):m?u(f+(f<0?l:-l),d):0;if(!e&&(h=c=m)&&t.lineStart(),m!==c&&(!(p=s(e,g))||de(e,p)||de(g,p))&&(g[0]+=a,g[1]+=a,m=o(g[0],g[1])),m!==c)A=0,m?(t.lineStart(),p=s(g,e),t.point(p[0],p[1])):(p=s(e,g),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(i&&e&&r^m){var v;y&n||!(v=s(g,e,!0))||(A=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||e&&de(e,g)||t.point(g[0],g[1]),e=g,c=m,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return A|(h&&c)<<1}}},function(n,r,i,o){ce(o,t,e,i,n,r)},r?[0,-t]:[-l,t-l])}(T=t*d,6*d):(T=null,ar),N()):T*f},R.clipExtent=function(t){return arguments.length?(M=null==t?(C=s=u=c=null,tn):xe(C=+t[0][0],s=+t[0][1],u=+t[1][0],c=+t[1][1]),N()):null==C?null:[[C,s],[u,c]]},R.scale=function(t){return arguments.length?(g=+t,k()):g},R.translate=function(t){return arguments.length?(m=+t[0],v=+t[1],k()):[m,v]},R.center=function(t){return arguments.length?(_=t[0]%360*d,b=t[1]%360*d,k()):[_*f,b*f]},R.rotate=function(t){return arguments.length?(w=t[0]%360*d,E=t[1]%360*d,x=t.length>2?t[2]%360*d:0,k()):[w*f,E*f,x*f]},R.precision=function(t){return arguments.length?(O=pr(B,I=t*t),N()):S(I)},R.fitExtent=function(t,e){return hr(R,t,e)},R.fitSize=function(t,e){return Ar(R,t,e)},function(){return e=t.apply(this,arguments),R.invert=e.invert&&L,k()}}function vr(t){var e=0,n=l/3,r=yr(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*d,n=t[1]*d):[e*f,n*f]},i}function _r(t,e){var n=E(t),r=(n+E(e))/2;if(p(r)<a)return function(t){var e=y(t);function n(t,n){return[t*e,E(n)/e]}return n.invert=function(t,n){return[t/e,C(n*e)]},n}(t);var i=1+n*(2*r-n),o=S(i)/r;function s(t,e){var n=S(i-2*r*E(e))/r;return[n*E(t*=r),o-n*y(t)]}return s.invert=function(t,e){var n=o-e;return[m(t,p(n))/r*x(n),C((i-(t*t+n*n)*r*r)/(2*r))]},s}function br(){return vr(_r).scale(155.424).center([0,33.6442])}function wr(){return br().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Er(){var t,e,n,r,i,o,s=wr(),u=br().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=br().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(t,e){o=[t,e]}};function h(t){var e=t[0],s=t[1];return o=null,n.point(e,s),o||(r.point(e,s),o)||(i.point(e,s),o)}function A(){return t=e=null,h}return h.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?l:s).invert(t)},h.stream=function(n){return t&&e===n?t:(r=[s.stream(e=n),u.stream(n),l.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},h.precision=function(t){return arguments.length?(s.precision(t),u.precision(t),l.precision(t),A()):s.precision()},h.scale=function(t){return arguments.length?(s.scale(t),u.scale(.35*t),l.scale(t),h.translate(s.translate())):s.scale()},h.translate=function(t){if(!arguments.length)return s.translate();var e=s.scale(),o=+t[0],h=+t[1];return n=s.translate(t).clipExtent([[o-.455*e,h-.238*e],[o+.455*e,h+.238*e]]).stream(c),r=u.translate([o-.307*e,h+.201*e]).clipExtent([[o-.425*e+a,h+.12*e+a],[o-.214*e-a,h+.234*e-a]]).stream(c),i=l.translate([o-.205*e,h+.212*e]).clipExtent([[o-.214*e+a,h+.166*e+a],[o-.115*e-a,h+.234*e-a]]).stream(c),A()},h.fitExtent=function(t,e){return hr(h,t,e)},h.fitSize=function(t,e){return Ar(h,t,e)},h.scale(1070)}function xr(t){return function(e,n){var r=y(e),i=y(n),o=t(r*i);return[o*i*E(e),o*E(n)]}}function Sr(t){return function(e,n){var r=S(e*e+n*n),i=t(r),o=E(i),s=y(i);return[m(e*o,r*s),C(r&&n*o/r)]}}var Tr=xr(function(t){return S(2/(1+t))});function Pr(){return mr(Tr).scale(124.75).clipAngle(179.999)}Tr.invert=Sr(function(t){return 2*C(t/2)});var Cr=xr(function(t){return(t=P(t))&&t/E(t)});function Mr(){return mr(Cr).scale(79.4188).clipAngle(179.999)}function Ir(t,e){return[t,b(T((c+e)/2))]}function Or(){return Rr(Ir).scale(961/A)}function Rr(t){var e,n,r,i=mr(t),o=i.center,s=i.scale,a=i.translate,u=i.clipExtent,c=null;function h(){var o=l*s(),a=i(le(i.rotate()).invert([0,0]));return u(null==c?[[a[0]-o,a[1]-o],[a[0]+o,a[1]+o]]:t===Ir?[[Math.max(a[0]-o,c),e],[Math.min(a[0]+o,n),r]]:[[c,Math.max(a[1]-o,e)],[n,Math.min(a[1]+o,r)]])}return i.scale=function(t){return arguments.length?(s(t),h()):s()},i.translate=function(t){return arguments.length?(a(t),h()):a()},i.center=function(t){return arguments.length?(o(t),h()):o()},i.clipExtent=function(t){return arguments.length?(null==t?c=e=n=r=null:(c=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),h()):null==c?null:[[c,e],[n,r]]},h()}function Lr(t){return T((c+t)/2)}function Br(t,e){var n=y(t),r=t===e?E(t):b(n/y(e))/b(Lr(e)/Lr(t)),i=n*w(Lr(t),r)/r;if(!r)return Ir;function o(t,e){i>0?e<-c+a&&(e=-c+a):e>c-a&&(e=c-a);var n=i/w(Lr(e),r);return[n*E(r*t),i-n*y(r*t)]}return o.invert=function(t,e){var n=i-e,o=x(r)*S(t*t+n*n);return[m(t,p(n))/r*x(n),2*g(w(i/o,1/r))-c]},o}function kr(){return vr(Br).scale(109.5).parallels([30,30])}function Nr(t,e){return[t,e]}function Fr(){return mr(Nr).scale(152.63)}function Dr(t,e){var n=y(t),r=t===e?E(t):(n-y(e))/(e-t),i=n/r+t;if(p(r)<a)return Nr;function o(t,e){var n=i-e,o=r*t;return[n*E(o),i-n*y(o)]}return o.invert=function(t,e){var n=i-e;return[m(t,p(n))/r*x(n),i-x(r)*S(t*t+n*n)]},o}function jr(){return vr(Dr).scale(131.154).center([0,13.9389])}function Ur(t,e){var n=y(e),r=y(t)*n;return[n*E(t)/r,E(e)/r]}function Gr(){return mr(Ur).scale(144.049).clipAngle(60)}function zr(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?tn:lr({point:function(i,o){this.stream.point(i*t+n,o*e+r)}})}function Vr(){var t,e,n,r,i,o,s=1,a=0,u=0,l=1,c=1,h=tn,A=null,f=tn;function d(){return r=i=null,o}return o={stream:function(t){return r&&i===t?r:r=h(f(i=t))},clipExtent:function(r){return arguments.length?(f=null==r?(A=t=e=n=null,tn):xe(A=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),d()):null==A?null:[[A,t],[e,n]]},scale:function(t){return arguments.length?(h=zr((s=+t)*l,s*c,a,u),d()):s},translate:function(t){return arguments.length?(h=zr(s*l,s*c,a=+t[0],u=+t[1]),d()):[a,u]},reflectX:function(t){return arguments.length?(h=zr(s*(l=t?-1:1),s*c,a,u),d()):l<0},reflectY:function(t){return arguments.length?(h=zr(s*l,s*(c=t?-1:1),a,u),d()):c<0},fitExtent:function(t,e){return hr(o,t,e)},fitSize:function(t,e){return Ar(o,t,e)}
2}}function Hr(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function qr(){return mr(Hr).scale(175.295)}function Wr(t,e){return[y(e)*E(t),E(e)]}function Xr(){return mr(Wr).scale(249.5).clipAngle(90+a)}function Yr(t,e){var n=y(e),r=1+y(t)*n;return[n*E(t)/r,E(e)/r]}function Qr(){return mr(Yr).scale(250).clipAngle(142)}function Jr(t,e){return[b(T((c+e)/2)),-t]}function Zr(){var t=Rr(Jr),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}Cr.invert=Sr(function(t){return t}),Ir.invert=function(t,e){return[t,2*g(_(e))-c]},Nr.invert=Nr,Ur.invert=Sr(g),Hr.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,s=o*o;r-=n=(r*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-e)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while(p(n)>a&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},Wr.invert=Sr(C),Yr.invert=Sr(function(t){return 2*g(t)}),Jr.invert=function(t,e){return[-e,2*g(_(t))-c]}},25330:(t,e,n)=>{"use strict";n.d(e,{A:()=>L});var r=n(44454),i=n(40356),o=n(2592),s=n(94939),a=n(86849),u=n(5259),l=n(6105),c=n(63564),h=n(55890);let A=null;var f=n(87967);class d extends h.A{get[Symbol.toStringTag](){return"VertexArrayObject"}static isSupported(t){return!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).constantAttributeZero||(0,r.C6)(t)||"Chrome"===(0,f.A)()}static getDefaultArray(t){return t.luma=t.luma||{},t.luma.defaultVertexArray||(t.luma.defaultVertexArray=new d(t,{handle:null,isDefaultArray:!0})),t.luma.defaultVertexArray}static getMaxAttributes(t){return d.MAX_ATTRIBUTES=d.MAX_ATTRIBUTES||t.getParameter(34921),d.MAX_ATTRIBUTES}static setConstant(t,e,n){switch(n.constructor){case Float32Array:d._setConstantFloatArray(t,e,n);break;case Int32Array:d._setConstantIntArray(t,e,n);break;case Uint32Array:d._setConstantUintArray(t,e,n);break;default:(0,s.v)(!1)}}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.id||e.program&&e.program.id;super(t,Object.assign({},e,{id:n})),this.buffer=null,this.bufferValue=null,this.isDefaultArray=e.isDefaultArray||!1,this.gl2=t,this.initialize(e),Object.seal(this)}delete(){return super.delete(),this.buffer&&this.buffer.delete(),this}get MAX_ATTRIBUTES(){return d.getMaxAttributes(this.gl)}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.setProps(t)}setProps(t){return this}setElementBuffer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,s.v)(!t||34963===t.target,"elements must be GL.ELEMENT_ARRAY_BUFFER"),this.bind(()=>{this.gl.bindBuffer(34963,t?t.handle:null)}),this}setBuffer(t,e,n){if(34963===e.target)return this.setElementBuffer(e,n);const{size:i,type:o,stride:a,offset:u,normalized:l,integer:c,divisor:h}=n,{gl:A,gl2:f}=this;return t=Number(t),this.bind(()=>{A.bindBuffer(34962,e.handle),c?((0,s.v)((0,r.C6)(A)),f.vertexAttribIPointer(t,i,o,a,u)):A.vertexAttribPointer(t,i,o,l,a,u),A.enableVertexAttribArray(t),f.vertexAttribDivisor(t,h||0)}),this}enable(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!e&&0===t&&!d.isSupported(this.gl,{constantAttributeZero:!0})||(t=Number(t),this.bind(()=>e?this.gl.enableVertexAttribArray(t):this.gl.disableVertexAttribArray(t))),this}getConstantBuffer(t,e){const n=this._normalizeConstantArrayValue(e),r=n.byteLength*t,i=n.length*t;let o=!this.buffer;if(this.buffer=this.buffer||new c.A(this.gl,r),o=o||this.buffer.reallocate(r),o=o||!this._compareConstantArrayValues(n,this.bufferValue),o){const t=function(t,e){var n;return new t((n=t.BYTES_PER_ELEMENT*e,(!A||A.byteLength<n)&&(A=new ArrayBuffer(n)),A),0,e)}(e.constructor,i);!function(t){let{target:e,source:n,start:r=0,count:i=1}=t;const o=n.length,s=i*o;let a=0;for(let t=r;a<o;a++)e[t++]=n[a];for(;a<s;)a<s-a?(e.copyWithin(r+a,r,r+a),a*=2):(e.copyWithin(r+a,r,r+s-a),a=s)}({target:t,source:n,start:0,count:i}),this.buffer.subData(t),this.bufferValue=e}return this.buffer}_normalizeConstantArrayValue(t){return Array.isArray(t)?new Float32Array(t):t}_compareConstantArrayValues(t,e){if(!t||!e||t.length!==e.length||t.constructor!==e.constructor)return!1;for(let n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0}static _setConstantFloatArray(t,e,n){switch(n.length){case 1:t.vertexAttrib1fv(e,n);break;case 2:t.vertexAttrib2fv(e,n);break;case 3:t.vertexAttrib3fv(e,n);break;case 4:t.vertexAttrib4fv(e,n);break;default:(0,s.v)(!1)}}static _setConstantIntArray(t,e,n){switch((0,s.v)((0,r.C6)(t)),n.length){case 1:t.vertexAttribI1iv(e,n);break;case 2:t.vertexAttribI2iv(e,n);break;case 3:t.vertexAttribI3iv(e,n);break;case 4:t.vertexAttribI4iv(e,n);break;default:(0,s.v)(!1)}}static _setConstantUintArray(t,e,n){switch((0,s.v)((0,r.C6)(t)),n.length){case 1:t.vertexAttribI1uiv(e,n);break;case 2:t.vertexAttribI2uiv(e,n);break;case 3:t.vertexAttribI3uiv(e,n);break;case 4:t.vertexAttribI4uiv(e,n);break;default:(0,s.v)(!1)}}_createHandle(){return this.gl.createVertexArray()}_deleteHandle(t){return this.gl2.deleteVertexArray(t),[this.elements]}_bindHandle(t){this.gl2.bindVertexArray(t)}_getParameter(t,e){let{location:n}=e;return(0,s.v)(Number.isFinite(n)),this.bind(()=>34373===t?this.gl.getVertexAttribOffset(n,t):this.gl.getVertexAttrib(n,t))}}var p=n(4746);const g=/^(.+)__LOCATION_([0-9]+)$/,m=["setBuffers","setGeneric","clearBindings","setLocations","setGenericValues","setDivisor","enable","disable"];class y{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.id||e.program&&e.program.id;this.id=n,this.gl=t,this.configuration=null,this.elements=null,this.elementsAccessor=null,this.values=null,this.accessors=null,this.unused=null,this.drawParams=null,this.buffer=null,this.attributes={}
2,this.vertexArrayObject=new d(t),(0,p.R)(this,"VertexArray","v6.0",m),this.initialize(e),Object.seal(this)}delete(){this.buffer&&this.buffer.delete(),this.vertexArrayObject.delete()}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.reset(),this.configuration=null,this.bindOnUse=!1,this.setProps(t)}reset(){this.elements=null,this.elementsAccessor=null;const{MAX_ATTRIBUTES:t}=this.vertexArrayObject;return this.values=new Array(t).fill(null),this.accessors=new Array(t).fill(null),this.unused={},this.drawParams=null,this}setProps(t){return"program"in t&&(this.configuration=t.program&&t.program.configuration),"configuration"in t&&(this.configuration=t.configuration),"attributes"in t&&this.setAttributes(t.attributes),"elements"in t&&this.setElementBuffer(t.elements),"bindOnUse"in t&&(t=t.bindOnUse),this}clearDrawParams(){this.drawParams=null}getDrawParams(){return this.drawParams=this.drawParams||this._updateDrawParams(),this.drawParams}setAttributes(t){return Object.assign(this.attributes,t),this.vertexArrayObject.bind(()=>{for(const e in t){const n=t[e];this._setAttribute(e,n)}this.gl.bindBuffer(34962,null)}),this}setElementBuffer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.elements=t,this.elementsAccessor=e,this.clearDrawParams(),this.vertexArrayObject.setElementBuffer(t,e),this}setBuffer(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(34963===e.target)return this.setElementBuffer(e,n);const{location:r,accessor:i}=this._resolveLocationAndAccessor(t,e,e.accessor,n);return r>=0&&(this.values[r]=e,this.accessors[r]=i,this.clearDrawParams(),this.vertexArrayObject.setBuffer(r,e,i)),this}setConstant(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{location:r,accessor:i}=this._resolveLocationAndAccessor(t,e,Object.assign({size:e.length},n));return r>=0&&(e=this.vertexArrayObject._normalizeConstantArrayValue(e),this.values[r]=e,this.accessors[r]=i,this.clearDrawParams(),this.vertexArrayObject.enable(r,!1)),this}unbindBuffers(){return this.vertexArrayObject.bind(()=>{this.elements&&this.vertexArrayObject.setElementBuffer(null),this.buffer=this.buffer||new c.A(this.gl,{accessor:{size:4}});for(let t=0;t<this.vertexArrayObject.MAX_ATTRIBUTES;t++)this.values[t]instanceof c.A&&(this.gl.disableVertexAttribArray(t),this.gl.bindBuffer(34962,this.buffer.handle),this.gl.vertexAttribPointer(t,1,5126,!1,0,0))}),this}bindBuffers(){return this.vertexArrayObject.bind(()=>{this.elements&&this.setElementBuffer(this.elements);for(let t=0;t<this.vertexArrayObject.MAX_ATTRIBUTES;t++){const e=this.values[t];e instanceof c.A&&this.setBuffer(t,e)}}),this}bindForDraw(t,e,n){let r;return this.vertexArrayObject.bind(()=>{this._setConstantAttributes(t,e),r=n()}),r}_resolveLocationAndAccessor(t,e,n,i){const o={location:-1,accessor:null},{location:a,name:u}=this._getAttributeIndex(t);if(!Number.isFinite(a)||a<0)return this.unused[t]=e,r.Rm.once(3,()=>"unused value ".concat(t," in ").concat(this.id))(),o;const c=this._getAttributeInfo(u||a);if(!c)return o;const h=this.accessors[a]||{},A=l.A.resolve(c.accessor,h,n,i),{size:f,type:d}=A;return(0,s.v)(Number.isFinite(f)&&Number.isFinite(d)),{location:a,accessor:A}}_getAttributeInfo(t){return this.configuration&&this.configuration.getAttributeInfo(t)}_getAttributeIndex(t){const e=Number(t);if(Number.isFinite(e))return{location:e};const n=g.exec(t),r=n?n[1]:t,i=n?Number(n[2]):0;return this.configuration?{location:this.configuration.getAttributeLocation(r)+i,name:r}:{location:-1}}_setAttribute(t,e){if(e instanceof c.A)this.setBuffer(t,e);else if(Array.isArray(e)&&e.length&&e[0]instanceof c.A){const n=e[0],r=e[1];this.setBuffer(t,n,r)}else if(ArrayBuffer.isView(e)||Array.isArray(e)){const n=e;this.setConstant(t,n)}else{if(!(e.buffer instanceof c.A))throw new Error("VertexArray: attributes must be Buffers or constants (i.e. typed array)");{const n=e;this.setBuffer(t,n.buffer,n)}}}_setConstantAttributes(t,e){const n=Math.max(0|t,0|e);let r=this.values[0];ArrayBuffer.isView(r)&&this._setConstantAttributeZero(r,n);for(let t=1;t<this.vertexArrayObject.MAX_ATTRIBUTES;t++)r=this.values[t],ArrayBuffer.isView(r)&&this._setConstantAttribute(t,r)}_setConstantAttributeZero(t,e){if(d.isSupported(this.gl,{constantAttributeZero:!0}))return void this._setConstantAttribute(0,t);const n=this.vertexArrayObject.getConstantBuffer(e,t);
2this.vertexArrayObject.setBuffer(0,n,this.accessors[0])}_setConstantAttribute(t,e){d.setConstant(this.gl,t,e)}_updateDrawParams(){const t={isIndexed:!1,isInstanced:!1,indexCount:1/0,vertexCount:1/0,instanceCount:1/0};for(let e=0;e<this.vertexArrayObject.MAX_ATTRIBUTES;e++)this._updateDrawParamsForLocation(t,e);return this.elements&&(t.elementCount=this.elements.getElementCount(this.elements.accessor),t.isIndexed=!0,t.indexType=this.elementsAccessor.type||this.elements.accessor.type,t.indexOffset=this.elementsAccessor.offset||0),t.indexCount===1/0&&(t.indexCount=0),t.vertexCount===1/0&&(t.vertexCount=0),t.instanceCount===1/0&&(t.instanceCount=0),t}_updateDrawParamsForLocation(t,e){const n=this.values[e],r=this.accessors[e];if(!n)return;const{divisor:i}=r,o=i>0;if(t.isInstanced=t.isInstanced||o,n instanceof c.A){const e=n;if(o){const n=e.getVertexCount(r);t.instanceCount=Math.min(t.instanceCount,n)}else{const n=e.getVertexCount(r);t.vertexCount=Math.min(t.vertexCount,n)}}}setElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.Rm.deprecated("setElements","setElementBuffer")(),this.setElementBuffer(t,e)}}var v=n(72302),_=n(82073),b=n(70145);function w(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isInteger:n=!1}=e;if(Array.isArray(t)||ArrayBuffer.isView(t))return function(t,e){const{maxElts:n=16,size:r=1}=e;let i="[";for(let o=0;o<t.length&&o<n;++o)o>0&&(i+=",".concat(o%r===0?" ":"")),i+=w(t[o],e);const o=t.length>n?"...":"]";return"".concat(i).concat(o)}(t,e);if(!Number.isFinite(t))return String(t);if(Math.abs(t)<1e-16)return n?"0":"0.";if(n)return t.toFixed(0);if(Math.abs(t)>100&&Math.abs(t)<1e4)return t.toFixed(0);const r=t.toPrecision(2);return r.indexOf(".0")===r.length-2?r.slice(0,-1):r}function E(t,e,n,r){const{gl:i}=t;if(!e)return{[r]:"null","Format ":"N/A"};let o,s,a,u="NOT PROVIDED",l=1,h=0,A=0;if(n&&(u=n.type,l=n.size,u=String(u).replace("Array",""),o=-1!==u.indexOf("nt")),e instanceof c.A){const t=e,{data:c,changed:f}=t.getDebugData();let d;if(s=f?"*":"",a=c,A=t.byteLength,h=A/c.BYTES_PER_ELEMENT/l,n){const t=n.divisor>0;d="".concat(t?"I ":"P "," ").concat(h," (x").concat(l,"=").concat(A," bytes ").concat((0,_.i7)(i,u),")")}else o=!0,d="".concat(A," bytes");return{[r]:"".concat(s).concat(w(a,{size:l,isInteger:o})),"Format ":d}}return a=e,l=e.length,u=String(e.constructor.name).replace("Array",""),o=-1!==u.indexOf("nt"),{[r]:"".concat(w(a,{size:l,isInteger:o})," (constant)"),"Format ":"".concat(l,"x").concat(u," (constant)")}}function x(t,e){const{type:n,size:r}=e,i=(0,b.bF)(n,r);return i?"".concat(t," (").concat(i.name,")"):t}function S(t){let{header:e="Uniforms",program:n,uniforms:r,undefinedOnly:i=!1}=t;(0,s.v)(n);const o=".*Matrix",a=n._uniformSetters,u={},l=Object.keys(a).sort();let c=0;for(const t of l)t.match(".*_.*")||t.match(o)||T({table:u,header:e,uniforms:r,uniformName:t,undefinedOnly:i})&&c++;for(const t of l)t.match(o)&&T({table:u,header:e,uniforms:r,uniformName:t,undefinedOnly:i})&&c++;for(const t of l)u[t]||T({table:u,header:e,uniforms:r,uniformName:t,undefinedOnly:i})&&c++;let h=0;const A={};if(!i)for(const t in r){const n=r[t];u[t]||(h++,A[t]={Type:"NOT USED: ".concat(n),[e]:w(n)})}return{table:u,count:c,unusedTable:A,unusedCount:h}}function T(t){let{table:e,header:n,uniforms:r,uniformName:i,undefinedOnly:o}=t;const s=r[i],a=function(t){return null!=t}(s);return!(o&&a||(e[i]={[n]:a?w(s):"N/A","Uniform Type":a?s:"NOT PROVIDED"},0))}function P(t){const{type:e,size:n}=t.accessor,r=(0,b.bF)(e,n);return r?"".concat(r.name," ").concat(t.name):t.name}const C={POSITION:"positions",NORMAL:"normals",COLOR_0:"colors",TEXCOORD_0:"texCoords",TEXCOORD_1:"texCoords1",TEXCOORD_2:"texCoords2"};function M(t,e){const{attributeMap:n=C}=e||{};return n&&n[t]||t}function I(t,e){let n;switch(t){case"texCoords":case"texCoord1":case"texCoord2":case"texCoord3":n="uvs";break;case"vertices":case"positions":case"normals":case"pickingColors":n="vectors"}switch(n){case"vectors":e.size=e.size||3;break;case"uvs":e.size=e.size||2}(0,s.v)(Number.isFinite(e.size),"attribute ".concat(t," needs size"))}const O=()=>{},R={};class L{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{id:n=(0,o.Ld)("model")}=e;(0,s.v)((0,r.uF)(t)),this.id=n,this.gl=t,this.id=e.id||(0,o.Ld)("Model"),this.lastLogTime=0,this.animated=!1,this.initialize(e)}initialize(t){this.props={},this.programManager=t.programManager||i.A.getDefaultProgramManager(this.gl),this._programManagerState=-1,this._managedProgram=!1;const{program:e=null,vs:n,fs:r,modules:o,defines:a,inject:u,varyings:l,bufferMode:c,transpileToGLSL100:h}=t;this.programProps={program:e,vs:n,fs:r,modules:o,defines:a,inject:u,varyings:l,bufferMode:c,transpileToGLSL100:h},this.program=null,this.vertexArray=null,this._programDirty=!0,this.userData={},this.needsRedraw=!0,this._attributes={},this.attributes={},this.uniforms={},this.pickable=!0,this._checkProgram(),this.setUniforms(Object.assign({},this.getModuleUniforms(t.moduleSettings))),this.drawMode=void 0!==t.drawMode?t.drawMode:4,this.vertexCount=t.vertexCount||0,this.geometryBuffers={},this.isInstanced=t.isInstanced||t.instanced||t.instanceCount>0,this._setModelProps(t),this.geometry={},(0,s.v)(void 0!==this.drawMode&&Number.isFinite(this.vertexCount),"Model needs drawMode and vertexCount")}setProps(t){this._setModelProps(t)}delete(){for(const t in this._attributes)this._attributes[t]!==this.attributes[t]&&this._attributes[t].delete();this._managedProgram&&(this.programManager.release(this.program),this._managedProgram=!1),this.vertexArray.delete(),this._deleteGeometryBuffers()}getDrawMode(){return this.drawMode}getVertexCount(){return this.vertexCount}getInstanceCount(){return this.instanceCount}getAttributes(){return this.attributes}getProgram(){return this.program}setProgram(t){const{program:e,vs:n,fs:r,modules:i,defines:o,inject:s,varyings:a,bufferMode:u,transpileToGLSL100:l}=t;this.programProps={program:e,vs:n,fs:r,modules:i,defines:o,inject:s,varyings:a,bufferMode:u,transpileToGLSL100:l},this._programDirty=!0}getUniforms(){return this.uniforms}setDrawMode(t){return this.drawMode=t,this}setVertexCount(t){return(0,s.v)(Number.isFinite(t)),this.vertexCount=t,this}setInstanceCount(t){return(0,s.v)(Number.isFinite(t)),this.instanceCount=t,this}setGeometry(t){return this.drawMode=t.drawMode,this.vertexCount=t.getVertexCount(),this._deleteGeometryBuffers(),this.geometryBuffers=function(t,e){const n={};let r=e.indices;for(const i in e.attributes){const o=e.attributes[i],s=M(i,void 0);if("indices"===i)r=o;else if(o.constant)n[s]=o.value;else{const e=o.value,r={...o};delete r.value,n[s]=[new c.A(t,e),r],I(i,r)}}if(r){const e=r.value||r;(0,s.v)(e instanceof Uint16Array||e instanceof Uint32Array,'attribute array for "indices" must be of integer type');const i={size:1,isIndexed:void 0===r.isIndexed||r.isIndexed};n.indices=[new c.A(t,{data:e,target:34963}),i]}return n}(this.gl,t),this.vertexArray.setAttributes(this.geometryBuffers),this}setAttributes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,o.ZF)(t))return this;const e={};for(const n in t){const r=t[n];e[n]=r.getValue?r.getValue():r}return this.vertexArray.setAttributes(e),this}setUniforms(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(this.uniforms,t),this}getModuleUniforms(t){this._checkProgram();const e=this.programManager.getUniforms(this.program);return e?e(t):{}}updateModuleSettings(t){const e=this.getModuleUniforms(t||{});return this.setUniforms(e)}clear(t){return(0,a.I)(this.program.gl,t),this}draw(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._checkProgram();const{moduleSettings:e=null,framebuffer:n,uniforms:i={},attributes:o={},transformFeedback:s=this.transformFeedback,parameters:a={},vertexArray:u=this.vertexArray}=t;let l;this.setAttributes(o),this.updateModuleSettings(e),this.setUniforms(i),r.Rm.priority>=2&&(l=this._logDrawCallStart(2));const c=this.vertexArray.getDrawParams(),{isIndexed:h=c.isIndexed,indexType:A=c.indexType,indexOffset:f=c.indexOffset,vertexArrayInstanced:d=c.isInstanced}=this.props;d&&!this.isInstanced&&r.Rm.warn("Found instanced attributes on non-instanced model",this.id)();const{isInstanced:p,instanceCount:g}=this,{onBeforeRender:m=O,onAfterRender:y=O}=this.props;m(),this.program.setUniforms(this.uniforms);const v=this.program.draw(Object.assign(R,t,{logPriority:l,uniforms:null,framebuffer:n,parameters:a,drawMode:this.getDrawMode(),vertexCount:this.getVertexCount(),vertexArray:u,transformFeedback:s,isIndexed:h,indexType:A,isInstanced:p,instanceCount:g,offset:h?f:0}));return y(),r.Rm.priority>=2&&this._logDrawCallEnd(l,u,n),v}transform(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{discard:e=!0,feedbackBuffers:n,unbindModels:r=[]}=t;let{parameters:i}=t;n&&this._setFeedbackBuffers(n),e&&(i=Object.assign({},i,{35977:e})),r.forEach(t=>t.vertexArray.unbindBuffers());try{this.draw(Object.assign({},t,{parameters:i}))}finally{r.forEach(t=>t.vertexArray.bindBuffers())}return this}render(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.Rm.warn("Model.render() is deprecated. Use Model.setUniforms() and Model.draw()")(),this.setUniforms(t).draw()}_setModelProps(t){Object.assign(this.props,t),"uniforms"in t&&this.setUniforms(t.uniforms),"pickable"in t&&(this.pickable=t.pickable),"instanceCount"in t&&(this.instanceCount=t.instanceCount),"geometry"in t&&this.setGeometry(t.geometry),"attributes"in t&&this.setAttributes(t.attributes),"_feedbackBuffers"in t&&this._setFeedbackBuffers(t._feedbackBuffers)}_checkProgram(){if(!this._programDirty&&this.programManager.stateHash===this._programManagerState)return;let{program:t}=this.programProps;if(t)this._managedProgram=!1;else{const{vs:e,fs:n,modules:r,inject:i,defines:o,varyings:s,bufferMode:a,transpileToGLSL100:u}=this.programProps;t=this.programManager.get({vs:e,fs:n,modules:r,inject:i,defines:o,varyings:s,bufferMode:a,transpileToGLSL100:u}),this.program&&this._managedProgram&&this.programManager.release(this.program),this._programManagerState=this.programManager.stateHash,this._managedProgram=!0}(0,s.v)(t instanceof u.A,"Model needs a program"),this._programDirty=!1,t!==this.program&&(this.program=t,this.vertexArray?this.vertexArray.setProps({program:this.program,attributes:this.vertexArray.attributes}):this.vertexArray=new y(this.gl,{program:this.program}),this.setUniforms(Object.assign({},this.getModuleUniforms())))}_deleteGeometryBuffers(){for(const t in this.geometryBuffers){const e=this.geometryBuffers[t][0]||this.geometryBuffers[t];e instanceof c.A&&e.delete()}}_setAnimationProps(t){this.animated&&(0,s.v)(t,"Model.draw(): animated uniforms but no animationProps")}_setFeedbackBuffers(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,o.ZF)(t))return this;const{gl:e}=this.program;return this.transformFeedback=this.transformFeedback||new v.A(e,{program:this.program}),this.transformFeedback.setBuffers(t),this}_logDrawCallStart(t){const e=t>3?0:1e4;
2if(!(Date.now()-this.lastLogTime<e))return this.lastLogTime=Date.now(),r.Rm.group(2,">>> DRAWING MODEL ".concat(this.id),{collapsed:r.Rm.level<=2})(),t}_logDrawCallEnd(t,e,n,i){if(void 0===t)return;const o=function(t){let{vertexArray:e,header:n="Attributes"}=t;if(!e.configuration)return{};const r={};e.elements&&(r.ELEMENT_ARRAY_BUFFER=E(e,e.elements,null,n));const i=e.values;for(const t in i){const o=e._getAttributeInfo(t);if(o){let s="".concat(t,": ").concat(o.name);const a=e.accessors[o.location];a&&(s="".concat(t,": ").concat(x(o.name,a))),r[s]=E(e,i[t],a,n)}}return r}({vertexArray:e,header:"".concat(this.id," attributes"),attributes:this._attributes}),{table:s,unusedTable:a,unusedCount:u}=S({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n)}),{table:l,count:c}=S({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n),undefinedOnly:!0});c>0&&r.Rm.log("MISSING UNIFORMS",Object.keys(l))(),u>0&&r.Rm.log("UNUSED UNIFORMS",Object.keys(a))();const h=function(t){const e={},n="Accessors for ".concat(t.id);for(const r of t.attributeInfos)if(r){const t=P(r);e["in ".concat(t)]={[n]:JSON.stringify(r.accessor)}}for(const r of t.varyingInfos)if(r){const t=P(r);e["out ".concat(t)]={[n]:JSON.stringify(r.accessor)}}return e}(this.vertexArray.configuration);r.Rm.table(t,o)(),r.Rm.table(t,s)(),r.Rm.table(t+1,h)(),i&&i.log({logLevel:2,message:"Rendered to ".concat(i.id)}),r.Rm.groupEnd(2)()}}},25490:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(78345);function i(t,e={}){if(null!=t.bbox&&!0!==e.recompute)return t.bbox;const n=[1/0,1/0,-1/0,-1/0];return r.coordEach.call(void 0,t,t=>{n[0]>t[0]&&(n[0]=t[0]),n[1]>t[1]&&(n[1]=t[1]),n[2]<t[0]&&(n[2]=t[0]),n[3]<t[1]&&(n[3]=t[1])}),n}var o=i;e.bbox=i,e.default=o},26108:(t,e,n)=>{"use strict";var r=n(528),i=n(70686),o=n(17239)(),s=n(69336),a=n(3468),u=r("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||u(e)!==e)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,l=!0;if("length"in t&&s){var c=s(t,"length");c&&!c.configurable&&(r=!1),c&&!c.writable&&(l=!1)}return(r||l||!n)&&(o?i(t,"length",e,!0,!0):i(t,"length",e)),t}},26202:t=>{var e;e=class{isValid(t){var e;e=!0;try{return this.validate(t),e}catch(t){return!1}}validate(t){return this.checkContainsNoLetters(t),this.checkValidOrientation(t),this.checkNumbers(t)}checkContainsNoLetters(t){if(/(?![neswd])[a-z]/i.test(t))throw new Error("Coordinate contains invalid alphanumeric characters.")}checkValidOrientation(t){if(!/^[^nsew]*[ns]?[^nsew]*[ew]?[^nsew]*$/i.test(t))throw new Error("Invalid cardinal direction.")}checkNumbers(t){var e;return e=t.match(/-?\d+(\.\d+)?/g),this.checkAnyCoordinateNumbers(e),this.checkEvenCoordinateNumbers(e),this.checkMaximumCoordinateNumbers(e)}checkAnyCoordinateNumbers(t){if(0===t.length)throw new Error("Could not find any coordinate number")}checkEvenCoordinateNumbers(t){if(t.length%2)throw new Error("Uneven count of latitude/longitude numbers")}checkMaximumCoordinateNumbers(t){if(t.length>6)throw new Error("Too many coordinate numbers")}},t.exports=e},26867:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getClosestPointOnLine=i,e.getClosestPointOnPolyline=function(t){var e=t.p,n=t.points;e=new r.Vector3(e);for(var o=null,s=1/0,a=-1,u=0;u<n.length-1;++u){var l=i({p:e,p1:n[u],p2:n[u+1]}),c=e.distanceSquared(l);c<s&&(s=c,o=l,a=u)}return{point:o,index:a,p1:n[a],p2:n[a+1],distanceSquared:s,distance:Math.sqrt(s)}};var r=n(4572);function i(t){var e=t.p,n=t.p1,i=t.p2,o=t.clampToLine,s=void 0===o||o,a=new r.Vector3(i).subtract(n),u=new r.Vector3(e).subtract(n),l=a.dot(u);return s&&(l=(0,r.clamp)(l,0,1)),a.lerp(l)}},26909:(t,e,n)=>{"use strict";n.d(e,{Gv:()=>i,H1:()=>h,Pe:()=>c,Sv:()=>u,Td:()=>a,aC:()=>o,qf:()=>l,xZ:()=>s});const r=t=>"function"==typeof t,i=t=>null!==t&&"object"==typeof t,o=t=>i(t)&&t.constructor==={}.constructor,s=t=>t&&"function"==typeof t[Symbol.iterator],a=t=>t&&"function"==typeof t[Symbol.asyncIterator],u=t=>"undefined"!=typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json,l=t=>"undefined"!=typeof Blob&&t instanceof Blob,c=t=>t&&"object"==typeof t&&t.isBuffer,h=t=>(t=>"undefined"!=typeof ReadableStream&&t instanceof ReadableStream||i(t)&&r(t.tee)&&r(t.cancel)&&r(t.getReader))(t)||(t=>i(t)&&r(t.read)&&r(t.pipe)&&(t=>"boolean"==typeof t)(t.readable))(t)},27209:(t,e,n)=>{"use strict";n.d(e,{q:()=>i});const r={pickingSelectedColor:null,pickingHighlightColor:new Uint8Array([0,255,255,255]),pickingActive:!1,pickingAttribute:!1},i={name:"picking",vs:"uniform bool picking_uActive;\nuniform bool picking_uAttribute;\nuniform vec3 picking_uSelectedColor;\nuniform bool picking_uSelectedColorValid;
2\n\nout vec4 picking_vRGBcolor_Avalid;\n\nconst float COLOR_SCALE = 1. / 255.;\n\nbool picking_isColorValid(vec3 color) {\n return dot(color, vec3(1.0)) > 0.001;\n}\n\nbool isVertexPicked(vec3 vertexColor) {\n return\n picking_uSelectedColorValid &&\n !picking_isColorValid(abs(vertexColor - picking_uSelectedColor));\n}\n\nvoid picking_setPickingColor(vec3 pickingColor) {\n if (picking_uActive) {\n picking_vRGBcolor_Avalid.a = float(picking_isColorValid(pickingColor));\n\n if (!picking_uAttribute) {\n picking_vRGBcolor_Avalid.rgb = pickingColor * COLOR_SCALE;\n }\n } else {\n picking_vRGBcolor_Avalid.a = float(isVertexPicked(pickingColor));\n }\n}\n\nvoid picking_setPickingAttribute(float value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.r = value;\n }\n}\nvoid picking_setPickingAttribute(vec2 value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.rg = value;\n }\n}\nvoid picking_setPickingAttribute(vec3 value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.rgb = value;\n }\n}\n",fs:"uniform bool picking_uActive;\nuniform vec3 picking_uSelectedColor;\nuniform vec4 picking_uHighlightColor;\n\nin vec4 picking_vRGBcolor_Avalid;\nvec4 picking_filterHighlightColor(vec4 color) {\n if (picking_uActive) {\n return color;\n }\n bool selected = bool(picking_vRGBcolor_Avalid.a);\n\n if (selected) {\n float highLightAlpha = picking_uHighlightColor.a;\n float blendedAlpha = highLightAlpha + color.a * (1.0 - highLightAlpha);\n float highLightRatio = highLightAlpha / blendedAlpha;\n\n vec3 blendedRGB = mix(color.rgb, picking_uHighlightColor.rgb, highLightRatio);\n return vec4(blendedRGB, blendedAlpha);\n } else {\n return color;\n }\n}\nvec4 picking_filterPickingColor(vec4 color) {\n if (picking_uActive) {\n if (picking_vRGBcolor_Avalid.a == 0.0) {\n discard;\n }\n return picking_vRGBcolor_Avalid;\n }\n return color;\n}\nvec4 picking_filterColor(vec4 color) {\n vec4 highightColor = picking_filterHighlightColor(color);\n return picking_filterPickingColor(highightColor);\n}\n\n",getUniforms:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;const e={};if(void 0!==t.pickingSelectedColor)if(t.pickingSelectedColor){const n=t.pickingSelectedColor.slice(0,3);e.picking_uSelectedColorValid=1,e.picking_uSelectedColor=n}else e.picking_uSelectedColorValid=0;if(t.pickingHighlightColor){const n=Array.from(t.pickingHighlightColor,t=>t/255);Number.isFinite(n[3])||(n[3]=1),e.picking_uHighlightColor=n}return void 0!==t.pickingActive&&(e.picking_uActive=Boolean(t.pickingActive),e.picking_uAttribute=Boolean(t.pickingAttribute)),e}}},27300:(t,e,n)=>{"use strict";var r=n(14607)("ArrayBuffer.prototype.byteLength",!0),i=n(56227);t.exports=function(t){return i(t)?r?r(t):t.byteLength:NaN}},27368:(t,e,n)=>{"use strict";var r=n(41857),i=n(28498),o=n(25164),s=n(23225),a=n(34583),u=i.apply(s()),l=function(t,e){return u(Object,arguments)};r(l,{getPolyfill:s,implementation:o,shim:a}),t.exports=l},27371:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r={name:"project32",dependencies:[n(85679).A],vs:"\nvec4 project_position_to_clipspace(\n vec3 position, vec3 position64Low, vec3 offset, out vec4 commonPosition\n) {\n vec3 projectedPosition = project_position(position, position64Low);\n mat3 rotation;\n if (project_needs_rotation(projectedPosition, rotation)) {\n // offset is specified as ENU\n // when in globe projection, rotate offset so that the ground alighs with the surface of the globe\n offset = rotation * offset;\n }\n commonPosition = vec4(projectedPosition + offset, 1.0);\n return project_common_position_to_clipspace(commonPosition);\n}\n\nvec4 project_position_to_clipspace(\n vec3 position, vec3 position64Low, vec3 offset\n) {\n vec4 commonPosition;\n return project_position_to_clipspace(position, position64Low, offset, commonPosition);\n}\n"}},28310:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TransformMode=void 0;var r=n(89595),i=n(15348),o=n(80456),s=n(33913);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=A(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},h(t,e,n||t)}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(g,t);var e,n,d,p=(d=g,function(){var t,e=A(d);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=A(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function g(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),p.call(this,[new i.TranslateMode,new o.ScaleMode,new s.RotateMode])}return e=g,n=[{key:"handlePointerMove",value:function(t,e){var n=null;h(A(g.prototype),"handlePointerMove",this).call(this,t,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
2e%2?u(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e,{onUpdateCursor:function(t){n=t||n}})),e.onUpdateCursor(n)}},{key:"handleStartDragging",value:function(t,e){var n=null,r=null,s=[];this._modes.forEach(function(t){t instanceof i.TranslateMode?r=t:(t instanceof o.ScaleMode&&(n=t),s.push(t))}),n instanceof o.ScaleMode&&!n.isEditHandleSelected()&&s.push(r),s.filter(Boolean).forEach(function(n){return n.handleStartDragging(t,e)})}},{key:"getGuides",value:function(t){var e=h(A(g.prototype),"getGuides",this).call(this,t),n=(this._modes||[]).find(function(t){return t instanceof s.RotateMode});if(n instanceof s.RotateMode){var i=e.features.filter(function(t){var e=t.properties||{},r=e.editHandleType,i=[e.mode];return n.getIsRotating()&&i.push(r),!i.includes("scale")});e=(0,r.featureCollection)(i)}return e}}],n&&c(e.prototype,n),g}(n(68367).CompositeMode);e.TransformMode=d},28498:(t,e,n)=>{"use strict";var r=n(26108),i=n(64940),o=n(79903),s=n(62012);t.exports=function(t){var e=o(arguments),n=1+t.length-(arguments.length-1);return r(e,n>0?n:0,!0)},i?i(t.exports,"apply",{value:s}):t.exports.apply=s},28747:(t,e,n)=>{"use strict";n.d(e,{Bd:()=>o,Fr:()=>a,Sf:()=>i,xD:()=>s});const r={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==n.g&&n.g,document:"undefined"!=typeof document&&document},i=r.global||r.self||r.window||{},o="object"!=typeof process||"[object process]"!==String(process)||process.browser,s="function"==typeof importScripts,a="undefined"!=typeof window&&void 0!==window.orientation,u="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);u&&parseFloat(u[1])},29063:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(24586),i=n(34081),o=n(463);class s{constructor(t){(0,r.A)(this,"_propsToCompare",void 0),(0,r.A)(this,"_propsToExtract",void 0),(0,r.A)(this,"_requiredProps",void 0);const{compare:e,extract:n,required:i}=t;this._propsToCompare=e,this._propsToExtract=n||e,this._requiredProps=i}arePropsEqual(t,e){for(const n of this._propsToCompare)if(!(n in t)||!(n in e)||!(0,i.aI)(t[n],e[n]))return!1;return!0}initializeProps(t,e){const n={},r={};for(const i of this._propsToExtract)(i in t||i in e)&&(n[i]=t[i],r[i]=e[i]);return this._checkRequiredProps(n),this._checkRequiredProps(r),{start:n,end:r}}getDuration(t,e){return e.transitionDuration}_checkRequiredProps(t){this._requiredProps&&this._requiredProps.forEach(e=>{const n=t[e];(0,o.A)(Number.isFinite(n)||Array.isArray(n),"".concat(e," is required for transition"))})}}},29423:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},29465:(t,e,n)=>{"use strict";n.d(e,{S3:()=>f,aF:()=>A,rA:()=>h,v7:()=>c});var r=n(932);const i=["SCALAR","VEC2","VEC3","VEC4"],o=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],s=new Map(o),a={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},u={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},l={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function c(t){return i[t-1]||i[0]}function h(t){const e=s.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function A(t,e){const n=l[t.componentType],i=a[t.type],o=u[t.componentType],s=t.count*i,c=t.count*i*o;return(0,r.v)(c>=0&&c<=e.byteLength),{ArrayType:n,length:s,byteLength:c}}function f(t){let{images:e,bufferViews:n}=t;e=e||[],n=n||[];const r=e.map(t=>t.bufferView);n=n.filter(t=>!r.includes(t));const i=n.reduce((t,e)=>t+e.byteLength,0),o=e.reduce((t,e)=>{const{width:n,height:r}=e.image;return t+n*r},0);return i+Math.ceil(4*o*1.33)}},29955:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawRectangleFromCenterMode=void 0;var r,i=(r=n(43788))&&r.__esModule?r:{default:r};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(c,t);var e,n,r,l=(r=c,function(){var t,e=a(r);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),l.apply(this,arguments)}return e=c,(n=[{key:"getTwoClickPolygon",value:function(t,e,n){var r=t[0]>e[0]?t[0]+Math.abs(t[0]-e[0]):t[0]-Math.abs(t[0]-e[0]),o=t[1]>e[1]?t[1]+Math.abs(t[1]-e[1]):t[1]-Math.abs(t[1]-e[1]),s=(0,i.default)([r,o,e[0],e[1]]);return s.properties=s.properties||{},s.properties.shape="Rectangle",s}}])&&s(e.prototype,n),c}(n(42166).TwoClickPolygonMode);e.DrawRectangleFromCenterMode=l},30258:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(57414);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){A(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function a(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function A(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f=["anyclick","pointermove","panstart","panmove","panend","keyup"],d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(u,t);var e,n,r,o=(r=u,function(){var t,e=c(r);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=c(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),o.apply(this,arguments)}return e=u,(n=[{key:"onLayerClick",value:function(t){}},{key:"onStartDragging",value:function(t){}},{key:"onStopDragging",value:function(t){}},{key:"onDragging",value:function(t){}},{key:"onPointerMove",value:function(t){}},{key:"onLayerKeyUp",value:function(t){}},{key:"initializeState",value:function(){this.setState({_editableLayerState:{pointerDownPicks:null,pointerDownScreenCoords:null,pointerDownMapCoords:null,eventHandler:this._forwardEventToCurrentLayer.bind(this)}}),this._addEventHandlers()}},{key:"finalizeState",value:function(){this._removeEventHandlers()}},{key:"_addEventHandlers",value:function(){var t,e=this.context.deck.eventManager,n=this.state._editableLayerState.eventHandler,r=a(f);try{for(r.s();!(t=r.n()).done;){var i=t.value;e.on(i,n,{priority:100})}}catch(t){r.e(t)}finally{r.f()}}},{key:"_removeEventHandlers",value:function(){var t,e=this.context.deck.eventManager,n=this.state._editableLayerState.eventHandler,r=a(f);try{for(r.s();!(t=r.n()).done;){var i=t.value;e.off(i,n)}}catch(t){r.e(t)}finally{r.f()}}},{key:"_forwardEventToCurrentLayer",value:function(t){var e=this.getCurrentLayer(),n=e["_on".concat(t.type)].bind(e);n?n(t):console.warn("no handler for mjolnir.js event ".concat(t.type))}},{key:"_onanyclick",value:function(t){var e=t.srcEvent,n=this.getScreenCoords(e),r=this.getMapCoords(n),i=this.getPicks(n);this.onLayerClick({mapCoords:r,screenCoords:n,picks:i,sourceEvent:e})}},{key:"_onkeyup",value:function(t){var e=t.srcEvent;this.onLayerKeyUp(e)}},{key:"_onpanstart",value:function(t){var e=this.getScreenCoords(t.srcEvent),n=this.getMapCoords(e),r=this.getPicks(e);this.setState({_editableLayerState:s({},this.state._editableLayerState,{pointerDownScreenCoords:e,pointerDownMapCoords:n,pointerDownPicks:r})}),this.onStartDragging({picks:r,screenCoords:e,mapCoords:n,pointerDownScreenCoords:e,pointerDownMapCoords:n,cancelPan:t.stopImmediatePropagation,sourceEvent:t.srcEvent})}},{key:"_onpanmove",value:function(t){var e=t.srcEvent,n=this.getScreenCoords(e),r=this.getMapCoords(n),i=this.state._editableLayerState,o=i.pointerDownPicks,s=i.pointerDownScreenCoords,a=i.pointerDownMapCoords,u=this.getPicks(n);this.onDragging({screenCoords:n,mapCoords:r,picks:u,pointerDownPicks:o,pointerDownScreenCoords:s,pointerDownMapCoords:a,sourceEvent:e,cancelPan:t.stopImmediatePropagation})}},{key:"_onpanend",value:function(t){var e=t.srcEvent,n=this.getScreenCoords(e),r=this.getMapCoords(n),i=this.state._editableLayerState,o=i.pointerDownPicks,a=i.pointerDownScreenCoords,u=i.pointerDownMapCoords,l=this.getPicks(n);this.onStopDragging({picks:l,screenCoords:n,mapCoords:r,pointerDownPicks:o,pointerDownScreenCoords:a,pointerDownMapCoords:u,sourceEvent:e}),this.setState({_editableLayerState:s({},this.state._editableLayerState,{pointerDownScreenCoords:null,pointerDownMapCoords:null,pointerDownPicks:null})})}},{key:"_onpointermove",value:function(t){var e=t.srcEvent,n=this.getScreenCoords(e),r=this.getMapCoords(n),i=this.state._editableLayerState,o=i.pointerDownPicks,s=i.pointerDownScreenCoords,a=i.pointerDownMapCoords,u=this.getPicks(n);this.onPointerMove({screenCoords:n,mapCoords:r,picks:u,pointerDownPicks:o,pointerDownScreenCoords:s,pointerDownMapCoords:a,sourceEvent:e})}},{key:"getPicks",value:function(t){return this.context.deck.pickMultipleObjects({x:t[0],y:t[1],layerIds:[this.props.id],radius:this.props.pickingRadius,depth:this.props.pickingDepth})}},{key:"getScreenCoords",value:function(t){return[t.clientX-this.context.gl.canvas.getBoundingClientRect().left,t.clientY-this.context.gl.canvas.getBoundingClientRect().top]}},{key:"getMapCoords",value:function(t){return this.context.viewport.unproject([t[0],t[1]])}}])&&l(e.prototype,n),u}(r.CompositeLayer);e.default=d,A(d,"layerName","EditableLayer")},30521:(t,e)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},31185:(t,e,n)=>{"use strict";n.d(e,{H:()=>s,Ij:()=>a,Xj:()=>o,jX:()=>i});const r="Failed to deduce GL constant from typed array";function i(t){switch(ArrayBuffer.isView(t)?t.constructor:t){case Float32Array:return 5126;case Uint16Array:return 5123;case Uint32Array:return 5125;case Uint8Array:case Uint8ClampedArray:return 5121;case Int8Array:return 5120;case Int16Array:return 5122;case Int32Array:return 5124;default:throw new Error(r)}}function o(t){let{clamped:e=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t){case 5126:return Float32Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return e?Uint8ClampedArray:Uint8Array;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;default:throw new Error("Failed to deduce typed array type from GL constant")}}function s(t){let{data:e,width:n,height:r,bytesPerPixel:i=4,temp:o}=t;const s=n*i;o=o||new Uint8Array(s);for(let t=0;t<r/2;++t){const n=t*s,i=(r-t-1)*s;o.set(e.subarray(n,n+s)),e.copyWithin(n,i,i+s),e.set(o,i)}}function a(t){let{data:e,width:n,height:r}=t;const i=Math.round(n/2),o=Math.round(r/2),s=new Uint8Array(i*o*4);for(let t=0;t<o;t++)for(let r=0;r<i;r++)for(let o=0;o<4;o++)s[4*(t*i+r)+o]=e[4*(2*t*n+2*r)+o];return{data:s,width:i,height:o}}},31189:(t,e,n)=>{"use strict";var r=n(14607)("SharedArrayBuffer.prototype.byteLength",!0);t.exports=r?function(t){if(!t||"object"!=typeof t)return!1;try{return r(t),!0}catch(t){return!1}}:function(t){return!1}},31323:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}
2){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invali
2d");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},31750:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(10672);function i(t,e,n,i){return{type:r.zH.FEATURE,properties:{meta:r.mI.VERTEX,parent:t,coord_path:n,active:i?r.l4.ACTIVE:r.l4.INACTIVE},geometry:{type:r.zH.POINT,coordinates:e}}}},31870:(t,e,n)=>{"use strict";n.d(e,{A:()=>_});var r=n(24586),i=n(99608),o=n(27371),s=n(79669),a=n(10707),u=n(93314),l=n(44454),c=n(10836),h=n(46429),A=n(25330),f=n(23615),d=n(67069),p=n(2592),g=n(24448);class m extends d.A{constructor(t){const{id:e=(0,p.Ld)("column-geometry")}=t,{indices:n,attributes:r}=function(t){const{radius:e,height:n=1,nradial:r=10}=t;let{vertices:i}=t;i&&(f.A.assert(i.length>=r),i=i.flatMap(t=>[t[0],t[1]]),(0,g.UD)(i,g.rJ.COUNTER_CLOCKWISE));const o=n>0,s=r+1,a=o?3*s+1:r,u=2*Math.PI/r,l=new Uint16Array(o?3*r*2:0),c=new Float32Array(3*a),h=new Float32Array(3*a);let A=0;if(o){for(let t=0;t<s;t++){const o=t*u,s=t%r,a=Math.sin(o),l=Math.cos(o);for(let t=0;t<2;t++)c[A+0]=i?i[2*s]:l*e,c[A+1]=i?i[2*s+1]:a*e,c[A+2]=(.5-t)*n,h[A+0]=i?i[2*s]:l,h[A+1]=i?i[2*s+1]:a,A+=3}c[A+0]=c[A-3],c[A+1]=c[A-2],c[A+2]=c[A-1],A+=3}for(let t=o?0:1;t<s;t++){const o=Math.floor(t/2)*Math.sign(.5-t%2),s=o*u,a=(o+r)%r,l=Math.sin(s),f=Math.cos(s);c[A+0]=i?i[2*a]:f*e,c[A+1]=i?i[2*a+1]:l*e,c[A+2]=n/2,h[A+2]=1,A+=3}if(o){let t=0;for(let e=0;e<r;e++)l[t++]=2*e+0,l[t++]=2*e+2,l[t++]=2*e+0,l[t++]=2*e+1,l[t++]=2*e+1,l[t++]=2*e+3}return{indices:l,attributes:{POSITION:{size:3,value:c},NORMAL:{size:3,value:h}}}}(t);super({...t,id:e,indices:n,attributes:r})}}const y=[0,0,0,255],v={diskResolution:{type:"number",min:4,value:20},vertices:null,radius:{type:"number",min:0,value:1e3},angle:{type:"number",value:0},offset:{type:"array",value:[0,0]},coverage:{type:"number",min:0,max:1,value:1},elevationScale:{type:"number",min:0,value:1},radiusUnits:"meters",lineWidthUnits:"meters",lineWidthScale:1,lineWidthMinPixels:0,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,extruded:!0,wireframe:!1,filled:!0,stroked:!1,getPosition:{type:"accessor",value:t=>t.position},getFillColor:{type:"accessor",value:y},getLineColor:{type:"accessor",value:y},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0,getColor:{deprecatedFor:["getFillColor","getLineColor"]}};class _ extends i.A{getShaders(){const{gl:t}=this.context,e=!(0,l.C6)(t),n={},r=this.props.flatShading&&(0,c.jI)(t,h.G.GLSL_DERIVATIVES);return r&&(n.FLAT_SHADING=1),super.getShaders({vs:"#version 300 es\n\n#define SHADER_NAME column-layer-vertex-shader\n\nin vec3 positions;\nin vec3 normals;\n\nin vec3 instancePositions;\nin float instanceElevations;\nin vec3 instancePositions64Low;\nin vec4 instanceFillColors;\nin vec4 instanceLineColors;\nin float instanceStrokeWidths;\n\nin vec3 instancePickingColors;\nuniform float opacity;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform bool extruded;\nuniform bool stroked;\nuniform bool isStroke;\nuniform float coverage;\nuniform float elevationScale;\nuniform float edgeDistance;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform int radiusUnits;\nuniform int widthUnits;\nout vec4 vColor;\n#ifdef FLAT_SHADING\nout vec4 position_commonspace;\n#endif\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n\n vec4 color = isStroke ? instanceLineColors : instanceFillColors;\n mat2 rotationMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n float elevation = 0.0;\n float strokeOffsetRatio = 1.0;\n\n if (extruded) {\n elevation = instanceElevations * (positions.z + 1.0) / 2.0 * elevationScale;\n } else if (stroked) {\n float widthPixels = clamp(\n project_size_to_pixel(instanceStrokeWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels) / 2.0;\n float halfOffset = project_pixel_size(widthPixels) / project_size(edgeDistance * coverage * radius);\n if (isStroke) {\n strokeOffsetRatio -= sign(positions.z) * halfOffset;\n } else {\n strokeOffsetRatio -= halfOffset;\n }\n }\n float shouldRender = float(color.a > 0.0 && instanceElevations >= 0.0);
2\n float dotRadius = radius * coverage * shouldRender;\n\n geometry.pickingColor = instancePickingColors;\n vec3 centroidPosition = vec3(instancePositions.xy, instancePositions.z + elevation);\n vec3 centroidPosition64Low = instancePositions64Low;\n vec2 offset = (rotationMatrix * positions.xy * strokeOffsetRatio + offset) * dotRadius;\n if (radiusUnits == UNIT_METERS) {\n offset = project_size(offset);\n }\n vec3 pos = vec3(offset, 0.);\n DECKGL_FILTER_SIZE(pos, geometry);\n\n gl_Position = project_position_to_clipspace(centroidPosition, centroidPosition64Low, pos, geometry.position);\n geometry.normal = project_normal(vec3(rotationMatrix * normals.xy, normals.z));\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n if (extruded && !isStroke) {\n#ifdef FLAT_SHADING\n position_commonspace = geometry.position;\n vColor = vec4(color.rgb, color.a * opacity);\n#else\n vec3 lightColor = lighting_getLightColor(color.rgb, project_uCameraPosition, geometry.position.xyz, geometry.normal);\n vColor = vec4(lightColor, color.a * opacity);\n#endif\n } else {\n vColor = vec4(color.rgb, color.a * opacity);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n#define SHADER_NAME column-layer-fragment-shader\n\nprecision highp float;\n\nuniform vec3 project_uCameraPosition;\nuniform bool extruded;\nuniform bool isStroke;\n\nout vec4 fragColor;\n\nin vec4 vColor;\n#ifdef FLAT_SHADING\nin vec4 position_commonspace;\n#endif\n\nvoid main(void) {\n fragColor = vColor;\n#ifdef FLAT_SHADING\n if (extruded && !isStroke && !picking_uActive) {\n vec3 normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n fragColor.rgb = lighting_getLightColor(vColor.rgb, project_uCameraPosition, position_commonspace.xyz, normal);\n }\n#endif\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n",defines:n,transpileToGLSL100:e,modules:[o.A,r?s.p:s.K,a.A]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceElevations:{size:1,transition:!0,accessor:"getElevation"},instanceFillColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getFillColor",defaultValue:y},instanceLineColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getLineColor",defaultValue:y},instanceStrokeWidths:{size:1,accessor:"getLineWidth",transition:!0}})}updateState(t){super.updateState(t);const{props:e,oldProps:n,changeFlags:r}=t,i=r.extensionsChanged||e.flatShading!==n.flatShading;if(i){var o;const{gl:t}=this.context;null===(o=this.state.model)||void 0===o||o.delete(),this.state.model=this._getModel(t),this.getAttributeManager().invalidateAll()}(i||e.diskResolution!==n.diskResolution||e.vertices!==n.vertices||(e.extruded||e.stroked)!==(n.extruded||n.stroked))&&this._updateGeometry(e)}getGeometry(t,e,n){const r=new m({radius:1,height:n?2:0,vertices:e,nradial:t});let i=0;if(e)for(let n=0;n<t;n++){const r=e[n];i+=Math.sqrt(r[0]*r[0]+r[1]*r[1])/t}else i=1;return this.setState({edgeDistance:Math.cos(Math.PI/t)*i}),r}_getModel(t){return new A.A(t,{...this.getShaders(),id:this.props.id,isInstanced:!0})}_updateGeometry({diskResolution:t,vertices:e,extruded:n,stroked:r}){const i=this.getGeometry(t,e,n||r);this.setState({fillVertexCount:i.attributes.POSITION.value.length/3,wireframeVertexCount:i.indices.value.length}),this.state.model.setProps({geometry:i})}draw({uniforms:t}){const{lineWidthUnits:e,lineWidthScale:n,lineWidthMinPixels:r,lineWidthMaxPixels:i,radiusUnits:o,elevationScale:s,extruded:a,filled:l,stroked:c,wireframe:h,offset:A,coverage:f,radius:d,angle:p}=this.props,{model:g,fillVertexCount:m,wireframeVertexCount:y,edgeDistance:v}=this.state;g.setUniforms(t).setUniforms({radius:d,angle:p/180*Math.PI,offset:A,extruded:a,stroked:c,coverage:f,elevationScale:s,edgeDistance:v,radiusUnits:u.p5[o],widthUnits:u.p5[e],widthScale:n,widthMinPixels:r,widthMaxPixels:i}),a&&h&&(g.setProps({isIndexed:!0}),g.setVertexCount(y).setDrawMode(1).setUniforms({isStroke:!0}).draw()),l&&(g.setProps({isIndexed:!1}
2),g.setVertexCount(m).setDrawMode(5).setUniforms({isStroke:!1}).draw()),!a&&c&&(g.setProps({isIndexed:!1}),g.setVertexCount(2*m/3).setDrawMode(5).setUniforms({isStroke:!0}).draw())}}(0,r.A)(_,"layerName","ColumnLayer"),(0,r.A)(_,"defaultProps",v)},31938:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(24586),i=n(22398);class o{static get componentName(){return Object.prototype.hasOwnProperty.call(this,"extensionName")?this.extensionName:""}constructor(t){(0,r.A)(this,"opts",void 0),t&&(this.opts=t)}equals(t){return this===t||this.constructor===t.constructor&&(0,i.b)(this.opts,t.opts,1)}getShaders(t){return null}getSubLayerProps(t){const{defaultProps:e}=t.constructor,n={updateTriggers:{}};for(const t in e)if(t in this.props){const r=e[t],i=this.props[t];n[t]=i,r&&"accessor"===r.type&&(n.updateTriggers[t]=this.props.updateTriggers[t],"function"==typeof i&&(n[t]=this.getSubLayerAccessor(i)))}return n}initializeState(t,e){}updateState(t,e){}onNeedsRedraw(t){}getNeedsPickingBuffer(t){return!1}draw(t,e){}finalizeState(t,e){}}(0,r.A)(o,"defaultProps",{}),(0,r.A)(o,"extensionName","LayerExtension")},32132:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.defineProperty,i=n(11866),o=n(89595);function s(t,e,n={}){const r=n.steps||64,s=n.properties?n.properties:!Array.isArray(t)&&"Feature"===t.type&&t.properties?t.properties:{},a=[];for(let o=0;o<r;o++)a.push(i.destination.call(void 0,t,e,-360*o/r,n).geometry.coordinates);return a.push(a[0]),o.polygon.call(void 0,[a],s)}r(s,"name",{value:"circle",configurable:!0});var a=s;e.circle=s,e.default=a},32268:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},32411:(t,e,n)=>{"use strict";n.d(e,{R:()=>r});const r={name:"pbr",vs:"uniform mat4 u_MVPMatrix;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_NormalMatrix;\n\nvarying vec3 pbr_vPosition;\nvarying vec2 pbr_vUV;\n\n#ifdef HAS_NORMALS\n# ifdef HAS_TANGENTS\nvarying mat3 pbr_vTBN;\n# else\nvarying vec3 pbr_vNormal;\n# endif\n#endif\n\nvoid pbr_setPositionNormalTangentUV(vec4 position, vec4 normal, vec4 tangent, vec2 uv)\n{\n vec4 pos = u_ModelMatrix * position;\n pbr_vPosition = vec3(pos.xyz) / pos.w;\n\n#ifdef HAS_NORMALS\n#ifdef HAS_TANGENTS\n vec3 normalW = normalize(vec3(u_NormalMatrix * vec4(normal.xyz, 0.0)));\n vec3 tangentW = normalize(vec3(u_ModelMatrix * vec4(tangent.xyz, 0.0)));\n vec3 bitangentW = cross(normalW, tangentW) * tangent.w;\n pbr_vTBN = mat3(tangentW, bitangentW, normalW);\n#else\n pbr_vNormal = normalize(vec3(u_ModelMatrix * vec4(normal.xyz, 0.0)));\n#endif\n#endif\n\n#ifdef HAS_UV\n pbr_vUV = uv;\n#else\n pbr_vUV = vec2(0.,0.);\n#endif\n}\n",fs:"#if defined(USE_TEX_LOD) && !defined(FEATURE_GLSL_TEXTURE_LOD)\n# error PBR fragment shader: Texture LOD is not available\n#endif\n\n#if !defined(HAS_TANGENTS) && !defined(FEATURE_GLSL_DERIVATIVES)\n# error PBR fragment shader: Derivatives are not available\n#endif\n\n\n#if (__VERSION__ < 300)\n #define SMART_FOR(INIT, WEBGL1COND, WEBGL2COND, INCR) for (INIT; WEBGL1COND; INCR)\n#else\n #define SMART_FOR(INIT, WEBGL1COND, WEBGL2COND, INCR) for (INIT; WEBGL2COND; INCR)\n#endif\n\nprecision highp float;\n\nuniform bool pbr_uUnlit;\n\n#ifdef USE_IBL\nuniform samplerCube u_DiffuseEnvSampler;\nuniform samplerCube u_SpecularEnvSampler;\nuniform sampler2D u_brdfLUT;\nuniform vec2 u_ScaleIBLAmbient;\n#endif\n\n#ifdef HAS_BASECOLORMAP\nuniform sampler2D u_BaseColorSampler;\n#endif\n#ifdef HAS_NORMALMAP\nuniform sampler2D u_NormalSampler;\nuniform float u_NormalScale;\n#endif\n#ifdef HAS_EMISSIVEMAP\nuniform sampler2D u_EmissiveSampler;\nuniform vec3 u_EmissiveFactor;
2\n#endif\n#ifdef HAS_METALROUGHNESSMAP\nuniform sampler2D u_MetallicRoughnessSampler;\n#endif\n#ifdef HAS_OCCLUSIONMAP\nuniform sampler2D u_OcclusionSampler;\nuniform float u_OcclusionStrength;\n#endif\n\n#ifdef ALPHA_CUTOFF\nuniform float u_AlphaCutoff;\n#endif\n\nuniform vec2 u_MetallicRoughnessValues;\nuniform vec4 u_BaseColorFactor;\n\nuniform vec3 u_Camera;\n#ifdef PBR_DEBUG\nuniform vec4 u_ScaleDiffBaseMR;\nuniform vec4 u_ScaleFGDSpec;\n#endif\n\nvarying vec3 pbr_vPosition;\n\nvarying vec2 pbr_vUV;\n\n#ifdef HAS_NORMALS\n#ifdef HAS_TANGENTS\nvarying mat3 pbr_vTBN;\n#else\nvarying vec3 pbr_vNormal;\n#endif\n#endif\n\n\nstruct PBRInfo\n{\n float NdotL;\n float NdotV;\n float NdotH;\n float LdotH;\n float VdotH;\n float perceptualRoughness;\n float metalness;\n vec3 reflectance0;\n vec3 reflectance90;\n float alphaRoughness;\n vec3 diffuseColor;\n vec3 specularColor;\n vec3 n;\n vec3 v;\n};\n\nconst float M_PI = 3.141592653589793;\nconst float c_MinRoughness = 0.04;\n\nvec4 SRGBtoLINEAR(vec4 srgbIn)\n{\n#ifdef MANUAL_SRGB\n#ifdef SRGB_FAST_APPROXIMATION\n vec3 linOut = pow(srgbIn.xyz,vec3(2.2));\n#else\n vec3 bLess = step(vec3(0.04045),srgbIn.xyz);\n vec3 linOut = mix( srgbIn.xyz/vec3(12.92), pow((srgbIn.xyz+vec3(0.055))/vec3(1.055),vec3(2.4)), bLess );\n#endif\n return vec4(linOut,srgbIn.w);;\n#else\n return srgbIn;\n#endif\n}\n\nvec3 getNormal()\n{\n#ifndef HAS_TANGENTS\n vec3 pos_dx = dFdx(pbr_vPosition);\n vec3 pos_dy = dFdy(pbr_vPosition);\n vec3 tex_dx = dFdx(vec3(pbr_vUV, 0.0));\n vec3 tex_dy = dFdy(vec3(pbr_vUV, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n\n#ifdef HAS_NORMALS\n vec3 ng = normalize(pbr_vNormal);\n#else\n vec3 ng = cross(pos_dx, pos_dy);\n#endif\n\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n#else\n mat3 tbn = pbr_vTBN;\n#endif\n\n#ifdef HAS_NORMALMAP\n vec3 n = texture2D(u_NormalSampler, pbr_vUV).rgb;\n n = normalize(tbn * ((2.0 * n - 1.0) * vec3(u_NormalScale, u_NormalScale, 1.0)));\n#else\n vec3 n = normalize(tbn[2].xyz);\n#endif\n\n return n;\n}\n\n\n#ifdef USE_IBL\nvec3 getIBLContribution(PBRInfo pbrInputs, vec3 n, vec3 reflection)\n{\n float mipCount = 9.0;\n float lod = (pbrInputs.perceptualRoughness * mipCount);\n vec3 brdf = SRGBtoLINEAR(texture2D(u_brdfLUT,\n vec2(pbrInputs.NdotV, 1.0 - pbrInputs.perceptualRoughness))).rgb;\n vec3 diffuseLight = SRGBtoLINEAR(textureCube(u_DiffuseEnvSampler, n)).rgb;\n\n#ifdef USE_TEX_LOD\n vec3 specularLight = SRGBtoLINEAR(textureCubeLod(u_SpecularEnvSampler, reflection, lod)).rgb;\n#else\n vec3 specularLight = SRGBtoLINEAR(textureCube(u_SpecularEnvSampler, reflection)).rgb;\n#endif\n\n vec3 diffuse = diffuseLight * pbrInputs.diffuseColor;\n vec3 specular = specularLight * (pbrInputs.specularColor * brdf.x + brdf.y);\n diffuse *= u_ScaleIBLAmbient.x;\n specular *= u_ScaleIBLAmbient.y;\n\n return diffuse + specular;\n}\n#endif\n\n\nvec3 diffuse(PBRInfo pbrInputs)\n{\n return pbrInputs.diffuseColor / M_PI;\n}\n\nvec3 specularReflection(PBRInfo pbrInputs)\n{\n return pbrInputs.reflectance0 +\n (pbrInputs.reflectance90 - pbrInputs.reflectance0) *\n pow(clamp(1.0 - pbrInputs.VdotH, 0.0, 1.0), 5.0);\n}\n\n\n\nfloat geometricOcclusion(PBRInfo pbrInputs)\n{\n float NdotL = pbrInputs.NdotL;\n float NdotV = pbrInputs.NdotV;\n float r = pbrInputs.alphaRoughness;\n\n float attenuationL = 2.0 * NdotL / (NdotL + sqrt(r * r + (1.0 - r * r) * (NdotL * NdotL)));\n float attenuationV = 2.0 * NdotV / (NdotV + sqrt(r * r + (1.0 - r * r) * (NdotV * NdotV)));\n return attenuationL * attenuationV;\n}\n\n\n\n\n\nfloat microfacetDistribution(PBRInfo pbrInputs)\n{\n float roughnessSq = pbrInputs.alphaRoughness * pbrInputs.alphaRoughness;\n float f = (pbrInputs.NdotH * roughnessSq - pbrInputs.NdotH) * pbrInputs.NdotH + 1.0;\n return roughnessSq / (M_PI * f * f);\n}\n\nvoid PBRInfo_setAmbientLight(inout PBRInfo pbrInputs) {\n pbrInputs.NdotL = 1.0;\n pbrInputs.NdotH = 0.0;\n pbrInputs.LdotH = 0.0;\n pbrInputs.VdotH = 1.0;\n}\n\nvoid PBRInfo_setDirectionalLight(inout PBRInfo pbrInputs, vec3 lightDirection) {\n vec3 n = pbrInputs.n;\n vec3 v = pbrInputs.v;\n vec3 l = normalize(lightDirection);\n vec3 h = normalize(l+v);\n\n pbrInputs.NdotL = clamp(dot(n, l), 0.001, 1.0);\n pbrInputs.NdotH = clamp(dot(n, h), 0.0, 1.0);\n pbrInputs.LdotH = clamp(dot(l, h), 0.0, 1.0);\n pbrInputs.VdotH = clamp(dot(v, h), 0.0, 1.0);\n}\n\nvoid PBRInfo_setPointLight(inout PBRInfo pbrInputs, PointLight pointLight) {\n vec3 light_direction = normalize(pointLight.position - pbr_vPosition);\n PBRInfo_setDirectionalLight(pbrInputs, light_direction);\n}\n\nvec3 calculateFinalColor(PBRInfo pbrInputs, vec3 lightColor) {\n vec3 F = specularReflection(pbrInputs);\n float G = geometricOcclusion(pbrInputs);\n float D = microfacetDistribution(pbrInputs);\n vec3 diffuseContrib = (1.0 - F) * diffuse(pbrInputs);\n vec3 specContrib = F * G * D / (4.0 * pbrInputs.NdotL * pbrInputs.NdotV);\n return pbrInputs.NdotL * lightColor * (diffuseContrib + specContrib);\n}\n\nvec4 pbr_filterColor(vec4 colorUnused)\n{\n#ifdef HAS_BASECOLORMAP\n vec4 baseColor = SRGBtoLINEAR(texture2D(u_BaseColorSampler, pbr_vUV)) * u_BaseColorFactor;
2\n#else\n vec4 baseColor = u_BaseColorFactor;\n#endif\n\n#ifdef ALPHA_CUTOFF\n if (baseColor.a < u_AlphaCutoff) {\n discard;\n }\n#endif\n\n vec3 color = vec3(0, 0, 0);\n\n if(pbr_uUnlit){\n color.rgb = baseColor.rgb;\n }\n else{\n\n\n float perceptualRoughness = u_MetallicRoughnessValues.y;\n float metallic = u_MetallicRoughnessValues.x;\n#ifdef HAS_METALROUGHNESSMAP\n\n vec4 mrSample = texture2D(u_MetallicRoughnessSampler, pbr_vUV);\n perceptualRoughness = mrSample.g * perceptualRoughness;\n metallic = mrSample.b * metallic;\n#endif\n perceptualRoughness = clamp(perceptualRoughness, c_MinRoughness, 1.0);\n metallic = clamp(metallic, 0.0, 1.0);\n\n float alphaRoughness = perceptualRoughness * perceptualRoughness;\n\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor.rgb * (vec3(1.0) - f0);\n diffuseColor *= 1.0 - metallic;\n vec3 specularColor = mix(f0, baseColor.rgb, metallic);\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n\n\n\n float reflectance90 = clamp(reflectance * 25.0, 0.0, 1.0);\n vec3 specularEnvironmentR0 = specularColor.rgb;\n vec3 specularEnvironmentR90 = vec3(1.0, 1.0, 1.0) * reflectance90;\n\n vec3 n = getNormal();\n vec3 v = normalize(u_Camera - pbr_vPosition);\n\n float NdotV = clamp(abs(dot(n, v)), 0.001, 1.0);\n vec3 reflection = -normalize(reflect(v, n));\n\n PBRInfo pbrInputs = PBRInfo(\n 0.0,\n NdotV,\n 0.0,\n 0.0,\n 0.0,\n perceptualRoughness,\n metallic,\n specularEnvironmentR0,\n specularEnvironmentR90,\n alphaRoughness,\n diffuseColor,\n specularColor,\n n,\n v\n );\n\n#ifdef USE_LIGHTS\n PBRInfo_setAmbientLight(pbrInputs);\n color += calculateFinalColor(pbrInputs, lighting_uAmbientLight.color);\n SMART_FOR(int i = 0, i < MAX_LIGHTS, i < lighting_uDirectionalLightCount, i++) {\n if (i < lighting_uDirectionalLightCount) {\n PBRInfo_setDirectionalLight(pbrInputs, lighting_uDirectionalLight[i].direction);\n color += calculateFinalColor(pbrInputs, lighting_uDirectionalLight[i].color);\n }\n }\n SMART_FOR(int i = 0, i < MAX_LIGHTS, i < lighting_uPointLightCount, i++) {\n if (i < lighting_uPointLightCount) {\n PBRInfo_setPointLight(pbrInputs, lighting_uPointLight[i]);\n float attenuation = getPointLightAttenuation(lighting_uPointLight[i], distance(lighting_uPointLight[i].position, pbr_vPosition));\n color += calculateFinalColor(pbrInputs, lighting_uPointLight[i].color / attenuation);\n }\n }\n#endif\n#ifdef USE_IBL\n color += getIBLContribution(pbrInputs, n, reflection);\n#endif\n#ifdef HAS_OCCLUSIONMAP\n float ao = texture2D(u_OcclusionSampler, pbr_vUV).r;\n color = mix(color, color * ao, u_OcclusionStrength);\n#endif\n\n#ifdef HAS_EMISSIVEMAP\n vec3 emissive = SRGBtoLINEAR(texture2D(u_EmissiveSampler, pbr_vUV)).rgb * u_EmissiveFactor;\n color += emissive;\n#endif\n\n#ifdef PBR_DEBUG\n\n\n\n\n\n color = mix(color, baseColor.rgb, u_ScaleDiffBaseMR.y);\n color = mix(color, vec3(metallic), u_ScaleDiffBaseMR.z);\n color = mix(color, vec3(perceptualRoughness), u_ScaleDiffBaseMR.w);\n#endif\n\n }\n\n return vec4(pow(color,vec3(1.0/2.2)), baseColor.a);\n}\n",defines:{LIGHTING_FRAGMENT:1},dependencies:[n(5664)._]}},32955:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(25128),i=n(11866),o=n(77456),s=n(51238),a=n(82314);function u(t,e,n={}){const u=a.getGeom.call(void 0,t).coordinates;let l=0;for(let t=0;t<u.length&&!(e>=l&&t===u.length-1);t++){if(l>=e){const o=e-l;if(o){const e=r.bearing.call(void 0,u[t],u[t-1])-180;return i.destination.call(void 0,u[t],o,e,n)}return s.point.call(void 0,u[t])}l+=o.distance.call(void 0,u[t],u[t+1],n)}return s.point.call(void 0,u[u.length-1])}var l=u;e.along=u,e.default=l},32968:(t,e,n)=>{"use strict";n.d(e,{I:()=>a,Td:()=>s,X:()=>o});const r=[],i=[];function o(t,e=0,n=1/0){let o=r;const s={index:-1,data:t,target:[]};return t?"function"==typeof t[Symbol.iterator]?o=t:t.length>0&&(i.length=t.length,o=i):o=r,(e>0||Number.isFinite(n))&&(o=(Array.isArray(o)?o:Array.from(o)).slice(e,n),s.index=e-1),{iterable:o,objectInfo:s}}function s(t){return t&&t[Symbol.asyncIterator]}function a(t,e){const{size:n,stride:r,offset:i,startIndices:o,nested:s}=e,a=t.BYTES_PER_ELEMENT,u=r?r/a:n,l=i?i/a:0,c=Math.floor((t.length-l)/u);return(e,{index:r,target:i})=>{if(!o){const e=r*u+l;for(let r=0;r<n;r++)i[r]=t[e+r];return i}const a=o[r],h=o[r+1]||c;let A;if(s){A=new Array(h-a);for(let e=a;
2e<h;e++){const r=e*u+l;i=new Array(n);for(let e=0;e<n;e++)i[e]=t[r+e];A[e-a]=i}}else if(u===n)A=t.subarray(a*n+l,h*n+l);else{A=new t.constructor((h-a)*n);let e=0;for(let r=a;r<h;r++){const i=r*u+l;for(let r=0;r<n;r++)A[e++]=t[i+r]}}return A}}},33e3:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(44776),i=n(20952),o=n(78764),s=u(n(30258)),a=u(n(88500));function u(t){return t&&t.__esModule?t:{default:t}}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function A(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function f(t,e,n){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=d(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},f(t,e,n||t)}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var m=[0,0,0,153],y=[0,0,0,144],v=[0,0,0,255],_=[0,0,144,144],b=[144,144,144,255],w=[144,144,144,144],E=[192,0,0,255],x=[0,0,0,128],S=[124,0,192,255],T=[255,255,255,255],P=32*o.PROJECTED_PIXEL_SIZE_MULTIPLIER,C=i.DrawPolygonMode;function M(t){return t&&"function"==typeof t?function(e){return t(function(t){return t.__source?t.__source.object:t.sourceFeature?t.sourceFeature.feature:t}(e))}:t}function I(t){switch(t.properties.editHandleType){case"existing":return E;case"snap-source":return S;default:return x}}var O={mode:C,onEdit:function(){},pickable:!0,pickingRadius:10,pickingDepth:5,fp64:!1,filled:!0,stroked:!0,lineWidthScale:o.PROJECTED_PIXEL_SIZE_MULTIPLIER,lineWidthMinPixels:1,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,pickingLineWidthExtraPixels:0,lineWidthUnits:"pixels",lineJointRounded:!1,lineCapRounded:!1,lineMiterLimit:4,pointRadiusScale:1,pointRadiusMinPixels:2,pointRadiusMaxPixels:Number.MAX_SAFE_INTEGER,getLineColor:function(t,e,n){return e?v:m},getFillColor:function(t,e,n){return e?_:y},getRadius:function(t){return t&&t.properties&&t.properties.radius||t&&t.properties&&t.properties.size||1},getLineWidth:function(t){return t&&t.properties&&t.properties.lineWidth||3},getTentativeLineColor:function(t){return b},getTentativeFillColor:function(t){return w},getTentativeLineWidth:function(t){return t&&t.properties&&t.properties.lineWidth||3},editHandleType:"point",editHandlePointRadiusScale:1,editHandlePointOutline:!0,editHandlePointStrokeWidth:2,editHandlePointRadiusUnits:"pixels",editHandlePointRadiusMinPixels:4,editHandlePointRadiusMaxPixels:8,getEditHandlePointColor:I,getEditHandlePointOutlineColor:function(t){return T},getEditHandlePointRadius:function(t){switch(t.properties.editHandleType){case"existing":return 5;case"snap":return 7;default:return 3}},editHandleIconAtlas:null,editHandleIconMapping:null,editHandleIconSizeScale:1,editHandleIconSizeUnits:"pixels",getEditHandleIcon:function(t){return t.properties.editHandleType},getEditHandleIconSize:10,getEditHandleIconColor:I,getEditHandleIconAngle:0,billboard:!0},R={view:i.ViewMode,modify:i.ModifyMode,translate:new i.SnappableMode(new i.TranslateMode),transform:new i.SnappableMode(new i.TransformMode),scale:i.ScaleMode,rotate:i.RotateMode,duplicate:i.DuplicateMode,split:i.SplitPolygonMode,extrude:i.ExtrudeMode,elevation:i.ElevationMode,drawPoint:i.DrawPointMode,drawLineString:i.DrawLineStringMode,drawPolygon:i.DrawPolygonMode,drawRectangle:i.DrawRectangleMode,drawSquare:i.DrawSquareMode,drawRectangleFromCenter:i.DrawRectangleFromCenterMode,drawSquareFromCenter:i.DrawSquareFromCenterMode,drawCircleFromCenter:i.DrawCircleFromCenterMode,drawCircleByBoundingBox:i.DrawCircleByDiameterMode,drawEllipseByBoundingBox:i.DrawEllipseByBoundingBoxMode,drawRectangleUsing3Points:i.DrawRectangleUsingThreePointsMode,drawEllipseUsing3Points:i.DrawEllipseUsingThreePointsMode,draw90DegreePolygon:i.Draw90DegreePolygonMode,drawPolygonByDragging:i.DrawPolygonByDraggingMode},L=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(s,t);var e,n,i,o=(i=s,function(){var t,e=d(i);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=d(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==l(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),o.apply(this,arguments)}return e=s,n=[{key:"renderLayers",value:function(){var t=this.getSubLayerProps({id:"geojson",data:this.props.data,fp64:this.props.fp64,filled:this.props.filled,stroked:this.props.stroked,lineWidthScale:this.props.lineWidthScale,lineWidthMinPixels:this.props.lineWidthMinPixels,lineWidthMaxPixels:this.props.lineWidthMaxPixels,lineWidthUnits:this.props.lineWidthUnits,lineJointRounded:this.props.lineJointRounded,lineCapRounded:this.props.lineCapRounded,lineMiterLimit:this.props.lineMiterLimit,pointRadiusScale:this.props.pointRadiusScale,pointRadiusMinPixels:this.props.pointRadiusMinPixels,pointRadiusMaxPixels:this.props.pointRadiusMaxPixels,getLineColor:this.selectionAwareAccessor(this.props.getLineColor),getFillColor:this.selectionAwareAccessor(this.props.getFillColor),getPointRadius:this.selectionAwareAccessor(this.props.getRadius),getLineWidth:this.selectionAwareAccessor(this.props.getLineWidth),_subLayerProps:{linestrings:{billboard:this.props.billboard,updateTriggers:{all:[this.props.selectedFeatureIndexes,this.props.mode]}},"polygons-stroke":{billboard:this.props.billboard,pickingLineWidthExtraPixels:this.props.pickingLineWidthExtraPixels,type:a.default,updateTriggers:{all:[this.props.selectedFeatureIndexes,this.props.mode]}}},updateTriggers:{getLineColor:[this.props.selectedFeatureIndexes,this.props.mode],getFillColor:[this.props.selectedFeatureIndexes,this.props.mode],getPointRadius:[this.props.selectedFeatureIndexes,this.props.mode],getLineWidth:[this.props.selectedFeatureIndexes,this.props.mode]}}),e=[new r.GeoJsonLayer(t)];return e.concat(this.createGuidesLayers(),this.createTooltipsLayers())}},{key:"initializeState",value:function(){f(d(s.prototype),"initializeState",this).call(this),this.setState({selectedFeatures:[],editHandles:[]})}},{key:"shouldUpdateState",value:function(t){return f(d(s.prototype),"shouldUpdateState",this).call(this,t)||t.changeFlags.stateChanged}},{key:"updateState",value:function(t){var e,n=t.props,r=t.oldProps,i=t.changeFlags,o=t.context;f(d(s.prototype),"updateState",this).call(this,{oldProps:r,props:n,changeFlags:i,context:o}),!i.propsOrDataChanged||0!==Object.keys(r).length&&n.mode===r.mode||("function"==typeof n.mode?e=new(0,n.mode):"str
2ing"==typeof n.mode?(e=R[n.mode],console.warn("Deprecated use of passing `mode` as a string. Pass the mode's class constructor instead.")):e=n.mode,e||(console.warn("No mode configured for ".concat(String(n.mode))),e=new C),e!==this.state.mode&&this.setState({mode:e,cursor:null}));var a=[];Array.isArray(n.selectedFeatureIndexes)&&(a=n.selectedFeatureIndexes.map(function(t){return n.data.features[t]})),this.setState({selectedFeatures:a})}},{key:"getModeProps",value:function(t){var e=this;return{modeConfig:t.modeConfig,data:t.data,selectedIndexes:t.selectedFeatureIndexes,lastPointerMoveEvent:this.state.lastPointerMoveEvent,cursor:this.state.cursor,onEdit:function(n){e.setNeedsUpdate(),t.onEdit(n)},onUpdateCursor:function(t){e.setState({cursor:t})}}}},{key:"selectionAwareAccessor",value:function(t){var e=this;return"function"!=typeof t?t:function(n){return t(n,e.isFeatureSelected(n),e.props.mode)}}},{key:"isFeatureSelected",value:function(t){if(!this.props.data||!this.props.selectedFeatureIndexes)return!1;if(!this.props.selectedFeatureIndexes.length)return!1;var e=this.props.data.features.indexOf(t);return this.props.selectedFeatureIndexes.includes(e)}},{key:"getPickingInfo",value:function(t){var e=t.info;return t.sourceLayer.id.endsWith("guides")&&(e.isGuide=!0),e}},{key:"_updateAutoHighlight",value:function(t){if(null==t?void 0:t.sourceLayer)if(t.isGuide){var e,n=function(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(t.sourceLayer.getSubLayers());try{for(n.s();!(e=n.n()).done;)e.value.updateAutoHighlight(t)}catch(t){n.e(t)}finally{n.f()}}else t.sourceLayer.updateAutoHighlight(t)}},{key:"createGuidesLayers",value:function(){var t=this.getActiveMode().getGuides(this.getModeProps(this.props));if(!t||!t.features.length)return[];var e={linestrings:{billboard:this.props.billboard,autoHighlight:!1},"polygons-fill":{autoHighlight:!1},"polygons-stroke":{billboard:this.props.billboard}};return"icon"===this.props.editHandleType?e["points-icon"]={type:r.IconLayer,iconAtlas:this.props.editHandleIconAtlas,iconMapping:this.props.editHandleIconMapping,sizeUnits:this.props.editHandleIconSizeUnits,sizeScale:this.props.editHandleIconSizeScale,getIcon:M(this.props.getEditHandleIcon),getSize:M(this.props.getEditHandleIconSize),getColor:M(this.props.getEditHandleIconColor),getAngle:M(this.props.getEditHandleIconAngle)}:e["points-circle"]={type:r.ScatterplotLayer,radiusScale:this.props.editHandlePointRadiusScale,stroked:this.props.editHandlePointOutline,getLineWidth:this.props.editHandlePointStrokeWidth,radiusUnits:this.props.editHandlePointRadiusUnits,radiusMinPixels:this.props.editHandlePointRadiusMinPixels,radiusMaxPixels:this.props.editHandlePointRadiusMaxPixels,getRadius:M(this.props.getEditHandlePointRadius),getFillColor:M(this.props.getEditHandlePointColor),getLineColor:M(this.props.getEditHandlePointOutlineColor)},[new r.GeoJsonLayer(this.getSubLayerProps({id:"guides",data:t,fp64:this.props.fp64,_subLayerProps:e,lineWidthScale:this.props.lineWidthScale,lineWidthMinPixels:this.props.lineWidthMinPixels,lineWidthMaxPixels:this.props.lineWidthMaxPixels,lineWidthUnits:this.props.lineWidthUnits,lineJointRounded:this.props.lineJointRounded,lineCapRounded:this.props.lineCapRounded,lineMiterLimit:this.props.lineMiterLimit,getLineColor:M(this.props.getTentativeLineColor),getLineWidth:M(this.props.getTentativeLineWidth),getFillColor:M(this.props.getTentativeFillColor),pointType:"icon"===this.props.editHandleType?"icon":"circle",iconAtlas:this.props.editHandleIconAtlas}))]}},{key:"createTooltipsLayers",value:function(){var t=this.getActiveMode().getTooltips(this.getModeProps(this.props)),e=new r.TextLayer(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
2e%2?c(Object(n),!0).forEach(function(e){g(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({getSize:P},this.getSubLayerProps({id:"tooltips",data:t})));return[e]}},{key:"onLayerClick",value:function(t){this.getActiveMode().handleClick(t,this.getModeProps(this.props))}},{key:"onLayerKeyUp",value:function(t){this.getActiveMode().handleKeyUp(t,this.getModeProps(this.props))}},{key:"onStartDragging",value:function(t){this.getActiveMode().handleStartDragging(t,this.getModeProps(this.props))}},{key:"onDragging",value:function(t){this.getActiveMode().handleDragging(t,this.getModeProps(this.props))}},{key:"onStopDragging",value:function(t){this.getActiveMode().handleStopDragging(t,this.getModeProps(this.props))}},{key:"onPointerMove",value:function(t){this.setState({lastPointerMoveEvent:t}),this.getActiveMode().handlePointerMove(t,this.getModeProps(this.props))}},{key:"getCursor",value:function(t){var e=t.isDragging;if(null===this.state||void 0===this.state)return null;var n=this.state.cursor;return n||(n=e?"grabbing":"grab"),n}},{key:"getActiveMode",value:function(){return this.state.mode}}],n&&A(e.prototype,n),s}(s.default);e.default=L,g(L,"layerName","EditableGeoJsonLayer"),g(L,"defaultProps",O)},33533:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.defineProperty,i=(t,e)=>r(t,"name",{value:e,configurable:!0}),o=n(89595),s=n(78345);function a(t){return s.geomReduce.call(void 0,t,(t,e)=>t+u(e),0)}function u(t){let e,n=0;switch(t.type){case"Polygon":return l(t.coordinates);case"MultiPolygon":for(e=0;e<t.coordinates.length;e++)n+=l(t.coordinates[e]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function l(t){let e=0;if(t&&t.length>0){e+=Math.abs(A(t[0]));for(let n=1;n<t.length;n++)e-=Math.abs(A(t[n]))}return e}i(a,"area"),i(u,"calculateArea"),i(l,"polygonArea");var c=o.earthRadius*o.earthRadius/2,h=Math.PI/180;function A(t){const e=t.length;if(e<=2)return 0;let n=0,r=0;for(;r<e;){const i=t[r],o=t[r+1===e?0:r+1],s=t[r+2>=e?(r+2)%e:r+2],a=i[0]*h,u=o[1]*h;n+=(s[0]*h-a)*Math.sin(u),r++}return n*c}i(A,"ringArea");var f=a;e.area=a,e.default=f},33913:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RotateMode=void 0;var r=g(n(60899)),i=g(n(7784)),o=g(n(25128)),s=g(n(43788)),a=g(n(71123)),u=n(78345),l=n(82314),c=n(89595),h=g(n(3932)),A=g(n(90227)),f=n(71169),d=n(96146),p=n(78768);function g(t){return t&&t.__esModule?t:{default:t}}function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_(t)}function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}function w(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(x,t);var e,n,g,E=(g=x,function(){var t,e=_(g);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=_(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?v(t):e}(this,t)});function x(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,x);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return w(v(t=E.call.apply(E,[this].concat(n))),"_selectedEditHandle",void 0),w(v(t),"_geometryBeingRotated",void 0),w(v(t),"_isRotating",!1),w(v(t),"_isSinglePointGeometrySelected",function(t){var e=(t||{}).features;return!(!Array.isArray(e)||1!==e.length)&&"Point"===(0,l.getGeom)(e[0]).type}),w(v(t),"getIsRotating",function(){return t._isRotating}),t}return e=x,(n=[{key:"getGuides",value:function(t){var e=this._geometryBeingRotated||this.get
2SelectedFeaturesAsFeatureCollection(t);if(this._isSinglePointGeometrySelected(e))return{type:"FeatureCollection",features:[]};if(this._isRotating)return(0,c.featureCollection)([(0,i.default)(e)]);var n=(0,s.default)((0,r.default)(e)),o=null,l=null,h=0;(0,u.coordEach)(n,function(t){if(o){var e=(0,d.getIntermediatePosition)(t,o);(!l||e[1]>l[1])&&(l=e);var n=(0,a.default)(t,o);h=Math.max(h,n)}o=t});var f=l&&[l[0],l[1]+h/1e3],p=(0,c.lineString)([l,f]),g=(0,c.point)(f,{guideType:"editHandle",editHandleType:"rotate"});return(0,c.featureCollection)([(0,A.default)(n),g,p])}},{key:"handleDragging",value:function(t,e){if(this._isRotating){var n=this.getRotateAction(t.pointerDownMapCoords,t.mapCoords,"rotating",e);n&&e.onEdit(n),t.cancelPan()}}},{key:"handlePointerMove",value:function(t,e){if(!this._isRotating){var n=(0,f.getPickedEditHandle)(t.picks);this._selectedEditHandle=n&&"rotate"===n.properties.editHandleType?n:null}this.updateCursor(e)}},{key:"handleStartDragging",value:function(t,e){this._selectedEditHandle&&(this._isRotating=!0,this._geometryBeingRotated=this.getSelectedFeaturesAsFeatureCollection(e))}},{key:"handleStopDragging",value:function(t,e){if(this._isRotating){var n=this.getRotateAction(t.pointerDownMapCoords,t.mapCoords,"rotated",e);n&&e.onEdit(n),this._geometryBeingRotated=null,this._selectedEditHandle=null,this._isRotating=!1}}},{key:"updateCursor",value:function(t){this._selectedEditHandle?t.onUpdateCursor("crosshair"):t.onUpdateCursor(null)}},{key:"getRotateAction",value:function(t,e,n,r){if(!this._geometryBeingRotated)return null;for(var s=(0,i.default)(this._geometryBeingRotated),a=function(t,e,n){var r=(0,o.default)(t,e);return(0,o.default)(t,n)-r}(s,t,e),u=(0,h.default)(this._geometryBeingRotated,a,{pivot:s}),l=new p.ImmutableFeatureCollection(r.data),c=r.selectedIndexes,A=0;A<c.length;A++){var f=c[A],d=u.features[A];l=l.replaceGeometry(f,d.geometry)}return{updatedData:l.getObject(),editType:n,editContext:{featureIndexes:c}}}}])&&y(e.prototype,n),x}(d.GeoJsonEditMode);e.RotateMode=E},33955:t=>{"use strict";var e="undefined"!=typeof BigInt&&BigInt;t.exports=function(){return"function"==typeof e&&"function"==typeof BigInt&&"bigint"==typeof e(42)&&"bigint"==typeof BigInt(42)}},34081:(t,e,n)=>{"use strict";n.d(e,{$W:()=>s,Cc:()=>w,F2:()=>f,F8:()=>p,Fl:()=>u,HQ:()=>v,Ml:()=>m,ZK:()=>S,aI:()=>E,cy:()=>l,eh:()=>h,gn:()=>g,jK:()=>a,o8:()=>c,qE:()=>b,qR:()=>y,rY:()=>_,t2:()=>x,uj:()=>d,xW:()=>A});var r=n(97458);const i=1/Math.PI*180,o=1/180*Math.PI,s={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function a(t){for(const e in t)(0,r.A)(e in s),s[e]=t[e];return s}function u(t,{precision:e=s.precision}={}){return t=function(t){return Math.round(t/s.EPSILON)*s.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function l(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function c(t){return"clone"in t?t.clone():t.slice()}function h(t){return f(t)}function A(t){return d(t)}function f(t,e){return T(t,t=>t*o,e)}function d(t,e){return T(t,t=>t*i,e)}function p(t,e){return T(t,t=>Math.sin(t),e)}function g(t,e){return T(t,t=>Math.cos(t),e)}function m(t,e){return T(t,t=>Math.tan(t),e)}function y(t,e){return T(t,t=>Math.asin(t),e)}function v(t,e){return T(t,t=>Math.acos(t),e)}function _(t,e){return T(t,t=>Math.atan(t),e)}function b(t,e,n){return T(t,t=>Math.max(e,Math.min(n,t)))}function w(t,e,n){return l(t)?t.map((t,r)=>w(t,e[r],n)):n*e+(1-n)*t}function E(t,e,n){const r=s.EPSILON;n&&(s.EPSILON=n);try{if(t===e)return!0;if(l(t)&&l(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!E(t[n],e[n]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):"number"==typeof t&&"number"==typeof e&&Math.abs(t-e)<=s.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{s.EPSILON=r}}function x(t,e){if(t===e)return!0;if(t&&"object"==typeof t&&e&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;if(t.exactEquals)return t.exactEquals(e)}if(l(t)&&l(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!x(t[n],e[n]))return!1;return!0}return!1}function S(t,e){const n=s.EPSILON;let r;s.EPSILON=t;
2try{r=e()}finally{s.EPSILON=n}return r}function T(t,e,n){if(l(t)){const r=t;n=n||function(t){return t.clone?t.clone():new Array(t.length)}(r);for(let i=0;i<n.length&&i<r.length;++i)n[i]=e(t[i],i,n);return n}return e(t)}},34583:(t,e,n)=>{"use strict";var r=n(41857),i=n(23225);t.exports=function(){var t=i();return r(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t}},34898:(t,e,n)=>{"use strict";n.d(e,{B:()=>Ie});var r={};n.r(r),n.d(r,{decode:()=>ct,name:()=>lt});var i={};n.r(i),n.d(i,{name:()=>gt,preprocess:()=>mt});var o={};n.r(o),n.d(o,{name:()=>vt,preprocess:()=>_t});var s={};n.r(s),n.d(s,{decode:()=>Tt,encode:()=>Pt,name:()=>xt,preprocess:()=>St});var a={};n.r(a),n.d(a,{decode:()=>Ut,name:()=>Nt});var u={};n.r(u),n.d(u,{decode:()=>Wt,encode:()=>Xt,name:()=>qt});var l={};n.r(l),n.d(l,{decode:()=>Jt,encode:()=>Zt,name:()=>Qt});var c={};n.r(c),n.d(c,{decode:()=>te,encode:()=>ee,name:()=>$t});var h={};n.r(h),n.d(h,{decode:()=>oe,name:()=>ie});var A=n(28747),f=n(89489);const d="3.4.15",p="https://unpkg.com/@loaders.gl/textures@".concat(d,"/dist/libs/basis_encoder.wasm"),g="https://unpkg.com/@loaders.gl/textures@".concat(d,"/dist/libs/basis_encoder.js");let m,y;async function v(t){const e=t.modules||{};return e.basis?e.basis:(m=m||async function(t){let e=null,n=null;return[e,n]=await Promise.all([await(0,f._)("basis_transcoder.js","textures",t),await(0,f._)("basis_transcoder.wasm","textures",t)]),e=e||globalThis.BASIS,await function(t,e){const n={};return e&&(n.wasmBinary=e),new Promise(e=>{t(n).then(t=>{const{BasisFile:n,initializeBasis:r}=t;r(),e({BasisFile:n})})})}(e,n)}(t),await m)}async function _(t){const e=t.modules||{};return e.basisEncoder?e.basisEncoder:(y=y||async function(t){let e=null,n=null;return[e,n]=await Promise.all([await(0,f._)(g,"textures",t),await(0,f._)(p,"textures",t)]),e=e||globalThis.BASIS,await function(t,e){const n={};return e&&(n.wasmBinary=e),new Promise(e=>{t(n).then(t=>{const{BasisFile:n,KTX2File:r,initializeBasis:i,BasisEncoder:o}=t;i(),e({BasisFile:n,KTX2File:r,BasisEncoder:o})})})}(e,n)}(t),await y)}const b=["","WEBKIT_","MOZ_"],w={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let E=null;var x,S,T,P,C,M,I,O,R;new Uint8Array([0]),(R=x||(x={}))[R.NONE=0]="NONE",R[R.BASISLZ=1]="BASISLZ",R[R.ZSTD=2]="ZSTD",R[R.ZLIB=3]="ZLIB",function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(S||(S={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(T||(T={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(P||(P={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(C||(C={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(M||(M={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(I||(I={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(O||(O={}));const L=[171,75,84,88,32,50,48,187,13,10,26,10],B={etc1:{basisFormat:0,compressed:!0,format:36196},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:33776},bc3:{basisFormat:3,compressed:!0,format:33779},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:35840},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:35842},"astc-4x4":{basisFormat:10,compressed:!0,format:37808},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};function k(t,e,n){const r=new t(new Uint8Array(e));try{if(!r.startTranscoding())throw new Error("Failed to start basis transcoding");const t=r.getNumImages(),e=[];for(let i=0;i<t;i++){const t=r.getNumLevels(i),o=[];for(let e=0;e<t;e++)o.push(N(r,i,e,n));e.push(o)}return e}finally{r.close(),r.delete()}}function N(t,e,n,r){const i=t.getImageWidth(e,n),o=t.getImageHeight(e,n),s=t.getHasAlpha(),{compressed:a,format:u,basisFormat:l}=j(r,s),c=t.getImageTranscodedSizeInBytes(e,n,l),h=new Uint8Array(c);if(!t.transcodeImage(h,e,n,l,0,0))throw new Error("failed to start Basis transcoding");return{width:i,height:o,data:h,compressed:a,format:u,hasAlpha:s}}function F(t,e,n){const r=new t(new Uint8Array(e));try{if(!r.startTranscoding())throw new Error("failed to start KTX2 transcoding");const t=r.getLevels(),e=[];for(let i=0;i<t;i++){e.push(D(r,i,n));break}return[e]}finally{r.close(),r.delete()}}function D(t,e,n){const{alphaFlag:r,height:i,width:o}=t.getImageLevelInfo(e,0,0),{compressed:s,format:a,basisFormat:u}
2=j(n,r),l=t.getImageTranscodedSizeInBytes(e,0,0,u),c=new Uint8Array(l);if(!t.transcodeImage(c,e,0,0,u,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:o,height:i,data:c,compressed:s,levelSize:l,hasAlpha:r,format:a}}function j(t,e){let n=t&&t.basis&&t.basis.format;return"auto"===n&&(n=U()),"object"==typeof n&&(n=e?n.alpha:n.noAlpha),n=n.toLowerCase(),B[n]}function U(){const t=function(t){if(!E){t=t||function(){try{return document.createElement("canvas").getContext("webgl")}catch(t){return null}}()||void 0,E=new Set;for(const e of b)for(const n in w)if(t&&t.getExtension("".concat(e).concat(n))){const t=w[n];E.add(t)}}return E}();return t.has("astc")?"astc-4x4":t.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:t.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:t.has("etc1")?"etc1":t.has("etc2")?"etc2":"rgb565"}const G={...{name:"Basis",id:A.Bd?"basis":"basis-nodejs",module:"textures",version:"3.4.15",worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},parse:async function(t,e){if("auto"===e.basis.containerFormat){if(function(t){const e=new Uint8Array(t);return!(e.byteLength<L.length||e[0]!==L[0]||e[1]!==L[1]||e[2]!==L[2]||e[3]!==L[3]||e[4]!==L[4]||e[5]!==L[5]||e[6]!==L[6]||e[7]!==L[7]||e[8]!==L[8]||e[9]!==L[9]||e[10]!==L[10]||e[11]!==L[11])}(t))return F((await _(e)).KTX2File,t,e);const{BasisFile:n}=await v(e);return k(n,t,e)}if("encoder"===e.basis.module){const n=await _(e);return"ktx2"===e.basis.containerFormat?F(n.KTX2File,t,e):k(n.BasisFile,t,e)}{const{BasisFile:n}=await v(e);return k(n,t,e)}}};var z=n(1050);function V(t,e,n){if(t.byteLength<=e+n)return"";const r=new DataView(t);let i="";for(let t=0;t<n;t++)i+=String.fromCharCode(r.getUint8(e+t));return i}var H=n(19044),q=n(932);function W(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const n=e.baseUri||e.uri;if(!n)throw new Error("'baseUri' must be provided to resolve relative url ".concat(t));return n.substr(0,n.lastIndexOf("/")+1)+t}var X=n(24586),Y=n(23973),Q=n(78580);function J(t,e){return(0,Q.v)(t>=0),(0,Q.v)(e>0),t+(e-1)&~(e-1)}function Z(t,e,n){let r;if(t instanceof ArrayBuffer)r=new Uint8Array(t);else{const e=t.byteOffset,n=t.byteLength;r=new Uint8Array(t.buffer||t.arrayBuffer,e,n)}return e.set(r,n),n+J(r.byteLength,4)}var K=n(29465);const $={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]};class tt{constructor(t){(0,X.A)(this,"gltf",void 0),(0,X.A)(this,"sourceBuffers",void 0),(0,X.A)(this,"byteLength",void 0),this.gltf=t||{json:{...$},buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(t){return this.json[t]}getExtraData(t){return(this.json.extras||{})[t]}getExtension(t){const e=this.getUsedExtensions().find(e=>e===t),n=this.json.extensions||{};return e?n[t]||!0:null}getRequiredExtension(t){return this.getRequiredExtensions().find(e=>e===t)?this.getExtension(t):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(t,e){return(t.extensions||{})[e]}getScene(t){return this.getObject("scenes",t)}getNode(t){return this.getObject("nodes",t)}getSkin(t){return this.getObject("skins",t)}getMesh(t){return this.getObject("meshes",t)}getMaterial(t){return this.getObject("materials",t)}getAccessor(t){return this.getObject("accessors",t)}getTexture(t){return this.getObject("textures",t)}getSampler(t){return this.getObject("samplers",t)}getImage(t){return this.getObject("images",t)}getBufferView(t){return this.getObject("bufferViews",t)}getBuffer(t){return this.getObject("buffers",t)}getObject(t,e){if("object"==typeof e)return e;const n=this.json[t]&&this.json[t][e];if(!n)throw new Error("glTF file error: Could not find ".concat(t,"[").concat(e,"]"));return n}getTypedArrayForBufferView(t){const e=(t=this.getBufferView(t)).buffer,n=this.gltf.buffers[e];(0,q.v)(n);const r=(t.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,r,t.byteLength)}getTypedArrayForAccessor(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),n=this.getBuffer(e.buffer).data,{ArrayType:r,length:i}=(0,K.aF)(t,e);return new r(n,e.byteOffset+t.byteOffset,i)}getTypedArrayForImageData(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),n=this.getBuffer(e.buffer).data,r=e.byteOffset||0;return new Uint8Array(n,r,e.byteLength)}addApplicationData(t,e){return this.json[t]=e,this}addExtraData(t,e){return this.json.extras=this.json.extras||{},this.json.extras[t]=e,this}addObjectExtension(t,e,n){return t.extensions=t.extensions||{},t.extensions[e]=n,this.registerUsedExtension(e),this}setObjectExtension(t,e,n){(t.extensions||{})[e]=n}removeObjectExtension(t,e){const n=t.extensions||{},r=n[e];return delete n[e],r}addExtension(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,q.v)(e),this.json.extensions=this.json.extensions||{},this.json.extensions[t]=e,this.registerUsedExtension(t),e}
2addRequiredExtension(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,q.v)(e),this.addExtension(t,e),this.registerRequiredExtension(t),e}registerUsedExtension(t){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(e=>e===t)||this.json.extensionsUsed.push(t)}registerRequiredExtension(t){this.registerUsedExtension(t),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(e=>e===t)||this.json.extensionsRequired.push(t)}removeExtension(t){if(!this.getExtension(t))return;this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,t),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,t),this.json.extensions&&delete this.json.extensions[t],Array.isArray(this.json.extensionsRemoved)||(this.json.extensionsRemoved=[]);const e=this.json.extensionsRemoved;e.includes(t)||e.push(t)}setDefaultScene(t){this.json.scene=t}addScene(t){const{nodeIndices:e}=t;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:e}),this.json.scenes.length-1}addNode(t){const{meshIndex:e,matrix:n}=t;this.json.nodes=this.json.nodes||[];const r={mesh:e};return n&&(r.matrix=n),this.json.nodes.push(r),this.json.nodes.length-1}addMesh(t){const{attributes:e,indices:n,material:r,mode:i=4}=t,o={primitives:[{attributes:this._addAttributes(e),mode:i}]};if(n){const t=this._addIndices(n);o.primitives[0].indices=t}return Number.isFinite(r)&&(o.primitives[0].material=r),this.json.meshes=this.json.meshes||[],this.json.meshes.push(o),this.json.meshes.length-1}addPointCloud(t){const e={primitives:[{attributes:this._addAttributes(t),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(e),this.json.meshes.length-1}addImage(t,e){const n=(0,Y.m)(t),r=e||(null==n?void 0:n.mimeType),i={bufferView:this.addBufferView(t),mimeType:r};return this.json.images=this.json.images||[],this.json.images.push(i),this.json.images.length-1}addBufferView(t){const e=t.byteLength;(0,q.v)(Number.isFinite(e)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(t);const n={buffer:0,byteOffset:this.byteLength,byteLength:e};return this.byteLength+=J(e,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(n),this.json.bufferViews.length-1}addAccessor(t,e){const n={bufferView:t,type:(0,K.v7)(e.size),componentType:e.componentType,count:e.count,max:e.max,min:e.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}addBinaryBuffer(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{size:3};const n=this.addBufferView(t);let r={min:e.min,max:e.max};r.min&&r.max||(r=this._getAccessorMinMax(t,e.size));const i={size:e.size,componentType:(0,K.rA)(t),count:Math.round(t.length/e.size),min:r.min,max:r.max};return this.addAccessor(n,Object.assign(i,e))}addTexture(t){const{imageIndex:e}=t,n={source:e};return this.json.textures=this.json.textures||[],this.json.textures.push(n),this.json.textures.length-1}addMaterial(t){return this.json.materials=this.json.materials||[],this.json.materials.push(t),this.json.materials.length-1}createBinaryChunk(){var t,e;this.gltf.buffers=[];const n=this.byteLength,r=new ArrayBuffer(n),i=new Uint8Array(r);let o=0;for(const t of this.sourceBuffers||[])o=Z(t,i,o);null!==(t=this.json)&&void 0!==t&&null!==(e=t.buffers)&&void 0!==e&&e[0]?this.json.buffers[0].byteLength=n:this.json.buffers=[{byteLength:n}],this.gltf.binary=r,this.sourceBuffers=[r]}_removeStringFromArray(t,e){let n=!0;for(;n;){const r=t.indexOf(e);r>-1?t.splice(r,1):n=!1}}_addAttributes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e={};for(const n in t){const r=t[n],i=this._getGltfAttributeName(n),o=this.addBinaryBuffer(r.value,r);e[i]=o}return e}_addIndices(t){return this.addBinaryBuffer(t,{size:1})}_getGltfAttributeName(t){switch(t.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return t}}_getAccessorMinMax(t,e){const n={min:null,max:null};if(t.length<e)return n;n.min=[],n.max=[];const r=t.subarray(0,e);for(const t of r)n.min.push(t),n.max.push(t);for(let r=e;r<t.length;r+=e)for(let i=0;i<e;i++)n.min[0+i]=Math.min(n.min[0+i],t[r+i]),n.max[0+i]=Math.max(n.max[0+i],t[r+i]);return n}}
2const et="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIA
2LAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",nt=
vendor: 10,661 bytes, line 2
2"B9h9z9tFBBBF8dL9gBB9gLaaaaaFa9gEaaaB9gGaaB9gFaFaEQSBBFBFFGEGEGIILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBNn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBcI9z9iqlBMc/j9JSIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMkRIbaG97FaK978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAnDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAnDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBRnCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBHiCFD9tAiAPD9OD9hD9RHiDQBTFtGmEYIPLdKeOnH8ZAIAQJDBIBHpCFD9tApAPD9OD9hD9RHpAIASJDBIBHyCFD9tAyAPD9OD9hD9RHyDQBTFtGmEYIPLdKeOnH8cDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAnD9uHnDyBjGBAEAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnA8ZA8cDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnAdAiDQNiV8ZcpMyS8cQ8df8eb8fHdApAyDQNiV8ZcpMyS8cQ8df8eb8fHiDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnAdAiDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/xLGEaK978jUUUUBCAlHE8kUUUUBGXGXAGCI9HQBGXAFC98ZHI9FQBABRGCBRLEXAGAGDBBBHKCiD+rFCiD+sFD/6FHOAKCND+rFCiD+sFD/6FAOD/gFAKCTD+rFCiD+sFD/6FHND/gFD/kFD/lFHVCBDtD+2FHcAOCUUUU94DtHMD9OD9RD/kFHO9DBB/+hDYAOAOD/mFAVAVD/mFANAcANAMD9OD9RD/kFHOAOD/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHcD/kFCgFDtD9OAKCUUU94DtD9OD9QAOAND/mFAcD/kFCND+rFCU/+EDtD9OD9QAVAND/mFAcD/kFCTD+rFCUU/8ODtD9OD9QDMBBAGCTJRGALCIJHLAI9JQBMMAIAF9PQFAEAFCEZHLCGWHGqCBCTAGl/8MBAEABAICGWJHIAG/8cBBGXAL9FQBAEAEDBIBHKCiD+rFCiD+sFD/6FHOAKCND+rFCiD+sFD/6FAOD/gFAKCTD+rFCiD+sFD/6FHND/gFD/kFD/lFHVCBDtD+2FHcAOCUUUU94DtHMD9OD9RD/kFHO9DBB/+hDYAOAOD/mFAVAVD/mFANAcANAMD9OD9RD/kFHOAOD/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHcD/kFCgFDtD9OAKCUUU94DtD9OD9QAOAND/mFAcD/kFCND+rFCU/+EDtD9OD9QAVAND/mFAcD/kFCTD+rFCUU/8ODtD9OD9QDMIBMAIAEAG/8cBBSFMABAFC98ZHGT+HUUUBAGAF9PQBAEAFCEZHICEWHLJCBCAALl/8MBAEABAGCEWJHGAL/8cBBAEAIT+HUUUBAGAEAL/8cBBMAECAJ8kUUUUBM+yEGGaO97GXAF9FQBCBRGEXABCTJHEAEDBBBHICBDtHLCUU98D8cFCUU98D8cEHKD9OABDBBBHOAIDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAOAIDQBFGENVcMTtmYi8ZpyHICTD+sFD/6FHND/gFAICTD+rFCTD+sFD/6FHVD/gFD/kFD/lFHI9DB/+g6DYAVAIALD+2FHLAVCUUUU94DtHcD9OD9RD/kFHVAVD/mFAIAID/mFANALANAcD9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHLD/kFCTD+rFAVAND/mFALD/kFCggEDtD9OD9QHVAIAND/mFALD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHIDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAOAKD9OAVAIDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM94FEa8jUUUUBCAlHE8kUUUUBABAFC98ZHIT+JUUUBGXAIAF9PQBAEAFCEZHLCEWHFJCBCAAFl/8MBAEABAICEWJHBAF/8cBBAEALT+JUUUBABAEAF/8cBBMAECAJ8kUUUUBM/hEIGaF97FaL978jUUUUBCTlRGGXAF9FQBCBREEXAGABDBBBHIABCTJHLDBBBHKDQILKOSQfbPden8c8d8e8fHOCTD+sFHNCID+rFDMIBAB9DBBU8/DY9D/zI818/DYANCEDtD9QD/6FD/nFHNAIAKDQBFGENVcMTtmYi8ZpyHICTD+rFCTD+sFD/6FD/mFHKAKD/mFANAICTD+sFD/6FD/mFHVAVD/mFANAOCTD+rFCTD+sFD/6FD/mFHOAOD/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHND/mF9DBBX9LDYHID/kFCggEDtHcD9OAVAND/mFAID/kFCTD+rFD9QHVAOAND/mFAID/kFCTD+rFAKAND/mFAID/kFAcD9OD9QHNDQBFTtGEmYILPdKOenHID8dBAGDBIBDyB+t+J83EBABCNJAID8dFAGDBIBDyF+t+J83EBALAVANDQNVi8ZcMpySQ8c8dfb8e8fHND8dBAGDBIBDyG+t+J83EBABCiJAND8dFAGDBIBDyE+t+J83EBABCAJRBAECIJHEAF9JQBMMM/3FGEaF978jUUUUBCoBlREGXAGCGrAF9sHIC98ZHL9FQBCBRGABRFEXAFAFDBBBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBAFCTJRFAGCIJHGAL9JQBMMGXALAI9PQBAEAICEZHGCGWHFqCBCoBAFl/8MBAEABALCGWJHLAF/8cBBGXAG9FQBAEAEDBIBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMIBMALAEAF/8cBBMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",
2rt=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),it=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),ot={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},st={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};let at;const ut="EXT_meshopt_compression",lt=ut;async function ct(t,e){var n;const r=new tt(t);if(null==e||null===(n=e.gltf)||void 0===n||!n.decompressMeshes)return;const i=[];for(const e of t.json.bufferViews||[])i.push(ht(r,e));await Promise.all(i),r.removeExtension(ut)}async function ht(t,e){const n=t.getObjectExtension(e,ut);if(n){const{byteOffset:r=0,byteLength:i=0,byteStride:o,count:s,mode:a,filter:u="NONE",buffer:l}=n,c=t.gltf.buffers[l],h=new Uint8Array(c.arrayBuffer,c.byteOffset+r,i),A=new Uint8Array(t.gltf.buffers[e.buffer].arrayBuffer,e.byteOffset,e.byteLength);return await async function(t,e,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"NONE";const s=await async function(){return at||(at=async function(){let t=et;WebAssembly.validate(rt)&&(t=nt,console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate(function(t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;++n){const r=t.charCodeAt(n);e[n]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let n=0;for(let r=0;r<t.length;++r)e[n++]=e[r]<60?it[e[r]]:64*(e[r]-60)+e[++r];return e.buffer.slice(0,n)}(t),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}()),at}();!function(t,e,n,r,i,o,s){const a=t.exports.sbrk,u=r+3&-4,l=a(u*i),c=a(o.length),h=new Uint8Array(t.exports.memory.buffer);h.set(o,c);const A=e(l,r,i,c,o.length);if(0===A&&s&&s(l,u,i),n.set(h.subarray(l,l+r*i)),a(l-a(0)),0!==A)throw new Error("Malformed buffer data: ".concat(A))}(s,s.exports[st[i]],t,e,n,r,s.exports[ot[o||"NONE"]])}(A,s,o,h,a,u),A}return null}var At=n(75784);const ft={};function dt(t){if(void 0===ft[t]){const e=At.Bd?function(t){switch(t){case"image/avif":case"image/webp":return function(t){try{return 0===document.createElement("canvas").toDataURL(t).indexOf("data:".concat(t))}catch{return!1}}(t);default:return!0}}(t):function(t){const e=["image/png","image/jpeg","image/gif"],{_parseImageNode:n,_imageFormatsNode:r=e}=globalThis;return Boolean(n)&&r.includes(t)}(t);ft[t]=e}return ft[t]}const pt="EXT_texture_webp",gt=pt;function mt(t,e){const n=new tt(t);if(!dt("image/webp")){if(n.getRequiredExtensions().includes(pt))throw new Error("gltf: Required extension ".concat(pt," not supported by browser"));return}const{json:r}=n;for(const t of r.textures||[]){const e=n.getObjectExtension(t,pt);e&&(t.source=e.source),n.removeObjectExtension(t,pt)}n.removeExtension(pt)}const yt="KHR_texture_basisu",vt=yt;function _t(t,e){const n=new tt(t),{json:r}=n;for(const t of r.textures||[]){const e=n.getObjectExtension(t,yt);e&&(t.source=e.source),n.removeObjectExtension(t,yt)}n.removeExtension(yt)}var bt=n(87941);function wt(t){const{buffer:e,size:n,count:r}=function(t){let e=t,n=1,r=0;return t&&t.value&&(e=t.value,n=t.size||1),e&&(ArrayBuffer.isView(e)||(e=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t?Array.isArray(t)?new e(t):!n||t instanceof e?t:new e(t):null}(e,Float32Array)),r=e.length/n),{buffer:e,size:n,count:r}}(t);return{value:e,size:n,byteOffset:0,count:r,type:(0,K.v7)(n),componentType:(0,K.rA)(e)}}const Et="KHR_draco_mesh_compression",xt=Et;function St(t,e,n){const r=new tt(t);for(const t of It(r))r.getObjectExtension(t,Et)}async function Tt(t,e,n){var r;if(null==e||null===(r=e.gltf)||void 0===r||!r.decompressMeshes)return;const i=new tt(t),o=[];for(const t of It(i))i.getObjectExtension(t,Et)&&o.push(Ct(i,t,e,n));await Promise.all(o),i.removeExtension(Et)}function Pt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new tt(t);for(const t of n.json.meshes||[])Mt(t,e),n.addRequiredExtension(Et)}async function Ct(t,e,n,r){const i=t.getObjectExtension(e,Et);if(!i)return;const o=t.getTypedArrayForBufferView(i.bufferView),s=(0,H._m)(o.buffer,o.byteOffset),{parse:a}=r,u={...n};delete u["3d-tiles"];const l=await a(s,bt.Vl,u,r),c=function(t){const e={};for(const n in t){const r=t[n];if("indices"!==n){const t=wt(r);e[n]=t}}return e}(l.attributes);for(const[n,r]of Object.entries(c))if(n in e.attributes){const i=e.attributes[n],o=t.getAccessor(i);null!=o&&o.min&&null!=o&&o.max&&(r.min=o.min,r.max=o.max)}e.attributes=c,l.indices&&(e.indices=wt(l.indices)),function(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}(e)}function Mt(t,e){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;if(!i.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const s=i.DracoWriter.encodeSync({attributes:t}),a=null==o||null===(n=o.parseSync)||void 0===n?void 0:n.call(o,{attributes:t}),u=i._addFauxAttributes(a.attributes),l=i.addBufferView(s);return{primitives:[{attributes:u,mode:r,extensions:{[Et]:{bufferView:l,attributes:u}}}]}}function*It(t){for(const e of t.json.meshes||[])for(const t of e.primitives)yield t}var Ot=n(60033),Rt=n(87459);const Lt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Bt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},kt="KHR_texture_transform",Nt=kt,Ft=new Ot.A,Dt=new Rt.A,jt=new Rt.A;async function Ut(t,e){if(!new tt(t).getExtension(kt))return;const n=t.json.materials||[];for(let e=0;e<n.length;e++)Gt(e,t)}function Gt(t,e){var n,r,i;const o=[],s=null===(n=e.json.materials)||void 0===n?void 0:n[t],a=null==s||null===(r=s.pbrMetallicRoughness)||void 0===r?void 0:r.baseColorTexture;a&&zt(e,t,a,o);const u=null==s?void 0:s.emissiveTexture;u&&zt(e,t,u,o);const l=null==s?void 0:s.normalTexture;l&&zt(e,t,l,o);const c=null==s?void 0:s.occlusionTexture;c&&zt(e,t,c,o);const h=null==s||null===(i=s.pbrMetallicRoughness)||void 0===i?void 0:i.metallicRoughnessTexture;h&&zt(e,t,h,o)}function zt(t,e,n,r){const i=function(t,e){var n;const r=null===(n=t.extensions)||void 0===n?void 0:n[kt],{texCoord:i=0}=t,{texCoord:o=i}=r;if(!(-1!==e.findIndex(t=>{let[e,n]=t;return e===i&&n===o}))){const n=function(t){const{offset:e=[0,0],rotation:n=0,scale:r=[1,1]}=t,i=(new Rt.A).set(1,0,0,0,1,0,e[0],e[1],1),o=Dt.set(Math.cos(n),Math.sin(n),0,-Math.sin(n),Math.cos(n),0,0,0,1),s=jt.set(r[0],0,0,0,r[1],0,0,0,1);return i.multiplyRight(o).multiplyRight(s)}(r);return i!==o&&(t.texCoord=o),e.push([i,o]),{originalTexCoord:i,texCoord:o,matrix:n}}return null}(n,r);if(!i)return;const o=t.json.meshes||[];for(const n of o)for(const r of n.primitives){const n=r.material;Number.isFinite(n)&&e===n&&Vt(t,r,i)}}function Vt(t,e,n){const{originalTexCoord:r,texCoord:i,matrix:o}=n,s=e.attributes["TEXCOORD_".concat(r)];if(Number.isFinite(s)){var a;const n=null===(a=t.json.accessors)||void 0===a?void 0:a[s];if(n&&n.bufferView){var u;const s=null===(u=t.json.bufferViews)||void 0===u?void 0:u[n.bufferView];if(s){const{arrayBuffer:a,byteOffset:u}=t.buffers[s.buffer],l=(u||0)+(n.byteOffset||0)+(s.byteOffset||0),{ArrayType:c,length:h}=(0,K.aF)(n,s),A=Bt[n.componentType],f=Lt[n.type],d=s.byteStride||A*f,p=new Float32Array(h);for(let t=0;t<n.count;t++){const e=new c(a,l+t*d,2);Ft.set(e[0],e[1],1),Ft.transformByMatrix3(o),p.set([Ft[0],Ft[1]],t*f)}r===i?function(t,e,n,r){t.componentType=5126,n.push({arrayBuffer:r.buffer,byteOffset:0,byteLength:r.buffer.byteLength}),e.buffer=n.length-1,e.byteLength=r.buffer.byteLength,e.byteOffset=0,delete e.byteStride}(n,s,t.buffers,p):function(t,e,n,r,i){r.buffers.push({arrayBuffer:i.buffer,byteOffset:0,byteLength:i.buffer.byteLength});const o=r.json.bufferViews;if(!o)return;o.push({buffer:r.buffers.length-1,byteLength:i.buffer.byteLength,byteOffset:0});const s=r.json.accessors;s&&(s.push({bufferView:(null==o?void 0:o.length)-1,byteOffset:0,componentType:5126,count:e.count,type:"VEC2"}),n.attributes["TEXCOORD_".concat(t)]=s.length-1)}(i,n,e,t,p)}}}}const Ht="KHR_lights_punctual",qt=Ht;async function Wt(t){const e=new tt(t),{json:n}=e,r=e.getExtension(Ht);r&&(e.json.lights=r.lights,e.removeExtension(Ht));for(const t of n.nodes||[]){const n=e.getObjectExtension(t,Ht);
2n&&(t.light=n.light),e.removeObjectExtension(t,Ht)}}async function Xt(t){const e=new tt(t),{json:n}=e;if(n.lights){const t=e.addExtension(Ht);(0,q.v)(!t.lights),t.lights=n.lights,delete n.lights}if(e.json.lights){for(const t of e.json.lights){const n=t.node;e.addObjectExtension(n,Ht,t)}delete e.json.lights}}const Yt="KHR_materials_unlit",Qt=Yt;async function Jt(t){const e=new tt(t),{json:n}=e;for(const t of n.materials||[])t.extensions&&t.extensions.KHR_materials_unlit&&(t.unlit=!0),e.removeObjectExtension(t,Yt);e.removeExtension(Yt)}function Zt(t){const e=new tt(t),{json:n}=e;if(e.materials)for(const t of n.materials||[])t.unlit&&(delete t.unlit,e.addObjectExtension(t,Yt,{}),e.addExtension(Yt))}const Kt="KHR_techniques_webgl",$t=Kt;async function te(t){const e=new tt(t),{json:n}=e,r=e.getExtension(Kt);if(r){const t=function(t,e){const{programs:n=[],shaders:r=[],techniques:i=[]}=t,o=new TextDecoder;return r.forEach(t=>{if(!Number.isFinite(t.bufferView))throw new Error("KHR_techniques_webgl: no shader code");t.code=o.decode(e.getTypedArrayForBufferView(t.bufferView))}),n.forEach(t=>{t.fragmentShader=r[t.fragmentShader],t.vertexShader=r[t.vertexShader]}),i.forEach(t=>{t.program=n[t.program]}),i}(r,e);for(const r of n.materials||[]){const n=e.getObjectExtension(r,Kt);n&&(r.technique=Object.assign({},n,t[n.technique]),r.technique.values=ne(r.technique,e)),e.removeObjectExtension(r,Kt)}e.removeExtension(Kt)}}async function ee(t,e){}function ne(t,e){const n=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(e=>{t.uniforms[e].value&&!(e in n)&&(n[e]=t.uniforms[e].value)}),Object.keys(n).forEach(t=>{"object"==typeof n[t]&&void 0!==n[t].index&&(n[t].texture=e.getTexture(n[t].index))}),n}const re="EXT_feature_metadata",ie=re;async function oe(t){!function(t){var e;const n=t.getExtension(re),r=null==n||null===(e=n.schema)||void 0===e?void 0:e.classes,i=null==n?void 0:n.featureTables;if((null==n?void 0:n.featureTextures)&&console.warn('featureTextures is not yet supported in the "EXT_feature_metadata" extension.'),r&&i)for(const e in r){const n=r[e],o=ue(i,e);o&&se(t,o,n)}}(new tt(t))}function se(t,e,n){for(const i in n.properties){var r;const o=n.properties[i],s=null==e||null===(r=e.properties)||void 0===r?void 0:r[i],a=e.count;if(s){const e=ae(t,o,a,s);s.data=e}}}function ae(t,e,n,r){const i=r.bufferView;let o=t.getTypedArrayForBufferView(i);switch(e.type){case"STRING":{const e=r.stringOffsetBufferView;o=function(t,e,n){const r=[],i=new TextDecoder("utf8");let o=0;for(let s=0;s<n;s++){const n=e[4*(s+1)]-e[4*s],a=t.subarray(o,n+o),u=i.decode(a);r.push(u),o+=n}return r}(o,t.getTypedArrayForBufferView(e),n);break}}return o}function ue(t,e){for(const n in t){const r=t[n];if(r.class===e)return r}return null}const le=[r,i,o,s,u,l,c,a,h];function ce(t,e){var n;const r=(null==e||null===(n=e.gltf)||void 0===n?void 0:n.excludeExtensions)||{};return!(t in r&&!r[t])}const he="KHR_binary_glTF",Ae={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},fe={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class de{constructor(){(0,X.A)(this,"idToIndexMap",{animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}),(0,X.A)(this,"json",void 0)}normalize(t,e){this.json=t.json;const n=t.json;switch(n.asset&&n.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version ".concat(n.asset.version))}if(!e.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(n),this._convertTopLevelObjectsToArrays(n),function(t){const e=new tt(t),{json:n}=e;for(const t of n.images||[]){const n=e.getObjectExtension(t,he);n&&Object.assign(t,n),e.removeObjectExtension(t,he)}n.buffers&&n.buffers[0]&&delete n.buffers[0].uri,e.removeExtension(he)}(t),this._convertObjectIdsToArrayIndices(n),this._updateObjects(n),this._updateMaterial(n)}_addAsset(t){t.asset=t.asset||{},t.asset.version="2.0",t.asset.generator=t.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(t){for(const e in Ae)this._convertTopLevelObjectToArray(t,e)}_convertTopLevelObjectToArray(t,e){const n=t[e];if(n&&!Array.isArray(n)){t[e]=[];for(const r in n){const i=n[r];i.id=i.id||r;const o=t[e].length;t[e].push(i),this.idToIndexMap[e][r]=o}}}_convertObjectIdsToArrayIndices(t){for(const e in Ae)this._convertIdsToIndices(t,e);"scene"in t&&(t.scene=this._convertIdToIndex(t.scene,"scene"));for(const e of t.textures)this._convertTextureIds(e);for(const e of t.meshes)this._convertMeshIds(e);for(const e of t.nodes)this._convertNodeIds(e);for(const e of t.scenes)this._convertSceneIds(e)}_convertTextureIds(t){t.source&&(t.source=this._convertIdToIndex(t.source,"image"))}_convertMeshIds(t){for(const e of t.primitives){const{attributes:t,indices:n,material:r}=e;for(const e in t)t[e]=this._convertIdToIndex(t[e],"accessor");n&&(e.indices=this._convertIdToIndex(n,"accessor")),r&&(e.material=this._convertIdToIndex(r,"material"))}}_convertNodeIds(t){t.children&&(t.children=t.children.map(t=>
2this._convertIdToIndex(t,"node"))),t.meshes&&(t.meshes=t.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(t){t.nodes&&(t.nodes=t.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(t,e){t[e]||(console.warn("gltf v1: json doesn't contain attribute ".concat(e)),t[e]=[]);for(const n of t[e])for(const t in n){const e=n[t],r=this._convertIdToIndex(e,t);n[t]=r}}_convertIdToIndex(t,e){const n=fe[e];if(n in this.idToIndexMap){const r=this.idToIndexMap[n][t];if(!Number.isFinite(r))throw new Error("gltf v1: failed to resolve ".concat(e," with id ").concat(t));return r}return t}_updateObjects(t){for(const t of this.json.buffers)delete t.type}_updateMaterial(t){for(const i of t.materials){var e,n,r;i.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const o=(null===(e=i.values)||void 0===e?void 0:e.tex)||(null===(n=i.values)||void 0===n?void 0:n.texture2d_0)||(null===(r=i.values)||void 0===r?void 0:r.diffuseTex),s=t.textures.findIndex(t=>t.id===o);-1!==s&&(i.pbrMetallicRoughness.baseColorTexture={index:s})}}}const pe={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ge={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},me=10240,ye=10241,ve=10242,_e=10243,be={magFilter:10240,minFilter:10241,wrapS:10242,wrapT:10243},we={[me]:9729,[ye]:9986,[ve]:10497,[_e]:10497};class Ee{constructor(){(0,X.A)(this,"baseUri",""),(0,X.A)(this,"json",{}),(0,X.A)(this,"buffers",[]),(0,X.A)(this,"images",[])}postProcess(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{json:n,buffers:r=[],images:i=[],baseUri:o=""}=t;return(0,q.v)(n),this.baseUri=o,this.json=n,this.buffers=r,this.images=i,this._resolveTree(this.json,e),this.json}_resolveTree(t){t.bufferViews&&(t.bufferViews=t.bufferViews.map((t,e)=>this._resolveBufferView(t,e))),t.images&&(t.images=t.images.map((t,e)=>this._resolveImage(t,e))),t.samplers&&(t.samplers=t.samplers.map((t,e)=>this._resolveSampler(t,e))),t.textures&&(t.textures=t.textures.map((t,e)=>this._resolveTexture(t,e))),t.accessors&&(t.accessors=t.accessors.map((t,e)=>this._resolveAccessor(t,e))),t.materials&&(t.materials=t.materials.map((t,e)=>this._resolveMaterial(t,e))),t.meshes&&(t.meshes=t.meshes.map((t,e)=>this._resolveMesh(t,e))),t.nodes&&(t.nodes=t.nodes.map((t,e)=>this._resolveNode(t,e))),t.skins&&(t.skins=t.skins.map((t,e)=>this._resolveSkin(t,e))),t.scenes&&(t.scenes=t.scenes.map((t,e)=>this._resolveScene(t,e))),void 0!==t.scene&&(t.scene=t.scenes[this.json.scene])}getScene(t){return this._get("scenes",t)}getNode(t){return this._get("nodes",t)}getSkin(t){return this._get("skins",t)}getMesh(t){return this._get("meshes",t)}getMaterial(t){return this._get("materials",t)}getAccessor(t){return this._get("accessors",t)}getCamera(t){return null}getTexture(t){return this._get("textures",t)}getSampler(t){return this._get("samplers",t)}getImage(t){return this._get("images",t)}getBufferView(t){return this._get("bufferViews",t)}getBuffer(t){return this._get("buffers",t)}_get(t,e){if("object"==typeof e)return e;const n=this.json[t]&&this.json[t][e];return n||console.warn("glTF file error: Could not find ".concat(t,"[").concat(e,"]")),n}_resolveScene(t,e){return t.id=t.id||"scene-".concat(e),t.nodes=(t.nodes||[]).map(t=>this.getNode(t)),t}_resolveNode(t,e){return t.id=t.id||"node-".concat(e),t.children&&(t.children=t.children.map(t=>this.getNode(t))),void 0!==t.mesh?t.mesh=this.getMesh(t.mesh):void 0!==t.meshes&&t.meshes.length&&(t.mesh=t.meshes.reduce((t,e)=>{const n=this.getMesh(e);return t.id=n.id,t.primitives=t.primitives.concat(n.primitives),t},{primitives:[]})),void 0!==t.camera&&(t.camera=this.getCamera(t.camera)),void 0!==t.skin&&(t.skin=this.getSkin(t.skin)),t}_resolveSkin(t,e){return t.id=t.id||"skin-".concat(e),t.inverseBindMatrices=this.getAccessor(t.inverseBindMatrices),t}_resolveMesh(t,e){return t.id=t.id||"mesh-".concat(e),t.primitives&&(t.primitives=t.primitives.map(t=>{const e=(t={...t}).attributes;t.attributes={};for(const n in e)t.attributes[n]=this.getAccessor(e[n]);return void 0!==t.indices&&(t.indices=this.getAccessor(t.indices)),void 0!==t.material&&(t.material=this.getMaterial(t.material)),t})),t}_resolveMaterial(t,e){if(t.id=t.id||"material-".concat(e),t.normalTexture&&(t.normalTexture={...t.normalTexture},t.normalTexture.texture=this.getTexture(t.normalTexture.index)),t.occlusionTexture&&(t.occlustionTexture={...t.occlustionTexture},t.occlusionTexture.texture=this.getTexture(t.occlusionTexture.index)),t.emissiveTexture&&(t.emmisiveTexture={...t.emmisiveTexture},t.emissiveTexture.texture=this.getTexture(t.emissiveTexture.index)),t.emissiveFactor||(t.emissiveFactor=t.emmisiveTexture?[1,1,1]:[0,0,0]),t.pbrMetallicRoughness){t.pbrMetallicRoughness={...t.pbrMetallicRoughness};const e=t.pbrMetallicRoughness;e.baseColorTexture&&(e.baseColorTexture={...e.baseColorTexture},e.baseColorTexture.texture=this.getTexture(e.baseColorTexture.index)),e.metallicRoughnessTexture&&(e.metallicRoughnessTexture={...e.metallicRoughnessTexture},e.metallicRoughnessTexture.texture=this.getTexture(e.metallicRoughnessTexture.index))}return t}_resolveAccessor(t,e){var n,r;if(t.id=t.id||"accessor-".concat(e),void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView)),t.bytesPerComponent=(n=t.componentType,ge[n]),t.components=(r=t.type,pe[r]),t.bytesPerElement=t.bytesPerComponent*t.components,t.bufferView){const e=t.bufferView.buffer,{ArrayType:n,byteLength:r}=(0,K.aF)(t,t.bufferView),i=(t.bufferView.byteOffset||0)+(t.byteOffset||0)+e.byteOffset;let o=e.arrayBuffer.slice(i,i+r);t.bufferView.byteStride&&(o=this._getValueFromInterleavedBuffer(e,i,t.bufferView.byteStride,t.bytesPerElement,t.count)),t.value=new n(o)}return t}_getValueFromInterleavedBuffer(t,e,n,r,i){const o=new Uint8Array(i*r);for(let s=0;s<i;s++){const i=e+s*n;o.set(new Uint8Array(t.arrayBuffer.slice(i,i+r)),s*r)}return o.buffer}_resolveTexture(t,e){return t.id=t.id||"texture-".concat(e),t.sampler="sampler"in t?this.get
2Sampler(t.sampler):we,t.source=this.getImage(t.source),t}_resolveSampler(t,e){t.id=t.id||"sampler-".concat(e),t.parameters={};for(const e in t){const n=this._enumSamplerParameter(e);void 0!==n&&(t.parameters[n]=t[e])}return t}_enumSamplerParameter(t){return be[t]}_resolveImage(t,e){t.id=t.id||"image-".concat(e),void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView));const n=this.images[e];return n&&(t.image=n),t}_resolveBufferView(t,e){const n=t.buffer,r={id:"bufferView-".concat(e),...t,buffer:this.buffers[n]},i=this.buffers[n].arrayBuffer;let o=this.buffers[n].byteOffset||0;return"byteOffset"in t&&(o+=t.byteOffset),r.data=new Uint8Array(i,o,t.byteLength),r}_resolveCamera(t,e){return t.id=t.id||"camera-".concat(e),t.perspective,t.orthographic,t}}const xe=1735152710,Se=!0;function Te(t,e,n,r){const i=new Uint8Array(e.buffer,n,r),o=new TextDecoder("utf8").decode(i);return t.json=JSON.parse(o),J(r,4)}function Pe(t,e,n,r){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:n,byteLength:r,arrayBuffer:e.buffer}),J(r,4)}async function Ce(t,e){var n,r,i,o;let s=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;!function(t,e,n,r){if(r.uri&&(t.baseUri=r.uri),e instanceof ArrayBuffer&&!function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new DataView(t),{magic:i=xe}=n,o=r.getUint32(e,!1);return o===i||o===xe}(e,n,r)&&(e=(new TextDecoder).decode(e)),"string"==typeof e)t.json=function(t){try{return JSON.parse(t)}catch(e){throw new Error('Failed to parse JSON from data starting with "'.concat(function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return"string"==typeof t?t.slice(0,e):ArrayBuffer.isView(t)?V(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?V(t,0,e):""}(t),'"'))}}(e);else if(e instanceof ArrayBuffer){const i={};n=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=new DataView(e),o=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"".concat(String.fromCharCode(t.getUint8(e+0))).concat(String.fromCharCode(t.getUint8(e+1))).concat(String.fromCharCode(t.getUint8(e+2))).concat(String.fromCharCode(t.getUint8(e+3)))}(i,n+0),s=i.getUint32(n+4,Se),a=i.getUint32(n+8,Se);switch(Object.assign(t,{header:{byteOffset:n,byteLength:a,hasBinChunk:!1},type:o,version:s,json:{},binChunks:[]}),n+=12,t.version){case 1:return function(t,e,n){(0,Q.v)(t.header.byteLength>20);const r=e.getUint32(n+0,Se),i=e.getUint32(n+4,Se);return n+=8,(0,Q.v)(0===i),Te(t,e,n,r),(n+=r)+Pe(t,e,n,t.header.byteLength)}(t,i,n);case 2:return function(t,e,n,r){return(0,Q.v)(t.header.byteLength>20),function(t,e,n,r){for(;n+8<=t.header.byteLength;){const i=e.getUint32(n+0,Se),o=e.getUint32(n+4,Se);switch(n+=8,o){case 1313821514:Te(t,e,n,i);break;case 5130562:Pe(t,e,n,i);break;case 0:r.strict||Te(t,e,n,i);break;case 1:r.strict||Pe(t,e,n,i)}n+=J(i,4)}}(t,e,n,r),n+t.header.byteLength}(t,i,n,r={});default:throw new Error("Invalid GLB version ".concat(t.version,". Only supports v1 and v2."))}}(i,e,n,r.glb),(0,q.v)("glTF"===i.type,"Invalid GLB magic string ".concat(i.type)),t._glb=i,t.json=i.json}else(0,q.v)(!1,"GLTF: must be ArrayBuffer or string");const i=t.json.buffers||[];if(t.buffers=new Array(i.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:e}=t._glb;t.buffers[0]={arrayBuffer:e[0].arrayBuffer,byteOffset:e[0].byteOffset,byteLength:e[0].byteLength}}const o=t.json.images||[];t.images=new Array(o.length).fill({})}(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s),function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(new de).normalize(t,e)}(t,{normalize:null==s||null===(n=s.gltf)||void 0===n?void 0:n.normalize}),function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=le.filter(t=>ce(t.name,e));for(const o of r){var i;null===(i=o.preprocess)||void 0===i||i.call(o,t,e,n)}}(t,s,a);const u=[];
2if(null!=s&&null!==(r=s.gltf)&&void 0!==r&&r.loadBuffers&&t.json.buffers&&await async function(t,e,n){const r=t.json.buffers||[];for(let s=0;s<r.length;++s){const a=r[s];if(a.uri){var i,o;const{fetch:r}=n;(0,q.v)(r);const u=W(a.uri,e),l=await(null==n||null===(i=n.fetch)||void 0===i?void 0:i.call(n,u)),c=await(null==l||null===(o=l.arrayBuffer)||void 0===o?void 0:o.call(l));t.buffers[s]={arrayBuffer:c,byteOffset:0,byteLength:c.byteLength},delete a.uri}else null===t.buffers[s]&&(t.buffers[s]={arrayBuffer:new ArrayBuffer(a.byteLength),byteOffset:0,byteLength:a.byteLength})}}(t,s,a),null!=s&&null!==(i=s.gltf)&&void 0!==i&&i.loadImages){const e=async function(t,e,n){const r=function(t){const e=new Set,n=t.json.textures||[];for(const t of n)void 0!==t.source&&e.add(t.source);return Array.from(e).sort()}(t),i=t.json.images||[],o=[];for(const s of r)o.push(Me(t,i[s],s,e,n));return await Promise.all(o)}(t,s,a);u.push(e)}const l=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=le.filter(t=>ce(t.name,e));for(const o of r){var i;await(null===(i=o.decode)||void 0===i?void 0:i.call(o,t,e,n))}}(t,s,a);return u.push(l),await Promise.all(u),null!=s&&null!==(o=s.gltf)&&void 0!==o&&o.postProcess?function(t,e){return(new Ee).postProcess(t,e)}(t,s):t}async function Me(t,e,n,r,i){const{fetch:o,parse:s}=i;let a;if(e.uri&&!e.hasOwnProperty("bufferView")){const t=W(e.uri,r),n=await o(t);a=await n.arrayBuffer(),e.bufferView={data:a}}if(Number.isFinite(e.bufferView)){const n=function(t,e,n){const r=t.bufferViews[n];(0,q.v)(r);const i=e[r.buffer];(0,q.v)(i);const o=(r.byteOffset||0)+i.byteOffset;return new Uint8Array(i.arrayBuffer,o,r.byteLength)}(t.json,t.buffers,e.bufferView);a=(0,H._m)(n.buffer,n.byteOffset,n.byteLength)}(0,q.v)(a,"glTF image has no data");let u=await s(a,[z.$,G],{mimeType:e.mimeType,basis:r.basis||{format:U()}},i);u&&u[0]&&(u={compressed:!0,mipmaps:!1,width:u[0].width,height:u[0].height,data:u[0]}),t.images=t.images||[],t.images[n]=u}const Ie={name:"glTF",id:"gltf",module:"gltf",version:"3.4.15",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;e={...Ie.options,...e},e.gltf={...Ie.options.gltf,...e.gltf};const{byteOffset:r=0}=e;return await Ce({},t,r,e,n)},options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}}},35020:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureDistanceMode=void 0;var r=s(n(71123)),i=s(n(41916)),o=n(71169);function s(t){return t&&t.__esModule?t:{default:t}}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(p,t);var e,n,s,l=(s=p,function(){var t,e=A(s);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=A(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?h(t):e}(this,t)});function p(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return d(h(t=l.call.apply(l,[this].concat(n))),"_isMeasuringSessionFinished",!1),d(h(t),"_currentTooltips",[]),d(h(t),"_currentDistance",0),d(h(t),"_calculateDistanceForTooltip",function(t){var e=t.positionA,n=t.positionB,i=t.modeConfig||{},o=i.turfOptions,s=i.measurementCallback,a=(0,r.default)(e,n,o);return s&&s(a),a}),t}return e=p,(n=[{key:"_formatTooltip",value:function(t,e){var n=e||{},r=n.formatTooltip,i=n.turfOptions,o=i&&i.units||"kilometers";return r?r(t):"".concat(parseFloat(t).toFixed(2)," ").concat(o)}},{key:"handleClick",value:function(t,e){var n=e.modeConfig,r=e.data,s=e.onEdit,a=(n||{}).centerTooltipsOnLine,u=void 0!==a&&a;this._isMeasuringSessionFinished&&(this._isMeasuringSessionFinished=!1,this.resetClickSequence(),this._currentTooltips=[],this._currentDistance=0);var l=t.picks,c=(0,o.getPickedEditHandle)(l),h=!1;c||(this.addClickSequence(t),h=!0);var A=this.getClickSequence();if(A.length>1&&c&&Array.isArray(c.properties.positionIndexes)&&c.properties.positionIndexes[0]===A.length-1)this._isMeasuringSessionFinished=!0;else if(h){if(A.length>1){this._currentDistance+=this._calculateDistanceForTooltip({positionA:A[A.length-2],positionB:A[A.length-1],modeConfig:n});var f=u?(0,i.default)(A[A.length-2],A[A.length-1]).geometry.coordinates:t.mapCoords;this._currentTooltips.push({position:f,text:this._formatTooltip(this._currentDistance,n)})}s({updatedData:r,editType:"addTentativePosition",editContext:{position:t.mapCoords}})}}},{key:"handleKeyUp",value:function(t,e){if(!this._isMeasuringSessionFinished){t.stopPropagation();var n=t.key,r=this.getClickSequence().length;switch(n){case"Escape":this._isMeasuringSessionFinished=!0,1===r&&(this.resetClickSequence(),this._currentTooltips=[]),e.onUpdateCursor("cell");break;case"Enter":this.handleClick(e.lastPointerMoveEvent,e),this._isMeasuringSessionFinished=!0}}}},{key:"getGuides",value:function(t){var e,n=t.lastPointerMoveEvent,r=this.getClickSequence(),i=n&&!this._isMeasuringSessionFinished?[n.mapCoords]:[],o={type:"FeatureCollection",features:[]};r.length>0&&o.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(u(r),i)}});var s=r.map(function(t,e){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[e]},geometry:{type:"Point",coordinates:t}}});return(e=o.features).push.apply(e,u(s)),o}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}},{key:"getTooltips",value:function(t){var e=t.lastPointerMoveEvent,n=t.modeConfig,r=(n||{}).centerTooltipsOnLine,o=void 0!==r&&r,s=this.getClickSequence();if(s.length>0&&e&&!this._isMeasuringSessionFinished){var a=this._calculateDistanceForTooltip({positionA:s[s.length-1],positionB:e.mapCoords,modeConfig:t.modeConfig}),l=o?(0,i.default)(s[s.length-1],e.mapCoords).geometry.coordinates:e.mapCoords;return[].concat(u(this._currentTooltips),[{position:l,text:this._formatTooltip(this._currentDistance+a,n)}])}return this._currentTooltips}}])&&c(e.prototype,n),p}(n(96146).GeoJsonEditMode);e.MeasureDistanceMode=p},35423:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(24586);const i=new class{constructor(t={}){(0,r.A)(this,"_pool",[]),(0,r.A)(this,"opts",{overAlloc:2,poolSize:100}),this.setOptions(t)}setOptions(t){Object.assign(this.opts,t)}
2allocate(t,e,{size:n=1,type:r,padding:i=0,copy:o=!1,initialize:s=!1,maxCount:a}){const u=r||t&&t.constructor||Float32Array,l=e*n+i;if(ArrayBuffer.isView(t)){if(l<=t.length)return t;if(l*t.BYTES_PER_ELEMENT<=t.buffer.byteLength)return new u(t.buffer,0,l)}let c=1/0;a&&(c=a*n+i);const h=this._allocate(u,l,s,c);return t&&o?h.set(t):s||h.fill(0,0,4),this._release(t),h}release(t){this._release(t)}_allocate(t,e,n,r){let i=Math.max(Math.ceil(e*this.opts.overAlloc),1);i>r&&(i=r);const o=this._pool,s=t.BYTES_PER_ELEMENT*i,a=o.findIndex(t=>t.byteLength>=s);if(a>=0){const e=new t(o.splice(a,1)[0],0,i);return n&&e.fill(0),e}return new t(i)}_release(t){if(!ArrayBuffer.isView(t))return;const e=this._pool,{buffer:n}=t,{byteLength:r}=n,i=e.findIndex(t=>t.byteLength>=r);i<0?e.push(n):(i>0||e.length<this.opts.poolSize)&&e.splice(i,0,n),e.length>this.opts.poolSize&&e.shift()}}},35687:(t,e,n)=>{"use strict";function r(t){const e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(e+1):""}function i(t){const e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(0,e):""}n.d(e,{iW:()=>r,pD:()=>i})},36038:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.SELECTION_TYPE=void 0;var r,i=n(57414),o=n(44776),s=n(89595),a=h(n(81182)),u=h(n(8755)),l=n(20952),c=h(n(33e3));function h(t){return t&&t.__esModule?t:{default:t}}function A(t){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(t)}function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach(function(e){w(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(t){return function(t){if(Array.isArray(t))return y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(t,e)||m(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_(t)}function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}function w(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var E={NONE:null,RECTANGLE:"rectangle",POLYGON:"polygon"};e.SELECTION_TYPE=E;var x=(w(r={},E.RECTANGLE,l.DrawRectangleMode),w(r,E.POLYGON,l.DrawPolygonMode),r),S=w({},E.RECTANGLE,{dragToDraw:!0}),T={selectionType:E.RECTANGLE,layerIds:[],onSelect:function(){}},P={type:"FeatureCollection",features:[]},C="selection-blocker",M=["lineWidthScale","lineWidthMinPixels","lineWidthMaxPixels","lineWidthUnits","lineJointRounded","lineCapRounded","lineMiterLimit","pointRadiusScale","pointRadiusMinPixels","pointRadiusMaxPixels","lineDashJustified","getLineColor","getFillColor","getRadius","getLineWidth","getLineDashArray","getTentativeLineDashArray","getTentativeLineColor","getTentativeFillColor","getTentativeLineWidth"],I=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(h,t);var e,n,r,i=(r=h,function(){var t,e=_(r);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=_(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==A(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function h(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),i.apply(this,arguments)}return e=h,(n=[{key:"_selectRectangleObjects",value:function(t){var e=this.props,n=e.layerIds,r=e.onSelect,i=g(this.context.viewport.project(t[0][0]),2),o=i[0],s=i[1],a=g(this.context.viewport.project(t[0][2]),2),u=a[0],l=a[1];r({pickingInfos:this.context.deck.pickObjects({x:Math.min(o,u),y:Math.min(s,l),width:Math.abs(u-o),height:Math.abs(l-s),layerIds:n})})}},{key:"_selectPolygonObjects",value:function(t){var e,n=this,r=this.props,i=r.layerIds,o=r.onSelect,l=t[0].map(function(t){return n.context.viewport.project(t)}),c=l.map(function(t){return t[0]}),h=l.map(function(t){return t[1]}),A=Math.min.apply(Math,p(c)),f=Math.min.apply(Math,p(h)),d=Math.max.apply(Math,p(c)),g=Math.max.apply(Math,p(h)),m=(0,s.polygon)(t),y=(0,a.default)(m,50);try{e=(0,u.default)(y,m)}catch(t){return void console.log("turfDifference() error",t)}
2this.setState({pendingPolygonSelection:{bigPolygon:e}});var v="".concat(this.props.id,"-").concat(C);setTimeout(function(){var t=n.context.deck.pickObjects({x:A,y:f,width:d-A,height:g-f,layerIds:[v].concat(p(i))});o({pickingInfos:t.filter(function(t){return t.layer.id!==n.props.id})})},250)}},{key:"renderLayers",value:function(){var t=this,e=this.state.pendingPolygonSelection,n=x[this.props.selectionType]||l.ViewMode,r=S[this.props.selectionType],i={};M.forEach(function(e){void 0!==t.props[e]&&(i[e]=t.props[e])});var s=[new c.default(this.getSubLayerProps(d({id:"selection-geojson",pickable:!0,mode:n,modeConfig:r,selectedFeatureIndexes:[],data:P,onEdit:function(e){var n=e.updatedData;if("addFeature"===e.editType){var r=n.features[0].geometry.coordinates;t.props.selectionType===E.RECTANGLE?t._selectRectangleObjects(r):t.props.selectionType===E.POLYGON&&t._selectPolygonObjects(r)}}},i)))];if(e){var a=e.bigPolygon;s.push(new o.PolygonLayer(this.getSubLayerProps({id:C,pickable:!0,stroked:!1,opacity:1,data:[a],getLineColor:function(t){return[0,0,0,1]},getFillColor:function(t){return[0,0,0,1]},getPolygon:function(t){return t.geometry.coordinates}})))}return s}},{key:"shouldUpdateState",value:function(t){var e=t.changeFlags,n=e.stateChanged,r=e.propsOrDataChanged;return n||r}}])&&v(e.prototype,n),h}(i.CompositeLayer);e.default=I,w(I,"layerName","SelectionLayer"),w(I,"defaultProps",T)},36482:(t,e,n)=>{"use strict";const r=n(97658),i=n(82535),o=n(98500);t.exports={XMLParser:i,XMLValidator:r,XMLBuilder:o}},36828:(t,e,n)=>{"use strict";var r=n(14607),i=r("Number.prototype.toString"),o=r("Object.prototype.toString"),s=n(51913)();t.exports=function(t){return"number"==typeof t||!(!t||"object"!=typeof t)&&(s?function(t){try{return i(t),!0}catch(t){return!1}}(t):"[object Number]"===o(t))}},37278:(t,e,n)=>{"use strict";n.d(e,{A:()=>F});var r=n(11129),i=n(99608),o=n(27371),s=n(10707),a=n(23615),u=n(44454),l=n(32411),c=n(60033),h=n(9946),A=n(2592),f=n(94939);class d{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e}=t;this.id=e||(0,A.Ld)(this.constructor.name),this.display=!0,this.position=new c.A,this.rotation=new c.A,this.scale=new c.A(1,1,1),this.matrix=new h.A,this.userData={},this.props={},this._setScenegraphNodeProps(t)}delete(){}setProps(t){return this._setScenegraphNodeProps(t),this}toString(){return"{type: ScenegraphNode, id: ".concat(this.id,")}")}getBounds(){return null}setPosition(t){return(0,f.v)(3===t.length,"setPosition requires vector argument"),this.position=t,this}setRotation(t){return(0,f.v)(3===t.length,"setRotation requires vector argument"),this.rotation=t,this}setScale(t){return(0,f.v)(3===t.length,"setScale requires vector argument"),this.scale=t,this}setMatrix(t){arguments.length>
21&&void 0!==arguments[1]&&!arguments[1]?this.matrix=t:this.matrix.copy(t)}setMatrixComponents(t){let{position:e,rotation:n,scale:r,update:i=!0}=t;return e&&this.setPosition(e),n&&this.setRotation(n),r&&this.setScale(r),i&&this.updateMatrix(),this}updateMatrix(){const t=this.position,e=this.rotation,n=this.scale;return this.matrix.identity(),this.matrix.translate(t),this.matrix.rotateXYZ(e),this.matrix.scale(n),this}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{position:e,rotation:n,scale:r}=t;return e&&this.setPosition(e),n&&this.setRotation(n),r&&this.setScale(r),this.updateMatrix(),this}getCoordinateUniforms(t,e){(0,f.v)(t),e=e||this.matrix;const n=new h.A(t).multiplyRight(e),r=n.invert(),i=r.transpose();return{viewMatrix:t,modelMatrix:e,objectMatrix:e,worldMatrix:n,worldInverseMatrix:r,worldInverseTransposeMatrix:i}}_setScenegraphNodeProps(t){"display"in t&&(this.display=t.display),"position"in t&&this.setPosition(t.position),"rotation"in t&&this.setRotation(t.rotation),"scale"in t&&this.setScale(t.scale),"matrix"in t&&this.setMatrix(t.matrix),Object.assign(this.props,t)}}var p=n(63564),g=n(6105);class m extends d{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=Array.isArray(t)?{children:t}:t;const{children:e=[]}=t;u.Rm.assert(e.every(t=>t instanceof d),"every child must an instance of ScenegraphNode"),super(t),this.children=e}add(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(const t of e)Array.isArray(t)?this.add(...t):this.children.push(t);return this}remove(t){const e=this.children,n=e.indexOf(t);return n>-1&&e.splice(n,1),this}removeAll(){return this.children=[],this}delete(){this.children.forEach(t=>t.delete()),this.removeAll(),super.delete()}getBounds(){const t=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];return this.traverse((e,n)=>{let{worldMatrix:r}=n;const i=e.getBounds();if(!i)return;const[o,s]=i,a=new c.A(o).add(s).divide([2,2,2]);r.transformAsPoint(a,a);const u=new c.A(s).subtract(o).divide([2,2,2]);r.transformAsVector(u,u);for(let e=0;e<8;e++){const n=new c.A(1&e?-1:1,2&e?-1:1,4&e?-1:1).multiply(u).add(a);for(let e=0;e<3;e++)t[0][e]=Math.min(t[0][e],n[e]),t[1][e]=Math.max(t[1][e],n[e])}}),Number.isFinite(t[0][0])?t:null}traverse(t){let{worldMatrix:e=new h.A}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new h.A(e).multiplyRight(this.matrix);for(const e of this.children)e instanceof m?e.traverse(t,{worldMatrix:n}):t(e,{worldMatrix:n})}}var y=n(64086);const v={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},_={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function b(t){if(!t._animation){const e=_[t.componentType],n=v[t.type],r=n*t.count,{buffer:i,byteOffset:o}=t.bufferView.data,s=new e(i,o+(t.byteOffset||0),r);if(1===n)t._animation=Array.from(s);else{const e=[];for(let t=0;t<s.length;t+=n)e.push(Array.from(s.slice(t,t+n)));t._animation=e}}return t._animation}const w=new h.A,E=new y.A;class x{constructor(t){this.startTime=0,this.playing=!0,this.speed=1,this.channels=[],Object.assign(this,t)}animate(t){if(!this.playing)return;const e=(t/1e3-this.startTime)*this.speed;this.channels.forEach(t=>{let{sampler:n,target:r,path:i}=t;(function(t,e,n,r){let{input:i,interpolation:o,output:s}=e;const a=t%i[i.length-1],l=i.findIndex(t=>t>=a),c=Math.max(0,l-1);if(!Array.isArray(n[r]))switch(r){case"translation":n[r]=[0,0,0];break;case"rotation":n[r]=[0,0,0,1];break;case"scale":n[r]=[1,1,1];break;default:u.Rm.warn("Bad animation path ".concat(r))()}(0,f.v)(n[r].length===s[c].length);const h=i[c],A=i[l];switch(o){case"STEP":!function(t,e,n){for(let r=0;r<n.length;r++)t[e][r]=n[r]}(n,r,s[c]);break;case"LINEAR":if(A>h){const t=(a-h)/(A-h);!function(t,e,n,r,i){if("rotation"===e){E.slerp({start:n,target:r,ratio:i});for(let n=0;n<E.length;n++)t[e][n]=E[n]}else for(let o=0;o<n.length;o++)t[e][o]=i*r[o]+(1-i)*n[o]}(n,r,s[c],s[l],t)}break;case"CUBICSPLINE":if(A>h){const t=(a-h)/(A-h),e=A-h;!function(t,e,n){let{p0:r,outTangent0:i,inTangent1:o,p1:s,tDiff:a,ratio:u}=n;for(let n=0;n<t[e].length;n++){const l=i[n]*a,c=o[n]*a;t[e][n]=(2*Math.pow(u,3)-3*Math.pow(u,2)+1)*r[n]+(Math.pow(u,3)-2*Math.pow(u,2)+u)*l+(-2*Math.pow(u,3)+3*Math.pow(u,2))*s[n]+(Math.pow(u,3)-Math.pow(u,2))*c}}(n,r,{p0:s[3*c+1],outTangent0:s[3*c+2],inTangent1:s[3*l+0],p1:s[3*l+1],tDiff:e,ratio:t})}break;default:u.Rm.warn("Interpolation ".concat(o," not supported"))()}})(e,n,r,i),function(t,e){if(e.matrix.identity(),t.translation&&e.matrix.translate(t.translation),t.rotation){const n=w.fromQuaternion(t.rotation);e.matrix.multiplyRight(n)}t.scale&&e.matrix.scale(t.scale)}(r,r._node)})}}class S{constructor(t){this.animations=t.animations.map((e,n)=>{const r=e.name||"Animation-".concat(n),i=e.samplers.map(e=>
2{let{input:n,interpolation:r="LINEAR",output:i}=e;return{input:b(t.accessors[n]),interpolation:r,output:b(t.accessors[i])}}),o=e.channels.map(e=>{let{sampler:n,target:r}=e;return{sampler:i[n],target:t.nodes[r.node],path:r.path}});return new x({name:r,channels:o})})}animate(t){this.setTime(t)}setTime(t){this.animations.forEach(e=>e.animate(t))}getAnimations(){return this.animations}}var T=n(25330);class P extends d{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.onBeforeRender=null,this.AfterRender=null,t instanceof T.A?(this.model=t,this._setModelNodeProps(e)):this.model=new T.A(t,e),this.bounds=null,this.managedResources=e.managedResources||[]}setProps(t){return super.setProps(t),this._setModelNodeProps(t),this}getBounds(){return this.bounds}delete(){this.model&&(this.model.delete(),this.model=null),this.managedResources.forEach(t=>t.delete()),this.managedResources=[]}draw(){return this.model.draw(...arguments)}setUniforms(){return this.model.setUniforms(...arguments),this}setAttributes(){return this.model.setAttributes(...arguments),this}updateModuleSettings(){return this.model.updateModuleSettings(...arguments),this}_setModelNodeProps(t){this.model.setProps(t)}}var C=n(71465);function M(t,e){return(0,u.C6)(t)?"#version 300 es\n".concat(e):e}const I={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},O={modelOptions:{},pbrDebug:!1,imageBasedLightingEnvironment:null,lights:!0,useTangents:!1};class R{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=t,this.options=Object.assign({},O,e)}instantiate(t){return this.gltf=t,(t.scenes||[]).map(t=>this.createScene(t))}createAnimator(){return Array.isArray(this.gltf.animations)?new S(this.gltf):null}createScene(t){const e=(t.nodes||[]).map(t=>this.createNode(t));return new m({id:t.name||t.id,children:e})}createNode(t){if(!t._node){const e=(t.children||[]).map(t=>this.createNode(t));t.mesh&&e.push(this.createMesh(t.mesh));const n=new m({id:t.name||t.id,children:e});if(t.matrix)n.setMatrix(t.matrix);else{if(n.matrix.identity(),t.translation&&n.matrix.translate(t.translation),t.rotation){const e=(new h.A).fromQuaternion(t.rotation);n.matrix.multiplyRight(e)}t.scale&&n.matrix.scale(t.scale)}t._node=n}return t._node}createMesh(t){if(!t._mesh){const e=(t.primitives||[]).map((e,n)=>this.createPrimitive(e,n,t)),n=new m({id:t.name||t.id,children:e});t._mesh=n}return t._mesh}getVertexCount(t){u.Rm.warn("getVertexCount() not found")()}createPrimitive(t,e,n){const r=function(t,e){const{id:n,drawMode:r,vertexCount:i,attributes:o,modelOptions:s}=e,a=new C.A(t,e);u.Rm.info(4,"createGLTFModel defines: ",a.defines)();const c=[];c.push(...a.generatedTextures),c.push(...Object.values(o).map(t=>t.buffer));const h=new P(t,{id:n,drawMode:r,vertexCount:i,modules:[l.R],parameters:a.parameters,vs:M(t,"\n#if (__VERSION__ < 300)\n #define _attr attribute\n#else\n #define _attr in\n#endif\n\n _attr vec4 POSITION;\n\n #ifdef HAS_NORMALS\n _attr vec4 NORMAL;\n #endif\n\n #ifdef HAS_TANGENTS\n _attr vec4 TANGENT;\n #endif\n\n #ifdef HAS_UV\n _attr vec2 TEXCOORD_0;\n #endif\n\n void main(void) {\n vec4 _NORMAL = vec4(0.);\n vec4 _TANGENT = vec4(0.);\n vec2 _TEXCOORD_0 = vec2(0.);\n\n #ifdef HAS_NORMALS\n _NORMAL = NORMAL;\n #endif\n\n #ifdef HAS_TANGENTS\n _TANGENT = TANGENT;\n #endif\n\n #ifdef HAS_UV\n _TEXCOORD_0 = TEXCOORD_0;\n #endif\n\n pbr_setPositionNormalTangentUV(POSITION, _NORMAL, _TANGENT, _TEXCOORD_0);\n gl_Position = u_MVPMatrix * POSITION;\n }\n"),fs:M(t,"\n#if (__VERSION__ < 300)\n #define fragmentColor gl_FragColor\n#else\n out vec4 fragmentColor;\n#endif\n\n void main(void) {\n fragmentColor = pbr_filterColor(vec4(0));\n }\n"),managedResources:c,...s,defines:{...a.defines,...s.defines}});return h.setProps({attributes:o}),h.setUniforms(a.uniforms),h}(this.gl,Object.assign({id:t.name||"".concat(n.name||n.id,"-primitive-").concat(e),drawMode:t.mode||4,vertexCount:t.indices?t.indices.count:this.getVertexCount(t.attributes),attributes:this.createAttributes(t.attributes,t.indices),material:t.material},this.options));return r.bounds=[t.attributes.POSITION.min,t.attributes.POSITION.max],r}createAttributes(t,e){const n={};
2return Object.keys(t).forEach(e=>{n[e]=this.createAccessor(t[e],this.createBuffer(t[e],this.gl.ARRAY_BUFFER))}),e&&(n.indices=this.createAccessor(e,this.createBuffer(e,this.gl.ELEMENT_ARRAY_BUFFER))),u.Rm.info(4,"glTF Attributes",{attributes:t,indices:e,generated:n})(),n}createBuffer(t,e){t.bufferView||(t.bufferView={});const{bufferView:n}=t;return n.lumaBuffers||(n.lumaBuffers={}),n.lumaBuffers[e]||(n.lumaBuffers[e]=new p.A(this.gl,{id:"from-".concat(n.id),data:n.data||t.value,target:e})),n.lumaBuffers[e]}createAccessor(t,e){return new g.A({buffer:e,offset:t.byteOffset||0,stride:t.bufferView.byteStride||0,type:t.componentType,size:I[t.type]})}createSampler(t){return t}needsPOT(){return!1}}var L=n(34898);var B=n(67267);const k=[255,255,255,255],N={scenegraph:{type:"object",value:null,async:!0},getScene:t=>t&&t.scenes?"object"==typeof t.scene?t.scene:t.scenes[t.scene||0]:t,getAnimator:t=>t&&t.animator,_animations:null,sizeScale:{type:"number",value:1,min:0},sizeMinPixels:{type:"number",min:0,value:0},sizeMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},getPosition:{type:"accessor",value:t=>t.position},getColor:{type:"accessor",value:k},_lighting:"flat",_imageBasedLightingEnvironment:null,getOrientation:{type:"accessor",value:[0,0,0]},getScale:{type:"accessor",value:[1,1,1]},getTranslation:{type:"accessor",value:[0,0,0]},getTransformMatrix:{type:"accessor",value:[]},loaders:[L.B]};class F extends i.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}getShaders(){const t=[o.A,s.A];return"pbr"===this.props._lighting&&t.push(l.R),super.getShaders({vs:"#version 300 es\nin vec3 instancePositions;\nin vec3 instancePositions64Low;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nin vec3 instanceTranslation;\nuniform float sizeScale;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform mat4 sceneModelMatrix;\nuniform bool composeModelMatrix;\nin vec4 POSITION;\n\n#ifdef HAS_UV\n in vec2 TEXCOORD_0;\n#endif\n\n#ifdef MODULE_PBR\n #ifdef HAS_NORMALS\n in vec4 NORMAL;\n #endif\n#endif\nout vec4 vColor;\n#ifndef MODULE_PBR\n #ifdef HAS_UV\n out vec2 vTEXCOORD_0;\n #endif\n#endif\nvoid main(void) {\n #if defined(HAS_UV) && !defined(MODULE_PBR)\n vTEXCOORD_0 = TEXCOORD_0;\n geometry.uv = vTEXCOORD_0;\n #endif\n\n geometry.worldPosition = instancePositions;\n geometry.pickingColor = instancePickingColors;\n\n vec3 normal = vec3(0.0, 0.0, 1.0);\n #ifdef MODULE_PBR\n #ifdef HAS_NORMALS\n normal = instanceModelMatrix * (sceneModelMatrix * vec4(NORMAL.xyz, 0.0)).xyz;\n #endif\n #endif\n\n float originalSize = project_size_to_pixel(sizeScale);
2\n float clampedSize = clamp(originalSize, sizeMinPixels, sizeMaxPixels);\n\n vec3 pos = (instanceModelMatrix * (sceneModelMatrix * POSITION).xyz) * sizeScale * (clampedSize / originalSize) + instanceTranslation;\n if(composeModelMatrix) {\n DECKGL_FILTER_SIZE(pos, geometry);\n geometry.normal = project_normal(normal);\n geometry.worldPosition += pos;\n gl_Position = project_position_to_clipspace(pos + instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n }\n else {\n pos = project_size(pos);\n DECKGL_FILTER_SIZE(pos, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, pos, geometry.position);\n geometry.normal = project_normal(normal);\n }\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n #ifdef MODULE_PBR\n pbr_vPosition = geometry.position.xyz;\n #ifdef HAS_NORMALS\n pbr_vNormal = geometry.normal;\n #endif\n\n #ifdef HAS_UV\n pbr_vUV = TEXCOORD_0;\n #else\n pbr_vUV = vec2(0., 0.);\n #endif\n geometry.uv = pbr_vUV;\n #endif\n\n vColor = instanceColors;\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\nuniform float opacity;\nin vec4 vColor;\n\nout vec4 fragmentColor;\n#ifndef MODULE_PBR\n #if defined(HAS_UV) && defined(HAS_BASECOLORMAP)\n in vec2 vTEXCOORD_0;\n uniform sampler2D u_BaseColorSampler;\n #endif\n#endif\n\nvoid main(void) {\n #ifdef MODULE_PBR\n fragmentColor = vColor * pbr_filterColor(vec4(0));\n geometry.uv = pbr_vUV;\n #else\n #if defined(HAS_UV) && defined(HAS_BASECOLORMAP)\n fragmentColor = vColor * texture2D(u_BaseColorSampler, vTEXCOORD_0);\n geometry.uv = vTEXCOORD_0;\n #else\n fragmentColor = vColor;\n #endif\n #endif\n\n fragmentColor.a *= opacity;\n DECKGL_FILTER_COLOR(fragmentColor, geometry);\n}\n",modules:t})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),accessor:"getPosition",transition:!0},instanceColors:{type:5121,size:this.props.colorFormat.length,accessor:"getColor",normalized:!0,defaultValue:k,transition:!0},instanceModelMatrix:B.U})}updateState(t){super.updateState(t);const{props:e,oldProps:n}=t;e.scenegraph!==n.scenegraph?this._updateScenegraph():e._animations!==n._animations&&this._applyAnimationsProp(this.state.scenegraph,this.state.animator,e._animations)}finalizeState(t){super.finalizeState(t),this._deleteScenegraph()}get isLoaded(){var t;return(null===(t=this.state)||void 0===t?void 0:t.scenegraph)&&super.isLoaded}_updateScenegraph(){const t=this.props,{gl:e}=this.context;let n=null;if(t.scenegraph instanceof d)n={scenes:[t.scenegraph]};else if(t.scenegraph&&!t.scenegraph.gltf){const r=t.scenegraph,i=function(t,e,n){const r=new R(t,n);return{scenes:r.instantiate(e),animator:r.createAnimator()}}(e,r,this._getModelOptions());n={gltf:r,...i},async function(t){const e=[];return t.scenes.forEach(t=>{t.traverse(t=>{Object.values(t.model.getUniforms()).forEach(t=>{!1===t.loaded&&e.push(t)})})}),await async function(t){for(;t();)await new Promise(t=>requestAnimationFrame(t))}(()=>e.some(t=>!t.loaded))}(i).then(()=>this.setNeedsRedraw())}else t.scenegraph&&(a.A.deprecated("ScenegraphLayer.props.scenegraph","Use GLTFLoader instead of GLTFScenegraphLoader")(),n=t.scenegraph);const r={layer:this,gl:e},i=t.getScene(n,r),o=t.getAnimator(n,r);i instanceof d?(this._deleteScenegraph(),this._applyAllAttributes(i),this._applyAnimationsProp(i,o,t._animations),this.setState({scenegraph:i,animator:o})):null!==i&&a.A.warn("invalid scenegraph:",i)()}_applyAllAttributes(t){if(this.state.attributesAvailable){const e=this.getAttributeManager().getAttributes();t.traverse(t=>{this._setModelAttributes(t.model,e)})}}_applyAnimationsProp(t,e,n){if(!t||!e||!n)return;const r=e.getAnimations();Object.keys(n).sort().forEach(t=>{const e=n[t];if("*"===t)r.forEach(t=>{Object.assign(t,e)});else if(Number.isFinite(Number(t))){const n=Number(t);n>=0&&n<r.length?Object.assign(r[n],e):a.A.warn("animation ".concat(t," not found"))()}else{const n=r.find(({name:e})=>e===t);n?Object.assign(n,e):a.A.warn("animation ".concat(t," not found"))()}})}_deleteScenegraph(){const{scenegraph:t}=this.state;t instanceof d&&t.delete()}_getModelOptions(){const{_imageBasedLightingEnvironment:t}=this.props;let e=null;return t&&(e="function"==typeof t?t({gl:this.context.gl,layer:this}):t),{gl:this.context.gl,waitForFullLoad:!0,imageBasedLightingEnvironment:e,modelOptions:{isInstanced:!0,transpileToGLSL100:!(0,u.C6)(this.context.gl),...this.get
2Shaders()},useTangents:!1}}updateAttributes(t){this.setState({attributesAvailable:!0}),this.state.scenegraph&&this.state.scenegraph.traverse(e=>{this._setModelAttributes(e.model,t)})}draw({moduleParameters:t=null,parameters:e={},context:n}){if(!this.state.scenegraph)return;this.props._animations&&this.state.animator&&(this.state.animator.animate(n.timeline.getTime()),this.setNeedsRedraw());const{viewport:r}=this.context,{sizeScale:i,sizeMinPixels:o,sizeMaxPixels:s,opacity:a,coordinateSystem:u}=this.props,l=this.getNumInstances();this.state.scenegraph.traverse((n,{worldMatrix:c})=>{n.model.setInstanceCount(l),n.updateModuleSettings(t),n.draw({parameters:e,uniforms:{sizeScale:i,opacity:a,sizeMinPixels:o,sizeMaxPixels:s,composeModelMatrix:(0,B.w)(r,u),sceneModelMatrix:c,u_Camera:n.model.getUniforms().project_uCameraPosition}})})}}(0,r.A)(F,"defaultProps",N),(0,r.A)(F,"layerName","ScenegraphLayer")},37866:(t,e)=>{"use strict";const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+r+"$");e.isExist=function(t){return void 0!==t},e.isEmptyObject=function(t){return 0===Object.keys(t).length},e.merge=function(t,e,n){if(e){const r=Object.keys(e),i=r.length;for(let o=0;o<i;o++)t[r[o]]="strict"===n?[e[r[o]]]:e[r[o]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(t){return!(null==i.exec(t))},e.getAllMatches=function(t,e){const n=[];let r=e.exec(t);for(;r;){const i=[];i.startIndex=e.lastIndex-r[0].length;const o=r.length;for(let t=0;t<o;t++)i.push(r[t]);n.push(i),r=e.exec(t)}return n},e.nameRegexp=r,e.DANGEROUS_PROPERTY_NAMES=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],e.criticalProperties=["__proto__","constructor","prototype"]},38286:(t,e,n)=>{"use strict";t.exports=i;var r=n(39318);function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var o=4294967296,s=1/o,a="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");function u(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function l(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function c(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=t;i--)n.buf[i+r]=n.buf[i]}function h(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function A(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function f(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function d(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function p(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function g(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function m(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function y(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function v(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function _(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function b(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function w(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,t(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=_(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=_(this.buf,this.pos)+_(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=_(this.buf,this.pos)+w(this.buf,this.pos+4)*o;return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return e=127&(n=r[this.pos++]),n<128?e:(e|=(127&(n=r[this.pos++]))<<7,n<128?e:(e|=(127&(n=r[this.pos++]))<<14,n<128?e:(e|=(127&(n=r[this.pos++]))<<21,n<128?e:function(t,e,n){var r,i,o=n.buf;if(r=(112&(i=o[n.pos++]))>>4,i<128)return l(t,r,e);if(r|=(127&(i=o[n.pos++]))<<3,i<128)return l(t,r,e);if(r|=(127&(i=o[n.pos++]))<<10,i<128)return l(t,r,e);if(r|=(127&(i=o[n.pos++]))<<17,i<128)return l(t,r,e);if(r|=(127&(i=o[n.pos++]))<<24,i<128)return l(t,r,e);if(r|=(1&(i=o[n.pos++]))<<31,i<128)return l(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&a?function(t,e,n){return a.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){for(var r="",i=e;i<n;){var o,s,a,u=t[i],l=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c>n)break;
vendor: 6,214 bytes, line 2
21===c?u<128&&(l=u):2===c?128==(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===c?(o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&((l=(15&u)<<12|(63&o)<<6|63&s)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((l=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),i+=c}return r}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==i.Bytes)return t.push(this.readSVarint());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==i.Bytes)return t.push(this.readBoolean());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==i.Bytes)return t.push(this.readFloat());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==i.Bytes)return t.push(this.readDouble());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed32());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed32());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed64());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed64());var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===i.Varint)for(;this.buf[this.pos++]>127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var n=new Uint8Array(e);n.set(this.buf),this.buf=n,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),b(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),b(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),b(this.buf,-1&t,this.pos),b(this.buf,Math.floor(t*s),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),b(this.buf,-1&t,this.pos),b(this.buf,Math.floor(t*s),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var n,r;if(t>=0?(n=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var r,i,o=0;o<e.length;o++){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&c(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var r=this.pos-n;r>=128&&c(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,i.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,A,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64
2(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},38466:(t,e,n)=>{"use strict";n.d(e,{K:()=>o});let r=1,i=1;class o{constructor(){this.time=0,this.channels=new Map,this.animations=new Map,this.playing=!1,this.lastEngineTime=-1}addChannel(t){const{delay:e=0,duration:n=Number.POSITIVE_INFINITY,rate:i=1,repeat:o=1}=t,s=r++,a={time:0,delay:e,duration:n,rate:i,repeat:o};return this._setChannelTime(a,this.time),this.channels.set(s,a),s}removeChannel(t){this.channels.delete(t);for(const[e,n]of this.animations)n.channel===t&&this.detachAnimation(e)}isFinished(t){const e=this.channels.get(t);return void 0!==e&&this.time>=e.delay+e.duration*e.repeat}getTime(t){if(void 0===t)return this.time;const e=this.channels.get(t);return void 0===e?-1:e.time}setTime(t){this.time=Math.max(0,t);const e=this.channels.values();for(const t of e)this._setChannelTime(t,this.time);const n=this.animations.values();for(const t of n){const{animation:e,channel:n}=t;e.setTime(this.getTime(n))}}play(){this.playing=!0}pause(){this.playing=!1,this.lastEngineTime=-1}reset(){this.setTime(0)}attachAnimation(t,e){const n=i++;return this.animations.set(n,{animation:t,channel:e}),t.setTime(this.getTime(e)),n}detachAnimation(t){this.animations.delete(t)}update(t){this.playing&&(-1===this.lastEngineTime&&(this.lastEngineTime=t),this.setTime(this.time+(t-this.lastEngineTime)),this.lastEngineTime=t)}_setChannelTime(t,e){const n=e-t.delay;n>=t.duration*t.repeat?t.time=t.duration*t.rate:(t.time=Math.max(0,n)%t.duration,t.time*=t.rate)}}},38678:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawRectangleMode=void 0;var r,i=(r=n(43788))&&r.__esModule?r:{default:r};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(c,t);var e,n,r,l=(r=c,function(){var t,e=a(r);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),l.apply(this,arguments)}return e=c,(n=[{key:"getTwoClickPolygon",value:function(t,e,n){var r=(0,i.default)([t[0],t[1],e[0],e[1]]);return r.properties=r.properties||{},r.properties.shape="Rectangle",r}}])&&s(e.prototype,n),c}(n(42166).TwoClickPolygonMode);e.DrawRectangleMode=l},39025:(t,e,n)=>{"use strict";n.d(e,{A:()=>p});var r=n(24586),i=n(54116),o=n(47857);const s={transitionDuration:0},a=t=>1-(1-t)*(1-t),u=["wheel"],l=["panstart","panmove","panend"],c=["pinchstart","pinchmove","pinchend"],h=["tripanstart","tripanmove","tripanend"],A=["doubletap"],f=["keydown"],d={};class p{constructor(t){(0,r.A)(this,"props",void 0),(0,r.A)(this,"state",{}),(0,r.A)(this,"transitionManager",void 0),(0,r.A)(this,"eventManager",void 0),(0,r.A)(this,"onViewStateChange",void 0),(0,r.A)(this,"onStateChange",void 0),(0,r.A)(this,"makeViewport",void 0),(0,r.A)(this,"_controllerState",void 0),(0,r.A)(this,"_events",{}),(0,r.A)(this,"_interactionState",{isDragging:!1}),(0,r.A)(this,"_customEvents",[]),(0,r.A)(this,"_eventStartBlocked",null),(0,r.A)(this,"_panMove",!1),(0,r.A)(this,"invertPan",!1),(0,r.A)(this,"dragMode","rotate"),(0,r.A)(this,"inertia",0),(0,r.A)(this,"scrollZoom",!0),(0,r.A)(this,"dragPan",!0),(0,r.A)(this,"dragRotate",!0),(0,r.A)(this,"doubleClickZoom",!0),(0,r.A)(this,"touchZoom",!0),(0,r.A)(this,"touchRotate",!1),(0,r.A)(this,"keyboard",!0),this.transitionManager=new i.A({...t,getControllerState:t=>new this.ControllerState(t),onViewStateChange:this._onTransition.bind(this),onStateChange:this._setInteractionState.bind(this)}),this.handleEvent=this.handleEvent.bind(this),this.eventManager=t.eventManager,this.onViewStateChange=t.onViewStateChange||(()=>{}),this.onStateChange=t.onStateChange||(()=>{}),this.makeViewport=t.makeViewport}set events(t){this.toggleEvents(this._customEvents,!1),this.toggleEvents(t,!0),this._customEvents=t,this.props&&this.setProps(this.props)}finalize(){for(const e in this._events){var t;this._events[e]&&(null===(t=this.eventManager)||void 0===t||t.off(e,this.handleEvent))}this.transitionManager.finalize()}handleEvent(t){this._controllerState=void 0;const e=this._eventStartBlocked;switch(t.type){case"panstart":return!e&&this._onPanStart(t);case"panmove":return this._onPan(t);case"panend":return this._onPanEnd(t);case"pinchstart":return!e&&this._onPinchStart(t);case"pinchmove":return this._onPinch(t);case"pinchend":return this._onPinchEnd(t);case"tripanstart":return!e&&this._onTriplePanStart(t);case"tripanmove":return this._onTriplePan(t);case"tripanend":return this._onTriplePanEnd(t);case"doubletap":return this._onDoubleTap(t);case"wheel":return this._onWheel(t);case"keydown":return this._onKeyDown(t);default:return!1}}get controllerState(){return this._controllerState=this._controllerState||new this.ControllerState({makeViewport:this.makeViewport,...this.props,...this.state}),this._controllerState}getCenter(t){const{x:e,y:n}=this.props,{offsetCenter:r}=t;return[r.x-e,r.y-n]}isPointInBounds(t,e){const{width:n,height:r}=this.props;if(e&&e.handled)return!1;const i=t[0]>=0&&t[0]<=n&&t[1]>=0&&t[1]<=r;return i&&e&&e.stopPropagation(),i}isFunctionKeyPressed(t){const{srcEvent:e}=t;return Boolean(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}isDragging(){return this._interactionState.isDragging||!1}blockEvents(t){const e=setTimeout(()=>{this._eventStartBlocked===e&&(this._eventStartBlocked=null)},t);this._eventStartBlocked=e}setProps(t){t.dragMode&&(this.dragMode=t.dragMode),this.props=t,"transitionInterpolator"in t||(t.transitionInterpolator=this._getTransitionProps().transitionInterpolator),this.transitionManager.processViewStateChange(t);const{inertia:e}=t;this.inertia=Number.isFinite(e)?e:!0===e?300:0;const{scrollZoom:n=!0,dragPan:r=!0,dragRotate:i=!0,doubleClickZoom:o=!0,touchZoom:s=!0,touchRotate:a=!1,keyboard:d=!0}=t,p=Boolean(this.onViewStateChange);this.toggleEvents(u,p&&n),this.toggleEvents(l,p),this.toggleEvents(c,p&&(s||a)),this.toggleEvents(h,p&&a),this.toggleEvents(A,p&&o),this.toggleEvents(f,p&&d),this.scrollZoom=n,this.dragPan=r,this.dragRotate=i,this.doubleClickZoom=o,this.touchZoom=s,this.touchRotate=a,this.keyboard=d}updateTransition(){this.transitionManager.updateTransition()}toggleEvents(t,e){this.eventManager&&t.forEach(t=>{this._events[t]!==e&&(this._events[t]=e,e?this.eventManager.on(t,this.handleEvent):this.eventManager.off(t,this.handleEvent))})}updateViewport(t,e=null,n={}){const r={...t.getViewportProps(),...e},i=this.controllerState!==t;if(this.state=t.getState(),this._setInteractionState(n),i){const t=this.controllerState&&this.controllerState.getViewportProps();this.onViewStateChange&&this.onViewStateChange({viewState:r,interactionState:this._interactionState,oldViewState:t})}}_onTransition(t){this.onViewStateChange({...t,interactionState:this._interactionState})}_setInteractionState(t){Object.assign(this._interactionState,t),this.onStateChange(this._interactionState)}_onPanStart(t){const e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;let n=this.isFunctionKeyPressed(t)||t.rightButton||!1;(this.invertPan||"pan"===this.dragMode)&&(n=!n);const r=this.controllerState[n?"panStart":"rotateStart"]({pos:e});return this._panMove=n,this.updateViewport(r,s,{isDragging:!0}),!0}_onPan(t){return!!this.isDragging()&&(this._panMove?this._onPanMove(t):this._onPanRotate(t))}_onPanEnd(t){return!!this.isDragging()&&(this._panMove?this._onPanMoveEnd(t):this._onPanRotateEnd(t))}_onPanMove(t){if(!this.dragPan)return!1;const e=this.getCenter(t),n=this.controllerState.pan({pos:e});return this.updateViewport(n,s,{isDragging:!0,isPanning:!0}),!0}_onPanMoveEnd(t){const{inertia:e}=this;if(this.dragPan&&e&&t.velocity){const n=this.getCenter(t),r=[n[0]+t.velocityX*e/2,n[1]+t.velocityY*e/2],i=this.controllerState.pan({pos:r}).panEnd();this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:e,transitionEasing:a},{isDragging:!1,isPanning:!0})}else{const t=this.controllerState.panEnd();this.updateViewport(t,null,{isDragging:!1,isPanning:!1})}return!0}_onPanRotate(t){if(!this.dragRotate)return!1;const e=this.getCenter(t),n=this.controllerState.rotate({pos:e});return this.updateViewport(n,s,{isDragging:!0,isRotating:!0}),!0}_onPanRotateEnd(t){const{inertia:e}=this;if(this.dragRotate&&e&&t.velocity){const n=this.getCenter(t),r=[n[0]+t.velocityX*e/2,n[1]+t.velocityY*e/2],i=this.controllerState.rotate({pos:r}).rotateEnd();this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:e,transitionEasing:a},{isDragging:!1,isRotating:!0})}else{const t=this.controllerState.rotateEnd();this.updateViewport(t,null,{isDragging:!1,isRotating:!1})}return!0}_onWheel(t){if(!this.scrollZoom)return!1;t.srcEvent.preventDefault();const e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;
vendor: 5,118 bytes, line 2
2const{speed:n=.01,smooth:r=!1}=!0===this.scrollZoom?{}:this.scrollZoom,{delta:i}=t;let o=2/(1+Math.exp(-Math.abs(i*n)));i<0&&0!==o&&(o=1/o);const s=this.controllerState.zoom({pos:e,scale:o});return this.updateViewport(s,{...this._getTransitionProps({around:e}),transitionDuration:r?250:1},{isZooming:!0,isPanning:!0}),!0}_onTriplePanStart(t){const e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;const n=this.controllerState.rotateStart({pos:e});return this.updateViewport(n,s,{isDragging:!0}),!0}_onTriplePan(t){if(!this.touchRotate)return!1;if(!this.isDragging())return!1;const e=this.getCenter(t);e[0]-=t.deltaX;const n=this.controllerState.rotate({pos:e});return this.updateViewport(n,s,{isDragging:!0,isRotating:!0}),!0}_onTriplePanEnd(t){if(!this.isDragging())return!1;const{inertia:e}=this;if(this.touchRotate&&e&&t.velocityY){const n=this.getCenter(t),r=[n[0],n[1]+=t.velocityY*e/2],i=this.controllerState.rotate({pos:r});this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:e,transitionEasing:a},{isDragging:!1,isRotating:!0}),this.blockEvents(e)}else{const t=this.controllerState.rotateEnd();this.updateViewport(t,null,{isDragging:!1,isRotating:!1})}return!0}_onPinchStart(t){const e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;const n=this.controllerState.zoomStart({pos:e}).rotateStart({pos:e});return d._startPinchRotation=t.rotation,d._lastPinchEvent=t,this.updateViewport(n,s,{isDragging:!0}),!0}_onPinch(t){if(!this.touchZoom&&!this.touchRotate)return!1;if(!this.isDragging())return!1;let e=this.controllerState;if(this.touchZoom){const{scale:n}=t,r=this.getCenter(t);e=e.zoom({pos:r,scale:n})}if(this.touchRotate){const{rotation:n}=t;e=e.rotate({deltaAngleX:d._startPinchRotation-n})}return this.updateViewport(e,s,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),d._lastPinchEvent=t,!0}_onPinchEnd(t){if(!this.isDragging())return!1;const{inertia:e}=this,{_lastPinchEvent:n}=d;if(this.touchZoom&&e&&n&&t.scale!==n.scale){const r=this.getCenter(t);let i=this.controllerState.rotateEnd();const o=Math.log2(t.scale),s=(o-Math.log2(n.scale))/(t.deltaTime-n.deltaTime),u=Math.pow(2,o+s*e/2);i=i.zoom({pos:r,scale:u}).zoomEnd(),this.updateViewport(i,{...this._getTransitionProps({around:r}),transitionDuration:e,transitionEasing:a},{isDragging:!1,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:!1}),this.blockEvents(e)}else{const t=this.controllerState.zoomEnd().rotateEnd();this.updateViewport(t,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1})}return d._startPinchRotation=null,d._lastPinchEvent=null,!0}_onDoubleTap(t){if(!this.doubleClickZoom)return!1;const e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;const n=this.isFunctionKeyPressed(t),r=this.controllerState.zoom({pos:e,scale:n?.5:2});return this.updateViewport(r,this._getTransitionProps({around:e}),{isZooming:!0,isPanning:!0}),this.blockEvents(100),!0}_onKeyDown(t){if(!this.keyboard)return!1;const e=this.isFunctionKeyPressed(t),{zoomSpeed:n,moveSpeed:r,rotateSpeedX:i,rotateSpeedY:o}=!0===this.keyboard?{}:this.keyboard,{controllerState:s}=this;let a;const u={};switch(t.srcEvent.code){case"Minus":a=e?s.zoomOut(n).zoomOut(n):s.zoomOut(n),u.isZooming=!0;break;case"Equal":a=e?s.zoomIn(n).zoomIn(n):s.zoomIn(n),u.isZooming=!0;break;case"ArrowLeft":e?(a=s.rotateLeft(i),u.isRotating=!0):(a=s.moveLeft(r),u.isPanning=!0);break;case"ArrowRight":e?(a=s.rotateRight(i),u.isRotating=!0):(a=s.moveRight(r),u.isPanning=!0);break;case"ArrowUp":e?(a=s.rotateUp(o),u.isRotating=!0):(a=s.moveUp(r),u.isPanning=!0);break;case"ArrowDown":e?(a=s.rotateDown(o),u.isRotating=!0):(a=s.moveDown(r),u.isPanning=!0);break;default:return!1}return this.updateViewport(a,this._getTransitionProps(),u),!0}_getTransitionProps(t){const{transition:e}=this;return e&&e.transitionInterpolator?t?{...e,transitionInterpolator:new o.A({...t,...e.transitionInterpolator.opts,makeViewport:this.controllerState.makeViewport})}:e:s}}},39095:(t,e,n)=>{"use strict";n.d(e,{$h:()=>g,B8:()=>o,I0:()=>p,IL:()=>d,Qr:()=>f,Tl:()=>u,Z8:()=>A,a4:()=>s,aI:()=>_,e$:()=>c,eL:()=>h,fN:()=>m,hs:()=>l,lw:()=>a,mg:()=>i,t5:()=>v,v3:()=>y});var r=n(23172);function i(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],s=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=s,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function o(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],u=e[6],l=e[7],c=e[8],h=e[9],A=e[10],f=e[11],d=e[12],p=e[13],g=e[14],m=e[15],y=n*a-r*s,v=n*u-i*s,_=n*l-o*s,b=r*u-i*a,w=r*l-o*a,E=i*l-o*u,x=c*p-h*d,S=c*g-A*d,T=c*m-f*d,P=h*g-A*p,C=h*m-f*p,M=A*m-f*g,I=y*M-v*C+_*P+b*T-w*S+E*x;return I?(I=1/I,t[0]=(a*M-u*C+l*P)*I,t[1]=(i*C-r*M-o*P)*I,t[2]=(p*E-g*w+m*b)*I,t[3]=(A*w-h*E-f*b)*I,t[4]=(u*T-s*M-l*S)*I,t[5]=(n*M-i*T+o*S)*I,t[6]=(g*_-d*E-m*v)*I,t[7]=(c*E-A*_+f*v)*I,t[8]=(s*C-a*T+l*x)*I,t[9]=(r*T-n*C-o*x)*I,t[10]=(d*w-p*_+m*y)*I,t[11]=(h*_
vendor: 6,498 bytes, line 2
2-c*w-f*y)*I,t[12]=(a*S-s*P-u*x)*I,t[13]=(n*P-r*S+i*x)*I,t[14]=(p*v-d*b-g*y)*I,t[15]=(c*b-h*v+A*y)*I,t):null}function s(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],s=t[5],a=t[6],u=t[7],l=t[8],c=t[9],h=t[10],A=t[11],f=t[12],d=t[13],p=t[14],g=e*s-n*o,m=e*a-r*o,y=n*a-r*s,v=l*d-c*f,_=l*p-h*f,b=c*p-h*d;return u*(e*b-n*_+r*v)-i*(o*b-s*_+a*v)+t[15]*(l*y-c*m+h*g)-A*(f*y-d*m+p*g)}function a(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],l=e[6],c=e[7],h=e[8],A=e[9],f=e[10],d=e[11],p=e[12],g=e[13],m=e[14],y=e[15],v=n[0],_=n[1],b=n[2],w=n[3];return t[0]=v*r+_*a+b*h+w*p,t[1]=v*i+_*u+b*A+w*g,t[2]=v*o+_*l+b*f+w*m,t[3]=v*s+_*c+b*d+w*y,v=n[4],_=n[5],b=n[6],w=n[7],t[4]=v*r+_*a+b*h+w*p,t[5]=v*i+_*u+b*A+w*g,t[6]=v*o+_*l+b*f+w*m,t[7]=v*s+_*c+b*d+w*y,v=n[8],_=n[9],b=n[10],w=n[11],t[8]=v*r+_*a+b*h+w*p,t[9]=v*i+_*u+b*A+w*g,t[10]=v*o+_*l+b*f+w*m,t[11]=v*s+_*c+b*d+w*y,v=n[12],_=n[13],b=n[14],w=n[15],t[12]=v*r+_*a+b*h+w*p,t[13]=v*i+_*u+b*A+w*g,t[14]=v*o+_*l+b*f+w*m,t[15]=v*s+_*c+b*d+w*y,t}function u(t,e,n){var r,i,o,s,a,u,l,c,h,A,f,d,p=n[0],g=n[1],m=n[2];return e===t?(t[12]=e[0]*p+e[4]*g+e[8]*m+e[12],t[13]=e[1]*p+e[5]*g+e[9]*m+e[13],t[14]=e[2]*p+e[6]*g+e[10]*m+e[14],t[15]=e[3]*p+e[7]*g+e[11]*m+e[15]):(r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],l=e[6],c=e[7],h=e[8],A=e[9],f=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=u,t[6]=l,t[7]=c,t[8]=h,t[9]=A,t[10]=f,t[11]=d,t[12]=r*p+a*g+h*m+e[12],t[13]=i*p+u*g+A*m+e[13],t[14]=o*p+l*g+f*m+e[14],t[15]=s*p+c*g+d*m+e[15]),t}function l(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function c(t,e,n,i){var o,s,a,u,l,c,h,A,f,d,p,g,m,y,v,_,b,w,E,x,S,T,P,C,M=i[0],I=i[1],O=i[2],R=Math.sqrt(M*M+I*I+O*O);return R<r.p8?null:(M*=R=1/R,I*=R,O*=R,o=Math.sin(n),a=1-(s=Math.cos(n)),u=e[0],l=e[1],c=e[2],h=e[3],A=e[4],f=e[5],d=e[6],p=e[7],g=e[8],m=e[9],y=e[10],v=e[11],_=M*M*a+s,b=I*M*a+O*o,w=O*M*a-I*o,E=M*I*a-O*o,x=I*I*a+s,S=O*I*a+M*o,T=M*O*a+I*o,P=I*O*a-M*o,C=O*O*a+s,t[0]=u*_+A*b+g*w,t[1]=l*_+f*b+m*w,t[2]=c*_+d*b+y*w,t[3]=h*_+p*b+v*w,t[4]=u*E+A*x+g*S,t[5]=l*E+f*x+m*S,t[6]=c*E+d*x+y*S,t[7]=h*E+p*x+v*S,t[8]=u*T+A*P+g*C,t[9]=l*T+f*P+m*C,t[10]=c*T+d*P+y*C,t[11]=h*T+p*P+v*C,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function h(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],s=e[5],a=e[6],u=e[7],l=e[8],c=e[9],h=e[10],A=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+l*r,t[5]=s*i+c*r,t[6]=a*i+h*r,t[7]=u*i+A*r,t[8]=l*i-o*r,t[9]=c*i-s*r,t[10]=h*i-a*r,t[11]=A*i-u*r,t}function A(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],s=e[1],a=e[2],u=e[3],l=e[8],c=e[9],h=e[10],A=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-l*r,t[1]=s*i-c*r,t[2]=a*i-h*r,t[3]=u*i-A*r,t[8]=o*r+l*i,t[9]=s*r+c*i,t[10]=a*r+h*i,t[11]=u*r+A*i,t}function f(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],s=e[1],a=e[2],u=e[3],l=e[4],c=e[5],h=e[6],A=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+l*r,t[1]=s*i+c*r,t[2]=a*i+h*r,t[3]=u*i+A*r,t[4]=l*i-o*r,t[5]=c*i-s*r,t[6]=h*i-a*r,t[7]=A*i-u*r,t}function d(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],s=e[5],a=e[6],u=e[8],l=e[9],c=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(o*o+s*s+a*a),t[2]=Math.sqrt(u*u+l*l+c*c),t}function p(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=n+n,a=r+r,u=i+i,l=n*s,c=r*s,h=r*a,A=i*s,f=i*a,d=i*u,p=o*s,g=o*a,m=o*u;return t[0]=1-h-d,t[1]=c+m,t[2]=A-g,t[3]=0,t[4]=c-m,t[5]=1-l-d,t[6]=f+p,t[7]=0,t[8]=A+g,t[9]=f-p,t[10]=1-l-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function g(t,e,n,r,i,o,s){var a=1/(n-e),u=1/(i-r),l=1/(o-s);return t[0]=2*o*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*a,t[9]=(i+r)*u,t[10]=(s+o)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*o*2*l,t[15]=0,t}var m=function(t,e,n,r,i){var o=1/Math.tan(e/2);if(t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0){var s=1/(r-i);t[10]=(i+r)*s,t[14]=2*i*r*s}else t[10]=-1,t[14]=-2*r;return t},y=function(t,e,n,r,i,o,s){var a=1/(e-n),u=1/(r-i),l=1/(o-s);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*a,t[13]=(i+r)*u,t[14]=(s+o)*l,t[15]=1,t};function v(t,e,n,i){var o,s,a,u,l,c,h,A,f,d,p=e[0],g=e[1],m=e[2],y=i[0],v=i[1],_=i[2],b=n[0],w=n[1],E=n[2];return Math.abs(p-b)<r.p8&&Math.abs(g-w)<r.p8&&Math.abs(m-E)<r.p8?function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}(t):(h=p-b,A=g-w,f=m-E,o=v*(f*=d=1/Math.sqrt(h*h+A*A+f*f))-_*(A*=d),s=_*(h*=d)-y*f,a=y*A-v*h,(d=Math.sqrt(o*o+s*s+a*a))?(o*=d=1/d,s*=d,a*=d):(o=0,s=0,a=0),u=A*a-f*s,l=f*o-h*a,c=h*s-A*o,(d=Math.sqrt(u*u+l*l+c*c))?(u*=d=1/d,l*=d,c*=d):(u=0,l=0,c=0),t[0]=o,t[1]=u,t[2]=h,t[3]=0,t[4]=s,t[5]=l,t[6]=A,t[7]=0,t[8]=a,t[9]=c,t[10]=f,t[11]=0,t[12]=-(o*p+s*g+a*m),t[13]=-(u*p+l*g+c*m),t[14]=-(h*p+A*g+f*m),t[15]=1,t)}function _(t,e){var n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],u=t[5],l=t[6],c=t[7],h=t[8],A=t[9],f=t[10],d=t[11],p=t[12],g=t[13],m=t[14],y=t[15],v=e[0],_=e[1],b=e[2],w=e[3],E=e[4],x=e[5],S=e[6],T=e[7],P=e[8],C=e[9],M=e[10],I=e[11],O=e[12],R=e[13],L=e[14],B=e[15];return Math.abs(n-v)<=r.p8*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(i-_)<=r.p8*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(o-b)<=r.p8*Math.max(1,Math.abs(o),Math.abs(b))&&Math.abs(s-w)<=r.p8*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(a-E)<=r.p8*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(u-x)<=r.p8*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(l-S)<=r.p8*Math.max(1,Math.abs(l),Math.abs(S))&&Math.abs(c-T)<=r.p8*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(h-P)<=r.p8*Math.max(1,Math.abs(h),Math.abs(P))&&Math.abs(A-C)<=r.p8*Math.max(1,Math.abs(A),Math.abs(C))&&Math.abs(f-M)<=r.p8*Math.max(1,Math.abs(f),Math.abs(M))&&Math.abs(d-I)<=r.p8*Math.max(1,Math.abs(d),Math.abs(I))&&Math.abs(p-O)<=r.p8*Math.max(1,Math.abs(p),Math.abs(O))&&Math.abs(g-R)<=r.p8*Math.max(1,Math.abs(g),Math.abs(R))&&Math.abs(m-L)<=r.p8*Math.max(1,Math.abs(m),Math.abs(L))&&Math.abs(y-B)<=r.p8*Math.max(1,Math.abs(y),Math.abs(B))}},39139:(t,e,n)=>{"use strict";function r(t){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;
2if("undefined"!=typeof process&&"object"==typeof process.versions&&Boolean(process.versions.electron))return!0;const e="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,n=t||e;return!!(n&&n.indexOf("Electron")>=0)}n.d(e,{A:()=>r})},39334:(t,e,n)=>{"use strict";var r=n(98009),i=n(2583),o=n(88341),s=n(4728);t.exports=function(t){if(t&&"object"==typeof t){if(r(t))return"Map";if(i(t))return"Set";if(o(t))return"WeakMap";if(s(t))return"WeakSet"}return!1}},39906:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},40037:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawSquareFromCenterMode=void 0;var r=a(n(43788)),i=a(n(71123)),o=a(n(32955)),s=n(89595);function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}var A=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(f,t);var e,n,a,A=(a=f,function(){var t,e=c(a);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=c(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function f(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),A.apply(this,arguments)}return e=f,(n=[{key:"getTwoClickPolygon",value:function(t,e,n){var a=[e[0],t[1]],u=[t[0],e[1]],l=(0,i.default)((0,s.point)(a),(0,s.point)(t)),c=(0,i.default)((0,s.point)(u),(0,s.point)(t)),h=l<=c?l:c,A=l<=c?a:u,f=(0,s.lineString)([A,e]),d=(0,o.default)(f,h).geometry.coordinates,p=t[0]>d[0]?t[0]+Math.abs(t[0]-d[0]):t[0]-Math.abs(t[0]-d[0]),g=t[1]>d[1]?t[1]+Math.abs(t[1]-d[1]):t[1]-Math.abs(t[1]-d[1]),m=(0,r.default)([p,g,d[0],d[1]]);return m.properties=m.properties||{},m.properties.shape="Square",m}}])&&l(e.prototype,n),f}(n(42166).TwoClickPolygonMode);e.DrawSquareFromCenterMode=A},40162:(t,e,n)=>{"use strict";n.d(e,{$:()=>a});var r=n(24586);const i=[255,255,255],o=1;let s=0;class a{constructor(t={}){(0,r.A)(this,"id",void 0),(0,r.A)(this,"color",void 0),(0,r.A)(this,"intensity",void 0),(0,r.A)(this,"type","ambient");const{color:e=i}=t,{intensity:n=o}=t;this.id=t.id||"ambient-".concat(s++),this.color=e,this.intensity=n}}},40228:(t,e)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},40268:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12187),i=n(11866),o=n(3932),s=n(82314);function a(t,e,n,a){let u=(a=a||{}).steps||64;const l=a.units||"kilometers";let c=a.angle||0;const h=a.pivot||t,A=a.properties||{};if(!t)throw new Error("center is required");if(!e)throw new Error("xSemiAxis is required");if(!n)throw new Error("ySemiAxis is required");if(!r.isObject.call(void 0,a))throw new Error("options must be an object");if(!r.isNumber.call(void 0,u))throw new Error("steps must be a number");if(!r.isNumber.call(void 0,c))throw new Error("angle must be a number");const f=s.getCoord.call(void 0,o.transformRotate.call(void 0,r.point.call(void 0,s.getCoord.call(void 0,t)),c,{pivot:h}));c=-90+c,u=Math.ceil(u/4);let d=[],p=[];const g=e,m=n,y=m,v=(g-m)/(Math.PI/2),_=(g+m)*Math.PI/4,b=u;let w=0,E=0;for(let t=0;t<u;t++)E+=w,w=0===v?_/b/y:(-(v*E+y)+Math.sqrt(Math.pow(v*E+y,2)-.5*v*4*(-_/b)))/(.5*v*2),0!=E&&d.push(E);p.push(0);for(let t=0;t<d.length;t++)p.push(d[t]);p.push(Math.PI/2);for(let t=0;t<d.length;t++)p.push(Math.PI-d[d.length-t-1]);p.push(Math.PI);for(let t=0;t<d.length;t++)p.push(Math.PI+d[t]);p.push(3*Math.PI/2);for(let t=0;t<d.length;t++)p.push(2*Math.PI-d[d.length-t-1]);p.push(0);const x=[];for(const t of p){const e=Math.atan2(m*Math.sin(t),g*Math.cos(t)),n=Math.sqrt(Math.pow(g,2)*Math.pow(m,2)/(Math.pow(g*Math.sin(e),2)+Math.pow(m*Math.cos(e),2)));x.push(i.destination.call(void 0,f,n,c+r.radiansToDegrees.call(void 0,e),{units:l}).geometry.coordinates)}return r.polygon.call(void 0,[x],A)}var u=a;e.default=u,e.ellipse=a},40306:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(50340),i=n(34081),o=n(95855),s=n(90333),a=n(94421);class u extends r.A{constructor(t=0,e=0){super(2),(0,i.cy)(t)&&1===arguments.length?this.copy(t):(i.$W.debug&&((0,o.ws)(t),(0,o.ws)(e)),this[0]=t,this[1]=e)}set(t,e){return this[0]=t,this[1]=e,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this.check()}fromObject(t){return i.$W.debug&&((0,o.ws)(t.x),(0,o.ws)(t.y)),this[0]=t.x,this[1]=t.y,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t}get ELEMENTS(){return 2}
2horizontalAngle(){return Math.atan2(this.y,this.x)}verticalAngle(){return Math.atan2(this.x,this.y)}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return s.Z0(this,this,t),this.check()}transformAsVector(t){return(0,a.B$)(this,this,t),this.check()}transformByMatrix3(t){return s.ei(this,this,t),this.check()}transformByMatrix2x3(t){return s.l0(this,this,t),this.check()}transformByMatrix2(t){return s.ZF(this,this,t),this.check()}}},40356:(t,e,n)=>{"use strict";n.d(e,{A:()=>O});var r=n(40829),i=n(5514),o=n(89666);function s(t){return function(t){const e={},n={};return a({modules:t,level:0,moduleMap:e,moduleDepth:n}),Object.keys(n).sort((t,e)=>n[e]-n[t]).map(t=>e[t])}(u(t))}function a(t){let{modules:e,level:n,moduleMap:r,moduleDepth:i}=t;if(n>=5)throw new Error("Possible loop in shader dependency graph");for(const t of e)r[t.name]=t,(void 0===i[t.name]||i[t.name]<n)&&(i[t.name]=n);for(const t of e)t.dependencies&&a({modules:t.dependencies,level:n+1,moduleMap:r,moduleDepth:i})}function u(t,e){return t.map(t=>(t instanceof i.A||((0,o.A)("string"!=typeof t,"Shader module use by name is deprecated. Import shader module '".concat(t,"' and use it directly.")),(0,o.A)(t.name,"shader module has no name"),(t=new i.A(t)).dependencies=u(t.dependencies)),t))}const l={GLSL_FRAG_DATA:["WEBGL_draw_buffers",!0],GLSL_FRAG_DEPTH:["EXT_frag_depth",!0],GLSL_DERIVATIVES:["OES_standard_derivatives",!0],GLSL_TEXTURE_LOD:["EXT_shader_texture_lod",!0]},c={};Object.keys(l).forEach(t=>{c[t]=t});const h={};function A(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=l[e];if((0,o.A)(r,e),!function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e="undefined"!=typeof window&&window.navigator||{},n=t.userAgent||e.userAgent||"",r=-1!==n.indexOf("MSIE "),i=-1!==n.indexOf("Trident/");return r||i}(n))return!0;if(e in h)return h[e];const i=r[0],s=n.behavior||"enable",a="#extension GL_".concat(i," : ").concat(s,"\nvoid main(void) {}"),u=t.createShader(35633);t.shaderSource(u,a),t.compileShader(u);const c=t.getShaderParameter(u,35713);return t.deleteShader(u),h[e]=c,c}function f(t,e){return(e=Array.isArray(e)?e:[e]).every(e=>function(t,e){const n=l[e];(0,o.A)(n,e);const r=function(t){return"undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||Boolean(t&&2===t._version)}(t)&&n[1]||n[0],i="string"==typeof r?Boolean(t.getExtension(r)):r;return(0,o.A)(!1===i||!0===i),i}(t,e))}var d=n(56159);function p(t){return new RegExp("\\b".concat(t,"[ \\t]+(\\w+[ \\t]+\\w+(\\[\\w+\\])?;)"),"g")}const g=[[/^(#version[ \t]+(100|300[ \t]+es))?[ \t]*\n/,"#version 300 es\n"],[/\btexture(2D|2DProj|Cube)Lod(EXT)?\(/g,"textureLod("],[/\btexture(2D|2DProj|Cube)(EXT)?\(/g,"texture("]],m=[...g,[p("attribute"),"in $1"],[p("varying"),"out $1"]],y=[...g,[p("varying"),"in $1"]],v=[[/^#version[ \t]+300[ \t]+es/,"#version 100"],[/\btexture(2D|2DProj|Cube)Lod\(/g,"texture$1LodEXT("],[/\btexture\(/g,"texture2D("],[/\btextureLod\(/g,"texture2DLodEXT("]],_=[...v,[p("in"),"attribute $1"],[p("out"),"varying $1"]],b=[...v,[p("in"),"varying $1"]],w="gl_FragColor",E=/\bout[ \t]+vec4[ \t]+(\w+)[ \t]*;\n?/,x=/void\s+main\s*\([^)]*\)\s*\{\n?/;function S(t,e){for(const[n,r]of e)t=t.replace(n,r);return t}const T="\n\n".concat(d.O_,"\n\n"),P={[r.T]:"vertex",[r.B]:"fragment"};function C(t,e){let{id:n,source:i,type:s,modules:a,defines:u={},hookFunctions:l=[],inject:h={},transpileToGLSL100:p=!1,prologue:g=!0,log:v}=e;(0,o.A)("string"==typeof i,"shader source must be a string");const C=s===r.T,M=i.split("\n");let I=100,O="",R=i;0===M[0].indexOf("#version ")?(I=300,O=M[0],R=M.slice(1).join("\n")):O="#version ".concat(I);const L={};a.forEach(t=>{Object.assign(L,t.getDefines())}),Object.assign(L,u);let B=g?"".concat(O,"\n").concat(function(t){let{id:e,source:n,type:r}=t;return e&&"string"==typeof e&&-1===n.indexOf("SHADER_NAME")?"\n#define SHADER_NAME ".concat(e,"_").concat(P[r],"\n\n"):""}({id:n,source:i,type:s}),"\n").concat(function(t){let{type:e}=t;return"\n#define SHADER_TYPE_".concat(P[e].toUpperCase(),"\n")}({type:s}),"\n").concat(function(t){const e=function(t){const e=t.getExtension("WEBGL_debug_renderer_info"),n=t.getParameter(e&&e.UNMASKED_VENDOR_WEBGL||7936),r=t.getParameter(e&&e.UNMASKED_RENDERER_WEBGL||7937);return{gpuVendor:function(t,e){return t.match(/NVIDIA/i)||e.match(/NVIDIA/i)?"NVIDIA":t.match(/INTEL/i)||e.match(/INTEL/i)?"INTEL":t.match(/AMD/i)||e.match(/AMD/i)||t.match(/ATI/i)||e.match(/ATI/i)?"AMD":"UNKNOWN GPU"}(n,r),vendor:n,renderer:r,version:t.getParameter(7938),shadingLanguageVersion:t.getParameter(35724)}}(t);switch(e.gpuVendor.toLowerCase()){case"nvidia":return"#define NVIDIA_GPU\n// Nvidia optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n";case"intel":return"#define INTEL_GPU\n// Intel optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n";case"amd":return"#define AMD_GPU\n";default:return"#define DEFAULT_GPU\n// Prevent driver from optimizing away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n"}}(t),"\n").concat(function(t){let e="#if (__VERSION__ > 120)\n\n# define FEATURE_GLSL_DERIVATIVES\n# define FEATURE_GLSL_DRAW_BUFFERS\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FEATURE_GLSL_TEXTURE_LOD\n\n// DEPRECATED FLAGS, remove in v9\n# define FRAG_DEPTH\n# define DERIVATIVES\n# define DRAW_BUFFERS\n# define TEXTURE_LOD\n\n#endif // __VERSION\n";return f(t,c.GLSL_FRAG_DEPTH)&&(e+="\n// FRAG_DEPTH => gl_FragDepth is available\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FRAG_DEPTH\n# define gl_FragDepth gl_FragDepthEXT\n#endif\n"),f(t,c.GLSL_DERIVATIVES)&&A(t,c.GLSL_DERIVATIVES)&&(e+="\n// DERIVATIVES => dxdF, dxdY and fwidth are available\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n# define FEATURE_GLSL_DERIVATIVES\n# define DERIVATIVES\n#endif\n"),f(t,c.GLSL_FRAG_DATA)&&A(t,c.GLSL_FRAG_DATA,{behavior:"require"})&&(e+="\n// DRAW_BUFFERS => gl_FragData[] is available\n#ifdef GL_EXT_draw_buffers\n#extension GL_EXT_draw_buffers : require\n#define FEATURE_GLSL_DRAW_BUFFERS\n#define DRAW_BUFFERS\n#endif\n"),f(t,c.GLSL_TEXTURE_LOD)&&(e+="// TEXTURE_LOD => texture2DLod etc are available\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n\n# define FEATURE_GLSL_TEXTURE_LOD\n# define TEXTURE_LOD\n\n#endif\n"),e}(t),"\n").concat(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=0,n="";for(const r in t){0===e&&(n+="\n// APPLICATION DEFINES\n"),e++;const i=t[r];(i||Number.isFinite(i))&&(n+="#define ".concat(r.toUpperCase()," ").concat(t[r],"\n"))}return 0===e&&(n+="\n"),n}(L),"\n").concat(C?"":"precision highp float;\n\n","\n"):"".concat(O,"\n");const k=function(t){const e={vs:{},fs:{}};return t.forEach(t=>{let n;"string"!=typeof t?(n=t,t=n.hook):n={},t=t.trim();const[r,i]=t.split(":"),o=t.replace(/\(.+/,"");e[r][o]=Object.assign(n,{signature:i})}),e}(l),N={},F={},D={};for(const t in h){const e="string"==typeof h[t]?{injection:h[t],order:0}:h[t],n=t.match(/^(v|f)s:(#)?([\w-]+)$/);if(n){const r=n[2],i=n[3];r?"decl"===i?F[t]=[e]:D[t]=[e]:N[t]=[e]}else D[t]=[e]}for(const t of a){v&&t.checkDeprecations(R,v),B+=t.getModuleSource(s,I);const e=t.injections[s];for(const t in e){const n=t.match(/^(v|f)s:#([\w-]+)$/);if(n){const r="decl"===n[2]?F:D;r[t]=r[t]||[],r[t].push(e[t])}else N[t]=N[t]||[],N[t].push(e[t])}}return B+=T,B=(0,d.Ay)(B,s,F),B+=function(t,e){let n="";for(const r in t){const i=t[r];
2if(n+="void ".concat(i.signature," {\n"),i.header&&(n+=" ".concat(i.header)),e[r]){const t=e[r];t.sort((t,e)=>t.order-e.order);for(const e of t)n+=" ".concat(e.injection,"\n")}i.footer&&(n+=" ".concat(i.footer)),n+="}\n"}return n}(k[s],N),B+=R,B=(0,d.Ay)(B,s,D),B=function(t,e,n){switch(e){case 300:return n?S(t,m):function(t){const e=(t=S(t,y)).match(E);if(e){const n=e[1];t=t.replace(new RegExp("\\b".concat(w,"\\b"),"g"),n)}else{const e="fragmentColor";t=t.replace(x,t=>"out vec4 ".concat(e,";\n").concat(t)).replace(new RegExp("\\b".concat(w,"\\b"),"g"),e)}return t}(t);case 100:return n?S(t,_):function(t){const e=(t=S(t,b)).match(E);if(e){const n=e[1];t=t.replace(E,"").replace(new RegExp("\\b".concat(n,"\\b"),"g"),w)}return t}(t);default:throw new Error("unknown GLSL version ".concat(e))}}(B,p?100:I,C),B}function M(t){return function(e){const n={};for(const r of t){const t=r.getUniforms(e,n);Object.assign(n,t)}return n}}var I=n(5259);class O{static getDefaultProgramManager(t){return t.luma=t.luma||{},t.luma.defaultProgramManager=t.luma.defaultProgramManager||new O(t),t.luma.defaultProgramManager}constructor(t){this.gl=t,this._programCache={},this._getUniforms={},this._registeredModules={},this._hookFunctions=[],this._defaultModules=[],this._hashes={},this._hashCounter=0,this.stateHash=0,this._useCounts={}}addDefaultModule(t){this._defaultModules.find(e=>e.name===t.name)||this._defaultModules.push(t),this.stateHash++}removeDefaultModule(t){const e="string"==typeof t?t:t.name;this._defaultModules=this._defaultModules.filter(t=>t.name!==e),this.stateHash++}addShaderHook(t,e){e&&(t=Object.assign(e,{hook:t})),this._hookFunctions.push(t),this.stateHash++}get(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{vs:e="",fs:n="",defines:i={},inject:o={},varyings:a=[],bufferMode:u=35981,transpileToGLSL100:l=!1}=t,c=this._getModuleList(t.modules),h=this._getHash(e),A=this._getHash(n),f=c.map(t=>this._getHash(t.name)).sort(),d=a.map(t=>this._getHash(t)),p=Object.keys(i).sort(),g=Object.keys(o).sort(),m=[],y=[];for(const t of p)m.push(this._getHash(t)),m.push(this._getHash(i[t]));for(const t of g)y.push(this._getHash(t)),y.push(this._getHash(o[t]));const v="".concat(h,"/").concat(A,"D").concat(m.join("/"),"M").concat(f.join("/"),"I").concat(y.join("/"),"V").concat(d.join("/"),"H").concat(this.stateHash,"B").concat(u).concat(l?"T":"");if(!this._programCache[v]){const t=function(t,e){const{vs:n,fs:i}=e,o=s(e.modules||[]);return{gl:t,vs:C(t,Object.assign({},e,{source:n,type:r.T,modules:o})),fs:C(t,Object.assign({},e,{source:i,type:r.B,modules:o})),getUniforms:M(o)}}(this.gl,{vs:e,fs:n,modules:c,inject:o,defines:i,hookFunctions:this._hookFunctions,transpileToGLSL100:l});this._programCache[v]=new I.A(this.gl,{hash:v,vs:t.vs,fs:t.fs,varyings:a,bufferMode:u}),this._getUniforms[v]=t.getUniforms||(t=>{}),this._useCounts[v]=0}return this._useCounts[v]++,this._programCache[v]}getUniforms(t){return this._getUniforms[t.hash]||null}release(t){const e=t.hash;this._useCounts[e]--,0===this._useCounts[e]&&(this._programCache[e].delete(),delete this._programCache[e],delete this._getUniforms[e],delete this._useCounts[e])}_getHash(t){return void 0===this._hashes[t]&&(this._hashes[t]=this._hashCounter++),this._hashes[t]}_getModuleList(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const e=new Array(this._defaultModules.length+t.length),n={};let r=0;for(let t=0,i=this._defaultModules.length;t<i;++t){const i=this._defaultModules[t],o=i.name;e[r++]=i,n[o]=!0}for(let i=0,o=t.length;i<o;++i){const o=t[i],s=o.name;n[s]||(e[r++]=o,n[s]=!0)}return e.length=r,e}}},40777:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawLineStringMode=void 0;var r=n(71169);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}var c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(h,t);var e,n,s,c=(s=h,function(){var t,e=u(s);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=u(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function h(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),c.apply(this,arguments)}return e=h,(n=[{key:"handleClick",value:function(t,e){var n=t.picks,i=(0,r.getPickedEditHandle)(n),s=!1;i||(this.addClickSequence(t),s=!0);var a=this.getClickSequence();if(a.length>1&&i&&Array.isArray(i.properties.positionIndexes)&&i.properties.positionIndexes[0]===a.length-1){var u={type:"LineString",coordinates:o(a)};this.resetClickSequence();var l=this.getAddFeatureAction(u,e.data);l&&e.onEdit(l)}else s&&e.onEdit({updatedData:e.data,editType:"addTentativePosition",editContext:{position:t.mapCoords}})}},{key:"handleKeyUp",value:function(t,e){if("Enter"===t.key){var n=this.getClickSequence();if(n.length>1){var r={type:"LineString",coordinates:o(n)};this.resetClickSequence();var i=this.getAddFeatureAction(r,e.data);i&&e.onEdit(i)}}}},{key:"getGuides",value:function(t){var e,n,r=t.lastPointerMoveEvent,i=this.getClickSequence(),s=r?[r.mapCoords]:[],a={type:"FeatureCollection",features:[]};i.length>0&&(n={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(o(i),s)}}),n&&a.features.push(n);var u=i.map(function(t,e){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[e]},geometry:{type:"Point",coordinates:t}}});return(e=a.features).push.apply(e,o(u)),a}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}}])&&a(e.prototype,n),h}(n(96146).GeoJsonEditMode);e.DrawLineStringMode=c},40822:(t,e,n)=>{"use strict";n.d(e,{N:()=>i});var r=n(44454);function i(t,e,n){const{removedProps:i={},deprecatedProps:o={},replacedProps:s={}}=n;for(const n in i)if(n in e){const e=i[n]?"".concat(t,".").concat(i[n]):"N/A";r.Rm.removed("".concat(t,".").concat(n),e)()}for(const n in o)if(n in e){const e=o[n];r.Rm.deprecated("".concat(t,".").concat(n),"".concat(t,".").concat(e))()}let a=null;for(const n in s)if(n in e){const i=s[n];r.Rm.deprecated("".concat(t,".").concat(n),"".concat(t,".").concat(i))(),a=a||Object.assign({},e),a[i]=e[n],delete a[n]}return a||e}},40829:(t,e,n)=>{"use strict";n.d(e,{B:()=>i,T:()=>r});const r="vs",i="fs"},41087:(t,e,n)=>{"use strict";n.d(e,{A:()=>
2o});var r=n(24586),i=n(88330);class o extends i.A{getShaders(){const t=super.getShaders();return t.inject={"vs:#decl":"uniform float trailLength;\nattribute float instanceTimestamps;\nattribute float instanceNextTimestamps;\nvarying float vTime;\n","vs:#main-end":"vTime = instanceTimestamps + (instanceNextTimestamps - instanceTimestamps) * vPathPosition.y / vPathLength;\n","fs:#decl":"uniform bool fadeTrail;\nuniform float trailLength;\nuniform float currentTime;\nvarying float vTime;\n","fs:#main-start":"if(vTime > currentTime || (fadeTrail && (vTime < currentTime - trailLength))) {\n discard;\n}\n","fs:DECKGL_FILTER_COLOR":"if(fadeTrail) {\n color.a *= 1.0 - (currentTime - vTime) / trailLength;\n}\n"},t}initializeState(){super.initializeState(),this.getAttributeManager().addInstanced({timestamps:{size:1,accessor:"getTimestamps",shaderAttributes:{instanceTimestamps:{vertexOffset:0},instanceNextTimestamps:{vertexOffset:1}}}})}draw(t){const{fadeTrail:e,trailLength:n,currentTime:r}=this.props;t.uniforms={...t.uniforms,fadeTrail:e,trailLength:n,currentTime:r},super.draw(t)}}(0,r.A)(o,"layerName","TripsLayer"),(0,r.A)(o,"defaultProps",{fadeTrail:!0,trailLength:{type:"number",value:120,min:0},currentTime:{type:"number",value:0,min:0},getTimestamps:{type:"accessor",value:t=>t.timestamps}})},41279:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElevationMode=void 0;var r=n(71169);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=a(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},s(t,e,n||t)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function l(t){var e=t.pointerDownScreenCoords,n=t.screenCoords;return 10*(e[1]-n[1])}var c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(f,t);var e,n,c,h,A=(h=f,function(){var t,e=a(h);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function f(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),A.apply(this,arguments)}return e=f,c=[{key:"calculateElevationChangeWithViewport",value:function(t,e){var n=e.pointerDownScreenCoords,r=e.screenCoords;return 156543.03392*Math.cos(t.latitude*Math.PI/180)/Math.pow(2,t.zoom)*(n[1]-r[1])/2}}],(n=[{key:"makeElevatedEvent",value:function(t,e,n){var r=n.modeConfig||{},i=r.minElevation,o=void 0===i?0:i,s=r.maxElevation,a=void 0===s?2e4:s,u=r.calculateElevationChange,c=void 0===u?l:u;if(!t.pointerDownScreenCoords)return t;var h=3===e.length?e[2]:0;return h+=c({pointerDownScreenCoords:t.pointerDownScreenCoords,screenCoords:t.screenCoords}),h=Math.min(h,a),h=Math.max(h,o),Object.assign({},t,{mapCoords:[e[0],e[1],h]})}},{key:"handlePointerMove",value:function(t,e){var n=(0,r.getPickedEditHandle)(t.pointerDownPicks),i=n?n.geometry.coordinates:t.mapCoords;s(a(f.prototype),"handlePointerMove",this).call(this,this.makeElevatedEvent(t,i,e),e)}},{key:"handleStopDragging",value:function(t,e){var n=(0,r.getPickedEditHandle)(t.picks),i=n?n.geometry.coordinates:t.mapCoords;s(a(f.prototype),"handleStopDragging",this).call(this,this.makeElevatedEvent(t,i,e),e)}},{key:"getCursor",value:function(t){var e=s(a(f.prototype),"getCursor",this).call(this,t);return"cell"===e&&(e="ns-resize"),e}}])&&o(e.prototype,n),c&&o(e,c),f}(n(59582).ModifyMode);e.ElevationMode=c},41302:(t,e,n)=>{"use strict";n.d(e,{A:()=>d});var r=n(24586),i=n(99608),o=n(27371),s=n(79669),a=n(10707),u=n(93314),l=n(25330),c=n(67069);const h=[0,0,0,255],A=[0,0,1],f={sizeUnits:"pixels",pointSize:{type:"number",min:0,value:10},getPosition:{type:"accessor",value:t=>t.position},getNormal:{type:"accessor",value:A},getColor:{type:"accessor",value:h},material:!0,radiusPixels:{deprecatedFor:"pointSize"}};class d extends i.A{getShaders(){return super.getShaders({vs:"#define SHADER_NAME point-cloud-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 instanceNormals;\nattribute vec4 instanceColors;\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusPixels;\nuniform int sizeUnits;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.normal = project_normal(instanceNormals);\n unitPosition = positions.xy;\n geometry.uv = unitPosition;\n geometry.pickingColor = instancePickingColors;\n vec3 offset = vec3(positions.xy * project_size_to_pixel(radiusPixels, sizeUnits), 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n vec3 lightColor = lighting_getLightColor(instanceColors.rgb, project_uCameraPosition, geometry.position.xyz, geometry.normal);\n vColor = vec4(lightColor, instanceColors.a * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME point-cloud-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\n\nvoid main(void) {\n geometry.uv = unitPosition;\n\n float distToCenter = length(unitPosition);\n\n if (distToCenter > 1.0) {\n discard;\n }\n\n gl_FragColor = vColor;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.A,s.K,a.A]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceNormals:{size:3,transition:!0,accessor:"getNormal",defaultValue:A},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:h}})}updateState(t){const{changeFlags:e,props:n}=t;if(super.updateState(t),e.extensionsChanged){var r;const{gl:t}=this.context;null===(r=this.state.model)||void 0===r||r.delete(),this.state.model=this._getModel(t),this.getAttributeManager().invalidateAll()}e.dataChanged&&function(t){const{header:e,attributes:n}=t;e&&n&&(t.length=e.vertexCount,n.POSITION&&(n.instancePositions=n.POSITION),n.NORMAL&&(n.instanceNormals=n.NORMAL),n.COLOR_0&&(n.instanceColors=n.COLOR_0))}(n.data)}draw({uniforms:t}){const{pointSize:e,sizeUnits:n}=this.props;this.state.model.setUniforms(t).setUniforms({sizeUnits:u.p5[n],radiusPixels:e}).draw()}_getModel(t){const e=[];for(let t=0;t<3;t++){const n=t/3*Math.PI*2;e.push(2*Math.cos(n),2*Math.sin(n),0)}
2return new l.A(t,{...this.getShaders(),id:this.props.id,geometry:new c.A({drawMode:4,attributes:{positions:new Float32Array(e)}}),isInstanced:!0})}}(0,r.A)(d,"layerName","PointCloudLayer"),(0,r.A)(d,"defaultProps",f)},41522:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(72645),i=n(82314);function o(t,e,n={}){const o=i.getCoord.call(void 0,t),s=i.getCoord.call(void 0,e);s[0]+=s[0]-o[0]>180?-360:o[0]-s[0]>180?360:0;const a=function(t,e,n){const i=n=void 0===n?r.earthRadius:Number(n),o=t[1]*Math.PI/180,s=e[1]*Math.PI/180,a=s-o;let u=Math.abs(e[0]-t[0])*Math.PI/180;u>Math.PI&&(u-=2*Math.PI);const l=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),c=Math.abs(l)>1e-11?a/l:Math.cos(o);return Math.sqrt(a*a+c*c*u*u)*i}(o,s);return r.convertLength.call(void 0,a,"meters",n.units)}var s=o;e.default=s,e.rhumbDistance=o},41857:(t,e,n)=>{"use strict";var r=n(49228),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=n(70686),u=n(17239)(),l=function(t,e,n,r){if(e in t)if(!0===r){if(t[e]===n)return}else if("function"!=typeof(i=r)||"[object Function]"!==o.call(i)||!r())return;var i;u?a(t,e,n,!0):a(t,e,n)},c=function(t,e){var n=arguments.length>2?arguments[2]:{},o=r(e);i&&(o=s.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a<o.length;a+=1)l(t,o[a],e[o[a]],n[o[a]])};c.supportsDescriptors=!!u,t.exports=c},41916:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(25128),i=n(11866),o=n(12899);function s(t,e){const n=o.distance.call(void 0,t,e),s=r.bearing.call(void 0,t,e);return i.destination.call(void 0,t,n/2,s)}var a=s;e.default=a,e.midpoint=s},41920:t=>{function e(t,s,a,u){let l="",c=!1;if(!Array.isArray(t)){if(null!=t){let e=t.toString();return e=o(e,s),e}return""}for(let h=0;h<t.length;h++){const A=t[h],f=n(A);if(void 0===f)continue;let d="";if(d=0===a.length?f:`${a}.${f}`,f===s.textNodeName){let t=A[f];i(d,s)||(t=s.tagValueProcessor(f,t),t=o(t,s)),c&&(l+=u),l+=t,c=!1;continue}if(f===s.cdataPropName){c&&(l+=u),l+=`<![CDATA[${A[f][0][s.textNodeName]}]]>`,c=!1;continue}if(f===s.commentPropName){l+=u+`\x3c!--${A[f][0][s.textNodeName]}--\x3e`,c=!0;continue}if("?"===f[0]){const t=r(A[":@"],s),e="?xml"===f?"":u;let n=A[f][0][s.textNodeName];n=0!==n.length?" "+n:"",l+=e+`<${f}${n}${t}?>`,c=!0;continue}let p=u;""!==p&&(p+=s.indentBy);const g=u+`<${f}${r(A[":@"],s)}`,m=e(A[f],s,d,p);-1!==s.unpairedTags.indexOf(f)?s.suppressUnpairedNode?l+=g+">":l+=g+"/>":m&&0!==m.length||!s.suppressEmptyNode?m&&m.endsWith(">")?l+=g+`>${m}${u}</${f}>`:(l+=g+">",m&&""!==u&&(m.includes("/>")||m.includes("</"))?l+=u+s.indentBy+m+u:l+=m,l+=`</${f}>`):l+=g+"/>",c=!0}return l}function n(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];if(Object.prototype.hasOwnProperty.call(t,r)&&":@"!==r)return r}}function r(t,e){let n="";if(t&&!e.ignoreAttributes)for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let i=e.attributeValueProcessor(r,t[r]);i=o(i,e),!0===i&&e.suppressBooleanAttributes?n+=` ${r.substr(e.attributeNamePrefix.length)}`:n+=` ${r.substr(e.attributeNamePrefix.length)}="${i}"`}return n}function i(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let r in e.stopNodes)if(e.stopNodes[r]===t||e.stopNodes[r]==="*."+n)return!0;return!1}function o(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const r=e.entities[n];t=t.replace(r.regex,r.val)}return t}t.exports=function(t,n){let r="";return n.format&&n.indentBy.length>0&&(r="\n"),e(t,n,"",r)}},42029:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(24586),i=n(23615),o=n(82869);const s=.75,a=[];class u extends o.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}getShaders(){return{...super.getShaders(),fs:"#define SHADER_NAME multi-icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float gamma;\nuniform bool sdf;\nuniform float alphaCutoff;\nuniform float sdfBuffer;\nuniform float outlineBuffer;\nuniform vec4 outlineColor;\n\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n if (!picking_uActive) {\n float alpha = texture2D(iconsTexture, vTextureCoords).a;\n vec4 color = vColor;\n if (sdf) {\n float distance = alpha;\n alpha = smoothstep(sdfBuffer - gamma, sdfBuffer + gamma, distance);\n\n if (outlineBuffer > 0.0) {\n float inFill = alpha;\n float inBorder = smoothstep(outlineBuffer - gamma, outlineBuffer + gamma, distance);\n color = mix(outlineColor, vColor, inFill);\n alpha = inBorder;\n }\n }\n float a = alpha * color.a;\n \n if (a < alphaCutoff) {\n discard;\n }\n\n gl_FragColor = vec4(color.rgb, a * opacity);\n }\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n"}}initializeState(){super.initializeState(),this.getAttributeManager().addInstanced({instanceOffsets:{size:2,accessor:"getIconOffsets"},instancePickingColors:{type:5121,size:3,accessor:(t,{index:e,target:n})=>this.encodePickingColor(e,n)}})}updateState(t){super.updateState(t);const{props:e,oldProps:n}=t;let{outlineColor:r}=e;r!==n.outlineColor&&(r=r.map(t=>t/255),r[3]=Number.isFinite(r[3])?r[3]:1,this.setState({outlineColor:r})),!e.sdf&&e.outlineWidth&&i.A.warn("".concat(this.id,": fontSettings.sdf is required to render outline"))()}draw(t){const{sdf:e,smoothing:n,outlineWidth:r}=this.props,{outlineColor:i}=this.state,o=r?Math.max(n,s*(1-r)):-1;if(t.uniforms={...t.uniforms,sdfBuffer:s,outlineBuffer:o,gamma:n,sdf:Boolean(e),outlineColor:i},super.draw(t),e&&r){const{iconManager:t}=this.state;t.getTexture()&&this.state.model.draw({uniforms:{outlineBuffer:s}})}}getInstanceOffset(t){return t?Array.from(t).flatMap(t=>super.getInstanceOffset(t)):a}getInstanceColorMode(t){return 1}getInstanceIconFrame(t){return t?Array.from(t).flatMap(t=>super.getInstanceIconFrame(t)):a}}(0,r.A)(u,"defaultProps",{getIconOffsets:{type:"accessor",value:t=>t.offsets}
2,alphaCutoff:.001,smoothing:.1,outlineWidth:0,outlineColor:{type:"color",value:[0,0,0,255]}}),(0,r.A)(u,"layerName","MultiIconLayer")},42166:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},o(t,e,n||t)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.TwoClickPolygonMode=void 0;var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(c,t);var e,n,u,l=(u=c,function(){var t,e=s(u);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),l.apply(this,arguments)}return e=c,(n=[{key:"handleClick",value:function(t,e){e.modeConfig&&e.modeConfig.dragToDraw||(this.addClickSequence(t),this.checkAndFinishPolygon(e))}},{key:"handleStartDragging",value:function(t,e){e.modeConfig&&e.modeConfig.dragToDraw&&(this.addClickSequence(t),t.cancelPan())}},{key:"handleStopDragging",value:function(t,e){e.modeConfig&&e.modeConfig.dragToDraw&&(this.addClickSequence(t),this.checkAndFinishPolygon(e))}},{key:"checkAndFinishPolygon",value:function(t){var e=this.getClickSequence(),n=this.getTentativeGuide(t);if(e.length>1&&n&&"Polygon"===n.geometry.type){var r={type:"Feature",properties:{shape:n.properties.shape},geometry:{type:"Polygon",coordinates:n.geometry.coordinates}},i=this.getAddFeatureOrBooleanPolygonAction(r,t);this.resetClickSequence(),i&&t.onEdit(i)}}},{key:"getGuides",value:function(t){var e=t.lastPointerMoveEvent,n=t.modeConfig,r=this.getClickSequence(),i={type:"FeatureCollection",features:[]};if(0===r.length)return i;var o=r[0],s=e.mapCoords,a=this.getTwoClickPolygon(o,s,n);return a&&i.features.push({type:"Feature",properties:{shape:a.properties&&a.properties.shape,guideType:"tentative"},geometry:a.geometry}),i}},{key:"getTwoClickPolygon",value:function(t,e,n){return null}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),o(s(c.prototype),"handlePointerMove",this).call(this,t,e)}},{key:"createTentativeFeature",value:function(t){var e,n=t.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 1===r.length&&(e=this.getTwoClickPolygon(r[0],i[0],t.modeConfig)),e}}])&&i(e.prototype,n),c}(n(96146).GeoJsonEditMode);e.TwoClickPolygonMode=u},42402:(t,e,n)=>{"use strict";n.d(e,{U:()=>o});const r="count(): argument not an object",i="count(): argument not a container";function o(t){if(null===(e=t)||"object"!=typeof e)throw new Error(r);var e;if("function"==typeof t.count)return t.count();if(Number.isFinite(t.size))return t.size;if(Number.isFinite(t.length))return t.length;if(function(t){return null!==t&&"object"==typeof t&&t.constructor===Object}(t))return Object.keys(t).length;throw new Error(i)}},42641:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var r=n(78345),i=n(66224),o=n(82314),s=n(6963),a=n(93141);function u(t,e,n,u){if(u=u||{},!i.isObject.call(void 0,u))throw new Error("options is invalid");var l=u.units,c=u.zTranslation,h=u.mutate;if(!t)throw new Error("geojson is required");if(null==e||isNaN(e))throw new Error("distance is required");if(c&&"number"!=typeof c&&isNaN(c))throw new Error("zTranslation is not a number");if(c=void 0!==c?c:0,0===e&&0===c)return t;if(null==n||isNaN(n))throw new Error("direction is required");return e<0&&(e=-e,n+=180),!1!==h&&void 0!==h||(t=s.clone.call(void 0,t)),r.coordEach.call(void 0,t,function(t){var r=o.getCoords.call(void 0,a.rhumbDestination.call(void 0,t,e,n,{units:l}));t[0]=r[0],t[1]=r[1],c&&3===t.length&&(t[2]+=c)}),t}var l=u;e.default=l,e.transformTranslate=u},43168:(t,e,n)=>{"use strict";n.d(e,{x:()=>u});var r=n(74235),i=n(1050),o=n(23615),s=n(90455);const a={id:"JSON",name:"JSON",module:"",version:"",options:{},extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:function(t){const e=t[0],n=t[t.length-1];return"{"===e&&"}"===n||"["===e&&"]"===n},parseTextSync:JSON.parse},u=function(){const t="8.9.23",e=globalThis.deck&&globalThis.deck.VERSION;if(e&&e!==t)throw new Error("deck.gl - multiple versions detected: ".concat(e," vs ").concat(t));return e||(o.A.log(1,"deck.gl ".concat(t))(),globalThis.deck={...globalThis.deck,VERSION:t,version:t,log:o.A,_registerLoggers:s.k},(0,r.mk)([a,[i.$,{imagebitmap:{premultiplyAlpha:"none"}}]])),t}()},43405:(t,e,n)=>{"use strict";function r(t,e){if(t===e)return!0;if(Array.isArray(t)){const n=t.length;if(!e||e.length!==n)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}return!1}function i(t){let e,n={};return i=>{for(const o in i)if(!r(i[o],n[o])){e=t(i),n=i;break}return e}}n.d(e,{A:()=>i})},43409:(t,e,n)=>{"use strict";var r=n(14607),i=r("Object.prototype.toString"),o=n(53558)(),s=n(46132);if(o){var a=r("Symbol.prototype.toString"),u=s(/^Symbol\(.*\)$/);t.exports=function(t){if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||"[object Symbol]"!==i(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&u(a(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},43788:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(31323);function i(t,e={}){const n=Number(t[0]),i=Number(t[1]),o=Number(t[2]),s=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");const a=[n,i],u=[n,s],l=[o,s],c=[o,i];return r.polygon.call(void 0,[[a,c,l,u,a]],e.properties,{bbox:t,id:e.id})}var o=i;e.bboxPolygon=i,e.default=o},43801:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(82314);function i(t){const e=r.getCoords.call(void 0,t);let n,i,o=0,s=1;for(;s<e.length;)n=i||e[0],i=e[s],o+=(i[0]-n[0])*(i[1]+n[1]),s++;return o>0}var o=i;e.booleanClockwise=i,e.default=o},44341:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(34081);class i extends(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array)){clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){for(let n=0;n<this.ELEMENTS;++n)this[n]=t[n+e];return this.check()}toArray(t=[],e=0){for(let n=0;n<this.ELEMENTS;++n)t[e+n]=this[n];return t}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}to(t){return t===this?this:(0,r.cy)(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(r.$W)}formatString(t){let e="";for(let n=0;n<this.ELEMENTS;++n)e+=(n>0?", ":"")+(0,r.Fl)(this[n],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!(0,r.aI)(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,n){if(void 0===n)return this.lerp(this,t,e);for(let r=0;r<this.ELEMENTS;++r){const i=t[r];this[r]=i+n*(e[r]-i)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],t[n]),e[n]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if("number"==typeof t)for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;else for(let e=0;e<this.ELEMENTS&&e<t.length;++e)this[e]*=t[e];return this.check()}multiplyByScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}check(){if(r.$W.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invali
2d numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.multiplyByScalar(1/t)}clampScalar(t,e){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],t),e);return this.check()}get elements(){return this}}},44454:(t,e,n)=>{"use strict";n.d(e,{Dz:()=>h,tj:()=>c,XZ:()=>at,w8:()=>et,o0:()=>tt,bQ:()=>Z,NG:()=>l,uZ:()=>ut,uF:()=>a,C6:()=>u,Rm:()=>r,AB:()=>K,ZA:()=>lt,Rz:()=>J,zv:()=>$});const r=new(n(8554).t)({id:"luma.gl"});function i(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}const o="Invalid WebGLRenderingContext",s="Requires WebGL2";function a(t){return"undefined"!=typeof WebGLRenderingContext&&t instanceof WebGLRenderingContext||"undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||Boolean(t&&Number.isFinite(t._version))}function u(t){return"undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||Boolean(t&&2===t._version)}function l(t){return u(t)?t:null}function c(t){return i(a(t),o),t}function h(t){return i(u(t),s),t}const A={};const f=function t(e){const n=e.gl;this.ext=e,this.isAlive=!0,this.hasBeenBound=!1,this.elementArrayBuffer=null,this.attribs=new Array(e.maxVertexAttribs);for(let e=0;e<this.attribs.length;e++){const r=new t.VertexAttrib(n);this.attribs[e]=r}this.maxAttrib=0};(f.VertexAttrib=function(t){this.enabled=!1,this.buffer=null,this.size=4,this.type=5126,this.normalized=!1,this.stride=16,this.offset=0,this.cached="",this.recache()}).prototype.recache=function(){this.cached=[this.size,this.type,this.normalized,this.stride,this.offset].join(":")};const d=function(t){const e=this;this.gl=t,function(t){const e=t.getError;t.getError=function(){let n;do{n=e.apply(t),0!==n&&(A[n]=!0)}while(0!==n);for(n in A)if(A[n])return delete A[n],parseInt(n,10);return 0}}(t);const n=this.original={getParameter:t.getParameter,enableVertexAttribArray:t.enableVertexAttribArray,disableVertexAttribArray:t.disableVertexAttribArray,bindBuffer:t.bindBuffer,getVertexAttrib:t.getVertexAttrib,vertexAttribPointer:t.vertexAttribPointer};t.getParameter=function(t){return t===e.VERTEX_ARRAY_BINDING_OES?e.currentVertexArrayObject===e.defaultVertexArrayObject?null:e.currentVertexArrayObject:n.getParameter.apply(this,arguments)},t.enableVertexAttribArray=function(t){const r=e.currentVertexArrayObject;return r.maxAttrib=Math.max(r.maxAttrib,t),r.attribs[t].enabled=!0,n.enableVertexAttribArray.apply(this,arguments)},t.disableVertexAttribArray=function(t){const r=e.currentVertexArrayObject;return r.maxAttrib=Math.max(r.maxAttrib,t),r.attribs[t].enabled=!1,n.disableVertexAttribArray.apply(this,arguments)},t.bindBuffer=function(t,r){switch(t){case 34962:e.currentArrayBuffer=r;break;case 34963:e.currentVertexArrayObject.elementArrayBuffer=r}return n.bindBuffer.apply(this,arguments)},t.getVertexAttrib=function(t,r){const i=e.currentVertexArrayObject.attribs[t];switch(r){case 34975:return i.buffer;case 34338:return i.enabled;case 34339:return i.size;case 34340:return i.stride;case 34341:return i.type;case 34922:return i.normalized;default:return n.getVertexAttrib.apply(this,arguments)}},t.vertexAttribPointer=function(t,r,i,o,s,a){const u=e.currentVertexArrayObject;u.maxAttrib=Math.max(u.maxAttrib,t);const l=u.attribs[t];return l.buffer=e.currentArrayBuffer,l.size=r,l.type=i,l.normalized=o,l.stride=s,l.offset=a,l.recache(),n.vertexAttribPointer.apply(this,arguments)},t.instrumentExtension&&t.instrumentExtension(this,"OES_vertex_array_object"),t.canvas&&t.canvas.addEventListener("webglcontextrestored",()=>{globalThis.console&&globalThis.console.log&&globalThis.console.log("OESVertexArrayObject emulation library context restored"),e.reset_()},!0),this.reset_()};d.prototype.VERTEX_ARRAY_BINDING_OES=34229,d.prototype.reset_=function(){if(void 0!==this.vertexArrayObjects)for(let t=0;t<this.vertexArrayObjects.length;++t)this.vertexArrayObjects.isAlive=!1;const t=this.gl;this.maxVertexAttribs=t.getParameter(34921),this.defaultVertexArrayObject=ne
2w f(this),this.currentVertexArrayObject=null,this.currentArrayBuffer=null,this.vertexArrayObjects=[this.defaultVertexArrayObject],this.bindVertexArrayOES(null)},d.prototype.createVertexArrayOES=function(){const t=new f(this);return this.vertexArrayObjects.push(t),t},d.prototype.deleteVertexArrayOES=function(t){t.isAlive=!1,this.vertexArrayObjects.splice(this.vertexArrayObjects.indexOf(t),1),this.currentVertexArrayObject===t&&this.bindVertexArrayOES(null)},d.prototype.isVertexArrayOES=function(t){return!!(t&&t instanceof f&&t.hasBeenBound&&t.ext===this)},d.prototype.bindVertexArrayOES=function(t){const e=this.gl;if(t&&!t.isAlive)return n="bindVertexArrayOES: attempt to bind deleted arrayObject",A[1282]=!0,void(void 0!==n&&(r=n,globalThis.console&&globalThis.console.error&&globalThis.console.error(r)));var n,r;const i=this.original,o=this.currentVertexArrayObject;this.currentVertexArrayObject=t||this.defaultVertexArrayObject,this.currentVertexArrayObject.hasBeenBound=!0;const s=this.currentVertexArrayObject;if(o===s)return;o&&s.elementArrayBuffer===o.elementArrayBuffer||i.bindBuffer.call(e,34963,s.elementArrayBuffer);let a=this.currentArrayBuffer;const u=Math.max(o?o.maxAttrib:0,s.maxAttrib);for(let t=0;t<=u;t++){const n=s.attribs[t],r=o?o.attribs[t]:null;if(o&&n.enabled===r.enabled||(n.enabled?i.enableVertexAttribArray.call(e,t):i.disableVertexAttribArray.call(e,t)),n.enabled){let s=!1;o&&n.buffer===r.buffer||(a!==n.buffer&&(i.bindBuffer.call(e,34962,n.buffer),a=n.buffer),s=!0),(s||n.cached!==r.cached)&&i.vertexAttribPointer.call(e,t,n.size,n.type,n.normalized,n.stride,n.offset)}}this.currentArrayBuffer!==a&&i.bindBuffer.call(e,34962,this.currentArrayBuffer)};const p="OES_element_index",g="WEBGL_draw_buffers",m="WEBGL_debug_renderer_info",y=35723,v=36795,_=34047,b=37445,w=37446,E=t=>u(t)?void 0:0,x={3074:t=>u(t)?void 0:36064,[y]:t=>u(t)?void 0:4352,35977:E,32937:E,[v]:(t,e)=>{const n=u(t)?t.getExtension("EXT_disjoint_timer_query_webgl2"):t.getExtension("EXT_disjoint_timer_query");return n&&n.GPU_DISJOINT_EXT?e(n.GPU_DISJOINT_EXT):0},[b]:(t,e)=>{const n=t.getExtension(m);return e(n&&n.UNMASKED_VENDOR_WEBGL||7936)},[w]:(t,e)=>{const n=t.getExtension(m);return e(n&&n.UNMASKED_RENDERER_WEBGL||7937)},[_]:(t,e)=>{const n=t.luma.extensions.EXT_texture_filter_anisotropic;return n?e(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1},32883:E,35071:E,37447:E,36063:(t,e)=>{if(!u(t)){const n=t.getExtension(g);return n?e(n.MAX_COLOR_ATTACHMENTS_WEBGL):0}},35379:E,35374:E,35377:E,34852:t=>{if(!u(t)){const e=t.getExtension(g);return e?e.MAX_DRAW_BUFFERS_WEBGL:0}},36203:t=>t.getExtension(p)?2147483647:65535,33001:t=>t.getExtension(p)?16777216:65535,33e3:t=>16777216,37157:E,35373:E,35657:E,36183:E,37137:E,34045:E,35978:E,35979:E,35968:E,35376:E,35375:E,35659:E,37154:E,35371:E,35658:E,35076:E,35077:E,35380:E},S="OES_vertex_array_object",T="ANGLE_instanced_arrays",P="WEBGL_draw_buffers",C="EXT_disjoint_timer_query",M={[S]:{meta:{suffix:"OES"},createVertexArray:()=>{i(!1,"VertexArray requires WebGL2 or OES_vertex_array_object extension")},deleteVertexArray:()=>{},bindVertexArray:()=>{},isVertexArray:()=>!1},[T]:{meta:{suffix:"ANGLE"},vertexAttribDivisor(t,e){i(0===e,"WebGL instanced rendering not supported")},drawElementsInstanced:()=>{},drawArraysInstanced:()=>{}},[P]:{meta:{suffix:"WEBGL"},drawBuffers:()=>{i(!1)}},[C]:{meta:{suffix:"EXT"},createQuery:()=>{i(!1)},deleteQuery:()=>{i(!1)},beginQuery:()=>{i(!1)},endQuery:()=>{},getQuery(t,e){return this.getQueryObject(t,e)},getQueryParameter(t,e){return this.getQueryObject(t,e)},getQueryObject:()=>{}}},I={readBuffer:(t,e,n)=>{u(t)&&e(n)},getVertexAttrib:(t,e,n,r)=>{const{webgl2:i,ext:o}=function(t,e){return{webgl2:u(t),ext:t.getExtension(e)}}(t,T);let s;switch(r){case 35069:s=!!i&&void 0;break;case 35070:s=i||o?void 0:0}return void 0!==s?s:e(n,r)},getProgramParameter:(t,e,n,r)=>{if(!u(t))switch(r){case 35967:return 35981;case 35971:case 35382:return 0}return e(n,r)},getInternalformatParameter:(t,e,n,r,i)=>u(t)||32937!==i?t.getInternalformatParameter(n,r,i):new Int32Array([0]),getTexParameter(t,e,n,r){if(34046===r){const{extensions:e}=t.luma,n=e.EXT_texture_filter_anisotropic;r=n&&n.TEXTURE_MAX_ANISOTROPY_EXT||34046}return e(n,r)},getParameter:function(t,e,n){const r=x[n],i="function"==typeof r?r(t,e,n):r;return void 0!==i?i:e(n)},hint:(t,e,n,r)=>e(n,r)};function O(t,e){let{extension:n,target:r,target2:o}=e;const s=M[n];i(s);const{meta:a={}}=s,{suffix:u=""}=a,l=t.getExtension(n);for(const e of Object.keys(s)){const n="".concat(e).concat(u);let i=null;"meta"===e||"function"==typeof t[e]||(l&&"function"==typeof l[n]?i=function(){return l[n](...arguments)}:"function"==typeof s[e]&&(i=s[e].bind(r))),i&&(r[e]=i,o[e]=i)}}globalThis.polyfillContext=function(t){t.luma=t.luma||{};const{luma:e}=t;return e.polyfilled||(function(t){if("function"==typeof t.createVertexArray)return;
2const e=t.getSupportedExtensions;t.getSupportedExtensions=function(){const t=e.call(this)||[];return t.indexOf("OES_vertex_array_object")<0&&t.push("OES_vertex_array_object"),t};const n=t.getExtension;t.getExtension=function(e){return n.call(this,e)||("OES_vertex_array_object"!==e?null:(t.__OESVertexArrayObject||(this.__OESVertexArrayObject=new d(this)),this.__OESVertexArrayObject))}}(t),function(t){t.luma.extensions={};const e=t.getSupportedExtensions()||[];for(const n of e)t.luma[n]=t.getExtension(n)}(t),function(t,e){for(const n of Object.getOwnPropertyNames(e))"overrides"!==n&&O(t,{extension:n,target:t.luma,target2:t})}(t,M),function(t,e){let{target:n,target2:r}=e;Object.keys(I).forEach(e=>{if("function"==typeof I[e]){const i=t[e]?t[e].bind(t):()=>{},o=I[e].bind(null,t,i);n[e]=o,r[e]=o}})}(t,{target:e,target2:t}),e.polyfilled=!0),t};const R={3042:!1,32773:new Float32Array([0,0,0,0]),32777:32774,34877:32774,32969:1,32968:0,32971:1,32970:0,3106:new Float32Array([0,0,0,0]),3107:[!0,!0,!0,!0],2884:!1,2885:1029,2929:!1,2931:1,2932:513,2928:new Float32Array([0,1]),2930:!0,3024:!0,36006:null,2886:2305,33170:4352,2849:1,32823:!1,32824:0,10752:0,32938:1,32939:!1,3089:!1,3088:new Int32Array([0,0,1024,1024]),2960:!1,2961:0,2968:4294967295,36005:4294967295,2962:519,2967:0,2963:4294967295,34816:519,36003:0,36004:4294967295,2964:7680,2965:7680,2966:7680,34817:7680,34818:7680,34819:7680,2978:[0,0,1024,1024],3333:4,3317:4,37440:!1,37441:!1,37443:37444,35723:4352,36010:null,35977:!1,3330:0,3332:0,3331:0,3314:0,32878:0,3316:0,3315:0,32877:0},L=(t,e,n)=>e?t.enable(n):t.disable(n),B=(t,e,n)=>t.hint(n,e),k=(t,e,n)=>t.pixelStorei(n,e);function N(t){return Array.isArray(t)||ArrayBuffer.isView(t)}const F={3042:L,32773:(t,e)=>t.blendColor(...e),32777:"blendEquation",34877:"blendEquation",32969:"blendFunc",32968:"blendFunc",32971:"blendFunc",32970:"blendFunc",3106:(t,e)=>t.clearColor(...e),3107:(t,e)=>t.colorMask(...e),2884:L,2885:(t,e)=>t.cullFace(e),2929:L,2931:(t,e)=>t.clearDepth(e),2932:(t,e)=>t.depthFunc(e),2928:(t,e)=>t.depthRange(...e),2930:(t,e)=>t.depthMask(e),3024:L,35723:B,36006:(t,e)=>{const n=u(t)?36009:36160;return t.bindFramebuffer(n,e)},2886:(t,e)=>t.frontFace(e),33170:B,2849:(t,e)=>t.lineWidth(e),32823:L,32824:"polygonOffset",10752:"polygonOffset",35977:L,32938:"sampleCoverage",32939:"sampleCoverage",3089:L,3088:(t,e)=>t.scissor(...e),2960:L,2961:(t,e)=>t.clearStencil(e),2968:(t,e)=>t.stencilMaskSeparate(1028,e),36005:(t,e)=>t.stencilMaskSeparate(1029,e),2962:"stencilFuncFront",2967:"stencilFuncFront",2963:"stencilFuncFront",34816:"stencilFuncBack",36003:"stencilFuncBack",36004:"stencilFuncBack",2964:"stencilOpFront",2965:"stencilOpFront",2966:"stencilOpFront",34817:"stencilOpBack",34818:"stencilOpBack",34819:"stencilOpBack",2978:(t,e)=>t.viewport(...e),3333:k,3317:k,37440:k,37441:k,37443:k,3330:k,3332:k,3331:k,36010:(t,e)=>t.bindFramebuffer(36008,e),3314:k,32878:k,3316:k,3315:k,32877:k,framebuffer:(t,e)=>{const n=e&&"handle"in e?e.handle:e;return t.bindFramebuffer(36160,n)},blend:(t,e)=>e?t.enable(3042):t.disable(3042),blendColor:(t,e)=>t.blendColor(...e),blendEquation:(t,e)=>{e=N(e)?e:[e,e],t.blendEquationSeparate(...e)},blendFunc:(t,e)=>{e=N(e)&&2===e.length?[...e,...e]:e,t.blendFuncSeparate(...e)},clearColor:(t,e)=>t.clearColor(...e),clearDepth:(t,e)=>t.clearDepth(e),clearStencil:(t,e)=>t.clearStencil(e),colorMask:(t,e)=>t.colorMask(...e),cull:(t,e)=>e?t.enable(2884):t.disable(2884),cullFace:(t,e)=>t.cullFace(e),depthTest:(t,e)=>e?t.enable(2929):t.disable(2929),depthFunc:(t,e)=>t.depthFunc(e),depthMask:(t,e)=>t.depthMask(e),depthRange:(t,e)=>t.depthRange(...e),dither:(t,e)=>e?t.enable(3024):t.disable(3024),derivativeHint:(t,e)=>{t.hint(35723,e)},frontFace:(t,e)=>t.frontFace(e),mipmapHint:(t,e)=>t.hint(33170,e),lineWidth:(t,e)=>t.lineWidth(e),polygonOffsetFill:(t,e)=>e?t.enable(32823):t.disable(32823),polygonOffset:(t,e)=>t.polygonOffset(...e),sampleCoverage:(t,e)=>t.sampleCoverage(...e),scissorTest:(t,e)=>e?t.enable(3089):t.disable(3089),scissor:(t,e)=>t.scissor(...e),stencilTest:(t,e)=>e?t.enable(2960):t.disable(2960),stencilMask:(t,e)=>{e=N(e)?e:[e,e];const[n,r]=e;t.stencilMaskSeparate(1028,n),t.stencilMaskSeparate(1029,r)},stencilFunc:(t,e)=>{e=N(e)&&3===e.length?[...e,...e]:e;const[n,r,i,o,s,a]=e;t.stencilFuncSeparate(1028,n,r,i),t.stencilFuncSeparate(1029,o,s,a)},stencilOp:(t,e)=>{e=N(e)&&3===e.length?[...e,...e]:e;const[n,r,i,o,s,a]=e;t.stencilOpSeparate(1028,n,r,i),t.stencilOpSeparate(1029,o,s,a)},viewport:(t,e)=>t.viewport(...e)};function D(t,e,n){return void 0!==e[t]?e[t]:n[t]}const j={blendEquation:(t,e,n)=>t.blendEquationSeparate(D(32777,e,n),D(34877,e,n)),blendFunc:(t,e,n)=>t.blendFuncSeparate(D(32969,e,n),D(32968,e,n),D(32971,e,n),D(32970,e,n)),polygonOffset:(t,e,n)=>t.polygonOffset(D(32824,e,n),D(10752,e,n)),sampleCoverage:(t,e,n)=>
2t.sampleCoverage(D(32938,e,n),D(32939,e,n)),stencilFuncFront:(t,e,n)=>t.stencilFuncSeparate(1028,D(2962,e,n),D(2967,e,n),D(2963,e,n)),stencilFuncBack:(t,e,n)=>t.stencilFuncSeparate(1029,D(34816,e,n),D(36003,e,n),D(36004,e,n)),stencilOpFront:(t,e,n)=>t.stencilOpSeparate(1028,D(2964,e,n),D(2965,e,n),D(2966,e,n)),stencilOpBack:(t,e,n)=>t.stencilOpSeparate(1029,D(34817,e,n),D(34818,e,n),D(34819,e,n))},U={enable:(t,e)=>t({[e]:!0}),disable:(t,e)=>t({[e]:!1}),pixelStorei:(t,e,n)=>t({[e]:n}),hint:(t,e,n)=>t({[e]:n}),bindFramebuffer:(t,e,n)=>{switch(e){case 36160:return t({36006:n,36010:n});case 36009:return t({36006:n});case 36008:return t({36010:n});default:return null}},blendColor:(t,e,n,r,i)=>t({32773:new Float32Array([e,n,r,i])}),blendEquation:(t,e)=>t({32777:e,34877:e}),blendEquationSeparate:(t,e,n)=>t({32777:e,34877:n}),blendFunc:(t,e,n)=>t({32969:e,32968:n,32971:e,32970:n}),blendFuncSeparate:(t,e,n,r,i)=>t({32969:e,32968:n,32971:r,32970:i}),clearColor:(t,e,n,r,i)=>t({3106:new Float32Array([e,n,r,i])}),clearDepth:(t,e)=>t({2931:e}),clearStencil:(t,e)=>t({2961:e}),colorMask:(t,e,n,r,i)=>t({3107:[e,n,r,i]}),cullFace:(t,e)=>t({2885:e}),depthFunc:(t,e)=>t({2932:e}),depthRange:(t,e,n)=>t({2928:new Float32Array([e,n])}),depthMask:(t,e)=>t({2930:e}),frontFace:(t,e)=>t({2886:e}),lineWidth:(t,e)=>t({2849:e}),polygonOffset:(t,e,n)=>t({32824:e,10752:n}),sampleCoverage:(t,e,n)=>t({32938:e,32939:n}),scissor:(t,e,n,r,i)=>t({3088:new Int32Array([e,n,r,i])}),stencilMask:(t,e)=>t({2968:e,36005:e}),stencilMaskSeparate:(t,e,n)=>t({[1028===e?2968:36005]:n}),stencilFunc:(t,e,n,r)=>t({2962:e,2967:n,2963:r,34816:e,36003:n,36004:r}),stencilFuncSeparate:(t,e,n,r,i)=>t({[1028===e?2962:34816]:n,[1028===e?2967:36003]:r,[1028===e?2963:36004]:i}),stencilOp:(t,e,n,r)=>t({2964:e,2965:n,2966:r,34817:e,34818:n,34819:r}),stencilOpSeparate:(t,e,n,r,i)=>t({[1028===e?2964:34817]:n,[1028===e?2965:34818]:r,[1028===e?2966:34819]:i}),viewport:(t,e,n,r,i)=>t({2978:[e,n,r,i]})},G=(t,e)=>t.isEnabled(e),z={3042:G,2884:G,2929:G,3024:G,32823:G,32926:G,32928:G,3089:G,2960:G,35977:G};function V(t){for(const e in t)return!1;return!0}function H(t,e){if(t===e)return!0;const n=Array.isArray(t)||ArrayBuffer.isView(t),r=Array.isArray(e)||ArrayBuffer.isView(e);if(n&&r&&t.length===e.length){for(let n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0}return!1}function q(t,e){const n=t[e].bind(t);t[e]=function(){const e=arguments.length<=0?void 0:arguments[0];return e in t.state.cache&&t.state.enable?t.state.cache[e]:n(...arguments)},Object.defineProperty(t[e],"name",{value:"".concat(e,"-from-cache"),configurable:!1})}function W(t,e,n){const r=t[e].bind(t);t[e]=function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];const{valueChanged:s,oldValue:a}=n(t.state._updateCache,...i);return s&&r(...i),a},Object.defineProperty(t[e],"name",{value:"".concat(e,"-to-cache"),configurable:!1})}class X{constructor(t){let{copyState:e=!1,log:n=()=>{}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=t,this.program=null,this.stateStack=[],this.enable=!0,this.cache=e?Z(t):Object.assign({},R),this.log=n,this._updateCache=this._updateCache.bind(this),Object.seal(this)}push(){this.stateStack.push({})}pop(){i(this.stateStack.length>0);const t=this.stateStack[this.stateStack.length-1];J(this.gl,t),this.stateStack.pop()}_updateCache(t){let e,n=!1;const r=this.stateStack.length>0&&this.stateStack[this.stateStack.length-1];for(const o in t){i(void 0!==o);const s=t[o],a=this.cache[o];H(s,a)||(n=!0,e=a,r&&!(o in r)&&(r[o]=a),this.cache[o]=s)}return{valueChanged:n,oldValue:e}}}function Y(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{enable:n=!0,copyState:r}=e;if(i(void 0!==r),!t.state){const{polyfillContext:e}=globalThis;e&&e(t),t.state=new X(t,{copyState:r}),function(t){const e=t.useProgram.bind(t);t.useProgram=function(n){t.state.program!==n&&(e(n),t.state.program=n)}}(t);for(const e in U)W(t,e,U[e]);q(t,"getParameter"),q(t,"isEnabled")}return t.state.enable=n,t}function Q(t){i(t.state),t.state.pop()}function J(t,e){if(i(a(t),"setParameters requires a WebGL context"),V(e))return;const n={};for(const r in e){const i=Number(r),o=F[r];o&&("string"==typeof o?n[o]=!0:o(t,e[r],i))}const r=t.state&&t.state.cache;if(r)for(const i in n)(0,j[i])(t,e,r)}function Z(t,e){if("number"==typeof(e=e||R)){const n=e,r=z[n];return r?r(t,n):t.getParameter(n)}const n=Array.isArray(e)?e:Object.keys(e),r={};for(const e of n){const n=z[e];r[e]=n?n(t,Number(e)):t.getParameter(Number(e))}return r}function K(t){J(t,R)}function $(t,e,n){if(V(e))return n(t);const{nocatch:r=!0}=e;let i;if(function(t){t.state||Y(t,{copyState:!1}),t.state.push()}(t),J(t,e),r)i=n(t),Q(t);else try{i=n(t)}finally{Q(t)}return i}function tt(t){const{luma:e}=t;if(t.canvas&&e){const n=e.canvasSizeInfo,r="clientWidth"in n?n.clientWidth:t.canvas.clientWidth;return r?t.drawingBufferWidth/r:1}return 1}function et(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return function(t,e,n,r,i){const o=nt(t[0],e,n);let s=rt(t[1],e,r,i),a=nt(t[0]+1,e,n);const u=a===n-1?a:a-1;let l;return a=rt(t[1]+1,e,r,i),i?(a=0===a?a:a+1,l=s,s=a):l=a===r-1?a:a-1,{x:o,y:s,width:Math.max(u-o+1,1),height:Math.max(l-s+1,1)}}(e,tt(t),t.drawingBufferWidth,t.drawingBufferHeight,n)}function nt(t,e,n){return Math.min(Math.round(t*e),n-1)}function rt(t,e,n,r){return r?Math.max(0,n-1-Math.round(t*e)):Math.min(Math.round(t*e),n-1)}const it=(0,n(90669).A)(),ot=it&&"undefined"!=typeof document,st={webgl2:!0,webgl1:!0,throwOnError:!0,manageState:!0,canvas:null,debug:!1,width:800,height:600};function at(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(it,"createGLContext only available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils"),t=Object.assign({},st,t);const{width:e,height:n}=t;function o(e){if(t.throwOnError)throw new Error(e);return console.error(e),null}let s;t.onError=o;const{canvas:a}=t,l=function(t){let e,{canvas:n,width:r=800,height:i=600,onError:o}=t;return"string"==typeof n?(ot&&"complete"===document.readyState||o("createGLContext c
2alled on canvas '".concat(n,"' before page was loaded")),e=document.getElementById(n)):n?e=n:(e=document.createElement("canvas"),e.id="lumagl-canvas",e.style.width=Number.isFinite(r)?"".concat(r,"px"):"100%",e.style.height=Number.isFinite(i)?"".concat(i,"px"):"100%",document.body.insertBefore(e,document.body.firstChild)),e}({canvas:a,width:e,height:n,onError:o});return s=function(t,e){const{onError:n}=e;let r=null;const i=t=>r=t.statusMessage||r;t.addEventListener("webglcontextcreationerror",i,!1);const{webgl1:o=!0,webgl2:s=!0}=e;let a=null;return s&&(a=a||t.getContext("webgl2",e),a=a||t.getContext("experimental-webgl2",e)),o&&(a=a||t.getContext("webgl",e),a=a||t.getContext("experimental-webgl",e)),t.removeEventListener("webglcontextcreationerror",i,!1),a?(e.onContextLost&&t.addEventListener("webglcontextlost",e.onContextLost,!1),e.onContextRestored&&t.addEventListener("webglcontextrestored",e.onContextRestored,!1),a):n("Failed to create ".concat(s&&!o?"WebGL2":"WebGL"," context: ").concat(r||"Unknown error"))}(l,t),s?(s=ut(s,t),function(t){const e=u(t)?"WebGL2":"WebGL1",n=function(t){const e=t.getParameter(7936),n=t.getParameter(7937),r=t.getExtension("WEBGL_debug_renderer_info");return{vendor:r&&t.getParameter(r.UNMASKED_VENDOR_WEBGL||7936)||e,renderer:r&&t.getParameter(r.UNMASKED_RENDERER_WEBGL||7937)||n,vendorMasked:e,rendererMasked:n,version:t.getParameter(7938),shadingLanguageVersion:t.getParameter(35724)}}(t),i=n?"(".concat(n.vendor,",").concat(n.renderer,")"):"",o=t.debug?" debug":"";r.info(1,"".concat(e).concat(o," context ").concat(i))()}(s),s):null}function ut(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||t._instrumented)return t;t._version=t._version||function(t){return"undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext?2:1}(t),t.luma=t.luma||{},t.luma.canvasSizeInfo=t.luma.canvasSizeInfo||{},e=Object.assign({},st,e);const{manageState:n,debug:i}=e;return n&&Y(t,{copyState:!1,log:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.log(1,...e)()}}),it&&i&&(globalThis.makeDebugContext?(t=globalThis.makeDebugContext(t,e),r.level=Math.max(r.level,1)):r.warn('WebGL debug mode not activated. import "@luma.gl/debug" to enable.')()),t._instrumented=!0,t}function lt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.canvas)return void function(t,e,n){let i="width"in n?n.width:t.canvas.clientWidth,o="height"in n?n.height:t.canvas.clientHeight;i&&o||(r.log(1,"Canvas clientWidth/clientHeight is 0")(),e=1,i=t.canvas.width||1,o=t.canvas.height||1),t.luma=t.luma||{},t.luma.canvasSizeInfo=t.luma.canvasSizeInfo||{};const s=t.luma.canvasSizeInfo;if(s.clientWidth!==i||s.clientHeight!==o||s.devicePixelRatio!==e){let n=e;const s=Math.floor(i*n),a=Math.floor(o*n);t.canvas.width=s,t.canvas.height=a,t.drawingBufferWidth===s&&t.drawingBufferHeight===a||(r.warn("Device pixel ratio clamped")(),n=Math.min(t.drawingBufferWidth/i,t.drawingBufferHeight/o),t.canvas.width=Math.floor(i*n),t.canvas.height=Math.floor(o*n)),Object.assign(t.luma.canvasSizeInfo,{clientWidth:i,clientHeight:o,devicePixelRatio:e})}}(t,function(t){const e="undefined"==typeof window?1:window.devicePixelRatio||1;return Number.isFinite(t)?t<=0?1:t:t?e:1}(e.useDevicePixels),e);const n=t.getExtension("STACKGL_resize_drawingbuffer");n&&"width"in e&&"height"in e&&n.resize(e.width,e.height)}},44776:(t,e,n)=>{"use strict";n.r(e),n.d(e,{ArcLayer:()=>r.A,BitmapLayer:()=>i.A,ColumnLayer:()=>m.A,GeoJsonLayer:()=>w.A,GridCellLayer:()=>v,IconLayer:()=>o.A,LineLayer:()=>d,PathLayer:()=>_.A,PointCloudLayer:()=>p.A,PolygonLayer:()=>b.A,ScatterplotLayer:()=>g.A,SolidPolygonLayer:()=>x.A,TextLayer:()=>E.A,_MultiIconLayer:()=>S.A,_TextBackgroundLayer:()=>T.A});var r=n(52343),i=n(87693),o=n(82869),s=n(24586),a=n(99608),u=n(27371),l=n(10707),c=n(93314),h=n(25330),A=n(67069);const f={getSourcePosition:{type:"accessor",value:t=>t.sourcePosition},getTargetPosition:{type:"accessor",value:t=>t.targetPosition},getColor:{type:"accessor",value:[0,0,0,255]},getWidth:{type:"accessor",value:1},widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}};class d extends a.A{getBounds(){var t;return null===(t=this.getAttributeManager())||void 0===t?void 0:t.getBounds(["instanceSourcePositions","instanceTargetPositions"])}getShaders(){return super.getShaders({vs:"#define SHADER_NAME line-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\n\nuniform float opacity;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;
2\nuniform float useShortestPath;\nuniform int widthUnits;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n return dir_screenspace * offset_direction * width / 2.0;\n}\n\nvec3 splitLine(vec3 a, vec3 b, float x) {\n float t = (x - a.x) / (b.x - a.x);\n return vec3(x, mix(a.yz, b.yz, t));\n}\n\nvoid main(void) {\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n\n vec3 source_world = instanceSourcePositions;\n vec3 target_world = instanceTargetPositions;\n vec3 source_world_64low = instanceSourcePositions64Low;\n vec3 target_world_64low = instanceTargetPositions64Low;\n\n if (useShortestPath > 0.5 || useShortestPath < -0.5) {\n source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n target_world.x = mod(target_world.x + 180., 360.
20) - 180.;\n float deltaLng = target_world.x - source_world.x;\n\n if (deltaLng * useShortestPath > 180.) {\n source_world.x += 360. * useShortestPath;\n source_world = splitLine(source_world, target_world, 180. * useShortestPath);\n source_world_64low = vec3(0.0);\n } else if (deltaLng * useShortestPath < -180.) {\n target_world.x += 360. * useShortestPath;\n target_world = splitLine(source_world, target_world, 180. * useShortestPath);\n target_world_64low = vec3(0.0);\n } else if (useShortestPath < 0.) {\n gl_Position = vec4(0.);\n return;\n }\n }\n vec4 source_commonspace;\n vec4 target_commonspace;\n vec4 source = project_position_to_clipspace(source_world, source_world_64low, vec3(0.), source_commonspace);\n vec4 target = project_position_to_clipspace(target_world, target_world_64low, vec3(0.), target_commonspace);\n float segmentIndex = positions.x;\n vec4 p = mix(source, target, segmentIndex);\n geometry.position = mix(source_commonspace, target_commonspace, segmentIndex);\n uv = positions.xy;\n geometry.uv = uv;\n geometry.pickingColor = instancePickingColors;\n float widthPixels = clamp(\n project_size_to_pixel(instanceWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels\n );\n vec3 offset = vec3(\n getExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),\n 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n DECKGL_FILTER_GL_POSITION(p, geometry);\n gl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME line-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[u.A,l.A]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1}})}updateState(t){if(super.updateState(t),t.changeFlags.extensionsChanged){var e;const{gl:t}=this.context;null===(e=this.state.model)||void 0===e||e.delete(),this.state.model=this._getModel(t),this.getAttributeManager().invalidateAll()}}draw({uniforms:t}){const{widthUnits:e,widthScale:n,widthMinPixels:r,widthMaxPixels:i,wrapLongitude:o}=this.props;this.state.model.setUniforms(t).setUniforms({widthUnits:c.p5[e],widthScale:n,widthMinPixels:r,widthMaxPixels:i,useShortestPath:o?1:0}).draw(),o&&this.state.model.setUniforms({useShortestPath:-1}).draw()}_getModel(t){return new h.A(t,{...this.getShaders(),id:this.props.id,geometry:new A.A({drawMode:5,attributes:{positions:new Float32Array([0,-1,0,0,1,0,1,-1,0,1,1,0])}}),isInstanced:!0})}}(0,s.A)(d,"layerName","LineLayer"),(0,s.A)(d,"defaultProps",f);var p=n(41302),g=n(72718),m=n(31870),y=n(11085);class v extends m.A{getGeometry(t){return new y.A}draw({uniforms:t}){const{elevationScale:e,extruded:n,offset:r,coverage:i,cellSize:o,angle:s,radiusUnits:a}=this.props;this.state.model.setUniforms(t).setUniforms({radius:o/2,radiusUnits:c.p5[a],angle:s,offset:r,extruded:n,coverage:i,elevationScale:e,edgeDistance:1,isWireframe:!1}).draw()}}(0,s.A)(v,"layerName","GridCellLayer"),(0,s.A)(v,"defaultProps",{cellSize:{type:"number",min:0,value:1e3},offset:{type:"array",value:[1,1]}});var _=n(88330),b=n(70851),w=n(65695),E=n(52336),x=n(8033),S=n(42029),T=n(13419)},44969:(t,e,n)=>{"use strict";var r=n(27368),i=n(79818),o=n(21026),s=n(528),a=n(68989),u=n(77575),l=n(55968),c=n(55387),h=n(56815),A=n(56227),f=n(19543),d=n(52672),p=n(31189),g=n(49228),m=n(68502),y=n(39334),v=n(52730),_=n(27300),b=i("SharedArrayBuffer.prototype.byteLength",!0),w=i("Date.prototype.getTime"),E=Object.getPrototypeOf,x=i("Object.prototype.toString"),S=s("%Set%",!0),T=i("Map.prototype.has",!0),P=i("Map.prototype.get",!0),C=i("Map.prototype.size",!0),M=i("Set.prototype.add",!0),I=i("Set.prototype.delete",!0),O=i("Set.prototype.has",!0),R=i("Set.prototype.size",!0);function L(t,e,n,r){for(var i,o=a(t);(i=o.next())&&!i.done;)if(D(e,i.value,n,r))return I(t,i.value),!0;return!1}function B(t){return void 0===t?null:"object"!=typeof t?"symbol"!=typeof t&&("string"!=typeof t&&"number"!=typeof t||+t==+t):void 0}function k(t,e,n,i,o,s){var a=B(n);if(null!=a)return a;var u=P(e,a),l=r({},o,{strict:!1});return!(void 0===u&&!T(e,a)||!D(i,u,l,s))&&!T(t,a)&&D(i,u,l,s)}function N(t,e,n){var r=B(n);return null!=r?r:O(e,r)&&!O(t,r)}function F(t,e,n,r,i,o){for(var s,u,l=a(t);(s=l.next())&&!s.done;)if(D(n,u=s.value,i,o)&&D(r,P(e,u),i,o))return I(t,u),!0;return!1}function D(t,e,n,i){var s=n||{};if(s.strict?l(t,e):t===e)return!0;
2if(m(t)!==m(e))return!1;if(!t||!e||"object"!=typeof t&&"object"!=typeof e)return s.strict?l(t,e):t==e;var u,I=i.has(t),B=i.has(e);if(I&&B){if(i.get(t)===i.get(e))return!0}else u={};return I||i.set(t,u),B||i.set(e,u),function(t,e,n,i){var s,u;if(typeof t!=typeof e)return!1;if(null==t||null==e)return!1;if(x(t)!==x(e))return!1;if(c(t)!==c(e))return!1;if(h(t)!==h(e))return!1;var l=t instanceof Error,m=e instanceof Error;if(l!==m)return!1;if((l||m)&&(t.name!==e.name||t.message!==e.message))return!1;var I=d(t),B=d(e);if(I!==B)return!1;if((I||B)&&(t.source!==e.source||o(t)!==o(e)))return!1;var U=f(t),G=f(e);if(U!==G)return!1;if((U||G)&&w(t)!==w(e))return!1;if(n.strict&&E&&E(t)!==E(e))return!1;var z=v(t),V=v(e);if(z!==V)return!1;if(z||V){if(t.length!==e.length)return!1;for(s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}var H=j(t),q=j(e);if(H!==q)return!1;if(H||q){if(t.length!==e.length)return!1;for(s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}var W=A(t),X=A(e);if(W!==X)return!1;if(W||X)return _(t)===_(e)&&"function"==typeof Uint8Array&&D(new Uint8Array(t),new Uint8Array(e),n,i);var Y=p(t),Q=p(e);if(Y!==Q)return!1;if(Y||Q)return b(t)===b(e)&&"function"==typeof Uint8Array&&D(new Uint8Array(t),new Uint8Array(e),n,i);if(typeof t!=typeof e)return!1;var J=g(t),Z=g(e);if(J.length!==Z.length)return!1;for(J.sort(),Z.sort(),s=J.length-1;s>=0;s--)if(J[s]!=Z[s])return!1;for(s=J.length-1;s>=0;s--)if(!D(t[u=J[s]],e[u],n,i))return!1;var K=y(t),$=y(e);return K===$&&("Set"===K||"Set"===$?function(t,e,n,r){if(R(t)!==R(e))return!1;for(var i,o,s,u=a(t),l=a(e);(i=u.next())&&!i.done;)if(i.value&&"object"==typeof i.value)s||(s=new S),M(s,i.value);else if(!O(e,i.value)){if(n.strict)return!1;if(!N(t,e,i.value))return!1;s||(s=new S),M(s,i.value)}if(s){for(;(o=l.next())&&!o.done;
2)if(o.value&&"object"==typeof o.value){if(!L(s,o.value,n.strict,r))return!1}else if(!n.strict&&!O(t,o.value)&&!L(s,o.value,n.strict,r))return!1;return 0===R(s)}return!0}(t,e,n,i):"Map"!==K||function(t,e,n,i){if(C(t)!==C(e))return!1;for(var o,s,u,l,c,h,A=a(t),f=a(e);(o=A.next())&&!o.done;)if(l=o.value[0],c=o.value[1],l&&"object"==typeof l)u||(u=new S),M(u,l);else if(void 0===(h=P(e,l))&&!T(e,l)||!D(c,h,n,i)){if(n.strict)return!1;if(!k(t,e,l,c,n,i))return!1;u||(u=new S),M(u,l)}if(u){for(;(s=f.next())&&!s.done;)if(l=s.value[0],h=s.value[1],l&&"object"==typeof l){if(!F(u,t,l,h,n,i))return!1}else if(!(n.strict||t.has(l)&&D(P(t,l),h,n,i)||F(u,t,l,h,r({},n,{strict:!1}),i)))return!1;return 0===R(u)}return!0}(t,e,n,i))}(t,e,s,i)}function j(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0]||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))}t.exports=function(t,e,n){return D(t,e,n,u())}},45202:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});var r=n(24586),i=n(90455),o=n(8473);class s extends o.A{shouldDrawLayer(t){const{operation:e}=t.props;return e.includes("draw")||e.includes("terrain")}}var a=n(15985),u=n(48091);class l{constructor(t){(0,r.A)(this,"gl",void 0),(0,r.A)(this,"layerFilter",void 0),(0,r.A)(this,"drawPickingColors",void 0),(0,r.A)(this,"drawLayersPass",void 0),(0,r.A)(this,"pickLayersPass",void 0),(0,r.A)(this,"renderCount",void 0),(0,r.A)(this,"_needsRedraw",void 0),(0,r.A)(this,"renderBuffers",void 0),(0,r.A)(this,"lastPostProcessEffect",void 0),this.gl=t,this.layerFilter=null,this.drawPickingColors=!1,this.drawLayersPass=new s(t),this.pickLayersPass=new a.A(t),this.renderCount=0,this._needsRedraw="Initial render",this.renderBuffers=[],this.lastPostProcessEffect=null}setProps(t){this.layerFilter!==t.layerFilter&&(this.layerFilter=t.layerFilter,this._needsRedraw="layerFilter changed"),this.drawPickingColors!==t.drawPickingColors&&(this.drawPickingColors=t.drawPickingColors,this._needsRedraw="drawPickingColors changed")}renderLayers(t){const e=this.drawPickingColors?this.pickLayersPass:this.drawLayersPass,n={layerFilter:this.layerFilter,isPicking:this.drawPickingColors,...t,target:t.target||u.A.getDefaultFramebuffer(this.gl)};n.effects&&this._preRender(n.effects,n);const r=this.lastPostProcessEffect?this.renderBuffers[0]:n.target,o=e.render({...n,target:r});n.effects&&this._postRender(n.effects,n),this.renderCount++,(0,i.A)("deckRenderer.renderLayers",this,o,t)}needsRedraw(t={clearRedrawFlags:!1}){const e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}finalize(){const{renderBuffers:t}=this;for(const e of t)e.delete();t.length=0}_preRender(t,e){this.lastPostProcessEffect=null,e.preRenderStats=e.preRenderStats||{};for(const n of t)e.preRenderStats[n.id]=n.preRender(this.gl,e),n.postRender&&(this.lastPostProcessEffect=n.id);this.lastPostProcessEffect&&this._resizeRenderBuffers()}_resizeRenderBuffers(){const{renderBuffers:t}=this;0===t.length&&t.push(new u.A(this.gl),new u.A(this.gl));for(const e of t)e.resize()}_postRender(t,e){const{renderBuffers:n}=this,r={...e,inputBuffer:n[0],swapBuffer:n[1],target:null};for(const i of t)if(i.postRender){if(i.id===this.lastPostProcessEffect){r.target=e.target,i.postRender(this.gl,r);break}const t=i.postRender(this.gl,r);r.inputBuffer=t,r.swapBuffer=t===n[0]?n[1]:n[0]}}}},45303:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}
2){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invali
2d");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},45878:(t,e,n)=>{"use strict";n.d(e,{B8:()=>s,I0:()=>A,Tl:()=>l,a4:()=>a,e$:()=>c,hs:()=>h,lw:()=>u,mg:()=>o,vt:()=>i});var r=n(23172);function i(){var t=new r.tb(9);return r.tb!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function o(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function s(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],u=e[6],l=e[7],c=e[8],h=c*s-a*l,A=-c*o+a*u,f=l*o-s*u,d=n*h+r*A+i*f;return d?(d=1/d,t[0]=h*d,t[1]=(-c*r+i*l)*d,t[2]=(a*r-i*s)*d,t[3]=A*d,t[4]=(c*n-i*u)*d,t[5]=(-a*n+i*o)*d,t[6]=f*d,t[7]=(-l*n+r*u)*d,t[8]=(s*n-r*o)*d,t):null}function a(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],s=t[5],a=t[6],u=t[7],l=t[8];return e*(l*o-s*u)+n*(-l*i+s*a)+r*(u*i-o*a)}function u(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],l=e[6],c=e[7],h=e[8],A=n[0],f=n[1],d=n[2],p=n[3],g=n[4],m=n[5],y=n[6],v=n[7],_=n[8];return t[0]=A*r+f*s+d*l,t[1]=A*i+f*a+d*c,t[2]=A*o+f*u+d*h,t[3]=p*r+g*s+m*l,t[4]=p*i+g*a+m*c,t[5]=p*o+g*u+m*h,t[6]=y*r+v*s+_*l,t[7]=y*i+v*a+_*c,t[8]=y*o+v*u+_*h,t}function l(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],l=e[6],c=e[7],h=e[8],A=n[0],f=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=u,t[6]=A*r+f*s+l,t[7]=A*i+f*a+c,t[8]=A*o+f*u+h,t}function c(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],l=e[6],c=e[7],h=e[8],A=Math.sin(n),f=Math.cos(n);return t[0]=f*r+A*s,t[1]=f*i+A*a,t[2]=f*o+A*u,t[3]=f*s-A*r,t[4]=f*a-A*i,t[5]=f*u-A*o,t[6]=l,t[7]=c,t[8]=h,t}function h(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function A(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=n+n,a=r+r,u=i+i,l=n*s,c=r*s,h=r*a,A=i*s,f=i*a,d=i*u,p=o*s,g=o*a,m=o*u;return t[0]=1-h-d,t[3]=c-m,t[6]=A+g,t[1]=c+m,t[4]=1-l-d,t[7]=f-p,t[2]=A-g,t[5]=f+p,t[8]=1-l-h,t}},46132:(t,e,n)=>{"use strict";var r=n(14607),i=n(52672),o=r("RegExp.prototype.exec"),s=n(3468);t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==o(t,e)}}},46164:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});var r=n(50340),i=n(34081),o=n(95855),s=n(64062),a=n(94421);let u;class l extends r.A{static get ZERO(){return u||(u=new l(0,0,0,0),Object.freeze(u)),u}constructor(t=0,e=0,n=0,r=0){super(-0,-0,-0,-0),(0,i.cy)(t)&&1===arguments.length?this.copy(t):(i.$W.debug&&((0,o.ws)(t),(0,o.ws)(e),(0,o.ws)(n),(0,o.ws)(r)),this[0]=t,this[1]=e,this[2]=n,this[3]=r)}set(t,e,n,r){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}fromObject(t){return i.$W.debug&&((0,o.ws)(t.x),(0,o.ws)(t.y),(0,o.ws)(t.z),(0,o.ws)(t.w)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t.w=this[3],t}get ELEMENTS(){return 4}get z(){return this[2]}set z(t){this[2]=(0,o.ws)(t)}get w(){return this[3]}set w(t){this[3]=(0,o.ws)(t)}transform(t){return s.Z0(this,this,t),this.check()}transformByMatrix3(t){return(0,a.vE)(this,this,t),this.check()}transformByMatrix2(t){return(0,a.Cg)(this,this,t),this.check()}transformByQuaternion(t){return s.gL(this,this,t),this.check()}applyMatrix4(t){return t.transform(this,this),this}}},46429:(t,e,n)=>{"use strict";n.d(e,{A:()=>s,G:()=>o});var r=n(48091),i=n(79266);const o={WEBGL2:"WEBGL2",VERTEX_ARRAY_OBJECT:"VERTEX_ARRAY_OBJECT",TIMER_QUERY:"TIMER_QUERY",INSTANCED_RENDERING:"INSTANCED_RENDERING",MULTIPLE_RENDER_TARGETS:"MULTIPLE_RENDER_TARGETS",ELEMENT_INDEX_UINT32:"ELEMENT_INDEX_UINT32",BLEND_EQUATION_MINMAX:"BLEND_EQUATION_MINMAX",FLOAT_BLEND:"FLOAT_BLEND",COLOR_ENCODING_SRGB:"COLOR_ENCODING_SRGB",TEXTURE_DEPTH:"TEXTURE_DEPTH",TEXTURE_FLOAT:"TEXTURE_FLOAT",TEXTURE_HALF_FLOAT:"TEXTURE_HALF_FLOAT",TEXTURE_FILTER_LINEAR_FLOAT:"TEXTURE_FILTER_LINEAR_FLOAT",TEXTURE_FILTER_LINEAR_HALF_FLOAT:"TEXTURE_FILTER_LINEAR_HALF_FLOAT",TEXTURE_FILTER_ANISOTROPIC:"TEXTURE_FILTER_ANISOTROPIC",COLOR_ATTACHMENT_RGBA32F:"COLOR_ATTACHMENT_RGBA32F",COLOR_ATTACHMENT_FLOAT:"COLOR_ATTACHMENT_FLOAT",COLOR_ATTACHMENT_HALF_FLOAT:"COLOR_ATTACHMENT_HALF_FLOAT",GLSL_FRAG_DATA:"GLSL_FRAG_DATA",GLSL_FRAG_DEPTH:"GLSL_FRAG_DEPTH",GLSL_DERIVATIVES:"GLSL_DERIVATIVES",GLSL_TEXTURE_LOD:"GLSL_TEXTURE_LOD"},s={[o.WEBGL2]:[!1,!0],[o.VERTEX_ARRAY_OBJECT]:["OES_vertex_array_object",!0],[o.TIMER_QUERY]:["EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2"],[o.INSTANCED_RENDERING]:["ANGLE_instanced_arrays",!0],[o.MULTIPLE_RENDER_TARGETS]:["WEBGL_draw_buffers",!0],[o.ELEMENT_INDEX_UINT32]:["OES_element_index_uint",!0],[o.BLEND_EQUATION_MINMAX]:["EXT_blend_minmax",!0],[o.FLOAT_BLEND]:["EXT_float_blend"],[o.COLOR_ENCODING_SRGB]:["EXT_sRGB",!0],[o.TEXTURE_DEPTH]:["WEBGL_depth_texture",!0],[o.TEXTURE_FLOAT]:["OES_texture_float",!0],[o.TEXTURE_HALF_FLOAT]:["OES_texture_half_float",!0],[o.TEXTURE_FILTER_LINEAR_FLOAT]:["OES_texture_float_linear"],[o.TEXTURE_FILTER_LINEAR_HALF_FLOAT]:["OES_texture_half_float_linear"],[o.TEXTURE_FILTER_ANISOTROPIC]:["EXT_texture_filter_anisotropic"],[o.COLOR_ATTACHMENT_RGBA32F]:[function(t){const e=new i.A(t,{format:6408,type:5126,dataFormat:6408}),n=new r.A(t,{id:"test-framebuffer",check:!1,attachments:{36064:e}}
2),o=n.getStatus();return e.delete(),n.delete(),36053===o},"EXT_color_buffer_float"],[o.COLOR_ATTACHMENT_FLOAT]:[!1,"EXT_color_buffer_float"],[o.COLOR_ATTACHMENT_HALF_FLOAT]:["EXT_color_buffer_half_float"],[o.GLSL_FRAG_DATA]:["WEBGL_draw_buffers",!0],[o.GLSL_FRAG_DEPTH]:["EXT_frag_depth",!0],[o.GLSL_DERIVATIVES]:["OES_standard_derivatives",!0],[o.GLSL_TEXTURE_LOD]:["EXT_shader_texture_lod",!0]}},46680:(t,e,n)=>{"use strict";n.d(e,{A:()=>v});var r=n(24586),i=n(40356),o=n(79266),s=n(40162),a=n(25198),u=n(9946),l=n(60033),c=n(8473),h=n(65758),A=n(48091),f=n(44454);class d extends c.A{constructor(t,e){super(t,e),(0,r.A)(this,"shadowMap",void 0),(0,r.A)(this,"depthBuffer",void 0),(0,r.A)(this,"fbo",void 0),this.shadowMap=new o.A(t,{width:1,height:1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.depthBuffer=new h.A(t,{format:33189,width:1,height:1}),this.fbo=new A.A(t,{id:"shadowmap",width:1,height:1,attachments:{36064:this.shadowMap,36096:this.depthBuffer}})}render(t){const e=this.fbo;(0,f.zv)(this.gl,{depthRange:[0,1],depthTest:!0,blend:!1,clearColor:[1,1,1,1]},()=>{const n=t.viewports[0],r=(0,f.o0)(this.gl),i=n.width*r,o=n.height*r;i===e.width&&o===e.height||e.resize({width:i,height:o}),super.render({...t,target:e,pass:"shadow"})})}shouldDrawLayer(t){return!1!==t.props.shadowEnabled}getModuleParameters(){return{drawToShadowMap:!0}}delete(){this.fbo&&(this.fbo.delete(),this.fbo=null),this.shadowMap&&(this.shadowMap.delete(),this.shadowMap=null),this.depthBuffer&&(this.depthBuffer.delete(),this.depthBuffer=null)}}var p=n(62593);const g={color:[255,255,255],intensity:1},m=[{color:[255,255,255],intensity:1,direction:[-1,3,-1]},{color:[255,255,255],intensity:.9,direction:[1,-8,-2.5]}],y=[0,0,0,200/255];class v{constructor(t={}){(0,r.A)(this,"id","lighting-effect"),(0,r.A)(this,"props",void 0),(0,r.A)(this,"shadowColor",y),(0,r.A)(this,"shadow",void 0),(0,r.A)(this,"ambientLight",void 0),(0,r.A)(this,"directionalLights",void 0),(0,r.A)(this,"pointLights",void 0),(0,r.A)(this,"shadowPasses",[]),(0,r.A)(this,"shadowMaps",[]),(0,r.A)(this,"dummyShadowMap",null),(0,r.A)(this,"programManager",void 0),(0,r.A)(this,"shadowMatrices",void 0),this.setProps(t)}setProps(t){this.ambientLight=null,this.directionalLights=[],this.pointLights=[];for(const e in t){const n=t[e];switch(n.type){case"ambient":this.ambientLight=n;break;case"directional":this.directionalLights.push(n);break;case"point":this.pointLights.push(n)}}this._applyDefaultLights(),this.shadow=this.directionalLights.some(t=>t.shadow),this.props=t}preRender(t,{layers:e,layerFilter:n,viewports:r,onViewportActive:s,views:a}){if(this.shadow){this.shadowMatrices=this._calculateMatrices(),0===this.shadowPasses.length&&this._createShadowPasses(t),this.programManager||(this.programManager=i.A.getDefaultProgramManager(t),p.A&&this.programManager.addDefaultModule(p.A)),this.dummyShadowMap||(this.dummyShadowMap=new o.A(t,{width:1,height:1}));for(let t=0;t<this.shadowPasses.length;t++)this.shadowPasses[t].render({layers:e,layerFilter:n,viewports:r,onViewportActive:s,views:a,moduleParameters:{shadowLightId:t,dummyShadowMap:this.dummyShadowMap,shadowMatrices:this.shadowMatrices}})}}getModuleParameters(t){const e=this.shadow?{shadowMaps:this.shadowMaps,dummyShadowMap:this.dummyShadowMap,shadowColor:this.shadowColor,shadowMatrices:this.shadowMatrices}:{};return e.lightSources={ambientLight:this.ambientLight,directionalLights:this.directionalLights.map(e=>e.getProjectedLight({layer:t})),pointLights:this.pointLights.map(e=>e.getProjectedLight({layer:t}))},e}cleanup(){for(const t of this.shadowPasses)t.delete();this.shadowPasses.length=0,this.shadowMaps.length=0,this.dummyShadowMap&&(this.dummyShadowMap.delete(),this.dummyShadowMap=null),this.shadow&&this.programManager&&(this.programManager.removeDefaultModule(p.A),this.programManager=null)}_calculateMatrices(){const t=[];for(const e of this.directionalLights){const n=(new u.A).lookAt({eye:new l.A(e.direction).negate()});t.push(n)}return t}_createShadowPasses(t){for(let e=0;e<this.directionalLights.length;e++){const n=new d(t);this.shadowPasses[e]=n,this.shadowMaps[e]=n.shadowMap}}_applyDefaultLights(){const{ambientLight:t,pointLights:e,directionalLights:n}=this;t||0!==e.length||0!==n.length||(this.ambientLight=new s.$(g),this.directionalLights.push(new a.Z(m[0]),new a.Z(m[1])))}}},46882:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(89333),o=((r=n(69923))&&r.__esModule?r:{default:r}).default;function s(t,e,n={}){const{removeDuplicates:r=!0,ignoreSelfIntersections:s=!0}=n;let a=[];"FeatureCollection"===t.type?a=a.concat(t.features):"Feature"===t.type?a.push(t):"LineString"!==t.type&&"Polygon"!==t.type&&"MultiLineString"!==t.type&&"MultiPolygon"!==t.type||a.push(i.feature.call(void 0,t)),"FeatureCollection"===e.type?a=a.concat(e.features):"Feature"===e.type?a.push(e):"LineString"!==e.type&&"Polygon"!==e.type&&"MultiLineString"!==e.type&&"MultiPolygon"!==e.type||a.push(i.feature.call(void 0,e));const u=o(i.featureCollection.call(void 0,a),s);let l=[];if(r){const t={};u.forEach(e=>{const n=e.join(",");t[n]||(t[n]=!0,l.push(e))})}else l=u;return i.featureCollection.call(void 0,l.map(t=>i.point.call(void 0,t)))}var a=s;e.default=a,e.lineIntersect=s},47857:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(24586),i=n(29063),o=n(34081);const s=["longitude","latitude","zoom","bearing","pitch"],a=["longitude","latitude","zoom"];class u extends i.A{constructor(t={}){const e=Array.isArray(t)?t:t.transitionProps,n=Array.isArray(t)?{}:t;n.transitionProps=Array.isArray(e)?{compare:e,required:e}:e||{compare:s,required:a},super(n.transitionProps),(0,r.A)(this,"opts",void 0),this.opts=n}initializeProps(t,e){const n=super.initializeProps(t,e),{makeViewport:r,around:i}=this.opts;if(r&&i){const o=r(t),s=r(e),a=o.unproject(i);n.start.around=i,Object.assign(n.end,{around:s.project(a),aroundPosition:a,width:e.width,height:e.height})}return n}interpolateProps(t,e,n){const r={};for(const i of this._propsToExtract)r[i]=(0,o.Cc)(t[i]||0,e[i]||0,n);if(e.aroundPosition&&this.opts.makeViewport){const i=this.opts.makeViewport({...e,...r});Object.assign(r,i.panByPosition(e.aroundPosition,(0,o.Cc)(t.around,e.around,n)))}return r}}},48091:(t,e,n)=>{"use strict";n.d(e,{A:()=>f});var r=n(44454),i=n(55890),o=n(79266),s=n(65758),a=n(86849),u=n(23861),l=n(10836),c=n(82073),h=n(94939);const A="Multiple render targets not supported";class f extends i.A{get[Symbol.toStringTag](){return"Framebuffer"}static isSupported(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{colorBufferFloat:n,colorBufferHalfFloat:r}=e;let i=!0;return n&&(i=Boolean(t.getExtension("EXT_color_buffer_float")||t.getExtension("WEBGL_color_buffer_float")||t.getExtension("OES_texture_float"))),r&&(i=i&&Boolean(t.getExtension("EXT_color_buffer_float")||t.getExtension("EXT_color_buffer_half_float"))),i}static getDefaultFramebuffer(t){return t.luma=t.luma||{},t.luma.defaultFramebuffer=t.luma.defaultFramebuffer||new f(t,{id:"default-framebuffer",handle:null,attachments:{}}),t.luma.defaultFramebuffer}get MAX_COLOR_ATTACHMENTS(){const t=(0,r.Dz)(this.gl);return t.getParameter(t.MAX_COLOR_ATTACHMENTS)}get MAX_DRAW_BUFFERS(){const t=(0,r.Dz)(this.gl);return t.getParameter(t.MAX_DRAW_BUFFERS)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.width=null,this.height=null,this.attachments={},this.readBuffer=36064,this.drawBuffers=[36064],this.ownResources=[],this.initialize(e),Object.seal(this)}get color(){return this.attachments[36064]||null}get texture(){return this.attachments[36064]||null}get depth(){return this.attachments[36096]||this.attachments[33306]||null}get stencil(){return this.attachments[36128]||this.attachments[33306]||null}initialize(t){let{width:e=1,height:n=1,attachments:r=null,color:i=!0,depth:o=!0,stencil:s=!1,check:a=!0,readBuffer:u,drawBuffers:l}=t;if((0,h.v)(e>=0&&n>=0,"Width and height need to be integers"),this.width=e,this.height=n,r)for(const t in r){const i=r[t];(Array.isArray(i)?i[0]:i).resize({width:e,height:n})}else r=this._createDefaultAttachments(i,o,s,e,n);this.update({clearAttachments:!0,attachments:r,readBuffer:u,drawBuffers:l}),r&&a&&this.checkStatus()}delete(){for(const t of this.ownResources)t.delete();return super.delete(),this}update(t){let{attachments:e={},readBuffer:n,drawBuffers:r,clearAttachments:i=!1,resizeAttachments:o=!0}=t;this.attach(e,{clearAttachments:i,resizeAttachments:o});const{gl:s}=this,a=s.bindFramebuffer(36160,this.handle);return n&&this._setReadBuffer(n),r&&this._setDrawBuffers(r),s.bindFramebuffer(36160,a||null),this}resize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{width:e,height:n}=t;if(null===this.handle)return(0,h.v)(void 0===e&&void 0===n),this.width=this.gl.drawingBufferWidth,this.height=this.gl.drawingBufferHeight,this;void 0===e&&(e=this.gl.drawingBufferWidth),void 0===n&&(n=this.gl.drawingBufferHeight),e!==this.width&&n!==this.height&&r.Rm.log(2,"Re
2sizing framebuffer ".concat(this.id," to ").concat(e,"x").concat(n))();for(const t in this.attachments)this.attachments[t].resize({width:e,height:n});return this.width=e,this.height=n,this}attach(t){let{clearAttachments:e=!1,resizeAttachments:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={};e&&Object.keys(this.attachments).forEach(t=>{r[t]=null}),Object.assign(r,t);const i=this.gl.bindFramebuffer(36160,this.handle);for(const t in r){(0,h.v)(void 0!==t,"Misspelled framebuffer binding point?");const e=Number(t),i=r[e];let o=i;if(o)if(o instanceof s.A)this._attachRenderbuffer({attachment:e,renderbuffer:o});else if(Array.isArray(i)){const[t,n=0,r=0]=i;o=t,this._attachTexture({attachment:e,texture:t,layer:n,level:r})}else this._attachTexture({attachment:e,texture:o,layer:0,level:0});else this._unattach(e);n&&o&&o.resize({width:this.width,height:this.height})}this.gl.bindFramebuffer(36160,i||null),Object.assign(this.attachments,t),Object.keys(this.attachments).filter(t=>!this.attachments[t]).forEach(t=>{delete this.attachments[t]})}checkStatus(){const{gl:t}=this,e=this.getStatus();if(36053!==e)throw new Error(function(t){return(f.STATUS||{})[t]||"Framebuffer error ".concat(t)}(e));return this}getStatus(){const{gl:t}=this,e=t.bindFramebuffer(36160,this.handle),n=t.checkFramebufferStatus(36160);return t.bindFramebuffer(36160,e||null),n}clear(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{color:e,depth:n,stencil:r,drawBuffers:i=[]}=t,o=this.gl.bindFramebuffer(36160,this.handle);return(e||n||r)&&(0,a.I)(this.gl,{color:e,depth:n,stencil:r}),i.forEach((t,e)=>{(0,a.i)(this.gl,{drawBuffer:e,value:t})}),this.gl.bindFramebuffer(36160,o||null),this}readPixels(){return r.Rm.error("Framebuffer.readPixels() is no logner supported, use readPixelsToArray(framebuffer)")(),null}readPixelsToBuffer(){return r.Rm.error("Framebuffer.readPixelsToBuffer()is no logner supported, use readPixelsToBuffer(framebuffer)")(),null}copyToDataUrl(){return r.Rm.error("Framebuffer.copyToDataUrl() is no logner supported, use copyToDataUrl(framebuffer)")(),null}copyToImage(){return r.Rm.error("Framebuffer.copyToImage() is no logner supported, use copyToImage(framebuffer)")(),null}copyToTexture(){return r.Rm.error("Framebuffer.copyToTexture({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}blit(){return r.Rm.error("Framebuffer.blit({...}) is no logner supported, use blit(source, target, opts)")(),null}invalidate(t){let{attachments:e=[],x:n=0,y:i=0,width:o,height:s}=t;const a=(0,r.Dz)(this.gl),u=a.bindFramebuffer(36008,this.handle);return 0===n&&0===i&&void 0===o&&void 0===s?a.invalidateFramebuffer(36008,e):a.invalidateFramebuffer(36008,e,n,i,o,s),a.bindFramebuffer(36008,u),this}getAttachmentParameter(t,e,n){let r=this._getAttachmentParameterFallback(e);return null===r&&(this.gl.bindFramebuffer(36160,this.handle),r=this.gl.getFramebufferAttachmentParameter(36160,t,e),this.gl.bindFramebuffer(36160,null)),n&&r>1e3&&(r=(0,c.i7)(this.gl,r)),r}getAttachmentParameters(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36064,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.constructor.ATTACHMENT_PARAMETERS||[];const r={};for(const i of n)r[e?(0,c.i7)(this.gl,i):i]=this.getAttachmentParameter(t,i,e);return r}getParameters(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=Object.keys(this.attachments),n={};for(const r of e){const e=Number(r);n[t?(0,c.i7)(this.gl,e):e]=this.getAttachmentParameters(e,t)}return n}show(){return"undefined"!=typeof window&&window.open((0,u.Cj)(this),"luma-debug-texture"),this}log(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t>r.Rm.level||"undefined"==typeof window)return this;e=e||"Framebuffer ".concat(this.id);const n=(0,u.Cj)(this,{targetMaxHeight:100});return r.Rm.image({logLevel:t,message:e,image:n},e)(),this}bind(){let{target:t=36160}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.gl.bindFramebuffer(t,this.handle),this}unbind(){let{target:t=36160}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.gl.bindFramebuffer(t,null),this}_createDefaultAttachments(t,e,n,r,i){let a=null;return t&&(a=a||{},a[36064]=new o.A(this.gl,{id:"".concat(this.id,"-color0"),pixels:null,format:6408,type:5121,width:r,height:i,mipmaps:!1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.ownResources.push(a[36064])),e&&n?(a=a||{},a[33306]=new s.A(this.gl,{id:"".concat(this.id,"-depth-stencil"),format:35056,width:r,height:111}),this.ownResources.push(a[33306])):e?(a=a||{},a[36096]=new s.A(this.gl,{id:"".concat(this.id,"-depth"),format:33189,width:r,height:i}),this.ownResources.push(a[36096])):n&&(0,h.v)(!1),a}_unattach(t){const e=this.attachments[t];e&&(e instanceof s.A?this.gl.framebufferRenderbuffer(36160,t,36161,null):this.gl.framebufferTexture2D(36160,t,3553,null,0),delete this.attachments[t])}_attachRenderbuffer(t){let{attachment:e=36064,renderbuffer:n}
2=t;const{gl:r}=this;r.framebufferRenderbuffer(36160,e,36161,n.handle),this.attachments[e]=n}_attachTexture(t){let{attachment:e=36064,texture:n,layer:i,level:o}=t;const{gl:s}=this;switch(s.bindTexture(n.target,n.handle),n.target){case 35866:case 32879:(0,r.Dz)(s).framebufferTextureLayer(36160,e,n.target,o,i);break;case 34067:const t=function(t){return t<34069?t+34069:t}(i);s.framebufferTexture2D(36160,e,t,n.handle,o);break;case 3553:s.framebufferTexture2D(36160,e,3553,n.handle,o);break;default:(0,h.v)(!1,"Illegal texture type")}s.bindTexture(n.target,null),this.attachments[e]=n}_setReadBuffer(t){const e=(0,r.NG)(this.gl);e?e.readBuffer(t):(0,h.v)(36064===t||1029===t,A),this.readBuffer=t}_setDrawBuffers(t){const{gl:e}=this,n=(0,r.Dz)(e);if(n)n.drawBuffers(t);else{const n=e.getExtension("WEBGL_draw_buffers");n?n.drawBuffersWEBGL(t):(0,h.v)(1===t.length&&(36064===t[0]||1029===t[0]),A)}this.drawBuffers=t}_getAttachmentParameterFallback(t){const e=(0,l.i)(this.gl);switch(t){case 36052:return e.WEBGL2?null:0;case 33298:case 33299:case 33300:case 33301:case 33302:case 33303:return e.WEBGL2?null:8;case 33297:return e.WEBGL2?null:5125;case 33296:return e.WEBGL2||e.EXT_sRGB?null:9729;default:return null}}_createHandle(){return this.gl.createFramebuffer()}_deleteHandle(){this.gl.deleteFramebuffer(this.handle)}_bindHandle(t){return this.gl.bindFramebuffer(36160,t)}}f.ATTACHMENT_PARAMETERS=[36049,36048,33296,33298,33299,33300,33301,33302,33303]},48804:(t,e,n)=>{"use strict";const r=n(37866),i=n(14012),o=n(65508),s=n(64259),a=n(73649);function u(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n],i=r.replace(/[.\-+*:]/g,"\\.");this.lastEntities[r]={regex:new RegExp("&"+i+";","g"),val:t[r]}}}function l(t,e,n,r,i,o,s){if(void 0!==t&&(this.options.trimValues&&!r&&(t=t.trim()),t.length>0)){s||(t=this.replaceEntitiesValue(t,e,n));const r=this.options.tagValueProcessor(e,t,n,i,o);return null==r?t:typeof r!=typeof t||r!==t?r:this.options.trimValues||t.trim()===t?b(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function c(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const h=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function A(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const i=r.getAllMatches(t,h),o=i.length,s={};for(let t=0;t<o;t++){const r=this.resolveNameSpace(i[t][1]);if(this.ignoreAttributesFn(r,e))continue;let o=i[t][4],a=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),a=E(a,this.options),void 0!==o){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o,n,e);const t=this.options.attributeValueProcessor(r,o,e);s[a]=null==t?o:typeof t!=typeof o||t!==o?t:b(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[a]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=s,t}return s}}const f=function(t){t=t.replace(/\r\n?/g,"\n");const e=new i("!xml");let n=e,r="",s="";this.entityExpansionCount=0,this.currentExpandedLength=0;const a=new o(this.options.processEntities);for(let o=0;o<t.length;o++)if("<"===t[o])if("/"===t[o+1]){const e=y(t,">",o,"Closing Tag is not closed.");let i=t.substring(o+2,e).trim();if(this.options.removeNSPrefix){const t=i.indexOf(":");-1!==t&&(i=i.substr(t+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),n&&(r=this.saveTextToParentTag(r,n,s));const a=s.substring(s.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let u=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(u=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=s.lastIndexOf("."),s=s.substring(0,u),n=this.tagsNodeStack.pop(),r="",o=e}else if("?"===t[o+1]){let e=v(t,o,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,s),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new i(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,s,e.tagName)),this.addChild(n,t,s,o)}o=e.closeIndex+1}else if("!--"===t.substr(o+1,3)){const e=y(t,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const i=t.substring(o+4,e-2);r=this.saveTextToParentTag(r,n,s),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}o=e}else if("!D"===t.substr(o+1,2)){const e=a.readDocType(t,o);this.docTypeEntities=e.entities,o=e.i}else if("!["===t.substr(o+1,2)){const e=y(t,"]]>",o,"CDATA is not closed.")-2,i=t.substring(o+9,e);r=this.saveTextToParentTag(r,n,s);
vendor: 7,582 bytes, line 2
2let a=this.parseTextData(i,n.tagname,s,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,a),o=e+2}else{let a=v(t,o,this.options.removeNSPrefix),u=a.tagName;const l=a.rawTagName;let c=a.tagExp,h=a.attrExpPresent,A=a.closeIndex;if(this.options.transformTagName){const t=this.options.transformTagName(u);c===u&&(c=t),u=t}if(this.options.strictReservedNames&&(u===this.options.commentPropName||u===this.options.cdataPropName||u===this.options.textNodeName||u===this.options.attributesGroupName))throw new Error(`Invalid tag name: ${u}`);n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,s,!1));const f=n;f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),u!==e.tagname&&(s+=s?"."+u:u);const d=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,s,u)){let e="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===u[u.length-1]?(u=u.substr(0,u.length-1),s=s.substr(0,s.length-1),c=u):c=c.substr(0,c.length-1),o=a.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(u))o=a.closeIndex;else{const n=this.readStopNodeData(t,l,A+1);if(!n)throw new Error(`Unexpected end of ${l}`);o=n.i,e=n.tagContent}const r=new i(u);u!==c&&h&&(r[":@"]=this.buildAttributesMap(c,s,u)),e&&(e=this.parseTextData(e,u,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),r.add(this.options.textNodeName,e),this.addChild(n,r,s,d)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){if("/"===u[u.length-1]?(u=u.substr(0,u.length-1),s=s.substr(0,s.length-1),c=u):c=c.substr(0,c.length-1),this.options.transformTagName){const t=this.options.transformTagName(u);c===u&&(c=t),u=t}const t=new i(u);u!==c&&h&&(t[":@"]=this.buildAttributesMap(c,s,u)),this.addChild(n,t,s,d),s=s.substr(0,s.lastIndexOf("."))}else{if(-1!==this.options.unpairedTags.indexOf(u)){const t=new i(u);u!==c&&h&&(t[":@"]=this.buildAttributesMap(c,s)),this.addChild(n,t,s,d),s=s.substr(0,s.lastIndexOf(".")),o=a.closeIndex;continue}{const t=new i(u);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(n),u!==c&&h&&(t[":@"]=this.buildAttributesMap(c,s,u)),this.addChild(n,t,s),n=t}}r="",o=A}}else r+=t[o];return e.child};function d(t,e,n,r){this.options.captureMetaData||(r=void 0);const i=this.options.updateTag(e.tagname,n,e[":@"]);!1===i||("string"==typeof i?(e.tagname=i,t.addChild(e,r)):t.addChild(e,r))}const p=function(t,e,n){if(-1===t.indexOf("&"))return t;const r=this.options.processEntities;if(!r.enabled)return t;if(r.allowedTags&&!r.allowedTags.includes(e))return t;if(r.tagFilter&&!r.tagFilter(e,n))return t;for(let e in this.docTypeEntities){const n=this.docTypeEntities[e],i=t.match(n.regx);if(i){if(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);const e=t.length;if(t=t.replace(n.regx,n.val),r.maxExpandedLength&&(this.currentExpandedLength+=t.length-e,this.currentExpandedLength>r.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${r.maxExpandedLength}`)}}if(-1===t.indexOf("&"))return t;for(const e of Object.keys(this.lastEntities)){const n=this.lastEntities[e],i=t.match(n.regex);if(i&&(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);t=t.replace(n.regex,n.val)}if(-1===t.indexOf("&"))return t;if(this.options.htmlEntities)for(const e of Object.keys(this.htmlEntities)){const n=this.htmlEntities[e],i=t.match(n.regex);if(i&&(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);t=t.replace(n.regex,n.val)}return t.replace(this.ampEntity.regex,this.ampEntity.val)};function g(t,e,n,r){return t&&(void 0===r&&(r=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,r))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function m(t,e,n,r){return!(!e||!e.has(r))||!(!t||!t.has(n))}function y(t,e,n,r){const i=t.indexOf(e,n);if(-1===i)throw new Error(r);return i+e.length-1}function v(t,e,n,r=">"){const i=function(t,e,n=">"){let r,i="";for(let o=e;o<t.length;o++){let e=t[o];if(r)e===r&&(r="");else if('"'===e||"'"===e)r=e;else if(e===n[0]){if(!n[1])return{data:i,index:o};if(t[o+1]===n[1])return{data:i,index:o}}else"\t"===e&&(e=" ");i+=e}}(t,e+1,r);if(!i)return;let o=i.data;const s=i.index,a=o.search(/\s/);let u=o,l=!0;-1!==a&&(u=o.substring(0,a),o=o.substring(a+1).trimStart());const c=u;if(n){const t=u.indexOf(":");-1!==t&&(u=u.substr(t+1),l=u!==i.data.substr(t+1))}return{tagName:u,tagExp:o,closeIndex:s,attrExpPresent:l,rawTagName:c}}function _(t,e,n){const r=n;let i=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const o=y(t,">",n,`${e} is not closed`);if(t.substring(n+2,o).trim()===e&&(i--,0===i))return{tagContent:t.substring(r,n),i:o};n=o}else if("?"===t[n+1])n=y(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=y(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=y(t,"]]>",n,"StopNode is not closed.")-2;else{const r=v(t,n,">");r&&((r&&r.tagName)===e&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function b(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&s(t,n)}return r.isExist(t)?t:""}function w(t,e,n){const r=Number.parseInt(t,e);return r>=0&&r<=1114111?String.fromCodePoint(r):n+t+";"}function E(t,e){if(r.criticalProperties.includes(t))throw new Error(`[SECURITY] Invalid name: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);return r.DANGEROUS_PROPERTY_NAMES.includes(t)?e.onDangerousProperty(t):t}t.exports=class{constructor(t){if(this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>w(e,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>w(e,16,"&#x")}},this.addExternalEntities=u,this.parseXml=f,this.parseTextData=l,this.resolveNameSpace=c,this.buildAttributesMap=A,this.isItStopNode=m,this.replaceEntitiesValue=p,this.readStopNodeData=_,this.saveTextToParentTag=g,this.addChild=d,this.ignoreAttributesFn=a(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let t=0;t<this.options.stopNodes.length;t++){const e=this.options.stopNodes[t];"string"==typeof e&&(e.startsWith("*.")?this.stopNodesWildcard.add(e.substring(2)):this.stopNodesExact.add(e))}}}}},49167:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var r=n(82314),i=n(45303);function o(t,e,n={}){var o=r.getCoord.call(void 0,t),s=r.getCoord.call(void 0,e),a=i.degreesToRadians.call(void 0,s[1]-o[1]),u=i.degreesToRadians.call(void 0,s[0]-o[0]),l=i.degreesToRadians.call(void 0,o[1]),c=i.degreesToRadians.call(void 0,s[1]),h=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(l)*Math.cos(c);return i.radiansToLength.call(void 0,2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),n.units)}var s=o;e.default=s,e.distance=o},49171:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Draw90DegreePolygonMode=void 0;var r=l(n(11866)),i=l(n(25128)),o=l(n(46882)),s=l(n(71123)),a=n(89595),u=n(71169);function l(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function h(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||A(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,e,n){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=g(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},p(t,e,n||t)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}var y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(y,t);var e,n,l,f=(l=y,function(){var t,e=g(l);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function y(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,y),f.apply(this,arguments)}return e=y,(n=[{key:"createTentativeFeature",value:function(t){var e,n,r,i=this.getClickSequence(),o=t.lastPointerMoveEvent.mapCoords;if(1===i.length)e=o;else{var s=i[i.length-2],a=i[i.length-1];e=(n=(0,u.generatePointsParallelToLinePoints)(s,a,o),r=1,function(t){if(Array.isArray(t))return t}(n)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(n,r)||A(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]}return i.length<3?{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(h(i),[e])}}:{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(h(i),[e,i[0]])]}}}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]};if(0===this.getClickSequence().length||!t.lastPointerMoveEvent)return e;
2var n=this.createTentativeFeature(t);return e.features.push(n),e.features=e.features.concat((0,u.getEditHandlesForGeometry)(n.geometry,-1)),e.features=e.features.slice(0,-1),e}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),p(g(y.prototype),"handlePointerMove",this).call(this,t,e)}},{key:"handleClick",value:function(t,e){var n=t.picks,r=this.getTentativeGuide(e);this.addClickSequence(t);var i=this.getClickSequence();if(r){if(3===i.length&&"LineString"===r.geometry.type){var o=r.geometry;i[i.length-1]=o.coordinates[o.coordinates.length-1]}else if(i.length>3&&"Polygon"===r.geometry.type){var s=r.geometry;i[i.length-1]=s.coordinates[0][s.coordinates[0].length-2];var a=(0,u.getPickedEditHandle)(n);if(a&&Array.isArray(a.properties.positionIndexes)&&(0===a.properties.positionIndexes[1]||a.properties.positionIndexes[1]===s.coordinates[0].length-3)){var l={type:"Polygon",coordinates:this.finalizedCoordinates(h(s.coordinates[0]))};this.resetClickSequence();var c=this.getAddFeatureOrBooleanPolygonAction(l,e);c&&e.onEdit(c)}}var A={screenCoords:[-1,-1],mapCoords:t.mapCoords,picks:[],pointerDownPicks:null,pointerDownScreenCoords:null,pointerDownMapCoords:null,cancelPan:function(){},sourceEvent:null};this.handlePointerMove(A,e)}}},{key:"finalizedCoordinates",value:function(t){var e=[[].concat(h(t.slice(0,-2)),[t[0]])],n=this.getIntermediatePoint(h(t));if(n)e=[[].concat(h(t.slice(0,-2)),[n,t[0]])];else{var r=h(t);r.splice(-3,1),(n=this.getIntermediatePoint(h(r)))&&(e=[[].concat(h(t.slice(0,-3)),[n,t[0]])])}return e}},{key:"getIntermediatePoint",value:function(t){var e;if(t.length>4){var n=h(t),u=n[0],l=n[1],c=(0,i.default)(u,l),A=t[t.length-3],f=t[t.length-4],d=(0,i.default)(A,f),p={first:[],second:[]};[1,2,3].forEach(function(t){var e=c+90*t;p.first.push(e>180?e-360:e);var n=d+90*t;p.second.push(n>180?n-360:n)});var g=(0,s.default)((0,a.point)(u),(0,a.point)(A));[0,1,2].forEach(function(t){var n=(0,a.lineString)([u,(0,r.default)(u,g,p.first[t]).geometry.coordinates]);[0,1,2].forEach(function(t){var i=(0,a.lineString)([A,(0,r.default)(A,g,p.second[t]).geometry.coordinates]),s=(0,o.default)(n,i);s&&s.features.length&&(e=s.features[0].geometry.coordinates)})})}return e}}])&&d(e.prototype,n),y}(n(96146).GeoJsonEditMode);e.Draw90DegreePolygonMode=y},49200:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toDeckColor=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];return Array.isArray(t)?[255*t[0],255*t[1],255*t[2],255*t[3]]:e},e.recursivelyTraverseNestedArrays=function t(e,n,r){if(!Array.isArray(e[0]))return!0;for(var i=0;i<e.length;i++)if(t(e[i],[].concat(c(n),[i]),r)){r(e,n);break}return!1},e.generatePointsParallelToLinePoints=function(t,e,n){var a={type:"LineString",coordinates:[t,e]},u=(0,s.point)(n),l=(0,o.default)(u,a),c=(0,i.default)(t,e),h=(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])<0?c-90:c-270,A=(0,r.default)(e,l,h),f=(0,r.default)(t,l,h);return[A.geometry.coordinates,f.geometry.coordinates]},e.distance2d=f,e.mix=d,e.nearestPointOnProjectedLine=function(t,e,n){var r=new a.default(n),i=t.geometry.coordinates.map(function(t){var e=l(t,3),n=e[0],i=e[1],o=e[2],s=void 0===o?0:o;return r.project([n,i,s])}),o=l(r.project(e.geometry.coordinates),2),s=o[0],u=o[1],c=1/0,h={};i.forEach(function(t,e){var n=l(t,2),r=n[0],o=n[1];if(0!==e){var a=l(i[e-1],2),A=a[0],f=a[1],d=f-o,p=r-A,g=A*o-r*f,m=d*d+p*p,y=Math.abs(d*s+p*u+g)/Math.sqrt(m);y<c&&(c=y,h={index:e,x0:(p*(p*s-d*u)-d*g)/m,y0:(d*(-p*s+d*u)-p*g)/m})}});var A=h,p=A.index,g=A.x0,m=A.y0,y=l(i[p-1],3),v=y[0],_=y[1],b=y[2],w=void 0===b?0:b,E=l(i[p],3),x=E[0],S=E[1],T=E[2],P=void 0===T?0:T,C=f(v,_,x,S),M=d(w,P,f(v,_,g,m)/C);return{type:"Feature",geometry:{type:"Point",coordinates:r.unproject([g,m,M])},properties:{dist:c,index:p-1}}},e.insertBefore=function(t,e,n){var r=t.indexOf(e);return r<0?t:t.slice(0,r)+n+t.slice(r)};var r=u(n(11866)),i=u(n(25128)),o=u(n(65747)),s=n(89595),a=u(n(88548));function u(t){return t&&t.__esModule?t:{default:t}}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(t,e)||h(t,e)||function(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){if(t){if("string"==typeof t)return A(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function d(t,e,n){return e*n+t*(1-n)}},49228:(t,e,n)=>{"use strict";var r=Array.prototype.slice,i=n(50968),o=Object.keys,s=o?function(t){return o(t)}:n(78160),a=Object.keys;s.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?a(r.call(t)):a(t)})}else Object.keys=s;return Object.keys||s},t.exports=s},49282:(t,e,n)=>{"use strict";n.d(e,{$:()=>l,j:()=>u});var r=n(79266),i=n(15317),o=n(3895),s=n(48091),a=n(94939);function u(t,e){(0,a.v)(t instanceof r.A||t instanceof i.A||t instanceof o.A);const n=t.constructor,{gl:s,width:u,height:l,format:c,type:h,dataFormat:A,border:f,mipmaps:d}=t;return new n(s,Object.assign({width:u,height:l,format:c,type:h,dataFormat:A,border:f,mipmaps:d},e))}function l(t,e){const{gl:n,width:r,height:i,id:o}=t;return new s.A(n,Object.assign({},e,{id:"framebuffer-for-".concat(o),width:r,height:i,attachments:{36064:t}}))}},49494:(t,e,n)=>{"use strict";n.r(e),n.d(e,{ScenegraphLayer:()=>i.A,SimpleMeshLayer:()=>r.A});var r=n(2351),i=n(37278)},50340:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(44341),i=n(95855),o=n(97458);class s extends r.A{get x(){return this[0]}set x(t){this[0]=(0,i.ws)(t)}get y(){return this[1]}set y(t){this[1]=(0,i.ws)(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let n=0;n<this.ELEMENTS;++n){const r=this[n]-t[n];e+=r*r}return(0,i.ws)(e)}dot(t){let e=0;for(let n=0;n<this.ELEMENTS;++n)e+=this[n]*t[n];return(0,i.ws)(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return(0,o.A)(t>=0&&t<this.ELEMENTS,"index is out of range"),(0,i.ws)(this[t])}setComponent(t,e){return(0,o.A)(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}},50968:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var n=e.call(t),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),r}},51238:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}
2){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invali
2d");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},51913:(t,e,n)=>{"use strict";var r=n(62908);t.exports=function(){return r()&&!!Symbol.toStringTag}},52336:(t,e,n)=>{"use strict";n.d(e,{A:()=>M});var r=n(24586),i=n(5424),o=n(23615),s=n(32968),a=n(42029);const u=1e20,l=new Float64Array(256);for(let t=0;t<256;t++){const e=.5-Math.pow(t/255,1/2.2);l[t]=e*Math.abs(e)}l[255]=-u;class c{constructor({fontSize:t=24,buffer:e=3,radius:n=8,cutoff:r=.25,fontFamily:i="sans-serif",fontWeight:o="normal",fontStyle:s="normal",lang:a=null}={}){this.buffer=e,this.radius=n,this.cutoff=r,this.lang=a;const u=this.size=t+4*e,l=this._createCanvas(u),c=this.ctx=l.getContext("2d",{willReadFrequently:!0});c.font=`${s} ${o} ${t}px ${i}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(u*u),this.gridInner=new Float64Array(u*u),this.f=new Float64Array(u),this.z=new Float64Array(u+1),this.v=new Uint16Array(u)}_createCanvas(t){if("undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,t);const e=document.createElement("canvas");return e.width=e.height=t,e}draw(t){const{width:e,actualBoundingBoxAscent:n,actualBoundingBoxDescent:r,actualBoundingBoxLeft:i,actualBoundingBoxRight:o}=this.ctx.measureText(t),s=Math.ceil(n),a=Math.floor(-i),c=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(o)-a)),A=Math.max(0,Math.min(this.size-this.buffer,s+Math.ceil(r))),f=c+2*this.buffer,d=A+2*this.buffer,p=Math.max(f*d,0),g=new Uint8ClampedArray(p),m={data:g,width:f,height:d,glyphWidth:c,glyphHeight:A,glyphTop:s,glyphLeft:a,glyphAdvance:e};if(0===c||0===A)return m;const{ctx:y,buffer:v,gridInner:_,gridOuter:b}=this;this.lang&&(y.lang=this.lang),y.clearRect(v,v,c,A),y.fillText(t,v-a,v+s);const w=y.getImageData(v,v,c,A);b.fill(u,0,p),_.fill(0,0,p);let E=3;for(let t=0;t<A;t++){let e=(t+v)*f+v;for(let t=0;t<c;t++,E+=4,e++){const t=w.data[E];if(0===t)continue;const n=l[t];b[e]=Math.max(0,n),_[e]=Math.max(0,-n)}}h(b,0,0,f,d,f,this.f,this.v,this.z);const x=Math.min(v,1);h(_,v-x,v-x,c+2*x,A+2*x,f,this.f,this.v,this.z);const S=255/this.radius,T=255*(1-this.cutoff);for(let t=0;t<p;t++){const e=Math.sqrt(b[t])-Math.sqrt(_[t]);g[t]=Math.round(T-S*e)}return m}}function h(t,e,n,r,i,o,s,a,u){for(let l=e;l<e+r;l++)A(t,n*o+l,o,i,s,a,u);for(let l=n;l<n+i;l++)A(t,l*o+e,1,r,s,a,u)}function A(t,e,n,r,i,o,s){o[0]=0,s[0]=-u,s[1]=u,i[0]=t[e];for(let a=1,l=0,c=0;a<r;a++){i[a]=t[e+a*n];const r=a*a;do{const t=o[l];c=(i[a]-i[t]+r-t*t)/(a-t)/2}while(c<=s[l]&&--l>-1);l++,o[l]=a,s[l]=c,s[l+1]=u}for(let a=0,u=0;a<r;a++){for(;s[u+1]<a;)u++;const r=o[u],l=a-r;t[e+a*n]=i[r]+l*l}}const f=[];function d(t,e,n,r){let i=0;for(let s=e;s<n;s++){var o;i+=(null===(o=r[t[s]])||void 0===o?void 0:o.layoutWidth)||0}return i}function p(t,e,n,r,i,o){let s=e,a=0;for(let u=e;u<n;u++){const e=d(t,u,u+1,i);a+e>r&&(s<u&&o.push(u),s=u,a=0),a+=e}return a}function g(t,e,n,r,i=0,o){void 0===o&&(o=t.length);const s=[];return"break-all"===e?p(t,i,o,n,r,s):function(t,e,n,r,i,o){let s=e,a=e,u=e,l=0;for(let c=e;c<n;c++)if(" "===t[c]?u=c+1:" "!==t[c+1]&&c+1!==n||(u=c+1),u>a){let e=d(t,a,u,i);l+e>r&&(s<a&&(o.push(a),s=a,l=0),e>r&&(e=p(t,a,u,r,i,o),s=o[o.length-1])),a=u,l+=e}}(t,i,o,n,r,s),s}function m(t,e,n,r,i,s){let a=0,u=0;for(let s=e;s<n;s++){const e=t[s],n=r[e];n?(u||(u=n.layoutHeight),i[s]=a+n.layoutWidth/2,a+=n.layoutWidth):(o.A.warn("Missing character: ".concat(e," (").concat(e.codePointAt(0),")"))(),i[s]=a,a+=32)}s[0]=a,s[1]=u}class y{constructor(t=5){(0,r.A)(this,"limit",void 0),(0,r.A)(this,"_cache",{}),(0,r.A)(this,"_order",[]),this.limit=t}get(t){const e=this._cache[t];return e&&(this._deleteOrder(t),this._appendOrder(t)),e}set(t,e){this._cache[t]?(this.delete(t),this._cache[t]=e,this._appendOrder(t)):(Object.keys(this._cache).length===this.limit&&this.delete(this._order[0]),this._cache[t]=e,this._appendOrder(t))}delete(t){this._cache[t]&&(delete this._cache[t],this._deleteOrder(t))}_deleteOrder(t){const e=this._order.indexOf(t);e>=0&&this._order.splice(e,1)}_appendOrder(t){this._order.push(t)}}const v={fontFamily:"Monaco, monospace",fontWeight:"normal",characterSet:function(){const t=[];for(let e=32;e<128;e++)t.push(String.fromCharCode(e));return t}(),fontSize:64,buffer:4,sdf:!1,cutoff:.25,radius:12,smoothing:.1};let _=new y(3);function b(t,e){for(let n=0;n<t.length;n++)e.data[4*n+3]=t[n]}function w(t,e,n,r){t.font="".concat(r," ").concat(n,"px ").concat(e),t.fillStyle="#000",t.textBaseline="alphabetic",t.textAlign="left"}class E{constructor(){(0,r.A)(this,"props",{...v}),(0,r.A)(this,"_key",void 0),(0,r.A)(this,"_atlas",void 0)}get texture(){return this._atlas}get mapping(){return this._atlas&&this._atlas.mapping}get scale(){const{fontSize:t,buffer:e}=this.props;return(1.2*t+2*e)/t}setProps(t={}){Object.assign(this.props,t),this._key=this._getKey();const e=function(t,e){let n;n="string"==typeof e?new Set(Array.from(e)):new Set(e);const r=_.get(t);if(!r)return n;for(const t in r.mapping)n.has(t)&&n.delete(t);return n}(this._key,this.props.characterSet),n=_.get(this._key);if(n&&0===e.size)return void(this._atlas!==n&&(this._atlas=n));const r=this._generateFontAtlas(e,n);this._atlas=r,_.set(this._key,r)}_generateFontAtlas(t,e){const{fontFamily:n,fontWeight:r,fontSize:i,buffer:o,sdf:s,radius:a,cutoff:u}=this.props;let l=e&&e.data;l||(l=document.createElement("canvas"),l.width=1024);const h=l.getContext("2d",{willReadFrequently:!0});w(h,n,i,r);const{mapping:A,canvasHeight:f,xOffset:d,yOffset:p}=function({characterSet:t,getFontWidth:e,fontHeight:n,buffer:r,maxCanvasWidth:i,mapping:o={},xOffset:s=0,yOffset:a=0}){let u=0,l=s;const c=n+2*r;for(const s of t)if(!o[s]){const t=e(s);l+t+2*r>i&&(l=0,u++),o[s]={x:l+r,y:a+u*c+r,width:t,height:c,layoutWidth:t,layoutHeight:n},l+=t+2*r}return{mapping:o,xOffset:l,yOffset:a+u*c,canvasHeight:(h=a+(u+1)*c,Math.pow(2,Math.ceil(Math.log2(h))))};var h}({getFontWidth:t=>h.measureText(t).width,fontHeight:1.2*i,buffer:o,characterSet:t,maxCanvasWidth:1024,...e&&{mapping:e.mapping,xOffset:e.xOffset,yOffset:e.yOffset}});if(l.height!==f){const t=h.getImageData(0,0,l.width,l.height);l.height=f,h.putImageData(t,0,0)}if(w(h,n,i,r),s){const e=new c({fontSize:i,buffer:o,radius:a,cutoff:u,fontFamily:n,fontWeight:"".concat(r)});for(const n of t){const{data:t,width:r,height:o,glyphTop:s}=e.draw(n);A[n].width=r,A[n].layoutOffsetY=.9*i-s;const a=h.createImageData(r,o);b(t,a),h.putImageData(a,A[n].x,A[n].y)}}else for(const e of t)h.fillText(e,A[e].x,A[e].y+o+.9*i);return{xOffset:d,yOffset:p,mapping:A,data:l,width:l.width,height:l.height}}_getKey(){const{fontFamily:t,fontWeight:e,fontSize:n,buffer:r,sdf:i,radius:o,cutoff:s}=this.props;return i?"".concat(t," ").concat(e," ").concat(n," ").concat(r," ").concat(o," ").concat(s):"".concat(t," ").concat(e," ").concat(n," ").concat(r)}}var x=n(13419);const S={start:1,middle:0,end:-1},T={top:1,center:0,bottom:-1},P=[0,0,0,255],C={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPi
2xels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,background:!1,getBackgroundColor:{type:"accessor",value:[255,255,255,255]},getBorderColor:{type:"accessor",value:P},getBorderWidth:{type:"accessor",value:0},backgroundPadding:{type:"array",value:[0,0,0,0]},characterSet:{type:"object",value:v.characterSet},fontFamily:v.fontFamily,fontWeight:v.fontWeight,lineHeight:1,outlineWidth:{type:"number",value:0,min:0},outlineColor:{type:"color",value:P},fontSettings:{type:"object",value:{},compare:1},wordBreak:"break-word",maxWidth:{type:"number",value:-1},getText:{type:"accessor",value:t=>t.text},getPosition:{type:"accessor",value:t=>t.position},getColor:{type:"accessor",value:P},getSize:{type:"accessor",value:32},getAngle:{type:"accessor",value:0},getTextAnchor:{type:"accessor",value:"middle"},getAlignmentBaseline:{type:"accessor",value:"center"},getPixelOffset:{type:"accessor",value:[0,0]},backgroundColor:{deprecatedFor:["background","getBackgroundColor"]}};class M extends i.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0),(0,r.A)(this,"getBoundingRect",(t,e)=>{let{size:[n,r]}=this.transformParagraph(t,e);const{fontSize:i}=this.state.fontAtlasManager.props;n/=i,r/=i;const{getTextAnchor:o,getAlignmentBaseline:s}=this.props;return[(S["function"==typeof o?o(t,e):o]-1)*n/2,(T["function"==typeof s?s(t,e):s]-1)*r/2,n,r]}),(0,r.A)(this,"getIconOffsets",(t,e)=>{const{getTextAnchor:n,getAlignmentBaseline:r}=this.props,{x:i,y:o,rowWidth:s,size:[a,u]}=this.transformParagraph(t,e),l=S["function"==typeof n?n(t,e):n],c=T["function"==typeof r?r(t,e):r],h=i.length,A=new Array(2*h);let f=0;for(let t=0;t<h;t++){const e=(1-l)*(a-s[t])/2;A[f++]=(l-1)*a/2+e+i[t],A[f++]=(c-1)*u/2+o[t]}return A})}initializeState(){this.state={styleVersion:0,fontAtlasManager:new E},this.props.maxWidth>0&&o.A.warn("v8.9 breaking change: TextLayer maxWidth is now relative to text size")()}updateState(t){const{props:e,oldProps:n,changeFlags:r}=t;(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getText))&&this._updateText(),(this._updateFontAtlas()||e.lineHeight!==n.lineHeight||e.wordBreak!==n.wordBreak||e.maxWidth!==n.maxWidth)&&this.setState({styleVersion:this.state.styleVersion+1})}getPickingInfo({info:t}){return t.object=t.index>=0?this.props.data[t.index]:null,t}_updateFontAtlas(){const{fontSettings:t,fontFamily:e,fontWeight:n}=this.props,{fontAtlasManager:r,characterSet:i}=this.state,o={...t,characterSet:i,fontFamily:e,fontWeight:n};if(!r.mapping)return r.setProps(o),!0;for(const t in o)if(o[t]!==r.props[t])return r.setProps(o),!0;return!1}_updateText(){var t;const{data:e,characterSet:n}=this.props,r=null===(t=e.attributes)||void 0===t?void 0:t.getText;let i,{getText:o}=this.props,a=e.startIndices;const u="auto"===n&&new Set;if(r&&a){const{texts:t,characterCount:n}=function({value:t,length:e,stride:n,offset:r,startIndices:i,characterSet:o}){const s=t.BYTES_PER_ELEMENT,a=n?n/s:1,u=r?r/s:0,l=i[e]||Math.ceil((t.length-u)/a),c=o&&new Set,h=new Array(e);let A=t;if(a>1||u>0){A=new(0,t.constructor)(l);for(let e=0;e<l;e++)A[e]=t[e*a+u]}for(let t=0;t<e;t++){const e=i[t],n=i[t+1]||l,r=A.subarray(e,n);h[t]=String.fromCodePoint.apply(null,r),c&&r.forEach(c.add,c)}if(c)for(const t of c)o.add(String.fromCodePoint(t));return{texts:h,characterCount:l}}({...ArrayBuffer.isView(r)?{value:r}:r,length:e.length,startIndices:a,characterSet:u});i=n,o=(e,{index:n})=>t[n]}else{const{iterable:t,objectInfo:n}=(0,s.X)(e);a=[0],i=0;for(const e of t){n.index++;const t=Array.from(o(e,n)||"");u&&t.forEach(u.add,u),i+=t.length,a.push(i)}}this.setState({getText:o,startIndices:a,numInstances:i,characterSet:u||n})}transformParagraph(t,e){const{fontAtlasManager:n}=this.state,r=n.mapping,i=this.state.getText,{wordBreak:o,lineHeight:s,maxWidth:a}=this.props;return function(t,e,n,r,i){const o=Array.from(t),s=o.length,a=new Array(s),u=new Array(s),l=new Array(s),c=("break-word"===n||"break-all"===n)&&isFinite(r)&&r>0,h=[0,0],A=[0,0];let d=0,p=0,y=0;for(let t=0;t<=s;t++){const _=o[t];if("\n"!==_&&t!==s||(y=t),y>p){const t=c?g(o,n,r,i,p,y):f;for(let n=0;n<=t.length;n++){const r=0===n?p:t[n-1],s=n<t.length?t[n]:y;m(o,r,s,i,a,A);for(let t=r;t<s;t++){var v;const e=(null===(v=i[o[t]])||void 0===v?void 0:v.layoutOffsetY)||0;u[t]=d+A[1]/2+e,l[t]=A[0]}d+=A[1]*e,h[0]=Math.max(h[0],A[0])}p=y}"\n"===_&&(a[p]=0,u[p]=0,l[p]=0,p++)}return h[1]=d,{x:a,y:u,rowWidth:l,size:h}}(i(t,e)||"",s,o,a*n.props.fontSize,r)}renderLayers(){const{startIndices:t,numInstances:e,getText:n,fontAtlasManager:{scale:r,texture:i,mapping:o},styleVersion:s}=this.state,{data:u,_dataDiff:l,getPosition:c,getColor:h,getSize:A,getAngle:f,getPixelOffset:d,getBackgroun
2dColor:p,getBorderColor:g,getBorderWidth:m,backgroundPadding:y,background:_,billboard:b,fontSettings:w,outlineWidth:E,outlineColor:S,sizeScale:T,sizeUnits:P,sizeMinPixels:C,sizeMaxPixels:M,transitions:I,updateTriggers:O}=this.props,R=this.getSubLayerClass("characters",a.A),L=this.getSubLayerClass("background",x.A);return[_&&new L({getFillColor:p,getLineColor:g,getLineWidth:m,padding:y,getPosition:c,getSize:A,getAngle:f,getPixelOffset:d,billboard:b,sizeScale:T,sizeUnits:P,sizeMinPixels:C,sizeMaxPixels:M,transitions:I&&{getPosition:I.getPosition,getAngle:I.getAngle,getSize:I.getSize,getFillColor:I.getBackgroundColor,getLineColor:I.getBorderColor,getLineWidth:I.getBorderWidth,getPixelOffset:I.getPixelOffset}},this.getSubLayerProps({id:"background",updateTriggers:{getPosition:O.getPosition,getAngle:O.getAngle,getSize:O.getSize,getFillColor:O.getBackgroundColor,getLineColor:O.getBorderColor,getLineWidth:O.getBorderWidth,getPixelOffset:O.getPixelOffset,getBoundingRect:{getText:O.getText,getTextAnchor:O.getTextAnchor,getAlignmentBaseline:O.getAlignmentBaseline,styleVersion:s}}}),{data:u.attributes&&u.attributes.background?{length:u.length,attributes:u.attributes.background}:u,_dataDiff:l,autoHighlight:!1,getBoundingRect:this.getBoundingRect}),new R({sdf:w.sdf,smoothing:Number.isFinite(w.smoothing)?w.smoothing:v.smoothing,outlineWidth:E/(w.radius||v.radius),outlineColor:S,iconAtlas:i,iconMapping:o,getPosition:c,getColor:h,getSize:A,getAngle:f,getPixelOffset:d,billboard:b,sizeScale:T*r,sizeUnits:P,sizeMinPixels:C*r,sizeMaxPixels:M*r,transitions:I&&{getPosition:I.getPosition,getAngle:I.getAngle,getColor:I.getColor,getSize:I.getSize,getPixelOffset:I.getPixelOffset}},this.getSubLayerProps({id:"characters",updateTriggers:{all:O.getText,getPosition:O.getPosition,getAngle:O.getAngle,getColor:O.getColor,getSize:O.getSize,getPixelOffset:O.getPixelOffset,getIconOffsets:{getTextAnchor:O.getTextAnchor,getAlignmentBaseline:O.getAlignmentBaseline,styleVersion:s}}}),{data:u,_dataDiff:l,startIndices:t,numInstances:e,getIconOffsets:this.getIconOffsets,getIcon:n})]}static set fontAtlasCacheLimit(t){!function(t){o.A.assert(Number.isFinite(t)&&t>=3,"Invalid cache limit"),_=new y(t)}(t)}}(0,r.A)(M,"defaultProps",C),(0,r.A)(M,"layerName","TextLayer")},52343:(t,e,n)=>{"use strict";n.d(e,{A:()=>A});var r=n(24586),i=n(99608),o=n(27371),s=n(10707),a=n(93314),u=n(25330),l=n(67069);const c=[0,0,0,255],h={getSourcePosition:{type:"accessor",value:t=>t.sourcePosition},getTargetPosition:{type:"accessor",value:t=>t.targetPosition},getSourceColor:{type:"accessor",value:c},getTargetColor:{type:"accessor",value:c},getWidth:{type:"accessor",value:1},getHeight:{type:"accessor",value:1},getTilt:{type:"accessor",value:0},greatCircle:!1,widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}};class A extends i.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}getBounds(){var t;return null===(t=this.getAttributeManager())||void 0===t?void 0:t.getBounds(["instanceSourcePositions","instanceTargetPositions"])}getShaders(){return super.getShaders({vs:"#define SHADER_NAME arc-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec4 instanceSourceColors;\nattribute vec4 instanceTargetColors;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\nattribute float instanceHeights;\nattribute float instanceTilts;\n\nuniform bool greatCircle;\nuniform bool useShortestPath;\nuniform float numSegments;\nuniform float opacity;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform int widthUnits;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nfloat paraboloid(float distance, float sourceZ, float targetZ, float ratio) {\n\n float deltaZ = targetZ - sourceZ;\n float dh = distance * instanceHeights;\n if (dh == 0.0) {\n return sourceZ + deltaZ * ratio;\n }\n float unitZ = deltaZ / dh;\n float p2 = unitZ * unitZ + 1.0;\n float dir = step(deltaZ, 0.0);\n float z0 = mix(sourceZ, targetZ, dir);\n float r = mix(ratio, 1.0 - ratio, dir);\n return sqrt(r * (p2 - r)) * dh + z0;\n}\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n return dir_screenspace * offset_direction * width / 2.0;\n}\n\nfloat getSegmentRatio(float index) {\n return smoothstep(0.0, 1.0, index / (numSegments - 1.0));\n}\n\nvec3 interpolateFlat(vec3 source, vec3 target, float segmentRatio) {\n float distance = length(source.xy - target.xy);\n float z = paraboloid(distance, source.z, target.z, segmentRatio);\n\n float tiltAngle = radians(instanceTilts);\n vec2 tiltDirection = normalize(target.xy - source.xy);\n vec2 tilt = vec2(-tiltDirection.y, tiltDirection.x) * z * sin(tiltAngle);\n\n return vec3(\n mix(source.xy, target.xy, segmentRatio) + tilt,\n z * cos(tiltAngle)\n );\n}
2\nfloat getAngularDist (vec2 source, vec2 target) {\n vec2 sourceRadians = radians(source);\n vec2 targetRadians = radians(target);\n vec2 sin_half_delta = sin((sourceRadians - targetRadians) / 2.0);\n vec2 shd_sq = sin_half_delta * sin_half_delta;\n\n float a = shd_sq.y + cos(sourceRadians.y) * cos(targetRadians.y) * shd_sq.x;\n return 2.0 * asin(sqrt(a));\n}\n\nvec3 interpolateGreatCircle(vec3 source, vec3 target, vec3 source3D, vec3 target3D, float angularDist, float t) {\n vec2 lngLat;\n if(abs(angularDist - PI) < 0.001) {\n lngLat = (1.0 - t) * source.xy + t * target.xy;\n } else {\n float a = sin((1.0 - t) * angularDist);\n float b = sin(t * angularDist);\n vec3 p = source3D.yxz * a + target3D.yxz * b;\n lngLat = degrees(vec2(atan(p.y, -p.x), atan(p.z, length(p.xy))));\n }\n\n float z = paraboloid(angularDist * EARTH_RADIUS, source.z, target.z, t);\n\n return vec3(lngLat, z);\n}\n\nvoid main(void) {\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n\n float segmentIndex = positions.x;\n float segmentRatio = getSegmentRatio(segmentIndex);\n float prevSegmentRatio = getSegmentRatio(max(0.0, segmentIndex - 1.0));\n float nextSegmentRatio = getSegmentRatio(min(numSegments - 1.0, segmentIndex + 1.0));\n float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n isValid = 1.0;\n\n uv = vec2(segmentRatio, positions.y);\n geometry.uv = uv;\n geometry.pickingColor = instancePickingColors;\n\n vec4 curr;\n vec4 next;\n vec3 source;\n vec3 target;\n\n if ((greatCircle || project_uProjectionMode == PROJECTION_MODE_GLOBE) && project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n source = project_globe_(vec3(instanceSourcePositions.xy, 0.0));\n target = project_globe_(vec3(instanceTargetPositions.xy, 0.0));\n float angularDist = getAngularDist(instanceSourcePositions.xy, instanceTargetPositions.xy);\n\n vec3 prevPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, prevSegmentRatio);\n vec3 currPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, segmentRatio);\n vec3 nextPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, nextSegmentRatio);\n\n if (abs(currPos.x - prevPos.x) > 180.0) {\n indexDir = -1.0;\n isValid = 0.0;\n } else if (abs(currPos.x - nextPos.x) > 180.0) {\n indexDir = 1.0;\n isValid = 0.0;\n }\n nextPos = indexDir < 0.0 ? prevPos : nextPos;\n nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n\n if (isValid == 0.0) {\n nextPos.x += nextPos.x > 0.0 ? -360.0 : 360.0;\n float t = ((currPos.x > 0.0 ? 180.0 : -180.0) - currPos.x) / (nextPos.x - currPos.x);\n currPos = mix(currPos, nextPos, t);\n segmentRatio = mix(segmentRatio, nextSegmentRatio, t);\n }\n\n vec3 currPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, segmentRatio);\n vec3 nextPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, nextSegmentRatio);\n \n curr = project_position_to_clipspace(currPos, currPos64Low, vec3(0.0), geometry.position);\n next = project_position_to_clipspace(nextPos, nextPos64Low, vec3(0.0));\n \n } else {\n vec3 source_world = instanceSourcePositions;\n vec3 target_world = instanceTargetPositions;\n if (useShortestPath) {\n source_world.x = mod(source_world.x + 180., 360.
20) - 180.;\n target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n\n float deltaLng = target_world.x - source_world.x;\n if (deltaLng > 180.) target_world.x -= 360.;\n if (deltaLng < -180.) source_world.x -= 360.;\n }\n source = project_position(source_world, instanceSourcePositions64Low);\n target = project_position(target_world, instanceTargetPositions64Low);\n float antiMeridianX = 0.0;\n\n if (useShortestPath) {\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n antiMeridianX = -(project_uCoordinateOrigin.x + 180.) / 360. * TILE_SIZE;\n }\n float thresholdRatio = (antiMeridianX - source.x) / (target.x - source.x);\n\n if (prevSegmentRatio <= thresholdRatio && nextSegmentRatio > thresholdRatio) {\n isValid = 0.0;\n indexDir = sign(segmentRatio - thresholdRatio);\n segmentRatio = thresholdRatio;\n }\n }\n\n nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n vec3 currPos = interpolateFlat(source, target, segmentRatio);\n vec3 nextPos = interpolateFlat(source, target, nextSegmentRatio);\n\n if (useShortestPath) {\n if (nextPos.x < antiMeridianX) {\n currPos.x += TILE_SIZE;\n nextPos.x += TILE_SIZE;\n }\n }\n\n curr = project_common_position_to_clipspace(vec4(currPos, 1.0));\n next = project_common_position_to_clipspace(vec4(nextPos, 1.0));\n geometry.position = vec4(currPos, 1.0);\n }\n float widthPixels = clamp(\n project_size_to_pixel(instanceWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels\n );\n vec3 offset = vec3(\n getExtrusionOffset((next.xy - curr.xy) * indexDir, positions.y, widthPixels),\n 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n DECKGL_FILTER_GL_POSITION(curr, geometry);\n gl_Position = curr + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n\n vec4 color = mix(instanceSourceColors, instanceTargetColors, segmentRatio);\n vColor = vec4(color.rgb, color.a * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME arc-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nvoid main(void) {\n if (isValid == 0.0) {\n discard;\n }\n\n gl_FragColor = vColor;\n geometry.uv = uv;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.A,s.A]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceSourceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getSourceColor",defaultValue:c},instanceTargetColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getTargetColor",defaultValue:c},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1},instanceHeights:{size:1,transition:!0,accessor:"getHeight",defaultValue:1},instanceTilts:{size:1,transition:!0,accessor:"getTilt",defaultValue:0}})}updateState(t){if(super.updateState(t),t.changeFlags.extensionsChanged){var e;const{gl:t}=this.context;null===(e=this.state.model)||void 0===e||e.delete(),this.state.model=this._getModel(t),this.getAttributeManager().invalidateAll()}}draw({uniforms:t}){const{widthUnits:e,widthScale:n,widthMinPixels:r,widthMaxPixels:i,greatCircle:o,wrapLongitude:s}=this.props;this.state.model.setUniforms(t).setUniforms({greatCircle:o,widthUnits:a.p5[e],widthScale:n,widthMinPixels:r,widthMaxPixels:i,useShortestPath:s}).draw()}_getModel(t){let e=[];for(let t=0;t<50;t++)e=e.concat([t,1,0,t,-1,0]);const n=new u.A(t,{...this.getShaders(),id:this.props.id,geometry:new l.A({drawMode:5,attributes:{positions:new Float32Array(e)}}),isInstanced:!0});return n.setUniforms({numSegments:50}),n}}(0,r.A)(A,"layerName","ArcLayer"),(0,r.A)(A,"defaultProps",h)},52421:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(24586);function i(){let t;if("undefined"!=typeof window&&window.performance)t=window.performance.now();else if("undefined"!=typeof process&&process.hrtime){const e=process.hrtime();t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}class o{constructor(t,e){(0,r.A)(this,"name",void 0),(0,r.A)(this,"type",void 0),(0,r.A)(this,"sampleSize",1),(0,r.A)(this,"time",void 0),(0,r.A)(this,"count",void 0),(0,r.A)(this,"samples",void 0),(0,r.A)(this,"lastTiming",void 0),(0,r.A)(this,"lastSampleTime",void 0),(0,r.A)(this,"lastSampleCount",void 0),(0,r.A)(this,"_count",0),(0,r.A)(this,"_time",0),(0,r.A)(this,"_samples",0),(0,r.A)(this,"_startTime",0),(0,r.A)(this,"_timerPending",!1),this.name=t,this.type=e,this.reset()}setSampleSize(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=i(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(i()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class s{constructor(t){(0,r.A)(this,"id",void 0),(0,r.A)(this,"stats",{}),this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"count";return this._getOrCreate({name:t,type:e})}get size(){return Object.keys(this.stats).length}reset(){for(const t in this.stats)this.stats[t].reset();return this}forEach(t){for(const e in this.stats)t(this.stats[e])}getTable(){const t={};
vendor: 7,912 bytes, line 2
2return this.forEach(e=>{t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}}),t}_initializeStats(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(t=>this._getOrCreate(t))}_getOrCreate(t){if(!t||!t.name)return null;const{name:e,type:n}=t;return this.stats[e]||(this.stats[e]=t instanceof o?t:new o(e,n)),this.stats[e]}}},52507:function(t,e){var n,r;void 0===(r="function"==typeof(n=function(){"use strict";function t(t,e,n){this.low=0|t,this.high=0|e,this.unsigned=!!n}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var n={},r={};function i(t,e){var i,o,a;return e?(a=0<=(t>>>=0)&&t<256)&&(o=r[t])?o:(i=s(t,(0|t)<0?-1:0,!0),a&&(r[t]=i),i):(a=-128<=(t|=0)&&t<128)&&(o=n[t])?o:(i=s(t,t<0?-1:0,!1),a&&(n[t]=i),i)}function o(t,e){if(isNaN(t)||!isFinite(t))return e?p:d;if(e){if(t<0)return p;if(t>=h)return _}else{if(t<=-A)return b;if(t+1>=A)return v}return t<0?o(-t,e).neg():s(t%c|0,t/c|0,e)}function s(e,n,r){return new t(e,n,r)}t.fromInt=i,t.fromNumber=o,t.fromBits=s;var a=Math.pow;function u(t,e,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return d;if("number"==typeof e?(n=e,e=!1):e=!!e,(n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return u(t.substring(1),e,n).neg();for(var i=o(a(n,8)),s=d,l=0;l<t.length;l+=8){var c=Math.min(8,t.length-l),h=parseInt(t.substring(l,l+c),n);if(c<8){var A=o(a(n,c));s=s.mul(A).add(o(h))}else s=(s=s.mul(i)).add(o(h))}return s.unsigned=e,s}function l(e){return e instanceof t?e:"number"==typeof e?o(e):"string"==typeof e?u(e):s(e.low,e.high,e.unsigned)}t.fromString=u,t.fromValue=l;var c=4294967296,h=c*c,A=h/2,f=i(1<<24),d=i(0);t.ZERO=d;var p=i(0,!0);t.UZERO=p;var g=i(1);t.ONE=g;var m=i(1,!0);t.UONE=m;var y=i(-1);t.NEG_ONE=y;var v=s(-1,2147483647,!1);t.MAX_VALUE=v;var _=s(-1,-1,!0);t.MAX_UNSIGNED_VALUE=_;var b=s(0,-2147483648,!1);t.MIN_VALUE=b;var w=t.prototype;return w.toInt=function(){return this.unsigned?this.low>>>0:this.low},w.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},w.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(b)){var e=o(t),n=this.div(e),r=n.mul(e).sub(this);return n.toString(t)+r.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=o(a(t,6),this.unsigned),s=this,u="";;){var l=s.div(i),c=(s.sub(l.mul(i)).toInt()>>>0).toString(t);if((s=l).isZero())return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}},w.getHighBits=function(){return this.high},w.getHighBitsUnsigned=function(){return this.high>>>0},w.getLowBits=function(){return this.low},w.getLowBitsUnsigned=function(){return this.low>>>0},w.getNumBitsAbs=function(){if(this.isNegative())return this.eq(b)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},w.isZero=function(){return 0===this.high&&0===this.low},w.isNegative=function(){return!this.unsigned&&this.high<0},w.isPositive=function(){return this.unsigned||this.high>=0},w.isOdd=function(){return!(1&~this.low)},w.isEven=function(){return!(1&this.low)},w.equals=function(t){return e(t)||(t=l(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},w.eq=w.equals,w.notEquals=function(t){return!this.eq(t)},w.neq=w.notEquals,w.lessThan=function(t){return this.comp(t)<0},w.lt=w.lessThan,w.lessThanOrEqual=function(t){return this.comp(t)<=0},w.lte=w.lessThanOrEqual,w.greaterThan=function(t){return this.comp(t)>0},w.gt=w.greaterThan,w.greaterThanOrEqual=function(t){return this.comp(t)>=0},w.gte=w.greaterThanOrEqual,w.compare=function(t){if(e(t)||(t=l(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},w.comp=w.compare,w.negate=function(){return!this.unsigned&&this.eq(b)?b:this.not().add(g)},w.neg=w.negate,w.add=function(t){e(t)||(t=l(t));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,a=t.high>>>16,u=65535&t.high,c=t.low>>>16,h=0,A=0,f=0,d=0;return f+=(d+=o+(65535&t.low))>>>16,A+=(f+=i+c)>>>16,h+=(A+=r+u)>>>16,h+=n+a,s((f&=65535)<<16|(d&=65535),(h&=65535)<<16|(A&=65535),this.unsigned)},w.subtract=function(t){return e(t)||(t=l(t)),this.add(t.neg())},w.sub=w.subtract,w.multiply=function(t){if(this.isZero())return d;if(e(t)||(t=l(t)),t.isZero())return d;if(this.eq(b))return t.isOdd()?b:d;if(t.eq(b))return this.isOdd()?b:d;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(f)&&t.lt(f))return o(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,a=65535&this.low,u=t.high>>>16,c=65535&t.high,h=t.low>>>16,A=65535&t.low,p=0,g=0,m=0,y=0;return m+=(y+=a*A)>>>16,g+=(m+=i*A)>>>16,m&=65535,g+=(m+=a*h)>>>16,p+=(g+=r*A)>>>16,g&=65535,p+=(g+=i*h)>>>16,g&=65535,p+=(g+=a*c)>>>16,p+=n*A+r*h+i*c+a*u,s((m&=65535)<<16|(y&=65535),(p&=65535)<<16|(g&=65535),this.unsigned)},w.mul=w.multiply,w.divide=function(t){if(e(t)||(t=l(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?p:d;var n,r,i;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return p;if(t.gt(this.shru(1)))return m;i=p}else{if(this.eq(b))return t.eq(g)||t.eq(y)?b:t.eq(b)?g:(n=this.shr(1).div(t).shl(1)).eq(d)?t.isNegative()?g:y:(r=this.sub(t.mul(n)),i=n.add(r.div(t)));if(t.eq(b))return this.unsigned?p:d;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();i=d}for(r=this;r.gte(t);){n=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),u=s<=48?1:a(2,s-48),c=o(n),h=c.mul(t);h.isNegative()||h.gt(r);)h=(c=o(n-=u,this.unsigned)).mul(t);c.isZero()&&(c=g),i=i.add(c),r=r.sub(h)}return i},w.div=w.divide,w.modulo=function(t){return e(t)||(t=l(t)),this.sub(this.div(t).mul(t))},w.mod=w.modulo,w.not=function(){return s(~this.low,~this.high,this.unsigned)},w.and=function(t){return e(t)||(t=l(t)),s(this.low&t.low,this.high&t.high,this.unsigned)},w.or=function(t){return e(t)||(t=l(t)),s(this.low|t.low,this.high|t.high,this.unsigned)},w.xor=function(t){return e(t)||(t=l(t)),s(this.low^t.low,this.high^t.high,this.unsigned)},w.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?s(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):s(0,this.low<<t-32,this.unsigned)},w.shl=w.shiftLeft,w.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?s(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):s(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},w.shr=w.shiftRight,w.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0==(t&=63))return this;var n=this.high;return t<32?s(this.low>>>t|n<<32-t,n>>>t,this.unsigned):s(32===t?n:n>>>t-32,0,this.unsigned)},w.shru=w.shiftRightUnsigned,w.toSigned=function(){return this.unsigned?s(this.low,this.high,!1):this},w.toUnsigned=function(){return this.unsigned?this:s(this.low,this.high,!0)},w.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},w.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},w.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t})?n.apply(e,[]):n)||(t.exports=r)},52672:(t,e,n)=>{"use strict";var r,i=n(14607),o=n(51913)(),s=n(78554),a=n(69336);if(o){var u=i("RegExp.prototype.exec"),l={},c=function(){throw l}
2,h={toString:c,valueOf:c};"symbol"==typeof Symbol.toPrimitive&&(h[Symbol.toPrimitive]=c),r=function(t){if(!t||"object"!=typeof t)return!1;var e=a(t,"lastIndex");if(!e||!s(e,"value"))return!1;try{u(t,h)}catch(t){return t===l}}}else{var A=i("Object.prototype.toString");r=function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===A(t)}}t.exports=r},52730:(t,e,n)=>{"use strict";var r=n(80705),i=n(14834),o=n(28498),s=n(14607),a=n(69336),u=n(46369),l=s("Object.prototype.toString"),c=n(51913)(),h="undefined"==typeof globalThis?n.g:globalThis,A=i(),f=s("String.prototype.slice"),d=s("Array.prototype.indexOf",!0)||function(t,e){for(var n=0;n<t.length;n+=1)if(t[n]===e)return n;return-1},p={__proto__:null};r(A,c&&a&&u?function(t){var e=new h[t];if(Symbol.toStringTag in e&&u){var n=u(e),r=a(n,Symbol.toStringTag);if(!r&&n){var i=u(n);r=a(i,Symbol.toStringTag)}if(r&&r.get){var s=o(r.get);p["$"+t]=s}}}:function(t){var e=new h[t],n=e.slice||e.set;if(n){var r=o(n);p["$"+t]=r}}),t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!c){var e=f(l(t),8,-1);return function(t){return d(A,t)>-1}(e)?e:"Object"===e&&function(t){var e=!1;return r(p,function(n,r){if(!e)try{n(t),e=f(r,1)}catch(t){}}),e}(t)}return a?function(t){var e=!1;return r(p,function(n,r){if(!e)try{"$"+n(t)===r&&(e=f(r,1))}catch(t){}}),e}(t):null}},52926:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnappableMode=void 0;var r=n(71169);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function A(t,e){return A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},A(t,e)}function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&A(t,e)}(p,t);var e,n,a,d=(a=p,function(){var t,e=h(a);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=h(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?c(t):e}(this,t)});function p(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),f(c(e=d.call(this)),"_handler",void 0),e._handler=t,e}return e=p,n=[{key:"_getSnappedMouseEvent",value:function(t,e,n){return Object.assign(t,{mapCoords:n.geometry.coordinates,pointerDownMapCoords:e&&e.geometry.coordinates})}},{key:"_getPickedSnapTarget",value:function(t){return(0,r.getPickedEditHandles)(t).find(function(t){return"snap-target"===t.properties.editHandleType})}},{key:"_getPickedSnapSource",value:function(t){return(0,r.getPickedSnapSourceEditHandle)(t)}}
2,{key:"_getUpdatedSnapSourceHandle",value:function(t,e){var n=t.properties,r=n.featureIndex,i=n.positionIndexes;if(!Array.isArray(i))return t;var o=e.features[r];return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t,{geometry:{type:"Point",coordinates:i.reduce(function(t,e){return t[e]},o.geometry.coordinates)}})}},{key:"_getSnapTargets",value:function(t){var e=(t.modeConfig||{}).additionalSnapTargets;return e=e||[],[].concat(o(t.data.features),o(e))}},{key:"_getSnapTargetHandles",value:function(t){for(var e=[],n=this._getSnapTargets(t),i=0;i<n.length;i++)if(!t.selectedIndexes.includes(i)){var s=n[i].geometry;e.push.apply(e,o((0,r.getEditHandlesForGeometry)(s,i,"snap-target")))}return e}},{key:"getGuides",value:function(t){var e=t.modeConfig,n=t.lastPointerMoveEvent,i=(e||{}).enableSnapping,a={type:"FeatureCollection",features:o(this._handler.getGuides(t).features)};if(!i)return a;var u,l=n&&this._getPickedSnapSource(n.pointerDownPicks);if(l)return(u=a.features).push.apply(u,o(this._getSnapTargetHandles(t)).concat([this._getUpdatedSnapSourceHandle(l,t.data)])),a;var c,h=t.data.features,A=function(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=s(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(t.selectedIndexes);try{for(A.s();!(c=A.n()).done;){var f=c.value;if(f<h.length){var d,p=h[f].geometry;(d=a.features).push.apply(d,o((0,r.getEditHandlesForGeometry)(p,f,"snap-source")))}}}catch(t){A.e(t)}finally{A.f()}return a}},{key:"_getSnapAwareEvent",value:function(t,e){var n=this._getPickedSnapSource(e.lastPointerMoveEvent.pointerDownPicks),r=this._getPickedSnapTarget(t.picks);return n&&r?this._getSnappedMouseEvent(t,n,r):t}},{key:"handleStartDragging",value:function(t,e){this._handler.handleStartDragging(t,e)}},{key:"handleStopDragging",value:function(t,e){this._handler.handleStopDragging(this._getSnapAwareEvent(t,e),e)}},{key:"handleDragging",value:function(t,e){this._handler.handleDragging(this._getSnapAwareEvent(t,e),e)}},{key:"handlePointerMove",value:function(t,e){this._handler.handlePointerMove(this._getSnapAwareEvent(t,e),e)}}],n&&l(e.prototype,n),p}(n(96146).GeoJsonEditMode);e.SnappableMode=d},53208:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}
2){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invali
2d");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},53320:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(24586);class i{constructor(t,e={id:"pass"}){(0,r.A)(this,"id",void 0),(0,r.A)(this,"gl",void 0),(0,r.A)(this,"props",void 0);const{id:n}=e;this.id=n,this.gl=t,this.props={...e}}setProps(t){Object.assign(this.props,t)}render(t){}cleanup(){}}},53629:(t,e,n)=>{"use strict";n.d(e,{H:()=>it});var r=n(26909),i=n(17321);let o="";const s={},a=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,u=/^([-\w.]+\/[-\w.+]+)/;function l(t){const e=a.exec(t);return e?e[1]:""}const c=/\?.*/;function h(t){return t.replace(c,"")}function A(t){return(0,r.Sv)(t)?t.url:(0,r.qf)(t)?t.name||"":"string"==typeof t?t:""}function f(t){if((0,r.Sv)(t)){const e=t,n=e.headers.get("content-type")||"",r=h(e.url);return function(t){const e=u.exec(t);return e?e[1]:t}(n)||l(r)}return(0,r.qf)(t)?t.type||"":"string"==typeof t?l(t):""}async function d(t){if((0,r.Sv)(t))return t;const e={},n=function(t){return(0,r.Sv)(t)?t.headers["content-length"]||-1:(0,r.qf)(t)?t.size:"string"==typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}(t);n>=0&&(e["content-length"]=String(n));const i=A(t),o=f(t);o&&(e["content-type"]=o);const s=await async function(t){if("string"==typeof t)return"data:,".concat(t.slice(0,5));if(t instanceof Blob){const e=t.slice(0,5);return await new Promise(t=>{const n=new FileReader;n.onload=e=>{var n;return t(null==e||null===(n=e.target)||void 0===n?void 0:n.result)},n.readAsDataURL(e)})}if(t instanceof ArrayBuffer){const e=function(t){let e="";const n=new Uint8Array(t);for(let t=0;t<n.byteLength;t++)e+=String.fromCharCode(n[t]);return btoa(e)}(t.slice(0,5));return"data:base64,".concat(e)}return null}(t);s&&(e["x-first-bytes"]=s),"string"==typeof t&&(t=(new TextEncoder).encode(t));const a=new Response(t,{headers:e});return Object.defineProperty(a,"url",{value:i}),a}async function p(t,e){if("string"==typeof t){t=function(t){for(const e in s)if(t.startsWith(e)){const n=s[e];t=t.replace(e,n)}return t.startsWith("http://")||t.startsWith("https://")||(t="".concat(o).concat(t)),t}(t);let n=e;return null!=e&&e.fetch&&"function"!=typeof(null==e?void 0:e.fetch)&&(n=e.fetch),await fetch(t,n)}return await d(t)}var g=n(65132);function m(t,e){const n=(0,g.pp)(),i=t||n;return"function"==typeof i.fetch?i.fetch:(0,r.Gv)(i.fetch)?t=>p(t,i):null!=e&&e.fetch?null==e?void 0:e.fetch:p}var y=n(98389);var v=n(28747);function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function b(t,e,n){return(e=function(t){var e=function(t){if("object"!=_(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class w{terminate(){}}const E=new Map;function x(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function S(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;const r=n||new Set;if(t)if(T(t))r.add(t);else if(T(t.buffer))r.add(t.buffer);else if(ArrayBuffer.isView(t));else if(e&&"object"==typeof t)for(const n in t)S(t[n],e,r);return void 0===n?Array.from(r):[]}function T(t){return!!t&&(t instanceof ArrayBuffer||"undefined"!=typeof MessagePort&&t instanceof MessagePort||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)}const P=()=>{};class C{static isSupported(){return"undefined"!=typeof Worker&&v.Bd||void 0!==w&&!v.Bd}constructor(t){b(this,"name",void 0),b(this,"source",void 0),b(this,"url",void 0),b(this,"terminated",!1),b(this,"worker",void 0),b(this,"onMessage",void 0),b(this,"onError",void 0),b(this,"_loadableURL","");const{name:e,source:n,url:r}=t;(0,y.v)(n||r),this.name=e,this.source=n,this.url=r,this.onMessage=P,this.onError=t=>console.log(t),this.worker=v.Bd?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=P,this.onError=P,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(t,e){e=e||S(t),this.worker.postMessage(t,e)}_getErrorFromErrorEvent(t){let e="Failed to load ";return e+="worker ".concat(this.name," from ").concat(this.url,". "),t.message&&(e+="".concat(t.message," in ")),t.lineno&&(e+=":".concat(t.lineno,":").concat(t.colno)),new Error(e)}_createBrowserWorker(){this._loadableURL=function(t){(0,y.v)(t.source&&!t.url||!t.source&&t.url);let e=E.get(t.source||t.url);return e||(t.url&&(e=(n=t.url).startsWith("http")?x("try {\n importScripts('".concat(n,"');\n} catch (error) {\n console.error(error);\n throw error;\n}")):n,E.set(t.url,e)),t.source&&(e=x(t.source),E.set(t.source,e))),(0,y.v)(e),e;var n}({source:this.source,url:this.url});const t=new Worker(this._loadableURL,{name:this.name});return t.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},t.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},t.onmessageerror=t=>console.error(t),t}_createNodeWorker(){let t;if(this.url){const e=this.url.includes(":/")||this.url.startsWith("/")?this.url:"./".concat(this.url);t=new w(e,{eval:!1})}else{if(!this.source)throw new Error("no worker");t=new w(this.source,{eval:!0})}return t.on("message",t=>{this.onMessage(t)}),t.on("error",t=>{this.onError(t)}),t.on("exit",t=>{}),t}}class M{constructor(t,e){b(this,"name",void 0),b(this,"workerThread",void 0),b(this,"isRunning",!0),b(this,"result",void 0),b(this,"_resolve",()=>{}),b(this,"_reject",()=>{}),this.name=t,this.workerThread=e,this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e})}postMessage(t,e){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:e})}done(t){(0,y.v)(this.isRunning),this.isRunning=!1,this._resolve(t)}error(t){(0,y.v)(this.isRunning),this.isRunning=!1,this._reject(t)}}class I{static isSupported(){return C.isSupported()}constructor(t){b(this,"name","unnamed"),b(this,"source",void 0),b(this,"url",void 0),b(this,"maxConcurrency",1),b(this,"maxMobileConcurrency",1),b(this,"onDebug",()=>{}),b(this,"reuseWorkers",!0),b(this,"props",{}),b(this,"jobQueue",[]),b(this,"idleQueue",[]),b(this,"count",0),b(this,"isDestroyed",!1),this.source=t.source,this.url=t.url,this.setProps(t)}destroy(){this.idleQueue.forEach(t=>t.destroy()),this.isDestroyed=!0}setProps(t){this.props={...this.props,...t},void 0!==t.name&&(this.name=t.name),void 0!==t.maxConcurrency&&(this.maxConcurrency=t.maxConcurrency),void 0!==t.maxMobileConcurrency&&(this.maxMobileConcurrency=t.maxMobileConcurrency),void 0!==t.reuseWorkers&&(this.reuseWorkers=t.reuseWorkers),void 0!==t.onDebug&&(this.onDebug=t.onDebug)}async startJob(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t,e,n)=>t.done(n),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(t,e)=>t.error(e);const r=new Promise(r=>(this.jobQueue.push({name:t,onMessage:e,onError:n,onStart:r}),this));return this._startQueuedJob(),await r}async _startQueuedJob(){if(!this.jobQueue.length)return;const t=this._getAvailableWorker();if(!t)return;const e=this.jobQueue.shift();if(e){this.onDebug({message:"Starting job",name:e.name,workerThread:t,backlog:this.jobQueue.length});const n=new M(e.name,t);t.onMessage=t=>e.onMessage(n,t.type,t.payload),t.onError=t=>e.onError(n,t),e.onStart(n);try{await n.result}
2finally{this.returnWorkerToQueue(t)}}}returnWorkerToQueue(t){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const t="".concat(this.name.toLowerCase()," (#").concat(this.count," of ").concat(this.maxConcurrency,")");return new C({name:t,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return v.Fr?this.maxMobileConcurrency:this.maxConcurrency}}const O={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}};class R{static isSupported(){return C.isSupported()}static getWorkerFarm(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return R._workerFarm=R._workerFarm||new R({}),R._workerFarm.setProps(t),R._workerFarm}constructor(t){b(this,"props",void 0),b(this,"workerPools",new Map),this.props={...O},this.setProps(t),this.workerPools=new Map}destroy(){for(const t of this.workerPools.values())t.destroy();this.workerPools=new Map}setProps(t){this.props={...this.props,...t};for(const t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(t){const{name:e,source:n,url:r}=t;let i=this.workerPools.get(e);return i||(i=new I({name:e,source:n,url:r}),i.setProps(this._getWorkerPoolProps()),this.workerPools.set(e,i)),i}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}b(R,"_workerFarm",void 0);const L="latest";async function B(t,e,n,r,i){const o=t.id,s=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e[t.id]||{},r="".concat(t.id,"-worker.js");let i=n.workerUrl;if(i||"compression"!==t.id||(i=e.workerUrl),"test"===e._workerType&&(i="modules/".concat(t.module,"/dist/").concat(r)),!i){let e=t.version;"latest"===e&&(e=L);const n=e?"@".concat(e):"";i="https://unpkg.com/@loaders.gl/".concat(t.module).concat(n,"/dist/").concat(r)}return(0,y.v)(i),i}(t,n),a=R.getWorkerFarm(n).getWorkerPool({name:o,url:s});n=JSON.parse(JSON.stringify(n)),r=JSON.parse(JSON.stringify(r||{}));const u=await a.startJob("process-on-worker",k.bind(null,i));u.postMessage("process",{input:e,options:n,context:r});const l=await u.result;return await l.result}async function k(t,e,n,r){switch(n){case"done":e.done(r);break;case"error":e.error(new Error(r.error));break;case"process":const{id:i,input:o,options:s}=r;try{const n=await t(o,s);e.postMessage("done",{id:i,result:n})}catch(t){const n=t instanceof Error?t.message:"unknown error";e.postMessage("error",{id:i,error:n})}break;default:console.warn("parse-with-worker unknown message ".concat(n))}}var N=n(19044);const F=262144,D=262144,j=1048576;var U=n(75784);function G(t){if((e=t)&&"object"==typeof e&&e.isBuffer)return t;var e;if(t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return 0===t.byteOffset&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if("string"==typeof t){const e=t;return(new TextEncoder).encode(e).buffer}if(t&&"object"==typeof t&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}function z(t,e){return U.Bd?async function*(t,e){const n=t.getReader();let r;try{for(;;){const t=r||n.read();null!=e&&e._streamReadAhead&&(r=n.read());const{done:i,value:o}=await t;if(i)return;yield G(o)}}catch(t){n.releaseLock()}}(t,e):async function*(t){for await(const e of t)yield G(e)}(t)}const V="Cannot convert supplied data type";async function H(t,e,n){const i=t instanceof ArrayBuffer||ArrayBuffer.isView(t);if("string"==typeof t||i)return function(t,e){if(e.text&&"string"==typeof t)return t;if((0,r.Pe)(t)&&(t=t.buffer),t instanceof ArrayBuffer){const n=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);let n=t.buffer;const r=t.byteLength||t.length;return 0===t.byteOffset&&r===n.byteLength||(n=n.slice(t.byteOffset,t.byteOffset+r)),n}throw new Error(V)}(t,e);if((0,r.qf)(t)&&(t=await d(t)),(0,r.Sv)(t)){const n=t;return await async function(t){if(!t.ok){const e=await async function(t){let e="Failed to fetch resource ".concat(t.url," (").concat(t.status,"): ");try{const n=t.headers.get("Content-Type");let r=t.statusText;n.includes("application/json")&&(r+=" ".concat(await t.text())),e+=r,e=e.length>60?"".concat(e.slice(0,60),"..."):e}catch(t){}return e}(t);throw new Error(e)}}(n),e.binary?await n.arrayBuffer():await n.text()}if((0,r.H1)(t)&&(t=function(t,e){if("string"==typeof t)return function*(t,e){const n=(null==e?void 0:e.chunkSize)||F;let r=0;const i=new TextEncoder;for(;r<t.length;){const e=Math.min(t.length-r,n),o=t.slice(r,r+e);r+=e,yield i.encode(o)}}(t,e);if(t instanceof ArrayBuffer)return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){const{chunkSize:n=D}=e;let r=0;for(;r<t.byteLength;){const e=Math.min(t.byteLength-r,n),i=new ArrayBuffer(e),o=new Uint8Array(t,r,e);new Uint8Array(i).set(o),r+=e,yield i}}()}(t,e);if((0,r.qf)(t))return async function*(t,e){const n=(null==e?void 0:e.chunkSize)||j;let r=0;for(;r<t.size;){const e=r+n,i=await t.slice(r,e).arrayBuffer();r=e,yield i}}(t,e);if((0,r.H1)(t))return z(t,e);if((0,r.Sv)(t))return z(t.body,e);throw new Error("makeIterator")}(t,n)),(0,r.xZ)(t)||(0,r.Td)(t))return async function(t){const e=[];for await(const n of t)e.push(n);return(0,N.AQ)(...e)}(t);throw new Error(V)}var q=n(35687);const W=new(n(8554).t)({id:"loaders.gl"});var X=n(74235);const Y=/\.([^.]+)$/;function Q(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(!J(t))return null;if(e&&!Array.isArray(e))return(0,i.D)(e);let o=[];e&&(o=o.concat(e)),null!=n&&n.ignoreRegisteredLoaders||o.push(...(0,X.Ph)()),function(t){for(const e of t)(0,i.D)(e)}(o);const s=function(t,e,n,r){const i=A(t),o=f(t),s=h(i)||(null==r?void 0:r.url);let a=null,u="";var l;return null!=n&&n.mimeType&&(a=K(e,null==n?void 0:n.mimeType),u="match forced by supplied MIME type ".concat(null==n?void 0:n.mimeType)),a=a||function(t,e){const n=e&&Y.exec(e),r=n&&n[1];return r?function(t,e){e=e.toLowerCase();for(const n of t)for(const t of n.extensions)if(t.toLowerCase()===e)return n;return null}(t,r):null}(e,s),u=u||(a?"matched url ".concat(s):""),a=a||K(e,o),u=u||(a?"matched MIME type ".concat(o):""),a=a||function(t,e){if(!e)return null;for(const n of t)if("string"==typeof e){if($(e,n))return n}else if(ArrayBuffer.isView(e)){if(tt(e.buffer,e.byteOffset,n))return n}else if(e instanceof ArrayBuffer&&tt(e,0,n))return n;return null}(e,t),u=u||(a?"matched initial data ".concat(et(t)):""),a=a||K(e,null==n?void 0:n.fallbackMimeType),u=u||(a?"matched fallback MIME type ".concat(o):""),u&&W.log(1,"selectLoader selected ".concat(null===(l=a)||void 0===l?void 0:l.name,": ").concat(u,".")),a}(t,o,n,r);if(!(s||null!=n&&n.nothrow))throw new Error(Z(t));return s}function J(t){return!(t instanceof Response&&204===t.status)}function Z(t){const e=A(t),n=f(t);let r="No valid loader found (";r+=e?"".concat(q.iW(e),", "):"no url provided, ",r+="MIME type: ".concat(n?'"'.concat(n,'"'):"not provided",", ");const i=t?et(t):"";return r+=i?' first bytes: "'.concat(i,'"'):"first bytes: not available",r+=")",r}function K(t,e){for(const n of t){if(n.mimeTypes&&n.mimeTypes.includes(e))return n;if(e==="application/x.".concat(n.id))return n}return null}function $(t,e){return e.testText?e.testText(t):(Array.isArray(e.tests)?e.tests:[e.tests]).some(e=>
2t.startsWith(e))}function tt(t,e,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some(r=>function(t,e,n,r){if(r instanceof ArrayBuffer)return(0,N.YV)(r,t,r.byteLength);switch(typeof r){case"function":return r(t,n);case"string":return r===nt(t,e,r.length);default:return!1}}(t,e,n,r))}function et(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return"string"==typeof t?t.slice(0,e):ArrayBuffer.isView(t)?nt(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?nt(t,0,e):""}function nt(t,e,n){if(t.byteLength<e+n)return"";const r=new DataView(t);let i="";for(let t=0;t<n;t++)i+=String.fromCharCode(r.getUint8(e+t));return i}async function rt(t,e,n,o){(0,y.v)(!o||"object"==typeof o),!e||Array.isArray(e)||(0,i.l)(e)||(o=void 0,n=e,e=void 0),n=n||{};const s=A(t=await t),a=function(t,e){if(!e&&t&&!Array.isArray(t))return t;let n;if(t&&(n=Array.isArray(t)?t:[t]),e&&e.loaders){const t=Array.isArray(e.loaders)?e.loaders:[e.loaders];n=n?[...n,...t]:t}return n&&n.length?n:null}(e,o),u=await async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;if(!J(t))return null;let o=Q(t,e,{...n,nothrow:!0},i);if(o)return o;if((0,r.qf)(t)&&(o=Q(t=await t.slice(0,10).arrayBuffer(),e,n,i)),!(o||null!=n&&n.nothrow))throw new Error(Z(t));return o}(t,a,n);return u?(o=function(t,e,n){if(n)return n;const r={fetch:m(e,t),...t};if(r.url){const t=h(r.url);r.baseUrl=t,r.queryString=function(t){const e=t.match(c);return e&&e[0]}(r.url),r.filename=q.iW(t),r.baseUrl=q.pD(t)}return Array.isArray(r.loaders)||(r.loaders=null),r}({url:s,parse:rt,loaders:a},n=(0,g.a5)(n,u,a,s),o||null),await async function(t,e,n,i){if(function(t){(0,y.v)(t,"no worker provided");t.version}(t),(0,r.Sv)(e)){const t=e,{ok:n,redirected:r,status:o,statusText:s,type:a,url:u}=t,l=Object.fromEntries(t.headers.entries());i.response={headers:l,ok:n,redirected:r,status:o,statusText:s,type:a,url:u}}if(e=await H(e,t,n),t.parseTextSync&&"string"==typeof e)return n.dataType="text",t.parseTextSync(e,n,i,t);if(function(t,e){return!!R.isSupported()&&!!(v.Bd||null!=e&&e._nodeWorkers)&&t.worker&&(null==e?void 0:e.worker)}(t,n))return await B(t,e,n,i,rt);if(t.parseText&&"string"==typeof e)return await t.parseText(e,n,i,t);if(t.parse)return await t.parse(e,n,i,t);throw(0,y.v)(!t.parseSync),new Error("".concat(t.id," loader - no parser found and worker is disabled"))}(u,t,n,o)):null}async function it(t,e,n,o){Array.isArray(e)||(0,i.l)(e)||(n=e,e=void 0);const s=m(n);let a=t;return"string"==typeof t&&(a=await s(t)),(0,r.qf)(t)&&(a=await s(t)),await rt(a,e,n)}},53725:(t,e,n)=>{"use strict";var r=n(14607),i=r("Boolean.prototype.toString"),o=r("Object.prototype.toString"),s=n(51913)();t.exports=function(t){return"boolean"==typeof t||null!==t&&"object"==typeof t&&(s?function(t){try{return i(t),!0}catch(t){return!1}}(t):"[object Boolean]"===o(t))}},53871:(t,e,n)=>{var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,h=l||c||Function("return this")(),A=Object.prototype.toString,f=Math.max,d=Math.min,p=function(){return h.Date.now()};function g(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function m(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==A.call(t)}(t))return NaN;if(g(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=g(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=s.test(t);return n||a.test(t)?u(t.slice(2),n?2:8):o.test(t)?NaN:+t}t.exports=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(r);return g(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),function(t,e,n){var i,o,s,a,u,l,c=0,h=!1,A=!1,y=!0;if("function"!=typeof t)throw new TypeError(r);function v(e){var n=i,r=o;return i=o=void 0,c=e,a=t.apply(r,n)}function _(t){var n=t-l;return void 0===l||n>=e||n<0||A&&t-c>=s}function b(){var t=p();if(_(t))return w(t);u=setTimeout(b,function(t){var n=e-(t-l);return A?d(n,s-(t-c)):n}(t))}function w(t){return u=void 0,y&&i?v(t):(i=o=void 0,a)}function E(){var t=p(),n=_(t);if(i=arguments,o=this,l=t,n){if(void 0===u)return function(t){return c=t,u=setTimeout(b,e),h?v(t):a}(l);if(A)return u=setTimeout(b,e),v(l)}return void 0===u&&(u=setTimeout(b,e)),a}return e=m(e)||0,g(n)&&(h=!!n.leading,s=(A="maxWait"in n)?f(m(n.maxWait)||0,e):s,y="trailing"in n?!!n.trailing:y),E.cancel=function(){void 0!==u&&clearTimeout(u),c=0,i=l=o=u=void 0},E.flush=function(){return void 0===u?a:w(p())},E}(t,e,{leading:i,maxWait:e,trailing:o})}},54023:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var r=n(86666),i=n(82314);function o(t,e,n={}){let r;return r=n.final?s(i.getCoord.call(void 0,e),i.getCoord.call(void 0,t)):s(i.getCoord.call(void 0,t),i.getCoord.call(void 0,e)),r>180?-(360-r):r}function s(t,e){const n=r.degreesToRadians.call(void 0,t[1]),i=r.degreesToRadians.call(void 0,e[1]);let o=r.degreesToRadians.call(void 0,e[0]-t[0]);o>Math.PI&&(o-=2*Math.PI),o<-Math.PI&&(o+=2*Math.PI);const s=Math.log(Math.tan(i/2+Math.PI/4)/Math.tan(n/2+Math.PI/4)),a=Math.atan2(o,s);return(r.radiansToDegrees.call(void 0,a)+360)%360}var a=o;e.default=a,e.rhumbBearing=o},54116:(t,e,n)=>{"use strict";n.d(e,{A:()=>l,w:()=>s});var r=n(24586),i=n(6809);const o=()=>{},s={BREAK:1,SNAP_TO_END:2,IGNORE:3},a=t=>t,u=s.BREAK;class l{constructor(t){(0,r.A)(this,"getControllerState",void 0),(0,r.A)(this,"props",void 0),(0,r.A)(this,"propsInTransition",void 0),(0,r.A)(this,"transition",void 0),(0,r.A)(this,"onViewStateChange",void 0),(0,r.A)(this,"onStateChange",void 0),(0,r.A)(this,"_onTransitionUpdate",t=>{const{time:e,settings:{interpolator:n,startProps:r,endProps:i,duration:o,easing:s}}=t,a=s(e/o),u=n.interpolateProps(r,i,a);this.propsInTransition=this.getControllerState({...this.props,...u}).getViewportProps(),this.onViewStateChange({viewState:this.propsInTransition,oldViewState:this.props})}),this.getControllerState=t.getControllerState,this.propsInTransition=null,this.transition=new i.A(t.timeline),this.onViewStateChange=t.onViewStateChange||o,this.onStateChange=t.onStateChange||o}finalize(){this.transition.cancel()}getViewportInTransition(){return this.propsInTransition}processViewStateChange(t){let e=!1;const n=this.props;if(this.props=t,!n||this._shouldIgnoreViewportChange(n,t))return!1;if(this._isTransitionEnabled(t)){let r=n;if(this.transition.inProgress){const{interruption:t,endProps:e}=this.transition.settings;r={...n,...t===s.SNAP_TO_END?e:this.propsInTransition||n}}this._triggerTransition(r,t),e=!0}else this.transition.cancel();return e}updateTransition(){this.transition.update()}_isTransitionEnabled(t){const{transitionDuration:e,transitionInterpolator:n}=t;return(e>0||"auto"===e)&&Boolean(n)}_isUpdateDueToCurrentTransition(t){return!(!this.transition.inProgress||!this.propsInTransition)&&this.transition.settings.interpolator.arePropsEqual(t,this.propsInTransition)}_shouldIgnoreViewportChange(t,e){return this.transition.inProgress?this.transition.settings.interruption===s.IGNORE||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e)}_triggerTransition(t,e){const n=this.getControllerState(t),r=this.getControllerState(e).shortestPathFrom(n),i=e.transitionInterpolator,o=i.getDuration?i.getDuration(t,e):e.transitionDuration;if(0===o)return;const s=i.initializeProps(t,r);this.propsInTransition={};const l={duration:o,easing:e.transitionEasing||a,interpolator:i,interruption:e.transitionInterruption||u,startProps:s.start,endProps:s.end,onStart:e.onTransitionStart,onUpdate:this._onTransitionUpdate,onInterrupt:this._onTransitionEnd(e.onTransitionInterrupt),onEnd:this._onTransitionEnd(e.onTransitionEnd)};this.transition.start(l),this.onStateChange({inTransition:!0}),this.updateTransition()}_onTransitionEnd(t){return e=>{this.propsInTransition=null,this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1}),null==t||t(e)}}}},54539:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawPolygonByDraggingMode=void 0;var r,i=(r=n(53871))&&r.__esModule?r:{default:r},o=n(71169);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}
2function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}var A=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(f,t);var e,n,r,A=(r=f,function(){var t,e=c(r);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=c(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?l(t):e}(this,t)});function f(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(t,e){e in t?Object.defineProperty(t,e,{value:null,enumerable:!0,configurable:!0,writable:!0}):t[e]=null}(l(t=A.call.apply(A,[this].concat(n))),"handleDraggingThrottled"),t}return e=f,(n=[{key:"handleClick",value:function(t,e){}},{key:"handleStartDragging",value:function(t,e){t.cancelPan(),e.modeConfig&&e.modeConfig.throttleMs?this.handleDraggingThrottled=(0,i.default)(this.handleDraggingAux,e.modeConfig.throttleMs):this.handleDraggingThrottled=this.handleDraggingAux}},{key:"handleStopDragging",value:function(t,e){this.addClickSequence(t);var n,r=this.getClickSequence();if(this.handleDraggingThrottled&&this.handleDraggingThrottled.cancel&&this.handleDraggingThrottled.cancel(),r.length>2){var i={type:"Polygon",coordinates:[[].concat((n=r,function(t){if(Array.isArray(t))return a(t)}(n)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[r[0]])]};this.resetClickSequence();var o=this.getAddFeatureOrBooleanPolygonAction(i,e);o&&e.onEdit(o)}}},{key:"handleDraggingAux",value:function(t,e){var n=t.picks;(0,o.getPickedEditHandle)(n)||this.addClickSequence(t)}},{key:"handleDragging",value:function(t,e){this.handleDraggingThrottled&&this.handleDraggingThrottled(t,e)}}])&&u(e.prototype,n),f}(n(61607).DrawPolygonMode);e.DrawPolygonByDraggingMode=A},55387:(t,e,n)=>{"use strict";var r=n(51913)(),i=n(14607)("Object.prototype.toString"),o=function(t){return!(r&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},s=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"length"in t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"callee"in t&&"[object Function]"===i(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=a?o:s},55553:function(t,e,n){var r;!function(){"use strict";var i,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,a=Math.floor,u="[BigNumber Error] ",l=u+"Number primitive has more than 15 significant digits: ",c=1e14,h=14,A=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,p=1e9;function g(t){var e=0|t;return t>0||t===e?e:e-1}function m(t){for(var e,n,r=1,i=t.length,o=t[0]+"";r<i;){for(e=t[r++]+"",n=h-e.length;n--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function y(t,e){var n,r,i=t.c,o=e.c,s=t.s,a=e.s,u=t.e,l=e.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;
vendor: 5,591 bytes, line 2
2if(s!=a)return s;if(n=s<0,r=u==l,!i||!o)return r?0:!i^n?1:-1;if(!r)return u>l^n?1:-1;for(a=(u=i.length)<(l=o.length)?u:l,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return u==l?0:u>l^n?1:-1}function v(t,e,n,r){if(t<e||t>n||t!==a(t))throw Error(u+(r||"Argument")+("number"==typeof t?t<e||t>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function _(t){var e=t.c.length-1;return g(t.e/h)==e&&t.c[e]%2!=0}function b(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function w(t,e,n){var r,i;if(e<0){for(i=n+".";++e;i+=n);t=i+t}else if(++e>(r=t.length)){for(i=n,e-=r;--e;i+=n);t+=i}else e<r&&(t=t.slice(0,e)+"."+t.slice(e));return t}i=function t(e){var n,r,i,E,x,S,T,P,C,M,I=H.prototype={constructor:H,toString:null,valueOf:null},O=new H(1),R=20,L=4,B=-7,k=21,N=-1e7,F=1e7,D=!1,j=1,U=0,G={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},z="0123456789abcdefghijklmnopqrstuvwxyz",V=!0;function H(t,e){var n,s,u,c,f,d,p,g,m=this;if(!(m instanceof H))return new H(t,e);if(null==e){if(t&&!0===t._isBigNumber)return m.s=t.s,void(!t.c||t.e>F?m.c=m.e=null:t.e<N?m.c=[m.e=0]:(m.e=t.e,m.c=t.c.slice()));if((d="number"==typeof t)&&0*t==0){if(m.s=1/t<0?(t=-t,-1):1,t===~~t){for(c=0,f=t;f>=10;f/=10,c++);return void(c>F?m.c=m.e=null:(m.e=c,m.c=[t]))}g=String(t)}else{if(!o.test(g=String(t)))return i(m,g,d);m.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(c=g.indexOf("."))>-1&&(g=g.replace(".","")),(f=g.search(/e/i))>0?(c<0&&(c=f),c+=+g.slice(f+1),g=g.substring(0,f)):c<0&&(c=g.length)}else{if(v(e,2,z.length,"Base"),10==e&&V)return Y(m=new H(t),R+m.e+1,L);if(g=String(t),d="number"==typeof t){if(0*t!=0)return i(m,g,d,e);if(m.s=1/t<0?(g=g.slice(1),-1):1,H.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(l+t)}else m.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(n=z.slice(0,e),c=f=0,p=g.length;f<p;f++)if(n.indexOf(s=g.charAt(f))<0){if("."==s){if(f>c){c=p;continue}}else if(!u&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){u=!0,f=-1,c=0;continue}return i(m,String(t),d,e)}d=!1,(c=(g=r(g,e,10,m.s)).indexOf("."))>-1?g=g.replace(".",""):c=g.length}for(f=0;48===g.charCodeAt(f);f++);for(p=g.length;48===g.charCodeAt(--p););if(g=g.slice(f,++p)){if(p-=f,d&&H.DEBUG&&p>15&&(t>A||t!==a(t)))throw Error(l+m.s*t);if((c=c-f-1)>F)m.c=m.e=null;else if(c<N)m.c=[m.e=0];else{if(m.e=c,m.c=[],f=(c+1)%h,c<0&&(f+=h),f<p){for(f&&m.c.push(+g.slice(0,f)),p-=h;f<p;)m.c.push(+g.slice(f,f+=h));f=h-(g=g.slice(f)).length}else f-=p;for(;f--;g+="0");m.c.push(+g)}}else m.c=[m.e=0]}function q(t,e,n,r){var i,o,s,a,u;if(null==n?n=L:v(n,0,8),!t.c)return t.toString();if(i=t.c[0],s=t.e,null==e)u=m(t.c),u=1==r||2==r&&(s<=B||s>=k)?b(u,s):w(u,s,"0");else if(o=(t=Y(new H(t),e,n)).e,a=(u=m(t.c)).length,1==r||2==r&&(e<=o||o<=B)){for(;a<e;u+="0",a++);u=b(u,o)}else if(e-=s+(2===r&&o>s),u=w(u,o,"0"),o+1>a){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-a)>0)for(o+1==a&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function W(t,e){for(var n,r,i=1,o=new H(t[0]);i<t.length;i++)(!(r=new H(t[i])).s||(n=y(o,r))===e||0===n&&o.s===e)&&(o=r);return o}function X(t,e,n){for(var r=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,r++);return(n=r+n*h-1)>F?t.c=t.e=null:n<N?t.c=[t.e=0]:(t.e=n,t.c=e),t}function Y(t,e,n,r){var i,o,u,l,A,d,p,g=t.c,m=f;if(g){t:{for(i=1,l=g[0];l>=10;l/=10,i++);if((o=e-i)<0)o+=h,u=e,A=g[d=0],p=a(A/m[i-u-1]%10);else if((d=s((o+1)/h))>=g.length){if(!r)break t;for(;g.length<=d;g.push(0));A=p=0,i=1,u=(o%=h)-h+1}else{for(A=l=g[d],i=1;l>=10;l/=10,i++);p=(u=(o%=h)-h+i)<0?0:a(A/m[i-u-1]%10)}if(r=r||e<0||null!=g[d+1]||(u<0?A:A%m[i-u-1]),r=n<4?(p||r)&&(0==n||n==(t.s<0?3:2)):p>5||5==p&&(4==n||r||6==n&&(o>0?u>0?A/m[i-u]:0:g[d-1])%10&1||n==(t.s<0?8:7)),e<1||!g[0])return g.length=0,r?(e-=t.e+1,g[0]=m[(h-e%h)%h],t.e=-e||0):g[0]=t.e=0,t;if(0==o?(g.length=d,l=1,d--):(g.length=d+1,l=m[h-o],g[d]=u>0?a(A/m[i-u]%m[u])*l:0),r)for(;;){if(0==d){for(o=1,u=g[0];u>=10;u/=10,o++);for(u=g[0]+=l,l=1;u>=10;u/=10,l++);o!=l&&(t.e++,g[0]==c&&(g[0]=1));break}if(g[d]+=l,g[d]!=c)break;g[d--]=0,l=1}for(o=g.length;0===g[--o];g.pop());}t.e>F?t.c=t.e=null:t.e<N&&(t.c=[t.e=0])}return t}function Q(t){var e,n=t.e;return null===n?t.toString():(e=m(t.c),e=n<=B||n>=k?b(e,n):w(e,n,"0"),t.s<0?"-"+e:e)}return H.clone=t,H.ROUND_UP=0,H.ROUND_DOWN=1,H.ROUND_CEIL=2,H.ROUND_FLOOR=3,H.ROUND_HALF_UP=4,H.ROUND_HALF_DOWN=5,H.ROUND_HALF_EVEN=6,H.ROUND_HALF_CEIL=7,H.ROUND_HALF_FLOOR=8,H.EUCLID=9,H.config=H.set=function(t){var e,n;if(null!=t){if("object"!=typeof t)throw Error(u+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(v(n=t[e],0,p,e),R=n),t.hasOwnProperty(e="ROUNDING_MODE")&&(v(n=t[e],0,8,e),L=n),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((n=t[e])&&n.pop?(v(n[0],-p,0,e),v(n[1],0,p,e),B=n[0],k=n[1]):(v(n,-p,p,e),B=-(k=n<0?-n:n))),t.hasOwnProperty(e="RANGE"))if((n=t[e])&&n.pop)v(n[0],-p,-1,e),v(n[1],1,p,e),N=n[0],F=n[1];else{if(v(n,-p,p,e),!n)throw Error(u+e+" cannot be zero: "+n);N=-(F=n<0?-n:n)}if(t.hasOwnProperty(e="CRYPTO")){if((n=t[e])!==!!n)throw Error(u+e+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw D=!n,Error(u+"crypto unavailable");D=n}else D=n}if(t.hasOwnProperty(e="MODULO_MODE")&&(v(n=t[e],0,9,e),j=n),t.hasOwnProperty(e="POW_PRECISION")&&(v(n=t[e],0,p,e),U=n),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(n=t[e]))throw Error(u+e+" not an object: "+n);G=n}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(n=t[e])||/^.?$|[+\-.\
vendor: 5,951 bytes, line 2
2s]|(.).*\1/.test(n))throw Error(u+e+" invalid: "+n);V="0123456789"==n.slice(0,10),z=n}}return{DECIMAL_PLACES:R,ROUNDING_MODE:L,EXPONENTIAL_AT:[B,k],RANGE:[N,F],CRYPTO:D,MODULO_MODE:j,POW_PRECISION:U,FORMAT:G,ALPHABET:z}},H.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!H.DEBUG)return!0;var e,n,r=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&i>=-p&&i<=p&&i===a(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break t}if((e=(i+1)%h)<1&&(e+=h),String(r[0]).length==e){for(e=0;e<r.length;e++)if((n=r[e])<0||n>=c||n!==a(n))break t;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(u+"Invalid BigNumber: "+t)},H.maximum=H.max=function(){return W(arguments,-1)},H.minimum=H.min=function(){return W(arguments,1)},H.random=(E=9007199254740992,x=Math.random()*E&2097151?function(){return a(Math.random()*E)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,n,r,i,o,l=0,c=[],A=new H(O);if(null==t?t=R:v(t,0,p),i=s(t/h),D)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(i*=2));l<i;)(o=131072*e[l]+(e[l+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),e[l]=n[0],e[l+1]=n[1]):(c.push(o%1e14),l+=2);l=i/2}else{if(!crypto.randomBytes)throw D=!1,Error(u+"crypto unavailable");for(e=crypto.randomBytes(i*=7);l<i;)(o=281474976710656*(31&e[l])+1099511627776*e[l+1]+4294967296*e[l+2]+16777216*e[l+3]+(e[l+4]<<16)+(e[l+5]<<8)+e[l+6])>=9e15?crypto.randomBytes(7).copy(e,l):(c.push(o%1e14),l+=7);l=i/7}if(!D)for(;l<i;)(o=x())<9e15&&(c[l++]=o%1e14);for(i=c[--l],t%=h,i&&t&&(o=f[h-t],c[l]=a(i/o)*o);0===c[l];c.pop(),l--);if(l<0)c=[r=0];else{for(r=-1;0===c[0];c.splice(0,1),r-=h);for(l=1,o=c[0];o>=10;o/=10,l++);l<h&&(r-=h-l)}return A.e=r,A.c=c,A}),H.sum=function(){for(var t=1,e=arguments,n=new H(e[0]);t<e.length;)n=n.plus(e[t++]);return n},r=function(){var t="0123456789";function e(t,e,n,r){for(var i,o,s=[0],a=0,u=t.length;a<u;){for(o=s.length;o--;s[o]*=e);for(s[0]+=r.indexOf(t.charAt(a++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(r,i,o,s,a){var u,l,c,h,A,f,d,p,g=r.indexOf("."),y=R,v=L;for(g>=0&&(h=U,U=0,r=r.replace(".",""),f=(p=new H(i)).pow(r.length-g),U=h,p.c=e(w(m(f.c),f.e,"0"),10,o,t),p.e=p.c.length),c=h=(d=e(r,i,o,a?(u=z,t):(u=t,z))).length;0==d[--h];d.pop());if(!d[0])return u.charAt(0);if(g<0?--c:(f.c=d,f.e=c,f.s=s,d=(f=n(f,p,y,v,o)).c,A=f.r,c=f.e),g=d[l=c+y+1],h=o/2,A=A||l<0||null!=d[l+1],A=v<4?(null!=g||A)&&(0==v||v==(f.s<0?3:2)):g>h||g==h&&(4==v||A||6==v&&1&d[l-1]||v==(f.s<0?8:7)),l<1||!d[0])r=A?w(u.charAt(1),-y,u.charAt(0)):u.charAt(0);else{if(d.length=l,A)for(--o;++d[--l]>o;)d[l]=0,l||(++c,d=[1].concat(d));for(h=d.length;!d[--h];);for(g=0,r="";g<=h;r+=u.charAt(d[g++]));r=w(r,c,u.charAt(0))}return r}}(),n=function(){function t(t,e,n){var r,i,o,s,a=0,u=t.length,l=e%d,c=e/d|0;for(t=t.slice();u--;)a=((i=l*(o=t[u]%d)+(r=c*o+(s=t[u]/d|0)*l)%d*d+a)/n|0)+(r/d|0)+c*s,t[u]=i%n;return a&&(t=[a].concat(t)),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]<e[n]?1:0,t[n]=i*r+t[n]-e[n];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(r,i,o,s,u){var l,A,f,d,p,m,y,v,_,b,w,E,x,S,T,P,C,M=r.s==i.s?1:-1,I=r.c,O=i.c;if(!(I&&I[0]&&O&&O[0]))return new H(r.s&&i.s&&(I?!O||I[0]!=O[0]:O)?I&&0==I[0]||!O?0*M:M/0:NaN);for(_=(v=new H(M)).c=[],M=o+(A=r.e-i.e)+1,u||(u=c,A=g(r.e/h)-g(i.e/h),M=M/h|0),f=0;O[f]==(I[f]||0);f++);if(O[f]>(I[f]||0)&&A--,M<0)_.push(1),d=!0;else{for(S=I.length,P=O.length,f=0,M+=2,(p=a(u/(O[0]+1)))>1&&(O=t(O,p,u),I=t(I,p,u),P=O.length,S=I.length),x=P,w=(b=I.slice(0,P)).length;w<P;b[w++]=0);C=O.slice(),C=[0].concat(C),T=O[0],O[1]>=u/2&&T++;do{if(p=0,(l=e(O,b,P,w))<0){if(E=b[0],P!=w&&(E=E*u+(b[1]||0)),(p=a(E/T))>1)for(p>=u&&(p=u-1),y=(m=t(O,p,u)).length,w=b.length;1==e(m,b,y,w);)p--,n(m,P<y?C:O,y,u),y=m.length,l=1;else 0==p&&(l=p=1),y=(m=O.slice()).length;if(y<w&&(m=[0].concat(m)),n(b,m,w,u),w=b.length,-1==l)for(;e(O,b,P,w)<1;)p++,n(b,P<w?C:O,w,u),w=b.length}else 0===l&&(p++,b=[0]);_[f++]=p,b[0]?b[w++]=I[x]||0:(b=[I[x]],w=1)}while((x++<S||null!=b[0])&&M--);d=null!=b[0],_[0]||_.splice(0,1)}if(u==c){for(f=1,M=_[0];M>=10;M/=10,f++);Y(v,o+(v.e=f+A*h-1)+1,s,d)}else v.e=A,v.r=+d;return v}}(),S=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,P=/^\.([^.]+)$/,C=/^-?(Infinity|NaN)$/,M=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(t,e,n,r){var i,o=n?e:e.replace(M,"");if(C.test(o))t.s=isNaN(o)?null:o<0?-1:1;else{if(!n&&(o=o.replace(S,function(t,e,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?t:e}),r&&(i=r,o=o.replace(T,"$1").replace(P,"0.$1")),e!=o))return new H(o,i);if(H.DEBUG)throw Error(u+"Not a"+(r?" base "+r:"")+" number: "+e);t.s=null}t.c=t.e=null},I.absoluteValue=I.abs=function(){var t=new H(this);return t.s<0&&(t.s=1),t},I.comparedTo=function(t,e){return y(this,new H(t,e))},I.decimalPlaces=I.dp=function(t,e){var n,r,i,o=this;if(null!=t)return v(t,0,p),null==e?e=L:v(e,0,8),Y(new H(o),t+o.e+1,e);if(!(n=o.c))return null;if(r=((i=n.length-1)-g(this.e/h))*h,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},I.dividedBy=I.div=function(t,e){return n(this,new H(t,e),R,L)},I.dividedToIntegerBy=I.idiv=function(t,e){return n(this,new H(t,e),0,1)},I.exponentiatedBy=I.pow=function(t,e){var n,r,i,o,l,c,A,f,d=this;if((t=new H(t)).c&&!t.isInteger())throw Error(u+"Exponent not an integer: "+Q(t));if(null!=e&&(e=new H(e)),l=t.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!t.c||!t.c[0])return f=new H(Math.pow(+Q(d),l?t.s*(2-_(t)):+Q(t))),e?f.mod(e):f;if(c=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new H(NaN);(r=!c&&d.isInteger()&&e.isInteger())&&(d=d.mod(e))}else{if(t.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||l&&d.c[1]>=24e7:d.c[0]<8e13||l&&d.c[0]<=9999975e7)))return o=d.s<0&&_(t)?-0:0,d.e>-1&&(o=1/o),new H(c?1/o:o);U&&(o=s(U/h+2))}
vendor: 5,966 bytes, line 2
2for(l?(n=new H(.5),c&&(t.s=1),A=_(t)):A=(i=Math.abs(+Q(t)))%2,f=new H(O);;){if(A){if(!(f=f.times(d)).c)break;o?f.c.length>o&&(f.c.length=o):r&&(f=f.mod(e))}if(i){if(0===(i=a(i/2)))break;A=i%2}else if(Y(t=t.times(n),t.e+1,1),t.e>14)A=_(t);else{if(0===(i=+Q(t)))break;A=i%2}d=d.times(d),o?d.c&&d.c.length>o&&(d.c.length=o):r&&(d=d.mod(e))}return r?f:(c&&(f=O.div(f)),e?f.mod(e):o?Y(f,U,L,void 0):f)},I.integerValue=function(t){var e=new H(this);return null==t?t=L:v(t,0,8),Y(e,e.e+1,t)},I.isEqualTo=I.eq=function(t,e){return 0===y(this,new H(t,e))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(t,e){return y(this,new H(t,e))>0},I.isGreaterThanOrEqualTo=I.gte=function(t,e){return 1===(e=y(this,new H(t,e)))||0===e},I.isInteger=function(){return!!this.c&&g(this.e/h)>this.c.length-2},I.isLessThan=I.lt=function(t,e){return y(this,new H(t,e))<0},I.isLessThanOrEqualTo=I.lte=function(t,e){return-1===(e=y(this,new H(t,e)))||0===e},I.isNaN=function(){return!this.s},I.isNegative=function(){return this.s<0},I.isPositive=function(){return this.s>0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.minus=function(t,e){var n,r,i,o,s=this,a=s.s;if(e=(t=new H(t,e)).s,!a||!e)return new H(NaN);if(a!=e)return t.s=-e,s.plus(t);var u=s.e/h,l=t.e/h,A=s.c,f=t.c;if(!u||!l){if(!A||!f)return A?(t.s=-e,t):new H(f?s:NaN);if(!A[0]||!f[0])return f[0]?(t.s=-e,t):new H(A[0]?s:3==L?-0:0)}if(u=g(u),l=g(l),A=A.slice(),a=u-l){for((o=a<0)?(a=-a,i=A):(l=u,i=f),i.reverse(),e=a;e--;i.push(0));i.reverse()}else for(r=(o=(a=A.length)<(e=f.length))?a:e,a=e=0;e<r;e++)if(A[e]!=f[e]){o=A[e]<f[e];break}if(o&&(i=A,A=f,f=i,t.s=-t.s),(e=(r=f.length)-(n=A.length))>0)for(;e--;A[n++]=0);for(e=c-1;r>a;){if(A[--r]<f[r]){for(n=r;n&&!A[--n];A[n]=e);--A[n],A[r]+=c}A[r]-=f[r]}for(;0==A[0];A.splice(0,1),--l);return A[0]?X(t,A,l):(t.s=3==L?-1:1,t.c=[t.e=0],t)},I.modulo=I.mod=function(t,e){var r,i,o=this;return t=new H(t,e),!o.c||!t.s||t.c&&!t.c[0]?new H(NaN):!t.c||o.c&&!o.c[0]?new H(o):(9==j?(i=t.s,t.s=1,r=n(o,t,0,3),t.s=i,r.s*=i):r=n(o,t,0,j),(t=o.minus(r.times(t))).c[0]||1!=j||(t.s=o.s),t)},I.multipliedBy=I.times=function(t,e){var n,r,i,o,s,a,u,l,A,f,p,m,y,v,_,b=this,w=b.c,E=(t=new H(t,e)).c;if(!(w&&E&&w[0]&&E[0]))return!b.s||!t.s||w&&!w[0]&&!E||E&&!E[0]&&!w?t.c=t.e=t.s=null:(t.s*=b.s,w&&E?(t.c=[0],t.e=0):t.c=t.e=null),t;for(r=g(b.e/h)+g(t.e/h),t.s*=b.s,(u=w.length)<(f=E.length)&&(y=w,w=E,E=y,i=u,u=f,f=i),i=u+f,y=[];i--;y.push(0));for(v=c,_=d,i=f;--i>=0;){for(n=0,p=E[i]%_,m=E[i]/_|0,o=i+(s=u);o>i;)n=((l=p*(l=w[--s]%_)+(a=m*l+(A=w[s]/_|0)*p)%_*_+y[o]+n)/v|0)+(a/_|0)+m*A,y[o--]=l%v;y[o]=n}return n?++r:y.splice(0,1),X(t,y,r)},I.negated=function(){var t=new H(this);return t.s=-t.s||null,t},I.plus=function(t,e){var n,r=this,i=r.s;if(e=(t=new H(t,e)).s,!i||!e)return new H(NaN);if(i!=e)return t.s=-e,r.minus(t);var o=r.e/h,s=t.e/h,a=r.c,u=t.c;if(!o||!s){if(!a||!u)return new H(i/0);if(!a[0]||!u[0])return u[0]?t:new H(a[0]?r:0*i)}if(o=g(o),s=g(s),a=a.slice(),i=o-s){for(i>0?(s=o,n=u):(i=-i,n=a),n.reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(e=u.length)<0&&(n=u,u=a,a=n,e=i),i=0;e;)i=(a[--e]=a[e]+u[e]+i)/c|0,a[e]=c===a[e]?0:a[e]%c;return i&&(a=[i].concat(a),++s),X(t,a,s)},I.precision=I.sd=function(t,e){var n,r,i,o=this;if(null!=t&&t!==!!t)return v(t,1,p),null==e?e=L:v(e,0,8),Y(new H(o),t,e);if(!(n=o.c))return null;if(r=(i=n.length-1)*h+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return t&&o.e+1>r&&(r=o.e+1),r},I.shiftedBy=function(t){return v(t,-9007199254740991,A),this.times("1e"+t)},I.squareRoot=I.sqrt=function(){var t,e,r,i,o,s=this,a=s.c,u=s.s,l=s.e,c=R+4,h=new H("0.5");if(1!==u||!a||!a[0])return new H(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+Q(s)))||u==1/0?(((e=m(a)).length+l)%2==0&&(e+="0"),u=Math.sqrt(+e),l=g((l+1)/2)-(l<0||l%2),r=new H(e=u==1/0?"5e"+l:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+l)):r=new H(u+""),r.c[0])for((u=(l=r.e)+c)<3&&(u=0);;)if(o=r,r=h.times(o.plus(n(s,o,c,1))),m(o.c).slice(0,u)===(e=m(r.c)).slice(0,u)){if(r.e<l&&--u,"9999"!=(e=e.slice(u-3,u+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(Y(r,r.e+R+2,1),t=!r.times(r).eq(s));break}if(!i&&(Y(o,o.e+R+2,0),o.times(o).eq(s))){r=o;break}c+=4,u+=4,i=1}return Y(r,r.e+R+1,L,t)},I.toExponential=function(t,e){return null!=t&&(v(t,0,p),t++),q(this,t,e,1)},I.toFixed=function(t,e){return null!=t&&(v(t,0,p),t=t+this.e+1),q(this,t,e)},I.toFormat=function(t,e,n){var r,i=this;if(null==n)null!=t&&e&&"object"==typeof e?(n=e,e=null):t&&"object"==typeof t?(n=t,t=e=null):n=G;else if("object"!=typeof n)throw Error(u+"Argument not an object: "+n);if(r=i.toFixed(t,e),i.c){var o,s=r.split("."),a=+n.groupSize,l=+n.secondaryGroupSize,c=n.groupSeparator||"",h=s[0],A=s[1],f=i.s<0,d=f?h.slice(1):h,p=d.length;if(l&&(o=a,a=l,l=o,p-=o),a>0&&p>0){for(o=p%a||a,h=d.substr(0,o);o<p;o+=a)h+=c+d.substr(o,a);l>0&&(h+=c+d.slice(o)),f&&(h="-"+h)}r=A?h+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?A.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):A):h}return(n.prefix||"")+r+(n.suffix||"")},I.toFraction=function(t){var e,r,i,o,s,a,l,c,A,d,p,g,y=this,v=y.c;if(null!=t&&(!(l=new H(t)).isInteger()&&(l.c||1!==l.s)||l.lt(O)))throw Error(u+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+Q(l));if(!v)return new H(y);for(e=new H(O),A=r=new H(O),i=c=new H(O),g=m(v),s=e.e=g.length-y.e-1,e.c[0]=f[(a=s%h)<0?h+a:a],t=!t||l.comparedTo(e)>0?s>0?e:A:l,a=F,F=1/0,l=new H(g),c.c[0]=0;d=n(l,e,0,1),1!=(o=r.plus(d.times(i))).comparedTo(t);)r=i,i=o,A=c.plus(d.times(o=A)),c=o,e=l.minus(d.times(o=e)),l=o;return o=n(t.minus(r),i,0,1),c=c.plus(o.times(A)),r=r.plus(o.times(i)),c.s=A.s=y.s,p=n(A,i,s*=2,L).minus(y).abs().comparedTo(n(c,r,s,L).minus(y).abs())<1?[A,i]:[c,r],F=a,p},I.toNumber=function(){return+Q(this)},I.toPrecision=function(t,e){return null!=t&&v(t,1,p),q(this,t,e,2)},I.toString=function(t){var e,n=this,i=n.s,o=n.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=B||o>
2=k?b(m(n.c),o):w(m(n.c),o,"0"):10===t&&V?e=w(m((n=Y(new H(n),R+o+1,L)).c),n.e,"0"):(v(t,2,z.length,"Base"),e=r(w(m(n.c),o,"0"),10,t,i,!0)),i<0&&n.c[0]&&(e="-"+e)),e},I.valueOf=I.toJSON=function(){return Q(this)},I._isBigNumber=!0,null!=e&&H.set(e),H}(),i.default=i.BigNumber=i,void 0===(r=function(){return i}.call(e,n,e,t))||(t.exports=r)}()},55808:(t,e,n)=>{"use strict";var r,i=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,u=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(t,e,n,r)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let i of a(e))l.call(t,i)||i===n||o(t,i,{get:()=>e[i],enumerable:!(r=s(e,i))||r.enumerable});return t},h=(t,e,n)=>(n=null!=t?i(u(t)):{},c(!e&&t&&t.__esModule?n:o(n,"default",{value:t,enumerable:!0}),t)),A={};((t,e)=>{for(var n in e)o(t,n,{get:e[n],enumerable:!0})})(A,{difference:()=>Q,intersection:()=>X,setPrecision:()=>J,union:()=>W,xor:()=>Y}),t.exports=(r=A,c(o({},"__esModule",{value:!0}),r));var f=h(n(55553),1),d=t=>()=>t,p=t=>{const e=t?(e,n)=>n.minus(e).abs().isLessThanOrEqualTo(t):d(!1);return(t,n)=>e(t,n)?0:t.comparedTo(n)};function g(t){const e=t?(e,n,r,i,o)=>e.exponentiatedBy(2).isLessThanOrEqualTo(i.minus(n).exponentiatedBy(2).plus(o.minus(r).exponentiatedBy(2)).times(t)):d(!1);return(t,n,r)=>{const i=t.x,o=t.y,s=r.x,a=r.y,u=o.minus(a).times(n.x.minus(s)).minus(i.minus(s).times(n.y.minus(a)));return e(u,i,o,s,a)?0:u.comparedTo(0)}}var m=h(n(55553),1),y=n(97599),v=t=>t,_=t=>{if(t){const e=new y.SplayTreeSet(p(t)),n=new y.SplayTreeSet(p(t)),r=(t,e)=>e.addAndReturn(t),i=t=>({x:r(t.x,e),y:r(t.y,n)});return i({x:new m.default(0),y:new m.default(0)}),i}return v},b=t=>({set:t=>{w=b(t)},reset:()=>b(t),compare:p(t),snap:_(t),orient:g(t)}),w=b(),E=(t,e)=>t.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(t.ur.x)&&t.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(t.ur.y),x=(t,e)=>{if(e.ur.x.isLessThan(t.ll.x)||t.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(t.ll.y)||t.ur.y.isLessThan(e.ll.y))return null;const n=t.ll.x.isLessThan(e.ll.x)?e.ll.x:t.ll.x,r=t.ur.x.isLessThan(e.ur.x)?t.ur.x:e.ur.x;return{ll:{x:n,y:t.ll.y.isLessThan(e.ll.y)?e.ll.y:t.ll.y},ur:{x:r,y:t.ur.y.isLessThan(e.ur.y)?t.ur.y:e.ur.y}}},S=n(97599),T=(t,e)=>t.x.times(e.y).minus(t.y.times(e.x)),P=(t,e)=>t.x.times(e.x).plus(t.y.times(e.y)),C=t=>P(t,t).sqrt(),M=(t,e,n)=>{const r={x:e.x.minus(t.x),y:e.y.minus(t.y)},i={x:n.x.minus(t.x),y:n.y.minus(t.y)};return T(i,r).div(C(i)).div(C(r))},I=(t,e,n)=>{const r={x:e.x.minus(t.x),y:e.y.minus(t.y)},i={x:n.x.minus(t.x),y:n.y.minus(t.y)};return P(i,r).div(C(i)).div(C(r))},O=(t,e,n)=>e.y.isZero()?null:{x:t.x.plus(e.x.div(e.y).times(n.minus(t.y))),y:n},R=(t,e,n)=>e.x.isZero()?null:{x:n,y:t.y.plus(e.y.div(e.x).times(n.minus(t.x)))},L=class t{point;isLeft;segment;otherSE;consumedBy;static compare(e,n){const r=t.comparePoints(e.point,n.point);return 0!==r?r:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:z.compare(e.segment,n.segment))}static comparePoints(t,e){return t.x.isLessThan(e.x)?-1:t.x.isGreaterThan(e.x)?1:t.y.isLessThan(e.y)?-1:t.y.isGreaterThan(e.y)?1:0}constructor(t,e){void 0===t.events?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let t=0,n=e.length;t<n;t++){const n=e[t];this.point.events.push(n),n.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const n=this.point.events[e];if(void 0===n.segment.consumedBy)for(let r=e+1;r<t;r++){const t=this.point.events[r];void 0===t.consumedBy&&n.otherSE.point.events===t.otherSE.point.events&&n.segment.consume(t.segment)}}}getAvailableLinkedEvents(){const t=[];for(let e=0,n=this.point.events.length;e<n;e++){const n=this.point.events[e];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&t.push(n)}return t}getLeftmostComparator(t){const e=new Map,n=n=>{const r=n.otherSE;e.set(n,{sine:M(this.point,t.point,r.point),cosine:I(this.point,t.point,r.point)})};return(t,r)=>{e.has(t)||n(t),e.has(r)||n(r);const{sine:i,cosine:o}=e.get(t),{sine:s,cosine:a}=e.get(r);return i.isGreaterThanOrEqualTo(0)&&s.isGreaterThanOrEqualTo(0)?o.isLessThan(a)?1:o.isGreaterThan(a)?-1:0:i.isLessThan(0)&&s.isLessThan(0)?o.isLessThan(a)?-1:o.isGreaterThan(a)?1:0:s.isLessThan(i)?-1:s.isGreaterThan(i)?1:0}}},B=class t{events;poly;_isExteriorRing;_enclosingRing;static factory(e){const n=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];if(!i.isInResult()||i.ringOut)continue;let o=null,s=i.leftSE,a=i.rightSE;const u=[s],l=s.point,c=[];for(;o=s,s=a,u.push(s),s.point!==l;)for(;;){const e=s.getAvailableLinkedEvents();if(0===e.length){const t=u[0].point,e=u[u.length-1].point;throw new Error(`Unable to complete output ring starting at [${t.x}, ${t.y}]. Last matching segment found ends at [${e.x}, ${e.y}].`)}if(1===e.length){a=e[0].otherSE;break}let r=null;for(let t=0,e=c.length;t<e;t++)if(c[t].point===s.point){r=t;break}if(null!==r){const e=c.splice(r)[0],i=u.splice(e.index);i.unshift(i[0].otherSE),n.push(new t(i.reverse()));continue}c.push({index:u.length,point:s.point});const i=s.getLeftmostComparator(o);a=e.sort(i)[0].otherSE;break}n.push(new t(u))}return n}constructor(t){this.events=t;for(let e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let n=1,r=this.events.length-1;n<r;n++){const r=this.events[n].point,i=this.events[n+1].point;0!==w.orient(r,t,i)&&(e.push(r),t=r)}if(1===e.length)return null;const n=e[0],r=e[1];0===w.orient(n,t,r)&&e.shift(),e.push(e[0]);const i=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,s=this.isExteriorRing()?e.length:-1,a=[];for(let t=o;t!=s;t+=i)a.push([e[t].x.toNumber(),e[t].y.toNumber()]);return a}isExteriorRing(){if(void 0===this._isExteriorRing){const t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}enclosingRing(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let e=1,n=this.events.length;e<n;e++){const n=this.events[e];L.compare(t,n)>0&&(t=n)}let e=t.segment.prevInResult(),n=e?e.prevInResult():null;for(;;){if(!e)return null;if(!n)return e.ringOut;if(n.ringOut!==e.ringOut)return n.ringOut?.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut?.enclosingRing();e=n.prevInResult(),n=e?e.prevInResult():null}}},k=class{exteriorRing;interiorRings;constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=this.exteriorRing.getGeom();if(null===t)return null;const e=[t];for(let t=0,n=this.interiorRings.length;t<n;t++){const n=this.interiorRings[t].getGeom();null!==n&&e.push(n)}return e}},N=class{rings;polys;constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const n=this.polys[e].getGeom();null!==n&&t.push(n)}return t}_composePolys(t){const e=[];for(let n=0,r=t.length;n<r;n++){const r=t[n];if(!r.poly)if(r.isExteriorRing())e.push(new k(r));else{const t=r.enclosingRing();t?.poly||e.push(new k(t)),t?.poly?.addInterior(r)}}return e}}
vendor: 7,863 bytes, line 2
2,F=n(97599),D=class{queue;tree;segments;constructor(t,e=z.compare){this.queue=t,this.tree=new F.SplayTreeSet(e),this.segments=[]}process(t){const e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.delete(t.otherSE):this.tree.delete(e),n;t.isLeft&&this.tree.add(e);let r=e,i=e;do{r=this.tree.lastBefore(r)}while(null!=r&&null!=r.consumedBy);do{i=this.tree.firstAfter(i)}while(null!=i&&null!=i.consumedBy);if(t.isLeft){let o=null;if(r){const t=r.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(o=t),!r.isAnEndpoint(t))){const e=this._splitSafely(r,t);for(let t=0,r=e.length;t<r;t++)n.push(e[t])}}let s=null;if(i){const t=i.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(s=t),!i.isAnEndpoint(t))){const e=this._splitSafely(i,t);for(let t=0,r=e.length;t<r;t++)n.push(e[t])}}if(null!==o||null!==s){let t=null;t=null===o?s:null===s||L.comparePoints(o,s)<=0?o:s,this.queue.delete(e.rightSE),n.push(e.rightSE);const r=e.split(t);for(let t=0,e=r.length;t<e;t++)n.push(r[t])}n.length>0?(this.tree.delete(e),n.push(t)):(this.segments.push(e),e.prev=r)}else{if(r&&i){const t=r.getIntersection(i);if(null!==t){if(!r.isAnEndpoint(t)){const e=this._splitSafely(r,t);for(let t=0,r=e.length;t<r;t++)n.push(e[t])}if(!i.isAnEndpoint(t)){const e=this._splitSafely(i,t);for(let t=0,r=e.length;t<r;t++)n.push(e[t])}}}this.tree.delete(e)}return n}_splitSafely(t,e){this.tree.delete(t);const n=t.rightSE;this.queue.delete(n);const r=t.split(e);return r.push(n),void 0===t.consumedBy&&this.tree.add(t),r}},j=new class{type;numMultiPolys;run(t,e,n){j.type=t;const r=[new q(e,!0)];for(let t=0,e=n.length;t<e;t++)r.push(new q(n[t],!1));if(j.numMultiPolys=r.length,"difference"===j.type){const t=r[0];let e=1;for(;e<r.length;)null!==x(r[e].bbox,t.bbox)?e++:r.splice(e,1)}if("intersection"===j.type)for(let t=0,e=r.length;t<e;t++){const e=r[t];for(let n=t+1,i=r.length;n<i;n++)if(null===x(e.bbox,r[n].bbox))return[]}const i=new S.SplayTreeSet(L.compare);for(let t=0,e=r.length;t<e;t++){const e=r[t].getSweepEvents();for(let t=0,n=e.length;t<n;t++)i.add(e[t])}const o=new D(i);let s=null;for(0!=i.size&&(s=i.first(),i.delete(s));s;){const t=o.process(s);for(let e=0,n=t.length;e<n;e++){const n=t[e];void 0===n.consumedBy&&i.add(n)}0!=i.size?(s=i.first(),i.delete(s)):s=null}w.reset();const a=B.factory(o.segments);return new N(a).getGeom()}},U=j,G=0,z=class t{id;leftSE;rightSE;rings;windings;ringOut;consumedBy;prev;_prevInResult;_beforeState;_afterState;_isInResult;static compare(t,e){const n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(o.isLessThan(n))return 1;if(i.isLessThan(r))return-1;const s=t.leftSE.point.y,a=e.leftSE.point.y,u=t.rightSE.point.y,l=e.rightSE.point.y;if(n.isLessThan(r)){if(a.isLessThan(s)&&a.isLessThan(u))return 1;if(a.isGreaterThan(s)&&a.isGreaterThan(u))return-1;const n=t.comparePoint(e.leftSE.point);if(n<0)return 1;if(n>0)return-1;const r=e.comparePoint(t.rightSE.point);return 0!==r?r:-1}if(n.isGreaterThan(r)){if(s.isLessThan(a)&&s.isLessThan(l))return-1;if(s.isGreaterThan(a)&&s.isGreaterThan(l))return 1;const n=e.comparePoint(t.leftSE.point);if(0!==n)return n;const r=t.comparePoint(e.rightSE.point);return r<0?1:r>0?-1:1}if(s.isLessThan(a))return-1;if(s.isGreaterThan(a))return 1;if(i.isLessThan(o)){const n=e.comparePoint(t.rightSE.point);if(0!==n)return n}if(i.isGreaterThan(o)){const n=t.comparePoint(e.rightSE.point);if(n<0)return 1;if(n>0)return-1}if(!i.eq(o)){const t=u.minus(s),e=i.minus(n),c=l.minus(a),h=o.minus(r);if(t.isGreaterThan(e)&&c.isLessThan(h))return 1;if(t.isLessThan(e)&&c.isGreaterThan(h))return-1}return i.isGreaterThan(o)?1:i.isLessThan(o)||u.isLessThan(l)?-1:u.isGreaterThan(l)?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,n,r){this.id=++G,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=r}static fromRing(e,n,r){let i,o,s;const a=L.comparePoints(e,n);if(a<0)i=e,o=n,s=1;else{if(!(a>0))throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);i=n,o=e,s=-1}const u=new L(i,!0),l=new L(o,!1);return new t(u,l,[r],[s])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t.isLessThan(e)?t:e},ur:{x:this.rightSE.point.x,y:t.isGreaterThan(e)?t:e}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(t){return t.x.eq(this.leftSE.point.x)&&t.y.eq(this.leftSE.point.y)||t.x.eq(this.rightSE.point.x)&&t.y.eq(this.rightSE.point.y)}comparePoint(t){return w.orient(this.leftSE.point,t,this.rightSE.point)}getIntersection(t){const e=this.bbox(),n=t.bbox(),r=x(e,n);if(null===r)return null;const i=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,u=E(e,s)&&0===this.comparePoint(s),l=E(n,i)&&0===t.comparePoint(i),c=E(e,a)&&0===this.comparePoint(a),h=E(n,o)&&0===t.comparePoint(o);if(l&&u)return h&&!c?o:!h&&c?a:null;if(l)return c&&i.x.eq(a.x)&&i.y.eq(a.y)?null:i;if(u)return h&&o.x.eq(s.x)&&o.y.eq(s.y)?null:s;if(h&&c)return null;if(h)return o;if(c)return a;const A=((t,e,n,r)=>{if(e.x.isZero())return R(n,r,t.x);if(r.x.isZero())return R(t,e,n.x);if(e.y.isZero())return O(n,r,t.y);if(r.y.isZero())return O(t,e,n.y);const i=T(e,r);if(i.isZero())return null;const o={x:n.x.minus(t.x),y:n.y.minus(t.y)},s=T(o,e).div(i),a=T(o,r).div(i),u=t.x.plus(a.times(e.x)),l=n.x.plus(s.times(r.x)),c=t.y.plus(a.times(e.y)),h=n.y.plus(s.times(r.y));return{x:u.plus(l).div(2),y:c.plus(h).div(2)}})(i,this.vector(),s,t.vector());return null===A?null:E(r,A)?w.snap(A):null}split(e){const n=[],r=void 0!==e.events,i=new L(e,!0),o=new L(e,!1),s=this.rightSE;this.replaceRightSE(o),n.push(o),n.push(i);const a=new t(i,s,this.rings.slice(),this.windings.slice());return L.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),L.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),o.checkForConsuming()),n}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,e=this.windings.length;t<e;t++)this.windings[t]*=-1}consume(e){let n=this,r=e;for(;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;const i=t.compare(n,r);if(0!==i){if(i>0){const t=n;n=r,r=t}if(n.prev===r){const t=n;n=r,r=t}for(let t=0,e=r.rings.length;t<e;t++){const e=r.rings[t],i=r.windings[t],o=n.rings.indexOf(e);-1===o?(n.rings.push(e),n.windings.push(i)):n.windings[o]+=i}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}prevInResult(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}beforeState(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){const t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}afterState(){if(void 0!==this._afterState)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys;for(let t=0,r=this.rings.length;t<r;t++){const r=this.rings[t],i=this.windings[t],o=e.indexOf(r);-1===o?(e.push(r),n.push(i)):n[o]+=i}const i=[],o=[];for(let t=0,r=e.length;t<r;t++){if(0===n[t])continue;const r=e[t],s=r.poly;if(-1===o.indexOf(s))if(r.isExterior)i.push(s);else{-1===o.indexOf(s)&&o.push(s);const t=i.indexOf(r.poly);-1!==t&&i.splice(t,1)}}for(let t=0,e=i.length;t<e;t++){const e=i[t].multiPoly;-1===r.indexOf(e)&&r.push(e)}return this._afterState}
2isInResult(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(U.type){case"union":{const n=0===t.length,r=0===e.length;this._isInResult=n!==r;break}case"intersection":{let n,r;t.length<e.length?(n=t.length,r=e.length):(n=e.length,r=t.length),this._isInResult=r===U.numMultiPolys&&n<r;break}case"xor":{const n=Math.abs(t.length-e.length);this._isInResult=n%2==1;break}case"difference":{const n=t=>1===t.length&&t[0].isSubject;this._isInResult=n(t)!==n(e);break}}return this._isInResult}},V=class{poly;isExterior;segments;bbox;constructor(t,e,n){if(!Array.isArray(t)||0===t.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],"number"!=typeof t[0][0]||"number"!=typeof t[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const r=w.snap({x:new f.default(t[0][0]),y:new f.default(t[0][1])});this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};let i=r;for(let e=1,n=t.length;e<n;e++){if("number"!=typeof t[e][0]||"number"!=typeof t[e][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const n=w.snap({x:new f.default(t[e][0]),y:new f.default(t[e][1])});n.x.eq(i.x)&&n.y.eq(i.y)||(this.segments.push(z.fromRing(i,n,this)),n.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.x),n.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.y),n.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.x),n.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.y),i=n)}r.x.eq(i.x)&&r.y.eq(i.y)||this.segments.push(z.fromRing(i,r,this))}getSweepEvents(){const t=[];for(let e=0,n=this.segments.length;e<n;e++){const n=this.segments[e];t.push(n.leftSE),t.push(n.rightSE)}return t}},H=class{multiPoly;exteriorRing;interiorRings;bbox;constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new V(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let e=1,n=t.length;e<n;e++){const n=new V(t[e],this,!1);n.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.bbox.ur.y),this.interiorRings.push(n)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,n=this.interiorRings.length;e<n;e++){const n=this.interiorRings[e].getSweepEvents();for(let e=0,r=n.length;e<r;e++)t.push(n[e])}return t}},q=class{isSubject;polys;bbox;constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof t[0][0][0]&&(t=[t])}catch(t){}this.polys=[],this.bbox={ll:{x:new f.default(Number.POSITIVE_INFINITY),y:new f.default(Number.POSITIVE_INFINITY)},ur:{x:new f.default(Number.NEGATIVE_INFINITY),y:new f.default(Number.NEGATIVE_INFINITY)}};for(let e=0,n=t.length;e<n;e++){const n=new H(t[e],this);n.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.bbox.ur.y),this.polys.push(n)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const n=this.polys[e].getSweepEvents();for(let e=0,r=n.length;e<r;e++)t.push(n[e])}return t}},W=(t,...e)=>U.run("union",t,e),X=(t,...e)=>U.run("intersection",t,e),Y=(t,...e)=>U.run("xor",t,e),Q=(t,...e)=>U.run("difference",t,e),J=w.set},55858:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(57414),i=n(44776);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
2e%2?s(Object(n),!0).forEach(function(e){h(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var A=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(h,t);var e,n,r,s=(r=h,function(){var t,e=l(r);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function h(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),s.apply(this,arguments)}return e=h,(n=[{key:"renderLayers",value:function(){var t=this.props,e=t.id,n=t.getFillColor,r=t.getStrokeColor,o=t.getInnerRadius,s=t.updateTriggers;return[new i.ScatterplotLayer(a({},this.props,{id:"".concat(e,"-full"),data:this.props.data,getLineColor:r,updateTriggers:a({},s,{getStrokeColor:s.getStrokeColor})})),new i.ScatterplotLayer(a({},this.props,{id:"".concat(e,"-inner"),data:this.props.data,getFillColor:n,getRadius:o,pickable:!1,updateTriggers:a({},s,{getFillColor:s.getFillColor,getRadius:s.getInnerRadius})}))]}}])&&u(e.prototype,n),h}(r.CompositeLayer);e.default=A,h(A,"layerName","JunctionScatterplotLayer"),h(A,"defaultProps",a({},i.ScatterplotLayer.defaultProps,{getFillColor:function(t){return[0,0,0,255]},getStrokeColor:function(t){return[255,255,255,255]},getInnerRadius:function(t){return 1}}))},55890:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var r=n(44454),i=n(14061),o=n(82073),s=n(94939),a=n(2592),u=n(4746);const l="Resource subclass must define virtual methods";class c{get[Symbol.toStringTag](){return"Resource"}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.tj)(t);const{id:n,userData:i={}}=e;this.gl=t,this.gl2=t,this.id=n||(0,a.Ld)(this[Symbol.toStringTag]),this.userData=i,this._bound=!1,this._handle=e.handle,void 0===this._handle&&(this._handle=this._createHandle()),this.byteLength=0,this._addStats()}toString(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")}get handle(){return this._handle}delete(){let{deleteChildren:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=this._handle&&this._deleteHandle(this._handle);return this._handle&&this._removeStats(),this._handle=null,e&&t&&e.filter(Boolean).forEach(t=>t.delete()),this}bind(){let t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.handle;return"function"!=typeof e?(this._bindHandle(e),this):(this._bound?t=e():(this._bindHandle(this.handle),this._bound=!0,t=e(),this._bound=!1,this._bindHandle(null)),t)}unbind(){this.bind(null)}getParameter(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=(0,o.fm)(this.gl,t),(0,s.v)(t);const n=(this.constructor.PARAMETERS||{})[t];if(n){const t=(0,r.C6)(this.gl);if("webgl2"in n&&!t||"extension"in n&&!this.gl.getExtension(n.extension)){const e=n.webgl1,r="webgl2"in n?n.webgl2:n.webgl1;return t?r:e}}return this._getParameter(t,e)}getParameters(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{parameters:e,keys:n}=t,i=this.constructor.PARAMETERS||{},s=(0,r.C6)(this.gl),a={}
2,u=e||Object.keys(i);for(const e of u){const r=i[e];if(r&&(!("webgl2"in r)||s)&&(!("extension"in r)||this.gl.getExtension(r.extension))){const i=n?(0,o.i7)(this.gl,e):e;a[i]=this.getParameter(e,t),n&&"GLenum"===r.type&&(a[i]=(0,o.i7)(this.gl,a[i]))}}return a}setParameter(t,e){t=(0,o.fm)(this.gl,t),(0,s.v)(t);const n=(this.constructor.PARAMETERS||{})[t];if(n){const t=(0,r.C6)(this.gl);if("webgl2"in n&&!t||"extension"in n&&!this.gl.getExtension(n.extension))throw new Error("Parameter not available on this platform");"GLenum"===n.type&&(e=(0,o.fm)(e))}return this._setParameter(t,e),this}setParameters(t){for(const e in t)this.setParameter(e,t[e]);return this}stubRemovedMethods(t,e,n){return(0,u.R)(this,t,e,n)}initialize(t){}_createHandle(){throw new Error(l)}_deleteHandle(){throw new Error(l)}_bindHandle(t){throw new Error(l)}_getOptsFromHandle(){throw new Error(l)}_getParameter(t,e){throw new Error(l)}_setParameter(t,e){throw new Error(l)}_context(){return this.gl.luma=this.gl.luma||{},this.gl.luma}_addStats(){const t=this[Symbol.toStringTag],e=i.dJ.get("Resource Counts");e.get("Resources Created").incrementCount(),e.get("".concat(t,"s Created")).incrementCount(),e.get("".concat(t,"s Active")).incrementCount()}_removeStats(){const t=this[Symbol.toStringTag];i.dJ.get("Resource Counts").get("".concat(t,"s Active")).decrementCount()}_trackAllocatedMemory(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag];this._trackAllocatedMemoryForContext(t,e),this._trackAllocatedMemoryForContext(t,e,this.gl.canvas&&this.gl.canvas.id),this.byteLength=t}_trackAllocatedMemoryForContext(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=i.dJ.get("Memory Usage".concat(n));r.get("GPU Memory").addCount(t),r.get("".concat(e," Memory")).addCount(t)}_trackDeallocatedMemory(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag];this._trackDeallocatedMemoryForContext(t),this._trackDeallocatedMemoryForContext(t,this.gl.canvas&&this.gl.canvas.id),this.byteLength=0}_trackDeallocatedMemoryForContext(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=i.dJ.get("Memory Usage".concat(e));n.get("GPU Memory").subtractCount(this.byteLength),n.get("".concat(t," Memory")).subtractCount(this.byteLength)}}},55968:(t,e,n)=>{"use strict";var r=n(41857),i=n(28498),o=n(82372),s=n(61937),a=n(85087),u=i(s(),Object);r(u,{getPolyfill:s,implementation:o,shim:a}),t.exports=u},56159:(t,e,n)=>{"use strict";n.d(e,{O_:()=>s,Qt:()=>h,Ay:()=>c});var r=n(40829),i=n(89666);const o={[r.T]:"#ifdef MODULE_LOGDEPTH\n logdepth_adjustPosition(gl_Position);\n#endif\n",[r.B]:"#ifdef MODULE_MATERIAL\n gl_FragColor = material_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LIGHTING\n gl_FragColor = lighting_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_FOG\n gl_FragColor = fog_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_PICKING\n gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n gl_FragColor = picking_filterPickingColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LOGDEPTH\n logdepth_setFragDepth();\n#endif\n"},s="__LUMA_INJECT_DECLARATIONS__",a=/void\s+main\s*\([^)]*\)\s*\{\n?/,u=/}\n?[^{}]*$/,l=[];function c(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const c=e===r.T;for(const e in n){const r=n[e];r.sort((t,e)=>t.order-e.order),l.length=r.length;for(let t=0,e=r.length;t<e;++t)l[t]=r[t].injection;const i="".concat(l.join("\n"),"\n");switch(e){case"vs:#decl":c&&(t=t.replace(s,i));break;case"vs:#main-start":c&&(t=t.replace(a,t=>t+i));break;case"vs:#main-end":c&&(t=t.replace(u,t=>i+t));break;case"fs:#decl":c||(t=t.replace(s,i));break;case"fs:#main-start":c||(t=t.replace(a,t=>t+i));break;case"fs:#main-end":c||(t=t.replace(u,t=>i+t));break;default:t=t.replace(e,t=>t+i)}}return t=t.replace(s,""),i&&(t=t.replace(/\}\s*$/,t=>t+o[e])),t}function h(t){const e={};return(0,i.A)(Array.isArray(t)&&t.length>1),t.forEach(t=>{for(const n in t)e[n]=e[n]?"".concat(e[n],"\n").concat(t[n]):t[n]}),e}},56227:(t,e,n)=>{"use strict";var r=n(28498),i=n(14607),o=n(528)("%ArrayBuffer%",!0),s=i("ArrayBuffer.prototype.byteLength",!0),a=i("Object.prototype.toString"),u=!!o&&!s&&new o(0).slice,l=!!u&&r(u);t.exports=s||l?function(t){if(!t||"object"!=typeof t)return!1;try{return s?s(t):l(t,0),!0}catch(t){return!1}}:o?function(t){return"[object ArrayBuffer]"===a(t)}:function(t){return!1}},56815:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},57401:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(24586),i=n(32968),o=n(35423),s=n(463),a=n(63564);class u{constructor(t){(0,r.A)(this,"opts",void 0),(0,r.A)(this,"typedArrayManager",void 0),(0,r.A)(this,"indexStarts",[0]),(0,r.A)(this,"vertexStarts",[0]),(0,r.A)(this,"vertexCount",0),(0,r.A)(this,"instanceCount",0),(0,r.A)(this,"attributes",void 0),(0,r.A)(this,"_attributeDefs",void 0),(0,r.A)(this,"data",void 0),(0,r.A)(this,"getGeometry",void 0),(0,r.A)(this,"geometryBuffer",void 0),(0,r.A)(this,"buffers",void 0),(0,r.A)(this,"positionSize",void 0),(0,r.A)(this,"normalize",void 0);const{attributes:e={}}=t;this.typedArrayManager=o.A,this.attributes={},this._attributeDefs=e,this.opts=t,this.updateGeometry(t)}updateGeometry(t){Object.assign(this.opts,t);const{data:e,buffers:n={},getGeometry:r,geometryBuffer:i,positionFormat:o,dataChanged:a,normalize:u=!0}=this.opts;if(this.data=e,this.getGeometry=r,this.positionSize=i&&i.size||("XY"===o?2:3),this.buffers=n,this.normalize=u,i&&((0,s.A)(e.startIndices),this.getGeometry=this.getGeometryFromBuffer(i),u||(n.positions=i)),this.geometryBuffer=n.positions,Array.isArray(a))for(const t of a)this._rebuildGeometry(t);else this._rebuildGeometry()}updatePartialGeometry({startRow:t,endRow:e}){this._rebuildGeometry({startRow:t,endRow:e})}getGeometryFromBuffer(t){const e=t.value||t;return ArrayBuffer.isView(e)?(0,i.I)(e,{size:this.positionSize,offset:t.offset,stride:t.stride,startIndices:this.data.startIndices}):null}_allocate(t,e){const{attributes:n,buffers:r,_attributeDefs:i,typedArrayManager:o}=this;for(const s in i)if(s in r)o.release(n[s]),n[s]=null;else{const r=i[s];r.copy=e,n[s]=o.allocate(n[s],t,r)}}_forEachGeometry(t,e,n){const{data:r,getGeometry:o}=this,{iterable:s,objectInfo:a}=(0,i.X)(r,e,n);for(const e of s)a.index++,t(o?o(e,a):null,a.index)}_rebuildGeometry(t){if(!this.data)return;let{indexStarts:e,vertexStarts:n,instanceCount:r}=this;const{data:i,geometryBuffer:o}=this,{startRow:s=0,endRow:u=1/0}=t||{},l={};
2if(t||(e=[0],n=[0]),this.normalize||!o)this._forEachGeometry((t,e)=>{const r=t&&this.normalizeGeometry(t);l[e]=r,n[e+1]=n[e]+(r?this.getGeometrySize(r):0)},s,u),r=n[n.length-1];else if(n=i.startIndices,r=n[i.length]||0,ArrayBuffer.isView(o))r=r||o.length/this.positionSize;else if(o instanceof a.A){const t=o.accessor.stride||4*this.positionSize;r=r||o.byteLength/t}else if(o.buffer){const t=o.stride||4*this.positionSize;r=r||o.buffer.byteLength/t}else if(o.value){const t=o.value,e=o.stride/t.BYTES_PER_ELEMENT||this.positionSize;r=r||t.length/e}this._allocate(r,Boolean(t)),this.indexStarts=e,this.vertexStarts=n,this.instanceCount=r;const c={};this._forEachGeometry((t,i)=>{const o=l[i]||t;c.vertexStart=n[i],c.indexStart=e[i];const s=i<n.length-1?n[i+1]:r;c.geometrySize=s-n[i],c.geometryIndex=i,this.updateGeometryAttributes(o,c)},s,u),this.vertexCount=e[e.length-1]}}},57414:(t,e,n)=>{"use strict";n.r(e),n.d(e,{AmbientLight:()=>s.$,AttributeManager:()=>U.A,COORDINATE_SYSTEM:()=>i.rf,CompositeLayer:()=>z.A,Controller:()=>At.A,Deck:()=>D.A,DeckRenderer:()=>V.A,DirectionalLight:()=>a.Z,FirstPersonController:()=>yt,FirstPersonView:()=>vt,FirstPersonViewport:()=>it,FlyToInterpolator:()=>kt,Layer:()=>G.A,LayerExtension:()=>It.A,LayerManager:()=>j.A,LightingEffect:()=>o.A,LinearInterpolator:()=>pt.A,MapController:()=>Tt.A,MapView:()=>ht.A,OPERATION:()=>i.qR,OrbitController:()=>bt,OrbitView:()=>wt,OrbitViewport:()=>Z,OrthographicController:()=>xt,OrthographicView:()=>St,OrthographicViewport:()=>nt,PointLight:()=>p,PostProcessEffect:()=>R,TRANSITION_EVENTS:()=>Ot.w,Tesselator:()=>jt.A,TransitionInterpolator:()=>Rt.A,UNIT:()=>i.p5,VERSION:()=>r.x,View:()=>ct.A,Viewport:()=>H.A,WebMercatorViewport:()=>q.A,_CameraLight:()=>m,_GlobeController:()=>Ct,_GlobeView:()=>Mt,_GlobeViewport:()=>W.A,_LayersPass:()=>N.A,_PickLayersPass:()=>F.A,_SunLight:()=>S,_compareProps:()=>qt.Me,_count:()=>Gt.U,_deepEqual:()=>zt.b,_fillArray:()=>Ut.R,_flatten:()=>Ut.B,_memoize:()=>Vt.A,_mergeShaders:()=>Ht.n,assert:()=>Ft.A,createIterable:()=>Dt.X,fp64LowPart:()=>dt.qk,gouraudLighting:()=>ut.K,log:()=>Nt.A,phongLighting:()=>ut.p,picking:()=>ot.A,project:()=>st.A,project32:()=>at.A,shadow:()=>lt.A});var r=n(43168),i=n(93314),o=n(46680),s=n(40162),a=n(25198),u=n(24586),l=n(85039);const c=[255,255,255],h=1,A=[0,0,1],f=[0,0,1];let d=0;class p{constructor(t={}){(0,u.A)(this,"id",void 0),(0,u.A)(this,"color",void 0),(0,u.A)(this,"intensity",void 0),(0,u.A)(this,"type","point"),(0,u.A)(this,"position",void 0),(0,u.A)(this,"attenuation",void 0),(0,u.A)(this,"projectedLight",void 0);const{color:e=c}=t,{intensity:n=h}=t,{position:r=f}=t;this.id=t.id||"point-".concat(d++),this.color=e,this.intensity=n,this.type="point",this.position=r,this.attenuation=function(t){return t.attenuation?t.attenuation:"intensity"in t?[0,0,t.intensity||0]:A}(t),this.projectedLight={...this}}getProjectedLight({layer:t}){const{projectedLight:e}=this,n=t.context.viewport,{coordinateSystem:r,coordinateOrigin:o}=t.props,s=(0,l.R)(this.position,{viewport:n,coordinateSystem:r,coordinateOrigin:o,fromCoordinateSystem:n.isGeospatial?i.rf.LNGLAT:i.rf.CARTESIAN,fromCoordinateOrigin:[0,0,0]});return e.color=this.color,e.intensity=this.intensity,e.position=s,e}}var g=n(92154);class m extends p{getProjectedLight({layer:t}){const{projectedLight:e}=this,n=t.context.viewport,{coordinateSystem:r,coordinateOrigin:i,modelMatrix:o}=t.props,{project_uCameraPosition:s}=(0,g.a)({viewport:n,modelMatrix:o,coordinateSystem:r,coordinateOrigin:i});return e.color=this.color,e.intensity=this.intensity,e.position=s,e}}const y=Math.PI/180,v=23.4397*y;function _(t,e,n){const{azimuth:r,altitude:i}=function(t,e,n){const r=y*-n,i=y*e,o=function(t){return function(t){return("number"==typeof t?t:t.getTime())/864e5-.5+2440588}(t)-2451545}(t),s=function(t){const e=function(t){const e=t;return e+y*(1.9148*Math.sin(e)+.02*Math.sin(2*e)+3e-4*Math.sin(3*e))+102.9372*y+Math.PI}(y*(357.5291+.98560028*t));return{declination:w(e,0),rightAscension:b(e,0)}}(o),a=function(t,e){return y*(280.147+360.9856235*t)-e}(o,r)-s.rightAscension;return{azimuth:E(a,i,s.declination),altitude:x(a,i,s.declination)}}(t,e,n);return[Math.sin(r)*Math.cos(i),Math.cos(r)*Math.cos(i),-Math.sin(i)]}function b(t,e){const n=t;return Math.atan2(Math.sin(n)*Math.cos(v)-Math.tan(e)*Math.sin(v),Math.cos(n))}function w(t,e){const n=t;return Math.asin(Math.sin(e)*Math.cos(v)+Math.cos(e)*Math.sin(v)*Math.sin(n))}function E(t,e,n){const r=t,i=e,o=n;return Math.atan2(Math.sin(r),Math.cos(r)*Math.sin(i)-Math.tan(o)*Math.cos(i))}function x(t,e,n){const r=t,i=e,o=n;return Math.asin(Math.sin(i)*Math.sin(o)+Math.cos(i)*Math.cos(o)*Math.cos(r))}class S extends a.Z{constructor(t){super(t),(0,u.A)(this,"timestamp",void 0),this.timestamp=t.timestamp}getProjectedLight({layer:t}){const{viewport:e}=t.context;if(e.resolution&&e.resolution>0){const[t,e,n]=_(this.timestamp,0,0);this.direction=[t,-n,e]}else{const{latitude:t,longitude:n}=e;this.direction=_(this.timestamp,t,n)}return this}}var T=n(87277),P=n(44454),C=n(86849),M=n(53320);class I extends M.A{constructor(t,e){super(t,e),(0,u.A)(this,"model",void 0);const{module:n,fs:r,id:i}=e;this.model=new T.A(t,{id:i,fs:r,modules:[n]})}render(t){const e=this.gl;(0,P.Rz)(e,{viewport:[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}),(0,P.zv)(e,{framebuffer:t.outputBuffer,clearColor:[0,0,0,0]},()=>this._renderPass(e,t))}delete(){this.model.delete(),this.model=null}_renderPass(t,e){const{inputBuffer:n}=e;(0,C.I)(t,{color:!0}),this.model.draw({moduleSettings:e.moduleSettings,uniforms:{texture:n,texSize:[n.width,n.height]},parameters:{depthWrite:!1,depthTest:!1}})}}var O=n(5514);class R{constructor(t,e={}){(0,u.A)(this,"id",void 0),(0,u.A)(this,"props",void 0),(0,u.A)(this,"module",void 0),(0,u.A)(this,"passes",void 0),this.id="".concat(t.name,"-pass"),this.props=e,(0,O.b)(t),this.module=t}setProps(t){this.props=t}preRender(){}postRender(t,e){const n=this.passes||function(t,e,n){if(!e.passes){const r=k(e);return[new I(t,{id:n,module:e,fs:r})]}return e.passes.map((r,i)=>{const o=k(e,r),s="".concat(n,"-").concat(i);return new I(t,{id:s,module:e,fs:o})})}(t,this.module,this.id);this.passes=n;const{target:r}=e;let i=e.inputBuffer,o=e.swapBuffer;for(let t=0;t<this.passes.length;t++){r&&t===this.passes.length-1&&(o=r),this.passes[t].render({inputBuffer:i,outputBuffer:o,moduleSettings:this.props});const e=o;o=i,i=e}return i}cleanup(){if(this.passes){for(const t of this.passes)t.delete();this.passes=void 0}}}const L=t=>"uniform sampler2D texture;\nuniform vec2 texSize;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main() {\n vec2 texCoord = coordinate;\n\n gl_FragColor = texture2D(texture, texCoord);\n gl_FragColor = ".concat(t,"(gl_FragColor, texSize, texCoord);\n}\n"),B=t=>"uniform sampler2D texture;\nuniform vec2 texSize;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main() {\n vec2 texCoord = coordinate;\n\n gl_FragColor = ".concat(t,"(texture, texSize, texCoord);\n}\n");function k(t,e=t){if(e.filter){const n="string"==typeof e.filter?e.filter:"".concat(t.name,"_filterColor");return L(n)}if(e.sampler){const n="string"==typeof e.sampler?e.sampler:"".concat(t.name,"_sampleColor");return B(n)}return null}var N=n(8473),F=n(15985),D=n(22424),j=n(95823),U=n(81011),G=n(99608),z=n(5424),V=n(45202),H=n(1285),q=n(80458),W=n(15293),X=n(9946),Y=n(84075);const Q=Math.PI/180;function J({height:t,focalDistance:e,orbitAxis:n,rotationX:r,rotationOrbit:i,zoom:o}){const s="Z"===n?[0,0,1]:[0,1,0],a="Z"===n?[0,-e,0]:[0,0,e],u=(new X.A).lookAt({eye:a,up:s});u.rotateX(r*Q),"Z"===n?u.rotateZ(i*Q):u.rotateY(i*Q);const l=Math.pow(2,o)/t;return u.scale(l),u}class Z extends H.A{constructor(t){const{height:e,projectionMatrix:n,fovy:r=50,orbitAxis:i="Z",target:o=[0,0,0],rotationX:s=0,rotationOrbit:a=0,zoom:l=0}=t,c=n?n[5]/2:(0,Y.wZ)(r);super({...t,longitude:void 0,viewMatrix:J({height:e||1,focalDistance:c,orbitAxis:i,rotationX:s,rotationOrbit:a,zoom:l}),fovy:r,focalDistance:c,position:o,zoom:l}),(0,u.A)(this,"projectedCenter",void 0),this.projectedCenter=this.project(this.center)}unproject(t,{topLeft:e=!0}={}){const[n,r,i=this.projectedCenter[2]]=t,o=e?r:this.height-r,[s,a,u]=(0,Y.xJ)([n,o,i],this.pixelUnprojectionMatrix);return[s,a,u]}panByPosition(t,e){const n=this.project(t),r=[this.width/2+n[0]-e[0],this.height/2+n[1]-e[1],this.projectedCenter[2]];return{target:this.unproject(r)}}}var K=n(34081),$=n(90333);const tt=(new X.A).lookAt({eye:[0,0,1]});function et({width:t,height:e,near:n,far:r,padding:i}){let o=-t/2,s=t/2,a=-e/2,u=e/2;if(i){const{left:n=0,right:r=0,top:l=0,bottom:c=0}=i,h=(0,K.qE)((n+t-r)/2,0,t)-t/2,A=(0,K.qE)((l+e-c)/2,0,e)-e/2;o-=h,s-=h,a+=A,u+=A}return(new X.A).ortho({left:o,right:s,bottom:a,top:u,near:n,far:r})}class nt extends H.A{constructor(t){const{width:e,height:n,near:r=.1,far:i=1e3,zoom:o=0,target:s=[0,0,0],padding:a=null,flipY:u=!0}=t,l=Array.isArray(o)?o[0]:o,c=Array.isArray(o)?o[1]:o,h=Math.min(l,c),A=Math.pow(2,h);let f;if(l!==c){const t=Math.pow(2,l),e=Math.pow(2,c);f={unitsPerMeter:[t/A,e/A,1],metersPerUnit:[A/t,A/e,1]}}super({...t,longitude:void 0,position:s,viewMatrix:tt.clone().scale([A,A*(u?-1:1),A]),projectionMatrix:et({width:e||1,height:n||1,padding:a,near:r,far:i}),zoom:h,distanceScales:f})}projectFlat([t,e]){const{unitsPerMeter:n}
2=this.distanceScales;return[t*n[0],e*n[1]]}unprojectFlat([t,e]){const{metersPerUnit:n}=this.distanceScales;return[t*n[0],e*n[1]]}panByPosition(t,e){const n=(0,Y.xJ)(e,this.pixelUnprojectionMatrix),r=this.projectFlat(t),i=$.WQ([],r,$.ze([],n)),o=$.WQ([],this.center,i);return{target:this.unprojectFlat(o)}}}var rt=n(73748);class it extends H.A{constructor(t){const{longitude:e,latitude:n,modelMatrix:r,bearing:i=0,pitch:o=0,up:s=[0,0,1]}=t,a=new rt.A({bearing:i,pitch:-90===o?1e-4:90+o}).toVector3().normalize(),l=r?new X.A(r).transformAsVector(a):a,c=Number.isFinite(n)?(0,Y.fO)({latitude:n}):0,h=Math.pow(2,c),A=(new X.A).lookAt({eye:[0,0,0],center:l,up:s}).scale(h);super({...t,zoom:c,viewMatrix:A}),(0,u.A)(this,"longitude",void 0),(0,u.A)(this,"latitude",void 0),this.latitude=n,this.longitude=e}}var ot=n(10707),st=n(85679),at=n(27371),ut=n(79669),lt=n(62593),ct=n(668),ht=n(72380),At=n(39025),ft=n(22296),dt=n(86655),pt=n(47857),gt=n(60033);class mt extends ft.A{constructor(t){const{width:e,height:n,position:r=[0,0,0],bearing:i=0,pitch:o=0,longitude:s=null,latitude:a=null,maxPitch:u=90,minPitch:l=-90,startRotatePos:c,startBearing:h,startPitch:A,startZoomPosition:f}=t;super({width:e,height:n,position:r,bearing:i,pitch:o,longitude:s,latitude:a,maxPitch:u,minPitch:l},{startRotatePos:c,startBearing:h,startPitch:A,startZoomPosition:f})}panStart(){return this}pan(){return this}panEnd(){return this}rotateStart({pos:t}){return this._getUpdatedState({startRotatePos:t,startBearing:this.getViewportProps().bearing,startPitch:this.getViewportProps().pitch})}rotate({pos:t,deltaAngleX:e=0,deltaAngleY:n=0}){const{startRotatePos:r,startBearing:i,startPitch:o}=this.getState(),{width:s,height:a}=this.getViewportProps();if(!r||void 0===i||void 0===o)return this;let u;return u=t?{bearing:i-(t[0]-r[0])/s*180,pitch:o-(t[1]-r[1])/a*90}:{bearing:i-e,pitch:o-n},this._getUpdatedState(u)}rotateEnd(){return this._getUpdatedState({startRotatePos:null,startBearing:null,startPitch:null})}zoomStart(){return this._getUpdatedState({startZoomPosition:this.getViewportProps().position})}zoom({scale:t}){let{startZoomPosition:e}=this.getState();e||(e=this.getViewportProps().position);const n=this.getDirection();return this._move(n,20*Math.log2(t),e)}zoomEnd(){return this._getUpdatedState({startZoomPosition:null})}moveLeft(t=20){const e=this.getDirection(!0);return this._move(e.rotateZ({radians:Math.PI/2}),t)}moveRight(t=20){const e=this.getDirection(!0);return this._move(e.rotateZ({radians:-Math.PI/2}),t)}moveUp(t=20){const e=this.getDirection(!0);return this._move(e,t)}moveDown(t=20){const e=this.getDirection(!0);return this._move(e.negate(),t)}rotateLeft(t=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing-t})}rotateRight(t=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing+t})}rotateUp(t=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch+t})}rotateDown(t=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch-t})}zoomIn(t=2){return this.zoom({scale:t})}zoomOut(t=2){return this.zoom({scale:1/t})}shortestPathFrom(t){const e=t.getViewportProps(),n={...this.getViewportProps()},{bearing:r,longitude:i}=n;return Math.abs(r-e.bearing)>180&&(n.bearing=r<0?r+360:r-360),null!==i&&null!==e.longitude&&Math.abs(i-e.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}_move(t,e,n=this.getViewportProps().position){const r=t.scale(e);return this._getUpdatedState({position:new gt.A(n).add(r)})}getDirection(t=!1){return new rt.A({bearing:this.getViewportProps().bearing,pitch:t?90:90+this.getViewportProps().pitch}).toVector3().normalize()}_getUpdatedState(t){return new mt({...this.getViewportProps(),...this.getState(),...t})}applyConstraints(t){const{pitch:e,maxPitch:n,minPitch:r,longitude:i,bearing:o}=t;return t.pitch=(0,K.qE)(e,r,n),null!==i&&(i<-180||i>180)&&(t.longitude=(0,dt.zi)(i+180,360)-180),(o<-180||o>180)&&(t.bearing=(0,dt.zi)(o+180,360)-180),t}}class yt extends At.A{constructor(...t){super(...t),(0,u.A)(this,"ControllerState",mt),(0,u.A)(this,"transition",{transitionDuration:300,transitionInterpolator:new pt.A(["position","pitch","bearing"])})}}class vt extends ct.A{get ViewportType(){return it}get ControllerType(){return yt}}(0,u.A)(vt,"displayName","FirstPersonView");class _t extends ft.A{constructor(t){const{width:e,height:n,rotationX:r=0,rotationOrbit:i=0,target:o=[0,0,0],zoom:s=0,minRotationX:a=-90,maxRotationX:l=90,minZoom:c=-1/0,maxZoom:h=1/0,startPanPosition:A,startRotatePos:f,startRotationX:d,startRotationOrbit:p,startZoomPosition:g,startZoom:m}=t;super({width:e,height:n,rotationX:r,rotationOrbit:i,target:o,zoom:s,minRotationX:a,maxRotationX:l,minZoom:c,maxZoom:h},{startPanPosition:A,startRotatePos:f,startRotationX:d,startRotationOrbit:p,startZoomPosition:g,startZoom:m}),(0,u.A)(this,"makeViewport",void 0),this.makeViewport=t.makeViewport}panStart({pos:t}
2){return this._getUpdatedState({startPanPosition:this._unproject(t)})}pan({pos:t,startPosition:e}){const n=this.getState().startPanPosition||e;if(!n)return this;const r=this.makeViewport(this.getViewportProps()).panByPosition(n,t);return this._getUpdatedState(r)}panEnd(){return this._getUpdatedState({startPanPosition:null})}rotateStart({pos:t}){return this._getUpdatedState({startRotatePos:t,startRotationX:this.getViewportProps().rotationX,startRotationOrbit:this.getViewportProps().rotationOrbit})}rotate({pos:t,deltaAngleX:e=0,deltaAngleY:n=0}){const{startRotatePos:r,startRotationX:i,startRotationOrbit:o}=this.getState(),{width:s,height:a}=this.getViewportProps();if(!r||void 0===i||void 0===o)return this;let u;if(t){let e=(t[0]-r[0])/s;(i<-90||i>90)&&(e*=-1),u={rotationX:i+(t[1]-r[1])/a*180,rotationOrbit:o+180*e}}else u={rotationX:i+n,rotationOrbit:o+e};return this._getUpdatedState(u)}rotateEnd(){return this._getUpdatedState({startRotationX:null,startRotationOrbit:null})}shortestPathFrom(t){const e=t.getViewportProps(),n={...this.getViewportProps()},{rotationOrbit:r}=n;return Math.abs(r-e.rotationOrbit)>180&&(n.rotationOrbit=r<0?r+360:r-360),n}zoomStart({pos:t}){return this._getUpdatedState({startZoomPosition:this._unproject(t),startZoom:this.getViewportProps().zoom})}zoom({pos:t,startPos:e,scale:n}){let{startZoom:r,startZoomPosition:i}=this.getState();if(i||(r=this.getViewportProps().zoom,i=this._unproject(e)||this._unproject(t)),!i)return this;const o=this._calculateNewZoom({scale:n,startZoom:r}),s=this.makeViewport({...this.getViewportProps(),zoom:o});return this._getUpdatedState({zoom:o,...s.panByPosition(i,t)})}zoomEnd(){return this._getUpdatedState({startZoomPosition:null,startZoom:null})}zoomIn(t=2){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:t})})}zoomOut(t=2){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:1/t})})}moveLeft(t=50){return this._panFromCenter([-t,0])}moveRight(t=50){return this._panFromCenter([t,0])}moveUp(t=50){return this._panFromCenter([0,-t])}moveDown(t=50){return this._panFromCenter([0,t])}rotateLeft(t=15){return this._getUpdatedState({rotationOrbit:this.getViewportProps().rotationOrbit-t})}rotateRight(t=15){return this._getUpdatedState({rotationOrbit:this.getViewportProps().rotationOrbit+t})}rotateUp(t=10){return this._getUpdatedState({rotationX:this.getViewportProps().rotationX-t})}rotateDown(t=10){return this._getUpdatedState({rotationX:this.getViewportProps().rotationX+t})}_unproject(t){const e=this.makeViewport(this.getViewportProps());return t&&e.unproject(t)}_calculateNewZoom({scale:t,startZoom:e}){const{maxZoom:n,minZoom:r}=this.getViewportProps();void 0===e&&(e=this.getViewportProps().zoom);const i=e+Math.log2(t);return(0,K.qE)(i,r,n)}_panFromCenter(t){const{width:e,height:n,target:r}=this.getViewportProps();return this.pan({startPosition:r,pos:[e/2+t[0],n/2+t[1]]})}_getUpdatedState(t){return new this.constructor({makeViewport:this.makeViewport,...this.getViewportProps(),...this.getState(),...t})}applyConstraints(t){const{maxZoom:e,minZoom:n,zoom:r,maxRotationX:i,minRotationX:o,rotationOrbit:s}=t;return t.zoom=Array.isArray(r)?[(0,K.qE)(r[0],n,e),(0,K.qE)(r[1],n,e)]:(0,K.qE)(r,n,e),t.rotationX=(0,K.qE)(t.rotationX,o,i),(s<-180||s>180)&&(t.rotationOrbit=(0,dt.zi)(s+180,360)-180),t}}class bt extends At.A{constructor(...t){super(...t),(0,u.A)(this,"ControllerState",_t),(0,u.A)(this,"transition",{transitionDuration:300,transitionInterpolator:new pt.A({transitionProps:{compare:["target","zoom","rotationX","rotationOrbit"],required:["target","zoom"]}})})}}class wt extends ct.A{constructor(t={}){super(t),this.props.orbitAxis=t.orbitAxis||"Z"}get ViewportType(){return Z}get ControllerType(){return bt}}(0,u.A)(wt,"displayName","OrbitView");class Et extends _t{constructor(t){super(t),(0,u.A)(this,"zoomAxis",void 0),this.zoomAxis=t.zoomAxis||"all"}_calculateNewZoom({scale:t,startZoom:e}){const{maxZoom:n,minZoom:r}=this.getViewportProps();void 0===e&&(e=this.getViewportProps().zoom);let i=Math.log2(t);if(Array.isArray(e)){let[t,o]=e;switch(this.zoomAxis){case"X":t=(0,K.qE)(t+i,r,n);break;case"Y":o=(0,K.qE)(o+i,r,n);break;default:let e=Math.min(t+i,o+i);e<r&&(i+=r-e),e=Math.max(t+i,o+i),e>n&&(i+=n-e),t+=i,o+=i}return[t,o]}return(0,K.qE)(e+i,r,n)}}class xt extends At.A{constructor(...t){super(...t),(0,u.A)(this,"ControllerState",Et),(0,u.A)(this,"transition",{transitionDuration:300,transitionInterpolator:new pt.A(["target","zoom"])}),(0,u.A)(this,"dragMode","pan")}_onPanRotate(){return!1}}class St extends ct.A{get ViewportType(){return nt}get ControllerType(){return xt}}
2(0,u.A)(St,"displayName","OrthographicView");var Tt=n(65104);class Pt extends Tt.y{applyConstraints(t){const{maxZoom:e,minZoom:n,zoom:r}=t;t.zoom=(0,K.qE)(r,n,e);const{longitude:i,latitude:o}=t;return(i<-180||i>180)&&(t.longitude=(0,dt.zi)(i+180,360)-180),t.latitude=(0,K.qE)(o,-89,89),t}}class Ct extends At.A{constructor(...t){super(...t),(0,u.A)(this,"ControllerState",Pt),(0,u.A)(this,"transition",{transitionDuration:300,transitionInterpolator:new pt.A(["longitude","latitude","zoom"])}),(0,u.A)(this,"dragMode","pan")}setProps(t){super.setProps(t),this.dragRotate=!1,this.touchRotate=!1}}class Mt extends ct.A{get ViewportType(){return W.A}get ControllerType(){return Ct}}(0,u.A)(Mt,"displayName","GlobeView");var It=n(31938),Ot=n(54116),Rt=n(29063);const Lt={bearing:0,pitch:0,position:[0,0,0]},Bt={speed:1.2,curve:1.414};class kt extends Rt.A{constructor(t={}){super({compare:["longitude","latitude","zoom","bearing","pitch","position"],extract:["width","height","longitude","latitude","zoom","bearing","pitch","position"],required:["width","height","latitude","longitude","zoom"]}),(0,u.A)(this,"opts",void 0),this.opts={...Bt,...t}}interpolateProps(t,e,n){const r=(0,Y.rj)(t,e,n,this.opts);for(const i in Lt)r[i]=(0,K.Cc)(t[i]||Lt[i],e[i]||Lt[i],n);return r}getDuration(t,e){let{transitionDuration:n}=e;return"auto"===n&&(n=(0,Y.v7)(t,e,this.opts)),n}}var Nt=n(23615),Ft=n(463),Dt=n(32968),jt=n(57401),Ut=n(5371),Gt=n(42402),zt=n(22398),Vt=n(43405),Ht=n(85016),qt=n(19634)},58827:(t,e,n)=>{"use strict";n.r(e),n.d(e,{AnimationLoop:()=>O.A,Buffer:()=>a.A,ClipSpace:()=>N.A,ConeGeometry:()=>E,CubeGeometry:()=>F.A,CylinderGeometry:()=>x,FEATURES:()=>o.G,FragmentShader:()=>f._Y,Framebuffer:()=>l.A,Geometry:()=>v.A,IcoSphereGeometry:()=>C,Model:()=>R.A,PlaneGeometry:()=>M,Program:()=>u.A,ProgramManager:()=>B.A,Renderbuffer:()=>c.A,SphereGeometry:()=>I,Texture2D:()=>h.A,Texture3D:()=>m.A,TextureCube:()=>A.A,Timeline:()=>k.K,Transform:()=>L.A,TransformFeedback:()=>y.A,TruncatedConeGeometry:()=>w,VertexShader:()=>f.o0,assert:()=>et.v,clear:()=>d.I,cloneTextureFrom:()=>g.j,copyToTexture:()=>p.ob,createGLContext:()=>r.XZ,cssToDevicePixels:()=>r.w8,cssToDeviceRatio:()=>r.o0,dirlight:()=>Q,fp32:()=>Z.i,fp64:()=>z,getParameters:()=>r.bQ,gouraudLighting:()=>$.K,hasFeature:()=>s.jI,hasFeatures:()=>s.QN,instrumentGLContext:()=>r.uZ,isWebGL:()=>r.uF,isWebGL2:()=>r.C6,log:()=>r.Rm,lumaStats:()=>i.dJ,normalizeShaderModule:()=>J.b,pbr:()=>tt.R,phongLighting:()=>$.p,picking:()=>K.q,project:()=>X,readPixelsToArray:()=>p.sy,readPixelsToBuffer:()=>p.fY,resetParameters:()=>r.AB,setParameters:()=>r.Rz,uid:()=>_.Ld,withParameters:()=>r.zv});var r=n(44454),i=n(14061),o=n(46429),s=n(10836),a=n(63564),u=n(5259),l=n(48091),c=n(65758),h=n(79266),A=n(15317),f=n(23363),d=n(86849),p=n(23861),g=n(49282),m=n(3895),y=n(72302),v=n(67069),_=n(2592);const b={x:[2,0,1],y:[0,1,2],z:[1,2,0]};class w extends v.A{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=(0,_.Ld)("truncated-code-geometry")}=t,{indices:n,attributes:r}=function(t){const{bottomRadius:e=0,topRadius:n=0,height:r=1,nradial:i=10,nvertical:o=10,verticalAxis:s="y",topCap:a=!1,bottomCap:u=!1}=t,l=(a?2:0)+(u?2:0),c=(i+1)*(o+1+l),h=Math.atan2(e-n,r),A=Math.sin,f=Math.cos,d=Math.PI,p=f(h),g=A(h),m=a?-2:0,y=o+(u?2:0),v=i+1,_=new Uint16Array(i*(o+l)*6),w=b[s],E=new Float32Array(3*c),x=new Float32Array(3*c),S=new Float32Array(2*c);let T=0,P=0;for(let t=m;t<=y;t++){let s,a=t/o,u=r*a;t<0?(u=0,a=1,s=e):t>o?(u=r,a=1,s=n):s=e+t/o*(n-e),-2!==t&&t!==o+2||(s=0,a=0),u-=r/2;for(let e=0;e<v;e++){const n=A(e*d*2/i),r=f(e*d*2/i);E[T+w[0]]=n*s,E[T+w[1]]=u,E[T+w[2]]=r*s,x[T+w[0]]=t<0||t>o?0:n*p,x[T+w[1]]=t<0?-1:t>o?1:g,x[T+w[2]]=t<0||t>o?0:r*p,S[P+0]=e/i,S[P+1]=a,P+=2,T+=3}}for(let t=0;t<o+l;t++)for(let e=0;e<i;e++){const n=6*(t*i+e);_[n+0]=v*(t+0)+0+e,_[n+1]=v*(t+0)+1+e,_[n+2]=v*(t+1)+1+e,_[n+3]=v*(t+0)+0+e,_[n+4]=v*(t+1)+1+e,_[n+5]=v*(t+1)+0+e}return{indices:_,attributes:{POSITION:{size:3,value:E},NORMAL:{size:3,value:x},TEXCOORD_0:{size:2,value:S}}}}(t);super({...t,id:e,indices:n,attributes:{...r,...t.attributes}})}}class E extends w{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=(0,_.Ld)("cone-geometry"),radius:n=1,cap:r=!0}=t;super({...t,id:e,topRadius:0,topCap:Boolean(r),bottomCap:Boolean(r),bottomRadius:n})}}class x extends w{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=(0,_.Ld)("cylinder-geometry"),radius:n=1}=t;super({...t,id:e,bottomRadius:n,topRadius:n})}}var S=n(60033);const T=[-1,0,0,0,1,0,0,0,-1,0,0,1,0,-1,0,1,0,0],P=[3,4,5,3,5,1,3,1,0,3,0,4,4,0,2,4,2,5,2,0,1,5,2,1];class C extends v.A{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=(0,_.Ld)("ico-sphere-geometry")}=t,{indices:n,attributes:r}=function(t){const{iterations:e=0}=t,n=Math.PI,r=2*n,i=[...T];let o=[...P];i.push(),o.push();const s=(()=>{const t={};return(e,n)=>{const r=(e*=3)>(n*=3)?e:n,o="".concat(e<n?e:n,"|").concat(r);if(o in t)return t[o];const s=i[e],a=i[e+1],u=i[e+2];let l=(s+i[n])/2,c=(a+i[n+1])/2,h=(u+i[n+2])/2;const A=Math.sqrt(l*l+c*c+h*h);return l/=A,c/=A,h/=A,i.push(l,c,h),t[o]=i.length/3-1}})();for(let t=0;t<e;t++){const t=[];for(let e=0;e<o.length;e+=3){const n=s(o[e+0],o[e+1]),r=s(o[e+1],o[e+2]),i=s(o[e+2],o[e+0]);t.push(i,o[e+0],n,n,o[e+1],r,r,o[e+2],i,n,r,i)}o=t}const a=new Array(i.length),u=new Array(i.length/3*2);for(let t=o.length-3;t>=0;t-=3){const e=o[t+0],s=o[t+1],l=o[t+2],c=3*e,h=3*s,A=3*l,f=2*e,d=2*s,p=2*l,g=i[c+0],m=i[c+1],y=i[c+2],v=Math.acos(y/Math.sqrt(g*g+m*m+y*y))/n,_=1-(Math.atan2(m,g)+n)/r,b=i[h+0],w=i[h+1],E=i[h+2],x=Math.acos(E/Math.sqrt(b*b+w*w+E*E))/n,T=1-(Math.atan2(w,b)+n)/r,P=i[A+0],C=i[A+1],M=i[A+2],I=Math.acos(M/Math.sqrt(P*P+C*C+M*M))/n,O=1-(Math.atan2(C,P)+n)/r,R=[P-b,C-w,M-E],L=[g-b,m-w,y-E],B=new S.A(R).cross(L).normalize();let k;(0===_||0===T||0===O)&&(0===_||_>.5)&&(0===T||T>.5)&&(0===O||O>.5)&&(i.push(i[c+0],i[c+1],i[c+2]),k=i.length/3-1,o.push(k),u[2*k+0]=1,u[2*k+1]=v,a[3*k+0]=B.x,a[3*k+1]=B.y,a[3*k+2]=B.z,i.push(i[h+0],i[h+1],i[h+2]),k=i.length/3-1,o.push(k),u[2*k+0]=1,u[2*k+1]=x,a[3*k+0]=B.x,a[3*k+1]=B.y,a[3*k+2]=B.z,i.push(i[A+0],i[A+1],i[A+2]),k=i.length/3-1,o.push(k),u[2*k+0]=1,u[2*k+1]=I,a[3*k+0]=B.x,a[3*k+1]=B.y,a[3*k+2]=B.z),a[c+0]=a[h+0]=a[A+0]=B.x,a[c+1]=a[h+1]=a[A+1]=B.y,a[c+2]=a[h+2]=a[A+2]=B.z,u[f+0]=_,u[f+1]=v,u[d+0]=T,u[d+1]=x,u[p+0]=O,u[p+1]=I}return{indices:{size:1,value:new Uint16Array(o)},attributes:{POSITION:{size:3,value:new Float32Array(i)},NORMAL:{size:3,value:new Float32Array(a)},TEXCOORD_0:{size:2,value:new Float32Array(u)}}}}(t);super({...t,id:e,indices:n,attributes:{...r,...t.attributes}})}}class M extends v.A{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=(0,_.Ld)("plane-geometry")}=t,{indices:n,attributes:r}=function(t){const{type:e="x,y",offset:n=0,flipCull:r=!1,unpack:i=!1}
2=t,o=e.split(",");let s=t["".concat(o[0],"len")]||1;const a=t["".concat(o[1],"len")]||1,u=t["n".concat(o[0])]||1,l=t["n".concat(o[1])]||1,c=(u+1)*(l+1),h=new Float32Array(3*c),A=new Float32Array(3*c),f=new Float32Array(2*c);r&&(s=-s);let d=0,p=0;for(let t=0;t<=l;t++)for(let i=0;i<=u;i++){const o=i/u,c=t/l;switch(f[d+0]=r?1-o:o,f[d+1]=c,e){case"x,y":h[p+0]=s*o-.5*s,h[p+1]=a*c-.5*a,h[p+2]=n,A[p+0]=0,A[p+1]=0,A[p+2]=r?1:-1;break;case"x,z":h[p+0]=s*o-.5*s,h[p+1]=n,h[p+2]=a*c-.5*a,A[p+0]=0,A[p+1]=r?1:-1,A[p+2]=0;break;case"y,z":h[p+0]=n,h[p+1]=s*o-.5*s,h[p+2]=a*c-.5*a,A[p+0]=r?1:-1,A[p+1]=0,A[p+2]=0;break;default:throw new Error("PlaneGeometry: unknown type")}d+=2,p+=3}const g=u+1,m=new Uint16Array(u*l*6);for(let t=0;t<l;t++)for(let e=0;e<u;e++){const n=6*(t*u+e);m[n+0]=(t+0)*g+e,m[n+1]=(t+1)*g+e,m[n+2]=(t+0)*g+e+1,m[n+3]=(t+1)*g+e,m[n+4]=(t+1)*g+e+1,m[n+5]=(t+0)*g+e+1}const y={indices:{size:1,value:m},attributes:{POSITION:{size:3,value:h},NORMAL:{size:3,value:A},TEXCOORD_0:{size:2,value:f}}};return i?function(t){const{indices:e,attributes:n}=t;if(!e)return t;const r=e.value.length,i={};for(const t in n){const o=n[t],{constant:s,value:a,size:u}=o;if(s||!u)continue;const l=new a.constructor(r*u);for(let t=0;t<r;++t){const n=e.value[t];for(let e=0;e<u;e++)l[t*u+e]=a[n*u+e]}i[t]={size:u,value:l}}return{attributes:Object.assign({},n,i)}}(y):y}(t);super({...t,id:e,indices:n,attributes:{...r,...t.attributes}})}}class I extends v.A{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=(0,_.Ld)("sphere-geometry")}=t,{indices:n,attributes:r}=function(t){const{nlat:e=10,nlong:n=10}=t;let{radius:r=1}=t;const i=Math.PI-0,o=2*Math.PI-0,s=(e+1)*(n+1);if("number"==typeof r){const t=r;r=(e,n,r,i,o)=>t}const a=new Float32Array(3*s),u=new Float32Array(3*s),l=new Float32Array(2*s),c=new(s>65535?Uint32Array:Uint16Array)(e*n*6);for(let t=0;t<=e;t++)for(let s=0;s<=n;s++){const c=s/n,h=t/e,A=s+t*(n+1),f=2*A,d=3*A,p=o*c,g=i*h,m=Math.sin(p),y=Math.cos(p),v=Math.sin(g),_=y*v,b=Math.cos(g),w=m*v,E=r(_,b,w,c,h);a[d+0]=E*_,a[d+1]=E*b,a[d+2]=E*w,u[d+0]=_,u[d+1]=b,u[d+2]=w,l[f+0]=c,l[f+1]=1-h}const h=n+1;for(let t=0;t<n;t++)for(let n=0;n<e;n++){const r=6*(t*e+n);c[r+0]=n*h+t,c[r+1]=n*h+t+1,c[r+2]=(n+1)*h+t,c[r+3]=(n+1)*h+t,c[r+4]=n*h+t+1,c[r+5]=(n+1)*h+t+1}return{indices:{size:1,value:c},attributes:{POSITION:{size:3,value:a},NORMAL:{size:3,value:u},TEXCOORD_0:{size:2,value:l}}}}(t);super({...t,id:e,indices:n,attributes:{...r,...t.attributes}})}}var O=n(67970),R=n(25330),L=n(83352),B=n(40356),k=n(38466),N=n(87277),F=n(11085);function D(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=Math.fround(t),i=t-r;return e[n]=r,e[n+1]=i,e}function j(t){return t-Math.fround(t)}function U(t){const e=new Float32Array(32);for(let n=0;n<4;++n)for(let r=0;r<4;++r){const i=4*n+r;D(t[4*r+n],e,2*i)}return e}const G={ONE:1},z={name:"fp64",vs:"const vec2 E_FP64 = vec2(2.7182817459106445e+00, 8.254840366817007e-08);\nconst vec2 LOG2_FP64 = vec2(0.6931471824645996e+00, -1.9046542121259336e-09);\nconst vec2 PI_FP64 = vec2(3.1415927410125732, -8.742278012618954e-8);\nconst vec2 TWO_PI_FP64 = vec2(6.2831854820251465, -1.7484556025237907e-7);\nconst vec2 PI_2_FP64 = vec2(1.5707963705062866, -4.371139006309477e-8);\nconst vec2 PI_4_FP64 = vec2(0.7853981852531433, -2.1855695031547384e-8);\nconst vec2 PI_16_FP64 = vec2(0.19634954631328583, -5.463923757886846e-9);\nconst vec2 PI_16_2_FP64 = vec2(0.39269909262657166, -1.0927847515773692e-8);\nconst vec2 PI_16_3_FP64 = vec2(0.5890486240386963, -1.4906100798128818e-9);\nconst vec2 PI_180_FP64 = vec2(0.01745329238474369, 1.3519960498364902e-10);\n\nconst vec2 SIN_TABLE_0_FP64 = vec2(0.19509032368659973, -1.6704714833615242e-9);\nconst vec2 SIN_TABLE_1_FP64 = vec2(0.3826834261417389, 6.22335089017767e-9);\nconst vec2 SIN_TABLE_2_FP64 = vec2(0.5555702447891235, -1.1769521357507529e-8);\nconst vec2 SIN_TABLE_3_FP64 = vec2(0.7071067690849304, 1.2101617041793133e-8);\n\nconst vec2 COS_TABLE_0_FP64 = vec2(0.9807852506637573, 2.9739473106360492e-8);\nconst vec2 COS_TABLE_1_FP64 = vec2(0.9238795042037964, 2.8307490351764386e-8);\nconst vec2 COS_TABLE_2_FP64 = vec2(0.8314695954322815, 1.6870263741530778e-8);\nconst vec2 COS_TABLE_3_FP64 = vec2(0.7071067690849304, 1.2101617152815436e-8);\n\nconst vec2 INVERSE_FACTORIAL_3_FP64 = vec2(1.666666716337204e-01, -4.967053879312289e-09);\nconst vec2 INVERSE_FACTORIAL_4_FP64 = vec2(4.16666679084301e-02, -1.2417634698280722e-09);\nconst vec2 INVERSE_FACTORIAL_5_FP64 = vec2(8.333333767950535e-03, -4.34617203337595e-10);\nconst vec2 INVERSE_FACTORIAL_6_FP64 = vec2(1.3888889225199819e-03, -3.3631094437103215e-11);\nconst vec2 INVERSE_FACTORIAL_7_FP64 = vec2(1.9841270113829523e-04, -2.725596874933456e-12);\nconst vec2 INVERSE_FACTORIAL_8_FP64 = vec2(2.4801587642286904e-05, -3.406996025904184e-13);\nconst vec2 INVERSE_FACTORIAL_9_FP64 = vec2(2.75573188446287533e-06, 3.7935
2713937038186e-14);\nconst vec2 INVERSE_FACTORIAL_10_FP64 = vec2(2.755731998149713e-07, -7.575112367869873e-15);\n\nfloat nint(float d) {\n if (d == floor(d)) return d;\n return floor(d + 0.5);\n}\n\nvec2 nint_fp64(vec2 a) {\n float hi = nint(a.x);\n float lo;\n vec2 tmp;\n if (hi == a.x) {\n lo = nint(a.y);\n tmp = quickTwoSum(hi, lo);\n } else {\n lo = 0.0;\n if (abs(hi - a.x) == 0.5 && a.y < 0.0) {\n hi -= 1.0;\n }\n tmp = vec2(hi, lo);\n }\n return tmp;\n}\n\nvec2 exp_fp64(vec2 a) {\n\n const int k_power = 4;\n const float k = 16.0;\n\n const float inv_k = 1.0 / k;\n\n if (a.x <= -88.0) return vec2(0.0, 0.0);\n if (a.x >= 88.0) return vec2(1.0 / 0.0, 1.0 / 0.0);\n if (a.x == 0.0 && a.y == 0.0) return vec2(1.0, 0.0);\n if (a.x == 1.0 && a.y == 0.0) return E_FP64;\n\n float m = floor(a.x / LOG2_FP64.x + 0.5);\n vec2 r = sub_fp64(a, mul_fp64(LOG2_FP64, vec2(m, 0.0))) * inv_k;\n vec2 s, t, p;\n\n p = mul_fp64(r, r);\n s = sum_fp64(r, p * 0.5);\n p = mul_fp64(p, r);\n t = mul_fp64(p, INVERSE_FACTORIAL_3_FP64);\n\n s = sum_fp64(s, t);\n p = mul_fp64(p, r);\n t = mul_fp64(p, INVERSE_FACTORIAL_4_FP64);\n\n s = sum_fp64(s, t);\n p = mul_fp64(p, r);\n t = mul_fp64(p, INVERSE_FACTORIAL_5_FP64);\n\n\n\n\n\n\n s = sum_fp64(s, t);\n for (int i = 0; i < k_power; i++) {\n s = sum_fp64(s * 2.0, mul_fp64(s, s));\n }\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n s = sum_fp64(s, vec2(ONE, 0.0));\n#else\n s = sum_fp64(s, vec2(1.0, 0.0));\n#endif\n\n return s * pow(2.0, m);\n}\n\nvec2 log_fp64(vec2 a)\n{\n if (a.x == 1.0 && a.y == 0.0) return vec2(0.0, 0.0);\n if (a.x <= 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);\n vec2 x = vec2(log(a.x), 0.0);\n vec2 s;\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n s = vec2(ONE, 0.0);\n#else\n s = vec2(1.0, 0.0);\n#endif\n\n x = sub_fp64(sum_fp64(x, mul_fp64(a, exp_fp64(-x))), s);\n return x;\n}\n\nvec2 sin_taylor_fp64(vec2 a) {\n vec2 r, s, t, x;\n\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(0.0, 0.0);\n }\n\n x = -mul_fp64(a, a);\n s = a;\n r = a;\n\n r = mul_fp64(r, x);\n t = mul_fp64(r, INVERSE_FACTORIAL_3_FP64);\n s = sum_fp64(s, t);\n\n r = mul_fp64(r, x);\n t = mul_fp64(r, INVERSE_FACTORIAL_5_FP64);\n s = sum_fp64(s, t);\n\n\n\n\n\n\n return s;\n}\n\nvec2 cos_taylor_fp64(vec2 a) {\n vec2 r, s, t, x;\n\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(1.0, 0.0);\n }\n\n x = -mul_fp64(a, a);\n r = x;\n s = sum_fp64(vec2(1.0, 0.0), r * 0.5);\n\n r = mul_fp64(r, x);\n t = mul_fp64(r, INVERSE_FACTORIAL_4_FP64);\n s = sum_fp64(s, t);\n\n r = mul_fp64(r, x);\n t = mul_fp64(r, INVERSE_FACTORIAL_6_FP64);\n s = sum_fp64(s, t);\n\n\n\n\n\n\n return s;\n}\n\nvoid sincos_taylor_fp64(vec2 a, out vec2 sin_t, out vec2 cos_t) {\n if (a.x == 0.0 && a.y == 0.0) {\n sin_t = vec2(0.0, 0.0);\n cos_t = vec2(1.0, 0.0);\n }\n\n sin_t = sin_taylor_fp64(a);\n cos_t = sqrt_fp64(sub_fp64(vec2(1.0, 0.0), mul_fp64(sin_t, sin_t)));\n}\n\nvec2 sin_fp64(vec2 a) {\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(0.0, 0.0);\n }\n vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n vec2 t;\n float q = floor(r.x / PI_2_FP64.x + 0.5);\n int j = int(q);\n\n if (j < -2 || j > 2) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n }\n\n t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n q = floor(t.x / PI_16_FP64.x + 0.5);\n int k = int(q);\n\n if (k == 0) {\n if (j == 0) {\n return sin_taylor_fp64(t);\n } else if (j == 1) {\n return cos_taylor_fp64(t);\n } else if (j == -1) {\n return -cos_taylor_fp64(t);\n } else {\n return -sin_taylor_fp64(t);\n }\n }\n\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n } else {\n t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n }\n\n vec2 u = vec2(0.0, 0.0);\n vec2 v = vec2(0.0, 0.0);\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#else\n if (abs_k == 1) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs_k == 2) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs_k == 3) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs_k == 4) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#endif\n\n vec2 sin_t, cos_t;\n sincos_taylor_fp64(t, sin_t, cos_t);\n\n\n\n vec2 result = vec2(0.0, 0.0);\n if (j == 0) {\n if (k > 0) {\n result = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n } else {\n result = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n }\n } else if (j == 1) {\n if (k > 0) {\n result = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n } else {\n result = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n }\n } else if (j == -1) {\n if (k > 0) {\n result = sub_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n } else {\n result = -sum_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n }\n } else {\n if (k > 0) {\n result = -sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n } else {\n result = sub_fp64(mul_fp64(v, cos_t), mul_fp64(u, sin_t));\n }\n }\n\n return result;\n}\n\nvec2 cos_fp64(vec2 a) {\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(1.0, 0.0);\n }\n vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n vec2 t;\n float q = floor(r.x / PI_2_FP64.x + 0.5);\n int j = int(q);\n\n if (j < -2 || j > 2) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n }\n\n t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n q = floor(t.x / PI_16_FP64.x + 0.5);\n int k = int(q);\n\n if (k == 0) {\n if (j == 0) {\n return cos_taylor_fp64(t);\n } else if (j == 1) {\n return -sin_taylor_fp64(t);\n } else if (j == -1) {\n return sin_taylor_fp64(t);\n } else {\n return -cos_taylor_fp64(t);\n }\n }\n\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n } else {\n t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n }\n\n vec2 u = vec2(0.0, 0.0);\n vec2 v = vec2(0.0, 0.0);\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#else\n if (abs_k == 1) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs_k == 2) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs_k == 3) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs_k == 4) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#endif\n\n vec2 sin_t, cos_t;\n sincos_taylor_fp64(t, sin_t, cos_t);\n\n vec2 result = vec2(0.0, 0.0);\n if (j == 0) {\n if (k > 0) {\n result = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n } else {\n result = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n }\n } else if (j == 1) {\n if (k > 0) {\n result = -sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n } else {\n result = sub_fp64(mul_fp64(v, cos_t), mul_fp64(u, sin_t));\n }\n } else if (j == -1) {\n if (k > 0) {\n result = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n } else {\n result = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n }\n } else {\n if (k > 0) {\n result = sub_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n } else {\n result = -sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n }\n }\n\n return result;\n}\n\nvec2 tan_fp64(vec2 a) {\n vec2 sin_a;\n vec2 cos_a;\n\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(0.0, 0.0);\n }\n vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n vec2 t;\n float q = floor(r.x / PI_2_FP64.x + 0.5);\n int j = int(q);\n\n\n if (j < -2 || j > 2) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n }\n\n t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n q = floor(t.x / PI_16_FP64.x + 0.5);\n int k = int(q);\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n } else {\n t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n }\n\n\n vec2 u = vec2(0.0, 0.0);\n vec2 v = vec2(0.0, 0.0);\n\n vec2 sin_t, cos_t;\n vec2 s, c;\n sincos_taylor_fp64(t, sin_t, cos_t);\n\n if (k == 0) {\n s = sin_t;\n c = cos_t;\n } else {\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#else\n if (abs_k == 1) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs_k == 2) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs_k == 3) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs_k == 4) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#endif\n if (k > 0) {\n s = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n c = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n } else {\n s = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n c = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n }\n }\n\n if (j == 0) {\n sin_a = s;\n cos_a = c;\n } else if (j == 1) {\n sin_a = c;\n cos_a = -s;\n } else if (j == -1) {\n sin_a = -c;\n cos_a = s;\n } else {\n sin_a = -s;\n cos_a = -c;\n }
2\n return div_fp64(sin_a, cos_a);\n}\n\nvec2 radians_fp64(vec2 degree) {\n return mul_fp64(degree, PI_180_FP64);\n}\n\nvec2 mix_fp64(vec2 a, vec2 b, float x) {\n vec2 range = sub_fp64(b, a);\n return sum_fp64(a, mul_fp64(range, vec2(x, 0.0)));\n}\n\nvoid vec2_sum_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n out_val[0] = sum_fp64(a[0], b[0]);\n out_val[1] = sum_fp64(a[1], b[1]);\n}\n\nvoid vec2_sub_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n out_val[0] = sub_fp64(a[0], b[0]);\n out_val[1] = sub_fp64(a[1], b[1]);\n}\n\nvoid vec2_mul_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n out_val[0] = mul_fp64(a[0], b[0]);\n out_val[1] = mul_fp64(a[1], b[1]);\n}\n\nvoid vec2_div_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n out_val[0] = div_fp64(a[0], b[0]);\n out_val[1] = div_fp64(a[1], b[1]);\n}\n\nvoid vec2_mix_fp64(vec2 x[2], vec2 y[2], float a, out vec2 out_val[2]) {\n vec2 range[2];\n vec2_sub_fp64(y, x, range);\n vec2 portion[2];\n portion[0] = range[0] * a;\n portion[1] = range[1] * a;\n vec2_sum_fp64(x, portion, out_val);\n}\n\nvec2 vec2_length_fp64(vec2 x[2]) {\n return sqrt_fp64(sum_fp64(mul_fp64(x[0], x[0]), mul_fp64(x[1], x[1])));\n}\n\nvoid vec2_normalize_fp64(vec2 x[2], out vec2 out_val[2]) {\n vec2 length = vec2_length_fp64(x);\n vec2 length_vec2[2];\n length_vec2[0] = length;\n length_vec2[1] = length;\n\n vec2_div_fp64(x, length_vec2, out_val);\n}\n\nvec2 vec2_distance_fp64(vec2 x[2], vec2 y[2]) {\n vec2 diff[2];\n vec2_sub_fp64(x, y, diff);\n return vec2_length_fp64(diff);\n}\n\nvec2 vec2_dot_fp64(vec2 a[2], vec2 b[2]) {\n vec2 v[2];\n\n v[0] = mul_fp64(a[0], b[0]);\n v[1] = mul_fp64(a[1], b[1]);\n\n return sum_fp64(v[0], v[1]);\n}\nvoid vec3_sub_fp64(vec2 a[3], vec2 b[3], out vec2 out_val[3]) {\n for (int i = 0; i < 3; i++) {\n out_val[i] = sum_fp64(a[i], b[i]);\n }\n}\n\nvoid vec3_sum_fp64(vec2 a[3], vec2 b[3], out vec2 out_val[3]) {\n for (int i = 0; i < 3; i++) {\n out_val[i] = sum_fp64(a[i], b[i]);\n }\n}\n\nvec2 vec3_length_fp64(vec2 x[3]) {\n return sqrt_fp64(sum_fp64(sum_fp64(mul_fp64(x[0], x[0]), mul_fp64(x[1], x[1])),\n mul_fp64(x[2], x[2])));\n}\n\nvec2 vec3_distance_fp64(vec2 x[3], vec2 y[3]) {\n vec2 diff[3];\n vec3_sub_fp64(x, y, diff);\n return vec3_length_fp64(diff);\n}\nvoid vec4_fp64(vec4 a, out vec2 out_val[4]) {\n out_val[0].x = a[0];\n out_val[0].y = 0.0;\n\n out_val[1].x = a[1];\n out_val[1].y = 0.0;\n\n out_val[2].x = a[2];\n out_val[2].y = 0.0;\n\n out_val[3].x = a[3];\n out_val[3].y = 0.0;\n}\n\nvoid vec4_scalar_mul_fp64(vec2 a[4], vec2 b, out vec2 out_val[4]) {\n out_val[0] = mul_fp64(a[0], b);\n out_val[1] = mul_fp64(a[1], b);\n out_val[2] = mul_fp64(a[2], b);\n out_val[3] = mul_fp64(a[3], b);\n}\n\nvoid vec4_sum_fp64(vec2 a[4], vec2 b[4], out vec2 out_val[4]) {\n for (int i = 0; i < 4; i++) {\n out_val[i] = sum_fp64(a[i], b[i]);\n }\n}\n\nvoid vec4_dot_fp64(vec2 a[4], vec2 b[4], out vec2 out_val) {\n vec2 v[4];\n\n v[0] = mul_fp64(a[0], b[0]);\n v[1] = mul_fp64(a[1], b[1]);\n v[2] = mul_fp64(a[2], b[2]);\n v[3] = mul_fp64(a[3], b[3]);\n\n out_val = sum_fp64(sum_fp64(v[0], v[1]), sum_fp64(v[2], v[3]));\n}\n\nvoid mat4_vec4_mul_fp64(vec2 b[16], vec2 a[4], out vec2 out_val[4]) {\n vec2 tmp[4];\n\n for (int i = 0; i < 4; i++)\n {\n for (int j = 0; j < 4; j++)\n {\n tmp[j] = b[j + i * 4];\n }\n vec4_dot_fp64(a, tmp, out_val[i]);\n }\n}\n",fs:null,dependencies:[{name:"fp64-arithmetic",vs:"uniform float ONE;\nvec2 split(float a) {\n const float SPLIT = 4097.0;\n float t = a * SPLIT;\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float a_hi = t * ONE - (t - a);\n float a_lo = a * ONE - a_hi;\n#else\n float a_hi = t - (t - a);\n float a_lo = a - a_hi;\n#endif\n return vec2(a_hi, a_lo);\n}\nvec2 split2(vec2 a) {\n vec2 b = split(a.x);\n b.y += a.y;\n return b;\n}\nvec2 quickTwoSum(float a, float b) {\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float sum = (a + b) * ONE;\n float err = b - (sum - a) * ONE;\n#else\n float sum = a + b;\n float err = b - (sum - a);\n#endif\n return vec2(sum, err);\n}
2\nvec2 twoSum(float a, float b) {\n float s = (a + b);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float v = (s * ONE - a) * ONE;\n float err = (a - (s - v) * ONE) * ONE * ONE * ONE + (b - v);\n#else\n float v = s - a;\n float err = (a - (s - v)) + (b - v);\n#endif\n return vec2(s, err);\n}\n\nvec2 twoSub(float a, float b) {\n float s = (a - b);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float v = (s * ONE - a) * ONE;\n float err = (a - (s - v) * ONE) * ONE * ONE * ONE - (b + v);\n#else\n float v = s - a;\n float err = (a - (s - v)) - (b + v);\n#endif\n return vec2(s, err);\n}\n\nvec2 twoSqr(float a) {\n float prod = a * a;\n vec2 a_fp64 = split(a);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float err = ((a_fp64.x * a_fp64.x - prod) * ONE + 2.0 * a_fp64.x *\n a_fp64.y * ONE * ONE) + a_fp64.y * a_fp64.y * ONE * ONE * ONE;\n#else\n float err = ((a_fp64.x * a_fp64.x - prod) + 2.0 * a_fp64.x * a_fp64.y) + a_fp64.y * a_fp64.y;\n#endif\n return vec2(prod, err);\n}\n\nvec2 twoProd(float a, float b) {\n float prod = a * b;\n vec2 a_fp64 = split(a);\n vec2 b_fp64 = split(b);\n float err = ((a_fp64.x * b_fp64.x - prod) + a_fp64.x * b_fp64.y +\n a_fp64.y * b_fp64.x) + a_fp64.y * b_fp64.y;\n return vec2(prod, err);\n}\n\nvec2 sum_fp64(vec2 a, vec2 b) {\n vec2 s, t;\n s = twoSum(a.x, b.x);\n t = twoSum(a.y, b.y);\n s.y += t.x;\n s = quickTwoSum(s.x, s.y);\n s.y += t.y;\n s = quickTwoSum(s.x, s.y);\n return s;\n}\n\nvec2 sub_fp64(vec2 a, vec2 b) {\n vec2 s, t;\n s = twoSub(a.x, b.x);\n t = twoSub(a.y, b.y);\n s.y += t.x;\n s = quickTwoSum(s.x, s.y);\n s.y += t.y;\n s = quickTwoSum(s.x, s.y);\n return s;\n}\n\nvec2 mul_fp64(vec2 a, vec2 b) {\n vec2 prod = twoProd(a.x, b.x);\n prod.y += a.x * b.y;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n prod = split2(prod);\n#endif\n prod = quickTwoSum(prod.x, prod.y);\n prod.y += a.y * b.x;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n prod = split2(prod);\n#endif\n prod = quickTwoSum(prod.x, prod.y);\n return prod;\n}\n\nvec2 div_fp64(vec2 a, vec2 b) {\n float xn = 1.0 / b.x;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n vec2 yn = mul_fp64(a, vec2(xn, 0));\n#else\n vec2 yn = a * xn;\n#endif\n float diff = (sub_fp64(a, mul_fp64(b, yn))).x;\n vec2 prod = twoProd(xn, diff);\n return sum_fp64(yn, prod);\n}\n\nvec2 sqrt_fp64(vec2 a) {\n if (a.x == 0.0 && a.y == 0.0) return vec2(0.0, 0.0);\n if (a.x < 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);\n\n float x = 1.0 / sqrt(a.x);\n float yn = a.x * x;\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n vec2 yn_sqr = twoSqr(yn) * ONE;\n#else\n vec2 yn_sqr = twoSqr(yn);\n#endif\n float diff = sub_fp64(a, yn_sqr).x;\n vec2 prod = twoProd(x * 0.5, diff);\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n return sum_fp64(split(yn), prod);\n#else\n return sum_fp64(vec2(yn, 0.0), prod);\n#endif\n}\n",fs:null,getUniforms:function(){return G},fp64ify:D,fp64LowPart:j,fp64ifyMatrix4:U}],fp64ify:D,fp64LowPart:j,fp64ifyMatrix4:U};var V=n(9946);const H=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],q={modelMatrix:H,viewMatrix:H,projectionMatrix:H,cameraPositionWorld:[0,0,0]},W="varying vec4 project_vPositionWorld;\nvarying vec3 project_vNormalWorld;\n\nvec4 project_getPosition_World() {\n return project_vPositionWorld;\n}\n\nvec3 project_getNormal_World() {\n return project_vNormalWorld;\n}\n",X={name:"project",getUniforms:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q;const e={};return void 0!==t.modelMatrix&&(e.modelMatrix=t.modelMatrix),void 0!==t.viewMatrix&&(e.viewMatrix=t.viewMatrix),void 0!==t.projectionMatrix&&(e.projectionMatrix=t.projectionMatrix),void 0!==t.cameraPositionWorld&&(e.cameraPositionWorld=t.cameraPositionWorld),void 0===t.projectionMatrix&&void 0===t.viewMatrix||(e.viewProjectionMatrix=new V.A(t.projectionMatrix).multiplyRight(t.viewMatrix)),e},vs:"".concat(W,"\nuniform mat4 modelMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewProjectionMatrix;\nuniform vec3 cameraPositionWorld;\n\nstruct World {\n vec3 position;\n vec3 normal;\n};\n\nWorld world;\n\nvoid project_setPosition(vec4 position) {\n project_vPositionWorld = position;\n}\n\nvoid project_setNormal(vec3 normal) {\n project_vNormalWorld = normal;\n}\n\nvoid project_setPositionAndNormal_World(vec3 position, vec3 normal) {\n world.position = position;\n world.normal = normal;\n}\n\nvoid project_setPositionAndNormal_Model(vec3 position, vec3 normal) {\n world.position = (modelMatrix * vec4(position, 1.)).xyz;\n world.normal = mat3(modelMatrix) * normal;\n}\n\nvec4 project_model_to_clipspace(vec4 position) {\n return viewProjectionMatrix * modelMatrix * position;\n}\n\nvec4 project_model_to_clipspace(vec3 position) {\n return viewProjectionMatrix * modelMatrix * vec4(position, 1.);\n}\n\nvec4 project_world_to_clipspace(vec3 position) {\n return viewProjectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_view_to_clipspace(vec3 position) {\n return projectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_to_clipspace(vec3 position) {\n return viewProjectionMatrix * vec4(position, 1.);\n}\n"),fs:"\n".concat(W)},Y={lightDirection:new Float32Array([1,1,2])},Q={name:"dirlight",vs:null,fs:"uniform vec3 dirlight_uLightDirection;\nvec4 dirlight_filterColor(vec4 color) {\n vec3 normal = project_getNormal_World();\n float d = abs(dot(normalize(normal), normalize(dirlight_uLightDirection)));\n return vec4(color.rgb * d, color.a);\n}\n",getUniforms:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y;const e={};return t.lightDirection&&(e.dirlight_uLightDirection=t.lightDirection),e},dependencies:[X]};var J=n(5514),Z=n(98777),K=n(27209),$=n(79669),tt=n(32411),et=n(94939)},59582:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.ModifyMode=void 0;var r=n(89595),i=n(71169),o=n(96146),s=n(78768);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(d,t);var e,n,o,c=(o=d,function(){var t,e=A(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=A(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function d(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),c.apply(this,arguments)}return e=d,(n=[{key:"getGuides",value:function(t){var e,n=this,o=[],s=t.data,a=t.lastPointerMoveEvent,c=s.features,h=a&&a.picks,A=a&&a.mapCoords,f=function(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=l(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(t.selectedIndexes);try{for(f.s();!(e=f.n()).done;){var d=e.value;if(d<c.length){var p=c[d].geometry;o.push.apply(o,u((0,i.getEditHandlesForGeometry)(p,d)))}else console.warn("selectedFeatureIndexes out of range ".concat(d))}}catch(t){f.e(t)}finally{f.f()}if(h&&h.length&&A){var g,m=!(0,i.getPickedExistingEditHandle)(h)&&h.find(function(t){return!t.isGuide});if(m&&!m.object.geometry.type.includes("Point")&&(!(null===(g=t.modeConfig)||void 0===g?void 0:g.lockRectangles)||"Rectangle"!==m.object.properties.shape)&&t.selectedIndexes.includes(m.index)){var y=null,v=[],_=(0,r.point)(A);if((0,i.recursivelyTraverseNestedArrays)(m.object.geometry.coordinates,[],function(e,i){var o=(0,r.lineString)(e),s=n.getNearestPoint(o,_,t.modeConfig&&t.modeConfig.viewport);(!y||s.properties.dist<y.properties.dist)&&(y=s,v=i)}),y){var b=y,w=b.geometry.coordinates,E=b.properties.index;o.push({type:"Feature",properties:{guideType:"editHandle",editHandleType:"intermediate",featureIndex:m.index,positionIndexes:[].concat(u(v),[E+1])},geometry:{type:"Point",coordinates:w}})}}}return{type:"FeatureCollection",features:o}}},{key:"getNearestPoint",value:function(t,e,n){if(t.geometry.coordinates.some(function(t){return t.length>2})){if(n)return(0,i.nearestPointOnProjectedLine)(t,e,n);console.log("Editing 3D point but modeConfig.viewport not provided. Falling back to 2D logic.")}return(0,i.nearestPointOnLine)(t,e,n)}},{key:"handleClick",value:function(t,e){var n=(0,i.getPickedExistingEditHandle)(t.picks),r=(0,i.getPickedIntermediateEditHandle)(t.picks);if(n){var o,a=n.properties,u=a.featureIndex,l=a.positionIndexes;try{o=new s.ImmutableFeatureCollection(e.data).removePosition(u,l).getObject()}catch(t){}o&&e.onEdit({updatedData:o,editType:"removePosition",editContext:{featureIndexes:[u],positionIndexes:l,position:n.geometry.coordinates}})}else if(r){var c,h=r.properties,A=h.featureIndex,f=h.positionIndexes,d=e.data.features[A];if(!(null===(c=e.modeConfig)||void 0===c?void 0:c.lockRectangles)||"Rectangle"!==(null==d?void 0:d.properties.shape)){var p=new s.ImmutableFeatureCollection(e.data).addPosition(A,f,r.geometry.coordinates).getObject();p&&e.onEdit({updatedData:p,editType:"addPosition",editContext:{featureIndexes:[A],positionIndexes:f,position:r.geometry.coordinates}})}}}},{key:"handleDragging",value:function(t,e){var n=(0,i.getPickedEditHandle)(t.pointerDownPicks);n&&(t.cancelPan(),this._dragEditHandle("movePosition",e,n,t))}},{key:"_dragEditHandle",value:function(t,e,n,r){var o,a,u=n.properties,l=e.data.features[u.featureIndex];if((null===(o=e.modeConfig)||void 0===o?void 0:o.lockRectangles)&&"Rectangle"===l.properties.shape){var c=(0,i.updateRectanglePosition)(l,u.positionIndexes[1],r.mapCoords);a=new s.ImmutableFeatureCollection(e.data).replaceGeometry(u.featureIndex,{coordinates:c,type:"Polygon"}).getObject()}else a=new s.ImmutableFeatureCollection(e.data).replacePosition(u.featureIndex,u.positionIndexes,r.mapCoords).getObject();e.onEdit({updatedData:a,editType:t,editContext:{featureIndexes:[u.featureIndex],positionIndexes:u.positionIndexes,position:r.mapCoords}})}},{key:"handlePointerMove",value:function(t,e){var n=this.getCursor(t);e.onUpdateCursor(n)}},{key:"handleStartDragging",value:function(t,e){var n=e.selectedIndexes,r=(0,i.getPickedIntermediateEditHandle)(t.picks);if(n.length&&r){var o=r.properties,a=new s.ImmutableFeatureCollection(e.data).addPosition(o.featureIndex,o.positionIndexes,t.mapCoords).getObject();e.onEdit({updatedData:a,editType:"addPosition",editContext:{featureIndexes:[o.featureIndex],positionIndexes:o.positionIndexes,position:t.mapCoords}})}}},{key:"handleStopDragging",value:function(t,e){var n=e.selectedIndexes,r=(0,i.getPickedEditHandle)(t.picks);n.length&&r&&this._dragEditHandle("finishMovePosition",e,r,t)}},{key:"getCursor",value:function(t){var e=t&&t.picks||[];return(0,i.getPickedEditHandles)(e).length?"cell":null}}])&&h(e.prototype,n),d}(o.GeoJsonEditMode);e.ModifyMode=d},60033:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var r=n(50340),i=n(34081),o=n(95855),s=n(64062),a=n(94421);const u=[0,0,0];let l;class c extends r.A{static get ZERO(){return l||(l=new c(0,0,0),Object.freeze(l)),l}constructor(t=0,e=0,n=0){super(-0,-0,-0),1===arguments.length&&(0,i.cy)(t)?this.copy(t):(i.$W.debug&&((0,o.ws)(t),(0,o.ws)(e),(0,o.ws)(n)),this[0]=t,this[1]=e,this[2]=n)}set(t,e,n){return this[0]=t,this[1]=e,this[2]=n,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return i.$W.debug&&((0,o.ws)(t.x),(0,o.ws)(t.y),(0,o.ws)(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=(0,o.ws)(t)}angle(t){return s.g7(this,t)}cross(t){return s.$A(this,this,t),this.check()}rotateX({radians:t,origin:e=u}){return s.eL(this,this,e,t),this.check()}rotateY({radians:t,origin:e=u}){return s.Z8(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=u}){return s.x6(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return s.Z0(this,this,t),this.check()}transformAsVector(t){return(0,a.cL)(this,this,t),this.check()}transformByMatrix3(t){return s.ei(this,this,t),this.check()}transformByMatrix2(t){return(0,a.J4)(this,this,t),this.check()}transformByQuaternion(t){return s.gL(this,this,t),this.check()}}},60899:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var r=Object.defineProperty,i=n(78345);function o(t,e={}){if(null!=t.bbox&&!0!==e.recompute)return t.bbox;const n=[1/0,1/0,-1/0,-1/0];return i.coordEach.call(void 0,t,t=>{n[0]>t[0]&&(n[0]=t[0]),n[1]>t[1]&&(n[1]=t[1]),n[2]<t[0]&&(n[2]=t[0]),n[3]<t[1]&&(n[3]=t[1])}),n}r(o,"name",{value:"bbox",configurable:!0});var s=o;e.bbox=o,e.default=s},60976:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawCircleFromCenterMode=void 0;var r=o(n(32132)),i=o(n(71123));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}var c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(h,t);var e,n,o,c=(o=h,function(){var t,e=u(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=u(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function h(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),c.apply(this,arguments)}return e=h,(n=[{key:"getTwoClickPolygon",value:function(t,e,n){var o=(n||{}).steps,s=void 0===o?64:o,a={steps:s};s<4&&(console.warn("Minimum steps to draw a circle is 4 "),a.steps=4);var u=Math.max((0,i.default)(t,e),.001),l=(0,r.default)(t,u,a);return l.properties=l.properties||{},l.properties.shape="Circle",l}}])&&a(e.prototype,n),h}(n(42166).TwoClickPolygonMode);e.DrawCircleFromCenterMode=c},61185:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtrudeMode=void 0;var r,i=(r=n(25128))&&r.__esModule?r:{default:r},o=n(71169),s=n(59582),a=n(78768);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function l(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(t,e)||h(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){if(t){if("string"==typeof t)return A(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}
2function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}(h,t);var e,n,r,s=(r=h,function(){var t,e=p(r);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=p(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?d(t):e}(this,t)});function h(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(t,e,n){e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(d(t=s.call.apply(s,[this].concat(n))),"isPointAdded",!1),t}return e=h,(n=[{key:"handleDragging",value:function(t,e){var n=(0,o.getPickedEditHandle)(t.pointerDownPicks);if(n){var r=n.properties.featureIndex,i=n.properties.positionIndexes,s=this.coordinatesSize(i,r,e.data);i=this.isPointAdded?this.nextPositionIndexes(i,s):i;var u=this.getPointForPositionIndexes(this.prevPositionIndexes(i,s),r,e.data),l=this.getPointForPositionIndexes(i,r,e.data);if(u&&l){var h=c((0,o.generatePointsParallelToLinePoints)(u,l,t.mapCoords),2),A=h[0],f=h[1],d=new a.ImmutableFeatureCollection(e.data).replacePosition(r,this.prevPositionIndexes(i,s),f).replacePosition(r,i,A).getObject();e.onEdit({updatedData:d,editType:"extruding",editContext:{featureIndexes:[r],positionIndexes:this.nextPositionIndexes(i,s),position:A}}),t.cancelPan()}}}},{key:"handleStartDragging",value:function(t,e){var n=e.selectedIndexes,r=(0,o.getPickedIntermediateEditHandle)(t.picks);if(n.length&&r){var i=r.properties,s=i.positionIndexes,u=i.featureIndex,l=this.coordinatesSize(s,u,e.data),c=this.getPointForPositionIndexes(this.prevPositionIndexes(s,l),u,e.data),h=this.getPointForPositionIndexes(s,u,e.data);if(c&&h){var A=new a.ImmutableFeatureCollection(e.data);this.isOrthogonal(s,u,l,e.data)||(A=A.addPosition(u,s,h)),this.isOrthogonal(this.prevPositionIndexes(s,l),u,l,e.data)||(A=A.addPosition(u,s,c),this.isPointAdded=!0),e.onEdit({updatedData:A.getObject(),editType:"startExtruding",editContext:{featureIndexes:[u],positionIndexes:s,position:c}})}}}},{key:"handleStopDragging",value:function(t,e){var n=e.selectedIndexes,r=(0,o.getPickedEditHandle)(t.pointerDownPicks);if(n.length&&r){var i=r.properties.featureIndex,s=r.properties.positionIndexes,u=this.coordinatesSize(s,i,e.data);s=this.isPointAdded?this.nextPositionIndexes(s,u):s;var l=this.getPointForPositionIndexes(this.prevPositionIndexes(s,u),i,e.data),h=this.getPointForPositionIndexes(s,i,e.data);if(l&&h){var A=c((0,o.generatePointsParallelToLinePoints)(l,h,t.mapCoords),2),f=A[0],d=A[1],p=new a.ImmutableFeatureCollection(e.data).replacePosition(i,this.prevPositionIndexes(s,u),d).replacePosition(i,s,f).getObject();e.onEdit({updatedData:p,editType:"extruded",editContext:{featureIndexes:[i],positionIndexes:s,position:f}})}}this.isPointAdded=!1}},{key:"coordinatesSize",value:function(t,e,n){var r=n.features,i=0;if(Array.isArray(t)){var o=r[e].geometry.coordinates;if(3===t.length){var s=c(t,2),a=s[0],u=s[1];o.length&&o[a].length&&(i=o[a][u].length)}else{var l=c(t,1)[0];o.length&&o[l].length&&(i=o[l].length)}}return i}},{key:"getBearing",value:function(t,e){var n=(0,i.default)(t,e);return n<0?Math.floor(360+n):Math.floor(n)}},{key:"isOrthogonal",value:function(t,e,n,r){if(!Array.isArray(t))return!1;t[t.length-1]===n-1&&(t[t.length-1]=0);var i=this.getPointForPositionIndexes(this.prevPositionIndexes(t,n),e,r),o=this.getPointForPositionIndexes(this.nextPositionIndexes(t,n),e,r),s=this.getPointForPositionIndexes(t,e,r),a=this.getBearing(s,i),u=this.getBearing(s,o);return[89,90,91,269,270,271].includes(Math.abs(a-u))}},{key:"nextPositionIndexes",value:function(t,e){if(!Array.isArray(t))return[];var n=l(t);return n.length&&(n[n.length-1]=n[n.length-1]===e-1?0:n[n.length-1]+1),n}},{key:"prevPositionIndexes",value:function(t,e){if(!Array.isArray(t))return[];var n=l(t);return n.length&&(n[n.length-1]=0===n[n.length-1]?e-2:n[n.length-1]-1),n}},{key:"getPointForPositionIndexes",value:function(t,e,n){var r,i=n.features;if(Array.isArray(t)){var o=i[e].geometry.coordinates;if(3===t.length){var s=c(t,3),a=s[0],u=s[1],l=s[2];o.length&&o[a].length&&(r=o[a][u][l])}else{var h=c(t,2),A=h[0],f=h[1];o.length&&o[A].length&&(r=o[A][f])}}return r}}])&&f(e.prototype,n),h}(s.ModifyMode);e.ExtrudeMode=m},61607:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.DrawPolygonMode=void 0;var r,i=(r=n(46882))&&r.__esModule?r:{default:r},o=n(89595),s=n(71169);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=A(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},h(t,e,n||t)}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(d,t);var e,n,r,l=(r=d,function(){var t,e=A(r);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=A(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function d(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),l.apply(this,arguments)}return e=d,(n=[{key:"createTentativeFeature",value:function(t){var e,n=t.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 1===r.length||2===r.length?e={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(u(r),i)}}:r.length>2&&(e={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(u(r),i,[r[0]])]}}),e}},{key:"getGuides",value:function(t){var e,n=this.getClickSequence(),r={type:"FeatureCollection",features:[]},i=this.createTentativeFeature(t);i&&r.features.push(i);var o=n.map(function(t,e){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[e]},geometry:{type:"Point",coordinates:t}}});return(e=r.features).push.apply(e,u(o)),r}},{key:"handleClick",value:function(t,e){var n=t.picks,r=(0,s.getPickedEditHandle)(n),a=this.getClickSequence(),l=!1;if(a.length>2&&e.modeConfig&&e.modeConfig.preventOverlappingLines){var c=(0,o.lineString)([a[a.length-1],t.mapCoords]),h=(0,o.lineString)(u(a.slice(0,a.length-1)));(0,i.default)(c,h).features.length>0&&(l=!0)}var A=!1;if(r||l||(this.addClickSequence(t),A=!0),a.length>2&&r&&Array.isArray(r.properties.positionIndexes)&&(0===r.properties.positionIndexes[0]||r.properties.positionIndexes[0]===a.length-1)){var f={type:"Polygon",coordinates:[[].concat(u(a),[a[0]])]};this.resetClickSequence();var d=this.getAddFeatureOrBooleanPolygonAction(f,e);d&&e.onEdit(d)}else A&&e.onEdit({updatedData:e.data,editType:"addTentativePosition",editContext:{position:t.mapCoords}})}},{key:"handleKeyUp",value:function(t,e){if("Enter"===t.key){var n=this.getClickSequence();if(n.length>2){var r={type:"Polygon",coordinates:[[].concat(u(n),[n[0]])]};this.resetClickSequence();var i=this.getAddFeatureOrBooleanPolygonAction(r,e);i&&e.onEdit(i)}}}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),h(A(d.prototype),"handlePointerMove",this).call(this,t,e)}}])&&c(e.prototype,n),d}(n(96146).GeoJsonEditMode);e.DrawPolygonMode=d},61937:(t,e,n)=>{"use strict";var r=n(82372);t.exports=function(){return"function"==typeof Object.is?Object.is:r}},62012:(t,e,n)=>{"use strict";var r=n(79138),i=n(6095),o=n(68165);t.exports=function(){return o(r,i,arguments)}},62593:(t,e,n)=>{"use strict";n.d(e,{A:()=>f});var r=n(93314),i=n(85679),o=n(9946),s=n(60033),a=n(43405),u=n(84075);const l=(0,a.A)(function({viewport:t,center:e}){return new o.A(t.viewProjectionMatrix).invert().transform(e)}
2),c=(0,a.A)(function({viewport:t,shadowMatrices:e}){const n=[],r=t.pixelUnprojectionMatrix,i=t.isGeospatial?void 0:1,a=[[0,0,i],[t.width,0,i],[0,t.height,i],[t.width,t.height,i],[0,0,-1],[t.width,0,-1],[0,t.height,-1],[t.width,t.height,-1]].map(t=>function(t,e){const[n,r,i]=t,o=(0,u.xJ)([n,r,i],e);return Number.isFinite(i)?o:[o[0],o[1],0]}(t,r));for(const r of e){const e=r.clone().translate(new s.A(t.center).negate()),i=a.map(t=>e.transform(t)),u=(new o.A).ortho({left:Math.min(...i.map(t=>t[0])),right:Math.max(...i.map(t=>t[0])),bottom:Math.min(...i.map(t=>t[1])),top:Math.max(...i.map(t=>t[1])),near:Math.min(...i.map(t=>-t[2])),far:Math.max(...i.map(t=>-t[2]))});n.push(u.multiplyRight(r))}return n}),h=[0,0,0,1],A=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],f={name:"shadow",dependencies:[i.A],vs:"\nconst int max_lights = 2;\nuniform mat4 shadow_uViewProjectionMatrices[max_lights];\nuniform vec4 shadow_uProjectCenters[max_lights];\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform int shadow_uLightId;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nvec4 shadow_setVertexPosition(vec4 position_commonspace) {\n if (shadow_uDrawShadowMap) {\n return project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[shadow_uLightId], shadow_uProjectCenters[shadow_uLightId]);\n }\n if (shadow_uUseShadowMap) {\n for (int i = 0; i < max_lights; i++) {\n if(i < int(shadow_uLightCount)) {\n vec4 shadowMap_position = project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[i], shadow_uProjectCenters[i]);\n shadow_vPosition[i] = (shadowMap_position.xyz / shadowMap_position.w + 1.0) / 2.0;\n }\n }\n }\n return gl_Position;\n}\n",fs:"\nconst int max_lights = 2;\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform sampler2D shadow_uShadowMap0;\nuniform sampler2D shadow_uShadowMap1;\nuniform vec4 shadow_uColor;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nconst vec4 bitPackShift = vec4(1.0, 255.0, 65025.0, 16581375.0);\nconst vec4 bitUnpackShift = 1.0 / bitPackShift;\nconst vec4 bitMask = vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n\nfloat shadow_getShadowWeight(vec3 position, sampler2D shadowMap) {\n vec4 rgbaDepth = texture2D(shadowMap, position.xy);\n\n float z = dot(rgbaDepth, bitUnpackShift);\n return smoothstep(0.001, 0.01, position.z - z);\n}\n\nvec4 shadow_filterShadowColor(vec4 color) {\n if (shadow_uDrawShadowMap) {\n vec4 rgbaDepth = fract(gl_FragCoord.z * bitPackShift);\n rgbaDepth -= rgbaDepth.gbaa * bitMask;\n return rgbaDepth;\n }\n if (shadow_uUseShadowMap) {\n float shadowAlpha = 0.0;\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[0], shadow_uShadowMap0);\n if(shadow_uLightCount > 1.0) {\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[1], shadow_uShadowMap1);\n }\n shadowAlpha *= shadow_uColor.a / shadow_uLightCount;\n float blendedAlpha = shadowAlpha + color.a * (1.0 - shadowAlpha);\n\n return vec4(\n mix(color.rgb, shadow_uColor.rgb, shadowAlpha / blendedAlpha),\n blendedAlpha\n );\n }\n return color;\n}\n",inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n position = shadow_setVertexPosition(geometry.position);\n ","fs:DECKGL_FILTER_COLOR":"\n color = shadow_filterShadowColor(color);\n "},getUniforms:(t={},e={})=>"viewport"in t&&(t.drawToShadowMap||t.shadowMaps&&t.shadowMaps.length>0)?function(t,e){const{shadowEnabled:n=!0}=t;if(!n||!t.shadowMatrices||!t.shadowMatrices.length)return{shadow_uDrawShadowMap:!1,shadow_uUseShadowMap:!1};const i={shadow_uDrawShadowMap:Boolean(t.drawToShadowMap),shadow_uUseShadowMap:!!t.shadowMaps&&t.shadowMaps.length>0,shadow_uColor:t.shadowColor||h,shadow_uLightId:t.shadowLightId||0,shadow_uLightCount:t.shadowMatrices.length},o=l({viewport:t.viewport,center:e.project_uCenter}),a=[],u=c({shadowMatrices:t.shadowMatrices,viewport:t.viewport}).slice();for(let n=0;n<t.shadowMatrices.length;n++){const i=u[n],l=i.clone().translate(new s.A(t.viewport.center).negate());e.project_uCoordinateSystem===r.rf.LNGLAT&&e.project_uProjectionMode===r.Kx.WEB_MERCATOR?(u[n]=l,a[n]=o):(u[n]=i.clone().multiplyRight(A),a[n]=l.transform(o))}for(let e=0;e<u.length;e++)i["shadow_uViewProjectionMatrices[".concat(e,"]")]=u[e],i["shadow_uProjectCenters[".concat(e,"]")]=a[e],t.shadowMaps&&t.shadowMaps.length>
20?i["shadow_uShadowMap".concat(e)]=t.shadowMaps[e]:i["shadow_uShadowMap".concat(e)]=t.dummyShadowMap;return i}(t,e):{}}},63086:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=(r=n(21580))&&r.__esModule?r:{default:r},o=n(82314);function s(t,e,n={}){if(!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");const r=o.getCoord.call(void 0,t),s=o.getGeom.call(void 0,e),a=s.type,u=e.bbox;let l=s.coordinates;if(u&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,u))return!1;"Polygon"===a&&(l=[l]);let c=!1;for(var h=0;h<l.length;++h){const t=i.default.call(void 0,r,l[h]);if(0===t)return!n.ignoreBoundary;t&&(c=!0)}return c}var a=s;e.booleanPointInPolygon=s,e.default=a},63367:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitPolygonMode=void 0;var r=g(n(63086)),i=g(n(8755)),o=g(n(81182)),s=g(n(46882)),a=n(89595),u=g(n(25128)),l=g(n(71123)),c=g(n(11866)),h=g(n(90227)),A=g(n(12848)),f=n(71169),d=n(96146),p=n(78768);function g(t){return t&&t.__esModule?t:{default:t}}function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function y(t,e){if(t){if("string"==typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function w(t,e){return w=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},w(t,e)}var E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&w(t,e)}(E,t);var e,n,d,g=(d=E,function(){var t,e=b(d);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=b(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function E(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),g.apply(this,arguments)}return e=E,(n=[{key:"calculateMapCoords",value:function(t,e,n){var r=n.modeConfig;if(!r||!r.lock90Degree||!t.length)return e;if(1===t.length){var i=t[0],o=this.getSelectedGeometry(n),s=(0,h.default)(o),d="FeatureCollection"===s.type?s.features:[s],p=Number.MAX_SAFE_INTEGER,g=null;if(d.forEach(function(t){var e=(0,A.default)(t,i),n=(0,l.default)(e,i);p>n&&(p=n,g=e)}),g){var m=(0,u.default)(i,g),v=(0,l.default)(i,e,{units:"meters"});return(0,c.default)(i,v,m,{units:"meters"}).geometry.coordinates}return e}var _,b,w=t[t.length-1],E=(_=(0,f.generatePointsParallelToLinePoints)(t[t.length-2],w,e),b=1,function(t){if(Array.isArray(t))return t}(_)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(_,b)||y(_,b)||function(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return(0,A.default)((0,a.lineString)([w,E]),e).geometry.coordinates}},{key:"getGuides",value:function(t){var e=this.getClickSequence(),n={type:"FeatureCollection",features:[]};if(0===e.length||!t.lastPointerMoveEvent)return n;var r,i=t.lastPointerMoveEvent.mapCoords;return n.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat((r=e,function(t){if(Array.isArray(t))return v(t)}(r)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(r)||y(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[this.calculateMapCoords(e,i,t)])}}),n}},{key:"handleClick",value:function(t,e){var n=this.getTentativeGuide(e),i=this.getSelectedGeometry(e);if(i){var o=this.getClickSequence();n&&"LineString"===n.geometry.type?o.push(n.geometry.coordinates[n.geometry.coordinates.length-1]):this.addClickSequence(t);var a={type:"Point",coordinates:o[o.length-1]},u=(0,r.default)(a,i);if(o.length>1&&n&&!u){if(this.resetClickSequence(),0===(0,s.default)(n,i).features.length)return;var l=this.splitPolygon(n,e);l&&e.onEdit(l)}}else console.warn("A polygon must be selected for splitting")}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}},{key:"splitPolygon",value:function(t,e){var n=this.getSelectedGeometry(e),r=e.selectedIndexes[0],s=e.modeConfig||{},a=s.gap,u=void 0===a?.1:a,l=s.units,c=void 0===l?"centimeters":l;0===u&&(u=.1,c="centimeters");var h=(0,o.default)(t,u,{units:c}),A=(0,i.default)(n,h);if(!A)return console.warn("Canceling edit. Split Polygon erased"),null;var f,d=A.geometry,g=d.type,m=d.coordinates;return f="Polygon"===g?m.map(function(t){return[t]}):m.reduce(function(t,e){return e.forEach(function(e){t.push([e])}),t},[]),{updatedData:new p.ImmutableFeatureCollection(e.data).replaceGeometry(r,{type:"MultiPolygon",coordinates:f}).getObject(),editType:"split",editContext:{featureIndexes:[r]}}}}])&&_(e.prototype,n),E}(d.GeoJsonEditMode);e.SplitPolygonMode=E},63564:(t,e,n)=>{"use strict";n.d(e,{A:()=>A});var r=n(55890),i=n(6105),o=n(31185),s=n(44454),a=n(94939),u=n(40822);const l={offset:"accessor.offset",stride:"accessor.stride",type:"accessor.type",size:"accessor.size",divisor:"accessor.divisor",normalized:"accessor.normalized",integer:"accessor.integer",instanced:"accessor.divisor",isInstanced:"accessor.divisor"},c={removedProps:{},replacedProps:{bytes:"byteLength"},deprecatedProps:l},h={removedProps:l};class A extends r.A{get[Symbol.toStringTag](){return"Buffer"}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.stubRemovedMethods("Buffer","v6.0",["layout","setLayout","getIndexedParameter"]),this.target=e.target||(this.gl.webgl2?36662:34962),this.initialize(e),Object.seal(this)}getElementCount(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.A.getBytesPerElement(t))}getVertexCount(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.A.getBytesPerVertex(t))}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ArrayBuffer.isView(t)&&(t={data:t}),Number.isFinite(t)&&(t={byteLength:t}),t=(0,u.N)("Buffer",t,c),this.usage=t.usage||35044,this.debugData=null,this.setAccessor(Object.assign({},t,t.accessor)),t.data?this._setData(t.data,t.offset,t.byteLength):this._setByteLength(t.byteLength||0),this}setProps(t){return"accessor"in(t=(0,u.N)("Buffer",t,h))&&this.setAccessor(t.accessor),this}setAccessor(t){return delete(t=Object.assign({},t)).buffer,this.accessor=new i.A(t),this}reallocate(t){return t>this.byteLength?(this._setByteLength(t),!0):(this.bytesUsed=t,!1)}setData(t){return this.initialize(t)}subData(t){ArrayBuffer.isView(t)&&(t={data:t});const{data:e,offset:n=0,srcOffset:r=0}=t,i=t.byteLength||t.length;(0,a.v)(e);const o=this.gl.webgl2?36663:this.target;return this.gl.bindBuffer(o,this.handle),0!==r||void 0!==i?((0,s.Dz)(this.gl),this.gl.bufferSubData(this.target,n,e,r,i)):this.gl.bufferSubData(o,n,e),this.gl.bindBuffer(o,null),this.debugData=null,this._inferType(e),this}copyData(t){let{sourceBuffer:e,readOffset:n=0,writeOffset:r=0,size:i}=t;const{gl:o}=this;return(0,s.Dz)(o),o.bindBuffer(36662,e.handle),o.bindBuffer(36663,this.handle),o.copyBufferSubData(36662,36663,n,r,i),o.bindBuffer(36662,null),o.bindBuffer(36663,null),this.debugData=null,this}getData(){let{dstData:t=null,srcByteOffset:e=0,dstOffset:n=0,length:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.Dz)(this.gl);const i=(0,o.Xj)(this.accessor.type||5126,{clamped:!1}),u=this._getAvailableElementCount(e),l=n;let c,h;t?(h=t.length,c=h-l):(c=Math.min(u,r||u),h=l+c);const A=Math.min(u,c);return r=r||A,(0,a.v)(r<=A),t=t||new i(h),this.gl.bindBuffer(36662,this.handle),this.gl.getBufferSubData(36662,e,t,n,r),this.gl.bindBuffer(36662,null),t}bind(){let{target:t=this.target,index:e=this.accessor&&this.accessor.index,offset:n=0,size:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 35345===t||35982===t?void 0!==r?this.gl.bindBufferRange(t,e,this.handle,n,r):((0,a.v)(0===n),this.gl.bindBufferBase(t,e,this.handle)):this.gl.bindBuffer(t,this.handle),this}unbind(){let{target:t=this.target,index:e=this.accessor&&this.accessor.index}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 35345===t||35982===t?this.gl.bindBufferBase(t,e,null):this.gl.bindBuffer(t,null),this}getDebugData(){return this.debugData?{data:this.debugData,changed:!1}:(this.debugData=this.getData({length:Math.min(10,this.byteLength)}),{data:this.debugData,changed:!0})}invalidateDebugData(){this.debugData=null}_setData(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.byteLength+e;(0,a.v)(ArrayBuffer.isView(t)),this._trackDeallocatedMemory();const r=this._getTarget();this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,this.usage),this.gl.bufferSubData(r,e,t),this.gl.bindBuffer(r,null),this.debugData=t.slice(0,10),this.bytesUsed=n,this._trackAllocatedMemory(n);const s=(0,o.jX)(t);return(0,a.v)(s),this.setAccessor(new i.A(this.accessor,{type:s})),this}_setByteLength(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.usage;(0,a.v)(t>=0),this._trackDeallocatedMemory();let n=t;0===t&&(n=new Float32Array(0));const r=this._getTarget();return this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,e),this.gl.bindBuffer(r,null),this.usage=e,this.debugData=null,this.bytesUsed=t,this._trackAllocatedMemory(t),this}_getTarget(){return this.gl.webgl2?36663:this.target}_getAvailableElementCount(t){const e=t/(0,o.Xj)(this.accessor.type||5126,{clamped:!1}).BYTES_PER_ELEMENT;return this.getElementCount()-e}_inferType(t){this.accessor.type||this.setAccessor(new i.A(this.accessor,{type:(0,o.jX)(t)}))}_createHandle(){return this.gl.createBuffer()}_deleteHandle(){this.gl.deleteBuffer(this.handle),this._trackDeallocatedMemory()}_getParameter(t){this.gl.bindBuffer(this.target,this.handle);const e=this.gl.getBufferParameter(this.target,t);return this.gl.bindBuffer(this.target,null),e}get type(){return s.Rm.deprecated("Buffer.type","Buffer.accessor.type")(),this.accessor.type}get bytes(){return s.Rm.deprecated("Buffer.bytes","Buffer.byteLength")(),this.byteLength}setByteLength(t){return s.Rm.deprecated("setByteLength","reallocate")(),this.reallocate(t)}updateAccessor(t){return s.Rm.deprecated("updateAccessor(...)","setAccessor(new Accessor(buffer.accessor, ...)")(),this.accessor=new i.A(this.accessor,t),this}}},63606:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var r=n(78345);function i(t,e={}){if(null!=t.bbox&&!0!==e.recompute)return t.bbox;const n=[1/0,1/0,-1/0,-1/0];return r.coordEach.call(void 0,t,t=>{n[0]>t[0]&&(n[0]=t[0]),n[1]>t[1]&&(n[1]=t[1]),n[2]<t[0]&&(n[2]=t[0]),n[3]<t[1]&&(n[3]=t[1])}),n}var o=i;e.bbox=i,e.default=o},63693:(t,e,n)=>{"use strict";var r=n(66986),i=n(5731),o="object"==typeof StopIteration?StopIteration:null;t.exports=function(t){if(!o)throw new i("this environment lacks StopIteration");r.set(t,"[[Done]]",!1);var e={next:function(){var t=r.get(this,"[[Iterator]]"),e=!!r.get(t,"[[Done]]");try{return{done:e,value:e?void 0:t.next()}}catch(e){if(r.set(t,"[[Done]]",!0),e!==o)throw e;return{done:!0,value:void 0}}}};return r.set(e,"[[Iterator]]",t),e}},64062:(t,e,n)=>{"use strict";n.d(e,{$A:()=>h,Bw:()=>o,Cc:()=>A,Il:()=>w,Om:()=>c,S8:()=>l,WQ:()=>a,Z0:()=>f,Z8:()=>m,eL:()=>g,ei:()=>d,fA:()=>s,g7:()=>v,gL:()=>p,jb:()=>_,lK:()=>b,uE:()=>E,vt:()=>i,x6:()=>y,ze:()=>u});var r=n(23172);function i(){var t=new r.tb(3);return r.tb!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function s(t,e,n){var i=new r.tb(3);return i[0]=t,i[1]=e,i[2]=n,i}function a(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function u(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function l(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function c(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function h(t,e,n){var r=e[0],i=e[1],o=e[2],s=n[0],a=n[1],u=n[2];return t[0]=i*u-o*a,t[1]=o*s-r*u,t[2]=r*a-i*s,t}function A(t,e,n,r){var i=e[0],o=e[1],s=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=s+r*(n[2]-s),t}function f(t,e,n){var r=e[0],i=e[1],o=e[2],s=n[3]*r+n[7]*i+n[11]*o+n[15];return s=s||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/s,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/s,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/s,t}function d(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function p(t,e,n){var r=n[0],i=n[1],o=n[2],s=n[3],a=e[0],u=e[1],l=e[2],c=i*l-o*u,h=o*a-r*l,A=r*u-i*a;return c+=c,h+=h,A+=A,t[0]=a+s*c+i*A-o*h,t[1]=u+s*h+o*c-r*A,t[2]=l+s*A+r*h-i*c,t}function g(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function m(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function y(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function v(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],s=e[1],a=e[2],u=Math.sqrt((n*n+r*r+i*i)*(o*o+s*s+a*a)),l=u&&c(t,e)/u;return Math.acos(Math.min(Math.max(l,-1),1))}var _=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},b=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t},w=o,E=function(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r};i()},64086:(t,e,n)=>{"use strict";n.d(e,{A:()=>S});var r=n(44341),i=n(95855),o=n(46164),s=n(23172),a=n(45878),u=n(64062),l=n(70911);function c(){var t=new s.tb(4);return s.tb!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function h(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function A(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3],a=n[0],u=n[1],l=n[2],c=n[3];return t[0]=r*c+s*a+i*l-o*u,t[1]=i*c+s*u+o*a-r*l,t[2]=o*c+s*l+r*u-i*a,t[3]=s*c-r*a-i*u-o*l,t}l.o8,l.fA,l.C,l.hZ;var f=l.WQ,d=l.hs,p=l.Om,g=l.Cc,m=l.Bw,y=l.m3,v=l.S8;l.t2;var _,b,w,E=(_=u.vt(),b=u.fA(1,0,0),w=u.fA(0,1,0),function(t,e,n){var r=u.Om(e,n);return r<-.999999?(u.$A(_,b,e),u.Il(_)<1e-6&&u.$A(_,w,e),u.S8(_,_),h(t,_,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(u.$A(_,e,n),t[0]=_[0],t[1]=_[1],t[2]=_[2],t[3]=1+r,v(t,t))});c(),c(),a.vt();const x=[0,0,0,1];class S extends r.A{constructor(t=0,e=0,n=0,r=1){super(-0,-0,-0,-0),Array.isArray(t)&&1===arguments.length?this.copy(t):this.set(t,e,n,r)}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}set(t,e,n,r){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this.check()}fromObject(t){return this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this.check()}fromMatrix3(t){return function(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,s=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*s+s]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+s]-e[3*s+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[s]=(e[3*s+i]+e[3*i+s])*n}}(this,t),this.check()}fromAxisRotation(t,e){return h(this,t,e),this.check()}identity(){var t;return(t=this)[0]=0,t[1]=0,t[2]=0,t[3]=1,this.check()}setAxisAngle(t,e){return this.fromAxisRotation(t,e)}get ELEMENTS(){return 4}get x(){return this[0]}set x(t){this[0]=(0,i.ws)(t)}get y(){return this[1]}set y(t){this[1]=(0,i.ws)(t)}get z(){return this[2]}set z(t){this[2]=(0,i.ws)(t)}get w(){return this[3]}set w(t){this[3]=(0,i.ws)(t)}len(){return m(this)}lengthSquared(){return y(this)}dot(t){return p(this,t)}rotationTo(t,e){return E(this,t,e),this.check()}add(t){return f(this,this,t),this.check()}calculateW(){var t,e,n,r;return t=this,e=this[0],n=this[1],r=this[2],t[0]=e,t[1]=n,t[2]=r,t[3]=Math.sqrt(Math.abs(1-e*e-n*n-r*r)),this.check()}conjugate(){var t,e;return e=this,(t=this)[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],this.check()}invert(){return function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=n*n+r*r+i*i+o*o,a=s?1/s:0;t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=o*a}(this,this),this.check()}lerp(t,e,n){return void 0===n?this.lerp(this,t,e):(g(this,t,e,n),this.check())}multiplyRight(t){return A(this,this,t),this.check()}multiplyLeft(t){return A(this,t,this),this.check()}normalize(){const t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}rotateX(t){return function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(n),u=Math.cos(n);t[0]=r*u+s*a,t[1]=i*u+o*a,t[2]=o*u-i*a,t[3]=s*u-r*a}(this,this,t),this.check()}rotateY(t){return function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(n),u=Math.cos(n);t[0]=r*u-o*a,t[1]=i*u+s*a,t[2]=o*u+r*a,t[3]=s*u-i*a}(this,this,t),this.check()}rotateZ(t){return function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(n),u=Math.cos(n);t[0]=r*u+i*a,t[1]=i*u-r*a,t[2]=o*u+s*a,t[3]=s*u-o*a}(this,this,t),this.check()}scale(t){return d(this,this,t),this.check()}slerp(t,e,n){let r,i,o;switch(arguments.length){case 1:({start:r=x,target:i,ratio:o}=t);break;case 2:r=this,i=t,o=e;break;default:r=t,i=e,o=n}return a=this,l=i,c=o,g=(u=r)[0],m=u[1],y=u[2],v=u[3],_=l[0],b=l[1],w=l[2],E=l[3],(A=g*_+m*b+y*w+v*E)<0&&(A=-A,_=-_,b=-b,w=-w,E=-E),1-A>s.p8?(h=Math.acos(A),f=Math.sin(h),d=Math.sin((1-c)*h)/f,p=Math.sin(c*h)/f):(d=1-c,p=c),a[0]=d
2*g+p*_,a[1]=d*m+p*b,a[2]=d*y+p*w,a[3]=d*v+p*E,this.check();var a,u,l,c,h,A,f,d,p,g,m,y,v,_,b,w,E}transformVector4(t,e=new o.A){return l.gL(e,t,this),(0,i.qk)(e,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(t,e){return this.setAxisAngle(t,e)}premultiply(t){return this.multiplyLeft(t)}multiply(t){return this.multiplyRight(t)}}},64259:t=>{const e=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(t,i={}){if(i=Object.assign({},r,i),!t||"string"!=typeof t)return t;let o=t.trim();if(void 0!==i.skipLike&&i.skipLike.test(o))return t;if("0"===t)return 0;if(i.hex&&e.test(o))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(o);if(-1!==o.search(/[eE]/)){const e=o.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(e){if(i.leadingZeros)o=(e[1]||"")+e[3];else if("0"!==e[2]||"."!==e[3][0])return t;return i.eNotation?Number(o):t}return t}{const e=n.exec(o);if(e){const n=e[1],r=e[2];let a=(s=e[3])&&-1!==s.indexOf(".")?("."===(s=s.replace(/0+$/,""))?s="0":"."===s[0]?s="0"+s:"."===s[s.length-1]&&(s=s.substr(0,s.length-1)),s):s;if(!i.leadingZeros&&r.length>0&&n&&"."!==o[2])return t;if(!i.leadingZeros&&r.length>0&&!n&&"."!==o[1])return t;if(i.leadingZeros&&r===t)return 0;{const e=Number(o),s=""+e;return-1!==s.search(/[eE]/)?i.eNotation?e:t:-1!==o.indexOf(".")?"0"===s&&""===a||s===a||n&&s==="-"+a?e:t:r?a===s||n+a===s?e:t:o===s||o===n+s?e:t}}return t}var s}},65104:(t,e,n)=>{"use strict";n.d(e,{A:()=>h,y:()=>c});var r=n(24586),i=n(34081),o=n(39025),s=n(22296),a=n(84075),u=n(463),l=n(47857);class c extends s.A{constructor(t){const{width:e,height:n,latitude:i,longitude:o,zoom:s,bearing:a=0,pitch:l=0,altitude:c=1.5,position:h=[0,0,0],maxZoom:A=20,minZoom:f=0,maxPitch:d=60,minPitch:p=0,startPanLngLat:g,startZoomLngLat:m,startRotatePos:y,startBearing:v,startPitch:_,startZoom:b,normalize:w=!0}=t;(0,u.A)(Number.isFinite(o)),(0,u.A)(Number.isFinite(i)),(0,u.A)(Number.isFinite(s)),super({width:e,height:n,latitude:i,longitude:o,zoom:s,bearing:a,pitch:l,altitude:c,maxZoom:A,minZoom:f,maxPitch:d,minPitch:p,normalize:w,position:h},{startPanLngLat:g,startZoomLngLat:m,startRotatePos:y,startBearing:v,startPitch:_,startZoom:b}),(0,r.A)(this,"makeViewport",void 0),this.makeViewport=t.makeViewport}panStart({pos:t}){return this._getUpdatedState({startPanLngLat:this._unproject(t)})}pan({pos:t,startPos:e}){const n=this.getState().startPanLngLat||this._unproject(e);if(!n)return this;const r=this.makeViewport(this.getViewportProps()).panByPosition(n,t);return this._getUpdatedState(r)}panEnd(){return this._getUpdatedState({startPanLngLat:null})}rotateStart({pos:t}){return this._getUpdatedState({startRotatePos:t,startBearing:this.getViewportProps().bearing,startPitch:this.getViewportProps().pitch})}rotate({pos:t,deltaAngleX:e=0,deltaAngleY:n=0}){const{startRotatePos:r,startBearing:i,startPitch:o}=this.getState();if(!r||void 0===i||void 0===o)return this;let s;return s=t?this._getNewRotation(t,r,o,i):{bearing:i+e,pitch:o+n},this._getUpdatedState(s)}rotateEnd(){return this._getUpdatedState({startBearing:null,startPitch:null})}zoomStart({pos:t}){return this._getUpdatedState({startZoomLngLat:this._unproject(t),startZoom:this.getViewportProps().zoom})}zoom({pos:t,startPos:e,scale:n}){let{startZoom:r,startZoomLngLat:o}=this.getState();if(o||(r=this.getViewportProps().zoom,o=this._unproject(e)||this._unproject(t)),!o)return this;const{maxZoom:s,minZoom:a}=this.getViewportProps();let u=r+Math.log2(n);u=(0,i.qE)(u,a,s);const l=this.makeViewport({...this.getViewportProps(),zoom:u});return this._getUpdatedState({zoom:u,...l.panByPosition(o,t)})}zoomEnd(){return this._getUpdatedState({startZoomLngLat:null,startZoom:null})}zoomIn(t=2){return this._zoomFromCenter(t)}zoomOut(t=2){return this._zoomFromCenter(1/t)}moveLeft(t=100){return this._panFromCenter([t,0])}moveRight(t=100){return this._panFromCenter([-t,0])}moveUp(t=100){return this._panFromCenter([0,t])}moveDown(t=100){return this._panFromCenter([0,-t])}
2rotateLeft(t=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing-t})}rotateRight(t=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing+t})}rotateUp(t=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch+t})}rotateDown(t=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch-t})}shortestPathFrom(t){const e=t.getViewportProps(),n={...this.getViewportProps()},{bearing:r,longitude:i}=n;return Math.abs(r-e.bearing)>180&&(n.bearing=r<0?r+360:r-360),Math.abs(i-e.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}applyConstraints(t){const{maxZoom:e,minZoom:n,zoom:r}=t;t.zoom=(0,i.qE)(r,n,e);const{maxPitch:o,minPitch:s,pitch:u}=t;t.pitch=(0,i.qE)(u,s,o);const{normalize:l=!0}=t;return l&&Object.assign(t,(0,a.CK)(t)),t}_zoomFromCenter(t){const{width:e,height:n}=this.getViewportProps();return this.zoom({pos:[e/2,n/2],scale:t})}_panFromCenter(t){const{width:e,height:n}=this.getViewportProps();return this.pan({startPos:[e/2,n/2],pos:[e/2+t[0],n/2+t[1]]})}_getUpdatedState(t){return new this.constructor({makeViewport:this.makeViewport,...this.getViewportProps(),...this.getState(),...t})}_unproject(t){const e=this.makeViewport(this.getViewportProps());return t&&e.unproject(t)}_getNewRotation(t,e,n,r){const o=t[0]-e[0],s=t[1]-e[1],a=t[1],u=e[1],{width:l,height:c}=this.getViewportProps(),h=o/l;let A=0;s>0?Math.abs(c-u)>5&&(A=s/(u-c)*1.2):s<0&&u>5&&(A=1-a/u),A=(0,i.qE)(A,-1,1);const{minPitch:f,maxPitch:d}=this.getViewportProps();let p=n;return A>0?p=n+A*(d-n):A<0&&(p=n-A*(f-n)),{pitch:p,bearing:r+180*h}}}class h extends o.A{constructor(...t){super(...t),(0,r.A)(this,"ControllerState",c),(0,r.A)(this,"transition",{transitionDuration:300,transitionInterpolator:new l.A({transitionProps:{compare:["longitude","latitude","zoom","bearing","pitch","position"],required:["longitude","latitude","zoom"]}})}),(0,r.A)(this,"dragMode","pan")}setProps(t){t.position=t.position||[0,0,0];const e=this.props;super.setProps(t),(!e||e.height!==t.height)&&this.updateViewport(new this.ControllerState({makeViewport:this.makeViewport,...t,...this.state}))}}},65132:(t,e,n)=>{"use strict";n.d(e,{pp:()=>h,K2:()=>c,a5:()=>A});var r=n(26909),i=n(24586);const o=new(n(8554).t)({id:"loaders.gl"});class s{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}var a=n(75784);const u={fetch:null,mimeType:void 0,nothrow:!1,log:new class{constructor(){(0,i.A)(this,"console",void 0),this.console=console}log(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.console.log.bind(this.console,...e)}info(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.console.info.bind(this.console,...e)}warn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.console.warn.bind(this.console,...e)}error(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.console.error.bind(this.console,...e)}},CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:a.Bd,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},l={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function c(){globalThis.loaders=globalThis.loaders||{};const{loaders:t}=globalThis;return t._state=t._state||{},t._state}const h=()=>{const t=c();return t.globalOptions=t.globalOptions||{...u},t.globalOptions};function A(t,e,n,r){return n=n||[],function(t,e){f(t,null,u,l,e);for(const n of e){const r=t&&t[n.id]||{},i=n.options&&n.options[n.id]||{},o=n.deprecatedOptions&&n.deprecatedOptions[n.id]||{};f(r,n.id,i,o,e)}}(t,n=Array.isArray(n)?n:[n]),function(t,e,n){const r={...t.options||{}};return function(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}(r,n),null===r.log&&(r.log=new s),p(r,h()),p(r,e),r}(e,t,r)}function f(t,e,n,i,s){const a=e||"Top level",u=e?"".concat(e,"."):"";for(const l in t){const c=!e&&(0,r.Gv)(t[l]);if(!(l in n)&&("baseUri"!==l||e)&&("workerUrl"!==l||!e))if(l in
2i)o.warn("".concat(a," loader option '").concat(u).concat(l,"' no longer supported, use '").concat(i[l],"'"))();else if(!c){const t=d(l,s);o.warn("".concat(a," loader option '").concat(u).concat(l,"' not recognized. ").concat(t))()}}}function d(t,e){const n=t.toLowerCase();let r="";for(const i of e)for(const e in i.options){if(t===e)return"Did you mean '".concat(i.id,".").concat(e,"'?");const o=e.toLowerCase();(n.startsWith(o)||o.startsWith(n))&&(r=r||"Did you mean '".concat(i.id,".").concat(e,"'?"))}return r}function p(t,e){for(const n in e)if(n in e){const i=e[n];(0,r.aC)(i)&&(0,r.aC)(t[n])?t[n]={...t[n],...e[n]}:t[n]=e[n]}}},65508:(t,e,n)=>{const r=n(37866),i=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function o(t,e,n){for(let r=0;r<e.length;r++)if(e[r]!==t[n+r+1])return!1;return!0}function s(t){if(r.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}t.exports=class{constructor(t){this.suppressValidationErr=!t,this.options=t||{}}readDocType(t,e){const n=Object.create(null);let r=0;if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,s=!1,a=!1,u="";for(;e<t.length;e++)if("<"!==t[e]||a)if(">"===t[e]){if(a?"-"===t[e-1]&&"-"===t[e-2]&&(a=!1,i--):i--,0===i)break}else"["===t[e]?s=!0:u+=t[e];else{if(s&&o(t,"!ENTITY",e)){let i,o;if(e+=7,[i,o,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),-1===o.indexOf("&")){if(!1!==this.options.enabled&&null!=this.options.maxEntityCount&&r>=this.options.maxEntityCount)throw new Error(`Entity count (${r+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);const t=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n[i]={regx:RegExp(`&${t};`,"g"),val:o},r++}}else if(s&&o(t,"!ELEMENT",e)){e+=8;const{index:n}=this.readElementExp(t,e+1);e=n}else if(s&&o(t,"!ATTLIST",e))e+=8;else if(s&&o(t,"!NOTATION",e)){e+=9;const{index:n}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=n}else{if(!o(t,"!--",e))throw new Error("Invalid DOCTYPE");a=!0}i++,u=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}readEntityExp(t,e){e=i(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e])&&'"'!==t[e]&&"'"!==t[e];)n+=t[e],e++;if(s(n),e=i(t,e),!this.suppressValidationErr){if("SYSTEM"===t.substring(e,e+6).toUpperCase())throw new Error("External entities are not supported");if("%"===t[e])throw new Error("Parameter entities are not supported")}let r="";if([e,r]=this.readIdentifierVal(t,e,"entity"),!1!==this.options.enabled&&null!=this.options.maxEntitySize&&r.length>this.options.maxEntitySize)throw new Error(`Entity "${n}" size (${r.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[n,r,--e]}readNotationExp(t,e){e=i(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;!this.suppressValidationErr&&s(n),e=i(t,e);const r=t.substring(e,e+6).toUpperCase();if(!this.suppressValidationErr&&"SYSTEM"!==r&&"PUBLIC"!==r)throw new Error(`Expected SYSTEM or PUBLIC, found "${r}"`);e+=r.length,e=i(t,e);let o=null,a=null;if("PUBLIC"===r)[e,o]=this.readIdentifierVal(t,e,"publicIdentifier"),'"'!==t[e=i(t,e)]&&"'"!==t[e]||([e,a]=this.readIdentifierVal(t,e,"systemIdentifier"));else if("SYSTEM"===r&&([e,a]=this.readIdentifierVal(t,e,"systemIdentifier"),!this.suppressValidationErr&&!a))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:o,systemIdentifier:a,index:--e}}readIdentifierVal(t,e,n){let r="";const i=t[e];if('"'!==i&&"'"!==i)throw new Error(`Expected quoted string, found "${i}"`);for(e++;e<t.length&&t[e]!==i;)r+=t[e],e++;if(t[e]!==i)throw new Error(`Unterminated ${n} value`);return[++e,r]}readElementExp(t,e){e=i(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;if(!this.suppressValidationErr&&!r.isName(n))throw new Error(`Invalid element name: "${n}"`);let s="";if("E"===t[e=i(t,e)]&&o(t,"MPTY",e))e+=4;else if("A"===t[e]&&o(t,"NY",e))e+=2;else if("("===t[e]){for(e++;e<t.length&&")"!==t[e];)s+=t[e],e++;if(")"!==t[e])throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[e]}"`);return{elementName:n,contentModel:s.trim(),index:e}}readAttlistExp(t,e){e=i(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;s(n),e=i(t,e);let r="";for(;e<t.length&&!/\s/.test(t[e]);)r+=t[e],e++;if(!s(r))throw new Error(`Invalid attribute name: "${r}"`);e=i(t,e);let o="";if("NOTATION"===t.substring(e,e+8).toUpperCase()){if(o="NOTATION","("!==t[e=i(t,e+=8)])throw new Error(`Expected '(', found "${t[e]}"`);e++;let n=[];for(;e<t.length&&")"!==t[e];){let r="";for(;e<t.length&&"|"!==t[e]&&")"!==t[e];)r+=t[e],e++;if(r=r.trim(),!s(r))throw new Error(`Invalid notation name: "${r}"`);n.push(r),"|"===t[e]&&(e++,e=i(t,e))}if(")"!==t[e])throw new Error("Unterminated list of notations");e++,o+=" ("+n.join("|")+")"}else{for(;e<t.length&&!/\s/.test(t[e]);)o+=t[e],e++;const n=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!n.includes(o.toUpperCase()))throw new Error(`Invalid attribute type: "${o}"`)}e=i(t,e);let a="";return"#REQUIRED"===t.substring(e,e+8).toUpperCase()?(a="#REQUIRED",e+=8):"#IMPLIED"===t.substring(e,e+7).toUpperCase()?(a="#IMPLIED",e+=7):[e,a]=this.readIdentifierVal(t,e,"ATTLIST"),{elementName:n,attributeName:r,attributeType:o,defaultValue:a,index:e}}}},65695:(t,e,n)=>{"use strict";n.d(e,{A:()=>E});var r=n(24586),i=n(5424),o=n(66785),s=n(82869),a=n(72718),u=n(52336),l=n(88330),c=n(8033);const h={circle:{type:a.A,props:{filled:"filled",stroked:"stroked",lineWidthMaxPixels:"lineWidthMaxPixels",lineWidthMinPixels:"lineWidthMinPixels",lineWidthScale:"lineWidthScale",lineWidthUnits:"lineWidthUnits",pointRadiusMaxPixels:"radiusMaxPixels",pointRadiusMinPixels:"radiusMinPixels",pointRadiusScale:"radiusScale",pointRadiusUnits:"radiusUnits",pointAntialiasing:"antialiasing",pointBillboard:"billboard",getFillColor:"getFillColor",getLineColor:"getLineColor",getLineWidth:"getLineWidth",getPointRadius:"getRadius"}},icon:{type:s.A,props:{iconAtlas:"iconAtlas",iconMapping:"iconMapping",iconSizeMaxPixels:"sizeMaxPixels",iconSizeMinPi
2xels:"sizeMinPixels",iconSizeScale:"sizeScale",iconSizeUnits:"sizeUnits",iconAlphaCutoff:"alphaCutoff",iconBillboard:"billboard",getIcon:"getIcon",getIconAngle:"getAngle",getIconColor:"getColor",getIconPixelOffset:"getPixelOffset",getIconSize:"getSize"}},text:{type:u.A,props:{textSizeMaxPixels:"sizeMaxPixels",textSizeMinPixels:"sizeMinPixels",textSizeScale:"sizeScale",textSizeUnits:"sizeUnits",textBackground:"background",textBackgroundPadding:"backgroundPadding",textFontFamily:"fontFamily",textFontWeight:"fontWeight",textLineHeight:"lineHeight",textMaxWidth:"maxWidth",textOutlineColor:"outlineColor",textOutlineWidth:"outlineWidth",textWordBreak:"wordBreak",textCharacterSet:"characterSet",textBillboard:"billboard",textFontSettings:"fontSettings",getText:"getText",getTextAngle:"getAngle",getTextColor:"getColor",getTextPixelOffset:"getPixelOffset",getTextSize:"getSize",getTextAnchor:"getTextAnchor",getTextAlignmentBaseline:"getAlignmentBaseline",getTextBackgroundColor:"getBackgroundColor",getTextBorderColor:"getBorderColor",getTextBorderWidth:"getBorderWidth"}}},A={type:l.A,props:{lineWidthUnits:"widthUnits",lineWidthScale:"widthScale",lineWidthMinPixels:"widthMinPixels",lineWidthMaxPixels:"widthMaxPixels",lineJointRounded:"jointRounded",lineCapRounded:"capRounded",lineMiterLimit:"miterLimit",lineBillboard:"billboard",getLineColor:"getColor",getLineWidth:"getWidth"}},f={type:c.A,props:{extruded:"extruded",filled:"filled",wireframe:"wireframe",elevationScale:"elevationScale",material:"material",_full3d:"_full3d",getElevation:"getElevation",getFillColor:"getFillColor",getLineColor:"getLineColor"}};function d({type:t,props:e}){const n={};for(const r in e)n[r]=t.defaultProps[e[r]];return n}function p(t,e){const{transitions:n,updateTriggers:r}=t.props,i={updateTriggers:{},transitions:n&&{getPosition:n.geometry}};for(const o in e){const s=e[o];let a=t.props[o];o.startsWith("get")&&(a=t.getSubLayerAccessor(a),i.updateTriggers[s]=r[o],n&&(i.transitions[s]=n[o])),i[s]=a}return i}var g=n(23615);function m(t,e,n={}){const r={pointFeatures:[],lineFeatures:[],polygonFeatures:[],polygonOutlineFeatures:[]},{startRow:i=0,endRow:o=t.length}=n;for(let n=i;n<o;n++){const i=t[n],{geometry:o}=i;if(o)if("GeometryCollection"===o.type){g.A.assert(Array.isArray(o.geometries),"GeoJSON does not have geometries array");const{geometries:t}=o;for(let o=0;o<t.length;o++)y(t[o],r,e,i,n)}else y(o,r,e,i,n)}return r}function y(t,e,n,r,i){const{type:o,coordinates:s}=t,{pointFeatures:a,lineFeatures:u,polygonFeatures:l,polygonOutlineFeatures:c}=e;if(function(t,e){let n=v[t];for(g.A.assert(n,"Unknown GeoJSON type ".concat(t));e&&--n>0;)e=e[0];return e&&Number.isFinite(e[0])}(o,s))switch(o){case"Point":a.push(n({geometry:t},r,i));break;case"MultiPoint":s.forEach(t=>{a.push(n({geometry:{type:"Point",coordinates:t}},r,i))});break;case"LineString":u.push(n({geometry:t},r,i));break;case"MultiLineString":s.forEach(t=>{u.push(n({geometry:{type:"LineString",coordinates:t}},r,i))});break;case"Polygon":l.push(n({geometry:t},r,i)),s.forEach(t=>{c.push(n({geometry:{type:"LineString",coordinates:t}},r,i))});break;case"MultiPolygon":s.forEach(t=>{l.push(n({geometry:{type:"Polygon",coordinates:t}},r,i)),t.forEach(t=>{c.push(n({geometry:{type:"LineString",coordinates:t}},r,i))})})}else g.A.warn("".concat(o," coordinates are malformed"))()}const v={Point:1,MultiPoint:2,LineString:2,MultiLineString:3,Polygon:3,MultiPolygon:4};function _(t){return t.geometry.coordinates}const b=["points","linestrings","polygons"],w={...d(h.circle),...d(h.icon),...d(h.text),...d(A),...d(f),stroked:!0,filled:!0,extruded:!1,wireframe:!1,_full3d:!1,iconAtlas:{type:"object",value:null},iconMapping:{type:"object",value:{}},getIcon:{type:"accessor",value:t=>t.properties.icon},getText:{type:"accessor",value:t=>t.properties.text},pointType:"circle",getRadius:{deprecatedFor:"getPointRadius"}};class E extends i.A{initializeState(){this.state={layerProps:{},features:{}}}updateState({props:t,changeFlags:e}){if(!e.dataChanged)return;const{data:n}=this.props,r=n&&"points"in n&&"polygons"in n&&"lines"in n;this.setState({binary:r}),r?this._updateStateBinary({props:t,changeFlags:e}):this._updateStateJSON({props:t,changeFlags:e})}_updateStateBinary({props:t,changeFlags:e}){const n=function(t,e){const n={points:{},lines:{},polygons:{},polygonsOutline:{}},{points:r,lines:i,polygons:o}=t,s=function(t,e){const n={points:null,lines:null,polygons:null};for(const r in n){const i=t[r].globalFeatureIds.value;n[r]=new Uint8ClampedArray(3*i.length);const o=[];for(let t=0;t<i.length;t++)e(i[t],o),n[r][3*t+0]=o[0],n[r][3*t+1]=o[1],n[r][3*t+2]=o[2]}return n}(t,e);return n.points.data={length:r.positions.value.length/r.positions.size,attributes:{...r.attributes,getPosition:r.positions,instancePickingColors:{size:3,value:s.points}},properties:r.properties,numericProps:r.numericProps,featureIds:r.featureIds},n.lines.data={length:i.pathIndices.value.length-1,startIndices:i.pathIndices.value,attributes:{...i.attributes,getPath:i.positions,instancePickingColors:{size:3,value:s.lines}},properties:i.properties,numericProps:i.numericProps,featureIds:i.featureIds}
2,n.lines._pathType="open",n.polygons.data={length:o.polygonIndices.value.length-1,startIndices:o.polygonIndices.value,attributes:{...o.attributes,getPolygon:o.positions,pickingColors:{size:3,value:s.polygons}},properties:o.properties,numericProps:o.numericProps,featureIds:o.featureIds},n.polygons._normalize=!1,o.triangles&&(n.polygons.data.attributes.indices=o.triangles.value),n.polygonsOutline.data={length:o.primitivePolygonIndices.value.length-1,startIndices:o.primitivePolygonIndices.value,attributes:{...o.attributes,getPath:o.positions,instancePickingColors:{size:3,value:s.polygons}},properties:o.properties,numericProps:o.numericProps,featureIds:o.featureIds},n.polygonsOutline._pathType="open",n}(t.data,this.encodePickingColor);this.setState({layerProps:n})}_updateStateJSON({props:t,changeFlags:e}){const n=function(t){if(Array.isArray(t))return t;switch(g.A.assert(t.type,"GeoJSON does not have type"),t.type){case"Feature":return[t];case"FeatureCollection":return g.A.assert(Array.isArray(t.features),"GeoJSON does not have features array"),t.features;default:return[{geometry:t}]}}(t.data),r=this.getSubLayerRow.bind(this);let i={};const s={};if(Array.isArray(e.dataChanged)){const t=this.state.features;for(const e in t)i[e]=t[e].slice(),s[e]=[];for(const a of e.dataChanged){const e=m(n,r,a);for(const n in t)s[n].push((0,o.J)({data:i[n],getIndex:t=>t.__source.index,dataRange:a,replace:e[n]}))}}else i=m(n,r);const a=function(t,e){const n={points:{},lines:{},polygons:{},polygonsOutline:{}},{pointFeatures:r,lineFeatures:i,polygonFeatures:o,polygonOutlineFeatures:s}=t;return n.points.data=r,n.points._dataDiff=e.pointFeatures&&(()=>e.pointFeatures),n.points.getPosition=_,n.lines.data=i,n.lines._dataDiff=e.lineFeatures&&(()=>e.lineFeatures),n.lines.getPath=_,n.polygons.data=o,n.polygons._dataDiff=e.polygonFeatures&&(()=>e.polygonFeatures),n.polygons.getPolygon=_,n.polygonsOutline.data=s,n.polygonsOutline._dataDiff=e.polygonOutlineFeatures&&(()=>e.polygonOutlineFeatures),n.polygonsOutline.getPath=_,n}(i,s);this.setState({features:i,featuresDiff:s,layerProps:a})}getPickingInfo(t){const e=super.getPickingInfo(t),{index:n,sourceLayer:r}=e;return e.featureType=b.find(t=>r.id.startsWith("".concat(this.id,"-").concat(t,"-"))),n>=0&&r.id.startsWith("".concat(this.id,"-points-text"))&&this.state.binary&&(e.index=this.props.data.points.globalFeatureIds.value[n]),e}_updateAutoHighlight(t){const e="".concat(this.id,"-points-"),n="points"===t.featureType;for(const r of this.getSubLayers())r.id.startsWith(e)===n&&r.updateAutoHighlight(t)}_renderPolygonLayer(){const{extruded:t,wireframe:e}=this.props,{layerProps:n}=this.state,r="polygons-fill",i=this.shouldRenderSubLayer(r,n.polygons.data)&&this.getSubLayerClass(r,f.type);if(i){const o=p(this,f.props),s=t&&e;return s||delete o.getLineColor,o.updateTriggers.lineColors=s,new i(o,this.getSubLayerProps({id:r,updateTriggers:o.updateTriggers}),n.polygons)}return null}_renderLineLayers(){const{extruded:t,stroked:e}=this.props,{layerProps:n}=this.state,r="polygons-stroke",i="linestrings",o=!t&&e&&this.shouldRenderSubLayer(r,n.polygonsOutline.data)&&this.getSubLayerClass(r,A.type),s=this.shouldRenderSubLayer(i,n.lines.data)&&this.getSubLayerClass(i,A.type);if(o||s){const t=p(this,A.props);return[o&&new o(t,this.getSubLayerProps({id:r,updateTriggers:t.updateTriggers}),n.polygonsOutline),s&&new s(t,this.getSubLayerProps({id:i,updateTriggers:t.updateTriggers}),n.lines)]}return null}_renderPointLayers(){const{pointType:t}=this.props,{layerProps:e,binary:n}=this.state;let{highlightedObjectIndex:r}=this.props;!n&&Number.isFinite(r)&&(r=e.points.data.findIndex(t=>t.__source.index===r));const i=new Set(t.split("+")),o=[];for(const t of i){const i="points-".concat(t),s=h[t],a=s&&this.shouldRenderSubLayer(i,e.points.data)&&this.getSubLayerClass(i,s.type);if(a){const u=p(this,s.props);let l=e.points;if("text"===t&&n){const{instancePickingColors:t,...e}=l.data.attributes;l={...l,data:{...l.data,attributes:e}}}o.push(new a(u,this.getSubLayerProps({id:i,updateTriggers:u.updateTriggers,highlightedObjectIndex:r}),l))}}return o}renderLayers(){const{extruded:t}=this.props,e=this._renderPolygonLayer();return[!t&&e,this._renderLineLayers(),this._renderPointLayers(),t&&e]}getSubLayerAccessor(t){const{binary:e}=this.state;return e&&"function"==typeof t?(e,n)=>{const{data:r,index:i}=n,o=function(t,e){if(!t)return null;const n="startIndices"in t?t.startIndices[e]:e,r=t.featureIds.value[n];return-1!==n?function(t,e,n){const r={properties:{...t.properties[e]}};for(const e in t.numericProps)r.properties[e]=t.numericProps[e].value[n];return r}(t,r,n):null}(r,i);return t(o,n)}:super.getSubLayerAccessor(t)}}(0,r.A)(E,"layerName","GeoJsonLayer"),(0,r.A)(E,"defaultProps",w)},65747:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var r=n(80062),i=n(12848),o=n(82314),s=n(78345),a=n(41522);function u(t,e,n={}){var u,c;const h=null!=(u=n.method)?u:"geodesic",A=null!=(c=n.units)?c:"kilometers";if(!t)throw new Error("pt is required");if(Array.isArray(t)?t=r.point.call(void 0,t):"Point"===t.type?t=r.feature.call(void 0,t):o.featureOf.call(void 0,t,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=r.lineString.call(void 0,e):"LineString"===e.type?e=r.feature.call(void 0,e):o.featureOf.call(void 0,e,"LineString","line");let f=1/0;const d=t.geometry.coordinates;return s.segmentEach.call(void 0,e,t=>{if(t){const e=t.geometry.coordinates[0],n=t.geometry.coordinates[1],o=function(t,e,n,o){if("geodesic"===o.method)return i.nearestPointOnLine.call(void 0,r.lineString.call(void 0,[e,n]).geometry,t,{units:"degrees"}).properties.pointDistance;const s=[n[0]-e[0],n[1]-e[1]],u=l([t[0]-e[0],t[1]-e[1]],s);if(u<=0)return a.rhumbDistance.call(void 0,t,e,{units:"degrees"});const c=l(s,s);if(c<=u)return a.rhumbDistance.call(void 0,t,n,{units:"degrees"});const h=u/c,A=[e[0]+h*s[0],e[1]+h*s[1]];return a.rhumbDistance.call(void 0,t,A,{units:"degrees"})}(d,e,n,{method:h});o<f&&(f=o)}}),r.convertLength.call(void 0,f,"degrees",A)}function l(t,e){return t[0]*e[0]+t[1]*e[1]}var c=u;e.default=c,e.pointToLineDistance=u},65758:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(55890);const i="EXT_color_buffer_float",o={33189:{bpp:2},33190:{gl2:!0,bpp:3},36012:{gl2:!0,bpp:4},36168:{bpp:1},34041:{bpp:4},35056:{gl2:!0,bpp:4},36013:{gl2:!0,bpp:5},32854:{bpp:2},36194:{bpp:2},32855:{bpp:2},33321:{gl2:!0,bpp:1},33330:{gl2:!0,bpp:1},33329:{gl2:!0,bpp:1},33332:{gl2:!0,bpp:2},33331:{gl2:!0,bpp:2},33334:{gl2:!0,bpp:4},33333:{gl2:!0,bpp:4},33323:{gl2:!0,bpp:2},33336:{gl2:!0,bpp:2},33335:{gl2:!0,bpp:2},33338:{gl2:!0,bpp:4},33337:{gl2:!0,bpp:4},33340:{gl2:!0,bpp:8},33339:{gl2:!0,bpp:8},32849:{gl2:!0,bpp:3},32856:{gl2:!0,bpp:4},32857:{gl2:!0,bpp:4},36220:{gl2:!0,bpp:4},36238:{gl2:!0,bpp:4},36975:{gl2:!0,bpp:4},36214:{gl2:!0,bpp:8},36232:{gl2:!0,bpp:8},36226:{gl2:!0,bpp:16},36208:{gl2:!0,bpp:16},33325:{gl2:i,bpp:2},33327:{gl2:i,bpp:4},34842:{gl2:i,bpp:8},33326:{gl2:i,bpp:4},33328:{gl2:i,bpp:8},34836:{gl2:i,bpp:16},35898:{gl2:i,bpp:4}};var s=n(44454),a=n(94939);class u extends r.A{get[Symbol.toStringTag](){return"Renderbuffer"}static isSupported(t){let{format:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{format:null};return!e||function(t,e,n){const r=n[e];if(!r)return!1;const i=(0,s.C6)(t)&&r.gl2||r.gl1;return"string"==typeof i?t.getExtension(i):i}(t,e,o)}static getSamplesForFormat(t,e){let{format:n}=e;return t.getInternalformatParameter(36161,n,32937)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.initialize(e),Object.seal(this)}initialize(t){let{format:e,width:n=1,height:r=1,samples:i=0}=t;return(0,a.v)(e,"Needs format"),this._trackDeallocatedMemory(),this.gl.bindRenderbuffer(36161,this.handle),0!==i&&(0,s.C6)(this.gl)?this.gl.renderbufferStorageMultisample(36161,i,e,n,r):this.gl.renderbufferStorage(36161,e,n,r),this.format=e,this.width=n,this.height=r,this.samples=i,this._trackAllocatedMemory(this.width*this.height*(this.samples||1)*o[this.format].bpp),this}resize(t){let{width:e,height:n}=t;return e!==this.width||n!==this.height?this.initialize({width:e,height:n,format:this.format,samples:this.samples}):this}_createHandle(){return this.gl.createRenderbuffer()}_deleteHandle(){this.gl.deleteRenderbuffer(this.handle),this._trackDeallocatedMemory()}_bindHandle(t){this.gl.bindRenderbuffer(36161,t)}_syncHandle(t){this.format=this.getParameter(36164),this.width=this.getParameter(36162),this.height=this.getParameter(36163),this.samples=this.getParameter(36011)}_getParameter(t){return this.gl.bindRenderbuffer(36161,this.handle),this.gl.getRenderbufferParameter(36161,t)}}},66224:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}
2){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invali
2d");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},66298:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},66515:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,FUNC_ADD:32774,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,BLEND_COLOR:32773,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,VENDOR:7936,RENDERER:7937,VERSION:7938,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,BROWSER_DEFAULT_WEBGL:37444,STATIC_DRAW:35044,STREAM_DRAW:35040,DYNAMIC_DRAW:35048,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,CULL_FACE:2884,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,BLEND:3042,DEPTH_TEST:2929,DITHER:3024,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,SCISSOR_TEST:3089,STENCIL_TEST:2960,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CONTEXT_LOST_WEBGL:37442,CW:2304,CCW:2305,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,
2UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,COMPILE_STATUS:35713,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_ATTRIBUTES:35721,ACTIVE_UNIFORMS:35718,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,ALWAYS:519,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,GEQUAL:518,NOTEQUAL:517,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,TEXTURE_WIDTH:4096,TEXTURE_HEIGHT:4097,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,MAX_3D_TEXTURE_SIZE:32883,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,MAX_TEXTURE_LOD_BIAS:34045,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,RASTERIZER_DISCARD:35977,VERTEX_ARRAY_BINDING:34229,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,MAX_ELEMENT_INDEX:36203,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,RGB9_E5:35901,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8U
2I:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2UI:36975,TEXTURE_IMMUTABLE_FORMAT:37167,TEXTURE_IMMUTABLE_LEVELS:33503,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,UNSIGNED_INT_24_8:34042,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,INT_2_10_10_10_REV:36255,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,MAX_SAMPLES:36183,SAMPLER_BINDING:35097,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,UNSIGNED_NORMALIZED:35863,SIGNED_NORMALIZED:36764,VERTEX_ATTRIB_ARRAY_INTEGER:35069,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,DEPTH24_STENCIL8:35056,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRI
2DE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,COLOR:6144,DEPTH:6145,STENCIL:6146,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,INVALID_INDEX:4294967295,TIMEOUT_IGNORED:-1,MAX_CLIENT_WAIT_TIMEOUT_WEBGL:37447,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,UNMASKED_VENDOR_WEBGL:37445,UNMASKED_RENDERER_WEBGL:37446,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,TEXTURE_MAX_ANISOTROPY_EXT:34046,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35986,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,UNSIGNED_INT_24_8_WEBGL:34042,HALF_FLOAT_OES:36193,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863,MIN_EXT:32775,MAX_EXT:32776,SRGB_EXT:35904,SRGB_ALPHA_EXT:35906,SRGB8_ALPHA8_EXT:35907,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067,COLOR_ATTACHMENT4_WEBGL:36068,COLOR_ATTACHMENT5_WEBGL:36069,COLOR_ATTACHMENT6_WEBGL:36070,COLOR_ATTACHMENT7_WEBGL:36071,COLOR_ATTACHMENT8_WEBGL:36072,COLOR_ATTACHMENT9_WEBGL:36073,COLOR_ATTACHMENT10_WEBGL:36074,COLOR_ATTACHMENT11_WEBGL:36075,COLOR_ATTACHMENT12_WEBGL:36076,COLOR_ATTACHMENT13_WEBGL:36077,COLOR_ATTACHMENT14_WEBGL:36078,COLOR_ATTACHMENT15_WEBGL:36079,DRAW_BUFFER0_WEBGL:34853,DRAW_BUFFER1_WEBGL:34854,DRAW_BUFFER2_WEBGL:34855,DRAW_BUFFER3_WEBGL:34856,DRAW_BUFFER4_WEBGL:34857,DRAW_BUFFER5_WEBGL:34858,DRAW_BUFFER6_WEBGL:34859,DRAW_BUFFER7_WEBGL:34860,DRAW_BUFFER8_WEBGL:34861,DRAW_BUFFER9_WEBGL:34862,DRAW_BUFFER10_WEBGL:34863,DRAW_BUFFER11_WEBGL:34864,DRAW_BUFFER12_WEBGL:34865,DRAW_BUFFER13_WEBGL:34866,DRAW_BUFFER14_WEBGL:34867,DRAW_BUFFER15_WEBGL:34868,MAX_COLOR_ATTACHMENTS_WEBGL:36063,MAX_DRAW_BUFFERS_WEBGL:34852,VERTEX_ARRAY_BINDING_OES:34229,QUERY_COUNTER_BITS_EXT:34916,CURRENT_QUERY_EXT:34917,QUERY_RESULT_EXT:34918,QUERY_RESULT_AVAILABLE_EXT:34919,TIME_ELAPSED_EXT:35007,TIMESTAMP_EXT:36392,GPU_DISJOINT_EXT:36795}},66785:(t,e,n)=>{"use strict";function r({data:t,getIndex:e,dataRange:n,replace:r}){const{startRow:i=0,endRow:o=1/0}=n,s=t.length;let a=s,u=s;for(let n=0;n<s;n++){const r=e(t[n]);if(a>n&&r>=i&&(a=n),r>=o){u=n;break}}let l=a;const c=u-a!==r.length?t.slice(u):void 0;for(let e=0;e<r.length;e++)t[l++]=r[e];if(c){for(let e=0;e<c.length;e++)t[l++]=c[e];t.length=l}return{startRow:a,endRow:a+r.length}}n.d(e,{J:()=>r})},66986:(t,e,n)=>{"use strict";var r=n(78554),i=n(77575)(),o=n(3468),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`O` is not an object");if("string"!=typeof e)throw new o("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new o("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`O` is not an object");
2if("string"!=typeof e)throw new o("`slot` must be a string");var n=i.get(t);return n&&n["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`O` is not an object");if("string"!=typeof e)throw new o("`slot` must be a string");var n=i.get(t);return!!n&&r(n,"$"+e)},set:function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`O` is not an object");if("string"!=typeof e)throw new o("`slot` must be a string");var r=i.get(t);r||(r={},i.set(t,r)),r["$"+e]=n}};Object.freeze&&Object.freeze(s),t.exports=s},67069:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(2592),i=n(94939);const o={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6};class s{static get DRAW_MODE(){return o}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=(0,r.Ld)("geometry"),drawMode:n=o.TRIANGLES,attributes:i={},indices:s=null,vertexCount:a=null}=t;this.id=e,this.drawMode=0|n,this.attributes={},this.userData={},this._setAttributes(i,s),this.vertexCount=a||this._calculateVertexCount(this.attributes,this.indices)}get mode(){return this.drawMode}getVertexCount(){return this.vertexCount}getAttributes(){return this.indices?{indices:this.indices,...this.attributes}:this.attributes}
2_print(t){return"Geometry ".concat(this.id," attribute ").concat(t)}_setAttributes(t,e){e&&(this.indices=ArrayBuffer.isView(e)?{value:e,size:1}:e);for(const e in t){let n=t[e];n=ArrayBuffer.isView(n)?{value:n}:n,(0,i.v)(ArrayBuffer.isView(n.value),"".concat(this._print(e),": must be typed array or object with value as typed array")),"POSITION"!==e&&"positions"!==e||n.size||(n.size=3),"indices"===e?((0,i.v)(!this.indices),this.indices=n):this.attributes[e]=n}return this.indices&&void 0!==this.indices.isIndexed&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this}_calculateVertexCount(t,e){if(e)return e.value.length;let n=1/0;for(const e in t){const r=t[e],{value:i,size:o,constant:s}=r;!s&&i&&o>=1&&(n=Math.min(n,i.length/o))}return(0,i.v)(Number.isFinite(n)),n}}},67267:(t,e,n)=>{"use strict";n.d(e,{U:()=>c,w:()=>h});var r=n(32968),i=n(93314);const o=Math.PI/180,s=new Float32Array(16),a=new Float32Array(12);function u(t,e,n){const r=e[0]*o,i=e[1]*o,s=e[2]*o,a=Math.sin(s),u=Math.sin(r),l=Math.sin(i),c=Math.cos(s),h=Math.cos(r),A=Math.cos(i),f=n[0],d=n[1],p=n[2];t[0]=f*A*h,t[1]=f*l*h,t[2]=f*-u,t[3]=d*(-l*c+A*u*a),t[4]=d*(A*c+l*u*a),t[5]=d*h*a,t[6]=p*(l*a+A*u*c),t[7]=p*(-A*a+l*u*c),t[8]=p*h*c}function l(t){return t[0]=t[0],t[1]=t[1],t[2]=t[2],t[3]=t[4],t[4]=t[5],t[5]=t[6],t[6]=t[8],t[7]=t[9],t[8]=t[10],t[9]=t[12],t[10]=t[13],t[11]=t[14],t.subarray(0,12)}const c={size:12,accessor:["getOrientation","getScale","getTranslation","getTransformMatrix"],shaderAttributes:{instanceModelMatrix__LOCATION_0:{size:3,elementOffset:0},instanceModelMatrix__LOCATION_1:{size:3,elementOffset:3},instanceModelMatrix__LOCATION_2:{size:3,elementOffset:6},instanceTranslation:{size:3,elementOffset:9}},update(t,{startRow:e,endRow:n}){const{data:i,getOrientation:o,getScale:c,getTranslation:h,getTransformMatrix:A}=this.props,f=Array.isArray(A),d=f&&16===A.length,p=Array.isArray(c),g=Array.isArray(o),m=Array.isArray(h),y=d||!f&&Boolean(A(i[0]));t.constant=y?d:g&&p&&m;const v=t.value;if(t.constant){let e;y?(s.set(A),e=l(s)):(e=a,u(e,o,c),e.set(h,9)),t.value=new Float32Array(e)}else{let f=e*t.size;const{iterable:_,objectInfo:b}=(0,r.X)(i,e,n);for(const t of _){let e;b.index++,y?(s.set(d?A:A(t,b)),e=l(s)):(e=a,u(e,g?o:o(t,b),p?c:c(t,b)),e.set(m?h:h(t,b),9)),v[f++]=e[0],v[f++]=e[1],v[f++]=e[2],v[f++]=e[3],v[f++]=e[4],v[f++]=e[5],v[f++]=e[6],v[f++]=e[7],v[f++]=e[8],v[f++]=e[9],v[f++]=e[10],v[f++]=e[11]}}}};function h(t,e){return e===i.rf.CARTESIAN||e===i.rf.METER_OFFSETS||e===i.rf.DEFAULT&&!t.isGeospatial}},67432:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},67970:(t,e,n)=>{"use strict";n.d(e,{A:()=>f});var r=n(44454),i=n(14061),o=n(94939),s=n(55890),a=n(10836),u=n(46429);class l extends s.A{get[Symbol.toStringTag](){return"Query"}static isSupported(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(0,r.C6)(t),i=(0,a.QN)(t,u.G.TIMER_QUERY);let s=n||i;for(const t of e)switch(t){case"queries":s=s&&n;break;case"timers":s=s&&i;break;default:(0,o.v)(!1)}return s}constructor(t){super(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.target=null,this._queryPending=!1,this._pollingPromise=null,Object.seal(this)}beginTimeElapsedQuery(){return this.begin(35007)}beginOcclusionQuery(){let{conservative:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.begin(t?36202:35887)}beginTransformFeedbackQuery(){return this.begin(35976)}begin(t){return this._queryPending||(this.target=t,this.gl2.beginQuery(this.target,this.handle)),this}end(){return this._queryPending||this.target&&(this.gl2.endQuery(this.target),this.target=null,this._queryPending=!0),this}isResultAvailable(){if(!this._queryPending)return!1;const t=this.gl2.getQueryParameter(this.handle,34919);return t&&(this._queryPending=!1),t}isTimerDisjoint(){return this.gl2.getParameter(36795)}getResult(){return this.gl2.getQueryParameter(this.handle,34918)}getTimerMilliseconds(){return this.getResult()/1e6}createPoll(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;if(this._pollingPromise)return this._pollingPromise;let e=0;return this._pollingPromise=new Promise((n,r)=>{const i=()=>{this.isResultAvailable()?(n(this.getResult()),this._pollingPromise=null):e++>t?(r("Timed out"),this._pollingPromise=null):requestAnimationFrame(i)};requestAnimationFrame(i)}),this._pollingPromise}_createHandle(){return l.isSupported(this.gl)?this.gl2.createQuery():null}_deleteHandle(){this.gl2.deleteQuery(this.handle)}}var c=n(48091);const h=(0,n(90669).A)()&&"undefined"!=typeof document;let A=0;class f{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{onCreateContext:e=t=>(0,r.XZ)(t),onAddHTML:n=null,onInitialize:o=()=>{},onRender:s=()=>{},onFinalize:a=()=>{},onError:u,gl:l=null,glOptions:c={},debug:h=!1,createFramebuffer:f=!1,autoResizeViewport:d=!0,autoResizeDrawingBuffer:p=!0,stats:g=i.dJ.get("animation-loop-".concat(A++))}=t;let{useDevicePixels:m=!0}=t;"useDevicePixelRatio"in t&&(r.Rm.deprecated("useDevicePixelRatio","useDevicePixels")(),m=t.useDevicePixelRatio),this.props={onCreateContext:e,onAddHTML:n,onInitialize:o,onRender:s,onFinalize:a,onError:u,gl:l,glOptions:c,debug:h,createFramebuffer:f},this.gl=l,this.needsRedraw=null,this.timeline=null,this.stats=g,this.cpuTime=this.stats.get("CPU Time"),this.gpuTime=this.stats.get("GPU Time"),this.frameRate=this.stats.get("Frame Rate"),this._initialized=!1,this._running=!1,this._animationFrameId=null,this._nextFramePromise=null,this._resolveNextFrame=null,this._cpuStartTime=0,this.setProps({autoResizeViewport:d,autoResizeDrawingBuffer:p,useDevicePixels:m}),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this._pageLoadPromise=null,this._onMousemove=this._onMousemove.bind(this),this._onMouseleave=this._onMouseleave.bind(this)}delete(){this.stop(),this._setDisplay(null)}setNeedsRedraw(t){return(0,o.v)("string"==typeof t),this.needsRedraw=this.needsRedraw||t,this}setProps(t){return"autoResizeViewport"in t&&(this.autoResizeViewport=t.autoResizeViewport),"autoResizeDrawingBuffer"in t&&(this.autoResizeDrawingBuffer=t.autoResizeDrawingBuffer),"useDevicePixels"in t&&(this.useDevicePixels=t.useDevicePixels),this}start(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._running)return this;this._running=!0;const e=this._getPageLoadPromise().then(()=>!this._running||this._initialized?null:(this._createWebGLContext(t),this._createFramebuffer(),this._startEventHandling(),this._initializeCallbackData(),this._updateCallbackData(),this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._gpuTimeQuery=l.isSupported(this.gl,["timers"])?new l(this.gl):null,this._initialized=!0,this.onInitialize(this.animationProps))).then(t=>{this._running&&(this._addCallbackData(t||{}),!1!==t&&this._startLoop())});return this.props.onError&&e.catch(this.props.onError),this}redraw(){return this.isContextLost()||(this._beginTimers(),this._setupFrame(),this._updateCallbackData(),this._renderFrame(this.animationProps),this._clearNeedsRedraw(),this.offScreen&&this.gl.commit&&this.gl.commit(),this._resolveNextFrame&&(this._resolveNextFrame(this),this._nextFramePromise=null,this._resolveNextFrame=null),this._endTimers()),this}stop(){return this._running&&(this._finalizeCallbackData(),this._cancelAnimationFrame(this._animationFrameId),this._nextFramePromise=null,this._resolveNextFrame=null,this._animationFrameId=null,this._running=!1),this}attachTimeline(t){return this.timeline=t,this.timeline}detachTimeline(){this.timeline=null}waitForRender(){return this.setNeedsRedraw("waitForRender"),this._nextFramePromise||(this._nextFramePromise=new Promise(t=>{this._resolveNextFrame=t})),this._nextFramePromise}async toDataURL(){return this.setNeedsRedraw("toDataURL"),await this.waitForRender(),this.gl.canvas.toDataURL()}isContextLost(){return this.gl.isContextLost()}onCreateContext(){return this.props.onCreateContext(...arguments)}onInitialize(){return this.props.onInitialize(...arguments)}onRender(){return this.props.onRender(...arguments)}onFinalize(){return this.props.onFinalize(...arguments)}getHTMLControlValue(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=document.getElementById(t);return n?Number(n.value):e}
2setViewParameters(){return r.Rm.removed("AnimationLoop.setViewParameters","AnimationLoop.setProps")(),this}_startLoop(){const t=()=>{this._running&&(this.redraw(),this._animationFrameId=this._requestAnimationFrame(t))};this._cancelAnimationFrame(this._animationFrameId),this._animationFrameId=this._requestAnimationFrame(t)}_getPageLoadPromise(){return this._pageLoadPromise||(this._pageLoadPromise=h?new Promise((t,e)=>{h&&"complete"===document.readyState?t(document):window.addEventListener("load",()=>{t(document)})}):Promise.resolve({})),this._pageLoadPromise}_setDisplay(t){this.display&&(this.display.delete(),this.display.animationLoop=null),t&&(t.animationLoop=this),this.display=t}_cancelAnimationFrame(t){return this.display&&this.display.cancelAnimationFrame?this.display.cancelAnimationFrame(t):(e=t,"undefined"!=typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame(e):clearTimeout(e));var e}_requestAnimationFrame(t){if(this._running)return this.display&&this.display.requestAnimationFrame?this.display.requestAnimationFrame(t):(e=t,"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,1e3/60));var e}_renderFrame(){this.display?this.display._renderFrame(...arguments):this.onRender(...arguments)}_clearNeedsRedraw(){this.needsRedraw=null}_setupFrame(){this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._resizeFramebuffer()}_initializeCallbackData(){this.animationProps={gl:this.gl,stop:this.stop,canvas:this.gl.canvas,framebuffer:this.framebuffer,useDevicePixels:this.useDevicePixels,needsRedraw:null,startTime:Date.now(),engineTime:0,tick:0,tock:0,time:0,_timeline:this.timeline,_loop:this,_animationLoop:this,_mousePosition:null}}_updateCallbackData(){const{width:t,height:e,aspect:n}=this._getSizeAndAspect();t===this.animationProps.width&&e===this.animationProps.height||this.setNeedsRedraw("drawing buffer resized"),n!==this.animationProps.aspect&&this.setNeedsRedraw("drawing buffer aspect changed"),this.animationProps.width=t,this.animationProps.height=e,this.animationProps.aspect=n,this.animationProps.needsRedraw=this.needsRedraw,this.animationProps.engineTime=Date.now()-this.animationProps.startTime,this.timeline&&this.timeline.update(this.animationProps.engineTime),this.animationProps.tick=Math.floor(this.animationProps.time/1e3*60),this.animationProps.tock++,this.animationProps.time=this.timeline?this.timeline.getTime():this.animationProps.engineTime,this.animationProps._offScreen=this.offScreen}_finalizeCallbackData(){this.onFinalize(this.animationProps)}_addCallbackData(t){"object"==typeof t&&null!==t&&(this.animationProps=Object.assign({},this.animationProps,t))}_createWebGLContext(t){if(this.offScreen=t.canvas&&"undefined"!=typeof OffscreenCanvas&&t.canvas instanceof OffscreenCanvas,t=Object.assign({},t,this.props.glOptions),this.gl=this.props.gl?(0,r.uZ)(this.props.gl,t):this.onCreateContext(t),!(0,r.uF)(this.gl))throw new Error("AnimationLoop.onCreateContext - illegal context returned");(0,r.AB)(this.gl),this._createInfoDiv()}_createInfoDiv(){if(this.gl.canvas&&this.props.onAddHTML){const t=document.createElement("div");document.body.appendChild(t),t.style.position="relative";const e=document.createElement("div");e.style.position="absolute",e.style.left="10px",e.style.bottom="10px",e.style.width="300px",e.style.background="white",t.appendChild(this.gl.canvas),t.appendChild(e);const n=this.props.onAddHTML(e);n&&(e.innerHTML=n)}}_getSizeAndAspect(){const t=this.gl.drawingBufferWidth,e=this.gl.drawingBufferHeight;let n=1;const{canvas:r}=this.gl;return r&&r.clientHeight?n=r.clientWidth/r.clientHeight:t>0&&e>0&&(n=t/e),{width:t,height:e,aspect:n}}_resizeViewport(){this.autoResizeViewport&&this.gl.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}_resizeCanvasDrawingBuffer(){this.autoResizeDrawingBuffer&&(0,r.ZA)(this.gl,{useDevicePixels:this.useDevicePixels})}_createFramebuffer(){this.props.createFramebuffer&&(this.framebuffer=new c.A(this.gl))}_resizeFramebuffer(){this.framebuffer&&this.framebuffer.resize({width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight})}_beginTimers(){this.frameRate.timeEnd(),this.frameRate.timeStart(),this._gpuTimeQuery&&this._gpuTimeQuery.isResultAvailable()&&!this._gpuTimeQuery.isTimerDisjoint(
2)&&this.stats.get("GPU Time").addTime(this._gpuTimeQuery.getTimerMilliseconds()),this._gpuTimeQuery&&this._gpuTimeQuery.beginTimeElapsedQuery(),this.cpuTime.timeStart()}_endTimers(){this.cpuTime.timeEnd(),this._gpuTimeQuery&&this._gpuTimeQuery.end()}_startEventHandling(){const{canvas:t}=this.gl;t&&(t.addEventListener("mousemove",this._onMousemove),t.addEventListener("mouseleave",this._onMouseleave))}_onMousemove(t){this.animationProps._mousePosition=[t.offsetX,t.offsetY]}_onMouseleave(t){this.animationProps._mousePosition=null}}},68100:(t,e,n)=>{"use strict";n.d(e,{KU:()=>o,pH:()=>I,zD:()=>R,Ay:()=>S,VI:()=>L,ko:()=>s});var r=n(14041);const i=r.createContext(null),o=t=>{const[e,n]=(0,r.useState)({}),o=(0,r.useCallback)((t,e="default")=>{n(n=>{if("current"===e)throw new Error("'current' cannot be used as map id");if(n[e])throw new Error(`Multiple maps with the same id: ${e}`);return{...n,[e]:t}})},[]),s=(0,r.useCallback)((t="default")=>{n(e=>{if(e[t]){const n={...e};return delete n[t],n}return e})},[]);return r.createElement(i.Provider,{value:{maps:e,onMapMount:o,onMapUnmount:s}},t.children)};function s(){var t;const e=null===(t=(0,r.useContext)(i))||void 0===t?void 0:t.maps,n=(0,r.useContext)(w);return(0,r.useMemo)(()=>({...e,current:null==n?void 0:n.map}),[e,n])}function a(t){return{longitude:t.center.lng,latitude:t.center.lat,zoom:t.zoom,pitch:t.pitch,bearing:t.bearing,padding:t.padding}}function u(t,e){const n=e.viewState||e;let r=!1;if("longitude"in n&&"latitude"in n){const e=t.center;t.center=new e.constructor(n.longitude,n.latitude),r=r||e!==t.center}if("zoom"in n){const e=t.zoom;t.zoom=n.zoom,r=r||e!==t.zoom}if("bearing"in n){const e=t.bearing;t.bearing=n.bearing,r=r||e!==t.bearing}if("pitch"in n){const e=t.pitch;t.pitch=n.pitch,r=r||e!==t.pitch}return n.padding&&!t.isPaddingEqual(n.padding)&&(r=!0,t.padding=n.padding),r}const l=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function c(t){if(!t)return null;if("string"==typeof t)return t;if("toJS"in t&&(t=t.toJS()),!t.layers)return t;const e={};for(const n of t.layers)e[n.id]=n;const n=t.layers.map(t=>{const n=e[t.ref];let r=null;if("interactive"in t&&(r={...t},delete r.interactive),n){r=r||{...t},delete r.ref;for(const t of l)t in n&&(r[t]=n[t])}return r||t});return{...t,layers:n}}function h(t,e){if(t===e)return!0;if(!t||!e)return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!h(t[n],e[n]))return!1;return!0}if(Array.isArray(e))return!1;if("object"==typeof t&&"object"==typeof e){const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const r of n){if(!e.hasOwnProperty(r))return!1;if(!h(t[r],e[r]))return!1}return!0}return!1}const A={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},f={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},d={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},p=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],g=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class m{constructor(t,e,n){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=t=>{const e=this.props[d[t.type]];e&&e(t)},this._onPointerEvent=t=>{"mousemove"!==t.type&&"mouseout"!==t.type||this._updateHover(t);const e=this.props[A[t.type]];e&&(this.props.interactiveLayerIds&&"mouseover"!==t.type&&"mouseout"!==t.type&&(t.features=this._hoveredFeatures||this._queryRenderedFeatures(t.point)),e(t),delete t.features)},this._onCameraEvent=t=>{if(!this._internalUpdate){const e=this.props[f[t.type]];e&&e(t)}
2t.type in this._deferredEvents&&(this._deferredEvents[t.type]=!1)},this._MapClass=t,this.props=e,this._initialize(n)}get map(){return this._map}get transform(){return this._renderTransform}setProps(t){const e=this.props;this.props=t;const n=this._updateSettings(t,e);n&&this._createShadowTransform(this._map);const r=this._updateSize(t),i=this._updateViewState(t,!0);this._updateStyle(t,e),this._updateStyleComponents(t,e),this._updateHandlers(t,e),(n||r||i&&!this._map.isMoving())&&this.redraw()}static reuse(t,e){const n=m.savedMaps.pop();if(!n)return null;const r=n.map,i=r.getContainer();for(e.className=i.className;i.childNodes.length>0;)e.appendChild(i.childNodes[0]);r._container=e,n.setProps({...t,styleDiffing:!1}),r.resize();const{initialViewState:o}=t;return o&&(o.bounds?r.fitBounds(o.bounds,{...o.fitBoundsOptions,duration:0}):n._updateViewState(o,!1)),r.isStyleLoaded()?r.fire("load"):r.once("styledata",()=>r.fire("load")),r.triggerRepaint(),n}_initialize(t){const{props:e}=this,n={...e,...e.initialViewState,accessToken:e.mapboxAccessToken||y()||null,container:t,style:c(e.mapStyle)},r=n.initialViewState||n.viewState||n;if(Object.assign(n,{center:[r.longitude||0,r.latitude||0],zoom:r.zoom||0,pitch:r.pitch||0,bearing:r.bearing||0}),e.gl){const t=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=t,e.gl)}const i=new this._MapClass(n);r.padding&&i.setPadding(r.padding),e.cursor&&(i.getCanvas().style.cursor=e.cursor),this._createShadowTransform(i);const o=i._render;i._render=t=>{this._inRender=!0,o.call(i,t),this._inRender=!1};const s=i._renderTaskQueue.run;i._renderTaskQueue.run=t=>{s.call(i._renderTaskQueue,t),this._onBeforeRepaint()},i.on("render",()=>this._onAfterRepaint());const a=i.fire;i.fire=this._fireEvent.bind(this,a),i.on("resize",()=>{this._renderTransform.resize(i.transform.width,i.transform.height)}),i.on("styledata",()=>this._updateStyleComponents(this.props,{})),i.on("sourcedata",()=>this._updateStyleComponents(this.props,{}));for(const t in A)i.on(t,this._onPointerEvent);for(const t in f)i.on(t,this._onCameraEvent);for(const t in d)i.on(t,this._onEvent);this._map=i}recycle(){const t=this.map.getContainer().querySelector("[mapboxgl-children]");null==t||t.remove(),m.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;!this._inRender&&t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_createShadowTransform(t){const e=function(t){const e=t.clone();return e.pixelsToGLUnits=t.pixelsToGLUnits,e}(t.transform);t.painter.transform=e,this._renderTransform=e}_updateSize(t){const{viewState:e}=t;if(e){const t=this._map;if(e.width!==t.transform.width||e.height!==t.transform.height)return t.resize(),!0}return!1}_updateViewState(t,e){if(this._internalUpdate)return!1;const n=this._map,r=this._renderTransform,{zoom:i,pitch:o,bearing:s}=r,l=n.isMoving();l&&(r.cameraElevationReference="sea");const c=u(r,{...a(n.transform),...t});if(l&&(r.cameraElevationReference="ground"),c&&e){const t=this._deferredEvents;t.move=!0,t.zoom||(t.zoom=i!==r.zoom),t.rotate||(t.rotate=s!==r.bearing),t.pitch||(t.pitch=o!==r.pitch)}return l||u(n.transform,t),c}_updateSettings(t,e){const n=this._map;let r=!1;for(const i of p)i in t&&!h(t[i],e[i])&&(r=!0,n[`set${i[0].toUpperCase()}${i.slice(1)}`](t[i]));return r}_updateStyle(t,e){if(t.cursor!==e.cursor&&(this._map.getCanvas().style.cursor=t.cursor),t.mapStyle!==e.mapStyle){const e={diff:t.styleDiffing};return"localIdeographFontFamily"in t&&(e.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(c(t.mapStyle),e),!0}return!1}_updateStyleComponents(t,e){const n=this._map;let r=!1;return n.style.loaded()&&("light"in t&&!h(t.light,e.light)&&(r=!0,n.setLight(t.light)),"fog"in t&&!h(t.fog,e.fog)&&(r=!0,n.setFog(t.fog)),"terrain"in t&&!h(t.terrain,e.terrain)&&(t.terrain&&!n.getSource(t.terrain.source)||(r=!0,n.setTerrain(t.terrain)))),r}_updateHandlers(t,e){const n=this._map;let r=!1;for(const i of g){const o=t[i];h(o,e[i])||(r=!0,o?n[i].enable(o):n[i].disable())}return r}_queryRenderedFeatures(t){const e=this._map,{interactiveLayerIds:n=[]}=this.props;try{return e.queryRenderedFeatures(t,{layers:n.filter(e.getLayer.bind(e))})}catch(t){return[]}}_updateHover(t){var e;const{props:n}=this;if(n.interactiveLayerIds&&(n.onMouseMove||n.onMouseEnter||n.onMouseLeave)){const n=t.type,r=(null===(e=this._hoveredFeatures)||void 0===e?void 0:e.length)>0,i=this._queryRenderedFeatures(t.point),o=i.length>0;!o&&r&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=i,o&&!r&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=n}else this._hoveredFeatures=null}_fireEvent(t,e,n){const r=this._map,i=r.transform,o="string"==typeof e?e:e.type;return"move"===o&&this._updateViewState(this.props,!1),o in f&&("object"==typeof e&&(e.viewState=a(i)),this._map.isMoving())?(r.transform=this._renderTransform,t.call(r,e,n),r.transform=i,r):(t.call(r,e,n),r)}_onBeforeRepaint(){const t=this._map;this._internalUpdate=!0;for(const e in this._deferredEvents)this._deferredEvents[e]&&t.fire(e);this._internalUpdate=!1;const e=this._map.transform;this._map.transform=this._renderTransform,this._onAfterRepaint=()=>{this._map.transform=e}}}function y(){let t=null;if("undefined"!=typeof location){const e=/access_token=([^&\/]*)/.exec(location.search);t=e&&e[1]}try{t=t||"MISSING_ENV_VAR".MapboxAccessToken}catch(t){}try{t=t||"MISSING_ENV_VAR".REACT_APP_MAPBOX_ACCESS_TOKEN}catch(t){}return t}m.savedMaps=[];
2const v=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];const _="undefined"!=typeof document?r.useLayoutEffect:r.useEffect,b=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"],w=r.createContext(null),E={minZoom:0,maxZoom:22,minPitch:0,maxPitch:60,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,mapStyle:{version:8,sources:{},layers:[]},styleDiffing:!0,projection:"mercator",renderWorldCopies:!0,onError:t=>console.error(t.error),RTLTextPlugin:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"},x=(0,r.forwardRef)((t,e)=>{const o=(0,r.useContext)(i),[s,a]=(0,r.useState)(null),u=(0,r.useRef)(),{current:l}=(0,r.useRef)({mapLib:null,map:null});(0,r.useEffect)(()=>{const e=t.mapLib;let r,i=!0;return Promise.resolve(e||n.e(2709).then(n.t.bind(n,42709,23))).then(e=>{if(i){if(e.Map||(e=e.default),!e||!e.Map)throw new Error("Invalid mapLib");if(function(t,e){for(const n of b)n in e&&(t[n]=e[n]);e.RTLTextPlugin&&t.getRTLTextPluginStatus&&"unavailable"===t.getRTLTextPluginStatus()&&t.setRTLTextPlugin(e.RTLTextPlugin,t=>{t&&console.error(t)},!1)}(e,t),!e.supported(t))throw new Error("Map is not supported by this browser");t.reuseMaps&&(r=m.reuse(t,u.current)),r||(r=new m(e.Map,t,u.current)),l.map=function(t,e){if(!t)return null;const n=t.map,r={getMap:()=>n,getCenter:()=>t.transform.center,getZoom:()=>t.transform.zoom,getBearing:()=>t.transform.bearing,getPitch:()=>t.transform.pitch,getPadding:()=>t.transform.padding,getBounds:()=>t.transform.getBounds(),project:n=>t.transform.locationPoint(e.LngLat.convert(n)),unproject:n=>t.transform.pointLocation(e.Point.convert(n)),queryTerrainElevation:(e,r)=>{const i=n.transform;n.transform=t.transform;const o=n.queryTerrainElevation(e,r);return n.transform=i,o}};for(const t of function(t){const e=new Set;let n=t;for(;n;){for(const r of Object.getOwnPropertyNames(n))"_"!==r[0]&&"function"==typeof t[r]&&"fire"!==r&&"setEventedParent"!==r&&e.add(r);n=Object.getPrototypeOf(n)}return Array.from(e)}(n))t in r||v.includes(t)||(r[t]=n[t].bind(n));return r}(r,e),l.mapLib=e,a(r),null==o||o.onMapMount(l.map,t.id)}}).catch(e=>{t.onError({type:"error",target:null,originalEvent:null,error:e})}),()=>{i=!1,r&&(null==o||o.onMapUnmount(t.id),t.reuseMaps?r.recycle():r.destroy())}},[]),_(()=>{s&&s.setProps(t)}),(0,r.useImperativeHandle)(e,()=>l.map,[s]);const c=(0,r.useMemo)(()=>({position:"relative",width:"100%",height:"100%",...t.style}),[t.style]);return r.createElement("div",{id:t.id,ref:u,style:c},s&&r.createElement(w.Provider,{value:l},r.createElement("div",{"mapboxgl-children":"",style:{height:"100%"}},t.children)))});x.displayName="Map",x.defaultProps=E;const S=x;var T=n(43144);const P=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function C(t,e){if(!t||!e)return;const n=t.style;for(const t in e){const r=e[t];Number.isFinite(r)&&!P.test(t)?n[t]=`${r}px`:n[t]=r}}function M(t){const{map:e,mapLib:n}=(0,r.useContext)(w),i=(0,r.useRef)({props:t});i.current.props=t;const o=(0,r.useMemo)(()=>{let e=!1;r.Children.forEach(t.children,t=>{t&&(e=!0)});const s={...t,element:e?document.createElement("div"):null},a=new n.Marker(s).setLngLat([t.longitude,t.latitude]);return a.getElement().addEventListener("click",t=>{var e,n;null===(n=(e=i.current.props).onClick)||void 0===n||n.call(e,{type:"click",target:a,originalEvent:t})}),a.on("dragstart",t=>{var e,n;const r=t;r.lngLat=o.getLngLat(),null===(n=(e=i.current.props).onDragStart)||void 0===n||n.call(e,r)}),a.on("drag",t=>{var e,n;const r=t;r.lngLat=o.getLngLat(),null===(n=(e=i.current.props).onDrag)||void 0===n||n.call(e,r)}),a.on("dragend",t=>{var e,n;const r=t;r.lngLat=o.getLngLat(),null===(n=(e=i.current.props).onDragEnd)||void 0===n||n.call(e,r)}),a},[]);return(0,r.useEffect)(()=>(o.addTo(e.getMap()),()=>{o.remove()}),[]),(0,r.useEffect)(()=>{C(o.getElement(),t.style)}
2,[t.style]),o.getLngLat().lng===t.longitude&&o.getLngLat().lat===t.latitude||o.setLngLat([t.longitude,t.latitude]),t.offset&&!function(t,e){const n=Array.isArray(t)?t[0]:t?t.x:0,r=Array.isArray(t)?t[1]:t?t.y:0,i=Array.isArray(e)?e[0]:e?e.x:0,o=Array.isArray(e)?e[1]:e?e.y:0;return n===i&&r===o}(o.getOffset(),t.offset)&&o.setOffset(t.offset),o.isDraggable()!==t.draggable&&o.setDraggable(t.draggable),o.getRotation()!==t.rotation&&o.setRotation(t.rotation),o.getRotationAlignment()!==t.rotationAlignment&&o.setRotationAlignment(t.rotationAlignment),o.getPitchAlignment()!==t.pitchAlignment&&o.setPitchAlignment(t.pitchAlignment),o.getPopup()!==t.popup&&o.setPopup(t.popup),(0,T.createPortal)(t.children,o.getElement())}M.defaultProps={draggable:!1,popup:null,rotation:0,rotationAlignment:"auto",pitchAlignment:"auto"};const I=r.memo(M);function O(t){return new Set(t?t.trim().split(/\s+/):[])}const R=r.memo(function(t){const{map:e,mapLib:n}=(0,r.useContext)(w),i=(0,r.useMemo)(()=>document.createElement("div"),[]),o=(0,r.useRef)({props:t});o.current.props=t;const s=(0,r.useMemo)(()=>{const e={...t},r=new n.Popup(e).setLngLat([t.longitude,t.latitude]);return r.once("open",t=>{var e,n;null===(n=(e=o.current.props).onOpen)||void 0===n||n.call(e,t)}),r},[]);if((0,r.useEffect)(()=>{const t=t=>{var e,n;null===(n=(e=o.current.props).onClose)||void 0===n||n.call(e,t)};return s.on("close",t),s.setDOMContent(i).addTo(e.getMap()),()=>{s.off("close",t),s.isOpen()&&s.remove()}},[]),(0,r.useEffect)(()=>{C(s.getElement(),t.style)},[t.style]),s.isOpen()&&(s.getLngLat().lng===t.longitude&&s.getLngLat().lat===t.latitude||s.setLngLat([t.longitude,t.latitude]),t.offset&&!h(s.options.offset,t.offset)&&s.setOffset(t.offset),s.options.anchor===t.anchor&&s.options.maxWidth===t.maxWidth||(s.options.anchor=t.anchor,s.setMaxWidth(t.maxWidth)),s.options.className!==t.className)){const e=O(s.options.className),n=O(t.className);for(const t of e)n.has(t)||s.removeClassName(t);for(const t of n)e.has(t)||s.addClassName(t);s.options.className=t.className}return(0,T.createPortal)(t.children,i)}),L=function(t,e,n,i){const o=(0,r.useContext)(w),s=(0,r.useMemo)(()=>t(o),[]);return(0,r.useEffect)(()=>{const t=i||n||e,r="function"==typeof e&&"function"==typeof n?e:null,a="function"==typeof n?n:"function"==typeof e?e:null,{map:u}=o;return u.hasControl(s)||(u.addControl(s,null==t?void 0:t.position),r&&r(o)),()=>{a&&a(o),u.hasControl(s)&&u.removeControl(s)}},[]),s};r.memo(function(t){const e=L(({mapLib:e})=>new e.AttributionControl(t),{position:t.position});return(0,r.useEffect)(()=>{C(e._container,t.style)},[t.style]),null}),r.memo(function(t){const e=L(({mapLib:e})=>new e.FullscreenControl({container:t.containerId&&document.getElementById(t.containerId)}),{position:t.position});return(0,r.useEffect)(()=>{C(e._controlContainer,t.style)},[t.style]),null});const B=(0,r.forwardRef)((t,e)=>{const n=(0,r.useRef)({props:t}),i=L(({mapLib:e})=>{const r=new e.GeolocateControl(t),i=r._setupUI;return r._setupUI=t=>{r._container.hasChildNodes()||i(t)},r.on("geolocate",t=>{var e,r;null===(r=(e=n.current.props).onGeolocate)||void 0===r||r.call(e,t)}),r.on("error",t=>{var e,r;null===(r=(e=n.current.props).onError)||void 0===r||r.call(e,t)}),r.on("outofmaxbounds",t=>{var e,r;null===(r=(e=n.current.props).onOutOfMaxBounds)||void 0===r||r.call(e,t)}),r.on("trackuserlocationstart",t=>{var e,r;null===(r=(e=n.current.props).onTrackUserLocationStart)||void 0===r||r.call(e,t)}),r.on("trackuserlocationend",t=>{var e,r;null===(r=(e=n.current.props).onTrackUserLocationEnd)||void 0===r||r.call(e,t)}),r},{position:t.position});return n.current.props=t,(0,r.useImperativeHandle)(e,()=>({trigger:()=>i.trigger()}),[]),(0,r.useEffect)(()=>{C(i._container,t.style)},[t.style]),null});function k(t){const e=L(({mapLib:e})=>new e.ScaleControl(t),{position:t.position});return e.options.unit===t.unit&&e.options.maxWidth===t.maxWidth||(e.options.maxWidth=t.maxWidth,e.setUnit(t.unit)),(0,r.useEffect)(()=>{C(e._container,t.style)},[t.style]),null}B.displayName="GeolocateControl",r.memo(B),r.memo(function(t){const e=L(({mapLib:e})=>new e.NavigationControl(t),{position:t.position});return(0,r.useEffect)(()=>{C(e._container,t.style)}
2,[t.style]),null}),k.defaultProps={unit:"metric",maxWidth:100},r.memo(k)},68239:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendLineStringMode=void 0;var r=n(96146),i=n(78768);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(c,t);var e,n,r,l=(r=c,function(){var t,e=a(r);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),l.apply(this,arguments)}return e=c,(n=[{key:"getSingleSelectedLineString",value:function(t){var e=this.getSelectedGeometry(t);return e&&"LineString"===e.type?e:null}},{key:"handleClick",value:function(t,e){var n=e.selectedIndexes,r=this.getSingleSelectedLineString(e);if(r){var o=[r.coordinates.length],s=e.modeConfig;s&&s.drawAtFront&&(o=[0]);var a=n[0],u=new i.ImmutableFeatureCollection(e.data).addPosition(a,o,t.mapCoords).getObject();e.onEdit({updatedData:u,editType:"addPosition",editContext:{featureIndexes:[a],positionIndexes:o,position:t.mapCoords}})}else console.warn("ExtendLineStringMode only supported for single LineString selection")}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]},n=this.getSingleSelectedLineString(t);if(!n)return e;var r,i=t.lastPointerMoveEvent&&t.lastPointerMoveEvent.mapCoords,o=t.modeConfig;return r=o&&o.drawAtFront?n.coordinates[0]:n.coordinates[n.coordinates.length-1],e.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r,i]}}),e}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}}])&&s(e.prototype,n),c}(r.GeoJsonEditMode);e.ExtendLineStringMode=l},68367:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}
2function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeMode=void 0;var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(A,t);var e,n,s,h=(s=A,function(){var t,e=l(s);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?u(t):e}(this,t)});function A(t){var e,n,r,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,A),i=void 0,(r="_modes")in(n=u(e=h.call(this)))?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,e._modes=t,e}return e=A,n=[{key:"_coalesce",value:function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=0;r<this._modes.length&&(e=t(this._modes[r]),!(n?n(e):e));r++);return e}},{key:"handleClick",value:function(t,e){this._coalesce(function(n){return n.handleClick(t,e)})}},{key:"handlePointerMove",value:function(t,e){return this._coalesce(function(n){return n.handlePointerMove(t,e)})}},{key:"handleStartDragging",value:function(t,e){return this._coalesce(function(n){return n.handleStartDragging(t,e)})}},{key:"handleStopDragging",value:function(t,e){return this._coalesce(function(n){return n.handleStopDragging(t,e)})}},{key:"handleDragging",value:function(t,e){return this._coalesce(function(n){return n.handleDragging(t,e)})}},{key:"getGuides",value:function(t){var e,n=[],r=function(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=o(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,s=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}(this._modes);try{for(r.s();!(e=r.n()).done;){var s=e.value;n.push.apply(n,i(s.getGuides(t).features))}}catch(t){r.e(t)}finally{r.f()}return{type:"FeatureCollection",features:n}}}],n&&a(e.prototype,n),A}(n(96146).GeoJsonEditMode);e.CompositeMode=h},68502:(t,e,n)=>{"use strict";var r=n(8120),i=n(36828),o=n(53725),s=n(43409),a=n(18078);t.exports=function(t){return null==t||"object"!=typeof t&&"function"!=typeof t?null:r(t)?"String":i(t)?"Number":o(t)?"Boolean":s(t)?"Symbol":a(t)?"BigInt":void 0}},68818:(t,e,n)=>{"use strict";n.d(e,{Ce:()=>s,KS:()=>u,gI:()=>o,pj:()=>i,qS:()=>a});var r=n(44454);const i={6407:{dataFormat:6407,types:[5121,33635]},6408:{dataFormat:6408,types:[5121,32819,32820]},6406:{dataFormat:6406,types:[5121]},6409:{dataFormat:6409,types:[5121]},6410:{dataFormat:6410,types:[5121]},33326:{dataFormat:6403,types:[5126],gl2:!0},33328:{dataFormat:33319,types:[5126],gl2:!0},34837:{dataFormat:6407,types:[5126],gl2:!0},34836:{dataFormat:6408,types:[5126],gl2:!0}},o={6403:1,36244:1,33319:2,33320:2,6407:3,36248:3,6408:4,36249:4,6402:1,34041:1,6406:1,6409:1,6410:2},s={5126:4,5125:4,5124:4,5123:2,5122:2,5131:2,5120:1,5121:1};function a(t,e){const n=i[e];if(!n)return!1;if(void 0===n.gl1&&void 0===n.gl2)return!0;const o=(0,r.C6)(t)&&n.gl2||n.gl1;return"string"==typeof o?t.getExtension(o):o}function u(t,e){const n=i[e];switch(n&&n.types[0]){case 5126:return t.getExtension("OES_texture_float_linear");case 5131:return t.getExtension("OES_texture_half_float_linear");default:return!0}}},68989:(t,e,n)=>{"use strict";var r=n(55387),i=n(63693);if(n(53558)()||n(62908)()){var o=Symbol.iterator;t.exports=function(t){return null!=t&&void 0!==t[o]?t[o]():r(t)?Array.prototype[o].call(t):void 0}}else{var s=n(56815),a=n(8120),u=n(528),l=u("%Map%",!0),c=u("%Set%",!0),h=n(79818),A=h("Array.prototype.push"),f=h("String.prototype.charCodeAt"),d=h("String.prototype.slice"),p=function(t){var e=0;return{next:function(){var n,r=e>=t.length;return r||(n=t[e],e+=1),{done:r,value:n}}}},g=function(t,e){if(s(t)||r(t))return p(t);if(a(t)){var n=0;return{next:function(){var e=function(t,e){if(e+1>=t.length)return e+1;var n=f(t,e);if(n<55296||n>56319)return e+1;var r=f(t,e+1);return r<56320||r>57343?e+1:e+2}(t,n),r=d(t,n,e);return n=e,{done:e>t.length,value:r}}}}return e&&void 0!==t["_es6-shim iterator_"]?t["_es6-shim iterator_"]():void 0};if(l||c){var m=n(98009),y=n(2583),v=h("Map.prototype.forEach",!0),_=h("Set.prototype.forEach",!0);if("undefined"==typeof process||!process.versions||!process.versions.node)var b=h("Map.prototype.iterator",!0),w=h("Set.prototype.iterator",!0);var E=h("Map.prototype.@@iterator",!0)||h("Map.prototype._es6-shim iterator_",!0),x=h("Set.prototype.@@iterator",!0)||h("Set.prototype._es6-shim iterator_",!0);t.exports=function(t){return function(t){if(m(t)){if(b)return i(b(t));if(E)return E(t);if(v){var e=[];return v(t,function(t,n){A(e,[n,t])}),p(e)}}if(y(t)){if(w)return i(w(t));if(x)return x(t);if(_){var n=[];return _(t,function(t){A(n,t)}),p(n)}}}(t)||g(t)}}
2else t.exports=function(t){if(null!=t)return g(t,!0)}}},68993:t=>{"use strict";var e=function(){return"string"==typeof function(){}.name},n=Object.getOwnPropertyDescriptor;if(n)try{n([],"length")}catch(t){n=null}e.functionsHaveConfigurableNames=function(){if(!e()||!n)return!1;var t=n(function(){},"name");return!!t&&!!t.configurable};var r=Function.prototype.bind;e.boundFunctionsHaveNames=function(){return e()&&"function"==typeof r&&""!==function(){}.bind().name},t.exports=e},69081:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6963),i=n(17389),o=n(7784),s=n(25490),a=n(54023),u=n(41522),l=n(93141),c=n(78345),h=n(53208),A=n(82314);function f(t,e,n){if(n=n||{},!h.isObject.call(void 0,n))throw new Error("options is invalid");const i=n.origin||"centroid",o=n.mutate||!1;if(!t)throw new Error("geojson required");if("number"!=typeof e||e<=0)throw new Error("invalid factor");const s=Array.isArray(i)||"object"==typeof i;return!0!==o&&(t=r.clone.call(void 0,t)),"FeatureCollection"!==t.type||s?d(t,e,i):(c.featureEach.call(void 0,t,function(n,r){t.features[r]=d(n,e,i)}),t)}function d(t,e,n){const r="Point"===A.getType.call(void 0,t),f=function(t,e){if(null==e&&(e="centroid"),Array.isArray(e)||"object"==typeof e)return A.getCoord.call(void 0,e);const n=t.bbox?t.bbox:s.bbox.call(void 0,t,{recompute:!0}),r=n[0],a=n[1],u=n[2],l=n[3];switch(e){case"sw":case"southwest":case"westsouth":case"bottomleft":return h.point.call(void 0,[r,a]);case"se":case"southeast":case"eastsouth":case"bottomright":return h.point.call(void 0,[u,a]);case"nw":case"northwest":case"westnorth":case"topleft":return h.point.call(void 0,[r,l]);case"ne":case"northeast":case"eastnorth":case"topright":return h.point.call(void 0,[u,l]);case"center":return i.center.call(void 0,t);case void 0:case null:case"centroid":return o.centroid.call(void 0,t);default:throw new Error("invalid origin")}}(t,n);return 1===e||r||(c.coordEach.call(void 0,t,function(t){const n=u.rhumbDistance.call(void 0,f,t),r=a.rhumbBearing.call(void 0,f,t),i=n*e,o=A.getCoords.call(void 0,l.rhumbDestination.call(void 0,f,i,r));t[0]=o[0],t[1]=o[1],3===t.length&&(t[2]*=e)}),delete t.bbox),t}var p=f;e.default=p,e.transformScale=f},69501:t=>{"use strict";t.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},69923:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>d});class r{constructor(t=[],e=i){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,r=e[t];for(;t>0;){const i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r}_down(t){const{data:e,compare:n}=this,r=this.length>>1,i=e[t];for(;t<r;){let r=1+(t<<1),o=e[r];const s=r+1;if(s<this.length&&n(e[s],o)<0&&(r=s,o=e[s]),n(o,i)>=0)break;e[t]=o,t=r}e[t]=i}}function i(t,e){return t<e?-1:t>e?1:0}function o(t,e){return t.p.x>e.p.x?1:t.p.x<e.p.x?-1:t.p.y!==e.p.y?t.p.y>e.p.y?1:-1:1}function s(t,e){return t.rightSweepEvent.p.x>e.rightSweepEvent.p.x?1:t.rightSweepEvent.p.x<e.rightSweepEvent.p.x?-1:t.rightSweepEvent.p.y!==e.rightSweepEvent.p.y?t.rightSweepEvent.p.y<e.rightSweepEvent.p.y?1:-1:1}class a{constructor(t,e,n,r){this.p={x:t[0],y:t[1]},this.featureId=e,this.ringId=n,this.eventId=r,this.otherEvent=null,this.isLeftEndpoint=null}isSamePoint(t){return this.p.x===t.p.x&&this.p.y===t.p.y}}let u=0,l=0,c=0;function h(t,e){const n="Feature"===t.type?t.geometry:t;let r=n.coordinates;"Polygon"!==n.type&&"MultiLineString"!==n.type||(r=[r]),"LineString"===n.type&&(r=[[r]]);for(let t=0;t<r.length;t++)for(let n=0;n<r[t].length;n++){let i=r[t][n][0],s=null;l+=1;for(let h=0;h<r[t][n].length-1;h++){s=r[t][n][h+1];const A=new a(i,u,l,c),f=new a(s,u,l,c+1);A.otherEvent=f,f.otherEvent=A,o(A,f)>
20?(f.isLeftEndpoint=!0,A.isLeftEndpoint=!1):(A.isLeftEndpoint=!0,f.isLeftEndpoint=!1),e.push(A),e.push(f),i=s,c+=1}}u+=1}class A{constructor(t){this.leftSweepEvent=t,this.rightSweepEvent=t.otherEvent}}function f(t,e){if(null===t||null===e)return!1;if(t.leftSweepEvent.ringId===e.leftSweepEvent.ringId&&(t.rightSweepEvent.isSamePoint(e.leftSweepEvent)||t.rightSweepEvent.isSamePoint(e.leftSweepEvent)||t.rightSweepEvent.isSamePoint(e.rightSweepEvent)||t.leftSweepEvent.isSamePoint(e.leftSweepEvent)||t.leftSweepEvent.isSamePoint(e.rightSweepEvent)))return!1;const n=t.leftSweepEvent.p.x,r=t.leftSweepEvent.p.y,i=t.rightSweepEvent.p.x,o=t.rightSweepEvent.p.y,s=e.leftSweepEvent.p.x,a=e.leftSweepEvent.p.y,u=e.rightSweepEvent.p.x,l=e.rightSweepEvent.p.y,c=(l-a)*(i-n)-(u-s)*(o-r);if(0===c)return!1;const h=((u-s)*(r-a)-(l-a)*(n-s))/c,A=((i-n)*(r-a)-(o-r)*(n-s))/c;return h>=0&&h<=1&&A>=0&&A<=1&&[n+h*(i-n),r+h*(o-r)]}const d=function(t,e){const n=new r([],o);return function(t,e){if("FeatureCollection"===t.type){const n=t.features;for(let t=0;t<n.length;t++)h(n[t],e)}else h(t,e)}(t,n),function(t,e){e=e||!1;const n=[],i=new r([],s);for(;t.length;){const r=t.pop();if(r.isLeftEndpoint){const t=new A(r);for(let o=0;o<i.data.length;o++){const s=i.data[o];if(e&&s.leftSweepEvent.featureId===r.featureId)continue;const a=f(t,s);!1!==a&&n.push(a)}i.push(t)}else!1===r.isLeftEndpoint&&i.pop()}return n}(n,e)}},70145:(t,e,n)=>{"use strict";n.d(e,{F4:()=>G,bF:()=>V,ir:()=>z});var r=n(94939);const i=5120,o=5121,s=5122,a=5123,u=0,l=1,c=2,h=3,A=4,f=5,d=6,p=5126,g=35664,m=35665,y=35666,v=5124,_=35667,b=35668,w=35669,E=5125,x=36294,S=36295,T=36296,P=35670,C=35671,M=35672,I=35673,O=35674,R=35675,L=35676,B=35685,k=35686,N=35687,F=35688,D=35689,j=35690,U={[p]:[p,1,"float"],[g]:[p,2,"vec2"],[m]:[p,3,"vec3"],[y]:[p,4,"vec4"],[v]:[v,1,"int"],[_]:[v,2,"ivec2"],[b]:[v,3,"ivec3"],[w]:[v,4,"ivec4"],[E]:[E,1,"uint"],[x]:[E,2,"uvec2"],[S]:[E,3,"uvec3"],[T]:[E,4,"uvec4"],[P]:[p,1,"bool"],[C]:[p,2,"bvec2"],[M]:[p,3,"bvec3"],[I]:[p,4,"bvec4"],[O]:[p,8,"mat2"],[B]:[p,8,"mat2x3"],[k]:[p,8,"mat2x4"],[R]:[p,12,"mat3"],[N]:[p,12,"mat3x2"],[F]:[p,12,"mat3x4"],[L]:[p,16,"mat4"],[D]:[p,16,"mat4x2"],[j]:[p,16,"mat4x3"]};function G(t){switch(t){case u:return u;case l:case h:case c:return l;case A:case f:case d:return A;default:return(0,r.v)(!1),0}}function z(t){const e=U[t];if(!e)return null;const[n,r]=e;return{type:n,components:r}}function V(t,e){switch(t){case i:case o:case s:case a:t=p}for(const n in U){const[r,i,o]=U[n];if(r===t&&i===e)return{glType:n,name:o}}return null}},70686:(t,e,n)=>{"use strict";var r=n(64940),i=n(5731),o=n(3468),s=n(69336);t.exports=function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],h=!!s&&s(t,e);if(r)r(t,e,{configurable:null===l&&h?h.configurable:!l,enumerable:null===a&&h?h.enumerable:!a,value:n,writable:null===u&&h?h.writable:!u});else{if(!c&&(a||u||l))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=n}}},70851:(t,e,n)=>{"use strict";n.d(e,{A:()=>f});var r=n(24586),i=n(5424),o=n(23615),s=n(32968),a=n(8033),u=n(88330),l=n(84481),c=n(66785);const h=[0,0,0,255],A={stroked:!0,filled:!0,extruded:!1,elevationScale:1,wireframe:!1,_normalize:!0,_windingOrder:"CW",lineWidthUnits:"meters",lineWidthScale:1,lineWidthMinPixels:0,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,lineJointRounded:!1,lineMiterLimit:4,getPolygon:{type:"accessor",value:t=>t.polygon},getFillColor:{type:"accessor",value:[0,0,0,255]},getLineColor:{type:"accessor",value:h},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0};class f extends i.A{initializeState(){this.state={paths:[]},this.props.getLineDashArray&&o.A.removed("getLineDashArray","PathStyleExtension")()}updateState({changeFlags:t}){const e=t.dataChanged||t.updateTriggersChanged&&(t.updateTriggersChanged.all||t.updateTriggersChanged.getPolygon);if(e&&Array.isArray(t.dataChanged)){const e=this.state.paths.slice(),n=t.dataChanged.map(t=>(0,c.J)({data:e,getIndex:t=>t.__source.index,dataRange:t,replace:this._getPaths(t)}));this.setState({paths:e,pathsDiff:n})}else e&&this.setState({paths:this._getPaths(),pathsDiff:null})}_getPaths(t={}){const{data:e,getPolygon:n,positionFormat:r,_normalize:i}=this.props,o=[],a="XY"===r?2:3,{startRow:u,endRow:c}=t,{iterable:h,objectInfo:A}=(0,s.X)(e,u,c);for(const t of h){A.index++;let e=n(t,A);i&&(e=l.S8(e,a));const{holeIndices:r}=e,s=e.positions||e;if(r)for(let e=0;e<=r.length;e++){const n=s.slice(r[e-1]||0,r[e]||s.length);o.push(this.getSubLayerRow({path:n},t,A.index))}else o.push(this.getSubLayerRow({path:s},t,A.index))}return o}renderLayers(){const{data:t,_dataDiff:e,stroked:n,filled:r,extruded:i,wireframe:o,_normalize:s,_windingOrder:l,elevationScale:c,transitions:A,positionFormat:f}=this.props,{lineWidthUnits:d,lineWidthScale:p,lineWidthMinPixels:g,lineWidthMaxPixels:m,lineJointRounded:y,lineMiterLimit:v,lineDashJustified:_}=this.props,{getFillColor:b,getLineColor:w,getLineWidth:E,getLineDashArray:x,getElevation:S,getPolygon:T,updateTriggers:P,material:C}=this.props,{paths:M,pathsDiff:I}=this.state,O=this.getSubLayerClass("fill",a.A),R=this.getSubLayerClass("stroke",u.A),L=this.shouldRenderSubLayer("fill",M)&&new O({_dataDiff:e,extruded:i,elevationScale:c,filled:r,wireframe:o,_normalize:s,_windingOrder:l,getElevation:S,getFillColor:b,getLineColor:i&&o?w:h,material:C,transitions:A}
2,this.getSubLayerProps({id:"fill",updateTriggers:P&&{getPolygon:P.getPolygon,getElevation:P.getElevation,getFillColor:P.getFillColor,lineColors:i&&o,getLineColor:P.getLineColor}}),{data:t,positionFormat:f,getPolygon:T});return[!i&&L,!i&&n&&this.shouldRenderSubLayer("stroke",M)&&new R({_dataDiff:I&&(()=>I),widthUnits:d,widthScale:p,widthMinPixels:g,widthMaxPixels:m,jointRounded:y,miterLimit:v,dashJustified:_,_pathType:"loop",transitions:A&&{getWidth:A.getLineWidth,getColor:A.getLineColor,getPath:A.getPolygon},getColor:this.getSubLayerAccessor(w),getWidth:this.getSubLayerAccessor(E),getDashArray:this.getSubLayerAccessor(x)},this.getSubLayerProps({id:"stroke",updateTriggers:P&&{getWidth:P.getLineWidth,getColor:P.getLineColor,getDashArray:P.getLineDashArray}}),{data:M,positionFormat:f,getPath:t=>t.path}),i&&L]}}(0,r.A)(f,"layerName","PolygonLayer"),(0,r.A)(f,"defaultProps",A)},70911:(t,e,n)=>{"use strict";n.d(e,{Bw:()=>h,C:()=>a,Cc:()=>p,Om:()=>d,S8:()=>f,WQ:()=>l,Z0:()=>g,fA:()=>s,gL:()=>m,hZ:()=>u,hs:()=>c,m3:()=>A,o8:()=>o,t2:()=>y});var r,i=n(23172);function o(t){var e=new i.tb(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function s(t,e,n,r){var o=new i.tb(4);return o[0]=t,o[1]=e,o[2]=n,o[3]=r,o}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function u(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function c(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function h(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.sqrt(e*e+n*n+r*r+i*i)}function A(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function f(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=n*n+r*r+i*i+o*o;return s>0&&(s=1/Math.sqrt(s)),t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=o*s,t}function d(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function p(t,e,n,r){var i=e[0],o=e[1],s=e[2],a=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=s+r*(n[2]-s),t[3]=a+r*(n[3]-a),t}function g(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*s,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*s,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*s,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*s,t}function m(t,e,n){var r=n[0],i=n[1],o=n[2],s=n[3],a=e[0],u=e[1],l=e[2],c=i*l-o*u,h=o*a-r*l,A=r*u-i*a;return c+=c,h+=h,A+=A,t[0]=a+s*c+i*A-o*h,t[1]=u+s*h+o*c-r*A,t[2]=l+s*A+r*h-i*c,t[3]=e[3],t}function y(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}r=new i.tb(4),i.tb!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0,r[3]=0)},70953:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={outlineEnabled:!1,outlineRenderShadowmap:!1,outlineShadowmap:null},r={name:"outline",vs:"attribute float instanceZLevel;\nvarying float outline_vzLevel;\nvarying vec4 outline_vPosition;\n\n// Set the z level for the outline shadowmap rendering\nvoid outline_setZLevel(float zLevel) {\n outline_vzLevel = zLevel;\n}\n\n// Store an adjusted position for texture2DProj\nvoid outline_setUV(vec4 position) {\n // mat4(\n // 0.5, 0.0, 0.0, 0.0,\n // 0.0, 0.5, 0.0, 0.0,\n // 0.0, 0.0, 0.5, 0.0,\n // 0.5, 0.5, 0.5, 1.0\n // ) * position;\n outline_vPosition = vec4(position.xyz * 0.5 + position.w * 0.5, position.w);\n}\n",fs:"uniform bool outline_uEnabled;\nuniform bool outline_uRenderOutlines;\nuniform sampler2D outline_uShadowmap;\n\nvarying float outline_vzLevel;
2\n// varying vec2 outline_vUV;\nvarying vec4 outline_vPosition;\n\nconst float OUTLINE_Z_LEVEL_ERROR = 0.01;\n\n// Return a darker color in shadowmap\nvec4 outline_filterShadowColor(vec4 color) {\n return vec4(outline_vzLevel / 255., outline_vzLevel / 255., outline_vzLevel / 255., 1.);\n}\n\n// Return a darker color if in shadowmap\nvec4 outline_filterDarkenColor(vec4 color) {\n if (outline_uEnabled) {\n float maxZLevel;\n if (outline_vPosition.q > 0.0) {\n maxZLevel = texture2DProj(outline_uShadowmap, outline_vPosition).r * 255.;\n } else {\n discard;\n }\n if (maxZLevel < outline_vzLevel + OUTLINE_Z_LEVEL_ERROR) {\n vec4(color.rgb * 0.5, color.a);\n } else {\n discard;\n }\n }\n return color;\n}\n\n// if enabled and rendering outlines - Render depth to shadowmap\n// if enabled and rendering colors - Return a darker color if in shadowmap\n// if disabled, just return color\nvec4 outline_filterColor(vec4 color) {\n if (outline_uEnabled) {\n return outline_uRenderOutlines ?\n outline_filterShadowColor(color) :\n outline_filterDarkenColor(color);\n }\n return color;\n}\n",getUniforms:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,e=t.outlineEnabled,r=t.outlineRenderShadowmap,i=t.outlineShadowmap,o={};return void 0!==e&&(o.outline_uEnabled=e),void 0!==r&&(o.outline_uRenderOutlines=r),void 0!==i&&(o.outline_uShadowmap=i),o}};e.default=r},71123:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.defineProperty,i=n(82314),o=n(89595);function s(t,e,n={}){var r=i.getCoord.call(void 0,t),s=i.getCoord.call(void 0,e),a=o.degreesToRadians.call(void 0,s[1]-r[1]),u=o.degreesToRadians.call(void 0,s[0]-r[0]),l=o.degreesToRadians.call(void 0,r[1]),c=o.degreesToRadians.call(void 0,s[1]),h=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(l)*Math.cos(c);return o.radiansToLength.call(void 0,2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),n.units)}r(s,"name",{value:"distance",configurable:!0});var a=s;e.default=a,e.distance=s},71169:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toDeckColor=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];return Array.isArray(t)?[255*t[0],255*t[1],255*t[2],255*t[3]]:e},e.recursivelyTraverseNestedArrays=function t(e,n,r){if(!Array.isArray(e[0]))return!0;for(var i=0;i<e.length;i++)if(t(e[i],[].concat(A(n),[i]),r)){r(e,n);break}return!1},e.generatePointsParallelToLinePoints=function(t,e,n){var s={type:"LineString",coordinates:[t,e]},u=(0,a.point)(n),l=(0,o.default)(u,s),c=(0,i.default)(t,e),h=(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])<0?c-90:c-270,A=(0,r.default)(e,l,h),f=(0,r.default)(t,l,h);return[A.geometry.coordinates,f.geometry.coordinates]},e.distance2d=p,e.mix=g,e.nearestPointOnProjectedLine=function(t,e,n){var r=new l.default(n),i=t.geometry.coordinates.map(function(t){var e=h(t,3),n=e[0],i=e[1],o=e[2],s=void 0===o?0:o;return r.project([n,i,s])}),o=h(r.project(e.geometry.coordinates),2),s=o[0],a=o[1],u=1/0,c={};i.forEach(function(t,e){var n=h(t,2),r=n[0],o=n[1];if(0!==e){var l=h(i[e-1],2),A=l[0],f=l[1],d=f-o,p=r-A,g=A*o-r*f,m=d*d+p*p,y=Math.abs(d*s+p*a+g)/Math.sqrt(m);y<u&&(u=y,c={index:e,x0:(p*(p*s-d*a)-d*g)/m,y0:(d*(-p*s+d*a)-p*g)/m})}});var A=c,f=A.index,d=A.x0,m=A.y0,y=h(i[f-1],3),v=y[0],_=y[1],b=y[2],w=void 0===b?0:b,E=h(i[f],3),x=E[0],S=E[1],T=E[2],P=void 0===T?0:T,C=p(v,_,x,S),M=g(w,P,p(v,_,d,m)/C);return{type:"Feature",geometry:{type:"Point",coordinates:r.unproject([d,m,M])},properties:{dist:u,index:f-1}}},e.nearestPointOnLine=function(t,e,n){var r,i,o;n&&(o=new l.default(n));var c=(0,a.point)([1/0,1/0],{dist:1/0});return!(null===(r=t.geometry)||void 0===r?void 0:r.coordinates.length)||(null===(i=t.geometry)||void 0===i?void 0:i.coordinates.length)<2||(0,s.flattenEach)(t,function(t){var n,r,i,s,l,h,A,f=(0,u.getCoords)(t),d=(0,u.getCoords)(e);if(f.length>1&&d.length){var p,g;o?(p=f.map(function(t){return o.project(t)}),g=o.project(d)):(p=f,g=d);for(var m=1;m<p.length;m++){if(p[m][0]!==p[m-1][0]){var y=(p[m][1]-p[m-1][1])/(p[m][0]-p[m-1][0]),v=p[m][1]-y*p[m][0];A=Math.abs(y*g[0]+v-g[1])/Math.sqrt(y*y+1)}else A=Math.abs(g[0]-p[m][0]);var _=Math.pow(p[m][1]-p[m-1][1],2)+Math.pow(p[m][0]-p[m-1][0],2),b=Math.pow(p[m][1]-g[1],2)+Math.pow(p[m][0]-g[0],2),w=Math.pow(p[m-1][1]-g[1],2)+Math.pow(p[m-1][0]-g[0],2),E=Math.pow(A,2),x=b-E+w-E;x>_&&(A=Math.sqrt(Math.min(b,w))),(null==n||n>A)&&(x>_?w<b?(r=0,i=1):(i=0,r=1):(r=Math.sqrt(w-E)/Math.sqrt(_),i=Math.sqrt(b-E)/Math.sqrt(_)),n=A,h=m)}var S=p[h-1][0]-p[h][0],T=p[h-1][1]-p[h][1];s=p[h-1][0]-S*r,l=p[h-1][1]-T*r}var P={x:s,y:l,idx:h-1,to:r,from:i};if(o){var C=o.unproject([P.x,P.y]);P={x:C[0],y:C[1],idx:h-1,to:r,from:i}}
2c=(0,a.point)([P.x,P.y],{dist:Math.abs(P.from-P.to),index:P.idx})}),c},e.getPickedEditHandle=function(t){var e=m(t);return e.length?e[0]:null},e.getPickedSnapSourceEditHandle=function(t){return m(t).find(function(t){return"snap-source"===t.properties.editHandleType})},e.getNonGuidePicks=function(t){return t&&t.filter(function(t){return!t.isGuide})},e.getPickedExistingEditHandle=function(t){return m(t).find(function(t){var e=t.properties;return e.featureIndex>=0&&"existing"===e.editHandleType})},e.getPickedIntermediateEditHandle=function(t){return m(t).find(function(t){var e=t.properties;return e.featureIndex>=0&&"intermediate"===e.editHandleType})},e.getPickedEditHandles=m,e.getEditHandlesForGeometry=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"existing",r=[];switch(t.type){case"Point":r=[{type:"Feature",properties:{guideType:"editHandle",editHandleType:n,positionIndexes:[],featureIndex:e},geometry:{type:"Point",coordinates:t.coordinates}}];break;case"MultiPoint":case"LineString":r=r.concat(y(t.coordinates,[],e,n));break;case"Polygon":case"MultiLineString":for(var i=0;i<t.coordinates.length;i++)r=r.concat(y(t.coordinates[i],[i],e,n)),"Polygon"===t.type&&(r=r.slice(0,-1));break;case"MultiPolygon":for(var o=0;o<t.coordinates.length;o++)for(var s=0;s<t.coordinates[o].length;s++)r=(r=r.concat(y(t.coordinates[o][s],[o,s],e,n))).slice(0,-1);break;default:throw Error("Unhandled geometry type: ".concat(t.type))}return r},e.updateRectanglePosition=function(t,e,n){var r=t.geometry.coordinates;if(!r)return null;var i=r[0].slice(0,4);i[e%4]=n;var o=i[(e+2)%4],s=i[e%4];return i[(e+1)%4]=[s[0],o[1]],i[(e+3)%4]=[o[0],s[1]],[[].concat(A(i),[i[0]])]},e.mapCoords=function t(e,n){return"number"==typeof e[0]?!isNaN(e[0])&&isFinite(e[0])?n(e):e:e.map(function(e){return t(e,n)}).filter(Boolean)};var r=c(n(11866)),i=c(n(25128)),o=c(n(65747)),s=n(78345),a=n(89595),u=n(82314),l=c(n(88548));function c(t){return t&&t.__esModule?t:{default:t}}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||f(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function p(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function g(t,e,n){return e*n+t*(1-n)}function m(t){return t&&t.filter(function(t){return t.isGuide&&"editHandle"===t.object.properties.guideType}).map(function(t){return t.object})||[]}function y(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"existing",i=[],o=0;o<t.length;o++){var s=t[o];i.push({type:"Feature",properties:{guideType:"editHandle",positionIndexes:[].concat(A(e),[o]),featureIndex:n,editHandleType:r},geometry:{type:"Point",coordinates:s}})}return i}},71465:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(10836),i=n(46429),o=n(79266),s=n(44454);class a{constructor(t,e){let{attributes:n,material:o,pbrDebug:s,imageBasedLightingEnvironment:a,lights:u,useTangents:l}=e;this.gl=t,this.defines={MANUAL_SRGB:1,SRGB_FAST_APPROXIMATION:1},(0,r.jI)(t,i.G.GLSL_TEXTURE_LOD)&&(this.defines.USE_TEX_LOD=1),this.uniforms={u_Camera:[0,0,0],u_MetallicRoughnessValues:[1,1]},this.parameters={},this.generatedTextures=[],a&&(this.uniforms.u_DiffuseEnvSampler=a.getDiffuseEnvSampler(),this.uniforms.u_SpecularEnvSampler=a.getSpecularEnvSampler(),this.uniforms.u_brdfLUT=a.getBrdfTexture(),this.uniforms.u_ScaleIBLAmbient=[1,1]),s&&(this.uniforms.u_ScaleDiffBaseMR=[0,0,0,0],this.uniforms.u_ScaleFGDSpec=[0,0,0,0]),this.defineIfPresent(n.NORMAL,"HAS_NORMALS"),this.defineIfPresent(n.TANGENT&&l,"HAS_TANGENTS"),this.defineIfPresent(n.TEXCOORD_0,"HAS_UV"),this.defineIfPresent(a,"USE_IBL"),this.defineIfPresent(u,"USE_LIGHTS"),this.defineIfPresent(s,"PBR_DEBUG"),o&&this.parseMaterial(o)}defineIfPresent(t,e){t&&(this.defines[e]=1)}parseTexture(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=t.texture&&t.texture.sampler&&t.texture.sampler.parameters||{},i=t.texture.source.image;let s,a={};i.compressed?(s=i,a={[this.gl.TEXTURE_MIN_FILTER]:i.data.length>1?this.gl.LINEAR_MIPMAP_NEAREST:this.gl.LINEAR}):s={data:i};const u=new o.A(this.gl,{id:t.name||t.id,parameters:{...r,...a},pixelStore:{[this.gl.UNPACK_FLIP_Y_WEBGL]:!1},...s});this.uniforms[e]=u,this.defineIfPresent(n,n),this.generatedTextures.push(u)}parsePbrMetallicRoughness(t){t.baseColorTexture&&this.parseTexture(t.baseColorTexture,"u_BaseColorSampler","HAS_BASECOLORMAP"),this.uniforms.u_BaseColorFactor=t.baseColorFactor||[1,1,1,1],t.metallicRoughnessTexture&&this.parseTexture(t.metallicRoughnessTexture,"u_MetallicRoughnessSampler","HAS_METALROUGHNESSMAP");const{metallicFactor:e=1,roughnessFactor:n=1}=t;this.uniforms.u_MetallicRoughnessValues=[e,n]}parseMaterial(t){if(this.uniforms.pbr_uUnlit=Boolean(t.unlit),t.pbrMetallicRoughness&&this.parsePbrMetallicRoughness(t.pbrMetallicRoughness),t.normalTexture){this.parseTexture(t.normalTexture,"u_NormalSampler","HAS_
2NORMALMAP");const{scale:e=1}=t.normalTexture;this.uniforms.u_NormalScale=e}if(t.occlusionTexture){this.parseTexture(t.occlusionTexture,"u_OcclusionSampler","HAS_OCCLUSIONMAP");const{strength:e=1}=t.occlusionTexture;this.uniforms.u_OcclusionStrength=e}if(t.emissiveTexture&&(this.parseTexture(t.emissiveTexture,"u_EmissiveSampler","HAS_EMISSIVEMAP"),this.uniforms.u_EmissiveFactor=t.emissiveFactor||[0,0,0]),"MASK"===t.alphaMode){const{alphaCutoff:e=.5}=t;this.defines.ALPHA_CUTOFF=1,this.uniforms.u_AlphaCutoff=e}else"BLEND"===t.alphaMode&&(s.Rm.warn("BLEND alphaMode might not work well because it requires mesh sorting")(),Object.assign(this.parameters,{blend:!0,blendEquation:this.gl.FUNC_ADD,blendFunc:[this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA,this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA]}))}delete(){this.generatedTextures.forEach(t=>t.delete())}}},71899:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(57414),i=n(44776),o=n(49494),s=c(n(80409)),a=c(n(83066)),u=c(n(76393)),l=n(26867);function c(t){return t&&t.__esModule?t:{default:t}}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function A(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=o.SimpleMeshLayer,v={mesh:new a.default({headSize:.2,tailWidth:.05})},_=Object.assign({},s.default.defaultProps,{MarkerLayer:y,markerLayerProps:v,sizeScale:100,fp64:!1,highlightIndex:-1,highlightPoint:null,getPath:function(t){return t.path},getColor:function(t){return t.color},getMarkerColor:function(t){return[0,0,0,255]},getDirection:function(t){return t.direction},getMarkerPercentages:function(t,e){return e.lineLength>.1?[.25,.5,.75]:[.5]}}),b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}(f,t);var e,n,o,c=(o=f,function(){var t,e=p(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=p(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==h(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function f(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),c.apply(this,arguments)}return e=f,(n=[{key:"initializeState",value:function(){this.state={markers:[],mesh:new a.default({headSize:.2,tailWidth:.05}),closestPoint:null}}},{key:"projectFlat",value:function(t,e,n,i){if(n===r.COORDINATE_SYSTEM.METER_OFFSETS){var o=A(e.metersToLngLatDelta(t),2),s=o[0],a=o[1],u=A(i,2),l=u[0],c=u[1];return e.projectFlat([l+s,a+c])}if(n===r.COORDINATE_SYSTEM.LNGLAT_OFFSETS){var h=A(t,2),f=h[0],d=h[1],p=A(i,2),g=p[0],m=p[1];return e.projectFlat([g+f,d+m])}return e.projectFlat(t)}},{key:"updateState",value:function(t){var e=this,n=t.props,r=t.oldProps,i=t.changeFlags;if(i.dataChanged||i.updateTriggersChanged){var o=this.props,s=o.data,a=o.getPath,l=o.getDirection,c=o.getMarkerColor,h=o.getMarkerPercentages,A=o.coordinateSystem,f=o.coordinateOrigin,d=this.context.viewport;this.state.markers=(0,u.default)({data:s,getPath:a,getDirection:l,getColor:c,getMarkerPercentages:h,projectFlat:function(t){return e.projectFlat(t,d,A,f)}}),this._recalculateClosestPoint()}i.propsChanged&&n.point!==r.point&&this._recalculateClosestPoint()}},{key:"_recalculateClosestPoint",value:function(){var t=this.props,e=t.highlightPoint,n=t.highlightIndex;if(e&&n>=0){var r=this.props.data[n],i=this.props.getPath(r),o=(0,l.getClosestPointOnPolyline)({points:i,p:e}).point;this.state.closestPoints=[{position:o}]}else this.state.closestPoints=[]}},{key:"getPickingInfo",value:function(t){var e=t.info;return Object.assign(e,{object:e.object&&e.object.path||e.object})}},{key:"renderLayers",value:function(){return[new s.default(this.props,this.get
2SubLayerProps({id:"paths",data:this.props.data})),new this.props.MarkerLayer(this.getSubLayerProps(Object.assign({},this.props.markerLayerProps,{id:"markers",data:this.state.markers,getOrientation:function(t){return[0,-t.angle,0]},getColor:function(t){return t.color},sizeScale:this.props.sizeScale,fp64:this.props.fp64,pickable:!1,parameters:{blend:!1,depthTest:!1}}))),this.state.closestPoints&&new i.ScatterplotLayer({id:"".concat(this.props.id,"-highlight"),data:this.state.closestPoints,fp64:this.props.fp64})]}}])&&d(e.prototype,n),f}(r.CompositeLayer);e.default=b,m(b,"layerName","PathMarkerLayer"),m(b,"defaultProps",_)},72302:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(44454),i=n(55890),o=n(63564),s=n(2592);class a extends i.A{get[Symbol.toStringTag](){return"TransformFeedback"}static isSupported(t){return(0,r.C6)(t)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.Dz)(t),super(t,e),this.initialize(e),this.stubRemovedMethods("TransformFeedback","v6.0",["pause","resume"]),Object.seal(this)}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.buffers={},this.unused={},this.configuration=null,this.bindOnUse=!0,(0,s.ZF)(this.buffers)||this.bind(()=>this._unbindBuffers()),this.setProps(t),this}setProps(t){"program"in t&&(this.configuration=t.program&&t.program.configuration),"configuration"in t&&(this.configuration=t.configuration),"bindOnUse"in t&&(t=t.bindOnUse),"buffers"in t&&this.setBuffers(t.buffers)}setBuffers(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.bind(()=>{for(const e in t)this.setBuffer(e,t[e])}),this}setBuffer(t,e){const n=this._getVaryingIndex(t),{buffer:i,byteSize:o,byteOffset:s}=this._getBufferParams(e);return n<0?(this.unused[t]=i,r.Rm.warn("".concat(this.id," unused varying buffer ").concat(t))(),this):(this.buffers[n]=e,this.bindOnUse||this._bindBuffer(n,i,s,o),this)}begin(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.gl.bindTransformFeedback(36386,this.handle),this._bindBuffers(),this.gl.beginTransformFeedback(t),this}end(){return this.gl.endTransformFeedback(),this._unbindBuffers(),this.gl.bindTransformFeedback(36386,null),this}_getBufferParams(t){let e,n,r;return t instanceof o.A==0?(r=t.buffer,n=t.byteSize,e=t.byteOffset):r=t,void 0===e&&void 0===n||(e=e||0,n=n||r.byteLength-e),{buffer:r,byteOffset:e,byteSize:n}}_getVaryingInfo(t){return this.configuration&&this.configuration.getVaryingInfo(t)}_getVaryingIndex(t){if(this.configuration)return this.configuration.getVaryingInfo(t).location;const e=Number(t);return Number.isFinite(e)?e:-1}_bindBuffers(){if(this.bindOnUse)for(const t in this.buffers){const{buffer:e,byteSize:n,byteOffset:r}=this._getBufferParams(this.buffers[t]);this._bindBuffer(t,e,r,n)}}_unbindBuffers(){if(this.bindOnUse)for(const t in this.buffers)this._bindBuffer(t,null)}_bindBuffer(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;const i=e&&e.handle;return i&&void 0!==r?this.gl.bindBufferRange(35982,t,i,n,r):this.gl.bindBufferBase(35982,t,i),this}_createHandle(){return this.gl.createTransformFeedback()}_deleteHandle(){this.gl.deleteTransformFeedback(this.handle)}_bindHandle(t){this.gl.bindTransformFeedback(36386,this.handle)}}},72380:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(24586),i=n(668),o=n(80458),s=n(65104);class a extends i.A{get ViewportType(){return o.A}get ControllerType(){return s.A}}(0,r.A)(a,"displayName","MapView")},72645:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}
2){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invali
2d");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},72718:(t,e,n)=>{"use strict";n.d(e,{A:()=>A});var r=n(24586),i=n(99608),o=n(27371),s=n(10707),a=n(93314),u=n(25330),l=n(67069);const c=[0,0,0,255],h={radiusUnits:"meters",radiusScale:{type:"number",min:0,value:1},radiusMinPixels:{type:"number",min:0,value:0},radiusMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},lineWidthUnits:"meters",lineWidthScale:{type:"number",min:0,value:1},lineWidthMinPixels:{type:"number",min:0,value:0},lineWidthMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},stroked:!1,filled:!0,billboard:!1,antialiasing:!0,getPosition:{type:"accessor",value:t=>t.position},getRadius:{type:"accessor",value:1},getFillColor:{type:"accessor",value:c},getLineColor:{type:"accessor",value:c},getLineWidth:{type:"accessor",value:1},strokeWidth:{deprecatedFor:"getLineWidth"},outline:{deprecatedFor:"stroked"},getColor:{deprecatedFor:["getFillColor","getLineColor"]}};class A extends i.A{getShaders(){return super.getShaders({vs:"#define SHADER_NAME scatterplot-layer-vertex-shader\n\nattribute vec3 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceRadius;\nattribute float instanceLineWidths;
2\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusScale;\nuniform float radiusMinPixels;\nuniform float radiusMaxPixels;\nuniform float lineWidthScale;\nuniform float lineWidthMinPixels;\nuniform float lineWidthMaxPixels;\nuniform float stroked;\nuniform bool filled;\nuniform bool antialiasing;\nuniform bool billboard;\nuniform int radiusUnits;\nuniform int lineWidthUnits;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\nvarying float outerRadiusPixels;\n\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n outerRadiusPixels = clamp(\n project_size_to_pixel(radiusScale * instanceRadius, radiusUnits),\n radiusMinPixels, radiusMaxPixels\n );\n float lineWidthPixels = clamp(\n project_size_to_pixel(lineWidthScale * instanceLineWidths, lineWidthUnits),\n lineWidthMinPixels, lineWidthMaxPixels\n );\n outerRadiusPixels += stroked * lineWidthPixels / 2.0;\n float edgePadding = antialiasing ? (outerRadiusPixels + SMOOTH_EDGE_RADIUS) / outerRadiusPixels : 1.0;\n unitPosition = edgePadding * positions.xy;\n geometry.uv = unitPosition;\n geometry.pickingColor = instancePickingColors;\n\n innerUnitRadius = 1.0 - stroked * lineWidthPixels / outerRadiusPixels;\n \n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vec3 offset = edgePadding * positions * outerRadiusPixels;\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n } else {\n vec3 offset = edgePadding * positions * project_pixel_size(outerRadiusPixels);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset, geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * opacity);\n DECKGL_FILTER_COLOR(vFillColor, geometry);\n vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * opacity);\n DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n",fs:"#define SHADER_NAME scatterplot-layer-fragment-shader\n\nprecision highp float;\n\nuniform bool filled;\nuniform float stroked;\nuniform bool antialiasing;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\nvarying float outerRadiusPixels;\n\nvoid main(void) {\n geometry.uv = unitPosition;\n\n float distToCenter = length(unitPosition) * outerRadiusPixels;\n float inCircle = antialiasing ? \n smoothedge(distToCenter, outerRadiusPixels) : \n step(distToCenter, outerRadiusPixels);\n\n if (inCircle == 0.0) {\n discard;\n }\n\n if (stroked > 0.5) {\n float isLine = antialiasing ? \n smoothedge(innerUnitRadius * outerRadiusPixels, distToCenter) :\n step(innerUnitRadius * outerRadiusPixels, distToCenter);\n\n if (filled) {\n gl_FragColor = mix(vFillColor, vLineColor, isLine);\n } else {\n if (isLine == 0.0) {\n discard;\n }\n gl_FragColor = vec4(vLineColor.rgb, vLineColor.a * isLine);\n }\n } else if (filled) {\n gl_FragColor = vFillColor;\n } else {\n discard;\n }\n\n gl_FragColor.a *= inCircle;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.A,s.A]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceRadius:{size:1,transition:!0,accessor:"getRadius",defaultValue:1},instanceFillColors:{size:this.props.colorFormat.length,transition:!0,normalized:!0,type:5121,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,transition:!0,normalized:!0,type:5121,accessor:"getLineColor",defaultValue:[0,0,0,255]},instanceLineWidths:{size:1,transition:!0,accessor:"getLineWidth",defaultValue:1}})}updateState(t){if(super.updateState(t),t.changeFlags.extensionsChanged){var e;const{gl:t}=this.context;null===(e=this.state.model)||void 0===e||e.delete(),this.state.model=this._getModel(t),this.getAttributeManager().invalidateAll()}}draw({uniforms:t}
2){const{radiusUnits:e,radiusScale:n,radiusMinPixels:r,radiusMaxPixels:i,stroked:o,filled:s,billboard:u,antialiasing:l,lineWidthUnits:c,lineWidthScale:h,lineWidthMinPixels:A,lineWidthMaxPixels:f}=this.props;this.state.model.setUniforms(t).setUniforms({stroked:o?1:0,filled:s,billboard:u,antialiasing:l,radiusUnits:a.p5[e],radiusScale:n,radiusMinPixels:r,radiusMaxPixels:i,lineWidthUnits:a.p5[c],lineWidthScale:h,lineWidthMinPixels:A,lineWidthMaxPixels:f}).draw()}_getModel(t){return new u.A(t,{...this.getShaders(),id:this.props.id,geometry:new l.A({drawMode:6,vertexCount:4,attributes:{positions:{size:3,value:new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0])}}}),isInstanced:!0})}}(0,r.A)(A,"defaultProps",h),(0,r.A)(A,"layerName","ScatterplotLayer")},72830:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},73173:(t,e,n)=>{"use strict";Object.defineProperty(e,"Tp",{enumerable:!0,get:function(){return r.default}});n(8968);var r=i(n(33e3));i(n(86385)),i(n(36038)),i(n(90184)),i(n(80409)),i(n(71899)),i(n(55858)),n(49200);function i(t){return t&&t.__esModule?t:{default:t}}},73649:t=>{t.exports=function(t){return"function"==typeof t?t:Array.isArray(t)?e=>{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}},73748:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(24586),i=n(60033),o=n(34081),s=n(64062);const a=1e-6;class u{constructor({phi:t=0,theta:e=0,radius:n=1,bearing:i,pitch:o,altitude:s,radiusScale:a=6371e3}={}){(0,r.A)(this,"phi",void 0),(0,r.A)(this,"theta",void 0),(0,r.A)(this,"radius",void 0),(0,r.A)(this,"radiusScale",void 0),this.phi=t,this.theta=e,this.radius=n||s||1,this.radiusScale=a||1,void 0!==i&&(this.bearing=i),void 0!==o&&(this.pitch=o),this.check()}toString(){return this.formatString(o.$W)}formatString({printTypes:t=!1}){const e=o.Fl;return"".concat(t?"Spherical":"","[rho:").concat(e(this.radius),",theta:").concat(e(this.theta),",phi:").concat(e(this.phi),"]")}equals(t){return(0,o.aI)(this.radius,t.radius)&&(0,o.aI)(this.theta,t.theta)&&(0,o.aI)(this.phi,t.phi)}exactEquals(t){return this.radius===t.radius&&this.theta===t.theta&&this.phi===t.phi}get bearing(){return 180-(0,o.uj)(this.phi)}set bearing(t){this.phi=Math.PI-(0,o.F2)(t)}get pitch(){return(0,o.uj)(this.theta)}set pitch(t){this.theta=(0,o.F2)(t)}get longitude(){return(0,o.uj)(this.phi)}get latitude(){return(0,o.uj)(this.theta)}get lng(){return(0,o.uj)(this.phi)}get lat(){return(0,o.uj)(this.theta)}get z(){return(this.radius-1)*this.radiusScale}set(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this.check()}clone(){return(new u).copy(this)}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this.check()}fromLngLatZ([t,e,n]){return this.radius=1+n/this.radiusScale,this.phi=(0,o.F2)(e),this.theta=(0,o.F2)(t),this.check()}fromVector3(t){return this.radius=s.Bw(t),this.radius>0&&(this.theta=Math.atan2(t[0],t[1]),this.phi=Math.acos((0,o.qE)(t[2]/this.radius,-1,1))),this.check()}
2toVector3(){return new i.A(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}makeSafe(){return this.phi=Math.max(a,Math.min(Math.PI-a,this.phi)),this}check(){if(!(Number.isFinite(this.phi)&&Number.isFinite(this.theta)&&this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}}},73844:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},74235:(t,e,n)=>{"use strict";n.d(e,{Ph:()=>a,mk:()=>s});var r=n(17321),i=n(65132);const o=()=>{const t=(0,i.K2)();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function s(t){const e=o();t=Array.isArray(t)?t:[t];for(const n of t){const t=(0,r.D)(n);e.find(e=>t===e)||e.unshift(t)}}function a(){return o()}},75031:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6963),i=n(43801),o=n(78345),s=n(82314),a=n(66298);function u(t,e={}){var n,i;if(e=e||{},!a.isObject.call(void 0,e))throw new Error("options is invalid");const s=null!=(n=e.mutate)&&n,u=null!=(i=e.reverse)&&i;if(!t)throw new Error("<geojson> is required");if("boolean"!=typeof u)throw new Error("<reverse> must be a boolean");if("boolean"!=typeof s)throw new Error("<mutate> must be a boolean");s||"Point"===t.type||"MultiPoint"===t.type||(t=r.clone.call(void 0,t));const c=[];switch(t.type){case"GeometryCollection":return o.geomEach.call(void 0,t,function(t){l(t,u)}),t;case"FeatureCollection":return o.featureEach.call(void 0,t,function(t){const e=l(t,u);o.featureEach.call(void 0,e,function(t){c.push(t)})}),a.featureCollection.call(void 0,c)}return l(t,u)}function l(t,e){switch("Feature"===t.type?t.geometry.type:t.type){case"GeometryCollection":return o.geomEach.call(void 0,t,function(t){l(t,e)}),t;case"LineString":return c(s.getCoords.call(void 0,t),e),t;case"Polygon":return h(s.getCoords.call(void 0,t),e),t;case"MultiLineString":return s.getCoords.call(void 0,t).forEach(function(t){c(t,e)}),t;case"MultiPolygon":return s.getCoords.call(void 0,t).forEach(function(t){h(t,e)}),t;case"Point":case"MultiPoint":return t}}function c(t,e){i.booleanClockwise.call(void 0,t)===e&&t.reverse()}function h(t,e){i.booleanClockwise.call(void 0,t[0])!==e&&t[0].reverse();for(let n=1;n<t.length;n++)i.booleanClockwise.call(void 0,t[n])===e&&t[n].reverse()}var A=u;e.default=A,e.rewind=u},75784:(t,e,n)=>{"use strict";n.d(e,{Bd:()=>r}),"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,void 0!==n.g&&n.g,"undefined"!=typeof document&&document;const r=Boolean("object"!=typeof process||"[object process]"!==String(process)||process.browser),i="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);i&&parseFloat(i[1])},76393:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,n=t.data,o=t.getPath,c=void 0===o?function(t){return t.path}:o,h=t.getDirection,A=void 0===h?function(t){return t.direction}:h,f=t.getColor,d=void 0===f?function(t){return a}:f,p=t.getMarkerPercentages,g=void 0===p?function(t,e){return[.5]}:p,m=t.projectFlat,y=[],v=i(n);try{for(v.s();!(e=v.n()).done;){var _,b=e.value,w=c(b),E=A(b)||u,x=d(b),S=w.map(function(t){return new r.Vector2(t)}),T=S.slice(0).reverse(),P=s(S),C=i(g(b,{lineLength:P}));try{for(C.s();!(_=C.n()).done;){var M=_.value;if(E.forward){var I=l({path:S,percentage:M,lineLength:P,color:x,object:b,projectFlat:m});y.push(I)}if(E.backward){var O=l({path:T,percentage:M,lineLength:P,color:x,object:b,projectFlat:m});y.push(O)}}}catch(t){C.e(t)}finally{C.f()}}}catch(t){v.e(t)}finally{v.f()}return y};var r=n(4572);function i(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,s=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(t){for(var e=0,n=0;n<t.length-1;n++)e+=t[n].distance(t[n+1]);return e}var a=[0,0,0,255],u={forward:!0,backward:!1};function l(t){var e=t.path,n=t.percentage,i=t.lineLength,o=t.color,s=t.object,a=t.projectFlat,u=i*n,l=0,c=0,h=0;for(h=0;h<e.length-1&&!((l+=e[h].distance(e[h+1]))>u);h++)c=l;h===e.length-1&&(h-=1);var A=u-c,f=e[h+1].clone().subtract(e[h]).normalize().clone().multiply(new r.Vector2(A,A)).add(e[h]),d=180*new r.Vector2(a(e[h+1])).subtract(a(e[h])).verticalAngle()/Math.PI;return{position:[f.x,f.y,0],angle:d,color:o,object:s}}},77359:(t,e,n)=>{"use strict";function r(t,e,n){if(null!==t)for(var i,o,s,a,u,l,c,h,A=0,f=0,d=t.type,p="FeatureCollection"===d,g="Feature"===d,m=p?t.features.length:1,y=0;y<m;y++){u=(h=!!(c=p?t.features[y].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var v=0;v<u;v++){var _=0,b=0;if(null!==(a=h?c.geometries[v]:c)){l=a.coordinates;var w=a.type;switch(A=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(l,f,y,_,b))return!1;f++,_++;break;case"LineString":case"MultiPoint":for(i=0;i<l.length;i++){if(!1===e(l[i],f,y,_,b))return!1;f++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(i=0;i<l.length;i++){for(o=0;o<l[i].length-A;o++){if(!1===e(l[i][o],f,y,_,b))return!1;f++}"MultiLineString"===w&&_++,"Polygon"===w&&b++}"Polygon"===w&&_++;break;case"MultiPolygon":for(i=0;i<l.length;i++){for(b=0,o=0;o<l[i].length;o++){for(s=0;s<l[i][o].length-A;s++){if(!1===e(l[i][o][s],f,y,_,b))return!1;f++}b++}_++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(!1===r(a.geometries[i],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function i(t,e,n){var r=n;return function(t,e){var n,r,i,o,s,a,u,l,c,h,A=0,f="FeatureCollection"===t.type,d="Feature"===t.type,p=f?t.features.length:1;for(n=0;n<p;n++){for(a=f?t.features[n].geometry:d?t.geometry:t,l=f?t.features[n].properties:d?t.properties:{},c=f?t.features[n].bbox:d?t.bbox:void 0,h=f?t.features[n].id:d?t.id:void 0,s=(u=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=u?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,A,l,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],A,l,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,A,l,c,h))return!1;A++}}(t,function(t,i,o,s,a){r=0===i&&void 0===n?t:e(r,t,i,o,s,a)}),r}n.d(e,{Fh:()=>r,jE:()=>i})},77456:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var r=n(82314),i=n(51238);function o(t,e,n={}){var o=r.getCoord.call(void 0,t),s=r.getCoord.call(void 0,e),a=i.degreesToRadians.call(void 0,s[1]-o[1]),u=i.degreesToRadians.call(void 0,s[0]-o[0]),l=i.degreesToRadians.call(void 0,o[1]),c=i.degreesToRadians.call(void 0,s[1]),h=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(l)*Math.cos(c);return i.radiansToLength.call(void 0,2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),n.units)}var s=o;e.default=s,e.distance=o},77836:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureAngleMode=void 0;var r=a(n(25128)),i=a(n(17389)),o=a(n(79848)),s=n(96146);function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var d=[],p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(p,t);var e,n,s,a=(s=p,function(){var t,e=A(s);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=A(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?h(t):e}(this,t)});function p(){var t,e,n,s;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p);for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return e=h(t=a.call.apply(a,[this].concat(l))),n="_getTooltips",s=(0,o.default)(function(t){var e=t.modeConfig,n=t.vertex,o=t.point1,s=t.point2,a=d;if(n&&o&&s){var u,l=e||{},c=l.formatTooltip,h=l.measurementCallback,A=(0,r.default)(n,o),f=(0,r.default)(n,s),p=Math.abs(A-f);p>180&&(p=360-p),u=c?c(p):"".concat(parseFloat(p).toFixed(2)," ").concat("deg"),h&&h(p),a=[{position:(0,i.default)({type:"FeatureCollection",features:[o,s].map(function(t){return{type:"Feature",geometry:{type:"Point",coordinates:t}}})}).geometry.coordinates,text:u}]}return a}),n in e?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s,t}return e=p,(n=[{key:"handleClick",value:function(t,e){this.getClickSequence().length>=3&&this.resetClickSequence(),this.addClickSequence(t)}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}},{key:"getPoints",value:function(t){var e,n=this.getClickSequence(),r=function(t){if(Array.isArray(t))return l(t)}(e=n)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return n.length<3&&t.lastPointerMoveEvent&&r.push(t.lastPointerMoveEvent.mapCoords),r}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]},n=e.features,r=this.getPoints(t);return r.length>2?n.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[1],r[0],r[2]]}}):r.length>1&&n.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[1],r[0]]}}),e}},{key:"getTooltips",value:function(t){var e=this.getPoints(t);return this._getTooltips({modeConfig:t.modeConfig,vertex:e[0],point1:e[1],point2:e[2]})}}])&&c(e.prototype,n),p}(s.GeoJsonEditMode);e.MeasureAngleMode=p},78070:(t,e,n)=>{var r=n(83058),i=/\s+/g,o=/%[\dA-F]{2}/g,s=/"/g;function a(t){switch(t){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return t.toLowerCase()}}function u(t){if("string"!=typeof t)throw new TypeError("Expected a string, but received "+typeof t);var e,n;return 65279===t.charCodeAt(0)&&(t=t.slice(1)),"data:image/svg+xml,"+function(t){return encodeURIComponent(t).replace(o,a)}((n=t,e=n.trim().replace(i," "),Object.keys(r).forEach(function(t){r[t].test(e)&&(e=e.replace(r[t],t))}),e).replace(s,"'"))}u.toSrcset=function(t){return u(t).replace(/ /g,"%20")},t.exports=u},78160:(t,e,n)=>{"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=n(50968),a=Object.prototype.propertyIsEnumerable,u=!a.call({toString:null},"toString"),l=a.call(function(){}
2,"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(t){var e=t.constructor;return e&&e.prototype===t},A={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!A["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{h(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();r=function(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===o.call(t),r=s(t),a=e&&"[object String]"===o.call(t),A=[];if(!e&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var d=l&&n;if(a&&t.length>0&&!i.call(t,0))for(var p=0;p<t.length;++p)A.push(String(p));if(r&&t.length>0)for(var g=0;g<t.length;++g)A.push(String(g));else for(var m in t)d&&"prototype"===m||!i.call(t,m)||A.push(String(m));if(u)for(var y=function(t){if("undefined"==typeof window||!f)return h(t);try{return h(t)}catch(t){return!1}}(t),v=0;v<c.length;++v)y&&"constructor"===c[v]||!i.call(t,c[v])||A.push(c[v]);return A}}t.exports=r},78345:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(67432);function i(t,e,n){if(null!==t)for(var r,o,s,a,u,l,c,h,A=0,f=0,d=t.type,p="FeatureCollection"===d,g="Feature"===d,m=p?t.features.length:1,y=0;y<m;y++){u=(h=!!(c=p?t.features[y].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var v=0;v<u;v++){var _=0,b=0;if(null!==(a=h?c.geometries[v]:c)){l=a.coordinates;var w=a.type;switch(A=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(l,f,y,_,b))return!1;f++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===e(l[r],f,y,_,b))return!1;f++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(o=0;o<l[r].length-A;o++){if(!1===e(l[r][o],f,y,_,b))return!1;f++}"MultiLineString"===w&&_++,"Polygon"===w&&b++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,o=0;o<l[r].length;o++){for(s=0;s<l[r][o].length-A;s++){if(!1===e(l[r][o][s],f,y,_,b))return!1;f++}b++}_++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===i(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length&&!1!==e(t.features[n].properties,n);n++);break;case"Feature":e(t.properties,0)}}function s(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function a(t,e){var n,r,i,o,s,a,u,l,c,h,A=0,f="FeatureCollection"===t.type,d="Feature"===t.type,p=f?t.features.length:1;for(n=0;n<p;n++){for(a=f?t.features[n].geometry:d?t.geometry:t,l=f?t.features[n].properties:d?t.properties:{},c=f?t.features[n].bbox:d?t.bbox:void 0,h=f?t.features[n].id:d?t.id:void 0,s=(u=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=u?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,A,l,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],A,l,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,A,l,c,h))return!1;A++}}function u(t,e){a(t,function(t,n,i,o,s){var a,u=null===t?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==e(r.feature.call(void 0,t,i,{bbox:o,id:s}),n,0)&&void 0}switch(u){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c={type:a,coordinates:t.coordinates[l]};if(!1===e(r.feature.call(void 0,c,i),n,l))return!1}})}function l(t,e){u(t,function(t,n,o){var s=0;if(t.geometry){var a=t.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var u,l=0,c=0,h=0;return!1!==i(t,function(i,a,A,f,d){if(void 0===u||n>l||f>c||d>h)return u=i,l=n,c=f,h=d,void(s=0);var p=r.lineString.call(void 0,[u,i],t.properties);if(!1===e(p,n,o,d,s))return!1;s++,u=i})&&void 0}}})}function c(t,e){if(!t)throw new Error("geojson is required");u(t,function(t,n,i){if(null!==t.geometry){var o=t.geometry.type,s=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===e(r.lineString.call(void 0,s[a],t.properties),n,i,a))return!1}}})}e.coordAll=function(t){var e=[];return i(t,function(t){e.push(t)}),e},e.coordEach=i,e.coordReduce=function(t,e,n,r){var o=n;return i(t,function(t,r,i,s,a){o=0===r&&void 0===n?t:e(o,t,r,i,s,a)},r),o}
2,e.featureEach=s,e.featureReduce=function(t,e,n){var r=n;return s(t,function(t,i){r=0===i&&void 0===n?t:e(r,t,i)}),r},e.findPoint=function(t,e){if(e=e||{},!r.isObject.call(void 0,e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.coordIndex||0,u=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":u=u||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":return r.point.call(void 0,l,u,e);case"MultiPoint":return o<0&&(o=l.length+o),r.point.call(void 0,l[o],u,e);case"LineString":return a<0&&(a=l.length+a),r.point.call(void 0,l[a],u,e);case"Polygon":return s<0&&(s=l.length+s),a<0&&(a=l[s].length+a),r.point.call(void 0,l[s][a],u,e);case"MultiLineString":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),r.point.call(void 0,l[o][a],u,e);case"MultiPolygon":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s),a<0&&(a=l[o][s].length-a),r.point.call(void 0,l[o][s][a],u,e)}throw new Error("geojson is invalid")},e.findSegment=function(t,e){if(e=e||{},!r.isObject.call(void 0,e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.segmentIndex||0,u=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":u=u||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=l.length+a-1),r.lineString.call(void 0,[l[a],l[a+1]],u,e);case"Polygon":return s<0&&(s=l.length+s),a<0&&(a=l[s].length+a-1),r.lineString.call(void 0,[l[s][a],l[s][a+1]],u,e);case"MultiLineString":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a-1),r.lineString.call(void 0,[l[o][a],l[o][a+1]],u,e);case"MultiPolygon":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s),a<0&&(a=l[o][s].length-a-1),r.lineString.call(void 0,[l[o][s][a],l[o][s][a+1]],u,e)}throw new Error("geojson is invalid")},e.flattenEach=u,e.flattenReduce=function(t,e,n){var r=n;return u(t,function(t,i,o){r=0===i&&0===o&&void 0===n?t:e(r,t,i,o)}),r},e.geomEach=a,e.geomReduce=function(t,e,n){var r=n;return a(t,function(t,i,o,s,a){r=0===i&&void 0===n?t:e(r,t,i,o,s,a)}),r},e.lineEach=c,e.lineReduce=function(t,e,n){var r=n;return c(t,function(t,i,o,s){r=0===i&&void 0===n?t:e(r,t,i,o,s)}),r},e.propEach=o,e.propReduce=function(t,e,n){var r=n;return o(t,function(t,i){r=0===i&&void 0===n?t:e(r,t,i)}),r},e.segmentEach=l,e.segmentReduce=function(t,e,n){var r=n,i=!1;return l(t,function(t,o,s,a,u){r=!1===i&&void 0===n?t:e(r,t,o,s,a,u),i=!0}),r}},78394:(t,e,n)=>{"use strict";var r=n(19343),i=n(3468),o=Object;t.exports=r(function(){if(null==this||this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0)},78475:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}
2){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invali
2d");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},78580:(t,e,n)=>{"use strict";function r(t,e){if(!t)throw new Error(e||"loader assertion failed.")}n.d(e,{v:()=>r})},78764:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}
2),e.UNIT=e.PROJECTED_PIXEL_SIZE_MULTIPLIER=void 0,e.PROJECTED_PIXEL_SIZE_MULTIPLIER=2/3,e.UNIT={common:0,meters:1,pixels:2}},78768:(t,e)=>{"use strict";function n(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.ImmutableFeatureCollection=void 0;var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,"featureCollection",void 0),this.featureCollection=e}var e,r;return e=t,(r=[{key:"getObject",value:function(){return this.featureCollection}},{key:"replacePosition",value:function(t,e,n){var r=this.featureCollection.features[t].geometry,i="Polygon"===r.type||"MultiPolygon"===r.type,s=o({},r,{coordinates:c(r.coordinates,e,n,i)});return this.replaceGeometry(t,s)}},{key:"removePosition",value:function(t,e){var n=this.featureCollection.features[t].geometry;if("Point"===n.type)throw Error("Can't remove a position from a Point or there'd be nothing left");if("MultiPoint"===n.type&&n.coordinates.length<2)throw Error("Can't remove the last point of a MultiPoint or there'd be nothing left");if("LineString"===n.type&&n.coordinates.length<3)throw Error("Can't remove position. LineString must have at least two positions");if("Polygon"===n.type&&n.coordinates[0].length<5&&Array.isArray(e)&&0===e[0])throw Error("Can't remove position. Polygon's outer ring must have at least four positions");if("MultiLineString"===n.type&&1===n.coordinates.length&&n.coordinates[0].length<3)throw Error("Can't remove position. MultiLineString must have at least two positions");if("MultiPolygon"===n.type&&1===n.coordinates.length&&n.coordinates[0][0].length<5&&Array.isArray(e)&&0===e[0]&&0===e[1])throw Error("Can't remove position. MultiPolygon's outer ring must have at least four positions");var r="Polygon"===n.type||"MultiPolygon"===n.type,i=o({},n,{coordinates:h(n.coordinates,e,r)});return function(t){switch(t.type){case"Polygon":!function(t){for(var e=t.coordinates,n=1;n<e.length;n++)f(e,n)&&n--}(t);break;case"MultiLineString":!function(t){for(var e=0;e<t.coordinates.length;e++)1===t.coordinates[e].length&&(t.coordinates.splice(e,1),e--)}(t);break;case"MultiPolygon":!function(t){for(var e=0;e<t.coordinates.length;e++){var n=t.coordinates[e];n[0].length<=3&&(t.coordinates.splice(e,1),e--);for(var r=1;r<n.length;r++)f(n,r)&&r--}}(t)}}(i),this.replaceGeometry(t,i)}},{key:"addPosition",value:function(t,e,n){var r=this.featureCollection.features[t].geometry;if("Point"===r.type)throw new Error("Unable to add a position to a Point feature");var i="Polygon"===r.type||"MultiPolygon"===r.type,s=o({},r,{coordinates:A(r.coordinates,e,n,i)});return this.replaceGeometry(t,s)}},{key:"replaceGeometry",value:function(e,r){var i=o({},this.featureCollection.features[e],{geometry:r});return new t(o({},this.featureCollection,{features:[].concat(n(this.featureCollection.features.slice(0,e)),[i],n(this.featureCollection.features.slice(e+1)))}))}},{key:"addFeature",value:function(t){return this.addFeatures([t])}},{key:"addFeatures",value:function(e){return new t(o({},this.featureCollection,{features:[].concat(n(this.featureCollection.features),n(e))}))}},{key:"deleteFeature",value:function(t){return this.deleteFeatures([t])}},{key:"deleteFeatures",value:function(e){var r=n(this.featureCollection.features);e.sort();for(var i=e.length-1;i>=0;i--){var s=e[i];s>=0&&s<r.length&&r.splice(s,1)}return new t(o({},this.featureCollection,{features:r}))}}])&&s(e.prototype,r),t}();function l(t,e){if(2===t.length&&3===e.length){var n=e[2];return[t[0],t[1],n]}return t}function c(t,e,r,i){if(!e)return t;if(0===e.length)return l(r,t);if(1===e.length){var o=[].concat(n(t.slice(0,e[0])),[l(r,t[e[0]])],n(t.slice(e[0]+1)));return!i||0!==e[0]&&e[0]!==t.length-1||(o[0]=l(r,t[0]),o[t.length-1]=l(r,t[0])),o}return[].concat(n(t.slice(0,e[0])),[c(t[e[0]],e.slice(1,e.length),r,i)],n(t.slice(e[0]+1)))}function h(t,e,r){if(!e)return t;
2if(0===e.length)throw Error("Must specify the index of the position to remove");if(1===e.length){var i=[].concat(n(t.slice(0,e[0])),n(t.slice(e[0]+1)));return!r||0!==e[0]&&e[0]!==t.length-1||(0===e[0]?i[i.length-1]=i[0]:e[0]===t.length-1&&(i[0]=i[i.length-1])),i}return[].concat(n(t.slice(0,e[0])),[h(t[e[0]],e.slice(1,e.length),r)],n(t.slice(e[0]+1)))}function A(t,e,r,i){if(!e)return t;if(0===e.length)throw Error("Must specify the index of the position to remove");return 1===e.length?[].concat(n(t.slice(0,e[0])),[r],n(t.slice(e[0]))):[].concat(n(t.slice(0,e[0])),[A(t[e[0]],e.slice(1,e.length),r,i)],n(t.slice(e[0]+1)))}function f(t,e){return t[e].length<=3&&(t.splice(e,1),!0)}e.ImmutableFeatureCollection=u},79266:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(44454),i=n(84407),o=n(94939);class s extends i.A{get[Symbol.toStringTag](){return"Texture2D"}static isSupported(t,e){return i.A.isSupported(t,e)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;(0,r.tj)(t),(e instanceof Promise||"string"==typeof e)&&(e={data:e}),"string"==typeof e.data&&(e=Object.assign({},e,{data:(n=e.data,(0,o.v)("string"==typeof n),n=""+n,new Promise((t,e)=>{try{const r=new Image;r.onload=()=>t(r),r.onerror=()=>e(new Error("Could not load image ".concat(n,"."))),r.crossOrigin="anonymous",r.src=n}catch(t){e(t)}}))})),super(t,Object.assign({},e,{target:3553})),this.initialize(e),Object.seal(this)}}},79327:(t,e,n)=>{"use strict";function r(t){const{source:e,target:n,start:r=0,size:i,getData:o}=t,s=t.end||n.length,a=e.length,u=s-r;if(a>u)return void n.set(e.subarray(0,u),r);if(n.set(e,r),!o)return;let l=a;for(;l<u;){const t=o(l,e);for(let e=0;e<i;e++)n[r+l]=t[e]||0,l++}}n.d(e,{yY:()=>u,Pu:()=>l,A3:()=>a,EX:()=>s,K$:()=>o,aI:()=>c});const i={interpolation:{duration:0,easing:t=>t},spring:{stiffness:.05,damping:.5}};function o(t,e){if(!t)return null;Number.isFinite(t)&&(t={type:"interpolation",duration:t});const n=t.type||"interpolation";return{...i[n],...e,...t,type:n}}function s(t,e){const n=e.getBuffer();return n?[n,{divisor:0,size:e.size,normalized:e.settings.normalized}]:e.value}function a(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error('No defined attribute type for size "'.concat(t,'"'))}}function u(t){t.push(t.shift())}function l(t,e){const{doublePrecision:n,settings:r,value:i,size:o}=t,s=n&&i instanceof Float64Array?2:1;return(r.noAlloc?i.length:e*o)*s}function c({buffer:t,numInstances:e,attribute:n,fromLength:i,fromStartIndices:o,getData:s=t=>t}){const a=n.doublePrecision&&n.value instanceof Float64Array?2:1,u=n.size*a,c=n.byteOffset,h=n.startIndices,A=o&&h,f=l(n,e),d=n.isConstant;if(!A&&i>=f)return;const p=d?n.value:n.getBuffer().getData({srcByteOffset:c});if(n.settings.normalized&&!d){const t=s;s=(e,r)=>n.normalizeConstant(t(e,r))}const g=d?(t,e)=>s(p,e):(t,e)=>s(p.subarray(t,t+u),e),m=t.getData({length:i}),y=new Float32Array(f);!function({source:t,target:e,size:n,getData:i,sourceStartIndices:o,targetStartIndices:s}){if(!Array.isArray(s))return r({source:t,target:e,size:n,getData:i}),e;let a=0,u=0;const l=i&&((t,e)=>i(t+u,e)),c=Math.min(o.length,s.length);for(let i=1;i<c;i++){const c=o[i]*n,h=s[i]*n;r({source:t.subarray(a,c),target:e,start:u,end:h,size:n,getData:l}),a=c,u=h}u<e.length&&r({source:[],target:e,start:u,size:n,getData:l})}({source:m,target:y,sourceStartIndices:o,targetStartIndices:h,size:u,getData:g}),t.byteLength<y.byteLength+c&&t.reallocate(y.byteLength+c),t.subData({data:y,offset:c})}},79669:(t,e,n)=>{"use strict";n.d(e,{K:()=>a,p:()=>u});var r=n(5664);const i="\nuniform float lighting_uAmbient;\nuniform float lighting_uDiffuse;\nuniform float lighting_uShininess;\nuniform vec3 lighting_uSpecularColor;\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 light_direction, vec3 view_direction, vec3 normal_worldspace, vec3 color) {\n vec3 halfway_direction = normalize(light_direction + view_direction);\n float lambertian = dot(light_direction, normal_worldspace);\n float specular = 0.0;\n if (lambertian > 0.0) {\n float specular_angle = max(dot(normal_worldspace, halfway_direction), 0.0);\n specular = pow(specular_angle, lighting_uShininess);\n }\n lambertian = max(lambertian, 0.0);\n return (lambertian * lighting_uDiffuse * surfaceColor + specular * lighting_uSpecularColor) * color;\n}\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n vec3 lightColor = surfaceColor;\n\n if (lighting_uEnabled) {\n vec3 view_direction = normalize(cameraPosition - position_worldspace);\n lightColor = lighting_uAmbient * surfaceColor * lighting_uAmbientLight.color;\n\n for (int i = 0; i < MAX_LIGHTS;
2 i++) {\n if (i >= lighting_uPointLightCount) {\n break;\n }\n PointLight pointLight = lighting_uPointLight[i];\n vec3 light_position_worldspace = pointLight.position;\n vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n }\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uDirectionalLightCount) {\n break;\n }\n DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n }\n }\n return lightColor;\n}\n\nvec3 lighting_getSpecularLightColor(vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n vec3 lightColor = vec3(0, 0, 0);\n vec3 surfaceColor = vec3(0, 0, 0);\n\n if (lighting_uEnabled) {\n vec3 view_direction = normalize(cameraPosition - position_worldspace);\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uPointLightCount) {\n break;\n }\n PointLight pointLight = lighting_uPointLight[i];\n vec3 light_position_worldspace = pointLight.position;\n vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n }\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uDirectionalLightCount) {\n break;\n }\n DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n }\n }\n return lightColor;\n}\n",o={};function s(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;if(!("material"in t))return{};const{material:e}=t;return e?function(t){const{ambient:e=.35,diffuse:n=.6,shininess:r=32,specularColor:i=[30,30,30]}=t;return{lighting_uAmbient:e,lighting_uDiffuse:n,lighting_uShininess:r,lighting_uSpecularColor:i.map(t=>t/255)}}(e):{lighting_uEnabled:!1}}const a={name:"gouraud-lighting",dependencies:[r._],vs:i,defines:{LIGHTING_VERTEX:1},getUniforms:s},u={name:"phong-lighting",dependencies:[r._],fs:i,defines:{LIGHTING_FRAGMENT:1},getUniforms:s}},79818:(t,e,n)=>{"use strict";var r=n(528),i=n(28498),o=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&o(t,".prototype.")>-1?i(n):n}},79848:(t,e)=>{"use strict";function n(t,e){if(t===e)return!0;if(Array.isArray(t)){var n=t.length;if(!e||e.length!==n)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,r={};return function(i){for(var o in i)if(!n(i[o],r[o])){e=t(i),r=i;break}return e}}},79965:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(55808)),i=n(73844),o=n(78345);function s(t,e={}){const n=[];if(o.geomEach.call(void 0,t,t=>{n.push(t.coordinates)}
2),n.length<2)throw new Error("Must have at least 2 geometries");const s=r.union(n[0],...n.slice(1));return 0===s.length?null:1===s.length?i.polygon.call(void 0,s[0],e.properties):i.multiPolygon.call(void 0,s,e.properties)}var a=s;e.default=a,e.union=s},80013:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},o(t,e,n||t)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.DuplicateMode=void 0;var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(c,t);var e,n,u,l=(u=c,function(){var t,e=s(u);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),l.apply(this,arguments)}return e=c,(n=[{key:"handleStartDragging",value:function(t,e){o(s(c.prototype),"handleStartDragging",this).call(this,t,e),this._geometryBeforeTranslate&&e.onEdit(this.getAddManyFeaturesAction(this._geometryBeforeTranslate,e.data))}},{key:"updateCursor",value:function(t){this._isTranslatable?t.onUpdateCursor("copy"):t.onUpdateCursor(null)}}])&&i(e.prototype,n),c}(n(15348).TranslateMode);e.DuplicateMode=u},80062:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},80409:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(44776),i=u(n(66515)),o=n(58827),s=u(n(70953)),a=n(78764);function u(t){return t&&t.__esModule?t:{default:t}}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=A(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},h(t,e,n||t)}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){var e=t.source,n=t.code,r=void 0===n?"":n;return e.replace(/}[^{}]*$/,r.concat("\n}\n"))}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(d,t);var e,n,r,u=(r=d,function(){var t,e=A(r);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=A(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==l(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function d(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),u.apply(this,arguments)}return e=d,(n=[{key:"getShaders",value:function(){var t=h(A(d.prototype),"getShaders",this).call(this);return Object.assign({},t,{modules:t.modules.concat([s.default]),vs:p({source:t.vs,code:" outline_setUV(gl_Position);\n outline_setZLevel(instanceZLevel);\n"}
2),fs:p({source:t.fs,code:" gl_FragColor = outline_filterColor(gl_FragColor);\n"})})}},{key:"initializeState",value:function(t){h(A(d.prototype),"initializeState",this).call(this,t),this.setState({outlineFramebuffer:new o.Framebuffer(t.gl),dummyTexture:new o.Texture2D(t.gl)}),this.state.attributeManager.addInstanced({instanceZLevel:{size:1,type:i.default.UNSIGNED_BYTE,accessor:"getZLevel"}})}},{key:"draw",value:function(t){t.moduleParameters,t.parameters;var e=t.uniforms,n=(t.context,this.props),r=n.jointRounded,o=n.capRounded,s=n.billboard,u=n.miterLimit,l=n.widthUnits,c=n.widthScale,h=n.widthMinPixels,A=n.widthMaxPixels;e=Object.assign({},e,{jointType:Number(r),capType:Number(o),billboard:s,widthUnits:a.UNIT[l],widthScale:c,miterLimit:u,widthMinPixels:h,widthMaxPixels:A});var f=this.state,d=f.outlineFramebuffer,p=f.dummyTexture;d.resize(),d.clear({color:!0,depth:!0}),this.state.model.updateModuleSettings({outlineEnabled:!0,outlineRenderShadowmap:!0,outlineShadowmap:p}),this.state.model.draw({uniforms:Object.assign({},e,{jointType:0,widthScale:1.3*this.props.widthScale}),parameters:{depthTest:!1,blendEquation:i.default.MAX},framebuffer:d}),this.state.model.updateModuleSettings({outlineEnabled:!0,outlineRenderShadowmap:!1,outlineShadowmap:d}),this.state.model.draw({uniforms:Object.assign({},e,{jointType:Number(r),capType:Number(o),widthScale:this.props.widthScale}),parameters:{depthTest:!1}})}}])&&c(e.prototype,n),d}(r.PathLayer);e.default=g,d(g,"layerName","PathOutlineLayer"),d(g,"defaultProps",{getZLevel:function(){return 0}})},80456:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScaleMode=void 0;var r=g(n(60899)),i=g(n(7784)),o=g(n(25128)),s=g(n(43788)),a=n(89595),u=g(n(90227)),l=n(78345),c=g(n(71123)),h=g(n(69081)),A=n(82314),f=n(71169),d=n(96146),p=n(78768);function g(t){return t&&t.__esModule?t:{default:t}}function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function w(t,e){return w=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},w(t,e)}function E(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var x=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&w(t,e)}(x,t);var e,n,d,g=(d=x,function(){var t,e=b(d);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=b(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?_(t):e}(this,t)});function x(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,x);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return E(_(t=g.call.apply(g,[this].concat(n))),"_geometryBeingScaled",void 0),E(_(t),"_selectedEditHandle",void 0),E(_(t),"_cornerGuidePoints",void 0),E(_(t),"_cursor",void 0),E(_(t),"_isScaling",!1),E(_(t),"_isSinglePointGeometrySelected",function(t){var e=(t||{}).features;return!(!Array.isArray(e)||1!==e.length)&&"Point"===(0,A.getGeom)(e[0]).type}),E(_(t),"_getOppositeScaleHandle",function(e){var n=e&&e.properties&&Array.isArray(e.properties.positionIndexes)&&e.properties.positionIndexes[0];if("number"!=typeof n)return null;var r=t._cornerGuidePoints.length,i=(n+r/2)%r;return t._cornerGuidePoints.find(function(t){return!!Array.isArray(t.properties.positionIndexes)&&t.properties.positionIndexes[0]===i})}),E(_(t),"_getUpdatedData",function(t,e){for(var n=new p.ImmutableFeatureCollection(t.data),r=t.selectedIndexes,i=0;i<r.length;i++){var o=r[i],s=e.features[i];n=n.replaceGeometry(o,s.geometry)}return n.getObject()}),E(_(t),"isEditHandleSelected",function(){return Boolean(t._selectedEditHandle)}),E(_(t),"getScaleAction",function(e,n,r,i){if(!t._selectedEditHandle)return null;var o=t._getOppositeScaleHandle(t._selectedEditHandle),s=(0,A.getCoord)(o),a=function(t,e,n){var r=(0,c.default)(t,e);return(0,c.default)(t,n)/r}(s,e,n),u=(0,h.default)(t._geometryBeingScaled,a,{origin:s});return{updatedData:t._getUpdatedData(i,u),editType:r,editContext:{featureIndexes:i.selectedIndexes}}}),E(_(t),"updateCursor",function(e){if(t._selectedEditHandle){t._cursor&&e.onUpdateCursor(t._cursor);var n=t.getSelectedFeaturesAsFeatureCollection(e),r=(0,i.default)(n),s=(0,o.default)(r,t._selectedEditHandle),a=s<0?s+180:s;a>=0&&a<=90||a>=180&&a<=270?(t._cursor="nesw-resize",e.onUpdateCursor("nesw-resize")):(t._cursor="nwse-resize",e.onUpdateCursor("nwse-resize"))}else e.onUpdateCursor(null),t._cursor=null}),t}return e=x,(n=[{key:"handlePointerMove",value:function(t,e){if(!this._isScaling){var n=(0,f.getPickedEditHandle)(t.picks);this._selectedEditHandle=n&&"scale"===n.properties.editHandleType?n:null,this.updateCursor(e)}}},{key:"handleStartDragging",value:function(t,e){this._selectedEditHandle&&(this._isScaling=!0,this._geometryBeingScaled=this.getSelectedFeaturesAsFeatureCollection(e))}},{key:"handleDragging",value:function(t,e){if(this._isScaling){e.onUpdateCursor(this._cursor);var n=this.getScaleAction(t.pointerDownMapCoords,t.mapCoords,"scaling",e);n&&e.onEdit(n),t.cancelPan()}}},{key:"handleStopDragging",value:function(t,e){if(this._isScaling){var n=this.getScaleAction(t.pointerDownMapCoords,t.mapCoords,"scaled",e);n&&e.onEdit(n),e.onUpdateCursor(null),this._geometryBeingScaled=null,this._selectedEditHandle=null,this._cursor=null,this._isScaling=!1}}},{key:"getGuides",value:function(t){this._cornerGuidePoints=[];var e=this.getSelectedFeaturesAsFeatureCollection(t);
2if(this._isSinglePointGeometrySelected(e))return{type:"FeatureCollection",features:[]};var n=(0,s.default)((0,r.default)(e));n.properties.mode="scale";var i,o=[];return(0,l.coordEach)(n,function(t,e){if(e<4){var n=(0,a.point)(t,{guideType:"editHandle",editHandleType:"scale",positionIndexes:[e]});o.push(n)}}),this._cornerGuidePoints=o,(0,a.featureCollection)([(0,u.default)(n)].concat(function(t){if(Array.isArray(t))return y(t)}(i=this._cornerGuidePoints)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}}])&&v(e.prototype,n),x}(d.GeoJsonEditMode);e.ScaleMode=x},80458:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});var r=n(24586),i=n(1285),o=n(84075),s=n(90333),a=n(34081),u=n(9946);class l extends i.A{constructor(t={}){const{latitude:e=0,longitude:n=0,zoom:i=0,pitch:s=0,bearing:l=0,nearZMultiplier:c=.1,farZMultiplier:h=1.01,orthographic:A=!1,projectionMatrix:f,repeat:d=!1,worldOffset:p=0,position:g,padding:m,legacyMeterSizes:y=!1}=t;let{width:v,height:_,altitude:b=1.5}=t;const w=Math.pow(2,i);let E;v=v||1,_=_||1;let x=null;if(f)b=f[5]/2,E=(0,o.Os)(b);else{let n;if(t.fovy?(E=t.fovy,b=(0,o.wZ)(E)):E=(0,o.Os)(b),m){const{top:t=0,bottom:e=0}=m;n=[0,(0,a.qE)((t+_-e)/2,0,_)-_/2]}x=(0,o.om)({width:v,height:_,scale:w,center:g&&[0,0,g[2]*(0,o.mY)(e)],offset:n,pitch:s,fovy:E,nearZMultiplier:c,farZMultiplier:h})}let S=(0,o.rY)({height:_,pitch:s,bearing:l,scale:w,altitude:b});p&&(S=(new u.A).translate([512*p,0,0]).multiplyLeft(S)),super({...t,width:v,height:_,viewMatrix:S,longitude:n,latitude:e,zoom:i,...x,fovy:E,focalDistance:b}),(0,r.A)(this,"longitude",void 0),(0,r.A)(this,"latitude",void 0),(0,r.A)(this,"pitch",void 0),(0,r.A)(this,"bearing",void 0),(0,r.A)(this,"altitude",void 0),(0,r.A)(this,"fovy",void 0),(0,r.A)(this,"orthographic",void 0),(0,r.A)(this,"_subViewports",void 0),(0,r.A)(this,"_pseudoMeters",void 0),this.latitude=e,this.longitude=n,this.zoom=i,this.pitch=s,this.bearing=l,this.altitude=b,this.fovy=E,this.orthographic=A,this._subViewports=d?[]:null,this._pseudoMeters=y,Object.freeze(this)}get subViewports(){if(this._subViewports&&!this._subViewports.length){const t=this.getBounds(),e=Math.floor((t[0]+180)/360),n=Math.ceil((t[2]-180)/360);for(let t=e;t<=n;t++){const e=t?new l({...this,worldOffset:t}):this;this._subViewports.push(e)}}return this._subViewports}projectPosition(t){if(this._pseudoMeters)return super.projectPosition(t);const[e,n]=this.projectFlat(t);return[e,n,(t[2]||0)*(0,o.mY)(t[1])]}unprojectPosition(t){if(this._pseudoMeters)return super.unprojectPosition(t);const[e,n]=this.unprojectFlat(t);return[e,n,(t[2]||0)/(0,o.mY)(n)]}addMetersToLngLat(t,e){return(0,o.dT)(t,e)}panByPosition(t,e){const n=(0,o.xJ)(e,this.pixelUnprojectionMatrix),r=this.projectFlat(t),i=s.WQ([],r,s.ze([],n)),a=s.WQ([],this.center,i),[u,l]=this.unprojectFlat(a);return{longitude:u,latitude:l}}getBounds(t={}){const e=(0,o.gW)(this,t.z||0);return[Math.min(e[0][0],e[1][0],e[2][0],e[3][0]),Math.min(e[0][1],e[1][1],e[2][1],e[3][1]),Math.max(e[0][0],e[1][0],e[2][0],e[3][0]),Math.max(e[0][1],e[1][1],e[2][1],e[3][1])]}fitBounds(t,e={}){const{width:n,height:r}=this,{longitude:i,latitude:s,zoom:a}=(0,o.Fe)({width:n,height:r,bounds:t,...e});return new l({width:n,height:r,longitude:i,latitude:s,zoom:a})}}(0,r.A)(l,"displayName","WebMercatorViewport")},80705:(t,e,n)=>{"use strict";var r=n(89617),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){if(!r(e))throw new TypeError("iterator must be a function");var s,a;arguments.length>=3&&(s=n),a=t,"[object Array]"===i.call(a)?function(t,e,n){for(var r=0,i=t.length;r<i;r++)o.call(t,r)&&(null==n?e(t[r],r,t):e.call(n,t[r],r,t))}(t,e,s):"string"==typeof t?function(t,e,n){for(var r=0,i=t.length;r<i;r++)null==n?e(t.charAt(r),r,t):e.call(n,t.charAt(r),r,t)}(t,e,s):function(t,e,n){for(var r in t)o.call(t,r)&&(null==n?e(t[r],r,t):e.call(n,t[r],r,t))}(t,e,s)}},80881:(t,e)=>{"use strict";function n(t,e,s){let a;const u={};for(let l=0;l<t.length;l++){const c=t[l],h=r(c);let A="";if(A=void 0===s?h:s+"."+h,h===e.textNodeName)void 0===a?a=c[h]:a+=""+c[h];else{if(void 0===h)continue;if(c[h]){let t=n(c[h],e,A);const r=o(t,e);c[":@"]?i(t,c[":@"],A,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==u[h]&&u.hasOwnProperty(h)?(Array.isArray(u[h])||(u[h]=[u[h]]),u[h].push(t)):e.isArray(h,A,r)?u[h]=[t]:u[h]=t}}}return"string"==typeof a?a.length>0&&(u[e.textNodeName]=a):void 0!==a&&(u[e.textNodeName]=a),u}function r(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function i(t,e,n,r){if(e){const i=Object.keys(e),o=i.length;for(let s=0;s<o;s++){const o=i[s];r.isArray(o,n+"."+o,!0,!0)?t[o]=[e[o]]:t[o]=e[o]}}}function o(t,e){const{textNodeName:n}=e,r=Object.keys(t).length;return 0===r||!(1!==r||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n])}e.prettify=function(t,e){return n(t,e)}},81011:(t,e,n)=>{"use strict";n.d(e,{A:()=>O});var r=n(24586),i=n(10836),o=n(46429),s=n(63564);class a{constructor(t,e){(0,r.A)(this,"opts",void 0),(0,r.A)(this,"source",void 0),this.opts=e,this.source=t}get value(){return this.source.value}getValue(){const t=this.source.getBuffer(),e=this.getAccessor();if(t)return[t,e];const{value:n}=this.source,{size:r}=e;let i=n;if(n&&n.length!==r){i=new Float32Array(r);const t=e.elementOffset||0;for(let e=0;e<r;++e)i[e]=n[t+e]}return i}getAccessor(){return{...this.source.getAccessor(),...this.opts}}}var u=n(35423),l=n(86655),c=n(23615);function h(t){return t.stride||t.size*t.bytesPerElement}function A(t,e){e.offset&&c.A.removed("shaderAttribute.offset","vertexOffset, elementOffset")();const n=h(t),r=(void 0!==e.vertexOffset?e.vertexOffset:t.vertexOffset||0)*n+(e.elementOffset||0)*t.bytesPerElement+(t.offset||0);return{...e,offset:r,stride:n}}class f{constructor(t,e,n){(0,r.A)(this,"gl",void 0),(0,r.A)(this,"id",void 0),(0,r.A)(this,"size",void 0),(0,r.A)(this,"settings",void 0),(0,r.A)(this,"value",void 0),(0,r.A)(this,"doublePrecision",void 0),(0,r.A)(this,"_buffer",void 0),(0,r.A)(this,"state",void 0),this.gl=t,this.id=e.id||"",this.size=e.size||1;const s=e.logicalType||e.type,a=5130===s;let u,{defaultValue:l}=e;l=Number.isFinite(l)?[l]:l||new Array(this.size).fill(0),u=a?5126:!s&&e.isIndexed?t&&(0,i.jI)(t,o.G.ELEMENT_INDEX_UINT32)?5125:5123:s||5126;let c=function(t){switch(t){case 5126:return Float32Array;case 5130:return Float64Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return Uint8ClampedArray;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;default:throw new Error("Unknown GL type")}}(s||u||5126);this.doublePrecision=a,a&&!1===e.fp64&&(c=Float32Array),this.value=null,this.settings={...e,defaultType:c,defaultValue:l,logicalType:s,type:u,size:this.size,bytesPerElement:c.BYTES_PER_ELEMENT},this.state={...n,externalBuffer:null,bufferAccessor:this.settings,allocatedValue:null,numInstances:0,bounds:null,constant:!1},this._buffer=null}get isConstant(){return this.state.constant}get buffer(){if(!this._buffer){const{isIndexed:t,type:e}=this.settings;this._buffer=new s.A(this.gl,{id:this.id,target:t?34963:34962,accessor:{type:e}})}return this._buffer}get byteOffset(){const t=this.getAccessor();return t.vertexOffset?t.vertexOffset*h(t):0}get numInstances(){return this.state.numInstances}set numInstances(t){this.state.numInstances=t}delete(){this._buffer&&(this._buffer.delete(),this._buffer=null),u.A.release(this.state.allocatedValue)}getShaderAttributes(t,e){if(this.doublePrecision){const n={},r=this.value instanceof Float64Array,i=function(t,e){const n=A(t,e);return{high:n,low:{...n,offset:n.offset+4*t.size}}}(this.getAccessor(),e||{});return n[t]=new a(this,i.high),n["".concat(t,"64Low")]=r?new a(this,i.low):new Float32Array(this.size),n}if(e){const n=A(this.getAccessor(),e);return{[t]:new a(this,n)}}return{[t]:this}}getBuffer(){return this.state.constant?null:this.state.externalBuffer||this._buffer}getValue(){return this.state.constant?this.value:[this.getBuffer(),this.getAccessor()]}getAccessor(){return this.state.bufferAccessor}getBounds(){if(this.state.bounds)return this.state.bounds;let t=null;if(this.state.constant&&this.value){const e=Array.from(this.value);t=[e,e]}else{const{value:e,numInstances:n,size:r}=this,i=n*r;if(e&&i&&e.length>=i){const n=new Array(r).fill(1/0),o=new Array(r).fill(-1/0);for(let t=0;t<i;)for(let i=0;i<r;i++){const r=e[t++];r<n[i]&&(n[i]=r),r>o[i]&&(o[i]=r)}t=[n,o]}}return this.state.bounds=t,t}setData(t){const{state:e}=this;let n;n=ArrayBuffer.isView(t)?{value:t}:t instanceof s.A?{buffer:t}:t;const r={...this.settings,...n};if(e.bufferAccessor=r,e.bounds=null,n.constant){let t=n.value;if(t=this._normalizeValue(t,[],0),this.settings.normalized&&(t=this.normalizeConstant(t)),e.constant&&this._areValuesEqual(t,this.value))return!1;e.externalBuffer=null,e.constant=!0,this.value=t}else if(n.buffer){const t=n.buffer;e.externalBuffer=t,e.constant=!1,this.value=n.value||null;const i=n.value instanceof Float64Array;r.type=n.type||t.accessor.type,r.bytesPerElement=t.accessor.BYTES_PER_ELEMENT*(i?2:1),r.stride=h(r)}else if(n.value){this._checkExternalBuffer(n);let t=n.value;e.externalBuffer=null,e.constant=!1,this.value=t,r.bytesPerElement=t.BYTES_PER_ELEMENT,r.stride=h(r);const{buffer:i,byteOffset:o}=this;this.doublePrecision&&t instanceof Float64Array&&(t=(0,l.cT)(t,r));const s=t.byteLength+o+2*r.stride;i.byteLength<s&&i.reallocate(s),i.setAccessor(null),i.subData({data:t,offset:o}),r.type=n.type||i.accessor.type}return!0}updateSubBuffer(t={}){this.state.bounds=null;const e=this.value,{startOffset:n=0,endOffset:r}=t;this.buffer.subData({data:this.doublePrecision&&e instanceof Float64Array?(0,l.cT)(e,{size:this.size,startIndex:n,endIndex:r}):e.subarray(n,r),offset:n*e.BYTES_PER_ELEMENT+this.byteOffset})}allocate(t,e=!1){const{state:n}=this,r=n.allocatedValue,i=u.A.allocate(r,t+1,{size:this.size,type:this.settings.defaultType,copy:e});this.value=i;const{buffer:o,byteOffset:s}=this;return o.byteLength<i.byteLength+s&&(o.reallocate(i.byteLength+s),e&&r&&o.subData({data:r instanceof Float64Array?(0,l.cT)(r,this):r,offset:s}
2)),n.allocatedValue=i,n.constant=!1,n.externalBuffer=null,n.bufferAccessor=this.settings,!0}_checkExternalBuffer(t){const{value:e}=t;if(!ArrayBuffer.isView(e))throw new Error("Attribute ".concat(this.id," value is not TypedArray"));const n=this.settings.defaultType;let r=!1;if(this.doublePrecision&&(r=e.BYTES_PER_ELEMENT<4),r)throw new Error("Attribute ".concat(this.id," does not support ").concat(e.constructor.name));e instanceof n||!this.settings.normalized||"normalized"in t||c.A.warn("Attribute ".concat(this.id," is normalized"))()}normalizeConstant(t){switch(this.settings.type){case 5120:return new Float32Array(t).map(t=>(t+128)/255*2-1);case 5122:return new Float32Array(t).map(t=>(t+32768)/65535*2-1);case 5121:return new Float32Array(t).map(t=>t/255);case 5123:return new Float32Array(t).map(t=>t/65535);default:return t}}_normalizeValue(t,e,n){const{defaultValue:r,size:i}=this.settings;if(Number.isFinite(t))return e[n]=t,e;if(!t){let t=i;for(;--t>=0;)e[n+t]=r[t];return e}switch(i){case 4:e[n+3]=Number.isFinite(t[3])?t[3]:r[3];case 3:e[n+2]=Number.isFinite(t[2])?t[2]:r[2];case 2:e[n+1]=Number.isFinite(t[1])?t[1]:r[1];case 1:e[n+0]=Number.isFinite(t[0])?t[0]:r[0];break;default:let o=i;for(;--o>=0;)e[n+o]=Number.isFinite(t[o])?t[o]:r[o]}return e}_areValuesEqual(t,e){if(!t||!e)return!1;const{size:n}=this;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}}var d=n(463),p=n(32968),g=n(5371);const m=[],y=[[0,1/0]];var v=n(79327);class _ extends f{constructor(t,e){super(t,e,{startIndices:null,lastExternalBuffer:null,binaryValue:null,binaryAccessor:null,needsUpdate:!0,needsRedraw:!1,updateRanges:y}),(0,r.A)(this,"constant",!1),this.settings.update=e.update||(e.accessor?this._autoUpdater:void 0),Object.seal(this.settings),Object.seal(this.state),this._validateAttributeUpdaters()}get startIndices(){return this.state.startIndices}set startIndices(t){this.state.startIndices=t}needsUpdate(){return this.state.needsUpdate}needsRedraw({clearChangedFlags:t=!1}={}){const e=this.state.needsRedraw;return this.state.needsRedraw=e&&!t,e}getUpdateTriggers(){const{accessor:t}=this.settings;return[this.id].concat("function"!=typeof t&&t||[])}supportsTransition(){return Boolean(this.settings.transition)}getTransitionSetting(t){if(!t||!this.supportsTransition())return null;const{accessor:e}=this.settings,n=this.settings.transition,r=Array.isArray(e)?t[e.find(e=>t[e])]:t[e];return(0,v.K$)(r,n)}setNeedsUpdate(t=this.id,e){if(this.state.needsUpdate=this.state.needsUpdate||t,this.setNeedsRedraw(t),e){const{startRow:t=0,endRow:n=1/0}=e;this.state.updateRanges=function(t,e){if(t===y)return t;if(e[0]<0&&(e[0]=0),e[0]>=e[1])return t;const n=[],r=t.length;let i=0;for(let o=0;o<r;o++){const r=t[o];r[1]<e[0]?(n.push(r),i=o+1):r[0]>e[1]?n.push(r):e=[Math.min(r[0],e[0]),Math.max(r[1],e[1])]}return n.splice(i,0,e),n}(this.state.updateRanges,[t,n])}else this.state.updateRanges=y}clearNeedsUpdate(){this.state.needsUpdate=!1,this.state.updateRanges=m}setNeedsRedraw(t=this.id){this.state.needsRedraw=this.state.needsRedraw||t}allocate(t){const{state:e,settings:n}=this;return!n.noAlloc&&!!n.update&&(super.allocate(t,e.updateRanges!==y),!0)}updateBuffer({numInstances:t,data:e,props:n,context:r}){if(!this.needsUpdate())return!1;const{state:{updateRanges:i},settings:{update:o,noAlloc:s}}=this;let a=!0;if(o){for(const[s,a]of i)o.call(r,this,{data:e,startRow:s,endRow:a,props:n,numInstances:t});if(this.value)if(this.constant||this.buffer.byteLength<this.value.byteLength+this.byteOffset)this.setData({value:this.value,constant:this.constant}),this.constant=!1;else for(const[e,n]of i){const r=Number.isFinite(e)?this.getVertexOffset(e):0,i=Number.isFinite(n)?this.getVertexOffset(n):s||!Number.isFinite(t)?this.value.length:t*this.size;super.updateSubBuffer({startOffset:r,endOffset:i})}this._checkAttributeArray()}else a=!1;return this.clearNeedsUpdate(),this.setNeedsRedraw(),a}setConstantValue(t){return void 0!==t&&"function"!=typeof t&&(this.setData({constant:!0,value:t})&&this.setNeedsRedraw(),this.clearNeedsUpdate(),!0)}setExternalBuffer(t){const{state:e}=this;
2return t?(this.clearNeedsUpdate(),e.lastExternalBuffer===t||(e.lastExternalBuffer=t,this.setNeedsRedraw(),this.setData(t)),!0):(e.lastExternalBuffer=null,!1)}setBinaryValue(t,e=null){const{state:n,settings:r}=this;if(!t)return n.binaryValue=null,n.binaryAccessor=null,!1;if(r.noAlloc)return!1;if(n.binaryValue===t)return this.clearNeedsUpdate(),!0;if(n.binaryValue=t,this.setNeedsRedraw(),r.transform||e!==this.startIndices){ArrayBuffer.isView(t)&&(t={value:t});const i=t;(0,d.A)(ArrayBuffer.isView(i.value),"invalid ".concat(r.accessor));const o=Boolean(i.size)&&i.size!==this.size;return n.binaryAccessor=(0,p.I)(i.value,{size:i.size||this.size,stride:i.stride,offset:i.offset,startIndices:e,nested:o}),!1}return this.clearNeedsUpdate(),this.setData(t),!0}getVertexOffset(t){const{startIndices:e}=this;return(e?t<e.length?e[t]:this.numInstances:t)*this.size}getShaderAttributes(){const t=this.settings.shaderAttributes||{[this.id]:null},e={};for(const n in t)Object.assign(e,super.getShaderAttributes(n,t[n]));return e}_autoUpdater(t,{data:e,startRow:n,endRow:r,props:i,numInstances:o}){if(t.constant)return;const{settings:s,state:a,value:u,size:l,startIndices:c}=t,{accessor:h,transform:A}=s,f=a.binaryAccessor||("function"==typeof h?h:i[h]);(0,d.A)("function"==typeof f,'accessor "'.concat(h,'" is not a function'));let m=t.getVertexOffset(n);const{iterable:y,objectInfo:v}=(0,p.X)(e,n,r);for(const e of y){v.index++;let n=f(e,v);if(A&&(n=A.call(this,n)),c){const e=(v.index<c.length-1?c[v.index+1]:o)-c[v.index];if(n&&Array.isArray(n[0])){let e=m;for(const r of n)t._normalizeValue(r,u,e),e+=l}else n&&n.length>l?u.set(n,m):(t._normalizeValue(n,v.target,0),(0,g.R)({target:u,source:v.target,start:m,count:e}));m+=e*l}else t._normalizeValue(n,u,m),m+=l}}_validateAttributeUpdaters(){const{settings:t}=this;if(!t.noAlloc&&"function"!=typeof t.update)throw new Error("Attribute ".concat(this.id," missing update or accessor"))}_checkAttributeArray(){const{value:t}=this,e=Math.min(4,this.size);if(t&&t.length>=e){let n=!0;switch(e){case 4:n=n&&Number.isFinite(t[3]);case 3:n=n&&Number.isFinite(t[2]);case 2:n=n&&Number.isFinite(t[1]);case 1:n=n&&Number.isFinite(t[0]);break;default:n=!1}if(!n)throw new Error("Illegal attribute generated for ".concat(this.id))}}}var b=n(43405),w=n(90455),E=n(83352),x=n(6809);var S=n(23861),T=n(79266),P=n(48091);const C={interpolation:class{constructor({gl:t,attribute:e,timeline:n}){(0,r.A)(this,"gl",void 0),(0,r.A)(this,"type","interpolation"),(0,r.A)(this,"attributeInTransition",void 0),(0,r.A)(this,"settings",void 0),(0,r.A)(this,"attribute",void 0),(0,r.A)(this,"transition",void 0),(0,r.A)(this,"currentStartIndices",void 0),(0,r.A)(this,"currentLength",void 0),(0,r.A)(this,"transform",void 0),(0,r.A)(this,"buffers",void 0),this.gl=t,this.transition=new x.A(n),this.attribute=e,this.attributeInTransition=new _(t,e.settings),this.currentStartIndices=e.startIndices,this.currentLength=0,this.transform=function(t,e){const n=(0,v.A3)(e.size);return new E.A(t,{vs:"\n#define SHADER_NAME interpolation-transition-vertex-shader\n\nuniform float time;\nattribute ATTRIBUTE_TYPE aFrom;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vCurrent;\n\nvoid main(void) {\n vCurrent = mix(aFrom, aTo, time);\n gl_Position = vec4(0.0);\n}\n",defines:{ATTRIBUTE_TYPE:n},varyings:["vCurrent"]})}(t,e);const i={byteLength:0,usage:35050};this.buffers=[new s.A(t,i),new s.A(t,i)]}get inProgress(){return this.transition.inProgress}start(t,e){if(t.duration<=0)return void this.transition.cancel();this.settings=t;const{gl:n,buffers:r,attribute:i}=this;(0,v.yY)(r);const o={numInstances:e,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:t.enter};for(const t of r)(0,v.aI)({buffer:t,...o});this.currentStartIndices=i.startIndices,this.currentLength=(0,v.Pu)(i,e),this.attributeInTransition.setData({buffer:r[1],value:i.value}),this.transition.start(t),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aFrom:r[0],aTo:(0,v.EX)(n,i)},feedbackBuffers:{vCurrent:r[1]}})}update(){const t=this.transition.update();if(t){const{duration:t,easing:e}=this.settings,{time:n}=this.transition;let r=n/t;e&&(r=e(r)),this.transform.run({uniforms:{time:r}})}return t}cancel(){this.transition.cancel(),this.transform.delete();for(const t of this.buffers)t.delete();this.buffers.length=0}},spring:class{constructor({gl:t,attribute:e,timeline:n}){(0,r.A)(this,"gl",void 0),(0,r.A)(this,"type","spring"),(0,r.A)(this,"attributeInTransition",void 0),(0,r.A)(this,"settings",void 0),(0,r.A)(this,"attribute",void 0),(0,r.A)(this,"transition",void 0),(0,r.A)(this,"currentStartIndices",void 0),(0,r.A)(this,"currentLength",void 0),(0,r.A)(this,"texture",void 0),(0,r.A)(this,"framebuffer",void 0),(0,r.A)(this,"transform",void 0),(0,r.A)(this,"buffers",void 0),this.gl=t,this.type="spring",this.transition=new x.A(n),this.attribute=e,this.attributeInTransition=new _(t,{...e.settings,normalized:!1}),this.currentStartIndices=e.startIndices,this.currentLength=0,this.texture=function(t){return new T.A(t,{data:new Uint8Array(4),format:6408,type:5121,border:0,mipmaps:!1,dataFormat:6408,width:1,height:1})}(t),this.framebuffer=function(t,e){return new P.A(t,{id:"spring-transition-is-transitioning-framebuffer",width:1,height:1,attachments:{36064:e}})}(t,this.texture),this.transform=function(t,e,n){const r=(0,v.A3)(e.size);return new E.A(t,{framebuffer:n,vs:"\n#define SHADER_NAME spring-transition-vertex-shader\n\n#define EPSILON 0.00001\n\nuniform float stiffness;\nuniform float damping;\nattribute ATTRIBUTE_TYPE aPrev;\nattribute ATTRIBUTE_TYPE aCur;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vNext;\nvarying float vIsTransitioningFlag;\n\nATTRIBUTE_TYPE getNextValue(ATTRIBUTE_TYPE cur, ATTRIBUTE_TYPE prev, ATTRIBUTE_TYPE dest) {\n ATTRIBUTE_TYPE velocity = cur - prev;\n ATTRIBUTE_TYPE delta = dest - cur;\n ATTRIBUTE_TYPE spring = delta * stiffness;\n ATTRIBUTE_TYPE damper = velocity * -1.0 * damping;\n return spring + damper + velocity + cur;\n}\n\nvoid main(void) {\n bool isTransitioning = length(aCur - aPrev) > EPSILON || length(aTo - aCur) > EPSILON;\n vIsTransitioningFlag = isTransitioning ? 1.0 : 0.0;\n\n vNext = getNextValue(aCur, aPrev, aTo);\n gl_Position = vec4(0, 0, 0, 1);\n gl_PointSize = 100.0;\n}\n",fs:"\n#define SHADER_NAME spring-transition-is-transitioning-fragment-shader\n\nvarying float vIsTransitioningFlag;\n\nvoid main(void) {\n if (vIsTransitioningFlag == 0.0) {\n discard;\n }\n gl_FragColor = vec4(1.0);\n}",defines:{ATTRIBUTE_TYPE:r},varyings:["vNext"]})}(t,e,this.framebuffer);const i={byteLength:0,usage:35050};this.buffers=[new s.A(t,i),new s.A(t,i),new s.A(t,i)]}get inProgress(){return this.transition.inProgress}start(t,e){const{gl:n,buffers:r,attribute:i}=this,o={numInstances:e,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:t.enter};for(const t of r)(0,v.aI)({buffer:t,...o}
2);this.settings=t,this.currentStartIndices=i.startIndices,this.currentLength=(0,v.Pu)(i,e),this.attributeInTransition.setData({buffer:r[1],value:i.value}),this.transition.start({...t,duration:1/0}),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aTo:(0,v.EX)(n,i)}})}update(){const{buffers:t,transform:e,framebuffer:n,transition:r}=this;if(!r.update())return!1;const i=this.settings;return e.update({sourceBuffers:{aPrev:t[0],aCur:t[1]},feedbackBuffers:{vNext:t[2]}}),e.run({framebuffer:n,discard:!1,clearRenderTarget:!0,uniforms:{stiffness:i.stiffness,damping:i.damping},parameters:{depthTest:!1,blend:!0,viewport:[0,0,1,1],blendFunc:[1,1],blendEquation:[32776,32776]}}),(0,v.yY)(t),this.attributeInTransition.setData({buffer:t[1],value:this.attribute.value}),(0,S.sy)(n)[0]>0||r.end(),!0}cancel(){this.transition.cancel(),this.transform.delete();for(const t of this.buffers)t.delete();this.buffers.length=0,this.texture.delete(),this.framebuffer.delete()}}};class M{constructor(t,{id:e,timeline:n}){(0,r.A)(this,"id",void 0),(0,r.A)(this,"isSupported",void 0),(0,r.A)(this,"gl",void 0),(0,r.A)(this,"timeline",void 0),(0,r.A)(this,"transitions",void 0),(0,r.A)(this,"needsRedraw",void 0),(0,r.A)(this,"numInstances",void 0),this.id=e,this.gl=t,this.timeline=n,this.transitions={},this.needsRedraw=!1,this.numInstances=1,this.isSupported=E.A.isSupported(t)}finalize(){for(const t in this.transitions)this._removeTransition(t)}update({attributes:t,transitions:e,numInstances:n}){this.numInstances=n||1;for(const n in t){const r=t[n],i=r.getTransitionSetting(e);i&&this._updateAttribute(n,r,i)}for(const n in this.transitions){const r=t[n];r&&r.getTransitionSetting(e)||this._removeTransition(n)}}hasAttribute(t){const e=this.transitions[t];return e&&e.inProgress}getAttributes(){const t={};for(const e in this.transitions){const n=this.transitions[e];n.inProgress&&(t[e]=n.attributeInTransition)}return t}run(){if(!this.isSupported||0===this.numInstances)return!1;for(const t in this.transitions)this.transitions[t].update()&&(this.needsRedraw=!0);const t=this.needsRedraw;return this.needsRedraw=!1,t}_removeTransition(t){this.transitions[t].cancel(),delete this.transitions[t]}_updateAttribute(t,e,n){const r=this.transitions[t];let i=!r||r.type!==n.type;if(i){if(!this.isSupported)return void c.A.warn("WebGL2 not supported by this browser. Transition for ".concat(t," is disabled."))();r&&this._removeTransition(t);const o=C[n.type];o?this.transitions[t]=new o({attribute:e,timeline:this.timeline,gl:this.gl}):(c.A.error("unsupported transition type '".concat(n.type,"'"))(),i=!1)}(i||e.needsRedraw())&&(this.needsRedraw=!0,this.transitions[t].start(n,this.numInstances))}}const I="attributeManager.invalidate";class O{constructor(t,{id:e="attribute-manager",stats:n,timeline:i}={}){(0,r.A)(this,"id",void 0),(0,r.A)(this,"gl",void 0),(0,r.A)(this,"attributes",void 0),(0,r.A)(this,"updateTriggers",void 0),(0,r.A)(this,"needsRedraw",void 0),(0,r.A)(this,"userData",void 0),(0,r.A)(this,"stats",void 0),(0,r.A)(this,"attributeTransitionManager",void 0),(0,r.A)(this,"mergeBoundsMemoized",(0,b.A)(l._Z)),this.id=e,this.gl=t,this.attributes={},this.updateTriggers={},this.needsRedraw=!0,this.userData={},this.stats=n,this.attributeTransitionManager=new M(t,{id:"".concat(e,"-transitions"),timeline:i}),Object.seal(this)}finalize(){for(const t in this.attributes)this.attributes[t].delete();this.attributeTransitionManager.finalize()}getNeedsRedraw(t={clearRedrawFlags:!1}){const e=this.needsRedraw;return this.needsRedraw=this.needsRedraw&&!t.clearRedrawFlags,e&&this.id}setNeedsRedraw(){this.needsRedraw=!0}add(t){this._add(t)}addInstanced(t){this._add(t,{instanced:1})}remove(t){for(const e of t)void 0!==this.attributes[e]&&(this.attributes[e].delete(),delete this.attributes[e])}invalidate(t,e){const n=this._invalidateTrigger(t,e);(0,w.A)(I,this,t,n)}invalidateAll(t){for(const e in this.attributes)this.attributes[e].setNeedsUpdate(e,t);(0,w.A)(I,this,"all")}update({data:t,numInstances:e,startIndices:n=null,transitions:r,props:i={},buffers:o={},context:s={}}){let a=!1;(0,w.A)("attributeManager.updateStart",this),this.stats&&this.stats.get("Update Attributes").timeStart();for(const r in this.attributes){const u=this.attributes[r],l=u.settings.accessor;u.startIndices=n,u.numInstances=e,i[r]&&c.A.removed("props.".concat(r),"data.attributes.".concat(r))(),u.setExternalBuffer(o[r])||u.setBinaryValue("string"==typeof l?o[l]:void 0,t.startIndices)||"string"==typeof l&&!o[l]&&u.setConstantValue(i[l])||u.needsUpdate()&&(a=!0,this._updateAttribute({attribute:u,numInstances:e,data:t,props:i,context:s})),this.needsRedraw=this.needsRedraw||u.needsRedraw()}a&&(0,w.A)("attributeManager.updateEnd",this,e),this.stats&&this.stats.get("Update Attributes").timeEnd(),this.attributeTransitionManager.update({attributes:this.attributes,numInstances:e,transitions:r})}updateTransition(){const{attributeTransitionManager:t}=this,e=t.run();return this.needsRedraw=this.needsRedraw||e,e}getAttributes(){return this.attributes}getBounds(t){const e=t.map(t=>{var e;return null===(e=this.attributes[t])||void 0===e?void 0:e.getBounds()});return this.mergeBoundsMemoized(e)}getChangedAttributes(t={clearChangedFlags:!1}){const{attributes:e,attributeTransitionManager:n}=this,r={...n.getAttributes()};for(const i in e){const o=e[i];o.needsRedraw(t)&&!n.hasAttribute(i)&&(r[i]=o)}return r}getShaderAttributes(t,e={}){t||(t=this.getAttributes());const n={};for(const r in t)e[r]||Object.assign(n,t[r].getShaderAttributes());return n}_add(t,e={}){for(const n in t){const r=t[n];this.attributes[n]=this._createAttribute(n,r,e)}this._mapUpdateTriggersToAttributes()}_createAttribute(t,e,n){const r={...e,id:t,size:(e.isIndexed?1:e.size)||1,divisor:n.instanced?1:e.divisor||0};return new _(this.gl,r)}_mapUpdateTriggersToAttributes(){const t={};for(const e in this.attributes)this.attributes[e].getUpdateTriggers().forEac
2h(n=>{t[n]||(t[n]=[]),t[n].push(e)});this.updateTriggers=t}_invalidateTrigger(t,e){const{attributes:n,updateTriggers:r}=this,i=r[t];return i&&i.forEach(t=>{const r=n[t];r&&r.setNeedsUpdate(r.id,e)}),i}_updateAttribute(t){const{attribute:e,numInstances:n}=t;(0,w.A)("attribute.updateStart",e),e.constant?e.setConstantValue(e.value):(e.allocate(n)&&(0,w.A)("attribute.allocate",e,n),e.updateBuffer(t)&&(this.needsRedraw=!0,(0,w.A)("attribute.updateEnd",e,n)))}}},81182:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(17389),o=(r=n(85593))&&r.__esModule?r:{default:r},s=n(78345),a=n(25214),u=n(30521),{BufferOp:l,GeoJSONReader:c,GeoJSONWriter:h}=o.default;function A(t,e,n){var r=(n=n||{}).units||"kilometers",i=n.steps||8;if(!t)throw new Error("geojson is required");if("object"!=typeof n)throw new Error("options must be an object");if("number"!=typeof i)throw new Error("steps must be an number");if(void 0===e)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var o=[];switch(t.type){case"GeometryCollection":return s.geomEach.call(void 0,t,function(t){var n=f(t,e,r,i);n&&o.push(n)}),u.featureCollection.call(void 0,o);case"FeatureCollection":return s.featureEach.call(void 0,t,function(t){var n=f(t,e,r,i);n&&s.featureEach.call(void 0,n,function(t){t&&o.push(t)})}),u.featureCollection.call(void 0,o)}return f(t,e,r,i)}function f(t,e,n,r){var o=t.properties||{},A="Feature"===t.type?t.geometry:t;if("GeometryCollection"===A.type){var m=[];return s.geomEach.call(void 0,t,function(t){var i=f(t,e,n,r);i&&m.push(i)}),u.featureCollection.call(void 0,m)}var y=function(t){var e=i.center.call(void 0,t).geometry.coordinates,n=[-e[0],-e[1]];return a.geoAzimuthalEquidistant.call(void 0).rotate(n).scale(u.earthRadius)}(A),v={type:A.type,coordinates:p(A.coordinates,y)},_=(new c).read(v),b=u.radiansToLength.call(void 0,u.lengthToRadians.call(void 0,e,n),"meters"),w=l.bufferOp(_,b,r);if(!d((w=(new h).write(w)).coordinates)){var E={type:w.type,coordinates:g(w.coordinates,y)};return u.feature.call(void 0,E,o)}}function d(t){return Array.isArray(t[0])?d(t[0]):isNaN(t[0])}function p(t,e){return"object"!=typeof t[0]?e(t):t.map(function(t){return p(t,e)})}function g(t,e){return"object"!=typeof t[0]?e.invert(t):t.map(function(t){return g(t,e)})}var m=A;e.buffer=A,e.default=m},82073:(t,e,n)=>{"use strict";n.d(e,{fm:()=>i,i7:()=>o});var r=n(94939);function i(t,e){if("string"!=typeof e)return e;const n=Number(e);if(!isNaN(n))return n;const i=t[e=e.replace(/^.*\./,"")];return(0,r.v)(void 0!==i,"Accessing undefined constant GL.".concat(e)),i}function o(t,e){e=Number(e);for(const n in t)if(t[n]===e)return"GL.".concat(n);return String(e)}},82314:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(93213);e.collectionOf=function(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(const r of t.features){if(!r||"Feature"!==r.type||!r.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!r.geometry||r.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+r.geometry.type)}},e.containsNumber=function t(e){if(e.length>1&&r.isNumber.call(void 0,e[0])&&r.isNumber.call(void 0,e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return t(e[0]);throw new Error("coordinates must only contain numbers")},e.featureOf=function(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)},e.geojsonType=function(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)}
2,e.getCoord=function(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return[...t.geometry.coordinates];if("Point"===t.type)return[...t.coordinates]}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw new Error("coord must be GeoJSON Point or an Array of numbers")},e.getCoords=function(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")},e.getGeom=function(t){return"Feature"===t.type?t.geometry:t},e.getType=function(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}},82372:t=>{"use strict";var e=function(t){return t!=t};t.exports=function(t,n){return 0===t&&0===n?1/t==1/n:t===n||!(!e(t)||!e(n))}},82535:(t,e,n)=>{const{buildOptions:r}=n(19144),i=n(48804),{prettify:o}=n(80881),s=n(97658);t.exports=class{constructor(t){this.externalEntities={},this.options=r(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const n=s.validate(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new i(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(t);return this.options.preserveOrder||void 0===r?r:o(r,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}},82869:(t,e,n)=>{"use strict";n.d(e,{A:()=>E});var r=n(24586),i=n(99608),o=n(27371),s=n(10707),a=n(93314),u=n(23615),l=n(25330),c=n(67069),h=n(79266),A=n(23861),f=n(53629),d=n(32968);const p=()=>{},g={10241:9987,10240:9729,10242:33071,10243:33071};function m(t,e,n,r){const i=Math.min(n/e.width,r/e.height),o=Math.floor(e.width*i),s=Math.floor(e.height*i);return 1===i?{data:e,width:o,height:s}:(t.canvas.height=s,t.canvas.width=o,t.clearRect(0,0,o,s),t.drawImage(e,0,0,e.width,e.height,0,0,o,s),{data:t.canvas,width:o,height:s})}function y(t){return t&&(t.id||t.url)}function v(t,e,n){for(let r=0;r<e.length;r++){const{icon:i,xOffset:o}=e[r];t[y(i)]={...i,x:o,y:n}}}class _{constructor(t,{onUpdate:e=p,onError:n=p}){(0,r.A)(this,"gl",void 0),(0,r.A)(this,"onUpdate",void 0),(0,r.A)(this,"onError",void 0),(0,r.A)(this,"_loadOptions",null),(0,r.A)(this,"_texture",null),(0,r.A)(this,"_externalTexture",null),(0,r.A)(this,"_mapping",{}),(0,r.A)(this,"_textureParameters",null),(0,r.A)(this,"_pendingCount",0),(0,r.A)(this,"_autoPacking",!1),(0,r.A)(this,"_xOffset",0),(0,r.A)(this,"_yOffset",0),(0,r.A)(this,"_rowHeight",0),(0,r.A)(this,"_buffer",4),(0,r.A)(this,"_canvasWidth",1024),(0,r.A)(this,"_canvasHeight",0),(0,r.A)(this,"_canvas",null),this.gl=t,this.onUpdate=e,this.onError=n}finalize(){var t;null===(t=this._texture)||void 0===t||t.delete()}getTexture(){return this._texture||this._externalTexture}getIconMapping(t){const e=this._autoPacking?y(t):t;return this._mapping[e]||{}}setProps({loadOptions:t,autoPacking:e,iconAtlas:n,iconMapping:r,textureParameters:i}){var o;t&&(this._loadOptions=t),void 0!==e&&(this._autoPacking=e),r&&(this._mapping=r),n&&(null===(o=this._texture)||void 0===o||o.delete(),this._texture=null,this._externalTexture=n),i&&(this._textureParameters=i)}get isLoaded(){return 0===this._pendingCount}packIcons(t,e){if(!this._autoPacking||"undefined"==typeof document)return;const n=Object.values(function(t,e,n){if(!t||!e)return null;n=n||{};const r={},{iterable:i,objectInfo:o}=(0,d.X)(t);for(const t of i){o.index++;const i=e(t,o),s=y(i);if(!i)throw new Error("Icon is missing.");if(!i.url)throw new Error("Icon url is missing.");r[s]||n[s]&&i.url===n[s].url||(r[s]={...i,source:t,sourceIndex:o.index})}return r}(t,e,this._mapping)||{});if(n.length>0){const{mapping:t,xOffset:e,yOffset:r,rowHeight:i,canvasHeight:o}=function({icons:t,buffer:e,mapping:n={},xOffset:r=0,yOffset:i=0,rowHeight:o=0,canvasWidth:s}){let a=[];for(let u=0;u<t.length;u++){const l=t[u];if(!n[y(l)]){const{height:t,width:u}=l;r+u+e>s&&(v(n,a,i),r=0,i=o+i+e,o=0,a=[]),a.push({icon:l,xOffset:r}),r=r+u+e,o=Math.max(o,t)}}return a.length>0&&v(n,a,i),{mapping:n,rowHeight:o,xOffset:r,yOffset:i,canvasWidth:s,canvasHeight:(u=o+i+e,Math.pow(2,Math.ceil(Math.log2(u))))};var u}({icons:n,buffer:this._buffer,canvasWidth:this._canvasWidth,mapping:this._mapping,rowHeight:this._rowHeight,xOffset:this._xOffset,yOffset:this._yOffset});this._rowHeight=i,this._mapping=t,this._xOffset=e,this._yOffset=r,this._canvasHeight=o,this._texture||(this._texture=new h.A(this.gl,{width:this._canvasWidth,height:this._canvasHeight,parameters:this._textureParameters||g})),this._texture.height!==this._canvasHeight&&(this._texture=function(t,e,n,r){const i=t.
2width,o=t.height,s=new h.A(t.gl,{width:e,height:n,parameters:r});return(0,A.ob)(t,s,{targetY:0,width:i,height:o}),t.delete(),s}(this._texture,this._canvasWidth,this._canvasHeight,this._textureParameters||g)),this.onUpdate(),this._canvas=this._canvas||document.createElement("canvas"),this._loadIcons(n)}}_loadIcons(t){const e=this._canvas.getContext("2d",{willReadFrequently:!0});for(const n of t)this._pendingCount++,(0,f.H)(n.url,this._loadOptions).then(t=>{const r=y(n),i=this._mapping[r],{x:o,y:s,width:a,height:u}=i,{data:l,width:c,height:h}=m(e,t,a,u);this._texture.setSubImageData({data:l,x:o+(a-c)/2,y:s+(u-h)/2,width:c,height:h}),i.width=c,i.height=h,this._texture.generateMipmap(),this.onUpdate()}).catch(t=>{this.onError({url:n.url,source:n.source,sourceIndex:n.sourceIndex,loadOptions:this._loadOptions,error:t})}).finally(()=>{this._pendingCount--})}}const b=[0,0,0,255],w={iconAtlas:{type:"image",value:null,async:!0},iconMapping:{type:"object",value:{},async:!0},sizeScale:{type:"number",value:1,min:0},billboard:!0,sizeUnits:"pixels",sizeMinPixels:{type:"number",min:0,value:0},sizeMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},alphaCutoff:{type:"number",value:.05,min:0,max:1},getPosition:{type:"accessor",value:t=>t.position},getIcon:{type:"accessor",value:t=>t.icon},getColor:{type:"accessor",value:b},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]},onIconError:{type:"function",value:null,optional:!0},textureParameters:{type:"object",ignore:!0}};class E extends i.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME icon-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute vec4 instanceIconFrames;\nattribute float instanceColorModes;\nattribute vec2 instanceOffsets;\nattribute vec2 instancePixelOffset;\n\nuniform float sizeScale;\nuniform vec2 iconsTextureDim;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform bool billboard;\nuniform int sizeUnits;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n float angle_radian = angle * PI / 180.0;\n float cos_angle = cos(angle_radian);\n float sin_angle = sin(angle_radian);\n mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.uv = positions;\n geometry.pickingColor = instancePickingColors;\n uv = positions;\n\n vec2 iconSize = instanceIconFrames.zw;\n float sizePixels = clamp(\n project_size_to_pixel(instanceSizes * sizeScale, sizeUnits), \n sizeMinPixels, sizeMaxPixels\n );\n float instanceScale = iconSize.y == 0.0 ? 0.0 : sizePixels / iconSize.y;\n vec2 pixelOffset = positions / 2.0 * iconSize + instanceOffsets;\n pixelOffset = rotate_by_angle(pixelOffset, instanceAngles) * instanceScale;\n pixelOffset += instancePixelOffset;\n pixelOffset.y *= -1.0;\n\n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vec3 offset = vec3(pixelOffset, 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n\n } else {\n vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);\n DECKGL_FILTER_SIZE(offset_common, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position); \n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n\n vTextureCoords = mix(\n instanceIconFrames.xy,\n instanceIconFrames.xy + iconSize,\n (positions.xy + 1.0) / 2.0\n ) / iconsTextureDim;\n\n vColor = instanceColors;\n DECKGL_FILTER_COLOR(vColor, geometry);\n\n vColorMode = instanceColorModes;\n}\n",fs:"#define SHADER_NAME icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float alphaCutoff;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n vec4 texColor = texture2D(iconsTexture, vTextureCoords);\n vec3 color = mix(texColor.rgb, vColor.rgb, vColorMode);\n float a = texColor.a * opacity * vColor.a;\n\n if (a < alphaCutoff) {\n discard;\n }\n\n gl_FragColor = vec4(color, a);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.A,s.A]})}initializeState(){this.state={iconManager:new _(this.context.gl,{onUpdate:this._onUpdate.bind(this),onError:this._onError.bind(this)})},this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"}
2,instanceSizes:{size:1,transition:!0,accessor:"getSize",defaultValue:1},instanceOffsets:{size:2,accessor:"getIcon",transform:this.getInstanceOffset},instanceIconFrames:{size:4,accessor:"getIcon",transform:this.getInstanceIconFrame},instanceColorModes:{size:1,type:5121,accessor:"getIcon",transform:this.getInstanceColorMode},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:b},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instancePixelOffset:{size:2,transition:!0,accessor:"getPixelOffset"}})}updateState(t){super.updateState(t);const{props:e,oldProps:n,changeFlags:r}=t,i=this.getAttributeManager(),{iconAtlas:o,iconMapping:s,data:a,getIcon:u,textureParameters:l}=e,{iconManager:c}=this.state,h=o||this.internalState.isAsyncPropLoading("iconAtlas");if(c.setProps({loadOptions:e.loadOptions,autoPacking:!h,iconAtlas:o,iconMapping:h?s:null,textureParameters:l}),h?n.iconMapping!==e.iconMapping&&i.invalidate("getIcon"):(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getIcon))&&c.packIcons(a,u),r.extensionsChanged){var A;const{gl:t}=this.context;null===(A=this.state.model)||void 0===A||A.delete(),this.state.model=this._getModel(t),i.invalidateAll()}}get isLoaded(){return super.isLoaded&&this.state.iconManager.isLoaded}finalizeState(t){super.finalizeState(t),this.state.iconManager.finalize()}draw({uniforms:t}){const{sizeScale:e,sizeMinPixels:n,sizeMaxPixels:r,sizeUnits:i,billboard:o,alphaCutoff:s}=this.props,{iconManager:u}=this.state,l=u.getTexture();l&&this.state.model.setUniforms(t).setUniforms({iconsTexture:l,iconsTextureDim:[l.width,l.height],sizeUnits:a.p5[i],sizeScale:e,sizeMinPixels:n,sizeMaxPixels:r,billboard:o,alphaCutoff:s}).draw()}_getModel(t){return new l.A(t,{...this.getShaders(),id:this.props.id,geometry:new c.A({drawMode:6,attributes:{positions:{size:2,value:new Float32Array([-1,-1,-1,1,1,1,1,-1])}}}),isInstanced:!0})}_onUpdate(){this.setNeedsRedraw()}_onError(t){var e;const n=null===(e=this.getCurrentLayer())||void 0===e?void 0:e.props.onIconError;n?n(t):u.A.error(t.error.message)()}getInstanceOffset(t){const{width:e,height:n,anchorX:r=e/2,anchorY:i=n/2}=this.state.iconManager.getIconMapping(t);return[e/2-r,n/2-i]}getInstanceColorMode(t){return this.state.iconManager.getIconMapping(t).mask?1:0}getInstanceIconFrame(t){const{x:e,y:n,width:r,height:i}=this.state.iconManager.getIconMapping(t);return[e,n,r,i]}}(0,r.A)(E,"defaultProps",w),(0,r.A)(E,"layerName","IconLayer")},83058:t=>{t.exports={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi}},83066:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}
2function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n=(e=s,function(){var t,n=i(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var o=i(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),n.call(this,Object.assign({},t,{attributes:a(t)}))}return s}(n(58827).Geometry);function a(t){for(var e=t.length,n=void 0===e?1:e,r=t.headSize,i=void 0===r?.2:r,o=t.tailWidth,s=void 0===o?.05:o,a=t.tailStart,u=void 0===a?.05:a,l=[.5,1,0,.5-i/2,1-i,0,.5+i/2,1-i,0,.5-s/2,u,0,.5+s/2,1-i,0,.5+s/2,u,0,.5-s/2,u,0,.5-s/2,1-i,0,.5+s/2,1-i,0],c=new Array(l.length),h=0;h<l.length/3;h++){var A=3*h;c[A+0]=(l[A+0]-.5)*n,c[A+1]=(l[A+1]-.5)*n,c[A+2]=0}return{positions:new Float32Array(c),normals:new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1]),texCoords:new Float32Array(l)}}e.default=s},83352:(t,e,n)=>{"use strict";n.d(e,{A:()=>T});var r=n(89666);const i="out vec4 transform_output;\nvoid main() {\n transform_output = vec4(0);\n}",o="#version 300 es\n".concat(i);function s(t,e){e=Array.isArray(e)?e:[e];const n=t.replace(/^\s+/,"").split(/\s+/),[r,i,o]=n;return e.includes(r)&&i&&o?{qualifier:r,type:i,name:o.split(";")[0]}:null}function a(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{version:e=100,input:n,inputType:s,output:a}=t;if(!n)return 300===e?o:e>300?"#version ".concat(e,"\n").concat(i):"void main() {gl_FragColor = vec4(0);}";const u=function(t,e){switch(e){case"float":return"vec4(".concat(t,", 0.0, 0.0, 1.0)");case"vec2":return"vec4(".concat(t,", 0.0, 1.0)");case"vec3":return"vec4(".concat(t,", 1.0)");case"vec4":return t;default:return(0,r.A)(!1),null}}(n,s);return e>=300?"#version ".concat(e," ").concat(300===e?"es":"","\nin ").concat(s," ").concat(n,";\nout vec4 ").concat(a,";\nvoid main() {\n ").concat(a," = ").concat(u,";\n}"):"varying ".concat(s," ").concat(n,";\nvoid main() {\n gl_FragColor = ").concat(u,";\n}")}
2var u=n(44454),l=n(63564),c=n(72302),h=n(94939);class A{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=t,this.currentIndex=0,this.feedbackMap={},this.varyings=null,this.bindings=[],this.resources={},this._initialize(e),Object.seal(this)}setupResources(t){for(const e of this.bindings)this._setupTransformFeedback(e,t)}updateModelProps(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{varyings:e}=this;return e.length>0&&(t=Object.assign({},t,{varyings:e})),t}getDrawOptions(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=this.bindings[this.currentIndex],{sourceBuffers:n,transformFeedback:r}=e;return{attributes:Object.assign({},n,t.attributes),transformFeedback:r}}swap(){return!!this.feedbackMap&&(this.currentIndex=this._getNextIndex(),!0)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(t)}getBuffer(t){const{feedbackBuffers:e}=this.bindings[this.currentIndex],n=t?e[t]:null;return n?n instanceof l.A?n:n.buffer:null}getData(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{varyingName:e}=t,n=this.getBuffer(e);return n?n.getData():null}delete(){for(const t in this.resources)this.resources[t].delete()}_initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(t),this.varyings=t.varyings||Object.keys(this.bindings[this.currentIndex].feedbackBuffers),this.varyings.length>0&&(0,h.v)((0,u.C6)(this.gl))}_getFeedbackBuffers(t){const{sourceBuffers:e={}}=t,n={};if(this.bindings[this.currentIndex]&&Object.assign(n,this.bindings[this.currentIndex].feedbackBuffers),this.feedbackMap)for(const t in this.feedbackMap){const r=this.feedbackMap[t];t in e&&(n[r]=t)}Object.assign(n,t.feedbackBuffers);for(const t in n){const r=n[t];if("string"==typeof r){const i=e[r],{byteLength:o,usage:s,accessor:a}=i;n[t]=this._createNewBuffer(t,{byteLength:o,usage:s,accessor:a})}}return n}_setupBuffers(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceBuffers:e=null}=t;Object.assign(this.feedbackMap,t.feedbackMap);const n=this._getFeedbackBuffers(t);this._updateBindings({sourceBuffers:e,feedbackBuffers:n})}_setupTransformFeedback(t,e){let{model:n}=e;const{program:r}=n;t.transformFeedback=new c.A(this.gl,{program:r,buffers:t.feedbackBuffers})}_updateBindings(t){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],t),this.feedbackMap){const{sourceBuffers:t,feedbackBuffers:e}=this._swapBuffers(this.bindings[this.currentIndex]),n=this._getNextIndex();this.bindings[n]=this._updateBinding(this.bindings[n],{sourceBuffers:t,feedbackBuffers:e})}}_updateBinding(t,e){return t?(Object.assign(t.sourceBuffers,e.sourceBuffers),Object.assign(t.feedbackBuffers,e.feedbackBuffers),t.transformFeedback&&t.transformFeedback.setBuffers(t.feedbackBuffers),t):{sourceBuffers:Object.assign({},e.sourceBuffers),feedbackBuffers:Object.assign({},e.feedbackBuffers)}}_swapBuffers(t){if(!this.feedbackMap)return null;const e=Object.assign({},t.sourceBuffers),n=Object.assign({},t.feedbackBuffers);for(const r in this.feedbackMap){const i=this.feedbackMap[r];e[r]=t.feedbackBuffers[i],n[i]=t.sourceBuffers[r],(0,h.v)(n[i]instanceof l.A)}return{sourceBuffers:e,feedbackBuffers:n}}_createNewBuffer(t,e){const n=new l.A(this.gl,e);return this.resources[t]&&this.resources[t].delete(),this.resources[t]=n,n}_getNextIndex(){return(this.currentIndex+1)%2}}var f=n(23861),d=n(79266),p=n(48091),g=n(49282);function m(t){let e=100;const n=t.match(/[^\s]+/g);if(n.length>=2&&"#version"===n[0]){const t=parseInt(n[1],10);Number.isFinite(t)&&(e=t)}return e}var y=n(56159);const v={name:"transform",vs:"attribute float transform_elementID;\nvec2 transform_getPixelSizeHalf(vec2 size) {\n return vec2(1.) / (2. * size);\n}\n\nvec2 transform_getPixelIndices(vec2 texSize, vec2 pixelSizeHalf) {\n float yIndex = floor((transform_elementID / texSize[0]) + pixelSizeHalf[1]);\n float xIndex = transform_elementID - (yIndex * texSize[0]);\n return vec2(xIndex, yIndex);\n}\nvec2 transform_getTexCoord(vec2 size) {\n vec2 pixelSizeHalf = transform_getPixelSizeHalf(size);\n vec2 indices = transform_getPixelIndices(size, pixelSizeHalf);\n vec2 coord = indices / size + pixelSizeHalf;\n return coord;\n}\nvec2 transform_getPos(vec2 size) {\n vec2 texCoord = transform_getTexCoord(size);\n vec2 pos = (texCoord * (2.0, 2.0)) - (1., 1.);\n return pos;\n}\nvec4 transform_getInput(sampler2D texSampler, vec2 size) {\n vec2 texCoord = transform_getTexCoord(size);\n vec4 textureColor = texture2D(texSampler, texCoord);\n return textureColor;\n}\n",fs:null},_="transform_uSize_",b="transform_position";const w={10241:9728,10240:9728,10242:33071,10243:33071};class E{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=t,this.id=this.currentIndex=0,this._swapTexture=null,this.targetTextureVarying=null,this.targetTextureType=null,this.samplerTextureMap=null,this.bindings=[],this.resources={},this._initialize(e),Object.seal(this)}updateModelProps(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=this._processVertexShader(t);return Object.assign({},t,e)}getDrawOptions(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceBuffers:e,sourceTextures:n,framebuffer:r,targetTexture:i}=this.bindings[this.currentIndex],o=Object.assign({},e,t.attributes),s=Object.assign({},t.uniforms),a=Object.assign({},t.parameters);let u=t.discard;if(this.hasSourceTextures||this.hasTargetTexture){o.transform_elementID=this.elementIDBuffer;for(const t in this.samplerTextureMap){const e=this.samplerTextureMap[t];s[t]=n[e]}this._setSourceTextureParameters();const t=function(t){let{sourceTextureMap:e,targetTextureVarying:n,targetTexture:r}=t;const i={};let o,s;n&&(({width:o,height:s}=r),i["".concat(_).concat(n)]=[o,s]);for(const t in e)({width:o,height:s}=e[t]),i["".concat(_).concat(t)]=[o,s];return i}({sourceTextureMap:n,targetTextureVarying:this.targetTextureVarying,targetTexture:i});Object.assign(s,t)}return this.hasTargetTexture&&(u=!1,a.viewport=[0,0,r.width,r.height]),{attributes:o,framebuffer:r,uniforms:s,discard:u,parameters:a}}swap(){return!!this._swapTexture&&(this.currentIndex=this._getNextIndex(),!0)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupTextures(t)}getTargetTexture(){const{targetTexture:t}=this.bindings[this.currentIndex];return t}getData(){let{packed:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{framebuffer:e}=this.bindings[this.currentIndex],n=(0,f.sy)(e);if(!t)return n;const i=n.constructor,o=function(t){switch(t){case"float":return 1;case"vec2":return 2;case"vec3":return 3;case"vec4":return 4;default:return(0,r.A)(!1),null}}(this.targetTextureType),s=new i(n.length*o/4);let a=0;for(let t=0;t<n.length;t+=4)for(let e=0;e<o;e++)s[a++]=n[t+e];return s}getFramebuffer(){return this.bindings[this.currentIndex].framebuffer}delete(){this.ownTexture&&this.ownTexture.delete(),this.elementIDBuffer&&this.elementIDBuffer.delete()}_initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{_targetTextureVarying:e,_swapTexture:n}=t;this._swapTexture=n,this.targetTextureVarying=e,this.hasTargetTexture=e,this._setupTextures(t)}_createTargetTexture(t){const{sourceTextures:e,textureOrReference:n}=t;if(n instanceof d.A)return n;const r=e[n];return r?(this._targetRefTexName=n,this._createNewTexture(r)):null}_setupTextures(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceBuffers:e,_sourceTextures:n={},_targetTexture:r}=t,i=this._createTargetTexture({sourceTextures:n,textureOrReference:r});this.hasSourceTextures=this.hasSourceTextures||n&&Object.keys(n).length>0,this._updateBindings({sourceBuffers:e,sourceTextures:n,targetTexture:i}),"elementCount"in t&&this._updateElementIDBuffer(t.elementCount)}
2_updateElementIDBuffer(t){if("number"!=typeof t||this.elementCount>=t)return;const e=new Float32Array(t);e.forEach((t,e,n)=>{n[e]=e}),this.elementIDBuffer?this.elementIDBuffer.setData({data:e}):this.elementIDBuffer=new l.A(this.gl,{data:e,accessor:{size:1}}),this.elementCount=t}_updateBindings(t){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],t),this._swapTexture){const{sourceTextures:t,targetTexture:e}=this._swapTextures(this.bindings[this.currentIndex]),n=this._getNextIndex();this.bindings[n]=this._updateBinding(this.bindings[n],{sourceTextures:t,targetTexture:e})}}_updateBinding(t,e){const{sourceBuffers:n,sourceTextures:r,targetTexture:i}=e;if(t||(t={sourceBuffers:{},sourceTextures:{},targetTexture:null}),Object.assign(t.sourceTextures,r),Object.assign(t.sourceBuffers,n),i){t.targetTexture=i;const{width:e,height:n}=i,{framebuffer:r}=t;r?(r.update({attachments:{36064:i},resizeAttachments:!1}),r.resize({width:e,height:n})):t.framebuffer=new p.A(this.gl,{id:"transform-framebuffer",width:e,height:n,attachments:{36064:i}})}return t}_setSourceTextureParameters(){const t=this.currentIndex,{sourceTextures:e}=this.bindings[t];for(const t in e)e[t].setParameters(w)}_swapTextures(t){if(!this._swapTexture)return null;const e=Object.assign({},t.sourceTextures);return e[this._swapTexture]=t.targetTexture,{sourceTextures:e,targetTexture:t.sourceTextures[this._swapTexture]}}_createNewTexture(t){const e=(0,g.j)(t,{parameters:{10241:9728,10240:9728,10242:33071,10243:33071},pixelStore:{37440:!1}});return this.ownTexture&&this.ownTexture.delete(),this.ownTexture=e,e}_getNextIndex(){return(this.currentIndex+1)%2}_processVertexShader(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceTextures:e,targetTexture:n}=this.bindings[this.currentIndex],{vs:i,uniforms:o,targetTextureType:u,inject:l,samplerTextureMap:c}=function(t){let{vs:e,sourceTextureMap:n,targetTextureVarying:i,targetTexture:o}=t,a=Object.keys(n).length,u=null;const l={};let c=e,A={};if(a>0||i){const t=c.split("\n"),e=t.slice();if(t.forEach((t,o,c)=>{if(a>0){const i=function(t,e){const n={},i=function(t){return s(t,["attribute","in"])}(t);if(!i)return null;const{type:o,name:a}=i;if(a&&e[a]){const e="// ".concat(t," => Replaced by Transform with a sampler"),{samplerName:i,sizeName:s,uniformDeclerations:u}=function(t){const e="".concat("transform_uSampler_").concat(t),n="".concat(_).concat(t);return{samplerName:e,sizeName:n,uniformDeclerations:" uniform sampler2D ".concat(e,";\n uniform vec2 ").concat(n,";")}}(a),l=function(t){switch(t){case"float":return"x";case"vec2":return"xy";case"vec3":return"xyz";case"vec4":return"xyzw";default:return(0,r.A)(!1),null}}(o),c=" ".concat(o," ").concat(a," = transform_getInput(").concat(i,", ").concat(s,").").concat(l,";\n");return n[i]=a,{updatedLine:e,inject:{"vs:#decl":u,"vs:#main-start":c},samplerTextureMap:n}}return null}(t,n);if(i){const{updatedLine:t,inject:n}=i;e[o]=t,A=(0,y.Qt)([A,n]),Object.assign(l,i.samplerTextureMap),a--}}i&&!u&&(u=function(t,e){const n=s(t,["varying","out"]);return n&&n.name===e?n.type:null}(t,i))}),i){(0,h.v)(o);const t="".concat(_).concat(i),e={"vs:#decl":"uniform vec2 ".concat(t,";\n"),"vs:#main-start":" vec2 ".concat(b," = transform_getPos(").concat(t,");\n gl_Position = vec4(").concat(b,", 0, 1.);\n")};A=(0,y.Qt)([A,e])}c=e.join("\n")}return{vs:c,targetTextureType:u,inject:A,samplerTextureMap:l}}({vs:t.vs,sourceTextureMap:e,targetTextureVarying:this.targetTextureVarying,targetTexture:n}),A=(0,y.Qt)([t.inject||{},l]);return this.targetTextureType=u,this.samplerTextureMap=c,{vs:i,fs:t._fs||a({version:m(i),input:this.targetTextureVarying,inputType:u,output:"transform_output"}),modules:this.hasSourceTextures||this.targetTextureVarying?[v].concat(t.modules||[]):t.modules,uniforms:o,inject:A}}}var x=n(2592),S=n(25330);class T{static isSupported(t){return(0,u.C6)(t)}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=t,this.model=null,this.elementCount=0,this.bufferTransform=null,this.textureTransform=null,this.elementIDBuffer=null,this._initialize(e),Object.seal(this)}delete(){const{model:t,bufferTransform:e,textureTransform:n}=this;t&&t.delete(),e&&e.delete(),n&&n.delete()}run(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clearRenderTarget:e=!0}=t,n=this._updateDrawOptions(t);e&&n.framebuffer&&n.framebuffer.clear({color:!0}),this.model.transform(n)}swap(){let t=!1;
2const e=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const n of e)t=t||n.swap();(0,h.v)(t,"Nothing to swap")}getBuffer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.bufferTransform&&this.bufferTransform.getBuffer(t)}getData(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const n of e){const e=n.getData(t);if(e)return e}return null}getFramebuffer(){return this.textureTransform&&this.textureTransform.getFramebuffer()}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"elementCount"in t&&this.model.setVertexCount(t.elementCount);const e=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const n of e)n.update(t)}_initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{gl:e}=this;this._buildResourceTransforms(e,t),t=this._updateModelProps(t),this.model=new S.A(e,Object.assign({},t,{fs:t.fs||a({version:m(t.vs)}),id:t.id||"transform-model",drawMode:t.drawMode||0,vertexCount:t.elementCount})),this.bufferTransform&&this.bufferTransform.setupResources({model:this.model})}_updateModelProps(t){let e=Object.assign({},t);const n=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const t of n)e=t.updateModelProps(e);return e}_buildResourceTransforms(t,e){(function(t){return!((0,x.ZF)(t.feedbackBuffers)&&(0,x.ZF)(t.feedbackMap)&&!(t.varyings&&t.varyings.length>0))})(e)&&(this.bufferTransform=new A(t,e)),function(t){return!((0,x.ZF)(t._sourceTextures)&&!t._targetTexture&&!t._targetTextureVarying)}(e)&&(this.textureTransform=new E(t,e)),(0,h.v)(this.bufferTransform||this.textureTransform,"must provide source/feedback buffers or source/target textures")}_updateDrawOptions(t){let e=Object.assign({},t);const n=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const t of n)e=Object.assign(e,t.getDrawOptions(e));return e}}},83999:(t,e,n)=>{var r,i,o;o=n(26202),r=n(8668),i=class{constructor(t){this.coordinates=t,this.latitudeNumbers=null,this.longitudeNumbers=null,this.validate(),this.parse()}validate(){return(new o).validate(this.coordinates)}parse(){return this.groupCoordinateNumbers(),this.latitude=this.extractLatitude(),this.longitude=this.extractLongitude()}groupCoordinateNumbers(){var t,e;return e=(t=this.extractCoordinateNumbers(this.coordinates)).length/2,this.latitudeNumbers=t.slice(0,e),this.longitudeNumbers=t.slice(0-e)}extractCoordinateNumbers(t){return t.match(/-?\d+(\.\d+)?/g)}extractLatitude(){var t;return t=this.coordinateNumbersToDecimal(this.latitudeNumbers),this.latitudeIsNegative()&&(t*=-1),t}extractLongitude(){var t;return t=this.coordinateNumbersToDecimal(this.longitudeNumbers),this.longitudeIsNegative()&&(t*=-1),t}coordinateNumbersToDecimal(t){var e;return(e=new r(t)).detectSpecialFormats(),e.toDecimal()}latitudeIsNegative(){return this.coordinates.match(/s/i)}longitudeIsNegative(){return this.coordinates.match(/w/i)}getLatitude(){return this.latitude}getLongitude(){return this.longitude}},t.exports=i},84075:(t,e,n)=>{"use strict";n.d(e,{aH:()=>_,KH:()=>G,dT:()=>M,Os:()=>L,Fe:()=>F,rj:()=>X,wZ:()=>B,gW:()=>j,nI:()=>C,v7:()=>Y,fO:()=>T,Jh:()=>R,om:()=>O,rY:()=>I,Gw:()=>x,CK:()=>V,xJ:()=>N,J9:()=>E,mY:()=>P,iV:()=>S,VJ:()=>k,XM:()=>w});var r=n(24586),i=n(70911);function o(t,e){const n=(0,i.Z0)([],e,t);return(0,i.hs)(n,n,1/n[3]),n}function s(t,e){const n=t%e;return n<0?e+n:n}function a(t,e,n){return n*e+(1-n)*t}function u(t,e,n){return t<e?e:t>n?n:t}const l=Math.log2||function(t){return Math.log(t)*Math.LOG2E};var c=n(39095),h=n(90333),A=n(64062);function f(t,e){if(!t)throw new Error(e||"@math.gl/web-mercator: assertion failed.")}const d=Math.PI,p=d/4,g=d/180,m=180/d,y=512,v=4003e4,_=85.051129,b=1.5;function w(t){return Math.pow(2,t)}function E(t){return l(t)}function x(t){const[e,n]=t;f(Number.isFinite(e)),f(Number.isFinite(n)&&n>=-90&&n<=90,"invalid latitude");const r=n*g;return[y*(e*g+d)/(2*d),y*(d+Math.log(Math.tan(p+.5*r)))/(2*d)]}function S(t){const[e,n]=t,r=e/y*(2*d)-d,i=2*(Math.atan(Math.exp(n/y*(2*d)-d))-p);return[r*m,i*m]}function T(t){const{latitude:e}=t;f(Number.isFinite(e));const n=Math.cos(e*g);return E(v*n)-9}function P(t){const e=Math.cos(t*g);return y/v/e}function C(t){const{latitude:e,longitude:n,highPrecision:r=!1}=t;f(Number.isFinite(e)&&Number.isFinite(n));const i=y,o=Math.cos(e*g),s=i/360,a=s/o,u=i/v/o,l={unitsPerMeter:[u,u,u],metersPerUnit:[1/u,1/u,1/u],unitsPerDegree:[s,a,u],degreesPerUnit:[1/s,1/a,1/u]};if(r){const t=g*Math.tan(e*g)/o,n=s*t/2,r=i/v*t,c=r/a*u;l.unitsPerDegree2=[0,n,r],l.unitsPerMeter2=[c,0,c]}return l}function M(t,e){const[n,r,i]=t,[o,s,a]=e,{unitsPerMeter:u,unitsPerMeter2:l}=C({longitude:n,latitude:r,highPrecision:!0}),c=x(t);c[0]+=o*(u[0]+l[0]*s),c[1]+=s*(u[1]+l[1]*s);const h=S(c),A=(i||0)+(a||0);return Number.isFinite(i)||Number.isFinite(a)?[h[0],h[1],A]:h}function I(t){const{height:e,pitch:n,bearing:r,altitude:i,scale:o,center:s}=t,a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];c.Tl(a,a,[0,0,-i]),c.eL(a,a,-n*g),c.Qr(a,a,r*g);const u=o/e;return c.hs(a,a,[u,u,u]),s&&c.Tl(a,a,A.ze([],s)),a}function O(t){const{width:e,height:n,altitude:r,pitch:i=0,offset:o,center:s,scale:a,nearZMultiplier:l=1,farZMultiplier:c=1}=t;let{fovy:h=L(b)}=t;void 0!==r&&(h=L(r));const A=h*g,f=i*g,d=B(h);let p=d;s&&(p+=s[2]*a/Math.cos(f)/n);const m=A*(.5+(o?o[1]:0)/n),y=Math.sin(m)*p/Math.sin(u(Math.PI/2-f-m,.01,Math.PI-.01)),v=Math.sin(f)*y+p,_=10*p;return{fov:A,aspect:e/n,focalDistance:d,near:l,far:Math.min(v*c,_)}}function R(t){const{fov:e,aspect:n,near:r,far:i}=O(t);return c.fN([],e,n,r,i)}function L(t){return 2*Math.atan(.5/t)*m}function B(t){return.5/Math.tan(.5*t*g)}function k(t,e){const[n,r,i=0]=t;return f(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(i)),o(e,[n,r,i,1])}function N(t,e,n=0){const[r,i,s]=t;if(f(Number.isFinite(r)&&Number.isFinite(i),"invalid pixel coordinate"),Number.isFinite(s))return o(e,[r,i,s,1]);const a=o(e,[r,i,0,1]),u=o(e,[r,i,1,1]),l=a[2],c=u[2],A=l===c?0:((n||0)-l)/(c-l);return h.Cc([],a,u,A)}function F(t){const{width:e,height:n,bounds:r,minExtent:i=0,maxZoom:
2o=24,offset:s=[0,0]}=t,[[a,c],[h,A]]=r,d=function(t=0){return"number"==typeof t?{top:t,bottom:t,left:t,right:t}:(f(Number.isFinite(t.top)&&Number.isFinite(t.bottom)&&Number.isFinite(t.left)&&Number.isFinite(t.right)),t)}(t.padding),p=x([a,u(A,-_,_)]),g=x([h,u(c,-_,_)]),m=[Math.max(Math.abs(g[0]-p[0]),i),Math.max(Math.abs(g[1]-p[1]),i)],y=[e-d.left-d.right-2*Math.abs(s[0]),n-d.top-d.bottom-2*Math.abs(s[1])];f(y[0]>0&&y[1]>0);const v=y[0]/m[0],b=y[1]/m[1],w=(d.right-d.left)/2/v,E=(d.top-d.bottom)/2/b,T=S([(g[0]+p[0])/2+w,(g[1]+p[1])/2+E]),P=Math.min(o,l(Math.abs(Math.min(v,b))));return f(Number.isFinite(P)),{longitude:T[0],latitude:T[1],zoom:P}}const D=Math.PI/180;function j(t,e=0){const{width:n,height:r,unproject:i}=t,o={targetZ:e},s=i([0,r],o),a=i([n,r],o);let u,l;return(t.fovy?.5*t.fovy*D:Math.atan(.5/t.altitude))>(90-t.pitch)*D-.01?(u=U(t,0,e),l=U(t,n,e)):(u=i([0,0],o),l=i([n,0],o)),[s,a,l,u]}function U(t,e,n){const{pixelUnprojectionMatrix:r}=t,i=o(r,[e,0,1,1]),s=o(r,[e,t.height,1,1]),a=(n*t.distanceScales.unitsPerMeter[2]-i[2])/(s[2]-i[2]),u=S(h.Cc([],i,s,a));return u.push(n),u}class G{constructor(t={width:1,height:1}){(0,r.A)(this,"latitude",void 0),(0,r.A)(this,"longitude",void 0),(0,r.A)(this,"zoom",void 0),(0,r.A)(this,"pitch",void 0),(0,r.A)(this,"bearing",void 0),(0,r.A)(this,"altitude",void 0),(0,r.A)(this,"fovy",void 0),(0,r.A)(this,"meterOffset",void 0),(0,r.A)(this,"center",void 0),(0,r.A)(this,"width",void 0),(0,r.A)(this,"height",void 0),(0,r.A)(this,"scale",void 0),(0,r.A)(this,"distanceScales",void 0),(0,r.A)(this,"viewMatrix",void 0),(0,r.A)(this,"projectionMatrix",void 0),(0,r.A)(this,"viewProjectionMatrix",void 0),(0,r.A)(this,"pixelProjectionMatrix",void 0),(0,r.A)(this,"pixelUnprojectionMatrix",void 0),(0,r.A)(this,"equals",t=>t instanceof G&&t.width===this.width&&t.height===this.height&&c.aI(t.projectionMatrix,this.projectionMatrix)&&c.aI(t.viewMatrix,this.viewMatrix)),(0,r.A)(this,"project",(t,e={})=>{const{topLeft:n=!0}=e,r=k(this.projectPosition(t),this.pixelProjectionMatrix),[i,o]=r,s=n?o:this.height-o;return 2===t.length?[i,s]:[i,s,r[2]]}),(0,r.A)(this,"unproject",(t,e={})=>{const{topLeft:n=!0,targetZ:r}=e,[i,o,s]=t,a=n?o:this.height-o,u=r&&r*this.distanceScales.unitsPerMeter[2],l=N([i,a,s],this.pixelUnprojectionMatrix,u),[c,h,A]=this.unprojectPosition(l);return Number.isFinite(s)?[c,h,A]:Number.isFinite(r)?[c,h,r]:[c,h]}),(0,r.A)(this,"projectPosition",t=>{const[e,n]=x(t);return[e,n,(t[2]||0)*this.distanceScales.unitsPerMeter[2]]}),(0,r.A)(this,"unprojectPosition",t=>{const[e,n]=S(t);return[e,n,(t[2]||0)*this.distanceScales.metersPerUnit[2]]});let{width:e,height:n,altitude:i=null,fovy:o=null}=t;const{latitude:s=0,longitude:a=0,zoom:u=0,pitch:l=0,bearing:h=0,position:f=null,nearZMultiplier:d=.02,farZMultiplier:p=1.01}=t;e=e||1,n=n||1,null===o&&null===i?(i=b,o=L(i)):null===o?o=L(i):null===i&&(i=B(o));const g=w(u);i=Math.max(.75,i);const m=C({longitude:a,latitude:s}),y=x([a,s]);y.push(0),f&&A.WQ(y,y,A.lK([],f,m.unitsPerMeter)),this.projectionMatrix=R({width:e,height:n,scale:g,center:y,pitch:l,fovy:o,nearZMultiplier:d,farZMultiplier:p}),this.viewMatrix=I({height:n,scale:g,center:y,pitch:l,bearing:h,altitude:i}),this.width=e,this.height=n,this.scale=g,this.latitude=s,this.longitude=a,this.zoom=u,this.pitch=l,this.bearing=h,this.altitude=i,this.fovy=o,this.center=y,this.meterOffset=f||[0,0,0],this.distanceScales=m,this._initMatrices(),Object.freeze(this)}_initMatrices(){const{width:t,height:e,projectionMatrix:n,viewMatrix:r}=this,i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];c.lw(i,i,n),c.lw(i,i,r),this.viewProjectionMatrix=i;const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];c.hs(o,o,[t/2,-e/2,1]),c.Tl(o,o,[1,-1,0]),c.lw(o,o,i);const s=c.B8([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],o);if(!s)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=o,this.pixelUnprojectionMatrix=s}projectFlat(t){return x(t)}unprojectFlat(t){return S(t)}getMapCenterByLngLatPosition({lngLat:t,pos:e}){const n=N(e,this.pixelUnprojectionMatrix),r=x(t),i=h.WQ([],r,h.ze([],n));return S(h.WQ([],this.center,i))}fitBounds(t,e={}){const{width:n,height:r}=this,{longitude:i,latitude:o,zoom:s}
2=F(Object.assign({width:n,height:r,bounds:t},e));return new G({width:n,height:r,longitude:i,latitude:o,zoom:s})}getBounds(t){const e=this.getBoundingRegion(t),n=Math.min(...e.map(t=>t[0])),r=Math.max(...e.map(t=>t[0]));return[[n,Math.min(...e.map(t=>t[1]))],[r,Math.max(...e.map(t=>t[1]))]]}getBoundingRegion(t={}){return j(this,t.z||0)}getLocationAtPoint({lngLat:t,pos:e}){return this.getMapCenterByLngLatPosition({lngLat:t,pos:e})}}const z=512;function V(t){const{width:e,height:n,pitch:r=0}=t;let{longitude:i,latitude:o,zoom:a,bearing:u=0}=t;(i<-180||i>180)&&(i=s(i+180,360)-180),(u<-180||u>180)&&(u=s(u+180,360)-180);const c=l(n/z);if(a<=c)a=c,o=0;else{const t=n/2/Math.pow(2,a),e=S([0,t])[1];if(o<e)o=e;else{const e=S([0,z-t])[1];o>e&&(o=e)}}return{width:e,height:n,longitude:i,latitude:o,zoom:a,pitch:r,bearing:u}}const H=.01,q=["longitude","latitude","zoom"],W={curve:1.414,speed:1.2};function X(t,e,n,r){const{startZoom:i,startCenterXY:o,uDelta:s,w0:u,u1:l,S:c,rho:A,rho2:f,r0:d}=Q(t,e,r);if(l<H){const r={};for(const i of q){const o=t[i],s=e[i];r[i]=a(o,s,n)}return r}const p=n*c,g=Math.cosh(d)/Math.cosh(d+A*p),m=u*((Math.cosh(d)*Math.tanh(d+A*p)-Math.sinh(d))/f)/l,y=i+E(1/g),v=h.hs([],s,m);h.WQ(v,v,o);const _=S(v);return{longitude:_[0],latitude:_[1],zoom:y}}function Y(t,e,n){const r={...W,...n},{screenSpeed:i,speed:o,maxDuration:s}=r,{S:a,rho:u}=Q(t,e,r),l=1e3*a;let c;return c=Number.isFinite(i)?l/(i/u):l/o,Number.isFinite(s)&&c>s?0:c}function Q(t,e,n){const r=(n=Object.assign({},W,n)).curve,i=t.zoom,o=[t.longitude,t.latitude],s=w(i),a=e.zoom,u=[e.longitude,e.latitude],l=w(a-i),c=x(o),A=x(u),f=h.jb([],A,c),d=Math.max(t.width,t.height),p=d/l,g=h.Bw(f)*s,m=Math.max(g,H),y=r*r,v=(p*p-d*d+y*y*m*m)/(2*d*y*m),_=(p*p-d*d-y*y*m*m)/(2*p*y*m),b=Math.log(Math.sqrt(v*v+1)-v),E=Math.log(Math.sqrt(_*_+1)-_);return{startZoom:i,startCenterXY:c,uDelta:f,w0:d,u1:g,S:(E-b)/r,rho:r,rho2:y,r0:b,r1:E}}},84407:(t,e,n)=>{"use strict";n.d(e,{A:()=>h});var r=n(44454),i=n(55890),o=n(63564),s=n(68818),a=n(94939),u=n(2592);const l=[9729,9728],c=globalThis.WebGLBuffer||function(){};class h extends i.A{get[Symbol.toStringTag](){return"Texture"}static isSupported(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{format:n,linearFiltering:r}=e;let i=!0;return n&&(i=i&&(0,s.qS)(t,n),i=i&&(!r||(0,s.KS)(t,n))),i}constructor(t,e){const{id:n=(0,u.Ld)("texture"),handle:r,target:i}=e;super(t,{id:n,handle:r}),this.target=i,this.textureUnit=void 0,this.loaded=!1,this.width=void 0,this.height=void 0,this.depth=void 0,this.format=void 0,this.type=void 0,this.dataFormat=void 0,this.border=void 0,this.textureUnit=void 0,this.mipmaps=void 0}toString(){return"Texture(".concat(this.id,",").concat(this.width,"x").concat(this.height,")")}initialize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.data;if(e instanceof Promise)return e.then(e=>this.initialize(Object.assign({},t,{pixels:e,data:e}))),this;const n="undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement;if(n&&e.readyState<HTMLVideoElement.HAVE_METADATA)return this._video=null,e.addEventListener("loadeddata",()=>this.initialize(t)),this;const{pixels:i=null,format:o=6408,border:s=0,recreate:a=!1,parameters:u={},pixelStore:l={},textureUnit:c}=t;e||(e=i);let{width:h,height:A,dataFormat:f,type:d,compressed:p=!1,mipmaps:g=!0}=t;const{depth:m=0}=t;return({width:h,height:A,compressed:p,dataFormat:f,type:d}=this._deduceParameters({format:o,type:d,dataFormat:f,compressed:p,data:e,width:h,height:A})),this.width=h,this.height=A,this.depth=m,this.format=o,this.type=d,this.dataFormat=f,this.border=s,this.textureUnit=c,Number.isFinite(this.textureUnit)&&(this.gl.activeTexture(33984+this.textureUnit),this.gl.bindTexture(this.target,this.handle)),g&&this._isNPOT()&&(r.Rm.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),g=!1,this._updateForNPOT(u)),this.mipmaps=g,this.setImageData({data:e,width:h,height:A,depth:m,format:o,type:d,dataFormat:f,border:s,mipmaps:g,parameters:l,compressed:p}),g&&this.generateMipmap(),this.setParameters(u),a&&(this.data=e),n&&(this._video={video:e,parameters:u,lastTime:e.readyState>=HTMLVideoElement.HAVE_CURRENT_DATA?e.currentTime:-1}),this}update(){if(this._video){const{video:t,parameters:e,lastTime:n}=this._video;
2if(n===t.currentTime||t.readyState<HTMLVideoElement.HAVE_CURRENT_DATA)return;this.setSubImageData({data:t,parameters:e}),this.mipmaps&&this.generateMipmap(),this._video.lastTime=t.currentTime}}resize(t){let{height:e,width:n,mipmaps:r=!1}=t;return n!==this.width||e!==this.height?this.initialize({width:n,height:e,format:this.format,type:this.type,dataFormat:this.dataFormat,border:this.border,mipmaps:r}):this}generateMipmap(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._isNPOT()?(r.Rm.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),this):(this.mipmaps=!0,this.gl.bindTexture(this.target,this.handle),(0,r.zv)(this.gl,t,()=>{this.gl.generateMipmap(this.target)}),this.gl.bindTexture(this.target,null),this)}setImageData(t){this._trackDeallocatedMemory("Texture");const{target:e=this.target,pixels:n=null,level:i=0,format:o=this.format,border:u=this.border,offset:l=0,parameters:c={}}=t;let{data:h=null,type:A=this.type,width:f=this.width,height:d=this.height,dataFormat:p=this.dataFormat,compressed:g=!1}=t;h||(h=n),({type:A,dataFormat:p,compressed:g,width:f,height:d}=this._deduceParameters({format:o,type:A,dataFormat:p,compressed:g,data:h,width:f,height:d}));const{gl:m}=this;m.bindTexture(this.target,this.handle);let y,v=null;({data:h,dataType:v}=this._getDataType({data:h,compressed:g}));let _=0;if((0,r.zv)(this.gl,c,()=>{switch(v){case"null":m.texImage2D(e,i,o,f,d,u,p,A,h);break;case"typed-array":m.texImage2D(e,i,o,f,d,u,p,A,h,l);break;case"buffer":y=(0,r.Dz)(m),y.bindBuffer(35052,h.handle||h),y.texImage2D(e,i,o,f,d,u,p,A,l),y.bindBuffer(35052,null);break;case"browser-object":(0,r.C6)(m)?m.texImage2D(e,i,o,f,d,u,p,A,h):m.texImage2D(e,i,o,p,A,h);break;case"compressed":for(const[t,n]of h.entries())m.compressedTexImage2D(e,t,n.format,n.width,n.height,u,n.data),_+=n.levelSize;break;default:(0,a.v)(!1,"Unknown image data type")}}),"compressed"===v)this._trackAllocatedMemory(_,"Texture");else if(h&&h.byteLength)this._trackAllocatedMemory(h.byteLength,"Texture");else{const t=s.gI[this.dataFormat]||4,e=s.Ce[this.type]||1;this._trackAllocatedMemory(this.width*this.height*t*e,"Texture")}return this.loaded=!0,this}setSubImageData(t){let{target:e=this.target,pixels:n=null,data:i=null,x:s=0,y:u=0,width:l=this.width,height:h=this.height,level:A=0,format:f=this.format,type:d=this.type,dataFormat:p=this.dataFormat,compressed:g=!1,offset:m=0,border:y=this.border,parameters:v={}}=t;if(({type:d,dataFormat:p,compressed:g,width:l,height:h}=this._deduceParameters({format:f,type:d,dataFormat:p,compressed:g,data:i,width:l,height:h})),(0,a.v)(0===this.depth,"texSubImage not supported for 3D textures"),i||(i=n),i&&i.data){const t=i;i=t.data,l=t.shape[0],h=t.shape[1]}i instanceof o.A&&(i=i.handle),this.gl.bindTexture(this.target,this.handle),(0,r.zv)(this.gl,v,()=>{if(g)this.gl.compressedTexSubImage2D(e,A,s,u,l,h,f,i);else if(null===i)this.gl.texSubImage2D(e,A,s,u,l,h,p,d,null);else if(ArrayBuffer.isView(i))this.gl.texSubImage2D(e,A,s,u,l,h,p,d,i,m);else if(i instanceof c){const t=(0,r.Dz)(this.gl);t.bindBuffer(35052,i),t.texSubImage2D(e,A,s,u,l,h,p,d,m),t.bindBuffer(35052,null)}else(0,r.C6)(this.gl)?(0,r.Dz)(this.gl).texSubImage2D(e,A,s,u,l,h,p,d,i):this.gl.texSubImage2D(e,A,s,u,p,d,i)}),this.gl.bindTexture(this.target,null)}copyFramebuffer(){return r.Rm.error("Texture.copyFramebuffer({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}getActiveUnit(){return this.gl.getParameter(34016)-33984}bind(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit;const{gl:e}=this;return void 0!==t&&(this.textureUnit=t,e.activeTexture(33984+t)),e.bindTexture(this.target,this.handle),t}unbind(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit;const{gl:e}=this;return void 0!==t&&(this.textureUnit=t,e.activeTexture(33984+t)),e.bindTexture(this.target,null),t}_getDataType(t){let{data:e,compressed:n=!1}=t;return n?{data:e,dataType:"compressed"}:null===e?{data:e,dataType:"null"}:ArrayBuffer.isView(e)?{data:e,dataType:"typed-array"}:e instanceof o.A?{data:e.handle,dataType:"buffer"}:e instanceof c?{data:e,dataType:"buffer"}:{data:e,dataType:"browser-object"}}_deduceParameters(t){const{format:e,data:n}=t;let{width:r,height:i,dataFormat:o,type:a,compressed:u}=t;const l=s.pj[e];return o=o||l&&l.dataFormat,a=a||l&&l.types[0],u=u||l&&l.compressed,({width:r,height:i}=this._deduceImageSize(n,r,i)),{dataFormat:o,type:a,compressed:u,width:r,height:i,format:e,data:n}}_deduceImageSize(t,e,n){let r;return r="undefined"!=typeof ImageData&&t instanceof ImageData?{width:t.width,height:t.height}:"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?{width:t.naturalWi
2dth,height:t.naturalHeight}:"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?{width:t.width,height:t.height}:"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t?{width:e,height:n}:{width:e>=0?e:1,height:n>=0?n:1},(0,a.v)(r,"Could not deduced texture size"),(0,a.v)(void 0===e||r.width===e,"Deduced texture width does not match supplied width"),(0,a.v)(void 0===n||r.height===n,"Deduced texture height does not match supplied height"),r}_createHandle(){return this.gl.createTexture()}_deleteHandle(){this.gl.deleteTexture(this.handle),this._trackDeallocatedMemory("Texture")}_getParameter(t){switch(t){case 4096:return this.width;case 4097:return this.height;default:this.gl.bindTexture(this.target,this.handle);const e=this.gl.getTexParameter(this.target,t);return this.gl.bindTexture(this.target,null),e}}_setParameter(t,e){switch(this.gl.bindTexture(this.target,this.handle),e=this._getNPOTParam(t,e),t){case 33082:case 33083:this.gl.texParameterf(this.handle,t,e);break;case 4096:case 4097:(0,a.v)(!1);break;default:this.gl.texParameteri(this.target,t,e)}return this.gl.bindTexture(this.target,null),this}_isNPOT(){return!((0,r.C6)(this.gl)||!this.width||!this.height||(0,u.r6)(this.width)&&(0,u.r6)(this.height))}_updateForNPOT(t){void 0===t[this.gl.TEXTURE_MIN_FILTER]&&(t[this.gl.TEXTURE_MIN_FILTER]=this.gl.LINEAR),void 0===t[this.gl.TEXTURE_WRAP_S]&&(t[this.gl.TEXTURE_WRAP_S]=this.gl.CLAMP_TO_EDGE),void 0===t[this.gl.TEXTURE_WRAP_T]&&(t[this.gl.TEXTURE_WRAP_T]=this.gl.CLAMP_TO_EDGE)}_getNPOTParam(t,e){if(this._isNPOT())switch(t){case 10241:-1===l.indexOf(e)&&(e=9729);break;case 10242:case 10243:33071!==e&&(e=33071)}return e}}},84481:(t,e,n)=>{"use strict";n.d(e,{$q:()=>g,A4:()=>c,Dt:()=>l,S8:()=>f});var r=n(91767),i=n.n(r),o=n(24448);const s=o.rJ.CLOCKWISE,a=o.rJ.COUNTER_CLOCKWISE,u={isClosed:!0};function l(t){return"positions"in t?t.positions:t}function c(t){return"holeIndices"in t?t.holeIndices:null}function h(t,e,n,r,i){let s=e;const a=n.length;for(let e=0;e<a;e++)for(let i=0;i<r;i++)t[s++]=n[e][i]||0;if(!function(t){const e=t[0],n=t[t.length-1];return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}(n))for(let e=0;e<r;e++)t[s++]=n[0][e]||0;return u.start=e,u.end=s,u.size=r,(0,o.UD)(t,i,u),s}function A(t,e,n,r,i=0,s,a){const l=(s=s||n.length)-i;if(l<=0)return e;let c=e;for(let e=0;e<l;e++)t[c++]=n[i+e];if(!function(t,e,n,r){for(let i=0;i<e;i++)if(t[n+i]!==t[r-e+i])return!1;return!0}(n,r,i,s))for(let e=0;e<r;e++)t[c++]=n[i+e];return u.start=e,u.end=c,u.size=r,(0,o.UD)(t,a,u),c}function f(t,e){!function(t){if(t=t&&t.positions||t,!Array.isArray(t)&&!ArrayBuffer.isView(t))throw new Error("invalid polygon")}(t);const n=[],r=[];if("positions"in t){const{positions:i,holeIndices:o}=t;if(o){let t=0;for(let u=0;u<=o.length;u++)t=A(n,t,i,e,o[u-1],o[u],0===u?s:a),r.push(t);return r.pop(),{positions:n,holeIndices:r}}t=i}if(!function(t){return Array.isArray(t[0])}(t))return A(n,0,t,e,0,n.length,s),n;if(!function(t){return t.length>=1&&t[0].length>=2&&Number.isFinite(t[0][0])}(t)){let i=0;for(const[o,u]of t.entries())i=h(n,i,u,e,0===o?s:a),r.push(i);return r.pop(),{positions:n,holeIndices:r}}return h(n,0,t,e,s),n}function d(t,e,n){const r=t.length/3;let i=0;for(let o=0;o<r;o++){const s=(o+1)%r;i+=t[3*o+e]*t[3*s+n],i-=t[3*s+e]*t[3*o+n]}return Math.abs(i/2)}function p(t,e,n,r){const i=t.length/3;for(let o=0;o<i;o++){const i=3*o,s=t[i+0],a=t[i+1],u=t[i+2];t[i+e]=s,t[i+n]=a,t[i+r]=u}}function g(t,e,n,r){let o=c(t);o&&(o=o.map(t=>t/e));let s=l(t);const a=r&&3===e;if(n){const t=s.length;s=s.slice();const r=[];for(let i=0;i<t;i+=e){r[0]=s[i],r[1]=s[i+1],a&&(r[2]=s[i+2]);const t=n(r);s[i]=t[0],s[i+1]=t[1],a&&(s[i+2]=t[2])}}if(a){const t=d(s,0,1),e=d(s,0,2),r=d(s,1,2);if(!t&&!e&&!r)return[];t>e&&t>r||(e>r?(n||(s=s.slice()),p(s,0,2,1)):(n||(s=s.slice()),p(s,2,0,1)))}return i()(s,o,e)}},85016:(t,e,n)=>{"use strict";function r(t,e){if(!e)return t;const n={...t,...e};if("defines"in e&&(n.defines={...t.defines,...e.defines}),"modules"in e&&(n.modules=(t.modules||[]).concat(e.modules),e.modules.some(t=>"project64"===t.name))){const t=n.modules.findIndex(t=>"project32"===t.name);t>=0&&n.modules.splice(t,1)}if("inject"in e)if(t.inject){const r={...t.inject};for(const t in e.inject)r[t]=(r[t]||"")+e.inject[t];n.inject=r}else n.inject=e.inject;return n}n.d(e,{n:()=>r})},85039:(t,e,n)=>{"use strict";n.d(e,{R:()=>A,w:()=>h});var r=n(93314),i=n(92154),o=n(80458),s=n(70911),a=n(64062),u=n(84075);const l=[0,0,0];function c(t,e,n=!1){const r=e.projectPosition(t);
2if(n&&e instanceof o.A){const[n,i,o=0]=t,s=e.getDistanceScales([n,i]);r[2]=o*s.unitsPerMeter[2]}return r}function h(t,{viewport:e,modelMatrix:n,coordinateSystem:i,coordinateOrigin:o,offsetMode:a}){let[l,h,A=0]=t;switch(n&&([l,h,A]=s.Z0([],[l,h,A,1],n)),i){case r.rf.LNGLAT:return c([l,h,A],e,a);case r.rf.LNGLAT_OFFSETS:return c([l+o[0],h+o[1],A+(o[2]||0)],e,a);case r.rf.METER_OFFSETS:return c((0,u.dT)(o,[l,h,A]),e,a);case r.rf.CARTESIAN:default:return e.isGeospatial?[l+o[0],h+o[1],A+o[2]]:e.projectPosition([l,h,A])}}function A(t,e){const{viewport:n,coordinateSystem:o,coordinateOrigin:s,modelMatrix:u,fromCoordinateSystem:c,fromCoordinateOrigin:A}=function(t){const{viewport:e,modelMatrix:n,coordinateOrigin:i}=t;let{coordinateSystem:o,fromCoordinateSystem:s,fromCoordinateOrigin:a}=t;return o===r.rf.DEFAULT&&(o=e.isGeospatial?r.rf.LNGLAT:r.rf.CARTESIAN),void 0===s&&(s=o),void 0===a&&(a=i),{viewport:e,coordinateSystem:o,coordinateOrigin:i,modelMatrix:n,fromCoordinateSystem:s,fromCoordinateOrigin:a}}(e),{autoOffset:f=!0}=e,{geospatialOrigin:d=l,shaderCoordinateOrigin:p=l,offsetMode:g=!1}=f?(0,i.o)(n,o,s):{},m=h(t,{viewport:n,modelMatrix:u,coordinateSystem:c,coordinateOrigin:A,offsetMode:g});if(g){const t=n.projectPosition(d||p);a.jb(m,m,t)}return m}},85087:(t,e,n)=>{"use strict";var r=n(61937),i=n(41857);t.exports=function(){var t=r();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},85593:function(t){t.exports=function(){"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function e(t,e,n){return e=u(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],u(t).constructor):e.apply(t,n))}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e,n){if(c())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&h(i,n.prototype),i}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,d(r.key),r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=p(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function a(){return a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},a.apply(null,arguments)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function A(t,e,n,r){var i=a(u(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}function p(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function g(t){var e="function"==typeof Map?new Map:void 0;return g=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return r(t,arguments,u(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),h(n,t)},g(t)}var m=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"getEndCapStyle",value:function(){return this._endCapStyle}},{key:"isSingleSided",value:function(){return this._isSingleSided}},{key:"setQuadrantSegments",value:function(e){this._quadrantSegments=e,0===this._quadrantSegments&&(this._joinStyle=t.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=t.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),e<=0&&(this._quadrantSegments=1),this._joinStyle!==t.JOIN_ROUND&&(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS)}},{key:"getJoinStyle",value:function(){return this._joinStyle}},{key:"setJoinStyle",value:function(t){this._joinStyle=t}},{key:"setSimplifyFactor",value:function(t){this._simplifyFactor=t<0?0:t}},{key:"getSimplifyFactor",value:function(){return this._simplifyFactor}},{key:"getQuadrantSegments",value:function(){return this._quadrantSegments}},{key:"setEndCapStyle",value:function(t){this._endCapStyle=t}},{key:"getMitreLimit",value:function(){return this._mitreLimit}},{key:"setMitreLimit",value:function(t){this._mitreLimit=t}},{key:"setSingleSided",value:function(t){this._isSingleSided=t}}
2],[{key:"constructor_",value:function(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(s),this.setMitreLimit(a)}}},{key:"bufferDistanceError",value:function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)}}])}();m.CAP_ROUND=1,m.CAP_FLAT=2,m.CAP_SQUARE=3,m.JOIN_ROUND=1,m.JOIN_MITRE=2,m.JOIN_BEVEL=3,m.DEFAULT_QUADRANT_SEGMENTS=8,m.DEFAULT_MITRE_LIMIT=5,m.DEFAULT_SIMPLIFY_FACTOR=.01;var y=function(t){function r(t){var i;return n(this,r),(i=e(this,r,[t])).name=Object.keys({Exception:r})[0],i}return l(r,t),o(r,[{key:"toString",value:function(){return this.message}}])}(g(Error)),v=function(t){function r(t){var i;return n(this,r),(i=e(this,r,[t])).name=Object.keys({IllegalArgumentException:r})[0],i}return l(r,t),o(r)}(y),_=o(function t(){n(this,t)},[{key:"filter",value:function(t){}}]);function b(){}function w(){}function E(){}var x,S,T,P,C,M,I,O=o(function t(){n(this,t)},null,[{key:"equalsWithTolerance",value:function(t,e,n){return Math.abs(t-e)<=n}}]),R=o(function t(e,r){n(this,t),this.low=r||0,this.high=e||0},null,[{key:"toBinaryString",value:function(t){var e,n="";for(e=2147483648;e>0;e>>>=1)n+=(t.high&e)===e?"1":"0";for(e=2147483648;e>0;e>>>=1)n+=(t.low&e)===e?"1":"0";return n}}]);function L(){}function B(){}L.NaN=NaN,L.isNaN=function(t){return Number.isNaN(t)},L.isInfinite=function(t){return!Number.isFinite(t)},L.MAX_VALUE=Number.MAX_VALUE,L.POSITIVE_INFINITY=Number.POSITIVE_INFINITY,L.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,"function"==typeof Float64Array&&"function"==typeof Int32Array?(C=2146435072,M=new Float64Array(1),I=new Int32Array(M.buffer),L.doubleToLongBits=function(t){M[0]=t;var e=0|I[0],n=0|I[1];return(n&C)===C&&1048575&n&&0!==e&&(e=0,n=2146959360),new R(n,e)},L.longBitsToDouble=function(t){return I[0]=t.low,I[1]=t.high,M[0]}):(x=Math.log2,S=Math.floor,T=Math.pow,P=function(){for(var t=53;t>0;t--){var e=T(2,t)-1;if(S(x(e))+1===t)return e}return 0}(),L.doubleToLongBits=function(t){var e,n,r,i,o,s,a,u,l;if(t<0||1/t===Number.NEGATIVE_INFINITY?(s=1<<31,t=-t):s=0,0===t)return new R(u=s,l=0);if(t===1/0)return new R(u=2146435072|s,l=0);if(t!=t)return new R(u=2146959360,l=0);if(i=0,l=0,(e=S(t))>1)if(e<=P)(i=S(x(e)))<=20?(l=0,u=e<<20-i&1048575):(l=e%(n=T(2,r=i-20))<<32-r,u=e/n&1048575);else for(r=e,l=0;0!==(r=S(n=r/2));)i++,l>>>=1,l|=(1&u)<<31,u>>>=1,n!==r&&(u|=524288);if(a=i+1023,o=0===e,e=t-e,i<52&&0!==e)for(r=0;;){if((n=2*e)>=1?(e=n-1,o?(a--,o=!1):(r<<=1,r|=1,i++)):(e=n,o?0==--a&&(i++,o=!1):(r<<=1,i++)),20===i)u|=r,r=0;else if(52===i){l|=r;break}if(1===n){i<20?u|=r<<20-i:i<52&&(l|=r<<52-i);break}}return u|=a<<20,new R(u|=s,l)},L.longBitsToDouble=function(t){var e,n,r,i,o=t.high,s=t.low,a=o&1<<31?-1:1;for(r=((2146435072&o)>>20)-1023,i=0,n=1<<19,e=1;e<=20;e++)o&n&&(i+=T(2,-e)),n>>>=1;for(n=1<<31,e=21;e<=52;e++)s&n&&(i+=T(2,-e)),n>>>=1;if(-1023===r){if(0===i)return 0*a;r=-1022}else{if(1024===r)return 0===i?a/0:NaN;i+=1}return a*i*T(2,r)});var k=function(t){function r(t){var i;return n(this,r),(i=e(this,r,[t])).name=Object.keys({RuntimeException:r})[0],i}return l(r,t),o(r)}(y),N=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,null,[{key:"constructor_",value:function(){if(0===arguments.length)k.constructor_.call(this);else if(1===arguments.length){var t=arguments[0];k.constructor_.call(this,t)}}}])}(k),F=function(){function t(){n(this,t)}return o(t,null,[{key:"shouldNeverReachHere",value:function(){if(0===arguments.length)t.shouldNeverReachHere(null);else if(1===arguments.length){var e=arguments[0];throw new N("Should never reach here"+(null!==e?": "+e:""))}}},{key:"isTrue",value:function(){if(1===arguments.length){var e=arguments[0];t.isTrue(e,null)}else if(2===arguments.length){var n=arguments[1];if(!arguments[0])throw null===n?new N:new N(n)}}},{key:"equals",value:function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];t.equals(e,n,null)}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];if(!i.equals(r))throw new N("Expected "+r+" but encountered "+i+(null!==o?": "+o:""))}}}])}(),D=new ArrayBuffer(8),j=new Float64Array(D),U=new Int32Array(D),G=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"getM",value:function(){return L.NaN}},{key:"setOrdinate",value:function(e,n){switch(e){case t.X:this.x=n;break;case t.Y:this.y=n;break;case t.Z:this.setZ(n);break;default:throw new v("Invalid ordinate index: "+e)}}},{key:"equals2D",value:function(){if(1===arguments.length){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!O.equalsWithTolerance(this.x,e.x,n)&&!!O.equalsWithTolerance(this.y,e.y,n)}}},{key:"setM",value:function(e){throw new v("Invalid ordinate index: "+t.M)}},{key:"getZ",value:function(){return this.z}},{key:"getOrdinate",value:function(e){switch(e){case t.X:return this.x;case t.Y:return this.y;case t.Z:return this.getZ()}throw new v("Invalid ordinate index: "+e)}},{key:"equals3D",value:function(t){return this.x===t.x&&this.y===t.y&&(this.getZ()===t.getZ()||L.isNaN(this.getZ())&&L.isNaN(t.getZ()))}},{key:"equals",value:function(e){return e instanceof t&&this.equals2D(e)}},{key:"equalInZ",value:function(t,e){return O.equalsWithTolerance(this.getZ(),t.getZ(),e)}},{key:"setX",value:function(t){this.x=t}},{key:"compareTo",value:function(t){var e=t;return this.x<e.x?-1:this.x>
vendor: 11,184 bytes, line 2
2e.x?1:this.y<e.y?-1:this.y>e.y?1:0}},{key:"getX",value:function(){return this.x}},{key:"setZ",value:function(t){this.z=t}},{key:"clone",value:function(){try{return null}catch(t){if(t instanceof CloneNotSupportedException)return F.shouldNeverReachHere("this shouldn't happen because this class is Cloneable"),null;throw t}}},{key:"copy",value:function(){return new t(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+", "+this.getZ()+")"}},{key:"distance3D",value:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.getZ()-t.getZ();return Math.sqrt(e*e+n*n+r*r)}},{key:"getY",value:function(){return this.y}},{key:"setY",value:function(t){this.y=t}},{key:"distance",value:function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)}},{key:"hashCode",value:function(){var e=17;return 37*(e=37*e+t.hashCode(this.x))+t.hashCode(this.y)}},{key:"setCoordinate",value:function(t){this.x=t.x,this.y=t.y,this.z=t.getZ()}},{key:"interfaces_",get:function(){return[b,w,E]}}],[{key:"constructor_",value:function(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)t.constructor_.call(this,0,0);else if(1===arguments.length){var e=arguments[0];t.constructor_.call(this,e.x,e.y,e.getZ())}else if(2===arguments.length){var n=arguments[0],r=arguments[1];t.constructor_.call(this,n,r,t.NULL_ORDINATE)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2];this.x=i,this.y=o,this.z=s}}},{key:"hashCode",value:function(t){return j[0]=t,U[0]^U[1]}}])}(),z=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"compare",value:function(e,n){var r=t.compare(e.x,n.x);if(0!==r)return r;var i=t.compare(e.y,n.y);return 0!==i?i:this._dimensionsToTest<=2?0:t.compare(e.getZ(),n.getZ())}},{key:"interfaces_",get:function(){return[B]}}],[{key:"constructor_",value:function(){if(this._dimensionsToTest=2,0===arguments.length)t.constructor_.call(this,2);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new v("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}},{key:"compare",value:function(t,e){return t<e?-1:t>e?1:L.isNaN(t)?L.isNaN(e)?0:-1:L.isNaN(e)?1:0}}])}();G.DimensionalComparator=z,G.NULL_ORDINATE=L.NaN,G.X=0,G.Y=1,G.Z=2,G.M=3;var V=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"getArea",value:function(){return this.getWidth()*this.getHeight()}},{key:"equals",value:function(e){if(!(e instanceof t))return!1;var n=e;return this.isNull()?n.isNull():this._maxx===n.getMaxX()&&this._maxy===n.getMaxY()&&this._minx===n.getMinX()&&this._miny===n.getMinY()}},{key:"intersection",value:function(e){if(this.isNull()||e.isNull()||!this.intersects(e))return new t;var n=this._minx>e._minx?this._minx:e._minx,r=this._miny>e._miny?this._miny:e._miny;return new t(n,this._maxx<e._maxx?this._maxx:e._maxx,r,this._maxy<e._maxy?this._maxy:e._maxy)}},{key:"isNull",value:function(){return this._maxx<this._minx}},{key:"getMaxX",value:function(){return this._maxx}},{key:"covers",value:function(){if(1===arguments.length){if(arguments[0]instanceof G){var e=arguments[0];return this.covers(e.x,e.y)}if(arguments[0]instanceof t){var n=arguments[0];return!this.isNull()&&!n.isNull()&&n.getMinX()>=this._minx&&n.getMaxX()<=this._maxx&&n.getMinY()>=this._miny&&n.getMaxY()<=this._maxy}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];return!this.isNull()&&r>=this._minx&&r<=this._maxx&&i>=this._miny&&i<=this._maxy}}},{key:"intersects",value:function(){if(1===arguments.length){if(arguments[0]instanceof t){var e=arguments[0];return!this.isNull()&&!e.isNull()&&!(e._minx>this._maxx||e._maxx<this._minx||e._miny>this._maxy||e._maxy<this._miny)}if(arguments[0]instanceof G){var n=arguments[0];return this.intersects(n.x,n.y)}}else if(2===arguments.length){if(arguments[0]instanceof G&&arguments[1]instanceof G){var r=arguments[0],i=arguments[1];return!(this.isNull()||(r.x<i.x?r.x:i.x)>this._maxx||(r.x>i.x?r.x:i.x)<this._minx||(r.y<i.y?r.y:i.y)>this._maxy||(r.y>i.y?r.y:i.y)<this._miny)}if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var o=arguments[0],s=arguments[1];return!this.isNull()&&!(o>this._maxx||o<this._minx||s>this._maxy||s<this._miny)}}}},{key:"getMinY",value:function(){return this._miny}},{key:"getDiameter",value:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return Math.sqrt(t*t+e*e)}},{key:"getMinX",value:function(){return this._minx}},{key:"expandToInclude",value:function(){if(1===arguments.length){if(arguments[0]instanceof G){var e=arguments[0];this.expandToInclude(e.x,e.y)}else if(arguments[0]instanceof t){var n=arguments[0];if(n.isNull())return null;this.isNull()?(this._minx=n.getMinX(),this._maxx=n.getMaxX(),this._miny=n.getMinY(),this._maxy=n.getMaxY()):(n._minx<this._minx&&(this._minx=n._minx),n._maxx>this._maxx&&(this._maxx=n._maxx),n._miny<this._miny&&(this._miny=n._miny),n._maxy>this._maxy&&(this._maxy=n._maxy))}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.isNull()?(this._minx=r,this._maxx=r,this._miny=i,this._maxy=i):(r<this._minx&&(this._minx=r),r>this._maxx&&(this._maxx=r),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}}},{key:"minExtent",value:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e}},{key:"getWidth",value:function(){return this.isNull()?0:this._maxx-this._minx}},{key:"compareTo",value:function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0}},{key:"translate",value:function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)}},{key:"copy",value:function(){return new t(this)}},{key:"toString",value:function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"}},{key:"setToNull",value:function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1}},{key:"disjoint",value:function(t){return!(!this.isNull()&&!t.isNull())||t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny}},{key:"getHeight",value:function(){return this.isNull()?0:this._maxy-this._miny}},{key:"maxExtent",value:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e}},{key:"expandBy",value:function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}}},{key:"contains",value:function(){if(1===arguments.length){if(arguments[0]instanceof t){var e=arguments[0];return this.covers(e)}if(arguments[0]instanceof G){var n=arguments[0];return this.covers(n)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];return this.covers(r,i)}}},{key:"centre",value:function(){return this.isNull()?null:new G((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)}},{key:"init",value:function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof G){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var n=arguments[0];this._minx=n._minx,this._maxx=n._maxx,this._miny=n._miny,this._maxy=n._maxy}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(4===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2],u=arguments[3];o<s?(this._minx=o,this._maxx=s):(this._minx=s,this._maxx=o),a<u?(this._miny=a,this._maxy=u):(this._miny=u,this._maxy=a)}}},{key:"getMaxY",value:function(){return this._maxy}},{key:"distance",value:function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)}},{key:"hashCode",value:function(){var t=17;return 37*(t=37*(t=37*(t=37*t+G.hashCode(this._minx))+G.hashCode(this._maxx))+G.hashCode(this._miny))+G.hashCode(this._maxy)}},{key:"interfaces_",get:function(){return[b,E]}}],[{key:"constructor_",value:function(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof G){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(4===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2],u=arguments[3];this.init(o,s,a,u)}}},{key:"intersects",value:function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],s=arguments[3],a=Math.min(o.x,s.x),u=Math.max(o.x,s.x),l=Math.min(r.x,i.x),c=Math.max(r.x,i.x);return!(l>u||c<a||(a=Math.min(o.y,s.y),u=Math.max(o.y,s.y),l=Math.min(r.y,i.y),c=Math.max(r.y,i.y),l>u||c<a))}}}])}(),H=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"isGeometryCollection",value:function(){return this.getTypeCode()===t.TYPECODE_GEOMETRYCOLLECTION}},{key:"getFactory",value:function(){return this._factory}},{key:"getGeometryN",value:function(t){return this}},{key:"getArea",value:function(){return 0}},{key:"isRectangle",value:function(){return!1}},{key:"equalsExact",value:function(t){return this===t||this.equalsExact(t,0)}},{key:"geometryChanged",value:function(){this.apply(t.geometryChangedFilter)}},{key:"geometryChangedAction",value:function(){this._envelope=null}},{key:"equalsNorm",value:function(t){return null!==t&&this.norm().equalsExact(t.norm())}},{key:"getLength",value:function(){return 0}},{key:"getNumGeometries",value:function(){return 1}},{key:"compareTo",value:function(){var t;if(1===arguments.length){var e=arguments[0];return t=e,this.getTypeCode()!==t.getTypeCode()?this.getTypeCode()-t.getTypeCode():this.isEmpty()&&t.isEmpty()?0:this.isEmpty()?-1:t.isEmpty()?1:this.compareToSameClass(e)}if(2===arguments.length){var n=arguments[0],r=arguments[1];return t=n,this.getTypeCode()!==t.getTypeCode()?this.getTypeCode()-t.getTypeCode():this.isEmpty()&&t.isEmpty()?0:this.isEmpty()?-1:t.isEmpty()?1:this.compareToSameClass(n,r)}}},{key:"getUserData",value:function(){return this._userData}},{key:"getSRID",value:function(){return this._SRID}},{key:"getEnvelope",value:function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())}},{key:"checkNotGeometryCollection",value:function(e){if(e.getTypeCode()===t.TYPECODE_GEOMETRYCOLLECTION)throw new v("This method does not support GeometryCollection arguments")}},{key:"equal",value:function(t,e,n){return 0===n?t.equals(e):t.distance(e)<=n}},{key:"norm",value:function(){var t=this.copy();return t.normalize(),t}}
2,{key:"reverse",value:function(){var t=this.reverseInternal();return null!=this.envelope&&(t.envelope=this.envelope.copy()),t.setSRID(this.getSRID()),t}},{key:"copy",value:function(){var t=this.copyInternal();return t.envelope=null==this._envelope?null:this._envelope.copy(),t._SRID=this._SRID,t._userData=this._userData,t}},{key:"getPrecisionModel",value:function(){return this._factory.getPrecisionModel()}},{key:"getEnvelopeInternal",value:function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new V(this._envelope)}},{key:"setSRID",value:function(t){this._SRID=t}},{key:"setUserData",value:function(t){this._userData=t}},{key:"compare",value:function(t,e){for(var n=t.iterator(),r=e.iterator();n.hasNext()&&r.hasNext();){var i=n.next(),o=r.next(),s=i.compareTo(o);if(0!==s)return s}return n.hasNext()?1:r.hasNext()?-1:0}},{key:"hashCode",value:function(){return this.getEnvelopeInternal().hashCode()}},{key:"isEquivalentClass",value:function(t){return this.getClass()===t.getClass()}},{key:"isGeometryCollectionOrDerived",value:function(){return this.getTypeCode()===t.TYPECODE_GEOMETRYCOLLECTION||this.getTypeCode()===t.TYPECODE_MULTIPOINT||this.getTypeCode()===t.TYPECODE_MULTILINESTRING||this.getTypeCode()===t.TYPECODE_MULTIPOLYGON}},{key:"interfaces_",get:function(){return[w,b,E]}},{key:"getClass",value:function(){return t}}],[{key:"hasNonEmptyElements",value:function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1}},{key:"hasNullElements",value:function(t){for(var e=0;e<t.length;e++)if(null===t[e])return!0;return!1}}])}();H.constructor_=function(t){t&&(this._envelope=null,this._userData=null,this._factory=t,this._SRID=t.getSRID())},H.TYPECODE_POINT=0,H.TYPECODE_MULTIPOINT=1,H.TYPECODE_LINESTRING=2,H.TYPECODE_LINEARRING=3,H.TYPECODE_MULTILINESTRING=4,H.TYPECODE_POLYGON=5,H.TYPECODE_MULTIPOLYGON=6,H.TYPECODE_GEOMETRYCOLLECTION=7,H.TYPENAME_POINT="Point",H.TYPENAME_MULTIPOINT="MultiPoint",H.TYPENAME_LINESTRING="LineString",H.TYPENAME_LINEARRING="LinearRing",H.TYPENAME_MULTILINESTRING="MultiLineString",H.TYPENAME_POLYGON="Polygon",H.TYPENAME_MULTIPOLYGON="MultiPolygon",H.TYPENAME_GEOMETRYCOLLECTION="GeometryCollection",H.geometryChangedFilter={get interfaces_(){return[_]},filter:function(t){t.geometryChangedAction()}};var q=function(){function t(){n(this,t)}return o(t,null,[{key:"toLocationSymbol",value:function(e){switch(e){case t.EXTERIOR:return"e";case t.BOUNDARY:return"b";case t.INTERIOR:return"i";case t.NONE:return"-"}throw new v("Unknown location value: "+e)}}])}();q.INTERIOR=0,q.BOUNDARY=1,q.EXTERIOR=2,q.NONE=-1;var W=o(function t(){n(this,t)},[{key:"add",value:function(){}},{key:"addAll",value:function(){}},{key:"isEmpty",value:function(){}},{key:"iterator",value:function(){}},{key:"size",value:function(){}},{key:"toArray",value:function(){}},{key:"remove",value:function(){}}]),X=function(t){function r(t){var i;return n(this,r),(i=e(this,r,[t])).name=Object.keys({NoSuchElementException:r})[0],i}return l(r,t),o(r)}(y),Y=function(t){function r(t){var i;return n(this,r),(i=e(this,r,[t])).name=Object.keys({UnsupportedOperationException:r})[0],i}return l(r,t),o(r)}(y),Q=function(t){function r(){return n(this,r),e(this,r,arguments)}return l(r,t),o(r,[{key:"contains",value:function(){}}])}(W),J=function(t){function r(t){var i;return n(this,r),(i=e(this,r)).map=new Map,t instanceof W&&i.addAll(t),i}return l(r,t),o(r,[{key:"contains",value:function(t){var e=t.hashCode?t.hashCode():t;return!!this.map.has(e)}},{key:"add",value:function(t){var e=t.hashCode?t.hashCode():t;return!this.map.has(e)&&!!this.map.set(e,t)}},{key:"addAll",value:function(t){var e,n=s(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.add(r)}}catch(t){n.e(t)}finally{n.f()}return!0}},{key:"remove",value:function(){throw new Y}},{key:"size",value:function(){return this.map.size}},{key:"isEmpty",value:function(){return 0===this.map.size}},{key:"toArray",value:function(){return Array.from(this.map.values())}},{key:"iterator",value:function(){return new Z(this.map)}},{key:Symbol.iterator,value:function(){return this.map}}])}(Q),Z=o(function t(e){n(this,t),this.iterator=e.values();var r=this.iterator.next(),i=r.done,o=r.value;this.done=i,this.value=o},[{key:"next",value:function(){if(this.done)throw new X;var t=this.value,e=this.iterator.next(),n=e.done,r=e.value;return this.done=n,this.value=r,t}},{key:"hasNext",value:function(){return!this.done}},{key:"remove",value:function(){throw new Y}}]),K=function(){function t(){n(this,t)}return o(t,null,[{key:"opposite",value:function(e){return e===t.LEFT?t.RIGHT:e===t.RIGHT?t.LEFT:e}}])}();K.ON=0,K.LEFT=1,K.RIGHT=2;var $=function(t){function r(t){var i;return n(this,r),(i=e(this,r,[t])).name=Object.keys({EmptyStackException:r})[0],i}return l(r,t),o(r)}(y),tt=function(t){function r(t){var i;return n(this,r),(i=e(this,r,[t])).name=Object.keys({IndexOutOfBoundsException:r})[0],i}return l(r,t),o(r)}(y),et=function(t){function r(){return n(this,r),e(this,r,arguments)}return l(r,t),o(r,[{key:"get",value:function(){}},{key:"set",value:function(){}},{key:"isEmpty",value:function(){}}])}(W),nt=function(t){function r(){var t;return n(this,r),(t=e(this,r)).array=[],t}return l(r,t),o(r,[{key:"add",value:function(t){return this.array.push(t),!0}},{key:"get",value:function(t){if(t<0||t>=this.size())throw new tt;return this.array[t]}},{key:"push",value:function(t){return this.array.push(t),t}},{key:"pop",value:function(){if(0===this.array.length)throw new $;return this.array.pop()}},{key:"peek",value:function(){if(0===this.array.length)throw new $;return this.array[this.array.length-1]}},{key:"empty",value:function(){return 0===this.array.length}},{key:"isEmpty",value:function(){return this.empty()}},{key:"search",value:function(t){return this.array.indexOf(t)}},{key:"size",value:function(){return this.array.length}},{key:"toArray",value:function(){return this.array.slice()}}])}(et);function rt(t,e){return t.interfaces_&&t.interfaces_.indexOf(e)>-1}var it=o(function t(e){n(this,t),this.str=e},[{key:"append",value:function(t){this.str+=t}},{key:"setCharAt",value:function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)}},{key:"toString",value:function(){return this.str}}]),ot=function(){function t(e){n(this,t),this.value=e}return o(t,[{key:"intValue",value:function(){return this.value}},{key:"compareTo",value:function(t){return this.value<t?-1:this.value>t?1:0}}
vendor: 17,270 bytes, line 2
2],[{key:"compare",value:function(t,e){return t<e?-1:t>e?1:0}},{key:"isNan",value:function(t){return Number.isNaN(t)}},{key:"valueOf",value:function(e){return new t(e)}}])}(),st=o(function t(){n(this,t)},null,[{key:"isWhitespace",value:function(t){return t<=32&&t>=0||127===t}},{key:"toUpperCase",value:function(t){return t.toUpperCase()}}]),at=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"le",value:function(t){return this._hi<t._hi||this._hi===t._hi&&this._lo<=t._lo}},{key:"extractSignificantDigits",value:function(e,n){var r=this.abs(),i=t.magnitude(r._hi),o=t.TEN.pow(i);(r=r.divide(o)).gt(t.TEN)?(r=r.divide(t.TEN),i+=1):r.lt(t.ONE)&&(r=r.multiply(t.TEN),i-=1);for(var s=i+1,a=new it,u=t.MAX_PRINT_DIGITS-1,l=0;l<=u;l++){e&&l===s&&a.append(".");var c=Math.trunc(r._hi);if(c<0)break;var h=!1,A=0;c>9?(h=!0,A="9"):A="0"+c,a.append(A),r=r.subtract(t.valueOf(c)).multiply(t.TEN),h&&r.selfAdd(t.TEN);var f=!0,d=t.magnitude(r._hi);if(d<0&&Math.abs(d)>=u-l&&(f=!1),!f)break}return n[0]=i,a.toString()}},{key:"sqr",value:function(){return this.multiply(this)}},{key:"doubleValue",value:function(){return this._hi+this._lo}},{key:"subtract",value:function(){if(arguments[0]instanceof t){var e=arguments[0];return this.add(e.negate())}if("number"==typeof arguments[0]){var n=arguments[0];return this.add(-n)}}},{key:"equals",value:function(){if(1===arguments.length&&arguments[0]instanceof t){var e=arguments[0];return this._hi===e._hi&&this._lo===e._lo}}},{key:"isZero",value:function(){return 0===this._hi&&0===this._lo}},{key:"selfSubtract",value:function(){if(arguments[0]instanceof t){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e._hi,-e._lo)}if("number"==typeof arguments[0]){var n=arguments[0];return this.isNaN()?this:this.selfAdd(-n,0)}}},{key:"getSpecialNumberString",value:function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null}},{key:"min",value:function(t){return this.le(t)?this:t}},{key:"selfDivide",value:function(){if(1===arguments.length){if(arguments[0]instanceof t){var e=arguments[0];return this.selfDivide(e._hi,e._lo)}if("number"==typeof arguments[0]){var n=arguments[0];return this.selfDivide(n,0)}}else if(2===arguments.length){var r,i,o,s,a=arguments[0],u=arguments[1],l=null,c=null,h=null,A=null;return o=this._hi/a,A=(l=(h=t.SPLIT*o)-(l=h-o))*(c=(A=t.SPLIT*a)-(c=A-a))-(s=o*a)+l*(i=a-c)+(r=o-l)*c+r*i,A=o+(h=(this._hi-s-A+this._lo-o*u)/a),this._hi=A,this._lo=o-A+h,this}}},{key:"dump",value:function(){return"DD<"+this._hi+", "+this._lo+">"}},{key:"divide",value:function(){if(arguments[0]instanceof t){var e,n,r,i,o=arguments[0],s=null,a=null,u=null,l=null;return e=(r=this._hi/o._hi)-(s=(u=t.SPLIT*r)-(s=u-r)),l=s*(a=(l=t.SPLIT*o._hi)-(a=l-o._hi))-(i=r*o._hi)+s*(n=o._hi-a)+e*a+e*n,new t(l=r+(u=(this._hi-i-l+this._lo-r*o._lo)/o._hi),r-l+u)}if("number"==typeof arguments[0]){var c=arguments[0];return L.isNaN(c)?t.createNaN():t.copy(this).selfDivide(c,0)}}},{key:"ge",value:function(t){return this._hi>t._hi||this._hi===t._hi&&this._lo>=t._lo}},{key:"pow",value:function(e){if(0===e)return t.valueOf(1);var n=new t(this),r=t.valueOf(1),i=Math.abs(e);if(i>1)for(;i>0;)i%2==1&&r.selfMultiply(n),(i/=2)>0&&(n=n.sqr());else r=n;return e<0?r.reciprocal():r}},{key:"ceil",value:function(){if(this.isNaN())return t.NaN;var e=Math.ceil(this._hi),n=0;return e===this._hi&&(n=Math.ceil(this._lo)),new t(e,n)}},{key:"compareTo",value:function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0}},{key:"rint",value:function(){return this.isNaN()?this:this.add(.5).floor()}},{key:"setValue",value:function(){if(arguments[0]instanceof t){var e=arguments[0];return this.init(e),this}if("number"==typeof arguments[0]){var n=arguments[0];return this.init(n),this}}},{key:"max",value:function(t){return this.ge(t)?this:t}},{key:"sqrt",value:function(){if(this.isZero())return t.valueOf(0);if(this.isNegative())return t.NaN;var e=1/Math.sqrt(this._hi),n=this._hi*e,r=t.valueOf(n),i=this.subtract(r.sqr())._hi*(.5*e);return r.add(i)}},{key:"selfAdd",value:function(){if(1===arguments.length){if(arguments[0]instanceof t){var e=arguments[0];return this.selfAdd(e._hi,e._lo)}if("number"==typeof arguments[0]){var n,r,i,o,s,a=arguments[0],u=null;return u=(i=this._hi+a)-(o=i-this._hi),r=(s=(u=a-o+(this._hi-u))+this._lo)+(i-(n=i+s)),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(2===arguments.length){var l,c,h,A,f=arguments[0],d=arguments[1],p=null,g=null,m=null;h=this._hi+f,c=this._lo+d,g=h-(m=h-this._hi),p=c-(A=c-this._lo);var y=(l=h+(m=(g=f-m+(this._hi-g))+c))+(m=(p=d-A+(this._lo-p))+(m+(h-l))),v=m+(l-y);return this._hi=y,this._lo=v,this}}},{key:"selfMultiply",value:function(){if(1===arguments.length){if(arguments[0]instanceof t){var e=arguments[0];return this.selfMultiply(e._hi,e._lo)}if("number"==typeof arguments[0]){var n=arguments[0];return this.selfMultiply(n,0)}}else if(2===arguments.length){var r,i,o=arguments[0],s=arguments[1],a=null,u=null,l=null,c=null;a=(l=t.SPLIT*this._hi)-this._hi,c=t.SPLIT*o,a=l-a,r=this._hi-a,u=c-o;var h=(l=this._hi*o)+(c=a*(u=c-u)-l+a*(i=o-u)+r*u+r*i+(this._hi*s+this._lo*o)),A=c+(a=l-h);return this._hi=h,this._lo=A,this}}},{key:"selfSqr",value:function(){return this.selfMultiply(this)}},{key:"floor",value:function(){if(this.isNaN())return t.NaN;var e=Math.floor(this._hi),n=0;return e===this._hi&&(n=Math.floor(this._lo)),new t(e,n)}},{key:"negate",value:function(){return this.isNaN()?this:new t(-this._hi,-this._lo)}},{key:"clone",value:function(){try{return null}catch(t){if(t instanceof CloneNotSupportedException)return null;throw t}}},{key:"multiply",value:function(){if(arguments[0]instanceof t){var e=arguments[0];return e.isNaN()?t.createNaN():t.copy(this).selfMultiply(e)}if("number"==typeof arguments[0]){var n=arguments[0];return L.isNaN(n)?t.createNaN():t.copy(this).selfMultiply(n,0)}}},{key:"isNaN",value:function(){return L.isNaN(this._hi)}},{key:"intValue",value:function(){return Math.trunc(this._hi)}},{key:"toString",value:function(){var e=t.magnitude(this._hi);return e>=-3&&e<=20?this.toStandardNotation():this.toSciNotation()}},{key:"toStandardNotation",value:function(){var e=this.getSpecialNumberString();if(null!==e)return e;var n=new Array(1).fill(null),r=this.extractSignificantDigits(!0,n),i=n[0]+1,o=r;if("."===r.charAt(0))o="0"+r;else if(i<0)o="0."+t.stringOfChar("0",-i)+r;else if(-1===r.indexOf(".")){var s=i-r.length;o=r+t.stringOfChar("0",s)+".0"}return this.isNegative()?"-"+o:o}},{key:"reciprocal",value:function(){var e,n,r,i,o=null,s=null,a=null,u=null;e=(r=1/this._hi)-(o=(a=t.SPLIT*r)-(o=a-r)),s=(u=t.SPLIT*this._hi)-this._hi;var l=r+(a=(1-(i=r*this._hi)-(u=o*(s=u-s)-i+o*(n=this._hi-s)+e*s+e*n)-r*this._lo)/this._hi);return new t(l,r-l+a)}},{key:"toSciNotation",value:function(){if(this.isZero())return t.SCI_NOT_ZERO;var e=this.getSpecialNumberString();if(null!==e)return e;var n=new Array(1).fill(null),r=this.extractSignificantDigits(!1,n),i=t.SCI_NOT_EXPONENT_CHAR+n[0];if("0"===r.charAt(0))throw new IllegalStateException("Found leading zero: "+r);var o="";r.length>1&&(o=r.substring(1));var s=r.charAt(0)+"."+o;return this.isNegative()?"-"+s+i:s+i}},{key:"abs",value:function(){return this.isNaN()?t.NaN:this.isNegative()?this.negate():new t(this)}},{key:"isPositive",value:function(){return this._hi>0||0===this._hi&&this._lo>0}},{key:"lt",value:function(t){return this._hi<t._hi||this._hi===t._hi&&this._lo<t._lo}},{key:"add",value:function(){if(arguments[0]instanceof t){var e=arguments[0];return t.copy(this).selfAdd(e)}if("number"==typeof arguments[0]){var n=arguments[0];return t.copy(this).selfAdd(n)}}},{key:"init",value:function(){if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this._hi=e,this._lo=0}else if(arguments[0]instanceof t){var n=arguments[0];this._hi=n._hi,this._lo=n._lo}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this._hi=r,this._lo=i}}},{key:"gt",value:function(t){return this._hi>t._hi||this._hi===t._hi&&this._lo>t._lo}},{key:"isNegative",value:function(){return this._hi<0||0===this._hi&&this._lo<0}},{key:"trunc",value:function(){return this.isNaN()?t.NaN:this.isPositive()?this.floor():this.ceil()}},{key:"signum",value:function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0}},{key:"interfaces_",get:function(){return[E,b,w]}}],[{key:"constructor_",value:function(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if("string"==typeof arguments[0]){var r=arguments[0];t.constructor_.call(this,t.parse(r))}}else if(2===arguments.length){var i=arguments[0],o=arguments[1];this.init(i,o)}}},{key:"determinant",value:function(){if("number"==typeof arguments[3]&&"number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var e=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3];return t.determinant(t.valueOf(e),t.valueOf(n),t.valueOf(r),t.valueOf(i))}if(arguments[3]instanceof t&&arguments[2]instanceof t&&arguments[0]instanceof t&&arguments[1]instanceof t){var o=arguments[1],s=arguments[2],a=arguments[3];return arguments[0].multiply(a).selfSubtract(o.multiply(s))}}},{key:"sqr",value:function(e){return t.valueOf(e).selfMultiply(e)}},{key:"valueOf",value:function(){if("string"==typeof arguments[0]){var e=arguments[0];return t.parse(e)}if("number"==typeof arguments[0])return new t(arguments[0])}},{key:"sqrt",value:function(e){return t.valueOf(e).sqrt()}},{key:"parse",value:function(e){for(var n=0,r=e.length;st.isWhitespace(e.charAt(n));)n++;var i=!1;if(n<r){var o=e.charAt(n);"-"!==o&&"+"!==o||(n++,"-"===o&&(i=!0))}for(var s=new t,a=0,u=0,l=0,c=!1;!(n>=r);){var h=e.charAt(n);if(n++,st.isDigit(h)){var A=h-"0";s.selfMultiply(t.TEN),s.selfAdd(A),a++}else{if("."!==h){if("e"===h||"E"===h){var f=e.substring(n);try{l=ot.parseInt(f)}catch(t){throw t instanceof NumberFormatException?new NumberFormatException("Invalid exponent "+f+" in string "+e):t}break}throw new NumberFormatException("Unexpected character '"+h+"' at position "+n+" in string "+e)}u=a,c=!0}}var d=s;c||(u=a);var p=a-u-l;if(0===p)d=s;else if(p>0){var g=t.TEN.pow(p);d=s.divide(g)}else if(p<0){var m=t.TEN.pow(-p);d=s.multiply(m)}return i?d.negate():d}},{key:"createNaN",value:function(){return new t(L.NaN,L.NaN)}},{key:"copy",value:function(e){return new t(e)}},{key:"magnitude",value:function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n));return 10*Math.pow(10,r)<=e&&(r+=1),r}},{key:"stringOfChar",value:function(t,e){for(var n=new it,r=0;r<e;r++)n.append(t);return n.toString()}}])}();at.PI=new at(3.141592653589793,12246467991473532e-32),at.TWO_PI=new at(6.283185307179586,24492935982947064e-32),at.PI_2=new at(1.5707963267948966,6123233995736766e-32),at.E=new at(2.718281828459045,14456468917292502e-32),at.NaN=new at(L.NaN,L.NaN),at.EPS=123259516440783e-46,at.SPLIT=134217729,at.MAX_PRINT_DIGITS=32,at.TEN=at.valueOf(10),at.ONE=at.valueOf(1),at.SCI_NOT_EXPONENT_CHAR="E",at.SCI_NOT_ZERO="0.0E0";var ut=function(){function t(){n(this,t)}return o(t,null,[{key:"orientationIndex",value:function(e,n,r){var i=t.orientationIndexFilter(e,n,r);if(i<=1)return i;var o=at.valueOf(n.x).selfAdd(-e.x),s=at.valueOf(n.y).selfAdd(-e.y),a=at.valueOf(r.x).selfAdd(-n.x),u=at.valueOf(r.y).selfAdd(-n.y);return o.selfMultiply(u).selfSubtract(s.selfMultiply(a)).signum()}},{key:"signOfDet2x2",value:function(){if(arguments[3]instanceof at&&arguments[2]instanceof at&&arguments[0]instanceof at&&arguments[1]instanceof at){var t=arguments[1],e=arguments[2],n=arguments[3];return arguments[0].multiply(n).selfSubtract(t.multiply(e)).signum()}if("number"==typeof arguments[3]&&"number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var r=arguments[0],i=arguments[1],o=arguments[2],s=arguments[3],a=at.valueOf(r),u=at.valueOf(i),l=at.valueOf(o),c=at.valueOf(s);return a.multiply(c).selfSubtract(u.multiply(l)).signum()}}},{key:"intersection",value:function(t,e,n,r){var i=new at(t.y).selfSubtract(e.y),o=new at(e.x).selfSubtract(t.x),s=new at(t.x).selfMultiply(e.y).selfSubtract(new at(e.x).selfMultiply(t.y)),a=new at(n.y).selfSubtract(r.y),u=new at(r.x).selfSubtract(n.x),l=new at(n.x).selfMultiply(r.y).selfSubtract(new at(r.x).selfMultiply(n.y)),c=o.multiply(l).selfSubtract(u.multiply(s)),h=a.multiply(s).selfSubtract(i.multiply(l)),A=i.multiply(u).selfSubtract(a.multiply(o)),f=c.selfDivide(A).doubleValue(),d=h.selfDivide(A).doubleValue();return L.isNaN(f)||L.isInfinite(f)||L.isNaN(d)||L.isInfinite(d)?null:new G(f,d)}},{key:"orientationIndexFilter",value:function(e,n,r){var i=null,o=(e.x-r.x)*(n.y-r.y),s=(e.y-r.y)*(n.x-r.x),a=o-s;if(o>0){if(s<=0)return t.signum(a);i=o+s}else{if(!(o<0))return t.signum(a);if(s>=0)return t.signum(a);i=-o-s}var u=t.DP_SAFE_EPSILON*i;return a>=u||-a>=u?t.signum(a):2}},{key:"signum",value:function(t){return t>0?1:t<0?-1:0}}])}();ut.DP_SAFE_EPSILON=1e-15;var lt=o(function t(){n(this,t)},[{key:"getM",value:function(t){if(this.hasM()){var e=this.getDimension()-this.getMeasures();return this.getOrdinate(t,e)}return L.NaN}},{key:"setOrdinate",value:function(t,e,n){}},{key:"getZ",value:function(t){return this.hasZ()?this.getOrdinate(t,2):L.NaN}},{key:"size",value:function(){}},{key:"getOrdinate",value:function(t,e){}},{key:"getCoordinate",value:function(){}},{key:"getCoordinateCopy",value:function(t){}},{key:"createCoordinate",value:function(){}},{key:"getDimension",value:function(){}},{key:"hasM",value:function(){return this.getMeasures()>0}},{key:"getX",value:function(t){}},{key:"hasZ",value:function(){return this.getDimension()-this.getMeasures()>2}},{key:"getMeasures",value:function(){return 0}},{key:"expandEnvelope",value:function(t){}},{key:"copy",value:function(){}},{key:"getY",value:function(t){}},{key:"toCoordinateArray",value:function(){}},{key:"interfaces_",get:function(){return[w]}}]);lt.X=0,lt.Y=1,lt.Z=2,lt.M=3;var ct=function(){function t(){n(this,t)}return o(t,null,[{key:"index",value:function(t,e,n){return ut.orientationIndex(t,e,n)}},{key:"isCCW",value:function(){if(arguments[0]instanceof Array){var e=arguments[0],n=e.length-1;if(n<3)throw new v("Ring has fewer than 4 points, so orientation cannot be determined");for(var r=e[0],i=0,o=1;o<=n;o++){var s=e[o];s.y>r.y&&(r=s,i=o)}var a=i;do{(a-=1)<0&&(a=n)}while(e[a].equals2D(r)&&a!==i);var u=i;do{u=(u+1)%n}while(e[u].equals2D(r)&&u!==i);var l=e[a],c=e[u];if(l.equals2D(r)||c.equals2D(r)||l.equals2D(c))return!1;var h=t.index(l,r,c);return 0===h?l.x>c.x:h>0}if(rt(arguments[0],lt)){var A=arguments[0],f=A.size()-1;if(f<3)throw new v("Ring has fewer than 4 points, so orientation cannot be determined");for(var d=A.getCoordinate(0),p=0,g=1;g<=f;g++){var m=A.getCoordinate(g);m.y>d.y&&(d=m,p=g)}var y=null,_=p;do{(_-=1)<0&&(_=f),y=A.getCoordinate(_)}while(y.equals2D(d)&&_!==p);var b=null,w=p;do{w=(w+1)%f,b=A.getCoordinate(w)}while(b.equals2D(d)&&w!==p);if(y.equals2D(d)||b.equals2D(d)||y.equals2D(b))return!1;var E=t.index(y,d,b);return 0===E?y.x>b.x:E>0}}}])}();ct.CLOCKWISE=-1,ct.RIGHT=ct.CLOCKWISE,ct.COUNTERCLOCKWISE=1,ct.LEFT=ct.COUNTERCLOCKWISE,ct.COLLINEAR=0,ct.STRAIGHT=ct.COLLINEAR;var ht=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"getCoordinate",value:function(){return this._minCoord}},{key:"getRightmostSide",value:function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n}},{key:"findRightmostEdgeAtVertex",value:function(){var t=this._minDe.getEdge().getCoordinates();F.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],r=ct.index(this._minCoord,n,e),i=!1;(e.y<this._minCoord.y&&n.y<this._minCoord.y&&r===ct.COUNTERCLOCKWISE||e.y>this._minCoord.y&&n.y>this._minCoord.y&&r===ct.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)}},{key:"getRightmostSideOfSegment",value:function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var r=K.LEFT;return n[e].y<n[e+1].y&&(r=K.RIGHT),r}},{key:"getEdge",value:function(){return this._orientedDe}},{key:"checkForRightmostCoordinate",value:function(t){for(var e=t.getEdge().getCoordinates(),n=0;n<e.length-1;n++)(null===this._minCoord||e[n].x>this._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])}},{key:"findRightmostEdgeAtNode",value:function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)}},{key:"findEdge",value:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}F.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===K.LEFT&&(this._orientedDe=this._minDe.getSym()
2)}}],[{key:"constructor_",value:function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null}}]),At=function(t){function r(t,i){var o;return n(this,r),(o=e(this,r,[i?t+" [ "+i+" ]":t])).pt=i?new G(i):void 0,o.name=Object.keys({TopologyException:r})[0],o}return l(r,t),o(r,[{key:"getCoordinate",value:function(){return this.pt}}])}(k),ft=o(function t(){n(this,t),this.array=[]},[{key:"addLast",value:function(t){this.array.push(t)}},{key:"removeFirst",value:function(){return this.array.shift()}},{key:"isEmpty",value:function(){return 0===this.array.length}}]),dt=function(t){function r(t){var i;return n(this,r),(i=e(this,r)).array=[],t instanceof W&&i.addAll(t),i}return l(r,t),o(r,[{key:"interfaces_",get:function(){return[et,W]}},{key:"ensureCapacity",value:function(){}},{key:"add",value:function(t){return 1===arguments.length?this.array.push(t):this.array.splice(arguments[0],0,arguments[1]),!0}},{key:"clear",value:function(){this.array=[]}},{key:"addAll",value:function(t){var e,n=s(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.array.push(r)}}catch(t){n.e(t)}finally{n.f()}}},{key:"set",value:function(t,e){var n=this.array[t];return this.array[t]=e,n}},{key:"iterator",value:function(){return new pt(this)}},{key:"get",value:function(t){if(t<0||t>=this.size())throw new tt;return this.array[t]}},{key:"isEmpty",value:function(){return 0===this.array.length}},{key:"sort",value:function(t){t?this.array.sort(function(e,n){return t.compare(e,n)}):this.array.sort()}},{key:"size",value:function(){return this.array.length}},{key:"toArray",value:function(){return this.array.slice()}},{key:"remove",value:function(t){for(var e=0,n=this.array.length;e<n;e++)if(this.array[e]===t)return!!this.array.splice(e,1);return!1}},{key:Symbol.iterator,value:function(){return this.array.values()}}])}(et),pt=o(function t(e){n(this,t),this.arrayList=e,this.position=0},[{key:"next",value:function(){if(this.position===this.arrayList.size())throw new X;return this.arrayList.get(this.position++)}},{key:"hasNext",value:function(){return this.position<this.arrayList.size()}},{key:"set",value:function(t){return this.arrayList.set(this.position-1,t)}},{key:"remove",value:function(){this.arrayList.remove(this.arrayList.get(this.position))}}]),gt=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"clearVisitedEdges",value:function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)}},{key:"getRightmostCoordinate",value:function(){return this._rightMostCoord}},{key:"computeNodeDepth",value:function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){e=r;break}}if(null===e)throw new At("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var i=t.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}}},{key:"computeDepth",value:function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.getNode(),e.getLabel(),e.setEdgeDepths(K.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)}},{key:"create",value:function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()}},{key:"findResultEdges",value:function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(K.RIGHT)>=1&&e.getDepth(K.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}}},{key:"computeDepths",value:function(t){var e=new J,n=new ft,r=t.getNode();for(n.addLast(r),e.add(r),t.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();e.add(i),this.computeNodeDepth(i);for(var o=i.getEdges().iterator();o.hasNext();){var s=o.next().getSym();if(!s.isVisited()){var a=s.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}}},{key:"compareTo",value:function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0}},{key:"getEnvelope",value:function(){if(null===this._env){for(var t=new V,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),r=0;r<n.length-1;r++)t.expandToInclude(n[r]);this._env=t}return this._env}},{key:"addReachable",value:function(t){var e=new nt;for(e.add(t);!e.empty();){var n=e.pop();this.add(n,e)}}},{key:"copySymDepths",value:function(t){var e=t.getSym();e.setDepth(K.LEFT,t.getDepth(K.RIGHT)),e.setDepth(K.RIGHT,t.getDepth(K.LEFT))}},{key:"add",value:function(t,e){t.setVisited(!0),this._nodes.add(t);for(var n=t.getEdges().iterator();n.hasNext();){var r=n.next();this._dirEdgeList.add(r);var i=r.getSym().getNode();i.isVisited()||e.push(i)}}},{key:"getNodes",value:function(){return this._nodes}},{key:"getDirectedEdges",value:function(){return this._dirEdgeList}},{key:"interfaces_",get:function(){return[b]}}
2],[{key:"constructor_",value:function(){this._finder=null,this._dirEdgeList=new dt,this._nodes=new dt,this._rightMostCoord=null,this._env=null,this._finder=new ht}}]),mt=o(function t(){n(this,t)},null,[{key:"intersection",value:function(t,e,n,r){var i=t.x<e.x?t.x:e.x,o=t.y<e.y?t.y:e.y,s=t.x>e.x?t.x:e.x,a=t.y>e.y?t.y:e.y,u=n.x<r.x?n.x:r.x,l=n.y<r.y?n.y:r.y,c=n.x>r.x?n.x:r.x,h=n.y>r.y?n.y:r.y,A=((i>u?i:u)+(s<c?s:c))/2,f=((o>l?o:l)+(a<h?a:h))/2,d=t.x-A,p=t.y-f,g=e.x-A,m=e.y-f,y=n.x-A,v=n.y-f,_=r.x-A,b=r.y-f,w=p-m,E=g-d,x=d*m-g*p,S=v-b,T=_-y,P=y*b-_*v,C=w*T-S*E,M=(E*P-T*x)/C,I=(S*x-w*P)/C;return L.isNaN(M)||L.isInfinite(M)||L.isNaN(I)||L.isInfinite(I)?null:new G(M+A,I+f)}}]),yt=o(function t(){n(this,t)},null,[{key:"arraycopy",value:function(t,e,n,r,i){for(var o=0,s=e;s<e+i;s++)n[r+o]=t[s],o++}},{key:"getProperty",value:function(t){return{"line.separator":"\n"}[t]}}]),vt=function(){function t(){n(this,t)}return o(t,null,[{key:"log10",value:function(e){var n=Math.log(e);return L.isInfinite(n)||L.isNaN(n)?n:n/t.LOG_10}},{key:"min",value:function(t,e,n,r){var i=t;return e<i&&(i=e),n<i&&(i=n),r<i&&(i=r),i}},{key:"clamp",value:function(){if("number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],o=arguments[2];return r<i?i:r>o?o:r}}},{key:"wrap",value:function(t,e){return t<0?e- -t%e:t%e}},{key:"max",value:function(){if(3===arguments.length){var t=arguments[1],e=arguments[2],n=arguments[0];return t>n&&(n=t),e>n&&(n=e),n}if(4===arguments.length){var r=arguments[1],i=arguments[2],o=arguments[3],s=arguments[0];return r>s&&(s=r),i>s&&(s=i),o>s&&(s=o),s}}},{key:"average",value:function(t,e){return(t+e)/2}}])}();vt.LOG_10=Math.log(10);var _t=function(){function t(){n(this,t)}return o(t,null,[{key:"segmentToSegment",value:function(e,n,r,i){if(e.equals(n))return t.pointToSegment(e,r,i);if(r.equals(i))return t.pointToSegment(i,e,n);var o=!1;if(V.intersects(e,n,r,i)){var s=(n.x-e.x)*(i.y-r.y)-(n.y-e.y)*(i.x-r.x);if(0===s)o=!0;else{var a=(e.y-r.y)*(i.x-r.x)-(e.x-r.x)*(i.y-r.y),u=((e.y-r.y)*(n.x-e.x)-(e.x-r.x)*(n.y-e.y))/s,l=a/s;(l<0||l>1||u<0||u>1)&&(o=!0)}}else o=!0;return o?vt.min(t.pointToSegment(e,r,i),t.pointToSegment(n,r,i),t.pointToSegment(r,e,n),t.pointToSegment(i,e,n)):0}},{key:"pointToSegment",value:function(t,e,n){if(e.x===n.x&&e.y===n.y)return t.distance(e);var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/r;if(i<=0)return t.distance(e);if(i>=1)return t.distance(n);var o=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(o)*Math.sqrt(r)}},{key:"pointToLinePerpendicular",value:function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)}},{key:"pointToSegmentString",value:function(e,n){if(0===n.length)throw new v("Line array must contain at least one vertex");for(var r=e.distance(n[0]),i=0;i<n.length-1;i++){var o=t.pointToSegment(e,n[i],n[i+1]);o<r&&(r=o)}return r}}])}(),bt=o(function t(){n(this,t)},[{key:"create",value:function(){if(1===arguments.length)arguments[0]instanceof Array||rt(arguments[0],lt);else if(2===arguments.length);else if(3===arguments.length){var t=arguments[0],e=arguments[1];return this.create(t,e)}}}]),wt=o(function t(){n(this,t)},[{key:"filter",value:function(t){}}]),Et=o(function t(){n(this,t)},null,[{key:"ofLine",value:function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new G;t.getCoordinate(0,r);for(var i=r.x,o=r.y,s=1;s<e;s++){t.getCoordinate(s,r);var a=r.x,u=r.y,l=a-i,c=u-o;n+=Math.sqrt(l*l+c*c),i=a,o=u}return n}}]),xt=o(function t(){n(this,t)}),St=function(){function t(){n(this,t)}return o(t,null,[{key:"copyCoord",value:function(t,e,n,r){for(var i=Math.min(t.getDimension(),n.getDimension()),o=0;o<i;o++)n.setOrdinate(r,o,t.getOrdinate(e,o))}},{key:"isRing",value:function(t){var e=t.size();
vendor: 22,934 bytes, line 2
2return 0===e||!(e<=3)&&t.getOrdinate(0,lt.X)===t.getOrdinate(e-1,lt.X)&&t.getOrdinate(0,lt.Y)===t.getOrdinate(e-1,lt.Y)}},{key:"scroll",value:function(){if(2===arguments.length){if(rt(arguments[0],lt)&&Number.isInteger(arguments[1])){var e=arguments[0],n=arguments[1];t.scroll(e,n,t.isRing(e))}else if(rt(arguments[0],lt)&&arguments[1]instanceof G){var r=arguments[0],i=arguments[1],o=t.indexOf(i,r);if(o<=0)return null;t.scroll(r,o)}}else if(3===arguments.length){var s=arguments[0],a=arguments[1],u=arguments[2];if(a<=0)return null;for(var l=s.copy(),c=u?s.size()-1:s.size(),h=0;h<c;h++)for(var A=0;A<s.getDimension();A++)s.setOrdinate(h,A,l.getOrdinate((a+h)%c,A));if(u)for(var f=0;f<s.getDimension();f++)s.setOrdinate(c,f,s.getOrdinate(0,f))}}},{key:"isEqual",value:function(t,e){var n=t.size();if(n!==e.size())return!1;for(var r=Math.min(t.getDimension(),e.getDimension()),i=0;i<n;i++)for(var o=0;o<r;o++){var s=t.getOrdinate(i,o),a=e.getOrdinate(i,o);if(!(t.getOrdinate(i,o)===e.getOrdinate(i,o)||L.isNaN(s)&&L.isNaN(a)))return!1}return!0}},{key:"minCoordinateIndex",value:function(){if(1===arguments.length){var e=arguments[0];return t.minCoordinateIndex(e,0,e.size()-1)}if(3===arguments.length){for(var n=arguments[0],r=arguments[2],i=-1,o=null,s=arguments[1];s<=r;s++){var a=n.getCoordinate(s);(null===o||o.compareTo(a)>0)&&(o=a,i=s)}return i}}},{key:"extend",value:function(e,n,r){var i=e.create(r,n.getDimension()),o=n.size();if(t.copy(n,0,i,0,o),o>0)for(var s=o;s<r;s++)t.copy(n,o-1,i,s,1);return i}},{key:"reverse",value:function(e){for(var n=e.size()-1,r=Math.trunc(n/2),i=0;i<=r;i++)t.swap(e,i,n-i)}},{key:"swap",value:function(t,e,n){if(e===n)return null;for(var r=0;r<t.getDimension();r++){var i=t.getOrdinate(e,r);t.setOrdinate(e,r,t.getOrdinate(n,r)),t.setOrdinate(n,r,i)}}},{key:"copy",value:function(e,n,r,i,o){for(var s=0;s<o;s++)t.copyCoord(e,n+s,r,i+s)}},{key:"ensureValidRing",value:function(e,n){var r=n.size();return 0===r?n:r<=3?t.createClosedRing(e,n,4):n.getOrdinate(0,lt.X)===n.getOrdinate(r-1,lt.X)&&n.getOrdinate(0,lt.Y)===n.getOrdinate(r-1,lt.Y)?n:t.createClosedRing(e,n,r+1)}},{key:"indexOf",value:function(t,e){for(var n=0;n<e.size();n++)if(t.x===e.getOrdinate(n,lt.X)&&t.y===e.getOrdinate(n,lt.Y))return n;return-1}},{key:"createClosedRing",value:function(e,n,r){var i=e.create(r,n.getDimension()),o=n.size();t.copy(n,0,i,0,o);for(var s=o;s<r;s++)t.copy(n,0,i,s,1);return i}},{key:"minCoordinate",value:function(t){for(var e=null,n=0;n<t.size();n++){var r=t.getCoordinate(n);(null===e||e.compareTo(r)>0)&&(e=r)}return e}}])}(),Tt=function(){function t(){n(this,t)}return o(t,null,[{key:"toDimensionSymbol",value:function(e){switch(e){case t.FALSE:return t.SYM_FALSE;case t.TRUE:return t.SYM_TRUE;case t.DONTCARE:return t.SYM_DONTCARE;case t.P:return t.SYM_P;case t.L:return t.SYM_L;case t.A:return t.SYM_A}throw new v("Unknown dimension value: "+e)}},{key:"toDimensionValue",value:function(e){switch(st.toUpperCase(e)){case t.SYM_FALSE:return t.FALSE;case t.SYM_TRUE:return t.TRUE;case t.SYM_DONTCARE:return t.DONTCARE;case t.SYM_P:return t.P;case t.SYM_L:return t.L;case t.SYM_A:return t.A}throw new v("Unknown dimension symbol: "+e)}}])}();Tt.P=0,Tt.L=1,Tt.A=2,Tt.FALSE=-1,Tt.TRUE=-2,Tt.DONTCARE=-3,Tt.SYM_FALSE="F",Tt.SYM_TRUE="T",Tt.SYM_DONTCARE="*",Tt.SYM_P="0",Tt.SYM_L="1",Tt.SYM_A="2";var Pt=o(function t(){n(this,t)},[{key:"filter",value:function(t){}}]),Ct=o(function t(){n(this,t)},[{key:"filter",value:function(t,e){}},{key:"isDone",value:function(){}},{key:"isGeometryChanged",value:function(){}}]),Mt=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"computeEnvelopeInternal",value:function(){return this.isEmpty()?new V:this._points.expandEnvelope(new V)}},{key:"isRing",value:function(){return this.isClosed()&&this.isSimple()}},{key:"getCoordinates",value:function(){return this._points.toCoordinateArray()}},{key:"copyInternal",value:function(){return new r(this._points.copy(),this._factory)}},{key:"equalsExact",value:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof H){var t=arguments[0],e=arguments[1];if(!this.isEquivalentClass(t))return!1;var n=t;if(this._points.size()!==n._points.size())return!1;for(var i=0;i<this._points.size();i++)if(!this.equal(this._points.getCoordinate(i),n._points.getCoordinate(i),e))return!1;return!0}return A(r,"equalsExact",this,1).apply(this,arguments)}},{key:"normalize",value:function(){for(var t=0;t<Math.trunc(this._points.size()/2);t++){var e=this._points.size()-1-t;if(!this._points.getCoordinate(t).equals(this._points.getCoordinate(e))){if(this._points.getCoordinate(t).compareTo(this._points.getCoordinate(e))>0){var n=this._points.copy();St.reverse(n),this._points=n}return null}}}},{key:"getCoordinate",value:function(){return this.isEmpty()?null:this._points.getCoordinate(0)}},{key:"getBoundaryDimension",value:function(){return this.isClosed()?Tt.FALSE:0}},{key:"isClosed",value:function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))}},{key:"reverseInternal",value:function(){var t=this._points.copy();return St.reverse(t),this.getFactory().createLineString(t)}},{key:"getEndPoint",value:function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)}},{key:"getTypeCode",value:function(){return H.TYPECODE_LINESTRING}},{key:"getDimension",value:function(){return 1}},{key:"getLength",value:function(){return Et.ofLine(this._points)}},{key:"getNumPoints",value:function(){return this._points.size()}},{key:"compareToSameClass",value:function(){if(1===arguments.length){for(var t=arguments[0],e=0,n=0;e<this._points.size()&&n<t._points.size();){var r=this._points.getCoordinate(e).compareTo(t._points.getCoordinate(n));if(0!==r)return r;e++,n++}return e<this._points.size()?1:n<t._points.size()?-1:0}if(2===arguments.length){var i=arguments[0];return arguments[1].compare(this._points,i._points)}}},{key:"apply",value:function(){if(rt(arguments[0],wt))for(var t=arguments[0],e=0;e<this._points.size();e++)t.filter(this._points.getCoordinate(e));else if(rt(arguments[0],Ct)){var n=arguments[0];if(0===this._points.size())return null;for(var r=0;r<this._points.size()&&(n.filter(this._points,r),!n.isDone());r++);n.isGeometryChanged()&&this.geometryChanged()}else(rt(arguments[0],Pt)||rt(arguments[0],_))&&arguments[0].filter(this)}},{key:"getBoundary",value:function(){throw new Y}},{key:"isEquivalentClass",value:function(t){return t instanceof r}},{key:"getCoordinateN",value:function(t){return this._points.getCoordinate(t)}},{key:"getGeometryType",value:function(){return H.TYPENAME_LINESTRING}},{key:"getCoordinateSequence",value:function(){return this._points}},{key:"isEmpty",value:function(){return 0===this._points.size()}},{key:"init",value:function(t){if(null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),1===t.size())throw new v("Invalid number of points in LineString (found "+t.size()+" - must be 0 or >= 2)");this._points=t}},{key:"isCoordinate",value:function(t){for(var e=0;e<this._points.size();e++)if(this._points.getCoordinate(e).equals(t))return!0;return!1}},{key:"getStartPoint",value:function(){return this.isEmpty()?null:this.getPointN(0)}},{key:"getPointN",value:function(t){return this.getFactory().createPoint(this._points.getCoordinate(t))}},{key:"interfaces_",get:function(){return[xt]}}],[{key:"constructor_",value:function(){if(this._points=null,0===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];H.constructor_.call(this,e),this.init(t)}}}])}(H),It=o(function t(){n(this,t)}),Ot=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"computeEnvelopeInternal",value:function(){if(this.isEmpty())return new V;var t=new V;return t.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),t}},{key:"getCoordinates",value:function(){return this.isEmpty()?[]:[this.getCoordinate()]}},{key:"copyInternal",value:function(){return new r(this._coordinates.copy(),this._factory)}},{key:"equalsExact",value:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof H){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&(!(!this.isEmpty()||!t.isEmpty())||this.isEmpty()===t.isEmpty()&&this.equal(t.getCoordinate(),this.getCoordinate(),e))}return A(r,"equalsExact",this,1).apply(this,arguments)}},{key:"normalize",value:function(){}},{key:"getCoordinate",value:function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null}},{key:"getBoundaryDimension",value:function(){return Tt.FALSE}},{key:"reverseInternal",value:function(){return this.getFactory().createPoint(this._coordinates.copy())}},{key:"getTypeCode",value:function(){return H.TYPECODE_POINT}},{key:"getDimension",value:function(){return 0}},{key:"getNumPoints",value:function(){return this.isEmpty()?0:1}},{key:"getX",value:function(){if(null===this.getCoordinate())throw new IllegalStateException("getX called on empty Point");return this.getCoordinate().x}},{key:"compareToSameClass",value:function(){if(1===arguments.length){var t=arguments[0];return this.getCoordinate().compareTo(t.getCoordinate())}if(2===arguments.length){var e=arguments[0];return arguments[1].compare(this._coordinates,e._coordinates)}}},{key:"apply",value:function(){if(rt(arguments[0],wt)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(rt(arguments[0],Ct)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else(rt(arguments[0],Pt)||rt(arguments[0],_))&&arguments[0].filter(this)}},{key:"getBoundary",value:function(){return this.getFactory().createGeometryCollection()}},{key:"getGeometryType",value:function(){return H.TYPENAME_POINT}},{key:"getCoordinateSequence",value:function(){return this._coordinates}},{key:"getY",value:function(){if(null===this.getCoordinate())throw new IllegalStateException("getY called on empty Point");return this.getCoordinate().y}},{key:"isEmpty",value:function(){return 0===this._coordinates.size()}},{key:"init",value:function(t){null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),F.isTrue(t.size()<=1),this._coordinates=t}},{key:"isSimple",value:function(){return!0}},{key:"interfaces_",get:function(){return[It]}}],[{key:"constructor_",value:function(){this._coordinates=null;var t=arguments[0],e=arguments[1];H.constructor_.call(this,e),this.init(t)}}])}(H),Rt=function(){function t(){n(this,t)}return o(t,null,[{key:"ofRing",value:function(){if(arguments[0]instanceof Array){var e=arguments[0];return Math.abs(t.ofRingSigned(e))}if(rt(arguments[0],lt)){var n=arguments[0];return Math.abs(t.ofRingSigned(n))}}},{key:"ofRingSigned",value:function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,r=1;r<t.length-1;r++){var i=t[r].x-n,o=t[r+1].y;e+=i*(t[r-1].y-o)}return e/2}if(rt(arguments[0],lt)){var s=arguments[0],a=s.size();if(a<3)return 0;var u=new G,l=new G,c=new G;s.getCoordinate(0,l),s.getCoordinate(1,c);var h=l.x;c.x-=h;for(var A=0,f=1;f<a-1;f++)u.y=l.y,l.x=c.x,l.y=c.y,s.getCoordinate(f+1,c),c.x-=h,A+=l.x*(u.y-c.y);return A/2}}}])}(),Lt=o(function t(){n(this,t)},null,[{key:"sort",value:function(){var t=arguments,e=arguments[0];if(1===arguments.length)e.sort(function(t,e){return t.compareTo(e)});else if(2===arguments.length)e.sort(function(e,n){return t[1].compare(e,n)});else if(3===arguments.length){var n=e.slice(arguments[1],arguments[2]);n.sort();var r=e.slice(0,arguments[1]).concat(n,e.slice(arguments[2],e.length));e.splice(0,e.length);var i,o=s(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;e.push(a)}}catch(t){o.e(t)}finally{o.f()}}else if(4===arguments.length){var u=e.slice(arguments[1],arguments[2]);u.sort(function(e,n){return t[3].compare(e,n)});var l=e.slice(0,arguments[1]).concat(u,e.slice(arguments[2],e.length));e.splice(0,e.length);var c,h=s(l);try{for(h.s();!(c=h.n()).done;){var A=c.value;e.push(A)}}catch(t){h.e(t)}finally{h.f()}}}},{key:"asList",value:function(t){var e,n=new dt,r=s(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;n.add(i)}}catch(t){r.e(t)}finally{r.f()}return n}},{key:"copyOf",value:function(t,e){return t.slice(0,e)}}]),Bt=o(function t(){n(this,t)}),kt=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"computeEnvelopeInternal",value:function(){return this._shell.getEnvelopeInternal()}},{key:"getCoordinates",value:function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=this._shell.getCoordinates(),r=0;r<n.length;r++)t[++e]=n[r];for(var i=0;i<this._holes.length;i++)for(var o=this._holes[i].getCoordinates(),s=0;s<o.length;s++)t[++e]=o[s];return t}},{key:"getArea",value:function(){var t=0;t+=Rt.ofRing(this._shell.getCoordinateSequence());for(var e=0;e<this._holes.length;e++)t-=Rt.ofRing(this._holes[e].getCoordinateSequence());return t}},{key:"copyInternal",value:function(){for(var t=this._shell.copy(),e=new Array(this._holes.length).fill(null),n=0;n<this._holes.length;n++)e[n]=this._holes[n].copy();return new r(t,e,this._factory)}},{key:"isRectangle",value:function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var t=this._shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),n=0;n<5;n++){var r=t.getX(n);if(r!==e.getMinX()&&r!==e.getMaxX())return!1;var i=t.getY(n);if(i!==e.getMinY()&&i!==e.getMaxY())return!1}for(var o=t.getX(0),s=t.getY(0),a=1;a<=4;a++){var u=t.getX(a),l=t.getY(a);if(u!==o==(l!==s))return!1;o=u,s=l}return!0}},{key:"equalsExact",value:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof H){var t=arguments[0],e=arguments[1];if(!this.isEquivalentClass(t))return!1;var n=t,i=this._shell,o=n._shell;if(!i.equalsExact(o,e))return!1;if(this._holes.length!==n._holes.length)return!1;for(var s=0;s<this._holes.length;s++)if(!this._holes[s].equalsExact(n._holes[s],e))return!1;return!0}return A(r,"equalsExact",this,1).apply(this,arguments)}},{key:"normalize",value:function(){if(0===arguments.length){this._shell=this.normalized(this._shell,!0);for(var t=0;t<this._holes.length;t++)this._holes[t]=this.normalized(this._holes[t],!1);Lt.sort(this._holes)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(e.isEmpty())return null;var r=e.getCoordinateSequence(),i=St.minCoordinateIndex(r,0,r.size()-2);St.scroll(r,i,!0),ct.isCCW(r)===n&&St.reverse(r)}}},{key:"getCoordinate",value:function(){return this._shell.getCoordinate()}},{key:"getNumInteriorRing",value:function(){return this._holes.length}},{key:"getBoundaryDimension",value:function(){return 1}},{key:"reverseInternal",value:function(){for(var t=this.getExteriorRing().reverse(),e=new Array(this.getNumInteriorRing()).fill(null),n=0;n<e.length;n++)e[n]=this.getInteriorRingN(n).reverse();return this.getFactory().createPolygon(t,e)}},{key:"getTypeCode",value:function(){return H.TYPECODE_POLYGON}},{key:"getDimension",value:function(){return 2}},{key:"getLength",value:function(){var t=0;t+=this._shell.getLength();for(var e=0;e<this._holes.length;e++)t+=this._holes[e].getLength();return t}},{key:"getNumPoints",value:function(){for(var t=this._shell.getNumPoints(),e=0;e<this._holes.length;e++)t+=this._holes[e].getNumPoints();return t}},{key:"convexHull",value:function(){return this.getExteriorRing().convexHull()}},{key:"normalized",value:function(t,e){var n=t.copy();return this.normalize(n,e),n}},{key:"compareToSameClass",value:function(){if(1===arguments.length){var t=arguments[0],e=this._shell,n=t._shell;return e.compareToSameClass(n)}if(2===arguments.length){var r=arguments[1],i=arguments[0],o=this._shell,s=i._shell,a=o.compareToSameClass(s,r);if(0!==a)return a;for(var u=this.getNumInteriorRing(),l=i.getNumInteriorRing(),c=0;c<u&&c<l;){var h=this.getInteriorRingN(c),A=i.getInteriorRingN(c),f=h.compareToSameClass(A,r);if(0!==f)return f;c++}return c<u?1:c<l?-1:0}}},{key:"apply",value:function(){if(rt(arguments[0],wt)){var t=arguments[0];this._shell.apply(t);for(var e=0;e<this._holes.length;e++)this._holes[e].apply(t)}else if(rt(arguments[0],Ct)){var n=arguments[0];if(this._shell.apply(n),!n.isDone())for(var r=0;r<this._holes.length&&(this._holes[r].apply(n),!n.isDone());r++);n.isGeometryChanged()&&this.geometryChanged()}else if(rt(arguments[0],Pt))arguments[0].filter(this);else if(rt(arguments[0],_)){var i=arguments[0];i.filter(this),this._shell.apply(i);for(var o=0;o<this._holes.length;o++)this._holes[o].apply(i)}}},{key:"getBoundary",value:function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var t=new Array(this._holes.length+1).fill(null);t[0]=this._shell;for(var e=0;e<this._holes.length;e++)t[e+1]=this._holes[e];return t.length<=1?this.getFactory().createLinearRing(t[0].getCoordinateSequence()):this.getFactory().createMultiLineString(t)}},{key:"getGeometryType",value:function(){return H.TYPENAME_POLYGON}},{key:"getExteriorRing",value:function(){return this._shell}},{key:"isEmpty",value:function(){return this._shell.isEmpty()}},{key:"getInteriorRingN",value:function(t){return this._holes[t]}},{key:"interfaces_",get:function(){return[Bt]}}],[{key:"constructor_",value:function(){this._shell=null,this._holes=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(H.constructor_.call(this,n),null===t&&(t=this.getFactory().createLinearRing()),null===e&&(e=[]),H.hasNullElements(e))throw new v("holes must not contain null elements");if(t.isEmpty()&&H.hasNonEmptyElements(e))throw new v("shell is empty but holes are not");this._shell=t,this._holes=e}}])}(H),Nt=function(t){function r(){return n(this,r),e(this,r,arguments)}return l(r,t),o(r)}(Q),Ft=function(t){function r(t){var i;return n(this,r),(i=e(this,r)).array=[],t instanceof W&&i.addAll(t),i}return l(r,t),o(r,[{key:"contains",value:function(t){var e,n=s(this.array);try{for(n.s();!(e=n.n()).done;)if(0===e.value.compareTo(t))return!0}catch(t){n.e(t)}finally{n.f()}return!1}},{key:"add",value:function(t){if(this.contains(t))return!1;for(var e=0,n=this.array.length;e<n;e++)if(1===this.array[e].compareTo(t))return!!this.array.splice(e,0,t);return this.array.push(t),!0}},{key:"addAll",value:function(t){var e,n=s(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.add(r)}}catch(t){n.e(t)}finally{n.f()}return!0}},{key:"remove",value:function(){throw new Y}},{key:"size",value:function(){return this.array.length}},{key:"isEmpty",value:function(){return 0===this.array.length}},{key:"toArray",value:function(){return this.array.slice()}},{key:"iterator",value:function(){return new Dt(this.array)}}])}(Nt),Dt=o(function t(e){n(this,t),this.array=e,this.position=0},[{key:"next",value:function(){if(this.position===this.array.length)throw new X;return this.array[this.position++]}},{key:"hasNext",value:function(){return this.position<this.array.length}},{key:"remove",value:function(){throw new Y}}]),jt=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"computeEnvelopeInternal",value:function(){for(var t=new V,e=0;e<this._geometries.length;e++)t.expandToInclude(this._geometries[e].getEnvelopeInternal());return t}},{key:"getGeometryN",value:function(t){return this._geometries[t]}},{key:"getCoordinates",value:function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=0;n<this._geometries.length;n++)for(var r=this._geometries[n].getCoordinates(),i=0;i<r.length;i++)t[++e]=r[i];return t}},{key:"getArea",value:function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getArea();return t}},{key:"copyInternal",value:function(){for(var t=new Array(this._geometries.length).fill(null),e=0;e<t.length;e++)t[e]=this._geometries[e].copy();return new r(t,this._factory)}},{key:"equalsExact",value:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof H){var t=arguments[0],e=arguments[1];if(!this.isEquivalentClass(t))return!1;var n=t;if(this._geometries.length!==n._geometries.length)return!1;for(var i=0;i<this._geometries.length;i++)if(!this._geometries[i].equalsExact(n._geometries[i],e))return!1;return!0}return A(r,"equalsExact",this,1).apply(this,arguments)}},{key:"normalize",value:function(){for(var t=0;t<this._geometries.length;t++)this._geometries[t].normalize();Lt.sort(this._geometries)}},{key:"getCoordinate",value:function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()}},{key:"getBoundaryDimension",value:function(){for(var t=Tt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getBoundaryDimension());return t}},{key:"reverseInternal",value:function(){for(var t=this._geometries.length,e=new dt(t),n=0;n<t;n++)e.add(this._geometries[n].reverse());return this.getFactory().buildGeometry(e)}},{key:"getTypeCode",value:function(){return H.TYPECODE_GEOMETRYCOLLECTION}},{key:"getDimension",value:function(){for(var t=Tt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getDimension());return t}},{key:"getLength",value:function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getLength();return t}},{key:"getNumPoints",value:function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getNumPoints();return t}},{key:"getNumGeometries",value:function(){return this._geometries.length}},{key:"compareToSameClass",value:function(){if(1===arguments.length){var t=arguments[0],e=new Ft(Lt.asList(this._geometries)),n=new Ft(Lt.asList(t._geometries));return this.compare(e,n)}if(2===arguments.length){for(var r=arguments[1],i=arguments[0],o=this.getNumGeometries(),s=i.getNumGeometries(),a=0;a<o&&a<s;){var u=this.getGeometryN(a),l=i.getGeometryN(a),c=u.compareToSameClass(l,r);if(0!==c)return c;a++}return a<o?1:a<s?-1:0}}},{key:"apply",value:function(){if(rt(arguments[0],wt))for(var t=arguments[0],e=0;e<this._geometries.length;e++)this._geometries[e].apply(t);else if(rt(arguments[0],Ct)){var n=arguments[0];if(0===this._geometries.length)return null;for(var r=0;r<this._geometries.length&&(this._geometries[r].apply(n),!n.isDone());r++);n.isGeometryChanged()&&this.geometryChanged()}else if(rt(arguments[0],Pt)){var i=arguments[0];i.filter(this);for(var o=0;o<this._geometries.length;o++)this._geometries[o].apply(i)}else if(rt(arguments[0],_)){var s=arguments[0];s.filter(this);for(var a=0;a<this._geometries.length;a++)this._geometries[a].apply(s)}}},{key:"getBoundary",value:function(){return H.checkNotGeometryCollection(this),F.shouldNeverReachHere(),null}},{key:"getGeometryType",value:function(){return H.TYPENAME_GEOMETRYCOLLECTION}},{key:"isEmpty",value:function(){for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isEmpty())return!1;return!0}}
2],[{key:"constructor_",value:function(){if(this._geometries=null,0===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];if(H.constructor_.call(this,e),null===t&&(t=[]),H.hasNullElements(t))throw new v("geometries must not contain null elements");this._geometries=t}}}])}(H),Ut=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"copyInternal",value:function(){for(var t=new Array(this._geometries.length).fill(null),e=0;e<t.length;e++)t[e]=this._geometries[e].copy();return new r(t,this._factory)}},{key:"isValid",value:function(){return!0}},{key:"equalsExact",value:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof H){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&A(r,"equalsExact",this,1).call(this,t,e)}return A(r,"equalsExact",this,1).apply(this,arguments)}},{key:"getCoordinate",value:function(){if(1===arguments.length&&Number.isInteger(arguments[0])){var t=arguments[0];return this._geometries[t].getCoordinate()}return A(r,"getCoordinate",this,1).apply(this,arguments)}},{key:"getBoundaryDimension",value:function(){return Tt.FALSE}},{key:"getTypeCode",value:function(){return H.TYPECODE_MULTIPOINT}},{key:"getDimension",value:function(){return 0}},{key:"getBoundary",value:function(){return this.getFactory().createGeometryCollection()}},{key:"getGeometryType",value:function(){return H.TYPENAME_MULTIPOINT}},{key:"interfaces_",get:function(){return[It]}}],[{key:"constructor_",value:function(){var t=arguments[0],e=arguments[1];jt.constructor_.call(this,t,e)}}])}(jt),Gt=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"copyInternal",value:function(){return new r(this._points.copy(),this._factory)}},{key:"getBoundaryDimension",value:function(){return Tt.FALSE}},{key:"isClosed",value:function(){return!!this.isEmpty()||A(r,"isClosed",this,1).call(this)}},{key:"reverseInternal",value:function(){var t=this._points.copy();return St.reverse(t),this.getFactory().createLinearRing(t)}},{key:"getTypeCode",value:function(){return H.TYPECODE_LINEARRING}},{key:"validateConstruction",value:function(){if(!this.isEmpty()&&!A(r,"isClosed",this,1).call(this))throw new v("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<r.MINIMUM_VALID_SIZE)throw new v("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")}},{key:"getGeometryType",value:function(){return H.TYPENAME_LINEARRING}}],[{key:"constructor_",value:function(){var t=arguments[0],e=arguments[1];Mt.constructor_.call(this,t,e),this.validateConstruction()}}])}(Mt);Gt.MINIMUM_VALID_SIZE=4;var zt=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"setOrdinate",value:function(t,e){switch(t){case r.X:this.x=e;break;case r.Y:this.y=e;break;default:throw new v("Invalid ordinate index: "+t)}}},{key:"getZ",value:function(){return G.NULL_ORDINATE}},{key:"getOrdinate",value:function(t){switch(t){case r.X:return this.x;case r.Y:return this.y}throw new v("Invalid ordinate index: "+t)}},{key:"setZ",value:function(t){throw new v("CoordinateXY dimension 2 does not support z-ordinate")}},{key:"copy",value:function(){return new r(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+")"}},{key:"setCoordinate",value:function(t){this.x=t.x,this.y=t.y,this.z=t.getZ()}}],[{key:"constructor_",value:function(){if(0===arguments.length)G.constructor_.call(this);else if(1===arguments.length){if(arguments[0]instanceof r){var t=arguments[0];G.constructor_.call(this,t.x,t.y)}else if(arguments[0]instanceof G){var e=arguments[0];G.constructor_.call(this,e.x,e.y)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];G.constructor_.call(this,n,i,G.NULL_ORDINATE)}}}])}(G);zt.X=0,zt.Y=1,zt.Z=-1,zt.M=-1;var Vt=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"getM",value:function(){return this._m}},{key:"setOrdinate",value:function(t,e){switch(t){case r.X:this.x=e;break;case r.Y:this.y=e;break;case r.M:this._m=e;break;default:throw new v("Invalid ordinate index: "+t)}}},{key:"setM",value:function(t){this._m=t}},{key:"getZ",value:function(){return G.NULL_ORDINATE}},{key:"getOrdinate",value:function(t){switch(t){case r.X:return this.x;case r.Y:return this.y;case r.M:return this._m}throw new v("Invalid ordinate index: "+t)}},{key:"setZ",value:function(t){throw new v("CoordinateXY dimension 2 does not support z-ordinate")}},{key:"copy",value:function(){return new r(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+" m="+this.getM()+")"}},{key:"setCoordinate",value:function(t){this.x=t.x,this.y=t.y,this.z=t.getZ(),this._m=t.getM()}}
2],[{key:"constructor_",value:function(){if(this._m=null,0===arguments.length)G.constructor_.call(this),this._m=0;else if(1===arguments.length){if(arguments[0]instanceof r){var t=arguments[0];G.constructor_.call(this,t.x,t.y),this._m=t._m}else if(arguments[0]instanceof G){var e=arguments[0];G.constructor_.call(this,e.x,e.y),this._m=this.getM()}}else if(3===arguments.length){var n=arguments[0],i=arguments[1],o=arguments[2];G.constructor_.call(this,n,i,G.NULL_ORDINATE),this._m=o}}}])}(G);Vt.X=0,Vt.Y=1,Vt.Z=-1,Vt.M=2;var Ht=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"getM",value:function(){return this._m}},{key:"setOrdinate",value:function(t,e){switch(t){case G.X:this.x=e;break;case G.Y:this.y=e;break;case G.Z:this.z=e;break;case G.M:this._m=e;break;default:throw new v("Invalid ordinate index: "+t)}}},{key:"setM",value:function(t){this._m=t}},{key:"getOrdinate",value:function(t){switch(t){case G.X:return this.x;case G.Y:return this.y;case G.Z:return this.getZ();case G.M:return this.getM()}throw new v("Invalid ordinate index: "+t)}},{key:"copy",value:function(){return new r(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+", "+this.getZ()+" m="+this.getM()+")"}},{key:"setCoordinate",value:function(t){this.x=t.x,this.y=t.y,this.z=t.getZ(),this._m=t.getM()}}],[{key:"constructor_",value:function(){if(this._m=null,0===arguments.length)G.constructor_.call(this),this._m=0;else if(1===arguments.length){if(arguments[0]instanceof r){var t=arguments[0];G.constructor_.call(this,t),this._m=t._m}else if(arguments[0]instanceof G){var e=arguments[0];G.constructor_.call(this,e),this._m=this.getM()}}else if(4===arguments.length){var n=arguments[0],i=arguments[1],o=arguments[2],s=arguments[3];G.constructor_.call(this,n,i,o),this._m=s}}}])}(G),qt=function(){function t(){n(this,t)}return o(t,null,[{key:"measures",value:function(t){return t instanceof zt?0:t instanceof Vt||t instanceof Ht?1:0}},{key:"dimension",value:function(t){return t instanceof zt?2:t instanceof Vt?3:t instanceof Ht?4:3}},{key:"create",value:function(){if(1===arguments.length){var e=arguments[0];return t.create(e,0)}if(2===arguments.length){var n=arguments[0],r=arguments[1];return 2===n?new zt:3===n&&0===r?new G:3===n&&1===r?new Vt:4===n&&1===r?new Ht:new G}}}])}(),Wt=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"getCoordinate",value:function(t){return this.get(t)}},{key:"addAll",value:function(){if(2===arguments.length&&"boolean"==typeof arguments[1]&&rt(arguments[0],W)){for(var t=arguments[1],e=!1,n=arguments[0].iterator();n.hasNext();)this.add(n.next(),t),e=!0;return e}return A(r,"addAll",this,1).apply(this,arguments)}},{key:"clone",value:function(){for(var t=A(r,"clone",this,1).call(this),e=0;e<this.size();
vendor: 11,076 bytes, line 2
2e++)t.add(e,this.get(e).clone());return t}},{key:"toCoordinateArray",value:function(){if(0===arguments.length)return this.toArray(r.coordArrayType);if(1===arguments.length){if(arguments[0])return this.toArray(r.coordArrayType);for(var t=this.size(),e=new Array(t).fill(null),n=0;n<t;n++)e[n]=this.get(t-n-1);return e}}},{key:"add",value:function(){if(1===arguments.length){var t=arguments[0];return A(r,"add",this,1).call(this,t)}if(2===arguments.length){if(arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var e=arguments[0],n=arguments[1];return this.add(e,n,!0),!0}if(arguments[0]instanceof G&&"boolean"==typeof arguments[1]){var i=arguments[0];if(!arguments[1]&&this.size()>=1&&this.get(this.size()-1).equals2D(i))return null;A(r,"add",this,1).call(this,i)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],s=arguments[1];return this.add(o,s),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var a=arguments[0],u=arguments[1];if(arguments[2])for(var l=0;l<a.length;l++)this.add(a[l],u);else for(var c=a.length-1;c>=0;c--)this.add(a[c],u);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof G){var h=arguments[0],f=arguments[1];if(!arguments[2]){var d=this.size();if(d>0){if(h>0&&this.get(h-1).equals2D(f))return null;if(h<d&&this.get(h).equals2D(f))return null}}A(r,"add",this,1).call(this,h,f)}}else if(4===arguments.length){var p=arguments[0],g=arguments[1],m=arguments[2],y=arguments[3],v=1;m>y&&(v=-1);for(var _=m;_!==y;_+=v)this.add(p[_],g);return!0}}},{key:"closeRing",value:function(){if(this.size()>0){var t=this.get(0).copy();this.add(t,!1)}}}],[{key:"constructor_",value:function(){if(0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.ensureCapacity(t.length),this.add(t,!0)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.ensureCapacity(e.length),this.add(e,n)}}}])}(dt);Wt.coordArrayType=new Array(0).fill(null);var Xt=function(){function t(){n(this,t)}return o(t,null,[{key:"isRing",value:function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))}},{key:"ptNotInList",value:function(e,n){for(var r=0;r<e.length;r++){var i=e[r];if(t.indexOf(i,n)<0)return i}return null}},{key:"scroll",value:function(e,n){var r=t.indexOf(n,e);if(r<0)return null;var i=new Array(e.length).fill(null);yt.arraycopy(e,r,i,0,e.length-r),yt.arraycopy(e,0,i,e.length-r,r),yt.arraycopy(i,0,e,0,e.length)}},{key:"equals",value:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(null===t||null===e)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];if(r===i)return!0;if(null===r||null===i)return!1;if(r.length!==i.length)return!1;for(var s=0;s<r.length;s++)if(0!==o.compare(r[s],i[s]))return!1;return!0}}},{key:"intersection",value:function(t,e){for(var n=new Wt,r=0;r<t.length;r++)e.intersects(t[r])&&n.add(t[r],!0);return n.toCoordinateArray()}},{key:"measures",value:function(t){if(null===t||0===t.length)return 0;var e,n=0,r=s(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;n=Math.max(n,qt.measures(i))}}catch(t){r.e(t)}finally{r.f()}return n}},{key:"hasRepeatedPoints",value:function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1}},{key:"removeRepeatedPoints",value:function(e){return t.hasRepeatedPoints(e)?new Wt(e,!1).toCoordinateArray():e}},{key:"reverse",value:function(t){for(var e=t.length-1,n=Math.trunc(e/2),r=0;r<=n;r++){var i=t[r];t[r]=t[e-r],t[e-r]=i}}},{key:"removeNull",value:function(t){for(var e=0,n=0;n<t.length;n++)null!==t[n]&&e++;var r=new Array(e).fill(null);if(0===e)return r;for(var i=0,o=0;o<t.length;o++)null!==t[o]&&(r[i++]=t[o]);return r}},{key:"copyDeep",value:function(){if(1===arguments.length){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=t[n].copy();return e}if(5===arguments.length)for(var r=arguments[0],i=arguments[1],o=arguments[2],s=arguments[3],a=arguments[4],u=0;u<a;u++)o[s+u]=r[i+u].copy()}},{key:"isEqualReversed",value:function(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=e[t.length-n-1];if(0!==r.compareTo(i))return!1}return!0}},{key:"envelope",value:function(t){for(var e=new V,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e}},{key:"toCoordinateArray",value:function(e){return e.toArray(t.coordArrayType)}},{key:"dimension",value:function(t){if(null===t||0===t.length)return 3;var e,n=0,r=s(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;n=Math.max(n,qt.dimension(i))}}catch(t){r.e(t)}finally{r.f()}return n}},{key:"atLeastNCoordinatesOrNothing",value:function(t,e){return e.length>=t?e:[]}},{key:"indexOf",value:function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1}},{key:"increasingDirection",value:function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,r=t[e].compareTo(t[n]);if(0!==r)return r}return 1}},{key:"compare",value:function(t,e){for(var n=0;n<t.length&&n<e.length;){var r=t[n].compareTo(e[n]);if(0!==r)return r;n++}return n<e.length?-1:n<t.length?1:0}},{key:"minCoordinate",value:function(t){for(var e=null,n=0;n<t.length;n++)(null===e||e.compareTo(t[n])>0)&&(e=t[n]);return e}},{key:"extract",value:function(t,e,n){e=vt.clamp(e,0,t.length);var r=(n=vt.clamp(n,-1,t.length))-e+1;n<0&&(r=0),e>=t.length&&(r=0),n<e&&(r=0);var i=new Array(r).fill(null);if(0===r)return i;for(var o=0,s=e;s<=n;s++)i[o++]=t[s];return i}}])}(),Yt=o(function t(){n(this,t)},[{key:"compare",value:function(t,e){var n=t,r=e;return Xt.compare(n,r)}},{key:"interfaces_",get:function(){return[B]}}]),Qt=o(function t(){n(this,t)},[{key:"compare",value:function(t,e){var n=t,r=e;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;var i=Xt.compare(n,r);return Xt.isEqualReversed(n,r)?0:i}},{key:"OLDcompare",value:function(t,e){var n=t,r=e;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;for(var i=Xt.increasingDirection(n),o=Xt.increasingDirection(r),s=i>0?0:n.length-1,a=o>0?0:n.length-1,u=0;u<n.length;u++){var l=n[s].compareTo(r[a]);if(0!==l)return l;s+=i,a+=o}return 0}},{key:"interfaces_",get:function(){return[B]}}]);Xt.ForwardComparator=Yt,Xt.BidirectionalComparator=Qt,Xt.coordArrayType=new Array(0).fill(null);var Jt=o(function t(e){n(this,t),this.str=e},[{key:"append",value:function(t){this.str+=t}},{key:"setCharAt",value:function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)}},{key:"toString",value:function(){return this.str}}]),Zt=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"getM",value:function(t){return this.hasM()?this._coordinates[t].getM():L.NaN}},{key:"setOrdinate",value:function(t,e,n){switch(e){case lt.X:this._coordinates[t].x=n;break;case lt.Y:this._coordinates[t].y=n;break;default:this._coordinates[t].setOrdinate(e,n)}}},{key:"getZ",value:function(t){return this.hasZ()?this._coordinates[t].getZ():L.NaN}},{key:"size",value:function(){return this._coordinates.length}},{key:"getOrdinate",value:function(t,e){switch(e){case lt.X:return this._coordinates[t].x;case lt.Y:return this._coordinates[t].y;default:return this._coordinates[t].getOrdinate(e)}}},{key:"getCoordinate",value:function(){if(1===arguments.length){var t=arguments[0];return this._coordinates[t]}if(2===arguments.length){var e=arguments[0];arguments[1].setCoordinate(this._coordinates[e])}}},{key:"getCoordinateCopy",value:function(t){var e=this.createCoordinate();return e.setCoordinate(this._coordinates[t]),e}},{key:"createCoordinate",value:function(){return qt.create(this.getDimension(),this.getMeasures())}},{key:"getDimension",value:function(){return this._dimension}},{key:"getX",value:function(t){return this._coordinates[t].x}},{key:"getMeasures",value:function(){return this._measures}},{key:"expandEnvelope",value:function(t){for(var e=0;e<this._coordinates.length;e++)t.expandToInclude(this._coordinates[e]);return t}},{key:"copy",value:function(){for(var e=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++){var r=this.createCoordinate();r.setCoordinate(this._coordinates[n]),e[n]=r}return new t(e,this._dimension,this._measures)}},{key:"toString",value:function(){if(this._coordinates.length>0){var t=new Jt(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e<this._coordinates.length;e++)t.append(", "),t.append(this._coordinates[e]);return t.append(")"),t.toString()}return"()"}},{key:"getY",value:function(t){return this._coordinates[t].y}},{key:"toCoordinateArray",value:function(){return this._coordinates}},{key:"interfaces_",get:function(){return[lt,E]}}],[{key:"constructor_",value:function(){if(this._dimension=3,this._measures=0,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];t.constructor_.call(this,e,Xt.dimension(e),Xt.measures(e))}else if(Number.isInteger(arguments[0])){var n=arguments[0];this._coordinates=new Array(n).fill(null);for(var r=0;r<n;r++)this._coordinates[r]=new G}else if(rt(arguments[0],lt)){var i=arguments[0];if(null===i)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._measures=i.getMeasures(),this._coordinates=new Array(i.size()).fill(null);for(var o=0;o<this._coordinates.length;o++)this._coordinates[o]=i.getCoordinateCopy(o)}}else if(2===arguments.length){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var s=arguments[0],a=arguments[1];t.constructor_.call(this,s,a,Xt.measures(s))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var u=arguments[0],l=arguments[1];this._coordinates=new Array(u).fill(null),this._dimension=l;for(var c=0;c<u;c++)this._coordinates[c]=qt.create(l)}}else if(3===arguments.length)if(Number.isInteger(arguments[2])&&arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var h=arguments[0],A=arguments[1],f=arguments[2];this._dimension=A,this._measures=f,this._coordinates=null===h?new Array(0).fill(null):h}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var d=arguments[0],p=arguments[1],g=arguments[2];this._coordinates=new Array(d).fill(null),this._dimension=p,this._measures=g;for(var m=0;m<d;m++)this._coordinates[m]=this.createCoordinate()}}}])}(),Kt=function(){function t(){n(this,t)}return o(t,[{key:"readResolve",value:function(){return t.instance()}},{key:"create",value:function(){if(1===arguments.length){if(arguments[0]instanceof Array)return new Zt(arguments[0]);if(rt(arguments[0],lt))return new Zt(arguments[0])}else{if(2===arguments.length){var t=arguments[1];return t>3&&(t=3),t<2&&(t=2),new Zt(arguments[0],t)}if(3===arguments.length){var e=arguments[2],n=arguments[1]-e;return e>1&&(e=1),n>3&&(n=3),n<2&&(n=2),new Zt(arguments[0],n+e,e)}}}},{key:"interfaces_",get:function(){return[bt,E]}}],[{key:"instance",value:function(){return t.instanceObject}}])}();
2Kt.instanceObject=new Kt;var $t=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"copyInternal",value:function(){for(var t=new Array(this._geometries.length).fill(null),e=0;e<t.length;e++)t[e]=this._geometries[e].copy();return new r(t,this._factory)}},{key:"equalsExact",value:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof H){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&A(r,"equalsExact",this,1).call(this,t,e)}return A(r,"equalsExact",this,1).apply(this,arguments)}},{key:"getBoundaryDimension",value:function(){return 1}},{key:"getTypeCode",value:function(){return H.TYPECODE_MULTIPOLYGON}},{key:"getDimension",value:function(){return 2}},{key:"getBoundary",value:function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new dt,e=0;e<this._geometries.length;e++)for(var n=this._geometries[e].getBoundary(),r=0;r<n.getNumGeometries();r++)t.add(n.getGeometryN(r));var i=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(i))}},{key:"getGeometryType",value:function(){return H.TYPENAME_MULTIPOLYGON}},{key:"interfaces_",get:function(){return[Bt]}}],[{key:"constructor_",value:function(){var t=arguments[0],e=arguments[1];jt.constructor_.call(this,t,e)}}])}(jt),te=o(function t(){n(this,t)},[{key:"get",value:function(){}},{key:"put",value:function(){}},{key:"size",value:function(){}},{key:"values",value:function(){}},{key:"entrySet",value:function(){}}]),ee=function(t){function r(){var t;return n(this,r),(t=e(this,r)).map=new Map,t}return l(r,t),o(r,[{key:"get",value:function(t){return this.map.get(t)||null}},{key:"put",value:function(t,e){return this.map.set(t,e),e}},{key:"values",value:function(){for(var t=new dt,e=this.map.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t}},{key:"entrySet",value:function(){var t=new J;return this.map.entries().forEach(function(e){return t.add(e)}),t}},{key:"size",value:function(){return this.map.size()}}])}(te),ne=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"equals",value:function(e){if(!(e instanceof t))return!1;var n=e;return this._modelType===n._modelType&&this._scale===n._scale}},{key:"compareTo",value:function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return ot.compare(n,r)}},{key:"getScale",value:function(){return this._scale}},{key:"isFloating",value:function(){return this._modelType===t.FLOATING||this._modelType===t.FLOATING_SINGLE}},{key:"getType",value:function(){return this._modelType}},{key:"toString",value:function(){var e="UNKNOWN";return this._modelType===t.FLOATING?e="Floating":this._modelType===t.FLOATING_SINGLE?e="Floating-Single":this._modelType===t.FIXED&&(e="Fixed (Scale="+this.getScale()+")"),e}},{key:"makePrecise",value:function(){if("number"==typeof arguments[0]){var e=arguments[0];return L.isNaN(e)||this._modelType===t.FLOATING_SINGLE?e:this._modelType===t.FIXED?Math.round(e*this._scale)/this._scale:e}if(arguments[0]instanceof G){var n=arguments[0];if(this._modelType===t.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}}},{key:"getMaximumSignificantDigits",value:function(){var e=16;return this._modelType===t.FLOATING?e=16:this._modelType===t.FLOATING_SINGLE?e=6:this._modelType===t.FIXED&&(e=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),e}},{key:"setScale",value:function(t){this._scale=Math.abs(t)}},{key:"interfaces_",get:function(){return[E,b]}}],[{key:"constructor_",value:function(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof re){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}},{key:"mostPrecise",value:function(t,e){return t.compareTo(e)>=0?t:e}}])}(),re=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"readResolve",value:function(){return t.nameToTypeMap.get(this._name)}},{key:"toString",value:function(){return this._name}},{key:"interfaces_",get:function(){return[E]}}
vendor: 58,691 bytes, line 2
2],[{key:"constructor_",value:function(){this._name=null;var e=arguments[0];this._name=e,t.nameToTypeMap.put(e,this)}}])}();re.nameToTypeMap=new ee,ne.Type=re,ne.FIXED=new re("FIXED"),ne.FLOATING=new re("FLOATING"),ne.FLOATING_SINGLE=new re("FLOATING SINGLE"),ne.maximumPreciseValue=9007199254740992;var ie=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"copyInternal",value:function(){for(var t=new Array(this._geometries.length).fill(null),e=0;e<t.length;e++)t[e]=this._geometries[e].copy();return new r(t,this._factory)}},{key:"equalsExact",value:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof H){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&A(r,"equalsExact",this,1).call(this,t,e)}return A(r,"equalsExact",this,1).apply(this,arguments)}},{key:"getBoundaryDimension",value:function(){return this.isClosed()?Tt.FALSE:0}},{key:"isClosed",value:function(){if(this.isEmpty())return!1;for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isClosed())return!1;return!0}},{key:"getTypeCode",value:function(){return H.TYPECODE_MULTILINESTRING}},{key:"getDimension",value:function(){return 1}},{key:"getBoundary",value:function(){throw new Y}},{key:"getGeometryType",value:function(){return H.TYPENAME_MULTILINESTRING}},{key:"interfaces_",get:function(){return[xt]}}],[{key:"constructor_",value:function(){var t=arguments[0],e=arguments[1];jt.constructor_.call(this,t,e)}}])}(jt),oe=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"createEmpty",value:function(t){switch(t){case-1:return this.createGeometryCollection();case 0:return this.createPoint();case 1:return this.createLineString();case 2:return this.createPolygon();default:throw new v("Invalid dimension: "+t)}}},{key:"toGeometry",value:function(t){return t.isNull()?this.createPoint():t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new G(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new G(t.getMinX(),t.getMinY()),new G(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new G(t.getMinX(),t.getMinY()),new G(t.getMinX(),t.getMaxY()),new G(t.getMaxX(),t.getMaxY()),new G(t.getMaxX(),t.getMinY()),new G(t.getMinX(),t.getMinY())]),null)}},{key:"createLineString",value:function(){if(0===arguments.length)return this.createLineString(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLineString(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(rt(arguments[0],lt))return new Mt(arguments[0],this)}}},{key:"createMultiLineString",value:function(){return 0===arguments.length?new ie(null,this):1===arguments.length?new ie(arguments[0],this):void 0}},{key:"buildGeometry",value:function(e){for(var n=null,r=!1,i=!1,o=e.iterator();o.hasNext();){var s=o.next(),a=s.getTypeCode();null===n&&(n=a),a!==n&&(r=!0),s instanceof jt&&(i=!0)}if(null===n)return this.createGeometryCollection();if(r||i)return this.createGeometryCollection(t.toGeometryArray(e));var u=e.iterator().next();if(e.size()>1){if(u instanceof kt)return this.createMultiPolygon(t.toPolygonArray(e));if(u instanceof Mt)return this.createMultiLineString(t.toLineStringArray(e));if(u instanceof Ot)return this.createMultiPoint(t.toPointArray(e));F.shouldNeverReachHere("Unhandled geometry type: "+u.getGeometryType())}return u}},{key:"createMultiPointFromCoords",value:function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)}},{key:"createPoint",value:function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof G){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(rt(arguments[0],lt))return new Ot(arguments[0],this)}}},{key:"getCoordinateSequenceFactory",value:function(){return this._coordinateSequenceFactory}},{key:"createPolygon",value:function(){if(0===arguments.length)return this.createPolygon(null,null);if(1===arguments.length){if(rt(arguments[0],lt)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof Gt){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length)return new kt(arguments[0],arguments[1],this)}},{key:"getSRID",value:function(){return this._SRID}},{key:"createGeometryCollection",value:function(){return 0===arguments.length?new jt(null,this):1===arguments.length?new jt(arguments[0],this):void 0}},{key:"getPrecisionModel",value:function(){return this._precisionModel}},{key:"createLinearRing",value:function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(rt(arguments[0],lt))return new Gt(arguments[0],this)}}},{key:"createMultiPolygon",value:function(){return 0===arguments.length?new $t(null,this):1===arguments.length?new $t(arguments[0],this):void 0}},{key:"createMultiPoint",value:function(){if(0===arguments.length)return new Ut(null,this);if(1===arguments.length){if(arguments[0]instanceof Array)return new Ut(arguments[0],this);if(rt(arguments[0],lt)){var t=arguments[0];if(null===t)return this.createMultiPoint(new Array(0).fill(null));for(var e=new Array(t.size()).fill(null),n=0;n<t.size();n++){var r=this.getCoordinateSequenceFactory().create(1,t.getDimension(),t.getMeasures());St.copy(t,n,r,0,1),e[n]=this.createPoint(r)}return this.createMultiPoint(e)}}}},{key:"interfaces_",get:function(){return[E]}}],[{key:"constructor_",value:function(){if(this._precisionModel=null,this._coordinateSequenceFactory=null,this._SRID=null,0===arguments.length)t.constructor_.call(this,new ne,0);else if(1===arguments.length){if(rt(arguments[0],bt)){var e=arguments[0];t.constructor_.call(this,new ne,0,e)}else if(arguments[0]instanceof ne){var n=arguments[0];t.constructor_.call(this,n,0,t.getDefaultCoordinateSequenceFactory())}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];t.constructor_.call(this,r,i,t.getDefaultCoordinateSequenceFactory())}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this._precisionModel=o,this._coordinateSequenceFactory=a,this._SRID=s}}},{key:"toMultiPolygonArray",value:function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}},{key:"toGeometryArray",value:function(t){if(null===t)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)}},{key:"getDefaultCoordinateSequenceFactory",value:function(){return Kt.instance()}},{key:"toMultiLineStringArray",value:function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}},{key:"toLineStringArray",value:function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}},{key:"toMultiPointArray",value:function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}},{key:"toLinearRingArray",value:function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}},{key:"toPointArray",value:function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}},{key:"toPolygonArray",value:function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)}},{key:"createPointFromInternalCoord",value:function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)}}])}(),se="XY",ae={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},ue="EMPTY";for(var le in ae)ae[le].toUpperCase();var ce=o(function t(e){n(this,t),this.wkt=e,this.index_=-1},[{key:"isAlpha_",value:function(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"}},{key:"isNumeric_",value:function(t,e){return t>="0"&&t<="9"||"."==t&&!(void 0!==e&&e)}},{key:"isWhiteSpace_",value:function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t}},{key:"nextChar_",value:function(){return this.wkt.charAt(++this.index_)}},{key:"nextToken",value:function(){var t,e=this.nextChar_(),n=this.index_,r=e;if("("==e)t=2;else if(","==e)t=5;else if(")"==e)t=3;else if(this.isNumeric_(e)||"-"==e)t=4,r=this.readNumber_();else if(this.isAlpha_(e))t=1,r=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(""!==e)throw new Error("Unexpected character: "+e);t=6}return{position:n,value:r,type:t}}},{key:"readNumber_",value:function(){var t,e=this.index_,n=!1,r=!1;do{"."==t?n=!0:"e"!=t&&"E"!=t||(r=!0),t=this.nextChar_()}while(this.isNumeric_(t,n)||!r&&("e"==t||"E"==t)||r&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(e,this.index_--))}},{key:"readText_",value:function(){var t,e=this.index_;do{t=this.nextChar_()}while(this.isAlpha_(t));return this.wkt.substring(e,this.index_--).toUpperCase()}}]),he=o(function t(e,r){n(this,t),this.lexer_=e,this.token_,this.layout_=se,this.factory=r},[{key:"consume_",value:function(){this.token_=this.lexer_.nextToken()}},{key:"isTokenType",value:function(t){return this.token_.type==t}},{key:"match",value:function(t){var e=this.isTokenType(t);return e&&this.consume_(),e}},{key:"parse",value:function(){return this.consume_(),this.parseGeometry_()}},{key:"parseGeometryLayout_",value:function(){var t=se,e=this.token_;if(this.isTokenType(1)){var n=e.value;"Z"===n?t="XYZ":"M"===n?t="XYM":"ZM"===n&&(t="XYZM"),t!==se&&this.consume_()}return t}},{key:"parseGeometryCollectionText_",value:function(){if(this.match(2)){var t=[];do{t.push(this.parseGeometry_())}while(this.match(5));if(this.match(3))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parsePointText_",value:function(){if(this.match(2)){var t=this.parsePoint_();if(this.match(3))return t}else if(this.isEmptyGeometry_())return null;throw new Error(this.formatErrorMessage_())}},{key:"parseLineStringText_",value:function(){if(this.match(2)){var t=this.parsePointList_();if(this.match(3))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parsePolygonText_",value:function(){if(this.match(2)){var t=this.parseLineStringTextList_();if(this.match(3))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parseMultiPointText_",value:function(){var t;if(this.match(2)){if(t=2==this.token_.type?this.parsePointTextList_():this.parsePointList_(),this.match(3))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parseMultiLineStringText_",value:function(){if(this.match(2)){var t=this.parseLineStringTextList_();if(this.match(3))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parseMultiPolygonText_",value:function(){if(this.match(2)){var t=this.parsePolygonTextList_();if(this.match(3))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parsePoint_",value:function(){for(var t=[],e=this.layout_.length,n=0;n<e;++n){var r=this.token_;if(!this.match(4))break;t.push(r.value)}if(t.length==e)return t;throw new Error(this.formatErrorMessage_())}},{key:"parsePointList_",value:function(){for(var t=[this.parsePoint_()];this.match(5);)t.push(this.parsePoint_());return t}},{key:"parsePointTextList_",value:function(){for(var t=[this.parsePointText_()];this.match(5);)t.push(this.parsePointText_());return t}},{key:"parseLineStringTextList_",value:function(){for(var t=[this.parseLineStringText_()];this.match(5);)t.push(this.parseLineStringText_());return t}},{key:"parsePolygonTextList_",value:function(){for(var t=[this.parsePolygonText_()];this.match(5);)t.push(this.parsePolygonText_());return t}},{key:"isEmptyGeometry_",value:function(){var t=this.isTokenType(1)&&this.token_.value==ue;return t&&this.consume_(),t}},{key:"formatErrorMessage_",value:function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"}},{key:"parseGeometry_",value:function(){var t=this.factory,e=function(t){return r(G,f(t))},n=function(n){var r=n.map(function(n){return t.createLinearRing(n.map(e))});return r.length>1?t.createPolygon(r[0],r.slice(1)):t.createPolygon(r[0])},i=this.token_;if(this.match(1)){var o=i.value;if(this.layout_=this.parseGeometryLayout_(),"GEOMETRYCOLLECTION"==o){var s=this.parseGeometryCollectionText_();return t.createGeometryCollection(s)}switch(o){case"POINT":var a=this.parsePointText_();return a?t.createPoint(r(G,f(a))):t.createPoint();case"LINESTRING":var u=this.parseLineStringText_().map(e);return t.createLineString(u);case"LINEARRING":var l=this.parseLineStringText_().map(e);return t.createLinearRing(l);case"POLYGON":var c=this.parsePolygonText_();return c&&0!==c.length?n(c):t.createPolygon();case"MULTIPOINT":var h=this.parseMultiPointText_();if(!h||0===h.length)return t.createMultiPoint();var A=h.map(e).map(function(e){return t.createPoint(e)});return t.createMultiPoint(A);case"MULTILINESTRING":var d=this.parseMultiLineStringText_().map(function(n){return t.createLineString(n.map(e))});return t.createMultiLineString(d);case"MULTIPOLYGON":var p=this.parseMultiPolygonText_();if(!p||0===p.length)return t.createMultiPolygon();var g=p.map(n);return t.createMultiPolygon(g);default:throw new Error("Invalid geometry type: "+o)}}throw new Error(this.formatErrorMessage_())}}]);function Ae(t){if(t.isEmpty())return"";var e=t.getCoordinate(),n=[e.x,e.y];return void 0===e.z||Number.isNaN(e.z)||n.push(e.z),void 0===e.m||Number.isNaN(e.m)||n.push(e.m),n.join(" ")}function fe(t){for(var e=t.getCoordinates().map(function(t){var e=[t.x,t.y];return void 0===t.z||Number.isNaN(t.z)||e.push(t.z),void 0===t.m||Number.isNaN(t.m)||e.push(t.m),e}),n=[],r=0,i=e.length;r<i;++r)n.push(e[r].join(" "));return n.join(", ")}function de(t){var e=[];e.push("("+fe(t.getExteriorRing())+")");for(var n=0,r=t.getNumInteriorRing();n<r;++n)e.push("("+fe(t.getInteriorRingN(n))+")");return e.join(", ")}var pe={Point:Ae,LineString:fe,LinearRing:fe,Polygon:de,MultiPoint:function(t){for(var e=[],n=0,r=t.getNumGeometries();n<r;++n)e.push("("+Ae(t.getGeometryN(n))+")");return e.join(", ")},MultiLineString:function(t){for(var e=[],n=0,r=t.getNumGeometries();n<r;++n)e.push("("+fe(t.getGeometryN(n))+")");return e.join(", ")},MultiPolygon:function(t){for(var e=[],n=0,r=t.getNumGeometries();n<r;++n)e.push("("+de(t.getGeometryN(n))+")");return e.join(", ")},GeometryCollection:function(t){for(var e=[],n=0,r=t.getNumGeometries();n<r;++n)e.push(ge(t.getGeometryN(n)));return e.join(", ")}};function ge(t){var e=t.getGeometryType(),n=pe[e];e=e.toUpperCase();var r=function(t){var e="";if(t.isEmpty())return e;var n=t.getCoordinate();return void 0===n.z||Number.isNaN(n.z)||(e+="Z"),void 0===n.m||Number.isNaN(n.m)||(e+="M"),e}(t);return r.length>0&&(e+=" "+r),t.isEmpty()?e+" "+ue:e+" ("+n(t)+")"}var me=o(function t(e){n(this,t),this.geometryFactory=e||new oe,this.precisionModel=this.geometryFactory.getPrecisionModel()},[{key:"read",value:function(t){var e=new ce(t);return new he(e,this.geometryFactory).parse()}},{key:"write",value:function(t){return ge(t)}}]),ye=o(function t(e){n(this,t),this.parser=new me(e)},[{key:"write",value:function(t){return this.parser.write(t)}}],[{key:"toLineString",value:function(t,e){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"}}]),ve=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"getIndexAlongSegment",value:function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]}},{key:"getTopologySummary",value:function(){var t=new Jt;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()}},{key:"computeIntersection",value:function(t,e,n,r){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=r,this._result=this.computeIntersect(t,e,n,r)}},{key:"getIntersectionNum",value:function(){return this._result}},{key:"computeIntLineIndex",value:function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var t=arguments[0];this.getEdgeDistance(t,0)>this.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}}},{key:"isProper",value:function(){return this.hasIntersection()&&this._isProper}},{key:"setPrecisionModel",value:function(t){this._precisionModel=t}},{key:"isInteriorIntersection",value:function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;e<this._result;e++)if(!this._intPt[e].equals2D(this._inputLines[t][0])&&!this._intPt[e].equals2D(this._inputLines[t][1]))return!0;return!1}}},{key:"getIntersection",value:function(t){return this._intPt[t]}},{key:"isEndPoint",value:function(){return this.hasIntersection()&&!this._isProper}},{key:"hasIntersection",value:function(){return this._result!==t.NO_INTERSECTION}},{key:"getEdgeDistance",value:function(e,n){return t.computeEdgeDistance(this._intPt[n],this._inputLines[e][0],this._inputLines[e][1])}},{key:"isCollinear",value:function(){return this._result===t.COLLINEAR_INTERSECTION}},{key:"toString",value:function(){return ye.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+ye.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()}},{key:"getEndpoint",value:function(t,e){return this._inputLines[t][e]}},{key:"isIntersection",value:function(t){for(var e=0;e<this._result;e++)if(this._intPt[e].equals2D(t))return!0;return!1}},{key:"getIntersectionAlongSegment",value:function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]}}],[{key:"constructor_",value:function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new G,this._intPt[1]=new G,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0}},{key:"computeEdgeDistance",value:function(t,e,n){var r=Math.abs(n.x-e.x),i=Math.abs(n.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(n))o=r>i?r:i;else{var s=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);0!==(o=r>i?s:a)||t.equals(e)||(o=Math.max(s,a))}return F.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o}},{key:"nonRobustComputeEdgeDistance",value:function(t,e,n){var r=t.x-e.x,i=t.y-e.y,o=Math.sqrt(r*r+i*i);return F.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o}}])}();ve.DONT_INTERSECT=0,ve.DO_INTERSECT=1,ve.COLLINEAR=2,ve.NO_INTERSECTION=0,ve.POINT_INTERSECTION=1,ve.COLLINEAR_INTERSECTION=2;var _e=function(t){function r(){return n(this,r),e(this,r)}return l(r,t),o(r,[{key:"isInSegmentEnvelopes",value:function(t){var e=new V(this._inputLines[0][0],this._inputLines[0][1]),n=new V(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)}},{key:"computeIntersection",value:function(){if(3!==arguments.length)return A(r,"computeIntersection",this,1).apply(this,arguments);var t=arguments[0],e=arguments[1],n=arguments[2];if(this._isProper=!1,V.intersects(e,n,t)&&0===ct.index(e,n,t)&&0===ct.index(n,e,t))return this._isProper=!0,(t.equals(e)||t.equals(n))&&(this._isProper=!1),this._result=ve.POINT_INTERSECTION,null;this._result=ve.NO_INTERSECTION}},{key:"intersection",value:function(t,e,n,i){var o=this.intersectionSafe(t,e,n,i);return this.isInSegmentEnvelopes(o)||(o=new G(r.nearestEndpoint(t,e,n,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o}},{key:"checkDD",value:function(t,e,n,r,i){var o=ut.intersection(t,e,n,r),s=this.isInSegmentEnvelopes(o);yt.out.println("DD in env = "+s+" --------------------- "+o),i.distance(o)>1e-4&&yt.out.println("Distance = "+i.distance(o))}},{key:"intersectionSafe",value:function(t,e,n,i){var o=mt.intersection(t,e,n,i);return null===o&&(o=r.nearestEndpoint(t,e,n,i)),o}},{key:"computeCollinearIntersection",value:function(t,e,n,r){var i=V.intersects(t,e,n),o=V.intersects(t,e,r),s=V.intersects(n,r,t),a=V.intersects(n,r,e);return i&&o?(this._intPt[0]=n,this._intPt[1]=r,ve.COLLINEAR_INTERSECTION):s&&a?(this._intPt[0]=t,this._intPt[1]=e,ve.COLLINEAR_INTERSECTION):i&&s?(this._intPt[0]=n,this._intPt[1]=t,!n.equals(t)||o||a?ve.COLLINEAR_INTERSECTION:ve.POINT_INTERSECTION):i&&a?(this._intPt[0]=n,this._intPt[1]=e,!n.equals(e)||o||s?ve.COLLINEAR_INTERSECTION:ve.POINT_INTERSECTION):o&&s?(this._intPt[0]=r,this._intPt[1]=t,!r.equals(t)||i||a?ve.COLLINEAR_INTERSECTION:ve.POINT_INTERSECTION):o&&a?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||i||s?ve.COLLINEAR_INTERSECTION:ve.POINT_INTERSECTION):ve.NO_INTERSECTION}},{key:"computeIntersect",value:function(t,e,n,r){if(this._isProper=!1,!V.intersects(t,e,n,r))return ve.NO_INTERSECTION;var i=ct.index(t,e,n),o=ct.index(t,e,r);if(i>0&&o>0||i<0&&o<0)return ve.NO_INTERSECTION;var s=ct.index(n,r,t),a=ct.index(n,r,e);return s>0&&a>0||s<0&&a<0?ve.NO_INTERSECTION:0===i&&0===o&&0===s&&0===a?this.computeCollinearIntersection(t,e,n,r):(0===i||0===o||0===s||0===a?(this._isProper=!1,t.equals2D(n)||t.equals2D(r)?this._intPt[0]=t:e.equals2D(n)||e.equals2D(r)?this._intPt[0]=e:0===i?this._intPt[0]=new G(n):0===o?this._intPt[0]=new G(r):0===s?this._intPt[0]=new G(t):0===a&&(this._intPt[0]=new G(e))):(this._isProper=!0,this._intPt[0]=this.intersection(t,e,n,r)),ve.POINT_INTERSECTION)}}],[{key:"nearestEndpoint",value:function(t,e,n,r){var i=t,o=_t.pointToSegment(t,n,r),s=_t.pointToSegment(e,n,r);return s<o&&(o=s,i=e),(s=_t.pointToSegment(n,t,e))<o&&(o=s,i=n),(s=_t.pointToSegment(r,t,e))<o&&(o=s,i=r),i}}])}(ve),be=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"countSegment",value:function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,r=e.x;return n>r&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=ct.index(t,e,this._p);if(i===ct.COLLINEAR)return this._isPointOnSegment=!0,null;e.y<t.y&&(i=-i),i===ct.LEFT&&this._crossingCount++}}},{key:"isPointInPolygon",value:function(){return this.getLocation()!==q.EXTERIOR}},{key:"getLocation",value:function(){return this._isPointOnSegment?q.BOUNDARY:this._crossingCount%2==1?q.INTERIOR:q.EXTERIOR}},{key:"isOnSegment",value:function(){return this._isPointOnSegment}}],[{key:"constructor_",value:function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t}},{key:"locatePointInRing",value:function(){if(arguments[0]instanceof G&&rt(arguments[1],lt)){for(var e=arguments[1],n=new t(arguments[0]),r=new G,i=new G,o=1;o<e.size();o++)if(e.getCoordinate(o,r),e.getCoordinate(o-1,i),n.countSegment(r,i),n.isOnSegment())return n.getLocation();return n.getLocation()}if(arguments[0]instanceof G&&arguments[1]instanceof Array){for(var s=arguments[1],a=new t(arguments[0]),u=1;u<s.length;u++){var l=s[u],c=s[u-1];if(a.countSegment(l,c),a.isOnSegment())return a.getLocation()}return a.getLocation()}}}])}(),we=function(){function t(){n(this,t)}return o(t,null,[{key:"isOnLine",value:function(){if(arguments[0]instanceof G&&rt(arguments[1],lt)){for(var t=arguments[0],e=arguments[1],n=new _e,r=new G,i=new G,o=e.size(),s=1;s<o;s++)if(e.getCoordinate(s-1,r),e.getCoordinate(s,i),n.computeIntersection(t,r,i),n.hasIntersection())return!0;return!1}if(arguments[0]instanceof G&&arguments[1]instanceof Array){for(var a=arguments[0],u=arguments[1],l=new _e,c=1;c<u.length;c++){var h=u[c-1],A=u[c];if(l.computeIntersection(a,h,A),l.hasIntersection())return!0}return!1}}},{key:"locateInRing",value:function(t,e){return be.locatePointInRing(t,e)}},{key:"isInRing",value:function(e,n){return t.locateInRing(e,n)!==q.EXTERIOR}}])}(),Ee=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"setAllLocations",value:function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t}},{key:"isNull",value:function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==q.NONE)return!1;return!0}},{key:"setAllLocationsIfNull",value:function(t){for(var e=0;e<this.location.length;e++)this.location[e]===q.NONE&&(this.location[e]=t)}},{key:"isLine",value:function(){return 1===this.location.length}},{key:"merge",value:function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[K.ON]=this.location[K.ON],e[K.LEFT]=q.NONE,e[K.RIGHT]=q.NONE,this.location=e}for(var n=0;n<this.location.length;n++)this.location[n]===q.NONE&&n<t.location.length&&(this.location[n]=t.location[n])}},{key:"getLocations",value:function(){return this.location}},{key:"flip",value:function(){if(this.location.length<=1)return null;var t=this.location[K.LEFT];this.location[K.LEFT]=this.location[K.RIGHT],this.location[K.RIGHT]=t}},{key:"toString",value:function(){var t=new it;return this.location.length>1&&t.append(q.toLocationSymbol(this.location[K.LEFT])),t.append(q.toLocationSymbol(this.location[K.ON])),this.location.length>1&&t.append(q.toLocationSymbol(this.location[K.RIGHT])),t.toString()}},{key:"setLocations",value:function(t,e,n){this.location[K.ON]=t,this.location[K.LEFT]=e,this.location[K.RIGHT]=n}},{key:"get",value:function(t){return t<this.location.length?this.location[t]:q.NONE}},{key:"isArea",value:function(){return this.location.length>1}},{key:"isAnyNull",value:function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===q.NONE)return!0;return!1}},{key:"setLocation",value:function(){if(1===arguments.length){var t=arguments[0];this.setLocation(K.ON,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.location[e]=n}}},{key:"init",value:function(t){this.location=new Array(t).fill(null),this.setAllLocations(q.NONE)}},{key:"isEqualOnSide",value:function(t,e){return this.location[e]===t.location[e]}},{key:"allPositionsEqual",value:function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0}}],[{key:"constructor_",value:function(){if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[K.ON]=n}else if(arguments[0]instanceof t){var r=arguments[0];if(this.init(r.location.length),null!==r)for(var i=0;i<this.location.length;i++)this.location[i]=r.location[i]}}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this.init(3),this.location[K.ON]=o,this.location[K.LEFT]=s,this.location[K.RIGHT]=a}}}])}(),xe=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"getGeometryCount",value:function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t}},{key:"setAllLocations",value:function(t,e){this.elt[t].setAllLocations(e)}},{key:"isNull",value:function(t){return this.elt[t].isNull()}},{key:"setAllLocationsIfNull",value:function(){if(1===arguments.length){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}}},{key:"isLine",value:function(t){return this.elt[t].isLine()}},{key:"merge",value:function(t){for(var e=0;e<2;e++)null===this.elt[e]&&null!==t.elt[e]?this.elt[e]=new Ee(t.elt[e]):this.elt[e].merge(t.elt[e])}},{key:"flip",value:function(){this.elt[0].flip(),this.elt[1].flip()}},{key:"getLocation",value:function(){if(1===arguments.length){var t=arguments[0];return this.elt[t].get(K.ON)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}}},{key:"toString",value:function(){var t=new it;return null!==this.elt[0]&&(t.append("A:"),t.append(this.elt[0].toString())),null!==this.elt[1]&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()}},{key:"isArea",value:function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var t=arguments[0];return this.elt[t].isArea()}}},{key:"isAnyNull",value:function(t){return this.elt[t].isAnyNull()}},{key:"setLocation",value:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(K.ON,e)}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this.elt[n].setLocation(r,i)}}},{key:"isEqualOnSide",value:function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)}},{key:"allPositionsEqual",value:function(t,e){return this.elt[t].allPositionsEqual(e)}},{key:"toLine",value:function(t){this.elt[t].isArea()&&(this.elt[t]=new Ee(this.elt[t].location[0]))}}],[{key:"constructor_",value:function(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new Ee(e),this.elt[1]=new Ee(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.elt[0]=new Ee(n.elt[0]),this.elt[1]=new Ee(n.elt[1])}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.elt[0]=new Ee(q.NONE),this.elt[1]=new Ee(q.NONE),this.elt[r].setLocation(i)}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this.elt[0]=new Ee(o,s,a),this.elt[1]=new Ee(o,s,a)}else if(4===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2],h=arguments[3];this.elt[0]=new Ee(q.NONE,q.NONE,q.NONE),this.elt[1]=new Ee(q.NONE,q.NONE,q.NONE),this.elt[u].setLocations(l,c,h)}}},{key:"toLineLabel",value:function(e){for(var n=new t(q.NONE),r=0;r<2;r++)n.setLocation(r,e.getLocation(r));return n}}])}(),Se=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"computeRing",value:function(){if(null!==this._ring)return null;for(var t=new Array(this._pts.size()).fill(null),e=0;e<this._pts.size();e++)t[e]=this._pts.get(e);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=ct.isCCW(this._ring.getCoordinates())}},{key:"isIsolated",value:function(){return 1===this._label.getGeometryCount()}},{key:"computePoints",value:function(t){this._startDe=t;var e=t,n=!0;do{if(null===e)throw new At("Found null DirectedEdge");if(e.getEdgeRing()===this)throw new At("Directed Edge visited twice during ring-building at "+e.getCoordinate());this._edges.add(e);var r=e.getLabel();F.isTrue(r.isArea()),this.mergeLabel(r),this.addPoints(e.getEdge(),e.isForward(),n),n=!1,this.setEdgeRing(e,this),e=this.getNext(e)}while(e!==this._startDe)}},{key:"getLinearRing",value:function(){return this._ring}},{key:"getCoordinate",value:function(t){return this._pts.get(t)}},{key:"computeMaxNodeDegree",value:function(){this._maxNodeDegree=0;var t=this._startDe;do{var e=t.getNode().getEdges().getOutgoingDegree(this);e>this._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2}},{key:"addPoints",value:function(t,e,n){var r=t.getCoordinates();if(e){var i=1;n&&(i=0);for(var o=i;o<r.length;o++)this._pts.add(r[o])}else{var s=r.length-2;n&&(s=r.length-1);for(var a=s;a>=0;a--)this._pts.add(r[a])}}},{key:"isHole",value:function(){return this._isHole}},{key:"setInResult",value:function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)}},{key:"containsPoint",value:function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!we.isInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(t))return!1;return!0}},{key:"addHole",value:function(t){this._holes.add(t)}},{key:"isShell",value:function(){return null===this._shell}},{key:"getLabel",value:function(){return this._label}},{key:"getEdges",value:function(){return this._edges}},{key:"getMaxNodeDegree",value:function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree}},{key:"getShell",value:function(){return this._shell}},{key:"mergeLabel",value:function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[1],n=arguments[0].getLocation(e,K.RIGHT);if(n===q.NONE)return null;if(this._label.getLocation(e)===q.NONE)return this._label.setLocation(e,n),null}}},{key:"setShell",value:function(t){this._shell=t,null!==t&&t.addHole(this)}},{key:"toPolygon",value:function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n<this._holes.size();n++)e[n]=this._holes.get(n).getLinearRing();return t.createPolygon(this.getLinearRing(),e)}}],[{key:"constructor_",value:function(){if(this._startDe=null,this._maxNodeDegree=-1,this._edges=new dt,this._pts=new dt,this._label=new xe(q.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new dt,this._geometryFactory=null,0===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()}}}]),Te=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"setEdgeRing",value:function(t,e){t.setMinEdgeRing(e)}},{key:"getNext",value:function(t){return t.getNextMin()}}],[{key:"constructor_",value:function(){var t=arguments[0],e=arguments[1];Se.constructor_.call(this,t,e)}}])}(Se),Pe=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"buildMinimalRings",value:function(){var t=new dt,e=this._startDe;do{if(null===e.getMinEdgeRing()){var n=new Te(e,this._geometryFactory);t.add(n)}e=e.getNext()}while(e!==this._startDe);return t}},{key:"setEdgeRing",value:function(t,e){t.setEdgeRing(e)}},{key:"linkDirectedEdgesForMinimalEdgeRings",value:function(){var t=this._startDe;do{t.getNode().getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this._startDe)}},{key:"getNext",value:function(t){return t.getNext()}}],[{key:"constructor_",value:function(){var t=arguments[0],e=arguments[1];Se.constructor_.call(this,t,e)}}])}(Se),Ce=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"setVisited",value:function(t){this._isVisited=t}},{key:"setInResult",value:function(t){this._isInResult=t}},{key:"isCovered",value:function(){return this._isCovered}},{key:"isCoveredSet",value:function(){return this._isCoveredSet}},{key:"setLabel",value:function(t){this._label=t}},{key:"getLabel",value:function(){return this._label}},{key:"setCovered",value:function(t){this._isCovered=t,this._isCoveredSet=!0}},{key:"updateIM",value:function(t){F.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)}},{key:"isInResult",value:function(){return this._isInResult}},{key:"isVisited",value:function(){return this._isVisited}}],[{key:"constructor_",value:function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._label=t}}}]),Me=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"isIncidentEdgeInResult",value:function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1}},{key:"isIsolated",value:function(){return 1===this._label.getGeometryCount()}},{key:"getCoordinate",value:function(){return this._coord}},{key:"print",value:function(t){t.println("node "+this._coord+" lbl: "+this._label)}},{key:"computeIM",value:function(t){}},{key:"computeMergedLocation",value:function(t,e){var n=q.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var r=t.getLocation(e);n!==q.BOUNDARY&&(n=r)}return n}},{key:"setLabel",value:function(){if(2!==arguments.length||!Number.isInteger(arguments[1])||!Number.isInteger(arguments[0]))return A(r,"setLabel",this,1).apply(this,arguments);var t=arguments[0],e=arguments[1];null===this._label?this._label=new xe(t,e):this._label.setLocation(t,e)}},{key:"getEdges",value:function(){return this._edges}},{key:"mergeLabel",value:function(){if(arguments[0]instanceof r){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof xe)for(var e=arguments[0],n=0;n<2;n++){var i=this.computeMergedLocation(e,n);this._label.getLocation(n)===q.NONE&&this._label.setLocation(n,i)}}},{key:"add",value:function(t){this._edges.insert(t),t.setNode(this)}},{key:"setLabelBoundary",value:function(t){if(null===this._label)return null;var e=q.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case q.BOUNDARY:n=q.INTERIOR;break;case q.INTERIOR:default:n=q.BOUNDARY}this._label.setLocation(t,n)}}],[{key:"constructor_",value:function(){this._coord=null,this._edges=null;var t=arguments[0],e=arguments[1];this._coord=t,this._edges=e,this._label=new xe(0,q.NONE)}}])}(Ce),Ie=function(t){function r(){return n(this,r),e(this,r,arguments)}return l(r,t),o(r)}(te);function Oe(t){return null==t?0:t.color}function Re(t){return null==t?null:t.parent}function Le(t,e){null!==t&&(t.color=e)}function Be(t){return null==t?null:t.left}function ke(t){return null==t?null:t.right}var Ne=function(t){function r(){var t;return n(this,r),(t=e(this,r)).root_=null,t.size_=0,t}return l(r,t),o(r,[{key:"get",value:function(t){for(var e=this.root_;null!==e;){var n=t.compareTo(e.key);if(n<0)e=e.left;else{if(!(n>0))return e.value;e=e.right}}return null}},{key:"put",value:function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:0,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,r,i=this.root_;do{if(n=i,(r=t.compareTo(i.key))<0)i=i.left;else{if(!(r>0)){var o=i.value;return i.value=e,o}i=i.right}}while(null!==i);var s={key:t,left:null,right:null,value:e,parent:n,color:0,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null}},{key:"fixAfterInsertion",value:function(t){var e;for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)Re(t)===Be(Re(Re(t)))?1===Oe(e=ke(Re(Re(t))))?(Le(Re(t),0),Le(e,0),Le(Re(Re(t)),1),t=Re(Re(t))):(t===ke(Re(t))&&(t=Re(t),this.rotateLeft(t)),Le(Re(t),0),Le(Re(Re(t)),1),this.rotateRight(Re(Re(t)))):1===Oe(e=Be(Re(Re(t))))?(Le(Re(t),0),Le(e,0),Le(Re(Re(t)),1),t=Re(Re(t))):(t===Be(Re(t))&&(t=Re(t),this.rotateRight(t)),Le(Re(t),0),Le(Re(Re(t)),1),this.rotateLeft(Re(Re(t))));this.root_.color=0}},{key:"values",value:function(){var t=new dt,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=r.successor(e));)t.add(e.value);return t}},{key:"entrySet",value:function(){var t=new J,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=r.successor(e));)t.add(e);return t}},{key:"rotateLeft",value:function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null==t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}}},{key:"rotateRight",value:function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null==t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}}},{key:"getFirstEntry",value:function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t}},{key:"size",value:function(){return this.size_}},{key:"containsKey",value:function(t){for(var e=this.root_;null!==e;){var n=t.compareTo(e.key);if(n<0)e=e.left;else{if(!(n>0))return!0;e=e.right}}return!1}}],[{key:"successor",value:function(t){var e;if(null===t)return null;if(null!==t.right){for(e=t.right;null!==e.left;)e=e.left;return e}e=t.parent;for(var n=t;null!==e&&n===e.right;)n=e,e=e.parent;return e}}])}(Ie),Fe=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"find",value:function(t){return this.nodeMap.get(t)}},{key:"addNode",value:function(){if(arguments[0]instanceof G){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Me){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return null===r?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}}},{key:"print",value:function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)}},{key:"iterator",value:function(){return this.nodeMap.values().iterator()}},{key:"values",value:function(){return this.nodeMap.values()}},{key:"getBoundaryNodes",value:function(t){for(var e=new dt,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===q.BOUNDARY&&e.add(r)}return e}},{key:"add",value:function(t){var e=t.getCoordinate();this.addNode(e).add(t)}}],[{key:"constructor_",value:function(){this.nodeMap=new Ne,this.nodeFact=null;var t=arguments[0];this.nodeFact=t}}]),De=function(){function t(){n(this,t)}return o(t,null,[{key:"isNorthern",value:function(e){return e===t.NE||e===t.NW}},{key:"isOpposite",value:function(t,e){return t!==e&&2==(t-e+4)%4}},{key:"commonHalfPlane",value:function(t,e){if(t===e)return t;if(2==(t-e+4)%4)return-1;var n=t<e?t:e;return 0===n&&3===(t>e?t:e)?3:n}},{key:"isInHalfPlane",value:function(e,n){return n===t.SE?e===t.SE||e===t.SW:e===n||e===n+1}},{key:"quadrant",value:function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var e=arguments[0],n=arguments[1];if(0===e&&0===n)throw new v("Cannot compute the quadrant for point ( "+e+", "+n+" )");return e>=0?n>=0?t.NE:t.SE:n>=0?t.NW:t.SW}if(arguments[0]instanceof G&&arguments[1]instanceof G){var r=arguments[0],i=arguments[1];if(i.x===r.x&&i.y===r.y)throw new v("Cannot compute the quadrant for two identical points "+r);return i.x>=r.x?i.y>=r.y?t.NE:t.SE:i.y>=r.y?t.NW:t.SW}}}])}();De.NE=0,De.NW=1,De.SW=2,De.SE=3;var je=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"compareDirection",value:function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:ct.index(t._p0,t._p1,this._p1)}},{key:"getDy",value:function(){return this._dy}},{key:"getCoordinate",value:function(){return this._p0}},{key:"setNode",value:function(t){this._node=t}},{key:"print",value:function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),r=n.lastIndexOf("."),i=n.substring(r+1);t.print(" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)}},{key:"compareTo",value:function(t){var e=t;return this.compareDirection(e)}},{key:"getDirectedCoordinate",value:function(){return this._p1}},{key:"getDx",value:function(){return this._dx}},{key:"getLabel",value:function(){return this._label}},{key:"getEdge",value:function(){return this._edge}},{key:"getQuadrant",value:function(){return this._quadrant}},{key:"getNode",value:function(){return this._node}},{key:"toString",value:function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf(".");return" "+e.substring(n+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label}},{key:"computeLabel",value:function(t){}},{key:"init",value:function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=De.quadrant(this._dx,this._dy),F.isTrue(!(0===this._dx&&0===this._dy),"EdgeEnd with identical endpoints found")}},{key:"interfaces_",get:function(){return[b]}}],[{key:"constructor_",value:function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var e=arguments[0];this._edge=e}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];t.constructor_.call(this,n,r,i,null)}else if(4===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2],u=arguments[3];t.constructor_.call(this,o),this.init(s,a),this._label=u}}}])}(),Ue=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"getNextMin",value:function(){return this._nextMin}},{key:"getDepth",value:function(t){return this._depth[t]}},{key:"setVisited",value:function(t){this._isVisited=t}},{key:"computeDirectedLabel",value:function(){this._label=new xe(this._edge.getLabel()),this._isForward||this._label.flip()}},{key:"getNext",value:function(){return this._next}},{key:"setDepth",value:function(t,e){if(-999!==this._depth[t]&&this._depth[t]!==e)throw new At("assigned depths do not match",this.getCoordinate());this._depth[t]=e}},{key:"isInteriorAreaEdge",value:function(){for(var t=!0,e=0;e<2;e++)this._label.isArea(e)&&this._label.getLocation(e,K.LEFT)===q.INTERIOR&&this._label.getLocation(e,K.RIGHT)===q.INTERIOR||(t=!1);return t}},{key:"setNextMin",value:function(t){this._nextMin=t}},{key:"print",value:function(t){A(r,"print",this,1).call(this,t),t.print(" "+this._depth[K.LEFT]+"/"+this._depth[K.RIGHT]),t.print(" ("+this.getDepthDelta()+")"),this._isInResult&&t.print(" inResult")}},{key:"setMinEdgeRing",value:function(t){this._minEdgeRing=t}},{key:"isLineEdge",value:function(){var t=this._label.isLine(0)||this._label.isLine(1),e=!this._label.isArea(0)||this._label.allPositionsEqual(0,q.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,q.EXTERIOR);return t&&e&&n}},{key:"setEdgeRing",value:function(t){this._edgeRing=t}},{key:"getMinEdgeRing",value:function(){return this._minEdgeRing}},{key:"getDepthDelta",value:function(){var t=this._edge.getDepthDelta();return this._isForward||(t=-t),t}},{key:"setInResult",value:function(t){this._isInResult=t}},{key:"getSym",value:function(){return this._sym}},{key:"isForward",value:function(){return this._isForward}},{key:"getEdge",value:function(){return this._edge}},{key:"printEdge",value:function(t){this.print(t),t.print(" "),this._isForward?this._edge.print(t):this._edge.printReverse(t)}},{key:"setSym",value:function(t){this._sym=t}},{key:"setVisitedEdge",value:function(t){this.setVisited(t),this._sym.setVisited(t)}},{key:"setEdgeDepths",value:function(t,e){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var r=1;t===K.LEFT&&(r=-1);var i=K.opposite(t),o=e+n*r;this.setDepth(t,e),this.setDepth(i,o)}},{key:"getEdgeRing",value:function(){return this._edgeRing}},{key:"isInResult",value:function(){return this._isInResult}},{key:"setNext",value:function(t){this._next=t}},{key:"isVisited",value:function(){return this._isVisited}}],[{key:"constructor_",value:function(){this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999];var t=arguments[0],e=arguments[1];if(je.constructor_.call(this,t),this._isForward=e,e)this.init(t.getCoordinate(0),t.getCoordinate(1));else{var n=t.getNumPoints()-1;this.init(t.getCoordinate(n),t.getCoordinate(n-1))}this.computeDirectedLabel()}},{key:"depthFactor",value:function(t,e){return t===q.EXTERIOR&&e===q.INTERIOR?1:t===q.INTERIOR&&e===q.EXTERIOR?-1:0}}])}(je),Ge=o(function t(){n(this,t)},[{key:"createNode",value:function(t){return new Me(t,null)}}]),ze=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"printEdges",value:function(t){t.println("Edges:");for(var e=0;e<this._edges.size();e++){t.println("edge "+e+":");var n=this._edges.get(e);n.print(t),n.eiList.print(t)}}},{key:"find",value:function(t){return this._nodes.find(t)}},{key:"addNode",value:function(){if(arguments[0]instanceof Me){var t=arguments[0];return this._nodes.addNode(t)}if(arguments[0]instanceof G){var e=arguments[0];return this._nodes.addNode(e)}}},{key:"getNodeIterator",value:function(){return this._nodes.iterator()}},{key:"linkResultDirectedEdges",value:function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkResultDirectedEdges()}},{key:"debugPrintln",value:function(t){yt.out.println(t)}},{key:"isBoundaryNode",value:function(t,e){var n=this._nodes.find(e);if(null===n)return!1;var r=n.getLabel();return null!==r&&r.getLocation(t)===q.BOUNDARY}},{key:"linkAllDirectedEdges",value:function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkAllDirectedEdges()}},{key:"matchInSameDirection",value:function(t,e,n,r){return!!t.equals(n)&&ct.index(t,e,r)===ct.COLLINEAR&&De.quadrant(t,e)===De.quadrant(n,r)}},{key:"getEdgeEnds",value:function(){return this._edgeEndList}},{key:"debugPrint",value:function(t){yt.out.print(t)}},{key:"getEdgeIterator",value:function(){return this._edges.iterator()}},{key:"findEdgeInSameDirection",value:function(t,e){for(var n=0;n<this._edges.size();n++){var r=this._edges.get(n),i=r.getCoordinates();if(this.matchInSameDirection(t,e,i[0],i[1]))return r;if(this.matchInSameDirection(t,e,i[i.length-1],i[i.length-2]))return r}return null}},{key:"insertEdge",value:function(t){this._edges.add(t)}},{key:"findEdgeEnd",value:function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null}},{key:"addEdges",value:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this._edges.add(n);var r=new Ue(n,!0),i=new Ue(n,!1);r.setSym(i),i.setSym(r),this.add(r),this.add(i)}}},{key:"add",value:function(t){this._nodes.add(t),this._edgeEndList.add(t)}},{key:"getNodes",value:function(){return this._nodes.values()}},{key:"findEdge",value:function(t,e){for(var n=0;n<this._edges.size();n++){var r=this._edges.get(n),i=r.getCoordinates();if(t.equals(i[0])&&e.equals(i[1]))return r}return null}}],[{key:"constructor_",value:function(){if(this._edges=new dt,this._nodes=null,this._edgeEndList=new dt,0===arguments.length)this._nodes=new Fe(new Ge);else if(1===arguments.length){var t=arguments[0];this._nodes=new Fe(t)}}},{key:"linkResultDirectedEdges",value:function(t){for(var e=t.iterator();e.hasNext();)e.next().getEdges().linkResultDirectedEdges()}}]),Ve=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"sortShellsAndHoles",value:function(t,e,n){for(var r=t.iterator();r.hasNext();){var i=r.next();i.isHole()?n.add(i):e.add(i)}}},{key:"computePolygons",value:function(t){for(var e=new dt,n=t.iterator();n.hasNext();){var r=n.next().toPolygon(this._geometryFactory);e.add(r)}return e}},{key:"placeFreeHoles",value:function(e,n){for(var r=n.iterator();r.hasNext();){var i=r.next();if(null===i.getShell()){var o=t.findEdgeRingContaining(i,e);if(null===o)throw new At("unable to assign hole to a shell",i.getCoordinate(0));i.setShell(o)}}}},{key:"buildMinimalEdgeRings",value:function(t,e,n){for(var r=new dt,i=t.iterator();i.hasNext();){var o=i.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var s=o.buildMinimalRings(),a=this.findShell(s);null!==a?(this.placePolygonHoles(a,s),e.add(a)):n.addAll(s)}else r.add(o)}return r}},{key:"buildMaximalEdgeRings",value:function(t){for(var e=new dt,n=t.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&null===r.getEdgeRing()){var i=new Pe(r,this._geometryFactory);e.add(i),i.setInResult()}}return e}},{key:"placePolygonHoles",value:function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}}},{key:"getPolygons",value:function(){return this.computePolygons(this._shellList)}},{key:"findShell",value:function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,e++)}return F.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n}},{key:"add",value:function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];ze.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new dt,o=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}}}],[{key:"constructor_",value:function(){this._geometryFactory=null,this._shellList=new dt;var t=arguments[0];this._geometryFactory=t}},{key:"findEdgeRingContaining",value:function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),o=null,s=null,a=e.iterator();a.hasNext();){var u=a.next(),l=u.getLinearRing(),c=l.getEnvelopeInternal();if(!c.equals(r)&&c.contains(r)){i=Xt.ptNotInList(n.getCoordinates(),l.getCoordinates());var h=!1;we.isInRing(i,l.getCoordinates())&&(h=!0),h&&(null===o||s.contains(c))&&(s=(o=u).getLinearRing().getEnvelopeInternal())}}return o}}])}(),He=o(function t(){n(this,t)},[{key:"getBounds",value:function(){}}]),qe=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"getItem",value:function(){return this._item}},{key:"getBounds",value:function(){return this._bounds}},{key:"interfaces_",get:function(){return[He,E]}}],[{key:"constructor_",value:function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e}}]),We=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"poll",value:function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t}},{key:"size",value:function(){return this._size}},{key:"reorder",value:function(t){for(var e=null,n=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(n)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,n)}},{key:"clear",value:function(){this._size=0,this._items.clear()}},{key:"peek",value:function(){return this.isEmpty()?null:this._items.get(1)}},{key:"isEmpty",value:function(){return 0===this._size}},{key:"add",value:function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)}}],[{key:"constructor_",value:function(){this._size=null,this._items=null,this._size=0,this._items=new dt,this._items.add(null)}}]),Xe=o(function t(){n(this,t)},[{key:"insert",value:function(t,e){}},{key:"remove",value:function(t,e){}},{key:"query",value:function(){}}]),Ye=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"getLevel",value:function(){return this._level}},{key:"size",value:function(){return this._childBoundables.size()}},{key:"getChildBoundables",value:function(){return this._childBoundables}},{key:"addChildBoundable",value:function(t){F.isTrue(null===this._bounds),this._childBoundables.add(t)}},{key:"isEmpty",value:function(){return this._childBoundables.isEmpty()}},{key:"getBounds",value:function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds}},{key:"interfaces_",get:function(){return[He,E]}}],[{key:"constructor_",value:function(){if(this._childBoundables=new dt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}}}]),Qe={reverseOrder:function(){return{compare:function(t,e){return e.compareTo(t)}}},min:function(t){return Qe.sort(t),t.get(0)},sort:function(t,e){var n=t.toArray();e?Lt.sort(n,e):Lt.sort(n);for(var r=t.iterator(),i=0,o=n.length;i<o;i++)r.next(),r.set(n[i])},singletonList:function(t){var e=new dt;return e.add(t),e}},Je=function(){function t(){n(this,t)}return o(t,null,[{key:"maxDistance",value:function(e,n,r,i,o,s,a,u){var l=t.distance(e,n,o,s);return l=Math.max(l,t.distance(e,n,a,u)),l=Math.max(l,t.distance(r,i,o,s)),Math.max(l,t.distance(r,i,a,u))}},{key:"distance",value:function(t,e,n,r){var i=n-t,o=r-e;return Math.sqrt(i*i+o*o)}},{key:"maximumDistance",value:function(e,n){var r=Math.min(e.getMinX(),n.getMinX()),i=Math.min(e.getMinY(),n.getMinY()),o=Math.max(e.getMaxX(),n.getMaxX()),s=Math.max(e.getMaxY(),n.getMaxY());return t.distance(r,i,o,s)}},{key:"minMaxDistance",value:function(e,n){var r=e.getMinX(),i=e.getMinY(),o=e.getMaxX(),s=e.getMaxY(),a=n.getMinX(),u=n.getMinY(),l=n.getMaxX(),c=n.getMaxY(),h=t.maxDistance(r,i,r,s,a,u,a,c);return h=Math.min(h,t.maxDistance(r,i,r,s,a,u,l,u)),h=Math.min(h,t.maxDistance(r,i,r,s,l,c,a,c)),h=Math.min(h,t.maxDistance(r,i,r,s,l,c,l,u)),h=Math.min(h,t.maxDistance(r,i,o,i,a,u,a,c)),h=Math.min(h,t.maxDistance(r,i,o,i,a,u,l,u)),h=Math.min(h,t.maxDistance(r,i,o,i,l,c,a,c)),h=Math.min(h,t.maxDistance(r,i,o,i,l,c,l,u)),h=Math.min(h,t.maxDistance(o,s,r,s,a,u,a,c)),h=Math.min(h,t.maxDistance(o,s,r,s,a,u,l,u)),h=Math.min(h,t.maxDistance(o,s,r,s,l,c,a,c)),h=Math.min(h,t.maxDistance(o,s,r,s,l,c,l,u)),h=Math.min(h,t.maxDistance(o,s,o,i,a,u,a,c)),h=Math.min(h,t.maxDistance(o,s,o,i,a,u,l,u)),h=Math.min(h,t.maxDistance(o,s,o,i,l,c,a,c)),Math.min(h,t.maxDistance(o,s,o,i,l,c,l,u))}}])}(),Ze=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"maximumDistance",value:function(){return Je.maximumDistance(this._boundable1.getBounds(),this._boundable2.getBounds())}},{key:"expandToQueue",value:function(e,n){var r=t.isComposite(this._boundable1),i=t.isComposite(this._boundable2);if(r&&i)return t.area(this._boundable1)>t.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,!1,e,n),null):(this.expand(this._boundable2,this._boundable1,!0,e,n),null);if(r)return this.expand(this._boundable1,this._boundable2,!1,e,n),null;if(i)return this.expand(this._boundable2,this._boundable1,!0,e,n),null;throw new v("neither boundable is composite")}},{key:"isLeaves",value:function(){return!(t.isComposite(this._boundable1)||t.isComposite(this._boundable2))}},{key:"compareTo",value:function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0}},{key:"expand",value:function(e,n,r,i,o){for(var s=e.getChildBoundables().iterator();s.hasNext();){var a=s.next(),u=null;(u=r?new t(n,a,this._itemDistance):new t(a,n,this._itemDistance)).getDistance()<o&&i.add(u)}}},{key:"getBoundable",value:function(t){return 0===t?this._boundable1:this._boundable2}},{key:"getDistance",value:function(){return this._distance}},{key:"distance",value:function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())}},{key:"interfaces_",get:function(){return[b]}}
2],[{key:"constructor_",value:function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()}},{key:"area",value:function(t){return t.getBounds().getArea()}},{key:"isComposite",value:function(t){return t instanceof Ye}}])}(),Ke=o(function t(){n(this,t)},[{key:"visitItem",value:function(t){}}]),$e=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"queryInternal",value:function(){if(rt(arguments[2],Ke)&&arguments[0]instanceof Object&&arguments[1]instanceof Ye)for(var t=arguments[0],e=arguments[2],n=arguments[1].getChildBoundables(),r=0;r<n.size();r++){var i=n.get(r);this.getIntersectsOp().intersects(i.getBounds(),t)&&(i instanceof Ye?this.queryInternal(t,i,e):i instanceof qe?e.visitItem(i.getItem()):F.shouldNeverReachHere())}else if(rt(arguments[2],et)&&arguments[0]instanceof Object&&arguments[1]instanceof Ye)for(var o=arguments[0],s=arguments[2],a=arguments[1].getChildBoundables(),u=0;u<a.size();u++){var l=a.get(u);this.getIntersectsOp().intersects(l.getBounds(),o)&&(l instanceof Ye?this.queryInternal(o,l,s):l instanceof qe?s.add(l.getItem()):F.shouldNeverReachHere())}}},{key:"getNodeCapacity",value:function(){return this._nodeCapacity}}
vendor: 4,120 bytes, line 2
2,{key:"lastNode",value:function(t){return t.get(t.size()-1)}},{key:"size",value:function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();n instanceof Ye?t+=this.size(n):n instanceof qe&&(t+=1)}return t}}},{key:"removeItem",value:function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof qe&&i.getItem()===e&&(n=i)}return null!==n&&(t.getChildBoundables().remove(n),!0)}},{key:"itemsTree",value:function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new dt:t}if(1===arguments.length){for(var e=arguments[0],n=new dt,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();if(i instanceof Ye){var o=this.itemsTree(i);null!==o&&n.add(o)}else i instanceof qe?n.add(i.getItem()):F.shouldNeverReachHere()}return n.size()<=0?null:n}}},{key:"insert",value:function(t,e){F.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new qe(t,e))}},{key:"boundablesAtLevel",value:function(){if(1===arguments.length){var t=arguments[0],e=new dt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];if(F.isTrue(n>-2),r.getLevel()===n)return i.add(r),null;for(var o=r.getChildBoundables().iterator();o.hasNext();){var s=o.next();s instanceof Ye?this.boundablesAtLevel(n,s,i):(F.isTrue(s instanceof qe),-1===n&&i.add(s))}return null}}},{key:"query",value:function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new dt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.queryInternal(t,this._root,e),e}if(2===arguments.length){var n=arguments[0],r=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.queryInternal(n,this._root,r)}}},{key:"build",value:function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0}},{key:"getRoot",value:function(){return this.build(),this._root}},{key:"remove",value:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.remove(t,this._root,e)}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=this.removeItem(r,i);if(o)return!0;for(var s=null,a=r.getChildBoundables().iterator();a.hasNext();){var u=a.next();if(this.getIntersectsOp().intersects(u.getBounds(),n)&&u instanceof Ye&&(o=this.remove(n,u,i))){s=u;break}}return null!==s&&s.getChildBoundables().isEmpty()&&r.getChildBoundables().remove(s),o}}},{key:"createHigherLevels",value:function(t,e){F.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,e+1)}},{key:"depth",value:function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();if(n instanceof Ye){var r=this.depth(n);r>t&&(t=r)}}return t+1}}},{key:"createParentBoundables",value:function(t,e){F.isTrue(!t.isEmpty());var n=new dt;n.add(this.createNode(e));var r=new dt(t);Qe.sort(r,this.getComparator());for(var i=r.iterator();i.hasNext();){var o=i.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n}},{key:"isEmpty",value:function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()}},{key:"interfaces_",get:function(){return[E]}}],[{key:"constructor_",value:function(){if(this._root=null,this._built=!1,this._itemBoundables=new dt,this._nodeCapacity=null,0===arguments.length)t.constructor_.call(this,t.DEFAULT_NODE_CAPACITY);else if(1===arguments.length){var e=arguments[0];F.isTrue(e>
21,"Node capacity must be greater than 1"),this._nodeCapacity=e}}},{key:"compareDoubles",value:function(t,e){return t>e?1:t<e?-1:0}}])}();$e.IntersectsOp=function(){},$e.DEFAULT_NODE_CAPACITY=10;var tn=o(function t(){n(this,t)},[{key:"distance",value:function(t,e){}}]),en=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"createParentBoundablesFromVerticalSlices",value:function(t,e){F.isTrue(t.length>0);for(var n=new dt,r=0;r<t.length;r++)n.addAll(this.createParentBoundablesFromVerticalSlice(t[r],e));return n}},{key:"nearestNeighbourK",value:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.nearestNeighbourK(t,L.POSITIVE_INFINITY,e)}if(3===arguments.length){var n=arguments[0],i=arguments[2],o=arguments[1],s=new We;s.add(n);for(var a=new We;!s.isEmpty()&&o>=0;){var u=s.poll(),l=u.getDistance();if(l>=o)break;u.isLeaves()?a.size()<i?a.add(u):(a.peek().getDistance()>l&&(a.poll(),a.add(u)),o=a.peek().getDistance()):u.expandToQueue(s,o)}return r.getItems(a)}}},{key:"createNode",value:function(t){return new nn(t)}},{key:"size",value:function(){return 0===arguments.length?A(r,"size",this,1).call(this):A(r,"size",this,1).apply(this,arguments)}},{key:"insert",value:function(){if(!(2===arguments.length&&arguments[1]instanceof Object&&arguments[0]instanceof V))return A(r,"insert",this,1).apply(this,arguments);var t=arguments[0],e=arguments[1];if(t.isNull())return null;A(r,"insert",this,1).call(this,t,e)}},{key:"getIntersectsOp",value:function(){return r.intersectsOp}},{key:"verticalSlices",value:function(t,e){for(var n=Math.trunc(Math.ceil(t.size()/e)),r=new Array(e).fill(null),i=t.iterator(),o=0;o<e;o++){r[o]=new dt;for(var s=0;i.hasNext()&&s<n;){var a=i.next();r[o].add(a),s++}}return r}},{key:"query",value:function(){if(1===arguments.length){var t=arguments[0];return A(r,"query",this,1).call(this,t)}if(2===arguments.length){var e=arguments[0],n=arguments[1];A(r,"query",this,1).call(this,e,n)}}},{key:"getComparator",value:function(){return r.yComparator}},{key:"createParentBoundablesFromVerticalSlice",value:function(t,e){return A(r,"createParentBoundables",this,1).call(this,t,e)}},{key:"remove",value:function(){if(2===arguments.length&&arguments[1]instanceof Object&&arguments[0]instanceof V){var t=arguments[0],e=arguments[1];return A(r,"remove",this,1).call(this,t,e)}return A(r,"remove",this,1).apply(this,arguments)}},{key:"depth",value:function(){return 0===arguments.length?A(r,"depth",this,1).call(this):A(r,"depth",this,1).apply(this,arguments)}},{key:"createParentBoundables",value:function(t,e){F.isTrue(!t.isEmpty());var n=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),i=new dt(t);Qe.sort(i,r.xComparator);var o=this.verticalSlices(i,Math.trunc(Math.ceil(Math.sqrt(n))));return this.createParentBoundablesFromVerticalSlices(o,e)}},{key:"nearestNeighbour",value:function(){if(1===arguments.length){if(rt(arguments[0],tn)){var t=arguments[0];if(this.isEmpty())return null;var e=new Ze(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(e)}if(arguments[0]instanceof Ze){var n=arguments[0],r=L.POSITIVE_INFINITY,i=null,o=new We;for(o.add(n);!o.isEmpty()&&r>0;){var s=o.poll(),a=s.getDistance();if(a>=r)break;s.isLeaves()?(r=a,i=s):s.expandToQueue(o,r)}return null===i?null:[i.getBoundable(0).getItem(),i.getBoundable(1).getItem()]}}else{if(2===arguments.length){var u=arguments[0],l=arguments[1];if(this.isEmpty()||u.isEmpty())return null;var c=new Ze(this.getRoot(),u.getRoot(),l);return this.nearestNeighbour(c)}if(3===arguments.length){var h=arguments[2],A=new qe(arguments[0],arguments[1]),f=new Ze(this.getRoot(),A,h);return this.nearestNeighbour(f)[0]}if(4===arguments.length){var d=arguments[2],p=arguments[3],g=new qe(arguments[0],arguments[1]),m=new Ze(this.getRoot(),g,d);return this.nearestNeighbourK(m,p)}}}},{key:"isWithinDistance",value:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=L.POSITIVE_INFINITY,r=new We;for(r.add(t);!r.isEmpty();){var i=r.poll(),o=i.getDistance();if(o>e)return!1;if(i.maximumDistance()<=e)return!0;
2if(i.isLeaves()){if((n=o)<=e)return!0}else i.expandToQueue(r,n)}return!1}if(3===arguments.length){var s=arguments[0],a=arguments[1],u=arguments[2],l=new Ze(this.getRoot(),s.getRoot(),a);return this.isWithinDistance(l,u)}}},{key:"interfaces_",get:function(){return[Xe,E]}}],[{key:"constructor_",value:function(){if(0===arguments.length)r.constructor_.call(this,r.DEFAULT_NODE_CAPACITY);else if(1===arguments.length){var t=arguments[0];$e.constructor_.call(this,t)}}},{key:"centreX",value:function(t){return r.avg(t.getMinX(),t.getMaxX())}},{key:"avg",value:function(t,e){return(t+e)/2}},{key:"getItems",value:function(t){for(var e=new Array(t.size()).fill(null),n=0;!t.isEmpty();){var r=t.poll();e[n]=r.getBoundable(0).getItem(),n++}return e}},{key:"centreY",value:function(t){return r.avg(t.getMinY(),t.getMaxY())}}])}($e),nn=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"computeBounds",value:function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new V(n.getBounds()):t.expandToInclude(n.getBounds())}return t}}],[{key:"constructor_",value:function(){var t=arguments[0];Ye.constructor_.call(this,t)}}])}(Ye);en.STRtreeNode=nn,en.xComparator=new(o(function t(){n(this,t)},[{key:"interfaces_",get:function(){return[B]}},{key:"compare",value:function(t,e){return $e.compareDoubles(en.centreX(t.getBounds()),en.centreX(e.getBounds()))}}])),en.yComparator=new(o(function t(){n(this,t)},[{key:"interfaces_",get:function(){return[B]}},{key:"compare",value:function(t,e){return $e.compareDoubles(en.centreY(t.getBounds()),en.centreY(e.getBounds()))}}])),en.intersectsOp=new(o(function t(){n(this,t)},[{key:"interfaces_",get:function(){return[IntersectsOp]}},{key:"intersects",value:function(t,e){return t.intersects(e)}}])),en.DEFAULT_NODE_CAPACITY=10;var rn=function(){function t(){n(this,t)}return o(t,null,[{key:"relativeSign",value:function(t,e){return t<e?-1:t>e?1:0}},{key:"compare",value:function(e,n,r){if(n.equals2D(r))return 0;var i=t.relativeSign(n.x,r.x),o=t.relativeSign(n.y,r.y);switch(e){case 0:return t.compareValue(i,o);case 1:return t.compareValue(o,i);case 2:return t.compareValue(o,-i);case 3:return t.compareValue(-i,o);case 4:return t.compareValue(-i,-o);case 5:return t.compareValue(-o,-i);case 6:return t.compareValue(-o,i);case 7:return t.compareValue(i,-o)}return F.shouldNeverReachHere("invalid octant value"),0}},{key:"compareValue",value:function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0}}])}(),on=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"getCoordinate",value:function(){return this.coord}},{key:"print",value:function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)}},{key:"compareTo",value:function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:this._isInterior?e._isInterior?rn.compare(this._segmentOctant,this.coord,e.coord):1:-1}},{key:"isEndPoint",value:function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t}},{key:"toString",value:function(){return this.segmentIndex+":"+this.coord.toString()}},{key:"isInterior",value:function(){return this._isInterior}},{key:"interfaces_",get:function(){return[b]}}],[{key:"constructor_",value:function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._segString=t,this.coord=new G(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))}}]),sn=o(function t(){n(this,t)},[{key:"hasNext",value:function(){}},{key:"next",value:function(){}},{key:"remove",value:function(){}}]),an=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"getSplitCoordinates",value:function(){var t=new Wt;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next();this.addEdgeCoordinates(n,r,t),n=r}return t.toCoordinateArray()}},{key:"addCollapsedNodes",value:function(){var t=new dt;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}}},{key:"createSplitEdgePts",value:function(t,e){var n=e.segmentIndex-t.segmentIndex+2;
vendor: 81,963 bytes, line 2
2if(2===n)return[new G(t.coord),new G(e.coord)];var r=this._edge.getCoordinate(e.segmentIndex),i=e.isInterior()||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),s=0;o[s++]=new G(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this._edge.getCoordinate(a);return i&&(o[s]=new G(e.coord)),o}},{key:"print",value:function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)}},{key:"findCollapsesFromExistingVertices",value:function(t){for(var e=0;e<this._edge.size()-2;e++){var n=this._edge.getCoordinate(e);this._edge.getCoordinate(e+1);var r=this._edge.getCoordinate(e+2);n.equals2D(r)&&t.add(ot.valueOf(e+1))}}},{key:"addEdgeCoordinates",value:function(t,e,n){var r=this.createSplitEdgePts(t,e);n.add(r,!1)}},{key:"iterator",value:function(){return this._nodeMap.values().iterator()}},{key:"addSplitEdges",value:function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next(),i=this.createSplitEdge(n,r);t.add(i),n=r}}},{key:"findCollapseIndex",value:function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var r=e.segmentIndex-t.segmentIndex;return e.isInterior()||r--,1===r&&(n[0]=t.segmentIndex+1,!0)}},{key:"findCollapsesFromInsertedNodes",value:function(t){for(var e=new Array(1).fill(null),n=this.iterator(),r=n.next();n.hasNext();){var i=n.next();this.findCollapseIndex(r,i,e)&&t.add(ot.valueOf(e[0])),r=i}}},{key:"getEdge",value:function(){return this._edge}},{key:"addEndpoints",value:function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)}},{key:"createSplitEdge",value:function(t,e){var n=this.createSplitEdgePts(t,e);return new hn(n,this._edge.getData())}},{key:"add",value:function(t,e){var n=new on(this._edge,t,e,this._edge.getSegmentOctant(e)),r=this._nodeMap.get(n);return null!==r?(F.isTrue(r.coord.equals2D(t),"Found equal nodes with different coordinates"),r):(this._nodeMap.put(n,n),n)}},{key:"checkSplitEdgesCorrectness",value:function(t){var e=this._edge.getCoordinates(),n=t.get(0).getCoordinate(0);if(!n.equals2D(e[0]))throw new k("bad split edge start point at "+n);var r=t.get(t.size()-1).getCoordinates(),i=r[r.length-1];if(!i.equals2D(e[e.length-1]))throw new k("bad split edge end point at "+i)}}],[{key:"constructor_",value:function(){this._nodeMap=new Ne,this._edge=null;var t=arguments[0];this._edge=t}}]),un=function(){function t(){n(this,t)}return o(t,null,[{key:"octant",value:function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var e=arguments[0],n=arguments[1];if(0===e&&0===n)throw new v("Cannot compute the octant for point ( "+e+", "+n+" )");var r=Math.abs(e),i=Math.abs(n);return e>=0?n>=0?r>=i?0:1:r>=i?7:6:n>=0?r>=i?3:2:r>=i?4:5}if(arguments[0]instanceof G&&arguments[1]instanceof G){var o=arguments[0],s=arguments[1],a=s.x-o.x,u=s.y-o.y;if(0===a&&0===u)throw new v("Cannot compute the octant for two identical points "+o);return t.octant(a,u)}}}])}(),ln=o(function t(){n(this,t)},[{key:"getCoordinates",value:function(){}},{key:"size",value:function(){}},{key:"getCoordinate",value:function(t){}},{key:"isClosed",value:function(){}},{key:"setData",value:function(t){}},{key:"getData",value:function(){}}]),cn=o(function t(){n(this,t)},[{key:"addIntersection",value:function(t,e){}},{key:"interfaces_",get:function(){return[ln]}}]),hn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"getCoordinates",value:function(){return this._pts}},{key:"size",value:function(){return this._pts.length}},{key:"getCoordinate",value:function(t){return this._pts[t]}},{key:"isClosed",value:function(){return this._pts[0].equals(this._pts[this._pts.length-1])}},{key:"getSegmentOctant",value:function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))}},{key:"setData",value:function(t){this._data=t}},{key:"safeOctant",value:function(t,e){return t.equals2D(e)?0:un.octant(t,e)}},{key:"getData",value:function(){return this._data}},{key:"addIntersection",value:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[1],r=arguments[3],i=new G(arguments[0].getIntersection(r));this.addIntersection(i,n)}}},{key:"toString",value:function(){return ye.toLineString(new Zt(this._pts))}},{key:"getNodeList",value:function(){return this._nodeList}},{key:"addIntersectionNode",value:function(t,e){var n=e,r=n+1;if(r<this._pts.length){var i=this._pts[r];t.equals2D(i)&&(n=r)}return this._nodeList.add(t,n)}},{key:"addIntersections",value:function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++)this.addIntersection(t,e,n,r)}},{key:"interfaces_",get:function(){return[cn]}}],[{key:"constructor_",value:function(){this._nodeList=new an(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e}},{key:"getNodedSubstrings",value:function(){if(1===arguments.length){var e=arguments[0],n=new dt;return t.getNodedSubstrings(e,n),n}if(2===arguments.length)for(var r=arguments[1],i=arguments[0].iterator();i.hasNext();)i.next().getNodeList().addSplitEdges(r)}}])}(),An=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"minX",value:function(){return Math.min(this.p0.x,this.p1.x)}},{key:"orientationIndex",value:function(){if(arguments[0]instanceof t){var e=arguments[0],n=ct.index(this.p0,this.p1,e.p0),r=ct.index(this.p0,this.p1,e.p1);return n>=0&&r>=0||n<=0&&r<=0?Math.max(n,r):0}if(arguments[0]instanceof G){var i=arguments[0];return ct.index(this.p0,this.p1,i)}}},{key:"toGeometry",value:function(t){return t.createLineString([this.p0,this.p1])}},{key:"isVertical",value:function(){return this.p0.x===this.p1.x}},{key:"equals",value:function(e){if(!(e instanceof t))return!1;var n=e;return this.p0.equals(n.p0)&&this.p1.equals(n.p1)}},{key:"intersection",value:function(t){var e=new _e;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null}},{key:"project",value:function(){if(arguments[0]instanceof G){var e=arguments[0];if(e.equals(this.p0)||e.equals(this.p1))return new G(e);var n=this.projectionFactor(e),r=new G;return r.x=this.p0.x+n*(this.p1.x-this.p0.x),r.y=this.p0.y+n*(this.p1.y-this.p0.y),r}if(arguments[0]instanceof t){var i=arguments[0],o=this.projectionFactor(i.p0),s=this.projectionFactor(i.p1);if(o>=1&&s>=1)return null;if(o<=0&&s<=0)return null;var a=this.project(i.p0);o<0&&(a=this.p0),o>1&&(a=this.p1);var u=this.project(i.p1);return s<0&&(u=this.p0),s>1&&(u=this.p1),new t(a,u)}}},{key:"normalize",value:function(){this.p1.compareTo(this.p0)<0&&this.reverse()}},{key:"angle",value:function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)}},{key:"getCoordinate",value:function(t){return 0===t?this.p0:this.p1}},{key:"distancePerpendicular",value:function(t){return _t.pointToLinePerpendicular(t,this.p0,this.p1)}},{key:"minY",value:function(){return Math.min(this.p0.y,this.p1.y)}},{key:"midPoint",value:function(){return t.midPoint(this.p0,this.p1)}},{key:"projectionFactor",value:function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=e*e+n*n;return r<=0?L.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r}},{key:"closestPoints",value:function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),r=L.MAX_VALUE,i=null,o=this.closestPoint(t.p0);r=o.distance(t.p0),n[0]=o,n[1]=t.p0;var s=this.closestPoint(t.p1);(i=s.distance(t.p1))<r&&(r=i,n[0]=s,n[1]=t.p1);var a=t.closestPoint(this.p0);(i=a.distance(this.p0))<r&&(r=i,n[0]=this.p0,n[1]=a);var u=t.closestPoint(this.p1);return(i=u.distance(this.p1))<r&&(r=i,n[0]=this.p1,n[1]=u),n}},{key:"closestPoint",value:function(t){var e=this.projectionFactor(t);return e>0&&e<1?this.project(t):this.p0.distance(t)<this.p1.distance(t)?this.p0:this.p1}},{key:"maxX",value:function(){return Math.max(this.p0.x,this.p1.x)}},{key:"getLength",value:function(){return this.p0.distance(this.p1)}},{key:"compareTo",value:function(t){var e=t,n=this.p0.compareTo(e.p0);return 0!==n?n:this.p1.compareTo(e.p1)}},{key:"reverse",value:function(){var t=this.p0;this.p0=this.p1,this.p1=t}},{key:"equalsTopo",value:function(t){return this.p0.equals(t.p0)&&this.p1.equals(t.p1)||this.p0.equals(t.p1)&&this.p1.equals(t.p0)}},{key:"lineIntersection",value:function(t){return mt.intersection(this.p0,this.p1,t.p0,t.p1)}},{key:"maxY",value:function(){return Math.max(this.p0.y,this.p1.y)}},{key:"pointAlongOffset",value:function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),r=this.p0.y+t*(this.p1.y-this.p0.y),i=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,s=Math.sqrt(i*i+o*o),a=0,u=0;if(0!==e){if(s<=0)throw new IllegalStateException("Cannot compute offset from zero-length line segment");a=e*i/s,u=e*o/s}return new G(n-u,r+a)}},{key:"setCoordinates",value:function(){if(1===arguments.length){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}}},{key:"segmentFraction",value:function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||L.isNaN(e))&&(e=1),e}},{key:"toString",value:function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"}},{key:"isHorizontal",value:function(){return this.p0.y===this.p1.y}},{key:"reflect",value:function(t){var e=this.p1.getY()-this.p0.getY(),n=this.p0.getX()-this.p1.getX(),r=this.p0.getY()*(this.p1.getX()-this.p0.getX())-this.p0.getX()*(this.p1.getY()-this.p0.getY()),i=e*e+n*n,o=e*e-n*n,s=t.getX(),a=t.getY();return new G((-o*s-2*e*n*a-2*e*r)/i,(o*a-2*e*n*s-2*n*r)/i)}},{key:"distance",value:function(){if(arguments[0]instanceof t){var e=arguments[0];return _t.segmentToSegment(this.p0,this.p1,e.p0,e.p1)}if(arguments[0]instanceof G){var n=arguments[0];return _t.pointToSegment(n,this.p0,this.p1)}}},{key:"pointAlong",value:function(t){var e=new G;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e}},{key:"hashCode",value:function(){var t=L.doubleToLongBits(this.p0.x);t^=31*L.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=L.doubleToLongBits(this.p1.x);return n^=31*L.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)}},{key:"interfaces_",get:function(){return[b,E]}}],[{key:"constructor_",value:function(){if(this.p0=null,this.p1=null,0===arguments.length)t.constructor_.call(this,new G,new G);else if(1===arguments.length){var e=arguments[0];t.constructor_.call(this,e.p0,e.p1)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.p0=n,this.p1=r}else if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];t.constructor_.call(this,new G(i,o),new G(s,a))}}},{key:"midPoint",value:function(t,e){return new G((t.x+e.x)/2,(t.y+e.y)/2)}}])}(),fn=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"overlap",value:function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[1],e=arguments[2],n=arguments[3];arguments[0].getLineSegment(t,this._overlapSeg1),e.getLineSegment(n,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}}],[{key:"constructor_",value:function(){this._overlapSeg1=new An,this._overlapSeg2=new An}}]),dn=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"getLineSegment",value:function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]}},{key:"computeSelect",value:function(t,e,n,r){var i=this._pts[e],o=this._pts[n];if(n-e==1)return r.select(this,e),null;if(!t.intersects(i,o))return null;var s=Math.trunc((e+n)/2);e<s&&this.computeSelect(t,e,s,r),s<n&&this.computeSelect(t,s,n,r)}},{key:"getCoordinates",value:function(){for(var t=new Array(this._end-this._start+1).fill(null),e=0,n=this._start;n<=this._end;n++)t[e++]=this._pts[n];return t}},{key:"computeOverlaps",value:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.computeOverlaps(this._start,this._end,t,t._start,t._end,e)}else if(6===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=arguments[3],s=arguments[4],a=arguments[5];if(r-n==1&&s-o==1)return a.overlap(this,n,i,o),null;if(!this.overlaps(n,r,i,o,s))return null;var u=Math.trunc((n+r)/2),l=Math.trunc((o+s)/2);n<u&&(o<l&&this.computeOverlaps(n,u,i,o,l,a),l<s&&this.computeOverlaps(n,u,i,l,s,a)),u<r&&(o<l&&this.computeOverlaps(u,r,i,o,l,a),l<s&&this.computeOverlaps(u,r,i,l,s,a))}}},{key:"setId",value:function(t){this._id=t}},{key:"select",value:function(t,e){this.computeSelect(t,this._start,this._end,e)}},{key:"getEnvelope",value:function(){if(null===this._env){var t=this._pts[this._start],e=this._pts[this._end];this._env=new V(t,e)}return this._env}},{key:"overlaps",value:function(t,e,n,r,i){return V.intersects(this._pts[t],this._pts[e],n._pts[r],n._pts[i])}},{key:"getEndIndex",value:function(){return this._end}},{key:"getStartIndex",value:function(){return this._start}},{key:"getContext",value:function(){return this._context}},{key:"getId",value:function(){return this._id}}],[{key:"constructor_",value:function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r}}]),pn=function(){function t(){n(this,t)}return o(t,null,[{key:"findChainEnd",value:function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var r=De.quadrant(t[n],t[n+1]),i=e+1;i<t.length&&(t[i-1].equals2D(t[i])||De.quadrant(t[i-1],t[i])===r);)i++;return i-1}},{key:"getChains",value:function(){if(1===arguments.length){var e=arguments[0];return t.getChains(e,null)}if(2===arguments.length){var n=arguments[0],r=arguments[1],i=new dt,o=0;do{var s=t.findChainEnd(n,o),a=new dn(n,o,s,r);i.add(a),o=s}while(o<n.length-1);return i}}}])}(),gn=o(function t(){n(this,t)},[{key:"computeNodes",value:function(t){}},{key:"getNodedSubstrings",value:function(){}}]),mn=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"setSegmentIntersector",value:function(t){this._segInt=t}},{key:"interfaces_",get:function(){return[gn]}}],[{key:"constructor_",value:function(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setSegmentIntersector(t)}}}]),yn=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"getMonotoneChains",value:function(){return this._monoChains}},{key:"getNodedSubstrings",value:function(){return hn.getNodedSubstrings(this._nodedSegStrings)}},{key:"getIndex",value:function(){return this._index}},{key:"add",value:function(t){for(var e=pn.getChains(t.getCoordinates(),t).iterator();e.hasNext();){var n=e.next();n.setId(this._idCounter++),this._index.insert(n.getEnvelope(),n),this._monoChains.add(n)}}},{key:"computeNodes",value:function(t){this._nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()}},{key:"intersectChains",value:function(){for(var t=new vn(this._segInt),e=this._monoChains.iterator();e.hasNext();)for(var n=e.next(),r=this._index.query(n.getEnvelope()).iterator();r.hasNext();){var i=r.next();if(i.getId()>n.getId()&&(n.computeOverlaps(i,t),this._nOverlaps++),this._segInt.isDone())return null}}}],[{key:"constructor_",value:function(){if(this._monoChains=new dt,this._index=new en,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0,0===arguments.length);else if(1===arguments.length){var t=arguments[0];mn.constructor_.call(this,t)}}}])}(mn),vn=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"overlap",value:function(){if(4!==arguments.length)return A(r,"overlap",this,1).apply(this,arguments);var t=arguments[1],e=arguments[2],n=arguments[3],i=arguments[0].getContext(),o=e.getContext();this._si.processIntersections(i,t,o,n)}}],[{key:"constructor_",value:function(){this._si=null;var t=arguments[0];this._si=t}}])}(fn);yn.SegmentOverlapAction=vn;var _n=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"isDeletable",value:function(t,e,n,r){var i=this._inputLine[t],o=this._inputLine[e],s=this._inputLine[n];return!!this.isConcave(i,o,s)&&!!this.isShallow(i,o,s,r)&&this.isShallowSampled(i,o,t,n,r)}},{key:"deleteShallowConcavities",value:function(){for(var e=1,n=this.findNextNonDeletedIndex(e),r=this.findNextNonDeletedIndex(n),i=!1;r<this._inputLine.length;){var o=!1;this.isDeletable(e,n,r,this._distanceTol)&&(this._isDeleted[n]=t.DELETE,o=!0,i=!0),e=o?r:n,n=this.findNextNonDeletedIndex(e),r=this.findNextNonDeletedIndex(n)}return i}},{key:"isShallowConcavity",value:function(t,e,n,r){return ct.index(t,e,n)===this._angleOrientation&&_t.pointToSegment(e,t,n)<r}},{key:"isShallowSampled",value:function(e,n,r,i,o){var s=Math.trunc((i-r)/t.NUM_PTS_TO_CHECK);s<=0&&(s=1);for(var a=r;a<i;a+=s)if(!this.isShallow(e,n,this._inputLine[a],o))return!1;return!0}},{key:"isConcave",value:function(t,e,n){return ct.index(t,e,n)===this._angleOrientation}},{key:"simplify",value:function(t){this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=ct.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var e=!1;do{e=this.deleteShallowConcavities()}while(e);return this.collapseLine()}},{key:"findNextNonDeletedIndex",value:function(e){for(var n=e+1;n<this._inputLine.length&&this._isDeleted[n]===t.DELETE;)n++;return n}},{key:"isShallow",value:function(t,e,n,r){return _t.pointToSegment(e,t,n)<r}},{key:"collapseLine",value:function(){for(var e=new Wt,n=0;n<this._inputLine.length;n++)this._isDeleted[n]!==t.DELETE&&e.add(this._inputLine[n]);return e.toCoordinateArray()}}],[{key:"constructor_",value:function(){this._inputLine=null,this._distanceTol=null,this._isDeleted=null,this._angleOrientation=ct.COUNTERCLOCKWISE;var t=arguments[0];this._inputLine=t}},{key:"simplify",value:function(e,n){return new t(e).simplify(n)}}])}();_n.INIT=0,_n.DELETE=1,_n.KEEP=1,_n.NUM_PTS_TO_CHECK=10;var bn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"getCoordinates",value:function(){return this._ptList.toArray(t.COORDINATE_ARRAY_TYPE)}},{key:"setPrecisionModel",value:function(t){this._precisionModel=t}},{key:"addPt",value:function(t){var e=new G(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)}},{key:"reverse",value:function(){}},{key:"addPts",value:function(t,e){if(e)for(var n=0;n<t.length;n++)this.addPt(t[n]);else for(var r=t.length-1;r>=0;r--)this.addPt(t[r])}},{key:"isRedundant",value:function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)<this._minimimVertexDistance}},{key:"toString",value:function(){return(new oe).createLineString(this.getCoordinates()).toString()}},{key:"closeRing",value:function(){if(this._ptList.size()<1)return null;var t=new G(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)}},{key:"setMinimumVertexDistance",value:function(t){this._minimimVertexDistance=t}}],[{key:"constructor_",value:function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new dt}}])}();bn.COORDINATE_ARRAY_TYPE=new Array(0).fill(null);var wn=function(){function t(){n(this,t)}return o(t,null,[{key:"toDegrees",value:function(t){return 180*t/Math.PI}},{key:"normalize",value:function(e){for(;e>Math.PI;)e-=t.PI_TIMES_2;for(;e<=-Math.PI;)e+=t.PI_TIMES_2;return e}},{key:"angle",value:function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}}},{key:"isAcute",value:function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)>0}},{key:"isObtuse",value:function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)<0}},{key:"interiorAngle",value:function(e,n,r){var i=t.angle(n,e),o=t.angle(n,r);return Math.abs(o-i)}},{key:"normalizePositive",value:function(e){if(e<0){for(;e<0;)e+=t.PI_TIMES_2;e>=t.PI_TIMES_2&&(e=0)}else{for(;e>=t.PI_TIMES_2;)e-=t.PI_TIMES_2;e<0&&(e=0)}return e}},{key:"angleBetween",value:function(e,n,r){var i=t.angle(n,e),o=t.angle(n,r);return t.diff(i,o)}},{key:"diff",value:function(t,e){var n=null;return(n=t<e?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n}},{key:"toRadians",value:function(t){return t*Math.PI/180}},{key:"getTurn",value:function(e,n){var r=Math.sin(n-e);return r>0?t.COUNTERCLOCKWISE:r<0?t.CLOCKWISE:t.NONE}},{key:"angleBetweenOriented",value:function(e,n,r){var i=t.angle(n,e),o=t.angle(n,r)-i;return o<=-Math.PI?o+t.PI_TIMES_2:o>Math.PI?o-t.PI_TIMES_2:o}}])}();wn.PI_TIMES_2=2*Math.PI,wn.PI_OVER_2=Math.PI/2,wn.PI_OVER_4=Math.PI/4,wn.COUNTERCLOCKWISE=ct.COUNTERCLOCKWISE,wn.CLOCKWISE=ct.CLOCKWISE,wn.NONE=ct.COLLINEAR;var En=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"addNextSegment",value:function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=ct.index(this._s0,this._s1,this._s2),r=n===ct.CLOCKWISE&&this._side===K.LEFT||n===ct.COUNTERCLOCKWISE&&this._side===K.RIGHT;0===n?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)}},{key:"addLineEndCap",value:function(t,e){var n=new An(t,e),r=new An;this.computeOffsetSegment(n,K.LEFT,this._distance,r);var i=new An;this.computeOffsetSegment(n,K.RIGHT,this._distance,i);var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case m.CAP_ROUND:this._segList.addPt(r.p1),this.addDirectedFillet(e,a+Math.PI/2,a-Math.PI/2,ct.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case m.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case m.CAP_SQUARE:var u=new G;u.x=Math.abs(this._distance)*Math.cos(a),u.y=Math.abs(this._distance)*Math.sin(a);var l=new G(r.p1.x+u.x,r.p1.y+u.y),c=new G(i.p1.x+u.x,i.p1.y+u.y);this._segList.addPt(l),this._segList.addPt(c)}}},{key:"getCoordinates",value:function(){return this._segList.getCoordinates()}},{key:"addMitreJoin",value:function(t,e,n,r){var i=mt.intersection(e.p0,e.p1,n.p0,n.p1);if(null!==i&&(r<=0?1:i.distance(t)/Math.abs(r))<=this._bufParams.getMitreLimit())return this._segList.addPt(i),null;this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())}},{key:"addOutsideTurn",value:function(e,n){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*t.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===m.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===m.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(n&&this._segList.addPt(this._offset0.p1),this.addCornerFillet(this._s1,this._offset0.p1,this._offset1.p0,e,this._distance),this._segList.addPt(this._offset1.p0))}},{key:"createSquare",value:function(t){this._segList.addPt(new G(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new G(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new G(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new G(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()}},{key:"addSegments",value:function(t,e){this._segList.addPts(t,e)}},{key:"addFirstSegment",value:function(){this._segList.addPt(this._offset1.p0)}},{key:"addCornerFillet",value:function(t,e,n,r,i){var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o),u=n.x-t.x,l=n.y-t.y,c=Math.atan2(l,u);r===ct.CLOCKWISE?a<=c&&(a+=2*Math.PI):a>=c&&(a-=2*Math.PI),this._segList.addPt(e),this.addDirectedFillet(t,a,c,r,i),this._segList.addPt(n)}},{key:"addLastSegment",value:function(){this._segList.addPt(this._offset1.p1)}},{key:"initSideSegments",value:function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)}},{key:"addLimitedMitreJoin",value:function(t,e,n,r){var i=this._seg0.p1,o=wn.angle(i,this._seg0.p0),s=wn.angleBetweenOriented(this._seg0.p0,i,this._seg1.p1)/2,a=wn.normalize(o+s),u=wn.normalize(a+Math.PI),l=r*n,c=n-l*Math.abs(Math.sin(s)),h=i.x+l*Math.cos(u),A=i.y+l*Math.sin(u),f=new G(h,A),d=new An(i,f),p=d.pointAlongOffset(1,c),g=d.pointAlongOffset(1,-c);this._side===K.LEFT?(this._segList.addPt(p),this._segList.addPt(g)):(this._segList.addPt(g),this._segList.addPt(p))}},{key:"addDirectedFillet",value:function(t,e,n,r,i){var o=r===ct.CLOCKWISE?-1:1,s=Math.abs(e-n),a=Math.trunc(s/this._filletAngleQuantum+.5);if(a<1)return null;for(var u=s/a,l=new G,c=0;c<a;c++){var h=e+o*c*u;l.x=t.x+i*Math.cos(h),l.y=t.y+i*Math.sin(h),this._segList.addPt(l)}}},{key:"computeOffsetSegment",value:function(t,e,n,r){var i=e===K.LEFT?1:-1,o=t.p1.x-t.p0.x,s=t.p1.y-t.p0.y,a=Math.sqrt(o*o+s*s),u=i*n*o/a,l=i*n*s/a;r.p0.x=t.p0.x-l,r.p0.y=t.p0.y+u,r.p1.x=t.p1.x-l,r.p1.y=t.p1.y+u}},{key:"addInsideTurn",value:function(e,n){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*t.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var r=new G((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r);var i=new G((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}}},{key:"createCircle",value:function(t){var e=new G(t.x+this._distance,t.y);this._segList.addPt(e),this.addDirectedFillet(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()}},{key:"addBevelJoin",value:function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)}},{key:"init",value:function(e){this._distance=e,this._maxCurveSegmentError=e*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new bn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(e*t.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)}},{key:"addCollinear",value:function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===m.JOIN_BEVEL||this._bufParams.getJoinStyle()===m.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addCornerFillet(this._s1,this._offset0.p1,this._offset1.p0,ct.CLOCKWISE,this._distance))}},{key:"closeRing",value:function(){this._segList.closeRing()}},{key:"hasNarrowConcaveAngle",value:function(){return this._hasNarrowConcaveAngle}}],[{key:"constructor_",value:function(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new An,this._seg1=new An,this._offset0=new An,this._offset1=new An,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new _e,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===m.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)}}])}();En.OFFSET_SEGMENT_SEPARATION_FACTOR=.001,En.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR=.001,En.CURVE_VERTEX_SNAP_DISTANCE_FACTOR=1e-6,En.MAX_CLOSING_SEG_LEN_FACTOR=80;var xn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"getOffsetCurve",value:function(t,e){if(this._distance=e,0===e)return null;var n=e<0,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var o=i.getCoordinates();return n&&Xt.reverse(o),o}},{key:"computeSingleSidedBufferCurve",value:function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=_n.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],K.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(i[s],!0)}else{n.addSegments(t,!1);var a=_n.simplify(t,r),u=a.length-1;n.initSideSegments(a[0],a[1],K.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(a[l],!0)}n.addLastSegment(),n.closeRing()}},{key:"computeRingBufferCurve",value:function(t,e,n){var r=this.simplifyTolerance(this._distance);e===K.RIGHT&&(r=-r);var i=_n.simplify(t,r),o=i.length-1;n.initSideSegments(i[o-1],i[0],e);for(var s=1;s<=o;s++){var a=1!==s;n.addNextSegment(i[s],a)}n.closeRing()}},{key:"computeLineBufferCurve",value:function(t,e){var n=this.simplifyTolerance(this._distance),r=_n.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],K.LEFT);for(var o=2;o<=i;o++)e.addNextSegment(r[o],!0);e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var s=_n.simplify(t,-n),a=s.length-1;e.initSideSegments(s[a],s[a-1],K.LEFT);for(var u=a-2;u>=0;u--)e.addNextSegment(s[u],!0);e.addLastSegment(),e.addLineEndCap(s[1],s[0]),e.closeRing()}},{key:"computePointCurve",value:function(t,e){switch(this._bufParams.getEndCapStyle()){case m.CAP_ROUND:e.createCircle(t);break;case m.CAP_SQUARE:e.createSquare(t)}}},{key:"getLineCurve",value:function(t,e){if(this._distance=e,this.isLineOffsetEmpty(e))return null;var n=Math.abs(e),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);return r.getCoordinates()}},{key:"getBufferParameters",value:function(){return this._bufParams}},{key:"simplifyTolerance",value:function(t){return t*this._bufParams.getSimplifyFactor()}},{key:"getRingCurve",value:function(e,n,r){if(this._distance=r,e.length<=2)return this.getLineCurve(e,r);if(0===r)return t.copyCoordinates(e);var i=this.getSegGen(r);return this.computeRingBufferCurve(e,n,i),i.getCoordinates()}},{key:"computeOffsetCurve",value:function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=_n.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],K.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(i[s],!0)}else{var a=_n.simplify(t,r),u=a.length-1;n.initSideSegments(a[0],a[1],K.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(a[l],!0)}n.addLastSegment()}},{key:"isLineOffsetEmpty",value:function(t){return 0===t||t<0&&!this._bufParams.isSingleSided()}},{key:"getSegGen",value:function(t){return new En(this._precisionModel,this._bufParams,t)}}],[{key:"constructor_",value:function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e}},{key:"copyCoordinates",value:function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new G(t[n]);return e}}])}(),Sn=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"findStabbedSegments",value:function(){if(1===arguments.length){for(var t=arguments[0],e=new dt,n=this._subgraphs.iterator();n.hasNext();){var r=n.next(),i=r.getEnvelope();t.y<i.getMinY()||t.y>i.getMaxY()||this.findStabbedSegments(t,r.getDirectedEdges(),e)}return e}if(3===arguments.length)if(rt(arguments[2],et)&&arguments[0]instanceof G&&arguments[1]instanceof Ue){for(var o=arguments[0],s=arguments[1],a=arguments[2],u=s.getEdge().getCoordinates(),l=0;l<u.length-1;l++)if(this._seg.p0=u[l],this._seg.p1=u[l+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)<o.x||this._seg.isHorizontal()||o.y<this._seg.p0.y||o.y>this._seg.p1.y||ct.index(this._seg.p0,this._seg.p1,o)===ct.RIGHT)){var c=s.getDepth(K.LEFT);this._seg.p0.equals(u[l])||(c=s.getDepth(K.RIGHT));var h=new Tn(this._seg,c);a.add(h)}}else if(rt(arguments[2],et)&&arguments[0]instanceof G&&rt(arguments[1],et))for(var A=arguments[0],f=arguments[2],d=arguments[1].iterator();d.hasNext();){var p=d.next();p.isForward()&&this.findStabbedSegments(A,p,f)}}},{key:"getDepth",value:function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:Qe.min(e)._leftDepth}}],[{key:"constructor_",value:function(){this._subgraphs=null,this._seg=new An;var t=arguments[0];this._subgraphs=t}}]),Tn=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"compareTo",value:function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n||0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)}},{key:"compareX",value:function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)}},{key:"toString",value:function(){return this._upwardSeg.toString()}},{key:"interfaces_",get:function(){return[b]}}],[{key:"constructor_",value:function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new An(t),this._leftDepth=e}}]);Sn.DepthSegment=Tn;var Pn=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,null,[{key:"constructor_",value:function(){y.constructor_.call(this,"Projective point not representable on the Cartesian plane.")}}])}(y),Cn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"getY",value:function(){var t=this.y/this.w;if(L.isNaN(t)||L.isInfinite(t))throw new Pn;return t}},{key:"getX",value:function(){var t=this.x/this.w;if(L.isNaN(t)||L.isInfinite(t))throw new Pn;return t}},{key:"getCoordinate",value:function(){var t=new G;return t.x=this.getX(),t.y=this.getY(),t}}],[{key:"constructor_",value:function(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1];this.x=n,this.y=r,this.w=1}else if(arguments[0]instanceof t&&arguments[1]instanceof t){var i=arguments[0],o=arguments[1];this.x=i.y*o.w-o.y*i.w,this.y=o.x*i.w-i.x*o.w,this.w=i.x*o.y-o.x*i.y}else if(arguments[0]instanceof G&&arguments[1]instanceof G){var s=arguments[0],a=arguments[1];this.x=s.y-a.y,this.y=a.x-s.x,this.w=s.x*a.y-a.x*s.y}}else if(3===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2];this.x=u,this.y=l,this.w=c}else if(4===arguments.length){var h=arguments[0],A=arguments[1],f=arguments[2],d=arguments[3],p=h.y-A.y,g=A.x-h.x,m=h.x*A.y-A.x*h.y,y=f.y-d.y,v=d.x-f.x,_=f.x*d.y-d.x*f.y;this.x=g*_-v*m,this.y=y*m-p*_,this.w=p*v-y*g}}}])}(),Mn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"area",value:function(){return t.area(this.p0,this.p1,this.p2)}},{key:"signedArea",value:function(){return t.signedArea(this.p0,this.p1,this.p2)}},{key:"interpolateZ",value:function(e){if(null===e)throw new v("Supplied point is null.");return t.interpolateZ(e,this.p0,this.p1,this.p2)}},{key:"longestSideLength",value:function(){return t.longestSideLength(this.p0,this.p1,this.p2)}},{key:"isAcute",value:function(){return t.isAcute(this.p0,this.p1,this.p2)}},{key:"circumcentre",value:function(){return t.circumcentre(this.p0,this.p1,this.p2)}},{key:"area3D",value:function(){return t.area3D(this.p0,this.p1,this.p2)}},{key:"centroid",value:function(){return t.centroid(this.p0,this.p1,this.p2)}},{key:"inCentre",value:function(){return t.inCentre(this.p0,this.p1,this.p2)}}],[{key:"constructor_",value:function(){this.p0=null,this.p1=null,this.p2=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.p0=t,this.p1=e,this.p2=n}},{key:"area",value:function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)}},{key:"signedArea",value:function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2}},{key:"det",value:function(t,e,n,r){return t*r-e*n}},{key:"interpolateZ",value:function(t,e,n,r){var i=e.x,o=e.y,s=n.x-i,a=r.x-i,u=n.y-o,l=r.y-o,c=s*l-a*u,h=t.x-i,A=t.y-o,f=(l*h-a*A)/c,d=(-u*h+s*A)/c;return e.getZ()+f*(n.getZ()-e.getZ())+d*(r.getZ()-e.getZ())}},{key:"longestSideLength",value:function(t,e,n){var r=t.distance(e),i=e.distance(n),o=n.distance(t),s=r;return i>s&&(s=i),o>s&&(s=o),s}},{key:"circumcentreDD",value:function(t,e,n){var r=at.valueOf(t.x).subtract(n.x),i=at.valueOf(t.y).subtract(n.y),o=at.valueOf(e.x).subtract(n.x),s=at.valueOf(e.y).subtract(n.y),a=at.determinant(r,i,o,s).multiply(2),u=r.sqr().add(i.sqr()),l=o.sqr().add(s.sqr()),c=at.determinant(i,u,s,l),h=at.determinant(r,u,o,l),A=at.valueOf(n.x).subtract(c.divide(a)).doubleValue(),f=at.valueOf(n.y).add(h.divide(a)).doubleValue();return new G(A,f)}},{key:"isAcute",value:function(t,e,n){return!!wn.isAcute(t,e,n)&&!!wn.isAcute(e,n,t)&&!!wn.isAcute(n,t,e)}},{key:"circumcentre",value:function(e,n,r){var i=r.x,o=r.y,s=e.x-i,a=e.y-o,u=n.x-i,l=n.y-o,c=2*t.det(s,a,u,l),h=t.det(a,s*s+a*a,l,u*u+l*l),A=t.det(s,s*s+a*a,u,u*u+l*l);return new G(i-h/c,o+A/c)}},{key:"perpendicularBisector",value:function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new Cn(t.x+n/2,t.y+r/2,1),o=new Cn(t.x-r+n/2,t.y+n+r/2,1);return new Cn(i,o)}},{key:"angleBisector",value:function(t,e,n){var r=e.distance(t),i=r/(r+e.distance(n)),o=n.x-t.x,s=n.y-t.y;return new G(t.x+i*o,t.y+i*s)}},{key:"area3D",value:function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=e.getZ()-t.getZ(),s=n.x-t.x,a=n.y-t.y,u=n.getZ()-t.getZ(),l=i*u-o*a,c=o*s-r*u,h=r*a-i*s,A=l*l+c*c+h*h;return Math.sqrt(A)/2}},{key:"centroid",value:function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new G(r,i)}},{key:"inCentre",value:function(t,e,n){var r=e.distance(n),i=t.distance(n),o=t.distance(e),s=r+i+o,a=(r*t.x+i*e.x+o*n.x)/s,u=(r*t.y+i*e.y+o*n.y)/s;return new G(a,u)}}])}(),In=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"addRingSide",value:function(t,e,n,r,i){if(0===e&&t.length<Gt.MINIMUM_VALID_SIZE)return null;var o=r,s=i;t.length>=Gt.MINIMUM_VALID_SIZE&&ct.isCCW(t)&&(o=i,s=r,n=K.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,o,s)}},{key:"addRingBothSides",value:function(t,e){this.addRingSide(t,e,K.LEFT,q.EXTERIOR,q.INTERIOR),this.addRingSide(t,e,K.RIGHT,q.INTERIOR,q.EXTERIOR)}},{key:"addPoint",value:function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,q.EXTERIOR,q.INTERIOR)}},{key:"addPolygon",value:function(t){var e=this._distance,n=K.LEFT;this._distance<0&&(e=-this._distance,n=K.RIGHT);var r=t.getExteriorRing(),i=Xt.removeRepeatedPoints(r.getCoordinates());if(this._distance<0&&this.isErodedCompletely(r,this._distance))return null;if(this._distance<=0&&i.length<3)return null;this.addRingSide(i,e,n,q.EXTERIOR,q.INTERIOR);for(var o=0;o<t.getNumInteriorRing();o++){var s=t.getInteriorRingN(o),a=Xt.removeRepeatedPoints(s.getCoordinates());this._distance>0&&this.isErodedCompletely(s,-this._distance)||this.addRingSide(a,e,K.opposite(n),q.INTERIOR,q.EXTERIOR)}}},{key:"isTriangleErodedCompletely",value:function(t,e){var n=new Mn(t[0],t[1],t[2]),r=n.inCentre();return _t.pointToSegment(r,n.p0,n.p1)<Math.abs(e)}},{key:"addLineString",value:function(t){if(this._curveBuilder.isLineOffsetEmpty(this._distance))return null;var e=Xt.removeRepeatedPoints(t.getCoordinates());if(Xt.isRing(e)&&!this._curveBuilder.getBufferParameters().isSingleSided())this.addRingBothSides(e,this._distance);else{var n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,q.EXTERIOR,q.INTERIOR)}}},{key:"addCurve",value:function(t,e,n){if(null===t||t.length<2)return null;var r=new hn(t,new xe(0,q.BOUNDARY,e,n));this._curveList.add(r)}},{key:"getCurves",value:function(){return this.add(this._inputGeom),this._curveList}},{key:"add",value:function(t){if(t.isEmpty())return null;if(t instanceof kt)this.addPolygon(t);else if(t instanceof Mt)this.addLineString(t);else if(t instanceof Ot)this.addPoint(t);else if(t instanceof Ut)this.addCollection(t);else if(t instanceof ie)this.addCollection(t);else if(t instanceof $t)this.addCollection(t);else{if(!(t instanceof jt))throw new Y(t.getGeometryType());this.addCollection(t)}}},{key:"isErodedCompletely",value:function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i}},{key:"addCollection",value:function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}}}],[{key:"constructor_",value:function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new dt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n}}]),On=o(function t(){n(this,t)},[{key:"locate",value:function(t){}}]),Rn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"next",value:function(){if(this._atStart)return this._atStart=!1,t.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new X;var e=this._parent.getGeometryN(this._index++);return e instanceof jt?(this._subcollectionIterator=new t(e),this._subcollectionIterator.next()):e}},{key:"remove",value:function(){throw new Y(this.getClass().getName())}},{key:"hasNext",value:function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)}},{key:"interfaces_",get:function(){return[sn]}}],[{key:"constructor_",value:function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()}},{key:"isAtomic",value:function(t){return!(t instanceof jt)}}])}(),Ln=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"locate",value:function(e){return t.locate(e,this._geom)}},{key:"interfaces_",get:function(){return[On]}}],[{key:"constructor_",value:function(){this._geom=null;var t=arguments[0];this._geom=t}},{key:"locatePointInPolygon",value:function(e,n){if(n.isEmpty())return q.EXTERIOR;var r=n.getExteriorRing(),i=t.locatePointInRing(e,r);if(i!==q.INTERIOR)return i;for(var o=0;o<n.getNumInteriorRing();o++){var s=n.getInteriorRingN(o),a=t.locatePointInRing(e,s);if(a===q.BOUNDARY)return q.BOUNDARY;if(a===q.INTERIOR)return q.EXTERIOR}return q.INTERIOR}},{key:"locatePointInRing",value:function(t,e){return e.getEnvelopeInternal().intersects(t)?we.locateInRing(t,e.getCoordinates()):q.EXTERIOR}},{key:"containsPointInPolygon",value:function(e,n){return q.EXTERIOR!==t.locatePointInPolygon(e,n)}},{key:"locateInGeometry",value:function(e,n){if(n instanceof kt)return t.locatePointInPolygon(e,n);if(n instanceof jt)for(var r=new Rn(n);r.hasNext();){var i=r.next();if(i!==n){var o=t.locateInGeometry(e,i);if(o!==q.EXTERIOR)return o}}return q.EXTERIOR}},{key:"isContained",value:function(e,n){return q.EXTERIOR!==t.locate(e,n)}},{key:"locate",value:function(e,n){return n.isEmpty()?q.EXTERIOR:n.getEnvelopeInternal().intersects(e)?t.locateInGeometry(e,n):q.EXTERIOR}}])}(),Bn=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"getNextCW",value:function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return 0===e&&(n=this._edgeList.size()-1),this._edgeList.get(n)}},{key:"propagateSideLabels",value:function(t){for(var e=q.NONE,n=this.iterator();n.hasNext();){var r=n.next().getLabel();r.isArea(t)&&r.getLocation(t,K.LEFT)!==q.NONE&&(e=r.getLocation(t,K.LEFT))}if(e===q.NONE)return null;for(var i=e,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getLabel();if(a.getLocation(t,K.ON)===q.NONE&&a.setLocation(t,K.ON,i),a.isArea(t)){var u=a.getLocation(t,K.LEFT),l=a.getLocation(t,K.RIGHT);if(l!==q.NONE){if(l!==i)throw new At("side location conflict",s.getCoordinate());u===q.NONE&&F.shouldNeverReachHere("found single null side (at "+s.getCoordinate()+")"),i=u}else F.isTrue(a.getLocation(t,K.LEFT)===q.NONE,"found single null side"),a.setLocation(t,K.RIGHT,i),a.setLocation(t,K.LEFT,i)}}}},{key:"getCoordinate",value:function(){var t=this.iterator();return t.hasNext()?t.next().getCoordinate():null}},{key:"print",value:function(t){yt.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();)e.next().print(t)}},{key:"isAreaLabelsConsistent",value:function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)}},{key:"checkAreaLabelsConsistent",value:function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,r=e.get(n).getLabel().getLocation(t,K.LEFT);F.isTrue(r!==q.NONE,"Found unlabelled area edge");for(var i=r,o=this.iterator();o.hasNext();){var s=o.next().getLabel();F.isTrue(s.isArea(t),"Found non-area edge");var a=s.getLocation(t,K.LEFT),u=s.getLocation(t,K.RIGHT);if(a===u)return!1;if(u!==i)return!1;i=a}return!0}},{key:"findIndex",value:function(t){this.iterator();for(var e=0;e<this._edgeList.size();e++)if(this._edgeList.get(e)===t)return e;return-1}},{key:"iterator",value:function(){return this.getEdges().iterator()}},{key:"getEdges",value:function(){return null===this._edgeList&&(this._edgeList=new dt(this._edgeMap.values())),this._edgeList}},{key:"getLocation",value:function(t,e,n){return this._ptInAreaLocation[t]===q.NONE&&(this._ptInAreaLocation[t]=Ln.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]}},{key:"toString",value:function(){var t=new it;t.append("EdgeEndStar: "+this.getCoordinate()),t.append("\n");for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append("\n")}return t.toString()}},{key:"computeEdgeEndLabels",value:function(t){for(var e=this.iterator();e.hasNext();)e.next().computeLabel(t)}},{key:"computeLabelling",value:function(t){this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var e=[!1,!1],n=this.iterator();n.hasNext();)for(var r=n.next().getLabel(),i=0;i<2;i++)r.isLine(i)&&r.getLocation(i)===q.BOUNDARY&&(e[i]=!0);for(var o=this.iterator();o.hasNext();)for(var s=o.next(),a=s.getLabel(),u=0;u<2;u++)if(a.isAnyNull(u)){var l=q.NONE;if(e[u])l=q.EXTERIOR;else{var c=s.getCoordinate();l=this.getLocation(u,c,t)}a.setAllLocationsIfNull(u,l)}}},{key:"getDegree",value:function(){return this._edgeMap.size()}},{key:"insertEdgeEnd",value:function(t,e){this._edgeMap.put(t,e),this._edgeList=null}}],[{key:"constructor_",value:function(){this._edgeMap=new Ne,this._edgeList=null,this._ptInAreaLocation=[q.NONE,q.NONE]}}]),kn=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"linkResultDirectedEdges",value:function(){this.getResultAreaEdges();for(var t=null,e=null,n=this._SCANNING_FOR_INCOMING,r=0;r<this._resultAreaEdgeList.size();r++){var i=this._resultAreaEdgeList.get(r),o=i.getSym();if(i.getLabel().isArea())switch(null===t&&i.isInResult()&&(t=i),n){case this._SCANNING_FOR_INCOMING:if(!o.isInResult())continue;e=o,n=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!i.isInResult())continue;e.setNext(i),n=this._SCANNING_FOR_INCOMING}}if(n===this._LINKING_TO_OUTGOING){if(null===t)throw new At("no outgoing dirEdge found",this.getCoordinate());F.isTrue(t.isInResult(),"unable to link last incoming dirEdge"),e.setNext(t)}}},{key:"insert",value:function(t){var e=t;this.insertEdgeEnd(e,e)}},{key:"getRightmostEdge",value:function(){var t=this.getEdges(),e=t.size();if(e<1)return null;var n=t.get(0);if(1===e)return n;var r=t.get(e-1),i=n.getQuadrant(),o=r.getQuadrant();return De.isNorthern(i)&&De.isNorthern(o)?n:De.isNorthern(i)||De.isNorthern(o)?0!==n.getDy()?n:0!==r.getDy()?r:(F.shouldNeverReachHere("found two horizontal edges incident on node"),null):r}},{key:"print",value:function(t){yt.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();t.print("out "),n.print(t),t.println(),t.print("in "),n.getSym().print(t),t.println()}}},{key:"getResultAreaEdges",value:function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new dt;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this._resultAreaEdgeList.add(e)}return this._resultAreaEdgeList}},{key:"updateLabelling",value:function(t){for(var e=this.iterator();e.hasNext();){var n=e.next().getLabel();n.setAllLocationsIfNull(0,t.getLocation(0)),n.setAllLocationsIfNull(1,t.getLocation(1))}}},{key:"linkAllDirectedEdges",value:function(){this.getEdges();for(var t=null,e=null,n=this._edgeList.size()-1;n>=0;n--){var r=this._edgeList.get(n),i=r.getSym();null===e&&(e=i),null!==t&&i.setNext(t),t=r}e.setNext(t)}},{key:"computeDepths",value:function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(K.LEFT),r=t.getDepth(K.RIGHT),i=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,i)!==r)throw new At("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[1],s=arguments[2],a=arguments[0];a<o;a++){var u=this._edgeList.get(a);u.setEdgeDepths(K.RIGHT,s),s=u.getDepth(K.LEFT)}return s}}},{key:"mergeSymLabels",value:function(){for(var t=this.iterator();t.hasNext();){var e=t.next();e.getLabel().merge(e.getSym().getLabel())}}},{key:"linkMinimalDirectedEdges",value:function(t){for(var e=null,n=null,r=this._SCANNING_FOR_INCOMING,i=this._resultAreaEdgeList.size()-1;i>=0;i--){var o=this._resultAreaEdgeList.get(i),s=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),r){case this._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==t)continue;n=s,r=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),r=this._SCANNING_FOR_INCOMING}}r===this._LINKING_TO_OUTGOING&&(F.isTrue(null!==e,"found null for first outgoing dirEdge"),F.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),n.setNextMin(e))}},{key:"getOutgoingDegree",value:function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();)e.next().isInResult()&&t++;return t}if(1===arguments.length){for(var n=arguments[0],r=0,i=this.iterator();i.hasNext();)i.next().getEdgeRing()===n&&r++;return r}}},{key:"getLabel",value:function(){return this._label}},{key:"findCoveredLineEdges",value:function(){for(var t=q.NONE,e=this.iterator();e.hasNext();){var n=e.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=q.INTERIOR;break}if(r.isInResult()){t=q.EXTERIOR;break}}}if(t===q.NONE)return null;for(var i=t,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getSym();s.isLineEdge()?s.getEdge().setCovered(i===q.INTERIOR):(s.isInResult()&&(i=q.EXTERIOR),a.isInResult()&&(i=q.INTERIOR))}}},{key:"computeLabelling",value:function(t){A(r,"computeLabelling",this,1).call(this,t),this._label=new xe(q.NONE);for(var e=this.iterator();e.hasNext();)for(var n=e.next().getEdge().getLabel(),i=0;i<2;i++){var o=n.getLocation(i);o!==q.INTERIOR&&o!==q.BOUNDARY||this._label.setLocation(i,q.INTERIOR)}}}],[{key:"constructor_",value:function(){this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}}])}(Bn),Nn=function(t){function r(){return n(this,r),e(this,r)}return l(r,t),o(r,[{key:"createNode",value:function(t){return new Me(t,new kn)}}])}(Ge),Fn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"compareTo",value:function(e){var n=e;return t.compareOriented(this._pts,this._orientation,n._pts,n._orientation)}},{key:"interfaces_",get:function(){return[b]}}],[{key:"constructor_",value:function(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)}},{key:"orientation",value:function(t){return 1===Xt.increasingDirection(t)}},{key:"compareOriented",value:function(t,e,n,r){for(var i=e?1:-1,o=r?1:-1,s=e?t.length:-1,a=r?n.length:-1,u=e?0:t.length-1,l=r?0:n.length-1;;){var c=t[u].compareTo(n[l]);if(0!==c)return c;var h=(u+=i)===s,A=(l+=o)===a;if(h&&!A)return-1;if(!h&&A)return 1;if(h&&A)return 0}}}])}(),Dn=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"print",value:function(t){t.print("MULTILINESTRING ( ");for(var e=0;e<this._edges.size();e++){var n=this._edges.get(e);e>0&&t.print(","),t.print("(");for(var r=n.getCoordinates(),i=0;i<r.length;i++)i>0&&t.print(","),t.print(r[i].x+" "+r[i].y);t.println(")")}t.print(") ")}},{key:"addAll",value:function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())}},{key:"findEdgeIndex",value:function(t){for(var e=0;e<this._edges.size();e++)if(this._edges.get(e).equals(t))return e;return-1}},{key:"iterator",value:function(){return this._edges.iterator()}},{key:"getEdges",value:function(){return this._edges}},{key:"get",value:function(t){return this._edges.get(t)}},{key:"findEqualEdge",value:function(t){var e=new Fn(t.getCoordinates());return this._ocaMap.get(e)}},{key:"add",value:function(t){this._edges.add(t);var e=new Fn(t.getCoordinates());this._ocaMap.put(e,t)}}],[{key:"constructor_",value:function(){this._edges=new dt,this._ocaMap=new Ne}}]),jn=o(function t(){n(this,t)},[{key:"processIntersections",value:function(t,e,n,r){}},{key:"isDone",value:function(){}}]),Un=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"isTrivialIntersection",value:function(e,n,r,i){if(e===r&&1===this._li.getIntersectionNum()){if(t.isAdjacentSegments(n,i))return!0;if(e.isClosed()){var o=e.size()-1;if(0===n&&i===o||0===i&&n===o)return!0}}return!1}},{key:"getProperIntersectionPoint",value:function(){return this._properIntersectionPoint}},{key:"hasProperInteriorIntersection",value:function(){return this._hasProperInterior}},{key:"getLineIntersector",value:function(){return this._li}},{key:"hasProperIntersection",value:function(){return this._hasProper}},{key:"processIntersections",value:function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[r],a=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,s,a),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))}},{key:"hasIntersection",value:function(){return this._hasIntersection}},{key:"isDone",value:function(){return!1}},{key:"hasInteriorIntersection",value:function(){return this._hasInterior}},{key:"interfaces_",get:function(){return[jn]}}],[{key:"constructor_",value:function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t}},{key:"isAdjacentSegments",value:function(t,e){return 1===Math.abs(t-e)}}])}(),Gn=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"getSegmentIndex",value:function(){return this.segmentIndex}},{key:"getCoordinate",value:function(){return this.coord}},{key:"print",value:function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)}},{key:"compareTo",value:function(t){var e=t;return this.compare(e.segmentIndex,e.dist)}},{key:"isEndPoint",value:function(t){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===t}},{key:"toString",value:function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist}},{key:"getDistance",value:function(){return this.dist}},{key:"compare",value:function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0}},{key:"interfaces_",get:function(){return[b]}}],[{key:"constructor_",value:function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new G(t),this.segmentIndex=e,this.dist=n}}]),zn=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"print",value:function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)}},{key:"iterator",value:function(){return this._nodeMap.values().iterator()}},{key:"addSplitEdges",value:function(t){this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next(),i=this.createSplitEdge(n,r);t.add(i),n=r}}},{key:"addEndpoints",value:function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)}},{key:"createSplitEdge",value:function(t,e){var n=e.segmentIndex-t.segmentIndex+2,r=this.edge.pts[e.segmentIndex],i=e.dist>0||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),s=0;o[s++]=new G(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this.edge.pts[a];return i&&(o[s]=e.coord),new Yn(o,new xe(this.edge._label))}},{key:"add",value:function(t,e,n){var r=new Gn(t,e,n),i=this._nodeMap.get(r);return null!==i?i:(this._nodeMap.put(r,r),r)}},{key:"isIntersection",value:function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1}}],[{key:"constructor_",value:function(){this._nodeMap=new Ne,this.edge=null;var t=arguments[0];this.edge=t}}]),Vn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"isIntersects",value:function(){return!this.isDisjoint()}},{key:"isCovers",value:function(){return(t.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])||t.isTrue(this._matrix[q.INTERIOR][q.BOUNDARY])||t.isTrue(this._matrix[q.BOUNDARY][q.INTERIOR])||t.isTrue(this._matrix[q.BOUNDARY][q.BOUNDARY]))&&this._matrix[q.EXTERIOR][q.INTERIOR]===Tt.FALSE&&this._matrix[q.EXTERIOR][q.BOUNDARY]===Tt.FALSE}},{key:"isCoveredBy",value:function(){return(t.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])||t.isTrue(this._matrix[q.INTERIOR][q.BOUNDARY])||t.isTrue(this._matrix[q.BOUNDARY][q.INTERIOR])||t.isTrue(this._matrix[q.BOUNDARY][q.BOUNDARY]))&&this._matrix[q.INTERIOR][q.EXTERIOR]===Tt.FALSE&&this._matrix[q.BOUNDARY][q.EXTERIOR]===Tt.FALSE}},{key:"set",value:function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<t.length;e++){var n=Math.trunc(e/3),r=e%3;this._matrix[n][r]=Tt.toDimensionValue(t.charAt(e))}else if(3===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2];this._matrix[i][o]=s}}},{key:"isContains",value:function(){return t.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&this._matrix[q.EXTERIOR][q.INTERIOR]===Tt.FALSE&&this._matrix[q.EXTERIOR][q.BOUNDARY]===Tt.FALSE}},{key:"setAtLeast",value:function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<t.length;e++){var n=Math.trunc(e/3),r=e%3;this.setAtLeast(n,r,Tt.toDimensionValue(t.charAt(e)))}else if(3===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2];this._matrix[i][o]<s&&(this._matrix[i][o]=s)}}},{key:"setAtLeastIfValid",value:function(t,e,n){t>=0&&e>=0&&this.setAtLeast(t,e,n)}},{key:"isWithin",value:function(){return t.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&this._matrix[q.INTERIOR][q.EXTERIOR]===Tt.FALSE&&this._matrix[q.BOUNDARY][q.EXTERIOR]===Tt.FALSE}},{key:"isTouches",value:function(e,n){return e>n?this.isTouches(n,e):(e===Tt.A&&n===Tt.A||e===Tt.L&&n===Tt.L||e===Tt.L&&n===Tt.A||e===Tt.P&&n===Tt.A||e===Tt.P&&n===Tt.L)&&this._matrix[q.INTERIOR][q.INTERIOR]===Tt.FALSE&&(t.isTrue(this._matrix[q.INTERIOR][q.BOUNDARY])||t.isTrue(this._matrix[q.BOUNDARY][q.INTERIOR])||t.isTrue(this._matrix[q.BOUNDARY][q.BOUNDARY]))}},{key:"isOverlaps",value:function(e,n){return e===Tt.P&&n===Tt.P||e===Tt.A&&n===Tt.A?t.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&t.isTrue(this._matrix[q.INTERIOR][q.EXTERIOR])&&t.isTrue(this._matrix[q.EXTERIOR][q.INTERIOR]):e===Tt.L&&n===Tt.L&&1===this._matrix[q.INTERIOR][q.INTERIOR]&&t.isTrue(this._matrix[q.INTERIOR][q.EXTERIOR])&&t.isTrue(this._matrix[q.EXTERIOR][q.INTERIOR])}},{key:"isEquals",value:function(e,n){return e===n&&t.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&this._matrix[q.INTERIOR][q.EXTERIOR]===Tt.FALSE&&this._matrix[q.BOUNDARY][q.EXTERIOR]===Tt.FALSE&&this._matrix[q.EXTERIOR][q.INTERIOR]===Tt.FALSE&&this._matrix[q.EXTERIOR][q.BOUNDARY]===Tt.FALSE}},{key:"toString",value:function(){for(var t=new Jt("123456789"),e=0;e<3;e++)for(var n=0;n<3;n++)t.setCharAt(3*e+n,Tt.toDimensionSymbol(this._matrix[e][n]));return t.toString()}},{key:"setAll",value:function(t){for(var e=0;e<3;e++)for(var n=0;n<3;n++)this._matrix[e][n]=t}},{key:"get",value:function(t,e){return this._matrix[t][e]}},{key:"transpose",value:function(){var t=this._matrix[1][0];return this._matrix[1][0]=this._matrix[0][1],this._matrix[0][1]=t,t=this._matrix[2][0],this._matrix[2][0]=this._matrix[0][2],this._matrix[0][2]=t,t=this._matrix[2][1],this._matrix[2][1]=this._matrix[1][2],this._matrix[1][2]=t,this}},{key:"matches",value:function(e){if(9!==e.length)throw new v("Should be length 9: "+e);for(var n=0;n<3;n++)for(var r=0;r<3;r++)if(!t.matches(this._matrix[n][r],e.charAt(3*n+r)))return!1;return!0}},{key:"add",value:function(t){for(var e=0;e<3;e++)for(var n=0;n<3;n++)this.setAtLeast(e,n,t.get(e,n))}},{key:"isDisjoint",value:function(){return this._matrix[q.INTERIOR][q.INTERIOR]===Tt.FALSE&&this._matrix[q.INTERIOR][q.BOUNDARY]===Tt.FALSE&&this._matrix[q.BOUNDARY][q.INTERIOR]===Tt.FALSE&&this._matrix[q.BOUNDARY][q.BOUNDARY]===Tt.FALSE}},{key:"isCrosses",value:function(e,n){return e===Tt.P&&n===Tt.L||e===Tt.P&&n===Tt.A||e===Tt.L&&n===Tt.A?t.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&t.isTrue(this._matrix[q.INTERIOR][q.EXTERIOR]):e===Tt.L&&n===Tt.P||e===Tt.A&&n===Tt.P||e===Tt.A&&n===Tt.L?t.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&t.isTrue(this._matrix[q.EXTERIOR][q.INTERIOR]):e===Tt.L&&n===Tt.L&&0===this._matrix[q.INTERIOR][q.INTERIOR]}},{key:"interfaces_",get:function(){return[w]}}],[{key:"constructor_",value:function(){if(this._matrix=null,0===arguments.length)this._matrix=Array(3).fill().map(function(){return Array(3)}),this.setAll(Tt.FALSE);else if(1===arguments.length)if("string"==typeof arguments[0]){var e=arguments[0];t.constructor_.call(this),this.set(e)}else if(arguments[0]instanceof t){var n=arguments[0];t.constructor_.call(this),this._matrix[q.INTERIOR][q.INTERIOR]=n._matrix[q.INTERIOR][q.INTERIOR],this._matrix[q.INTERIOR][q.BOUNDARY]=n._matrix[q.INTERIOR][q.BOUNDARY],this._matrix[q.INTERIOR][q.EXTERIOR]=n._matrix[q.INTERIOR][q.EXTERIOR],this._matrix[q.BOUNDARY][q.INTERIOR]=n._matrix[q.BOUNDARY][q.INTERIOR],this._matrix[q.BOUNDARY][q.BOUNDARY]=n._matrix[q.BOUNDARY][q.BOUNDARY],this._matrix[q.BOUNDARY][q.EXTERIOR]=n._matrix[q.BOUNDARY][q.EXTERIOR],this._matrix[q.EXTERIOR][q.INTERIOR]=n._matrix[q.EXTERIOR][q.INTERIOR],this._matrix[q.EXTERIOR][q.BOUNDARY]=n._matrix[q.EXTERIOR][q.BOUNDARY],this._matrix[q.EXTERIOR][q.EXTERIOR]=n._matrix[q.EXTERIOR][q.EXTERIOR]}}},{key:"matches",value:function(){if(Number.isInteger(arguments[0])&&"string"==typeof arguments[1]){var e=arguments[0],n=arguments[1];return n===Tt.SYM_DONTCARE||n===Tt.SYM_TRUE&&(e>=0||e===Tt.TRUE)||n===Tt.SYM_FALSE&&e===Tt.FALSE||n===Tt.SYM_P&&e===Tt.P||n===Tt.SYM_L&&e===Tt.L||n===Tt.SYM_A&&e===Tt.A}if("string"==typeof arguments[0]&&"string"==typeof arguments[1]){var r=arguments[1];return new t(arguments[0]).matches(r)}}},{key:"isTrue",value:function(t){return t>=0||t===Tt.TRUE}}])}(),Hn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"size",value:function(){return this._size}},{key:"addAll",value:function(t){return null===t||0===t.length?null:(this.ensureCapacity(this._size+t.length),yt.arraycopy(t,0,this._data,this._size,t.length),void(this._size+=t.length))}},{key:"ensureCapacity",value:function(t){if(t<=this._data.length)return null;var e=Math.max(t,2*this._data.length);this._data=Lt.copyOf(this._data,e)}},{key:"toArray",value:function(){var t=new Array(this._size).fill(null);return yt.arraycopy(this._data,0,t,0,this._size),t}},{key:"add",value:function(t){this.ensureCapacity(this._size+1),this._data[this._size]=t,++this._size}}],[{key:"constructor_",value:function(){if(this._data=null,this._size=0,0===arguments.length)t.constructor_.call(this,10);else if(1===arguments.length){var e=arguments[0];this._data=new Array(e).fill(null)}}}])}(),qn=function(){function t(){n(this,t)}return o(t,[{key:"getChainStartIndices",value:function(t){var e=0,n=new Hn(Math.trunc(t.length/2));n.add(e);do{var r=this.findChainEnd(t,e);n.add(r),e=r}while(e<t.length-1);return n.toArray()}},{key:"findChainEnd",value:function(t,e){for(var n=De.quadrant(t[e],t[e+1]),r=e+1;r<t.length&&De.quadrant(t[r-1],t[r])===n;)r++;return r-1}},{key:"OLDgetChainStartIndices",value:function(e){var n=0,r=new dt;r.add(n);do{var i=this.findChainEnd(e,n);r.add(i),n=i}while(n<e.length-1);return t.toIntArray(r)}}],[{key:"toIntArray",value:function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e}}])}(),Wn=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"getCoordinates",value:function(){return this.pts}},{key:"getMaxX",value:function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n}},{key:"getMinX",value:function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n}},{key:"computeIntersectsForChain",value:function(){if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],r)}else if(6===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],u=arguments[4],l=arguments[5];if(o-i==1&&u-a==1)return l.addIntersections(this.e,i,s.e,a),null;if(!this.overlaps(i,o,s,a,u))return null;var c=Math.trunc((i+o)/2),h=Math.trunc((a+u)/2);i<c&&(a<h&&this.computeIntersectsForChain(i,c,s,a,h,l),h<u&&this.computeIntersectsForChain(i,c,s,h,u,l)),c<o&&(a<h&&this.computeIntersectsForChain(c,o,s,a,h,l),h<u&&this.computeIntersectsForChain(c,o,s,h,u,l))}}},{key:"overlaps",value:function(t,e,n,r,i){return V.intersects(this.pts[t],this.pts[e],n.pts[r],n.pts[i])}},{key:"getStartIndexes",value:function(){return this.startIndex}},{key:"computeIntersects",value:function(t,e){for(var n=0;n<this.startIndex.length-1;n++)for(var r=0;r<t.startIndex.length-1;r++)this.computeIntersectsForChain(n,t,r,e)}}],[{key:"constructor_",value:function(){this.e=null,this.pts=null,this.startIndex=null;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new qn;this.startIndex=e.getChainStartIndices(this.pts)}}]),Xn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"getDepth",value:function(t,e){return this._depth[t][e]}},{key:"setDepth",value:function(t,e,n){this._depth[t][e]=n}},{key:"isNull",value:function(){if(0===arguments.length){for(var e=0;e<2;e++)for(var n=0;n<3;n++)if(this._depth[e][n]!==t.NULL_VALUE)return!1;return!0}if(1===arguments.length){var r=arguments[0];return this._depth[r][1]===t.NULL_VALUE}if(2===arguments.length){var i=arguments[0],o=arguments[1];return this._depth[i][o]===t.NULL_VALUE}}},{key:"normalize",value:function(){for(var t=0;t<2;t++)if(!this.isNull(t)){var e=this._depth[t][1];this._depth[t][2]<e&&(e=this._depth[t][2]),e<0&&(e=0);for(var n=1;n<3;n++){var r=0;this._depth[t][n]>e&&(r=1),this._depth[t][n]=r}}}},{key:"getDelta",value:function(t){return this._depth[t][K.RIGHT]-this._depth[t][K.LEFT]}},{key:"getLocation",value:function(t,e){return this._depth[t][e]<=0?q.EXTERIOR:q.INTERIOR}},{key:"toString",value:function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]}},{key:"add",value:function(){if(1===arguments.length)for(var e=arguments[0],n=0;n<2;n++)for(var r=1;r<3;r++){var i=e.getLocation(n,r);i!==q.EXTERIOR&&i!==q.INTERIOR||(this.isNull(n,r)?this._depth[n][r]=t.depthAtLocation(i):this._depth[n][r]+=t.depthAtLocation(i))}else if(3===arguments.length){var o=arguments[0],s=arguments[1];arguments[2]===q.INTERIOR&&this._depth[o][s]++}}}],[{key:"constructor_",value:function(){this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var n=0;n<3;n++)this._depth[e][n]=t.NULL_VALUE}},{key:"depthAtLocation",value:function(e){return e===q.EXTERIOR?0:e===q.INTERIOR?1:t.NULL_VALUE}}])}();Xn.NULL_VALUE=-1;var Yn=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"getDepth",value:function(){return this._depth}},{key:"getCollapsedEdge",value:function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new r(t,xe.toLineLabel(this._label))}},{key:"isIsolated",value:function(){return this._isIsolated}},{key:"getCoordinates",value:function(){return this.pts}},{key:"setIsolated",value:function(t){this._isIsolated=t}},{key:"setName",value:function(t){this._name=t}},{key:"equals",value:function(t){if(!(t instanceof r))return!1;var e=t;if(this.pts.length!==e.pts.length)return!1;for(var n=!0,i=!0,o=this.pts.length,s=0;s<this.pts.length;s++)if(this.pts[s].equals2D(e.pts[s])||(n=!1),this.pts[s].equals2D(e.pts[--o])||(i=!1),!n&&!i)return!1;return!0}},{key:"getCoordinate",value:function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}}},{key:"print",value:function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(") "+this._label+" "+this._depthDelta)}},{key:"computeIM",value:function(t){r.updateIM(this._label,t)}},{key:"isCollapsed",value:function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])}},{key:"isClosed",value:function(){return this.pts[0].equals(this.pts[this.pts.length-1])}},{key:"getMaximumSegmentIndex",value:function(){return this.pts.length-1}},{key:"getDepthDelta",value:function(){return this._depthDelta}},{key:"getNumPoints",value:function(){return this.pts.length}},{key:"printReverse",value:function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")}},{key:"getMonotoneChainEdge",value:function(){return null===this._mce&&(this._mce=new Wn(this)),this._mce}},{key:"getEnvelope",value:function(){if(null===this._env){this._env=new V;for(var t=0;t<this.pts.length;t++)this._env.expandToInclude(this.pts[t])}return this._env}},{key:"addIntersection",value:function(t,e,n,r){var i=new G(t.getIntersection(r)),o=e,s=t.getEdgeDistance(n,r),a=o+1;if(a<this.pts.length){var u=this.pts[a];i.equals2D(u)&&(o=a,s=0)}this.eiList.add(i,o,s)}},{key:"toString",value:function(){var t=new Jt;t.append("edge "+this._name+": "),t.append("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(") "+this._label+" "+this._depthDelta),t.toString()}},{key:"isPointwiseEqual",value:function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e<this.pts.length;e++)if(!this.pts[e].equals2D(t.pts[e]))return!1;return!0}},{key:"setDepthDelta",value:function(t){this._depthDelta=t}},{key:"getEdgeIntersectionList",value:function(){return this.eiList}},{key:"addIntersections",value:function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++)this.addIntersection(t,e,n,r)}}],[{key:"constructor_",value:function(){if(this.pts=null,this._env=null,this.eiList=new zn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Xn,this._depthDelta=0,1===arguments.length){var t=arguments[0];r.constructor_.call(this,t,null)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.pts=e,this._label=n}}},{key:"updateIM",value:function(){if(!(2===arguments.length&&arguments[1]instanceof Vn&&arguments[0]instanceof xe))return A(r,"updateIM",this).apply(this,arguments);var t=arguments[0],e=arguments[1];e.setAtLeastIfValid(t.getLocation(0,K.ON),t.getLocation(1,K.ON),1),t.isArea()&&(e.setAtLeastIfValid(t.getLocation(0,K.LEFT),t.getLocation(1,K.LEFT),2),e.setAtLeastIfValid(t.getLocation(0,K.RIGHT),t.getLocation(1,K.RIGHT),2))}}])}(Ce),Qn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"setWorkingPrecisionModel",value:function(t){this._workingPrecisionModel=t}},{key:"insertUniqueEdge",value:function(e){var n=this._edgeList.findEqualEdge(e);if(null!==n){var r=n.getLabel(),i=e.getLabel();n.isPointwiseEqual(e)||(i=new xe(e.getLabel())).flip(),r.merge(i);var o=t.depthDelta(i),s=n.getDepthDelta()+o;n.setDepthDelta(s)}else this._edgeList.add(e),e.setDepthDelta(t.depthDelta(e.getLabel()))}},{key:"buildSubgraphs",value:function(t,e){for(var n=new dt,r=t.iterator();r.hasNext();){var i=r.next(),o=i.getRightmostCoordinate(),s=new Sn(n).getDepth(o);i.computeDepth(s),i.findResultEdges(),n.add(i),e.add(i.getDirectedEdges(),i.getNodes())}}},{key:"createSubgraphs",value:function(t){for(var e=new dt,n=t.getNodes().iterator();n.hasNext();){var r=n.next();if(!r.isVisited()){var i=new gt;i.create(r),e.add(i)}}return Qe.sort(e,Qe.reverseOrder()),e}},{key:"createEmptyResultGeometry",value:function(){return this._geomFact.createPolygon()}},{key:"getNoder",value:function(t){if(null!==this._workingNoder)return this._workingNoder;var e=new yn,n=new _e;return n.setPrecisionModel(t),e.setSegmentIntersector(new Un(n)),e}},{key:"buffer",value:function(t,e){var n=this._workingPrecisionModel;null===n&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var r=new xn(n,this._bufParams),i=new In(t,e,r).getCurves();if(i.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(i,n),this._graph=new ze(new Nn),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),s=new Ve(this._geomFact);this.buildSubgraphs(o,s);var a=s.getPolygons();return a.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(a)}},{key:"computeNodedEdges",value:function(t,e){var n=this.getNoder(e);n.computeNodes(t);for(var r=n.getNodedSubstrings().iterator();r.hasNext();){var i=r.next(),o=i.getCoordinates();if(2!==o.length||!o[0].equals2D(o[1])){var s=i.getData(),a=new Yn(i.getCoordinates(),new xe(s));this.insertUniqueEdge(a)}}}},{key:"setNoder",value:function(t){this._workingNoder=t}}],[{key:"constructor_",value:function(){this._bufParams=null,this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Dn;var t=arguments[0];this._bufParams=t}},{key:"depthDelta",value:function(t){var e=t.getLocation(0,K.LEFT),n=t.getLocation(0,K.RIGHT);return e===q.INTERIOR&&n===q.EXTERIOR?1:e===q.EXTERIOR&&n===q.INTERIOR?-1:0}},{key:"convertSegStrings",value:function(t){for(var e=new oe,n=new dt;t.hasNext();){var r=t.next(),i=e.createLineString(r.getCoordinates());n.add(i)}return e.buildGeometry(n)}}])}(),Jn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"rescale",value:function(){if(rt(arguments[0],W))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.rescale(e.getCoordinates())}else if(arguments[0]instanceof Array){for(var n=arguments[0],r=0;r<n.length;r++)n[r].x=n[r].x/this._scaleFactor+this._offsetX,n[r].y=n[r].y/this._scaleFactor+this._offsetY;2===n.length&&n[0].equals2D(n[1])&&yt.out.println(n)}}},{key:"scale",value:function(){if(rt(arguments[0],W)){for(var t=arguments[0],e=new dt(t.size()),n=t.iterator();n.hasNext();){var r=n.next();e.add(new hn(this.scale(r.getCoordinates()),r.getData()))}return e}if(arguments[0]instanceof Array){for(var i=arguments[0],o=new Array(i.length).fill(null),s=0;s<i.length;s++)o[s]=new G(Math.round((i[s].x-this._offsetX)*this._scaleFactor),Math.round((i[s].y-this._offsetY)*this._scaleFactor),i[s].getZ());return Xt.removeRepeatedPoints(o)}}},{key:"isIntegerPrecision",value:function(){return 1===this._scaleFactor}},{key:"getNodedSubstrings",value:function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t}},{key:"computeNodes",value:function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)}},{key:"interfaces_",get:function(){return[gn]}}],[{key:"constructor_",value:function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var e=arguments[0],n=arguments[1];t.constructor_.call(this,e,n,0,0)}else if(4===arguments.length){var r=arguments[0],i=arguments[1];this._noder=r,this._scaleFactor=i,this._isScaled=!this.isIntegerPrecision()}}}])}(),Zn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"checkEndPtVertexIntersections",value:function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next().getCoordinates();this.checkEndPtVertexIntersections(e[0],this._segStrings),this.checkEndPtVertexIntersections(e[e.length-1],this._segStrings)}else if(2===arguments.length)for(var n=arguments[0],r=arguments[1].iterator();r.hasNext();)for(var i=r.next().getCoordinates(),o=1;o<i.length-1;o++)if(i[o].equals(n))throw new k("found endpt/interior pt intersection at index "+o+" :pt "+n)}},{key:"checkInteriorIntersections",value:function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();)for(var e=t.next(),n=this._segStrings.iterator();n.hasNext();){var r=n.next();this.checkInteriorIntersections(e,r)}else if(2===arguments.length)for(var i=arguments[0],o=arguments[1],s=i.getCoordinates(),a=o.getCoordinates(),u=0;u<s.length-1;u++)for(var l=0;l<a.length-1;l++)this.checkInteriorIntersections(i,u,o,l);else if(4===arguments.length){var c=arguments[0],h=arguments[1],A=arguments[2],f=arguments[3];if(c===A&&h===f)return null;var d=c.getCoordinates()[h],p=c.getCoordinates()[h+1],g=A.getCoordinates()[f],m=A.getCoordinates()[f+1];if(this._li.computeIntersection(d,p,g,m),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,d,p)||this.hasInteriorIntersection(this._li,g,m)))throw new k("found non-noded intersection at "+d+"-"+p+" and "+g+"-"+m)}}},{key:"checkValid",value:function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()}},{key:"checkCollapses",value:function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next();this.checkCollapses(e)}else if(1===arguments.length)for(var n=arguments[0].getCoordinates(),r=0;r<n.length-2;r++)this.checkCollapse(n[r],n[r+1],n[r+2])}},{key:"hasInteriorIntersection",value:function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++){var i=t.getIntersection(r);if(!i.equals(e)&&!i.equals(n))return!0}return!1}},{key:"checkCollapse",value:function(e,n,r){if(e.equals(r))throw new k("found non-noded collapse at "+t.fact.createLineString([e,n,r]))}}],[{key:"constructor_",value:function(){this._li=new _e,this._segStrings=null;var t=arguments[0];this._segStrings=t}}])}();Zn.fact=new oe;var Kn=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"intersectsScaled",value:function(t,e){var n=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),o=Math.max(t.y,e.y),s=this._maxx<n||this._minx>r||this._maxy<i||this._miny>o;if(s)return!1;var a=this.intersectsToleranceSquare(t,e);return F.isTrue(!(s&&a),"Found bad envelope test"),a}},{key:"initCorners",value:function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new G(this._maxx,this._maxy),this._corner[1]=new G(this._minx,this._maxy),this._corner[2]=new G(this._minx,this._miny),this._corner[3]=new G(this._maxx,this._miny)}},{key:"intersects",value:function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))}},{key:"scale",value:function(t){return Math.round(t*this._scaleFactor)}},{key:"getCoordinate",value:function(){return this._originalPt}},{key:"copyScaled",value:function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)}},{key:"getSafeEnvelope",value:function(){if(null===this._safeEnv){var e=t.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new V(this._originalPt.x-e,this._originalPt.x+e,this._originalPt.y-e,this._originalPt.y+e)}return this._safeEnv}},{key:"intersectsPixelClosure",value:function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))))}},{key:"intersectsToleranceSquare",value:function(t,e){var n=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||
2(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper()||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper()||n&&r||t.equals(this._pt)||e.equals(this._pt)))))}},{key:"addSnappedNode",value:function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return!!this.intersects(n,r)&&(t.addIntersection(this.getCoordinate(),e),!0)}}],[{key:"constructor_",value:function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new v("Scale factor must be non-zero");1!==e&&(this._pt=new G(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new G,this._p1Scaled=new G),this.initCorners(this._pt)}}])}();Kn.SAFE_ENV_EXPANSION_FACTOR=.75;var $n=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"select",value:function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[1];arguments[0].getLineSegment(t,this.selectedSegment),this.select(this.selectedSegment)}}}],[{key:"constructor_",value:function(){this.selectedSegment=new An}}]),tr=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"snap",value:function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],r=arguments[1],i=arguments[2],s=e.getSafeEnvelope(),a=new er(e,r,i);return this._index.query(s,new(o(function t(){n(this,t)},[{key:"interfaces_",get:function(){return[Ke]}},{key:"visitItem",value:function(t){t.select(s,a)}}]))),a.isNodeAdded()}}}],[{key:"constructor_",value:function(){this._index=null;var t=arguments[0];this._index=t}}]),er=function(t){function r(){var t;return n(this,r),t=e(this,r),r.constructor_.apply(t,arguments),t}return l(r,t),o(r,[{key:"isNodeAdded",value:function(){return this._isNodeAdded}},{key:"select",value:function(){if(!(2===arguments.length&&Number.isInteger(arguments[1])&&arguments[0]instanceof dn))return A(r,"select",this,1).apply(this,arguments);var t=arguments[1],e=arguments[0].getContext();if(this._parentEdge===e&&(t===this._hotPixelVertexIndex||t+1===this._hotPixelVertexIndex))return null;this._isNodeAdded|=this._hotPixel.addSnappedNode(e,t)}}],[{key:"constructor_",value:function(){this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._hotPixel=t,this._parentEdge=e,this._hotPixelVertexIndex=n}}])}($n);tr.HotPixelSnapAction=er;var nr=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"processIntersections",value:function(t,e,n,r){if(t===n&&e===r)return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[r],a=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u<this._li.getIntersectionNum();u++)this._interiorIntersections.add(this._li.getIntersection(u));t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)}}},{key:"isDone",value:function(){return!1}},{key:"getInteriorIntersections",value:function(){return this._interiorIntersections}},{key:"interfaces_",get:function(){return[jn]}}],[{key:"constructor_",value:function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new dt}}]),rr=o(function t(){n(this,t),t.constructor_.apply(this,arguments)},[{key:"checkCorrectness",value:function(t){var e=hn.getNodedSubstrings(t),n=new Zn(e);try{n.checkValid()}catch(t){if(!(t instanceof y))throw t;t.printStackTrace()}}},{key:"getNodedSubstrings",value:function(){return hn.getNodedSubstrings(this._nodedSegStrings)}},{key:"snapRound",value:function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)}},{key:"findInteriorIntersections",value:function(t,e){var n=new nr(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()}},{key:"computeVertexSnaps",value:function(){if(rt(arguments[0],W))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.computeVertexSnaps(e)}else if(arguments[0]instanceof hn)for(var n=arguments[0],r=n.getCoordinates(),i=0;i<r.length;i++){var o=new Kn(r[i],this._scaleFactor,this._li);this._pointSnapper.snap(o,n,i)&&n.addIntersection(r[i],i)}}},{key:"computeNodes",value:function(t){this._nodedSegStrings=t,this._noder=new yn,this._pointSnapper=new tr(this._noder.getIndex()),this.snapRound(t,this._li)}},{key:"computeIntersectionSnaps",value:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),r=new Kn(n,this._scaleFactor,this._li);this._pointSnapper.snap(r)}}},{key:"interfaces_",get:function(){return[gn]}}
vendor: 5,076 bytes, line 2
2],[{key:"constructor_",value:function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new _e,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()}}]),ir=function(){function t(){n(this,t),t.constructor_.apply(this,arguments)}return o(t,[{key:"bufferFixedPrecision",value:function(t){var e=new Jn(new rr(new ne(1)),t.getScale()),n=new Qn(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)}},{key:"bufferReducedPrecision",value:function(){if(0===arguments.length){for(var e=t.MAX_PRECISION_DIGITS;e>=0;e--){try{this.bufferReducedPrecision(e)}catch(t){if(!(t instanceof At))throw t;this._saveException=t}if(null!==this._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],r=t.precisionScaleFactor(this._argGeom,this._distance,n),i=new ne(r);this.bufferFixedPrecision(i)}}},{key:"computeGeometry",value:function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===ne.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()}},{key:"setQuadrantSegments",value:function(t){this._bufParams.setQuadrantSegments(t)}},{key:"bufferOriginalPrecision",value:function(){try{var t=new Qn(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof k))throw t;this._saveException=t}}},{key:"getResultGeometry",value:function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry}},{key:"setEndCapStyle",value:function(t){this._bufParams.setEndCapStyle(t)}}],[{key:"constructor_",value:function(){if(this._argGeom=null,this._distance=null,this._bufParams=new m,this._resultGeometry=null,this._saveException=null,1===arguments.length){var t=arguments[0];this._argGeom=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}}},{key:"bufferOp",value:function(){if(2===arguments.length){var e=arguments[1];return new t(arguments[0]).getResultGeometry(e)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof H&&"number"==typeof arguments[1]){var n=arguments[1],r=arguments[2],i=new t(arguments[0]);return i.setQuadrantSegments(r),i.getResultGeometry(n)}if(arguments[2]instanceof m&&arguments[0]instanceof H&&"number"==typeof arguments[1]){var o=arguments[1];return new t(arguments[0],arguments[2]).getResultGeometry(o)}}else if(4===arguments.length){var s=arguments[1],a=arguments[2],u=arguments[3],l=new t(arguments[0]);return l.setQuadrantSegments(a),l.setEndCapStyle(u),l.getResultGeometry(s)}}},{key:"precisionScaleFactor",value:function(t,e,n){var r=t.getEnvelopeInternal(),i=vt.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,o)}}])}();ir.CAP_ROUND=m.CAP_ROUND,ir.CAP_BUTT=m.CAP_FLAT,ir.CAP_FLAT=m.CAP_FLAT,ir.CAP_SQUARE=m.CAP_SQUARE,ir.MAX_PRECISION_DIGITS=12;var or=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],sr=o(function t(e){n(this,t),this.geometryFactory=e||new oe},[{key:"read",value:function(t){var e,n=(e="string"==typeof t?JSON.parse(t):t).type;if(!ar[n])throw new Error("Unknown GeoJSON type: "+e.type);return-1!==or.indexOf(n)?ar[n].call(this,e.coordinates):"GeometryCollection"===n?ar[n].call(this,e.geometries):ar[n].call(this,e)}},{key:"write",value:function(t){var e=t.getGeometryType();if(!ur[e])throw new Error("Geometry is not supported");return ur[e].call(this,t)}}]),ar={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var r=t.geometry.type;if(!ar[r])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=ar.bbox.call(this,t.bbox)),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;n<t.features.length;++n)e.features.push(this.read(t.features[n]))}return t.bbox&&(e.bbox=this.parse.bbox.call(this,t.bbox)),e},coordinates:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(r(G,f(i)))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new G(t[0],t[1]),new G(t[2],t[1]),new G(t[2],t[3]),new G(t[0],t[3]),new G(t[0],t[1])])},Point:function(t){var e=r(G,f(t));return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],n=0;n<t.length;++n)e.push(ar.Point.call(this,t[n]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=ar.coordinates.call(this,t);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],n=0;n<t.length;++n)e.push(ar.LineString.call(this,t[n]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=ar.coordinates.call(this,t[0]),n=this.geometryFactory.createLinearRing(e),r=[],i=1;i<t.length;++i){var o=t[i],s=ar.coordinates.call(this,o),a=this.geometryFactory.createLinearRing(s);
2r.push(a)}return this.geometryFactory.createPolygon(n,r)},MultiPolygon:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(ar.Polygon.call(this,r))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(this.read(r))}return this.geometryFactory.createGeometryCollection(e)}},ur={coordinate:function(t){var e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e},Point:function(t){return{type:"Point",coordinates:ur.coordinate.call(this,t.getCoordinate())}},MultiPoint:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=ur.Point.call(this,r);e.push(i.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(t){for(var e=[],n=t.getCoordinates(),r=0;r<n.length;++r){var i=n[r];e.push(ur.coordinate.call(this,i))}return{type:"LineString",coordinates:e}},MultiLineString:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=ur.LineString.call(this,r);e.push(i.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(t){var e=[],n=ur.LineString.call(this,t._shell);e.push(n.coordinates);for(var r=0;r<t._holes.length;++r){var i=t._holes[r],o=ur.LineString.call(this,i);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=ur.Polygon.call(this,r);e.push(i.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=r.getGeometryType();e.push(ur[i].call(this,r))}return{type:"GeometryCollection",geometries:e}}};return{BufferOp:ir,GeoJSONReader:o(function t(e){n(this,t),this.parser=new sr(e||new oe)},[{key:"read",value:function(t){return this.parser.read(t)}}]),GeoJSONWriter:o(function t(){n(this,t),this.parser=new sr(this.geometryFactory)},[{key:"write",value:function(t){return this.parser.write(t)}}])}}()},85679:(t,e,n)=>{"use strict";n.d(e,{A:()=>f});var r=n(98777);const i="#define SMOOTH_EDGE_RADIUS 0.5",o={name:"geometry",vs:"\n".concat(i,"\n\nstruct VertexGeometry {\n vec4 position;\n vec3 worldPosition;\n vec3 worldPositionAlt;\n vec3 normal;\n vec2 uv;\n vec3 pickingColor;\n} geometry = VertexGeometry(\n vec4(0.0, 0.0, 1.0, 0.0),\n vec3(0.0),\n vec3(0.0),\n vec3(0.0),\n vec2(0.0),\n vec3(0.0)\n);\n"),fs:"\n".concat(i,"\n\nstruct FragmentGeometry {\n vec2 uv;\n} geometry;\n\nfloat smoothedge(float edge, float x) {\n return smoothstep(edge - SMOOTH_EDGE_RADIUS, edge + SMOOTH_EDGE_RADIUS, x);\n}\n")};var s=n(93314);const a=Object.keys(s.rf).map(t=>"const int COORDINATE_SYSTEM_".concat(t," = ").concat(s.rf[t],";")).join(""),u=Object.keys(s.Kx).map(t=>"const int PROJECTION_MODE_".concat(t," = ").concat(s.Kx[t],";")).join(""),l=Object.keys(s.p5).map(t=>"const int UNIT_".concat(t.toUpperCase()," = ").concat(s.p5[t],";")).join(""),c="".concat(a,"\n").concat(u,"\n").concat(l,"\n\nuniform int project_uCoordinateSystem;\nuniform int project_uProjectionMode;\nuniform float project_uScale;\nuniform bool project_uWrapLongitude;\nuniform vec3 project_uCommonUnitsPerMeter;\nuniform vec3 project_uCommonUnitsPerWorldUnit;\nuniform vec3 project_uCommonUnitsPerWorldUnit2;\nuniform vec4 project_uCenter;\nuniform mat4 project_uModelMatrix;\nuniform mat4 project_uViewProjectionMatrix;\nuniform vec2 project_uViewportSize;\nuniform float project_uDevicePixelRatio;\nuniform float project_uFocalDistance;\nuniform vec3 project_uCameraPosition;\nuniform vec3 project_uCoordinateOrigin;\nuniform vec3 project_uCommonOrigin;\nuniform bool project_uPseudoMeters;\n\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / (PI * 2.0);\nconst vec3 ZERO_64_LOW = vec3(0.0);\nconst float EARTH_RADIUS = 6370972.0;\nconst float GLOBE_RADIUS = 256.0;\nfloat project_size_at_latitude(float lat) {\n float y = clamp(lat, -89.9, 89.9);\n return 1.0 / cos(radians(y));\n}\n\nfloat project_size() {\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR &&\n project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT &&\n project_uPseudoMeters == false) {\n \n if (geometry.position.w == 0.0) {\n return project_size_at_latitude(geometry.worldPosition.y);\n }\n \n float y = geometry.position.y / TILE_SIZE * 2.0 - 1.0;
2\n float y2 = y * y;\n float y4 = y2 * y2;\n float y6 = y4 * y2;\n return 1.0 + 4.9348 * y2 + 4.0587 * y4 + 1.5642 * y6;\n }\n return 1.0;\n}\n\nfloat project_size_at_latitude(float meters, float lat) {\n return meters * project_uCommonUnitsPerMeter.z * project_size_at_latitude(lat);\n}\nfloat project_size(float meters) {\n return meters * project_uCommonUnitsPerMeter.z * project_size();\n}\n\nvec2 project_size(vec2 meters) {\n return meters * project_uCommonUnitsPerMeter.xy * project_size();\n}\n\nvec3 project_size(vec3 meters) {\n return meters * project_uCommonUnitsPerMeter * project_size();\n}\n\nvec4 project_size(vec4 meters) {\n return vec4(meters.xyz * project_uCommonUnitsPerMeter, meters.w);\n}\nmat3 project_get_orientation_matrix(vec3 up) {\n vec3 uz = normalize(up);\n vec3 ux = abs(uz.z) == 1.0 ? vec3(1.0, 0.0, 0.0) : normalize(vec3(uz.y, -uz.x, 0));\n vec3 uy = cross(uz, ux);\n return mat3(ux, uy, uz);\n}\n\nbool project_needs_rotation(vec3 commonPosition, out mat3 transform) {\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n transform = project_get_orientation_matrix(commonPosition);\n return true;\n }\n return false;\n}\nvec3 project_normal(vec3 vector) {\n vec4 normal_modelspace = project_uModelMatrix * vec4(vector, 0.0);\n vec3 n = normalize(normal_modelspace.xyz * project_uCommonUnitsPerMeter);\n mat3 rotation;\n if (project_needs_rotation(geometry.position.xyz, rotation)) {\n n = rotation * n;\n }\n return n;\n}\n\nvec4 project_offset_(vec4 offset) {\n float dy = offset.y;\n vec3 commonUnitsPerWorldUnit = project_uCommonUnitsPerWorldUnit + project_uCommonUnitsPerWorldUnit2 * dy;\n return vec4(offset.xyz * commonUnitsPerWorldUnit, offset.w);\n}\nvec2 project_mercator_(vec2 lnglat) {\n float x = lnglat.x;
2\n if (project_uWrapLongitude) {\n x = mod(x + 180., 360.0) - 180.;\n }\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan_fp32(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\nvec3 project_globe_(vec3 lnglatz) {\n float lambda = radians(lnglatz.x);\n float phi = radians(lnglatz.y);\n float cosPhi = cos(phi);\n float D = (lnglatz.z / EARTH_RADIUS + 1.0) * GLOBE_RADIUS;\n\n return vec3(\n sin(lambda) * cosPhi,\n -cos(lambda) * cosPhi,\n sin(phi)\n ) * D;\n}\nvec4 project_position(vec4 position, vec3 position64Low) {\n vec4 position_world = project_uModelMatrix * position;\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_mercator_(position_world.xy),\n project_size_at_latitude(position_world.z, position_world.y),\n position_world.w\n );\n }\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN) {\n position_world.xyz += project_uCoordinateOrigin;\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_globe_(position_world.xyz),\n position_world.w\n );\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n if (abs(position_world.y - project_uCoordinateOrigin.y) > 0.25) {\n return vec4(\n project_mercator_(position_world.xy) - project_uCommonOrigin.xy,\n project_size(position_world.z),\n position_world.w\n );\n }\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_IDENTITY ||\n (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET &&\n (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN))) {\n position_world.xyz -= project_uCoordinateOrigin;\n }\n return project_offset_(position_world + project_uModelMatrix * vec4(position64Low, 0.0));\n}\n\nvec4 project_position(vec4 position) {\n return project_position(position, ZERO_64_LOW);\n}\n\nvec3 project_position(vec3 position, vec3 position64Low) {\n vec4 projected_position = project_position(vec4(position, 1.0), position64Low);\n return projected_position.xyz;\n}\n\nvec3 project_position(vec3 position) {\n vec4 projected_position = project_position(vec4(position, 1.0), ZERO_64_LOW);\n return projected_position.xyz;\n}\n\nvec2 project_position(vec2 position) {\n vec4 projected_position = project_position(vec4(position, 0.0, 1.0), ZERO_64_LOW);\n return projected_position.xy;\n}\n\nvec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {\n return viewProjectionMatrix * position + center;\n}\nvec4 project_common_position_to_clipspace(vec4 position) {\n return project_common_position_to_clipspace(position, project_uViewProjectionMatrix, project_uCenter);\n}\nvec2 project_pixel_size_to_clipspace(vec2 pixels) {\n vec2 offset = pixels / project_uViewportSize * project_uDevicePixelRatio * 2.0;\n return offset * project_uFocalDistance;\n}\n\nfloat project_size_to_pixel(float meters) {\n return project_size(meters) * project_uScale;\n}\nfloat project_size_to_pixel(float size, int unit) {\n if (unit == UNIT_METERS) return project_size_to_pixel(size);\n if (unit == UNIT_COMMON) return size * project_uScale;\n return size;\n}\nfloat project_pixel_size(float pixels) {\n return pixels / project_uScale;\n}\nvec2 project_pixel_size(vec2 pixels) {\n return pixels / project_uScale;\n}\n");var h=n(92154);const A={},f={name:"project",dependencies:[r.i,o],vs:c,getUniforms:function(t=A){return"viewport"in t?(0,h.a)(t):{}}}},86385:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(14166),i=n(20952),o=n(8945),s=n(78764),a=l(n(33e3)),u=l(n(30258));function l(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function h(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return A(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,e,n){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},d(t,e,n||t)}
2function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach(function(e){v(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _=i.ViewMode,b={type:"FeatureCollection",features:[]},w=y({mode:_},a.default.defaultProps,{data:[],selectedIndexes:[],filled:!1,stroked:!0,lineWidthScale:s.PROJECTED_PIXEL_SIZE_MULTIPLIER,lineWidthMinPixels:1,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,lineWidthUnits:"pixels",getHexagons:function(t){return t.hexIds},getEditedCluster:function(t,e){return e?y({},e,{hexIds:t}):{hexIds:t}},resolution:9}),E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}(u,t);var e,n,i,s=(i=u,function(){var t,e=p(i);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=p(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),s.apply(this,arguments)}return e=u,(n=[{key:"initializeState",value:function(){d(p(u.prototype),"initializeState",this).call(this),this.setState({tentativeHexagonIDs:[]})}},{key:"getDerivedHexagonIDs",value:function(t){return(0,o.polyfill)(t,this.props.resolution,!0)}},{key:"getDerivedHexagonID",value:function(t){return(0,o.geoToH3)(t[1],t[0],this.props.resolution)}},{key:"renderLayers",value:function(){var t=this;return[new a.default(this.getSubLayerProps({id:"editable-geojson",mode:this.props.mode,data:b,selectedFeatureIndexes:[],onEdit:function(e){var n=e.editType,r=e.editContext;switch(n){case"updateTentativeFeature":if("Polygon"===r.feature.geometry.type){var i=r.feature.geometry.coordinates,o=t.getDerivedHexagonIDs(i);t.setState({tentativeHexagonIDs:o})}else if("Point"===r.feature.geometry.type){var s=r.feature.geometry.coordinates,a=t.getDerivedHexagonID(s);t.setState({tentativeHexagonIDs:[a]})}break;case"addFeature":var u=h(t.props.data),l=t.props.modeConfig;if(l&&l.booleanOperation)if(1!==t.props.selectedIndexes.length)console.warn("booleanOperation only supported for single cluster selection");else{var c,A=new Set(t.getSelectedHexIDs()),f=new Set(t.state.tentativeHexagonIDs);switch(l.booleanOperation){case"union":default:c=h(new Set([].concat(h(A),h(f))));break;case"intersection":c=h(A).filter(function(t){return f.has(t)});break;case"difference":c=h(A).filter(function(t){return!f.has(t)})}var d=t.props.selectedIndexes[0],p=t.props.data[d];u[d]=t.props.getEditedCluster(c,p)}else u.push(t.props.getEditedCluster(t.state.tentativeHexagonIDs,null));t.setState({tentativeHexagonIDs:[]}),t.props.onEdit({updatedData:u})}}})),new r.H3ClusterLayer(this.getSubLayerProps({id:"hexagons",data:this.props.data,getHexagons:this.props.getHexagons})),new r.H3ClusterLayer(this.getSubLayerProps({id:"tentative-hexagons",data:[{hexIds:this.state.tentativeHexagonIDs}],getHexagons:function(t){return t.hexIds}}))]}},{key:"getSelectedHexIDs",value:function(){var t=this,e=[];
2return this.props.selectedIndexes.forEach(function(n){var r=t.props.data[n],i=t.props.getHexagons(r);e=e.concat(i)}),e}},{key:"getCursor",value:function(t){var e=t.isDragging,n=(this.state||{}).cursor;return n||(n=e?"grabbing":"grab"),n}}])&&f(e.prototype,n),u}(u.default);e.default=E,v(E,"layerName","EditableH3ClusterLayer"),v(E,"defaultProps",w)},86655:(t,e,n)=>{"use strict";n.d(e,{$M:()=>o,Vl:()=>a,_Z:()=>d,cT:()=>f,on:()=>u,qk:()=>h,zi:()=>s});var r=n(35423),i=n(60033);function o(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t,e){const n=t%e;return n<0?e+n:n}function a(t){return[t[12],t[13],t[14]]}function u(t){return{left:c(t[3]+t[0],t[7]+t[4],t[11]+t[8],t[15]+t[12]),right:c(t[3]-t[0],t[7]-t[4],t[11]-t[8],t[15]-t[12]),bottom:c(t[3]+t[1],t[7]+t[5],t[11]+t[9],t[15]+t[13]),top:c(t[3]-t[1],t[7]-t[5],t[11]-t[9],t[15]-t[13]),near:c(t[3]+t[2],t[7]+t[6],t[11]+t[10],t[15]+t[14]),far:c(t[3]-t[2],t[7]-t[6],t[11]-t[10],t[15]-t[14])}}const l=new i.A;function c(t,e,n,r){l.set(t,e,n);const o=l.len();return{distance:r/o,normal:new i.A(-t/o,-e/o,-n/o)}}function h(t){return t-Math.fround(t)}let A;function f(t,e){const{size:n=1,startIndex:i=0}=e,o=void 0!==e.endIndex?e.endIndex:t.length,s=(o-i)/n;A=r.A.allocate(A,s,{type:Float32Array,size:2*n});let a=i,u=0;for(;a<o;){for(let e=0;e<n;e++){const r=t[a++];A[u+e]=r,A[u+e+n]=h(r)}u+=2*n}return A.subarray(0,s*n*2)}function d(t){let e=null,n=!1;for(const r of t)r&&(e?(n||(e=[[e[0][0],e[0][1]],[e[1][0],e[1][1]]],n=!0),e[0][0]=Math.min(e[0][0],r[0][0]),e[0][1]=Math.min(e[0][1],r[0][1]),e[1][0]=Math.max(e[1][0],r[1][0]),e[1][1]=Math.max(e[1][1],r[1][1])):e=r);return e}},86666:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},86849:(t,e,n)=>{"use strict";n.d(e,{I:()=>f,i:()=>d});var r=n(44454),i=n(94939);const o=256,s=1024,a=16384,u=6144,l=6145,c=6146,h=34041,A="clear: bad arguments";function f(t){let{framebuffer:e=null,color:n=null,depth:u=null,stencil:l=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const c={};e&&(c.framebuffer=e);let h=0;n&&(h|=a,!0!==n&&(c.clearColor=n)),u&&(h|=o,!0!==u&&(c.clearDepth=u)),l&&(h|=s,!0!==u&&(c.clearStencil=u)),(0,i.v)(0!==h,A),(0,r.zv)(t,c,()=>{t.clear(h)})}function d(t){let{framebuffer:e=null,buffer:n=u,drawBuffer:o=0,value:s=[0,0,0,0]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.Dz)(t),(0,r.zv)(t,{framebuffer:e},()=>{switch(n){case u:switch(s.constructor){case Int32Array:t.clearBufferiv(n,o,s);break;case Uint32Array:t.clearBufferuiv(n,o,s);break;case Float32Array:default:t.clearBufferfv(n,o,s)}break;case l:t.clearBufferfv(l,0,[s]);break;case c:t.clearBufferiv(c,0,[s]);break;case h:const[e,r]=s;t.clearBufferfi(h,0,e,r);break;default:(0,i.v)(!1,A)}})}},87277:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(25330),i=n(67069);const o=[-1,-1,1,-1,-1,1,1,1];class s extends r.A{constructor(t,e){const n=o.map(t=>-1===t?0:t);super(t,Object.assign({},e,{vs:"attribute vec2 aClipSpacePosition;\nattribute vec2 aTexCoord;\nattribute vec2 aCoordinate;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main(void) {\n gl_Position = vec4(aClipSpacePosition, 0., 1.);\n position = aClipSpacePosition;\n coordinate = aCoordinate;\n uv = aTexCoord;\n}\n",geometry:new i.A({drawMode:5,vertexCount:4,attributes:{aClipSpacePosition:{size:2,value:new Float32Array(o)},aTexCoord:{size:2,value:new Float32Array(n)},aCoordinate:{size:2,value:new Float32Array(n)}}})})),this.setVertexCount(4)}}},87459:(t,e,n)=>{"use strict";n.d(e,{A:()=>h});var r,i=n(90154),o=n(95855),s=n(94421),a=n(45878),u=n(90333),l=n(64062);!function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL1ROW0=3]="COL1ROW0",t[t.COL1ROW1=4]="COL1ROW1",t[t.COL1ROW2=5]="COL1ROW2",t[t.COL2ROW0=6]="COL2ROW0",t[t.COL2ROW1=7]="COL2ROW1",t[t.COL2ROW2=8]="COL2ROW2"}(r||(r={}));const c=Object.freeze([1,0,0,0,1,0,0,0,1]);class h extends i.A{static get IDENTITY(){return f||(f=new h,Object.freeze(f)),f}static get ZERO(){return A||(A=new h([0,0,0,0,0,0,0,0,0]),Object.freeze(A)),A}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return r}constructor(t,...e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):e.length>0?this.copy([t,...e]):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5
2]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}identity(){return this.copy(c)}fromObject(t){return this.check()}fromQuaternion(t){return a.I0(this,t),this.check()}set(t,e,n,r,i,o,s,a,u){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this[4]=i,this[5]=o,this[6]=s,this[7]=a,this[8]=u,this.check()}setRowMajor(t,e,n,r,i,o,s,a,u){return this[0]=t,this[1]=r,this[2]=s,this[3]=e,this[4]=i,this[5]=a,this[6]=n,this[7]=o,this[8]=u,this.check()}determinant(){return a.a4(this)}transpose(){return a.mg(this,this),this.check()}invert(){return a.B8(this,this),this.check()}multiplyLeft(t){return a.lw(this,t,this),this.check()}multiplyRight(t){return a.lw(this,this,t),this.check()}rotate(t){return a.e$(this,this,t),this.check()}scale(t){return Array.isArray(t)?a.hs(this,this,t):a.hs(this,this,[t,t]),this.check()}translate(t){return a.Tl(this,this,t),this.check()}transform(t,e){let n;switch(t.length){case 2:n=u.ei(e||[-0,-0],t,this);break;case 3:n=l.ei(e||[-0,-0,-0],t,this);break;case 4:n=(0,s.vE)(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,o.qk)(n,t.length),n}transformVector(t,e){return this.transform(t,e)}transformVector2(t,e){return this.transform(t,e)}transformVector3(t,e){return this.transform(t,e)}}let A,f},87693:(t,e,n)=>{"use strict";n.d(e,{A:()=>m});var r=n(24586),i=n(93314),o=n(99608),s=n(27371),a=n(10707),u=n(25330),l=n(67069),c=n(84075),h=n(34081);const A=new Uint16Array([0,2,1,0,3,2]),f=new Float32Array([0,1,0,0,1,0,1,1]);function d(t,e,n){return(0,h.Cc)((0,h.Cc)(t[0],t[1],n),(0,h.Cc)(t[3],t[2],n),e)}const p="\n#define SHADER_NAME bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D bitmapTexture;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float desaturate;\nuniform vec4 transparentColor;\nuniform vec3 tintColor;\nuniform float opacity;\n\nuniform float coordinateConversion;\nuniform vec4 bounds;\n\n/* projection utils */\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / PI / 2.0;\n\n// from degrees to Web Mercator\nvec2 lnglat_to_mercator(vec2 lnglat) {\n float x = lnglat.x;\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\n// from Web Mercator to degrees\nvec2 mercator_to_lnglat(vec2 xy) {\n xy /= WORLD_SCALE;\n return degrees(vec2(\n xy.x - PI,\n atan(exp(xy.y - PI)) * 2.0 - PI * 0.5\n ));\n}\n/* End projection utils */\n\n// apply desaturation\nvec3 color_desaturate(vec3 color) {\n float luminance = (color.r + color.g + color.b) * 0.333333333;\n return mix(color, vec3(luminance), desaturate);\n}\n\n// apply tint\nvec3 color_tint(vec3 color) {\n return color * tintColor;\n}\n\n// blend with background color\nvec4 apply_opacity(vec3 color, float alpha) {\n if (transparentColor.a == 0.0) {\n return vec4(color, alpha);\n }\n float blendedAlpha = alpha + transparentColor.a * (1.0 - alpha);\n float highLightRatio = alpha / blendedAlpha;\n vec3 blendedRGB = mix(transparentColor.rgb, color, highLightRatio);\n return vec4(blendedRGB, blendedAlpha);\n}\n\nvec2 getUV(vec2 pos) {\n return vec2(\n (pos.x - bounds[0]) / (bounds[2] - bounds[0]),\n (pos.y - bounds[3]) / (bounds[1] - bounds[3])\n );\n}\n\n".concat("\nvec3 packUVsIntoRGB(vec2 uv) {\n // Extract the top 8 bits. We want values to be truncated down so we can add a fraction\n vec2 uv8bit = floor(uv * 256.);\n\n // Calculate the normalized remainders of u and v parts that do not fit into 8 bits\n // Scale and clamp to 0-1 range\n vec2 uvFraction = fract(uv * 256.);\n vec2 uvFraction4bit = floor(uvFraction * 16.);\n\n // Remainder can be encoded in blue channel, encode as 4 bits for pixel coordinates\n float fractions = uvFraction4bit.x + uvFraction4bit.y * 16.;\n\n return vec3(uv8bit, fractions) / 255.;\n}\n","\n\nvoid main(void) {\n vec2 uv = vTexCoord;\n if (coordinateConversion < -0.5) {\n vec2 lnglat = mercator_to_lnglat(vTexPos);\n uv = getUV(lnglat);\n } else if (coordinateConversion > 0.5) {\n vec2 commonPos = lnglat_to_mercator(vTexPos);\n uv = getUV(commonPos);\n }\n vec4 bitmapColor = texture2D(bitmapTexture, uv);\n\n gl_FragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * opacity);\n\n geometry.uv = uv;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n\n if (picking_uActive && !picking_uAttribute) {\n // Since instance information is not used, we can use picking color for pixel index\n gl_FragColor.rgb = packUVsIntoRGB(uv);\n }\n}\n"),g={image:{type:"image",value:null,async:!0},bounds:{type:"array",value:[1,0,0,1],compare:!0},_imageCoordinateSystem:i.rf.DEFAULT,desaturate:{type:"number",min:0,max:1,value:0},transparentColor:{type:"color",value:[0,0,0,0]},tintColor:{type:"color",value:[255,255,255]},textureParameters:{type:"object",ignore:!0}};class m extends o.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"\n#define SHADER_NAME bitmap-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float coordinateConversion;\n\nconst vec3 pickingColor = vec3(1.0, 0.0, 0.0);\n\nvoid main(void) {\n geometry.worldPosition = positions;\n geometry.uv = texCoords;\n geometry.pickingColor = pickingColor;\n\n gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vTexCoord = texCoords;\n\n if (coordinateConversion < -0.5) {\n vTexPos = geometry.position.xy + project_uCommonOrigin.xy;\n } else if (coordinateConversion > 0.5) {\n vTexPos = geometry.worldPosition.xy;\n }\n\n vec4 color = vec4(0.0);\n DECKGL_FILTER_COLOR(color, geometry);\n}\n",fs:p,modules:[s.A,a.A]})}initializeState(){const t=this.getAttributeManager();t.remove(["instancePickingColors"]);const e=!0;t.add({indices:{size:1,isIndexed:!0,update:t=>t.value=this.state.mesh.indices,noAlloc:e},positions:{size:3,type:5130,fp64:this.use64bitPositions(),update:t=>t.value=this.state.mesh.positions,noAlloc:e},texCoords:{size:2,update:t=>t.value=this.state.mesh.texCoords,noAlloc:e}})}updateState({props:t,oldProps:e,changeFlags:n}){const r=this.getAttributeManager();if(n.extensionsChanged){var i;const{gl:t}=this.context;null===(i=this.state.model)||void 0===i||i.delete(),this.state.model=this._getModel(t),r.invalidateAll()}
2if(t.bounds!==e.bounds){const t=this.state.mesh,e=this._createMesh();this.state.model.setVertexCount(e.vertexCount);for(const n in e)t&&t[n]!==e[n]&&r.invalidate(n);this.setState({mesh:e,...this._getCoordinateUniforms()})}else t._imageCoordinateSystem!==e._imageCoordinateSystem&&this.setState(this._getCoordinateUniforms())}getPickingInfo(t){const{image:e}=this.props,n=t.info;if(!n.color||!e)return n.bitmap=null,n;const{width:r,height:i}=e;n.index=0;const o=function(t){const[e,n,r]=t;return[(e+(15&r)/16)/256,(n+(240&r)/256)/256]}(n.color),s=[Math.floor(o[0]*r),Math.floor(o[1]*i)];return n.bitmap={size:{width:r,height:i},uv:o,pixel:s},n}disablePickingIndex(){this.setState({disablePicking:!0})}restorePickingColors(){this.setState({disablePicking:!1})}_updateAutoHighlight(t){super._updateAutoHighlight({...t,color:this.encodePickingColor(0)})}_createMesh(){const{bounds:t}=this.props;let e=t;return y(t)&&(e=[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]]]),function(t,e){if(!e)return function(t){const e=new Float64Array(12);for(let n=0;n<t.length;n++)e[3*n+0]=t[n][0],e[3*n+1]=t[n][1],e[3*n+2]=t[n][2]||0;return{vertexCount:6,positions:e,indices:A,texCoords:f}}(t);const n=Math.max(Math.abs(t[0][0]-t[3][0]),Math.abs(t[1][0]-t[2][0])),r=Math.max(Math.abs(t[1][1]-t[0][1]),Math.abs(t[2][1]-t[3][1])),i=Math.ceil(n/e)+1,o=Math.ceil(r/e)+1,s=(i-1)*(o-1)*6,a=new Uint32Array(s),u=new Float32Array(i*o*2),l=new Float64Array(i*o*3);let c=0,h=0;for(let e=0;e<i;e++){const n=e/(i-1);for(let r=0;r<o;r++){const i=r/(o-1),s=d(t,n,i);l[3*c+0]=s[0],l[3*c+1]=s[1],l[3*c+2]=s[2]||0,u[2*c+0]=n,u[2*c+1]=1-i,e>0&&r>0&&(a[h++]=c-o,a[h++]=c-o-1,a[h++]=c-1,a[h++]=c-o,a[h++]=c-1,a[h++]=c),c++}}return{vertexCount:s,positions:l,indices:a,texCoords:u}}(e,this.context.viewport.resolution)}_getModel(t){return t?new u.A(t,{...this.getShaders(),id:this.props.id,geometry:new l.A({drawMode:4,vertexCount:6}),isInstanced:!1}):null}draw(t){const{uniforms:e,moduleParameters:n}=t,{model:r,coordinateConversion:i,bounds:o,disablePicking:s}=this.state,{image:a,desaturate:u,transparentColor:l,tintColor:c}=this.props;n.pickingActive&&s||a&&r&&r.setUniforms(e).setUniforms({bitmapTexture:a,desaturate:u,transparentColor:l.map(t=>t/255),tintColor:c.slice(0,3).map(t=>t/255),coordinateConversion:i,bounds:o}).draw()}_getCoordinateUniforms(){const{LNGLAT:t,CARTESIAN:e,DEFAULT:n}=i.rf;let{_imageCoordinateSystem:r}=this.props;if(r!==n){const{bounds:n}=this.props;if(!y(n))throw new Error("_imageCoordinateSystem only supports rectangular bounds");const i=this.context.viewport.resolution?t:e;if(r=r===t?t:e,r===t&&i===e)return{coordinateConversion:-1,bounds:n};if(r===e&&i===t){const t=(0,c.Gw)([n[0],n[1]]),e=(0,c.Gw)([n[2],n[3]]);return{coordinateConversion:1,bounds:[t[0],t[1],e[0],e[1]]}}}return{coordinateConversion:0,bounds:[0,0,0,0]}}}function y(t){return Number.isFinite(t[0])}(0,r.A)(m,"layerName","BitmapLayer"),(0,r.A)(m,"defaultProps",g)},87941:(t,e,n)=>{"use strict";n.d(e,{Vl:()=>q});var r=n(28747);const i={draco:{decoderType:"object"==typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},o={name:"Draco",id:r.Bd?"draco":"draco-nodejs",module:"draco",shapes:["mesh"],version:"3.4.15",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:i};function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e,n){return(e=function(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u=n(21714),l=n(24586);class c{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;(0,l.A)(this,"name",void 0),(0,l.A)(this,"type",void 0),(0,l.A)(this,"nullable",void 0),(0,l.A)(this,"metadata",void 0),this.name=t,this.type=e,this.nullable=n,this.metadata=r}get typeId(){return this.type&&this.type.typeId}clone(){return new c(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}
2toString(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}let h,A,f,d,p,g,m,y,v=function(t){return t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth",t}({});class _{static isNull(t){return t&&t.typeId===v.Null}static isInt(t){return t&&t.typeId===v.Int}static isFloat(t){return t&&t.typeId===v.Float}static isBinary(t){return t&&t.typeId===v.Binary}static isUtf8(t){return t&&t.typeId===v.Utf8}static isBool(t){return t&&t.typeId===v.Bool}static isDecimal(t){return t&&t.typeId===v.Decimal}static isDate(t){return t&&t.typeId===v.Date}static isTime(t){return t&&t.typeId===v.Time}static isTimestamp(t){return t&&t.typeId===v.Timestamp}static isInterval(t){return t&&t.typeId===v.Interval}static isList(t){return t&&t.typeId===v.List}static isStruct(t){return t&&t.typeId===v.Struct}static isUnion(t){return t&&t.typeId===v.Union}static isFixedSizeBinary(t){return t&&t.typeId===v.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===v.FixedSizeList}static isMap(t){return t&&t.typeId===v.Map}static isDictionary(t){return t&&t.typeId===v.Dictionary}get typeId(){return v.NONE}compareTo(t){return this===t}}Symbol.toStringTag,Symbol.toStringTag,h=Symbol.toStringTag;class b extends _{constructor(t,e){super(),(0,l.A)(this,"isSigned",void 0),(0,l.A)(this,"bitWidth",void 0),this.isSigned=t,this.bitWidth=e}get typeId(){return v.Int}get[h](){return"Int"}toString(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}class w extends b{constructor(){super(!0,8)}}class E extends b{constructor(){super(!0,16)}}class x extends b{constructor(){super(!0,32)}}class S extends b{constructor(){super(!1,8)}}class T extends b{constructor(){super(!1,16)}}class P extends b{constructor(){super(!1,32)}}A=Symbol.toStringTag;class C extends _{constructor(t){super(),(0,l.A)(this,"precision",void 0),this.precision=t}get typeId(){return v.Float}get[A](){return"Float"}toString(){return"Float".concat(this.precision)}}class M extends C{constructor(){super(32)}}class I extends C{constructor(){super(64)}}Symbol.toStringTag,Symbol.toStringTag,f=Symbol.toStringTag,d=Symbol.toStringTag,p=Symbol.toStringTag,g=Symbol.toStringTag,m=Symbol.toStringTag;class O extends _{constructor(t,e){super(),(0,l.A)(this,"listSize",void 0),(0,l.A)(this,"children",void 0),this.listSize=t,this.children=[e]}get typeId(){return v.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[m](){return"FixedSizeList"}toString(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}y=Symbol.toStringTag;class R{constructor(t,e){(0,l.A)(this,"fields",void 0),(0,l.A)(this,"metadata",void 0),function(t){if(!t)throw new Error("loader assertion failed.")}(Array.isArray(t)),function(t){const e={};for(const n of t)e[n.name]&&console.warn("Schema: duplicated field name",n.name,n),e[n.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}select(){const t=Object.create(null);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(const e of n)t[e]=!0;const i=this.fields.filter(e=>t[e.name]);return new R(i,this.metadata)}selectAt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=e.map(t=>
2this.fields[t]).filter(Boolean);return new R(r,this.metadata)}assign(t){let e,n=this.metadata;if(t instanceof R){const r=t;e=r.fields,n=L(L(new Map,this.metadata),r.metadata)}else e=t;const r=Object.create(null);for(const t of this.fields)r[t.name]=t;for(const t of e)r[t.name]=t;const i=Object.values(r);return new R(i,n)}}function L(t,e){return new Map([...t||new Map,...e||new Map])}function B(t,e,n){return function(t,e,n){const r=function(t){switch(t.constructor){case Int8Array:return new w;case Uint8Array:return new S;case Int16Array:return new E;case Uint16Array:return new T;case Int32Array:return new x;case Uint32Array:return new P;case Float32Array:return new M;case Float64Array:return new I;default:throw new Error("array type not supported")}}(e.value),i=n||function(t){const e=new Map;return"byteOffset"in t&&e.set("byteOffset",t.byteOffset.toString(10)),"byteStride"in t&&e.set("byteStride",t.byteStride.toString(10)),"normalized"in t&&e.set("normalized",t.normalized.toString()),e}(e);return new c(t,new O(e.size,new c("value",r)),!1,i)}(t,e,n?k(n.metadata):void 0)}function k(t){const e=new Map;for(const n in t)e.set("".concat(n,".string"),JSON.stringify(t[n]));return e}const N={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},F={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class D{constructor(t){a(this,"draco",void 0),a(this,"decoder",void 0),a(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new this.draco.DecoderBuffer;n.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);const r=this.decoder.GetEncodedGeometryType(n),i=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let t;switch(r){case this.draco.TRIANGULAR_MESH:t=this.decoder.DecodeBufferToMesh(n,i);break;case this.draco.POINT_CLOUD:t=this.decoder.DecodeBufferToPointCloud(n,i);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!t.ok()||!i.ptr){const e="DRACO decompression failed: ".concat(t.error_msg());throw new Error(e)}const o=this._getDracoLoaderData(i,r,e),s=this._getMeshData(i,o,e),a=(0,u.l)(s.attributes),l=function(t,e,n){const r=k(e.metadata),i=[],o=function(t){const e={};for(const n in t){const r=t[n];e[r.name||"undefined"]=r}return e}(e.attributes);for(const e in t){const n=B(e,t[e],o[e]);i.push(n)}if(n){const t=B("indices",n);i.push(t)}return new R(i,r)}(s.attributes,o,s.indices);return{loader:"draco",loaderData:o,header:{vertexCount:i.num_points(),boundingBox:a},...s,schema:l}}finally{this.draco.destroy(n),i&&this.draco.destroy(i)}}_getDracoLoaderData(t,e,n){const r=this._getTopLevelMetadata(t),i=this._getDracoAttributes(t,n);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:r,attributes:i}}_getDracoAttributes(t,e){const n={};for(let r=0;r<t.num_attributes();r++){const i=this.decoder.GetAttribute(t,r),o=this._getAttributeMetadata(t,r);n[i.unique_id()]={unique_id:i.unique_id(),attribute_type:i.attribute_type(),data_type:i.data_type(),num_components:i.num_components(),byte_offset:i.byte_offset(),byte_stride:i.byte_stride(),normalized:i.normalized(),attribute_index:r,metadata:o};const s=this._getQuantizationTransform(i,e);
2s&&(n[i.unique_id()].quantization_transform=s);const a=this._getOctahedronTransform(i,e);a&&(n[i.unique_id()].octahedron_transform=a)}return n}_getMeshData(t,e,n){const r=this._getMeshAttributes(e,t,n);if(!r.POSITION)throw new Error("DRACO: No position attribute found.");return t instanceof this.draco.Mesh?"triangle-strip"===n.topology?{topology:"triangle-strip",mode:4,attributes:r,indices:{value:this._getTriangleStripIndices(t),size:1}}:{topology:"triangle-list",mode:5,attributes:r,indices:{value:this._getTriangleListIndices(t),size:1}}:{topology:"point-list",mode:0,attributes:r}}_getMeshAttributes(t,e,n){const r={};for(const i of Object.values(t.attributes)){const t=this._deduceAttributeName(i,n);i.name=t;const{value:o,size:s}=this._getAttributeValues(e,i);r[t]={value:o,size:s,byteOffset:i.byte_offset,byteStride:i.byte_stride,normalized:i.normalized}}return r}_getTriangleListIndices(t){const e=3*t.num_faces(),n=4*e,r=this.draco._malloc(n);try{return this.decoder.GetTrianglesUInt32Array(t,n,r),new Uint32Array(this.draco.HEAPF32.buffer,r,e).slice()}finally{this.draco._free(r)}}_getTriangleStripIndices(t){const e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){const e=t.size(),n=new Int32Array(e);for(let r=0;r<e;r++)n[r]=t.GetValue(r);return n}(e)}finally{this.draco.destroy(e)}}_getAttributeValues(t,e){const n=F[e.data_type],r=e.num_components,i=t.num_points()*r,o=i*n.BYTES_PER_ELEMENT,s=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,n);let a;const u=this.draco._malloc(o);try{const r=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,r,s,o,u),a=new n(this.draco.HEAPF32.buffer,u,i).slice()}finally{this.draco._free(u)}return{value:a,size:r}}_deduceAttributeName(t,e){const n=t.unique_id;for(const[t,r]of Object.entries(e.extraAttributes||{}))if(r===n)return t;const r=t.attribute_type;for(const t in N)if(this.draco[t]===r)return N[t];const i=e.attributeNameEntry||"name";return t.metadata[i]?t.metadata[i].string:"CUSTOM_ATTRIBUTE_".concat(n)}_getTopLevelMetadata(t){const e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}_getAttributeMetadata(t,e){const n=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(n)}_getDracoMetadata(t){if(!t||!t.ptr)return{};const e={},n=this.metadataQuerier.NumEntries(t);for(let r=0;r<n;r++){const n=this.metadataQuerier.GetEntryName(t,r);e[n]=this._getDracoMetadataField(t,n)}return e}_getDracoMetadataField(t,e){const n=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,n);const r=function(t){const e=t.size(),n=new Int32Array(e);for(let r=0;r<e;r++)n[r]=t.GetValue(r);return n}(n);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:r}}finally{this.draco.destroy(n)}}_disableAttributeTransforms(t){const{quantizedAttributes:e=[],octahedronAttributes:n=[]}=t,r=[...e,...n];for(const t of r)this.decoder.SkipAttributeTransform(this.draco[t])}_getQuantizationTransform(t,e){const{quantizedAttributes:n=[]}=e,r=t.attribute_type();if(n.map(t=>this.decoder[t]).includes(r)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits(),range:e.range(),min_values:new Float32Array([1,2,3]).map(t=>e.min_value(t))}}finally{this.draco.destroy(e)}}return null}_getOctahedronTransform(t,e){const{octahedronAttributes:n=[]}=e,r=t.attribute_type();if(n.map(t=>this.decoder[t]).includes(r)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits()}}finally{this.draco.destroy(e)}}return null}}var j=n(89489);const U="https://www.gstatic.com/draco/versioned/decoders/".concat("1.5.5"),G="".concat(U,"/draco_decoder.js"),z="".concat(U,"/draco_wasm_wrapper.js"),V="".concat(U,"/draco_decoder.wasm");let H;"https://raw.githubusercontent.com/google/draco/".concat("1.4.1","/javascript/draco_encoder.js"),r.Bd;const q={...o,parse:async function(t,e){const{draco:n}=await async function(t){const e=t.modules||{};return H=e.draco3d?H||e.draco3d.createDecoderModule({}).then(t=>({draco:t})):H||async function(t){let e,n;return"js"===(t.draco&&t.draco.decoderType)?e=await(0,j._)(G,"draco",t):[e,n]=await Promise.all([await(0,j._)(z,"draco",t),await(0,j._)(V,"draco",t)]),e=e||globalThis.DracoDecoderModule,await function(t,e){const n={};return e&&(n.wasmBinary=e),new Promise(e=>{t({...n,onModuleLoaded:t=>e({draco:t})})})}
2(e,n)}(t),await H}(e),r=new D(n);try{return r.parseSync(t,null==e?void 0:e.draco)}finally{r.destroy()}}}},87967:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(90669),i=n(39139);const o=globalThis;function s(t){if(!t&&!(0,r.A)())return"Node";if((0,i.A)(t))return"Electron";const e="undefined"!=typeof navigator?navigator:{},n=t||e.userAgent||"";if(n.indexOf("Edge")>-1)return"Edge";const s=-1!==n.indexOf("MSIE "),a=-1!==n.indexOf("Trident/");return s||a?"IE":o.chrome?"Chrome":o.safari?"Safari":o.mozInnerScreenX?"Firefox":"Unknown"}},88330:(t,e,n)=>{"use strict";n.d(e,{A:()=>m});var r=n(24586),i=n(99608),o=n(27371),s=n(10707),a=n(93314),u=n(25330),l=n(67069),c=n(57401),h=n(24448);class A extends c.A{constructor(t){super({...t,attributes:{positions:{size:3,padding:18,initialize:!0,type:t.fp64?Float64Array:Float32Array},segmentTypes:{size:1,type:Uint8ClampedArray}}})}get(t){return this.attributes[t]}getGeometryFromBuffer(t){return this.normalize?super.getGeometryFromBuffer(t):null}normalizeGeometry(t){return this.normalize?function(t,e,n,r){let i;if(Array.isArray(t[0])){const n=t.length*e;i=new Array(n);for(let n=0;n<t.length;n++)for(let r=0;r<e;r++)i[n*e+r]=t[n][r]||0}else i=t;return n?(0,h.Mk)(i,{size:e,gridResolution:n}):r?(0,h.Iy)(i,{size:e}):i}(t,this.positionSize,this.opts.resolution,this.opts.wrapLongitude):t}getGeometrySize(t){if(f(t)){let e=0;for(const n of t)e+=this.getGeometrySize(n);return e}const e=this.getPathLength(t);return e<2?0:this.isClosed(t)?e<3?0:e+2:e}updateGeometryAttributes(t,e){if(0!==e.geometrySize)if(t&&f(t))for(const n of t){const t=this.getGeometrySize(n);e.geometrySize=t,this.updateGeometryAttributes(n,e),e.vertexStart+=t}else this._updateSegmentTypes(t,e),this._updatePositions(t,e)}_updateSegmentTypes(t,e){const n=this.attributes.segmentTypes,r=!!t&&this.isClosed(t),{vertexStart:i,geometrySize:o}=e;n.fill(0,i,i+o),r?(n[i]=4,n[i+o-2]=4):(n[i]+=1,n[i+o-2]+=2),n[i+o-1]=4}_updatePositions(t,e){const{positions:n}=this.attributes;if(!n||!t)return;const{vertexStart:r,geometrySize:i}=e,o=new Array(3);for(let e=r,s=0;s<i;e++,s++)this.getPointOnPath(t,s,o),n[3*e]=o[0],n[3*e+1]=o[1],n[3*e+2]=o[2]}getPathLength(t){return t.length/this.positionSize}getPointOnPath(t,e,n=[]){const{positionSize:r}=this;e*r>=t.length&&(e+=1-t.length/r);const i=e*r;return n[0]=t[i],n[1]=t[i+1],n[2]=3===r&&t[i+2]||0,n}isClosed(t){if(!this.normalize)return Boolean(this.opts.loop);const{positionSize:e}=this,n=t.length-e;return t[0]===t[n]&&t[1]===t[n+1]&&(2===e||t[2]===t[n+2])}}function f(t){return Array.isArray(t[0])}const d=[0,0,0,255],p={widthUnits:"meters",widthScale:{type:"number",min:0,value:1},widthMinPixels:{type:"number",min:0,value:0},widthMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},jointRounded:!1,capRounded:!1,miterLimit:{type:"number",min:0,value:4},billboard:!1,_pathType:null,getPath:{type:"accessor",value:t=>t.path},getColor:{type:"accessor",value:d},getWidth:{type:"accessor",value:1},rounded:{deprecatedFor:["jointRounded","capRounded"]}},g={enter:(t,e)=>e.length?e.subarray(e.length-t.length):t};class m extends i.A{constructor(...t){super(...t),(0,r.A)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME path-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute float instanceTypes;\nattribute vec3 instanceStartPositions;\nattribute vec3 instanceEndPositions;\nattribute vec3 instanceLeftPositions;\nattribute vec3 instanceRightPositions;\nattribute vec3 instanceLeftPositions64Low;\nattribute vec3 instanceStartPositions64Low;\nattribute vec3 instanceEndPositions64Low;\nattribute vec3 instanceRightPositions64Low;\nattribute float instanceStrokeWidths;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform float jointType;\nuniform float capType;\nuniform float miterLimit;\nuniform bool billboard;\nuniform int widthUnits;\n\nuniform float opacity;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vPathPosition;\nvarying float vPathLength;\nvarying float vJointType;\n\nconst float EPSILON = 0.001;\nconst vec3 ZERO_OFFSET = vec3(0.0);\n\nfloat flipIfTrue(bool flag) {\n return -(float(flag) * 2. - 1.);\n}\nvec3 getLineJoinOffset(\n vec3 prevPoint, vec3 currPoint, vec3 nextPoint,\n vec2 width\n) {\n bool isEnd = positions.x > 0.0;\n float sideOfPath = positions.y;\n float isJoint = float(sideOfPath == 0.0);\n\n vec3 deltaA3 = (currPoint - prevPoint);\n vec3 deltaB3 = (nextPoint - currPoint);\n\n mat3 rotationMatrix;\n bool needsRotation = !billboard && project_needs_rotation(currPoint, rotationMatrix);\n if (needsRotation) {\n deltaA3 = deltaA3 * rotationMatrix;\n deltaB3 = deltaB3 * rotationMatrix;\n }\n vec2 deltaA = deltaA3.xy / width;\n vec2 deltaB = deltaB3.xy / width;\n\n float lenA = length(deltaA);\n float lenB = length(deltaB);\n\n vec2 dirA = lenA > 0. ? normalize(deltaA) : vec2(0.0, 0.0);\n vec2 dirB = lenB > 0. ? normalize(deltaB) : vec2(0.0, 0.0);\n\n vec2 perpA = vec2(-dirA.y, dirA.x);\n vec2 perpB = vec2(-dirB.y, dirB.x);\n vec2 tangent = dirA + dirB;\n tangent = length(tangent) > 0. ? normalize(tangent) : perpA;\n vec2 miterVec = vec2(-tangent.y, tangent.x);\n vec2 dir = isEnd ? dirA : dirB;\n vec2 perp = isEnd ? perpA : perpB;\n float L = isEnd ? lenA : lenB;\n float sinHalfA = abs(dot(miterVec, perp));\n float cosHalfA = abs(dot(dirA, miterVec));\n float turnDirection = flipIfTrue(dirA.x * dirB.y >= dirA.y * dirB.x);\n float cornerPosition = sideOfPath * turnDirection;\n\n float miterSize = 1.0 / max(sinHalfA, EPSILON);\n miterSize = mix(\n min(miterSize, max(lenA, lenB) / max(cosHalfA, EPSILON)),\n miterSize,\n step(0.0, cornerPosition)\n );\n\n vec2 offsetVec = mix(miterVec * miterSize, perp, step(0.5, cornerPosition))\n * (sideOfPath + isJoint * turnDirection);\n bool isStartCap = lenA == 0.0 || (!isEnd && (instanceTypes == 1.0 || instanceTypes == 3.0));\n bool isEndCap = lenB == 0.0 || (isEnd && (instanceTypes == 2.0 || instanceTypes == 3.0));\n bool isCap = isStartCap || isEndCap;\n if (isCap) {\n offsetVec = mix(perp * sideOfPath, dir * capType * 4.0 * flipIfTrue(isStartCap), isJoint);\n vJointType = capType;\n } else {\n vJointType = jointType;\n }\n vPathLength = L;\n vCornerOffset = offsetVec;\n vMiterLength = dot(vCornerOffset, miterVec * turnDirection);\n vMiterLength = isCap ? isJoint : vMiterLength;\n\n vec2 offsetFromStartOfPath = vCornerOffset + deltaA * float(isEnd);\n vPathPosition = vec2(\n dot(offsetFromStartOfPath, perp),\n dot(offsetFromStartOfPath, dir)\n );\n geometry.uv = vPathPosition;\n\n float isValid = step(instanceTypes, 3.5);\n vec3 offset = vec3(offsetVec * width * isValid, 0.0);\n\n if (needsRotation) {\n offset = rotationMatrix * offset;\n }\n return offset;\n}\nvoid clipLine(inout vec4 position, vec4 refPosition) {\n if (position.w < EPSILON) {\n float r = (EPSILON - refPosition.w) / (position.w - refPosition.w);\n position = refPosition + (position - refPosition) * r;\n }\n}\n\nvoid main() {\n geometry.pickingColor = instancePickingColors;\n\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n\n float isEnd = positions.x;\n\n vec3 prevPosition = mix(instanceLeftPositions, instanceStartPositions, isEnd);\n vec3 prevPosition64Low = mix(instanceLeftPositions64Low, instanceStartPositions64Low, isEnd);\n\n vec3 currPosition = mix(instanceStartPositions, instanceEndPositions, isEnd);\n vec3 currPosition64Low = mix(instanceStartPositions64Low, instanceEndPositions64Low, isEnd);\n\n vec3 nextPosition = mix(instanceEndPositions, instanceRightPositions, isEnd);\n vec3 nextPosition64Low = mix(instanceEndPositions64Low, instanceRightPositions64Low, isEnd);\n\n geometry.worldPosition = currPosition;\n vec2 widthPixels = vec2(clamp(\n project_size_to_pixel(instanceStrokeWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels) / 2.0);\n vec3 width;\n\n if (billboard) {\n vec4 prevPositionScreen = project_position_to_clipspace(prevPosition, prevPosition64Low, ZERO_OFFSET);\n vec4 currPositionScreen = project_position_to_clipspace(currPosition, currPosition64Low, ZERO_OFFSET, geometry.position);\n vec4 nextPositionScreen = project_position_to_clipspace(nextPosition, nextPosition64Low, ZERO_OFFSET);\n\n clipLine(prevPositionScreen, currPositionScreen);\n clipLine(nextPositionScreen, currPositionScreen);\n clipLine(currPositionScreen, mix(nextPositionScreen, prevPositionScreen, isEnd));\n\n width = vec3(widthPixels, 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 offset = getLineJoinOffset(\n prevPositionScreen.xyz / prevPositionScreen.w,\n currPositionScreen.xyz / currPositionScreen.w,\n nextPositionScreen.xyz / nextPositionScreen.w,\n project_pixel_size_to_clipspace(width.xy)\n );\n\n DECKGL_FILTER_GL_POSITION(currPositionScreen, geometry);\n gl_Position = vec4(currPositionScreen.xyz + offset * currPositionScreen.w, currPositionScreen.w);\n } else {\n prevPosition = project_position(prevPosition, prevPosition64Low);\n currPosition = project_position(currPosition, currPosition64Low);\n nextPosition = project_position(nextPosition, nextPosition64Low);\n\n width = vec3(project_pixel_size(widthPixels), 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 offset = getLineJoinOffset(prevPosition, currPosition, nextPosition, width.xy);\n geometry.position = vec4(currPosition + offset, 1.0);\n gl_Position = project_common_position_to_clipspace(geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME path-layer-fragment-shader\n\nprecision highp float;\n\nuniform float miterLimit;
2\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vPathPosition;\nvarying float vPathLength;\nvarying float vJointType;\n\nvoid main(void) {\n geometry.uv = vPathPosition;\n\n if (vPathPosition.y < 0.0 || vPathPosition.y > vPathLength) {\n if (vJointType > 0.5 && length(vCornerOffset) > 1.0) {\n discard;\n }\n if (vJointType < 0.5 && vMiterLength > miterLimit + 1.0) {\n discard;\n }\n }\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.A,s.A]})}get wrapLongitude(){return!1}initializeState(){const t=!0;this.getAttributeManager().addInstanced({positions:{size:3,vertexOffset:1,type:5130,fp64:this.use64bitPositions(),transition:g,accessor:"getPath",update:this.calculatePositions,noAlloc:t,shaderAttributes:{instanceLeftPositions:{vertexOffset:0},instanceStartPositions:{vertexOffset:1},instanceEndPositions:{vertexOffset:2},instanceRightPositions:{vertexOffset:3}}},instanceTypes:{size:1,type:5121,update:this.calculateSegmentTypes,noAlloc:t},instanceStrokeWidths:{size:1,accessor:"getWidth",transition:g,defaultValue:1},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,accessor:"getColor",transition:g,defaultValue:d},instancePickingColors:{size:3,type:5121,accessor:(t,{index:e,target:n})=>this.encodePickingColor(t&&t.__source?t.__source.index:e,n)}}),this.setState({pathTesselator:new A({fp64:this.use64bitPositions()})})}updateState(t){super.updateState(t);const{props:e,changeFlags:n}=t,r=this.getAttributeManager();if(n.dataChanged||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getPath)){const{pathTesselator:t}=this.state,i=e.data.attributes||{};t.updateGeometry({data:e.data,geometryBuffer:i.getPath,buffers:i,normalize:!e._pathType,loop:"loop"===e._pathType,getGeometry:e.getPath,positionFormat:e.positionFormat,wrapLongitude:e.wrapLongitude,resolution:this.context.viewport.resolution,dataChanged:n.dataChanged}),this.setState({numInstances:t.instanceCount,startIndices:t.vertexStarts}),n.dataChanged||r.invalidateAll()}if(n.extensionsChanged){var i;const{gl:t}=this.context;null===(i=this.state.model)||void 0===i||i.delete(),this.state.model=this._getModel(t),r.invalidateAll()}}getPickingInfo(t){const e=super.getPickingInfo(t),{index:n}=e,{data:r}=this.props;return r[0]&&r[0].__source&&(e.object=r.find(t=>t.__source.index===n)),e}disablePickingIndex(t){const{data:e}=this.props;if(e[0]&&e[0].__source)for(let n=0;n<e.length;n++)e[n].__source.index===t&&this._disablePickingIndex(n);else super.disablePickingIndex(t)}draw({uniforms:t}){const{jointRounded:e,capRounded:n,billboard:r,miterLimit:i,widthUnits:o,widthScale:s,widthMinPixels:u,widthMaxPixels:l}=this.props;this.state.model.setUniforms(t).setUniforms({jointType:Number(e),capType:Number(n),billboard:r,widthUnits:a.p5[o],widthScale:s,miterLimit:i,widthMinPixels:u,widthMaxPixels:l}).draw()}_getModel(t){return new u.A(t,{...this.getShaders(),id:this.props.id,geometry:new l.A({drawMode:4,attributes:{indices:new Uint16Array([0,1,2,1,4,2,1,3,4,3,5,4]),positions:{value:new Float32Array([0,0,0,-1,0,1,1,-1,1,1,1,0]),size:2}}}),isInstanced:!0})}calculatePositions(t){const{pathTesselator:e}=this.state;t.startIndices=e.vertexStarts,t.value=e.get("positions")}calculateSegmentTypes(t){const{pathTesselator:e}=this.state;t.startIndices=e.vertexStarts,t.value=e.get("segmentTypes")}}(0,r.A)(m,"defaultProps",p),(0,r.A)(m,"layerName","PathLayer")},88341:t=>{"use strict";var e,n="function"==typeof WeakMap&&WeakMap.prototype?WeakMap:null,r="function"==typeof WeakSet&&WeakSet.prototype?WeakSet:null;n||(e=function(t){return!1});var i=n?n.prototype.has:null,o=r?r.prototype.has:null;e||i||(e=function(t){return!1}),t.exports=e||function(t){if(!t||"object"!=typeof t)return!1;try{if(i.call(t,i),o)try{o.call(t,o)}catch(t){return!0}return t instanceof n}catch(t){}return!1}},88500:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(44776),i=n(49200);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},a(t,e,n||t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
2e%2?c(Object(n),!0).forEach(function(e){A(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function A(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f=h({},r.PathLayer.defaultProps,{pickingLineWidthExtraPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER}}),d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(A,t);var e,n,r,c=(r=A,function(){var t,e=u(r);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=u(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function A(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,A),c.apply(this,arguments)}return e=A,(n=[{key:"getShaders",value:function(){var t,e=a(u(A.prototype),"getShaders",this).call(this);return e.vs=(0,i.insertBefore)(e.vs,"vec3 width;","\n if(picking_uActive){\n widthPixels.xy += pickingLineWidthExtraPixels;\n }\n "),h({},e,{inject:h({},e.inject||{},{"vs:#decl":((null===(t=e.inject)||void 0===t?void 0:t["vs:#decl"])||"").concat("uniform float pickingLineWidthExtraPixels;")})})}},{key:"draw",value:function(t){a(u(A.prototype),"draw",this).call(this,h({},t,{uniforms:h({},t.uniforms,{pickingLineWidthExtraPixels:this.props.pickingLineWidthExtraPixels})}))}}])&&s(e.prototype,n),A}(r.PathLayer);e.default=d,d.defaultProps=f,d.layerName="EditablePathLayer"},88548:(t,e,n)=>{"use strict";n.r(e),n.d(e,{MAX_LATITUDE:()=>r.aH,WebMercatorViewport:()=>r.KH,addMetersToLngLat:()=>r.dT,altitudeToFovy:()=>r.Os,default:()=>r.KH,fitBounds:()=>r.Fe,flyToViewport:()=>r.rj,fovyToAltitude:()=>r.wZ,getBounds:()=>r.gW,getDistanceScales:()=>r.nI,getFlyToDuration:()=>r.v7,getMeterZoom:()=>r.fO,getProjectionMatrix:()=>r.Jh,getProjectionParameters:()=>r.om,getViewMatrix:()=>r.rY,lngLatToWorld:()=>r.Gw,normalizeViewportProps:()=>r.CK,pixelsToWorld:()=>r.xJ,scaleToZoom:()=>r.J9,unitsPerMeter:()=>r.mY,worldToLngLat:()=>r.iV,worldToPixels:()=>r.VJ,zoomToScale:()=>r.XM});var r=n(84075)},89333:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},89489:(t,e,n)=>{"use strict";n.d(e,{_:()=>A});var r={};n.r(r),n.d(r,{readFileAsArrayBuffer:()=>o,readFileAsText:()=>s,requireFromFile:()=>a,requireFromString:()=>u});var i=n(28747);const o=null,s=null,a=null,u=null;var l=n(98389);const c="3.4.15",h={};async function A(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e&&(t=function(t,e,n){if(t.startsWith("http"))return t;const r=n.modules||{};return r[t]?r[t]:i.Bd?n.CDN?((0,l.v)(n.CDN.startsWith("http")),"".concat(n.CDN,"/").concat(e,"@").concat(c,"/dist/libs/").concat(t)):i.xD?"../src/libs/".concat(t):"modules/".concat(e,"/src/libs/").concat(t):"modules/".concat(e,"/dist/libs/").concat(t)}(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})),h[t]=h[t]||async function(t){if(t.endsWith("wasm")){const e=await fetch(t);return await e.arrayBuffer()}if(!i.Bd)try{return r&&a&&await a(t)}catch{return null}if(i.xD)return importScripts(t);const e=await fetch(t);return function(t,e){if(!i.Bd)return u&&u(t,e);if(i.xD)return eval.call(i.Sf,t),null;const n=document.createElement("script");n.id=e;try{n.appendChild(document.createTextNode(t))}catch(e){n.text=t}return document.body.appendChild(n),null}(await e.text(),t)}(t),await h[t]}},89595:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=Object.defineProperty,o=(t,e)=>i(t,"name",{value:e,configurable:!0}),s=(r=n(44969))&&r.__esModule?r:{default:r},a=class{constructor(t){var e,n,r;this.direction=!1,this.compareProperties=!0,this.precision=10**-(null!=(e=null==t?void 0:t.precision)?e:17),this.direction=null!=(n=null==t?void 0:t.direction)&&n,this.compareProperties=null==(r=null==t?void 0:t.compareProperties)||r}compare(t,e){if(t.type!==e.type)return!1;if(!l(t,e))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,e.coordinates);case"LineString":return this.compareLine(t.coordinates,e.coordinates);case"Polygon":return this.comparePolygon(t,e);case"GeometryCollection":return this.compareGeometryCollection(t,e);
2case"Feature":return this.compareFeature(t,e);case"FeatureCollection":return this.compareFeatureCollection(t,e);default:if(t.type.startsWith("Multi")){const n=c(t),r=c(e);return n.every(t=>r.some(e=>this.compare(t,e)))}}return!1}compareCoord(t,e){return t.length===e.length&&t.every((t,n)=>Math.abs(t-e[n])<this.precision)}compareLine(t,e,n=0,r=!1){if(!l(t,e))return!1;const i=t;let o=e;if(r&&!this.compareCoord(i[0],o[0])){const t=this.fixStartIndex(o,i);if(!t)return!1;o=t}const s=this.compareCoord(i[n],o[n]);return this.direction||s?this.comparePath(i,o):!!this.compareCoord(i[n],o[o.length-(1+n)])&&this.comparePath(i.slice().reverse(),o)}fixStartIndex(t,e){let n,r=-1;for(let n=0;n<t.length;n++)if(this.compareCoord(t[n],e[0])){r=n;break}return r>=0&&(n=[].concat(t.slice(r,t.length),t.slice(1,r+1))),n}comparePath(t,e){return t.every((t,n)=>this.compareCoord(t,e[n]))}comparePolygon(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){const n=t.coordinates.slice(1,t.coordinates.length),r=e.coordinates.slice(1,e.coordinates.length);return n.every(t=>r.some(e=>this.compareLine(t,e,1,!0)))}return!1}compareGeometryCollection(t,e){return l(t.geometries,e.geometries)&&this.compareBBox(t,e)&&t.geometries.every((t,n)=>this.compare(t,e.geometries[n]))}compareFeature(t,e){return t.id===e.id&&(!this.compareProperties||s.default.call(void 0,t.properties,e.properties))&&this.compareBBox(t,e)&&this.compare(t.geometry,e.geometry)}compareFeatureCollection(t,e){return l(t.features,e.features)&&this.compareBBox(t,e)&&t.features.every((t,n)=>this.compare(t,e.features[n]))}compareBBox(t,e){return Boolean(!t.bbox&&!e.bbox)||!(!t.bbox||!e.bbox)&&this.compareCoord(t.bbox,e.bbox)}};o(a,"GeojsonEquality");var u=a;function l(t,e){return t.coordinates?t.coordinates.length===e.coordinates.length:t.length===e.length}function c(t){return t.coordinates.map(e=>({type:t.type.replace("Multi",""),coordinates:e}))}o(l,"sameLength"),o(c,"explode");var h=6371008.8,A={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*h,kilometers:6371.0088,kilometres:6371.0088,meters:h,metres:h,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:h/1852,radians:1,yards:6967335.223679999},f={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function d(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function p(t,e,n={}){switch(t){case"Point":return g(e).geometry;case"LineString":return _(e).geometry;case"Polygon":return y(e).geometry;case"MultiPoint":return x(e).geometry;case"MultiLineString":return E(e).geometry;case"MultiPolygon":return S(e).geometry;default:throw new Error(t+" is invalid")}}function g(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!N(t[0])||!N(t[1]))throw new Error("coordinates must contain numbers");return d({type:"Point",coordinates:t},e,n)}function m(t,e,n={}){return w(t.map(t=>g(t,e)),n)}function y(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return d({type:"Polygon",coordinates:t},e,n)}function v(t,e,n={}){return w(t.map(t=>y(t,e)),n)}function _(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return d({type:"LineString",coordinates:t},e,n)}function b(t,e,n={}){return w(t.map(t=>_(t,e)),n)}function w(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function E(t,e,n={}){return d({type:"MultiLineString",coordinates:t},e,n)}function x(t,e,n={}){return d({type:"MultiPoint",coordinates:t},e,n)}function S(t,e,n={}){return d({type:"MultiPolygon",coordinates:t},e,n)}function T(t,e,n={}){return d({type:"GeometryCollection",geometries:t},e,n)}function P(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n}function C(t,e="kilometers"){const n=A[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function M(t,e="kilometers"){const n=A[e];if(!n)throw new Error(e+" units is invalid");return t/n}function I(t,e){return R(M(t,e))}function O(t){let e=t%360;return e<0&&(e+=360),e}function R(t){return t%(2*Math.PI)*180/Math.PI}function L(t){return t%360*Math.PI/180}function B(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return C(M(t,e),n)}function k(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=f[e];if(!r)throw new Error("invalid original units");const i=f[n];if(!i)throw new Error("invalid final units");return t/r*i}function N(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function F(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}function D(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!N(t))throw new Error("bbox must only contain numbers")})}function j(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}o(d,"feature"),o(p,"geometry"),o(g,"point"),o(m,"points"),o(y,"polygon"),o(v,"polygons"),o(_,"lineString"),o(b,"lineStrings"),o(w,"featureCollection"),o(E,"multiLineString"),o(x,"multiPoint"),o(S,"multiPolygon"),o(T,"geometryCollection"),o(P,"round"),o(C,"radiansToLength"),o(M,"lengthToRadians"),o(I,"lengthToDegrees"),o(O,"bearingToAzimuth"),o(R,"radiansToDegrees"),o(L,"degreesToRadians"),o(B,"convertLength"),o(k,"convertArea"),o(N,"isNumber"),o(F,"isObject"),o(D,"validateBBox"),o(j,"validateId"),e.GeojsonEquality=u,e.areaFactors=f,e.bearingToAzimuth=O,e.convertArea=k,e.convertLength=B,e.degreesToRadians=L,e.earthRadius=h,e.factors=A,e.feature=d,e.featureCollection=w,e.geometry=p,e.geometryCollection=T,e.isNumber=N,e.isObject=F,e.lengthToDegrees=I,e.lengthToRadians=M,e.lineString=_,e.lineStrings=b,e.multiLineString=E,e.multiPoint=x,e.multiPolygon=S,e.point=g,e.points=m,e.polygon=y,e.polygons=v,e.radiansToDegrees=R,e.radiansToLength=C,e.round=P,e.validateBBox=D,e.validateId=j},89617:t=>{"use strict";var e,n,r=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw n}}),n={},i(function(){throw 42},null,e)}catch(t){t!==n&&(i=null)}else i=null;var o=/^\s*class\b/,s=function(t){try{var e=r.call(t);return o.test(e)}catch(t){return!1}},a=function(t){try{return!s(t)&&(r.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,l="function"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),h=function(){return!1};if("object"==typeof document){var A=document.all;u.call(A)===u.call(document.all)&&(h=function(t){if((c||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=i?function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==n)return!1}return!s(t)&&a(t)}:function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(l)return a(t);if(s(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&a(t)}},89666:(t,e,n)=>{"use strict";function r(t,e){if(!t)throw new Error(e||"shadertools: assertion failed.")}n.d(e,{A:()=>r})},90154:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(44341),i=n(95855),o=n(34081);class s extends r.A{toString(){let t="[";if(o.$W.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let n=0;n<this.RANK;++n)t+=" ".concat(this[n*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,n){return this[e*this.RANK+t]=(0,i.ws)(n),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const n=t*this.RANK;for(let t=0;t<this.RANK;++t)e[t]=this[n+t];return e}setColumn(t,e){const n=t*this.RANK;for(let t=0;t<this.RANK;++t)this[n+t]=e[t];return this}}},90184:(t,e,n)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(57414),i=n(44776);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(c,t);var e,n,r,l=(r=c,function(){var t,e=a(r);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),l.apply(this,arguments)}return e=c,(n=[{key:"renderLayers",value:function(){return[new i.ScatterplotLayer(Object.assign({},this.props,{id:"".concat(this.props.id,"-ScatterplotLayer"),data:this.props.data})),new i.LineLayer(Object.assign({},this.props,{id:"".concat(this.props.id,"-LineLayer"),data:this.props.data,pickable:!1,getSourcePosition:function(t){var e=t.position;return[e[0],e[1],0]},getTargetPosition:function(t){var e=t.position;return[e[0],e[1],e[2]||0]},getColor:[150,150,150,200],getStrokeWidth:3}))]}}])&&s(e.prototype,n),c}(r.CompositeLayer);e.default=c,l(c,"layerName","ElevatedEditHandleLayer"),l(c,"defaultProps",{})},90227:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4350),i=n(82314);function o(t,e={}){const n=i.getGeom.call(void 0,t);switch(e.properties||"Feature"!==t.type||(e.properties=t.properties),n.type){case"Polygon":return s(n,e);case"MultiPolygon":return a(n,e);default:throw new Error("invalid poly")}}function s(t,e={}){return u(i.getGeom.call(void 0,t).coordinates,e.properties?e.properties:"Feature"===t.type?t.properties:{})}function a(t,e={}){const n=i.getGeom.call(void 0,t).coordinates,o=e.properties?e.properties:"Feature"===t.type?t.properties:{},s=[];return n.forEach(t=>{s.push(u(t,o))}),r.featureCollection.call(void 0,s)}function u(t,e){return t.length>1?r.multiLineString.call(void 0,t,e):r.lineString.call(void 0,t[0],e)}var l=o;e.coordsToLine=u,e.default=l,e.multiPolygonToLine=a,e.polygonToLine=o,e.singlePolygonToLine=s},90243:(t,e,n)=>{"use strict";var r=n(78394),i=n(41857).supportsDescriptors,o=Object.getOwnPropertyDescriptor;t.exports=function(){if(i&&"gim"===/a/gim.flags){var t=o(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var e="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(n,"sticky",{get:function(){e+="y"}}),t.get.call(n),"dy"===e)return t.get}}return r}},90317:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}
2){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invali
2d");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},90333:(t,e,n)=>{"use strict";n.d(e,{Bw:()=>s,Cc:()=>u,WQ:()=>i,Z0:()=>A,ZF:()=>l,ei:()=>h,hs:()=>o,jb:()=>d,l0:()=>c,ze:()=>a});var r=n(23172);function i(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function o(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function s(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function a(t,e){return t[0]=-e[0],t[1]=-e[1],t}function u(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function l(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function c(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function h(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function A(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}var f,d=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};f=new r.tb(2),r.tb!=Float32Array&&(f[0]=0,f[1]=0)},90455:(t,e,n)=>{"use strict";n.d(e,{A:()=>s,k:()=>o});var r=n(23615);let i={};function o(t){i=t}function s(t,e,n,o){r.A.level>0&&i[t]&&i[t].call(null,e,n,o)}},90669:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(39139);function i(){return!("object"==typeof process&&"[object process]"===String(process)&&!process.browser)||(0,r.A)()}},91767:t=>{"use strict";function e(t,e,r){r=r||2;var o,s,a,u,h,A,d,p=e&&e.length,g=p?e[0]*r:t.length,m=n(t,0,g,r,!0),y=[];if(!m||m.next===m.prev)return y;if(p&&(m=function(t,e,r,i){var o,s,a,u=[];for(o=0,s=e.length;o<s;o++)(a=n(t,e[o]*i,o<s-1?e[o+1]*i:t.length,i,!1))===a.next&&(a.steiner=!0),u.push(f(a));for(u.sort(l),o=0;o<u.length;o++)r=c(u[o],r);return r}(t,e,m,r)),t.length>80*r){o=a=t[0],s=u=t[1];for(var v=r;v<g;v+=r)(h=t[v])<o&&(o=h),(A=t[v+1])<s&&(s=A),h>a&&(a=h),A>u&&(u=A);d=0!==(d=Math.max(a-o,u-s))?32767/d:0}return i(m,y,r,o,s,d,0),y}function n(t,e,n,r,i){var o,s;if(i===T(t,e,n,r)>0)for(o=e;o<n;o+=r)s=E(o,t[o],t[o+1],s);else for(o=n-r;o>=e;o-=r)s=E(o,t[o],t[o+1],s);return s&&m(s,s.next)&&(x(s),s=s.next),s}function r(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!m(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(x(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function i(t,e,n,l,c,h,f){if(t){!f&&h&&function(t,e,n,r){var i=t;do{0===i.z&&(i.z=A(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,s,a,u,l=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,r=n,a=0,e=0;e<l&&(a++,r=r.nextZ);e++);for(u=l;a>0||u>0&&r;)0!==a&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(s>1)}(i)}(t,l,c,h);for(var d,p,g=t;t.prev!==t.next;
vendor: 1,910 bytes, line 2
2)if(d=t.prev,p=t.next,h?s(t,l,c,h):o(t))e.push(d.i/n|0),e.push(t.i/n|0),e.push(p.i/n|0),x(t),t=p.next,g=p.next;else if((t=p)===g){f?1===f?i(t=a(r(t),e,n),e,n,l,c,h,2):2===f&&u(t,e,n,l,c,h):i(r(t),e,n,l,c,h,1);break}}}function o(t){var e=t.prev,n=t,r=t.next;if(g(e,n,r)>=0)return!1;for(var i=e.x,o=n.x,s=r.x,a=e.y,u=n.y,l=r.y,c=i<o?i<s?i:s:o<s?o:s,h=a<u?a<l?a:l:u<l?u:l,A=i>o?i>s?i:s:o>s?o:s,f=a>u?a>l?a:l:u>l?u:l,p=r.next;p!==e;){if(p.x>=c&&p.x<=A&&p.y>=h&&p.y<=f&&d(i,a,o,u,s,l,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function s(t,e,n,r){var i=t.prev,o=t,s=t.next;if(g(i,o,s)>=0)return!1;for(var a=i.x,u=o.x,l=s.x,c=i.y,h=o.y,f=s.y,p=a<u?a<l?a:l:u<l?u:l,m=c<h?c<f?c:f:h<f?h:f,y=a>u?a>l?a:l:u>l?u:l,v=c>h?c>f?c:f:h>f?h:f,_=A(p,m,e,n,r),b=A(y,v,e,n,r),w=t.prevZ,E=t.nextZ;w&&w.z>=_&&E&&E.z<=b;){if(w.x>=p&&w.x<=y&&w.y>=m&&w.y<=v&&w!==i&&w!==s&&d(a,c,u,h,l,f,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,E.x>=p&&E.x<=y&&E.y>=m&&E.y<=v&&E!==i&&E!==s&&d(a,c,u,h,l,f,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;E=E.nextZ}for(;w&&w.z>=_;){if(w.x>=p&&w.x<=y&&w.y>=m&&w.y<=v&&w!==i&&w!==s&&d(a,c,u,h,l,f,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;E&&E.z<=b;){if(E.x>=p&&E.x<=y&&E.y>=m&&E.y<=v&&E!==i&&E!==s&&d(a,c,u,h,l,f,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function a(t,e,n){var i=t;do{var o=i.prev,s=i.next.next;!m(o,s)&&y(o,i,i.next,s)&&b(o,s)&&b(s,o)&&(e.push(o.i/n|0),e.push(i.i/n|0),e.push(s.i/n|0),x(i),x(i.next),i=t=s),i=i.next}while(i!==t);return r(i)}function u(t,e,n,o,s,a){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&p(u,l)){var c=w(u,l);return u=r(u,u.next),c=r(c,c.next),i(u,e,n,o,s,a,0),void i(c,e,n,o,s,a,0)}l=l.next}u=u.next}while(u!==t)}function l(t,e){return t.x-e.x}function c(t,e){var n=function(t,e){var n,r=e,i=t.x,o=t.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y
vendor: 5,376 bytes, line 2
2);if(a<=i&&a>s&&(s=a,n=r.x<r.next.x?r:r.next,a===i))return n}r=r.next}while(r!==e);if(!n)return null;var u,l=n,c=n.x,A=n.y,f=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&d(o<A?i:s,o,c,A,o<A?s:i,o,r.x,r.y)&&(u=Math.abs(o-r.y)/(i-r.x),b(r,t)&&(u<f||u===f&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,f=u)),r=r.next}while(r!==l);return n}(t,e);if(!n)return e;var i=w(n,t);return r(i,i.next),r(n,n.next)}function h(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function A(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function f(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function d(t,e,n,r,i,o,s,a){return(i-s)*(e-a)>=(t-s)*(o-a)&&(t-s)*(r-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function p(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&y(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||m(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,n,r){var i=_(g(t,e,n)),o=_(g(t,e,r)),s=_(g(n,r,t)),a=_(g(n,r,e));return i!==o&&s!==a||!(0!==i||!v(t,n,e))||!(0!==o||!v(t,r,e))||!(0!==s||!v(n,t,r))||!(0!==a||!v(n,e,r))}function v(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function _(t){return t>0?1:t<0?-1:0}function b(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function w(t,e){var n=new S(t.i,t.x,t.y),r=new S(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function E(t,e,n,r){var i=new S(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function x(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function T(t,e,n,r){for(var i=0,o=e,s=n-r;o<n;o+=r)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}t.exports=e,t.exports.default=e,e.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,s=Math.abs(T(t,0,o,n));if(i)for(var a=0,u=e.length;a<u;a++){var l=e[a]*n,c=a<u-1?e[a+1]*n:t.length;s-=Math.abs(T(t,l,c,n))}var h=0;for(a=0;a<r.length;a+=3){var A=r[a]*n,f=r[a+1]*n,d=r[a+2]*n;h+=Math.abs((t[A]-t[d])*(t[f+1]-t[A+1])-(t[A]-t[f])*(t[d+1]-t[A+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},e.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[i][o][s]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},92154:(t,e,n)=>{"use strict";n.d(e,{a:()=>d,o:()=>f});var r=n(39095),i=n(70911),o=n(93314),s=n(43405);const a=[0,0,0,0],u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],c=[0,0,0],h=[0,0,0],A=(0,s.A)(function({viewport:t,devicePixelRatio:e,coordinateSystem:n,coordinateOrigin:s}){const{projectionCenter:h,viewProjectionMatrix:A,originCommon:d,cameraPosCommon:p,shaderCoordinateOrigin:g,geospatialOrigin:m}=function(t,e,n){const{viewMatrixUncentered:o,projectionMatrix:s}=t;let{viewMatrix:l,viewProjectionMatrix:c}=t,h=a,A=a,d=t.cameraPosition;const{geospatialOrigin:p,shaderCoordinateOrigin:g,offsetMode:m}=f(t,e,n);return m&&(A=t.projectPosition(p||g),d=[d[0]-A[0],d[1]-A[1],d[2]-A[2]],A[3]=1,h=i.Z0([],A,c),l=o||l,c=r.lw([],s,l),c=r.lw([],c,u)),{viewMatrix:l,viewProjectionMatrix:c,projectionCenter:h,originCommon:A,cameraPosCommon:d,shaderCoordinateOrigin:g,geospatialOrigin:p}}(t,n,s),y=t.getDistanceScales(),v=[t.width*e,t.height*e],_=i.Z0([],[0,0,-t.focalDistance,1],t.projectionMatrix)[3]||1,b={project_uCoordinateSystem:n,project_uProjectionMode:t.projectionMode,project_uCoordinateOrigin:g,project_uCommonOrigin:d.slice(0,3),project_uCenter:h,project_uPseudoMeters:Boolean(t._pseudoMeters),project_uViewportSize:v,project_uDevicePixelRatio:e,project_uFocalDistance:_,project_uCommonUnitsPerMeter:y.unitsPerMeter,project_uCommonUnitsPerWorldUnit:y.unitsPerMeter,project_uCommonUnitsPerWorldUnit2:c,project_uScale:t.scale,project_uWrapLongitude:!1,project_uViewProjectionMatrix:A,project_uModelMatrix:l,project_uCameraPosition:p};if(m){const e=t.getDistanceScales(m);switch(n){case o.rf.METER_OFFSETS:b.project_uCommonUnitsPerWorldUnit=e.unitsPerMeter,b.project_uCommonUnitsPerWorldUnit2=e.unitsPerMeter2;break;case o.rf.LNGLAT:case o.rf.LNGLAT_OFFSETS:t._pseudoMeters||(b.project_uCommonUnitsPerMeter=e.unitsPerMeter),b.project_uCommonUnitsPerWorldUnit=e.unitsPerDegree,b.project_uCommonUnitsPerWorldUnit2=e.unitsPerDegree2;break;case o.rf.CARTESIAN:b.project_uCommonUnitsPerWorldUnit=[1,1,e.unitsPerMeter[2]],b.project_uCommonUnitsPerWorldUnit2=[0,0,e.unitsPerMeter2[2]]}}return b});function f(t,e,n=h){n.length<3&&(n=[n[0],n[1],0]);let r,i=n,s=!0;
2switch(r=e===o.rf.LNGLAT_OFFSETS||e===o.rf.METER_OFFSETS?n:t.isGeospatial?[Math.fround(t.longitude),Math.fround(t.latitude),0]:null,t.projectionMode){case o.Kx.WEB_MERCATOR:e!==o.rf.LNGLAT&&e!==o.rf.CARTESIAN||(r=[0,0,0],s=!1);break;case o.Kx.WEB_MERCATOR_AUTO_OFFSET:e===o.rf.LNGLAT?i=r:e===o.rf.CARTESIAN&&(i=[Math.fround(t.center[0]),Math.fround(t.center[1]),0],r=t.unprojectPosition(i),i[0]-=n[0],i[1]-=n[1],i[2]-=n[2]);break;case o.Kx.IDENTITY:i=t.position.map(Math.fround),i[2]=i[2]||0;break;case o.Kx.GLOBE:s=!1,r=null;break;default:s=!1}return{geospatialOrigin:r,shaderCoordinateOrigin:i,offsetMode:s}}function d({viewport:t,devicePixelRatio:e=1,modelMatrix:n=null,coordinateSystem:r=o.rf.DEFAULT,coordinateOrigin:i=h,autoWrapLongitude:s=!1}){r===o.rf.DEFAULT&&(r=t.isGeospatial?o.rf.LNGLAT:o.rf.CARTESIAN);const a=A({viewport:t,devicePixelRatio:e,coordinateSystem:r,coordinateOrigin:i});return a.project_uWrapLongitude=s,a.project_uModelMatrix=n||l,a}},93141:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32268),i=n(82314);function o(t,e,n,o={}){const s=e<0;let a=r.convertLength.call(void 0,Math.abs(e),o.units,"meters");s&&(a=-Math.abs(a));const u=i.getCoord.call(void 0,t),l=function(t,e,n,i){const o=e/(i=void 0===i?r.earthRadius:Number(i)),s=t[0]*Math.PI/180,a=r.degreesToRadians.call(void 0,t[1]),u=r.degreesToRadians.call(void 0,n),l=o*Math.cos(u);let c=a+l;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);const h=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),A=Math.abs(h)>1e-11?l/h:Math.cos(a);
2return[(180*(s+o*Math.sin(u)/A)/Math.PI+540)%360-180,180*c/Math.PI]}(u,a,n);return l[0]+=l[0]-u[0]>180?-360:u[0]-l[0]>180?360:0,r.point.call(void 0,l,o.properties)}var s=o;e.default=s,e.rhumbDestination=o},93213:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=6371008.8,r={centimeters:637100880,centimetres:637100880,degrees:360/(2*Math.PI),feet:20902260.511392,inches:39.37*n,kilometers:6371.0088,kilometres:6371.0088,meters:n,metres:n,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:n/1852,radians:1,yards:6967335.223679999},i={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function o(t,e,n={}){const r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n={}){for(const e of t){if(e.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(e[e.length-1].length!==e[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<e[e.length-1].length;t++)if(e[e.length-1][t]!==e[0][t])throw new Error("First and last Position are not equivalent.")}return o({type:"Polygon",coordinates:t},e,n)}function u(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return o({type:"LineString",coordinates:t},e,n)}function l(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function c(t,e,n={}){return o({type:"MultiLineString",coordinates:t},e,n)}function h(t,e,n={}){return o({type:"MultiPoint",coordinates:t},e,n)}function A(t,e,n={}){return o({type:"MultiPolygon",coordinates:t},e,n)}function f(t,e="kilometers"){const n=r[e];
2if(!n)throw new Error(e+" units is invalid");return t*n}function d(t,e="kilometers"){const n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}e.areaFactors=i,e.azimuthToBearing=function(t){return(t%=360)>180?t-360:t<-180?t+360:t},e.bearingToAzimuth=function(t){let e=t%360;return e<0&&(e+=360),e},e.convertArea=function(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=i[e];if(!r)throw new Error("invalid original units");const o=i[n];if(!o)throw new Error("invalid final units");return t/r*o},e.convertLength=function(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f(d(t,e),n)},e.degreesToRadians=function(t){return t%360*Math.PI/180},e.earthRadius=n,e.factors=r,e.feature=o,e.featureCollection=l,e.geometry=function(t,e,n={}){switch(t){case"Point":return s(e).geometry;case"LineString":return u(e).geometry;case"Polygon":return a(e).geometry;case"MultiPoint":return h(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}},e.geometryCollection=function(t,e,n={}){return o({type:"GeometryCollection",geometries:t},e,n)},e.isNumber=g,e.isObject=function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)},e.lengthToDegrees=function(t,e){return p(d(t,e))},e.lengthToRadians=d,e.lineString=u,e.lineStrings=function(t,e,n={}){return l(t.map(t=>u(t,e)),n)},e.multiLineString=c,e.multiPoint=h,e.multiPolygon=A,e.point=s,e.points=function(t,e,n={}){return l(t.map(t=>s(t,e)),n)},e.polygon=a,e.polygons=function(t,e,n={}){return l(t.map(t=>a(t,e)),n)},e.radiansToDegrees=p,e.radiansToLength=f,e.round=function(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(t=>{if(!g(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},93314:(t,e,n)=>{"use strict";n.d(e,{Kx:()=>o,p5:()=>s,qR:()=>u,qY:()=>a,rf:()=>i});var r=n(23615);const i={DEFAULT:-1,LNGLAT:1,METER_OFFSETS:2,LNGLAT_OFFSETS:3,CARTESIAN:0};Object.defineProperty(i,"IDENTITY",{get:()=>(r.A.deprecated("COORDINATE_SYSTEM.IDENTITY","COORDINATE_SYSTEM.CARTESIAN")(),0)});const o={WEB_MERCATOR:1,GLOBE:2,WEB_MERCATOR_AUTO_OFFSET:4,IDENTITY:0},s={common:0,meters:1,pixels:2},a={click:{handler:"onClick"},panstart:{handler:"onDragStart"},panmove:{handler:"onDrag"},panend:{handler:"onDragEnd"}},u={DRAW:"draw",MASK:"mask",TERRAIN:"terrain"}},94421:(t,e,n)=>{"use strict";function r(t,e,n){const r=e[0],i=e[1],o=n[3]*r+n[7]*i||1;return t[0]=(n[0]*r+n[4]*i)/o,t[1]=(n[1]*r+n[5]*i)/o,t}function i(t,e,n){const r=e[0],i=e[1],o=e[2],s=n[3]*r+n[7]*i+n[11]*o||1;return t[0]=(n[0]*r+n[4]*i+n[8]*o)/s,t[1]=(n[1]*r+n[5]*i+n[9]*o)/s,t[2]=(n[2]*r+n[6]*i+n[10]*o)/s,t}function o(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t[2]=e[2],t}function s(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t[2]=e[2],t[3]=e[3],t}function a(t,e,n){const r=e[0],i=e[1],o=e[2];return t[0]=n[0]*r+n[3]*i+n[6]*o,t[1]=n[1]*r+n[4]*i+n[7]*o,t[2]=n[2]*r+n[5]*i+n[8]*o,t[3]=e[3],t}n.d(e,{B$:()=>r,Cg:()=>s,J4:()=>o,cL:()=>i,vE:()=>a})},94939:(t,e,n)=>{"use strict";function r(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}n.d(e,{v:()=>r})},95823:(t,e,n)=>{"use strict";n.d(e,{A:()=>y});var r=n(24586),i=n(38466),o=n(14557),s=n(23615),a=n(90455),u=n(5371),l=n(52421),c=n(53629);class h{constructor(t,e,n){(0,r.A)(this,"id",void 0),(0,r.A)(this,"context",void 0),(0,r.A)(this,"isLoaded",void 0),(0,r.A)(this,"persistent",void 0),(0,r.A)(this,"_loadCount",0),(0,r.A)(this,"_subscribers",new Set),(0,r.A)(this,"_data",void 0),(0,r.A)(this,"_loader",void 0),(0,r.A)(this,"_error",void 0),(0,r.A)(this,"_content",void 0),this.id=t,this.context=n,this.setData(e)}subscribe(t){this._subscribers.add(t)}unsubscribe(t){this._subscribers.delete(t)}inUse(){return this._subscribers.size>0}delete(){}getData(){return this.isLoaded?this._error?Promise.reject(this._error):this._content:this._loader.then(()=>this.getData())}setData(t,e){if(t===this._data&&!e)return;this._data=t;const n=++this._loadCount;let r=t;"string"==typeof t&&(r=(0,c.H)(t)),r instanceof Promise?(this.isLoaded=!1,this._loader=r.then(t=>{this._loadCount===n&&(this.isLoaded=!0,this._error=void 0,this._content=t)}).catch(t=>{this._loadCount===n&&(this.isLoaded=!0,this._error=t||!0)})):(this.isLoaded=!0,this._error=void 0,this._content=t);for(const t of this._subscribers)t.onChange(this.getData())}}class A{constructor({gl:t,protocol:e}){(0,r.A)(this,"protocol",void 0),(0,r.A)(this,"_context",void 0),(0,r.A)(this,"_resources",void 0),(0,r.A)(this,"_consumers",void 0),(0,r.A)(this,"_pruneRequest",void 0),this.protocol=e||"resource://",this._context={gl:t,resourceManager:this},this._resources={},this._consumers={},this._pruneRequest=null}contains(t){return!!t.startsWith(this.protocol)||t in this._resources}add({resourceId:t,data:e,forceUpdate:n=!1,persistent:r=!0}){let i=this._resources[t];i?i.setData(e,n):(i=new h(t,e,this._context),this._resources[t]=i),i.persistent=r}remove(t){const e=this._resources[t];e&&(e.delete(),delete this._resources[t])}unsubscribe({consumerId:t}){const e=this._consumers[t];if(e){for(const t in e){const n=e[t],r=this._resources[n.resourceId];r&&r.unsubscribe(n)}delete this._consumers[t],this.prune()}}subscribe({resourceId:t,onChange:e,consumerId:n,requestId:r="default"}){const{_resources:i,protocol:o}=this;t.startsWith(o)&&(i[t=t.replace(o,"")]||this.add({resourceId:t,data:null,persistent:!1}));const s=i[t];if(this._track(n,r,s,e),s)return s.getData()}prune(){this._pruneRequest||(this._pruneRequest=setTimeout(()=>this._prune(),0))}finalize(){for(const t in this._resources)this._resources[t].delete()}_track(t,e,n,r){const i=this._consumers,o=i[t]=i[t]||{},s=o[e]||{},a=s.resourceId&&this._resources[s.resourceId];a&&(a.unsubscribe(s),this.prune()),n&&(o[e]=s,s.onChange=r,s.resourceId=n.id,n.subscribe(s))}_prune(){this._pruneRequest=null;for(const t of Object.keys(this._resources)){const e=this._resources[t];e.persistent||e.inUse()||(e.delete(),delete this._resources[t])}}}var f=n(1285),d=n(40356);const p=[n(85679).A],g=["vs:DECKGL_FILTER_SIZE(inout vec3 size, VertexGeometry geometry)","vs:DECKGL_FILTER_GL_POSITION(inout vec4 position, VertexGeometry geometry)","vs:DECKGL_FILTER_COLOR(inout vec4 color, VertexGeometry geometry)","fs:DECKGL_FILTER_COLOR(inout vec4 color, FragmentGeometry geometry)"];function m(t){const e=d.A.getDefaultProgramManager(t);for(const t of p)e.addDefaultModule(t);for(const t of g)e.addShaderHook(t);return e}class y{constructor(t,{deck:e,stats:n,viewport:o,timeline:s}={}){(0,r.A)(this,"layers",void 0),(0,r.A)(this,"context",void 0),(0,r.A)(this,"resourceManager",void 0),(0,r.A)(this,"_lastRenderedLayers",[]),(0,r.A)(this,"_needsRedraw",!1),(0,r.A)(this,"_needsUpdate",!1),(0,r.A)(this,"_nextLayers",null),(0,r.A)(this,"_debug",!1),(0,r.A)(this,"activateViewport",t=>{(0,a.A)("layerManager.activateViewport",this,t),t&&(this.context.viewport=t)}),this.layers=[],this.resourceManager=new A({gl:t,protocol:"deck://"}),this.context={mousePosition:null,userData:{},layerManager:this,gl:t,deck:e,programManager:t&&m(t),stats:n||new l.A({id:"deck.gl"}),viewport:o||new f.A({id:"DEFAULT-INITIAL-VIEWPORT"}),timeline:s||new i.K,resourceManager:this.resourceManager,onError:void 0},Object.seal(this)}finalize(){this.resourceManager.finalize();for(const t of this.layers)this._finalizeLayer(t)}needsRedraw(t={clearRedrawFlags:!1}){let e=this._needsRedraw;t.clearRedrawFlags&&(this._needsRedraw=!1);for(const n of this.layers){const r=n.getNeedsRedraw(t);e=e||r}return e}needsUpdate(){return this._nextLayers&&this._nextLayers!==this._lastRenderedLayers?"layers changed":this._needsUpdate}setNeedsRedraw(t){this._needsRedraw=this._needsRedraw||t}setNeedsUpdate(t){this._needsUpdate=this._needsUpdate||t}getLayers({layerIds:t}={}){return t?this.layers.filter(e=>t.find(t=>0===e.id.indexOf(t))):this.layers}setProps(t){"debug"in t&&(this._debug=t.debug),"userData"in t&&(this.context.userData=t.userData),"layers"in t&&(this._nextLayers=t.layers),"onError"in t&&(this.context.onError=t.onError)}setLayers(t,e){(0,a.A)("layerManager.setLayers",this,e,t),this._lastRenderedLayers=t;const n=(0,u.B)(t,Boolean);for(const t of n)t.context=this.context;this._updateLayers(this.layers,n)}updateLayers(){const t=this.needsUpdate();t&&(this.setNeedsRedraw("updating layers: ".concat(t)),this.setLayers(this._nextLayers||this._lastRenderedLayers,t)),this._nextLayers=null}_handleError(t,e,n){n.raiseError(e,"".concat(t," of ").concat(n))}_updateLayers(t,e){const n={};for(const e of t)n[e.id]?s.A.warn("Multiple old layers with same id ".concat(e.id))():n[e.id]=e;const r=[];this._updateSublayersRecursively(e,n,r),this._finalizeOldLayers(n);let i=!1;for(const t of r)if(t.hasUniformTransition()){i="Uniform transition in ".concat(t);break}this._needsUpdate=i,this.layers=r}_updateSublayersRecursively(t,e,n){for(const r of t){r.context=this.context;const t=e[r.id];null===t&&s.A.warn("Multiple new layers with same id ".concat(r.id))(),e[r.id]=null;let i=null;try{this._debug&&t!==r&&r.validateProps(),t?(this._transferLayerState(t,r),this._updateLayer(r)):this._initializeLayer(r),n.push(r),i=r.isComposite?r.getSubLayers():null}catch(t){this._handleError("matching",t,r)}i&&this._updateSublayersRecursively(i,e,n)}}_finalizeOldLayers(t){for(const e in t){const n=t[e];n&&this._finalizeLayer(n)}}_initializeLayer(t){try{t._initialize(),t.lifecycle=o.VD.INITIALIZED}catch(e){this._handleError("initialization",e,t)}}_transferLayerState(t,e){e._transferState(t),e.lifecycle=o.VD.MATCHED,e!==t&&(t.lifecycle=o.VD.AWAITING_GC)}_updateLayer(t){try{t._update()}catch(e){this._handleError("update",e,t)}}_finalizeLayer(t){this._needsRedraw=this._needsRedraw||"finalized ".concat(t),t.lifecycle=o.VD.AWAITING_FINALIZATION;try{t._finalize(),t.lifecycle=o.VD.FINALIZED}catch(e){this._handleError("finalization",e,t)}}}},95855:(t,e,n)=>{"use strict";n.d(e,{qk:()=>o,ws:()=>i});var r=n(34081);function i(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function o(t,e,n=""){if(r.$W.debug&&!function(t,e){if(t.length!==e)return!1;for(let e=0;e<t.length;++e)if(!Number.isFinite(t[e]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(n," some fields set to invali
2d numbers'"));return t}},96146:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIntermediatePosition=function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]},e.GeoJsonEditMode=void 0;var r=l(n(79965)),i=l(n(8755)),o=l(n(12703)),s=l(n(75031)),a=n(71169),u=n(78768);function l(t){return t&&t.__esModule?t:{default:t}}function c(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){if(t){if("string"==typeof t)return A(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var d={type:"FeatureCollection",features:[]},p=[],g=function(){function t(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=[],(e="_clickSequence")in this?Object.defineProperty(this,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[e]=n}var e,n;return e=t,(n=[{key:"getGuides",value:function(t){return d}},{key:"getTooltips",value:function(t){return p}},{key:"getSelectedFeature",value:function(t){return 1===t.selectedIndexes.length?t.data.features[t.selectedIndexes[0]]:null}},{key:"getSelectedGeometry",value:function(t){var e=this.getSelectedFeature(t);return e?e.geometry:null}},{key:"getSelectedFeaturesAsFeatureCollection",value:function(t){var e=t.data.features;return{type:"FeatureCollection",features:t.selectedIndexes.map(function(t){return e[t]})}}},{key:"getClickSequence",value:function(){return this._clickSequence}},{key:"addClickSequence",value:function(t){var e=t.mapCoords;this._clickSequence.push(e)}},{key:"resetClickSequence",value:function(){this._clickSequence=[]}},{key:"getTentativeGuide",value:function(t){return this.getGuides(t).features.find(function(t){return t.properties&&"tentative"===t.properties.guideType})}},{key:"isSelectionPicked",value:function(t,e){if(!t.length)return!1;var n=(0,a.getNonGuidePicks)(t).map(function(t){return t.index}),r=(0,a.getPickedEditHandles)(t).map(function(t){return t.properties.featureIndex}),i=new Set([].concat(c(n),c(r)));return e.selectedIndexes.some(function(t){return i.has(t)})}},{key:"rewindPolygon",value:function(t){var e=t.geometry;return"Polygon"===e.type||"MultiPolygon"===e.type?(0,s.default)(t):t}},{key:"getAddFeatureAction",value:function(t,e){var n=t,r="Feature"===n.type?n:{type:"Feature",properties:{},geometry:n},i=this.rewindPolygon(r),o=new u.ImmutableFeatureCollection(e).addFeature(i).getObject();return{updatedData:o,editType:"addFeature",editContext:{featureIndexes:[o.features.length-1]}}}},{key:"getAddManyFeaturesAction",value:function(t,e){var n,r=t.features,i=new u.ImmutableFeatureCollection(e),o=i.getObject().features.length,s=[],a=function(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=h(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(r);try{for(a.s();!(n=a.n()).done;){var l=n.value,c=l.properties,A=l.geometry;i=i.addFeature({type:"Feature",properties:c,geometry:A}),s.push(o+s.length)}}catch(t){a.e(t)}finally{a.f()}return{updatedData:i.getObject(),editType:"addFeature",editContext:{featureIndexes:s}}}},{key:"getAddFeatureOrBooleanPolygonAction",value:function(t,e){var n=t,s=this.getSelectedFeature(e),a=e.modeConfig;if(a&&a.booleanOperation){if(!s||"Polygon"!==s.geometry.type&&"MultiPolygon"!==s.geometry.type)return console.warn("booleanOperation only supported for single Polygon or MultiPolygon selection"),null;var l,c="Feature"===n.type?n:{type:"Feature",geometry:n};if("union"===a.booleanOperation)l=(0,r.default)(s,c);else if("difference"===a.booleanOperation)l=(0,i.default)(s,c);else{if("intersection"!==a.booleanOperation)return console.warn("Invalid booleanOperation ".concat(a.booleanOperation)),null;l=(0,o.default)(s,c)}if(!l)return console.warn("Canceling edit. Boolean operation erased entire polygon."),null;var h=e.selectedIndexes[0];return{updatedData:new u.ImmutableFeatureCollection(e.data).replaceGeometry(h,l.geometry).getObject(),editType:"unionGeometry",editContext:{featureIndexes:[h]}}}return this.getAddFeatureAction(t,e.data)}},{key:"createTentativeFeature",value:function(t){return null}},{key:"handleClick",value:function(t,e){}},{key:"handlePointerMove",value:function(t,e){var n=this.createTentativeFeature
2(e);n&&e.onEdit({updatedData:e.data,editType:"updateTentativeFeature",editContext:{feature:n}})}},{key:"handleStartDragging",value:function(t,e){}},{key:"handleStopDragging",value:function(t,e){}},{key:"handleDragging",value:function(t,e){}},{key:"handleKeyUp",value:function(t,e){"Escape"===t.key&&(this.resetClickSequence(),e.onEdit({updatedData:e.data,editType:"cancelFeature",editContext:{}}))}}])&&f(e.prototype,n),t}();e.GeoJsonEditMode=g},97458:(t,e,n)=>{"use strict";function r(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}n.d(e,{A:()=>r})},97599:t=>{"use strict";var e,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s={};((t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})})(s,{SplayTreeMap:()=>h,SplayTreeSet:()=>A}),t.exports=(e=s,((t,e,s,a)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let s of i(e))o.call(t,s)||void 0===s||n(t,s,{get:()=>e[s],enumerable:!(a=r(e,s))||a.enumerable});return t})(n({},"__esModule",{value:!0}),e));var a=class{key;left=null;right=null;constructor(t){this.key=t}},u=class extends a{constructor(t){super(t)}},l=class t extends a{value;constructor(t,e){super(t),this.value=e}replaceValue(e){const n=new t(this.key,e);return n.left=this.left,n.right=this.right,n}},c=class{size=0;modificationCount=0;splayCount=0;splay(t){const e=this.root;if(null==e)return this.compare(t,t),-1;let n=null,r=null,i=null,o=null,s=e;const a=this.compare;let u;for(;;)if(u=a(s.key,t),u>0){let e=s.left;if(null==e)break;if(u=a(e.key,t),u>0&&(s.left=e.right,e.right=s,s=e,e=s.left,null==e))break;null==n?r=s:n.left=s,n=s,s=e}else{if(!(u<0))break;{let e=s.right;if(null==e)break;if(u=a(e.key,t),u<0&&(s.right=e.left,e.left=s,s=e,e=s.right,null==e))break;null==i?o=s:i.right=s,i=s,s=e}}return null!=i&&(i.right=s.left,s.left=o),null!=n&&(n.left=s.right,s.right=r),this.root!==s&&(this.root=s,this.splayCount++),u}splayMin(t){let e=t,n=e.left;for(;null!=n;){const t=n;e.left=t.right,t.right=e,e=t,n=e.left}return e}splayMax(t){let e=t,n=e.right;for(;null!=n;){const t=n;e.right=t.left,t.left=e,e=t,n=e.right}return e}_delete(t){if(null==this.root)return null;if(0!=this.splay(t))return null;let e=this.root;const n=e,r=e.left;if(this.size--,null==r)this.root=e.right;else{const t=e.right;e=this.splayMax(r),e.right=t,this.root=e}return this.modificationCount++,n}addNewRoot(t,e){this.size++,this.modificationCount++;const n=this.root;null!=n?(e<0?(t.left=n,t.right=n.right,n.right=null):(t.right=n,t.left=n.left,n.left=null),this.root=t):this.root=t}_first(){const t=this.root;return null==t?null:(this.root=this.splayMin(t),this.root)}_last(){const t=this.root;return null==t?null:(this.root=this.splayMax(t),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(t){return this.validKey(t)&&0==this.splay(t)}defaultCompare(){return(t,e)=>t<e?-1:t>e?1:0}wrap(){return{getRoot:()=>this.root,setRoot:t=>{this.root=t},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:t=>{this.splayCount=t},splay:t=>this.splay(t),has:t=>this.has(t)}}},h=class extends c{root=null;compare;validKey;constructor(t,e){super(),this.compare=t??this.defaultCompare(),this.validKey=e??(t=>null!=t&&null!=t)}delete(t){return!!this.validKey(t)&&null!=this._delete(t)}forEach(t){const e=new m(this.wrap());let n;for(;n=e.next(),!n.done;)t(n.value[1],n.value[0],this)}get(t){if(this.validKey(t)&&null!=this.root&&0==this.splay(t))return this.root.value}hasValue(t){const e=this.splayCount,n=r=>{for(;null!=r;){if(r.value==t)return!0;if(e!=this.splayCount)throw"Concurrent modification during iteration.";if(null!=r.right&&n(r.right))return!0;r=r.left}return!1};return n(this.root)}set(t,e){const n=this.splay(t);return 0==n?(this.root=this.root.replaceValue(e),this.splayCount+=1,this):(this.addNewRoot(new l(t,e),n),this)}setAll(t){t.forEach((t,e)=>{this.set(e,t)})}setIfAbsent(t,e){let n=this.splay(t);if(0==n)return this.root.value;const r=this.modificationCount,i=this.splayCount,o=e();if(r!=this.modificationCount)throw"Concurrent modification during iteration.";return i!=this.splayCount&&(n=this.splay(t)),this.addNewRoot(new l(t,o),n),o}isEmpty(){return null==this.root}isNotEmpty(){return!this.isEmpty()}firstKey(){return null==this.root?null:this._first().key}
2lastKey(){return null==this.root?null:this._last().key}lastKeyBefore(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)<0)return this.root.key;let e=this.root.left;if(null==e)return null;let n=e.right;for(;null!=n;)e=n,n=e.right;return e.key}firstKeyAfter(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)>0)return this.root.key;let e=this.root.right;if(null==e)return null;let n=e.left;for(;null!=n;)e=n,n=e.left;return e.key}update(t,e,n){let r=this.splay(t);if(0==r){const n=this.modificationCount,r=this.splayCount,i=e(this.root.value);if(n!=this.modificationCount)throw"Concurrent modification during iteration.";return r!=this.splayCount&&this.splay(t),this.root=this.root.replaceValue(i),this.splayCount+=1,i}if(null!=n){const e=this.modificationCount,i=this.splayCount,o=n();if(e!=this.modificationCount)throw"Concurrent modification during iteration.";return i!=this.splayCount&&(r=this.splay(t)),this.addNewRoot(new l(t,o),r),o}throw"Invalid argument (key): Key not in map."}updateAll(t){if(null==this.root)return;const e=new m(this.wrap());let n;for(;n=e.next(),!n.done;){const r=t(...n.value);e.replaceValue(r)}}keys(){return new d(this.wrap())}values(){return new g(this.wrap())}entries(){return this[Symbol.iterator]()}[Symbol.iterator](){return new m(this.wrap())}[Symbol.toStringTag]="[object Map]"},A=class t extends c{root=null;compare;validKey;constructor(t,e){super(),this.compare=t??this.defaultCompare(),this.validKey=e??(t=>null!=t&&null!=t)}delete(t){return!!this.validKey(t)&&null!=this._delete(t)}deleteAll(t){for(const e of t)this.delete(e)}forEach(t){const e=this[Symbol.iterator]();let n;for(;n=e.next(),!n.done;)t(n.value,n.value,this)}add(t){const e=this.splay(t);return 0!=e&&this.addNewRoot(new u(t),e),this}addAndReturn(t){const e=this.splay(t);return 0!=e&&this.addNewRoot(new u(t),e),this.root.key}addAll(t){for(const e of t)this.add(e)}isEmpty(){return null==this.root}isNotEmpty(){return null!=this.root}single(){if(0==this.size)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(0==this.size)throw"Bad state: No element";return this._first().key}last(){if(0==this.size)throw"Bad state: No element";return this._last().key}lastBefore(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)<0)return this.root.key;let e=this.root.left;if(null==e)return null;let n=e.right;for(;null!=n;)e=n,n=e.right;return e.key}firstAfter(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)>0)return this.root.key;let e=this.root.right;if(null==e)return null;let n=e.left;for(;null!=n;)e=n,n=e.left;return e.key}retainAll(e){const n=new t(this.compare,this.validKey),r=this.modificationCount;for(const t of e){if(r!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(t)&&0==this.splay(t)&&n.add(this.root.key)}n.size!=this.size&&(this.root=n.root,this.size=n.size,this.modificationCount++)}lookup(t){return this.validKey(t)?0!=this.splay(t)?null:this.root.key:null}intersection(e){const n=new t(this.compare,this.validKey);for(const t of this)e.has(t)&&n.add(t);return n}difference(e){const n=new t(this.compare,this.validKey);for(const t of this)e.has(t)||n.add(t);return n}union(t){const e=this.clone();return e.addAll(t),e}clone(){const e=new t(this.compare,this.validKey);return e.size=this.size,e.root=this.copyNode(this.root),e}copyNode(t){if(null==t)return null;const e=new u(t.key);return function t(e,n){let r,i;do{if(r=e.left,i=e.right,null!=r){const e=new u(r.key);n.left=e,t(r,e)}if(null!=i){const t=new u(i.key);n.right=t,e=i,n=t}}while(null!=i)}(t,e),e}toSet(){return this.clone()}entries(){return new p(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[Symbol.iterator](){return new d(this.wrap())}[Symbol.toStringTag]="[object Set]"},f=class{tree;path=new Array;modificationCount=null;splayCount;constructor(t){this.tree=t,this.splayCount=t.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;const t=this.path[this.path.length-1];return this.getValue(t)}rebuildPath(t){this.path.splice(0,this.path.length),this.tree.splay(t),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(t){for(;null!=t;)this.path.push(t),t=t.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(null==this.modificationCount){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;null!=t;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let t=this.path[this.path.length-1],e=t.right;if(null!=e){for(;null!=e;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===t;)t=this.path.pop();return this.path.length>0}},d=class extends f{getValue(t){return t.key}},p=class extends f{getValue(t){return[t.key,t.key]}},g=class extends f{constructor(t){super(t)}getValue(t){return t.value}},m=class extends f{constructor(t){super(t)}getValue(t){return[t.key,t.value]}replaceValue(t){if(this.modificationCount!=this.tree.getModificationCount())throw"Concurrent modification during iteration.";this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);const e=this.path.pop(),n=e.replaceValue(t);if(this.path.length){const t=this.path[this.path.length-1];e===t.left?t.left=n:t.right=n}else this.tree.setRoot(n);this.path.push(n);const r=this.tree.getSplayCount()+1;this.tree.setSplayCount(r),this.splayCount=r}}},97658:(t,e,n)=>{"use strict";const r=n(37866),i={allowBooleanAttributes:!1,unpairedTags:[]};function o(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function s(t,e){const n=e;for(;e<t.length;e++)if("?"==t[e]||" "==t[e]){const r=t.substr(n,e-n);if(e>5&&"xml"===r)return d("InvalidXml","XML declaration allowed only at the start of the document.",m(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}continue}return e}function a(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}e.validate=function(t,e){e=Object.assign({},i,e);const n=[];let r=!1,u=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let i=0;i<t.length;i++)if("<"===t[i]&&"?"===t[i+1]){if(i+=2,i=s(t,i),i.err)return i}else{if("<"!==t[i]){if(o(t[i]))continue;return d("InvalidChar","char '"+t[i]+"' is not expected.",m(t,i))}{let l=i;if(i++,"!"===t[i]){i=a(t,i);continue}{let h=!1;"/"===t[i]&&(h=!0,i++);let p="";for(;i<t.length&&">"!==t[i]&&" "!==t[i]&&"\t"!==t[i]&&"\n"!==t[i]&&"\r"!==t[i];i++)p+=t[i];if(p=p.trim(),"/"===p[p.length-1]&&(p=p.substring(0,p.length-1),i--),!g(p)){let e;return e=0===p.trim().length?"Invalid space after '<'.":"Tag '"+p+"' is an invali
2d name.",d("InvalidTag",e,m(t,i))}const y=c(t,i);if(!1===y)return d("InvalidAttr","Attributes for '"+p+"' have open quote.",m(t,i));let v=y.value;if(i=y.index,"/"===v[v.length-1]){const n=i-v.length;v=v.substring(0,v.length-1);const o=A(v,e);if(!0!==o)return d(o.err.code,o.err.msg,m(t,n+o.err.line));r=!0}else if(h){if(!y.tagClosed)return d("InvalidTag","Closing tag '"+p+"' doesn't have proper closing.",m(t,i));if(v.trim().length>0)return d("InvalidTag","Closing tag '"+p+"' can't have attributes or invalid starting.",m(t,l));if(0===n.length)return d("InvalidTag","Closing tag '"+p+"' has not been opened.",m(t,l));{const e=n.pop();if(p!==e.tagName){let n=m(t,e.tagStartPos);return d("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+p+"'.",m(t,l))}0==n.length&&(u=!0)}}else{const o=A(v,e);if(!0!==o)return d(o.err.code,o.err.msg,m(t,i-v.length+o.err.line));if(!0===u)return d("InvalidXml","Multiple possible root nodes found.",m(t,i));-1!==e.unpairedTags.indexOf(p)||n.push({tagName:p,tagStartPos:l}),r=!0}for(i++;i<t.length;i++)if("<"===t[i]){if("!"===t[i+1]){i++,i=a(t,i);continue}if("?"!==t[i+1])break;if(i=s(t,++i),i.err)return i}else if("&"===t[i]){const e=f(t,i);if(-1==e)return d("InvalidChar","char '&' is not expected.",m(t,i));i=e}else if(!0===u&&!o(t[i]))return d("InvalidXml","Extra text at the end",m(t,i));"<"===t[i]&&i--}}}return r?1==n.length?d("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",m(t,n[0].tagStartPos)):!(n.length>0)||d("InvalidXml","Invalid '"+JSON.stringify(n.map(t=>t.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):d("InvalidXml","Start tag expected.",1)};const u='"',l="'";function c(t,e){let n="",r="",i=!1;for(;e<t.length;e++){if(t[e]===u||t[e]===l)""===r?r=t[e]:r!==t[e]||(r="");else if(">"===t[e]&&""===r){i=!0;break}n+=t[e]}return""===r&&{value:n,index:e,tagClosed:i}}const h=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function A(t,e){const n=r.getAllMatches(t,h),i={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return d("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",y(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return d("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",y(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return d("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",y(n[t]));const r=n[t][2];if(!p(r))return d("InvalidAttr","Attribute '"+r+"' is an invalid name.",y(n[t]));if(i.hasOwnProperty(r))return d("InvalidAttr","Attribute '"+r+"' is repeated.",y(n[t]));i[r]=1}return!0}function f(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function d(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function p(t){return r.isName(t)}function g(t){return r.isName(t)}function m(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function y(t){return t.startIndex+t[1].length}},97971:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawEllipseUsingThreePointsMode=void 0;var r=u(n(71123)),i=u(n(40268)),o=u(n(25128)),s=n(89595),a=n(96146);function u(t){return t&&t.__esModule?t:{default:t}}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function A(t,e){return A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},A(t,e)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&A(t,e)}(d,t);var e,n,u,f=(u=d,function(){var t,e=h(u);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=h(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==l(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function d(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),f.apply(this,arguments)}return e=d,(n=[{key:"getThreeClickPolygon",value:function(t,e,n,u){var l=(0,a.getIntermediatePosition)(t,e),c=Math.max((0,r.default)(l,(0,s.point)(n)),.001),h=Math.max((0,r.default)(t,e),.001)/2,A={angle:(0,o.default)(t,e)};return(0,i.default)(l,c,h,A)}}])&&c(e.prototype,n),d}
2(n(8800).ThreeClickPolygonMode);e.DrawEllipseUsingThreePointsMode=f},98009:t=>{"use strict";var e,n="function"==typeof Map&&Map.prototype?Map:null,r="function"==typeof Set&&Set.prototype?Set:null;n||(e=function(t){return!1});var i=n?Map.prototype.has:null,o=r?Set.prototype.has:null;e||i||(e=function(t){return!1}),t.exports=e||function(t){if(!t||"object"!=typeof t)return!1;try{if(i.call(t),o)try{o.call(t)}catch(t){return!0}return t instanceof n}catch(t){}return!1}},98248:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawEllipseByBoundingBoxMode=void 0;var r=u(n(43788)),i=u(n(71123)),o=u(n(40268)),s=n(89595),a=n(96146);function u(t){return t&&t.__esModule?t:{default:t}}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function A(t,e){return A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},A(t,e)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&A(t,e)}(d,t);var e,n,u,f=(u=d,function(){var t,e=h(u);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var n=h(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==l(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function d(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),f.apply(this,arguments)}return e=d,(n=[{key:"getTwoClickPolygon",value:function(t,e,n){var u=Math.min(t[0],e[0]),l=Math.min(t[1],e[1]),c=Math.max(t[0],e[0]),h=Math.max(t[1],e[1]),A=(0,r.default)([u,l,c,h]).geometry.coordinates[0],f=(0,a.getIntermediatePosition)(t,e),d=Math.max((0,i.default)((0,s.point)(A[0]),(0,s.point)(A[1])),.001),p=Math.max((0,i.default)((0,s.point)(A[0]),(0,s.point)(A[3])),.001);return(0,o.default)(f,d,p)}}])&&c(e.prototype,n),d}(n(42166).TwoClickPolygonMode);e.DrawEllipseByBoundingBoxMode=f},98389:(t,e,n)=>{"use strict";function r(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}n.d(e,{v:()=>r})},98500:(t,e,n)=>{"use strict";const r=n(41920),i=n(73649),o={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function s(t){this.options=Object.assign({},o,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=i(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=a,this.options.format?(this.indentate=u,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function a(t,e,n,r){const i=this.j2x(t,n+1,r.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNo
vendor: 1,655 bytes, line 2
2de(t[this.options.textNodeName],e,i.attrStr,n):this.buildObjectNode(i.val,e,i.attrStr,n)}function u(t){return this.options.indentBy.repeat(t)}function l(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}s.prototype.build=function(t){return this.options.preserveOrder?r(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},s.prototype.j2x=function(t,e,n){let r="",i="";const o=n.join(".");for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s))if(void 0===t[s])this.isAttribute(s)&&(i+="");else if(null===t[s])this.isAttribute(s)||s===this.options.cdataPropName?i+="":"?"===s[0]?i+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if(t[s]instanceof Date)i+=this.buildTextValNode(t[s],s,"",e);else if("object"!=typeof t[s]){const n=this.isAttribute(s);if(n&&!this.ignoreAttributesFn(n,o))r+=this.buildAttrPairStr(n,""+t[s]);else if(!n)if(s===this.options.textNodeName){let e=this.options.tagValueProcessor(s,""+t[s]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[s],s,"",e)}else if(Array.isArray(t[s])){const r=t[s].length;let o="",a="";for(let u=0;u<r;u++){const r=t[s][u];if(void 0===r);else if(null===r)"?"===s[0]?i+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if("object"==typeof r)if(this.options.oneListGroup){const t=this.j2x(r,e+1,n.concat(s));o+=t.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(a+=t.attr
vendor: 6,116 bytes, line 2
2Str)}else o+=this.processTextOrObjNode(r,s,e,n);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(s,r);t=this.replaceEntitiesValue(t),o+=t}else o+=this.buildTextValNode(r,s,"",e)}this.options.oneListGroup&&(o=this.buildObjectNode(o,s,a,e)),i+=o}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const e=Object.keys(t[s]),n=e.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(e[i],""+t[s][e[i]])}else i+=this.processTextOrObjNode(t[s],s,e,n);return{attrStr:r,val:i}},s.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},s.prototype.buildObjectNode=function(t,e,n,r){if(""===t)return"?"===e[0]?this.indentate(r)+"<"+e+n+"?"+this.tagEndChar:this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,o="";return"?"===e[0]&&(o="?",i=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(r)+"<"+e+n+o+this.tagEndChar+t+this.indentate(r)+i:this.indentate(r)+"<"+e+n+o+">"+t+i}},s.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},s.prototype.buildTextValNode=function(t,e,n,r){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(r)+"<"+e+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(r)+"<"+e+n+">"+i+"</"+e+this.tagEndChar}},s.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t},t.exports=s},98777:(t,e,n)=>{"use strict";n.d(e,{i:()=>r});const r={name:"fp32",vs:"#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\nconst float TWO_PI = 6.2831854820251465;\nconst float PI_2 = 1.5707963705062866;\nconst float PI_16 = 0.1963495463132858;\n\nconst float SIN_TABLE_0 = 0.19509032368659973;\nconst float SIN_TABLE_1 = 0.3826834261417389;\nconst float SIN_TABLE_2 = 0.5555702447891235;\nconst float SIN_TABLE_3 = 0.7071067690849304;\n\nconst float COS_TABLE_0 = 0.9807852506637573;\nconst float COS_TABLE_1 = 0.9238795042037964;\nconst float COS_TABLE_2 = 0.8314695954322815;\nconst float COS_TABLE_3 = 0.7071067690849304;\n\nconst float INVERSE_FACTORIAL_3 = 1.666666716337204e-01;\nconst float INVERSE_FACTORIAL_5 = 8.333333767950535e-03;\nconst float INVERSE_FACTORIAL_7 = 1.9841270113829523e-04;\nconst float INVERSE_FACTORIAL_9 = 2.75573188446287533e-06;\n\nfloat sin_taylor_fp32(float a) {\n float r, s, t, x;\n\n if (a == 0.0) {\n return 0.0;\n }\n\n x = -a * a;\n s = a;\n r = a;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_3;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_5;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_7;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_9;\n s = s + t;\n\n return s;\n}\n\nvoid sincos_taylor_fp32(float a, out float sin_t, out float cos_t) {\n if (a == 0.0) {\n sin_t = 0.0;\n cos_t = 1.0;\n }\n sin_t = sin_taylor_fp32(a);\n cos_t = sqrt(1.0 - sin_t * sin_t);\n}\n\nfloat tan_taylor_fp32(float a) {\n float sin_a;\n float cos_a;\n\n if (a == 0.0) {\n return 0.0;\n }\n float z = floor(a / TWO_PI);\n float r = a - TWO_PI * z;\n\n float t;\n float q = floor(r / PI_2 + 0.5);\n int j = int(q);\n\n if (j < -2 || j > 2) {\n return 1.0 / 0.0;\n }\n\n t = r - PI_2 * q;\n\n q = floor(t / PI_16 + 0.5);\n int k = int(q);\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return 1.0 / 0.0;\n } else {\n t = t - PI_16 * q;\n }\n\n float u = 0.0;\n float v = 0.0;\n\n float sin_t, cos_t;\n float s, c;\n sincos_taylor_fp32(t, sin_t, cos_t);\n\n if (k == 0) {\n s = sin_t;\n c = cos_t;\n } else {\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0;\n v = SIN_TABLE_0;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1;\n v = SIN_TABLE_1;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2;\n v = SIN_TABLE_2;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3;\n v = SIN_TABLE_3;\n }\n if (k > 0) {\n s = u * sin_t + v * cos_t;\n c = u * cos_t - v * sin_t;\n } else {\n s = u * sin_t - v * cos_t;\n c = u * cos_t + v * sin_t;\n }\n }\n\n if (j == 0) {\n sin_a = s;\n cos_a = c;\n } else if (j == 1) {\n sin_a = c;\n cos_a = -s;\n } else if (j == -1) {\n sin_a = -c;\n cos_a = s;\n } else {\n sin_a = -s;\n cos_a = -c;\n }\n return sin_a / cos_a;\n}\n#endif\n\nfloat tan_fp32(float a) {\n#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\n return tan_taylor_fp32(a);\n#else\n return tan(a);\n#endif\n}\n",fs:null}},99545:(t,e,n)=>{var r;!function(i,o,s,a){"use strict";var u,l=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),h=Math.round,A=Math.abs,f=Date.now;function d(t,e,n){return setTimeout(b(t,n),e)}function p(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}function g(t,e,n){var r;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(r=0;r<t.length;)e.call(n,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function m(t,e,n){var r="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.
2stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}u="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==a&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}:Object.assign;var y=m(function(t,e,n){for(var r=Object.keys(e),i=0;i<r.length;)(!n||n&&t[r[i]]===a)&&(t[r[i]]=e[r[i]]),i++;return t},"extend","Use `assign`."),v=m(function(t,e){return y(t,e,!0)},"merge","Use `assign`.");function _(t,e,n){var r,i=e.prototype;(r=t.prototype=Object.create(i)).constructor=t,r._super=i,n&&u(r,n)}function b(t,e){return function(){return t.apply(e,arguments)}}function w(t,e){return"function"==typeof t?t.apply(e&&e[0]||a,e):t}function E(t,e){return t===a?e:t}function x(t,e,n){g(C(e),function(e){t.addEventListener(e,n,!1)})}function S(t,e,n){g(C(e),function(e){t.removeEventListener(e,n,!1)})}function T(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function P(t,e){return t.indexOf(e)>-1}function C(t){return t.trim().split(/\s+/g)}function M(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return-1}function I(t){return Array.prototype.slice.call(t,0)}function O(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];M(i,s)<0&&r.push(t[o]),i[o]=s,o++}return n&&(r=e?r.sort(function(t,n){return t[e]>n[e]}):r.sort()),r}function R(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<l.length;){if((r=(n=l[o])?n+i:e)in t)return r;o++}return a}var L=1;function B(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||i}var k="ontouchstart"in i,N=R(i,"PointerEvent")!==a,F=k&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),D="touch",j="mouse",U=["x","y"],G=["clientX","clientY"];function z(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){w(t.options.enable,[t])&&n.handler(e)},this.init()}function V(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=1&e&&r-i===0,s=12&e&&r-i===0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=H(e)),i>1&&!n.firstMultiple?n.firstMultiple=H(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,u=s?s.center:o.center,l=e.center=q(r);e.timeStamp=f(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=Q(u,l),e.distance=Y(u,l),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};1!==e.eventType&&4!==o.eventType||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=X(e.deltaX,e.deltaY);var c,h,d=W(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=A(d.x)>A(d.y)?d.x:d.y,e.scale=s?(c=s.pointers,Y((h=r)[0],h[1],G)/Y(c[0],c[1],G)):1,e.rotation=s?function(t,e){return Q(e[1],e[0],G)+Q(t[1],t[0],G)}(s.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,r,i,o,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(8!=e.eventType&&(u>25||s.velocity===a)){var l=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,h=W(u,l,c);r=h.x,i=h.y,n=A(h.x)>A(h.y)?h.x:h.y,o=X(l,c),t.lastInterval=e}else n=s.velocity,r=s.velocityX,i=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(n,e);var p=t.element;T(e.srcEvent.target,p)&&(p=e.srcEvent.target),e.target=p}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function H(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:h(t.pointers[n].clientX),clientY:h(t.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:e,center:q(e),deltaX:t.deltaX,deltaY:t.deltaY}}function q(t){var e=t.length;if(1===e)return{x:h(t[0].clientX),y:h(t[0].clientY)};for(var n=0,r=0,i=0;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:h(n/e),y:h(r/e)}}function W(t,e,n){return{x:e/t||0,y:n/t||0}}function X(t,e){return t===e?1:A(t)>=A(e)?t<0?2:4:e<0?8:16}function Y(t,e,n){n||(n=U);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function Q(t,e,n){n||(n=U);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}z.prototype={handler:function(){},init:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(B(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(B(this.element),this.evWin,this.domHandler)}};
2var J={mousedown:1,mousemove:2,mouseup:4};function Z(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,z.apply(this,arguments)}_(Z,z,{handler:function(t){var e=J[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:j,srcEvent:t}))}});var K={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},$={2:D,3:"pen",4:j,5:"kinect"},tt="pointerdown",et="pointermove pointerup pointercancel";function nt(){this.evEl=tt,this.evWin=et,z.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(tt="MSPointerDown",et="MSPointerMove MSPointerUp MSPointerCancel"),_(nt,z,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=K[r],o=$[t.pointerType]||t.pointerType,s=o==D,a=M(e,t.pointerId,"pointerId");1&i&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):12&i&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var rt={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function it(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,z.apply(this,arguments)}function ot(t,e){var n=I(t.touches),r=I(t.changedTouches);return 12&e&&(n=O(n.concat(r),"identifier",!0)),[n,r]}_(it,z,{handler:function(t){var e=rt[t.type];if(1===e&&(this.started=!0),this.started){var n=ot.call(this,t,e);12&e&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:D,srcEvent:t})}}});var st={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function at(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},z.apply(this,arguments)}function ut(t,e){var n=I(t.touches),r=this.targetIds;if(3&e&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,s=I(t.changedTouches),a=[],u=this.target;if(o=n.filter(function(t){return T(t.target,u)}),1===e)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<s.length;)r[s[i].identifier]&&a.push(s[i]),12&e&&delete r[s[i].identifier],i++;return a.length?[O(o.concat(a),"identifier",!0),a]:void 0}function lt(){z.apply(this,arguments);var t=b(this.handler,this);this.touch=new at(this.manager,t),this.mouse=new Z(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function ct(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,ht.call(this,e)):12&t&&ht.call(this,e)}function ht(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout(function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)},2500)}}function At(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),s=Math.abs(n-i.y);if(o<=25&&s<=25)return!0}return!1}_(at,z,{handler:function(t){var e=st[t.type],n=ut.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:D,srcEvent:t})}}),_(lt,z,{handler:function(t,e,n){var r=n.pointerType==D,i=n.pointerType==j;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)ct.call(this,e,n);else if(i&&At.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ft=R(c.style,"touchAction"),dt=ft!==a,pt="compute",gt="auto",mt="manipulation",yt="none",vt="pan-x",_t="pan-y",bt=function(){if(!dt)return!1;var t={},e=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||i.CSS.supports("touch-action",n)}),t}();function wt(t,e){this.manager=t,this.set(e)}wt.prototype={set:function(t){t==pt&&(t=this.compute()),dt&&this.manager.element.style&&bt[t]&&(this.manager.element.style[ft]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return g(this.manager.recognizers,function(e){w(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(P(t,yt))return yt;var e=P(t,vt),n=P(t,_t);return e&&n?yt:e||n?e?vt:_t:P(t,mt)?mt:gt}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var r=this.actions,i=P(r,yt)&&!bt[yt],o=P(r,_t)&&!bt[_t],s=P(r,vt)&&!bt[vt];if(i){var a=1===t.pointers.length,u=t.distance<2,l=t.deltaTime<250;
vendor: 9,645 bytes, line 2
2if(a&&u&&l)return}if(!s||!o)return i||o&&6&n||s&&24&n?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var Et=32;function xt(t){this.options=u({},this.defaults,t||{}),this.id=L++,this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function St(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function Tt(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function Pt(t,e){var n=e.manager;return n?n.get(t):t}function Ct(){xt.apply(this,arguments)}function Mt(){Ct.apply(this,arguments),this.pX=null,this.pY=null}function It(){Ct.apply(this,arguments)}function Ot(){xt.apply(this,arguments),this._timer=null,this._input=null}function Rt(){Ct.apply(this,arguments)}function Lt(){Ct.apply(this,arguments)}function Bt(){xt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function kt(t,e){return(e=e||{}).recognizers=E(e.recognizers,kt.defaults.preset),new Nt(t,e)}function Nt(t,e){this.options=u({},kt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new(this.options.inputClass||(N?nt:F?at:k?lt:Z))(this,V),this.touchAction=new wt(this,this.options.touchAction),Ft(this,!0),g(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function Ft(t,e){var n,r=t.element;r.style&&(g(t.options.cssProps,function(i,o){n=R(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={}))}xt.prototype={defaults:{},set:function(t){return u(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(p(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Pt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return p(t,"dropRecognizeWith",this)||(t=Pt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(p(t,"requireFailure",this))return this;var e=this.requireFail;return-1===M(e,t=Pt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(p(t,"dropRequireFailure",this))return this;t=Pt(t,this);var e=M(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+St(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+St(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Et},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=u({},t);if(!w(this.options.enable,[this,e]))return this.reset(),void(this.state=Et);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},_(Ct,xt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,r=6&e,i=this.attrTest(t);return r&&(8&n||!i)?16|e:r||i?4&n?8|e:2&e?4|e:2:Et}}),_(Mt,Ct,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push(_t),24&t&&e.push(vt),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,s=t.deltaY;return i&e.direction||(6&e.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(t.deltaX)):(i=0===s?1:s<0?8:16,n=s!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return Ct.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Tt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),_(It,Ct,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[yt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),_(Ot,xt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[gt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime>e.time;if(this._input=t,!r||!n||12&t.eventType&&!i)this.reset();else if(1&t.eventType)this.reset(),this._timer=d(function(){this.state=8,this.tryEmit()},e.time,this);else if(4&t.eventType)return 8;return Et},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),_(Rt,Ct,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[yt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),_(Lt,Ct,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Mt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:24&n&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&A(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=Tt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),_(Bt,xt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[mt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=t.eventType)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||Y(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=d(function(){this.state=8,this.tryEmit()},e.interval,this),2):8}return Et},failTimeout:function(){return this._timer=d(function(){this.state=Et},this.options.interval,this),Et},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),kt.VERSION="2.0.7",kt.defaults={domEvents:!1,touchAction:pt,enable:!0,inputTarget:null,inputClass:null,preset:[[Rt,{enable:!1}],[It,{enable:!1},["rotate"]],[Lt,{direction:6}],[Mt,{direction:6},["swipe"]],[Bt],[Bt,{event:"doubletap",taps:2},["tap"]],[Ot]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Nt.prototype={set:function(t){return u(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var r=this.recognizers,i=e.curRecognizer;(!i||i&&8&i.state)&&(i=e.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===e.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&14&n.state&&(i=e.curRecognizer=n),o++}},get:function(t){if(t instanceof xt)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(p(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(p(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=M(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return g(C(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==a){var n=this.handlers;return g(C(t),function(t){e?n[t]&&n[t].splice(M(n[t],e),1):delete n[t]}),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},destroy:function(){this.element&&Ft(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(kt,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Et,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Nt,Input:z,TouchAction:wt,TouchInput:at,MouseInput:Z,PointerEventInput:nt,TouchMouseInput:lt,SingleTouchInput:it,Recognizer:xt,AttrRecognizer:Ct,Tap:Bt,Pan:Mt,Swipe:Lt,P
2inch:It,Rotate:Rt,Press:Ot,on:x,off:S,each:g,merge:v,extend:y,assign:u,inherit:_,bindFn:b,prefixed:R}),(void 0!==i?i:"undefined"!=typeof self?self:{}).Hammer=kt,(r=function(){return kt}.call(e,n,e,t))===a||(t.exports=r)}(window,document)},99608:(t,e,n)=>{"use strict";n.d(e,{A:()=>$});var r=n(24586),i=n(93314),o=n(81011),s=n(79327),a=n(34081),u=n(6809);class l extends u.A{get value(){return this._value}_onUpdate(){const{time:t,settings:{fromValue:e,toValue:n,duration:r,easing:i}}=this,o=i(t/r);this._value=(0,a.Cc)(e,n,o)}}const c=1e-5;function h(t,e,n,r,i){const o=e-t;return(n-e)*i+-o*r+o+e}function A(t,e){if(Array.isArray(t)){let n=0;for(let r=0;r<t.length;r++){const i=t[r]-e[r];n+=i*i}return Math.sqrt(n)}return Math.abs(t-e)}class f extends u.A{get value(){return this._currValue}_onUpdate(){const{fromValue:t,toValue:e,damping:n,stiffness:r}=this.settings,{_prevValue:i=t,_currValue:o=t}=this;let s=function(t,e,n,r,i){if(Array.isArray(n)){const o=[];for(let s=0;s<n.length;s++)o[s]=h(t[s],e[s],n[s],r,i);return o}return h(t,e,n,r,i)}(i,o,e,n,r);const a=A(s,e),u=A(s,o);a<c&&u<c&&(s=e,this.end()),this._prevValue=o,this._currValue=s}}var d=n(23615);const p={interpolation:l,spring:f};class g{constructor(t){this.transitions=new Map,this.timeline=t}get active(){return this.transitions.size>0}add(t,e,n,r){const{transitions:i}=this;if(i.has(t)){const n=i.get(t),{value:r=n.settings.fromValue}=n;e=r,this.remove(t)}if(!(r=(0,s.K$)(r)))return;const o=p[r.type];if(!o)return void d.A.error("unsupported transition type '".concat(r.type,"'"))();const a=new o(this.timeline);a.start({...r,fromValue:e,toValue:n}),i.set(t,a)}remove(t){const{transitions:e}=this;e.has(t)&&(e.get(t).cancel(),e.delete(t))}update(){const t={};for(const[e,n]of this.transitions)n.update(),t[e]=n.value,n.inProgress||this.remove(e);return t}clear(){for(const t of this.transitions.keys())this.remove(t)}}var m=n(19634),y=n(14557),v=n(42402),_=n(90455),b=n(44454),w=n(463),E=n(43405),x=n(85016),S=n(85039),T=n(35423),P=n(32968),C=n(79266);const M={10241:9987,10240:9729,10242:33071,10243:33071},I={};var O=n(22398);const R={boolean:{validate:(t,e)=>!0,equal:(t,e,n)=>Boolean(t)===Boolean(e)},number:{validate:(t,e)=>Number.isFinite(t)&&(!("max"in e)||t<=e.max)&&(!("min"in e)||t>=e.min)},color:{validate:(t,e)=>e.optional&&!t||k(t)&&(3===t.length||4===t.length),equal:(t,e,n)=>(0,O.b)(t,e,1)},accessor:{validate(t,e){const n=N(t);return"function"===n||n===N(e.value)},equal:(t,e,n)=>"function"==typeof e||(0,O.b)(t,e,1)},array:{validate:(t,e)=>e.optional&&!t||k(t),equal(t,e,n){const{compare:r}=n,i=Number.isInteger(r)?r:r?1:0;return r?(0,O.b)(t,e,i):t===e}},object:{equal(t,e,n){if(n.ignore)return!0;const{compare:r}=n,i=Number.isInteger(r)?r:r?1:0;return r?(0,O.b)(t,e,i):t===e}},function:{validate:(t,e)=>e.optional&&!t||"function"==typeof t,equal:(t,e,n)=>!n.compare&&!1!==n.ignore||t===e},data:{transform:(t,e,n)=>{const{dataTransform:r}=n.props;return r&&t?r(t):t}},image:{transform:(t,e,n)=>{const r=n.context;return r&&r.gl?function(t,e,n,r){if(n instanceof C.A)return n;n.constructor&&"Object"!==n.constructor.name&&(n={data:n});let i=null;n.compressed&&(i={10241:n.data.length>1?9985:9729});const o=new C.A(e,{...n,parameters:{...M,...i,...r}});return I[o.id]=t,o}(n.id,r.gl,t,{...e.parameters,...n.props.textureParameters}):null},release:(t,e,n)=>{var r,i;r=n.id,(i=t)&&i instanceof C.A&&I[i.id]===r&&(i.delete(),delete I[i.id])}}};function L(t,e){switch(N(e)){case"object":return B(t,e);case"array":return B(t,{type:"array",value:e,compare:!1});case"boolean":return B(t,{type:"boolean",value:e});case"number":return B(t,{type:"number",value:e});case"function":return B(t,{type:"function",value:e,compare:!0});default:return{name:t,type:"unknown",value:e}}}function B(t,e){return"type"in e?{name:t,...R[e.type],...e}:"value"in e?{name:t,type:N(e.value),...e}:{name:t,type:"object",value:e}}function k(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function N(t){return k(t)?"array":null===t?"null":typeof t}function F(t,e){let n="_mergedDefaultProps";if(e)for(const t of e){const e=t.constructor;e&&(n+=":".concat(e.extensionName||e.name))}return U(t,n)||(t[n]=function(t,e){if(!t.prototype)return null;const n=F(Object.getPrototypeOf(t)),r=function(t){const e={},n={},r={};for(const[i,o]of Object.entries(t)){const t=null==o?void 0:o.deprecatedFor;if(t)r[i]=Array.isArray(t)?t:[t];else{const t=L(i,o);e[i]=t,n[i]=t.value}}return{propTypes:e,defaultProps:n,deprecatedProps:r}}(U(t,"defaultProps")||{}),i=Object.assign(Object.create(null),n,r.defaultProps),o=Object.assign(Object.create(null),null==n?void 0:n[y.fW],r.propTypes),s=Object.assign(Object.create(null),null==n?void 0:n[y.uH],r.deprecatedProps);for(const t of e){const e=F(t.constructor);e&&(Object.assign(i,e),Object.assign(o,e[y.fW]),Object.assign(s,e[y.uH]))}return function(t,e){const n=function(t){const e=t.componentName;return e||d.A.warn("".concat(t.name,".componentName not specified"))(),e||t.name}(e);Object.defineProperties(t,{id:{writable:!0,value:n}})}(i,t),function(t,e){const n={},r={};for(const t in e){const i=e[t],{name:o,value:s}=i;i.async&&(n[o]=s,r[o]=D(o))}t[y.jA]=n,t[y.YN]={},Object.defineProperties(t,r)}(i,o),function(t,e){for(const n in e)Object.defineProperty(t,n,{enumerable:!1,set(t){const r="".concat(this.id,": ").concat(n);for(const r of e[n])j(this,r)||(this[r]=t);d.A.deprecated(r,e[n].join("/"))()}})}(i,s),i[y.fW]=o,i[y.uH]=s,0!==e.length||j(t,"_propTypes")||(t._propTypes=o),i}(t,e||[]))}function D(t){return{enumerable:!0,set(e){"string"==typeof e||e instanceof Promise||(0,P.Td)(e)?this[y.YN][t]=e:this[y.vf][t]=e}
2,get(){if(this[y.vf]){if(t in this[y.vf])return this[y.vf][t]||this[y.jA][t];if(t in this[y.YN]){const e=this[y.r3]&&this[y.r3].internalState;if(e&&e.hasAsyncProp(t))return e.getAsyncProp(t)||this[y.jA][t]}}return this[y.jA][t]}}}function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function U(t,e){return j(t,e)&&t[e]}let G=0;class z{constructor(...t){(0,r.A)(this,"id",void 0),(0,r.A)(this,"props",void 0),(0,r.A)(this,"count",void 0),this.props=function(t,e){let n;for(let t=e.length-1;t>=0;t--){const r=e[t];"extensions"in r&&(n=r.extensions)}const r=F(t.constructor,n),i=Object.create(r);i[y.r3]=t,i[y.YN]={},i[y.vf]={};for(let t=0;t<e.length;++t){const n=e[t];for(const t in n)i[t]=n[t]}return Object.freeze(i),i}(this,t),this.id=this.props.id,this.count=G++}clone(t){const{props:e}=this,n={};for(const t in e[y.jA])t in e[y.vf]?n[t]=e[y.vf][t]:t in e[y.YN]&&(n[t]=e[y.YN][t]);return new this.constructor({...e,...n,...t})}}(0,r.A)(z,"componentName","Component"),(0,r.A)(z,"defaultProps",{});const V=Object.freeze({});class H{constructor(t){(0,r.A)(this,"component",void 0),(0,r.A)(this,"onAsyncPropUpdated",void 0),(0,r.A)(this,"asyncProps",void 0),(0,r.A)(this,"oldProps",void 0),(0,r.A)(this,"oldAsyncProps",void 0),this.component=t,this.asyncProps={},this.onAsyncPropUpdated=()=>{},this.oldProps=null,this.oldAsyncProps=null}finalize(){for(const t in this.asyncProps){const e=this.asyncProps[t];e&&e.type&&e.type.release&&e.type.release(e.resolvedValue,e.type,this.component)}this.asyncProps={},this.component=null,this.resetOldProps()}getOldProps(){return this.oldAsyncProps||this.oldProps||V}resetOldProps(){this.oldAsyncProps=null,this.oldProps=this.component?this.component.props:null}hasAsyncProp(t){return t in this.asyncProps}getAsyncProp(t){const e=this.asyncProps[t];return e&&e.resolvedValue}isAsyncPropLoading(t){if(t){const e=this.asyncProps[t];return Boolean(e&&e.pendingLoadCount>0&&e.pendingLoadCount!==e.resolvedLoadCount)}for(const t in this.asyncProps)if(this.isAsyncPropLoading(t))return!0;return!1}reloadAsyncProp(t,e){this._watchPromise(t,Promise.resolve(e))}setAsyncProps(t){this.component=t[y.r3]||this.component;const e=t[y.vf]||{},n=t[y.YN]||t,r=t[y.jA]||{};for(const t in e){const n=e[t];this._createAsyncPropData(t,r[t]),this._updateAsyncProp(t,n),e[t]=this.getAsyncProp(t)}for(const t in n){const e=n[t];this._createAsyncPropData(t,r[t]),this._updateAsyncProp(t,e)}}_fetch(t,e){return null}_onResolve(t,e){}_onError(t,e){}_updateAsyncProp(t,e){this._didAsyncInputValueChange(t,e)&&("string"==typeof e&&(e=this._fetch(t,e)),e instanceof Promise?this._watchPromise(t,e):(0,P.Td)(e)?this._resolveAsyncIterable(t,e):this._setPropValue(t,e))}_freezeAsyncOldProps(){if(!this.oldAsyncProps&&this.oldProps){this.oldAsyncProps=Object.create(this.oldProps);for(const t in this.asyncProps)Object.defineProperty(this.oldAsyncProps,t,{enumerable:!0,value:this.oldProps[t]})}}_didAsyncInputValueChange(t,e){const n=this.asyncProps[t];return e!==n.resolvedValue&&e!==n.lastValue&&(n.lastValue=e,!0)}_setPropValue(t,e){this._freezeAsyncOldProps();const n=this.asyncProps[t];n&&(e=this._postProcessValue(n,e),n.resolvedValue=e,n.pendingLoadCount++,n.resolvedLoadCount=n.pendingLoadCount)}_setAsyncPropValue(t,e,n){const r=this.asyncProps[t];r&&n>=r.resolvedLoadCount&&void 0!==e&&(this._freezeAsyncOldProps(),r.resolvedValue=e,r.resolvedLoadCount=n,this.onAsyncPropUpdated(t,e))}_watchPromise(t,e){const n=this.asyncProps[t];if(n){n.pendingLoadCount++;const r=n.pendingLoadCount;e.then(e=>{this.component&&(e=this._postProcessValue(n,e),this._setAsyncPropValue(t,e,r),this._onResolve(t,e))}).catch(e=>{this._onError(t,e)})}}async _resolveAsyncIterable(t,e){if("data"!==t)return void this._setPropValue(t,e);const n=this.asyncProps[t];if(!n)return;n.pendingLoadCount++;const r=n.pendingLoadCount;let i=[],o=0;for await(const n of e){if(!this.component)return;const{dataTransform:e}=this.component.props;i=e?e(n,i):i.concat(n),Object.defineProperty(i,"__diff",{enumerable:!1,value:[{startRow:o,endRow:i.length}]}),o=i.length,this._setAsyncPropValue(t,i,r)}
2this._onResolve(t,i)}_postProcessValue(t,e){const n=t.type;return n&&this.component&&(n.release&&n.release(t.resolvedValue,n,this.component),n.transform)?n.transform(e,n,this.component):e}_createAsyncPropData(t,e){if(!this.asyncProps[t]){const n=this.component&&this.component.props[y.fW];this.asyncProps[t]={type:n&&n[t],lastValue:null,resolvedValue:e,pendingLoadCount:0,resolvedLoadCount:0}}}}class q extends H{constructor({attributeManager:t,layer:e}){super(e),(0,r.A)(this,"attributeManager",void 0),(0,r.A)(this,"needsRedraw",void 0),(0,r.A)(this,"needsUpdate",void 0),(0,r.A)(this,"subLayers",void 0),(0,r.A)(this,"usesPickingColorCache",void 0),(0,r.A)(this,"hasPickingBuffer",void 0),(0,r.A)(this,"changeFlags",void 0),(0,r.A)(this,"viewport",void 0),(0,r.A)(this,"uniformTransitions",void 0),(0,r.A)(this,"propsInTransition",void 0),this.attributeManager=t,this.needsRedraw=!0,this.needsUpdate=!0,this.subLayers=null,this.usesPickingColorCache=!1}get layer(){return this.component}_fetch(t,e){const n=this.layer,r=null==n?void 0:n.props.fetch;return r?r(e,{propName:t,layer:n}):super._fetch(t,e)}_onResolve(t,e){const n=this.layer;if(n){const r=n.props.onDataLoad;"data"===t&&r&&r(e,{propName:t,layer:n})}}_onError(t,e){const n=this.layer;n&&n.raiseError(e,"loading ".concat(t," of ").concat(this.layer))}}var W=n(84075),X=n(53629);const Y=2**24-1,Q=Object.freeze([]),J=(0,E.A)(({oldViewport:t,viewport:e})=>t.equals(e));let Z=new Uint8ClampedArray(0);const K={data:{type:"data",value:Q,async:!0},dataComparator:{type:"function",value:null,optional:!0},_dataDiff:{type:"function",value:t=>t&&t.__diff,optional:!0},dataTransform:{type:"function",value:null,optional:!0},onDataLoad:{type:"function",value:null,optional:!0},onError:{type:"function",value:null,optional:!0},fetch:{type:"function",value:(t,{propName:e,layer:n,loaders:r,loadOptions:i,signal:o})=>{const{resourceManager:s}=n.context;var a;i=i||n.getLoadOptions(),r=r||n.props.loaders,o&&(i={...i,fetch:{...null===(a=i)||void 0===a?void 0:a.fetch,signal:o}});let u=s.contains(t);return u||i||(s.add({resourceId:t,data:(0,X.H)(t,r),persistent:!1}),u=!0),u?s.subscribe({resourceId:t,onChange:t=>{var r;return null===(r=n.internalState)||void 0===r?void 0:r.reloadAsyncProp(e,t)},consumerId:n.id,requestId:e}):(0,X.H)(t,r,i)}},updateTriggers:{},visible:!0,pickable:!1,opacity:{type:"number",min:0,max:1,value:1},operation:"draw",onHover:{type:"function",value:null,optional:!0},onClick:{type:"function",value:null,optional:!0},onDragStart:{type:"function",value:null,optional:!0},onDrag:{type:"function",value:null,optional:!0},onDragEnd:{type:"function",value:null,optional:!0},coordinateSystem:i.rf.DEFAULT,coordinateOrigin:{type:"array",value:[0,0,0],compare:!0},modelMatrix:{type:"array",value:null,compare:!0,optional:!0},wrapLongitude:!1,positionFormat:"XYZ",colorFormat:"RGBA",parameters:{type:"object",value:{},optional:!0,compare:2},loadOptions:{type:"object",value:null,optional:!0,ignore:!0},transitions:null,extensions:[],loaders:{type:"array",value:[],optional:!0,ignore:!0},getPolygonOffset:{type:"function",value:({layerIndex:t})=>[0,100*-t]},highlightedObjectIndex:null,autoHighlight:!1,highlightColor:{type:"accessor",value:[0,0,128,128]}};class $ extends z{constructor(...t){super(...t),(0,r.A)(this,"internalState",null),(0,r.A)(this,"lifecycle",y.VD.NO_STATE),(0,r.A)(this,"context",void 0),(0,r.A)(this,"state",void 0),(0,r.A)(this,"parent",null)}static get componentName(){return Object.prototype.hasOwnProperty.call(this,"layerName")?this.layerName:""}get root(){let t=this;for(;t.parent;)t=t.parent;return t}toString(){const t=this.constructor.layerName||this.constructor.name;return"".concat(t,"({id: '").concat(this.props.id,"'})")}project(t){(0,w.A)(this.internalState);const e=this.internalState.viewport||this.context.viewport,n=(0,S.w)(t,{viewport:e,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem}),[r,i,o]=(0,W.VJ)(n,e.pixelProjectionMatrix);return 2===t.length?[r,i]:[r,i,o]}unproject(t){return(0,w.A)(this.internalState),(this.internalState.viewport||this.context.viewport).unproject(t)}projectPosition(t,e){(0,w.A)(this.internalState);const n=this.internalState.viewport||this.context.viewport;return(0,S.R)(t,{viewport:n,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem,...e})}get isComposite(){return!1}setState(t){this.setChangeFlags({stateChanged:!0}),Object.assign(this.state,t),this.setNeedsRedraw()}setNeedsRedraw(){this.internalState&&(this.internalState.needsRedraw=!0)}setNeedsUpdate(){this.internalState&&(this.context.layerManager.setNeedsUpdate(String(this)),this.internalState.needsUpdate=!0)}get isLoaded(){return!!this.internalState&&!this.internalState.isAsyncPropLoading()}get wrapLongitude(){return this.props.wrapLongitude}isPickable(){return this.props.pickable&&this.props.visible}getModels(){return this.state&&(this.state.models||this.state.model&&[this.state.model])||[]}setModuleParameters(t){for(const e of this.getModels())e.updateModuleSettings(t)}getAttributeManager(){return this.internalState&&this.internalState.attributeManager}getCurrentLayer(){return this.internalState&&this.internalState.layer}getLoadOptions(){return this.props.loadOptions}use64bitPositions(){const{coordinateSystem:t}=this.props;return t===i.rf.DEFAULT||t===i.rf.LNGLAT||t===i.rf.CARTESIAN}onHover(t,e){return this.props.onHover&&this.props.onHover(t,e)||!1}onClick(t,e){return this.props.onClick&&this.props.onClick(t,e)||!1}nullPickingColor(){return[0,0,0]}encodePickingColor(t,e=[]){return e[0]=t+1&255,e[1]=t+1>>8&255,e[2]=t+1>>8>>8&255,e}decodePickingColor(t){(0,w.A)(t instanceof Uint8Array);const[e,n,r]=t;return e+256*n+65536*r-1}getNumInstances(){return Number.isFinite(this.props.numInstances)?this.props.numInstances:this.state&&void 0!==this.state.numInstances?this.state.numInstances:(0,v.U)(this.props.data)}getStartIndices(){return this.props.startIndices?this.props.startIndices:this.state&&this.state.startIndices?this.state.startIndices:null}getBounds(){var t;return null===(t=this.getAttributeManager())||void 0===t?void 0:t.getBounds(["positions","instancePositions"])}getShaders(t){for(const e of this.props.extensions)t=(0,x.n)(t,e.getShaders.call(this,e));return t}shouldUpdateState(t){return t.changeFlags.propsOrDataChanged}updateState(t){const e=this.getAttributeManager(),{dataChanged:n}=t.changeFlags;if(n&&e)if(Array.isArray(n))for(const t of n)e.invalidateAll(t);
2else e.invalidateAll();if(e){const{props:n}=t,r=this.internalState.hasPickingBuffer,i=Number.isInteger(n.highlightedObjectIndex)||n.pickable||n.extensions.some(t=>t.getNeedsPickingBuffer.call(this,t));if(r!==i){this.internalState.hasPickingBuffer=i;const{pickingColors:t,instancePickingColors:n}=e.attributes,r=t||n;r&&(i&&r.constant&&(r.constant=!1,e.invalidate(r.id)),r.value||i||(r.constant=!0,r.value=[0,0,0]))}}}finalizeState(t){for(const t of this.getModels())t.delete();const e=this.getAttributeManager();e&&e.finalize(),this.context&&this.context.resourceManager.unsubscribe({consumerId:this.id}),this.internalState&&(this.internalState.uniformTransitions.clear(),this.internalState.finalize())}draw(t){for(const e of this.getModels())e.draw(t)}getPickingInfo({info:t,mode:e,sourceLayer:n}){const{index:r}=t;return r>=0&&Array.isArray(this.props.data)&&(t.object=this.props.data[r]),t}raiseError(t,e){var n,r,i,o;e&&(t=new Error("".concat(e,": ").concat(t.message),{cause:t})),null!==(n=(r=this.props).onError)&&void 0!==n&&n.call(r,t)||null===(i=this.context)||void 0===i||null===(o=i.onError)||void 0===o||o.call(i,t,this)}getNeedsRedraw(t={clearRedrawFlags:!1}){return this._getNeedsRedraw(t)}needsUpdate(){return!!this.internalState&&(this.internalState.needsUpdate||this.hasUniformTransition()||this.shouldUpdateState(this._getUpdateParams()))}hasUniformTransition(){var t;return(null===(t=this.internalState)||void 0===t?void 0:t.uniformTransitions.active)||!1}activateViewport(t){if(!this.internalState)return;const e=this.internalState.viewport;this.internalState.viewport=t,e&&J({oldViewport:e,viewport:t})||(this.setChangeFlags({viewportChanged:!0}),this.isComposite?this.needsUpdate()&&this.setNeedsUpdate():this._update())}invalidateAttribute(t="all"){const e=this.getAttributeManager();e&&("all"===t?e.invalidateAll():e.invalidate(t))}updateAttributes(t){for(const e of this.getModels())this._setModelAttributes(e,t)}_updateAttributes(){const t=this.getAttributeManager();if(!t)return;const e=this.props,n=this.getNumInstances(),r=this.getStartIndices();t.update({data:e.data,numInstances:n,startIndices:r,props:e,transitions:e.transitions,buffers:e.data.attributes,context:this});const i=t.getChangedAttributes({clearChangedFlags:!0});this.updateAttributes(i)}_updateAttributeTransition(){const t=this.getAttributeManager();t&&t.updateTransition()}_updateUniformTransition(){const{uniformTransitions:t}=this.internalState;if(t.active){const e=t.update(),n=Object.create(this.props);for(const t in e)Object.defineProperty(n,t,{value:e[t]});return n}return this.props}calculateInstancePickingColors(t,{numInstances:e}){if(t.constant)return;const n=Math.floor(Z.length/3);if(this.internalState.usesPickingColorCache=!0,n<e){e>Y&&d.A.warn("Layer has too many data objects. Picking might not be able to distinguish all objects.")(),Z=T.A.allocate(Z,e,{size:3,copy:!0,maxCount:Math.max(e,Y)});const t=Math.floor(Z.length/3),r=[];for(let e=n;e<t;e++)this.encodePickingColor(e,r),Z[3*e+0]=r[0],Z[3*e+1]=r[1],Z[3*e+2]=r[2]}t.value=Z.subarray(0,3*e)}_setModelAttributes(t,e){const n=this.getAttributeManager(),r=t.userData.excludeAttributes||{},i=n.getShaderAttributes(e,r);t.setAttributes(i)}disablePickingIndex(t){const e=this.props.data;if(!("attributes"in e))return void this._disablePickingIndex(t);const{pickingColors:n,instancePickingColors:r}=this.getAttributeManager().attributes,i=n||r,o=i&&e.attributes&&e.attributes[i.id];if(o&&o.value){const n=o.value,r=this.encodePickingColor(t);for(let t=0;t<e.length;t++){const e=i.getVertexOffset(t);n[e]===r[0]&&n[e+1]===r[1]&&n[e+2]===r[2]&&this._disablePickingIndex(t)}}else this._disablePickingIndex(t)}_disablePickingIndex(t){const{pickingColors:e,instancePickingColors:n}=this.getAttributeManager().attributes,r=e||n;if(!r)return;const i=r.getVertexOffset(t),o=r.getVertexOffset(t+1);r.buffer.subData({data:new Uint8Array(o-i),offset:i})}restorePickingColors(){const{pickingColors:t,instancePickingColors:e}=this.getAttributeManager().attributes,n=t||e;n&&(this.internalState.usesPickingColorCache&&n.value.buffer!==Z.buffer&&(n.value=Z.subarray(0,n.value.length)),n.updateSubBuffer({startOffset:0}))}_initialize(){(0,w.A)(!this.internalState),(0,w.A)(Number.isFinite(this.props.coordinateSystem)),(0,_.A)("layer.initialize",this);const t=this._getAttributeManager();t&&t.addInstanced({instancePickingColors:{type:5121,size:3,noAlloc:!0,update:this.calculateInstancePickingColors}}),this.internalState=new q({attributeManager:t,layer:this}),this._clearChangeFlags(),this.state={},Object.defineProperty(this.state,"attributeManager",{get:()=>(d.A.deprecated("layer.state.attributeManager","layer.getAttributeManager()")(),t)}),this.internalState.uniformTransitions=new g(this.context.timeline),this.internalState.onAsyncPropUpdated=this._onAsyncPropUpdated.bind(this),this.internalState.setAsyncProps(this.props),this.initializeState(this.context);for(const t of this.props.extensions)t.initializeState.call(this,this.context,t);this.setChangeFlags({dataChanged:"init",propsChanged:"init",viewportChanged:!0,extensionsChanged:!0}),this._update()}_transferState(t){(0,_.A)("layer.matched",this,this===t);const{state:e,internalState:n}=t;this!==t&&(this.internalState=n,this.state=e,this.internalState.setAsyncProps(this.props),this._diffProps(this.props,this.internalState.getOldProps()))}
2_update(){const t=this.needsUpdate();if((0,_.A)("layer.update",this,t),!t)return;const e=this.props,n=this.context,r=this.internalState,i=n.viewport,o=this._updateUniformTransition();r.propsInTransition=o,n.viewport=r.viewport||i,this.props=o;try{const t=this._getUpdateParams(),e=this.getModels();if(n.gl)this.updateState(t);else try{this.updateState(t)}catch(t){}for(const e of this.props.extensions)e.updateState.call(this,t,e);const r=this.getModels()[0]!==e[0];this._postUpdate(t,r)}finally{n.viewport=i,this.props=e,this._clearChangeFlags(),r.needsUpdate=!1,r.resetOldProps()}}_finalize(){(0,_.A)("layer.finalize",this),this.finalizeState(this.context);for(const t of this.props.extensions)t.finalizeState.call(this,this.context,t)}_drawLayer({moduleParameters:t=null,uniforms:e={},parameters:n={}}){this._updateAttributeTransition();const r=this.props,i=this.context;this.props=this.internalState.propsInTransition||r;const o=this.props.opacity;e.opacity=Math.pow(o,1/2.2);try{t&&this.setModuleParameters(t);const{getPolygonOffset:r}=this.props,o=r&&r(e)||[0,0];(0,b.Rz)(i.gl,{polygonOffset:o}),(0,b.zv)(i.gl,n,()=>{const r={moduleParameters:t,uniforms:e,parameters:n,context:i};for(const t of this.props.extensions)t.draw.call(this,r,t);this.draw(r)})}finally{this.props=r}}getChangeFlags(){var t;return null===(t=this.internalState)||void 0===t?void 0:t.changeFlags}setChangeFlags(t){if(!this.internalState)return;const{changeFlags:e}=this.internalState;for(const n in t)if(t[n]){let r=!1;if("dataChanged"===n){const i=t[n],o=e[n];i&&Array.isArray(o)&&(e.dataChanged=Array.isArray(i)?o.concat(i):i,r=!0)}e[n]||(e[n]=t[n],r=!0),r&&(0,_.A)("layer.changeFlag",this,n,t)}const n=Boolean(e.dataChanged||e.updateTriggersChanged||e.propsChanged||e.extensionsChanged);e.propsOrDataChanged=n,e.somethingChanged=n||e.viewportChanged||e.stateChanged}_clearChangeFlags(){this.internalState.changeFlags={dataChanged:!1,propsChanged:!1,updateTriggersChanged:!1,viewportChanged:!1,stateChanged:!1,extensionsChanged:!1,propsOrDataChanged:!1,somethingChanged:!1}}_diffProps(t,e){const n=(0,m.mg)(t,e);if(n.updateTriggersChanged)for(const t in n.updateTriggersChanged)n.updateTriggersChanged[t]&&this.invalidateAttribute(t);if(n.transitionsChanged)for(const i in n.transitionsChanged){var r;this.internalState.uniformTransitions.add(i,e[i],t[i],null===(r=t.transitions)||void 0===r?void 0:r[i])}return this.setChangeFlags(n)}validateProps(){(0,m.zo)(this.props)}updateAutoHighlight(t){this.props.autoHighlight&&!Number.isInteger(this.props.highlightedObjectIndex)&&this._updateAutoHighlight(t)}_updateAutoHighlight(t){const e={pickingSelectedColor:t.picked?t.color:null},{highlightColor:n}=this.props;t.picked&&"function"==typeof n&&(e.pickingHighlightColor=n(t)),this.setModuleParameters(e),this.setNeedsRedraw()}_getAttributeManager(){const t=this.context;return new o.A(t.gl,{id:this.props.id,stats:t.stats,timeline:t.timeline})}_postUpdate(t,e){const{props:n,oldProps:r}=t;this.setNeedsRedraw(),this._updateAttributes();const{model:i}=this.state;null==i||i.setInstanceCount(this.getNumInstances());const{autoHighlight:o,highlightedObjectIndex:s,highlightColor:a}=n;if(e||r.autoHighlight!==o||r.highlightedObjectIndex!==s||r.highlightColor!==a){const t={};o||(t.pickingSelectedColor=null),Array.isArray(a)&&(t.pickingHighlightColor=a),(e||s!==r.highlightedObjectIndex)&&(t.pickingSelectedColor=Number.isFinite(s)&&s>=0?this.encodePickingColor(s):null),this.setModuleParameters(t)}}_getUpdateParams(){return{props:this.props,oldProps:this.internalState.getOldProps(),context:this.context,changeFlags:this.internalState.changeFlags}}_getNeedsRedraw(t){if(!this.internalState)return!1;let e=!1;e=e||this.internalState.needsRedraw&&this.id;const n=this.getAttributeManager(),r=!!n&&n.getNeedsRedraw(t);if(e=e||r,e)for(const t of this.props.extensions)t.onNeedsRedraw.call(this,t);return this.internalState.needsRedraw=this.internalState.needsRedraw&&!t.clearRedrawFlags,e}_onAsyncPropUpdated(){this._diffProps(this.props,this.internalState.getOldProps()),this.setNeedsUpdate()}}(0,r.A)($,"defaultProps",K),(0,r.A)($,"layerName","Layer")},99669:(t,e,n)=>{"use strict";var r=n(41857).supportsDescriptors,i=n(90243),o=n(69336),s=Object.defineProperty,a=n(29838),u=n(46369),l=/a/;t.exports=function(){if(!r||!u)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=i(),e=u(l),n=o(e,"flags");return n&&n.get===t||s(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}}}]); 3//# sourceMappingURL=1732.myeroad.71bd9838f484034e4100.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.