react-map-gl/component---examples-draw-polygon-src-app-js-86d6f9fd87d1e260e722.js

2 lines
277 KiB
JavaScript

/*! For license information please see component---examples-draw-polygon-src-app-js-86d6f9fd87d1e260e722.js.LICENSE.txt */
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{"+1Xl":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeasureAreaMode=void 0;var r=a(n("3i6d")),o=a(n("JRQ3")),i=n("JeLm");function a(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(){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(e){return!1}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=[],b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(b,e);var t,n,i,a,u=(t=b,function(){var e,n=h(t);if(y()){var r=h(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return d(this,e)});function b(){return s(this,b),u.apply(this,arguments)}return n=b,(i=[{key:"handleClick",value:function(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{onEdit:function(){}});p(h(b.prototype),"handleClick",this).call(this,e,n)}},{key:"getTooltips",value:function(e){var t=this.getTentativeGuide(e);if(t&&"Polygon"===t.geometry.type){var n,i=e.modeConfig||{},a=i.formatTooltip,u=i.measurementCallback,c=(0,o.default)(t),l=(0,r.default)(t);return n=a?a(l):"".concat(parseFloat(l).toFixed(2)," ").concat("sq. m"),u&&u(l),[{position:c.geometry.coordinates,text:n}]}return v}}])&&f(n.prototype,i),a&&f(n,a),b}(i.DrawPolygonMode);t.MeasureAreaMode=b},"+aqe":function(e,t,n){"use strict";var r;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?u(e):t}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(){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(e){return!1}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(r,e);var t,n=(t=r,function(){var e,n=l(t);if(c()){var r=l(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return a(this,e)});function r(){var e;i(this,r);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return f(u(e=n.call.apply(n,[this].concat(o))),"handleStartDragging",(function(t,n){e.getTentativeFeature()||e._initTentativeFeature(t,n)})),f(u(e),"handleStopDragging",(function(t,n){e.getTentativeFeature()&&e._commitTentativeFeature(t,n)})),f(u(e),"handlePan",(function(t,n){e.getTentativeFeature()&&t.sourceEvent.stopImmediatePropagation()})),e}return r}(((r=n("Txtv"))&&r.__esModule?r:{default:r}).default);t.default=p},"0eZ/":function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n("0wsv"),o=n("RwN2");function i(e,t,n){if(void 0===n&&(n={}),!0===n.final)return function(e,t){var n=i(t,e);return n=(n+180)%360}(e,t);var a=Object(o.getCoord)(e),u=Object(o.getCoord)(t),c=Object(r.degreesToRadians)(a[0]),l=Object(r.degreesToRadians)(u[0]),s=Object(r.degreesToRadians)(a[1]),f=Object(r.degreesToRadians)(u[1]),p=Math.sin(l-c)*Math.cos(f),d=Math.cos(s)*Math.sin(f)-Math.sin(s)*Math.cos(f)*Math.cos(l-c);return Object(r.radiansToDegrees)(Math.atan2(p,d))}},"1I81":function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return A})),n.d(t,"WebMercatorViewport",(function(){return A})),n.d(t,"getBounds",(function(){return D})),n.d(t,"fitBounds",(function(){return k})),n.d(t,"normalizeViewportProps",(function(){return N})),n.d(t,"flyToViewport",(function(){return H})),n.d(t,"getFlyToDuration",(function(){return U})),n.d(t,"lngLatToWorld",(function(){return O})),n.d(t,"worldToLngLat",(function(){return _})),n.d(t,"worldToPixels",(function(){return M})),n.d(t,"pixelsToWorld",(function(){return R})),n.d(t,"zoomToScale",(function(){return m})),n.d(t,"scaleToZoom",(function(){return E})),n.d(t,"getMeterZoom",(function(){return P})),n.d(t,"getDistanceScales",(function(){return w})),n.d(t,"addMetersToLngLat",(function(){return S})),n.d(t,"getViewMatrix",(function(){return j})),n.d(t,"getProjectionMatrix",(function(){return T})),n.d(t,"getProjectionParameters",(function(){return x}));var r=n("KQm4"),o=n("ODXe"),i=n("1OyB"),a=n("vuIU"),u=n("bl9R");function c(e,t){var n=u.b([],t,e);return u.a(n,n,1/n[3]),n}function l(e,t){var n=e%t;return n<0?t+n:n}function s(e,t,n){return n*t+(1-n)*e}var f=n("ZaHm"),p=n("ZxFD"),d=n("n+fv");function y(e,t){if(!e)throw new Error(t||"@math.gl/web-mercator: assertion failed.")}var h=Math.PI,g=h/4,v=h/180,b=180/h;function m(e){return Math.pow(2,e)}function E(e){return Math.log2(e)}function O(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];y(Number.isFinite(n)),y(Number.isFinite(r)&&r>=-90&&r<=90,"invalid latitude");var i=r*v;return[512*(n*v+h)/(2*h),512*(h+Math.log(Math.tan(g+.5*i)))/(2*h)]}function _(e){var t=Object(o.a)(e,2),n=t[0],r=t[1],i=n/512*(2*h)-h,a=2*(Math.atan(Math.exp(r/512*(2*h)-h))-g);return[i*b,a*b]}function P(e){var t=e.latitude;return y(Number.isFinite(t)),E(4003e4*Math.cos(t*v))-9}function w(e){var t=e.latitude,n=e.longitude,r=e.highPrecision,o=void 0!==r&&r;y(Number.isFinite(t)&&Number.isFinite(n));var i={},a=Math.cos(t*v),u=512/360/a,c=512/4003e4/a;if(i.unitsPerMeter=[c,c,c],i.metersPerUnit=[1/c,1/c,1/c],i.unitsPerDegree=[512/360,u,c],i.degreesPerUnit=[.703125,1/u,1/c],o){var l=v*Math.tan(t*v)/a,s=512/360*l/2,f=512/4003e4*l,p=f/u*c;i.unitsPerDegree2=[0,s,f],i.unitsPerMeter2=[p,0,p]}return i}function S(e,t){var n=Object(o.a)(e,3),r=n[0],i=n[1],a=n[2],u=Object(o.a)(t,3),c=u[0],l=u[1],s=u[2],f=w({longitude:r,latitude:i,highPrecision:!0}),p=f.unitsPerMeter,d=f.unitsPerMeter2,y=O(e);y[0]+=c*(p[0]+d[0]*l),y[1]+=l*(p[1]+d[1]*l);var h=_(y),g=(a||0)+(s||0);return Number.isFinite(a)||Number.isFinite(s)?[h[0],h[1],g]:h}function j(e){var t=e.height,n=e.pitch,r=e.bearing,o=e.altitude,i=e.scale,a=e.center,u=void 0===a?null:a,c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return f.h(c,c,[0,0,-o]),f.e(c,c,-n*v),f.f(c,c,r*v),i/=t,f.g(c,c,[i,i,i]),u&&f.h(c,c,d.c([],u)),c}function x(e){var t=e.width,n=e.height,r=e.altitude,o=void 0===r?1.5:r,i=e.pitch,a=void 0===i?0:i,u=e.nearZMultiplier,c=void 0===u?1:u,l=e.farZMultiplier,s=void 0===l?1:l,f=a*v,p=Math.atan(.5/o),d=Math.sin(p)*o/Math.sin(Math.min(Math.max(Math.PI/2-f-p,.01),Math.PI-.01));return{fov:2*p,aspect:t/n,focalDistance:o,near:c,far:(Math.sin(f)*d+o)*s}}function T(e){var t=e.width,n=e.height,r=e.pitch,o=x({width:t,height:n,altitude:e.altitude,pitch:r,nearZMultiplier:e.nearZMultiplier,farZMultiplier:e.farZMultiplier}),i=o.fov,a=o.aspect,u=o.near,c=o.far;return f.d([],i,a,u,c)}function M(e,t){var n=Object(o.a)(e,3),r=n[0],i=n[1],a=n[2],u=void 0===a?0:a;return y(Number.isFinite(r)&&Number.isFinite(i)&&Number.isFinite(u)),c(t,[r,i,u,1])}function R(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Object(o.a)(e,3),i=r[0],a=r[1],u=r[2];if(y(Number.isFinite(i)&&Number.isFinite(a),"invalid pixel coordinate"),Number.isFinite(u)){var l=c(t,[i,a,u,1]);return l}var s=c(t,[i,a,0,1]),f=c(t,[i,a,1,1]),d=s[2],h=f[2],g=d===h?0:((n||0)-d)/(h-d);return p.c([],s,f,g)}function k(e){var t=e.width,n=e.height,r=e.bounds,i=e.minExtent,a=void 0===i?0:i,u=e.maxZoom,c=void 0===u?24:u,l=e.padding,s=void 0===l?0:l,f=e.offset,p=void 0===f?[0,0]:f,d=Object(o.a)(r,2),h=Object(o.a)(d[0],2),g=h[0],v=h[1],b=Object(o.a)(d[1],2),m=b[0],E=b[1];if(Number.isFinite(s)){s={top:s,bottom:s,left:s,right:s}}else y(Number.isFinite(s.top)&&Number.isFinite(s.bottom)&&Number.isFinite(s.left)&&Number.isFinite(s.right));var O=new A({width:t,height:n,longitude:0,latitude:0,zoom:0}),_=O.project([g,E]),P=O.project([m,v]),w=[Math.max(Math.abs(P[0]-_[0]),a),Math.max(Math.abs(P[1]-_[1]),a)],S=[t-s.left-s.right-2*Math.abs(p[0]),n-s.top-s.bottom-2*Math.abs(p[1])];y(S[0]>0&&S[1]>0);var j=S[0]/w[0],x=S[1]/w[1],T=(s.right-s.left)/2/j,M=(s.bottom-s.top)/2/x,R=[(P[0]+_[0])/2+T,(P[1]+_[1])/2+M],k=O.unproject(R),C=Math.min(c,O.zoom+Math.log2(Math.abs(Math.min(j,x))));return y(Number.isFinite(C)),{longitude:k[0],latitude:k[1],zoom:C}}var C=Math.PI/180;function D(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e.width,i=e.height,a=e.unproject,u={targetZ:r},c=a([0,i],u),l=a([o,i],u),s=Math.atan(.5/e.altitude),f=(90-e.pitch)*C;return s>f-.01?(t=I(e,0,r),n=I(e,o,r)):(t=a([0,0],u),n=a([o,0],u)),[c,l,n,t]}function I(e,t,n){var r=e.pixelUnprojectionMatrix,o=c(r,[t,0,1,1]),i=c(r,[t,e.height,1,1]),a=(n*e.distanceScales.unitsPerMeter[2]-o[2])/(i[2]-o[2]),u=_(p.c([],o,i,a));return u[2]=n,u}var A=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:1,height:1},n=t.width,r=t.height,o=t.latitude,a=void 0===o?0:o,u=t.longitude,c=void 0===u?0:u,l=t.zoom,s=void 0===l?0:l,f=t.pitch,p=void 0===f?0:f,d=t.bearing,y=void 0===d?0:d,h=t.altitude,g=void 0===h?1.5:h,v=t.nearZMultiplier,b=void 0===v?.02:v,E=t.farZMultiplier,_=void 0===E?1.01:E;Object(i.a)(this,e),n=n||1,r=r||1;var P=m(s);g=Math.max(.75,g);var S=O([c,a]);S[2]=0,this.projectionMatrix=T({width:n,height:r,pitch:p,altitude:g,nearZMultiplier:b,farZMultiplier:_}),this.viewMatrix=j({height:r,scale:P,center:S,pitch:p,bearing:y,altitude:g}),this.width=n,this.height=r,this.scale=P,this.latitude=a,this.longitude=c,this.zoom=s,this.pitch=p,this.bearing=y,this.altitude=g,this.center=S,this.distanceScales=w(this),this._initMatrices(),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),Object.freeze(this)}return Object(a.a)(e,[{key:"_initMatrices",value:function(){var e=this.width,t=this.height,n=this.projectionMatrix,r=this.viewMatrix,o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];f.c(o,o,n),f.c(o,o,r),this.viewProjectionMatrix=o;var i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];f.g(i,i,[e/2,-t/2,1]),f.h(i,i,[1,-1,0]),f.c(i,i,o);var a=f.b([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],i);if(!a)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=i,this.pixelUnprojectionMatrix=a}},{key:"equals",value:function(t){return t instanceof e&&(t.width===this.width&&t.height===this.height&&f.a(t.projectionMatrix,this.projectionMatrix)&&f.a(t.viewMatrix,this.viewMatrix))}},{key:"project",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,r=void 0===n||n,i=this.projectPosition(e),a=M(i,this.pixelProjectionMatrix),u=Object(o.a)(a,2),c=u[0],l=u[1],s=r?l:this.height-l;return 2===e.length?[c,s]:[c,s,a[2]]}},{key:"unproject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,r=void 0===n||n,i=t.targetZ,a=void 0===i?void 0:i,u=Object(o.a)(e,3),c=u[0],l=u[1],s=u[2],f=r?l:this.height-l,p=a&&a*this.distanceScales.unitsPerMeter[2],d=R([c,f,s],this.pixelUnprojectionMatrix,p),y=this.unprojectPosition(d),h=Object(o.a)(y,3),g=h[0],v=h[1],b=h[2];return Number.isFinite(s)?[g,v,b]:Number.isFinite(a)?[g,v,a]:[g,v]}},{key:"projectPosition",value:function(e){var t=O(e),n=Object(o.a)(t,2);return[n[0],n[1],(e[2]||0)*this.distanceScales.unitsPerMeter[2]]}},{key:"unprojectPosition",value:function(e){var t=_(e),n=Object(o.a)(t,2);return[n[0],n[1],(e[2]||0)*this.distanceScales.metersPerUnit[2]]}},{key:"projectFlat",value:function(e){return O(e)}},{key:"unprojectFlat",value:function(e){return _(e)}},{key:"getMapCenterByLngLatPosition",value:function(e){var t=e.lngLat,n=R(e.pos,this.pixelUnprojectionMatrix),r=O(t),o=p.a([],r,p.d([],n));return _(p.a([],this.center,o))}},{key:"getLocationAtPoint",value:function(e){var t=e.lngLat,n=e.pos;return this.getMapCenterByLngLatPosition({lngLat:t,pos:n})}},{key:"fitBounds",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,o=this.height,i=k(Object.assign({width:r,height:o,bounds:t},n)),a=i.longitude,u=i.latitude,c=i.zoom;return new e({width:r,height:o,longitude:a,latitude:u,zoom:c})}},{key:"getBounds",value:function(e){var t=this.getBoundingRegion(e),n=Math.min.apply(Math,Object(r.a)(t.map((function(e){return e[0]})))),o=Math.max.apply(Math,Object(r.a)(t.map((function(e){return e[0]}))));return[[n,Math.min.apply(Math,Object(r.a)(t.map((function(e){return e[1]}))))],[o,Math.max.apply(Math,Object(r.a)(t.map((function(e){return e[1]}))))]]}},{key:"getBoundingRegion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D(this,e.z||0)}}]),e}();function N(e){var t=e.width,n=e.height,r=e.longitude,o=e.latitude,i=e.zoom,a=e.pitch,u=void 0===a?0:a,c=e.bearing,s=void 0===c?0:c;(r<-180||r>180)&&(r=l(r+180,360)-180),(s<-180||s>180)&&(s=l(s+180,360)-180);var f=new A({width:t,height:n,longitude:r,latitude:o,zoom:i}),p=f.project([r,85.05113])[1],d=f.project([r,-85.05113])[1],y=0;return d-p<n&&(i+=Math.log2(n/(d-p)),p=(f=new A({width:t,height:n,longitude:r,latitude:o,zoom:i})).project([r,85.05113])[1],d=f.project([r,-85.05113])[1]),p>0?y=p:d<n&&(y=d-n),y&&(o=f.unproject([t/2,n/2+y])[1]),{width:t,height:n,longitude:r,latitude:o,zoom:i,pitch:u,bearing:s}}function F(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var G=["longitude","latitude","zoom"],Y={curve:1.414,speed:1.2};function H(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o={},i=B(e,t,r),a=i.startZoom,u=i.startCenterXY,c=i.uDelta,l=i.w0,f=i.u1,d=i.S,y=i.rho,h=i.rho2,g=i.r0;if(f<.01){var v,b=F(G);try{for(b.s();!(v=b.n()).done;){var m=v.value,O=e[m],P=t[m];o[m]=s(O,P,n)}}catch(k){b.e(k)}finally{b.f()}return o}var w=n*d,S=Math.cosh(g)/Math.cosh(g+y*w),j=l*((Math.cosh(g)*Math.tanh(g+y*w)-Math.sinh(g))/h)/f,x=1/S,T=a+E(x),M=p.e([],c,j);p.a(M,M,u);var R=_(M);return o.longitude=R[0],o.latitude=R[1],o.zoom=T,o}function U(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r=Object.assign({},Y,r),i=o.screenSpeed,a=o.speed,u=o.maxDuration,c=B(e,t,r),l=c.S,s=c.rho,f=1e3*l;return n=Number.isFinite(i)?f/(i/s):f/a,Number.isFinite(u)&&n>u?0:n}function B(e,t,n){var r=(n=Object.assign({},Y,n)).curve,o=e.zoom,i=[e.longitude,e.latitude],a=m(o),u=t.zoom,c=[t.longitude,t.latitude],l=m(u-o),s=O(i),f=O(c),d=p.f([],f,s),y=Math.max(e.width,e.height),h=y/l,g=p.b(d)*a,v=Math.max(g,.01),b=r*r,E=(h*h-y*y+b*b*v*v)/(2*y*b*v),_=(h*h-y*y-b*b*v*v)/(2*h*b*v),P=Math.log(Math.sqrt(E*E+1)-E),w=Math.log(Math.sqrt(_*_+1)-_);return{startZoom:o,startCenterXY:s,uDelta:d,w0:y,u1:g,S:(w-P)/r,rho:r,rho2:b,r0:P,r1:w}}},"1Y5v":function(e,t,n){"use strict";var r,o,i,a,u,c;Object.defineProperty(t,"__esModule",{value:!0}),t.EDIT_TYPE=t.ELEMENT_TYPE=t.GUIDE_TYPE=t.RENDER_STATE=t.RENDER_TYPE=t.GEOJSON_TYPE=void 0,t.GEOJSON_TYPE=r,function(e){e.POINT="Point",e.LINE_STRING="LineString",e.POLYGON="Polygon"}(r||(t.GEOJSON_TYPE=r={})),t.RENDER_TYPE=o,function(e){e.POINT="Point",e.LINE_STRING="LineString",e.POLYGON="Polygon",e.RECTANGLE="Rectangle"}(o||(t.RENDER_TYPE=o={})),t.RENDER_STATE=i,function(e){e.INACTIVE="INACTIVE",e.UNCOMMITTED="UNCOMMITTED",e.SELECTED="SELECTED",e.HOVERED="HOVERED",e.CLOSING="CLOSING"}(i||(t.RENDER_STATE=i={})),t.GUIDE_TYPE=a,function(e){e.TENTATIVE="tentative",e.EDIT_HANDLE="editHandle",e.CURSOR_EDIT_HANDLE="cursorEditHandle"}(a||(t.GUIDE_TYPE=a={})),t.ELEMENT_TYPE=u,function(e){e.FEATURE="feature",e.FILL="fill",e.SEGMENT="segment",e.EDIT_HANDLE="editHandle"}(u||(t.ELEMENT_TYPE=u={})),t.EDIT_TYPE=c,function(e){e.ADD_FEATURE="addFeature",e.ADD_POSITION="addPosition",e.REMOVE_POSITION="removePosition",e.MOVE_POSITION="movePosition",e.FINISH_MOVE_POSITION="finishMovePosition"}(c||(t.EDIT_TYPE=c={}))},"26Vz":function(e,t,n){"use strict";n.r(t);var r=n("0wsv"),o=n("vWOf"),i=n("kyJj"),a=n("RwN2");function u(e){var t=e*Math.PI/180;return Math.tan(t)}t.default=function(e,t,n,c){var l=(c=c||{}).steps||64,s=c.units||"kilometers",f=c.angle||0,p=c.pivot||e,d=c.properties||e.properties||{};if(!e)throw new Error("center is required");if(!t)throw new Error("xSemiAxis is required");if(!n)throw new Error("ySemiAxis is required");if(!Object(r.isObject)(c))throw new Error("options must be an object");if(!Object(r.isNumber)(l))throw new Error("steps must be a number");if(!Object(r.isNumber)(f))throw new Error("angle must be a number");var y=Object(a.getCoord)(e);if("degrees"===s)var h=Object(r.degreesToRadians)(f);else t=Object(o.a)(e,t,90,{units:s}),n=Object(o.a)(e,n,0,{units:s}),t=Object(a.getCoord)(t)[0]-y[0],n=Object(a.getCoord)(n)[1]-y[1];for(var g=[],v=0;v<l;v+=1){var b=-360*v/l,m=t*n/Math.sqrt(Math.pow(n,2)+Math.pow(t,2)*Math.pow(u(b),2)),E=t*n/Math.sqrt(Math.pow(t,2)+Math.pow(n,2)/Math.pow(u(b),2));if(b<-90&&b>=-270&&(m=-m),b<-180&&b>=-360&&(E=-E),"degrees"===s){var O=m*Math.cos(h)+E*Math.sin(h),_=E*Math.cos(h)-m*Math.sin(h);m=O,E=_}g.push([m+y[0],E+y[1]])}return g.push(g[0]),"degrees"===s?Object(r.polygon)([g],d):Object(i.default)(Object(r.polygon)([g],d),f,{pivot:p})}},"3L5V":function(e,t,n){(function(t){e.exports=function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}var o=function(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null};function i(e,t){return e>t?1:e<t?-1:0}function a(e,t,n){for(var r=new o(null,null),i=r,a=r;;){var u=n(e,t.key);if(u<0){if(null===t.left)break;if(n(e,t.left.key)<0){var c=t.left;if(t.left=c.right,c.right=t,null===(t=c).left)break}a.left=t,a=t,t=t.left}else{if(!(u>0))break;if(null===t.right)break;if(n(e,t.right.key)>0&&(c=t.right,t.right=c.left,c.left=t,null===(t=c).right))break;i.right=t,i=t,t=t.right}}return i.right=t.left,a.left=t.right,t.left=r.right,t.right=r.left,t}function u(e,t,n,r){var i=new o(e,t);if(null===n)return i.left=i.right=null,i;var u=r(e,(n=a(e,n,r)).key);return u<0?(i.left=n.left,i.right=n,n.left=null):u>=0&&(i.right=n.right,i.left=n,n.right=null),i}function c(e,t,n){var r=null,o=null;if(t){var i=n((t=a(e,t,n)).key,e);0===i?(r=t.left,o=t.right):i<0?(o=t.right,t.right=null,r=t):(r=t.left,t.left=null,o=t)}return{left:r,right:o}}var l=function(){function e(e){void 0===e&&(e=i),this._root=null,this._size=0,this._comparator=e}return e.prototype.insert=function(e,t){return this._size++,this._root=u(e,t,this._root,this._comparator)},e.prototype.add=function(e,t){var n=new o(e,t);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,i=a(e,this._root,r),u=r(e,i.key);return 0===u?this._root=i:(u<0?(n.left=i.left,n.right=i,i.left=null):u>0&&(n.right=i.right,n.left=i,i.right=null),this._size++,this._root=n),this._root},e.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},e.prototype._remove=function(e,t,n){var r;return null===t?null:0===n(e,(t=a(e,t,n)).key)?(null===t.left?r=t.right:(r=a(e,t.left,n)).right=t.right,this._size--,r):t},e.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=a(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},e.prototype.findStatic=function(e){for(var t=this._root,n=this._comparator;t;){var r=n(e,t.key);if(0===r)return t;t=r<0?t.left:t.right}return null},e.prototype.find=function(e){return this._root&&(this._root=a(e,this._root,this._comparator),0!==this._comparator(e,this._root.key))?null:this._root},e.prototype.contains=function(e){for(var t=this._root,n=this._comparator;t;){var r=n(e,t.key);if(0===r)return!0;t=r<0?t.left:t.right}return!1},e.prototype.forEach=function(e,t){for(var n=this._root,r=[],o=!1;!o;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),e.call(t,n),n=n.right):o=!0;return this},e.prototype.range=function(e,t,n,r){for(var o=[],i=this._comparator,a=this._root;0!==o.length||a;)if(a)o.push(a),a=a.left;else{if(i((a=o.pop()).key,t)>0)break;if(i(a.key,e)>=0&&n.call(r,a))return this;a=a.right}return this},e.prototype.keys=function(){var e=[];return this.forEach((function(t){var n=t.key;return e.push(n)})),e},e.prototype.values=function(){var e=[];return this.forEach((function(t){var n=t.data;return e.push(n)})),e},e.prototype.min=function(){return this._root?this.minNode(this._root).key:null},e.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},e.prototype.minNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.left;)e=e.left;return e},e.prototype.maxNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.right;)e=e.right;return e},e.prototype.at=function(e){for(var t=this._root,n=!1,r=0,o=[];!n;)if(t)o.push(t),t=t.left;else if(o.length>0){if(t=o.pop(),r===e)return t;r++,t=t.right}else n=!0;return null},e.prototype.next=function(e){var t=this._root,n=null;if(e.right){for(n=e.right;n.left;)n=n.left;return n}for(var r=this._comparator;t;){var o=r(e.key,t.key);if(0===o)break;o<0?(n=t,t=t.left):t=t.right}return n},e.prototype.prev=function(e){var t=this._root,n=null;if(null!==e.left){for(n=e.left;n.right;)n=n.right;return n}for(var r=this._comparator;t;){var o=r(e.key,t.key);if(0===o)break;o<0?t=t.left:(n=t,t=t.right)}return n},e.prototype.clear=function(){return this._root=null,this._size=0,this},e.prototype.toList=function(){return function(e){for(var t=e,n=[],r=!1,i=new o(null,null),a=i;!r;)t?(n.push(t),t=t.left):n.length>0?t=(t=a=a.next=n.pop()).right:r=!0;return a.next=null,i.next}(this._root)},e.prototype.load=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!1);var r=e.length,i=this._comparator;if(n&&function e(t,n,r,o,i){if(!(r>=o)){for(var a=t[r+o>>1],u=r-1,c=o+1;;){do{u++}while(i(t[u],a)<0);do{c--}while(i(t[c],a)>0);if(u>=c)break;var l=t[u];t[u]=t[c],t[c]=l,l=n[u],n[u]=n[c],n[c]=l}e(t,n,r,c,i),e(t,n,c+1,o,i)}}(e,t,0,r-1,i),null===this._root)this._root=function e(t,n,r,i){var a=i-r;if(a>0){var u=r+Math.floor(a/2),c=t[u],l=n[u],s=new o(c,l);return s.left=e(t,n,r,u),s.right=e(t,n,u+1,i),s}return null}(e,t,0,r),this._size=r;else{var a=function(e,t,n){for(var r=new o(null,null),i=r,a=e,u=t;null!==a&&null!==u;)n(a.key,u.key)<0?(i.next=a,a=a.next):(i.next=u,u=u.next),i=i.next;return null!==a?i.next=a:null!==u&&(i.next=u),r.next}(this.toList(),function(e,t){for(var n=new o(null,null),r=n,i=0;i<e.length;i++)r=r.next=new o(e[i],t[i]);return r.next=null,n.next}(e,t),i);r=this._size+r,this._root=function e(t,n,r){var o=r-n;if(o>0){var i=n+Math.floor(o/2),a=e(t,n,i),u=t.head;return u.left=a,t.head=t.head.next,u.right=e(t,i+1,r),u}return null}({head:a},0,r)}return this},e.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),e.prototype.toString=function(e){void 0===e&&(e=function(e){return String(e.key)});var t=[];return function e(t,n,r,o,i){if(t){o(n+(r?"└── ":"├── ")+i(t)+"\n");var a=n+(r?" ":"│ ");t.left&&e(t.left,a,!1,o,i),t.right&&e(t.right,a,!0,o,i)}}(this._root,"",!0,(function(e){return t.push(e)}),e),t.join("")},e.prototype.update=function(e,t,n){var r=this._comparator,o=c(e,this._root,r),i=o.left,l=o.right;r(e,t)<0?l=u(t,n,l,r):i=u(t,n,i,r),this._root=function(e,t,n){return null===t?e:(null===e||((t=a(e.key,t,n)).left=e),t)}(i,l,r)},e.prototype.split=function(e){return c(e,this._root,this._comparator)},e}(),s=function(e,t){return e.ll.x<=t.x&&t.x<=e.ur.x&&e.ll.y<=t.y&&t.y<=e.ur.y},f=function(e,t){if(t.ur.x<e.ll.x||e.ur.x<t.ll.x||t.ur.y<e.ll.y||e.ur.y<t.ll.y)return null;var n=e.ll.x<t.ll.x?t.ll.x:e.ll.x,r=e.ur.x<t.ur.x?e.ur.x:t.ur.x;return{ll:{x:n,y:e.ll.y<t.ll.y?t.ll.y:e.ll.y},ur:{x:r,y:e.ur.y<t.ur.y?e.ur.y:t.ur.y}}},p=Number.EPSILON;void 0===p&&(p=Math.pow(2,-52));var d=p*p,y=function(e,t){if(-p<e&&e<p&&-p<t&&t<p)return 0;var n=e-t;return n*n<d*e*t?0:e<t?-1:1},h=function(){function t(){e(this,t),this.reset()}return r(t,[{key:"reset",value:function(){this.xRounder=new g,this.yRounder=new g}},{key:"round",value:function(e,t){return{x:this.xRounder.round(e),y:this.yRounder.round(t)}}}]),t}(),g=function(){function t(){e(this,t),this.tree=new l,this.round(0)}return r(t,[{key:"round",value:function(e){var t=this.tree.add(e),n=this.tree.prev(t);if(null!==n&&0===y(t.key,n.key))return this.tree.remove(e),n.key;var r=this.tree.next(t);return null!==r&&0===y(t.key,r.key)?(this.tree.remove(e),r.key):e}}]),t}(),v=new h,b=function(e,t){return e.x*t.y-e.y*t.x},m=function(e,t){return e.x*t.x+e.y*t.y},E=function(e,t,n){var r={x:t.x-e.x,y:t.y-e.y},o={x:n.x-e.x,y:n.y-e.y},i=b(r,o);return y(i,0)},O=function(e){return Math.sqrt(m(e,e))},_=function(e,t,n){var r={x:t.x-e.x,y:t.y-e.y},o={x:n.x-e.x,y:n.y-e.y};return m(o,r)/O(o)/O(r)},P=function(e,t,n){return 0===t.y?null:{x:e.x+t.x/t.y*(n-e.y),y:n}},w=function(e,t,n){return 0===t.x?null:{x:n,y:e.y+t.y/t.x*(n-e.x)}},S=function(){function t(n,r){e(this,t),void 0===n.events?n.events=[this]:n.events.push(this),this.point=n,this.isLeft=r}return r(t,null,[{key:"compare",value:function(e,n){var 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:x.compare(e.segment,n.segment))}},{key:"comparePoints",value:function(e,t){return e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0}}]),r(t,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var t=e.point.events,n=0,r=t.length;n<r;n++){var o=t[n];this.point.events.push(o),o.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var e=this.point.events.length,t=0;t<e;t++){var n=this.point.events[t];if(void 0===n.segment.consumedBy)for(var r=t+1;r<e;r++){var o=this.point.events[r];void 0===o.consumedBy&&n.otherSE.point.events===o.otherSE.point.events&&n.segment.consume(o.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var e=[],t=0,n=this.point.events.length;t<n;t++){var r=this.point.events[t];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&e.push(r)}return e}},{key:"getLeftmostComparator",value:function(e){var t=this,n=new Map,r=function(r){var o,i,a,u,c,l=r.otherSE;n.set(r,{sine:(o=t.point,i=e.point,a=l.point,u={x:i.x-o.x,y:i.y-o.y},c={x:a.x-o.x,y:a.y-o.y},b(c,u)/O(c)/O(u)),cosine:_(t.point,e.point,l.point)})};return function(e,t){n.has(e)||r(e),n.has(t)||r(t);var o=n.get(e),i=o.sine,a=o.cosine,u=n.get(t),c=u.sine,l=u.cosine;return i>=0&&c>=0?a<l?1:a>l?-1:0:i<0&&c<0?a<l?-1:a>l?1:0:c<i?-1:c>i?1:0}}}]),t}(),j=0,x=function(){function t(n,r,o,i){e(this,t),this.id=++j,this.leftSE=n,n.segment=this,n.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=n,this.rings=o,this.windings=i}return r(t,null,[{key:"compare",value:function(e,t){var n=e.leftSE.point.x,r=t.leftSE.point.x,o=e.rightSE.point.x,i=t.rightSE.point.x;if(i<n)return 1;if(o<r)return-1;var a=e.leftSE.point.y,u=t.leftSE.point.y,c=e.rightSE.point.y,l=t.rightSE.point.y;if(n<r){if(u<a&&u<c)return 1;if(u>a&&u>c)return-1;var s=e.comparePoint(t.leftSE.point);if(s<0)return 1;if(s>0)return-1;var f=t.comparePoint(e.rightSE.point);return 0!==f?f:-1}if(n>r){if(a<u&&a<l)return-1;if(a>u&&a>l)return 1;var p=t.comparePoint(e.leftSE.point);if(0!==p)return p;var d=e.comparePoint(t.rightSE.point);return d<0?1:d>0?-1:1}if(a<u)return-1;if(a>u)return 1;if(o<i){var y=t.comparePoint(e.rightSE.point);if(0!==y)return y}if(o>i){var h=e.comparePoint(t.rightSE.point);if(h<0)return 1;if(h>0)return-1}if(o!==i){var g=c-a,v=o-n,b=l-u,m=i-r;if(g>v&&b<m)return 1;if(g<v&&b>m)return-1}return o>i?1:o<i||c<l?-1:c>l?1:e.id<t.id?-1:e.id>t.id?1:0}}]),r(t,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<t?e:t},ur:{x:this.rightSE.point.x,y:e>t?e:t}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var t=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(t.x===n.x)return e.x===t.x?0:e.x<t.x?1:-1;var o=(e.y-t.y)/r.y,i=t.x+o*r.x;if(e.x===i)return 0;var a=(e.x-t.x)/r.x,u=t.y+a*r.y;return e.y===u?0:e.y<u?-1:1}},{key:"getIntersection",value:function(e){var t=this.bbox(),n=e.bbox(),r=f(t,n);if(null===r)return null;var o=this.leftSE.point,i=this.rightSE.point,a=e.leftSE.point,u=e.rightSE.point,c=s(t,a)&&0===this.comparePoint(a),l=s(n,o)&&0===e.comparePoint(o),p=s(t,u)&&0===this.comparePoint(u),d=s(n,i)&&0===e.comparePoint(i);if(l&&c)return d&&!p?i:!d&&p?u:null;if(l)return p&&o.x===u.x&&o.y===u.y?null:o;if(c)return d&&i.x===a.x&&i.y===a.y?null:a;if(d&&p)return null;if(d)return i;if(p)return u;var y=function(e,t,n,r){if(0===t.x)return w(n,r,e.x);if(0===r.x)return w(e,t,n.x);if(0===t.y)return P(n,r,e.y);if(0===r.y)return P(e,t,n.y);var o=b(t,r);if(0==o)return null;var i={x:n.x-e.x,y:n.y-e.y},a=b(i,t)/o,u=b(i,r)/o;return{x:(e.x+u*t.x+(n.x+a*r.x))/2,y:(e.y+u*t.y+(n.y+a*r.y))/2}}(o,this.vector(),a,e.vector());return null===y?null:s(r,y)?v.round(y.x,y.y):null}},{key:"split",value:function(e){var n=[],r=void 0!==e.events,o=new S(e,!0),i=new S(e,!1),a=this.rightSE;this.replaceRightSE(i),n.push(i),n.push(o);var u=new t(o,a,this.rings.slice(),this.windings.slice());return S.comparePoints(u.leftSE.point,u.rightSE.point)>0&&u.swapEvents(),S.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(o.checkForConsuming(),i.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var t=0,n=this.windings.length;t<n;t++)this.windings[t]*=-1}},{key:"consume",value:function(e){for(var n=this,r=e;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;var o=t.compare(n,r);if(0!==o){if(o>0){var i=n;n=r,r=i}if(n.prev===r){var a=n;n=r,r=a}for(var u=0,c=r.rings.length;u<c;u++){var l=r.rings[u],s=r.windings[u],f=n.rings.indexOf(l);-1===f?(n.rings.push(l),n.windings.push(s)):n.windings[f]+=s}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}},{key:"beforeState",value:function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};for(var t=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys,o=0,i=this.rings.length;o<i;o++){var a=this.rings[o],u=this.windings[o],c=t.indexOf(a);-1===c?(t.push(a),n.push(u)):n[c]+=u}for(var l=[],s=[],f=0,p=t.length;f<p;f++)if(0!==n[f]){var d=t[f],y=d.poly;if(-1===s.indexOf(y))if(d.isExterior)l.push(y);else{-1===s.indexOf(y)&&s.push(y);var h=l.indexOf(d.poly);-1!==h&&l.splice(h,1)}}for(var g=0,v=l.length;g<v;g++){var b=l[g].multiPoly;-1===r.indexOf(b)&&r.push(b)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(F.type){case"union":var n=0===e.length,r=0===t.length;this._isInResult=n!==r;break;case"intersection":var o,i;e.length<t.length?(o=e.length,i=t.length):(o=t.length,i=e.length),this._isInResult=i===F.numMultiPolys&&o<i;break;case"xor":var a=Math.abs(e.length-t.length);this._isInResult=a%2==1;break;case"difference":var u=function(e){return 1===e.length&&e[0].isSubject};this._isInResult=u(e)!==u(t);break;default:throw new Error("Unrecognized operation type found ".concat(F.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,n,r){var o,i,a,u=S.comparePoints(e,n);if(u<0)o=e,i=n,a=1;else{if(!(u>0))throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));o=n,i=e,a=-1}return new t(new S(o,!0),new S(i,!1),[r],[a])}}]),t}(),T=function(){function t(n,r,o){if(e(this,t),!Array.isArray(n)||0===n.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=o,this.segments=[],"number"!=typeof n[0][0]||"number"!=typeof n[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=v.round(n[0][0],n[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var a=i,u=1,c=n.length;u<c;u++){if("number"!=typeof n[u][0]||"number"!=typeof n[u][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=v.round(n[u][0],n[u][1]);l.x===a.x&&l.y===a.y||(this.segments.push(x.fromRing(a,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),a=l)}i.x===a.x&&i.y===a.y||this.segments.push(x.fromRing(a,i,this))}return r(t,[{key:"getSweepEvents",value:function(){for(var e=[],t=0,n=this.segments.length;t<n;t++){var r=this.segments[t];e.push(r.leftSE),e.push(r.rightSE)}return e}}]),t}(),M=function(){function t(n,r){if(e(this,t),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new T(n[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(var o=1,i=n.length;o<i;o++){var a=new T(n[o],this,!1);a.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=a.bbox.ll.x),a.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=a.bbox.ll.y),a.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.interiorRings.push(a)}this.multiPoly=r}return r(t,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),t=0,n=this.interiorRings.length;t<n;t++)for(var r=this.interiorRings[t].getSweepEvents(),o=0,i=r.length;o<i;o++)e.push(r[o]);return e}}]),t}(),R=function(){function t(n,r){if(e(this,t),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof n[0][0][0]&&(n=[n])}catch(u){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var o=0,i=n.length;o<i;o++){var a=new M(n[o],this);a.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=a.bbox.ll.x),a.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=a.bbox.ll.y),a.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.polys.push(a)}this.isSubject=r}return r(t,[{key:"getSweepEvents",value:function(){for(var e=[],t=0,n=this.polys.length;t<n;t++)for(var r=this.polys[t].getSweepEvents(),o=0,i=r.length;o<i;o++)e.push(r[o]);return e}}]),t}(),k=function(){function t(n){e(this,t),this.events=n;for(var r=0,o=n.length;r<o;r++)n[r].segment.ringOut=this;this.poly=null}return r(t,null,[{key:"factory",value:function(e){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];if(i.isInResult()&&!i.ringOut){for(var a=null,u=i.leftSE,c=i.rightSE,l=[u],s=u.point,f=[];a=u,u=c,l.push(u),u.point!==s;)for(;;){var p=u.getAvailableLinkedEvents();if(0===p.length){var d=l[0].point,y=l[l.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(d.x,",")+" ".concat(d.y,"]. Last matching segment found ends at")+" [".concat(y.x,", ").concat(y.y,"]."))}if(1===p.length){c=p[0].otherSE;break}for(var h=null,g=0,v=f.length;g<v;g++)if(f[g].point===u.point){h=g;break}if(null===h){f.push({index:l.length,point:u.point});var b=u.getLeftmostComparator(a);c=p.sort(b)[0].otherSE;break}var m=f.splice(h)[0],E=l.splice(m.index);E.unshift(E[0].otherSE),n.push(new t(E.reverse()))}n.push(new t(l))}}return n}}]),r(t,[{key:"getGeom",value:function(){for(var e=this.events[0].point,t=[e],n=1,r=this.events.length-1;n<r;n++){var o=this.events[n].point,i=this.events[n+1].point;0!==E(o,e,i)&&(t.push(o),e=o)}if(1===t.length)return null;var a=t[0],u=t[1];0===E(a,e,u)&&t.shift(),t.push(t[0]);for(var c=this.isExteriorRing()?1:-1,l=this.isExteriorRing()?0:t.length-1,s=this.isExteriorRing()?t.length:-1,f=[],p=l;p!=s;p+=c)f.push([t[p].x,t[p].y]);return f}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var e=this.enclosingRing();this._isExteriorRing=!e||!e.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var e=this.events[0],t=1,n=this.events.length;t<n;t++){var r=this.events[t];S.compare(e,r)>0&&(e=r)}for(var o=e.segment.prevInResult(),i=o?o.prevInResult():null;;){if(!o)return null;if(!i)return o.ringOut;if(i.ringOut!==o.ringOut)return i.ringOut.enclosingRing()!==o.ringOut?o.ringOut:o.ringOut.enclosingRing();o=i.prevInResult(),i=o?o.prevInResult():null}}}]),t}(),C=function(){function t(n){e(this,t),this.exteriorRing=n,n.poly=this,this.interiorRings=[]}return r(t,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(null===e[0])return null;for(var t=0,n=this.interiorRings.length;t<n;t++){var r=this.interiorRings[t].getGeom();null!==r&&e.push(r)}return e}}]),t}(),D=function(){function t(n){e(this,t),this.rings=n,this.polys=this._composePolys(n)}return r(t,[{key:"getGeom",value:function(){for(var e=[],t=0,n=this.polys.length;t<n;t++){var r=this.polys[t].getGeom();null!==r&&e.push(r)}return e}},{key:"_composePolys",value:function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];if(!o.poly)if(o.isExteriorRing())t.push(new C(o));else{var i=o.enclosingRing();i.poly||t.push(new C(i)),i.poly.addInterior(o)}}return t}}]),t}(),I=function(){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.compare;e(this,t),this.queue=n,this.tree=new l(r),this.segments=[]}return r(t,[{key:"process",value:function(e){var t=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),n;var r=e.isLeft?this.tree.insert(t):this.tree.find(t);if(!r)throw new Error("Unable to find segment #".concat(t.id," ")+"[".concat(t.leftSE.point.x,", ").concat(t.leftSE.point.y,"] -> ")+"[".concat(t.rightSE.point.x,", ").concat(t.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var o=r,i=r,a=void 0,u=void 0;void 0===a;)null===(o=this.tree.prev(o))?a=null:void 0===o.key.consumedBy&&(a=o.key);for(;void 0===u;)null===(i=this.tree.next(i))?u=null:void 0===i.key.consumedBy&&(u=i.key);if(e.isLeft){var c=null;if(a){var l=a.getIntersection(t);if(null!==l&&(t.isAnEndpoint(l)||(c=l),!a.isAnEndpoint(l)))for(var s=this._splitSafely(a,l),f=0,p=s.length;f<p;f++)n.push(s[f])}var d=null;if(u){var y=u.getIntersection(t);if(null!==y&&(t.isAnEndpoint(y)||(d=y),!u.isAnEndpoint(y)))for(var h=this._splitSafely(u,y),g=0,v=h.length;g<v;g++)n.push(h[g])}if(null!==c||null!==d){var b=null;b=null===c?d:null===d||S.comparePoints(c,d)<=0?c:d,this.queue.remove(t.rightSE),n.push(t.rightSE);for(var m=t.split(b),E=0,O=m.length;E<O;E++)n.push(m[E])}n.length>0?(this.tree.remove(t),n.push(e)):(this.segments.push(t),t.prev=a)}else{if(a&&u){var _=a.getIntersection(u);if(null!==_){if(!a.isAnEndpoint(_))for(var P=this._splitSafely(a,_),w=0,j=P.length;w<j;w++)n.push(P[w]);if(!u.isAnEndpoint(_))for(var x=this._splitSafely(u,_),T=0,M=x.length;T<M;T++)n.push(x[T])}}this.tree.remove(t)}return n}},{key:"_splitSafely",value:function(e,t){this.tree.remove(e);var n=e.rightSE;this.queue.remove(n);var r=e.split(t);return r.push(n),void 0===e.consumedBy&&this.tree.insert(e),r}}]),t}(),A=void 0!==t&&{}.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,N=void 0!==t&&{}.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,F=new(function(){function t(){e(this,t)}return r(t,[{key:"run",value:function(e,t,n){F.type=e,v.reset();for(var r=[new R(t,!0)],o=0,i=n.length;o<i;o++)r.push(new R(n[o],!1));if(F.numMultiPolys=r.length,"difference"===F.type)for(var a=r[0],u=1;u<r.length;)null!==f(r[u].bbox,a.bbox)?u++:r.splice(u,1);if("intersection"===F.type)for(var c=0,s=r.length;c<s;c++)for(var p=r[c],d=c+1,y=r.length;d<y;d++)if(null===f(p.bbox,r[d].bbox))return[];for(var h=new l(S.compare),g=0,b=r.length;g<b;g++)for(var m=r[g].getSweepEvents(),E=0,O=m.length;E<O;E++)if(h.insert(m[E]),h.size>A)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var _=new I(h),P=h.size,w=h.pop();w;){var j=w.key;if(h.size===P){var x=j.segment;throw new Error("Unable to pop() ".concat(j.isLeft?"left":"right"," SweepEvent ")+"[".concat(j.point.x,", ").concat(j.point.y,"] from segment #").concat(x.id," ")+"[".concat(x.leftSE.point.x,", ").concat(x.leftSE.point.y,"] -> ")+"[".concat(x.rightSE.point.x,", ").concat(x.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(h.size>A)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(_.segments.length>N)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var T=_.process(j),M=0,C=T.length;M<C;M++){var L=T[M];void 0===L.consumedBy&&h.insert(L)}P=h.size,w=h.pop()}v.reset();var G=k.factory(_.segments);return new D(G).getGeom()}}]),t}());return{union:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return F.run("union",e,n)},intersection:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return F.run("intersection",e,n)},xor:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return F.run("xor",e,n)},difference:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return F.run("difference",e,n)}}}()}).call(this,n("8oxB"))},"3dFB":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawLineStringMode=void 0;var r=n("lVFs");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(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 a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(){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(e){return!1}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(y,e);var t,n,o,a,d=(t=y,function(){var e,n=f(t);if(s()){var r=f(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return l(this,e)});function y(){return u(this,y),d.apply(this,arguments)}return n=y,(o=[{key:"handleClick",value:function(e,t){var n=e.picks,o=(0,r.getPickedEditHandle)(n),a=!1;o||(this.addClickSequence(e),a=!0);var u=this.getClickSequence();if(u.length>1&&o&&Array.isArray(o.properties.positionIndexes)&&o.properties.positionIndexes[0]===u.length-1){var c={type:"LineString",coordinates:i(u)};this.resetClickSequence();var l=this.getAddFeatureAction(c,t.data);l&&t.onEdit(l)}else a&&t.onEdit({updatedData:t.data,editType:"addTentativePosition",editContext:{position:e.mapCoords}})}},{key:"getGuides",value:function(e){var t,n,r=e.lastPointerMoveEvent,o=this.getClickSequence(),a=r?[r.mapCoords]:[],u={type:"FeatureCollection",features:[]};o.length>0&&(n={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(i(o),a)}}),n&&u.features.push(n);var c=o.map((function(e,t){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[t]},geometry:{type:"Point",coordinates:e}}}));return(t=u.features).push.apply(t,i(c)),u}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell")}}])&&c(n.prototype,o),a&&c(n,a),y}(n("4R+2").GeoJsonEditMode);t.DrawLineStringMode=d},"3i6d":function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n("Nwvx");function o(e){return Object(r.geomReduce)(e,(function(e,t){return e+function(e){var t,n=0;switch(e.type){case"Polygon":return i(e.coordinates);case"MultiPolygon":for(t=0;t<e.coordinates.length;t++)n+=i(e.coordinates[t]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(t)}),0)}function i(e){var t=0;if(e&&e.length>0){t+=Math.abs(a(e[0]));for(var n=1;n<e.length;n++)t-=Math.abs(a(e[n]))}return t}function a(e){var t,n,r,o,i,a,c=0,l=e.length;if(l>2){for(a=0;a<l;a++)a===l-2?(r=l-2,o=l-1,i=0):a===l-1?(r=l-1,o=0,i=1):(r=a,o=a+1,i=a+2),t=e[r],n=e[o],c+=(u(e[i][0])-u(t[0]))*Math.sin(u(n[1]));c=6378137*c*6378137/2}return c}function u(e){return e*Math.PI/180}},"4LhL":function(e,t,n){"use strict";n.r(t);var r=n("0eZ/"),o=n("Qidy"),i=n("r/c0"),a=n("EDhj"),u=n("Nwvx"),c=n("0wsv"),l=n("RwN2");t.default=function(e,t,n){void 0===n&&(n={});var s=Object(c.point)([1/0,1/0],{dist:1/0}),f=0;return Object(u.flattenEach)(e,(function(e){for(var u=Object(l.getCoords)(e),p=0;p<u.length-1;p++){var d=Object(c.point)(u[p]);d.properties.dist=Object(o.default)(t,d,n);var y=Object(c.point)(u[p+1]);y.properties.dist=Object(o.default)(t,y,n);var h=Object(o.default)(d,y,n),g=Math.max(d.properties.dist,y.properties.dist),v=Object(r.default)(d,y),b=Object(i.default)(t,g,v+90,n),m=Object(i.default)(t,g,v-90,n),E=Object(a.default)(Object(c.lineString)([b.geometry.coordinates,m.geometry.coordinates]),Object(c.lineString)([d.geometry.coordinates,y.geometry.coordinates])),O=null;E.features.length>0&&((O=E.features[0]).properties.dist=Object(o.default)(t,O,n),O.properties.location=f+Object(o.default)(d,O,n)),d.properties.dist<s.properties.dist&&((s=d).properties.index=p,s.properties.location=f),y.properties.dist<s.properties.dist&&((s=y).properties.index=p+1,s.properties.location=f+h),O&&O.properties.dist<s.properties.dist&&((s=O).properties.index=p),f+=h}})),s}},"4R+2":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIntermediatePosition=function(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]},t.GeoJsonEditMode=void 0;var r=c(n("Nw1Z")),o=c(n("PMOM")),i=c(n("6l82")),a=n("lVFs"),u=n("KV4q");function c(e){return e&&e.__esModule?e:{default:e}}function l(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||s(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 s(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d={type:"FeatureCollection",features:[]},y=[],h=function(){function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=[],(n="_clickSequence")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r}var t,n,c;return t=e,(n=[{key:"getGuides",value:function(e){return d}},{key:"getTooltips",value:function(e){return y}},{key:"getSelectedFeature",value:function(e){return 1===e.selectedIndexes.length?e.data.features[e.selectedIndexes[0]]:null}},{key:"getSelectedGeometry",value:function(e){var t=this.getSelectedFeature(e);return t?t.geometry:null}},{key:"getSelectedFeaturesAsFeatureCollection",value:function(e){var t=e.data.features;return{type:"FeatureCollection",features:e.selectedIndexes.map((function(e){return t[e]}))}}},{key:"getClickSequence",value:function(){return this._clickSequence}},{key:"addClickSequence",value:function(e){var t=e.mapCoords;this._clickSequence.push(t)}},{key:"resetClickSequence",value:function(){this._clickSequence=[]}},{key:"getTentativeGuide",value:function(e){return this.getGuides(e).features.find((function(e){return e.properties&&"tentative"===e.properties.guideType}))}},{key:"isSelectionPicked",value:function(e,t){if(!e.length)return!1;var n=(0,a.getNonGuidePicks)(e).map((function(e){return e.index})),r=(0,a.getPickedEditHandles)(e).map((function(e){return e.properties.featureIndex})),o=new Set([].concat(l(n),l(r)));return t.selectedIndexes.some((function(e){return o.has(e)}))}},{key:"getAddFeatureAction",value:function(e,t){var n=e,r=new u.ImmutableFeatureCollection(t).addFeature({type:"Feature",properties:{},geometry:n}).getObject();return{updatedData:r,editType:"addFeature",editContext:{featureIndexes:[r.features.length-1]}}}},{key:"getAddManyFeaturesAction",value:function(e,t){var n,r=e.features,o=new u.ImmutableFeatureCollection(t),i=o.getObject().features.length,a=[],c=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=s(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},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,o,i=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}(r);try{for(c.s();!(n=c.n()).done;){var l=n.value,f=l.properties,p=l.geometry;o=o.addFeature({type:"Feature",properties:f,geometry:p}),a.push(i+a.length)}}catch(d){c.e(d)}finally{c.f()}return{updatedData:o.getObject(),editType:"addFeature",editContext:{featureIndexes:a}}}},{key:"getAddFeatureOrBooleanPolygonAction",value:function(e,t){var n=this.getSelectedFeature(t),a=t.modeConfig;if(a&&a.booleanOperation){if(!n||"Polygon"!==n.geometry.type&&"MultiPolygon"!==n.geometry.type)return console.warn("booleanOperation only supported for single Polygon or MultiPolygon selection"),null;var c,l={type:"Feature",geometry:e};if("union"===a.booleanOperation)c=(0,r.default)(n,l);else if("difference"===a.booleanOperation)c=(0,o.default)(n,l);else{if("intersection"!==a.booleanOperation)return console.warn("Invalid booleanOperation ".concat(a.booleanOperation)),null;c=(0,i.default)(n,l)}if(!c)return console.warn("Canceling edit. Boolean operation erased entire polygon."),null;var s=t.selectedIndexes[0];return{updatedData:new u.ImmutableFeatureCollection(t.data).replaceGeometry(s,c.geometry).getObject(),editType:"unionGeometry",editContext:{featureIndexes:[s]}}}return this.getAddFeatureAction(e,t.data)}},{key:"handleClick",value:function(e,t){}},{key:"handlePointerMove",value:function(e,t){}},{key:"handleStartDragging",value:function(e,t){}},{key:"handleStopDragging",value:function(e,t){}},{key:"handleDragging",value:function(e,t){}}])&&p(t.prototype,n),c&&p(t,c),e}();t.GeoJsonEditMode=h},"4fRq":function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},"6l82":function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return u}));var r=n("0wsv"),o=n("RwN2"),i=n("3L5V"),a=n.n(i);function u(e,t,n){void 0===n&&(n={});var i=Object(o.getGeom)(e),u=Object(o.getGeom)(t),c=a.a.intersection(i.coordinates,u.coordinates);return 0===c.length?null:1===c.length?Object(r.polygon)(c[0],n.properties):Object(r.multiPolygon)(c,n.properties)}},"7it9":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RotateMode=void 0;var r=g(n("J/Si")),o=g(n("VWg+")),i=g(n("JRQ3")),a=g(n("0eZ/")),u=g(n("iuXc")),c=g(n("Qidy")),l=n("Nwvx"),s=n("RwN2"),f=n("0wsv"),p=g(n("kyJj")),d=n("lVFs"),y=n("4R+2"),h=n("KV4q");function g(e){return e&&e.__esModule?e:{default:e}}function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?O(e):t}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}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(e){return!1}}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(x,e);var t,n,g,v,j=(t=x,function(){var e,n=P(t);if(_()){var r=P(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return E(this,e)});function x(){var e;b(this,x);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return S(O(e=j.call.apply(j,[this].concat(n))),"_selectedEditHandle",void 0),S(O(e),"_geometryBeingRotated",void 0),S(O(e),"_isRotating",!1),S(O(e),"_isSinglePointGeometrySelected",(function(e){var t=(e||{}).features;return!(!Array.isArray(t)||1!==t.length)&&"Point"===(0,s.getGeom)(t[0]).type})),S(O(e),"getIsRotating",(function(){return e._isRotating})),e}return n=x,(g=[{key:"getGuides",value:function(e){var t=this._geometryBeingRotated||this.getSelectedFeaturesAsFeatureCollection(e);if(this._isRotating)return(0,f.featureCollection)([(0,i.default)(t)]);var n=this._isSinglePointGeometrySelected(t)?(0,r.default)(t,1):t,a=(0,u.default)((0,o.default)(n)),s=null,p=null,d=0;(0,l.coordEach)(a,(function(e,t){if(s){var n=(0,y.getIntermediatePosition)(e,s);(!p||n[1]>p[1])&&(p=n);var r=(0,c.default)(e,s);d=Math.max(d,r)}s=e}));var h=p&&[p[0],p[1]+d/1e3],g=(0,f.lineString)([p,h]),v=(0,f.point)(h,{guideType:"editHandle",editHandleType:"rotate"});return(0,f.featureCollection)([a,v,g])}},{key:"handleDragging",value:function(e,t){if(this._isRotating){var n=this.getRotateAction(e.pointerDownMapCoords,e.mapCoords,"rotating",t);n&&t.onEdit(n),e.cancelPan()}}},{key:"handlePointerMove",value:function(e,t){if(!this._isRotating){var n=(0,d.getPickedEditHandle)(e.picks);this._selectedEditHandle=n&&"rotate"===n.properties.editHandleType?n:null}this.updateCursor(t)}},{key:"handleStartDragging",value:function(e,t){this._selectedEditHandle&&(this._isRotating=!0,this._geometryBeingRotated=this.getSelectedFeaturesAsFeatureCollection(t))}},{key:"handleStopDragging",value:function(e,t){if(this._isRotating){var n=this.getRotateAction(e.pointerDownMapCoords,e.mapCoords,"rotated",t);n&&t.onEdit(n),this._geometryBeingRotated=null,this._selectedEditHandle=null,this._isRotating=!1}}},{key:"updateCursor",value:function(e){this._selectedEditHandle?e.onUpdateCursor("crosshair"):e.onUpdateCursor(null)}},{key:"getRotateAction",value:function(e,t,n,r){if(!this._geometryBeingRotated)return null;for(var o=(0,i.default)(this._geometryBeingRotated),u=function(e,t,n){var r=(0,a.default)(e,t);return(0,a.default)(e,n)-r}(o,e,t),c=(0,p.default)(this._geometryBeingRotated,u,{pivot:o}),l=new h.ImmutableFeatureCollection(r.data),s=r.selectedIndexes,f=0;f<s.length;f++){var d=s[f],y=c.features[f];l=l.replaceGeometry(d,y.geometry)}return{updatedData:l.getObject(),editType:n,editContext:{featureIndexes:s}}}}])&&m(n.prototype,g),v&&m(n,v),x}(y.GeoJsonEditMode);t.RotateMode=j},"7mrb":function(e,t,n){"use strict";n.r(t);var r=n("VWg+"),o=n("0wsv");t.default=function(e,t){void 0===t&&(t={});var n=Object(r.default)(e),i=(n[0]+n[2])/2,a=(n[1]+n[3])/2;return Object(o.point)([i,a],t.properties,t)}},"9/d+":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModifyMode=void 0;var r,o=(r=n("4LhL"))&&r.__esModule?r:{default:r},i=n("0wsv"),a=n("lVFs"),u=n("4R+2"),c=n("KV4q");function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||f(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 f(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(){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(e){return!1}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(p,e);var t,n,r,u,l=(t=p,function(){var e,n=v(t);if(g()){var r=v(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return h(this,e)});function p(){return d(this,p),l.apply(this,arguments)}return n=p,(r=[{key:"getGuides",value:function(e){var t,n=this,r=[],o=e.data,u=e.lastPointerMoveEvent,c=o.features,l=u&&u.picks,p=u&&u.mapCoords,d=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=f(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},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,o,i=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}(e.selectedIndexes);try{for(d.s();!(t=d.n()).done;){var y=t.value;if(y<c.length){var h=c[y].geometry;r.push.apply(r,s((0,a.getEditHandlesForGeometry)(h,y)))}else console.warn("selectedFeatureIndexes out of range ".concat(y))}}catch(P){d.e(P)}finally{d.f()}if(l&&l.length&&p){var g=!(0,a.getPickedExistingEditHandle)(l)&&l.find((function(e){return!e.isGuide}));if(g&&!g.object.geometry.type.includes("Point")&&e.selectedIndexes.includes(g.index)){var v=null,b=[],m=(0,i.point)(p);if((0,a.recursivelyTraverseNestedArrays)(g.object.geometry.coordinates,[],(function(t,r){var o=(0,i.lineString)(t),a=n.nearestPointOnLine(o,m,e.modeConfig&&e.modeConfig.viewport);(!v||a.properties.dist<v.properties.dist)&&(v=a,b=r)})),v){var E=v,O=E.geometry.coordinates,_=E.properties.index;r.push({type:"Feature",properties:{guideType:"editHandle",editHandleType:"intermediate",featureIndex:g.index,positionIndexes:[].concat(s(b),[_+1])},geometry:{type:"Point",coordinates:O}})}}}return{type:"FeatureCollection",features:r}}},{key:"nearestPointOnLine",value:function(e,t,n){if(e.geometry.coordinates.some((function(e){return e.length>2}))){if(n)return(0,a.nearestPointOnProjectedLine)(e,t,n);console.log("Editing 3D point but modeConfig.viewport not provided. Falling back to 2D logic.")}return(0,o.default)(e,t)}},{key:"handleClick",value:function(e,t){var n=(0,a.getPickedExistingEditHandle)(e.picks),r=(0,a.getPickedIntermediateEditHandle)(e.picks);if(n){var o,i=n.properties,u=i.featureIndex,l=i.positionIndexes;try{o=new c.ImmutableFeatureCollection(t.data).removePosition(u,l).getObject()}catch(y){}o&&t.onEdit({updatedData:o,editType:"removePosition",editContext:{featureIndexes:[u],positionIndexes:l,position:n.geometry.coordinates}})}else if(r){var s=r.properties,f=s.featureIndex,p=s.positionIndexes,d=new c.ImmutableFeatureCollection(t.data).addPosition(f,p,r.geometry.coordinates).getObject();d&&t.onEdit({updatedData:d,editType:"addPosition",editContext:{featureIndexes:[f],positionIndexes:p,position:r.geometry.coordinates}})}}},{key:"handleDragging",value:function(e,t){var n=(0,a.getPickedEditHandle)(e.pointerDownPicks);if(n){e.cancelPan();var r=n.properties,o=new c.ImmutableFeatureCollection(t.data).replacePosition(r.featureIndex,r.positionIndexes,e.mapCoords).getObject();t.onEdit({updatedData:o,editType:"movePosition",editContext:{featureIndexes:[r.featureIndex],positionIndexes:r.positionIndexes,position:e.mapCoords}})}}},{key:"handlePointerMove",value:function(e,t){var n=this.getCursor(e);t.onUpdateCursor(n)}},{key:"handleStartDragging",value:function(e,t){var n=t.selectedIndexes,r=(0,a.getPickedIntermediateEditHandle)(e.picks);if(n.length&&r){var o=r.properties,i=new c.ImmutableFeatureCollection(t.data).addPosition(o.featureIndex,o.positionIndexes,e.mapCoords).getObject();t.onEdit({updatedData:i,editType:"addPosition",editContext:{featureIndexes:[o.featureIndex],positionIndexes:o.positionIndexes,position:e.mapCoords}})}}},{key:"handleStopDragging",value:function(e,t){var n=t.selectedIndexes,r=(0,a.getPickedEditHandle)(e.picks);if(n.length&&r){var o=r.properties,i=new c.ImmutableFeatureCollection(t.data).replacePosition(o.featureIndex,o.positionIndexes,e.mapCoords).getObject();t.onEdit({updatedData:i,editType:"finishMovePosition",editContext:{featureIndexes:[o.featureIndex],positionIndexes:o.positionIndexes,position:e.mapCoords}})}}},{key:"getCursor",value:function(e){var t=e&&e.picks||[];return(0,a.getPickedEditHandles)(t).length?"cell":null}}])&&y(n.prototype,r),u&&y(n,u),p}(u.GeoJsonEditMode);t.ModifyMode=m},"9ASd":function(e,t,n){"use strict";n("E9XD"),Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPolygonMode=void 0;var r=g(n("t9gQ")),o=g(n("PMOM")),i=g(n("J/Si")),a=g(n("EDhj")),u=n("0wsv"),c=g(n("0eZ/")),l=g(n("Qidy")),s=g(n("r/c0")),f=g(n("Oi1S")),p=g(n("4LhL")),d=n("lVFs"),y=n("4R+2"),h=n("KV4q");function g(e){return e&&e.__esModule?e:{default:e}}function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||E(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 m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){o=!0,i=c}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||E(e,t)||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 E(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(){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(e){return!1}}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}(E,e);var t,n,y,g,v=(t=E,function(){var e,n=j(t);if(S()){var r=j(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return w(this,e)});function E(){return _(this,E),v.apply(this,arguments)}return n=E,(y=[{key:"calculateMapCoords",value:function(e,t,n){var r=n.modeConfig;if(!r||!r.lock90Degree||!e.length)return t;if(1===e.length){var o=e[0],i=this.getSelectedGeometry(n),a=(0,f.default)(i),y="FeatureCollection"===a.type?a.features:[a],h=Number.MAX_SAFE_INTEGER,g=null;if(y.forEach((function(e){var t=(0,p.default)(e,o),n=(0,l.default)(t,o);h>n&&(h=n,g=t)})),g){var v=(0,c.default)(o,g),b=(0,l.default)(o,t,{units:"meters"});return(0,s.default)(o,b,v,{units:"meters"}).geometry.coordinates}return t}var E=e[e.length-1],O=m((0,d.generatePointsParallelToLinePoints)(e[e.length-2],E,t),1)[0];return(0,p.default)((0,u.lineString)([E,O]),t).geometry.coordinates}},{key:"getGuides",value:function(e){var t=this.getClickSequence(),n={type:"FeatureCollection",features:[]};if(0===t.length||!e.lastPointerMoveEvent)return n;var r=e.lastPointerMoveEvent.mapCoords;return n.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(b(t),[this.calculateMapCoords(t,r,e)])}}),n}},{key:"handleClick",value:function(e,t){var n=this.getTentativeGuide(t),o=this.getSelectedGeometry(t);if(o){var i=this.getClickSequence();n&&"LineString"===n.geometry.type?i.push(n.geometry.coordinates[n.geometry.coordinates.length-1]):this.addClickSequence(e);var u={type:"Point",coordinates:i[i.length-1]},c=(0,r.default)(u,o);if(i.length>1&&n&&!c){if(this.resetClickSequence(),0===(0,a.default)(n,o).features.length)return;var l=this.splitPolygon(n,t);l&&t.onEdit(l)}}else console.warn("A polygon must be selected for splitting")}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell")}},{key:"splitPolygon",value:function(e,t){var n=this.getSelectedGeometry(t),r=t.selectedIndexes[0],a=t.modeConfig||{},u=a.gap,c=void 0===u?.1:u,l=a.units,s=void 0===l?"centimeters":l;0===c&&(c=.1,s="centimeters");var f=(0,i.default)(e,c,{units:s}),p=(0,o.default)(n,f);if(!p)return console.warn("Canceling edit. Split Polygon erased"),null;var d=p.geometry,y=d.type,g=d.coordinates,v=[];return v="Polygon"===y?g.map((function(e){return[e]})):g.reduce((function(e,t){return t.forEach((function(t){e.push([t])})),e}),[]),{updatedData:new h.ImmutableFeatureCollection(t.data).replaceGeometry(r,{type:"MultiPolygon",coordinates:v}).getObject(),editType:"split",editContext:{featureIndexes:[r]}}}}])&&P(n.prototype,y),g&&P(n,g),E}(y.GeoJsonEditMode);t.SplitPolygonMode=T},"9daN":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawCircleFromCenterMode=void 0;var r=i(n("k+DL")),o=i(n("Qidy"));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(){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(e){return!1}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(y,e);var t,n,i,a,d=(t=y,function(){var e,n=f(t);if(s()){var r=f(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return l(this,e)});function y(){return u(this,y),d.apply(this,arguments)}return n=y,(i=[{key:"getTwoClickPolygon",value:function(e,t,n){var i=(n||{}).steps,a=void 0===i?64:i,u={steps:a};a<4&&(console.warn("Minimum steps to draw a circle is 4 "),u.steps=4);var c=Math.max((0,o.default)(e,t),.001);return(0,r.default)(e,c,u)}}])&&c(n.prototype,i),a&&c(n,a),y}(n("MMIt").TwoClickPolygonMode);t.DrawCircleFromCenterMode=d},"9hBD":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n("xDdU")),o=n("1Y5v"),i=u(n("KER3")),a=n("wHih");function u(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(){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(e){return!1}}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(s,e);var t,n,i,u,c=(t=s,function(){var e,n=b(t);if(v()){var r=b(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return h(this,e)});function s(){var e;d(this,s);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return E(g(e=c.call.apply(c,[this].concat(n))),"handleClick",(function(t,n){e.getTentativeFeature()?e._updateTentativeFeature(t,n):e._initTentativeFeature(t,n)})),E(g(e),"getGuides",(function(t){var n=e.getSelectedFeature(t),r=e.getTentativeFeature(),i=n||r,u=(0,a.getFeatureCoordinates)(i);if(!u)return null;var c=t.lastPointerMoveEvent,s=e.getEditHandlesFromFeature(i)||[],f={type:"Feature",properties:{guideType:o.GUIDE_TYPE.CURSOR_EDIT_HANDLE,renderType:o.RENDER_TYPE.LINE_STRING,positionIndexes:[s.length]},geometry:{type:o.GEOJSON_TYPE.POINT,coordinates:[c.mapCoords]}};return s.push(f),{tentativeFeature:r=p({},r,{geometry:{type:o.GEOJSON_TYPE.LINE_STRING,coordinates:[].concat(l(u),[c.mapCoords])}}),editHandles:s}})),E(g(e),"_updateTentativeFeature",(function(t,n){var r=e.getTentativeFeature();r&&(r=p({},r,{geometry:{type:o.GEOJSON_TYPE.LINE_STRING,coordinates:[].concat(l(r.geometry.coordinates),[t.mapCoords])}}),e.setTentativeFeature(r),n.onEdit({editType:o.EDIT_TYPE.ADD_POSITION,updatedData:n.data.getObject(),editContext:[{feature:r,featureIndex:null,editHandleIndex:r.geometry.coordinates.length-1,screenCoords:t.screenCoords,mapCoords:t.mapCoords}]}))})),E(g(e),"_commitTentativeFeature",(function(t,n){var r=e.getTentativeFeature();if(r){var i=n.data;e.setTentativeFeature(null);var a=p({},r,{properties:{id:r.properties.id,renderType:o.RENDER_TYPE.LINE_STRING}}),u=i.addFeature(a).getObject();n.onEdit({editType:o.EDIT_TYPE.ADD_FEATURE,updatedData:u,editContext:null})}})),E(g(e),"_initTentativeFeature",(function(t,n){e.setTentativeFeature({type:"Feature",properties:{id:(0,r.default)(),renderType:o.RENDER_TYPE.LINE_STRING,guideType:o.GUIDE_TYPE.TENTATIVE},geometry:{type:o.GEOJSON_TYPE.POINT,coordinates:[t.mapCoords]}})})),e}return n=s,(i=[{key:"handleDblClick",value:function(e,t){this._commitTentativeFeature(e,t)}}])&&y(n.prototype,i),u&&y(n,u),s}(i.default);t.default=O},"A1R+":function(e,t,n){"use strict";e.exports=o,e.exports.default=o;var r=n("YcpW");function o(e,t){if(!(this instanceof o))return new o(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function i(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function a(e,t){u(e,0,e.children.length,t,e)}function u(e,t,n,r,o){o||(o=h(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(var i,a=t;a<n;a++)i=e.children[a],c(o,e.leaf?r(i):i);return o}function c(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function s(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function d(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function h(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,t,n,o,i){for(var a,u=[t,n];u.length;)(n=u.pop())-(t=u.pop())<=o||(a=t+Math.ceil((n-t)/o/2)*o,r(e,a,t,n,i),u.push(t,a,a,n))}o.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,n=[],r=this.toBBox;if(!y(e,t))return n;for(var o,i,a,u,c=[];t;){for(o=0,i=t.children.length;o<i;o++)a=t.children[o],y(e,u=t.leaf?r(a):a)&&(t.leaf?n.push(a):d(e,u)?this._all(a,n):c.push(a));t=c.pop()}return n},collides:function(e){var t=this.data,n=this.toBBox;if(!y(e,t))return!1;for(var r,o,i,a,u=[];t;){for(r=0,o=t.children.length;r<o;r++)if(i=t.children[r],y(e,a=t.leaf?n(i):i)){if(t.leaf||d(e,a))return!0;u.push(i)}t=u.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}var r=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var o=this.data;this.data=r,r=o}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=h([]),this},remove:function(e,t){if(!e)return this;for(var n,r,o,a,u=this.data,c=this.toBBox(e),l=[],s=[];u||l.length;){if(u||(u=l.pop(),r=l[l.length-1],n=s.pop(),a=!0),u.leaf&&-1!==(o=i(e,u.children,t)))return u.children.splice(o,1),l.push(u),this._condense(l),this;a||u.leaf||!d(u,c)?r?(n++,u=r.children[n],a=!1):u=null:(l.push(u),s.push(n),n=0,r=u,u=u.children[0])}return this},toBBox:function(e){return e},compareMinX:l,compareMinY:s,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},_build:function(e,t,n,r){var o,i=n-t+1,u=this._maxEntries;if(i<=u)return a(o=h(e.slice(t,n+1)),this.toBBox),o;r||(r=Math.ceil(Math.log(i)/Math.log(u)),u=Math.ceil(i/Math.pow(u,r-1))),(o=h([])).leaf=!1,o.height=r;var c,l,s,f,p=Math.ceil(i/u),d=p*Math.ceil(Math.sqrt(u));for(g(e,t,n,d,this.compareMinX),c=t;c<=n;c+=d)for(g(e,c,s=Math.min(c+d-1,n),p,this.compareMinY),l=c;l<=s;l+=p)f=Math.min(l+p-1,s),o.children.push(this._build(e,l,f,r-1));return a(o,this.toBBox),o},_chooseSubtree:function(e,t,n,r){for(var o,i,a,u,c,l,s,p,d,y;r.push(t),!t.leaf&&r.length-1!==n;){for(s=p=1/0,o=0,i=t.children.length;o<i;o++)c=f(a=t.children[o]),d=e,y=a,(l=(Math.max(y.maxX,d.maxX)-Math.min(y.minX,d.minX))*(Math.max(y.maxY,d.maxY)-Math.min(y.minY,d.minY))-c)<p?(p=l,s=c<s?c:s,u=a):l===p&&c<s&&(s=c,u=a);t=u||t.children[0]}return t},_insert:function(e,t,n){var r=this.toBBox,o=n?e:r(e),i=[],a=this._chooseSubtree(o,this.data,t,i);for(a.children.push(e),c(a,o);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(o,i,t)},_split:function(e,t){var n=e[t],r=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,r);var i=this._chooseSplitIndex(n,o,r),u=h(n.children.splice(i,n.children.length-i));u.height=n.height,u.leaf=n.leaf,a(n,this.toBBox),a(u,this.toBBox),t?e[t-1].children.push(u):this._splitRoot(n,u)},_splitRoot:function(e,t){this.data=h([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,n){var r,o,i,a,c,l,s,p,d,y,h,g,v,b;for(l=s=1/0,r=t;r<=n-t;r++)o=u(e,0,r,this.toBBox),i=u(e,r,n,this.toBBox),d=o,y=i,h=void 0,g=void 0,v=void 0,b=void 0,h=Math.max(d.minX,y.minX),g=Math.max(d.minY,y.minY),v=Math.min(d.maxX,y.maxX),b=Math.min(d.maxY,y.maxY),a=Math.max(0,v-h)*Math.max(0,b-g),c=f(o)+f(i),a<l?(l=a,p=r,s=c<s?c:s):a===l&&c<s&&(s=c,p=r);return p},_chooseSplitAxis:function(e,t,n){var r=e.leaf?this.compareMinX:l,o=e.leaf?this.compareMinY:s;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,o)&&e.children.sort(r)},_allDistMargin:function(e,t,n,r){e.children.sort(r);var o,i,a=this.toBBox,l=u(e,0,t,a),s=u(e,n-t,n,a),f=p(l)+p(s);for(o=t;o<n-t;o++)i=e.children[o],c(l,e.leaf?a(i):i),f+=p(l);for(o=n-t-1;o>=t;o--)i=e.children[o],c(s,e.leaf?a(i):i),f+=p(s);return f},_adjustParentBBoxes:function(e,t,n){for(var r=n;r>=0;r--)c(t[r],e)},_condense:function(e){for(var t,n=e.length-1;n>=0;n--)0===e[n].children.length?n>0?(t=e[n-1].children).splice(t.indexOf(e[n]),1):this.clear():a(e[n],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}},Cg8U:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n("q1tI")),o=n("1Y5v"),i=c(n("dHJZ")),a=n("wHih"),u=n("KxKs");function c(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(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 f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(){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(e){return!1}}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var P=O({},i.default.defaultProps,{clickRadius:0,featureShape:"circle",editHandleShape:"rect",editHandleStyle:u.editHandleStyle,featureStyle:u.featureStyle,featuresDraggable:!0}),w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(l,e);var t,n,i,u,c=(t=l,function(){var e,n=b(t);if(v()){var r=b(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return h(this,e)});function l(){var e;d(this,l);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return _(g(e=c.call.apply(c,[this].concat(n))),"_getEditHandleState",(function(t,n){var r=e.state,i=r.pointerDownPicks,a=r.hovered;if(n)return n;var u=t.properties.positionIndexes[0],c=null,l=i&&i[0]&&i[0].object;if(l&&l.guideType===o.GUIDE_TYPE.EDIT_HANDLE&&(c=l.index),u===c)return o.RENDER_STATE.SELECTED;if(a&&a.type===o.ELEMENT_TYPE.EDIT_HANDLE){if(a.index===u)return o.RENDER_STATE.HOVERED;if(0===a.index&&t.properties.guideType===o.GUIDE_TYPE.CURSOR_EDIT_HANDLE)return o.RENDER_STATE.CLOSING}return o.RENDER_STATE.INACTIVE})),_(g(e),"_getFeatureRenderState",(function(t,n){var r=e.state.hovered,i=e._getSelectedFeatureIndex();return n||(t===i?o.RENDER_STATE.SELECTED:r&&r.type===o.ELEMENT_TYPE.FEATURE&&r.featureIndex===t?o.RENDER_STATE.HOVERED:o.RENDER_STATE.INACTIVE)})),_(g(e),"_getStyleProp",(function(e,t){return"function"==typeof e?e(t):e})),_(g(e),"_renderEditHandle",(function(t,n){var i=(0,a.getFeatureCoordinates)(t),u=e.project(i&&i[0]);if(!u)return null;var c=t.properties,l=c.featureIndex,s=c.positionIndexes,f=e.props,p=f.clickRadius,d=f.editHandleShape,y=f.editHandleStyle,h=s[0],g=e._getStyleProp(d,{feature:n||t,index:h,featureIndex:l,state:e._getEditHandleState(t)}),v=e._getStyleProp(y,{feature:n||t,index:h,featureIndex:l,shape:g,state:e._getEditHandleState(t)});t.properties.guideType===o.GUIDE_TYPE.CURSOR_EDIT_HANDLE&&(v=O({},v,{pointerEvents:"none"}));var b="".concat(o.ELEMENT_TYPE.EDIT_HANDLE,".").concat(l,".").concat(h);switch(g){case"circle":return r.default.createElement("g",{key:b,transform:"translate(".concat(u[0],", ").concat(u[1],")")},r.default.createElement("circle",{"data-type":o.ELEMENT_TYPE.EDIT_HANDLE,"data-index":h,"data-feature-index":l,key:"".concat(b,".hidden"),style:O({},v,{stroke:"none",fill:"#000",fillOpacity:0}),cx:0,cy:0,r:p}),r.default.createElement("circle",{"data-type":o.ELEMENT_TYPE.EDIT_HANDLE,"data-index":h,"data-feature-index":l,key:b,style:v,cx:0,cy:0}));case"rect":return r.default.createElement("g",{key:b,transform:"translate(".concat(u[0],", ").concat(u[1],")")},r.default.createElement("rect",{"data-type":o.ELEMENT_TYPE.EDIT_HANDLE,"data-index":h,"data-feature-index":l,key:"".concat(b,".hidden"),style:O({},v,{height:p,width:p,fill:"#000",fillOpacity:0}),r:p}),r.default.createElement("rect",{"data-type":o.ELEMENT_TYPE.EDIT_HANDLE,"data-index":h,"data-feature-index":l,key:"".concat(b),style:v}));default:return null}})),_(g(e),"_renderSegment",(function(t,n,i,a){var u=e._getPathInScreenCoords(i,o.GEOJSON_TYPE.LINE_STRING),c=a.radius,l=p(a,["radius"]),s=e.props.clickRadius,f="".concat(o.ELEMENT_TYPE.SEGMENT,".").concat(t,".").concat(n);return r.default.createElement("g",{key:f},r.default.createElement("path",{key:"".concat(f,".hidden"),"data-type":o.ELEMENT_TYPE.SEGMENT,"data-index":n,"data-feature-index":t,style:O({},l,{strokeWidth:s||c,opacity:0}),d:u}),r.default.createElement("path",{key:f,"data-type":o.ELEMENT_TYPE.SEGMENT,"data-index":n,"data-feature-index":t,style:l,d:u}))})),_(g(e),"_renderSegments",(function(t,n,r){for(var o=[],i=0;i<n.length-1;i++)o.push(e._renderSegment(t,i,[n[i],n[i+1]],r));return o})),_(g(e),"_renderFill",(function(t,n,i){var a=e._getPathInScreenCoords(n,o.GEOJSON_TYPE.POLYGON);return r.default.createElement("path",{key:"".concat(o.ELEMENT_TYPE.FILL,".").concat(t),"data-type":o.ELEMENT_TYPE.FILL,"data-feature-index":t,style:O({},i,{stroke:"none"}),d:a})})),_(g(e),"_renderTentativeFeature",(function(t,n){var r=e.props.featureStyle,i=t.geometry.coordinates,a=t.properties.renderType;if(!i||i.length<2)return null;var u,c,l,f=i[0],p=i[i.length-1],d=e._getStyleProp(r,{feature:t,index:null,state:o.RENDER_STATE.UNCOMMITTED}),y=e._renderFill("tentative",i,d);switch(a){case o.RENDER_TYPE.LINE_STRING:case o.RENDER_TYPE.POLYGON:var h=e._getStyleProp(r,{feature:t,state:o.RENDER_STATE.SELECTED});if(n){var g=i[i.length-2];u=e._renderSegments("tentative",i.slice(0,i.length-1),h),c=e._renderSegment("tentative-uncommitted",i.length-2,[g,p],d)}else u=e._renderSegments("tentative",i,h);if(a===o.RENDER_TYPE.POLYGON){var v=e._getStyleProp(r,{feature:t,index:null,state:o.RENDER_STATE.CLOSING});l=e._renderSegment("tentative-closing",i.length-1,[p,f],v)}break;case o.RENDER_TYPE.RECTANGLE:c=e._renderSegments("tentative",[].concat(s(i),[f]),d)}return[y,u,c,l].filter(Boolean)})),_(g(e),"_renderGuides",(function(t){var n=t.tentativeFeature,i=t.editHandles,a=e.getFeatures(),u=i.find((function(e){return e.properties.guideType===o.GUIDE_TYPE.CURSOR_EDIT_HANDLE}));return r.default.createElement("g",{key:"feature-guides"},n&&e._renderTentativeFeature(n,u),i&&i.map((function(t){var r=a&&a[t.properties.featureIndex]||n;return e._renderEditHandle(t,r)})))})),_(g(e),"_renderPoint",(function(t,n,i){var a=e._getFeatureRenderState(n),u=e.props,c=u.featureStyle,l=u.featureShape,s=u.clickRadius,f=e._getStyleProp(l,{feature:t,index:n,state:a}),p=e._getStyleProp(c,{feature:t,index:n,state:a}),d="feature.".concat(n);return"rect"===f?r.default.createElement("g",{key:d,transform:"translate(".concat(i[0][0],", ").concat(i[0][1],")")},r.default.createElement("rect",{"data-type":o.ELEMENT_TYPE.FEATURE,"data-feature-index":n,key:"".concat(d,".hidden"),style:O({},p,{width:s,height:s,fill:"#000",fillOpacity:0})}),r.default.createElement("rect",{"data-type":o.ELEMENT_TYPE.FEATURE,"data-feature-index":n,key:d,style:p})):r.default.createElement("g",{key:"feature.".concat(n),transform:"translate(".concat(i[0][0],", ").concat(i[0][1],")")},r.default.createElement("circle",{"data-type":o.ELEMENT_TYPE.FEATURE,"data-feature-index":n,key:"".concat(d,".hidden"),style:O({},p,{opacity:0}),cx:0,cy:0,r:s}),r.default.createElement("circle",{"data-type":o.ELEMENT_TYPE.FEATURE,"data-feature-index":n,key:d,style:p,cx:0,cy:0}))})),_(g(e),"_renderPath",(function(t,n,i){var a=e.props,u=a.featureStyle,c=a.clickRadius,l=n===e._getSelectedFeatureIndex(),s=e._getFeatureRenderState(n),f=e._getStyleProp(u,{feature:t,index:n,state:s}),p="feature.".concat(n);return l?r.default.createElement("g",{key:p},e._renderSegments(n,t.geometry.coordinates,f)):r.default.createElement("g",{key:p},r.default.createElement("path",{"data-type":o.ELEMENT_TYPE.FEATURE,"data-feature-index":n,key:"".concat(p,".hidden"),style:O({},f,{strokeWidth:c,opacity:0}),d:i}),r.default.createElement("path",{"data-type":o.ELEMENT_TYPE.FEATURE,"data-feature-index":n,key:p,style:f,d:i}))})),_(g(e),"_renderPolygon",(function(t,n,i){var u=e.props.featureStyle,c=n===e._getSelectedFeatureIndex(),l=e._getFeatureRenderState(n),s=e._getStyleProp(u,{feature:t,index:n,state:l}),f="feature.".concat(n);if(c){var p=(0,a.getFeatureCoordinates)(t);return p?r.default.createElement("g",{key:f},e._renderFill(n,p,s),e._renderSegments(n,p,s)):null}return r.default.createElement("path",{"data-type":o.ELEMENT_TYPE.FEATURE,"data-feature-index":n,key:f,style:s,d:i})})),_(g(e),"_renderFeature",(function(t,n){var r=(0,a.getFeatureCoordinates)(t);if(!r||!r.length)return null;var i=t.properties.renderType,u=t.geometry.type,c=e._getPathInScreenCoords(r,u);if(!c)return null;switch(i){case o.RENDER_TYPE.POINT:return e._renderPoint(t,n,c);case o.RENDER_TYPE.LINE_STRING:return e._renderPath(t,n,c);case o.RENDER_TYPE.POLYGON:case o.RENDER_TYPE.RECTANGLE:return e._renderPolygon(t,n,c);default:return null}})),_(g(e),"_renderCanvas",(function(){var t=e.getFeatures(),n=e._modeHandler&&e._modeHandler.getGuides(e.getModeProps());return r.default.createElement("svg",{key:"draw-canvas",width:"100%",height:"100%"},t&&t.length>0&&r.default.createElement("g",{key:"feature-group"},t.map(e._renderFeature)),n&&r.default.createElement("g",{key:"feature-guides"},e._renderGuides(n)))})),_(g(e),"_render",(function(){var t=e._context&&e._context.viewport||{},n=e.props.style,o=t.width,i=t.height;return r.default.createElement("div",{id:"editor",style:O({width:o,height:i},n),ref:function(t){e._containerRef=t}},e._renderCanvas())})),e}return n=l,(i=[{key:"_getPathInScreenCoords",value:function(e,t){var n=this;if(0===e.length)return"";var r=e.map((function(e){return n.project(e)})),i="";switch(t){case o.GEOJSON_TYPE.POINT:return r;case o.GEOJSON_TYPE.LINE_STRING:return i=r.map((function(e){return"".concat(e[0],",").concat(e[1])})).join("L"),"M ".concat(i);case o.GEOJSON_TYPE.POLYGON:return i=r.map((function(e){return"".concat(e[0],",").concat(e[1])})).join("L"),"M ".concat(i," z");default:return null}}}])&&y(n.prototype,i),u&&y(n,u),l}(i.default);t.default=w,_(w,"defaultProps",P)},EDhj:function(e,t,n){"use strict";n.r(t);var r=n("0wsv"),o=n("RwN2"),i=(n("E9XD"),n("Nwvx"));var a=function(e){if(!e)throw new Error("geojson is required");var t=[];return Object(i.flattenEach)(e,(function(e){!function(e,t){var n=[],i=e.geometry;if(null!==i){switch(i.type){case"Polygon":n=Object(o.getCoords)(i);break;case"LineString":n=[Object(o.getCoords)(i)]}n.forEach((function(n){(function(e,t){var n=[];return e.reduce((function(e,o){var i,a,u,c,l,s,f=Object(r.lineString)([e,o],t);return f.bbox=(a=o,u=(i=e)[0],c=i[1],l=a[0],s=a[1],[u<l?u:l,c<s?c:s,u>l?u:l,c>s?c:s]),n.push(f),o})),n})(n,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}(e,t)})),Object(r.featureCollection)(t)},u=n("aZEm"),c=n.n(u);function l(e,t){var n=Object(o.getCoords)(e),i=Object(o.getCoords)(t);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==i.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var a=n[0][0],u=n[0][1],c=n[1][0],l=n[1][1],s=i[0][0],f=i[0][1],p=i[1][0],d=i[1][1],y=(d-f)*(c-a)-(p-s)*(l-u),h=(p-s)*(u-f)-(d-f)*(a-s),g=(c-a)*(u-f)-(l-u)*(a-s);if(0===y)return null;var v=h/y,b=g/y;if(v>=0&&v<=1&&b>=0&&b<=1){var m=a+v*(c-a),E=u+v*(l-u);return Object(r.point)([m,E])}return null}t.default=function(e,t){var n={},u=[];if("LineString"===e.type&&(e=Object(r.feature)(e)),"LineString"===t.type&&(t=Object(r.feature)(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var s=l(e,t);return s&&u.push(s),Object(r.featureCollection)(u)}var f=c()();return f.load(a(t)),Object(i.featureEach)(a(e),(function(e){Object(i.featureEach)(f.search(e),(function(t){var r=l(e,t);if(r){var i=Object(o.getCoords)(r).join(",");n[i]||(n[i]=!0,u.push(r))}}))})),Object(r.featureCollection)(u)}},HYY4:function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(Array.isArray(e)){var n=e.length;if(!t||t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n={};return function(o){for(var i in o)if(!r(o[i],n[i])){t=e(o),n=o;break}return t}}},I2ZF:function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},IaNU:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawRectangleUsingThreePointsMode=void 0;var r=n("lVFs");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){o=!0,i=c}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e,t)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(){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(e){return!1}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(y,e);var t,n,o,a,d=(t=y,function(){var e,n=f(t);if(s()){var r=f(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return l(this,e)});function y(){return u(this,y),d.apply(this,arguments)}return n=y,(o=[{key:"getThreeClickPolygon",value:function(e,t,n,o){var a=i((0,r.generatePointsParallelToLinePoints)(e,t,n),2);return{type:"Feature",geometry:{type:"Polygon",coordinates:[[e,t,a[0],a[1],e]]}}}}])&&c(n.prototype,o),a&&c(n,a),y}(n("mOTV").ThreeClickPolygonMode);t.DrawRectangleUsingThreePointsMode=d},IulE:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawRectangleMode=void 0;var r,o=(r=n("iuXc"))&&r.__esModule?r:{default:r};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(){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(e){return!1}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(d,e);var t,n,r,i,p=(t=d,function(){var e,n=s(t);if(l()){var r=s(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)});function d(){return a(this,d),p.apply(this,arguments)}return n=d,(r=[{key:"getTwoClickPolygon",value:function(e,t,n){return(0,o.default)([e[0],e[1],t[0],t[1]])}}])&&u(n.prototype,r),i&&u(n,i),d}(n("MMIt").TwoClickPolygonMode);t.DrawRectangleMode=p},"J/Si":function(e,t,n){"use strict";n.r(t);var r=n("7mrb"),o=n("kMLz"),i=n("Nwvx"),a=function(){return new u};function u(){this.reset()}u.prototype={constructor:u,reset:function(){this.s=this.t=0},add:function(e){l(c,e,this.t),l(this,c.s,this.s),this.s?this.t+=c.t:this.s=c.t},valueOf:function(){return this.s}};var c=new u;function l(e,t,n){var r=e.s=t+n,o=r-t,i=r-o;e.t=t-i+(n-o)}var s=1e-6,f=Math.PI,p=f/2,d=f/4,y=2*f,h=180/f,g=f/180,v=Math.abs,b=Math.atan,m=Math.atan2,E=Math.cos,O=(Math.ceil,Math.exp),_=(Math.floor,Math.log),P=(Math.pow,Math.sin),w=(Math.sign,Math.sqrt),S=Math.tan;function j(e){return e>1?0:e<-1?f:Math.acos(e)}function x(e){return e>1?p:e<-1?-p:Math.asin(e)}function T(){}function M(e,t){e&&k.hasOwnProperty(e.type)&&k[e.type](e,t)}var R={Feature:function(e,t){M(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,o=n.length;++r<o;)M(n[r].geometry,t)}},k={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,o=n.length;++r<o;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){C(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,o=n.length;++r<o;)C(n[r],t,0)},Polygon:function(e,t){D(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,o=n.length;++r<o;)D(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,o=n.length;++r<o;)M(n[r],t)}};function C(e,t,n){var r,o=-1,i=e.length-n;for(t.lineStart();++o<i;)r=e[o],t.point(r[0],r[1],r[2]);t.lineEnd()}function D(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)C(e[n],t,1);t.polygonEnd()}var I=function(e,t){e&&R.hasOwnProperty(e.type)?R[e.type](e,t):M(e,t)};a(),a();function A(e){return[m(e[1],e[0]),x(e[2])]}function N(e){var t=e[0],n=e[1],r=E(n);return[r*E(t),r*P(t),P(n)]}function F(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function L(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function G(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Y(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function H(e){var t=w(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}a();var U=function(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n};function B(e,t){return[e>f?e-y:e<-f?e+y:e,t]}function q(e,t,n){return(e%=y)?t||n?U(V(e),z(t,n)):V(e):t||n?z(t,n):B}function J(e){return function(t,n){return[(t+=e)>f?t-y:t<-f?t+y:t,n]}}function V(e){var t=J(e);return t.invert=J(-e),t}function z(e,t){var n=E(e),r=P(e),o=E(t),i=P(t);function a(e,t){var a=E(t),u=E(e)*a,c=P(e)*a,l=P(t),s=l*n+u*r;return[m(c*o-s*i,u*n-l*r),x(s*o+c*i)]}return a.invert=function(e,t){var a=E(t),u=E(e)*a,c=P(e)*a,l=P(t),s=l*o-c*i;return[m(c*o+l*i,u*n+s*r),x(s*n-u*r)]},a}B.invert=B;function X(e,t,n,r,o,i){if(n){var a=E(t),u=P(t),c=r*n;null==o?(o=t+r*y,i=t-c/2):(o=Z(a,o),i=Z(a,i),(r>0?o<i:o>i)&&(o+=r*y));for(var l,s=o;r>0?s>i:s<i;s-=c)l=A([a,-u*E(s),-u*P(s)]),e.point(l[0],l[1])}}function Z(e,t){(t=N(t))[0]-=e,H(t);var n=j(-t[1]);return((-t[2]<0?-n:n)+y-s)%y}var W=function(){var e,t=[];return{point:function(t,n){e.push([t,n])},lineStart:function(){t.push(e=[])},lineEnd:T,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}},K=function(e,t){return v(e[0]-t[0])<s&&v(e[1]-t[1])<s};function $(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var Q=function(e,t,n,r,o){var i,a,u=[],c=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,r=e[0],a=e[t];if(K(r,a)){for(o.lineStart(),i=0;i<t;++i)o.point((r=e[i])[0],r[1]);o.lineEnd()}else u.push(n=new $(r,e,null,!0)),c.push(n.o=new $(r,null,n,!1)),u.push(n=new $(a,e,null,!1)),c.push(n.o=new $(a,null,n,!0))}})),u.length){for(c.sort(t),ee(u),ee(c),i=0,a=c.length;i<a;++i)c[i].e=n=!n;for(var l,s,f=u[0];;){for(var p=f,d=!0;p.v;)if((p=p.n)===f)return;l=p.z,o.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(i=0,a=l.length;i<a;++i)o.point((s=l[i])[0],s[1]);else r(p.x,p.n.x,1,o);p=p.n}else{if(d)for(l=p.p.z,i=l.length-1;i>=0;--i)o.point((s=l[i])[0],s[1]);else r(p.x,p.p.x,-1,o);p=p.p}l=(p=p.o).z,d=!d}while(!p.v);o.lineEnd()}}};function ee(e){if(t=e.length){for(var t,n,r=0,o=e[0];++r<t;)o.n=n=e[r],n.p=o,o=n;o.n=n=e[0],n.p=o}}var te=n("vBe5");function ne(e,t,n,r){function o(o,i){return e<=o&&o<=n&&t<=i&&i<=r}function i(o,i,u,l){var s=0,f=0;if(null==o||(s=a(o,u))!==(f=a(i,u))||c(o,i)<0^u>0)do{l.point(0===s||3===s?e:n,s>1?r:t)}while((s=(s+u+4)%4)!==f);else l.point(i[0],i[1])}function a(r,o){return v(r[0]-e)<s?o>0?0:3:v(r[0]-n)<s?o>0?2:1:v(r[1]-t)<s?o>0?1:0:o>0?3:2}function u(e,t){return c(e.x,t.x)}function c(e,t){var n=a(e,1),r=a(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(a){var c,l,s,f,p,d,y,h,g,v,b,m=a,E=W(),O={point:_,lineStart:function(){O.point=P,l&&l.push(s=[]);v=!0,g=!1,y=h=NaN},lineEnd:function(){c&&(P(f,p),d&&g&&E.rejoin(),c.push(E.result()));O.point=_,g&&m.lineEnd()},polygonStart:function(){m=E,c=[],l=[],b=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,o=l.length;n<o;++n)for(var i,a,u=l[n],c=1,s=u.length,f=u[0],p=f[0],d=f[1];c<s;++c)i=p,a=d,f=u[c],p=f[0],d=f[1],a<=r?d>r&&(p-i)*(r-a)>(d-a)*(e-i)&&++t:d<=r&&(p-i)*(r-a)<(d-a)*(e-i)&&--t;return t}(),n=b&&t,o=(c=Object(te.d)(c)).length;(n||o)&&(a.polygonStart(),n&&(a.lineStart(),i(null,null,1,a),a.lineEnd()),o&&Q(c,u,t,i,a),a.polygonEnd());m=a,c=l=s=null}};function _(e,t){o(e,t)&&m.point(e,t)}function P(i,a){var u=o(i,a);if(l&&s.push([i,a]),v)f=i,p=a,d=u,v=!1,u&&(m.lineStart(),m.point(i,a));else if(u&&g)m.point(i,a);else{var c=[y=Math.max(-1e9,Math.min(1e9,y)),h=Math.max(-1e9,Math.min(1e9,h))],E=[i=Math.max(-1e9,Math.min(1e9,i)),a=Math.max(-1e9,Math.min(1e9,a))];!function(e,t,n,r,o,i){var a,u=e[0],c=e[1],l=0,s=1,f=t[0]-u,p=t[1]-c;if(a=n-u,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<s&&(s=a)}else if(f>0){if(a>s)return;a>l&&(l=a)}if(a=o-u,f||!(a<0)){if(a/=f,f<0){if(a>s)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<s&&(s=a)}if(a=r-c,p||!(a>0)){if(a/=p,p<0){if(a<l)return;a<s&&(s=a)}else if(p>0){if(a>s)return;a>l&&(l=a)}if(a=i-c,p||!(a<0)){if(a/=p,p<0){if(a>s)return;a>l&&(l=a)}else if(p>0){if(a<l)return;a<s&&(s=a)}return l>0&&(e[0]=u+l*f,e[1]=c+l*p),s<1&&(t[0]=u+s*f,t[1]=c+s*p),!0}}}}}(c,E,e,t,n,r)?u&&(m.lineStart(),m.point(i,a),b=!1):(g||(m.lineStart(),m.point(c[0],c[1])),m.point(E[0],E[1]),u||m.lineEnd(),b=!1)}y=i,h=a,g=u}return O}}var re=a(),oe=function(e,t){var n=t[0],r=t[1],o=[P(n),-E(n),0],i=0,a=0;re.reset();for(var u=0,c=e.length;u<c;++u)if(p=(l=e[u]).length)for(var l,p,h=l[p-1],g=h[0],v=h[1]/2+d,b=P(v),O=E(v),_=0;_<p;++_,g=S,b=T,O=M,h=w){var w=l[_],S=w[0],j=w[1]/2+d,T=P(j),M=E(j),R=S-g,k=R>=0?1:-1,C=k*R,D=C>f,I=b*T;if(re.add(m(I*k*P(C),O*M+I*E(C))),i+=D?R+k*y:R,D^g>=n^S>=n){var A=L(N(h),N(w));H(A);var F=L(o,A);H(F);var G=(D^R>=0?-1:1)*x(F[2]);(r>G||r===G&&(A[0]||A[1]))&&(a+=D^R>=0?1:-1)}}return(i<-s||i<s&&re<-s)^1&a};a();var ie=function(e){return e};a(),a();var ae=1/0,ue=ae,ce=-ae,le=ce;var se={point:function(e,t){e<ae&&(ae=e);e>ce&&(ce=e);t<ue&&(ue=t);t>le&&(le=t)},lineStart:T,lineEnd:T,polygonStart:T,polygonEnd:T,result:function(){var e=[[ae,ue],[ce,le]];return ce=le=-(ue=ae=1/0),e}};function fe(e){this._context=e}fe.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,y)}},result:T};a();function pe(){this._string=[]}function de(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}pe.prototype={_radius:4.5,_circle:de(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,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(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=de(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};var ye=function(e,t,n,r){return function(o,i){var a,u,c,l=t(i),s=o.invert(r[0],r[1]),f=W(),p=t(f),d=!1,y={point:h,lineStart:v,lineEnd:b,polygonStart:function(){y.point=m,y.lineStart=E,y.lineEnd=O,u=[],a=[]},polygonEnd:function(){y.point=h,y.lineStart=v,y.lineEnd=b,u=Object(te.d)(u);var e=oe(a,s);u.length?(d||(i.polygonStart(),d=!0),Q(u,ge,e,n,i)):e&&(d||(i.polygonStart(),d=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),d&&(i.polygonEnd(),d=!1),u=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(t,n){var r=o(t,n);e(t=r[0],n=r[1])&&i.point(t,n)}function g(e,t){var n=o(e,t);l.point(n[0],n[1])}function v(){y.point=g,l.lineStart()}function b(){y.point=h,l.lineEnd()}function m(e,t){c.push([e,t]);var n=o(e,t);p.point(n[0],n[1])}function E(){p.lineStart(),c=[]}function O(){m(c[0][0],c[0][1]),p.lineEnd();var e,t,n,r,o=p.clean(),l=f.result(),s=l.length;if(c.pop(),a.push(c),c=null,s)if(1&o){if((t=(n=l[0]).length-1)>0){for(d||(i.polygonStart(),d=!0),i.lineStart(),e=0;e<t;++e)i.point((r=n[e])[0],r[1]);i.lineEnd()}}else s>1&&2&o&&l.push(l.pop().concat(l.shift())),u.push(l.filter(he))}return y}};function he(e){return e.length>1}function ge(e,t){return((e=e.x)[0]<0?e[1]-p-s:p-e[1])-((t=t.x)[0]<0?t[1]-p-s:p-t[1])}var ve=ye((function(){return!0}),(function(e){var t,n=NaN,r=NaN,o=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(i,a){var u=i>0?f:-f,c=v(i-n);v(c-f)<s?(e.point(n,r=(r+a)/2>0?p:-p),e.point(o,r),e.lineEnd(),e.lineStart(),e.point(u,r),e.point(i,r),t=0):o!==u&&c>=f&&(v(n-o)<s&&(n-=o*s),v(i-u)<s&&(i-=u*s),r=function(e,t,n,r){var o,i,a=P(e-n);return v(a)>s?b((P(t)*(i=E(r))*P(n)-P(r)*(o=E(t))*P(e))/(o*i*a)):(t+r)/2}(n,r,i,a),e.point(o,r),e.lineEnd(),e.lineStart(),e.point(u,r),t=0),e.point(n=i,r=a),o=u},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var o;if(null==e)o=n*p,r.point(-f,o),r.point(0,o),r.point(f,o),r.point(f,0),r.point(f,-o),r.point(0,-o),r.point(-f,-o),r.point(-f,0),r.point(-f,o);else if(v(e[0]-t[0])>s){var i=e[0]<t[0]?f:-f;o=n*i/2,r.point(-i,o),r.point(0,o),r.point(i,o)}else r.point(t[0],t[1])}),[-f,-p]);var be=function(e,t){var n=E(e),r=n>0,o=v(n)>s;function i(e,t){return E(e)*E(t)>n}function a(e,t,r){var o=[1,0,0],i=L(N(e),N(t)),a=F(i,i),u=i[0],c=a-u*u;if(!c)return!r&&e;var l=n*a/c,p=-n*u/c,d=L(o,i),y=Y(o,l);G(y,Y(i,p));var h=d,g=F(y,h),b=F(h,h),m=g*g-b*(F(y,y)-1);if(!(m<0)){var E=w(m),O=Y(h,(-g-E)/b);if(G(O,y),O=A(O),!r)return O;var _,P=e[0],S=t[0],j=e[1],x=t[1];S<P&&(_=P,P=S,S=_);var T=S-P,M=v(T-f)<s;if(!M&&x<j&&(_=j,j=x,x=_),M||T<s?M?j+x>0^O[1]<(v(O[0]-P)<s?j:x):j<=O[1]&&O[1]<=x:T>f^(P<=O[0]&&O[0]<=S)){var R=Y(h,(-g+E)/b);return G(R,y),[O,A(R)]}}}function u(t,n){var o=r?e:f-e,i=0;return t<-o?i|=1:t>o&&(i|=2),n<-o?i|=4:n>o&&(i|=8),i}return ye(i,(function(e){var t,n,c,l,p;return{lineStart:function(){l=c=!1,p=1},point:function(d,y){var h,g=[d,y],v=i(d,y),b=r?v?0:u(d,y):v?u(d+(d<0?f:-f),y):0;if(!t&&(l=c=v)&&e.lineStart(),v!==c&&(!(h=a(t,g))||K(t,h)||K(g,h))&&(g[0]+=s,g[1]+=s,v=i(g[0],g[1])),v!==c)p=0,v?(e.lineStart(),h=a(g,t),e.point(h[0],h[1])):(h=a(t,g),e.point(h[0],h[1]),e.lineEnd()),t=h;else if(o&&t&&r^v){var m;b&n||!(m=a(g,t,!0))||(p=0,r?(e.lineStart(),e.point(m[0][0],m[0][1]),e.point(m[1][0],m[1][1]),e.lineEnd()):(e.point(m[1][0],m[1][1]),e.lineEnd(),e.lineStart(),e.point(m[0][0],m[0][1])))}!v||t&&K(t,g)||e.point(g[0],g[1]),t=g,c=v,n=b},lineEnd:function(){c&&e.lineEnd(),t=null},clean:function(){return p|(l&&c)<<1}}}),(function(n,r,o,i){X(i,e,t,o,n,r)}),r?[0,-e]:[-f,e-f])};function me(e){return function(t){var n=new Ee;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Ee(){}function Oe(e,t,n){var r=t[1][0]-t[0][0],o=t[1][1]-t[0][1],i=e.clipExtent&&e.clipExtent();e.scale(150).translate([0,0]),null!=i&&e.clipExtent(null),I(n,e.stream(se));var a=se.result(),u=Math.min(r/(a[1][0]-a[0][0]),o/(a[1][1]-a[0][1])),c=+t[0][0]+(r-u*(a[1][0]+a[0][0]))/2,l=+t[0][1]+(o-u*(a[1][1]+a[0][1]))/2;return null!=i&&e.clipExtent(i),e.scale(150*u).translate([c,l])}function _e(e,t,n){return Oe(e,[[0,0],t],n)}Ee.prototype={constructor:Ee,point:function(e,t){this.stream.point(e,t)},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 Pe=E(30*g),we=function(e,t){return+t?function(e,t){function n(r,o,i,a,u,c,l,f,p,d,y,h,g,b){var E=l-r,O=f-o,_=E*E+O*O;if(_>4*t&&g--){var P=a+d,S=u+y,j=c+h,T=w(P*P+S*S+j*j),M=x(j/=T),R=v(v(j)-1)<s||v(i-p)<s?(i+p)/2:m(S,P),k=e(R,M),C=k[0],D=k[1],I=C-r,A=D-o,N=O*I-E*A;(N*N/_>t||v((E*I+O*A)/_-.5)>.3||a*d+u*y+c*h<Pe)&&(n(r,o,i,a,u,c,C,D,R,P/=T,S/=T,j,g,b),b.point(C,D),n(C,D,R,P,S,j,l,f,p,d,y,h,g,b))}}return function(t){var r,o,i,a,u,c,l,s,f,p,d,y,h={point:g,lineStart:v,lineEnd:m,polygonStart:function(){t.polygonStart(),h.lineStart=E},polygonEnd:function(){t.polygonEnd(),h.lineStart=v}};function g(n,r){n=e(n,r),t.point(n[0],n[1])}function v(){s=NaN,h.point=b,t.lineStart()}function b(r,o){var i=N([r,o]),a=e(r,o);n(s,f,l,p,d,y,s=a[0],f=a[1],l=r,p=i[0],d=i[1],y=i[2],16,t),t.point(s,f)}function m(){h.point=g,t.lineEnd()}function E(){v(),h.point=O,h.lineEnd=_}function O(e,t){b(r=e,t),o=s,i=f,a=p,u=d,c=y,h.point=b}function _(){n(s,f,l,p,d,y,o,i,r,a,u,c,16,t),h.lineEnd=m,m()}return h}}(e,t):function(e){return me({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)};var Se=me({point:function(e,t){this.stream.point(e*g,t*g)}});function je(e){return xe((function(){return e}))()}function xe(e){var t,n,r,o,i,a,u,c,l,s,f=150,p=480,d=250,y=0,v=0,b=0,m=0,E=0,O=null,_=ve,P=null,S=ie,j=.5,x=we(R,j);function T(e){return[(e=i(e[0]*g,e[1]*g))[0]*f+n,r-e[1]*f]}function M(e){return(e=i.invert((e[0]-n)/f,(r-e[1])/f))&&[e[0]*h,e[1]*h]}function R(e,o){return[(e=t(e,o))[0]*f+n,r-e[1]*f]}function k(){i=U(o=q(b,m,E),t);var e=t(y,v);return n=p-e[0]*f,r=d+e[1]*f,C()}function C(){return l=s=null,T}return T.stream=function(e){return l&&s===e?l:l=Se(_(o,x(S(s=e))))},T.clipAngle=function(e){return arguments.length?(_=+e?be(O=e*g,6*g):(O=null,ve),C()):O*h},T.clipExtent=function(e){return arguments.length?(S=null==e?(P=a=u=c=null,ie):ne(P=+e[0][0],a=+e[0][1],u=+e[1][0],c=+e[1][1]),C()):null==P?null:[[P,a],[u,c]]},T.scale=function(e){return arguments.length?(f=+e,k()):f},T.translate=function(e){return arguments.length?(p=+e[0],d=+e[1],k()):[p,d]},T.center=function(e){return arguments.length?(y=e[0]%360*g,v=e[1]%360*g,k()):[y*h,v*h]},T.rotate=function(e){return arguments.length?(b=e[0]%360*g,m=e[1]%360*g,E=e.length>2?e[2]%360*g:0,k()):[b*h,m*h,E*h]},T.precision=function(e){return arguments.length?(x=we(R,j=e*e),C()):w(j)},T.fitExtent=function(e,t){return Oe(T,e,t)},T.fitSize=function(e,t){return _e(T,e,t)},function(){return t=e.apply(this,arguments),T.invert=t.invert&&M,k()}}function Te(e){return function(t,n){var r=E(t),o=E(n),i=e(r*o);return[i*o*P(t),i*P(n)]}}function Me(e){return function(t,n){var r=w(t*t+n*n),o=e(r),i=P(o),a=E(o);return[m(t*i,r*a),x(r&&n*i/r)]}}var Re=Te((function(e){return w(2/(1+e))}));Re.invert=Me((function(e){return 2*x(e/2)}));var ke=Te((function(e){return(e=j(e))&&e/P(e)}));ke.invert=Me((function(e){return e}));function Ce(e,t){return[e,_(S((p+t)/2))]}Ce.invert=function(e,t){return[e,2*b(O(t))-p]};function De(e,t){return[e,t]}De.invert=De;function Ie(e,t){var n=E(t),r=E(e)*n;return[n*P(e)/r,P(t)/r]}Ie.invert=Me(b);function Ae(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),t*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Ae.invert=function(e,t){var n,r=t,o=25;do{var i=r*r,a=i*i;r-=n=(r*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-t)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a)))}while(v(n)>s&&--o>0);return[e/(.8707+(i=r*r)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),r]};function Ne(e,t){return[E(t)*P(e),P(t)]}Ne.invert=Me(x);function Fe(e,t){var n=E(t),r=1+E(e)*n;return[n*P(e)/r,P(t)/r]}Fe.invert=Me((function(e){return 2*b(e)}));function Le(e,t){return[_(S((p+t)/2)),-e]}Le.invert=function(e,t){return[-t,2*b(O(e))-p]};var Ge=n("0wsv");function Ye(e,t,n,a){var u=e.properties||{},c="Feature"===e.type?e.geometry:e;if("GeometryCollection"===c.type){var l=[];return Object(i.geomEach)(e,(function(e){var r=Ye(e,t,n,a);r&&l.push(r)})),Object(Ge.featureCollection)(l)}var s=function(e){var t=Object(r.default)(e).geometry.coordinates,n=[-t[0],-t[1]];return je(ke).scale(79.4188).clipAngle(179.999).rotate(n).scale(Ge.earthRadius)}(c),f={type:c.type,coordinates:He(c.coordinates,s)},p=(new o.GeoJSONReader).read(f),d=Object(Ge.radiansToLength)(Object(Ge.lengthToRadians)(t,n),"meters"),y=o.BufferOp.bufferOp(p,d,a);if(!function e(t){return Array.isArray(t[0])?e(t[0]):isNaN(t[0])}((y=(new o.GeoJSONWriter).write(y)).coordinates)){var h={type:y.type,coordinates:Ue(y.coordinates,s)};return Object(Ge.feature)(h,u)}}function He(e,t){return"object"!=typeof e[0]?t(e):e.map((function(e){return He(e,t)}))}function Ue(e,t){return"object"!=typeof e[0]?t.invert(e):e.map((function(e){return Ue(e,t)}))}t.default=function(e,t,n){var r=(n=n||{}).units||"kilometers",o=n.steps||8;if(!e)throw new Error("geojson is required");if("object"!=typeof n)throw new Error("options must be an object");if("number"!=typeof o)throw new Error("steps must be an number");if(void 0===t)throw new Error("radius is required");if(o<=0)throw new Error("steps must be greater than 0");var a=[];switch(e.type){case"GeometryCollection":return Object(i.geomEach)(e,(function(e){var n=Ye(e,t,r,o);n&&a.push(n)})),Object(Ge.featureCollection)(a);case"FeatureCollection":return Object(i.featureEach)(e,(function(e){var n=Ye(e,t,r,o);n&&Object(i.featureEach)(n,(function(e){e&&a.push(e)}))})),Object(Ge.featureCollection)(a)}return Ye(e,t,r,o)}},JRQ3:function(e,t,n){"use strict";n.r(t);var r=n("Nwvx"),o=n("0wsv");t.default=function(e,t){void 0===t&&(t={});var n=0,i=0,a=0;return Object(r.coordEach)(e,(function(e){n+=e[0],i+=e[1],a++}),!0),Object(o.point)([n/a,i/a],t.properties)}},JeLm:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawPolygonMode=void 0;var r=n("lVFs");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(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 a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(){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(e){return!1}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(y,e);var t,n,o,a,d=(t=y,function(){var e,n=f(t);if(s()){var r=f(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return l(this,e)});function y(){return u(this,y),d.apply(this,arguments)}return n=y,(o=[{key:"getGuides",value:function(e){var t,n,r=e.lastPointerMoveEvent,o=this.getClickSequence(),a=r?[r.mapCoords]:[],u={type:"FeatureCollection",features:[]};1===o.length||2===o.length?n={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(i(o),a)}}:o.length>2&&(n={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(i(o),a,[o[0]])]}}),n&&u.features.push(n);var c=o.map((function(e,t){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[t]},geometry:{type:"Point",coordinates:e}}}));return(t=u.features).push.apply(t,i(c)),u}},{key:"handleClick",value:function(e,t){var n=e.picks,o=(0,r.getPickedEditHandle)(n),a=!1;o||(this.addClickSequence(e),a=!0);var u=this.getClickSequence();if(u.length>2&&o&&Array.isArray(o.properties.positionIndexes)&&(0===o.properties.positionIndexes[0]||o.properties.positionIndexes[0]===u.length-1)){var c={type:"Polygon",coordinates:[[].concat(i(u),[u[0]])]};this.resetClickSequence();var l=this.getAddFeatureOrBooleanPolygonAction(c,t);l&&t.onEdit(l)}else a&&t.onEdit({updatedData:t.data,editType:"addTentativePosition",editContext:{position:e.mapCoords}})}},{key:"handlePointerMove",value:function(e,t){e.mapCoords,t.onUpdateCursor("cell")}}])&&c(n.prototype,o),a&&c(n,a),y}(n("4R+2").GeoJsonEditMode);t.DrawPolygonMode=d},KER3:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n("1Y5v"),o=n("wHih");function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_tentativeFeature",void 0),a(this,"_editHandles",void 0),a(this,"getTentativeFeature",(function(){return t._tentativeFeature})),a(this,"getEditHandles",(function(){return t._editHandles})),a(this,"setTentativeFeature",(function(e){t._tentativeFeature=e})),a(this,"getSelectedFeature",(function(e,t){var n=e.data,r=e.selectedIndexes,i=n.getObject(),a=i&&i.features,u=(0,o.isNumeric)(t)?Number(t):r&&r[0];return a&&a[u]})),this._tentativeFeature=null,this._editHandles=null}var t,n,u;return t=e,(n=[{key:"handlePan",value:function(e,t){}},{key:"handleClick",value:function(e,t){}},{key:"handleDblClick",value:function(e,t){}},{key:"handlePointerMove",value:function(e,t){}},{key:"handleStartDragging",value:function(e,t){}},{key:"handleStopDragging",value:function(e,t){}},{key:"getGuides",value:function(e){return null}},{key:"getTooltips",value:function(e){return[]}},{key:"handleDragging",value:function(e,t){}},{key:"getEditHandlesFromFeature",value:function(e,t){var n=(0,o.getFeatureCoordinates)(e);return n?n.map((function(n,o){return{type:"Feature",properties:{renderType:e.properties.renderType,guideType:r.GUIDE_TYPE.EDIT_HANDLE,featureIndex:t,positionIndexes:[o]},geometry:{type:r.GEOJSON_TYPE.POINT,coordinates:[n]}}})):null}}])&&i(t.prototype,n),u&&i(t,u),e}();t.default=u},KV4q:function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.ImmutableFeatureCollection=void 0;var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"featureCollection",void 0),this.featureCollection=t}var t,n,o;return t=e,(n=[{key:"getObject",value:function(){return this.featureCollection}},{key:"replacePosition",value:function(e,t,n){var r=this.featureCollection.features[e].geometry,o="Polygon"===r.type||"MultiPolygon"===r.type,i=a({},r,{coordinates:f(r.coordinates,t,n,o)});return this.replaceGeometry(e,i)}},{key:"removePosition",value:function(e,t){var n=this.featureCollection.features[e].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(t)&&0===t[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(t)&&0===t[0]&&0===t[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,o=a({},n,{coordinates:p(n.coordinates,t,r)});return function(e){switch(e.type){case"Polygon":!function(e){for(var t=e.coordinates,n=1;n<t.length;n++)y(t,n)&&n--}(e);break;case"MultiLineString":!function(e){for(var t=0;t<e.coordinates.length;t++)1===e.coordinates[t].length&&(e.coordinates.splice(t,1),t--)}(e);break;case"MultiPolygon":!function(e){for(var t=0;t<e.coordinates.length;t++){var n=e.coordinates[t];n[0].length<=3&&(e.coordinates.splice(t,1),t--);for(var r=1;r<n.length;r++)y(n,r)&&r--}}(e)}}(o),this.replaceGeometry(e,o)}},{key:"addPosition",value:function(e,t,n){var r=this.featureCollection.features[e].geometry;if("Point"===r.type)throw new Error("Unable to add a position to a Point feature");var o="Polygon"===r.type||"MultiPolygon"===r.type,i=a({},r,{coordinates:d(r.coordinates,t,n,o)});return this.replaceGeometry(e,i)}},{key:"replaceGeometry",value:function(t,n){var o=a({},this.featureCollection.features[t],{geometry:n});return new e(a({},this.featureCollection,{features:[].concat(r(this.featureCollection.features.slice(0,t)),[o],r(this.featureCollection.features.slice(t+1)))}))}},{key:"addFeature",value:function(e){return this.addFeatures([e])}},{key:"addFeatures",value:function(t){return new e(a({},this.featureCollection,{features:[].concat(r(this.featureCollection.features),r(t))}))}},{key:"deleteFeature",value:function(e){return this.deleteFeatures([e])}},{key:"deleteFeatures",value:function(t){var n=r(this.featureCollection.features);t.sort();for(var o=t.length-1;o>=0;o--){var i=t[o];i>=0&&i<n.length&&n.splice(i,1)}return new e(a({},this.featureCollection,{features:n}))}}])&&u(t.prototype,n),o&&u(t,o),e}();function s(e,t){if(2===e.length&&3===t.length){var n=t[2];return[e[0],e[1],n]}return e}function f(e,t,n,o){if(!t)return e;if(0===t.length)return s(n,e);if(1===t.length){var i=[].concat(r(e.slice(0,t[0])),[s(n,e[t[0]])],r(e.slice(t[0]+1)));return!o||0!==t[0]&&t[0]!==e.length-1||(i[0]=s(n,e[0]),i[e.length-1]=s(n,e[0])),i}return[].concat(r(e.slice(0,t[0])),[f(e[t[0]],t.slice(1,t.length),n,o)],r(e.slice(t[0]+1)))}function p(e,t,n){if(!t)return e;if(0===t.length)throw Error("Must specify the index of the position to remove");if(1===t.length){var o=[].concat(r(e.slice(0,t[0])),r(e.slice(t[0]+1)));return!n||0!==t[0]&&t[0]!==e.length-1||(0===t[0]?o[o.length-1]=o[0]:t[0]===e.length-1&&(o[0]=o[o.length-1])),o}return[].concat(r(e.slice(0,t[0])),[p(e[t[0]],t.slice(1,t.length),n)],r(e.slice(t[0]+1)))}function d(e,t,n,o){if(!t)return e;if(0===t.length)throw Error("Must specify the index of the position to remove");return 1===t.length?[].concat(r(e.slice(0,t[0])),[n],r(e.slice(t[0]))):[].concat(r(e.slice(0,t[0])),[d(e[t[0]],t.slice(1,t.length),n,o)],r(e.slice(t[0]+1)))}function y(e,t){return e[t].length<=3&&(e.splice(t,1),!0)}t.ImmutableFeatureCollection=l},KWkK:function(e,t,n){"use strict";function r(e){var t={type:"Feature"};return Object.keys(e).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:t[n]=e[n]}})),t.properties=function e(t){var n={};if(!t)return n;return Object.keys(t).forEach((function(r){var o=t[r];"object"==typeof o?null===o?n[r]=null:Array.isArray(o)?n[r]=o.map((function(e){return e})):n[r]=e(o):n[r]=o})),n}(e.properties),t.geometry=o(e.geometry),t}function o(e){var t={type:e.type};return e.bbox&&(t.bbox=e.bbox),"GeometryCollection"===e.type?(t.geometries=e.geometries.map((function(e){return o(e)})),t):(t.coordinates=function e(t){var n=t;if("object"!=typeof n[0])return n.slice();return n.map((function(t){return e(t)}))}(e.coordinates),t)}t.a=function(e){if(!e)throw new Error("geojson is required");switch(e.type){case"Feature":return r(e);case"FeatureCollection":return function(e){var t={type:"FeatureCollection"};return Object.keys(e).forEach((function(n){switch(n){case"type":case"features":return;default:t[n]=e[n]}})),t.features=e.features.map((function(e){return r(e)})),t}(e);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return o(e);default:throw new Error("unknown GeoJSON type")}}},KxKs:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.featureStyle=function(e){var t=e.feature,n=e.state,o=t.properties.renderType,a=null;switch(n){case r.RENDER_STATE.SELECTED:a=i({},c);break;case r.RENDER_STATE.HOVERED:a=i({},l);break;case r.RENDER_STATE.UNCOMMITTED:case r.RENDER_STATE.CLOSING:a=i({},s);break;case r.RENDER_STATE.INACTIVE:a=i({},f);break;default:a=i({},p)}switch(o){case r.RENDER_TYPE.POINT:a.r=8;break;case r.RENDER_TYPE.LINE_STRING:a.fill="none";break;case r.RENDER_TYPE.POLYGON:n===r.RENDER_STATE.CLOSING&&(a.strokeDasharray="4,2");break;case r.RENDER_TYPE.RECTANGLE:n===r.RENDER_STATE.UNCOMMITTED&&(a.strokeDasharray="4,2")}return a},t.editHandleStyle=function(e){e.feature;var t=e.shape,n=(e.index,e.state),o={};switch(n){case r.RENDER_STATE.SELECTED:o=i({},c);break;case r.RENDER_STATE.HOVERED:o=i({},l);break;case r.RENDER_STATE.UNCOMMITTED:case r.RENDER_STATE.CLOSING:o=i({},s);break;case r.RENDER_STATE.INACTIVE:o=i({},f);break;default:o=i({},p)}switch(t){case"circle":o.r=8;break;case"rect":o=i({},o,{},u)}return o};var r=n("1Y5v");function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u={stroke:"#7ac943",strokeWidth:2,x:-6,y:-6,height:12,width:12},c={stroke:"#7ac943",strokeWidth:2,fill:"#ffff00",fillOpacity:.7},l={stroke:"#7ac943",strokeWidth:2,fill:"#7ac943",fillOpacity:.5},s={stroke:"#a7a7a7",strokeWidth:2,fill:"#a9a9a9",fillOpacity:.3},f=s,p={stroke:"#000000",strokeWidth:2,fill:"#a9a9a9",fillOpacity:.1}},LAut:function(e,t,n){"use strict";n.r(t);var r=n("KWkK"),o=n("7mrb"),i=n("JRQ3"),a=n("VWg+"),u=n("gF8d"),c=n("OK3t"),l=n("vWOf"),s=n("Nwvx"),f=n("0wsv"),p=n("RwN2");function d(e,t,n){var r="Point"===Object(p.getType)(e);return n=function(e,t){null==t&&(t="centroid");if(Array.isArray(t)||"object"==typeof t)return Object(p.getCoord)(t);var n=e.bbox?e.bbox:Object(a.default)(e),r=n[0],u=n[1],c=n[2],l=n[3];switch(t){case"sw":case"southwest":case"westsouth":case"bottomleft":return Object(f.point)([r,u]);case"se":case"southeast":case"eastsouth":case"bottomright":return Object(f.point)([c,u]);case"nw":case"northwest":case"westnorth":case"topleft":return Object(f.point)([r,l]);case"ne":case"northeast":case"eastnorth":case"topright":return Object(f.point)([c,l]);case"center":return Object(o.default)(e);case void 0:case null:case"centroid":return Object(i.default)(e);default:throw new Error("invalid origin")}}(e,n),1===t||r||Object(s.coordEach)(e,(function(e){var r=Object(c.a)(n,e),o=Object(u.a)(n,e),i=r*t,a=Object(p.getCoords)(Object(l.a)(n,i,o));e[0]=a[0],e[1]=a[1],3===e.length&&(e[2]*=t)})),e}t.default=function(e,t,n){if(n=n||{},!Object(f.isObject)(n))throw new Error("options is invalid");var o=n.origin,i=n.mutate;if(!e)throw new Error("geojson required");if("number"!=typeof t||0===t)throw new Error("invalid factor");var a=Array.isArray(o)||"object"==typeof o;return!0!==i&&(e=Object(r.a)(e)),"FeatureCollection"!==e.type||a?d(e,t,o):(Object(s.featureEach)(e,(function(n,r){e.features[r]=d(n,t,o)})),e)}},LNFK:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n("xDdU")),o=n("1Y5v");function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?l(e):t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(){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(e){return!1}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(i,e);var t,n=(t=i,function(){var e,n=f(t);if(s()){var r=f(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)});function i(){var e;u(this,i);for(var t=arguments.length,a=new Array(t),c=0;c<t;c++)a[c]=arguments[c];return d(l(e=n.call.apply(n,[this].concat(a))),"handleClick",(function(e,t){var n={type:"Feature",properties:{id:(0,r.default)(),renderType:o.RENDER_TYPE.POINT},geometry:{type:o.GEOJSON_TYPE.POINT,coordinates:[e.mapCoords]}},i=t.data.addFeature(n).getObject();t.onEdit({editType:o.EDIT_TYPE.ADD_FEATURE,updatedData:i,editContext:null})})),e}return i}(i(n("KER3")).default);t.default=y},MMIt:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(){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(e){return!1}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.TwoClickPolygonMode=void 0;var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(p,e);var t,n,r,s,f=(t=p,function(){var e,n=c(t);if(u()){var r=c(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return a(this,e)});function p(){return o(this,p),f.apply(this,arguments)}return n=p,(r=[{key:"handleClick",value:function(e,t){t.modeConfig&&t.modeConfig.dragToDraw||(this.addClickSequence(e),this.checkAndFinishPolygon(t))}},{key:"handleStartDragging",value:function(e,t){t.modeConfig&&t.modeConfig.dragToDraw&&(this.addClickSequence(e),e.cancelPan())}},{key:"handleStopDragging",value:function(e,t){t.modeConfig&&t.modeConfig.dragToDraw&&(this.addClickSequence(e),this.checkAndFinishPolygon(t))}},{key:"checkAndFinishPolygon",value:function(e){var t=this.getClickSequence(),n=this.getTentativeGuide(e);if(t.length>1&&n&&"Polygon"===n.geometry.type){var r=this.getAddFeatureOrBooleanPolygonAction(n.geometry,e);this.resetClickSequence(),r&&e.onEdit(r)}}},{key:"getGuides",value:function(e){var t=e.lastPointerMoveEvent,n=e.modeConfig,r=this.getClickSequence(),o={type:"FeatureCollection",features:[]};if(0===r.length)return o;var i=r[0],a=t.mapCoords,u=this.getTwoClickPolygon(i,a,n);return u&&o.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:u.geometry}),o}},{key:"getTwoClickPolygon",value:function(e,t,n){return null}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell")}}])&&i(n.prototype,r),s&&i(n,s),p}(n("4R+2").GeoJsonEditMode);t.TwoClickPolygonMode=s},MYR2:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=n("1Y5v"),i=(r=n("zx9D"))&&r.__esModule?r:{default:r},a=n("wHih");function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?d(e):t}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){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(e){return!1}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t,n){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(l,e);var t,n,r,i,u=(t=l,function(){var e,n=v(t);if(y()){var r=v(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return p(this,e)});function l(){var e;s(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return b(d(e=u.call.apply(u,[this].concat(n))),"handleClick",(function(t,n){g(v(l.prototype),"handleClick",d(e)).call(d(e),t,n);var r=t.picks&&t.picks[0]&&t.picks[0].object,i=n.selectedIndexes&&n.selectedIndexes[0];if(r&&r.featureIndex===i){var u=r.featureIndex,c=r.index,s=e.getSelectedFeature(n,u);if(s&&(s.geometry.type===o.RENDER_TYPE.POLYGON||s.geometry.type===o.RENDER_TYPE.LINE_STRING)&&r.type===o.ELEMENT_TYPE.SEGMENT){var f=(0,a.getFeatureCoordinates)(s);if(!f)return;var p=(c+1)%f.length,y=s.geometry.type===o.RENDER_TYPE.POLYGON?[0,p]:[p],h=e._getPointOnSegment(s,r,t.mapCoords),b=n.data.addPosition(u,y,h).getObject();n.onEdit({editType:o.EDIT_TYPE.ADD_POSITION,updatedData:b,editContext:[{featureIndex:u,editHandleIndex:p,screenCoords:n.viewport&&n.viewport.project(h),mapCoords:h}]})}}})),b(d(e),"_handleDragging",(function(t,n){var r=n.onEdit,i=e.getSelectedFeature(n),u=t.isDragging,c=t.pointerDownPicks,l=t.screenCoords,s=n.lastPointerMoveEvent,f=c&&c[0]&&c[0].object;if(f&&(0,a.isNumeric)(f.featureIndex)){var p=f.index,d=u?o.EDIT_TYPE.MOVE_POSITION:o.EDIT_TYPE.FINISH_MOVE_POSITION;switch(f.type){case o.ELEMENT_TYPE.FEATURE:case o.ELEMENT_TYPE.FILL:case o.ELEMENT_TYPE.SEGMENT:if(!n.featuresDraggable)break;var y=l[0]-s.screenCoords[0],h=l[1]-s.screenCoords[1];r({editType:d,updatedData:e._updateFeature(n,"feature",{dx:y,dy:h}),editContext:null});break;case o.ELEMENT_TYPE.EDIT_HANDLE:var g=i.properties.renderType===o.RENDER_TYPE.RECTANGLE?"rectangle":"editHandle";r({editType:d,updatedData:e._updateFeature(n,g,{editHandleIndex:p,mapCoords:t.mapCoords}),editContext:null})}}})),b(d(e),"handlePointerMove",(function(t,n){e.getSelectedFeature(n)&&t.isDragging&&e._handleDragging(t,n)})),b(d(e),"_updateFeature",(function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.data,u=t.selectedIndexes,l=t.viewport,s=u&&u[0],f=e.getSelectedFeature(t,s),p=null,d=(0,a.getFeatureCoordinates)(f);if(!d)return null;var y=c(d);switch(n){case"editHandle":var h=f.geometry.type===o.GEOJSON_TYPE.POLYGON?[0,r.editHandleIndex]:[r.editHandleIndex];return i.replacePosition(s,h,r.mapCoords).getObject();case"feature":var g=r.dx,v=r.dy;return y=y.map((function(e){var t=l&&l.project(e);return t?(t[0]+=g,t[1]+=v,l&&l.unproject(t)):null})).filter(Boolean),p={type:f.geometry.type,coordinates:f.geometry.type===o.GEOJSON_TYPE.POLYGON?[y]:y},i.replaceGeometry(s,p).getObject();case"rectangle":return y=(0,a.updateRectanglePosition)(f,r.editHandleIndex,r.mapCoords),p={type:o.GEOJSON_TYPE.POLYGON,coordinates:y},i.replaceGeometry(s,p).getObject();default:return i&&i.getObject()}})),b(d(e),"_getCursorEditHandle",(function(t,n){var r=t.isDragging,i=t.picks,u=i&&i[0]&&i[0].object;if(!u||!(0,a.isNumeric)(u.featureIndex)||u.type!==o.ELEMENT_TYPE.SEGMENT)return null;if(r||n.properties.renderType!==o.GEOJSON_TYPE.POLYGON&&n.properties.renderType!==o.GEOJSON_TYPE.LINE_STRING)return null;var c=e._getPointOnSegment(n,u,t.mapCoords);return c?{type:"Feature",properties:{guideType:o.GUIDE_TYPE.CURSOR_EDIT_HANDLE,renderType:n.properties.renderType,positionIndexes:[null]},geometry:{type:o.GEOJSON_TYPE.POINT,coordinates:[c]}}:null})),b(d(e),"getGuides",(function(t){var n=e.getSelectedFeature(t),r=t.selectedIndexes&&t.selectedIndexes[0];if(!n||n.geometry.type===o.GEOJSON_TYPE.POINT)return null;var i=t.lastPointerMoveEvent,a=e.getEditHandlesFromFeature(n,r)||[];return e._getCursorEditHandle(i,n)&&a.push(e._getCursorEditHandle(i,n)),{editHandles:a.length?a:null}})),e}return n=l,(r=[{key:"handleStopDragging",value:function(e,t){var n=e.picks&&e.picks[0]&&e.picks[0].object;if(n&&(0,a.isNumeric)(n.featureIndex))switch(n.type){case o.ELEMENT_TYPE.FEATURE:case o.ELEMENT_TYPE.FILL:case o.ELEMENT_TYPE.EDIT_HANDLE:this._handleDragging(e,t)}}},{key:"_getPointOnSegment",value:function(e,t,n){var r=(0,a.getFeatureCoordinates)(e);if(!r)return null;var o=t.index,i=t.index+1;return(0,a.findClosestPointOnLineSegment)(r[o],r[i],n)}}])&&f(n.prototype,r),i&&f(n,i),l}(i.default);t.default=m},MoSN:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={Editor:!0,RenderTypes:!0,RenderStates:!0,GEOJSON_TYPE:!0,RENDER_TYPE:!0,RENDER_STATE:!0,ELEMENT_TYPE:!0,EDIT_TYPE:!0};Object.defineProperty(t,"Editor",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"RenderTypes",{enumerable:!0,get:function(){return a.RENDER_TYPE}}),Object.defineProperty(t,"RenderStates",{enumerable:!0,get:function(){return a.RENDER_STATE}}),Object.defineProperty(t,"GEOJSON_TYPE",{enumerable:!0,get:function(){return a.GEOJSON_TYPE}}),Object.defineProperty(t,"RENDER_TYPE",{enumerable:!0,get:function(){return a.RENDER_TYPE}}),Object.defineProperty(t,"RENDER_STATE",{enumerable:!0,get:function(){return a.RENDER_STATE}}),Object.defineProperty(t,"ELEMENT_TYPE",{enumerable:!0,get:function(){return a.ELEMENT_TYPE}}),Object.defineProperty(t,"EDIT_TYPE",{enumerable:!0,get:function(){return a.EDIT_TYPE}});var o,i=(o=n("Cg8U"))&&o.__esModule?o:{default:o},a=n("1Y5v"),u=n("XlYV");Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=n("tHzR");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}))},Noqf:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtrudeMode=void 0;var r,o=(r=n("0eZ/"))&&r.__esModule?r:{default:r},i=n("lVFs"),a=n("9/d+"),u=n("KV4q");function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||f(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 s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){o=!0,i=c}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||f(e,t)||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(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(){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(e){return!1}}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(f,e);var t,n,r,a,c=(t=f,function(){var e,n=b(t);if(v()){var r=b(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return h(this,e)});function f(){var e;d(this,f);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return E(g(e=c.call.apply(c,[this].concat(n))),"isPointAdded",!1),e}return n=f,(r=[{key:"handleDragging",value:function(e,t){var n=(0,i.getPickedEditHandle)(e.pointerDownPicks);if(n){var r=n.properties.featureIndex,o=n.properties.positionIndexes,a=this.coordinatesSize(o,r,t.data);o=this.isPointAdded?this.nextPositionIndexes(o,a):o;var c=this.getPointForPositionIndexes(this.prevPositionIndexes(o,a),r,t.data),l=this.getPointForPositionIndexes(o,r,t.data);if(c&&l){var f=s((0,i.generatePointsParallelToLinePoints)(c,l,e.mapCoords),2),p=f[0],d=f[1],y=new u.ImmutableFeatureCollection(t.data).replacePosition(r,this.prevPositionIndexes(o,a),d).replacePosition(r,o,p).getObject();t.onEdit({updatedData:y,editType:"extruding",editContext:{featureIndexes:[r],positionIndexes:this.nextPositionIndexes(o,a),position:p}}),e.cancelPan()}}}},{key:"handleStartDragging",value:function(e,t){var n=t.selectedIndexes,r=(0,i.getPickedIntermediateEditHandle)(e.picks);if(n.length&&r){var o=r.properties,a=o.positionIndexes,c=o.featureIndex,l=this.coordinatesSize(a,c,t.data),s=this.getPointForPositionIndexes(this.prevPositionIndexes(a,l),c,t.data),f=this.getPointForPositionIndexes(a,c,t.data);if(s&&f){var p=new u.ImmutableFeatureCollection(t.data);this.isOrthogonal(a,c,l,t.data)||(p=p.addPosition(c,a,f)),this.isOrthogonal(this.prevPositionIndexes(a,l),c,l,t.data)||(p=p.addPosition(c,a,s),this.isPointAdded=!0),t.onEdit({updatedData:p.getObject(),editType:"startExtruding",editContext:{featureIndexes:[c],positionIndexes:a,position:s}})}}}},{key:"handleStopDragging",value:function(e,t){var n=t.selectedIndexes,r=(0,i.getPickedEditHandle)(e.pointerDownPicks);if(n.length&&r){var o=r.properties.featureIndex,a=r.properties.positionIndexes,c=this.coordinatesSize(a,o,t.data);a=this.isPointAdded?this.nextPositionIndexes(a,c):a;var l=this.getPointForPositionIndexes(this.prevPositionIndexes(a,c),o,t.data),f=this.getPointForPositionIndexes(a,o,t.data);if(l&&f){var p=s((0,i.generatePointsParallelToLinePoints)(l,f,e.mapCoords),2),d=p[0],y=p[1],h=new u.ImmutableFeatureCollection(t.data).replacePosition(o,this.prevPositionIndexes(a,c),y).replacePosition(o,a,d).getObject();t.onEdit({updatedData:h,editType:"extruded",editContext:{featureIndexes:[o],positionIndexes:a,position:d}})}}this.isPointAdded=!1}},{key:"coordinatesSize",value:function(e,t,n){var r=n.features,o=0;if(Array.isArray(e)){var i=r[t].geometry.coordinates;if(3===e.length){var a=s(e,2),u=a[0],c=a[1];i.length&&i[u].length&&(o=i[u][c].length)}else{var l=s(e,1)[0];i.length&&i[l].length&&(o=i[l].length)}}return o}},{key:"getBearing",value:function(e,t){var n=(0,o.default)(e,t);return n<0?Math.floor(360+n):Math.floor(n)}},{key:"isOrthogonal",value:function(e,t,n,r){if(!Array.isArray(e))return!1;e[e.length-1]===n-1&&(e[e.length-1]=0);var o=this.getPointForPositionIndexes(this.prevPositionIndexes(e,n),t,r),i=this.getPointForPositionIndexes(this.nextPositionIndexes(e,n),t,r),a=this.getPointForPositionIndexes(e,t,r),u=this.getBearing(a,o),c=this.getBearing(a,i);return[89,90,91,269,270,271].includes(Math.abs(u-c))}},{key:"nextPositionIndexes",value:function(e,t){if(!Array.isArray(e))return[];var n=l(e);return n.length&&(n[n.length-1]=n[n.length-1]===t-1?0:n[n.length-1]+1),n}},{key:"prevPositionIndexes",value:function(e,t){if(!Array.isArray(e))return[];var n=l(e);return n.length&&(n[n.length-1]=0===n[n.length-1]?t-2:n[n.length-1]-1),n}},{key:"getPointForPositionIndexes",value:function(e,t,n){var r,o=n.features;if(Array.isArray(e)){var i=o[t].geometry.coordinates;if(3===e.length){var a=s(e,3),u=a[0],c=a[1],l=a[2];i.length&&i[u].length&&(r=i[u][c][l])}else{var f=s(e,2),p=f[0],d=f[1];i.length&&i[p].length&&(r=i[p][d])}}return r}}])&&y(n.prototype,r),a&&y(n,a),f}(a.ModifyMode);t.ExtrudeMode=O},Nw1Z:function(e,t,n){"use strict";n.r(t);var r=n("3L5V"),o=n.n(r),i=n("RwN2"),a=n("0wsv");t.default=function(e,t,n){void 0===n&&(n={});var r=Object(i.getGeom)(e),u=Object(i.getGeom)(t),c=o.a.union(r.coordinates,u.coordinates);return 0===c.length?null:1===c.length?Object(a.polygon)(c[0],n.properties):Object(a.multiPolygon)(c,n.properties)}},OK3t:function(e,t,n){"use strict";var r=n("0wsv"),o=n("RwN2");t.a=function(e,t,n){void 0===n&&(n={});var i=Object(o.getCoord)(e),a=Object(o.getCoord)(t);a[0]+=a[0]-i[0]>180?-360:i[0]-a[0]>180?360:0;var u=function(e,t,n){var o=n=void 0===n?r.earthRadius:Number(n),i=e[1]*Math.PI/180,a=t[1]*Math.PI/180,u=a-i,c=Math.abs(t[0]-e[0])*Math.PI/180;c>Math.PI&&(c-=2*Math.PI);var l=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),s=Math.abs(l)>1e-11?u/l:Math.cos(i);return Math.sqrt(u*u+s*s*c*c)*o}(i,a);return Object(r.convertLength)(u,"meters",n.units)}},Oi1S:function(e,t,n){"use strict";n.r(t),n.d(t,"polygonToLine",(function(){return i})),n.d(t,"multiPolygonToLine",(function(){return a})),n.d(t,"coordsToLine",(function(){return u}));var r=n("0wsv"),o=n("RwN2");function i(e,t){return void 0===t&&(t={}),u(Object(o.getGeom)(e).coordinates,t.properties?t.properties:"Feature"===e.type?e.properties:{})}function a(e,t){void 0===t&&(t={});var n=Object(o.getGeom)(e).coordinates,i=t.properties?t.properties:"Feature"===e.type?e.properties:{},a=[];return n.forEach((function(e){a.push(u(e,i))})),Object(r.featureCollection)(a)}function u(e,t){return e.length>1?Object(r.multiLineString)(e,t):Object(r.lineString)(e[0],t)}t.default=function(e,t){void 0===t&&(t={});var n=Object(o.getGeom)(e);switch(t.properties||"Feature"!==e.type||(t.properties=e.properties),n.type){case"Polygon":return i(n,t);case"MultiPolygon":return a(n,t);default:throw new Error("invalid poly")}}},PMOM:function(e,t,n){"use strict";n.r(t);var r=n("3L5V"),o=n.n(r),i=n("0wsv"),a=n("RwN2");t.default=function(e,t){var n=Object(a.getGeom)(e),r=Object(a.getGeom)(t),u=e.properties||{},c=o.a.difference(n.coordinates,r.coordinates);return 0===c.length?null:1===c.length?Object(i.polygon)(c[0],u):Object(i.multiPolygon)(c,u)}},PQBz:function(e,t,n){"use strict";n.r(t);var r=n("Qidy"),o=n("0wsv"),i=n("RwN2"),a=n("Nwvx"),u=n("OK3t");function c(e,t){return e[0]*t[0]+e[1]*t[1]}function l(e,t,n){return"planar"===n.method?Object(u.a)(e,t,n):Object(r.default)(e,t,n)}t.default=function(e,t,n){if(void 0===n&&(n={}),n.method||(n.method="geodesic"),n.units||(n.units="kilometers"),!e)throw new Error("pt is required");if(Array.isArray(e)?e=Object(o.point)(e):"Point"===e.type?e=Object(o.feature)(e):Object(i.featureOf)(e,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=Object(o.lineString)(t):"LineString"===t.type?t=Object(o.feature)(t):Object(i.featureOf)(t,"LineString","line");var r=1/0,u=e.geometry.coordinates;return Object(a.segmentEach)(t,(function(e){var t=e.geometry.coordinates[0],o=e.geometry.coordinates[1],i=function(e,t,n,r){var o=[n[0]-t[0],n[1]-t[1]],i=c([e[0]-t[0],e[1]-t[1]],o);if(i<=0)return l(e,t,{method:r.method,units:"degrees"});var a=c(o,o);if(a<=i)return l(e,n,{method:r.method,units:"degrees"});var u=i/a,s=[t[0]+u*o[0],t[1]+u*o[1]];return l(e,s,{method:r.method,units:"degrees"})}(u,t,o,n);i<r&&(r=i)})),Object(o.convertLength)(r,"degrees",n.units)}},PfwA:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||i(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 i(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?l(e):t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(){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(e){return!1}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeMode=void 0;var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(y,e);var t,n,r,a,d=(t=y,function(){var e,n=f(t);if(s()){var r=f(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)});function y(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),t=d.call(this),n=l(t),o=void 0,(r="_modes")in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t._modes=e,t}return n=y,(r=[{key:"_coalesce",value:function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=0;r<this._modes.length&&(t=e(this._modes[r]),!(n?n(t):t));r++);return t}},{key:"handleClick",value:function(e,t){this._coalesce((function(n){return n.handleClick(e,t)}))}},{key:"handlePointerMove",value:function(e,t){return this._coalesce((function(n){return n.handlePointerMove(e,t)}))}},{key:"handleStartDragging",value:function(e,t){return this._coalesce((function(n){return n.handleStartDragging(e,t)}))}},{key:"handleStopDragging",value:function(e,t){return this._coalesce((function(n){return n.handleStopDragging(e,t)}))}},{key:"handleDragging",value:function(e,t){return this._coalesce((function(n){return n.handleDragging(e,t)}))}},{key:"getGuides",value:function(e){var t,n=[],r=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=i(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},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,o,a=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}(this._modes);try{for(r.s();!(t=r.n()).done;){var a=t.value;n.push.apply(n,o(a.getGuides(e).features))}}catch(u){r.e(u)}finally{r.f()}return{type:"FeatureCollection",features:n}}}])&&u(n.prototype,r),a&&u(n,a),y}(n("4R+2").GeoJsonEditMode);t.CompositeMode=d},Qidy:function(e,t,n){"use strict";n.r(t);var r=n("RwN2"),o=n("0wsv");t.default=function(e,t,n){void 0===n&&(n={});var i=Object(r.getCoord)(e),a=Object(r.getCoord)(t),u=Object(o.degreesToRadians)(a[1]-i[1]),c=Object(o.degreesToRadians)(a[0]-i[0]),l=Object(o.degreesToRadians)(i[1]),s=Object(o.degreesToRadians)(a[1]),f=Math.pow(Math.sin(u/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(l)*Math.cos(s);return Object(o.radiansToLength)(2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),n.units)}},RJX9:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(){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(e){return!1}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.DuplicateMode=void 0;var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(d,e);var t,n,r,f,p=(t=d,function(){var e,n=l(t);if(c()){var r=l(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return u(this,e)});function d(){return o(this,d),p.apply(this,arguments)}return n=d,(r=[{key:"handleStartDragging",value:function(e,t){a(l(d.prototype),"handleStartDragging",this).call(this,e,t),this._geometryBeforeTranslate&&t.onEdit(this.getAddManyFeaturesAction(this._geometryBeforeTranslate,t.data))}},{key:"updateCursor",value:function(e){this._isTranslatable?e.onUpdateCursor("copy"):e.onUpdateCursor(null)}}])&&i(n.prototype,r),f&&i(n,f),d}(n("iJqO").TranslateMode);t.DuplicateMode=f},RwN2:function(e,t,n){"use strict";n.r(t),n.d(t,"getCoord",(function(){return o})),n.d(t,"getCoords",(function(){return i})),n.d(t,"containsNumber",(function(){return a})),n.d(t,"geojsonType",(function(){return u})),n.d(t,"featureOf",(function(){return c})),n.d(t,"collectionOf",(function(){return l})),n.d(t,"getGeom",(function(){return s})),n.d(t,"getType",(function(){return f}));var r=n("0wsv");function o(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function i(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function a(e){if(e.length>1&&Object(r.isNumber)(e[0])&&Object(r.isNumber)(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return a(e[0]);throw new Error("coordinates must only contain numbers")}function u(e,t,n){if(!t||!n)throw new Error("type and name required");if(!e||e.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+e.type)}function c(e,t,n){if(!e)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!e||"Feature"!==e.type||!e.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!e.geometry||e.geometry.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+e.geometry.type)}function l(e,t,n){if(!e)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!e||"FeatureCollection"!==e.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0,o=e.features;r<o.length;r++){var i=o[r];if(!i||"Feature"!==i.type||!i.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!i.geometry||i.geometry.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+i.geometry.type)}}function s(e){return"Feature"===e.type?e.geometry:e}function f(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}},Txtv:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n("xDdU")),o=n("1Y5v"),i=u(n("KER3")),a=n("wHih");function u(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(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 p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(){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(e){return!1}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(i,e);var t,n=(t=i,function(){var e,n=v(t);if(g()){var r=v(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return y(this,e)});function i(){var e;d(this,i);for(var t=arguments.length,u=new Array(t),c=0;c<t;c++)u[c]=arguments[c];return m(h(e=n.call.apply(n,[this].concat(u))),"handleClick",(function(t,n){e.getTentativeFeature()?e._commitTentativeFeature(t,n):e._initTentativeFeature(t,n)})),m(h(e),"getEditHandlesFromFeature",(function(e,t){var n=(0,a.getFeatureCoordinates)(e);return n&&n.map((function(e,n){return{type:"Feature",properties:{renderType:o.RENDER_TYPE.RECTANGLE,guideType:o.GUIDE_TYPE.CURSOR_EDIT_HANDLE,featureIndex:t,positionIndexes:[n]},geometry:{type:o.GEOJSON_TYPE.POINT,coordinates:[e]}}}))})),m(h(e),"getGuides",(function(t){var n=e.getTentativeFeature();if(!(0,a.getFeatureCoordinates)(n))return null;var i=t.lastPointerMoveEvent,u=(0,a.updateRectanglePosition)(n,2,i.mapCoords);return{tentativeFeature:n={type:"Feature",properties:{id:(0,r.default)(),guideType:o.GUIDE_TYPE.TENTATIVE,renderType:o.RENDER_TYPE.RECTANGLE},geometry:{type:o.GEOJSON_TYPE.LINE_STRING,coordinates:u}},editHandles:e.getEditHandlesFromFeature(n)}})),m(h(e),"_commitTentativeFeature",(function(t,n){var r=n.data,i=e.getTentativeFeature();if(i){e.setTentativeFeature(null);var u=(0,a.updateRectanglePosition)(i,2,t.mapCoords);if(!u)return;u=[].concat(f(u),[u[0]]),i=s({},i,{properties:{id:i.properties.id,renderType:o.RENDER_TYPE.RECTANGLE},geometry:{type:o.GEOJSON_TYPE.POLYGON,coordinates:[u]}});var c=r.addFeature(i).getObject();n.onEdit({editType:o.EDIT_TYPE.ADD_FEATURE,updatedData:c,editContext:null})}})),m(h(e),"_initTentativeFeature",(function(t,n){e.setTentativeFeature({type:"Feature",properties:{id:(0,r.default)(),renderType:o.RENDER_TYPE.RECTANGLE,guideType:o.GUIDE_TYPE.TENTATIVE},geometry:{type:"LineString",coordinates:[t.mapCoords,t.mapCoords,t.mapCoords,t.mapCoords]}})})),e}return i}(i.default);t.default=E},"USW+":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Draw90DegreePolygonMode=void 0;var r=l(n("r/c0")),o=l(n("0eZ/")),i=l(n("EDhj")),a=l(n("Qidy")),u=n("0wsv"),c=n("lVFs");function l(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||d(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 p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){o=!0,i=c}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||d(e,t)||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 d(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(){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(e){return!1}}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(y,e);var t,n,l,s,d=(t=y,function(){var e,n=m(t);if(b()){var r=m(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return v(this,e)});function y(){return h(this,y),d.apply(this,arguments)}return n=y,(l=[{key:"getGuides",value:function(e){var t={type:"FeatureCollection",features:[]},n=this.getClickSequence();if(0===n.length||!e.lastPointerMoveEvent)return t;var r,o,i=e.lastPointerMoveEvent.mapCoords;if(1===n.length)r=i;else{var a=n[n.length-2],u=n[n.length-1];r=p((0,c.generatePointsParallelToLinePoints)(a,u,i),1)[0]}return o=n.length<3?{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(f(n),[r])}}:{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(f(n),[r,n[0]])]}},t.features.push(o),t.features=t.features.concat((0,c.getEditHandlesForGeometry)(o.geometry,-1)),t.features=t.features.slice(0,-1),t}},{key:"handlePointerMove",value:function(e,t){e.mapCoords,t.onUpdateCursor("cell")}},{key:"handleClick",value:function(e,t){var n=e.picks,r=this.getTentativeGuide(t);this.addClickSequence(e);var o=this.getClickSequence();if(r){if(3===o.length&&"LineString"===r.geometry.type){var i=r.geometry;o[o.length-1]=i.coordinates[i.coordinates.length-1]}else if(o.length>3&&"Polygon"===r.geometry.type){var a=r.geometry;o[o.length-1]=a.coordinates[0][a.coordinates[0].length-2];var u=(0,c.getPickedEditHandle)(n);if(u&&Array.isArray(u.properties.positionIndexes)&&(0===u.properties.positionIndexes[1]||u.properties.positionIndexes[1]===a.coordinates[0].length-3)){var l={type:"Polygon",coordinates:this.finalizedCoordinates(f(a.coordinates[0]))};this.resetClickSequence();var s=this.getAddFeatureOrBooleanPolygonAction(l,t);s&&t.onEdit(s)}}var p={screenCoords:[-1,-1],mapCoords:e.mapCoords,picks:[],pointerDownPicks:null,pointerDownScreenCoords:null,pointerDownMapCoords:null,cancelPan:function(){},sourceEvent:null};this.handlePointerMove(p,t)}}},{key:"finalizedCoordinates",value:function(e){var t=[[].concat(f(e.slice(0,-2)),[e[0]])],n=this.getIntermediatePoint(f(e));if(n)t=[[].concat(f(e.slice(0,-2)),[n,e[0]])];else{var r=f(e);r.splice(-3,1),(n=this.getIntermediatePoint(f(r)))&&(t=[[].concat(f(e.slice(0,-3)),[n,e[0]])])}return t}},{key:"getIntermediatePoint",value:function(e){var t;if(e.length>4){var n=f(e),c=n[0],l=n[1],s=(0,o.default)(c,l),p=e[e.length-3],d=e[e.length-4],y=(0,o.default)(p,d),h={first:[],second:[]};[1,2,3].forEach((function(e){var t=s+90*e;h.first.push(t>180?t-360:t);var n=y+90*e;h.second.push(n>180?n-360:n)}));var g=(0,a.default)((0,u.point)(c),(0,u.point)(p));[0,1,2].forEach((function(e){var n=(0,u.lineString)([c,(0,r.default)(c,g,h.first[e]).geometry.coordinates]);[0,1,2].forEach((function(e){var o=(0,u.lineString)([p,(0,r.default)(p,g,h.second[e]).geometry.coordinates]),a=(0,i.default)(n,o);a&&a.features.length&&(t=a.features[0].geometry.coordinates)}))}))}return t}}])&&g(n.prototype,l),s&&g(n,s),y}(n("4R+2").GeoJsonEditMode);t.Draw90DegreePolygonMode=O},VhK9:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"GeoJsonEditMode",{enumerable:!0,get:function(){return o.GeoJsonEditMode}}),Object.defineProperty(t,"ModifyMode",{enumerable:!0,get:function(){return i.ModifyMode}}),Object.defineProperty(t,"TranslateMode",{enumerable:!0,get:function(){return a.TranslateMode}}),Object.defineProperty(t,"ScaleMode",{enumerable:!0,get:function(){return u.ScaleMode}}),Object.defineProperty(t,"RotateMode",{enumerable:!0,get:function(){return c.RotateMode}}),Object.defineProperty(t,"DuplicateMode",{enumerable:!0,get:function(){return l.DuplicateMode}}),Object.defineProperty(t,"ExtendLineStringMode",{enumerable:!0,get:function(){return s.ExtendLineStringMode}}),Object.defineProperty(t,"SplitPolygonMode",{enumerable:!0,get:function(){return f.SplitPolygonMode}}),Object.defineProperty(t,"ExtrudeMode",{enumerable:!0,get:function(){return p.ExtrudeMode}}),Object.defineProperty(t,"ElevationMode",{enumerable:!0,get:function(){return d.ElevationMode}}),Object.defineProperty(t,"TransformMode",{enumerable:!0,get:function(){return y.TransformMode}}),Object.defineProperty(t,"DrawPointMode",{enumerable:!0,get:function(){return h.DrawPointMode}}),Object.defineProperty(t,"DrawLineStringMode",{enumerable:!0,get:function(){return g.DrawLineStringMode}}),Object.defineProperty(t,"DrawPolygonMode",{enumerable:!0,get:function(){return v.DrawPolygonMode}}),Object.defineProperty(t,"DrawRectangleMode",{enumerable:!0,get:function(){return b.DrawRectangleMode}}),Object.defineProperty(t,"DrawCircleByDiameterMode",{enumerable:!0,get:function(){return m.DrawCircleByDiameterMode}}),Object.defineProperty(t,"DrawCircleFromCenterMode",{enumerable:!0,get:function(){return E.DrawCircleFromCenterMode}}),Object.defineProperty(t,"DrawEllipseByBoundingBoxMode",{enumerable:!0,get:function(){return O.DrawEllipseByBoundingBoxMode}}),Object.defineProperty(t,"DrawEllipseUsingThreePointsMode",{enumerable:!0,get:function(){return _.DrawEllipseUsingThreePointsMode}}),Object.defineProperty(t,"DrawRectangleUsingThreePointsMode",{enumerable:!0,get:function(){return P.DrawRectangleUsingThreePointsMode}}),Object.defineProperty(t,"Draw90DegreePolygonMode",{enumerable:!0,get:function(){return w.Draw90DegreePolygonMode}}),Object.defineProperty(t,"DrawPolygonByDraggingMode",{enumerable:!0,get:function(){return S.DrawPolygonByDraggingMode}}),Object.defineProperty(t,"ImmutableFeatureCollection",{enumerable:!0,get:function(){return j.ImmutableFeatureCollection}}),Object.defineProperty(t,"ViewMode",{enumerable:!0,get:function(){return x.ViewMode}}),Object.defineProperty(t,"MeasureDistanceMode",{enumerable:!0,get:function(){return T.MeasureDistanceMode}}),Object.defineProperty(t,"MeasureAreaMode",{enumerable:!0,get:function(){return M.MeasureAreaMode}}),Object.defineProperty(t,"MeasureAngleMode",{enumerable:!0,get:function(){return R.MeasureAngleMode}}),Object.defineProperty(t,"CompositeMode",{enumerable:!0,get:function(){return k.CompositeMode}}),Object.defineProperty(t,"SnappableMode",{enumerable:!0,get:function(){return C.SnappableMode}}),Object.defineProperty(t,"_memoize",{enumerable:!0,get:function(){return D.default}});var r,o=n("4R+2"),i=n("9/d+"),a=n("iJqO"),u=n("hmiN"),c=n("7it9"),l=n("RJX9"),s=n("jWzm"),f=n("9ASd"),p=n("Noqf"),d=n("pLGD"),y=n("lF+Y"),h=n("pTud"),g=n("3dFB"),v=n("JeLm"),b=n("IulE"),m=n("ekYj"),E=n("9daN"),O=n("yRTG"),_=n("cNaZ"),P=n("IaNU"),w=n("USW+"),S=n("Ycbx"),j=n("KV4q"),x=n("X2aT"),T=n("fMhR"),M=n("+1Xl"),R=n("vNvi"),k=n("PfwA"),C=n("bN/D"),D=(r=n("HYY4"))&&r.__esModule?r:{default:r}},X2aT:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function a(){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(e){return!1}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ViewMode=void 0;var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(r,e);var t,n=(t=r,function(){var e,n=u(t);if(a()){var r=u(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return i(this,e)});function r(){return o(this,r),n.apply(this,arguments)}return r}(n("4R+2").GeoJsonEditMode);t.ViewMode=l},XlYV:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectMode",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"EditingMode",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"BaseMode",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"DrawPointMode",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"DrawLineStringMode",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"DrawRectangleMode",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"DrawRectangleOneclickMode",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"DrawPolygonMode",{enumerable:!0,get:function(){return s.default}});var r=f(n("zx9D")),o=f(n("MYR2")),i=f(n("KER3")),a=f(n("LNFK")),u=f(n("9hBD")),c=f(n("Txtv")),l=f(n("+aqe")),s=f(n("u779"));function f(e){return e&&e.__esModule?e:{default:e}}},Ycbx:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawPolygonByDraggingMode=void 0;var r,o=(r=n("hKI/"))&&r.__esModule?r:{default:r},i=n("lVFs");function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(){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(e){return!1}}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(v,e);var t,n,r,a,c=(t=v,function(){var e,n=y(t);if(d()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return f(this,e)});function v(){var e;l(this,v);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return g(p(e=c.call.apply(c,[this].concat(n))),"handleDraggingThrottled",null),e}return n=v,(r=[{key:"handleClick",value:function(e,t){}},{key:"handleStartDragging",value:function(e,t){e.cancelPan(),t.modeConfig&&t.modeConfig.throttleMs?this.handleDraggingThrottled=(0,o.default)(this.handleDraggingAux,t.modeConfig.throttleMs):this.handleDraggingThrottled=this.handleDraggingAux}},{key:"handleStopDragging",value:function(e,t){this.addClickSequence(e);var n=this.getClickSequence();if(this.handleDraggingThrottled&&this.handleDraggingThrottled.cancel&&this.handleDraggingThrottled.cancel(),n.length>2){var r={type:"Polygon",coordinates:[[].concat(u(n),[n[0]])]};this.resetClickSequence();var o=this.getAddFeatureOrBooleanPolygonAction(r,t);o&&t.onEdit(o)}}},{key:"handleDraggingAux",value:function(e,t){var n=e.picks;(0,i.getPickedEditHandle)(n)||this.addClickSequence(e)}},{key:"handleDragging",value:function(e,t){this.handleDraggingThrottled&&this.handleDraggingThrottled(e,t)}}])&&s(n.prototype,r),a&&s(n,a),v}(n("JeLm").DrawPolygonMode);t.DrawPolygonByDraggingMode=v},YcpW:function(e,t,n){e.exports=function(){"use strict";function e(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function t(e,t){return e<t?-1:e>t?1:0}return function(n,r,o,i,a){!function t(n,r,o,i,a){for(;i>o;){if(i-o>600){var u=i-o+1,c=r-o+1,l=Math.log(u),s=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*s*(u-s)/u)*(c-u/2<0?-1:1),p=Math.max(o,Math.floor(r-c*s/u+f)),d=Math.min(i,Math.floor(r+(u-c)*s/u+f));t(n,r,p,d,a)}var y=n[r],h=o,g=i;for(e(n,o,r),a(n[i],y)>0&&e(n,o,i);h<g;){for(e(n,h,g),h++,g--;a(n[h],y)<0;)h++;for(;a(n[g],y)>0;)g--}0===a(n[o],y)?e(n,o,g):(g++,e(n,g,i)),g<=r&&(o=g+1),r<=g&&(i=g-1)}}(n,r,o||0,i||n.length-1,a||t)}}()},aZEm:function(e,t,n){var r=n("A1R+"),o=n("0wsv"),i=n("Nwvx"),a=n("VWg+").default,u=i.featureEach,c=(i.coordEach,o.polygon,o.featureCollection);function l(e){var t=r(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:a(e),r.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach((function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:a(e),t.push(e)})):u(e,(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:a(e),t.push(e)})),r.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:a(e),r.prototype.remove.call(this,e,t)},t.clear=function(){return r.prototype.clear.call(this)},t.search=function(e){var t=r.prototype.search.call(this,this.toBBox(e));return c(t)},t.collides=function(e){return r.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=r.prototype.all.call(this);return c(e)},t.toJSON=function(){return r.prototype.toJSON.call(this)},t.fromJSON=function(e){return r.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=a(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=a(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}e.exports=l,e.exports.default=l},"bN/D":function(e,t,n){"use strict";n("E9XD"),Object.defineProperty(t,"__esModule",{value:!0}),t.SnappableMode=void 0;var r=n("lVFs");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(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 a(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(){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(e){return!1}}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(v,e);var t,n,o,u,g=(t=v,function(){var e,n=d(t);if(p()){var r=d(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return s(this,e)});function v(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),h(f(t=g.call(this)),"_handler",void 0),t._handler=e,t}return n=v,(o=[{key:"_getSnappedMouseEvent",value:function(e,t,n){return Object.assign(e,{mapCoords:n.geometry.coordinates,pointerDownMapCoords:t&&t.geometry.coordinates})}},{key:"_getPickedSnapTarget",value:function(e){return(0,r.getPickedEditHandles)(e).find((function(e){return"snap-target"===e.properties.editHandleType}))}},{key:"_getPickedSnapSource",value:function(e){return(0,r.getPickedSnapSourceEditHandle)(e)}},{key:"_getUpdatedSnapSourceHandle",value:function(e,t){var n=e.properties,r=n.featureIndex,o=n.positionIndexes;if(!Array.isArray(o))return e;var i=t.features[r];return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{geometry:{type:"Point",coordinates:o.reduce((function(e,t){return e[t]}),i.geometry.coordinates)}})}},{key:"_getSnapTargets",value:function(e){var t=(e.modeConfig||{}).additionalSnapTargets;return t=t||[],[].concat(i(e.data.features),i(t))}},{key:"_getSnapTargetHandles",value:function(e){for(var t=[],n=this._getSnapTargets(e),o=0;o<n.length;o++)if(!e.selectedIndexes.includes(o)){var a=n[o].geometry;t.push.apply(t,i((0,r.getEditHandlesForGeometry)(a,o,"snap-target")))}return t}},{key:"getGuides",value:function(e){var t=e.modeConfig,n=e.lastPointerMoveEvent,o=(t||{}).enableSnapping,u={type:"FeatureCollection",features:i(this._handler.getGuides(e).features)};if(!o)return u;var c,l=n&&this._getPickedSnapSource(n.pointerDownPicks);if(l)return(c=u.features).push.apply(c,i(this._getSnapTargetHandles(e)).concat([this._getUpdatedSnapSourceHandle(l,e.data)])),u;var s,f=e.data.features,p=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=a(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},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,o,i=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){u=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw o}}}}(e.selectedIndexes);try{for(p.s();!(s=p.n()).done;){var d=s.value;if(d<f.length){var y,h=f[d].geometry;(y=u.features).push.apply(y,i((0,r.getEditHandlesForGeometry)(h,d,"snap-source")))}}}catch(g){p.e(g)}finally{p.f()}return u}},{key:"_getSnapAwareEvent",value:function(e,t){var n=this._getPickedSnapSource(t.lastPointerMoveEvent.pointerDownPicks),r=this._getPickedSnapTarget(e.picks);return n&&r?this._getSnappedMouseEvent(e,n,r):e}},{key:"handleStartDragging",value:function(e,t){this._handler.handleStartDragging(e,t)}},{key:"handleStopDragging",value:function(e,t){this._handler.handleStopDragging(this._getSnapAwareEvent(e,t),t)}},{key:"handleDragging",value:function(e,t){this._handler.handleDragging(this._getSnapAwareEvent(e,t),t)}},{key:"handlePointerMove",value:function(e,t){this._handler.handlePointerMove(this._getSnapAwareEvent(e,t),t)}}])&&l(n.prototype,o),u&&l(n,u),v}(n("4R+2").GeoJsonEditMode);t.SnappableMode=g},cNaZ:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawEllipseUsingThreePointsMode=void 0;var r=c(n("Qidy")),o=c(n("26Vz")),i=c(n("0eZ/")),a=n("0wsv"),u=n("4R+2");function c(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(){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(e){return!1}}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(v,e);var t,n,c,l,g=(t=v,function(){var e,n=y(t);if(d()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return p(this,e)});function v(){return s(this,v),g.apply(this,arguments)}return n=v,(c=[{key:"getThreeClickPolygon",value:function(e,t,n,c){var l=(0,u.getIntermediatePosition)(e,t),s=Math.max((0,r.default)(l,(0,a.point)(n)),.001),f=Math.max((0,r.default)(e,t),.001)/2,p={angle:(0,i.default)(e,t)};return(0,o.default)(l,s,f,p)}}])&&f(n.prototype,c),l&&f(n,l),v}(n("mOTV").ThreeClickPolygonMode);t.DrawEllipseUsingThreePointsMode=g},dHJZ:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n("oXiK"),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==l(e)&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n("q1tI")),i=n("VhK9"),a=n("wHih"),u=n("1Y5v");function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){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(e){return!1}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m={featureCollection:new i.ImmutableFeatureCollection({type:"FeatureCollection",features:[]}),selectedFeatureIndex:null,hovered:null,isDragging:!1,didDrag:!1,lastPointerMoveEvent:null,pointerDownPicks:null,pointerDownScreenCoords:null,pointerDownMapCoords:null},E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(E,e);var t,n,c,l,s=(t=E,function(){var e,n=g(t);if(h()){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return d(this,e)});function E(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),b(y(t=s.call(this,e)),"_events",void 0),b(y(t),"_eventsRegistered",void 0),b(y(t),"_modeHandler",void 0),b(y(t),"_context",void 0),b(y(t),"_containerRef",void 0),b(y(t),"getFeatures",(function(){var e=t._getFeatureCollection();return(e=e&&e.getObject())&&e.features})),b(y(t),"addFeatures",(function(e){var n=t._getFeatureCollection();n&&(Array.isArray(e)||(e=[e]),n=n.addFeatures(e),t.setState({featureCollection:n}))})),b(y(t),"deleteFeatures",(function(e){var n=t._getFeatureCollection(),r=t._getSelectedFeatureIndex();if(n){Array.isArray(e)||(e=[e]);var o={featureCollection:n=n.deleteFeatures(e)};e.findIndex((function(e){return r===e}))>=0&&(o.selectedFeatureIndex=null),t.setState(o)}})),b(y(t),"_getMemorizedFeatureCollection",(0,i._memoize)((function(e){var t=e.propsFeatures,n=e.stateFeatures,r=t||n;return r instanceof i.ImmutableFeatureCollection?r:r&&"FeatureCollection"===r.type?new i.ImmutableFeatureCollection({type:"FeatureCollection",features:r.features}):new i.ImmutableFeatureCollection({type:"FeatureCollection",features:r||[]})}))),b(y(t),"_getFeatureCollection",(function(){return t._getMemorizedFeatureCollection({propsFeatures:t.props.features,stateFeatures:t.state.featureCollection})})),b(y(t),"_setupModeHandler",(function(){var e=t.props.mode;t._modeHandler=e,e?t._registerEvents():t._degregisterEvents()})),b(y(t),"_clearEditingState",(function(){t.setState({selectedFeatureIndex:null,hovered:null,pointerDownPicks:null,pointerDownScreenCoords:null,pointerDownMapCoords:null,isDragging:!1,didDrag:!1})})),b(y(t),"_getSelectedFeatureIndex",(function(){return"selectedFeatureIndex"in t.props?t.props.selectedFeatureIndex:t.state.selectedFeatureIndex})),b(y(t),"_onSelect",(function(e){t.setState({selectedFeatureIndex:e&&e.selectedFeatureIndex}),t.props.onSelect&&t.props.onSelect(e)})),b(y(t),"_onEdit",(function(e){var n=e.editType,r=e.updatedData,o=e.editContext;switch(t.setState({featureCollection:new i.ImmutableFeatureCollection(r)}),n){case u.EDIT_TYPE.ADD_FEATURE:t.props.onSelect({selectedFeature:null,selectedFeatureIndex:null,selectedEditHandleIndex:null,screenCoords:o&&o.screenCoords,mapCoords:o&&o.mapCoords})}t.props.onUpdate&&t.props.onUpdate({data:r&&r.features,editType:n,editContext:o})})),b(y(t),"_degregisterEvents",(function(){var e=t._context&&t._context.eventManager;t._events&&e&&t._eventsRegistered&&(e.off(t._events),t._eventsRegistered=!1)})),b(y(t),"_registerEvents",(function(){var e=t._containerRef,n=t._context&&t._context.eventManager;t._events&&e&&n&&(t._eventsRegistered||(n.on(t._events,e),t._eventsRegistered=!0))})),b(y(t),"_onEvent",(function(e,n,r){e(t._getEvent(n)),r&&n.stopImmediatePropagation()})),b(y(t),"_onClick",(function(e){var n=t.getModeProps();t._modeHandler.handleClick(e,n)})),b(y(t),"_onDblClick",(function(e){var n=t.getModeProps();t._modeHandler.handleDblClick(e,n)})),b(y(t),"_onPointerMove",(function(e){var n=t._getHoverState(e),r=t.state,o=r.isDragging,i=r.didDrag,a=r.pointerDownPicks,u=r.pointerDownScreenCoords,c=r.pointerDownMapCoords;if(o&&!i&&u){var l=e.screenCoords[0]-u[0],s=e.screenCoords[1]-u[1];l*l+s*s>5&&t.setState({didDrag:!0})}var p=f({},e,{isDragging:o,pointerDownPicks:a,pointerDownScreenCoords:u,pointerDownMapCoords:c});if(t.state.didDrag){var d=t.getModeProps();t._modeHandler.handlePointerMove(p,d)}t.setState({hovered:n,lastPointerMoveEvent:p})})),b(y(t),"_onPointerDown",(function(e){var n=f({},e,{isDragging:!0,pointerDownScreenCoords:e.screenCoords,pointerDownMapCoords:e.mapCoords}),r={isDragging:!0,pointerDownPicks:e.picks,pointerDownScreenCoords:e.screenCoords,pointerDownMapCoords:e.mapCoords};t.setState(r);var o=t.getModeProps();t._modeHandler.handleStartDragging(n,o)})),b(y(t),"_onPointerUp",(function(e){var n=t.state,r=n.didDrag,o=n.pointerDownPicks,i=n.pointerDownScreenCoords,a=n.pointerDownMapCoords,u=f({},e,{isDragging:!1,pointerDownPicks:r?o:null,pointerDownScreenCoords:r?i:null,pointerDownMapCoords:r?a:null});t.setState({isDragging:!1,didDrag:!1,pointerDownPicks:null,pointerDownScreenCoords:null,pointerDownMapCoords:null});var c=t.getModeProps();r&&t._modeHandler.handleStopDragging(u,c)})),b(y(t),"_onPan",(function(e){t.state.isDragging&&e.sourceEvent.stopImmediatePropagation(),t._modeHandler.handlePan(e,t.getModeProps())})),b(y(t),"project",(function(e){var n=t._context&&t._context.viewport;return n&&n.project(e)})),b(y(t),"unproject",(function(e){var n=t._context&&t._context.viewport;return n&&n.unproject(e)})),b(y(t),"_getHoverState",(function(e){var t=e.picks&&e.picks[0]&&e.picks[0].object;return t?f({screenCoords:e.screenCoords,mapCoords:e.mapCoords},t):null})),t.state=m,t._eventsRegistered=!1,t._events={anyclick:function(e){return t._onEvent(t._onClick,e,!0)},click:function(e){return e.stopImmediatePropagation()},dblclick:function(e){return t._onEvent(t._onDblClick,e,!0)},pointermove:function(e){return t._onEvent(t._onPointerMove,e,!0)},pointerdown:function(e){return t._onEvent(t._onPointerDown,e,!0)},pointerup:function(e){return t._onEvent(t._onPointerUp,e,!0)},panmove:function(e){return t._onEvent(t._onPan,e,!1)},panstart:function(e){return t._onEvent(t._onPan,e,!1)},panend:function(e){return t._onEvent(t._onPan,e,!1)}},t}return n=E,(c=[{key:"componentDidMount",value:function(){this._setupModeHandler()}},{key:"componentDidUpdate",value:function(e){e.mode!==this.props.mode&&(this._clearEditingState(),this._setupModeHandler())}},{key:"componentWillUnmount",value:function(){this._degregisterEvents()}},{key:"getModeProps",value:function(){var e=this._getFeatureCollection(),t=this.state.lastPointerMoveEvent;return{data:e,selectedIndexes:[this._getSelectedFeatureIndex()],lastPointerMoveEvent:t,viewport:this._context&&this._context.viewport,featuresDraggable:this.props.featuresDraggable,onEdit:this._onEdit,onSelect:this._onSelect}}},{key:"_getEvent",value:function(e){var t=(0,a.parseEventElement)(e),n=(0,a.getScreenCoords)(e);return{picks:t?[t]:null,screenCoords:n,mapCoords:this.unproject(n),sourceEvent:e}}},{key:"_render",value:function(){return o.default.createElement("div",null)}},{key:"render",value:function(){var e=this;return o.default.createElement(r._MapContext.Consumer,null,(function(t){e._context=t;var n=t&&t.viewport;return!n||n.height<=0||n.width<=0?null:e._render()}))}}])&&p(n.prototype,c),l&&p(n,l),E}(o.PureComponent);t.default=E,b(E,"displayName","ModeHandler"),b(E,"defaultProps",{mode:null,features:null,onSelect:null,onUpdate:null})},ekYj:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawCircleByDiameterMode=void 0;var r=a(n("k+DL")),o=a(n("Qidy")),i=n("4R+2");function a(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(){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(e){return!1}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(h,e);var t,n,a,u,y=(t=h,function(){var e,n=p(t);if(f()){var r=p(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return s(this,e)});function h(){return c(this,h),y.apply(this,arguments)}return n=h,(a=[{key:"getTwoClickPolygon",value:function(e,t,n){var a=(n||{}).steps,u=void 0===a?64:a,c={steps:u};u<4&&(console.warn("Minimum steps to draw a circle is 4 "),c.steps=4);var l=(0,i.getIntermediatePosition)(e,t),s=Math.max((0,o.default)(e,l),.001);return(0,r.default)(l,s,c)}}])&&l(n.prototype,a),u&&l(n,u),h}(n("MMIt").TwoClickPolygonMode);t.DrawCircleByDiameterMode=y},fMhR:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeasureDistanceMode=void 0;var r=a(n("Qidy")),o=a(n("HYY4")),i=n("4R+2");function a(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(){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(e){return!1}}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=[],v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(v,e);var t,n,i,a,u=(t=v,function(){var e,n=d(t);if(p()){var r=d(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return s(this,e)});function v(){var e;c(this,v);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return h(f(e=u.call.apply(u,[this].concat(n))),"startingPoint",null),h(f(e),"endingPoint",null),h(f(e),"endingPointLocked",!1),h(f(e),"_getTooltips",(0,o.default)((function(e){var t=e.modeConfig,n=e.startingPoint,o=e.endingPoint,i=g;if(n&&o){var a,u=t||{},c=u.formatTooltip,l=u.turfOptions,s=u.measurementCallback,f=l&&l.units||"kilometers",p=(0,r.default)(n,o,l);a=c?c(p):"".concat(parseFloat(p).toFixed(2)," ").concat(f),s&&s(p),i=[{position:o.geometry.coordinates,text:a}]}return i}))),e}return n=v,(i=[{key:"_setEndingPoint",value:function(e){this.endingPoint={type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[]},geometry:{type:"Point",coordinates:e}}}},{key:"handleClick",value:function(e,t){!this.startingPoint||this.endingPointLocked?(this.startingPoint={type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[]},geometry:{type:"Point",coordinates:e.mapCoords}},this.endingPoint=null,this.endingPointLocked=!1):this.startingPoint&&(this._setEndingPoint(e.mapCoords),this.endingPointLocked=!0)}},{key:"handlePointerMove",value:function(e,t){this.startingPoint&&!this.endingPointLocked&&this._setEndingPoint(e.mapCoords),t.onUpdateCursor("cell")}},{key:"getGuides",value:function(e){var t={type:"FeatureCollection",features:[]},n=t.features;return this.startingPoint&&n.push(this.startingPoint),this.endingPoint&&n.push(this.endingPoint),this.startingPoint&&this.endingPoint&&n.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[this.startingPoint.geometry.coordinates,this.endingPoint.geometry.coordinates]}}),t}},{key:"getTooltips",value:function(e){return this._getTooltips({modeConfig:e.modeConfig,startingPoint:this.startingPoint,endingPoint:this.endingPoint})}}])&&l(n.prototype,i),a&&l(n,a),v}(i.GeoJsonEditMode);t.MeasureDistanceMode=v},gF8d:function(e,t,n){"use strict";var r=n("0wsv"),o=n("RwN2");function i(e,t){var n=Object(r.degreesToRadians)(e[1]),o=Object(r.degreesToRadians)(t[1]),i=Object(r.degreesToRadians)(t[0]-e[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var a=Math.log(Math.tan(o/2+Math.PI/4)/Math.tan(n/2+Math.PI/4)),u=Math.atan2(i,a);return(Object(r.radiansToDegrees)(u)+360)%360}t.a=function(e,t,n){var r;return void 0===n&&(n={}),(r=n.final?i(Object(o.getCoord)(t),Object(o.getCoord)(e)):i(Object(o.getCoord)(e),Object(o.getCoord)(t)))>180?-(360-r):r}},"hKI/":function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt,u="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,l=u||c||Function("return this")(),s=Object.prototype.toString,f=Math.max,p=Math.min,d=function(){return l.Date.now()};function y(e,t,n){var r,o,i,a,u,c,l=0,s=!1,y=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,i=o;return r=o=void 0,l=t,a=e.apply(i,n)}function m(e){return l=e,u=setTimeout(O,t),s?b(e):a}function E(e){var n=e-c;return void 0===c||n>=t||n<0||y&&e-l>=i}function O(){var e=d();if(E(e))return _(e);u=setTimeout(O,function(e){var n=t-(e-c);return y?p(n,i-(e-l)):n}(e))}function _(e){return u=void 0,v&&r?b(e):(r=o=void 0,a)}function P(){var e=d(),n=E(e);if(r=arguments,o=this,c=e,n){if(void 0===u)return m(c);if(y)return u=setTimeout(O,t),b(c)}return void 0===u&&(u=setTimeout(O,t)),a}return t=g(t)||0,h(n)&&(s=!!n.leading,i=(y="maxWait"in n)?f(g(n.maxWait)||0,t):i,v="trailing"in n?!!n.trailing:v),P.cancel=function(){void 0!==u&&clearTimeout(u),l=0,r=c=o=u=void 0},P.flush=function(){return void 0===u?a:_(d())},P}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==s.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var u=o.test(e);return u||i.test(e)?a(e.slice(2),u?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return h(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),y(e,t,{leading:r,maxWait:t,trailing:o})}}).call(this,n("yLpj"))},hmiN:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScaleMode=void 0;var r=g(n("J/Si")),o=g(n("VWg+")),i=g(n("JRQ3")),a=g(n("0eZ/")),u=g(n("iuXc")),c=n("0wsv"),l=n("Nwvx"),s=g(n("Qidy")),f=g(n("LAut")),p=n("RwN2"),d=n("lVFs"),y=n("4R+2"),h=n("KV4q");function g(e){return e&&e.__esModule?e:{default:e}}function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(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 m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?P(e):t}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(){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(e){return!1}}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&j(e,t)}(v,e);var t,n,s,y,g=(t=v,function(){var e,n=S(t);if(w()){var r=S(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return _(this,e)});function v(){var e;E(this,v);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return x(P(e=g.call.apply(g,[this].concat(n))),"_geometryBeingScaled",void 0),x(P(e),"_selectedEditHandle",void 0),x(P(e),"_cornerGuidePoints",void 0),x(P(e),"_cursor",void 0),x(P(e),"_isScaling",!1),x(P(e),"_isSinglePointGeometrySelected",(function(e){var t=(e||{}).features;return!(!Array.isArray(t)||1!==t.length)&&"Point"===(0,p.getGeom)(t[0]).type})),x(P(e),"_getOppositeScaleHandle",(function(t){var n=t&&t.properties&&Array.isArray(t.properties.positionIndexes)&&t.properties.positionIndexes[0];if("number"!=typeof n)return null;var r=e._cornerGuidePoints.length,o=(n+r/2)%r;return e._cornerGuidePoints.find((function(e){return!!Array.isArray(e.properties.positionIndexes)&&e.properties.positionIndexes[0]===o}))})),x(P(e),"_getUpdatedData",(function(e,t){for(var n=new h.ImmutableFeatureCollection(e.data),r=e.selectedIndexes,o=0;o<r.length;o++){var i=r[o],a=t.features[o];n=n.replaceGeometry(i,a.geometry)}return n.getObject()})),x(P(e),"isEditHandleSelcted",(function(){return Boolean(e._selectedEditHandle)})),x(P(e),"getScaleAction",(function(t,n,r,o){if(!e._selectedEditHandle||e._isSinglePointGeometrySelected(e._geometryBeingScaled))return null;var i=e._getOppositeScaleHandle(e._selectedEditHandle),a=(0,p.getCoord)(i),u=M(a,t,n),c=(0,f.default)(e._geometryBeingScaled,u,{origin:a});return{updatedData:e._getUpdatedData(o,c),editType:r,editContext:{featureIndexes:o.selectedIndexes}}})),x(P(e),"updateCursor",(function(t){if(e._selectedEditHandle){e._cursor&&t.onUpdateCursor(e._cursor);var n=e.getSelectedFeaturesAsFeatureCollection(t),r=(0,i.default)(n),o=(0,a.default)(r,e._selectedEditHandle),u=o<0?o+180:o;u>=0&&u<=90||u>=180&&u<=270?(e._cursor="nesw-resize",t.onUpdateCursor("nesw-resize")):(e._cursor="nwse-resize",t.onUpdateCursor("nwse-resize"))}else t.onUpdateCursor(null),e._cursor=null})),e}return n=v,(s=[{key:"handlePointerMove",value:function(e,t){if(!this._isScaling){var n=(0,d.getPickedEditHandle)(e.picks);this._selectedEditHandle=n&&"scale"===n.properties.editHandleType?n:null}this.updateCursor(t)}},{key:"handleStartDragging",value:function(e,t){this._selectedEditHandle&&(this._isScaling=!0,this._geometryBeingScaled=this.getSelectedFeaturesAsFeatureCollection(t))}},{key:"handleDragging",value:function(e,t){if(this._isScaling){var n=this.getScaleAction(e.pointerDownMapCoords,e.mapCoords,"scaling",t);n&&t.onEdit(n),e.cancelPan()}}},{key:"handleStopDragging",value:function(e,t){if(this._isScaling){var n=this.getScaleAction(e.pointerDownMapCoords,e.mapCoords,"scaled",t);n&&t.onEdit(n),this._geometryBeingScaled=null,this._selectedEditHandle=null,this._cursor=null,this._isScaling=!1}}},{key:"getGuides",value:function(e){this._cornerGuidePoints=[];var t=this.getSelectedFeaturesAsFeatureCollection(e),n=this._isSinglePointGeometrySelected(t)?(0,r.default)(t,1):t,i=(0,u.default)((0,o.default)(n));i.properties.mode="scale";var a=[];return(0,l.coordEach)(i,(function(e,t){if(t<4){var n=(0,c.point)(e,{guideType:"editHandle",editHandleType:"scale",positionIndexes:[t]});a.push(n)}})),this._cornerGuidePoints=a,(0,c.featureCollection)([i].concat(b(this._cornerGuidePoints)))}}])&&O(n.prototype,s),y&&O(n,y),v}(y.GeoJsonEditMode);function M(e,t,n){var r=(0,s.default)(e,t);return(0,s.default)(e,n)/r}t.ScaleMode=T},iJqO:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TranslateMode=void 0;var r=l(n("0eZ/")),o=l(n("Qidy")),i=l(n("rZn+")),a=n("0wsv"),u=n("4R+2"),c=n("KV4q");function l(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){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(e){return!1}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(m,e);var t,n,u,l,s=(t=m,function(){var e,n=g(t);if(h()){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return d(this,e)});function m(){var e;f(this,m);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return b(y(e=s.call.apply(s,[this].concat(n))),"_geometryBeforeTranslate",void 0),b(y(e),"_isTranslatable",void 0),e}return n=m,(u=[{key:"handleDragging",value:function(e,t){if(this._isTranslatable){if(this._geometryBeforeTranslate){var n=this.getTranslateAction(e.pointerDownMapCoords,e.mapCoords,"translating",t);n&&t.onEdit(n)}e.cancelPan()}}},{key:"handlePointerMove",value:function(e,t){this._isTranslatable=this.isSelectionPicked(e.pointerDownPicks||e.picks,t),this.updateCursor(t)}},{key:"handleStartDragging",value:function(e,t){this._isTranslatable&&(this._geometryBeforeTranslate=this.getSelectedFeaturesAsFeatureCollection(t))}},{key:"handleStopDragging",value:function(e,t){if(this._geometryBeforeTranslate){var n=this.getTranslateAction(e.pointerDownMapCoords,e.mapCoords,"translated",t);n&&t.onEdit(n),this._geometryBeforeTranslate=null}}},{key:"updateCursor",value:function(e){this._isTranslatable?e.onUpdateCursor("move"):e.onUpdateCursor(null)}},{key:"getTranslateAction",value:function(e,t,n,u){if(!this._geometryBeforeTranslate)return null;for(var l=(0,a.point)(e),s=(0,a.point)(t),f=(0,o.default)(l,s),p=(0,r.default)(l,s),d=(0,i.default)(this._geometryBeforeTranslate,f,p),y=new c.ImmutableFeatureCollection(u.data),h=u.selectedIndexes,g=0;g<h.length;g++){var v=h[g],b=d.features[g];y=y.replaceGeometry(v,b.geometry)}return{updatedData:y.getObject(),editType:n,editContext:{featureIndexes:h}}}}])&&p(n.prototype,u),l&&p(n,l),m}(u.GeoJsonEditMode);t.TranslateMode=m},iuXc:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n("0wsv");function o(e,t){void 0===t&&(t={});var n=Number(e[0]),o=Number(e[1]),i=Number(e[2]),a=Number(e[3]);if(6===e.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var u=[n,o],c=[n,a],l=[i,a],s=[i,o];return Object(r.polygon)([[u,s,l,c,u]],t.properties,{bbox:e,id:t.id})}},jWzm:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendLineStringMode=void 0;var r=n("4R+2"),o=n("KV4q");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(){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(e){return!1}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(d,e);var t,n,r,i,p=(t=d,function(){var e,n=s(t);if(l()){var r=s(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)});function d(){return a(this,d),p.apply(this,arguments)}return n=d,(r=[{key:"getSingleSelectedLineString",value:function(e){var t=this.getSelectedGeometry(e);return t&&"LineString"===t.type?t:null}},{key:"handleClick",value:function(e,t){var n=t.selectedIndexes,r=this.getSingleSelectedLineString(t);if(r){var i=[r.coordinates.length],a=t.modeConfig;a&&a.drawAtFront&&(i=[0]);var u=n[0],c=new o.ImmutableFeatureCollection(t.data).addPosition(u,i,e.mapCoords).getObject();t.onEdit({updatedData:c,editType:"addPosition",editContext:{featureIndexes:[u],positionIndexes:i,position:e.mapCoords}})}else console.warn("ExtendLineStringMode only supported for single LineString selection")}},{key:"getGuides",value:function(e){var t={type:"FeatureCollection",features:[]},n=this.getSingleSelectedLineString(e);if(!n)return t;var r=e.lastPointerMoveEvent&&e.lastPointerMoveEvent.mapCoords,o=null,i=e.modeConfig;return o=i&&i.drawAtFront?n.coordinates[0]:n.coordinates[n.coordinates.length-1],t.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[o,r]}}),t}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell")}}])&&u(n.prototype,r),i&&u(n,i),d}(r.GeoJsonEditMode);t.ExtendLineStringMode=p},jyar:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return p})),n.d(t,"renderToDom",(function(){return d}));var r=n("q1tI"),o=n("i8i4"),i=n("oXiK"),a=n("MoSN"),u=n("3i6d");function c(e){var t=e.polygon,n=t&&Object(u.default)(t);return r.createElement("div",{className:"control-panel"},r.createElement("h3",null,"Draw Polygon"),t&&r.createElement("p",null,n," ",r.createElement("br",null),"square meters"),r.createElement("div",{className:"source-link"},r.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/6.1-release/examples/draw-polygon",target:"_new"},"View Code ↗")))}var l=r.memo(c);function s(e){e.feature;switch(e.state){case a.RENDER_STATE.SELECTED:case a.RENDER_STATE.HOVERED:case a.RENDER_STATE.UNCOMMITTED:return{fill:"rgb(251, 176, 59)",fillOpacity:1,stroke:"rgb(255, 255, 255)",strokeWidth:2,r:7};default:return{fill:"rgb(251, 176, 59)",fillOpacity:1,stroke:"rgb(255, 255, 255)",strokeWidth:2,r:5}}}function f(e){e.feature,e.index;switch(e.state){case a.RENDER_STATE.SELECTED:case a.RENDER_STATE.HOVERED:case a.RENDER_STATE.UNCOMMITTED:case a.RENDER_STATE.CLOSING:return{stroke:"rgb(251, 176, 59)",strokeWidth:2,fill:"rgb(251, 176, 59)",fillOpacity:.3,strokeDasharray:"4,2"};default:return{stroke:"rgb(60, 178, 208)",strokeWidth:2,fill:"rgb(60, 178, 208)",fillOpacity:.1}}}function p(){var e=Object(r.useState)({longitude:-91.874,latitude:42.76,zoom:12}),t=e[0],n=e[1],o=Object(r.useState)(null),u=o[0],c=o[1],p=Object(r.useState)(null),d=p[0],y=p[1],h=Object(r.useRef)(null),g=Object(r.useCallback)((function(e){y(e&&e.selectedFeatureIndex)}),[]),v=Object(r.useCallback)((function(){null!==d&&d>=0&&h.current.deleteFeatures(d)}),[d]),b=Object(r.useCallback)((function(e){"addFeature"===e.editType&&c(new a.EditingMode)}),[]),m=r.createElement("div",{className:"mapboxgl-ctrl-top-left"},r.createElement("div",{className:"mapboxgl-ctrl-group mapboxgl-ctrl"},r.createElement("button",{className:"mapbox-gl-draw_ctrl-draw-btn mapbox-gl-draw_polygon",title:"Polygon tool (p)",onClick:function(){return c(new a.DrawPolygonMode)}}),r.createElement("button",{className:"mapbox-gl-draw_ctrl-draw-btn mapbox-gl-draw_trash",title:"Delete",onClick:v}))),E=h.current&&h.current.getFeatures(),O=E&&(E[d]||E[E.length-1]);return r.createElement(r.Fragment,null,r.createElement(i.default,Object.assign({},t,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/satellite-v9",mapboxApiAccessToken:"",onViewportChange:n}),r.createElement(a.Editor,{ref:h,style:{width:"100%",height:"100%"},clickRadius:12,mode:u,onSelect:g,onUpdate:b,editHandleShape:"circle",featureStyle:f,editHandleStyle:s}),m),r.createElement(l,{polygon:O}))}function d(e){Object(o.render)(r.createElement(p,null),e)}},"k+DL":function(e,t,n){"use strict";n.r(t);var r=n("r/c0"),o=n("0wsv");t.default=function(e,t,n){void 0===n&&(n={});for(var i=n.steps||64,a=n.properties?n.properties:!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{},u=[],c=0;c<i;c++)u.push(Object(r.default)(e,t,-360*c/i,n).geometry.coordinates);return u.push(u[0]),Object(o.polygon)([u],a)}},kyJj:function(e,t,n){"use strict";n.r(t);var r=n("JRQ3"),o=n("gF8d"),i=n("OK3t"),a=n("vWOf"),u=n("KWkK"),c=n("Nwvx"),l=n("RwN2"),s=n("0wsv");t.default=function(e,t,n){if(n=n||{},!Object(s.isObject)(n))throw new Error("options is invalid");var f=n.pivot,p=n.mutate;if(!e)throw new Error("geojson is required");if(null==t||isNaN(t))throw new Error("angle is required");return 0===t||(f||(f=Object(r.default)(e)),!1!==p&&void 0!==p||(e=Object(u.a)(e)),Object(c.coordEach)(e,(function(e){var n=Object(o.a)(f,e)+t,r=Object(i.a)(f,e),u=Object(l.getCoords)(Object(a.a)(f,r,n));e[0]=u[0],e[1]=u[1]}))),e}},"lF+Y":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransformMode=void 0;var r=n("0wsv"),o=n("iJqO"),i=n("hmiN"),a=n("7it9");function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function p(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(){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(e){return!1}}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(b,e);var t,n,u,g,v=(t=b,function(){var e,n=y(t);if(d()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return p(this,e)});function b(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),v.call(this,[new o.TranslateMode,new i.ScaleMode,new a.RotateMode])}return n=b,(u=[{key:"handlePointerMove",value:function(e,t){var n=null;f(y(b.prototype),"handlePointerMove",this).call(this,e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{onUpdateCursor:function(e){n=e||n}})),t.onUpdateCursor(n)}},{key:"handleStartDragging",value:function(e,t){var n=null,r=null,a=[];this._modes.forEach((function(e){e instanceof o.TranslateMode?r=e:(e instanceof i.ScaleMode&&(n=e),a.push(e))})),n instanceof i.ScaleMode&&!n.isEditHandleSelcted()&&a.push(r),a.filter(Boolean).forEach((function(n){return n.handleStartDragging(e,t)}))}},{key:"getGuides",value:function(e){var t=f(y(b.prototype),"getGuides",this).call(this,e),n=(this._modes||[]).find((function(e){return e instanceof a.RotateMode}));if(n instanceof a.RotateMode){var o=t.features.filter((function(e){var t=e.properties||{},r=t.editHandleType,o=[t.mode];return n.getIsRotating()&&o.push(r),!o.includes("scale")}));t=(0,r.featureCollection)(o)}return t}}])&&s(n.prototype,u),g&&s(n,g),b}(n("PfwA").CompositeMode);t.TransformMode=g},lVFs:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toDeckColor=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];if(!Array.isArray(e))return t;return[255*e[0],255*e[1],255*e[2],255*e[3]]},t.recursivelyTraverseNestedArrays=function e(t,n,r){if(!Array.isArray(t[0]))return!0;for(var o=0;o<t.length;o++)if(e(t[o],[].concat(s(n),[o]),r)){r(t,n);break}return!1},t.generatePointsParallelToLinePoints=function(e,t,n){var u={type:"LineString",coordinates:[e,t]},c=(0,a.point)(n),l=(0,i.default)(c,u),s=(0,o.default)(e,t),f=(n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0])<0?s-90:s-270,p=(0,r.default)(t,l,f),d=(0,r.default)(e,l,f);return[p.geometry.coordinates,d.geometry.coordinates]},t.distance2d=d,t.mix=y,t.nearestPointOnProjectedLine=function(e,t,n){var r=new u.default(n),o=e.geometry.coordinates.map((function(e){var t=l(e,3),n=t[0],o=t[1],i=t[2],a=void 0===i?0:i;return r.project([n,o,a])})),i=l(r.project(t.geometry.coordinates),2),a=i[0],c=i[1],s=1/0,f={};o.forEach((function(e,t){var n=l(e,2),r=n[0],i=n[1];if(0!==t){var u=l(o[t-1],2),p=u[0],d=u[1],y=d-i,h=r-p,g=p*i-r*d,v=y*y+h*h,b=Math.abs(y*a+h*c+g)/Math.sqrt(v);b<s&&(s=b,f={index:t,x0:(h*(h*a-y*c)-y*g)/v,y0:(y*(-h*a+y*c)-h*g)/v})}}));var p=f,h=p.index,g=p.x0,v=p.y0,b=l(o[h-1],3),m=b[0],E=b[1],O=b[2],_=void 0===O?0:O,P=l(o[h],3),w=P[0],S=P[1],j=P[2],x=void 0===j?0:j,T=d(m,E,w,S),M=d(m,E,g,v),R=y(_,x,M/T);return{type:"Feature",geometry:{type:"Point",coordinates:r.unproject([g,v,R])},properties:{dist:s,index:h-1}}},t.getPickedEditHandle=function(e){var t=h(e);return t.length?t[0]:null},t.getPickedSnapSourceEditHandle=function(e){return h(e).find((function(e){return"snap-source"===e.properties.editHandleType}))},t.getNonGuidePicks=function(e){return e&&e.filter((function(e){return!e.isGuide}))},t.getPickedExistingEditHandle=function(e){return h(e).find((function(e){var t=e.properties;return t.featureIndex>=0&&"existing"===t.editHandleType}))},t.getPickedIntermediateEditHandle=function(e){return h(e).find((function(e){var t=e.properties;return t.featureIndex>=0&&"intermediate"===t.editHandleType}))},t.getPickedEditHandles=h,t.getEditHandlesForGeometry=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"existing",r=[];switch(e.type){case"Point":r=[{type:"Feature",properties:{guideType:"editHandle",editHandleType:n,positionIndexes:[],featureIndex:t},geometry:{type:"Point",coordinates:e.coordinates}}];break;case"MultiPoint":case"LineString":r=r.concat(g(e.coordinates,[],t,n));break;case"Polygon":case"MultiLineString":for(var o=0;o<e.coordinates.length;o++)r=r.concat(g(e.coordinates[o],[o],t,n)),"Polygon"===e.type&&(r=r.slice(0,-1));break;case"MultiPolygon":for(var i=0;i<e.coordinates.length;i++)for(var a=0;a<e.coordinates[i].length;a++)r=(r=r.concat(g(e.coordinates[i][a],[i,a],t,n))).slice(0,-1);break;default:throw Error("Unhandled geometry type: ".concat(e.type))}return r};var r=c(n("r/c0")),o=c(n("0eZ/")),i=c(n("PQBz")),a=n("0wsv"),u=c(n("1I81"));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){o=!0,i=c}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||f(e,t)||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 s(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||f(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 f(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t,n,r){var o=e-n,i=t-r;return Math.sqrt(o*o+i*i)}function y(e,t,n){return t*n+e*(1-n)}function h(e){return e&&e.filter((function(e){return e.isGuide&&"editHandle"===e.object.properties.guideType})).map((function(e){return e.object}))||[]}function g(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"existing",o=[],i=0;i<e.length;i++){var a=e[i];o.push({type:"Feature",properties:{guideType:"editHandle",positionIndexes:[].concat(s(t),[i]),featureIndex:n,editHandleType:r},geometry:{type:"Point",coordinates:a}})}return o}},mOTV:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(){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(e){return!1}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ThreeClickPolygonMode=void 0;var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(p,e);var t,n,r,s,f=(t=p,function(){var e,n=c(t);if(u()){var r=c(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return a(this,e)});function p(){return o(this,p),f.apply(this,arguments)}return n=p,(r=[{key:"handleClick",value:function(e,t){this.addClickSequence(e);var n=this.getClickSequence(),r=this.getTentativeGuide(t);if(n.length>2&&r&&"Polygon"===r.geometry.type){var o=this.getAddFeatureOrBooleanPolygonAction(r.geometry,t);this.resetClickSequence(),o&&t.onEdit(o)}}},{key:"getGuides",value:function(e){var t=e.lastPointerMoveEvent,n=e.modeConfig,r=this.getClickSequence(),o={type:"FeatureCollection",features:[]};if(0===r.length)return o;var i=t.mapCoords;if(1===r.length)o.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[0],i]}});else{var a=this.getThreeClickPolygon(r[0],r[1],i,n);a&&o.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:a.geometry})}return o}},{key:"getThreeClickPolygon",value:function(e,t,n,r){return null}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell")}}])&&i(n.prototype,r),s&&i(n,s),p}(n("4R+2").GeoJsonEditMode);t.ThreeClickPolygonMode=s},pLGD:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElevationMode=void 0;var r=n("lVFs");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function c(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(){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(e){return!1}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=e.pointerDownScreenCoords,n=e.screenCoords;return 10*(t[1]-n[1])}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(h,e);var t,n,o,d,y=(t=h,function(){var e,n=s(t);if(l()){var r=s(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)});function h(){return i(this,h),y.apply(this,arguments)}return n=h,d=[{key:"calculateElevationChangeWithViewport",value:function(e,t){var n=t.pointerDownScreenCoords,r=t.screenCoords;return 156543.03392*Math.cos(e.latitude*Math.PI/180)/Math.pow(2,e.zoom)*(n[1]-r[1])/2}}],(o=[{key:"makeElevatedEvent",value:function(e,t,n){var r=n.modeConfig||{},o=r.minElevation,i=void 0===o?0:o,a=r.maxElevation,u=void 0===a?2e4:a,c=r.calculateElevationChange,l=void 0===c?p:c;if(!e.pointerDownScreenCoords)return e;var s=3===t.length?t[2]:0;return s+=l({pointerDownScreenCoords:e.pointerDownScreenCoords,screenCoords:e.screenCoords}),s=Math.min(s,u),s=Math.max(s,i),Object.assign({},e,{mapCoords:[t[0],t[1],s]})}},{key:"handlePointerMove",value:function(e,t){var n=(0,r.getPickedEditHandle)(e.pointerDownPicks),o=n?n.geometry.coordinates:e.mapCoords;u(s(h.prototype),"handlePointerMove",this).call(this,this.makeElevatedEvent(e,o,t),t)}},{key:"handleStopDragging",value:function(e,t){var n=(0,r.getPickedEditHandle)(e.picks),o=n?n.geometry.coordinates:e.mapCoords;u(s(h.prototype),"handleStopDragging",this).call(this,this.makeElevatedEvent(e,o,t),t)}},{key:"getCursor",value:function(e){var t=u(s(h.prototype),"getCursor",this).call(this,e);return"cell"===t&&(t="ns-resize"),t}}])&&a(n.prototype,o),d&&a(n,d),h}(n("9/d+").ModifyMode);t.ElevationMode=d},pTud:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(){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(e){return!1}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.DrawPointMode=void 0;var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(p,e);var t,n,r,s,f=(t=p,function(){var e,n=c(t);if(u()){var r=c(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return a(this,e)});function p(){return o(this,p),f.apply(this,arguments)}return n=p,(r=[{key:"handleClick",value:function(e,t){var n={type:"Point",coordinates:e.mapCoords};t.onEdit(this.getAddFeatureAction(n,t.data))}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell")}}])&&i(n.prototype,r),s&&i(n,s),p}(n("4R+2").GeoJsonEditMode);t.DrawPointMode=s},"r/c0":function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n("0wsv"),o=n("RwN2");function i(e,t,n,i){void 0===i&&(i={});var a=Object(o.getCoord)(e),u=Object(r.degreesToRadians)(a[0]),c=Object(r.degreesToRadians)(a[1]),l=Object(r.degreesToRadians)(n),s=Object(r.lengthToRadians)(t,i.units),f=Math.asin(Math.sin(c)*Math.cos(s)+Math.cos(c)*Math.sin(s)*Math.cos(l)),p=u+Math.atan2(Math.sin(l)*Math.sin(s)*Math.cos(c),Math.cos(s)-Math.sin(c)*Math.sin(f)),d=Object(r.radiansToDegrees)(p),y=Object(r.radiansToDegrees)(f);return Object(r.point)([d,y],i.properties)}},"rZn+":function(e,t,n){"use strict";n.r(t);var r=n("Nwvx"),o=n("0wsv"),i=n("RwN2"),a=n("KWkK"),u=n("vWOf");t.default=function(e,t,n,c){if(c=c||{},!Object(o.isObject)(c))throw new Error("options is invalid");var l=c.units,s=c.zTranslation,f=c.mutate;if(!e)throw new Error("geojson is required");if(null==t||isNaN(t))throw new Error("distance is required");if(s&&"number"!=typeof s&&isNaN(s))throw new Error("zTranslation is not a number");if(s=void 0!==s?s:0,0===t&&0===s)return e;if(null==n||isNaN(n))throw new Error("direction is required");return t<0&&(t=-t,n+=180),!1!==f&&void 0!==f||(e=Object(a.a)(e)),Object(r.coordEach)(e,(function(e){var r=Object(i.getCoords)(Object(u.a)(e,t,n,{units:l}));e[0]=r[0],e[1]=r[1],s&&3===e.length&&(e[2]+=s)})),e}},t9gQ:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n("RwN2");function o(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var o=Object(r.getCoord)(e),a=Object(r.getGeom)(t),u=a.type,c=t.bbox,l=a.coordinates;if(c&&!1===function(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}(o,c))return!1;"Polygon"===u&&(l=[l]);for(var s=!1,f=0;f<l.length&&!s;f++)if(i(o,l[f][0],n.ignoreBoundary)){for(var p=!1,d=1;d<l[f].length&&!p;)i(o,l[f][d],!n.ignoreBoundary)&&(p=!0),d++;p||(s=!0)}return s}function i(e,t,n){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var o=0,i=t.length-1;o<t.length;i=o++){var a=t[o][0],u=t[o][1],c=t[i][0],l=t[i][1];if(e[1]*(a-c)+u*(c-e[0])+l*(e[0]-a)==0&&(a-e[0])*(c-e[0])<=0&&(u-e[1])*(l-e[1])<=0)return!n;u>e[1]!=l>e[1]&&e[0]<(c-a)*(e[1]-u)/(l-u)+a&&(r=!r)}return r}},tHzR:function(e,t,n){},u779:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n("xDdU")),o=n("1Y5v"),i=n("wHih");function a(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){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(e){return!1}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(a,e);var t,n=(t=a,function(){var e,n=g(t);if(h()){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return d(this,e)});function a(){var e;p(this,a);for(var t=arguments.length,u=new Array(t),l=0;l<t;l++)u[l]=arguments[l];return b(y(e=n.call.apply(n,[this].concat(u))),"handleClick",(function(t,n){var r=t.picks&&t.picks[0];if(e.getTentativeFeature()){var o=r&&r.object;o&&0===o.index?e._commitTentativeFeature(t,n):e._updateTentativeFeature(t,n)}else e._initTentativeFeature(t,n)})),b(y(e),"handleDblClick",(function(t,n){e.getTentativeFeature()&&e._commitTentativeFeature(t,n)})),b(y(e),"getGuides",(function(t){var n=e.getTentativeFeature(),r=(0,i.getFeatureCoordinates)(n);if(!r)return null;var a=t.lastPointerMoveEvent,u=e.getEditHandlesFromFeature(n)||[],l={type:"Feature",properties:{guideType:o.GUIDE_TYPE.CURSOR_EDIT_HANDLE,renderType:o.RENDER_TYPE.POLYGON,positionIndexes:[u.length]},geometry:{type:o.GEOJSON_TYPE.POINT,coordinates:[a.mapCoords]}};return u.push(l),{tentativeFeature:n=f({},n,{geometry:{type:o.GEOJSON_TYPE.LINE_STRING,coordinates:[].concat(c(r),[a.mapCoords])}}),editHandles:u}})),b(y(e),"_updateTentativeFeature",(function(t,n){var r=e.getTentativeFeature();r&&r.geometry&&(r=f({},r,{geometry:{type:o.GEOJSON_TYPE.LINE_STRING,coordinates:[].concat(c(r.geometry.coordinates),[t.mapCoords])}}),e.setTentativeFeature(r),n.onEdit({editType:o.EDIT_TYPE.ADD_POSITION,updatedData:n.data.getObject(),editContext:[{feature:r,featureIndex:null,editHandleIndex:r.geometry.coordinates.length-1,screenCoords:t.screenCoords,mapCoords:t.mapCoords}]}))})),b(y(e),"_commitTentativeFeature",(function(t,n){var r=e.getTentativeFeature(),i=n.data;e.setTentativeFeature(null);var a=i.addFeature(E(r)).getObject();n.onEdit({editType:o.EDIT_TYPE.ADD_FEATURE,updatedData:a,editContext:null})})),b(y(e),"_initTentativeFeature",(function(t,n){e.setTentativeFeature({type:"Feature",properties:{id:(0,r.default)(),renderType:o.RENDER_TYPE.POLYGON,guideType:o.GUIDE_TYPE.TENTATIVE},geometry:{type:o.GEOJSON_TYPE.POINT,coordinates:[t.mapCoords]}})})),e}return a}(a(n("KER3")).default);function E(e){var t=(0,i.getFeatureCoordinates)(e);if(t)return t.push(t[0]),{type:"Feature",properties:{id:e.properties.id,renderType:o.RENDER_TYPE.POLYGON},geometry:{type:o.GEOJSON_TYPE.POLYGON,coordinates:[t]}}}t.default=m},vBe5:function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return b})),n.d(t,"e",(function(){return v})),n.d(t,"f",(function(){return s})),n.d(t,"i",(function(){return y})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return g}));var r=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},o=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return r(t(e),n)}),{left:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)<0?r=i+1:o=i}return r},right:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)>0?o=i:r=i+1}return r}}};var i=o(r),a=i.right,u=(i.left,a);var c=function(e){return null===e?NaN:+e},l=Array.prototype,s=(l.slice,l.map,function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}),f=Math.sqrt(50),p=Math.sqrt(10),d=Math.sqrt(2),y=function(e,t,n){var r,o,i,a,u=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),0===(a=h(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),i=new Array(o=Math.ceil(t-e+1));++u<o;)i[u]=(e+u)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),i=new Array(o=Math.ceil(e-t+1));++u<o;)i[u]=(e-u)/a;return r&&i.reverse(),i};function h(e,t,n){var r=(t-e)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,o);return o>=0?(i>=f?10:i>=p?5:i>=d?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=f?10:i>=p?5:i>=d?2:1)}function g(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/o;return i>=f?o*=10:i>=p?o*=5:i>=d&&(o*=2),t<e?-o:o}var v=function(e,t,n){if(null==n&&(n=c),r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e);return a+(+n(e[i+1],i+1,e)-a)*(o-i)}},b=function(e){for(var t,n,r,o=e.length,i=-1,a=0;++i<o;)a+=e[i].length;for(n=new Array(a);--o>=0;)for(t=(r=e[o]).length;--t>=0;)n[--a]=r[t];return n}},vNvi:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeasureAngleMode=void 0;var r=u(n("0eZ/")),o=u(n("7mrb")),i=u(n("HYY4")),a=n("4R+2");function u(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){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(e){return!1}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=[],E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(s,e);var t,n,a,u,c=(t=s,function(){var e,n=g(t);if(h()){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return d(this,e)});function s(){var e;f(this,s);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return b(y(e=c.call.apply(c,[this].concat(n))),"_getTooltips",(0,i.default)((function(e){var t=e.modeConfig,n=e.vertex,i=e.point1,a=e.point2,u=m;if(n&&i&&a){var c,l=t||{},s=l.formatTooltip,f=l.measurementCallback,p=(0,r.default)(n,i),d=(0,r.default)(n,a),y=Math.abs(p-d);y>180&&(y=360-y),c=s?s(y):"".concat(parseFloat(y).toFixed(2)," ").concat("deg"),f&&f(y),u=[{position:(0,o.default)({type:"FeatureCollection",features:[i,a].map((function(e){return{type:"Feature",geometry:{type:"Point",coordinates:e}}}))}).geometry.coordinates,text:c}]}return u}))),e}return n=s,(a=[{key:"handleClick",value:function(e,t){this.getClickSequence().length>=3&&this.resetClickSequence(),this.addClickSequence(e)}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell")}},{key:"getPoints",value:function(e){var t=this.getClickSequence(),n=l(t);return t.length<3&&e.lastPointerMoveEvent&&n.push(e.lastPointerMoveEvent.mapCoords),n}},{key:"getGuides",value:function(e){var t={type:"FeatureCollection",features:[]},n=t.features,r=this.getPoints(e);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]]}}),t}},{key:"getTooltips",value:function(e){var t=this.getPoints(e);return this._getTooltips({modeConfig:e.modeConfig,vertex:t[0],point1:t[1],point2:t[2]})}}])&&p(n.prototype,a),u&&p(n,u),s}(a.GeoJsonEditMode);t.MeasureAngleMode=E},vWOf:function(e,t,n){"use strict";var r=n("0wsv"),o=n("RwN2");t.a=function(e,t,n,i){void 0===i&&(i={});var a=t<0,u=Object(r.convertLength)(Math.abs(t),i.units,"meters");a&&(u=-Math.abs(u));var c=Object(o.getCoord)(e),l=function(e,t,n,o){o=void 0===o?r.earthRadius:Number(o);var i=t/o,a=e[0]*Math.PI/180,u=Object(r.degreesToRadians)(e[1]),c=Object(r.degreesToRadians)(n),l=i*Math.cos(c),s=u+l;Math.abs(s)>Math.PI/2&&(s=s>0?Math.PI-s:-Math.PI-s);var f=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(u/2+Math.PI/4)),p=Math.abs(f)>1e-11?l/f:Math.cos(u),d=i*Math.sin(c)/p;return[(180*(a+d)/Math.PI+540)%360-180,180*s/Math.PI]}(c,u,n);return l[0]+=l[0]-c[0]>180?-360:c[0]-l[0]>180?360:0,Object(r.point)(l,i.properties)}},wHih:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNumeric=a,t.parseEventElement=function(e){var t=e.target;if(!t||!t.dataset||!t.dataset.type)return null;var n=t.dataset.type,r=t.dataset.featureIndex,o=t.dataset.index;return{object:{type:n,index:a(o)?Number(o):void 0,featureIndex:a(r)?Number(r):void 0},index:o}},t.getScreenCoords=function(e){var t=e.offsetCenter,n=t.x,r=t.y;return[Number(n),Number(r)]},t.findClosestPointOnLineSegment=function(e,t,n){var r=(t[1]-e[1])/(t[0]-e[0]),o=e[1]-r*e[0];if(!isFinite(r)){var i=[e[0],n[1]];return c(e,t,i)?i:null}if(n[0]*r+o-n[1]==0)return c(e,t,n)?n:null;var a=(r*n[1]+n[0]-r*o)/(r*r+1),u=r*a+o;return c(e,t,[a,u])?[a,u]:null},t.getFeatureCoordinates=u,t.updateRectanglePosition=function(e,t,n){var i=u(e);if(!i)return null;var a=i.slice(0,4);a[t%4]=n;var c=a[(t+2)%4],l=a[t%4];return a[(t+1)%4]=[l[0],c[1]],a[(t+3)%4]=[c[0],l[1]],e.geometry.type===r.GEOJSON_TYPE.POLYGON?[[].concat(o(a),[a[0]])]:a};var r=n("1Y5v");function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){return!Array.isArray(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function u(e){var t=e&&e.geometry&&e.geometry.coordinates;return t?e.geometry.type===r.GEOJSON_TYPE.POLYGON?t[0]:t:null}function c(e,t,n){var r=[Math.min(e[0],t[0]),Math.max(e[0],t[0]),Math.min(e[1],t[1]),Math.max(e[1],t[1])];return n[0]>=r[0]&&n[0]<=r[1]&&n[1]>=r[2]&&n[1]<=r[3]}},xDdU:function(e,t,n){var r,o,i=n("4fRq"),a=n("I2ZF"),u=0,c=0;e.exports=function(e,t,n){var l=t&&n||0,s=t||[],f=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:o;if(null==f||null==p){var d=i();null==f&&(f=r=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==p&&(p=o=16383&(d[6]<<8|d[7]))}var y=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:c+1,g=y-u+(h-c)/1e4;if(g<0&&void 0===e.clockseq&&(p=p+1&16383),(g<0||y>u)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=y,c=h,o=p;var v=(1e4*(268435455&(y+=122192928e5))+h)%4294967296;s[l++]=v>>>24&255,s[l++]=v>>>16&255,s[l++]=v>>>8&255,s[l++]=255&v;var b=y/4294967296*1e4&268435455;s[l++]=b>>>8&255,s[l++]=255&b,s[l++]=b>>>24&15|16,s[l++]=b>>>16&255,s[l++]=p>>>8|128,s[l++]=255&p;for(var m=0;m<6;++m)s[l+m]=f[m];return t||a(s)}},yRTG:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawEllipseByBoundingBoxMode=void 0;var r=c(n("iuXc")),o=c(n("Qidy")),i=c(n("26Vz")),a=n("0wsv"),u=n("4R+2");function c(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(){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(e){return!1}}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(v,e);var t,n,c,l,g=(t=v,function(){var e,n=y(t);if(d()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return p(this,e)});function v(){return s(this,v),g.apply(this,arguments)}return n=v,(c=[{key:"getTwoClickPolygon",value:function(e,t,n){var c=Math.min(e[0],t[0]),l=Math.min(e[1],t[1]),s=Math.max(e[0],t[0]),f=Math.max(e[1],t[1]),p=(0,r.default)([c,l,s,f]).geometry.coordinates[0],d=(0,u.getIntermediatePosition)(e,t),y=Math.max((0,o.default)((0,a.point)(p[0]),(0,a.point)(p[1])),.001),h=Math.max((0,o.default)((0,a.point)(p[0]),(0,a.point)(p[3])),.001);return(0,i.default)(d,y,h)}}])&&f(n.prototype,c),l&&f(n,l),v}(n("MMIt").TwoClickPolygonMode);t.DrawEllipseByBoundingBoxMode=g},zx9D:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=n("1Y5v"),i=(r=n("KER3"))&&r.__esModule?r:{default:r},a=n("wHih");function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(){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(e){return!1}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(y,e);var t,n,r,i,u=(t=y,function(){var e,n=p(t);if(f()){var r=p(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return s(this,e)});function y(){return c(this,y),u.apply(this,arguments)}return n=y,(r=[{key:"handleClick",value:function(e,t){var n=e.mapCoords,r=e.screenCoords,i=e.picks&&e.picks[0]&&e.picks[0].object;if(i&&(0,a.isNumeric)(i.featureIndex)){var u=i.featureIndex,c=this.getSelectedFeature(t,u);t.onSelect({selectedFeature:c,selectedFeatureIndex:u,selectedEditHandleIndex:i.type===o.ELEMENT_TYPE.EDIT_HANDLE?i.index:null,mapCoords:n,screenCoords:r})}else t.onSelect({selectedFeature:null,selectedFeatureIndex:null,selectedEditHandleIndex:null,mapCoords:n,screenCoords:r})}}])&&l(n.prototype,r),i&&l(n,i),y}(i.default);t.default=y}}]);