i.x?n.x:i.x,h=n.y>i.y?n.y:i.y,f=((o>l?o:l)+(ac?s:c)+(u0&&s>0||o<0&&s<0)return t.NO_INTERSECTION;var a=at.orientationIndex(i,r,e),u=at.orientationIndex(i,r,n);return a>0&&u>0||a<0&&u<0?t.NO_INTERSECTION:0===o&&0===s&&0===a&&0===u?this.computeCollinearIntersection(e,n,i,r):(0===o||0===s||0===a||0===u?(this._isProper=!1,e.equals2D(i)||e.equals2D(r)?this._intPt[0]=e:n.equals2D(i)||n.equals2D(r)?this._intPt[0]=n:0===o?this._intPt[0]=new C(i):0===s?this._intPt[0]=new C(r):0===a?this._intPt[0]=new C(e):0===u&&(this._intPt[0]=new C(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,i,r)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,i){var r=t,o=at.distancePointLine(t,n,i),s=at.distancePointLine(e,n,i);return s0?n>0?-r:r:n>0?r:-r;if(0===e||0===n)return i>0?t>0?r:-r:t>0?-r:r;if(e>0?i>0?e<=i||(r=-r,o=t,t=n,n=o,o=e,e=i,i=o):e<=-i?(r=-r,n=-n,i=-i):(o=t,t=-n,n=o,o=e,e=-i,i=o):i>0?-e<=i?(r=-r,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,n=-n,i=-i):(r=-r,o=-t,t=-n,n=o,o=-e,e=-i,i=o),t>0){if(!(n>0))return r;if(!(t<=n))return r}else{if(n>0)return-r;if(!(t>=n))return-r;r=-r,t=-t,n=-n}for(;;){if((i-=(s=Math.floor(n/t))*e)<0)return-r;if(i>e)return r;if(t>(n-=s*t)+n){if(ei+i)return-r;n=t-n,i=e-i,r=-r}if(0===i)return 0===n?0:-r;if(0===n)return r;if((e-=(s=Math.floor(t/n))*i)<0)return r;if(e>i)return-r;if(n>(t-=s*n)+t){if(ie+e)return r;t=n-t,e=i-e,r=-r}if(0===e)return 0===t?0:r;if(0===t)return-r}};var st=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};st.prototype.countSegment=function(t,e){if(t.xi&&(n=e.x,i=t.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var r=t.x-this._p.x,o=t.y-this._p.y,s=e.x-this._p.x,a=e.y-this._p.y,u=ot.signOfDet2x2(r,o,s,a);if(0===u)return this._isPointOnSegment=!0,null;a0&&this._crossingCount++}},st.prototype.isPointInPolygon=function(){return this.getLocation()!==L.EXTERIOR},st.prototype.getLocation=function(){return this._isPointOnSegment?L.BOUNDARY:this._crossingCount%2==1?L.INTERIOR:L.EXTERIOR},st.prototype.isOnSegment=function(){return this._isPointOnSegment},st.prototype.interfaces_=function(){return[]},st.prototype.getClass=function(){return st},st.locatePointInRing=function(){if(arguments[0]instanceof C&&R(arguments[1],U)){for(var t=arguments[1],e=new st(arguments[0]),n=new C,i=new C,r=1;r1||a<0||a>1)&&(r=!0)}}else r=!0;return r?O.min(at.distancePointLine(t,n,i),at.distancePointLine(e,n,i),at.distancePointLine(n,t,e),at.distancePointLine(i,t,e)):0},at.isPointInRing=function(t,e){return at.locatePointInRing(t,e)!==L.EXTERIOR},at.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new C;t.getCoordinate(0,i);for(var r=i.x,o=i.y,s=1;sn.y&&(n=o,i=r)}var s=i;do{(s-=1)<0&&(s=e)}while(t[s].equals2D(n)&&s!==i);var a=i;do{a=(a+1)%e}while(t[a].equals2D(n)&&a!==i);var u=t[s],l=t[a];if(u.equals2D(n)||l.equals2D(n)||u.equals2D(l))return!1;var c=at.computeOrientation(u,n,l);return 0===c?u.x>l.x:c>0},at.locatePointInRing=function(t,e){return st.locatePointInRing(t,e)},at.distancePointLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),r=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(r)*Math.sqrt(i)},at.computeOrientation=function(t,e,n){return at.orientationIndex(t,e,n)},at.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new m("Line array must contain at least one vertex");for(var n=t.distance(e[0]),i=0;i=1)return o.distance(a);var c=((s.y-o.y)*(a.x-s.x)-(s.x-o.x)*(a.y-s.y))/u;return Math.abs(c)*Math.sqrt(u)}},at.isOnLine=function(t,e){for(var n=new rt,i=1;i0},_t.prototype.interfaces_=function(){return[gt]},_t.prototype.getClass=function(){return _t};var mt=function(){};mt.prototype.isInBoundary=function(t){return t>1},mt.prototype.interfaces_=function(){return[gt]},mt.prototype.getClass=function(){return mt};var vt=function(){};vt.prototype.isInBoundary=function(t){return 1===t},vt.prototype.interfaces_=function(){return[gt]},vt.prototype.getClass=function(){return vt};var Et=function(){};Et.prototype.add=function(){},Et.prototype.addAll=function(){},Et.prototype.isEmpty=function(){},Et.prototype.iterator=function(){},Et.prototype.size=function(){},Et.prototype.toArray=function(){},Et.prototype.remove=function(){},(n.prototype=new Error).name="IndexOutOfBoundsException";var xt=function(){};xt.prototype.hasNext=function(){},xt.prototype.next=function(){},xt.prototype.remove=function(){};var It=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(Et);(i.prototype=new Error).name="NoSuchElementException";var Nt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof Et&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,Et]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},e.prototype.iterator=function(){return new Ct(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new n;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e=1&&this.get(this.size()-1).equals2D(r))return null;t.prototype.add.call(this,r)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],s=arguments[1];return this.add(o,s),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var a=arguments[0],u=arguments[1];if(arguments[2])for(var l=0;l=0;c--)this.add(a[c],u);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof C){var p=arguments[0],h=arguments[1];if(!arguments[2]){var f=this.size();if(f>0){if(p>0&&this.get(p-1).equals2D(h))return null;if(p_&&(m=-1);for(var v=d;v!==_;v+=m)this.add(g[v],y);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new C(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(Nt),St=function(){},wt={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};wt.ForwardComparator.get=function(){return Lt},wt.BidirectionalComparator.get=function(){return Pt},wt.coordArrayType.get=function(){return new Array(0).fill(null)},St.prototype.interfaces_=function(){return[]},St.prototype.getClass=function(){return St},St.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},St.ptNotInList=function(t,e){for(var n=0;n=t?e:[]},St.indexOf=function(t,e){for(var n=0;n0)&&(e=t[n]);return e},St.extract=function(t,e,n){e=O.clamp(e,0,t.length);var i=(n=O.clamp(n,-1,t.length))-e+1;n<0&&(i=0),e>=t.length&&(i=0),ni.length)return 1;if(0===n.length)return 0;var r=St.compare(n,i);return St.isEqualReversed(n,i)?0:r},Pt.prototype.OLDcompare=function(t,e){var n=t,i=e;if(n.lengthi.length)return 1;if(0===n.length)return 0;for(var r=St.increasingDirection(n),o=St.increasingDirection(i),s=r>0?0:n.length-1,a=o>0?0:n.length-1,u=0;u0))return e.value;e=e.right}}return null},p.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Dt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,i,r=this.root_;do{if(n=r,(i=t.compareTo(r.key))<0)r=r.left;else{if(!(i>0)){var o=r.value;return r.value=e,o}r=r.right}}while(null!==r);var s={key:t,left:null,right:null,value:e,parent:n,color:Dt,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null},p.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(a(t)===l(a(a(t)))){var e=c(a(a(t)));1===s(e)?(u(a(t),Dt),u(e,Dt),u(a(a(t)),1),t=a(a(t))):(t===c(a(t))&&(t=a(t),this.rotateLeft(t)),u(a(t),Dt),u(a(a(t)),1),this.rotateRight(a(a(t))))}else{var n=l(a(a(t)));1===s(n)?(u(a(t),Dt),u(n,Dt),u(a(a(t)),1),t=a(a(t))):(t===l(a(t))&&(t=a(t),this.rotateRight(t)),u(a(t),Dt),u(a(a(t)),1),this.rotateLeft(a(a(t))))}this.root_.color=Dt},p.prototype.values=function(){var t=new Nt,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=p.successor(e));)t.add(e.value);return t},p.prototype.entrySet=function(){var t=new Tt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=p.successor(e));)t.add(e);return t},p.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},p.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},p.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},p.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,i=t;null!==n&&i===n.right;)i=n,n=n.parent;return n},p.prototype.size=function(){return this.size_};var Mt=function(){};Mt.prototype.interfaces_=function(){return[]},Mt.prototype.getClass=function(){return Mt},h.prototype=new o,(f.prototype=new h).contains=function(t){for(var e=0,n=this.array_.length;e=0;){var s=r.substring(0,o);i.add(s),o=(r=r.substring(o+n)).indexOf(e)}r.length>0&&i.add(r);for(var a=new Array(i.size()).fill(null),u=0;u0)for(var o=r;o0&&i.append(" ");for(var o=0;o0&&i.append(","),i.append(jt.toString(t.getOrdinate(r,o)))}return i.append(")"),i.toString()}},Wt.ensureValidRing=function(t,e){var n=e.size();return 0===n?e:n<=3?Wt.createClosedRing(t,e,4):e.getOrdinate(0,U.X)===e.getOrdinate(n-1,U.X)&&e.getOrdinate(0,U.Y)===e.getOrdinate(n-1,U.Y)?e:Wt.createClosedRing(t,e,n+1)},Wt.createClosedRing=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();Wt.copy(e,0,i,0,r);for(var o=r;o0&&Wt.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Bt.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return at.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();return Wt.reverse(t),this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){if(1===arguments.length){for(var t=arguments[0],e=0,n=0;e= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e=1&&this.getCoordinateSequence().size()= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Zt),ne=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n0?e.createPoint(n[0]):e.createPoint():t},se.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},se.prototype.getClass=function(){return se};var ae=function(){};ae.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Zt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Jt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},ae.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var ue=function(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var e=0;e0){var t=new A(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e3&&(e=3),e<2?new ue(t):new ue(t,e)}},ce.prototype.interfaces_=function(){return[w,e]},ce.prototype.getClass=function(){return ce},ce.instance=function(){return ce.instanceObject},pe.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},pe.instanceObject.get=function(){return new ce},Object.defineProperties(ce,pe);var he=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new Nt,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},e.prototype.entrySet=function(){var t=new Tt;return this.map_.entries().forEach((function(e){return t.add(e)})),t},e.prototype.size=function(){return this.map_.size()},e}(Rt),fe=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof ye){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var i=arguments[0];this._modelType=i._modelType,this._scale=i._scale}},ge={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};fe.prototype.equals=function(t){if(!(t instanceof fe))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},fe.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new D(n).compareTo(new D(i))},fe.prototype.getScale=function(){return this._scale},fe.prototype.isFloating=function(){return this._modelType===fe.FLOATING||this._modelType===fe.FLOATING_SINGLE},fe.prototype.getType=function(){return this._modelType},fe.prototype.toString=function(){var t="UNKNOWN";return this._modelType===fe.FLOATING?t="Floating":this._modelType===fe.FLOATING_SINGLE?t="Floating-Single":this._modelType===fe.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},fe.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return v.isNaN(t)||this._modelType===fe.FLOATING_SINGLE?t:this._modelType===fe.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof C){var e=arguments[0];if(this._modelType===fe.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},fe.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===fe.FLOATING?t=16:this._modelType===fe.FLOATING_SINGLE?t=6:this._modelType===fe.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},fe.prototype.setScale=function(t){this._scale=Math.abs(t)},fe.prototype.interfaces_=function(){return[e,x]},fe.prototype.getClass=function(){return fe},fe.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},ge.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},ge.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(fe,ge);var ye=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},de={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ye.prototype.readResolve=function(){return ye.nameToTypeMap.get(this._name)},ye.prototype.toString=function(){return this._name},ye.prototype.interfaces_=function(){return[e]},ye.prototype.getClass=function(){return ye},de.serialVersionUID.get=function(){return-552860263173159e4},de.nameToTypeMap.get=function(){return new he},Object.defineProperties(ye,de),fe.Type=ye,fe.FIXED=new ye("FIXED"),fe.FLOATING=new ye("FLOATING"),fe.FLOATING_SINGLE=new ye("FLOATING SINGLE");var _e=function t(){this._precisionModel=new fe,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?R(arguments[0],w)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof fe&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},me={serialVersionUID:{configurable:!0}};_e.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new C(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new C(t.getMinX(),t.getMinY()),new C(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new C(t.getMinX(),t.getMinY()),new C(t.getMinX(),t.getMaxY()),new C(t.getMaxX(),t.getMaxY()),new C(t.getMaxX(),t.getMinY()),new C(t.getMinX(),t.getMinY())]),null)},_e.prototype.createLineString=function(t){return t?t instanceof Array?new Zt(this.getCoordinateSequenceFactory().create(t),this):R(t,U)?new Zt(t,this):void 0:new Zt(this.getCoordinateSequenceFactory().create([]),this)},_e.prototype.createMultiLineString=function(){return 0===arguments.length?new Vt(null,this):1===arguments.length?new Vt(arguments[0],this):void 0},_e.prototype.buildGeometry=function(t){for(var e=null,n=!1,i=!1,r=t.iterator();r.hasNext();){var o=r.next(),s=o.getClass();null===e&&(e=s),s!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(null===e)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(_e.toGeometryArray(t));var a=t.iterator().next();if(t.size()>1){if(a instanceof $t)return this.createMultiPolygon(_e.toPolygonArray(t));if(a instanceof Zt)return this.createMultiLineString(_e.toLineStringArray(t));if(a instanceof Jt)return this.createMultiPoint(_e.toPointArray(t));et.shouldNeverReachHere("Unhandled class: "+a.getClass().getName())}return a},_e.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},_e.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(R(arguments[0],U))return new Jt(arguments[0],this)}},_e.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},_e.prototype.createPolygon=function(){if(0===arguments.length)return new $t(null,null,this);if(1===arguments.length){if(R(arguments[0],U)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof ee){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length)return new $t(arguments[0],arguments[1],this)},_e.prototype.getSRID=function(){return this._SRID},_e.prototype.createGeometryCollection=function(){return 0===arguments.length?new zt(null,this):1===arguments.length?new zt(arguments[0],this):void 0},_e.prototype.createGeometry=function(t){return new ie(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},_e.prototype.getPrecisionModel=function(){return this._precisionModel},_e.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(R(arguments[0],U))return new ee(arguments[0],this)}},_e.prototype.createMultiPolygon=function(){return 0===arguments.length?new ne(null,this):1===arguments.length?new ne(arguments[0],this):void 0},_e.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array)return new te(arguments[0],this);if(arguments[0]instanceof Array){var t=arguments[0];return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(R(arguments[0],U)){var e=arguments[0];if(null===e)return this.createMultiPoint(new Array(0).fill(null));for(var n=new Array(e.size()).fill(null),i=0;i=this.size())throw new Error;return this.array_[t]},d.prototype.push=function(t){return this.array_.push(t),t},d.prototype.pop=function(t){if(0===this.array_.length)throw new y;return this.array_.pop()},d.prototype.peek=function(){if(0===this.array_.length)throw new y;return this.array_[this.array_.length-1]},d.prototype.empty=function(){return 0===this.array_.length},d.prototype.isEmpty=function(){return this.empty()},d.prototype.search=function(t){return this.array_.indexOf(t)},d.prototype.size=function(){return this.array_.length},d.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&i===at.CLOCKWISE)&&(r=!0),r&&(this._minIndex=this._minIndex-1)},we.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var i=be.LEFT;return n[e].ythis._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},we.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},we.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}et.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===be.LEFT&&(this._orientedDe=this._minDe.getSym())},we.prototype.interfaces_=function(){return[]},we.prototype.getClass=function(){return we};var Le=function(t){function e(n,i){t.call(this,e.msgWithCoord(n,i)),this.pt=i?new C(i):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},e}($),Pe=function(){this.array_=[]};Pe.prototype.addLast=function(t){this.array_.push(t)},Pe.prototype.removeFirst=function(){return this.array_.shift()},Pe.prototype.isEmpty=function(){return 0===this.array_.length};var Re=function(){this._finder=null,this._dirEdgeList=new Nt,this._nodes=new Nt,this._rightMostCoord=null,this._env=null,this._finder=new we};Re.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},Re.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Re.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var i=n.next();if(i.isVisited()||i.getSym().isVisited()){e=i;break}}if(null===e)throw new Le("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var r=t.getEdges().iterator();r.hasNext();){var o=r.next();o.setVisited(!0),this.copySymDepths(o)}},Re.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(be.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Re.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Re.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(be.RIGHT)>=1&&e.getDepth(be.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Re.prototype.computeDepths=function(t){var e=new Tt,n=new Pe,i=t.getNode();for(n.addLast(i),e.add(i),t.setVisited(!0);!n.isEmpty();){var r=n.removeFirst();e.add(r),this.computeNodeDepth(r);for(var o=r.getEdges().iterator();o.hasNext();){var s=o.next().getSym();if(!s.isVisited()){var a=s.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}},Re.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0},Re.prototype.getEnvelope=function(){if(null===this._env){for(var t=new j,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),i=0;ithis.location.length){var e=new Array(3).fill(null);e[be.ON]=this.location[be.ON],e[be.LEFT]=L.NONE,e[be.RIGHT]=L.NONE,this.location=e}for(var n=0;n1&&t.append(L.toLocationSymbol(this.location[be.LEFT])),t.append(L.toLocationSymbol(this.location[be.ON])),this.location.length>1&&t.append(L.toLocationSymbol(this.location[be.RIGHT])),t.toString()},Oe.prototype.setLocations=function(t,e,n){this.location[be.ON]=t,this.location[be.LEFT]=e,this.location[be.RIGHT]=n},Oe.prototype.get=function(t){return t1},Oe.prototype.isAnyNull=function(){for(var t=0;tthis._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},Ae.prototype.addPoints=function(t,e,n){var i=t.getCoordinates();if(e){var r=1;n&&(r=0);for(var o=r;o=0;a--)this._pts.add(i[a])}},Ae.prototype.isHole=function(){return this._isHole},Ae.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},Ae.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!at.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(t))return!1;return!0},Ae.prototype.addHole=function(t){this._holes.add(t)},Ae.prototype.isShell=function(){return null===this._shell},Ae.prototype.getLabel=function(){return this._label},Ae.prototype.getEdges=function(){return this._edges},Ae.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Ae.prototype.getShell=function(){return this._shell},Ae.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[1],n=arguments[0].getLocation(e,be.RIGHT);if(n===L.NONE)return null;if(this._label.getLocation(e)===L.NONE)return this._label.setLocation(e,n),null}},Ae.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},Ae.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n=2,"found partial label"),this.computeIM(t)},Fe.prototype.isInResult=function(){return this._isInResult},Fe.prototype.isVisited=function(){return this._isVisited},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe};var Ge=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Te(0,L.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var n=L.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var i=t.getLocation(e);n!==L.BOUNDARY&&(n=i)}return n},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new Te(e,n):this._label.setLocation(e,n)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){if(arguments[0]instanceof e){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof Te)for(var n=arguments[0],i=0;i<2;i++){var r=this.computeMergedLocation(n,i);this._label.getLocation(i)===L.NONE&&this._label.setLocation(i,r)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=L.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case L.BOUNDARY:n=L.INTERIOR;break;case L.INTERIOR:default:n=L.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Fe),Be=function(){this.nodeMap=new p,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Be.prototype.find=function(t){return this.nodeMap.get(t)},Be.prototype.addNode=function(){if(arguments[0]instanceof C){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Ge){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return null===i?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},Be.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},Be.prototype.iterator=function(){return this.nodeMap.values().iterator()},Be.prototype.values=function(){return this.nodeMap.values()},Be.prototype.getBoundaryNodes=function(t){for(var e=new Nt,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(t)===L.BOUNDARY&&e.add(i)}return e},Be.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be};var qe=function(){},Ue={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe},qe.isNorthern=function(t){return t===qe.NE||t===qe.NW},qe.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},qe.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=te?t:e)?3:n},qe.isInHalfPlane=function(t,e){return e===qe.SE?t===qe.SE||t===qe.SW:t===e||t===e+1},qe.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new m("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?qe.NE:qe.SE:e>=0?qe.NW:qe.SW}if(arguments[0]instanceof C&&arguments[1]instanceof C){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new m("Cannot compute the quadrant for two identical points "+n);return i.x>=n.x?i.y>=n.y?qe.NE:qe.SE:i.y>=n.y?qe.NW:qe.SW}},Ue.NE.get=function(){return 0},Ue.NW.get=function(){return 1},Ue.SW.get=function(){return 2},Ue.SE.get=function(){return 3},Object.defineProperties(qe,Ue);var ke=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];this._edge=e,this.init(n,i),this._label=null}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this._edge=r,this.init(o,s),this._label=a}};ke.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant2){o.linkDirectedEdgesForMinimalEdgeRings();var s=o.buildMinimalRings(),a=this.findShell(s);null!==a?(this.placePolygonHoles(a,s),e.add(a)):n.addAll(s)}else i.add(o)}return i},Xe.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();)if(e.next().containsPoint(t))return!0;return!1},Xe.prototype.buildMaximalEdgeRings=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next();if(i.isInResult()&&i.getLabel().isArea()&&null===i.getEdgeRing()){var r=new Me(i,this._geometryFactory);e.add(r),r.setInResult()}}return e},Xe.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(t)}},Xe.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},Xe.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),i=n.getEnvelopeInternal(),r=n.getCoordinateN(0),o=null,s=null,a=e.iterator();a.hasNext();){var u=a.next(),l=u.getLinearRing(),c=l.getEnvelopeInternal();null!==o&&(s=o.getLinearRing().getEnvelopeInternal());var p=!1;c.contains(i)&&at.isPointInRing(r,l.getCoordinates())&&(p=!0),p&&(null===o||s.contains(c))&&(o=u)}return o},Xe.prototype.findShell=function(t){for(var e=0,n=null,i=t.iterator();i.hasNext();){var r=i.next();r.isHole()||(n=r,e++)}return et.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},Xe.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];Ye.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(e),r=new Nt,o=this.buildMinimalEdgeRings(i,this._shellList,r);this.sortShellsAndHoles(o,this._shellList,r),this.placeFreeHoles(this._shellList,r)}},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var je=function(){};je.prototype.getBounds=function(){},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var He=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};He.prototype.getItem=function(){return this._item},He.prototype.getBounds=function(){return this._bounds},He.prototype.interfaces_=function(){return[je,e]},He.prototype.getClass=function(){return He};var We=function(){this._size=null,this._items=null,this._size=0,this._items=new Nt,this._items.add(null)};We.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},We.prototype.size=function(){return this._size},We.prototype.reorder=function(t){for(var e=null,n=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(n)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,n)},We.prototype.clear=function(){this._size=0,this._items.clear()},We.prototype.isEmpty=function(){return 0===this._size},We.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},We.prototype.interfaces_=function(){return[]},We.prototype.getClass=function(){return We};var Ze=function(){};Ze.prototype.visitItem=function(t){},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze};var Ke=function(){};Ke.prototype.insert=function(t,e){},Ke.prototype.remove=function(t,e){},Ke.prototype.query=function(){},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var Je=function(){if(this._childBoundables=new Nt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},Qe={serialVersionUID:{configurable:!0}};Je.prototype.getLevel=function(){return this._level},Je.prototype.size=function(){return this._childBoundables.size()},Je.prototype.getChildBoundables=function(){return this._childBoundables},Je.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},Je.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Je.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Je.prototype.interfaces_=function(){return[je,e]},Je.prototype.getClass=function(){return Je},Qe.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Je,Qe);var $e=function(){};$e.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},$e.min=function(t){return $e.sort(t),t.get(0)},$e.sort=function(t,e){var n=t.toArray();e?Gt.sort(n,e):Gt.sort(n);for(var i=t.iterator(),r=0,o=n.length;rtn.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new m("neither boundable is composite")},tn.prototype.isLeaves=function(){return!(tn.isComposite(this._boundable1)||tn.isComposite(this._boundable2))},tn.prototype.compareTo=function(t){var e=t;return this._distancee._distance?1:0},tn.prototype.expand=function(t,e,n,i){for(var r=t.getChildBoundables().iterator();r.hasNext();){var o=r.next(),s=new tn(o,e,this._itemDistance);s.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},nn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};en.prototype.getNodeCapacity=function(){return this._nodeCapacity},en.prototype.lastNode=function(t){return t.get(t.size()-1)},en.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();n instanceof Je?t+=this.size(n):n instanceof He&&(t+=1)}return t}},en.prototype.removeItem=function(t,e){for(var n=null,i=t.getChildBoundables().iterator();i.hasNext();){var r=i.next();r instanceof He&&r.getItem()===e&&(n=r)}return null!==n&&(t.getChildBoundables().remove(n),!0)},en.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new Nt:t}if(1===arguments.length){for(var e=arguments[0],n=new Nt,i=e.getChildBoundables().iterator();i.hasNext();){var r=i.next();if(r instanceof Je){var o=this.itemsTree(r);null!==o&&n.add(o)}else r instanceof He?n.add(r.getItem()):et.shouldNeverReachHere()}return n.size()<=0?null:n}},en.prototype.insert=function(t,e){et.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new He(t,e))},en.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new Nt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];if(et.isTrue(n>-2),i.getLevel()===n)return r.add(i),null;for(var o=i.getChildBoundables().iterator();o.hasNext();){var s=o.next();s instanceof Je?this.boundablesAtLevel(n,s,r):(et.isTrue(s instanceof He),-1===n&&r.add(s))}return null}},en.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new Nt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e}if(2===arguments.length){var n=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,i)}else if(3===arguments.length)if(R(arguments[2],Ze)&&arguments[0]instanceof Object&&arguments[1]instanceof Je)for(var r=arguments[0],o=arguments[2],s=arguments[1].getChildBoundables(),a=0;at&&(t=i)}}return t+1}},en.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var n=new Nt;n.add(this.createNode(e));var i=new Nt(t);$e.sort(i,this.getComparator());for(var r=i.iterator();r.hasNext();){var o=r.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},en.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},en.prototype.interfaces_=function(){return[e]},en.prototype.getClass=function(){return en},en.compareDoubles=function(t,e){return t>e?1:t0);for(var n=new Nt,i=0;i0;){var p=c.poll(),h=p.getDistance();if(h>=u)break;p.isLeaves()?(u=h,l=p):p.expandToQueue(c,u)}return[l.getBoundable(0).getItem(),l.getBoundable(1).getItem()]}}else if(3===arguments.length){var f=arguments[2],g=new He(arguments[0],arguments[1]),y=new tn(this.getRoot(),g,f);return this.nearestNeighbour(y)[0]}},n.prototype.interfaces_=function(){return[Ke,e]},n.prototype.getClass=function(){return n},n.centreX=function(t){return n.avg(t.getMinX(),t.getMaxX())},n.avg=function(t,e){return(t+e)/2},n.centreY=function(t){return n.avg(t.getMinY(),t.getMaxY())},i.STRtreeNode.get=function(){return an},i.serialVersionUID.get=function(){return 0x39920f7d5f261e0},i.xComparator.get=function(){return{interfaces_:function(){return[N]},compare:function(e,i){return t.compareDoubles(n.centreX(e.getBounds()),n.centreX(i.getBounds()))}}},i.yComparator.get=function(){return{interfaces_:function(){return[N]},compare:function(e,i){return t.compareDoubles(n.centreY(e.getBounds()),n.centreY(i.getBounds()))}}},i.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},i.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,i),n}(en),an=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new j(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Je),un=function(){};un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un},un.relativeSign=function(t,e){return te?1:0},un.compare=function(t,e,n){if(e.equals2D(n))return 0;var i=un.relativeSign(e.x,n.x),r=un.relativeSign(e.y,n.y);switch(t){case 0:return un.compareValue(i,r);case 1:return un.compareValue(r,i);case 2:return un.compareValue(r,-i);case 3:return un.compareValue(-i,r);case 4:return un.compareValue(-i,-r);case 5:return un.compareValue(-r,-i);case 6:return un.compareValue(-r,i);case 7:return un.compareValue(i,-r)}return et.shouldNeverReachHere("invalid octant value"),0},un.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var ln=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._segString=t,this.coord=new C(e),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(n))};ln.prototype.getCoordinate=function(){return this.coord},ln.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},ln.prototype.compareTo=function(t){var e=t;return this.segmentIndexe.segmentIndex?1:this.coord.equals2D(e.coord)?0:un.compare(this._segmentOctant,this.coord,e.coord)},ln.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},ln.prototype.isInterior=function(){return this._isInterior},ln.prototype.interfaces_=function(){return[x]},ln.prototype.getClass=function(){return ln};var cn=function(){this._nodeMap=new p,this._edge=null;var t=arguments[0];this._edge=t};cn.prototype.getSplitCoordinates=function(){var t=new bt;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next();this.addEdgeCoordinates(n,i,t),n=i}return t.toCoordinateArray()},cn.prototype.addCollapsedNodes=function(){var t=new Nt;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},cn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},cn.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e=0?e>=0?n>=i?0:1:n>=i?7:6:e>=0?n>=i?3:2:n>=i?4:5}if(arguments[0]instanceof C&&arguments[1]instanceof C){var r=arguments[0],o=arguments[1],s=o.x-r.x,a=o.y-r.y;if(0===s&&0===a)throw new m("Cannot compute the octant for two identical points "+r);return pn.octant(s,a)}};var hn=function(){};hn.prototype.getCoordinates=function(){},hn.prototype.size=function(){},hn.prototype.getCoordinate=function(t){},hn.prototype.isClosed=function(){},hn.prototype.setData=function(t){},hn.prototype.getData=function(){},hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn};var fn=function(){};fn.prototype.addIntersection=function(t,e){},fn.prototype.interfaces_=function(){return[hn]},fn.prototype.getClass=function(){return fn};var gn=function(){this._nodeList=new cn(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};gn.prototype.getCoordinates=function(){return this._pts},gn.prototype.size=function(){return this._pts.length},gn.prototype.getCoordinate=function(t){return this._pts[t]},gn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},gn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},gn.prototype.setData=function(t){this._data=t},gn.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:pn.octant(t,e)},gn.prototype.getData=function(){return this._data},gn.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[1],i=arguments[3],r=new C(arguments[0].getIntersection(i));this.addIntersection(r,n)}},gn.prototype.toString=function(){return Q.toLineString(new ue(this._pts))},gn.prototype.getNodeList=function(){return this._nodeList},gn.prototype.addIntersectionNode=function(t,e){var n=e,i=n+1;if(i=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof C){var i=arguments[0];return at.orientationIndex(this.p0,this.p1,i)}},yn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},yn.prototype.isVertical=function(){return this.p0.x===this.p1.x},yn.prototype.equals=function(t){if(!(t instanceof yn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},yn.prototype.intersection=function(t){var e=new rt;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},yn.prototype.project=function(){if(arguments[0]instanceof C){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new C(t);var e=this.projectionFactor(t),n=new C;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof yn){var i=arguments[0],r=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(r>=1&&o>=1)return null;if(r<=0&&o<=0)return null;var s=this.project(i.p0);r<0&&(s=this.p0),r>1&&(s=this.p1);var a=this.project(i.p1);return o<0&&(a=this.p0),o>1&&(a=this.p1),new yn(s,a)}},yn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},yn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},yn.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},yn.prototype.distancePerpendicular=function(t){return at.distancePointLinePerpendicular(t,this.p0,this.p1)},yn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},yn.prototype.midPoint=function(){return yn.midPoint(this.p0,this.p1)},yn.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;return i<=0?v.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i},yn.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),i=v.MAX_VALUE,r=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),n[0]=o,n[1]=t.p0;var s=this.closestPoint(t.p1);(r=s.distance(t.p1))0&&e<1?this.project(t):this.p0.distance(t)1||v.isNaN(e))&&(e=1),e},yn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},yn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},yn.prototype.distance=function(){if(arguments[0]instanceof yn){var t=arguments[0];return at.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof C){var e=arguments[0];return at.distancePointLine(e,this.p0,this.p1)}},yn.prototype.pointAlong=function(t){var e=new C;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},yn.prototype.hashCode=function(){var t=v.doubleToLongBits(this.p0.x);t^=31*v.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=v.doubleToLongBits(this.p1.x);return n^=31*v.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)},yn.prototype.interfaces_=function(){return[x,e]},yn.prototype.getClass=function(){return yn},yn.midPoint=function(t,e){return new C((t.x+e.x)/2,(t.y+e.y)/2)},dn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(yn,dn);var _n=function(){this.tempEnv1=new j,this.tempEnv2=new j,this._overlapSeg1=new yn,this._overlapSeg2=new yn};_n.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[1],e=arguments[2],n=arguments[3];arguments[0].getLineSegment(t,this._overlapSeg1),e.getLineSegment(n,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n};var mn=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i};mn.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},mn.prototype.computeSelect=function(t,e,n,i){var r=this._pts[e],o=this._pts[n];if(i.tempEnv1.init(r,o),n-e==1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var s=Math.trunc((e+n)/2);e=t.length-1)return t.length-1;for(var i=qe.quadrant(t[n],t[n+1]),r=e+1;rn.getId()&&(n.computeOverlaps(r,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return Nn},Object.defineProperties(e,n),e}(xn),Nn=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[1],n=arguments[2],i=arguments[3],r=arguments[0].getContext(),o=n.getContext();this._si.processIntersections(r,e,o,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(_n),Cn=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(i)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this.setQuadrantSegments(r),this.setEndCapStyle(o),this.setJoinStyle(s),this.setMitreLimit(a)}},bn={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Cn.prototype.getEndCapStyle=function(){return this._endCapStyle},Cn.prototype.isSingleSided=function(){return this._isSingleSided},Cn.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=Cn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Cn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Cn.JOIN_ROUND&&(this._quadrantSegments=Cn.DEFAULT_QUADRANT_SEGMENTS)},Cn.prototype.getJoinStyle=function(){return this._joinStyle},Cn.prototype.setJoinStyle=function(t){this._joinStyle=t},Cn.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},Cn.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Cn.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Cn.prototype.setEndCapStyle=function(t){this._endCapStyle=t},Cn.prototype.getMitreLimit=function(){return this._mitreLimit},Cn.prototype.setMitreLimit=function(t){this._mitreLimit=t},Cn.prototype.setSingleSided=function(t){this._isSingleSided=t},Cn.prototype.interfaces_=function(){return[]},Cn.prototype.getClass=function(){return Cn},Cn.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},bn.CAP_ROUND.get=function(){return 1},bn.CAP_FLAT.get=function(){return 2},bn.CAP_SQUARE.get=function(){return 3},bn.JOIN_ROUND.get=function(){return 1},bn.JOIN_MITRE.get=function(){return 2},bn.JOIN_BEVEL.get=function(){return 3},bn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},bn.DEFAULT_MITRE_LIMIT.get=function(){return 5},bn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Cn,bn);var Sn=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=at.COUNTERCLOCKWISE,this._inputLine=t||null},wn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Sn.prototype.isDeletable=function(t,e,n,i){var r=this._inputLine[t],o=this._inputLine[e],s=this._inputLine[n];return!!this.isConcave(r,o,s)&&!!this.isShallow(r,o,s,i)&&this.isShallowSampled(r,o,t,n,i)},Sn.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),i=!1;n=0;i--)this.addPt(t[i])},Ln.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)Math.PI;)t-=Rn.PI_TIMES_2;for(;t<=-Math.PI;)t+=Rn.PI_TIMES_2;return t},Rn.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],i=n.x-e.x,r=n.y-e.y;return Math.atan2(r,i)}},Rn.isAcute=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)>0},Rn.isObtuse=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)<0},Rn.interiorAngle=function(t,e,n){var i=Rn.angle(e,t),r=Rn.angle(e,n);return Math.abs(r-i)},Rn.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Rn.PI_TIMES_2;t>=Rn.PI_TIMES_2&&(t=0)}else{for(;t>=Rn.PI_TIMES_2;)t-=Rn.PI_TIMES_2;t<0&&(t=0)}return t},Rn.angleBetween=function(t,e,n){var i=Rn.angle(e,t),r=Rn.angle(e,n);return Rn.diff(i,r)},Rn.diff=function(t,e){var n=null;return(n=tMath.PI&&(n=2*Math.PI-n),n},Rn.toRadians=function(t){return t*Math.PI/180},Rn.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Rn.COUNTERCLOCKWISE:n<0?Rn.CLOCKWISE:Rn.NONE},Rn.angleBetweenOriented=function(t,e,n){var i=Rn.angle(e,t),r=Rn.angle(e,n)-i;return r<=-Math.PI?r+Rn.PI_TIMES_2:r>Math.PI?r-Rn.PI_TIMES_2:r},On.PI_TIMES_2.get=function(){return 2*Math.PI},On.PI_OVER_2.get=function(){return Math.PI/2},On.PI_OVER_4.get=function(){return Math.PI/4},On.COUNTERCLOCKWISE.get=function(){return at.COUNTERCLOCKWISE},On.CLOCKWISE.get=function(){return at.CLOCKWISE},On.NONE.get=function(){return at.COLLINEAR},Object.defineProperties(Rn,On);var Tn=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new yn,this._seg1=new yn,this._offset0=new yn,this._offset1=new yn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new rt,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Cn.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(i)},An={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Tn.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=at.computeOrientation(this._s0,this._s1,this._s2),i=n===at.CLOCKWISE&&this._side===be.LEFT||n===at.COUNTERCLOCKWISE&&this._side===be.RIGHT;0===n?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Tn.prototype.addLineEndCap=function(t,e){var n=new yn(t,e),i=new yn;this.computeOffsetSegment(n,be.LEFT,this._distance,i);var r=new yn;this.computeOffsetSegment(n,be.RIGHT,this._distance,r);var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case Cn.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,a+Math.PI/2,a-Math.PI/2,at.CLOCKWISE,this._distance),this._segList.addPt(r.p1);break;case Cn.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(r.p1);break;case Cn.CAP_SQUARE:var u=new C;u.x=Math.abs(this._distance)*Math.cos(a),u.y=Math.abs(this._distance)*Math.sin(a);var l=new C(i.p1.x+u.x,i.p1.y+u.y),c=new C(r.p1.x+u.x,r.p1.y+u.y);this._segList.addPt(l),this._segList.addPt(c)}},Tn.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Tn.prototype.addMitreJoin=function(t,e,n,i){var r=!0,o=null;try{o=X.intersection(e.p0,e.p1,n.p0,n.p1),(i<=0?1:o.distance(t)/Math.abs(i))>this._bufParams.getMitreLimit()&&(r=!1)}catch(t){if(!(t instanceof V))throw t;o=new C(0,0),r=!1}r?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},Tn.prototype.addFilletCorner=function(t,e,n,i,r){var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o),u=n.x-t.x,l=n.y-t.y,c=Math.atan2(l,u);i===at.CLOCKWISE?a<=c&&(a+=2*Math.PI):a>=c&&(a-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,a,c,i,r),this._segList.addPt(n)},Tn.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)0){var n=new C((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new C((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Tn.prototype.createCircle=function(t){var e=new C(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Tn.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Tn.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Ln,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Tn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Tn.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Cn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Cn.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,at.CLOCKWISE,this._distance))},Tn.prototype.closeRing=function(){this._segList.closeRing()},Tn.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn},An.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},An.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},An.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},An.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Tn,An);var Dn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Dn.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var n=e<0,i=Math.abs(e),r=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],r):this.computeOffsetCurve(t,n,r);var o=r.getCoordinates();return n&&St.reverse(o),o},Dn.prototype.computeSingleSidedBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var r=Sn.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],be.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{n.addSegments(t,!1);var a=Sn.simplify(t,i),u=a.length-1;n.initSideSegments(a[0],a[1],be.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(a[l],!0)}n.addLastSegment(),n.closeRing()},Dn.prototype.computeRingBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);e===be.RIGHT&&(i=-i);var r=Sn.simplify(t,i),o=r.length-1;n.initSideSegments(r[o-1],r[0],e);for(var s=1;s<=o;s++){var a=1!==s;n.addNextSegment(r[s],a)}n.closeRing()},Dn.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),i=Sn.simplify(t,n),r=i.length-1;e.initSideSegments(i[0],i[1],be.LEFT);for(var o=2;o<=r;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[r-1],i[r]);var s=Sn.simplify(t,-n),a=s.length-1;e.initSideSegments(s[a],s[a-1],be.LEFT);for(var u=a-2;u>=0;u--)e.addNextSegment(s[u],!0);e.addLastSegment(),e.addLineEndCap(s[1],s[0]),e.closeRing()},Dn.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Cn.CAP_ROUND:e.createCircle(t);break;case Cn.CAP_SQUARE:e.createSquare(t)}},Dn.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),i=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var r=e<0;this.computeSingleSidedBufferCurve(t,r,i)}else this.computeLineBufferCurve(t,i);return i.getCoordinates()},Dn.prototype.getBufferParameters=function(){return this._bufParams},Dn.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Dn.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return Dn.copyCoordinates(t);var i=this.getSegGen(n);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},Dn.prototype.computeOffsetCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){var r=Sn.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],be.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{var a=Sn.simplify(t,i),u=a.length-1;n.initSideSegments(a[0],a[1],be.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(a[l],!0)}n.addLastSegment()},Dn.prototype.getSegGen=function(t){return new Tn(this._precisionModel,this._bufParams,t)},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},Dn.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;nr.getMaxY()||this.findStabbedSegments(t,i.getDirectedEdges(),e)}return e}if(3===arguments.length)if(R(arguments[2],It)&&arguments[0]instanceof C&&arguments[1]instanceof ze){for(var o=arguments[0],s=arguments[1],a=arguments[2],u=s.getEdge().getCoordinates(),l=0;lthis._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)this._seg.p1.y||at.computeOrientation(this._seg.p0,this._seg.p1,o)===at.RIGHT)){var c=s.getDepth(be.LEFT);this._seg.p0.equals(u[l])||(c=s.getDepth(be.RIGHT));var p=new Gn(this._seg,c);a.add(p)}}else if(R(arguments[2],It)&&arguments[0]instanceof C&&R(arguments[1],It))for(var h=arguments[0],f=arguments[2],g=arguments[1].iterator();g.hasNext();){var y=g.next();y.isForward()&&this.findStabbedSegments(h,y,f)}},Mn.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:$e.min(e)._leftDepth},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Fn.DepthSegment.get=function(){return Gn},Object.defineProperties(Mn,Fn);var Gn=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new yn(t),this._leftDepth=e};Gn.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n||0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},Gn.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},Gn.prototype.toString=function(){return this._upwardSeg.toString()},Gn.prototype.interfaces_=function(){return[x]},Gn.prototype.getClass=function(){return Gn};var Bn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Bn.prototype.area=function(){return Bn.area(this.p0,this.p1,this.p2)},Bn.prototype.signedArea=function(){return Bn.signedArea(this.p0,this.p1,this.p2)},Bn.prototype.interpolateZ=function(t){if(null===t)throw new m("Supplied point is null.");return Bn.interpolateZ(t,this.p0,this.p1,this.p2)},Bn.prototype.longestSideLength=function(){return Bn.longestSideLength(this.p0,this.p1,this.p2)},Bn.prototype.isAcute=function(){return Bn.isAcute(this.p0,this.p1,this.p2)},Bn.prototype.circumcentre=function(){return Bn.circumcentre(this.p0,this.p1,this.p2)},Bn.prototype.area3D=function(){return Bn.area3D(this.p0,this.p1,this.p2)},Bn.prototype.centroid=function(){return Bn.centroid(this.p0,this.p1,this.p2)},Bn.prototype.inCentre=function(){return Bn.inCentre(this.p0,this.p1,this.p2)},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn},Bn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},Bn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Bn.det=function(t,e,n,i){return t*i-e*n},Bn.interpolateZ=function(t,e,n,i){var r=e.x,o=e.y,s=n.x-r,a=i.x-r,u=n.y-o,l=i.y-o,c=s*l-a*u,p=t.x-r,h=t.y-o,f=(l*p-a*h)/c,g=(-u*p+s*h)/c;return e.z+f*(n.z-e.z)+g*(i.z-e.z)},Bn.longestSideLength=function(t,e,n){var i=t.distance(e),r=e.distance(n),o=n.distance(t),s=i;return r>s&&(s=r),o>s&&(s=o),s},Bn.isAcute=function(t,e,n){return!!Rn.isAcute(t,e,n)&&!!Rn.isAcute(e,n,t)&&!!Rn.isAcute(n,t,e)},Bn.circumcentre=function(t,e,n){var i=n.x,r=n.y,o=t.x-i,s=t.y-r,a=e.x-i,u=e.y-r,l=2*Bn.det(o,s,a,u),c=Bn.det(s,o*o+s*s,u,a*a+u*u),p=Bn.det(o,o*o+s*s,a,a*a+u*u);return new C(i-c/l,r+p/l)},Bn.perpendicularBisector=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=new X(t.x+n/2,t.y+i/2,1),o=new X(t.x-i+n/2,t.y+n+i/2,1);return new X(r,o)},Bn.angleBisector=function(t,e,n){var i=e.distance(t),r=i/(i+e.distance(n)),o=n.x-t.x,s=n.y-t.y;return new C(t.x+r*o,t.y+r*s)},Bn.area3D=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,o=e.z-t.z,s=n.x-t.x,a=n.y-t.y,u=n.z-t.z,l=r*u-o*a,c=o*s-i*u,p=i*a-r*s,h=l*l+c*c+p*p;return Math.sqrt(h)/2},Bn.centroid=function(t,e,n){var i=(t.x+e.x+n.x)/3,r=(t.y+e.y+n.y)/3;return new C(i,r)},Bn.inCentre=function(t,e,n){var i=e.distance(n),r=t.distance(n),o=t.distance(e),s=i+r+o,a=(i*t.x+r*e.x+o*n.x)/s,u=(i*t.y+r*e.y+o*n.y)/s;return new C(a,u)};var qn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Nt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};qn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,L.EXTERIOR,L.INTERIOR)},qn.prototype.addPolygon=function(t){var e=this._distance,n=be.LEFT;this._distance<0&&(e=-this._distance,n=be.RIGHT);var i=t.getExteriorRing(),r=St.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&r.length<3)return null;this.addPolygonRing(r,e,n,L.EXTERIOR,L.INTERIOR);for(var o=0;o0&&this.isErodedCompletely(s,-this._distance)||this.addPolygonRing(a,e,be.opposite(n),L.INTERIOR,L.EXTERIOR)}},qn.prototype.isTriangleErodedCompletely=function(t,e){var n=new Bn(t[0],t[1],t[2]),i=n.inCentre();return at.distancePointLine(i,n.p0,n.p1)=ee.MINIMUM_VALID_SIZE&&at.isCCW(t)&&(o=r,s=i,n=be.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,o,s)},qn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof $t?this.addPolygon(t):t instanceof Zt?this.addLineString(t):t instanceof Jt?this.addPoint(t):(t instanceof te||t instanceof Vt||t instanceof ne||t instanceof zt)&&this.addCollection(t)},qn.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),r=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>r},qn.prototype.addCollection=function(t){for(var e=0;e=this._max)throw new i;var t=this._parent.getGeometryN(this._index++);return t instanceof zt?(this._subcollectionIterator=new kn(t),this._subcollectionIterator.next()):t},kn.prototype.remove=function(){throw new Error(this.getClass().getName())},kn.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},kn.prototype.interfaces_=function(){return[xt]},kn.prototype.getClass=function(){return kn},kn.isAtomic=function(t){return!(t instanceof zt)};var zn=function(){this._geom=null;var t=arguments[0];this._geom=t};zn.prototype.locate=function(t){return zn.locate(t,this._geom)},zn.prototype.interfaces_=function(){return[Un]},zn.prototype.getClass=function(){return zn},zn.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&at.isPointInRing(t,e.getCoordinates())},zn.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!zn.isPointInRing(t,n))return!1;for(var i=0;i=0;n--){var i=this._edgeList.get(n),r=i.getSym();null===e&&(e=r),null!==t&&r.setNext(t),t=i}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(be.LEFT),i=t.getDepth(be.RIGHT),r=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,r)!==i)throw new Le("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[1],s=arguments[2],a=arguments[0];a=0;r--){var o=this._resultAreaEdgeList.get(r),s=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),i){case this._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==t)continue;n=s,i=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),i=this._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(et.isTrue(null!==e,"found null for first outgoing dirEdge"),et.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),n.setNextMin(e))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();)e.next().isInResult()&&t++;return t}if(1===arguments.length){for(var n=arguments[0],i=0,r=this.iterator();r.hasNext();)r.next().getEdgeRing()===n&&i++;return i}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=L.NONE,e=this.iterator();e.hasNext();){var n=e.next(),i=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=L.INTERIOR;break}if(i.isInResult()){t=L.EXTERIOR;break}}}if(t===L.NONE)return null;for(var r=t,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getSym();s.isLineEdge()?s.getEdge().setCovered(r===L.INTERIOR):(s.isInResult()&&(r=L.EXTERIOR),a.isInResult()&&(r=L.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Te(L.NONE);for(var n=this.iterator();n.hasNext();)for(var i=n.next().getEdge().getLabel(),r=0;r<2;r++){var o=i.getLocation(r);o!==L.INTERIOR&&o!==L.BOUNDARY||this._label.setLocation(r,L.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Vn),Xn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new Ge(t,new Yn)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ve),jn=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};jn.prototype.compareTo=function(t){var e=t;return jn.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},jn.prototype.interfaces_=function(){return[x]},jn.prototype.getClass=function(){return jn},jn.orientation=function(t){return 1===St.increasingDirection(t)},jn.compareOriented=function(t,e,n,i){for(var r=e?1:-1,o=i?1:-1,s=e?t.length:-1,a=i?n.length:-1,u=e?0:t.length-1,l=i?0:n.length-1;;){var c=t[u].compareTo(n[l]);if(0!==c)return c;var p=(u+=r)===s,h=(l+=o)===a;if(p&&!h)return-1;if(!p&&h)return 1;if(p&&h)return 0}};var Hn=function(){this._edges=new Nt,this._ocaMap=new p};Hn.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e0&&t.print(","),t.print("(");for(var i=n.getCoordinates(),r=0;r0&&t.print(","),t.print(i[r].x+" "+i[r].y);t.println(")")}t.print(") ")},Hn.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},Hn.prototype.findEdgeIndex=function(t){for(var e=0;e0||!e.coord.equals2D(i);r||n--;var o=new Array(n).fill(null),s=0;o[s++]=new C(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this.edge.pts[a];return r&&(o[s]=e.coord),new ni(o,new Te(this.edge._label))},Jn.prototype.add=function(t,e,n){var i=new Kn(t,e,n),r=this._nodeMap.get(i);return null!==r?r:(this._nodeMap.put(i,i),i)},Jn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1},Jn.prototype.interfaces_=function(){return[]},Jn.prototype.getClass=function(){return Jn};var Qn=function(){};Qn.prototype.getChainStartIndices=function(t){var e=0,n=new Nt;n.add(new D(e));do{var i=this.findChainEnd(t,e);n.add(new D(i)),e=i}while(en?e:n},$n.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return ee&&(i=1),this._depth[t][n]=i}}},ti.prototype.getDelta=function(t){return this._depth[t][be.RIGHT]-this._depth[t][be.LEFT]},ti.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?L.EXTERIOR:L.INTERIOR},ti.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},ti.prototype.add=function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var i=t.getLocation(e,n);i!==L.EXTERIOR&&i!==L.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=ti.depthAtLocation(i):this._depth[e][n]+=ti.depthAtLocation(i))}else if(3===arguments.length){var r=arguments[0],o=arguments[1];arguments[2]===L.INTERIOR&&this._depth[r][o]++}},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},ti.depthAtLocation=function(t){return t===L.EXTERIOR?0:t===L.INTERIOR?1:ti.NULL_VALUE},ei.NULL_VALUE.get=function(){return-1},Object.defineProperties(ti,ei);var ni=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Jn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ti,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.pts=i,this._label=r}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new e(t,Te.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var i=!0,r=!0,o=this.pts.length,s=0;s0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new $n(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new j;for(var t=0;t0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(") "+this._label+" "+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;ei||this._maxyo;if(s)return!1;var a=this.intersectsToleranceSquare(t,e);return et.isTrue(!(s&&a),"Found bad envelope test"),a},ai.prototype.initCorners=function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new C(this._maxx,this._maxy),this._corner[1]=new C(this._minx,this._maxy),this._corner[2]=new C(this._minx,this._miny),this._corner[3]=new C(this._maxx,this._miny)},ai.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},ai.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},ai.prototype.getCoordinate=function(){return this._originalPt},ai.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},ai.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=ai.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new j(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},ai.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},ai.prototype.intersectsToleranceSquare=function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!n||!i)||!!t.equals(this._pt)||!!e.equals(this._pt))))},ai.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return!!this.intersects(n,i)&&(t.addIntersection(this.getCoordinate(),e),!0)},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai},ui.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(ai,ui);var li=function(){this.tempEnv1=new j,this.selectedSegment=new yn};li.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[1];arguments[0].getLineSegment(t,this.selectedSegment),this.select(this.selectedSegment)}},li.prototype.interfaces_=function(){return[]},li.prototype.getClass=function(){return li};var ci=function(){this._index=null;var t=arguments[0];this._index=t},pi={HotPixelSnapAction:{configurable:!0}};ci.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=e.getSafeEnvelope(),o=new hi(e,n,i);return this._index.query(r,{interfaces_:function(){return[Ze]},visitItem:function(t){t.select(r,o)}}),o.isNodeAdded()}},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},pi.HotPixelSnapAction.get=function(){return hi},Object.defineProperties(ci,pi);var hi=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[1],n=arguments[0].getContext();if(null!==this._parentEdge&&n===this._parentEdge&&e===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(n,e)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(li),fi=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new Nt};fi.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];if(this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof Le))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],i=yi.precisionScaleFactor(this._argGeom,this._distance,n),r=new fe(i);this.bufferFixedPrecision(r)}},yi.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===fe.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},yi.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},yi.prototype.bufferOriginalPrecision=function(){try{var t=new ii(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof $))throw t;this._saveException=t}},yi.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},yi.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},yi.prototype.interfaces_=function(){return[]},yi.prototype.getClass=function(){return yi},yi.bufferOp=function(){if(2===arguments.length){var t=arguments[1];return new yi(arguments[0]).getResultGeometry(t)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var e=arguments[1],n=arguments[2],i=new yi(arguments[0]);return i.setQuadrantSegments(n),i.getResultGeometry(e)}if(arguments[2]instanceof Cn&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var r=arguments[1];return new yi(arguments[0],arguments[2]).getResultGeometry(r)}}else if(4===arguments.length){var o=arguments[1],s=arguments[2],a=arguments[3],u=new yi(arguments[0]);return u.setQuadrantSegments(s),u.setEndCapStyle(a),u.getResultGeometry(o)}},yi.precisionScaleFactor=function(t,e,n){var i=t.getEnvelopeInternal(),r=O.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(r)/Math.log(10)+1);return Math.pow(10,o)},di.CAP_ROUND.get=function(){return Cn.CAP_ROUND},di.CAP_BUTT.get=function(){return Cn.CAP_FLAT},di.CAP_FLAT.get=function(){return Cn.CAP_FLAT},di.CAP_SQUARE.get=function(){return Cn.CAP_SQUARE},di.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(yi,di);var _i=function(){this._pt=[new C,new C],this._distance=v.NaN,this._isNull=!0};_i.prototype.getCoordinates=function(){return this._pt},_i.prototype.getCoordinate=function(t){return this._pt[t]},_i.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);ithis._distance&&this.initialize(e,n,i)}},_i.prototype.interfaces_=function(){return[]},_i.prototype.getClass=function(){return _i};var mi=function(){};mi.prototype.interfaces_=function(){return[]},mi.prototype.getClass=function(){return mi},mi.computeDistance=function(){if(arguments[2]instanceof _i&&arguments[0]instanceof Zt&&arguments[1]instanceof C)for(var t=arguments[1],e=arguments[2],n=arguments[0].getCoordinates(),i=new yn,r=0;r0||this._isIn?L.INTERIOR:L.EXTERIOR)},bi.prototype.interfaces_=function(){return[]},bi.prototype.getClass=function(){return bi};var Si=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length)t.call(this,arguments[0],t.INSIDE_AREA,arguments[1]);else if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];this._component=e,this._segIndex=n,this._pt=i}},wi={INSIDE_AREA:{configurable:!0}};Si.prototype.isInsideArea=function(){return this._segIndex===Si.INSIDE_AREA},Si.prototype.getCoordinate=function(){return this._pt},Si.prototype.getGeometryComponent=function(){return this._component},Si.prototype.getSegmentIndex=function(){return this._segIndex},Si.prototype.interfaces_=function(){return[]},Si.prototype.getClass=function(){return Si},wi.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Si,wi);var Li=function(t){this._pts=t||null};Li.prototype.filter=function(t){t instanceof Jt&&this._pts.add(t)},Li.prototype.interfaces_=function(){return[Ut]},Li.prototype.getClass=function(){return Li},Li.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Jt?$e.singletonList(t):Li.getPoints(t,new Nt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Jt?n.add(e):e instanceof zt&&e.apply(new Li(n)),n}};var Pi=function(){this._locations=null;var t=arguments[0];this._locations=t};Pi.prototype.filter=function(t){(t instanceof Jt||t instanceof Zt||t instanceof $t)&&this._locations.add(new Si(t,0,t.getCoordinate()))},Pi.prototype.interfaces_=function(){return[Ut]},Pi.prototype.getClass=function(){return Pi},Pi.getLocations=function(t){var e=new Nt;return t.apply(new Pi(e)),e};var Ri=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new bi,this._minDistanceLocation=null,this._minDistance=v.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=r}};Ri.prototype.computeContainmentDistance=function(){if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=1-e,r=Ni.getPolygons(this._geom[e]);if(r.size()>0){var o=Pi.getLocations(this._geom[i]);if(this.computeContainmentDistance(o,r,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&R(arguments[0],It)&&R(arguments[1],It)){for(var s=arguments[0],a=arguments[1],u=arguments[2],l=0;lthis._minDistance)return null;for(var i=t.getCoordinates(),r=e.getCoordinate(),o=0;othis._minDistance)return null;for(var p=u.getCoordinates(),h=l.getCoordinates(),f=0;fthis._distance&&this.initialize(e,n,i)}},Oi.prototype.interfaces_=function(){return[]},Oi.prototype.getClass=function(){return Oi};var Ti=function(){};Ti.prototype.interfaces_=function(){return[]},Ti.prototype.getClass=function(){return Ti},Ti.computeDistance=function(){if(arguments[2]instanceof Oi&&arguments[0]instanceof Zt&&arguments[1]instanceof C)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new yn,r=t.getCoordinates(),o=0;o1||t<=0)throw new m("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Ai.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Ai.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Ai.prototype.computeOrientedDistance=function(t,e,n){var i=new Mi(e);if(t.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var r=new Fi(e,this._densifyFrac);t.apply(r),n.setMaximum(r.getMaxPointDistance())}},Ai.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Ai.prototype.interfaces_=function(){return[]},Ai.prototype.getClass=function(){return Ai},Ai.distance=function(){if(2===arguments.length)return new Ai(arguments[0],arguments[1]).distance();if(3===arguments.length){var t=arguments[2],e=new Ai(arguments[0],arguments[1]);return e.setDensifyFraction(t),e.distance()}},Di.MaxPointDistanceFilter.get=function(){return Mi},Di.MaxDensifiedByFractionDistanceFilter.get=function(){return Fi},Object.defineProperties(Ai,Di);var Mi=function(){this._maxPtDist=new Oi,this._minPtDist=new Oi,this._euclideanDist=new Ti,this._geom=null;var t=arguments[0];this._geom=t};Mi.prototype.filter=function(t){this._minPtDist.initialize(),Ti.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Mi.prototype.getMaxPointDistance=function(){return this._maxPtDist},Mi.prototype.interfaces_=function(){return[ft]},Mi.prototype.getClass=function(){return Mi};var Fi=function(){this._maxPtDist=new Oi,this._minPtDist=new Oi,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Fi.prototype.filter=function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),i=t.getCoordinate(e),r=(i.x-n.x)/this._numSubSegs,o=(i.y-n.y)/this._numSubSegs,s=0;sn){this._isValid=!1;var r=i.getCoordinates();this._errorLocation=r[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Q.toLineString(r[0],r[1])+")"}},Gi.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Gi.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Gi.VERBOSE&&Y.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Gi.prototype.checkNegativeValid=function(){if(!(this._input instanceof $t||this._input instanceof ne||this._input instanceof zt))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Gi.prototype.getErrorIndicator=function(){return this._errorIndicator},Gi.prototype.checkMinimumDistance=function(t,e,n){var i=new Ri(t,e,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},qi.prototype.report=function(t){if(!qi.VERBOSE)return null;Y.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},qi.prototype.getErrorMessage=function(){return this._errorMsg},qi.prototype.interfaces_=function(){return[]},qi.prototype.getClass=function(){return qi},qi.isValidMsg=function(t,e,n){var i=new qi(t,e,n);return i.isValid()?null:i.getErrorMessage()},qi.isValid=function(t,e,n){return!!new qi(t,e,n).isValid()},Ui.VERBOSE.get=function(){return!1},Ui.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(qi,Ui);var ki=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};ki.prototype.getCoordinates=function(){return this._pts},ki.prototype.size=function(){return this._pts.length},ki.prototype.getCoordinate=function(t){return this._pts[t]},ki.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},ki.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:pn.octant(this.getCoordinate(t),this.getCoordinate(t+1))},ki.prototype.setData=function(t){this._data=t},ki.prototype.getData=function(){return this._data},ki.prototype.toString=function(){return Q.toLineString(new ue(this._pts))},ki.prototype.interfaces_=function(){return[hn]},ki.prototype.getClass=function(){return ki};var zi=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Nt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};zi.prototype.getInteriorIntersection=function(){return this._interiorIntersection},zi.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},zi.prototype.getIntersectionSegments=function(){return this._intSegments},zi.prototype.count=function(){return this._intersectionCount},zi.prototype.getIntersections=function(){return this._intersections},zi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},zi.prototype.setKeepIntersections=function(t){this._keepIntersections=t},zi.prototype.processIntersections=function(t,e,n,i){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===i)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(t,e)&&!this.isEndSegment(n,i))return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=r,this._intSegments[1]=o,this._intSegments[2]=s,this._intSegments[3]=a,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},zi.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},zi.prototype.hasIntersection=function(){return null!==this._interiorIntersection},zi.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},zi.prototype.interfaces_=function(){return[Wn]},zi.prototype.getClass=function(){return zi},zi.createAllIntersectionsFinder=function(t){var e=new zi(t);return e.setFindAllIntersections(!0),e},zi.createAnyIntersectionFinder=function(t){return new zi(t)},zi.createIntersectionCounter=function(t){var e=new zi(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Vi=function(){this._li=new rt,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Vi.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Vi.prototype.getIntersections=function(){return this._segInt.getIntersections()},Vi.prototype.isValid=function(){return this.execute(),this._isValid},Vi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Vi.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new zi(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new In;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Vi.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Le(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Vi.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Q.toLineString(t[0],t[1])+" and "+Q.toLineString(t[2],t[3])},Vi.prototype.interfaces_=function(){return[]},Vi.prototype.getClass=function(){return Vi},Vi.computeIntersections=function(t){var e=new Vi(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Yi=function t(){this._nv=null;var e=arguments[0];this._nv=new Vi(t.toSegmentStrings(e))};Yi.prototype.checkValid=function(){this._nv.checkValid()},Yi.prototype.interfaces_=function(){return[]},Yi.prototype.getClass=function(){return Yi},Yi.toSegmentStrings=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next();e.add(new ki(i.getCoordinates(),i))}return e},Yi.checkValid=function(t){new Yi(t).checkValid()};var Xi=function(t){this._mapOp=t};Xi.prototype.map=function(t){for(var e=new Nt,n=0;n0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Wi.prototype.interfaces_=function(){return[]},Wi.prototype.getClass=function(){return Wi};var Zi=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new yn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Zt&&"number"==typeof arguments[1]){var e=arguments[1];t.call(this,arguments[0].getCoordinates(),e)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var n=arguments[0],i=arguments[1];this._srcPts=n,this._isClosed=t.isClosed(n),this._snapTolerance=i}};Zi.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),i=0;i=0&&t.add(o+1,new C(r),!1)}},Zi.prototype.findSegmentIndexToSnap=function(t,e){for(var n=v.MAX_VALUE,i=-1,r=0;re&&(e=i)}return e}if(2===arguments.length){var r=arguments[0],o=arguments[1];return Math.min(Ki.computeOverlaySnapTolerance(r),Ki.computeOverlaySnapTolerance(o))}},Ki.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*Ki.SNAP_PRECISION_FACTOR},Ki.snapToSelf=function(t,e,n){return new Ki(t).snapToSelf(e,n)},Ji.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Ki,Ji);var Qi=function(t){function e(e,n,i){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==i&&i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var n=new Zi(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),i=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wi),$i=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};$i.prototype.getCommon=function(){return v.longBitsToDouble(this._commonBits)},$i.prototype.add=function(t){var e=v.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=$i.signExpBits(this._commonBits),this._isFirst=!1,null):$i.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=$i.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=$i.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},$i.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=v.longBitsToDouble(t),n="0000000000000000000000000000000000000000000000000000000000000000"+v.toBinaryString(t),i=n.substring(n.length-64);return i.substring(0,1)+" "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+e+" ]"}},$i.prototype.interfaces_=function(){return[]},$i.prototype.getClass=function(){return $i},$i.getBit=function(t,e){return 0!=(t&1<>52},$i.zeroLowerBits=function(t,e){return t&~((1<=0;i--){if($i.getBit(t,i)!==$i.getBit(e,i))return n;n++}return 52};var tr=function(){this._commonCoord=null,this._ccFilter=new nr},er={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};tr.prototype.addCommonBits=function(t){var e=new ir(this._commonCoord);t.apply(e),t.geometryChanged()},tr.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new C(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new ir(e);return t.apply(n),t.geometryChanged(),t},tr.prototype.getCommonCoordinate=function(){return this._commonCoord},tr.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},er.CommonCoordinateFilter.get=function(){return nr},er.Translater.get=function(){return ir},Object.defineProperties(tr,er);var nr=function(){this._commonBitsX=new $i,this._commonBitsY=new $i};nr.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},nr.prototype.getCommonCoordinate=function(){return new C(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},nr.prototype.interfaces_=function(){return[ft]},nr.prototype.getClass=function(){return nr};var ir=function(){this.trans=null;var t=arguments[0];this.trans=t};ir.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,i)},ir.prototype.isDone=function(){return!1},ir.prototype.isGeometryChanged=function(){return!0},ir.prototype.interfaces_=function(){return[kt]},ir.prototype.getClass=function(){return ir};var rr=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};rr.prototype.selfSnap=function(t){return new Ki(t).snapTo(t,this._snapTolerance)},rr.prototype.removeCommonBits=function(t){this._cbr=new tr,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},rr.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},rr.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Sr.overlayOp(e[0],e[1],t);return this.prepareResult(n)},rr.prototype.checkValid=function(t){t.isValid()||Y.out.println("Snapped geometry is invalid")},rr.prototype.computeSnapTolerance=function(){this._snapTolerance=Ki.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},rr.prototype.snap=function(t){var e=this.removeCommonBits(t);return Ki.snap(e[0],e[1],this._snapTolerance)},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.overlayOp=function(t,e,n){return new rr(t,e).getResultGeometry(n)},rr.union=function(t,e){return rr.overlayOp(t,e,Sr.UNION)},rr.intersection=function(t,e){return rr.overlayOp(t,e,Sr.INTERSECTION)},rr.symDifference=function(t,e){return rr.overlayOp(t,e,Sr.SYMDIFFERENCE)},rr.difference=function(t,e){return rr.overlayOp(t,e,Sr.DIFFERENCE)};var or=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};or.prototype.getResultGeometry=function(t){var e=null,n=!1,i=null;try{e=Sr.overlayOp(this._geom[0],this._geom[1],t),n=!0}catch(t){if(!(t instanceof $))throw t;i=t}if(!n)try{e=rr.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof $?i:t}return e},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},or.overlayOp=function(t,e,n){return new or(t,e).getResultGeometry(n)},or.union=function(t,e){return or.overlayOp(t,e,Sr.UNION)},or.intersection=function(t,e){return or.overlayOp(t,e,Sr.INTERSECTION)},or.symDifference=function(t,e){return or.overlayOp(t,e,Sr.SYMDIFFERENCE)},or.difference=function(t,e){return or.overlayOp(t,e,Sr.DIFFERENCE)};var sr=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};sr.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr};var ar=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=i,this._xValue=r,this._obj=o}},ur={INSERT:{configurable:!0},DELETE:{configurable:!0}};ar.prototype.isDelete=function(){return this._eventType===ar.DELETE},ar.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},ar.prototype.getObject=function(){return this._obj},ar.prototype.compareTo=function(t){var e=t;return this._xValuee._xValue?1:this._eventTypee._eventType?1:0},ar.prototype.getInsertEvent=function(){return this._insertEvent},ar.prototype.isInsert=function(){return this._eventType===ar.INSERT},ar.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},ar.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},ar.prototype.interfaces_=function(){return[x]},ar.prototype.getClass=function(){return ar},ur.INSERT.get=function(){return 1},ur.DELETE.get=function(){return 2},Object.defineProperties(ar,ur);var lr=function(){};lr.prototype.interfaces_=function(){return[]},lr.prototype.getClass=function(){return lr};var cr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};cr.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(cr.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.getNumPoints()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},cr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},cr.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},cr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},cr.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next().getCoordinate();if(t.isIntersection(i))return!0}return!1},cr.prototype.hasProperIntersection=function(){return this._hasProper},cr.prototype.hasIntersection=function(){return this._hasIntersection},cr.prototype.isDone=function(){return this._isDone},cr.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},cr.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},cr.prototype.addIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},cr.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var pr=function(t){function e(){t.call(this),this.events=new Nt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){$e.sort(this.events);for(var t=0;te||this._maxo?1:0},gr.prototype.interfaces_=function(){return[N]},gr.prototype.getClass=function(){return gr};var yr=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],i=arguments[2];this._min=e,this._max=n,this._item=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hr),dr=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hr),_r=function(){this._leaves=new Nt,this._root=null,this._level=0};_r.prototype.buildTree=function(){$e.sort(this._leaves,new hr.NodeComparator);for(var t=this._leaves,e=null,n=new Nt;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},_r.prototype.insert=function(t,e,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new yr(t,e,n))},_r.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},_r.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},_r.prototype.printNode=function(t){Y.out.println(Q.toLineString(new C(t._min,this._level),new C(t._max,this._level)))},_r.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},_r.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,i=t.iterator();i.hasNext();){var r=i.next();e[n++]=r.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===L.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},e.prototype.addPolygonRing=function(t,e,n){if(t.isEmpty())return null;var i=St.removeRepeatedPoints(t.getCoordinates());if(i.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var r=e,o=n;at.isCCW(i)&&(r=n,o=e);var s=new ni(i,new Te(this._argIndex,L.BOUNDARY,r,o));this._lineEdgeMap.put(t,s),this.insertEdge(s),this.insertPoint(this._argIndex,i[0],L.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var i=this._nodes.addNode(e),r=i.getLabel();null===r?i._label=new Te(t,n):r.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new pr},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),i=n.getLabel().getLocation(t),r=n.eiList.iterator();r.hasNext();){var o=r.next();this.addSelfIntersectionNode(t,o.coord,i)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof ne&&(this._useBoundaryDeterminationRule=!1),e instanceof $t)this.addPolygon(e);else if(e instanceof Zt)this.addLineString(e);else if(e instanceof Jt)this.addPoint(e);else if(e instanceof te)this.addCollection(e);else if(e instanceof Vt)this.addCollection(e);else if(e instanceof ne)this.addCollection(e);else{if(!(e instanceof zt))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e50?(null===this._areaPtLocator&&(this._areaPtLocator=new vr(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?L.BOUNDARY:L.INTERIOR},e}(Ye),Cr=function(){if(this._li=new rt,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Nr(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=gt.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Nr(0,e,i),this._arg[1]=new Nr(1,n,i)}else if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];r.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(r.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Nr(0,r,s),this._arg[1]=new Nr(1,o,s)}};Cr.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Cr.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Cr.prototype.interfaces_=function(){return[]},Cr.prototype.getClass=function(){return Cr};var br=function(){};br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br},br.map=function(){if(arguments[0]instanceof ct&&R(arguments[1],br.MapOp)){for(var t=arguments[0],e=arguments[1],n=new Nt,i=0;i=t.size()?null:t.get(e)},Ar.union=function(t){return new Ar(t).union()},Dr.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Ar,Dr);var Mr=function(){};Mr.prototype.interfaces_=function(){return[]},Mr.prototype.getClass=function(){return Mr},Mr.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Sr.createEmptyResult(Sr.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Sr.UNION)},t.GeoJSONReader=Ne,t.GeoJSONWriter=Ce,t.OverlayOp=Sr,t.UnionOp=Mr,t.BufferOp=yi,Object.defineProperty(t,"__esModule",{value:!0})}(e)},58205:t=>{let e=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,n=new RegExp("^"+e.source+"(\\s"+e.source+"){1,}");const i=t=>{function e(t){return t.join(" ")}function n(t){return t.map(e).join(", ")}function r(t){return t.map(n).map(s).join(", ")}function o(t){return t.map(r).map(s).join(", ")}function s(t){return"("+t+")"}"Feature"===t.type&&(t=t.geometry);let a=t;switch(a.type){case"Point":return a.coordinates&&3===a.coordinates.length?"POINT Z ("+e(a.coordinates)+")":"POINT ("+e(a.coordinates)+")";case"LineString":return a.coordinates&&a.coordinates[0]&&3===a.coordinates[0].length?"LINESTRING Z ("+n(a.coordinates)+")":"LINESTRING ("+n(a.coordinates)+")";case"Polygon":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&3===a.coordinates[0][0].length?"POLYGON Z ("+r(a.coordinates)+")":"POLYGON ("+r(a.coordinates)+")";case"MultiPoint":return a.coordinates&&a.coordinates[0]&&3===a.coordinates[0].length?"MULTIPOINT Z ("+n(a.coordinates)+")":"MULTIPOINT ("+n(a.coordinates)+")";case"MultiLineString":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&3===a.coordinates[0][0].length?"MULTILINESTRING Z ("+r(a.coordinates)+")":"MULTILINESTRING ("+r(a.coordinates)+")";case"MultiPolygon":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&a.coordinates[0][0]&&3===a.coordinates[0][0][0].length?"MULTIPOLYGON Z ("+o(a.coordinates)+")":"MULTIPOLYGON ("+o(a.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+a.geometries.map(i).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}};t.exports={parse:t=>{let e=t.split(";"),i=e.pop(),r=(e.shift()||"").split("=").pop(),o=0;function s(t){let e=i.substring(o).match(t);return e?(o+=e[0].length,e[0]):null}function a(){s(/^\s*/)}function u(){a();let t,e=0,i=[],r=[i],o=i;for(;t=s(/^(\()/)||s(/^(\))/)||s(/^(,)/)||s(n);){if("("===t)r.push(o),o=[],r[r.length-1].push(o),e++;else if(")"===t){if(0===o.length)return null;if(o=r.pop(),!o)return null;if(e--,0===e)break}else if(","===t)o=[],r[r.length-1].push(o);else{if(t.split(/\s/g).some(isNaN))return null;Array.prototype.push.apply(o,t.split(/\s/g).map(parseFloat))}a()}return 0!==e?null:i}function l(){let t,e,i=[];for(;e=s(n)||s(/^(,)/);)","===e?(i.push(t),t=[]):e.split(/\s/g).some(isNaN)||(t||(t=[]),Array.prototype.push.apply(t,e.split(/\s/g).map(parseFloat))),a();return t?(i.push(t),i.length?i:null):null}function c(){return function(){if(!s(/^(point(\sz)?)/i))return null;if(a(),!s(/^(\()/))return null;let t=l();return t?(a(),s(/^(\))/)?{type:"Point",coordinates:t[0]}:null):null}()||function(){if(!s(/^(linestring(\sz)?)/i))return null;if(a(),!s(/^(\()/))return null;let t=l();return t&&s(/^(\))/)?{type:"LineString",coordinates:t}:null}()||function(){if(!s(/^(polygon(\sz)?)/i))return null;a();let t=u();return t?{type:"Polygon",coordinates:t}:null}()||function(){if(!s(/^(multipoint(\sz)?)/i))return null;a();let t=i.substring(i.indexOf("(")+1,i.length-1).replace(/\(/g,"").replace(/\)/g,"");i="MULTIPOINT ("+t+")";let e=u();return e?(a(),{type:"MultiPoint",coordinates:e}):null}()||function(){if(!s(/^(multilinestring(\sz)?)/i))return null;a();let t=u();return t?(a(),{type:"MultiLineString",coordinates:t}):null}()||function(){if(!s(/^(multipolygon(\sz)?)/i))return null;a();let t=u();return t?{type:"MultiPolygon",coordinates:t}:null}()||function(){let t,e=[];if(!s(/^(geometrycollection)/i))return null;if(a(),!s(/^(\()/))return null;for(;t=c();)e.push(t),a(),s(/^(,)/),a();return s(/^(\))/)?{type:"GeometryCollection",geometries:e}:null}()}return(p=c())&&r.match(/\d+/)&&(p.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+r}}),p;var p},stringify:i}},17527:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(40517);function r(t,e){void 0===e&&(e={});var n=Number(t[0]),r=Number(t[1]),o=Number(t[2]),s=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[n,r],u=[n,s],l=[o,s],c=[o,r];return(0,i.yu)([[a,c,l,u,a]],e.properties,{bbox:t,id:e.id})}},82086:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(48024);function r(t){var e=[1/0,1/0,-1/0,-1/0];return(0,i.pZ)(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]{"use strict";n.d(e,{Z:()=>r});var i=n(81011);function r(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=(0,i.c9)(t),s=(0,i.wA)(e),a=s.type,u=e.bbox,l=s.coordinates;if(u&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,u))return!1;"Polygon"===a&&(l=[l]);for(var c=!1,p=0;pt[1]!==l>t[1]&&t[0]<(u-s)*(t[1]-a)/(l-a)+s&&(i=!i)}return i}},936:(t,e,n)=>{"use strict";n.d(e,{Z:()=>jt});var i=n(40590),r=n(28774),o=n(48024);function s(){return new a}function a(){this.reset()}a.prototype={constructor:a,reset:function(){this.s=this.t=0},add:function(t){l(u,t,this.t),l(this,u.s,this.s),this.s?this.t+=u.t:this.s=u.t},valueOf:function(){return this.s}};var u=new a;function l(t,e,n){var i=t.s=e+n,r=i-e,o=i-r;t.t=e-o+(n-r)}var c=1e-6,p=Math.PI,h=p/2,f=p/4,g=2*p,y=180/p,d=p/180,_=Math.abs,m=Math.atan,v=Math.atan2,E=Math.cos,x=(Math.ceil,Math.exp),I=(Math.floor,Math.log),N=(Math.pow,Math.sin),C=(Math.sign,Math.sqrt),b=Math.tan;function S(t){return t>1?0:t<-1?p:Math.acos(t)}function w(t){return t>1?h:t<-1?-h:Math.asin(t)}function L(){}function P(t,e){t&&O.hasOwnProperty(t.type)&&O[t.type](t,e)}var R={Feature:function(t,e){P(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++ip?t-g:t<-p?t+g:t,e]}function Y(t,e,n){return(t%=g)?e||n?z(j(t),H(e,n)):j(t):e||n?H(e,n):V}function X(t){return function(e,n){return[(e+=t)>p?e-g:e<-p?e+g:e,n]}}function j(t){var e=X(t);return e.invert=X(-t),e}function H(t,e){var n=E(t),i=N(t),r=E(e),o=N(e);function s(t,e){var s=E(e),a=E(t)*s,u=N(t)*s,l=N(e),c=l*n+a*i;return[v(u*r-c*o,a*n-l*i),w(c*r+u*o)]}return s.invert=function(t,e){var s=E(e),a=E(t)*s,u=N(t)*s,l=N(e),c=l*r-u*o;return[v(u*r+l*o,a*n+c*i),w(c*n-a*i)]},s}function W(t,e,n,i,r,o){if(n){var s=E(e),a=N(e),u=i*n;null==r?(r=e+i*g,o=e-u/2):(r=Z(s,r),o=Z(s,o),(i>0?ro)&&(r+=i*g));for(var l,c=r;i>0?c>o:c1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function J(t,e){return _(t[0]-e[0])=0;--o)r.point((c=l[o])[0],c[1]);else i(h.x,h.p.x,-1,r);h=h.p}l=(h=h.o).z,f=!f}while(!h.v);r.lineEnd()}}}function tt(t){if(e=t.length){for(var e,n,i=0,r=t[0];++ie?1:t>=e?0:NaN}V.invert=V;var nt=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return et(e(t),n)}),{left:function(e,n,i,r){for(null==i&&(i=0),null==r&&(r=e.length);i>>1;t(e[o],n)<0?i=o+1:r=o}return i},right:function(e,n,i,r){for(null==i&&(i=0),null==r&&(r=e.length);i>>1;t(e[o],n)>0?r=o:i=o+1}return i}}}(et);nt.right,nt.left;var it=Array.prototype;it.slice,it.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);function rt(t){for(var e,n,i,r=t.length,o=-1,s=0;++o=0;)for(e=(i=t[r]).length;--e>=0;)n[--s]=i[e];return n}var ot=1e9,st=-ot;function at(t,e,n,i){function r(r,o){return t<=r&&r<=n&&e<=o&&o<=i}function o(r,o,a,l){var c=0,p=0;if(null==r||(c=s(r,a))!==(p=s(o,a))||u(r,o)<0^a>0)do{l.point(0===c||3===c?t:n,c>1?i:e)}while((c=(c+a+4)%4)!==p);else l.point(o[0],o[1])}function s(i,r){return _(i[0]-t)0?0:3:_(i[0]-n)0?2:1:_(i[1]-e)0?1:0:r>0?3:2}function a(t,e){return u(t.x,e.x)}function u(t,e){var n=s(t,1),i=s(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){var u,l,c,p,h,f,g,y,d,_,m,v=s,E=K(),x={point:I,lineStart:function(){x.point=N,l&&l.push(c=[]);_=!0,d=!1,g=y=NaN},lineEnd:function(){u&&(N(p,h),f&&d&&E.rejoin(),u.push(E.result()));x.point=I,d&&v.lineEnd()},polygonStart:function(){v=E,u=[],l=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,r=l.length;ni&&(h-o)*(i-s)>(f-s)*(t-o)&&++e:f<=i&&(h-o)*(i-s)<(f-s)*(t-o)&&--e;return e}(),n=m&&e,r=(u=rt(u)).length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),r&&$(u,a,e,o,s),s.polygonEnd());v=s,u=l=c=null}};function I(t,e){r(t,e)&&v.point(t,e)}function N(o,s){var a=r(o,s);if(l&&c.push([o,s]),_)p=o,h=s,f=a,_=!1,a&&(v.lineStart(),v.point(o,s));else if(a&&d)v.point(o,s);else{var u=[g=Math.max(st,Math.min(ot,g)),y=Math.max(st,Math.min(ot,y))],E=[o=Math.max(st,Math.min(ot,o)),s=Math.max(st,Math.min(ot,s))];!function(t,e,n,i,r,o){var s,a=t[0],u=t[1],l=0,c=1,p=e[0]-a,h=e[1]-u;if(s=n-a,p||!(s>0)){if(s/=p,p<0){if(s0){if(s>c)return;s>l&&(l=s)}if(s=r-a,p||!(s<0)){if(s/=p,p<0){if(s>c)return;s>l&&(l=s)}else if(p>0){if(s0)){if(s/=h,h<0){if(s0){if(s>c)return;s>l&&(l=s)}if(s=o-u,h||!(s<0)){if(s/=h,h<0){if(s>c)return;s>l&&(l=s)}else if(h>0){if(s0&&(t[0]=a+l*p,t[1]=u+l*h),c<1&&(e[0]=a+c*p,e[1]=u+c*h),!0}}}}}(u,E,t,e,n,i)?a&&(v.lineStart(),v.point(o,s),m=!1):(d||(v.lineStart(),v.point(u[0],u[1])),v.point(E[0],E[1]),a||v.lineEnd(),m=!1)}g=o,y=s,d=a}return x}}var ut=s();function lt(t,e){var n=e[0],i=e[1],r=[N(n),-E(n),0],o=0,s=0;ut.reset();for(var a=0,u=t.length;a=0?1:-1,T=O*R,A=T>p,D=m*L;if(ut.add(v(D*O*N(T),x*P+D*E(T))),o+=A?R+O*g:R,A^d>=n^b>=n){var M=B(F(y),F(C));k(M);var G=B(r,M);k(G);var q=(A^R>=0?-1:1)*w(G[2]);(i>q||i===q&&(M[0]||M[1]))&&(s+=A^R>=0?1:-1)}}return(o<-c||oht&&(ht=t);eft&&(ft=e)},lineStart:L,lineEnd:L,polygonStart:L,polygonEnd:L,result:function(){var t=[[ct,pt],[ht,ft]];return ht=ft=-(pt=ct=1/0),t}};const yt=gt;s();function dt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function _t(t,e,n,i){return function(r,o){var s,a,u,l=e(o),c=r.invert(i[0],i[1]),p=K(),h=e(p),f=!1,g={point:y,lineStart:_,lineEnd:m,polygonStart:function(){g.point=v,g.lineStart=E,g.lineEnd=x,a=[],s=[]},polygonEnd:function(){g.point=y,g.lineStart=_,g.lineEnd=m,a=rt(a);var t=lt(s,c);a.length?(f||(o.polygonStart(),f=!0),$(a,vt,t,n,o)):t&&(f||(o.polygonStart(),f=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),f&&(o.polygonEnd(),f=!1),a=s=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function y(e,n){var i=r(e,n);t(e=i[0],n=i[1])&&o.point(e,n)}function d(t,e){var n=r(t,e);l.point(n[0],n[1])}function _(){g.point=d,l.lineStart()}function m(){g.point=y,l.lineEnd()}function v(t,e){u.push([t,e]);var n=r(t,e);h.point(n[0],n[1])}function E(){h.lineStart(),u=[]}function x(){v(u[0][0],u[0][1]),h.lineEnd();var t,e,n,i,r=h.clean(),l=p.result(),c=l.length;if(u.pop(),s.push(u),u=null,c)if(1&r){if((e=(n=l[0]).length-1)>0){for(f||(o.polygonStart(),f=!0),o.lineStart(),t=0;t1&&2&r&&l.push(l.pop().concat(l.shift())),a.push(l.filter(mt))}return g}}function mt(t){return t.length>1}function vt(t,e){return((t=t.x)[0]<0?t[1]-h-c:h-t[1])-((e=e.x)[0]<0?e[1]-h-c:h-e[1])}dt(4.5);const Et=_t((function(){return!0}),(function(t){var e,n=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var a=o>0?p:-p,u=_(o-n);_(u-p)0?h:-h),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),t.point(o,i),e=0):r!==a&&u>=p&&(_(n-r)c?m((N(e)*(o=E(i))*N(n)-N(i)*(r=E(e))*N(t))/(r*o*s)):(e+i)/2}(n,i,o,s),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),e=0),t.point(n=o,i=s),r=a},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(t,e,n,i){var r;if(null==t)r=n*h,i.point(-p,r),i.point(0,r),i.point(p,r),i.point(p,0),i.point(p,-r),i.point(0,-r),i.point(-p,-r),i.point(-p,0),i.point(-p,r);else if(_(t[0]-e[0])>c){var o=t[0]4*e&&d--){var N=s+f,b=a+g,S=u+y,L=C(N*N+b*b+S*S),P=w(S/=L),R=_(_(S)-1)e||_((E*D+x*M)/I-.5)>.3||s*f+a*g+u*y0,r=_(n)>c;function o(t,e){return E(t)*E(e)>n}function s(t,e,i){var r=[1,0,0],o=B(F(t),F(e)),s=G(o,o),a=o[0],u=s-a*a;if(!u)return!i&&t;var l=n*s/u,h=-n*a/u,f=B(r,o),g=U(r,l);q(g,U(o,h));var y=f,d=G(g,y),m=G(y,y),v=d*d-m*(G(g,g)-1);if(!(v<0)){var E=C(v),x=U(y,(-d-E)/m);if(q(x,g),x=M(x),!i)return x;var I,N=t[0],b=e[0],S=t[1],w=e[1];b0^x[1]<(_(x[0]-N)p^(N<=x[0]&&x[0]<=b)){var R=U(y,(-d+E)/m);return q(R,g),[x,M(R)]}}}function a(e,n){var r=i?t:p-t,o=0;return e<-r?o|=1:e>r&&(o|=2),n<-r?o|=4:n>r&&(o|=8),o}return _t(o,(function(t){var e,n,u,l,h;return{lineStart:function(){l=u=!1,h=1},point:function(f,g){var y,d=[f,g],_=o(f,g),m=i?_?0:a(f,g):_?a(f+(f<0?p:-p),g):0;if(!e&&(l=u=_)&&t.lineStart(),_!==u&&(!(y=s(e,d))||J(e,y)||J(d,y))&&(d[0]+=c,d[1]+=c,_=o(d[0],d[1])),_!==u)h=0,_?(t.lineStart(),y=s(d,e),t.point(y[0],y[1])):(y=s(e,d),t.point(y[0],y[1]),t.lineEnd()),e=y;else if(r&&e&&i^_){var v;m&n||!(v=s(d,e,!0))||(h=0,i?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!_||e&&J(e,d)||t.point(d[0],d[1]),e=d,u=_,n=m},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return h|(l&&u)<<1}}}),(function(n,i,r,o){W(o,t,e,r,n,i)}),i?[0,-t]:[-p,t-p])}(S=t*d,6*d):(S=null,Et),V()):S*y},T.clipExtent=function(t){return arguments.length?(P=null==t?(L=s=a=u=null,xt):at(L=+t[0][0],s=+t[0][1],a=+t[1][0],u=+t[1][1]),V()):null==L?null:[[L,s],[a,u]]},T.scale=function(t){return arguments.length?(f=+t,k()):f},T.translate=function(t){return arguments.length?(g=+t[0],m=+t[1],k()):[g,m]},T.center=function(t){return arguments.length?(v=t[0]%360*d,x=t[1]%360*d,k()):[v*y,x*y]},T.rotate=function(t){return arguments.length?(I=t[0]%360*d,N=t[1]%360*d,b=t.length>2?t[2]%360*d:0,k()):[I*y,N*y,b*y]},T.precision=function(t){return arguments.length?(O=wt(D,R=t*t),V()):C(R)},T.fitExtent=function(t,e){return Ct(T,t,e)},T.fitSize=function(t,e){return function(t,e,n){return Ct(t,[[0,0],e],n)}(T,t,e)},function(){return e=t.apply(this,arguments),T.invert=e.invert&&A,k()}}((function(){return t}))()}function Rt(t){return function(e,n){var i=E(e),r=E(n),o=t(i*r);return[o*r*N(e),o*N(n)]}}function Ot(t){return function(e,n){var i=C(e*e+n*n),r=t(i),o=N(r),s=E(r);return[v(e*o,i*s),w(i&&n*o/i)]}}var Tt=Rt((function(t){return C(2/(1+t))}));Tt.invert=Ot((function(t){return 2*w(t/2)}));var At=Rt((function(t){return(t=S(t))&&t/N(t)}));function Dt(t,e){return[t,I(b((h+e)/2))]}function Mt(t,e){return[t,e]}function Ft(t,e){var n=E(e),i=E(t)*n;return[n*N(t)/i,N(e)/i]}function Gt(t,e){var n=e*e,i=n*n;return[t*(.8707-.131979*n+i*(i*(.003971*n-.001529*i)-.013791)),e*(1.007226+n*(.015085+i*(.028874*n-.044475-.005916*i)))]}function Bt(t,e){return[E(e)*N(t),N(e)]}function qt(t,e){var n=E(e),i=1+E(t)*n;return[n*N(t)/i,N(e)/i]}function Ut(t,e){return[I(b((h+e)/2)),-t]}At.invert=Ot((function(t){return t})),Dt.invert=function(t,e){return[t,2*m(x(e))-h]},Mt.invert=Mt,Ft.invert=Ot(m),Gt.invert=function(t,e){var n,i=e,r=25;do{var o=i*i,s=o*o;i-=n=(i*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-e)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while(_(n)>c&&--r>0);return[t/(.8707+(o=i*i)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),i]},Bt.invert=Ot(w),qt.invert=Ot((function(t){return 2*m(t)})),Ut.invert=function(t,e){return[-e,2*m(x(t))-h]};var kt=n(40517);function zt(t,e,n,s){var a=t.properties||{},u="Feature"===t.type?t.geometry:t;if("GeometryCollection"===u.type){var l=[];return(0,o.on)(t,(function(t){var i=zt(t,e,n,s);i&&l.push(i)})),(0,kt.uf)(l)}var c=function(t){var e=(0,i.Z)(t).geometry.coordinates,n=[-e[0],-e[1]];return Pt(At).scale(79.4188).clipAngle(179.999).rotate(n).scale(kt.rQ)}(u),p={type:u.type,coordinates:Yt(u.coordinates,c)},h=(new r.GeoJSONReader).read(p),f=(0,kt.DL)((0,kt.lF)(e,n),"meters"),g=r.BufferOp.bufferOp(h,f,s);if(!Vt((g=(new r.GeoJSONWriter).write(g)).coordinates)){var y={type:g.type,coordinates:Xt(g.coordinates,c)};return(0,kt.zL)(y,a)}}function Vt(t){return Array.isArray(t[0])?Vt(t[0]):isNaN(t[0])}function Yt(t,e){return"object"!==typeof t[0]?e(t):t.map((function(t){return Yt(t,e)}))}function Xt(t,e){return"object"!==typeof t[0]?e.invert(t):t.map((function(t){return Xt(t,e)}))}const jt=function(t,e,n){var i=(n=n||{}).units||"kilometers",r=n.steps||8;if(!t)throw new Error("geojson is required");if("object"!==typeof n)throw new Error("options must be an object");if("number"!==typeof r)throw new Error("steps must be an number");if(void 0===e)throw new Error("radius is required");if(r<=0)throw new Error("steps must be greater than 0");var s=[];switch(t.type){case"GeometryCollection":return(0,o.on)(t,(function(t){var n=zt(t,e,i,r);n&&s.push(n)})),(0,kt.uf)(s);case"FeatureCollection":return(0,o.By)(t,(function(t){var n=zt(t,e,i,r);n&&(0,o.By)(n,(function(t){t&&s.push(t)}))})),(0,kt.uf)(s)}return zt(t,e,i,r)}},40590:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(82086),r=n(40517);const o=function(t,e){void 0===e&&(e={});var n=(0,i.Z)(t),o=(n[0]+n[2])/2,s=(n[1]+n[3])/2;return(0,r.xm)([o,s],e.properties,e)}},56720:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(40517),r=n(48024);const o=function(t){var e={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}};return(0,r.By)(t,(function(t){var n,i,r,o;switch(null===(o=t.geometry)||void 0===o?void 0:o.type){case"Point":e.MultiPoint.coordinates.push(t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"MultiPoint":(n=e.MultiPoint.coordinates).push.apply(n,t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"LineString":e.MultiLineString.coordinates.push(t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"MultiLineString":(i=e.MultiLineString.coordinates).push.apply(i,t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"Polygon":e.MultiPolygon.coordinates.push(t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties);break;case"MultiPolygon":(r=e.MultiPolygon.coordinates).push.apply(r,t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties)}})),(0,i.uf)(Object.keys(e).filter((function(t){return e[t].coordinates.length})).sort().map((function(t){var n={type:t,coordinates:e[t].coordinates},r={collectedProperties:e[t].properties};return(0,i.zL)(n,r)})))}},31890:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(40517),r=n(81011),o=n(48024),s=n(52675),a=n(26625);const u=function(t,e){if(e=e||{},!(0,i.Kn)(e))throw new Error("options is invalid");var n=e.propertyName;(0,r.qI)(t,"Polygon","dissolve");var u=[];if(!e.propertyName)return(0,s.Z)((0,i.tw)(a.union.apply(null,t.features.map((function(t){return t.geometry.coordinates})))));var l={};(0,o.By)(t,(function(t){Object.prototype.hasOwnProperty.call(l,t.properties[n])||(l[t.properties[n]]=[]),l[t.properties[n]].push(t)}));for(var c=Object.keys(l),p=0;p{"use strict";n.d(e,{Z:()=>o});var i=n(81011),r=n(40517);const o=function(t,e,n){void 0===n&&(n={});var o=(0,i.c9)(t),s=(0,i.c9)(e),a=(0,r.Ht)(s[1]-o[1]),u=(0,r.Ht)(s[0]-o[0]),l=(0,r.Ht)(o[1]),c=(0,r.Ht)(s[1]),p=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(l)*Math.cos(c);return(0,r.DL)(2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p)),n.units)}},52675:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(48024),r=n(40517);const o=function(t){if(!t)throw new Error("geojson is required");var e=[];return(0,i.nG)(t,(function(t){e.push(t)})),(0,r.uf)(e)}},40517:(t,e,n)=>{"use strict";n.d(e,{DL:()=>f,Ht:()=>d,Kn:()=>m,Tu:()=>u,_R:()=>c,lF:()=>g,ot:()=>p,rQ:()=>i,tw:()=>h,uf:()=>l,vi:()=>y,xm:()=>s,yu:()=>a,zL:()=>o});var i=6371008.8,r={centimeters:100*i,centimetres:100*i,degrees:i/111325,feet:3.28084*i,inches:39.37*i,kilometers:i/1e3,kilometres:i/1e3,meters:i,metres:i,miles:i/1609.344,millimeters:1e3*i,millimetres:1e3*i,nauticalmiles:i/1852,radians:1,yards:1.0936*i};function o(t,e,n){void 0===n&&(n={});var i={type:"Feature"};return(0===n.id||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=e||{},i.geometry=t,i}function s(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!_(t[0])||!_(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n){void 0===n&&(n={});for(var i=0,r=t;i{"use strict";n.d(e,{Z:()=>s});var i=n(40517),r=n(81011),o=n(26625);function s(t,e,n){void 0===n&&(n={});var s=(0,r.wA)(t),a=(0,r.wA)(e),u=o.intersection(s.coordinates,a.coordinates);return 0===u.length?null:1===u.length?(0,i.yu)(u[0],n.properties):(0,i.tw)(u,n.properties)}},81011:(t,e,n)=>{"use strict";n.d(e,{c9:()=>i,oL:()=>a,qI:()=>o,r7:()=>r,wA:()=>s});n(40517);function i(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function r(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function o(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var i=0,r=t.features;i{"use strict";n.d(e,{By:()=>o,nG:()=>u,on:()=>a,pZ:()=>r,pl:()=>s});var i=n(40517);function r(t,e,n){if(null!==t)for(var i,o,s,a,u,l,c,p,h=0,f=0,g=t.type,y="FeatureCollection"===g,d="Feature"===g,_=y?t.features.length:1,m=0;m<_;m++){u=(p=!!(c=y?t.features[m].geometry:d?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var v=0;v{"use strict";n.d(e,{Z:()=>h});var i=n(48024),r=n(40517);const o=function(t){var e=[];return"FeatureCollection"===t.type?(0,i.By)(t,(function(t){(0,i.pZ)(t,(function(n){e.push((0,r.xm)(n,t.properties))}))})):(0,i.pZ)(t,(function(n){e.push((0,r.xm)(n,t.properties))})),(0,r.uf)(e)};var s=n(40590),a=n(56875),u=n(64505);const l=function(t,e){if(!t)throw new Error("targetPoint is required");if(!e)throw new Error("points is required");var n,r=1/0,o=0;return(0,i.By)(e,(function(e,n){var i=(0,u.Z)(t,e);i{"use strict";function*i(t,e){if(void 0===e)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(i=+i)>=i&&(yield i)}}n.d(e,{K:()=>i})},31600:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>a});var i=n(6200),r=n(42514),o=n(14755),s=n(20639);function a(t,e,n){if((a=(t=Float64Array.from((0,s.K)(t,n))).length)&&!isNaN(e=+e)){if(e<=0||a<2)return(0,r.Z)(t);if(e>=1)return(0,i.Z)(t);var a,u=(a-1)*e,l=Math.floor(u),c=(0,i.Z)((0,o.Z)(t,l).subarray(0,l+1));return c+((0,r.Z)(t.subarray(l+1))-c)*(u-l)}}}}]);
\ No newline at end of file
diff --git a/dist/static/js/178.977a27b8.js b/dist/static/js/178.977a27b8.js
new file mode 100644
index 0000000..aaad0c2
--- /dev/null
+++ b/dist/static/js/178.977a27b8.js
@@ -0,0 +1 @@
+(self.webpackChunkmaptable_frontend=self.webpackChunkmaptable_frontend||[]).push([[178,687],{70363:function(e){"use strict";e.exports=function(){function e(e){var r=[];return e.AMapUI&&r.push(t(e.AMapUI)),e.Loca&&r.push(n(e.Loca)),Promise.all(r)}function t(e){return new Promise((function(t,n){var s=[];if(e.plugins)for(var l=0;l{e.exports={}},62810:(e,t,n)=>{"use strict";n.d(t,{iN:()=>x,R_:()=>A,EV:()=>w,ez:()=>y});var r=n(76471),i=n(18948),o=2,a=.16,s=.05,l=.05,c=.15,u=5,d=4,f=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function h(e){var t=e.r,n=e.g,i=e.b,o=(0,r.py)(t,n,i);return{h:360*o.h,s:o.s,v:o.v}}function p(e){var t=e.r,n=e.g,i=e.b;return"#".concat((0,r.vq)(t,n,i,!1))}function g(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-o*t:Math.round(e.h)+o*t:n?Math.round(e.h)+o*t:Math.round(e.h)-o*t)<0?r+=360:r>=360&&(r-=360),r}function m(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-a*t:t===d?e.s+a:e.s+s*t)>1&&(r=1),n&&t===u&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function v(e,t,n){var r;return(r=n?e.v+l*t:e.v-c*t)>1&&(r=1),Number(r.toFixed(2))}function A(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=(0,i.uA)(e),o=u;o>0;o-=1){var a=h(r),s=p((0,i.uA)({h:g(a,o,!0),s:m(a,o,!0),v:v(a,o,!0)}));n.push(s)}n.push(p(r));for(var l=1;l<=d;l+=1){var c=h(r),A=p((0,i.uA)({h:g(c,l),s:m(c,l),v:v(c,l)}));n.push(A)}return"dark"===t.theme?f.map((function(e){var r=e.index,o=e.opacity;return p(function(e,t,n){var r=n/100;return{r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b}}((0,i.uA)(t.backgroundColor||"#141414"),(0,i.uA)(n[r]),100*o))})):n}var y={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},b={},_={};Object.keys(y).forEach((function(e){b[e]=A(y[e]),b[e].primary=b[e][5],_[e]=A(y[e],{theme:"dark",backgroundColor:"#141414"}),_[e].primary=_[e][5]}));b.red,b.volcano;var w=b.gold,x=(b.orange,b.yellow,b.lime,b.green,b.cyan,b.blue);b.geekblue,b.purple,b.magenta,b.grey,b.grey},16831:(e,t,n)=>{"use strict";n.d(t,{E4:()=>st,jG:()=>k,ks:()=>j,bf:()=>D,CI:()=>ot,fp:()=>ee,xy:()=>rt});var r=n(68185),i=n(13747),o=n(22368),a=n(35194);const s=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};var l=n(86263),c=n(57435),u=n.t(c,2),d=(n(22121),n(46032),n(66375)),f=n(1959),h="%";function p(e){return e.join(h)}const g=function(){function e(t){(0,d.Z)(this,e),(0,r.Z)(this,"instanceId",void 0),(0,r.Z)(this,"cache",new Map),this.instanceId=t}return(0,f.Z)(e,[{key:"get",value:function(e){return this.opGet(p(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(p(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}();var m="data-token-hash",v="data-css-hash",A="__cssinjs_instance__";function y(){var e=Math.random().toString(12).slice(2);if("undefined"!==typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(v,"]"))||[],n=document.head.firstChild;Array.from(t).forEach((function(t){t[A]=t[A]||e,t[A]===e&&document.head.insertBefore(t,n)}));var r={};Array.from(document.querySelectorAll("style[".concat(v,"]"))).forEach((function(t){var n,i=t.getAttribute(v);r[i]?t[A]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[i]=!0}))}return new g(e)}var b=c.createContext({hashPriority:"low",cache:y(),defaultCache:!0});const _=b;var w=n(69223),x=n(20749);var E=function(){function e(){(0,d.Z)(this,e),(0,r.Z)(this,"cache",void 0),(0,r.Z)(this,"keys",void 0),(0,r.Z)(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return(0,f.Z)(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach((function(e){var t;i?i=null===(t=i)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):i=void 0})),null!==(t=i)&&void 0!==t&&t.value&&r&&(i.value[1]=this.cacheCallTimes++),null===(n=i)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce((function(e,t){var n=(0,i.Z)(e,2)[1];return r.internalGet(t)[1]0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),C+=1}return(0,f.Z)(e,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce((function(t,n){return n(e,t)}),void 0)}}]),e}(),T=new E;function k(e){var t=Array.isArray(e)?e:[e];return T.has(t)||T.set(t,new P(t)),T.get(t)}var M=new WeakMap,R={};var O=new WeakMap;function I(e){var t=O.get(e)||"";return t||(Object.keys(e).forEach((function(n){var r=e[n];t+=n,r instanceof P?t+=r.id:r&&"object"===(0,w.Z)(r)?t+=I(r):t+=r})),O.set(e,t)),t}function L(e,t){return s("".concat(t,"_").concat(I(e)))}"random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,"");var N=(0,x.Z)();function D(e){return"number"===typeof e?"".concat(e,"px"):e}function F(e,t,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var s=(0,a.Z)((0,a.Z)({},o),{},(i={},(0,r.Z)(i,m,t),(0,r.Z)(i,v,n),i)),l=Object.keys(s).map((function(e){var t=s[e];return t?"".concat(e,'="').concat(t,'"'):null})).filter((function(e){return e})).join(" ");return"")}var j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},B=function(e,t,n){return Object.keys(e).length?".".concat(t).concat(null!==n&&void 0!==n&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map((function(e){var t=(0,i.Z)(e,2),n=t[0],r=t[1];return"".concat(n,":").concat(r,";")})).join(""),"}"):""},Z=function(e,t,n){var r={},o={};return Object.entries(e).forEach((function(e){var t,a,s=(0,i.Z)(e,2),l=s[0],c=s[1];if(null!==n&&void 0!==n&&null!==(t=n.preserve)&&void 0!==t&&t[l])o[l]=c;else if(("string"===typeof c||"number"===typeof c)&&(null===n||void 0===n||null===(a=n.ignore)||void 0===a||!a[l])){var u,d=j(l,null===n||void 0===n?void 0:n.prefix);r[d]="number"!==typeof c||null!==n&&void 0!==n&&null!==(u=n.unitless)&&void 0!==u&&u[l]?String(c):"".concat(c,"px"),o[l]="var(".concat(d,")")}})),[o,B(r,t,{scope:null===n||void 0===n?void 0:n.scope})]},z=n(12750),U=(0,a.Z)({},u).useInsertionEffect;const H=U?function(e,t,n){return U((function(){return e(),t()}),n)}:function(e,t,n){c.useMemo(e,n),(0,z.Z)((function(){return t(!0)}),n)};const V="undefined"!==typeof(0,a.Z)({},u).useInsertionEffect?function(e){var t=[],n=!1;return c.useEffect((function(){return n=!1,function(){n=!0,t.length&&t.forEach((function(e){return e()}))}}),e),function(e){n||t.push(e)}}:function(){return function(e){e()}};const W=function(){return!1};function G(e,t,n,r,a){var s=c.useContext(_).cache,l=p([e].concat((0,o.Z)(t))),u=V([l]),d=(W(),function(e){s.opUpdate(l,(function(t){var r=t||[void 0,void 0],o=(0,i.Z)(r,2),a=o[0];var s=[void 0===a?0:a,o[1]||n()];return e?e(s):s}))});c.useMemo((function(){d()}),[l]);var f=s.opGet(l)[1];return H((function(){null===a||void 0===a||a(f)}),(function(e){return d((function(t){var n=(0,i.Z)(t,2),r=n[0],o=n[1];return e&&0===r&&(null===a||void 0===a||a(f)),[r+1,o]})),function(){s.opUpdate(l,(function(t){var n=t||[],o=(0,i.Z)(n,2),a=o[0],c=void 0===a?0:a,d=o[1];return 0===c-1?(u((function(){!e&&s.opGet(l)||null===r||void 0===r||r(d,!1)})),null):[c-1,d]}))}}),[l]),f}var K={},q="css",Y=new Map;var X=0;function $(e,t){Y.set(e,(Y.get(e)||0)-1);var n=Array.from(Y.keys()),r=n.filter((function(e){return(Y.get(e)||0)<=0}));n.length-r.length>X&&r.forEach((function(e){!function(e,t){"undefined"!==typeof document&&document.querySelectorAll("style[".concat(m,'="').concat(e,'"]')).forEach((function(e){var n;e[A]===t&&(null===(n=e.parentNode)||void 0===n||n.removeChild(e))}))}(e,t),Y.delete(e)}))}var Q=function(e,t,n,r){var i=n.getDerivativeToken(e),o=(0,a.Z)((0,a.Z)({},i),t);return r&&(o=r(o)),o},J="token";function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(0,c.useContext)(_),u=r.cache.instanceId,d=r.container,f=n.salt,h=void 0===f?"":f,p=n.override,g=void 0===p?K:p,y=n.formatToken,b=n.getComputedToken,w=n.cssVar,x=function(e,t){for(var n=M,r=0;r0?pe(Se,--xe):0,_e--,10===Ee&&(_e=1,be--),Ee}function Te(){return Ee=xe2||Oe(Ee)>3?"":" "}function Fe(e,t){for(;--t&&Te()&&!(Ee<48||Ee>102||Ee>57&&Ee<65||Ee>70&&Ee<97););return Re(e,Me()+(t<6&&32==ke()&&32==Te()))}function je(e){for(;Te();)switch(Ee){case e:return xe;case 34:case 39:34!==e&&39!==e&&je(Ee);break;case 40:41===e&&je(e);break;case 92:Te()}return xe}function Be(e,t){for(;Te()&&e+Ee!==57&&(e+Ee!==84||47!==ke()););return"/*"+Re(t,xe-1)+"*"+ue(47===e?e:Te())}function Ze(e){for(;!Oe(ke());)Te();return Re(e,xe)}function ze(e){return Le(Ue("",null,null,null,[""],e=Ie(e),0,[0],e))}function Ue(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,p=0,g=1,m=1,v=1,A=0,y="",b=i,_=o,w=r,x=y;m;)switch(p=A,A=Te()){case 40:if(108!=p&&58==pe(x,d-1)){-1!=he(x+=fe(Ne(A),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:x+=Ne(A);break;case 9:case 10:case 13:case 32:x+=De(p);break;case 92:x+=Fe(Me()-1,7);continue;case 47:switch(ke()){case 42:case 47:ve(Ve(Be(Te(),Me()),t,n,l),l);break;default:x+="/"}break;case 123*g:s[c++]=me(x)*v;case 125*g:case 59:case 0:switch(A){case 0:case 125:m=0;case 59+u:-1==v&&(x=fe(x,/\f/g,"")),h>0&&me(x)-d&&ve(h>32?We(x+";",r,n,d-1,l):We(fe(x," ","")+";",r,n,d-2,l),l);break;case 59:x+=";";default:if(ve(w=He(x,t,n,c,u,i,s,y,b=[],_=[],d,o),o),123===A)if(0===u)Ue(x,t,w,w,b,o,d,s,_);else switch(99===f&&110===pe(x,3)?100:f){case 100:case 108:case 109:case 115:Ue(e,w,w,r&&ve(He(e,w,w,0,0,i,s,y,i,b=[],d,_),_),i,_,d,s,r?b:_);break;default:Ue(x,w,w,w,[""],_,0,s,_)}}c=u=h=0,g=v=1,y=x="",d=a;break;case 58:d=1+me(x),h=p;default:if(g<1)if(123==A)--g;else if(125==A&&0==g++&&125==Pe())continue;switch(x+=ue(A),A*g){case 38:v=u>0?1:(x+="\f",-1);break;case 44:s[c++]=(me(x)-1)*v,v=1;break;case 64:45===ke()&&(x+=Ne(Te())),f=ke(),u=d=me(y=x+=Ze(Me())),A++;break;case 45:45===p&&2==me(x)&&(g=0)}}return o}function He(e,t,n,r,i,o,a,s,l,c,u,d){for(var f=i-1,h=0===i?o:[""],p=function(e){return e.length}(h),g=0,m=0,v=0;g0?h[A]+" "+y:fe(y,/&\f/g,h[A])))&&(l[v++]=b);return Ce(e,t,n,0===i?ie:s,l,c,u,d)}function Ve(e,t,n,r){return Ce(e,t,n,re,ue(Ee),ge(e,2,-2),0,r)}function We(e,t,n,r,i){return Ce(e,t,n,oe,ge(e,0,r),ge(e,r+1,-1),r,i)}var Ge,Ke="data-ant-cssinjs-cache-path",qe="_FILE_STYLE__";var Ye=!0;function Xe(e){return function(){if(!Ge&&(Ge={},(0,x.Z)())){var e=document.createElement("div");e.className=Ke,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";(t=t.replace(/^"/,"").replace(/"$/,"")).split(";").forEach((function(e){var t=e.split(":"),n=(0,i.Z)(t,2),r=n[0],o=n[1];Ge[r]=o}));var n,r=document.querySelector("style[".concat(Ke,"]"));r&&(Ye=!1,null===(n=r.parentNode)||void 0===n||n.removeChild(r)),document.body.removeChild(e)}}(),!!Ge[e]}var $e="_multi_value_";function Qe(e){return Ae(ze(e),ye).replace(/\{%%%\:[^;];}/g,";")}var Je=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},s=r.root,l=r.injectHash,c=r.parentSelectors,u=n.hashId,d=n.layer,f=(n.path,n.hashPriority),h=n.transformers,p=void 0===h?[]:h,g=(n.linters,""),m={};function v(t){var r=t.getName(u);if(!m[r]){var o=e(t.style,n,{root:!1,parentSelectors:c}),a=(0,i.Z)(o,1)[0];m[r]="@keyframes ".concat(t.getName(u)).concat(a)}}var A=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach((function(t){Array.isArray(t)?e(t,n):t&&n.push(t)})),n}(Array.isArray(t)?t:[t]);return A.forEach((function(t){var r="string"!==typeof t||s?t:{};if("string"===typeof r)g+="".concat(r,"\n");else if(r._keyframe)v(r);else{var d=p.reduce((function(e,t){var n;return(null===t||void 0===t||null===(n=t.visit)||void 0===n?void 0:n.call(t,e))||e}),r);Object.keys(d).forEach((function(t){var r=d[t];if("object"!==(0,w.Z)(r)||!r||"animationName"===t&&r._keyframe||function(e){return"object"===(0,w.Z)(e)&&e&&("_skip_check_"in e||$e in e)}(r)){var h;function C(e,t){var n=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),r=t;ne[e]||"number"!==typeof r||0===r||(r="".concat(r,"px")),"animationName"===e&&null!==t&&void 0!==t&&t._keyframe&&(v(t),r=t.getName(u)),g+="".concat(n,":").concat(r,";")}var p=null!==(h=null===r||void 0===r?void 0:r.value)&&void 0!==h?h:r;"object"===(0,w.Z)(r)&&null!==r&&void 0!==r&&r[$e]&&Array.isArray(p)?p.forEach((function(e){C(t,e)})):C(t,p)}else{var A=!1,y=t.trim(),b=!1;(s||l)&&u?y.startsWith("@")?A=!0:y=function(e,t,n){if(!t)return e;var r=".".concat(t),i="low"===n?":where(".concat(r,")"):r;return e.split(",").map((function(e){var t,n=e.trim().split(/\s+/),r=n[0]||"",a=(null===(t=r.match(/^\w+/))||void 0===t?void 0:t[0])||"";return[r="".concat(a).concat(i).concat(r.slice(a.length))].concat((0,o.Z)(n.slice(1))).join(" ")})).join(",")}(t,u,f):!s||u||"&"!==y&&""!==y||(y="",b=!0);var _=e(r,n,{root:b,injectHash:A,parentSelectors:[].concat((0,o.Z)(c),[y])}),x=(0,i.Z)(_,2),E=x[0],S=x[1];m=(0,a.Z)((0,a.Z)({},m),S),g+="".concat(y).concat(E)}}))}})),s?d&&(g="@layer ".concat(d.name," {").concat(g,"}"),d.dependencies&&(m["@layer ".concat(d.name)]=d.dependencies.map((function(e){return"@layer ".concat(e,", ").concat(d.name,";")})).join("\n"))):g="{".concat(g,"}"),[g,m]};function et(e,t){return s("".concat(e.join("%")).concat(t))}function tt(){return null}var nt="style";function rt(e,t){var n=e.token,s=e.path,u=e.hashId,d=e.layer,f=e.nonce,h=e.clientOnly,p=e.order,g=void 0===p?0:p,y=c.useContext(_),b=y.autoClear,w=(y.mock,y.defaultCache),E=y.hashPriority,S=y.container,C=y.ssrInline,P=y.transformers,T=y.linters,k=y.cache,M=y.layer,R=n._tokenKey,O=[R];M&&O.push("layer"),O.push.apply(O,(0,o.Z)(s));var I=N;var L=G(nt,O,(function(){var e=O.join("|");if(Xe(e)){var n=function(e){var t=Ge[e],n=null;if(t&&(0,x.Z)())if(Ye)n=qe;else{var r=document.querySelector("style[".concat(v,'="').concat(Ge[e],'"]'));r?n=r.innerHTML:delete Ge[e]}return[n,t]}(e),r=(0,i.Z)(n,2),o=r[0],a=r[1];if(o)return[o,R,a,{},h,g]}var l=t(),c=Je(l,{hashId:u,hashPriority:E,layer:M?d:void 0,path:s.join("-"),transformers:P,linters:T}),f=(0,i.Z)(c,2),p=f[0],m=f[1],A=Qe(p),y=et(O,A);return[A,R,y,m,h,g]}),(function(e,t){var n=(0,i.Z)(e,3)[2];(t||b)&&N&&(0,l.jL)(n,{mark:v})}),(function(e){var t=(0,i.Z)(e,4),n=t[0],r=(t[1],t[2]),o=t[3];if(I&&n!==qe){var s={mark:v,prepend:!M&&"queue",attachTo:S,priority:g},c="function"===typeof f?f():f;c&&(s.csp={nonce:c});var u=[],d=[];Object.keys(o).forEach((function(e){e.startsWith("@layer")?u.push(e):d.push(e)})),u.forEach((function(e){(0,l.hq)(Qe(o[e]),"_layer-".concat(e),(0,a.Z)((0,a.Z)({},s),{},{prepend:!0}))}));var h=(0,l.hq)(n,r,s);h[A]=k.instanceId,h.setAttribute(m,R),d.forEach((function(e){(0,l.hq)(Qe(o[e]),"_effect-".concat(e),s)}))}})),D=(0,i.Z)(L,3),F=D[0],j=D[1],B=D[2];return function(e){var t,n;C&&!I&&w?t=c.createElement("style",(0,te.Z)({},(n={},(0,r.Z)(n,m,j),(0,r.Z)(n,v,B),n),{dangerouslySetInnerHTML:{__html:F}})):t=c.createElement(tt,null);return c.createElement(c.Fragment,null,t,e)}}var it="cssVar";const ot=function(e,t){var n=e.key,r=e.prefix,a=e.unitless,s=e.ignore,u=e.token,d=e.scope,f=void 0===d?"":d,h=(0,c.useContext)(_),p=h.cache.instanceId,g=h.container,y=u._tokenKey,b=[].concat((0,o.Z)(e.path),[n,f,y]);return G(it,b,(function(){var e=t(),o=Z(e,n,{prefix:r,unitless:a,ignore:s,scope:f}),l=(0,i.Z)(o,2),c=l[0],u=l[1];return[c,u,et(b,u),n]}),(function(e){var t=(0,i.Z)(e,3)[2];N&&(0,l.jL)(t,{mark:v})}),(function(e){var t=(0,i.Z)(e,3),r=t[1],o=t[2];if(r){var a=(0,l.hq)(r,o,{mark:v,prepend:"queue",attachTo:g,priority:-999});a[A]=p,a.setAttribute(m,n)}}))};var at;at={},(0,r.Z)(at,nt,(function(e,t,n){var r=(0,i.Z)(e,6),o=r[0],a=r[1],s=r[2],l=r[3],c=r[4],u=r[5],d=(n||{}).plain;if(c)return null;var f=o,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return f=F(o,a,s,h,d),l&&Object.keys(l).forEach((function(e){if(!t[e]){t[e]=!0;var n=F(Qe(l[e]),a,"_effect-".concat(e),h,d);e.startsWith("@layer")?f=n+f:f+=n}})),[u,s,f]})),(0,r.Z)(at,J,(function(e,t,n){var r=(0,i.Z)(e,5),o=r[2],a=r[3],s=r[4],l=(n||{}).plain;if(!a)return null;var c=o._tokenKey;return[-999,c,F(a,s,c,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]})),(0,r.Z)(at,it,(function(e,t,n){var r=(0,i.Z)(e,4),o=r[1],a=r[2],s=r[3],l=(n||{}).plain;if(!o)return null;return[-999,a,F(o,s,a,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]}));const st=function(){function e(t,n){(0,d.Z)(this,e),(0,r.Z)(this,"name",void 0),(0,r.Z)(this,"style",void 0),(0,r.Z)(this,"_keyframe",!0),this.name=t,this.style=n}return(0,f.Z)(e,[{key:"getName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),e}();function lt(e){return e.notSplit=!0,e}lt(["borderTop","borderBottom"]),lt(["borderTop"]),lt(["borderBottom"]),lt(["borderLeft","borderRight"]),lt(["borderLeft"]),lt(["borderRight"])},2567:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(91010),i=n(13747),o=n(68185),a=n(99309),s=n(57435),l=n(12356),c=n.n(l),u=n(62810),d=n(92255),f=n(35194),h=n(69223),p=n(86263),g=n(13834),m=n(98162);function v(e){return"object"===(0,h.Z)(e)&&"string"===typeof e.name&&"string"===typeof e.theme&&("object"===(0,h.Z)(e.icon)||"function"===typeof e.icon)}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r,i=e[n];if("class"===n)t.className=i,delete t.class;else delete t[n],t[(r=n,r.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=i;return t}),{})}function y(e,t,n){return n?s.createElement(e.tag,(0,f.Z)((0,f.Z)({key:t},A(e.attrs)),n),(e.children||[]).map((function(n,r){return y(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):s.createElement(e.tag,(0,f.Z)({key:t},A(e.attrs)),(e.children||[]).map((function(n,r){return y(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function b(e){return(0,u.R_)(e)[0]}function _(e){return e?Array.isArray(e)?e:[e]:[]}var w=["icon","className","onClick","style","primaryColor","secondaryColor"],x={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var E=function(e){var t,n,r=e.icon,i=e.className,o=e.onClick,l=e.style,c=e.primaryColor,u=e.secondaryColor,h=(0,a.Z)(e,w),A=s.useRef(),_=x;if(c&&(_={primaryColor:c,secondaryColor:u||b(c)}),function(e){var t=(0,s.useContext)(d.Z),n=t.csp,r=t.prefixCls,i="\n.anticon {\n display: inline-flex;\n alignItems: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";r&&(i=i.replace(/anticon/g,r)),(0,s.useEffect)((function(){var t=e.current,r=(0,g.A)(t);(0,p.hq)(i,"@ant-design-icons",{prepend:!0,csp:n,attachTo:r})}),[])}(A),t=v(r),n="icon should be icon definiton, but got ".concat(r),(0,m.ZP)(t,"[@ant-design/icons] ".concat(n)),!v(r))return null;var E=r;return E&&"function"===typeof E.icon&&(E=(0,f.Z)((0,f.Z)({},E),{},{icon:E.icon(_.primaryColor,_.secondaryColor)})),y(E.icon,"svg-".concat(E.name),(0,f.Z)((0,f.Z)({className:i,onClick:o,style:l,"data-icon":E.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},h),{},{ref:A}))};E.displayName="IconReact",E.getTwoToneColors=function(){return(0,f.Z)({},x)},E.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;x.primaryColor=t,x.secondaryColor=n||b(t),x.calculated=!!n};const S=E;function C(e){var t=_(e),n=(0,i.Z)(t,2),r=n[0],o=n[1];return S.setTwoToneColors({primaryColor:r,secondaryColor:o})}var P=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];C(u.iN.primary);var T=s.forwardRef((function(e,t){var n=e.className,l=e.icon,u=e.spin,f=e.rotate,h=e.tabIndex,p=e.onClick,g=e.twoToneColor,m=(0,a.Z)(e,P),v=s.useContext(d.Z),A=v.prefixCls,y=void 0===A?"anticon":A,b=v.rootClassName,w=c()(b,y,(0,o.Z)((0,o.Z)({},"".concat(y,"-").concat(l.name),!!l.name),"".concat(y,"-spin"),!!u||"loading"===l.name),n),x=h;void 0===x&&p&&(x=-1);var E=f?{msTransform:"rotate(".concat(f,"deg)"),transform:"rotate(".concat(f,"deg)")}:void 0,C=_(g),T=(0,i.Z)(C,2),k=T[0],M=T[1];return s.createElement("span",(0,r.Z)({role:"img","aria-label":l.name},m,{ref:t,tabIndex:x,onClick:p,className:w}),s.createElement(S,{icon:l,primaryColor:k,secondaryColor:M,style:E}))}));T.displayName="AntdIcon",T.getTwoToneColor=function(){var e=S.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},T.setTwoToneColor=C;const k=T},92255:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(57435).createContext)({})},3891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.42 0 448 200.58 448 448S759.42 960 512 960 64 759.42 64 512 264.58 64 512 64m32.5 168c-69.67 0-86.06 16.84-86.72 39.08l-.02 1.43v46.62H291.45c-9.92 0-14.28 23.05-14.27 39.3 0 2.7 2.08 4.93 4.77 4.93h175.81v58.3h-116.5c-9.96 0-14.3 23.76-14.27 39.47a4.77 4.77 0 004.77 4.76h233.45c-4.53 41.06-15.43 77.59-30.72 109.32l-1.22 2.5-.32-.28c-60.24-28.47-120.43-52.57-194.4-52.57l-2.62.01c-84.98 1.11-144.71 56.5-145.91 127.04l-.02 1.22.02 2.13c1.24 70.4 63.56 126.45 148.52 126.45 61.25 0 116.38-16.85 163.46-45.02a138.58 138.58 0 0014.07-7.96 345.6 345.6 0 0050.3-41.16l9.45 6.35 12.46 8.32c57.53 38.26 113.76 72.62 169.86 79.27a142.62 142.62 0 0018.31 1.16c43.02 0 55-52.68 57.39-95.51l.14-2.84c.4-8.46-6.2-15.6-14.65-15.86-75.46-2.37-136.45-22.05-192-46.11l-6.27-2.75c35.15-56.8 56.66-121.81 57.15-186.66l.09-1.08c.4-5.51-4-10.2-9.52-10.2H549.33v-58.3h165.73c9.92 0 14.28-22.12 14.27-39.31a4.85 4.85 0 00-4.78-4.92H549.32v-82.35a4.8 4.8 0 00-4.83-4.78M328 583.85c54.63 0 107.08 22.41 158.1 52.19l5.76 3.4c-103.57 119.84-247.17 95.9-261.72 26.37a66.89 66.89 0 01-1.14-9.83l-.06-2.34.02-.9c.97-40.12 45.33-68.9 99.04-68.9"}}]},name:"alipay-circle",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},55201:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},94964:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},77022:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v584zM688 420h-55.2c-5.1 0-10 2.5-13 6.6L468.9 634.4l-64.7-89c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.4 0-12.8-6.5-12.8z"}}]},name:"carry-out",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},672:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},49527:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},15215:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},16094:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},83480:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},52451:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},94574:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},8662:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},55159:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},33049:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},88966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},1625:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},51701:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},46779:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},73558:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},74682:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},6069:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:t}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:e}}]}},name:"file",theme:"twotone"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},25065:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},72557:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},90918:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},68088:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},84415:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},37215:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:e}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:t}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:t}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:t}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:e}}]}},name:"picture",theme:"twotone"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},91434:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},88266:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},90304:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},79564:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},81774:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},10786:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},85268:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},81114:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z"}}]},name:"wechat",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},66746:(e,t,n)=>{"use strict";n.d(t,{Z:()=>oe});var r=n(91010),i=n(35194),o=n(66375),a=n(1959),s=n(4041),l=n(22935),c=n(72693),u=n(64648),d=n(68185),f=n(57435),h=n(69223),p=n(99309);const g={animating:!1,autoplaying:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,dragging:!1,edgeDragged:!1,initialized:!1,lazyLoadedList:[],listHeight:null,listWidth:null,scrolling:!1,slideCount:null,slideHeight:null,slideWidth:null,swipeLeft:null,swiped:!1,swiping:!1,touchObject:{startX:0,startY:0,curX:0,curY:0},trackStyle:{},trackWidth:0,targetSlide:0};var m=n(38078),v=n(12356),A=n.n(v);const y={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return f.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(e){return f.createElement("button",null,e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0,asNavFor:null};function b(e,t,n){return Math.max(t,Math.min(e,n))}var _=function(e){["onTouchStart","onTouchMove","onWheel"].includes(e._reactName)||e.preventDefault()},w=function(e){for(var t=[],n=x(e),r=E(e),i=n;i0?1:0):0},C=function(e){return e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow},P=function(e){return e&&e.offsetWidth||0},T=function(e){return e&&e.offsetHeight||0},k=function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e.startX-e.curX,n=e.startY-e.curY,r=Math.atan2(n,t),(i=Math.round(180*r/Math.PI))<0&&(i=360-Math.abs(i)),i<=45&&i>=0||i<=360&&i>=315?"left":i>=135&&i<=225?"right":!0===o?i>=35&&i<=135?"up":"down":"vertical"},M=function(e){var t=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1||e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1),t},R=function(e,t){var n={};return t.forEach((function(t){return n[t]=e[t]})),n},O=function(e,t){var n=function(e){for(var t=e.infinite?2*e.slideCount:e.slideCount,n=e.infinite?-1*e.slidesToShow:0,r=e.infinite?-1*e.slidesToShow:0,i=[];nn[n.length-1])t=n[n.length-1];else for(var i in n){if(t-1*e.swipeLeft)return n=r,!1}else if(r.offsetLeft-t+P(r)/2>-1*e.swipeLeft)return n=r,!1;return!0})),!n)return 0;var o=!0===e.rtl?e.slideCount-e.currentSlide:e.currentSlide;return Math.abs(n.dataset.index-o)||1}return e.slidesToScroll},L=function(e,t){return t.reduce((function(t,n){return t&&e.hasOwnProperty(n)}),!0)?null:console.error("Keys Missing:",e)},N=function(e){var t,n;(L(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]),e.vertical)?n=(e.unslick?e.slideCount:e.slideCount+2*e.slidesToShow)*e.slideHeight:t=Z(e)*e.slideWidth;var r={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){var o=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",a=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",s=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";r=(0,i.Z)((0,i.Z)({},r),{},{WebkitTransform:o,transform:a,msTransform:s})}else e.vertical?r.top=e.left:r.left=e.left;return e.fade&&(r={opacity:1}),t&&(r.width=t),n&&(r.height=n),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?r.marginTop=e.left+"px":r.marginLeft=e.left+"px"),r},D=function(e){L(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var t=N(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t},F=function(e){if(e.unslick)return 0;L(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var t,n,r=e.slideIndex,i=e.trackRef,o=e.infinite,a=e.centerMode,s=e.slideCount,l=e.slidesToShow,c=e.slidesToScroll,u=e.slideWidth,d=e.listWidth,f=e.variableWidth,h=e.slideHeight,p=e.fade,g=e.vertical;if(p||1===e.slideCount)return 0;var m=0;if(o?(m=-j(e),s%c!==0&&r+c>s&&(m=-(r>s?l-(r-s):s%c)),a&&(m+=parseInt(l/2))):(s%c!==0&&r+c>s&&(m=l-s%c),a&&(m=parseInt(l/2))),t=g?r*h*-1+m*h:r*u*-1+m*u,!0===f){var v,A=i&&i.node;if(v=r+j(e),t=(n=A&&A.childNodes[v])?-1*n.offsetLeft:0,!0===a){v=o?r+j(e):r,n=A&&A.children[v],t=0;for(var y=0;ye.currentSlide?e.targetSlide>e.currentSlide+U(e)?"left":"right":e.targetSlide0&&(o+=1),r&&t%2===0&&(o+=1),o}return r?0:t-1},H=function(e){var t=e.slidesToShow,n=e.centerMode,r=e.rtl,i=e.centerPadding;if(n){var o=(t-1)/2+1;return parseInt(i)>0&&(o+=1),r||t%2!==0||(o+=1),o}return r?t-1:0},V=function(){return!("undefined"===typeof window||!window.document||!window.document.createElement)},W=Object.keys(y);var G=function(e){var t,n,r,i,o;return r=(o=e.rtl?e.slideCount-1-e.index:e.index)<0||o>=e.slideCount,e.centerMode?(i=Math.floor(e.slidesToShow/2),n=(o-e.currentSlide)%e.slideCount===0,o>e.currentSlide-i-1&&o<=e.currentSlide+i&&(t=!0)):t=e.currentSlide<=o&&o=e.slideCount?e.targetSlide-e.slideCount:e.targetSlide)}},K=function(e,t){return e.key+"-"+t},q=function(e){var t,n=[],r=[],o=[],a=f.Children.count(e.children),s=x(e),l=E(e);return f.Children.forEach(e.children,(function(c,u){var d,h={message:"children",index:u,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};d=!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(u)>=0?c:f.createElement("div",null);var p=function(e){var t={};return void 0!==e.variableWidth&&!1!==e.variableWidth||(t.width=e.slideWidth),e.fade&&(t.position="relative",e.vertical&&e.slideHeight?t.top=-e.index*parseInt(e.slideHeight):t.left=-e.index*parseInt(e.slideWidth),t.opacity=e.currentSlide===e.index?1:0,t.zIndex=e.currentSlide===e.index?999:998,e.useCSS&&(t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),t}((0,i.Z)((0,i.Z)({},e),{},{index:u})),g=d.props.className||"",m=G((0,i.Z)((0,i.Z)({},e),{},{index:u}));if(n.push(f.cloneElement(d,{key:"original"+K(d,u),"data-index":u,className:A()(m,g),tabIndex:"-1","aria-hidden":!m["slick-active"],style:(0,i.Z)((0,i.Z)({outline:"none"},d.props.style||{}),p),onClick:function(t){d.props&&d.props.onClick&&d.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(h)}})),e.infinite&&a>1&&!1===e.fade&&!e.unslick){var v=a-u;v<=j(e)&&((t=-v)>=s&&(d=c),m=G((0,i.Z)((0,i.Z)({},e),{},{index:t})),r.push(f.cloneElement(d,{key:"precloned"+K(d,t),"data-index":t,tabIndex:"-1",className:A()(m,g),"aria-hidden":!m["slick-active"],style:(0,i.Z)((0,i.Z)({},d.props.style||{}),p),onClick:function(t){d.props&&d.props.onClick&&d.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(h)}}))),(t=a+u)=_&&u<=v:u===_}),x={message:"dots",index:g,slidesToScroll:s,currentSlide:u},E=this.clickHandler.bind(this,x);p=p.concat(f.createElement("li",{key:g,className:w},f.cloneElement(this.props.customPaging(g),{onClick:E})))}return f.cloneElement(this.props.appendDots(p),(0,i.Z)({className:this.props.dotsClass},h))}}])}(f.PureComponent);function $(e,t,n){return t=(0,c.Z)(t),(0,s.Z)(e,(0,l.Z)()?Reflect.construct(t,n||[],(0,c.Z)(e).constructor):t.apply(e,n))}var Q=function(e){function t(){return(0,o.Z)(this,t),$(this,t,arguments)}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-prev":!0},t=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(0===this.props.currentSlide||this.props.slideCount<=this.props.slidesToShow)&&(e["slick-disabled"]=!0,t=null);var n={key:"0","data-role":"none",className:A()(e),style:{display:"block"},onClick:t},o={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.prevArrow?f.cloneElement(this.props.prevArrow,(0,i.Z)((0,i.Z)({},n),o)):f.createElement("button",(0,r.Z)({key:"0",type:"button"},n)," ","Previous")}}])}(f.PureComponent),J=function(e){function t(){return(0,o.Z)(this,t),$(this,t,arguments)}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-next":!0},t=this.clickHandler.bind(this,{message:"next"});M(this.props)||(e["slick-disabled"]=!0,t=null);var n={key:"1","data-role":"none",className:A()(e),style:{display:"block"},onClick:t},o={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.nextArrow?f.cloneElement(this.props.nextArrow,(0,i.Z)((0,i.Z)({},n),o)):f.createElement("button",(0,r.Z)({key:"1",type:"button"},n)," ","Next")}}])}(f.PureComponent),ee=n(46890),te=["animating"];var ne=function(e){function t(e){var n;(0,o.Z)(this,t),n=function(e,t,n){return t=(0,c.Z)(t),(0,s.Z)(e,(0,l.Z)()?Reflect.construct(t,n||[],(0,c.Z)(e).constructor):t.apply(e,n))}(this,t,[e]),(0,d.Z)(n,"listRefHandler",(function(e){return n.list=e})),(0,d.Z)(n,"trackRefHandler",(function(e){return n.track=e})),(0,d.Z)(n,"adaptHeight",(function(){if(n.props.adaptiveHeight&&n.list){var e=n.list.querySelector('[data-index="'.concat(n.state.currentSlide,'"]'));n.list.style.height=T(e)+"px"}})),(0,d.Z)(n,"componentDidMount",(function(){if(n.props.onInit&&n.props.onInit(),n.props.lazyLoad){var e=w((0,i.Z)((0,i.Z)({},n.props),n.state));e.length>0&&(n.setState((function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}})),n.props.onLazyLoad&&n.props.onLazyLoad(e))}var t=(0,i.Z)({listRef:n.list,trackRef:n.track},n.props);n.updateState(t,!0,(function(){n.adaptHeight(),n.props.autoplay&&n.autoPlay("playing")})),"progressive"===n.props.lazyLoad&&(n.lazyLoadTimer=setInterval(n.progressiveLazyLoad,1e3)),n.ro=new ee.Z((function(){n.state.animating?(n.onWindowResized(!1),n.callbackTimers.push(setTimeout((function(){return n.onWindowResized()}),n.props.speed))):n.onWindowResized()})),n.ro.observe(n.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),(function(e){e.onfocus=n.props.pauseOnFocus?n.onSlideFocus:null,e.onblur=n.props.pauseOnFocus?n.onSlideBlur:null})),window.addEventListener?window.addEventListener("resize",n.onWindowResized):window.attachEvent("onresize",n.onWindowResized)})),(0,d.Z)(n,"componentWillUnmount",(function(){n.animationEndCallback&&clearTimeout(n.animationEndCallback),n.lazyLoadTimer&&clearInterval(n.lazyLoadTimer),n.callbackTimers.length&&(n.callbackTimers.forEach((function(e){return clearTimeout(e)})),n.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",n.onWindowResized):window.detachEvent("onresize",n.onWindowResized),n.autoplayTimer&&clearInterval(n.autoplayTimer),n.ro.disconnect()})),(0,d.Z)(n,"componentDidUpdate",(function(e){if(n.checkImagesLoad(),n.props.onReInit&&n.props.onReInit(),n.props.lazyLoad){var t=w((0,i.Z)((0,i.Z)({},n.props),n.state));t.length>0&&(n.setState((function(e){return{lazyLoadedList:e.lazyLoadedList.concat(t)}})),n.props.onLazyLoad&&n.props.onLazyLoad(t))}n.adaptHeight();var r=(0,i.Z)((0,i.Z)({listRef:n.list,trackRef:n.track},n.props),n.state),o=n.didPropsChange(e);o&&n.updateState(r,o,(function(){n.state.currentSlide>=f.Children.count(n.props.children)&&n.changeSlide({message:"index",index:f.Children.count(n.props.children)-n.props.slidesToShow,currentSlide:n.state.currentSlide}),e.autoplay===n.props.autoplay&&e.autoplaySpeed===n.props.autoplaySpeed||(!e.autoplay&&n.props.autoplay?n.autoPlay("playing"):n.props.autoplay?n.autoPlay("update"):n.pause("paused"))}))})),(0,d.Z)(n,"onWindowResized",(function(e){n.debouncedResize&&n.debouncedResize.cancel(),n.debouncedResize=(0,m.D)(50,(function(){return n.resizeWindow(e)})),n.debouncedResize()})),(0,d.Z)(n,"resizeWindow",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(Boolean(n.track&&n.track.node)){var t=(0,i.Z)((0,i.Z)({listRef:n.list,trackRef:n.track},n.props),n.state);n.updateState(t,e,(function(){n.props.autoplay?n.autoPlay("update"):n.pause("paused")})),n.setState({animating:!1}),clearTimeout(n.animationEndCallback),delete n.animationEndCallback}})),(0,d.Z)(n,"updateState",(function(e,t,r){var o=function(e){var t,n=f.Children.count(e.children),r=e.listRef,o=Math.ceil(P(r)),a=e.trackRef&&e.trackRef.node,s=Math.ceil(P(a));if(e.vertical)t=o;else{var l=e.centerMode&&2*parseInt(e.centerPadding);"string"===typeof e.centerPadding&&"%"===e.centerPadding.slice(-1)&&(l*=o/100),t=Math.ceil((o-l)/e.slidesToShow)}var c=r&&T(r.querySelector('[data-index="0"]')),u=c*e.slidesToShow,d=void 0===e.currentSlide?e.initialSlide:e.currentSlide;e.rtl&&void 0===e.currentSlide&&(d=n-1-e.initialSlide);var h=e.lazyLoadedList||[],p=w((0,i.Z)((0,i.Z)({},e),{},{currentSlide:d,lazyLoadedList:h})),g={slideCount:n,slideWidth:t,listWidth:o,trackWidth:s,currentSlide:d,slideHeight:c,listHeight:u,lazyLoadedList:h=h.concat(p)};return null===e.autoplaying&&e.autoplay&&(g.autoplaying="playing"),g}(e);e=(0,i.Z)((0,i.Z)((0,i.Z)({},e),o),{},{slideIndex:o.currentSlide});var a=F(e);e=(0,i.Z)((0,i.Z)({},e),{},{left:a});var s=N(e);(t||f.Children.count(n.props.children)!==f.Children.count(e.children))&&(o.trackStyle=s),n.setState(o,r)})),(0,d.Z)(n,"ssrInit",(function(){if(n.props.variableWidth){var e=0,t=0,r=[],o=j((0,i.Z)((0,i.Z)((0,i.Z)({},n.props),n.state),{},{slideCount:n.props.children.length})),a=B((0,i.Z)((0,i.Z)((0,i.Z)({},n.props),n.state),{},{slideCount:n.props.children.length}));n.props.children.forEach((function(t){r.push(t.props.style.width),e+=t.props.style.width}));for(var s=0;s=t&&n.onWindowResized()};if(e.onclick){var o=e.onclick;e.onclick=function(t){o(t),e.parentNode.focus()}}else e.onclick=function(){return e.parentNode.focus()};e.onload||(n.props.lazyLoad?e.onload=function(){n.adaptHeight(),n.callbackTimers.push(setTimeout(n.onWindowResized,n.props.speed))}:(e.onload=i,e.onerror=function(){i(),n.props.onLazyLoadError&&n.props.onLazyLoadError()}))}))})),(0,d.Z)(n,"progressiveLazyLoad",(function(){for(var e=[],t=(0,i.Z)((0,i.Z)({},n.props),n.state),r=n.state.currentSlide;r=-j(t);o--)if(n.state.lazyLoadedList.indexOf(o)<0){e.push(o);break}e.length>0?(n.setState((function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}})),n.props.onLazyLoad&&n.props.onLazyLoad(e)):n.lazyLoadTimer&&(clearInterval(n.lazyLoadTimer),delete n.lazyLoadTimer)})),(0,d.Z)(n,"slideHandler",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=n.props,o=r.asNavFor,a=r.beforeChange,s=r.onLazyLoad,l=r.speed,c=r.afterChange,u=n.state.currentSlide,d=function(e){var t=e.waitForAnimate,n=e.animating,r=e.fade,o=e.infinite,a=e.index,s=e.slideCount,l=e.lazyLoad,c=e.currentSlide,u=e.centerMode,d=e.slidesToScroll,f=e.slidesToShow,h=e.useCSS,p=e.lazyLoadedList;if(t&&n)return{};var g,m,v,A=a,y={},_={},x=o?a:b(a,0,s-1);if(r){if(!o&&(a<0||a>=s))return{};a<0?A=a+s:a>=s&&(A=a-s),l&&p.indexOf(A)<0&&(p=p.concat(A)),y={animating:!0,currentSlide:A,lazyLoadedList:p,targetSlide:A},_={animating:!1,targetSlide:A}}else g=A,A<0?(g=A+s,o?s%d!==0&&(g=s-s%d):g=0):!M(e)&&A>c?A=g=c:u&&A>=s?(A=o?s:s-1,g=o?0:s-1):A>=s&&(g=A-s,o?s%d!==0&&(g=0):g=s-f),!o&&A+f>=s&&(g=s-f),m=F((0,i.Z)((0,i.Z)({},e),{},{slideIndex:A})),v=F((0,i.Z)((0,i.Z)({},e),{},{slideIndex:g})),o||(m===v&&(A=g),m=v),l&&(p=p.concat(w((0,i.Z)((0,i.Z)({},e),{},{currentSlide:A})))),h?(y={animating:!0,currentSlide:g,trackStyle:D((0,i.Z)((0,i.Z)({},e),{},{left:m})),lazyLoadedList:p,targetSlide:x},_={animating:!1,currentSlide:g,trackStyle:N((0,i.Z)((0,i.Z)({},e),{},{left:v})),swipeLeft:null,targetSlide:x}):y={currentSlide:g,trackStyle:N((0,i.Z)((0,i.Z)({},e),{},{left:v})),lazyLoadedList:p,targetSlide:x};return{state:y,nextState:_}}((0,i.Z)((0,i.Z)((0,i.Z)({index:e},n.props),n.state),{},{trackRef:n.track,useCSS:n.props.useCSS&&!t})),f=d.state,h=d.nextState;if(f){a&&a(u,f.currentSlide);var g=f.lazyLoadedList.filter((function(e){return n.state.lazyLoadedList.indexOf(e)<0}));s&&g.length>0&&s(g),!n.props.waitForAnimate&&n.animationEndCallback&&(clearTimeout(n.animationEndCallback),c&&c(u),delete n.animationEndCallback),n.setState(f,(function(){o&&n.asNavForIndex!==e&&(n.asNavForIndex=e,o.innerSlider.slideHandler(e)),h&&(n.animationEndCallback=setTimeout((function(){var e=h.animating,t=(0,p.Z)(h,te);n.setState(t,(function(){n.callbackTimers.push(setTimeout((function(){return n.setState({animating:e})}),10)),c&&c(f.currentSlide),delete n.animationEndCallback}))}),l))}))}})),(0,d.Z)(n,"changeSlide",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=function(e,t){var n,r,o,a,s=e.slidesToScroll,l=e.slidesToShow,c=e.slideCount,u=e.currentSlide,d=e.targetSlide,f=e.lazyLoad,h=e.infinite;if(n=c%s!==0?0:(c-u)%s,"previous"===t.message)a=u-(o=0===n?s:l-n),f&&!h&&(a=-1===(r=u-o)?c-1:r),h||(a=d-s);else if("next"===t.message)a=u+(o=0===n?s:n),f&&!h&&(a=(u+s)%c+n),h||(a=d+s);else if("dots"===t.message)a=t.index*t.slidesToScroll;else if("children"===t.message){if(a=t.index,h){var p=z((0,i.Z)((0,i.Z)({},e),{},{targetSlide:a}));a>t.currentSlide&&"left"===p?a-=c:a10)return{scrolling:!0};s&&(A.swipeLength=C);var P=(l?-1:1)*(A.curX>A.startX?1:-1);s&&(P=A.curY>A.startY?1:-1);var T=Math.ceil(g/m),R=k(t.touchObject,s),O=A.swipeLength;return v||(0===c&&("right"===R||"down"===R)||c+1>=T&&("left"===R||"up"===R)||!M(t)&&("left"===R||"up"===R))&&(O=A.swipeLength*u,!1===d&&f&&(f(R),E.edgeDragged=!0)),!h&&y&&(y(R),E.swiped=!0),x=o?S+O*(b/w)*P:l?S-O*P:S+O*P,s&&(x=S+O*P),E=(0,i.Z)((0,i.Z)({},E),{},{touchObject:A,swipeLeft:x,trackStyle:N((0,i.Z)((0,i.Z)({},t),{},{left:x}))}),Math.abs(A.curX-A.startX)<.8*Math.abs(A.curY-A.startY)||A.swipeLength>10&&(E.swiping=!0,_(e)),E}}(e,(0,i.Z)((0,i.Z)((0,i.Z)({},n.props),n.state),{},{trackRef:n.track,listRef:n.list,slideIndex:n.state.currentSlide}));t&&(t.swiping&&(n.clickable=!1),n.setState(t))})),(0,d.Z)(n,"swipeEnd",(function(e){var t=function(e,t){var n=t.dragging,r=t.swipe,o=t.touchObject,a=t.listWidth,s=t.touchThreshold,l=t.verticalSwiping,c=t.listHeight,u=t.swipeToSlide,d=t.scrolling,f=t.onSwipe,h=t.targetSlide,p=t.currentSlide,g=t.infinite;if(!n)return r&&_(e),{};var m=l?c/s:a/s,v=k(o,l),A={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(d)return A;if(!o.swipeLength)return A;if(o.swipeLength>m){var y,b;_(e),f&&f(v);var w=g?p:h;switch(v){case"left":case"up":b=w+I(t),y=u?O(t,b):b,A.currentDirection=0;break;case"right":case"down":b=w-I(t),y=u?O(t,b):b,A.currentDirection=1;break;default:y=w}A.triggerSlideHandler=y}else{var x=F(t);A.trackStyle=D((0,i.Z)((0,i.Z)({},t),{},{left:x}))}return A}(e,(0,i.Z)((0,i.Z)((0,i.Z)({},n.props),n.state),{},{trackRef:n.track,listRef:n.list,slideIndex:n.state.currentSlide}));if(t){var r=t.triggerSlideHandler;delete t.triggerSlideHandler,n.setState(t),void 0!==r&&(n.slideHandler(r),n.props.verticalSwiping&&n.enableBodyScroll())}})),(0,d.Z)(n,"touchEnd",(function(e){n.swipeEnd(e),n.clickable=!0})),(0,d.Z)(n,"slickPrev",(function(){n.callbackTimers.push(setTimeout((function(){return n.changeSlide({message:"previous"})}),0))})),(0,d.Z)(n,"slickNext",(function(){n.callbackTimers.push(setTimeout((function(){return n.changeSlide({message:"next"})}),0))})),(0,d.Z)(n,"slickGoTo",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=Number(e),isNaN(e))return"";n.callbackTimers.push(setTimeout((function(){return n.changeSlide({message:"index",index:e,currentSlide:n.state.currentSlide},t)}),0))})),(0,d.Z)(n,"play",(function(){var e;if(n.props.rtl)e=n.state.currentSlide-n.props.slidesToScroll;else{if(!M((0,i.Z)((0,i.Z)({},n.props),n.state)))return!1;e=n.state.currentSlide+n.props.slidesToScroll}n.slideHandler(e)})),(0,d.Z)(n,"autoPlay",(function(e){n.autoplayTimer&&clearInterval(n.autoplayTimer);var t=n.state.autoplaying;if("update"===e){if("hovered"===t||"focused"===t||"paused"===t)return}else if("leave"===e){if("paused"===t||"focused"===t)return}else if("blur"===e&&("paused"===t||"hovered"===t))return;n.autoplayTimer=setInterval(n.play,n.props.autoplaySpeed+50),n.setState({autoplaying:"playing"})})),(0,d.Z)(n,"pause",(function(e){n.autoplayTimer&&(clearInterval(n.autoplayTimer),n.autoplayTimer=null);var t=n.state.autoplaying;"paused"===e?n.setState({autoplaying:"paused"}):"focused"===e?"hovered"!==t&&"playing"!==t||n.setState({autoplaying:"focused"}):"playing"===t&&n.setState({autoplaying:"hovered"})})),(0,d.Z)(n,"onDotsOver",(function(){return n.props.autoplay&&n.pause("hovered")})),(0,d.Z)(n,"onDotsLeave",(function(){return n.props.autoplay&&"hovered"===n.state.autoplaying&&n.autoPlay("leave")})),(0,d.Z)(n,"onTrackOver",(function(){return n.props.autoplay&&n.pause("hovered")})),(0,d.Z)(n,"onTrackLeave",(function(){return n.props.autoplay&&"hovered"===n.state.autoplaying&&n.autoPlay("leave")})),(0,d.Z)(n,"onSlideFocus",(function(){return n.props.autoplay&&n.pause("focused")})),(0,d.Z)(n,"onSlideBlur",(function(){return n.props.autoplay&&"focused"===n.state.autoplaying&&n.autoPlay("blur")})),(0,d.Z)(n,"render",(function(){var e,t,o,a=A()("slick-slider",n.props.className,{"slick-vertical":n.props.vertical,"slick-initialized":!0}),s=(0,i.Z)((0,i.Z)({},n.props),n.state),l=R(s,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]),c=n.props.pauseOnHover;if(l=(0,i.Z)((0,i.Z)({},l),{},{onMouseEnter:c?n.onTrackOver:null,onMouseLeave:c?n.onTrackLeave:null,onMouseOver:c?n.onTrackOver:null,focusOnSelect:n.props.focusOnSelect&&n.clickable?n.selectHandler:null}),!0===n.props.dots&&n.state.slideCount>=n.props.slidesToShow){var u=R(s,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","customPaging","infinite","appendDots"]),d=n.props.pauseOnDotsHover;u=(0,i.Z)((0,i.Z)({},u),{},{clickHandler:n.changeSlide,onMouseEnter:d?n.onDotsLeave:null,onMouseOver:d?n.onDotsOver:null,onMouseLeave:d?n.onDotsLeave:null}),e=f.createElement(X,u)}var h=R(s,["infinite","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","nextArrow"]);h.clickHandler=n.changeSlide,n.props.arrows&&(t=f.createElement(Q,h),o=f.createElement(J,h));var p=null;n.props.vertical&&(p={height:n.state.listHeight});var g=null;!1===n.props.vertical?!0===n.props.centerMode&&(g={padding:"0px "+n.props.centerPadding}):!0===n.props.centerMode&&(g={padding:n.props.centerPadding+" 0px"});var m=(0,i.Z)((0,i.Z)({},p),g),v=n.props.touchMove,y={className:"slick-list",style:m,onClick:n.clickHandler,onMouseDown:v?n.swipeStart:null,onMouseMove:n.state.dragging&&v?n.swipeMove:null,onMouseUp:v?n.swipeEnd:null,onMouseLeave:n.state.dragging&&v?n.swipeEnd:null,onTouchStart:v?n.swipeStart:null,onTouchMove:n.state.dragging&&v?n.swipeMove:null,onTouchEnd:v?n.touchEnd:null,onTouchCancel:n.state.dragging&&v?n.swipeEnd:null,onKeyDown:n.props.accessibility?n.keyHandler:null},b={className:a,dir:"ltr",style:n.props.style};return n.props.unslick&&(y={className:"slick-list"},b={className:a,style:n.props.style}),f.createElement("div",b,n.props.unslick?"":t,f.createElement("div",(0,r.Z)({ref:n.listRefHandler},y),f.createElement(Y,(0,r.Z)({ref:n.trackRefHandler},l),n.props.children)),n.props.unslick?"":o,n.props.unslick?"":e)})),n.list=null,n.track=null,n.state=(0,i.Z)((0,i.Z)({},g),{},{currentSlide:n.props.initialSlide,targetSlide:n.props.initialSlide?n.props.initialSlide:0,slideCount:f.Children.count(n.props.children)}),n.callbackTimers=[],n.clickable=!0,n.debouncedResize=null;var a=n.ssrInit();return n.state=(0,i.Z)((0,i.Z)({},n.state),a),n}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"didPropsChange",value:function(e){for(var t=!1,n=0,r=Object.keys(this.props);n1&&void 0!==arguments[1]&&arguments[1];return n.innerSlider.slickGoTo(e,t)})),(0,d.Z)(n,"slickPause",(function(){return n.innerSlider.pause("paused")})),(0,d.Z)(n,"slickPlay",(function(){return n.innerSlider.autoPlay("play")})),n.state={breakpoint:null},n._responsiveMediaHandlers=[],n}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"media",value:function(e,t){var n=window.matchMedia(e),r=function(e){e.matches&&t()};n.addListener(r),r(n),this._responsiveMediaHandlers.push({mql:n,query:e,listener:r})}},{key:"componentDidMount",value:function(){var e=this;if(this.props.responsive){var t=this.props.responsive.map((function(e){return e.breakpoint}));t.sort((function(e,t){return e-t})),t.forEach((function(n,r){var i;i=0===r?ie()({minWidth:0,maxWidth:n}):ie()({minWidth:t[r-1]+1,maxWidth:n}),V()&&e.media(i,(function(){e.setState({breakpoint:n})}))}));var n=ie()({minWidth:t.slice(-1)[0]});V()&&this.media(n,(function(){e.setState({breakpoint:null})}))}}},{key:"componentWillUnmount",value:function(){this._responsiveMediaHandlers.forEach((function(e){e.mql.removeListener(e.listener)}))}},{key:"render",value:function(){var e,t,n=this;(e=this.state.breakpoint?"unslick"===(t=this.props.responsive.filter((function(e){return e.breakpoint===n.state.breakpoint})))[0].settings?"unslick":(0,i.Z)((0,i.Z)((0,i.Z)({},y),this.props),t[0].settings):(0,i.Z)((0,i.Z)({},y),this.props)).centerMode&&(e.slidesToScroll,e.slidesToScroll=1),e.fade&&(e.slidesToShow,e.slidesToScroll,e.slidesToShow=1,e.slidesToScroll=1);var o=f.Children.toArray(this.props.children);o=o.filter((function(e){return"string"===typeof e?!!e.trim():!!e})),e.variableWidth&&(e.rows>1||e.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),e.variableWidth=!1);for(var a=[],s=null,l=0;l=o.length));h+=1)d.push(f.cloneElement(o[h],{key:100*l+10*u+h,tabIndex:-1,style:{width:"".concat(100/e.slidesPerRow,"%"),display:"inline-block"}}));c.push(f.createElement("div",{key:10*l+u},d))}e.variableWidth?a.push(f.createElement("div",{key:l,style:{width:s}},c)):a.push(f.createElement("div",{key:l},c))}if("unslick"===e){var p="regular slider "+(this.props.className||"");return f.createElement("div",{className:p},o)}return a.length<=e.slidesToShow&&!e.infinite&&(e.unslick=!0),f.createElement(ne,(0,r.Z)({style:this.props.style,ref:this.innerSliderRefHandler},function(e){return W.reduce((function(t,n){return e.hasOwnProperty(n)&&(t[n]=e[n]),t}),{})}(e)),a)}}])}(f.Component)},76471:(e,t,n)=>{"use strict";n.d(t,{T6:()=>h,VD:()=>p,WE:()=>c,Yt:()=>g,lC:()=>o,py:()=>l,rW:()=>i,s:()=>d,ve:()=>s,vq:()=>u});var r=n(39553);function i(e,t,n){return{r:255*(0,r.sh)(e,255),g:255*(0,r.sh)(t,255),b:255*(0,r.sh)(n,255)}}function o(e,t,n){e=(0,r.sh)(e,255),t=(0,r.sh)(t,255),n=(0,r.sh)(n,255);var i=Math.max(e,t,n),o=Math.min(e,t,n),a=0,s=0,l=(i+o)/2;if(i===o)s=0,a=0;else{var c=i-o;switch(s=l>.5?c/(2-i-o):c/(i+o),i){case e:a=(t-n)/c+(t1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function s(e,t,n){var i,o,s;if(e=(0,r.sh)(e,360),t=(0,r.sh)(t,100),n=(0,r.sh)(n,100),0===t)o=n,s=n,i=n;else{var l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=a(c,l,e+1/3),o=a(c,l,e),s=a(c,l,e-1/3)}return{r:255*i,g:255*o,b:255*s}}function l(e,t,n){e=(0,r.sh)(e,255),t=(0,r.sh)(t,255),n=(0,r.sh)(n,255);var i=Math.max(e,t,n),o=Math.min(e,t,n),a=0,s=i,l=i-o,c=0===i?0:l/i;if(i===o)a=0;else{switch(i){case e:a=(t-n)/l+(t>16,g:(65280&e)>>8,b:255&e}}},75109:(e,t,n)=>{"use strict";n.d(t,{R:()=>r});var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},18948:(e,t,n)=>{"use strict";n.d(t,{uA:()=>a});var r=n(76471),i=n(75109),o=n(39553);function a(e){var t={r:0,g:0,b:0},n=1,a=null,s=null,l=null,c=!1,f=!1;return"string"===typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(i.R[e])e=i.R[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=u.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=u.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=u.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=u.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=u.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=u.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=u.hex8.exec(e),n)return{r:(0,r.VD)(n[1]),g:(0,r.VD)(n[2]),b:(0,r.VD)(n[3]),a:(0,r.T6)(n[4]),format:t?"name":"hex8"};if(n=u.hex6.exec(e),n)return{r:(0,r.VD)(n[1]),g:(0,r.VD)(n[2]),b:(0,r.VD)(n[3]),format:t?"name":"hex"};if(n=u.hex4.exec(e),n)return{r:(0,r.VD)(n[1]+n[1]),g:(0,r.VD)(n[2]+n[2]),b:(0,r.VD)(n[3]+n[3]),a:(0,r.T6)(n[4]+n[4]),format:t?"name":"hex8"};if(n=u.hex3.exec(e),n)return{r:(0,r.VD)(n[1]+n[1]),g:(0,r.VD)(n[2]+n[2]),b:(0,r.VD)(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"===typeof e&&(d(e.r)&&d(e.g)&&d(e.b)?(t=(0,r.rW)(e.r,e.g,e.b),c=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):d(e.h)&&d(e.s)&&d(e.v)?(a=(0,o.JX)(e.s),s=(0,o.JX)(e.v),t=(0,r.WE)(e.h,a,s),c=!0,f="hsv"):d(e.h)&&d(e.s)&&d(e.l)&&(a=(0,o.JX)(e.s),l=(0,o.JX)(e.l),t=(0,r.ve)(e.h,a,l),c=!0,f="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=(0,o.Yq)(n),{ok:c,format:e.format||f,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var s="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),l="[\\s|\\(]+(".concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")\\s*\\)?"),c="[\\s|\\(]+(".concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")\\s*\\)?"),u={CSS_UNIT:new RegExp(s),rgb:new RegExp("rgb"+l),rgba:new RegExp("rgba"+c),hsl:new RegExp("hsl"+l),hsla:new RegExp("hsla"+c),hsv:new RegExp("hsv"+l),hsva:new RegExp("hsva"+c),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function d(e){return Boolean(u.CSS_UNIT.exec(String(e)))}},79388:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var r=n(76471),i=n(75109),o=n(18948),a=n(39553),s=function(){function e(t,n){var i;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"===typeof t&&(t=(0,r.Yt)(t)),this.originalInput=t;var a=(0,o.uA)(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(i=n.format)&&void 0!==i?i:a.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=(0,a.Yq)(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=(0,r.py)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=(0,r.py)(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),i=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=(0,r.lC)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=(0,r.lC)(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),i=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),(0,r.vq)(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),(0,r.s)(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*(0,a.sh)(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*(0,a.sh)(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+(0,r.vq)(this.r,this.g,this.b,!1),t=0,n=Object.entries(i.R);t=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=(0,a.V2)(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=(0,a.V2)(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=(0,a.V2)(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=(0,a.V2)(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100;return new e({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;a{"use strict";function r(e,t){(function(e){return"string"===typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function i(e){return Math.min(1,Math.max(0,e))}function o(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function a(e){return e<=1?"".concat(100*Number(e),"%"):e}function s(e){return 1===e.length?"0"+e:String(e)}n.d(t,{FZ:()=>s,JX:()=>a,V2:()=>i,Yq:()=>o,sh:()=>r})},82253:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(68185),i=n(32603),o=n(98641),a=n(21921),s=n(76195);function l(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}class c extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}initializeAggregationLayer(e){super.initializeState(this.context),this.setState({ignoreProps:l(this.constructor._propTypes,e.data.props),dimensions:e})}updateState(e){super.updateState(e);const{changeFlags:t}=e;if(t.extensionsChanged){const e=this.getShaders({});e&&e.defines&&(e.defines.NON_INSTANCED_MODEL=1),this.updateShaders(e)}this._updateAttributes()}updateAttributes(e){this.setState({changedAttributes:e})}getAttributes(){return this.getAttributeManager().getShaderAttributes()}getModuleSettings(){const{viewport:e,mousePosition:t,gl:n}=this.context;return Object.assign(Object.create(this.props),{viewport:e,mousePosition:t,pickingActive:0,devicePixelRatio:(0,s.w)(n)})}updateShaders(e){}isAggregationDirty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{props:n,oldProps:r,changeFlags:i}=e,{compareAll:a=!1,dimension:s}=t,{ignoreProps:l}=this.state,{props:c,accessors:u=[]}=s,{updateTriggersChanged:d}=i;if(i.dataChanged)return!0;if(d){if(d.all)return!0;for(const e of u)if(d[e])return!0}if(a)return!!i.extensionsChanged||(0,o.tg)({oldProps:r,newProps:n,ignoreProps:l,propTypes:this.constructor._propTypes});for(const o of c)if(n[o]!==r[o])return!0;return!1}isAttributeChanged(e){const{changedAttributes:t}=this.state;return e?t&&void 0!==t[e]:!function(e){let t=!0;for(const n in e){t=!1;break}return t}(t)}_getAttributeManager(){return new a.Z(this.context.gl,{id:this.props.id,stats:this.context.stats})}}(0,r.Z)(c,"layerName","AggregationLayer")},81057:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(68185),i=n(16621),o=n(39042);const a=new Uint16Array([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]),s=new Float32Array([-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1]),l=new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0]),c=new Float32Array([0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1]),u={POSITION:{size:3,value:new Float32Array(s)},NORMAL:{size:3,value:new Float32Array(l)},TEXCOORD_0:{size:2,value:new Float32Array(c)}};class d extends i.Z{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=(0,o.hQ)("cube-geometry")}=e;super({...e,id:t,indices:{size:1,value:new Uint16Array(a)},attributes:{...u,...e.attributes}})}}var f=n(98029),h=n(13091);class p extends h.Z{getGeometry(e){return new d}draw(e){let{uniforms:t}=e;const{elevationScale:n,extruded:r,offset:i,coverage:o,cellSize:a,angle:s,radiusUnits:l}=this.props;this.state.model.setUniforms(t).setUniforms({radius:a/2,radiusUnits:f.iI[l],angle:s,offset:i,extruded:r,coverage:o,elevationScale:n,edgeDistance:1,isWireframe:!1}).draw()}}(0,r.Z)(p,"layerName","GridCellLayer"),(0,r.Z)(p,"defaultProps",{cellSize:{type:"number",min:0,value:1e3},offset:{type:"array",value:[1,1]}});var g=n(67110),m=n(39179);const v=6378e3;function A(e,t){if(!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]))return{xOffset:t,yOffset:t};const{yMin:n,yMax:r}=e;return function(e,t){const n=(a=e,a/v*(180/Math.PI)),r=(i=t,o=e,o/v*(180/Math.PI)/Math.cos(i*Math.PI/180));var i,o;var a;return{yOffset:n,xOffset:r}}(t,(n+r)/2)}var y=n(20307),b=n(82253);function _(){}const w={colorDomain:null,colorRange:g.K,getColorValue:{type:"accessor",value:null},getColorWeight:{type:"accessor",value:1},colorAggregation:"SUM",lowerPercentile:{type:"number",min:0,max:100,value:0},upperPercentile:{type:"number",min:0,max:100,value:100},colorScaleType:"quantize",onSetColorDomain:_,elevationDomain:null,elevationRange:[0,1e3],getElevationValue:{type:"accessor",value:null},getElevationWeight:{type:"accessor",value:1},elevationAggregation:"SUM",elevationLowerPercentile:{type:"number",min:0,max:100,value:0},elevationUpperPercentile:{type:"number",min:0,max:100,value:100},elevationScale:{type:"number",min:0,value:1},elevationScaleType:"linear",onSetElevationDomain:_,gridAggregator:function(e,t){const n=function(e,t){const{data:n=[],cellSize:r}=e,{attributes:i,viewport:o,projectPoints:a,numInstances:s}=t,l=i.positions.value,{size:c}=i.positions.getAccessor(),u=t.boundingBox||function(e,t){const n=e.value,{size:r}=e.getAccessor();let i,o,a=1/0,s=-1/0,l=1/0,c=-1/0;for(let u=0;us?i:s,l=oc?o:c);return{xMin:l,xMax:c,yMin:a,yMax:s}}(i.positions,s),d=t.posOffset||[180,90],f=t.gridOffset||A(u,r);if(f.xOffset<=0||f.yOffset<=0)return{gridHash:{},gridOffset:f};const{width:h,height:p}=o,g=Math.ceil(h/f.xOffset),v=Math.ceil(p/f.yOffset),y={},{iterable:b,objectInfo:_}=(0,m.jB)(n),w=new Array(3);for(const m of b){_.index++,w[0]=l[_.index*c],w[1]=l[_.index*c+1],w[2]=c>=3?l[_.index*c+2]:0;const[e,t]=a?o.project(w):w;if(Number.isFinite(e)&&Number.isFinite(t)){const n=Math.floor((t+d[1])/f.yOffset),r=Math.floor((e+d[0])/f.xOffset);if(!a||r>=0&&r=0&&ne.position},extruded:!1,material:!0,_filterData:{type:"function",value:null,optional:!0}};class x extends b.Z{initializeState(){const e=new y.Z({getAggregator:e=>e.gridAggregator,getCellSize:e=>e.cellSize});this.state={cpuAggregator:e,aggregatorState:e.state};this.getAttributeManager().add({positions:{size:3,type:5130,accessor:"getPosition"}})}updateState(e){super.updateState(e),this.setState({aggregatorState:this.state.cpuAggregator.updateState(e,{viewport:this.context.viewport,attributes:this.getAttributes(),numInstances:this.getNumInstances()})})}getPickingInfo(e){let{info:t}=e;return this.state.cpuAggregator.getPickingInfo({info:t})}_onGetSublayerColor(e){return this.state.cpuAggregator.getAccessor("fillColor")(e)}_onGetSublayerElevation(e){return this.state.cpuAggregator.getAccessor("elevation")(e)}_getSublayerUpdateTriggers(){return this.state.cpuAggregator.getUpdateTriggers(this.props)}renderLayers(){const{elevationScale:e,extruded:t,cellSize:n,coverage:r,material:i,transitions:o}=this.props,{cpuAggregator:a}=this.state,s=this.getSubLayerClass("grid-cell",p),l=this._getSublayerUpdateTriggers();return new s({cellSize:n,coverage:r,material:i,elevationScale:e,extruded:t,getFillColor:this._onGetSublayerColor.bind(this),getElevation:this._onGetSublayerElevation.bind(this),transitions:o&&{getFillColor:o.getColorValue||o.getColorWeight,getElevation:o.getElevationValue||o.getElevationWeight}},this.getSubLayerProps({id:"grid-cell",updateTriggers:l}),{data:a.state.layerData.data})}}(0,r.Z)(x,"layerName","CPUGridLayer"),(0,r.Z)(x,"defaultProps",w)},75770:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(68185),i=n(76195);const o=new Float32Array(12);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=0;for(const r of e)for(let e=0;e 0.) {\n maxValue = colorDomain[1];\n minValue = colorDomain[0];\n }\n vIntensityMax = intensity / maxValue;\n vIntensityMin = intensity / minValue;\n}\n",fs:"#define SHADER_NAME triangle-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D texture;\nuniform sampler2D colorTexture;\nuniform float aggregationMode;\n\nvarying vec2 vTexCoords;\nvarying float vIntensityMin;\nvarying float vIntensityMax;\n\nvec4 getLinearColor(float value) {\n float factor = clamp(value * vIntensityMax, 0., 1.);\n vec4 color = texture2D(colorTexture, vec2(factor, 0.5));\n color.a *= min(value * vIntensityMin, 1.0);\n return color;\n}\n\nvoid main(void) {\n vec4 weights = texture2D(texture, vTexCoords);\n float weight = weights.r;\n\n if (aggregationMode > 0.5) {\n weight /= max(1.0, weights.a);\n }\n if (weight <= 0.) {\n discard;\n }\n\n vec4 linearColor = getLinearColor(weight);\n linearColor.a *= opacity;\n gl_FragColor =linearColor;\n}\n",modules:[A.Z]}}initializeState(e){let{gl:t}=e;this.getAttributeManager().add({positions:{size:3,noAlloc:!0},texCoords:{size:2,noAlloc:!0}}),this.setState({model:this._getModel(t)})}_getModel(e){const{vertexCount:t}=this.props;return new g.Z(e,{...this.getShaders(),id:this.props.id,geometry:new m.Z({drawMode:6,vertexCount:t})})}draw(e){let{uniforms:t}=e;const{model:n}=this.state,{texture:r,maxTexture:i,colorTexture:o,intensity:a,threshold:s,aggregationMode:l,colorDomain:c}=this.props;n.setUniforms({...t,texture:r,maxTexture:i,colorTexture:o,intensity:a,threshold:s,aggregationMode:l,colorDomain:c}).draw()}}(0,r.Z)(y,"layerName","TriangleLayer");var b=n(82253),_=n(67110);const w={mipmaps:!1,parameters:{10240:9729,10241:9729,10242:33071,10243:33071},dataFormat:6408},x=[0,0],E={SUM:0,MEAN:1},S={getPosition:{type:"accessor",value:e=>e.position},getWeight:{type:"accessor",value:1},intensity:{type:"number",min:0,value:1},radiusPixels:{type:"number",min:1,max:100,value:50},colorRange:_.K,threshold:{type:"number",min:0,max:1,value:.05},colorDomain:{type:"array",value:null,optional:!0},aggregation:"SUM",weightsTextureSize:{type:"number",min:128,max:2048,value:2048},debounceTimeout:{type:"number",min:0,max:1e3,value:500}},C=[s.h.BLEND_EQUATION_MINMAX,s.h.TEXTURE_FLOAT],P=[s.h.COLOR_ATTACHMENT_RGBA32F,s.h.FLOAT_BLEND],T={data:{props:["radiusPixels"]}};class k extends b.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}initializeState(){const{gl:e}=this.context;if(!(0,l.ag)(e,C))return this.setState({supported:!1}),void f.Z.error("HeatmapLayer: ".concat(this.id," is not supported on this browser"))();super.initializeAggregationLayer(T),this.setState({supported:!0,colorDomain:x}),this._setupTextureParams(),this._setupAttributes(),this._setupResources()}shouldUpdateState(e){let{changeFlags:t}=e;return t.somethingChanged}updateState(e){this.state.supported&&(super.updateState(e),this._updateHeatmapState(e))}_updateHeatmapState(e){const{props:t,oldProps:n}=e,r=this._getChangeFlags(e);(r.dataChanged||r.viewportChanged)&&(r.boundsChanged=this._updateBounds(r.dataChanged),this._updateTextureRenderingBounds()),r.dataChanged||r.boundsChanged?(clearTimeout(this.state.updateTimer),this.setState({isWeightMapDirty:!0})):r.viewportZoomChanged&&this._debouncedUpdateWeightmap(),t.colorRange!==n.colorRange&&this._updateColorTexture(e),this.state.isWeightMapDirty&&this._updateWeightmap(),this.setState({zoom:e.context.viewport.zoom})}renderLayers(){if(!this.state.supported)return[];const{weightsTexture:e,triPositionBuffer:t,triTexCoordBuffer:n,maxWeightsTexture:r,colorTexture:i,colorDomain:o}=this.state,{updateTriggers:a,intensity:s,threshold:l,aggregation:c}=this.props;return new(this.getSubLayerClass("triangle",y))(this.getSubLayerProps({id:"triangle-layer",updateTriggers:a}),{coordinateSystem:h.Df.DEFAULT,data:{attributes:{positions:t,texCoords:n}},vertexCount:4,maxTexture:r,colorTexture:i,aggregationMode:E[c]||0,texture:e,intensity:s,threshold:l,colorDomain:o})}finalizeState(e){super.finalizeState(e);const{weightsTransform:t,weightsTexture:n,maxWeightTransform:r,maxWeightsTexture:i,triPositionBuffer:o,triTexCoordBuffer:a,colorTexture:s,updateTimer:l}=this.state;null===t||void 0===t||t.delete(),null===n||void 0===n||n.delete(),null===r||void 0===r||r.delete(),null===i||void 0===i||i.delete(),null===o||void 0===o||o.delete(),null===a||void 0===a||a.delete(),null===s||void 0===s||s.delete(),l&&clearTimeout(l)}_getAttributeManager(){return new p.Z(this.context.gl,{id:this.props.id,stats:this.context.stats})}_getChangeFlags(e){const t={},{dimensions:n}=this.state;t.dataChanged=this.isAttributeChanged()||this.isAggregationDirty(e,{compareAll:!0,dimension:n.data}),t.viewportChanged=e.changeFlags.viewportChanged;const{zoom:r}=this.state;return e.context.viewport&&e.context.viewport.zoom===r||(t.viewportZoomChanged=!0),t}_createTextures(){const{gl:e}=this.context,{textureSize:t,format:n,type:r}=this.state;this.setState({weightsTexture:new c.Z(e,{width:t,height:t,format:n,type:r,...w}),maxWeightsTexture:new c.Z(e,{format:n,type:r,...w})})}_setupAttributes(){this.getAttributeManager().add({positions:{size:3,type:5130,accessor:"getPosition"},weights:{size:1,accessor:"getWeight"}}),this.setState({positionAttributeName:"positions"})}_setupTextureParams(){const{gl:e}=this.context,{weightsTextureSize:t}=this.props,n=Math.min(t,(0,i.ZS)(e,3379)),r=(0,l.ag)(e,P),{format:o,type:a}=function(e){let{gl:t,floatTargetSupport:n}=e;return n?{format:(0,i.D0)(t)?34836:6408,type:5126}:{format:6408,type:5121}}({gl:e,floatTargetSupport:r}),s=r?1:1/255;this.setState({textureSize:n,format:o,type:a,weightsScale:s}),r||f.Z.warn("HeatmapLayer: ".concat(this.id," rendering to float texture not supported, fallingback to low precession format"))()}getShaders(e){return super.getShaders("max-weights-transform"===e?{vs:"attribute vec4 inTexture;\nvarying vec4 outTexture;\n\nvoid main()\n{\noutTexture = inTexture;\ngl_Position = vec4(0, 0, 0, 1.);\ngl_PointSize = 1.0;\n}\n",_fs:"varying vec4 outTexture;\nvoid main() {\n gl_FragColor = outTexture;\n gl_FragColor.g = outTexture.r / max(1.0, outTexture.a);\n}\n"}:{vs:"attribute vec3 positions;\nattribute vec3 positions64Low;\nattribute float weights;\nvarying vec4 weightsTexture;\nuniform float radiusPixels;\nuniform float textureWidth;\nuniform vec4 commonBounds;\nuniform float weightsScale;\nvoid main()\n{\n weightsTexture = vec4(weights * weightsScale, 0., 0., 1.);\n\n float radiusTexels = project_pixel_size(radiusPixels) * textureWidth / (commonBounds.z - commonBounds.x);\n gl_PointSize = radiusTexels * 2.;\n\n vec3 commonPosition = project_position(positions, positions64Low);\n gl_Position.xy = (commonPosition.xy - commonBounds.xy) / (commonBounds.zw - commonBounds.xy) ;\n gl_Position.xy = (gl_Position.xy * 2.) - (1.);\n}\n",_fs:"varying vec4 weightsTexture;\nfloat gaussianKDE(float u){\n return pow(2.71828, -u*u/0.05555)/(1.77245385*0.166666);\n}\nvoid main()\n{\n float dist = length(gl_PointCoord - vec2(0.5, 0.5));\n if (dist > 0.5) {\n discard;\n }\n gl_FragColor = weightsTexture * gaussianKDE(2. * dist);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n"})}_createWeightsTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const{gl:n}=this.context;let{weightsTransform:r}=this.state;const{weightsTexture:i}=this.state;null===(t=r)||void 0===t||t.delete(),r=new u.Z(n,{id:"".concat(this.id,"-weights-transform"),elementCount:1,_targetTexture:i,_targetTextureVarying:"weightsTexture",...e}),this.setState({weightsTransform:r})}_setupResources(){const{gl:e}=this.context;this._createTextures();const{textureSize:t,weightsTexture:n,maxWeightsTexture:r}=this.state,i=this.getShaders("weights-transform");this._createWeightsTransform(i);const o=this.getShaders("max-weights-transform"),a=new u.Z(e,{id:"".concat(this.id,"-max-weights-transform"),_sourceTextures:{inTexture:n},_targetTexture:r,_targetTextureVarying:"outTexture",...o,elementCount:t*t});this.setState({weightsTexture:n,maxWeightsTexture:r,maxWeightTransform:a,zoom:null,triPositionBuffer:new d.Z(e,{byteLength:48,accessor:{size:3}}),triTexCoordBuffer:new d.Z(e,{byteLength:48,accessor:{size:2}})})}updateShaders(e){this._createWeightsTransform(e)}_updateMaxWeightValue(){const{maxWeightTransform:e}=this.state;e.run({parameters:{blend:!0,depthTest:!1,blendFunc:[1,1],blendEquation:32776}})}_updateBounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{viewport:t}=this.context,n=[t.unproject([0,0]),t.unproject([t.width,0]),t.unproject([t.width,t.height]),t.unproject([0,t.height])].map((e=>e.map(Math.fround))),r=function(e){const t=e.map((e=>e[0])),n=e.map((e=>e[1])),r=Math.min.apply(null,t),i=Math.max.apply(null,t);return[r,Math.min.apply(null,n),i,Math.max.apply(null,n)]}(n),i={visibleWorldBounds:r,viewportCorners:n};let o=!1;if(e||!this.state.worldBounds||(a=this.state.worldBounds,!((s=r)[0]>=a[0]&&s[2]<=a[2]&&s[1]>=a[1]&&s[3]<=a[3]))){const e=this._worldToCommonBounds(r),t=this._commonToWorldBounds(e);this.props.coordinateSystem===h.Df.LNGLAT&&(t[1]=Math.max(t[1],-85.051129),t[3]=Math.min(t[3],85.051129),t[0]=Math.max(t[0],-360),t[2]=Math.min(t[2],360));const n=this._worldToCommonBounds(t);i.worldBounds=t,i.normalizedCommonBounds=n,o=!0}var a,s;return this.setState(i),o}_updateTextureRenderingBounds(){const{triPositionBuffer:e,triTexCoordBuffer:t,normalizedCommonBounds:n,viewportCorners:r}=this.state,{viewport:i}=this.context;e.subData(a(r,3));const o=r.map((e=>function(e,t){const[n,r,i,o]=t;return[(e[0]-n)/(i-n),(e[1]-r)/(o-r)]}(i.projectPosition(e),n)));t.subData(a(o,2))}_updateColorTexture(e){const{colorRange:t}=e.props;let{colorTexture:n}=this.state;const r=(0,_.P)(t,!1,Uint8Array);n?n.setImageData({data:r,width:t.length}):n=new c.Z(this.context.gl,{data:r,width:t.length,height:1,...w}),this.setState({colorTexture:n})}_updateWeightmap(){const{radiusPixels:e,colorDomain:t,aggregation:n}=this.props,{weightsTransform:r,worldBounds:o,textureSize:a,weightsTexture:s,weightsScale:l}=this.state;this.state.isWeightMapDirty=!1;const c=this._worldToCommonBounds(o,{useLayerCoordinateSystem:!0});if(t&&"SUM"===n){const{viewport:e}=this.context,n=e.distanceScales.metersPerUnit[2]*(c[2]-c[0])/a;this.state.colorDomain=t.map((e=>e*n*l))}else this.state.colorDomain=t||x;const u={radiusPixels:e,commonBounds:c,textureWidth:a,weightsScale:l};r.update({elementCount:this.getNumInstances()}),(0,i.s8)(this.context.gl,{clearColor:[0,0,0,0]},(()=>{r.run({uniforms:u,parameters:{blend:!0,depthTest:!1,blendFunc:[1,1],blendEquation:32774},clearRenderTarget:!0,attributes:this.getAttributes(),moduleSettings:this.getModuleSettings()})})),this._updateMaxWeightValue(),s.setParameters({10240:9729,10241:9729})}_debouncedUpdateWeightmap(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{updateTimer:t}=this.state;const{debounceTimeout:n}=this.props;e?(t=null,this._updateBounds(!0),this._updateTextureRenderingBounds(),this.setState({isWeightMapDirty:!0})):(this.setState({isWeightMapDirty:!1}),clearTimeout(t),t=setTimeout(this._debouncedUpdateWeightmap.bind(this,!0),n)),this.setState({updateTimer:t})}_worldToCommonBounds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{useLayerCoordinateSystem:n=!1}=t,[r,i,o,a]=e,{viewport:s}=this.context,{textureSize:l}=this.state,{coordinateSystem:c}=this.props,u=n&&(c===h.Df.LNGLAT_OFFSETS||c===h.Df.METER_OFFSETS),d=u?s.projectPosition(this.props.coordinateOrigin):[0,0],f=2*l/s.scale;let p,g;return n&&!u?(p=this.projectPosition([r,i,0]),g=this.projectPosition([o,a,0])):(p=s.projectPosition([r,i,0]),g=s.projectPosition([o,a,0])),function(e,t,n){const[r,i,o,a]=e,s=o-r,l=a-i;let c=s,u=l;s/l{"use strict";n.d(t,{Z:()=>m});var r=n(68185),i=n(65148),o=n(13091),a=n(67110),s=Math.PI/3,l=[0,s,2*s,3*s,4*s,5*s];function c(e){return e[0]}function u(e){return e[1]}var d=n(39179);var f=n(20307),h=n(82253);function p(){}const g={colorDomain:null,colorRange:a.K,getColorValue:{type:"accessor",value:null},getColorWeight:{type:"accessor",value:1},colorAggregation:"SUM",lowerPercentile:{type:"number",value:0,min:0,max:100},upperPercentile:{type:"number",value:100,min:0,max:100},colorScaleType:"quantize",onSetColorDomain:p,elevationDomain:null,elevationRange:[0,1e3],getElevationValue:{type:"accessor",value:null},getElevationWeight:{type:"accessor",value:1},elevationAggregation:"SUM",elevationLowerPercentile:{type:"number",value:0,min:0,max:100},elevationUpperPercentile:{type:"number",value:100,min:0,max:100},elevationScale:{type:"number",min:0,value:1},elevationScaleType:"linear",onSetElevationDomain:p,radius:{type:"number",value:1e3,min:1},coverage:{type:"number",min:0,max:1,value:1},extruded:!1,hexagonAggregator:function(e,t){const{data:n,radius:r}=e,{viewport:o,attributes:a}=t,f=n.length?function(e,t){const{attributes:n}=t,r=n.positions.value,{size:i}=n.positions.getAccessor();let o,a=1/0,s=1/0,l=-1/0,c=-1/0;for(o=0;o1){var g=l-h,m=h+(lA*A+y*y&&(h=m+(1&u?1:-1)/2,u=v)}var b=h+"-"+u,_=i[b];_?_.push(s):(o.push(_=i[b]=[s]),_.x=(h+(1&u)/2)*t,_.y=u*n)}return o}function p(e){var t=0,n=0;return l.map((function(r){var i=Math.sin(r)*e,o=-Math.cos(r)*e,a=i-t,s=o-n;return t=i,n=o,[a,s]}))}return h.hexagon=function(t){return"m"+p(null==t?e:+t).join("l")+"z"},h.centers=function(){for(var s=[],l=Math.round(i/n),c=Math.round(r/t),u=l*n;ue.screenCoord[0])).y((e=>e.screenCoord[1]));return{hexagons:y(p).map(((e,t)=>({position:o.unprojectFlat([e.x,e.y]),points:e,index:t}))),radiusCommon:h}},getPosition:{type:"accessor",value:e=>e.position},material:!0,_filterData:{type:"function",value:null,optional:!0}};class m extends h.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}initializeState(){const e=new f.Z({getAggregator:e=>e.hexagonAggregator,getCellSize:e=>e.radius});this.state={cpuAggregator:e,aggregatorState:e.state,vertices:null};this.getAttributeManager().add({positions:{size:3,type:5130,accessor:"getPosition"}})}updateState(e){if(super.updateState(e),e.changeFlags.propsOrDataChanged){const t=this.state.cpuAggregator.updateState(e,{viewport:this.context.viewport,attributes:this.getAttributes()});if(this.state.aggregatorState.layerData!==t.layerData){const{hexagonVertices:e}=t.layerData||{};this.setState({vertices:e&&this.convertLatLngToMeterOffset(e)})}this.setState({aggregatorState:t})}}convertLatLngToMeterOffset(e){const{viewport:t}=this.context;if(Array.isArray(e)&&6===e.length){const n=e[0],r=e[3],i=[(n[0]+r[0])/2,(n[1]+r[1])/2],o=t.projectFlat(i),{metersPerUnit:a}=t.getDistanceScales(i);return e.map((e=>{const n=t.projectFlat(e);return[(n[0]-o[0])*a[0],(n[1]-o[1])*a[1]]}))}return i.Z.error("HexagonLayer: hexagonVertices needs to be an array of 6 points")(),null}getPickingInfo(e){let{info:t}=e;return this.state.cpuAggregator.getPickingInfo({info:t})}_onGetSublayerColor(e){return this.state.cpuAggregator.getAccessor("fillColor")(e)}_onGetSublayerElevation(e){return this.state.cpuAggregator.getAccessor("elevation")(e)}_getSublayerUpdateTriggers(){return this.state.cpuAggregator.getUpdateTriggers(this.props)}renderLayers(){const{elevationScale:e,extruded:t,coverage:n,material:r,transitions:i}=this.props,{aggregatorState:a,vertices:s}=this.state,l=this.getSubLayerClass("hexagon-cell",o.Z),c=this._getSublayerUpdateTriggers();return new l({...s?{vertices:s,radius:1}:{radius:a.layerData.radiusCommon||1,radiusUnits:"common",angle:90},diskResolution:6,elevationScale:e,extruded:t,coverage:n,material:r,getFillColor:this._onGetSublayerColor.bind(this),getElevation:this._onGetSublayerElevation.bind(this),transitions:i&&{getFillColor:i.getColorValue||i.getColorWeight,getElevation:i.getElevationValue||i.getElevationWeight}},this.getSubLayerProps({id:"hexagon-cell",updateTriggers:c}),{data:a.layerData.data})}}(0,r.Z)(m,"layerName","HexagonLayer"),(0,r.Z)(m,"defaultProps",g)},67110:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,P:()=>i});const r=[[255,255,178],[254,217,118],[254,178,76],[253,141,60],[240,59,32],[189,0,38]];function i(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Float32Array;if(Number.isFinite(e[0]))t=new r(e);else{t=new r(4*e.length);let n=0;for(let r=0;r{"use strict";n.d(t,{Z:()=>O});var r=n(68185),i=n(65148);function o(e,t,n){const r=n;return r.domain=()=>e,r.range=()=>t,r}function a(e,t){return o(e,t,(n=>function(e,t,n){const r=e[1]-e[0];if(r<=0)return i.Z.warn("quantizeScale: invalid domain, returning range[0]")(),t[0];const o=r/t.length,a=Math.floor((n-e[0])/o),s=Math.max(Math.min(a,t.length-1),0);return t[s]}(e,t,n)))}function s(e,t){return o(e,t,(n=>function(e,t,n){return(n-e[0])/(e[1]-e[0])*(t[1]-t[0])+t[0]}(e,t,n)))}function l(e,t){const n=e.sort(c);let r=0;const i=Math.max(1,t.length),a=new Array(i-1);for(;++rfunction(e,t,n){return t[function(e,t){let n=0,r=e.length;for(;n>>1;c(e[i],t)>0?r=i:n=i+1}return n}(e,n)]}(a,t,e);return s.thresholds=()=>a,o(e,t,s)}function c(e,t){return e-t}function u(e,t){const n=e.length;if(t<=0||n<2)return e[0];if(t>=1)return e[n-1];const r=(n-1)*t,i=Math.floor(r),o=e[i];return o+(e[i+1]-o)*(r-i)}function d(e,t){const n=new Map,r=[];for(const i of e){const e="".concat(i);n.has(e)||n.set(e,r.push(i))}return o(e,t,(e=>function(e,t,n,r){const i="".concat(r);let o=t.get(i);return void 0===o&&(o=e.push(r),t.set(i,o)),n[(o-1)%n.length]}(r,n,t,e)))}function f(e){return void 0!==e&&null!==e}function h(e,t){return("function"===typeof t?e.map(t):e).filter(f)}function p(e,t){return h(e,t)}function g(e,t){return function(e){const t=[];return e.forEach((e=>{!t.includes(e)&&f(e)&&t.push(e)})),t}(h(e,t))}const m=e=>e.length,v=e=>e.points,A=e=>e.index,y=(e,t)=>et?1:e>=t?0:NaN,b={getValue:m,getPoints:v,getIndex:A,filterData:null};class _{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;(0,r.Z)(this,"maxCount",void 0),(0,r.Z)(this,"maxValue",void 0),(0,r.Z)(this,"minValue",void 0),(0,r.Z)(this,"totalCount",void 0),(0,r.Z)(this,"aggregatedBins",void 0),(0,r.Z)(this,"sortedBins",void 0),(0,r.Z)(this,"binMap",void 0),this.aggregatedBins=this.getAggregatedBins(e,t),this._updateMinMaxValues(),this.binMap=this.getBinMap()}getAggregatedBins(e,t){const{getValue:n=m,getPoints:r=v,getIndex:i=A,filterData:o}=t,a="function"===typeof o,s=e.length,l=[];let c=0;for(let u=0;u{return t=e,n=0,r=100,Math.max(n,Math.min(r,t));var t,n,r}));return[Math.ceil(n/100*(t-1)),Math.floor(r/100*(t-1))]}getBinMap(){const e={};for(const t of this.aggregatedBins)e[t.i]=t;return e}_updateMinMaxValues(){let e=0,t=0,n=3402823466e29,r=0;for(const i of this.aggregatedBins)e=e>i.counts?e:i.counts,t=t>i.value?t:i.value,n=ny(e.value,t.value)))),!this.sortedBins.length)return[];let t=0,n=this.sortedBins.length-1;if(Array.isArray(e)){const r=this._percentileToIndex(e);t=r[0],n=r[1]}return[this.sortedBins[t].value,this.sortedBins[n].value]}getValueDomainByScale(e){let[t=0,n=100]=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(this.sortedBins||(this.sortedBins=this.aggregatedBins.sort(((e,t)=>y(e.value,t.value)))),!this.sortedBins.length)return[];const r=this._percentileToIndex([t,n]);return this._getScaleDomain(e,r)}_getScaleDomain(e,t){let[n,r]=t;const i=this.sortedBins;switch(e){case"quantize":case"linear":default:return[i[n].value,i[r].value];case"quantile":return p(i.slice(n,r+1),(e=>e.value));case"ordinal":return g(i,(e=>e.value))}}}const w={SUM:1,MEAN:2,MIN:3,MAX:4};function x(e,t){return e+t}function E(e,t){return t>e?t:e}function S(e,t){return t1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e;return n=>(t.index=n.index,e(n.source,t))}(t,n),r){case w.MIN:return e=>function(e,t){if(Number.isFinite(t))return e.length?t:null;const n=e.map(t).filter(Number.isFinite);return n.length?n.reduce(S,1/0):null}(e,t);case w.SUM:return e=>function(e,t){if(Number.isFinite(t))return e.length?e.length*t:null;const n=e.map(t).filter(Number.isFinite);return n.length?n.reduce(x,0):null}(e,t);case w.MEAN:return e=>function(e,t){if(Number.isFinite(t))return e.length?t:null;const n=e.map(t).filter(Number.isFinite);return n.length?n.reduce(x,0)/n.length:null}(e,t);case w.MAX:return e=>function(e,t){if(Number.isFinite(t))return e.length?t:null;const n=e.map(t).filter(Number.isFinite);return n.length?n.reduce(E,-1/0):null}(e,t);default:return null}}function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>(t.indices=n.map((e=>e.index)),e(n.map((e=>e.source)),t))}function T(){}const k=["getBins","getDomain","getScaleFunc"],M=[{key:"fillColor",accessor:"getFillColor",pickingInfo:"colorValue",getBins:{triggers:{value:{prop:"getColorValue",updateTrigger:"getColorValue"},weight:{prop:"getColorWeight",updateTrigger:"getColorWeight"},aggregation:{prop:"colorAggregation"},filterData:{prop:"_filterData",updateTrigger:"_filterData"}}},getDomain:{triggers:{lowerPercentile:{prop:"lowerPercentile"},upperPercentile:{prop:"upperPercentile"},scaleType:{prop:"colorScaleType"}}},getScaleFunc:{triggers:{domain:{prop:"colorDomain"},range:{prop:"colorRange"}},onSet:{props:"onSetColorDomain"}},nullValue:[0,0,0,0]},{key:"elevation",accessor:"getElevation",pickingInfo:"elevationValue",getBins:{triggers:{value:{prop:"getElevationValue",updateTrigger:"getElevationValue"},weight:{prop:"getElevationWeight",updateTrigger:"getElevationWeight"},aggregation:{prop:"elevationAggregation"},filterData:{prop:"_filterData",updateTrigger:"_filterData"}}},getDomain:{triggers:{lowerPercentile:{prop:"elevationLowerPercentile"},upperPercentile:{prop:"elevationUpperPercentile"},scaleType:{prop:"elevationScaleType"}}},getScaleFunc:{triggers:{domain:{prop:"elevationDomain"},range:{prop:"elevationRange"}},onSet:{props:"onSetElevationDomain"}},nullValue:-1}],R=e=>e.cellSize;class O{constructor(e){this.state={layerData:{},dimensions:{}},this.changeFlags={},this.dimensionUpdaters={},this._getCellSize=e.getCellSize||R,this._getAggregator=e.getAggregator,this._addDimension(e.dimensions||M)}static defaultDimensions(){return M}updateState(e,t){const{oldProps:n,props:r,changeFlags:i}=e;this.updateGetValueFuncs(n,r,i);const o=this.needsReProjectPoints(n,r,i);let a=!1;if(i.dataChanged||o)this.getAggregatedData(r,t),a=!0;else{(this.getDimensionChanges(n,r,i)||[]).forEach((e=>"function"===typeof e&&e())),a=!0}return this.setState({aggregationDirty:a}),this.state}setState(e){this.state={...this.state,...e}}setDimensionState(e,t){this.setState({dimensions:{...this.state.dimensions,[e]:{...this.state.dimensions[e],...t}}})}normalizeResult(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.hexagons?{data:e.hexagons,...e}:e.layerData?{data:e.layerData,...e}:e}getAggregatedData(e,t){const n=this._getAggregator(e)(e,t);this.setState({layerData:this.normalizeResult(n)}),this.changeFlags={layerData:!0},this.getSortedBins(e)}updateGetValueFuncs(e,t,n){for(const r in this.dimensionUpdaters){const{value:i,weight:o,aggregation:a}=this.dimensionUpdaters[r].getBins.triggers;let s=t[i.prop];this.needUpdateDimensionStep(this.dimensionUpdaters[r].getBins,e,t,n)&&(s=s?P(s,{data:t.data}):C(t[a.prop],t[o.prop],{data:t.data})),s&&this.setDimensionState(r,{getValue:s})}}needsReProjectPoints(e,t,n){return this._getCellSize(e)!==this._getCellSize(t)||this._getAggregator(e)!==this._getAggregator(t)||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getPosition)}addDimension(e){this._addDimension(e)}_addDimension(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((e=>{const{key:t}=e;this.dimensionUpdaters[t]=this.getDimensionUpdaters(e),this.state.dimensions[t]={getValue:null,domain:null,sortedBins:null,scaleFunc:T}}))}getDimensionUpdaters(e){let{key:t,accessor:n,pickingInfo:r,getBins:i,getDomain:o,getScaleFunc:a,nullValue:s}=e;return{key:t,accessor:n,pickingInfo:r,getBins:{updater:this.getDimensionSortedBins,...i},getDomain:{updater:this.getDimensionValueDomain,...o},getScaleFunc:{updater:this.getDimensionScale,...a},attributeAccessor:this.getSubLayerDimensionAttribute(t,s)}}needUpdateDimensionStep(e,t,n,r){return Object.values(e.triggers).some((e=>e.updateTrigger?r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged[e.updateTrigger]):t[e.prop]!==n[e.prop]))}getDimensionChanges(e,t,n){const r=[];for(const i in this.dimensionUpdaters){const o=k.find((r=>this.needUpdateDimensionStep(this.dimensionUpdaters[i][r],e,t,n)));o&&r.push(this.dimensionUpdaters[i][o].updater.bind(this,t,this.dimensionUpdaters[i]))}return r.length?r:null}getUpdateTriggers(e){const t=e.updateTriggers||{},n={};for(const r in this.dimensionUpdaters){const{accessor:i}=this.dimensionUpdaters[r];n[i]={},k.forEach((o=>{Object.values(this.dimensionUpdaters[r][o].triggers).forEach((r=>{let{prop:o,updateTrigger:a}=r;if(a){const e=t[a];"object"!==typeof e||Array.isArray(e)?void 0!==e&&(n[i][o]=e):Object.assign(n[i],e)}else n[i][o]=e[o]}))}))}return n}getSortedBins(e){for(const t in this.dimensionUpdaters)this.getDimensionSortedBins(e,this.dimensionUpdaters[t])}getDimensionSortedBins(e,t){const{key:n}=t,{getValue:r}=this.state.dimensions[n],i=new _(this.state.layerData.data||[],{getValue:r,filterData:e._filterData});this.setDimensionState(n,{sortedBins:i}),this.getDimensionValueDomain(e,t)}getDimensionValueDomain(e,t){const{getDomain:n,key:r}=t,{triggers:{lowerPercentile:i,upperPercentile:o,scaleType:a}}=n,s=this.state.dimensions[r].sortedBins.getValueDomainByScale(e[a.prop],[e[i.prop],e[o.prop]]);this.setDimensionState(r,{valueDomain:s}),this.getDimensionScale(e,t)}getDimensionScale(e,t){const{key:n,getScaleFunc:r,getDomain:i}=t,{domain:o,range:c}=r.triggers,{scaleType:u}=i.triggers,{onSet:f}=r,h=e[c.prop],p=e[o.prop]||this.state.dimensions[n].valueDomain,g=function(e){switch(e){case"quantize":default:return a;case"linear":return s;case"quantile":return l;case"ordinal":return d}}(u&&e[u.prop]),m=g(p,h);"object"===typeof f&&"function"===typeof e[f.props]&&e[f.props](m.domain()),this.setDimensionState(n,{scaleFunc:m})}getSubLayerDimensionAttribute(e,t){return n=>{const{sortedBins:r,scaleFunc:i}=this.state.dimensions[e],o=r.binMap[n.index];if(o&&0===o.counts)return t;const a=o&&o.value,s=i.domain();return a>=s[0]&&a<=s[s.length-1]?i(a):t}}getSubLayerAccessors(e){const t={};for(const n in this.dimensionUpdaters){const{accessor:r}=this.dimensionUpdaters[n];t[r]=this.getSubLayerDimensionAttribute(e,n)}return t}getPickingInfo(e){let{info:t}=e;let n=null;if(t.picked&&t.index>-1){const e=this.state.layerData.data[t.index],r={};for(const t in this.dimensionUpdaters){const{pickingInfo:n}=this.dimensionUpdaters[t],{sortedBins:i}=this.state.dimensions[t],o=i.binMap[e.index]&&i.binMap[e.index].value;r[n]=o}n=Object.assign(r,e,{points:e.filteredPoints||e.points})}return t.picked=Boolean(n),t.object=n,t}getAccessor(e){return this.dimensionUpdaters.hasOwnProperty(e)?this.dimensionUpdaters[e].attributeAccessor:T}}},6525:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a,z:()=>o});var r=n(65148);let i={};function o(e){i=e}function a(e,t,n,o){r.Z.level>0&&i[e]&&i[e].call(null,t,n,o)}},21921:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(68185),i=n(6509),o=n(87966),a=n(64180);class s{constructor(e,t){(0,r.Z)(this,"opts",void 0),(0,r.Z)(this,"source",void 0),this.opts=t,this.source=e}get value(){return this.source.value}getValue(){const e=this.source.getBuffer(),t=this.getAccessor();if(e)return[e,t];const{value:n}=this.source,{size:r}=t;let i=n;if(n&&n.length!==r){i=new Float32Array(r);const e=t.elementOffset||0;for(let t=0;t=i){const n=new Array(r).fill(1/0),o=new Array(r).fill(-1/0);for(let e=0;eo[i]&&(o[i]=r)}e=[n,o]}}return this.state.bounds=e,e}setData(e){const{state:t}=this;let n;n=ArrayBuffer.isView(e)?{value:e}:e instanceof a.Z?{buffer:e}:e;const r={...this.settings,...n};if(t.bufferAccessor=r,t.bounds=null,n.constant){let e=n.value;e=this._normalizeValue(e,[],0),this.settings.normalized&&(e=this.normalizeConstant(e));if(!(!t.constant||!this._areValuesEqual(e,this.value)))return!1;t.externalBuffer=null,t.constant=!0,this.value=e}else if(n.buffer){const e=n.buffer;t.externalBuffer=e,t.constant=!1,this.value=n.value||null;const i=n.value instanceof Float64Array;r.type=n.type||e.accessor.type,r.bytesPerElement=e.accessor.BYTES_PER_ELEMENT*(i?2:1),r.stride=d(r)}else if(n.value){this._checkExternalBuffer(n);let e=n.value;t.externalBuffer=null,t.constant=!1,this.value=e,r.bytesPerElement=e.BYTES_PER_ELEMENT,r.stride=d(r);const{buffer:i,byteOffset:o}=this;this.doublePrecision&&e instanceof Float64Array&&(e=(0,c.TK)(e,r));const a=e.byteLength+o+2*r.stride;i.byteLength0&&void 0!==arguments[0]?arguments[0]:{};this.state.bounds=null;const t=this.value,{startOffset:n=0,endOffset:r}=e;this.buffer.subData({data:this.doublePrecision&&t instanceof Float64Array?(0,c.TK)(t,{size:this.size,startIndex:n,endIndex:r}):t.subarray(n,r),offset:n*t.BYTES_PER_ELEMENT+this.byteOffset})}allocate(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{state:n}=this,r=n.allocatedValue,i=l.Z.allocate(r,e+1,{size:this.size,type:this.settings.defaultType,copy:t});this.value=i;const{buffer:o,byteOffset:a}=this;return o.byteLength(e+128)/255*2-1));case 5122:return new Float32Array(e).map((e=>(e+32768)/65535*2-1));case 5121:return new Float32Array(e).map((e=>e/255));case 5123:return new Float32Array(e).map((e=>e/65535));default:return e}}_normalizeValue(e,t,n){const{defaultValue:r,size:i}=this.settings;if(Number.isFinite(e))return t[n]=e,t;if(!e){let e=i;for(;--e>=0;)t[n+e]=r[e];return t}switch(i){case 4:t[n+3]=Number.isFinite(e[3])?e[3]:r[3];case 3:t[n+2]=Number.isFinite(e[2])?e[2]:r[2];case 2:t[n+1]=Number.isFinite(e[1])?e[1]:r[1];case 1:t[n+0]=Number.isFinite(e[0])?e[0]:r[0];break;default:let o=i;for(;--o>=0;)t[n+o]=Number.isFinite(e[o])?e[o]:r[o]}return t}_areValuesEqual(e,t){if(!e||!t)return!1;const{size:n}=this;for(let r=0;r0&&void 0!==arguments[0]?arguments[0]:{};const t=this.state.needsRedraw;return this.state.needsRedraw=t&&!e,t}getUpdateTriggers(){const{accessor:e}=this.settings;return[this.id].concat("function"!==typeof e&&e||[])}supportsTransition(){return Boolean(this.settings.transition)}getTransitionSetting(e){if(!e||!this.supportsTransition())return null;const{accessor:t}=this.settings,n=this.settings.transition,r=Array.isArray(t)?e[t.find((t=>e[t]))]:e[t];return(0,y.M0)(r,n)}setNeedsUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id,t=arguments.length>1?arguments[1]:void 0;if(this.state.needsUpdate=this.state.needsUpdate||e,this.setNeedsRedraw(e),t){const{startRow:e=0,endRow:n=1/0}=t;this.state.updateRanges=function(e,t){if(e===A)return e;if(t[0]<0&&(t[0]=0),t[0]>=t[1])return e;const n=[],r=e.length;let i=0;for(let o=0;ot[1]?n.push(r):t=[Math.min(r[0],t[0]),Math.max(r[1],t[1])]}return n.splice(i,0,t),n}(this.state.updateRanges,[e,n])}else this.state.updateRanges=A}clearNeedsUpdate(){this.state.needsUpdate=!1,this.state.updateRanges=v}setNeedsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id;this.state.needsRedraw=this.state.needsRedraw||e}allocate(e){const{state:t,settings:n}=this;return!n.noAlloc&&(!!n.update&&(super.allocate(e,t.updateRanges!==A),!0))}updateBuffer(e){let{numInstances:t,data:n,props:r,context:i}=e;if(!this.needsUpdate())return!1;const{state:{updateRanges:o},settings:{update:a,noAlloc:s}}=this;let l=!0;if(a){for(const[e,s]of o)a.call(i,this,{data:n,startRow:e,endRow:s,props:r,numInstances:t});if(this.value)if(this.constant||this.buffer.byteLength1&&void 0!==arguments[1]?arguments[1]:null;const{state:n,settings:r}=this;if(!e)return n.binaryValue=null,n.binaryAccessor=null,!1;if(r.noAlloc)return!1;if(n.binaryValue===e)return this.clearNeedsUpdate(),!0;n.binaryValue=e,this.setNeedsRedraw();if(r.transform||t!==this.startIndices){ArrayBuffer.isView(e)&&(e={value:e});const i=e;(0,p.Z)(ArrayBuffer.isView(i.value),"invalid ".concat(r.accessor));const o=Boolean(i.size)&&i.size!==this.size;return n.binaryAccessor=(0,g.jr)(i.value,{size:i.size||this.size,stride:i.stride,offset:i.offset,startIndices:t,nested:o}),!1}return this.clearNeedsUpdate(),this.setData(e),!0}getVertexOffset(e){const{startIndices:t}=this;return(t?eu?c.set(t,A):(e._normalizeValue(t,b.target,0),(0,m.k)({target:c,source:b.target,start:A,count:n}));A+=n*u}else e._normalizeValue(t,c,A),A+=u}}_validateAttributeUpdaters(){const{settings:e}=this;if(!(e.noAlloc||"function"===typeof e.update))throw new Error("Attribute ".concat(this.id," missing update or accessor"))}_checkAttributeArray(){const{value:e}=this,t=Math.min(4,this.size);if(e&&e.length>=t){let n=!0;switch(t){case 4:n=n&&Number.isFinite(e[3]);case 3:n=n&&Number.isFinite(e[2]);case 2:n=n&&Number.isFinite(e[1]);case 1:n=n&&Number.isFinite(e[0]);break;default:n=!1}if(!n)throw new Error("Illegal attribute generated for ".concat(this.id))}}}var _=n(12091),w=n(6525),x=n(15966),E=n(78191);const S="\n#define SHADER_NAME interpolation-transition-vertex-shader\n\nuniform float time;\nattribute ATTRIBUTE_TYPE aFrom;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vCurrent;\n\nvoid main(void) {\n vCurrent = mix(aFrom, aTo, time);\n gl_Position = vec4(0.0);\n}\n";var C=n(77378),P=n(81786),T=n(64282);const k={interpolation:class{constructor(e){let{gl:t,attribute:n,timeline:i}=e;(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"type","interpolation"),(0,r.Z)(this,"attributeInTransition",void 0),(0,r.Z)(this,"settings",void 0),(0,r.Z)(this,"attribute",void 0),(0,r.Z)(this,"transition",void 0),(0,r.Z)(this,"currentStartIndices",void 0),(0,r.Z)(this,"currentLength",void 0),(0,r.Z)(this,"transform",void 0),(0,r.Z)(this,"buffers",void 0),this.gl=t,this.transition=new E.Z(i),this.attribute=n,this.attributeInTransition=new b(t,n.settings),this.currentStartIndices=n.startIndices,this.currentLength=0,this.transform=function(e,t){const n=(0,y.w)(t.size);return new x.Z(e,{vs:S,defines:{ATTRIBUTE_TYPE:n},varyings:["vCurrent"]})}(t,n);const o={byteLength:0,usage:35050};this.buffers=[new a.Z(t,o),new a.Z(t,o)]}get inProgress(){return this.transition.inProgress}start(e,t){if(e.duration<=0)return void this.transition.cancel();this.settings=e;const{gl:n,buffers:r,attribute:i}=this;(0,y.DY)(r);const o={numInstances:t,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:e.enter};for(const a of r)(0,y.IV)({buffer:a,...o});this.currentStartIndices=i.startIndices,this.currentLength=(0,y.pi)(i,t),this.attributeInTransition.setData({buffer:r[1],value:i.value}),this.transition.start(e),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aFrom:r[0],aTo:(0,y.AQ)(n,i)},feedbackBuffers:{vCurrent:r[1]}})}update(){const e=this.transition.update();if(e){const{duration:e,easing:t}=this.settings,{time:n}=this.transition;let r=n/e;t&&(r=t(r)),this.transform.run({uniforms:{time:r}})}return e}cancel(){this.transition.cancel(),this.transform.delete();for(const e of this.buffers)e.delete();this.buffers.length=0}},spring:class{constructor(e){let{gl:t,attribute:n,timeline:i}=e;(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"type","spring"),(0,r.Z)(this,"attributeInTransition",void 0),(0,r.Z)(this,"settings",void 0),(0,r.Z)(this,"attribute",void 0),(0,r.Z)(this,"transition",void 0),(0,r.Z)(this,"currentStartIndices",void 0),(0,r.Z)(this,"currentLength",void 0),(0,r.Z)(this,"texture",void 0),(0,r.Z)(this,"framebuffer",void 0),(0,r.Z)(this,"transform",void 0),(0,r.Z)(this,"buffers",void 0),this.gl=t,this.type="spring",this.transition=new E.Z(i),this.attribute=n,this.attributeInTransition=new b(t,{...n.settings,normalized:!1}),this.currentStartIndices=n.startIndices,this.currentLength=0,this.texture=function(e){return new P.Z(e,{data:new Uint8Array(4),format:6408,type:5121,border:0,mipmaps:!1,dataFormat:6408,width:1,height:1})}(t),this.framebuffer=function(e,t){return new T.Z(e,{id:"spring-transition-is-transitioning-framebuffer",width:1,height:1,attachments:{36064:t}})}(t,this.texture),this.transform=function(e,t,n){const r=(0,y.w)(t.size);return new x.Z(e,{framebuffer:n,vs:"\n#define SHADER_NAME spring-transition-vertex-shader\n\n#define EPSILON 0.00001\n\nuniform float stiffness;\nuniform float damping;\nattribute ATTRIBUTE_TYPE aPrev;\nattribute ATTRIBUTE_TYPE aCur;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vNext;\nvarying float vIsTransitioningFlag;\n\nATTRIBUTE_TYPE getNextValue(ATTRIBUTE_TYPE cur, ATTRIBUTE_TYPE prev, ATTRIBUTE_TYPE dest) {\n ATTRIBUTE_TYPE velocity = cur - prev;\n ATTRIBUTE_TYPE delta = dest - cur;\n ATTRIBUTE_TYPE spring = delta * stiffness;\n ATTRIBUTE_TYPE damper = velocity * -1.0 * damping;\n return spring + damper + velocity + cur;\n}\n\nvoid main(void) {\n bool isTransitioning = length(aCur - aPrev) > EPSILON || length(aTo - aCur) > EPSILON;\n vIsTransitioningFlag = isTransitioning ? 1.0 : 0.0;\n\n vNext = getNextValue(aCur, aPrev, aTo);\n gl_Position = vec4(0, 0, 0, 1);\n gl_PointSize = 100.0;\n}\n",fs:"\n#define SHADER_NAME spring-transition-is-transitioning-fragment-shader\n\nvarying float vIsTransitioningFlag;\n\nvoid main(void) {\n if (vIsTransitioningFlag == 0.0) {\n discard;\n }\n gl_FragColor = vec4(1.0);\n}",defines:{ATTRIBUTE_TYPE:r},varyings:["vNext"]})}(t,n,this.framebuffer);const o={byteLength:0,usage:35050};this.buffers=[new a.Z(t,o),new a.Z(t,o),new a.Z(t,o)]}get inProgress(){return this.transition.inProgress}start(e,t){const{gl:n,buffers:r,attribute:i}=this,o={numInstances:t,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:e.enter};for(const a of r)(0,y.IV)({buffer:a,...o});this.settings=e,this.currentStartIndices=i.startIndices,this.currentLength=(0,y.pi)(i,t),this.attributeInTransition.setData({buffer:r[1],value:i.value}),this.transition.start({...e,duration:1/0}),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aTo:(0,y.AQ)(n,i)}})}update(){const{buffers:e,transform:t,framebuffer:n,transition:r}=this;if(!r.update())return!1;const i=this.settings;t.update({sourceBuffers:{aPrev:e[0],aCur:e[1]},feedbackBuffers:{vNext:e[2]}}),t.run({framebuffer:n,discard:!1,clearRenderTarget:!0,uniforms:{stiffness:i.stiffness,damping:i.damping},parameters:{depthTest:!1,blend:!0,viewport:[0,0,1,1],blendFunc:[1,1],blendEquation:[32776,32776]}}),(0,y.DY)(e),this.attributeInTransition.setData({buffer:e[1],value:this.attribute.value});return(0,C.z6)(n)[0]>0||r.end(),!0}cancel(){this.transition.cancel(),this.transform.delete();for(const e of this.buffers)e.delete();this.buffers.length=0,this.texture.delete(),this.framebuffer.delete()}}};class M{constructor(e,t){let{id:n,timeline:i}=t;(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"isSupported",void 0),(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"timeline",void 0),(0,r.Z)(this,"transitions",void 0),(0,r.Z)(this,"needsRedraw",void 0),(0,r.Z)(this,"numInstances",void 0),this.id=n,this.gl=e,this.timeline=i,this.transitions={},this.needsRedraw=!1,this.numInstances=1,this.isSupported=x.Z.isSupported(e)}finalize(){for(const e in this.transitions)this._removeTransition(e)}update(e){let{attributes:t,transitions:n,numInstances:r}=e;this.numInstances=r||1;for(const i in t){const e=t[i],r=e.getTransitionSetting(n);r&&this._updateAttribute(i,e,r)}for(const i in this.transitions){const e=t[i];e&&e.getTransitionSetting(n)||this._removeTransition(i)}}hasAttribute(e){const t=this.transitions[e];return t&&t.inProgress}getAttributes(){const e={};for(const t in this.transitions){const n=this.transitions[t];n.inProgress&&(e[t]=n.attributeInTransition)}return e}run(){if(!this.isSupported||0===this.numInstances)return!1;for(const t in this.transitions){this.transitions[t].update()&&(this.needsRedraw=!0)}const e=this.needsRedraw;return this.needsRedraw=!1,e}_removeTransition(e){this.transitions[e].cancel(),delete this.transitions[e]}_updateAttribute(e,t,n){const r=this.transitions[e];let i=!r||r.type!==n.type;if(i){if(!this.isSupported)return void u.Z.warn("WebGL2 not supported by this browser. Transition for ".concat(e," is disabled."))();r&&this._removeTransition(e);const o=k[n.type];o?this.transitions[e]=new o({attribute:t,timeline:this.timeline,gl:this.gl}):(u.Z.error("unsupported transition type '".concat(n.type,"'"))(),i=!1)}(i||t.needsRedraw())&&(this.needsRedraw=!0,this.transitions[e].start(n,this.numInstances))}}const R="attributeManager.invalidate";class O{constructor(e){let{id:t="attribute-manager",stats:n,timeline:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"attributes",void 0),(0,r.Z)(this,"updateTriggers",void 0),(0,r.Z)(this,"needsRedraw",void 0),(0,r.Z)(this,"userData",void 0),(0,r.Z)(this,"stats",void 0),(0,r.Z)(this,"attributeTransitionManager",void 0),(0,r.Z)(this,"mergeBoundsMemoized",(0,_.Z)(c.cc)),this.id=t,this.gl=e,this.attributes={},this.updateTriggers={},this.needsRedraw=!0,this.userData={},this.stats=n,this.attributeTransitionManager=new M(e,{id:"".concat(t,"-transitions"),timeline:i}),Object.seal(this)}finalize(){for(const e in this.attributes)this.attributes[e].delete();this.attributeTransitionManager.finalize()}getNeedsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};const t=this.needsRedraw;return this.needsRedraw=this.needsRedraw&&!e.clearRedrawFlags,t&&this.id}setNeedsRedraw(){this.needsRedraw=!0}add(e){this._add(e)}addInstanced(e){this._add(e,{instanced:1})}remove(e){for(const t of e)void 0!==this.attributes[t]&&(this.attributes[t].delete(),delete this.attributes[t])}invalidate(e,t){const n=this._invalidateTrigger(e,t);(0,w.Z)(R,this,e,n)}invalidateAll(e){for(const t in this.attributes)this.attributes[t].setNeedsUpdate(t,e);(0,w.Z)(R,this,"all")}update(e){let{data:t,numInstances:n,startIndices:r=null,transitions:i,props:o={},buffers:a={},context:s={}}=e,l=!1;(0,w.Z)("attributeManager.updateStart",this),this.stats&&this.stats.get("Update Attributes").timeStart();for(const c in this.attributes){const e=this.attributes[c],i=e.settings.accessor;e.startIndices=r,e.numInstances=n,o[c]&&u.Z.removed("props.".concat(c),"data.attributes.".concat(c))(),e.setExternalBuffer(a[c])||e.setBinaryValue("string"===typeof i?a[i]:void 0,t.startIndices)||"string"===typeof i&&!a[i]&&e.setConstantValue(o[i])||e.needsUpdate()&&(l=!0,this._updateAttribute({attribute:e,numInstances:n,data:t,props:o,context:s})),this.needsRedraw=this.needsRedraw||e.needsRedraw()}l&&(0,w.Z)("attributeManager.updateEnd",this,n),this.stats&&this.stats.get("Update Attributes").timeEnd(),this.attributeTransitionManager.update({attributes:this.attributes,numInstances:n,transitions:i})}updateTransition(){const{attributeTransitionManager:e}=this,t=e.run();return this.needsRedraw=this.needsRedraw||t,t}getAttributes(){return this.attributes}getBounds(e){const t=e.map((e=>{var t;return null===(t=this.attributes[e])||void 0===t?void 0:t.getBounds()}));return this.mergeBoundsMemoized(t)}getChangedAttributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearChangedFlags:!1};const{attributes:t,attributeTransitionManager:n}=this,r={...n.getAttributes()};for(const i in t){const o=t[i];o.needsRedraw(e)&&!n.hasAttribute(i)&&(r[i]=o)}return r}getShaderAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e||(e=this.getAttributes());const n={};for(const r in e)t[r]||Object.assign(n,e[r].getShaderAttributes());return n}_add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(const n in e){const r=e[n];this.attributes[n]=this._createAttribute(n,r,t)}this._mapUpdateTriggersToAttributes()}_createAttribute(e,t,n){const r={...t,id:e,size:(t.isIndexed?1:t.size)||1,divisor:n.instanced?1:t.divisor||0};return new b(this.gl,r)}_mapUpdateTriggersToAttributes(){const e={};for(const t in this.attributes){this.attributes[t].getUpdateTriggers().forEach((n=>{e[n]||(e[n]=[]),e[n].push(t)}))}this.updateTriggers=e}_invalidateTrigger(e,t){const{attributes:n,updateTriggers:r}=this,i=r[e];return i&&i.forEach((e=>{const r=n[e];r&&r.setNeedsUpdate(r.id,t)})),i}_updateAttribute(e){const{attribute:t,numInstances:n}=e;if((0,w.Z)("attribute.updateStart",t),t.constant)return void t.setConstantValue(t.value);t.allocate(n)&&(0,w.Z)("attribute.allocate",t,n);t.updateBuffer(e)&&(this.needsRedraw=!0,(0,w.Z)("attribute.updateEnd",t,n))}}},83063:(e,t,n)=>{"use strict";function r(e){const{source:t,target:n,start:r=0,size:i,getData:o}=e,a=e.end||n.length,s=t.length,l=a-r;if(s>l)return void n.set(t.subarray(0,l),r);if(n.set(t,r),!o)return;let c=s;for(;cl,pi:()=>c,w:()=>s,AQ:()=>a,M0:()=>o,IV:()=>u});const i={interpolation:{duration:0,easing:e=>e},spring:{stiffness:.05,damping:.5}};function o(e,t){if(!e)return null;Number.isFinite(e)&&(e={type:"interpolation",duration:e});const n=e.type||"interpolation";return{...i[n],...t,...e,type:n}}function a(e,t){const n=t.getBuffer();return n?[n,{divisor:0,size:t.size,normalized:t.settings.normalized}]:t.value}function s(e){switch(e){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error('No defined attribute type for size "'.concat(e,'"'))}}function l(e){e.push(e.shift())}function c(e,t){const{doublePrecision:n,settings:r,value:i,size:o}=e,a=n&&i instanceof Float64Array?2:1;return(r.noAlloc?i.length:t*o)*a}function u(e){let{buffer:t,numInstances:n,attribute:i,fromLength:o,fromStartIndices:a,getData:s=(e=>e)}=e;const l=i.doublePrecision&&i.value instanceof Float64Array?2:1,u=i.size*l,d=i.byteOffset,f=i.startIndices,h=a&&f,p=c(i,n),g=i.isConstant;if(!h&&o>=p)return;const m=g?i.value:i.getBuffer().getData({srcByteOffset:d});if(i.settings.normalized&&!g){const e=s;s=(t,n)=>i.normalizeConstant(e(t,n))}const v=g?(e,t)=>s(m,t):(e,t)=>s(m.subarray(e,e+u),t),A=t.getData({length:o}),y=new Float32Array(p);!function(e){let{source:t,target:n,size:i,getData:o,sourceStartIndices:a,targetStartIndices:s}=e;if(!Array.isArray(s))return r({source:t,target:n,size:i,getData:o}),n;let l=0,c=0;const u=o&&((e,t)=>o(e+c,t)),d=Math.min(a.length,s.length);for(let f=1;f{"use strict";n.d(t,{Z:()=>l});var r=n(68185),i=n(53104),o=n(6525),a=n(35395),s=n(15672);class l extends i.Z{get isComposite(){return!0}get isLoaded(){return super.isLoaded&&this.getSubLayers().every((e=>e.isLoaded))}getSubLayers(){return this.internalState&&this.internalState.subLayers||[]}initializeState(e){}setState(e){super.setState(e),this.setNeedsUpdate()}getPickingInfo(e){let{info:t}=e;const{object:n}=t;return n&&n.__source&&n.__source.parent&&n.__source.parent.id===this.id?(t.object=n.__source.object,t.index=n.__source.index,t):t}filterSubLayer(e){return!0}shouldRenderSubLayer(e,t){return t&&t.length}getSubLayerClass(e,t){const{_subLayerProps:n}=this.props;return n&&n[e]&&n[e].type||t}getSubLayerRow(e,t,n){return e.__source={parent:this,object:t,index:n},e}getSubLayerAccessor(e){if("function"===typeof e){const t={index:-1,data:this.props.data,target:[]};return(n,r)=>n&&n.__source?(t.index=n.__source.index,e(n.__source.object,t)):e(n,r)}return e}getSubLayerProps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const{opacity:n,pickable:r,visible:i,parameters:o,getPolygonOffset:a,highlightedObjectIndex:l,autoHighlight:c,highlightColor:u,coordinateSystem:d,coordinateOrigin:f,wrapLongitude:h,positionFormat:p,modelMatrix:g,extensions:m,fetch:v,operation:A,_subLayerProps:y}=this.props,b={id:"",updateTriggers:{},opacity:n,pickable:r,visible:i,parameters:o,getPolygonOffset:a,highlightedObjectIndex:l,autoHighlight:c,highlightColor:u,coordinateSystem:d,coordinateOrigin:f,wrapLongitude:h,positionFormat:p,modelMatrix:g,extensions:m,fetch:v,operation:A},_=y&&e.id&&y[e.id],w=_&&_.updateTriggers,x=e.id||"sublayer";if(_){const t=this.props[s.Wb],n=e.type?e.type._propTypes:{};for(const e in _){const r=n[e]||t[e];r&&"accessor"===r.type&&(_[e]=this.getSubLayerAccessor(_[e]))}}Object.assign(b,e,_),b.id="".concat(this.props.id,"-").concat(x),b.updateTriggers={all:null===(t=this.props.updateTriggers)||void 0===t?void 0:t.all,...e.updateTriggers,...w};for(const s of m){const e=s.getSubLayerProps.call(this,s);e&&Object.assign(b,e,{updateTriggers:Object.assign(b.updateTriggers,e.updateTriggers)})}return b}_updateAutoHighlight(e){for(const t of this.getSubLayers())t.updateAutoHighlight(e)}_getAttributeManager(){return null}_postUpdate(e,t){let n=this.internalState.subLayers;const r=!n||this.needsUpdate();if(r){const e=this.renderLayers();n=(0,a.x)(e,Boolean),this.internalState.subLayers=n}(0,o.Z)("compositeLayer.renderLayers",this,r,n);for(const i of n)i.parent=this}}(0,r.Z)(l,"layerName","CompositeLayer")},98029:(e,t,n)=>{"use strict";n.d(t,{Df:()=>i,FP:()=>s,iI:()=>a,zG:()=>o});var r=n(65148);const i={DEFAULT:-1,LNGLAT:1,METER_OFFSETS:2,LNGLAT_OFFSETS:3,CARTESIAN:0};Object.defineProperty(i,"IDENTITY",{get:()=>(r.Z.deprecated("COORDINATE_SYSTEM.IDENTITY","COORDINATE_SYSTEM.CARTESIAN")(),0)});const o={WEB_MERCATOR:1,GLOBE:2,WEB_MERCATOR_AUTO_OFFSET:4,IDENTITY:0},a={common:0,meters:1,pixels:2},s={click:{handler:"onClick"},panstart:{handler:"onDragStart"},panmove:{handler:"onDrag"},panend:{handler:"onDragEnd"}}},21999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>yn});var r=n(68185);let i=1,o=1;class a{constructor(){this.time=0,this.channels=new Map,this.animations=new Map,this.playing=!1,this.lastEngineTime=-1}addChannel(e){const{delay:t=0,duration:n=Number.POSITIVE_INFINITY,rate:r=1,repeat:o=1}=e,a=i++,s={time:0,delay:t,duration:n,rate:r,repeat:o};return this._setChannelTime(s,this.time),this.channels.set(a,s),a}removeChannel(e){this.channels.delete(e);for(const[t,n]of this.animations)n.channel===e&&this.detachAnimation(t)}isFinished(e){const t=this.channels.get(e);return void 0!==t&&this.time>=t.delay+t.duration*t.repeat}getTime(e){if(void 0===e)return this.time;const t=this.channels.get(e);return void 0===t?-1:t.time}setTime(e){this.time=Math.max(0,e);const t=this.channels.values();for(const r of t)this._setChannelTime(r,this.time);const n=this.animations.values();for(const r of n){const{animation:e,channel:t}=r;e.setTime(this.getTime(t))}}play(){this.playing=!0}pause(){this.playing=!1,this.lastEngineTime=-1}reset(){this.setTime(0)}attachAnimation(e,t){const n=o++;return this.animations.set(n,{animation:e,channel:t}),e.setTime(this.getTime(t)),n}detachAnimation(e){this.animations.delete(e)}update(e){this.playing&&(-1===this.lastEngineTime&&(this.lastEngineTime=e),this.setTime(this.time+(e-this.lastEngineTime)),this.lastEngineTime=e)}_setChannelTime(e,t){const n=t-e.delay;n>=e.duration*e.repeat?e.time=e.duration*e.rate:(e.time=Math.max(0,n)%e.duration,e.time*=e.rate)}}var s=n(15672),l=n(65148),c=n(6525),u=n(35395),d=n(89069),f=n(63734);class h{constructor(e,t,n){(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"context",void 0),(0,r.Z)(this,"isLoaded",void 0),(0,r.Z)(this,"persistent",void 0),(0,r.Z)(this,"_loadCount",0),(0,r.Z)(this,"_subscribers",new Set),(0,r.Z)(this,"_data",void 0),(0,r.Z)(this,"_loader",void 0),(0,r.Z)(this,"_error",void 0),(0,r.Z)(this,"_content",void 0),this.id=e,this.context=n,this.setData(t)}subscribe(e){this._subscribers.add(e)}unsubscribe(e){this._subscribers.delete(e)}inUse(){return this._subscribers.size>0}delete(){}getData(){return this.isLoaded?this._error?Promise.reject(this._error):this._content:this._loader.then((()=>this.getData()))}setData(e,t){if(e===this._data&&!t)return;this._data=e;const n=++this._loadCount;let r=e;"string"===typeof e&&(r=(0,f.z)(e)),r instanceof Promise?(this.isLoaded=!1,this._loader=r.then((e=>{this._loadCount===n&&(this.isLoaded=!0,this._error=void 0,this._content=e)})).catch((e=>{this._loadCount===n&&(this.isLoaded=!0,this._error=e||!0)}))):(this.isLoaded=!0,this._error=void 0,this._content=e);for(const i of this._subscribers)i.onChange(this.getData())}}class p{constructor(e){let{gl:t,protocol:n}=e;(0,r.Z)(this,"protocol",void 0),(0,r.Z)(this,"_context",void 0),(0,r.Z)(this,"_resources",void 0),(0,r.Z)(this,"_consumers",void 0),(0,r.Z)(this,"_pruneRequest",void 0),this.protocol=n||"resource://",this._context={gl:t,resourceManager:this},this._resources={},this._consumers={},this._pruneRequest=null}contains(e){return!!e.startsWith(this.protocol)||e in this._resources}add(e){let{resourceId:t,data:n,forceUpdate:r=!1,persistent:i=!0}=e,o=this._resources[t];o?o.setData(n,r):(o=new h(t,n,this._context),this._resources[t]=o),o.persistent=i}remove(e){const t=this._resources[e];t&&(t.delete(),delete this._resources[e])}unsubscribe(e){let{consumerId:t}=e;const n=this._consumers[t];if(n){for(const e in n){const t=n[e],r=this._resources[t.resourceId];r&&r.unsubscribe(t)}delete this._consumers[t],this.prune()}}subscribe(e){let{resourceId:t,onChange:n,consumerId:r,requestId:i="default"}=e;const{_resources:o,protocol:a}=this;t.startsWith(a)&&(t=t.replace(a,""),o[t]||this.add({resourceId:t,data:null,persistent:!1}));const s=o[t];if(this._track(r,i,s,n),s)return s.getData()}prune(){this._pruneRequest||(this._pruneRequest=setTimeout((()=>this._prune()),0))}finalize(){for(const e in this._resources)this._resources[e].delete()}_track(e,t,n,r){const i=this._consumers,o=i[e]=i[e]||{},a=o[t]||{},s=a.resourceId&&this._resources[a.resourceId];s&&(s.unsubscribe(a),this.prune()),n&&(o[t]=a,a.onChange=r,a.resourceId=n.id,n.subscribe(a))}_prune(){this._pruneRequest=null;for(const e of Object.keys(this._resources)){const t=this._resources[e];t.persistent||t.inUse()||(t.delete(),delete this._resources[e])}}}var g=n(43809),m=n(68833),v=n(61518);const A=[v.Z],y=["vs:DECKGL_FILTER_SIZE(inout vec3 size, VertexGeometry geometry)","vs:DECKGL_FILTER_GL_POSITION(inout vec4 position, VertexGeometry geometry)","vs:DECKGL_FILTER_COLOR(inout vec4 color, VertexGeometry geometry)","fs:DECKGL_FILTER_COLOR(inout vec4 color, FragmentGeometry geometry)"];function b(e){const t=m.Z.getDefaultProgramManager(e);for(const n of A)t.addDefaultModule(n);for(const n of y)t.addShaderHook(n);return t}class _{constructor(e){let{deck:t,stats:n,viewport:i,timeline:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.Z)(this,"layers",void 0),(0,r.Z)(this,"context",void 0),(0,r.Z)(this,"resourceManager",void 0),(0,r.Z)(this,"_lastRenderedLayers",[]),(0,r.Z)(this,"_needsRedraw",!1),(0,r.Z)(this,"_needsUpdate",!1),(0,r.Z)(this,"_nextLayers",null),(0,r.Z)(this,"_debug",!1),(0,r.Z)(this,"activateViewport",(e=>{(0,c.Z)("layerManager.activateViewport",this,e),e&&(this.context.viewport=e)})),this.layers=[],this.resourceManager=new p({gl:e,protocol:"deck://"}),this.context={mousePosition:null,userData:{},layerManager:this,gl:e,deck:t,programManager:e&&b(e),stats:n||new d.Z({id:"deck.gl"}),viewport:i||new g.Z({id:"DEFAULT-INITIAL-VIEWPORT"}),timeline:o||new a,resourceManager:this.resourceManager,onError:void 0},Object.seal(this)}finalize(){this.resourceManager.finalize();for(const e of this.layers)this._finalizeLayer(e)}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},t=this._needsRedraw;e.clearRedrawFlags&&(this._needsRedraw=!1);for(const n of this.layers){const r=n.getNeedsRedraw(e);t=t||r}return t}needsUpdate(){return this._nextLayers&&this._nextLayers!==this._lastRenderedLayers?"layers changed":this._needsUpdate}setNeedsRedraw(e){this._needsRedraw=this._needsRedraw||e}setNeedsUpdate(e){this._needsUpdate=this._needsUpdate||e}getLayers(){let{layerIds:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e?this.layers.filter((t=>e.find((e=>0===t.id.indexOf(e))))):this.layers}setProps(e){"debug"in e&&(this._debug=e.debug),"userData"in e&&(this.context.userData=e.userData),"layers"in e&&(this._nextLayers=e.layers),"onError"in e&&(this.context.onError=e.onError)}setLayers(e,t){(0,c.Z)("layerManager.setLayers",this,t,e),this._lastRenderedLayers=e;const n=(0,u.x)(e,Boolean);for(const r of n)r.context=this.context;this._updateLayers(this.layers,n)}updateLayers(){const e=this.needsUpdate();e&&(this.setNeedsRedraw("updating layers: ".concat(e)),this.setLayers(this._nextLayers||this._lastRenderedLayers,e)),this._nextLayers=null}_handleError(e,t,n){n.raiseError(t,"".concat(e," of ").concat(n))}_updateLayers(e,t){const n={};for(const o of e)n[o.id]?l.Z.warn("Multiple old layers with same id ".concat(o.id))():n[o.id]=o;const r=[];this._updateSublayersRecursively(t,n,r),this._finalizeOldLayers(n);let i=!1;for(const o of r)if(o.hasUniformTransition()){i="Uniform transition in ".concat(o);break}this._needsUpdate=i,this.layers=r}_updateSublayersRecursively(e,t,n){for(const i of e){i.context=this.context;const e=t[i.id];null===e&&l.Z.warn("Multiple new layers with same id ".concat(i.id))(),t[i.id]=null;let o=null;try{this._debug&&e!==i&&i.validateProps(),e?(this._transferLayerState(e,i),this._updateLayer(i)):this._initializeLayer(i),n.push(i),o=i.isComposite?i.getSubLayers():null}catch(r){this._handleError("matching",r,i)}o&&this._updateSublayersRecursively(o,t,n)}}_finalizeOldLayers(e){for(const t in e){const n=e[t];n&&this._finalizeLayer(n)}}_initializeLayer(e){try{e._initialize(),e.lifecycle=s.dt.INITIALIZED}catch(t){this._handleError("initialization",t,e)}}_transferLayerState(e,t){t._transferState(e),t.lifecycle=s.dt.MATCHED,t!==e&&(e.lifecycle=s.dt.AWAITING_GC)}_updateLayer(e){try{e._update()}catch(t){this._handleError("update",t,e)}}_finalizeLayer(e){this._needsRedraw=this._needsRedraw||"finalized ".concat(e),e.lifecycle=s.dt.AWAITING_FINALIZATION;try{e._finalize(),e.lifecycle=s.dt.FINALIZED}catch(t){this._handleError("finalization",t,e)}}}var w=n(63549);class x{constructor(e){(0,r.Z)(this,"width",void 0),(0,r.Z)(this,"height",void 0),(0,r.Z)(this,"views",void 0),(0,r.Z)(this,"viewState",void 0),(0,r.Z)(this,"controllers",void 0),(0,r.Z)(this,"timeline",void 0),(0,r.Z)(this,"_viewports",void 0),(0,r.Z)(this,"_viewportMap",void 0),(0,r.Z)(this,"_isUpdating",void 0),(0,r.Z)(this,"_needsRedraw",void 0),(0,r.Z)(this,"_needsUpdate",void 0),(0,r.Z)(this,"_eventManager",void 0),(0,r.Z)(this,"_eventCallbacks",void 0),this.views=[],this.width=100,this.height=100,this.viewState={},this.controllers={},this.timeline=e.timeline,this._viewports=[],this._viewportMap={},this._isUpdating=!1,this._needsRedraw="First render",this._needsUpdate="Initialize",this._eventManager=e.eventManager,this._eventCallbacks={onViewStateChange:e.onViewStateChange,onInteractionStateChange:e.onInteractionStateChange},Object.seal(this),this.setProps(e)}finalize(){for(const e in this.controllers){const t=this.controllers[e];t&&t.finalize()}this.controllers={}}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};const t=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),t}setNeedsUpdate(e){this._needsUpdate=this._needsUpdate||e,this._needsRedraw=this._needsRedraw||e}updateViewStates(){for(const e in this.controllers){const t=this.controllers[e];t&&t.updateTransition()}}getViewports(e){return e?this._viewports.filter((t=>t.containsPixel(e))):this._viewports}getViews(){const e={};return this.views.forEach((t=>{e[t.id]=t})),e}getView(e){return this.views.find((t=>t.id===e))}getViewState(e){const t="string"===typeof e?this.getView(e):e,n=t&&this.viewState[t.getViewStateId()]||this.viewState;return t?t.filterViewState(n):n}getViewport(e){return this._viewportMap[e]}unproject(e,t){const n=this.getViewports(),r={x:e[0],y:e[1]};for(let i=n.length-1;i>=0;--i){const o=n[i];if(o.containsPixel(r)){const n=e.slice();return n[0]-=o.x,n[1]-=o.y,o.unproject(n,t)}}return null}setProps(e){e.views&&this._setViews(e.views),e.viewState&&this._setViewState(e.viewState),("width"in e||"height"in e)&&this._setSize(e.width,e.height),this._isUpdating||this._update()}_update(){this._isUpdating=!0,this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._isUpdating=!1}_setSize(e,t){e===this.width&&t===this.height||(this.width=e,this.height=t,this.setNeedsUpdate("Size changed"))}_setViews(e){e=(0,u.x)(e,Boolean);this._diffViews(e,this.views)&&this.setNeedsUpdate("views changed"),this.views=e}_setViewState(e){if(e){!(0,w.v)(e,this.viewState,3)&&this.setNeedsUpdate("viewState changed"),this.viewState=e}else l.Z.warn("missing `viewState` or `initialViewState`")()}_onViewStateChange(e,t){this._eventCallbacks.onViewStateChange&&this._eventCallbacks.onViewStateChange({...t,viewId:e})}_createController(e,t){return new(0,t.type)({timeline:this.timeline,eventManager:this._eventManager,onViewStateChange:this._onViewStateChange.bind(this,t.id),onStateChange:this._eventCallbacks.onInteractionStateChange,makeViewport:t=>{var n;return null===(n=this.getView(e.id))||void 0===n?void 0:n.makeViewport({viewState:t,width:this.width,height:this.height})}})}_updateController(e,t,n,r){const i=e.controller;if(i){const o={...t,...i,id:e.id,x:n.x,y:n.y,width:n.width,height:n.height};return r||(r=this._createController(e,o)),r&&r.setProps(o),r}return null}_rebuildViewports(){const{views:e}=this,t=this.controllers;this._viewports=[],this.controllers={};let n=!1;for(let r=e.length;r--;){const i=e[r],o=this.getViewState(i),a=i.makeViewport({viewState:o,width:this.width,height:this.height});let s=t[i.id];const l=Boolean(i.controller);l&&!s&&(n=!0),!n&&l||!s||(s.finalize(),s=null),this.controllers[i.id]=this._updateController(i,o,a,s),this._viewports.unshift(a)}for(const r in t){const e=t[r];e&&!this.controllers[r]&&e.finalize()}this._buildViewportMap()}_buildViewportMap(){this._viewportMap={},this._viewports.forEach((e=>{e.id&&(this._viewportMap[e.id]=this._viewportMap[e.id]||e)}))}_diffViews(e,t){return e.length!==t.length||e.some(((n,r)=>!e[r].equals(t[r])))}}const E=/([0-9]+\.?[0-9]*)(%|px)/;function S(e){switch(typeof e){case"number":return{position:e,relative:!1};case"string":const t=E.exec(e);if(t&&t.length>=3){const e="%"===t[2],n=parseFloat(t[1]);return{position:e?n/100:n,relative:e}}default:throw new Error("Could not parse position string ".concat(e))}}function C(e,t){return e.relative?Math.round(e.position*t):e.position}var P=n(37954);class T{constructor(e){(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"viewportInstance",void 0),(0,r.Z)(this,"_x",void 0),(0,r.Z)(this,"_y",void 0),(0,r.Z)(this,"_width",void 0),(0,r.Z)(this,"_height",void 0),(0,r.Z)(this,"_padding",void 0),(0,r.Z)(this,"props",void 0);const{id:t,x:n=0,y:i=0,width:o="100%",height:a="100%",padding:s=null,viewportInstance:l}=e||{};(0,P.Z)(!l||l instanceof g.Z),this.viewportInstance=l,this.id=t||this.constructor.displayName||"view",this.props={...e,id:this.id},this._x=S(n),this._y=S(i),this._width=S(o),this._height=S(a),this._padding=s&&{left:S(s.left||0),right:S(s.right||0),top:S(s.top||0),bottom:S(s.bottom||0)},this.equals=this.equals.bind(this),Object.seal(this)}equals(e){return this===e||(this.viewportInstance?!!e.viewportInstance&&this.viewportInstance.equals(e.viewportInstance):this.ViewportType===e.ViewportType&&(0,w.v)(this.props,e.props,2))}makeViewport(e){let{width:t,height:n,viewState:r}=e;if(this.viewportInstance)return this.viewportInstance;r=this.filterViewState(r);const i=this.getDimensions({width:t,height:n});return new this.ViewportType({...r,...this.props,...i})}getViewStateId(){const{viewState:e}=this.props;return"string"===typeof e?e:(null===e||void 0===e?void 0:e.id)||this.id}filterViewState(e){if(this.props.viewState&&"object"===typeof this.props.viewState){if(!this.props.viewState.id)return this.props.viewState;const t={...e};for(const e in this.props.viewState)"id"!==e&&(t[e]=this.props.viewState[e]);return t}return e}getDimensions(e){let{width:t,height:n}=e;const r={x:C(this._x,t),y:C(this._y,n),width:C(this._width,t),height:C(this._height,n)};return this._padding&&(r.padding={left:C(this._padding.left,t),top:C(this._padding.top,n),right:C(this._padding.right,t),bottom:C(this._padding.bottom,n)}),r}get controller(){const e=this.props.controller;return e?!0===e?{type:this.ControllerType}:"function"===typeof e?{type:e}:{type:this.ControllerType,...e}:null}}var k=n(5550),M=n(30373),R=n(78191);const O=()=>{},I=2,L=3,N=e=>e,D=1;class F{constructor(e){(0,r.Z)(this,"getControllerState",void 0),(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"propsInTransition",void 0),(0,r.Z)(this,"transition",void 0),(0,r.Z)(this,"onViewStateChange",void 0),(0,r.Z)(this,"onStateChange",void 0),(0,r.Z)(this,"_onTransitionUpdate",(e=>{const{time:t,settings:{interpolator:n,startProps:r,endProps:i,duration:o,easing:a}}=e,s=a(t/o),l=n.interpolateProps(r,i,s);this.propsInTransition=this.getControllerState({...this.props,...l}).getViewportProps(),this.onViewStateChange({viewState:this.propsInTransition,oldViewState:this.props})})),this.getControllerState=e.getControllerState,this.propsInTransition=null,this.transition=new R.Z(e.timeline),this.onViewStateChange=e.onViewStateChange||O,this.onStateChange=e.onStateChange||O}finalize(){this.transition.cancel()}getViewportInTransition(){return this.propsInTransition}processViewStateChange(e){let t=!1;const n=this.props;if(this.props=e,!n||this._shouldIgnoreViewportChange(n,e))return!1;if(this._isTransitionEnabled(e)){let r=n;if(this.transition.inProgress){const{interruption:e,endProps:t}=this.transition.settings;r={...n,...e===I?t:this.propsInTransition||n}}this._triggerTransition(r,e),t=!0}else this.transition.cancel();return t}updateTransition(){this.transition.update()}_isTransitionEnabled(e){const{transitionDuration:t,transitionInterpolator:n}=e;return(t>0||"auto"===t)&&Boolean(n)}_isUpdateDueToCurrentTransition(e){return!(!this.transition.inProgress||!this.propsInTransition)&&this.transition.settings.interpolator.arePropsEqual(e,this.propsInTransition)}_shouldIgnoreViewportChange(e,t){return this.transition.inProgress?this.transition.settings.interruption===L||this._isUpdateDueToCurrentTransition(t):!this._isTransitionEnabled(t)||t.transitionInterpolator.arePropsEqual(e,t)}_triggerTransition(e,t){const n=this.getControllerState(e),r=this.getControllerState(t).shortestPathFrom(n),i=t.transitionInterpolator,o=i.getDuration?i.getDuration(e,t):t.transitionDuration;if(0===o)return;const a=i.initializeProps(e,r);this.propsInTransition={};const s={duration:o,easing:t.transitionEasing||N,interpolator:i,interruption:t.transitionInterruption||D,startProps:a.start,endProps:a.end,onStart:t.onTransitionStart,onUpdate:this._onTransitionUpdate,onInterrupt:this._onTransitionEnd(t.onTransitionInterrupt),onEnd:this._onTransitionEnd(t.onTransitionEnd)};this.transition.start(s),this.onStateChange({inTransition:!0}),this.updateTransition()}_onTransitionEnd(e){return t=>{this.propsInTransition=null,this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1}),null===e||void 0===e||e(t)}}}class j{constructor(e){(0,r.Z)(this,"_propsToCompare",void 0),(0,r.Z)(this,"_propsToExtract",void 0),(0,r.Z)(this,"_requiredProps",void 0);const{compare:t,extract:n,required:i}=e;this._propsToCompare=t,this._propsToExtract=n||t,this._requiredProps=i}arePropsEqual(e,t){for(const n of this._propsToCompare)if(!(n in e)||!(n in t)||!(0,M.fS)(e[n],t[n]))return!1;return!0}initializeProps(e,t){const n={},r={};for(const i of this._propsToExtract)(i in e||i in t)&&(n[i]=e[i],r[i]=t[i]);return this._checkRequiredProps(n),this._checkRequiredProps(r),{start:n,end:r}}getDuration(e,t){return t.transitionDuration}_checkRequiredProps(e){this._requiredProps&&this._requiredProps.forEach((t=>{const n=e[t];(0,P.Z)(Number.isFinite(n)||Array.isArray(n),"".concat(t," is required for transition"))}))}}const B=["longitude","latitude","zoom","bearing","pitch"],Z=["longitude","latitude","zoom"];class z extends j{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Array.isArray(e)?e:e.transitionProps,n=Array.isArray(e)?{}:e;n.transitionProps=Array.isArray(t)?{compare:t,required:t}:t||{compare:B,required:Z},super(n.transitionProps),(0,r.Z)(this,"opts",void 0),this.opts=n}initializeProps(e,t){const n=super.initializeProps(e,t),{makeViewport:r,around:i}=this.opts;if(r&&i){const o=r(e),a=r(t),s=o.unproject(i);n.start.around=i,Object.assign(n.end,{around:a.project(s),aroundPosition:s,width:t.width,height:t.height})}return n}interpolateProps(e,t,n){const r={};for(const i of this._propsToExtract)r[i]=(0,M.t7)(e[i]||0,t[i]||0,n);if(t.aroundPosition&&this.opts.makeViewport){const i=this.opts.makeViewport({...t,...r});Object.assign(r,i.panByPosition(t.aroundPosition,(0,M.t7)(e.around,t.around,n)))}return r}}const U={transitionDuration:0},H=e=>1-(1-e)*(1-e),V=["wheel"],W=["panstart","panmove","panend"],G=["pinchstart","pinchmove","pinchend"],K=["tripanstart","tripanmove","tripanend"],q=["doubletap"],Y=["keydown"],X={};class ${constructor(e){(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"state",{}),(0,r.Z)(this,"transitionManager",void 0),(0,r.Z)(this,"eventManager",void 0),(0,r.Z)(this,"onViewStateChange",void 0),(0,r.Z)(this,"onStateChange",void 0),(0,r.Z)(this,"makeViewport",void 0),(0,r.Z)(this,"_controllerState",void 0),(0,r.Z)(this,"_events",{}),(0,r.Z)(this,"_interactionState",{isDragging:!1}),(0,r.Z)(this,"_customEvents",[]),(0,r.Z)(this,"_eventStartBlocked",null),(0,r.Z)(this,"_panMove",!1),(0,r.Z)(this,"invertPan",!1),(0,r.Z)(this,"dragMode","rotate"),(0,r.Z)(this,"inertia",0),(0,r.Z)(this,"scrollZoom",!0),(0,r.Z)(this,"dragPan",!0),(0,r.Z)(this,"dragRotate",!0),(0,r.Z)(this,"doubleClickZoom",!0),(0,r.Z)(this,"touchZoom",!0),(0,r.Z)(this,"touchRotate",!1),(0,r.Z)(this,"keyboard",!0),this.transitionManager=new F({...e,getControllerState:e=>new this.ControllerState(e),onViewStateChange:this._onTransition.bind(this),onStateChange:this._setInteractionState.bind(this)}),this.handleEvent=this.handleEvent.bind(this),this.eventManager=e.eventManager,this.onViewStateChange=e.onViewStateChange||(()=>{}),this.onStateChange=e.onStateChange||(()=>{}),this.makeViewport=e.makeViewport}set events(e){this.toggleEvents(this._customEvents,!1),this.toggleEvents(e,!0),this._customEvents=e,this.props&&this.setProps(this.props)}finalize(){for(const t in this._events){var e;if(this._events[t])null===(e=this.eventManager)||void 0===e||e.off(t,this.handleEvent)}this.transitionManager.finalize()}handleEvent(e){this._controllerState=void 0;const t=this._eventStartBlocked;switch(e.type){case"panstart":return!t&&this._onPanStart(e);case"panmove":return this._onPan(e);case"panend":return this._onPanEnd(e);case"pinchstart":return!t&&this._onPinchStart(e);case"pinchmove":return this._onPinch(e);case"pinchend":return this._onPinchEnd(e);case"tripanstart":return!t&&this._onTriplePanStart(e);case"tripanmove":return this._onTriplePan(e);case"tripanend":return this._onTriplePanEnd(e);case"doubletap":return this._onDoubleTap(e);case"wheel":return this._onWheel(e);case"keydown":return this._onKeyDown(e);default:return!1}}get controllerState(){return this._controllerState=this._controllerState||new this.ControllerState({makeViewport:this.makeViewport,...this.props,...this.state}),this._controllerState}getCenter(e){const{x:t,y:n}=this.props,{offsetCenter:r}=e;return[r.x-t,r.y-n]}isPointInBounds(e,t){const{width:n,height:r}=this.props;if(t&&t.handled)return!1;const i=e[0]>=0&&e[0]<=n&&e[1]>=0&&e[1]<=r;return i&&t&&t.stopPropagation(),i}isFunctionKeyPressed(e){const{srcEvent:t}=e;return Boolean(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}isDragging(){return this._interactionState.isDragging||!1}blockEvents(e){const t=setTimeout((()=>{this._eventStartBlocked===t&&(this._eventStartBlocked=null)}),e);this._eventStartBlocked=t}setProps(e){e.dragMode&&(this.dragMode=e.dragMode),this.props=e,"transitionInterpolator"in e||(e.transitionInterpolator=this._getTransitionProps().transitionInterpolator),this.transitionManager.processViewStateChange(e);const{inertia:t}=e;this.inertia=Number.isFinite(t)?t:!0===t?300:0;const{scrollZoom:n=!0,dragPan:r=!0,dragRotate:i=!0,doubleClickZoom:o=!0,touchZoom:a=!0,touchRotate:s=!1,keyboard:l=!0}=e,c=Boolean(this.onViewStateChange);this.toggleEvents(V,c&&n),this.toggleEvents(W,c&&(r||i)),this.toggleEvents(G,c&&(a||s)),this.toggleEvents(K,c&&s),this.toggleEvents(q,c&&o),this.toggleEvents(Y,c&&l),this.scrollZoom=n,this.dragPan=r,this.dragRotate=i,this.doubleClickZoom=o,this.touchZoom=a,this.touchRotate=s,this.keyboard=l}updateTransition(){this.transitionManager.updateTransition()}toggleEvents(e,t){this.eventManager&&e.forEach((e=>{this._events[e]!==t&&(this._events[e]=t,t?this.eventManager.on(e,this.handleEvent):this.eventManager.off(e,this.handleEvent))}))}updateViewport(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={...e.getViewportProps(),...t},i=this.controllerState!==e;if(this.state=e.getState(),this._setInteractionState(n),i){const e=this.controllerState&&this.controllerState.getViewportProps();this.onViewStateChange&&this.onViewStateChange({viewState:r,interactionState:this._interactionState,oldViewState:e})}}_onTransition(e){this.onViewStateChange({...e,interactionState:this._interactionState})}_setInteractionState(e){Object.assign(this._interactionState,e),this.onStateChange(this._interactionState)}_onPanStart(e){const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;let n=this.isFunctionKeyPressed(e)||e.rightButton||!1;(this.invertPan||"pan"===this.dragMode)&&(n=!n);const r=this.controllerState[n?"panStart":"rotateStart"]({pos:t});return this._panMove=n,this.updateViewport(r,U,{isDragging:!0}),!0}_onPan(e){return!!this.isDragging()&&(this._panMove?this._onPanMove(e):this._onPanRotate(e))}_onPanEnd(e){return!!this.isDragging()&&(this._panMove?this._onPanMoveEnd(e):this._onPanRotateEnd(e))}_onPanMove(e){if(!this.dragPan)return!1;const t=this.getCenter(e),n=this.controllerState.pan({pos:t});return this.updateViewport(n,U,{isDragging:!0,isPanning:!0}),!0}_onPanMoveEnd(e){const{inertia:t}=this;if(this.dragPan&&t&&e.velocity){const n=this.getCenter(e),r=[n[0]+e.velocityX*t/2,n[1]+e.velocityY*t/2],i=this.controllerState.pan({pos:r}).panEnd();this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:t,transitionEasing:H},{isDragging:!1,isPanning:!0})}else{const e=this.controllerState.panEnd();this.updateViewport(e,null,{isDragging:!1,isPanning:!1})}return!0}_onPanRotate(e){if(!this.dragRotate)return!1;const t=this.getCenter(e),n=this.controllerState.rotate({pos:t});return this.updateViewport(n,U,{isDragging:!0,isRotating:!0}),!0}_onPanRotateEnd(e){const{inertia:t}=this;if(this.dragRotate&&t&&e.velocity){const n=this.getCenter(e),r=[n[0]+e.velocityX*t/2,n[1]+e.velocityY*t/2],i=this.controllerState.rotate({pos:r}).rotateEnd();this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:t,transitionEasing:H},{isDragging:!1,isRotating:!0})}else{const e=this.controllerState.rotateEnd();this.updateViewport(e,null,{isDragging:!1,isRotating:!1})}return!0}_onWheel(e){if(!this.scrollZoom)return!1;e.srcEvent.preventDefault();const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;const{speed:n=.01,smooth:r=!1}=!0===this.scrollZoom?{}:this.scrollZoom,{delta:i}=e;let o=2/(1+Math.exp(-Math.abs(i*n)));i<0&&0!==o&&(o=1/o);const a=this.controllerState.zoom({pos:t,scale:o});return this.updateViewport(a,{...this._getTransitionProps({around:t}),transitionDuration:r?250:1},{isZooming:!0,isPanning:!0}),!0}_onTriplePanStart(e){const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;const n=this.controllerState.rotateStart({pos:t});return this.updateViewport(n,U,{isDragging:!0}),!0}_onTriplePan(e){if(!this.touchRotate)return!1;if(!this.isDragging())return!1;const t=this.getCenter(e);t[0]-=e.deltaX;const n=this.controllerState.rotate({pos:t});return this.updateViewport(n,U,{isDragging:!0,isRotating:!0}),!0}_onTriplePanEnd(e){if(!this.isDragging())return!1;const{inertia:t}=this;if(this.touchRotate&&t&&e.velocityY){const n=this.getCenter(e),r=[n[0],n[1]+=e.velocityY*t/2],i=this.controllerState.rotate({pos:r});this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:t,transitionEasing:H},{isDragging:!1,isRotating:!0}),this.blockEvents(t)}else{const e=this.controllerState.rotateEnd();this.updateViewport(e,null,{isDragging:!1,isRotating:!1})}return!0}_onPinchStart(e){const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;const n=this.controllerState.zoomStart({pos:t}).rotateStart({pos:t});return X._startPinchRotation=e.rotation,X._lastPinchEvent=e,this.updateViewport(n,U,{isDragging:!0}),!0}_onPinch(e){if(!this.touchZoom&&!this.touchRotate)return!1;if(!this.isDragging())return!1;let t=this.controllerState;if(this.touchZoom){const{scale:n}=e,r=this.getCenter(e);t=t.zoom({pos:r,scale:n})}if(this.touchRotate){const{rotation:n}=e;t=t.rotate({deltaAngleX:X._startPinchRotation-n})}return this.updateViewport(t,U,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),X._lastPinchEvent=e,!0}_onPinchEnd(e){if(!this.isDragging())return!1;const{inertia:t}=this,{_lastPinchEvent:n}=X;if(this.touchZoom&&t&&n&&e.scale!==n.scale){const r=this.getCenter(e);let i=this.controllerState.rotateEnd();const o=Math.log2(e.scale),a=(o-Math.log2(n.scale))/(e.deltaTime-n.deltaTime),s=Math.pow(2,o+a*t/2);i=i.zoom({pos:r,scale:s}).zoomEnd(),this.updateViewport(i,{...this._getTransitionProps({around:r}),transitionDuration:t,transitionEasing:H},{isDragging:!1,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:!1}),this.blockEvents(t)}else{const e=this.controllerState.zoomEnd().rotateEnd();this.updateViewport(e,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1})}return X._startPinchRotation=null,X._lastPinchEvent=null,!0}_onDoubleTap(e){if(!this.doubleClickZoom)return!1;const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;const n=this.isFunctionKeyPressed(e),r=this.controllerState.zoom({pos:t,scale:n?.5:2});return this.updateViewport(r,this._getTransitionProps({around:t}),{isZooming:!0,isPanning:!0}),this.blockEvents(100),!0}_onKeyDown(e){if(!this.keyboard)return!1;const t=this.isFunctionKeyPressed(e),{zoomSpeed:n,moveSpeed:r,rotateSpeedX:i,rotateSpeedY:o}=!0===this.keyboard?{}:this.keyboard,{controllerState:a}=this;let s;const l={};switch(e.srcEvent.code){case"Minus":s=t?a.zoomOut(n).zoomOut(n):a.zoomOut(n),l.isZooming=!0;break;case"Equal":s=t?a.zoomIn(n).zoomIn(n):a.zoomIn(n),l.isZooming=!0;break;case"ArrowLeft":t?(s=a.rotateLeft(i),l.isRotating=!0):(s=a.moveLeft(r),l.isPanning=!0);break;case"ArrowRight":t?(s=a.rotateRight(i),l.isRotating=!0):(s=a.moveRight(r),l.isPanning=!0);break;case"ArrowUp":t?(s=a.rotateUp(o),l.isRotating=!0):(s=a.moveUp(r),l.isPanning=!0);break;case"ArrowDown":t?(s=a.rotateDown(o),l.isRotating=!0):(s=a.moveDown(r),l.isPanning=!0);break;default:return!1}return this.updateViewport(s,this._getTransitionProps(),l),!0}_getTransitionProps(e){const{transition:t}=this;return t&&t.transitionInterpolator?e?{...t,transitionInterpolator:new z({...e,...t.transitionInterpolator.opts,makeViewport:this.controllerState.makeViewport})}:t:U}}class Q{constructor(e,t){(0,r.Z)(this,"_viewportProps",void 0),(0,r.Z)(this,"_state",void 0),this._viewportProps=this.applyConstraints(e),this._state=t}getViewportProps(){return this._viewportProps}getState(){return this._state}}var J=n(1384);class ee extends Q{constructor(e){const{width:t,height:n,latitude:i,longitude:o,zoom:a,bearing:s=0,pitch:l=0,altitude:c=1.5,position:u=[0,0,0],maxZoom:d=20,minZoom:f=0,maxPitch:h=60,minPitch:p=0,startPanLngLat:g,startZoomLngLat:m,startRotatePos:v,startBearing:A,startPitch:y,startZoom:b,normalize:_=!0}=e;(0,P.Z)(Number.isFinite(o)),(0,P.Z)(Number.isFinite(i)),(0,P.Z)(Number.isFinite(a)),super({width:t,height:n,latitude:i,longitude:o,zoom:a,bearing:s,pitch:l,altitude:c,maxZoom:d,minZoom:f,maxPitch:h,minPitch:p,normalize:_,position:u},{startPanLngLat:g,startZoomLngLat:m,startRotatePos:v,startBearing:A,startPitch:y,startZoom:b}),(0,r.Z)(this,"makeViewport",void 0),this.makeViewport=e.makeViewport}panStart(e){let{pos:t}=e;return this._getUpdatedState({startPanLngLat:this._unproject(t)})}pan(e){let{pos:t,startPos:n}=e;const r=this.getState().startPanLngLat||this._unproject(n);if(!r)return this;const i=this.makeViewport(this.getViewportProps()).panByPosition(r,t);return this._getUpdatedState(i)}panEnd(){return this._getUpdatedState({startPanLngLat:null})}rotateStart(e){let{pos:t}=e;return this._getUpdatedState({startRotatePos:t,startBearing:this.getViewportProps().bearing,startPitch:this.getViewportProps().pitch})}rotate(e){let{pos:t,deltaAngleX:n=0,deltaAngleY:r=0}=e;const{startRotatePos:i,startBearing:o,startPitch:a}=this.getState();if(!i||void 0===o||void 0===a)return this;let s;return s=t?this._getNewRotation(t,i,a,o):{bearing:o+n,pitch:a+r},this._getUpdatedState(s)}rotateEnd(){return this._getUpdatedState({startBearing:null,startPitch:null})}zoomStart(e){let{pos:t}=e;return this._getUpdatedState({startZoomLngLat:this._unproject(t),startZoom:this.getViewportProps().zoom})}zoom(e){let{pos:t,startPos:n,scale:r}=e,{startZoom:i,startZoomLngLat:o}=this.getState();if(o||(i=this.getViewportProps().zoom,o=this._unproject(n)||this._unproject(t)),!o)return this;const{maxZoom:a,minZoom:s}=this.getViewportProps();let l=i+Math.log2(r);l=(0,M.uZ)(l,s,a);const c=this.makeViewport({...this.getViewportProps(),zoom:l});return this._getUpdatedState({zoom:l,...c.panByPosition(o,t)})}zoomEnd(){return this._getUpdatedState({startZoomLngLat:null,startZoom:null})}zoomIn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._zoomFromCenter(e)}zoomOut(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._zoomFromCenter(1/e)}moveLeft(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([e,0])}moveRight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([-e,0])}moveUp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([0,e])}moveDown(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([0,-e])}rotateLeft(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this.getViewportProps().bearing-e})}rotateRight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this.getViewportProps().bearing+e})}rotateUp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this.getViewportProps().pitch+e})}rotateDown(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this.getViewportProps().pitch-e})}shortestPathFrom(e){const t=e.getViewportProps(),n={...this.getViewportProps()},{bearing:r,longitude:i}=n;return Math.abs(r-t.bearing)>180&&(n.bearing=r<0?r+360:r-360),Math.abs(i-t.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}applyConstraints(e){const{maxZoom:t,minZoom:n,zoom:r}=e;e.zoom=(0,M.uZ)(r,n,t);const{maxPitch:i,minPitch:o,pitch:a}=e;e.pitch=(0,M.uZ)(a,o,i);const{normalize:s=!0}=e;return s&&Object.assign(e,(0,J.QA)(e)),e}_zoomFromCenter(e){const{width:t,height:n}=this.getViewportProps();return this.zoom({pos:[t/2,n/2],scale:e})}_panFromCenter(e){const{width:t,height:n}=this.getViewportProps();return this.pan({startPos:[t/2,n/2],pos:[t/2+e[0],n/2+e[1]]})}_getUpdatedState(e){return new this.constructor({makeViewport:this.makeViewport,...this.getViewportProps(),...this.getState(),...e})}_unproject(e){const t=this.makeViewport(this.getViewportProps());return e&&t.unproject(e)}_getNewRotation(e,t,n,r){const i=e[0]-t[0],o=e[1]-t[1],a=e[1],s=t[1],{width:l,height:c}=this.getViewportProps(),u=i/l;let d=0;o>0?Math.abs(c-s)>5&&(d=o/(s-c)*1.2):o<0&&s>5&&(d=1-a/s),d=(0,M.uZ)(d,-1,1);const{minPitch:f,maxPitch:h}=this.getViewportProps();let p=n;return d>0?p=n+d*(h-n):d<0&&(p=n-d*(f-n)),{pitch:p,bearing:r+180*u}}}class te extends ${constructor(){super(...arguments),(0,r.Z)(this,"ControllerState",ee),(0,r.Z)(this,"transition",{transitionDuration:300,transitionInterpolator:new z({transitionProps:{compare:["longitude","latitude","zoom","bearing","pitch","position"],required:["longitude","latitude","zoom"]}})}),(0,r.Z)(this,"dragMode","pan")}setProps(e){e.position=e.position||[0,0,0];const t=this.props;super.setProps(e);(!t||t.height!==e.height)&&this.updateViewport(new this.ControllerState({makeViewport:this.makeViewport,...e,...this.state}))}}class ne extends T{get ViewportType(){return k.Z}get ControllerType(){return te}}(0,r.Z)(ne,"displayName","MapView");var re=n(81786);const ie=[255,255,255],oe=1;let ae=0;class se{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"color",void 0),(0,r.Z)(this,"intensity",void 0),(0,r.Z)(this,"type","ambient");const{color:t=ie}=e,{intensity:n=oe}=e;this.id=e.id||"ambient-".concat(ae++),this.color=t,this.intensity=n}}var le=n(31549);const ce=[255,255,255],ue=1,de=[0,0,-1];let fe=0;class he{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"color",void 0),(0,r.Z)(this,"intensity",void 0),(0,r.Z)(this,"type","directional"),(0,r.Z)(this,"direction",void 0),(0,r.Z)(this,"shadow",void 0);const{color:t=ce}=e,{intensity:n=ue}=e,{direction:i=de}=e,{_shadow:o=!1}=e;this.id=e.id||"directional-".concat(fe++),this.color=t,this.intensity=n,this.type="directional",this.direction=new le.Z(i).normalize().toArray(),this.shadow=o}getProjectedLight(e){return this}}var pe=n(39944),ge=n(66176),me=n(26277),ve=n(64282),Ae=n(76195);class ye extends ge.Z{constructor(e,t){super(e,t),(0,r.Z)(this,"shadowMap",void 0),(0,r.Z)(this,"depthBuffer",void 0),(0,r.Z)(this,"fbo",void 0),this.shadowMap=new re.Z(e,{width:1,height:1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.depthBuffer=new me.Z(e,{format:33189,width:1,height:1}),this.fbo=new ve.Z(e,{id:"shadowmap",width:1,height:1,attachments:{36064:this.shadowMap,36096:this.depthBuffer}})}render(e){const t=this.fbo;(0,Ae.s8)(this.gl,{depthRange:[0,1],depthTest:!0,blend:!1,clearColor:[1,1,1,1]},(()=>{const n=e.viewports[0],r=(0,Ae.w)(this.gl),i=n.width*r,o=n.height*r;i===t.width&&o===t.height||t.resize({width:i,height:o}),super.render({...e,target:t,pass:"shadow"})}))}shouldDrawLayer(e){return!1!==e.props.shadowEnabled}getModuleParameters(){return{drawToShadowMap:!0}}delete(){this.fbo&&(this.fbo.delete(),this.fbo=null),this.shadowMap&&(this.shadowMap.delete(),this.shadowMap=null),this.depthBuffer&&(this.depthBuffer.delete(),this.depthBuffer=null)}}var be=n(98029),_e=n(12091);const we=(0,_e.Z)((function(e){let{viewport:t,center:n}=e;return new pe.Z(t.viewProjectionMatrix).invert().transform(n)})),xe=(0,_e.Z)((function(e){let{viewport:t,shadowMatrices:n}=e;const r=[],i=t.pixelUnprojectionMatrix,o=t.isGeospatial?void 0:1,a=[[0,0,o],[t.width,0,o],[0,t.height,o],[t.width,t.height,o],[0,0,-1],[t.width,0,-1],[0,t.height,-1],[t.width,t.height,-1]].map((e=>function(e,t){const[n,r,i]=e,o=(0,J.CT)([n,r,i],t);if(Number.isFinite(i))return o;return[o[0],o[1],0]}(e,i)));for(const s of n){const e=s.clone().translate(new le.Z(t.center).negate()),n=a.map((t=>e.transform(t))),i=(new pe.Z).ortho({left:Math.min(...n.map((e=>e[0]))),right:Math.max(...n.map((e=>e[0]))),bottom:Math.min(...n.map((e=>e[1]))),top:Math.max(...n.map((e=>e[1]))),near:Math.min(...n.map((e=>-e[2]))),far:Math.max(...n.map((e=>-e[2])))});r.push(i.multiplyRight(s))}return r})),Ee=[0,0,0,1],Se=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0];const Ce={name:"shadow",dependencies:[v.Z],vs:"\nconst int max_lights = 2;\nuniform mat4 shadow_uViewProjectionMatrices[max_lights];\nuniform vec4 shadow_uProjectCenters[max_lights];\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform int shadow_uLightId;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nvec4 shadow_setVertexPosition(vec4 position_commonspace) {\n if (shadow_uDrawShadowMap) {\n return project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[shadow_uLightId], shadow_uProjectCenters[shadow_uLightId]);\n }\n if (shadow_uUseShadowMap) {\n for (int i = 0; i < max_lights; i++) {\n if(i < int(shadow_uLightCount)) {\n vec4 shadowMap_position = project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[i], shadow_uProjectCenters[i]);\n shadow_vPosition[i] = (shadowMap_position.xyz / shadowMap_position.w + 1.0) / 2.0;\n }\n }\n }\n return gl_Position;\n}\n",fs:"\nconst int max_lights = 2;\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform sampler2D shadow_uShadowMap0;\nuniform sampler2D shadow_uShadowMap1;\nuniform vec4 shadow_uColor;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nconst vec4 bitPackShift = vec4(1.0, 255.0, 65025.0, 16581375.0);\nconst vec4 bitUnpackShift = 1.0 / bitPackShift;\nconst vec4 bitMask = vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n\nfloat shadow_getShadowWeight(vec3 position, sampler2D shadowMap) {\n vec4 rgbaDepth = texture2D(shadowMap, position.xy);\n\n float z = dot(rgbaDepth, bitUnpackShift);\n return smoothstep(0.001, 0.01, position.z - z);\n}\n\nvec4 shadow_filterShadowColor(vec4 color) {\n if (shadow_uDrawShadowMap) {\n vec4 rgbaDepth = fract(gl_FragCoord.z * bitPackShift);\n rgbaDepth -= rgbaDepth.gbaa * bitMask;\n return rgbaDepth;\n }\n if (shadow_uUseShadowMap) {\n float shadowAlpha = 0.0;\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[0], shadow_uShadowMap0);\n if(shadow_uLightCount > 1.0) {\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[1], shadow_uShadowMap1);\n }\n shadowAlpha *= shadow_uColor.a / shadow_uLightCount;\n float blendedAlpha = shadowAlpha + color.a * (1.0 - shadowAlpha);\n\n return vec4(\n mix(color.rgb, shadow_uColor.rgb, shadowAlpha / blendedAlpha),\n blendedAlpha\n );\n }\n return color;\n}\n",inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n position = shadow_setVertexPosition(geometry.position);\n ","fs:DECKGL_FILTER_COLOR":"\n color = shadow_filterShadowColor(color);\n "},getUniforms:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"viewport"in e&&(e.drawToShadowMap||e.shadowMaps&&e.shadowMaps.length>0)?function(e,t){const{shadowEnabled:n=!0}=e;if(!n||!e.shadowMatrices||!e.shadowMatrices.length)return{shadow_uDrawShadowMap:!1,shadow_uUseShadowMap:!1};const r={shadow_uDrawShadowMap:Boolean(e.drawToShadowMap),shadow_uUseShadowMap:!!e.shadowMaps&&e.shadowMaps.length>0,shadow_uColor:e.shadowColor||Ee,shadow_uLightId:e.shadowLightId||0,shadow_uLightCount:e.shadowMatrices.length},i=we({viewport:e.viewport,center:t.project_uCenter}),o=[],a=xe({shadowMatrices:e.shadowMatrices,viewport:e.viewport}).slice();for(let s=0;s0?r["shadow_uShadowMap".concat(s)]=e.shadowMaps[s]:r["shadow_uShadowMap".concat(s)]=e.dummyShadowMap;return r}(e,t):{}}},Pe={color:[255,255,255],intensity:1},Te=[{color:[255,255,255],intensity:1,direction:[-1,3,-1]},{color:[255,255,255],intensity:.9,direction:[1,-8,-2.5]}],ke=[0,0,0,200/255];class Me{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"id","lighting-effect"),(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"shadowColor",ke),(0,r.Z)(this,"shadow",void 0),(0,r.Z)(this,"ambientLight",void 0),(0,r.Z)(this,"directionalLights",void 0),(0,r.Z)(this,"pointLights",void 0),(0,r.Z)(this,"shadowPasses",[]),(0,r.Z)(this,"shadowMaps",[]),(0,r.Z)(this,"dummyShadowMap",null),(0,r.Z)(this,"programManager",void 0),(0,r.Z)(this,"shadowMatrices",void 0),this.setProps(e)}setProps(e){this.ambientLight=null,this.directionalLights=[],this.pointLights=[];for(const t in e){const n=e[t];switch(n.type){case"ambient":this.ambientLight=n;break;case"directional":this.directionalLights.push(n);break;case"point":this.pointLights.push(n)}}this._applyDefaultLights(),this.shadow=this.directionalLights.some((e=>e.shadow)),this.props=e}preRender(e,t){let{layers:n,layerFilter:r,viewports:i,onViewportActive:o,views:a}=t;if(this.shadow){this.shadowMatrices=this._calculateMatrices(),0===this.shadowPasses.length&&this._createShadowPasses(e),this.programManager||(this.programManager=m.Z.getDefaultProgramManager(e),Ce&&this.programManager.addDefaultModule(Ce)),this.dummyShadowMap||(this.dummyShadowMap=new re.Z(e,{width:1,height:1}));for(let e=0;et.getProjectedLight({layer:e}))),pointLights:this.pointLights.map((t=>t.getProjectedLight({layer:e})))},t}cleanup(){for(const e of this.shadowPasses)e.delete();this.shadowPasses.length=0,this.shadowMaps.length=0,this.dummyShadowMap&&(this.dummyShadowMap.delete(),this.dummyShadowMap=null),this.shadow&&this.programManager&&(this.programManager.removeDefaultModule(Ce),this.programManager=null)}_calculateMatrices(){const e=[];for(const t of this.directionalLights){const n=(new pe.Z).lookAt({eye:new le.Z(t.direction).negate()});e.push(n)}return e}_createShadowPasses(e){for(let t=0;tt.id===e.id))){const n=t.findIndex((t=>function(e,t){var n,r;return(null!==(n=e.order)&&void 0!==n?n:1/0)-(null!==(r=t.order)&&void 0!==r?r:1/0)}(t,e)>0));n<0?t.push(e):t.splice(n,0,e),this._setEffects(this.effects)}}setProps(e){"effects"in e&&((0,w.v)(e.effects,this.effects,1)||this._setEffects(e.effects))}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};const t=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),t}getEffects(){return this._resolvedEffects}_setEffects(e){const t={};for(const r of this.effects)t[r.id]=r;const n=[];for(const r of e){const e=t[r.id];e&&e!==r?e.setProps?(e.setProps(r.props),n.push(e)):(e.cleanup(),n.push(r)):n.push(r),delete t[r.id]}for(const r in t)t[r].cleanup();this.effects=n,this._resolvedEffects=n.concat(this._defaultEffects),e.some((e=>e instanceof Me))||this._resolvedEffects.push(Re),this._needsRedraw="effects changed"}finalize(){for(const e of this._resolvedEffects)e.cleanup();this.effects.length=0,this._resolvedEffects.length=0,this._defaultEffects.length=0}}class Ie extends ge.Z{shouldDrawLayer(e){const{operation:t}=e.props;return t.includes("draw")||t.includes("terrain")}}const Le={blendFunc:[1,0,32771,0],blendEquation:32774};class Ne extends ge.Z{constructor(){super(...arguments),(0,r.Z)(this,"pickZ",void 0),(0,r.Z)(this,"_colorEncoderState",null)}render(e){return"pickingFBO"in e?this._drawPickingBuffer(e):super.render(e)}_drawPickingBuffer(e){let{layers:t,layerFilter:n,views:r,viewports:i,onViewportActive:o,pickingFBO:a,deviceRect:{x:s,y:l,width:c,height:u},cullRect:d,effects:f,pass:h="picking",pickZ:p,moduleParameters:g}=e;const m=this.gl;this.pickZ=p;const v=this._resetColorEncoder(p),A=(0,Ae.s8)(m,{scissorTest:!0,scissor:[s,l,c,u],clearColor:[0,0,0,0],depthMask:!0,depthTest:!0,depthRange:[0,1],colorMask:[!0,!0,!0,!0],...Le,blend:!p},(()=>super.render({target:a,layers:t,layerFilter:n,views:r,viewports:i,onViewportActive:o,cullRect:d,effects:null===f||void 0===f?void 0:f.filter((e=>e.useInPicking)),pass:h,isPicking:!0,moduleParameters:g})));this._colorEncoderState=null;return{decodePickingColor:v&&De.bind(null,v),stats:A}}shouldDrawLayer(e){const{pickable:t,operation:n}=e.props;return t&&n.includes("draw")||n.includes("terrain")}getModuleParameters(){return{pickingActive:1,pickingAttribute:this.pickZ,lightSources:{}}}getLayerParameters(e,t,n){const r={...e.props.parameters},{pickable:i,operation:o}=e.props;return this._colorEncoderState?i&&o.includes("draw")&&(Object.assign(r,Le),r.blend=!0,r.blendColor=function(e,t,n){const{byLayer:r,byAlpha:i}=e;let o,a=r.get(t);a?(a.viewports.push(n),o=a.a):(o=r.size+1,o<=255?(a={a:o,layer:t,viewports:[n]},r.set(t,a),i[o]=a):(l.Z.warn("Too many pickable layers, only picking the first 255")(),o=0));return[0,0,0,o/255]}(this._colorEncoderState,e,n)):r.blend=!1,o.includes("terrain")&&(r.blend=!1),r}_resetColorEncoder(e){return this._colorEncoderState=e?null:{byLayer:new Map,byAlpha:[]},this._colorEncoderState}}function De(e,t){const n=e.byAlpha[t[3]];return n&&{pickedLayer:n.layer,pickedViewports:n.viewports,pickedObjectIndex:n.layer.decodePickingColor(t)}}class Fe{constructor(e){(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"layerFilter",void 0),(0,r.Z)(this,"drawPickingColors",void 0),(0,r.Z)(this,"drawLayersPass",void 0),(0,r.Z)(this,"pickLayersPass",void 0),(0,r.Z)(this,"renderCount",void 0),(0,r.Z)(this,"_needsRedraw",void 0),(0,r.Z)(this,"renderBuffers",void 0),(0,r.Z)(this,"lastPostProcessEffect",void 0),this.gl=e,this.layerFilter=null,this.drawPickingColors=!1,this.drawLayersPass=new Ie(e),this.pickLayersPass=new Ne(e),this.renderCount=0,this._needsRedraw="Initial render",this.renderBuffers=[],this.lastPostProcessEffect=null}setProps(e){this.layerFilter!==e.layerFilter&&(this.layerFilter=e.layerFilter,this._needsRedraw="layerFilter changed"),this.drawPickingColors!==e.drawPickingColors&&(this.drawPickingColors=e.drawPickingColors,this._needsRedraw="drawPickingColors changed")}renderLayers(e){const t=this.drawPickingColors?this.pickLayersPass:this.drawLayersPass,n={layerFilter:this.layerFilter,isPicking:this.drawPickingColors,...e,target:e.target||ve.Z.getDefaultFramebuffer(this.gl)};n.effects&&this._preRender(n.effects,n);const r=this.lastPostProcessEffect?this.renderBuffers[0]:n.target,i=t.render({...n,target:r});n.effects&&this._postRender(n.effects,n),this.renderCount++,(0,c.Z)("deckRenderer.renderLayers",this,i,e)}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};const t=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),t}finalize(){const{renderBuffers:e}=this;for(const t of e)t.delete();e.length=0}_preRender(e,t){this.lastPostProcessEffect=null,t.preRenderStats=t.preRenderStats||{};for(const n of e)t.preRenderStats[n.id]=n.preRender(this.gl,t),n.postRender&&(this.lastPostProcessEffect=n.id);this.lastPostProcessEffect&&this._resizeRenderBuffers()}_resizeRenderBuffers(){const{renderBuffers:e}=this;0===e.length&&e.push(new ve.Z(this.gl),new ve.Z(this.gl));for(const t of e)t.resize()}_postRender(e,t){const{renderBuffers:n}=this,r={...t,inputBuffer:n[0],swapBuffer:n[1],target:null};for(const i of e)if(i.postRender){if(i.id===this.lastPostProcessEffect){r.target=t.target,i.postRender(this.gl,r);break}const e=i.postRender(this.gl,r);r.inputBuffer=e,r.swapBuffer=e===n[0]?n[1]:n[0]}}}var je=n(77378);const Be={pickedColor:null,pickedObjectIndex:-1};function Ze(e){let{pickedColors:t,decodePickingColor:n,deviceX:r,deviceY:i,deviceRadius:o,deviceRect:a}=e;const{x:s,y:c,width:u,height:d}=a;let f=o*o,h=-1,p=0;for(let l=0;lf)p+=4*u;else for(let i=0;i=0){const e=i+s-r,t=e*e+n;t<=f&&(f=t,h=p)}p+=4}}if(h>=0){const e=t.slice(h,h+4),r=n(e);if(r){const t=Math.floor(h/4/u),n=h/4-t*u;return{...r,pickedColor:e,pickedX:s+n,pickedY:c+t}}l.Z.error("Picked non-existent layer. Is picking buffer corrupt?")()}return Be}function ze(e){let t,{pickInfo:n,viewports:r,pixelRatio:i,x:o,y:a,z:s}=e,l=r[0];if(r.length>1&&(l=function(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.containsPixel(t))return r}return e[0]}((null===n||void 0===n?void 0:n.pickedViewports)||r,{x:o,y:a})),l){const e=[o-l.x,a-l.y];void 0!==s&&(e[2]=s),t=l.unproject(e)}return{color:null,layer:null,viewport:l,index:-1,picked:!1,x:o,y:a,pixel:[o,a],coordinate:t,devicePixel:n&&"pickedX"in n?[n.pickedX,n.pickedY]:void 0,pixelRatio:i}}function Ue(e){const{pickInfo:t,lastPickedInfo:n,mode:r,layers:i}=e,{pickedColor:o,pickedLayer:a,pickedObjectIndex:s}=t,l=a?[a]:[];if("hover"===r){const e=n.index,t=n.layerId,r=a?a.props.id:null;if(r!==t||s!==e){if(r!==t){const e=i.find((e=>e.props.id===t));e&&l.unshift(e)}n.layerId=r,n.index=s,n.info=null}}const c=ze(e),u=new Map;return u.set(null,c),l.forEach((e=>{let t={...c};e===a&&(t.color=o,t.index=s,t.picked=!0),t=He({layer:e,info:t,mode:r});const i=t.layer;e===a&&"hover"===r&&(n.info=t),u.set(i.id,t),"hover"===r&&i.updateAutoHighlight(t)})),u}function He(e){let{layer:t,info:n,mode:r}=e;for(;t&&n;){const e=n.layer||null;n.sourceLayer=e,n.layer=t,n=t.getPickingInfo({info:n,mode:r,sourceLayer:e}),t=t.parent}return n}class Ve{constructor(e){(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"pickingFBO",void 0),(0,r.Z)(this,"depthFBO",void 0),(0,r.Z)(this,"pickLayersPass",void 0),(0,r.Z)(this,"layerFilter",void 0),(0,r.Z)(this,"lastPickedInfo",void 0),(0,r.Z)(this,"_pickable",!0),this.gl=e,this.pickLayersPass=new Ne(e),this.lastPickedInfo={index:-1,layerId:null,info:null}}setProps(e){"layerFilter"in e&&(this.layerFilter=e.layerFilter),"_pickable"in e&&(this._pickable=e._pickable)}finalize(){this.pickingFBO&&this.pickingFBO.delete(),this.depthFBO&&(this.depthFBO.color.delete(),this.depthFBO.delete())}pickObject(e){return this._pickClosestObject(e)}pickObjects(e){return this._pickVisibleObjects(e)}getLastPickedObject(e){let{x:t,y:n,layers:r,viewports:i}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.lastPickedInfo.info;const a=o&&o.layer&&o.layer.id,s=o&&o.viewport&&o.viewport.id,l=a?r.find((e=>e.id===a)):null,c=s&&i.find((e=>e.id===s))||i[0],u=c&&c.unproject([t-c.x,n-c.y]),d={x:t,y:n,viewport:c,coordinate:u,layer:l};return{...o,...d}}_resizeBuffer(){var e,t;const{gl:n}=this;if(!this.pickingFBO&&(this.pickingFBO=new ve.Z(n),ve.Z.isSupported(n,{colorBufferFloat:!0}))){const e=new ve.Z(n);e.attach({36064:new re.Z(n,{format:(0,Ae.D0)(n)?34836:6408,type:5126})}),this.depthFBO=e}null===(e=this.pickingFBO)||void 0===e||e.resize({width:n.canvas.width,height:n.canvas.height}),null===(t=this.depthFBO)||void 0===t||t.resize({width:n.canvas.width,height:n.canvas.height})}_getPickable(e){if(!1===this._pickable)return null;const t=e.filter((e=>this.pickLayersPass.shouldDrawLayer(e)&&!e.isComposite));return t.length?t:null}_pickClosestObject(e){let{layers:t,views:n,viewports:r,x:i,y:o,radius:a=0,depth:s=1,mode:l="query",unproject3D:c,onViewportActive:u,effects:d}=e;const f=this._getPickable(t),h=(0,Ae.w)(this.gl);if(!f)return{result:[],emptyInfo:ze({viewports:r,x:i,y:o,pixelRatio:h})};this._resizeBuffer();const p=(0,Ae.JY)(this.gl,[i,o],!0),g=[p.x+Math.floor(p.width/2),p.y+Math.floor(p.height/2)],m=Math.round(a*h),{width:v,height:A}=this.pickingFBO,y=this._getPickingRect({deviceX:g[0],deviceY:g[1],deviceRadius:m,deviceWidth:v,deviceHeight:A}),b={x:i-a,y:o-a,width:2*a+1,height:2*a+1};let _;const w=[],x=new Set;for(let E=0;E=0){const e=t.slice(i,i+4),o=e.join(",");if(!r.has(o)){const t=n(e);t?r.set(o,{...t,color:e}):l.Z.error("Picked non-existent layer. Is picking buffer corrupt?")()}}return Array.from(r.values())}(this._drawAndSample({layers:h,views:n,viewports:r,onViewportActive:d,deviceRect:_,cullRect:{x:i,y:o,width:a,height:s},effects:f,pass:"picking:".concat(c)})),x=new Map,E=Number.isFinite(u);for(let l=0;l=u);l++){const e=w[l];let t={color:e.pickedColor,layer:null,index:e.pickedObjectIndex,picked:!0,x:i,y:o,pixelRatio:p};t=He({layer:e.pickedLayer,info:t,mode:c}),x.has(t.object)||x.set(t.object,t)}return Array.from(x.values())}_drawAndSample(e){let{layers:t,views:n,viewports:r,onViewportActive:i,deviceRect:o,cullRect:a,effects:s,pass:l}=e,c=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const u=c?this.depthFBO:this.pickingFBO,d={layers:t,layerFilter:this.layerFilter,views:n,viewports:r,onViewportActive:i,pickingFBO:u,deviceRect:o,cullRect:a,effects:s,pass:l,pickZ:c,preRenderStats:{}};for(const A of s)A.useInPicking&&(d.preRenderStats[A.id]=A.preRender(this.gl,d));const{decodePickingColor:f}=this.pickLayersPass.render(d),{x:h,y:p,width:g,height:m}=o,v=new(c?Float32Array:Uint8Array)(g*m*4);return(0,je.z6)(u,{sourceX:h,sourceY:p,sourceWidth:g,sourceHeight:m,target:v}),{pickedColors:v,decodePickingColor:f}}_getPickingRect(e){let{deviceX:t,deviceY:n,deviceRadius:r,deviceWidth:i,deviceHeight:o}=e;const a=Math.max(0,t-r),s=Math.max(0,n-r),l=Math.min(i,t+r+1)-a,c=Math.min(o,n+r+1)-s;return l<=0||c<=0?null:{x:a,y:s,width:l,height:c}}}const We={zIndex:"1",position:"absolute",pointerEvents:"none",color:"#a0a7b4",backgroundColor:"#29323c",padding:"10px",top:"0",left:"0",display:"none"};class Ge{constructor(e){(0,r.Z)(this,"el",null),(0,r.Z)(this,"isVisible",!1);const t=e.parentElement;t&&(this.el=document.createElement("div"),this.el.className="deck-tooltip",Object.assign(this.el.style,We),t.appendChild(this.el))}setTooltip(e,t,n){const r=this.el;if(r){if("string"===typeof e)r.innerText=e;else{if(!e)return this.isVisible=!1,void(r.style.display="none");e.text&&(r.innerText=e.text),e.html&&(r.innerHTML=e.html),e.className&&(r.className=e.className),Object.assign(r.style,e.style)}this.isVisible=!0,r.style.display="block",r.style.transform="translate(".concat(t,"px, ").concat(n,"px)")}}remove(){this.el&&(this.el.remove(),this.el=null)}}var Ke=n(10468),qe=n(44219);var Ye=n(69088),Xe=n(69113);const{_parseImageNode:$e}=globalThis,Qe="undefined"!==typeof Image,Je="undefined"!==typeof ImageBitmap,et=Boolean($e),tt=!!Xe.jU||et;function nt(e){const t=it(e);if(!t)throw new Error("Not an image");return t}function rt(e){switch(nt(e)){case"data":return e;case"image":case"imagebitmap":const t=document.createElement("canvas"),n=t.getContext("2d");if(!n)throw new Error("getImageData");return t.width=e.width,t.height=e.height,n.drawImage(e,0,0),n.getImageData(0,0,e.width,e.height);default:throw new Error("getImageData")}}function it(e){return"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?"imagebitmap":"undefined"!==typeof Image&&e instanceof Image?"image":e&&"object"===typeof e&&e.data&&e.width&&e.height?"data":null}const ot=/^data:image\/svg\+xml/,at=/\.svg((\?|#).*)?$/;function st(e){return e&&(ot.test(e)||at.test(e))}function lt(e,t){if(st(t))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(e)])}async function ct(e,t,n){const r=function(e,t){if(st(t)){let t=(new TextDecoder).decode(e);try{"function"===typeof unescape&&"function"===typeof encodeURIComponent&&(t=unescape(encodeURIComponent(t)))}catch(n){throw new Error(n.message)}return"data:image/svg+xml;base64,".concat(btoa(t))}return lt(e,t)}(e,n),i=self.URL||self.webkitURL,o="string"!==typeof r&&i.createObjectURL(r);try{return await async function(e,t){const n=new Image;if(n.src=e,t.image&&t.image.decode&&n.decode)return await n.decode(),n;return await new Promise(((t,r)=>{try{n.onload=()=>t(n),n.onerror=t=>r(new Error("Could not load image ".concat(e,": ").concat(t)))}catch(i){r(i)}}))}(o||r,t)}finally{o&&i.revokeObjectURL(o)}}const ut={};let dt=!0;async function ft(e,t,n){let r;if(st(n)){r=await ct(e,t,n)}else r=lt(e,n);const i=t&&t.imagebitmap;return await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e){for(const t in e||ut)return!1;return!0}(t)&&dt||(t=null);if(t)try{return await createImageBitmap(e,t)}catch(n){console.warn(n),dt=!1}return await createImageBitmap(e)}(r,i)}const ht=!1,pt=!0;function gt(e){const t=mt(e);return function(e){const t=mt(e),n=t.byteLength>=24&&2303741511===t.getUint32(0,ht);if(!n)return null;return{mimeType:"image/png",width:t.getUint32(16,ht),height:t.getUint32(20,ht)}}(t)||function(e){const t=mt(e),n=t.byteLength>=3&&65496===t.getUint16(0,ht)&&255===t.getUint8(2);if(!n)return null;const{tableMarkers:r,sofMarkers:i}=function(){const e=new Set([65499,65476,65484,65501,65534]);for(let n=65504;n<65520;++n)e.add(n);const t=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:t}}();let o=2;for(;o+9=10&&1195984440===t.getUint32(0,ht);if(!n)return null;return{mimeType:"image/gif",width:t.getUint16(6,pt),height:t.getUint16(8,pt)}}(t)||function(e){const t=mt(e),n=t.byteLength>=14&&16973===t.getUint16(0,ht)&&t.getUint32(2,pt)===t.byteLength;if(!n)return null;return{mimeType:"image/bmp",width:t.getUint32(18,pt),height:t.getUint32(22,pt)}}(t)}function mt(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}const vt={id:"image",module:"images",name:"Images",version:"3.3.3",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(e,t,n){const r=((t=t||{}).image||{}).type||"auto",{url:i}=n||{};let o;switch(function(e){switch(e){case"auto":case"data":return function(){if(Je)return"imagebitmap";if(Qe)return"image";if(tt)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(e){switch(e){case"auto":return Je||Qe||tt;case"imagebitmap":return Je;case"image":return Qe;case"data":return tt;default:throw new Error("@loaders.gl/images: image ".concat(e," not supported in this environment"))}}(e),e}}(r)){case"imagebitmap":o=await ft(e,t,i);break;case"image":o=await ct(e,t,i);break;case"data":o=await async function(e,t){const{mimeType:n}=gt(e)||{},r=globalThis._parseImageNode;return(0,Ye.h)(r),await r(e,n)}(e);break;default:(0,Ye.h)(!1)}return"data"===r&&(o=rt(o)),o},tests:[e=>Boolean(gt(new DataView(e)))],options:{image:{type:"auto",decode:!0}}};const At={id:"JSON",name:"JSON",module:"",version:"",options:{},extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:function(e){const t=e[0],n=e[e.length-1];return"{"===t&&"}"===n||"["===t&&"]"===n},parseTextSync:JSON.parse};const yt=function(){const e="8.9.7",t=globalThis.deck&&globalThis.deck.VERSION;if(t&&t!==e)throw new Error("deck.gl - multiple versions detected: ".concat(t," vs ").concat(e));return t||(l.Z.log(1,"deck.gl ".concat(e))(),globalThis.deck={...globalThis.deck,VERSION:e,version:e,log:l.Z,_registerLoggers:c.z},(0,qe.fh)([At,[vt,{imagebitmap:{premultiplyAlpha:"none"}}]])),e}();var bt=n(21748),_t=n(53886),wt=n(59661),xt=n(1112),Et=n(6509),St=n(87966);class Ct extends xt.Z{get[Symbol.toStringTag](){return"Query"}static isSupported(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(0,Ae.D0)(e),r=(0,Et.ag)(e,St.h.TIMER_QUERY);let i=n||r;for(const o of t)switch(o){case"queries":i=i&&n;break;case"timers":i=i&&r;break;default:(0,wt.h)(!1)}return i}constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.target=null,this._queryPending=!1,this._pollingPromise=null,Object.seal(this)}beginTimeElapsedQuery(){return this.begin(35007)}beginOcclusionQuery(){let{conservative:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.begin(e?36202:35887)}beginTransformFeedbackQuery(){return this.begin(35976)}begin(e){return this._queryPending||(this.target=e,this.gl2.beginQuery(this.target,this.handle)),this}end(){return this._queryPending||this.target&&(this.gl2.endQuery(this.target),this.target=null,this._queryPending=!0),this}isResultAvailable(){if(!this._queryPending)return!1;const e=this.gl2.getQueryParameter(this.handle,34919);return e&&(this._queryPending=!1),e}isTimerDisjoint(){return this.gl2.getParameter(36795)}getResult(){return this.gl2.getQueryParameter(this.handle,34918)}getTimerMilliseconds(){return this.getResult()/1e6}createPoll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;if(this._pollingPromise)return this._pollingPromise;let t=0;return this._pollingPromise=new Promise(((n,r)=>{const i=()=>{this.isResultAvailable()?(n(this.getResult()),this._pollingPromise=null):t++>e?(r("Timed out"),this._pollingPromise=null):requestAnimationFrame(i)};requestAnimationFrame(i)})),this._pollingPromise}_createHandle(){return Ct.isSupported(this.gl)?this.gl2.createQuery():null}_deleteHandle(){this.gl2.deleteQuery(this.handle)}}const Pt=(0,n(89258).Z)()&&"undefined"!==typeof document;let Tt=0;class kt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{onCreateContext:t=(e=>(0,Ae.s9)(e)),onAddHTML:n=null,onInitialize:r=(()=>{}),onRender:i=(()=>{}),onFinalize:o=(()=>{}),onError:a,gl:s=null,glOptions:l={},debug:c=!1,createFramebuffer:u=!1,autoResizeViewport:d=!0,autoResizeDrawingBuffer:f=!0,stats:h=_t.lR.get("animation-loop-".concat(Tt++))}=e;let{useDevicePixels:p=!0}=e;"useDevicePixelRatio"in e&&(Ae.cM.deprecated("useDevicePixelRatio","useDevicePixels")(),p=e.useDevicePixelRatio),this.props={onCreateContext:t,onAddHTML:n,onInitialize:r,onRender:i,onFinalize:o,onError:a,gl:s,glOptions:l,debug:c,createFramebuffer:u},this.gl=s,this.needsRedraw=null,this.timeline=null,this.stats=h,this.cpuTime=this.stats.get("CPU Time"),this.gpuTime=this.stats.get("GPU Time"),this.frameRate=this.stats.get("Frame Rate"),this._initialized=!1,this._running=!1,this._animationFrameId=null,this._nextFramePromise=null,this._resolveNextFrame=null,this._cpuStartTime=0,this.setProps({autoResizeViewport:d,autoResizeDrawingBuffer:f,useDevicePixels:p}),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this._pageLoadPromise=null,this._onMousemove=this._onMousemove.bind(this),this._onMouseleave=this._onMouseleave.bind(this)}delete(){this.stop(),this._setDisplay(null)}setNeedsRedraw(e){return(0,wt.h)("string"===typeof e),this.needsRedraw=this.needsRedraw||e,this}setProps(e){return"autoResizeViewport"in e&&(this.autoResizeViewport=e.autoResizeViewport),"autoResizeDrawingBuffer"in e&&(this.autoResizeDrawingBuffer=e.autoResizeDrawingBuffer),"useDevicePixels"in e&&(this.useDevicePixels=e.useDevicePixels),this}start(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._running)return this;this._running=!0;const t=this._getPageLoadPromise().then((()=>!this._running||this._initialized?null:(this._createWebGLContext(e),this._createFramebuffer(),this._startEventHandling(),this._initializeCallbackData(),this._updateCallbackData(),this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._gpuTimeQuery=Ct.isSupported(this.gl,["timers"])?new Ct(this.gl):null,this._initialized=!0,this.onInitialize(this.animationProps)))).then((e=>{this._running&&(this._addCallbackData(e||{}),!1!==e&&this._startLoop())}));return this.props.onError&&t.catch(this.props.onError),this}redraw(){return this.isContextLost()||(this._beginTimers(),this._setupFrame(),this._updateCallbackData(),this._renderFrame(this.animationProps),this._clearNeedsRedraw(),this.offScreen&&this.gl.commit&&this.gl.commit(),this._resolveNextFrame&&(this._resolveNextFrame(this),this._nextFramePromise=null,this._resolveNextFrame=null),this._endTimers()),this}stop(){return this._running&&(this._finalizeCallbackData(),this._cancelAnimationFrame(this._animationFrameId),this._nextFramePromise=null,this._resolveNextFrame=null,this._animationFrameId=null,this._running=!1),this}attachTimeline(e){return this.timeline=e,this.timeline}detachTimeline(){this.timeline=null}waitForRender(){return this.setNeedsRedraw("waitForRender"),this._nextFramePromise||(this._nextFramePromise=new Promise((e=>{this._resolveNextFrame=e}))),this._nextFramePromise}async toDataURL(){return this.setNeedsRedraw("toDataURL"),await this.waitForRender(),this.gl.canvas.toDataURL()}isContextLost(){return this.gl.isContextLost()}onCreateContext(){return this.props.onCreateContext(...arguments)}onInitialize(){return this.props.onInitialize(...arguments)}onRender(){return this.props.onRender(...arguments)}onFinalize(){return this.props.onFinalize(...arguments)}getHTMLControlValue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=document.getElementById(e);return n?Number(n.value):t}setViewParameters(){return Ae.cM.removed("AnimationLoop.setViewParameters","AnimationLoop.setProps")(),this}_startLoop(){const e=()=>{this._running&&(this.redraw(),this._animationFrameId=this._requestAnimationFrame(e))};this._cancelAnimationFrame(this._animationFrameId),this._animationFrameId=this._requestAnimationFrame(e)}_getPageLoadPromise(){return this._pageLoadPromise||(this._pageLoadPromise=Pt?new Promise(((e,t)=>{Pt&&"complete"===document.readyState?e(document):window.addEventListener("load",(()=>{e(document)}))})):Promise.resolve({})),this._pageLoadPromise}_setDisplay(e){this.display&&(this.display.delete(),this.display.animationLoop=null),e&&(e.animationLoop=this),this.display=e}_cancelAnimationFrame(e){return this.display&&this.display.cancelAnimationFrame?this.display.cancelAnimationFrame(e):(t=e,"undefined"!==typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame(t):clearTimeout(t));var t}_requestAnimationFrame(e){if(this._running)return this.display&&this.display.requestAnimationFrame?this.display.requestAnimationFrame(e):(t=e,"undefined"!==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(t):setTimeout(t,1e3/60));var t}_renderFrame(){this.display?this.display._renderFrame(...arguments):this.onRender(...arguments)}_clearNeedsRedraw(){this.needsRedraw=null}_setupFrame(){this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._resizeFramebuffer()}_initializeCallbackData(){this.animationProps={gl:this.gl,stop:this.stop,canvas:this.gl.canvas,framebuffer:this.framebuffer,useDevicePixels:this.useDevicePixels,needsRedraw:null,startTime:Date.now(),engineTime:0,tick:0,tock:0,time:0,_timeline:this.timeline,_loop:this,_animationLoop:this,_mousePosition:null}}_updateCallbackData(){const{width:e,height:t,aspect:n}=this._getSizeAndAspect();e===this.animationProps.width&&t===this.animationProps.height||this.setNeedsRedraw("drawing buffer resized"),n!==this.animationProps.aspect&&this.setNeedsRedraw("drawing buffer aspect changed"),this.animationProps.width=e,this.animationProps.height=t,this.animationProps.aspect=n,this.animationProps.needsRedraw=this.needsRedraw,this.animationProps.engineTime=Date.now()-this.animationProps.startTime,this.timeline&&this.timeline.update(this.animationProps.engineTime),this.animationProps.tick=Math.floor(this.animationProps.time/1e3*60),this.animationProps.tock++,this.animationProps.time=this.timeline?this.timeline.getTime():this.animationProps.engineTime,this.animationProps._offScreen=this.offScreen}_finalizeCallbackData(){this.onFinalize(this.animationProps)}_addCallbackData(e){"object"===typeof e&&null!==e&&(this.animationProps=Object.assign({},this.animationProps,e))}_createWebGLContext(e){if(this.offScreen=e.canvas&&"undefined"!==typeof OffscreenCanvas&&e.canvas instanceof OffscreenCanvas,e=Object.assign({},e,this.props.glOptions),this.gl=this.props.gl?(0,Ae.yW)(this.props.gl,e):this.onCreateContext(e),!(0,Ae.UF)(this.gl))throw new Error("AnimationLoop.onCreateContext - illegal context returned");(0,Ae.kL)(this.gl),this._createInfoDiv()}_createInfoDiv(){if(this.gl.canvas&&this.props.onAddHTML){const e=document.createElement("div");document.body.appendChild(e),e.style.position="relative";const t=document.createElement("div");t.style.position="absolute",t.style.left="10px",t.style.bottom="10px",t.style.width="300px",t.style.background="white",e.appendChild(this.gl.canvas),e.appendChild(t);const n=this.props.onAddHTML(t);n&&(t.innerHTML=n)}}_getSizeAndAspect(){const e=this.gl.drawingBufferWidth,t=this.gl.drawingBufferHeight;let n=1;const{canvas:r}=this.gl;return r&&r.clientHeight?n=r.clientWidth/r.clientHeight:e>0&&t>0&&(n=e/t),{width:e,height:t,aspect:n}}_resizeViewport(){this.autoResizeViewport&&this.gl.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}_resizeCanvasDrawingBuffer(){this.autoResizeDrawingBuffer&&(0,Ae.aQ)(this.gl,{useDevicePixels:this.useDevicePixels})}_createFramebuffer(){this.props.createFramebuffer&&(this.framebuffer=new ve.Z(this.gl))}_resizeFramebuffer(){this.framebuffer&&this.framebuffer.resize({width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight})}_beginTimers(){this.frameRate.timeEnd(),this.frameRate.timeStart(),this._gpuTimeQuery&&this._gpuTimeQuery.isResultAvailable()&&!this._gpuTimeQuery.isTimerDisjoint()&&this.stats.get("GPU Time").addTime(this._gpuTimeQuery.getTimerMilliseconds()),this._gpuTimeQuery&&this._gpuTimeQuery.beginTimeElapsedQuery(),this.cpuTime.timeStart()}_endTimers(){this.cpuTime.timeEnd(),this._gpuTimeQuery&&this._gpuTimeQuery.end()}_startEventHandling(){const{canvas:e}=this.gl;e&&(e.addEventListener("mousemove",this._onMousemove),e.addEventListener("mouseleave",this._onMouseleave))}_onMousemove(e){this.animationProps._mousePosition=[e.offsetX,e.offsetY]}_onMouseleave(e){this.animationProps._mousePosition=null}}var Mt=n(37283);const Rt={mousedown:1,mousemove:2,mouseup:4};!function(e){const t=e.prototype.handler;e.prototype.handler=function(e){const n=this.store;e.button>0&&"pointerdown"===e.type&&(function(e,t){for(let n=0;nt.pointerId===e.pointerId))||n.push(e)),t.call(this,e)}}(Mt.PointerEventInput),Mt.MouseInput.prototype.handler=function(e){let t=Rt[e.type];1&t&&e.button>=0&&(this.pressed=!0),2&t&&0===e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))};const Ot=Mt.Manager,It=Mt;class Lt{constructor(e,t,n){this.element=e,this.callback=t,this.options={enable:!0,...n}}}const Nt=It?[[It.Pan,{event:"tripan",pointers:3,threshold:0,enable:!1}],[It.Rotate,{enable:!1}],[It.Pinch,{enable:!1}],[It.Swipe,{enable:!1}],[It.Pan,{threshold:0,enable:!1}],[It.Press,{enable:!1}],[It.Tap,{event:"doubletap",taps:2,enable:!1}],[It.Tap,{event:"anytap",enable:!1}],[It.Tap,{enable:!1}]]:null,Dt={tripan:["rotate","pinch","pan"],rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},Ft={doubletap:["tap"]},jt={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},Bt={KEY_EVENTS:["keydown","keyup"],MOUSE_EVENTS:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],WHEEL_EVENTS:["wheel","mousewheel"]},Zt={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",tripan:"tripan",tripanstart:"tripan",tripanmove:"tripan",tripanup:"tripan",tripandown:"tripan",tripanleft:"tripan",tripanright:"tripan",tripanend:"tripan",tripancancel:"tripan",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},zt={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},Ut="undefined"!==typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",Ht="undefined"!==typeof window?window:n.g;"undefined"!==typeof n.g?n.g:window,"undefined"!==typeof document&&document;let Vt=!1;try{const e={get passive(){return Vt=!0,!0}};Ht.addEventListener("test",null,e),Ht.removeEventListener("test",null)}catch(bn){Vt=!1}const Wt=-1!==Ut.indexOf("firefox"),{WHEEL_EVENTS:Gt}=Bt,Kt="wheel",qt=4.000244140625;class Yt extends Lt{constructor(e,t,n){super(e,t,n),this.handleEvent=e=>{if(!this.options.enable)return;let t=e.deltaY;Ht.WheelEvent&&(Wt&&e.deltaMode===Ht.WheelEvent.DOM_DELTA_PIXEL&&(t/=Ht.devicePixelRatio),e.deltaMode===Ht.WheelEvent.DOM_DELTA_LINE&&(t*=40)),0!==t&&t%qt===0&&(t=Math.floor(t/qt)),e.shiftKey&&t&&(t*=.25),this.callback({type:Kt,center:{x:e.clientX,y:e.clientY},delta:-t,srcEvent:e,pointerType:"mouse",target:e.target})},this.events=(this.options.events||[]).concat(Gt),this.events.forEach((t=>e.addEventListener(t,this.handleEvent,!!Vt&&{passive:!1})))}destroy(){this.events.forEach((e=>this.element.removeEventListener(e,this.handleEvent)))}enableEventType(e,t){e===Kt&&(this.options.enable=t)}}const{MOUSE_EVENTS:Xt}=Bt,$t="pointermove",Qt="pointerover",Jt="pointerout",en="pointerenter",tn="pointerleave";class nn extends Lt{constructor(e,t,n){super(e,t,n),this.handleEvent=e=>{this.handleOverEvent(e),this.handleOutEvent(e),this.handleEnterEvent(e),this.handleLeaveEvent(e),this.handleMoveEvent(e)},this.pressed=!1;const{enable:r}=this.options;this.enableMoveEvent=r,this.enableLeaveEvent=r,this.enableEnterEvent=r,this.enableOutEvent=r,this.enableOverEvent=r,this.events=(this.options.events||[]).concat(Xt),this.events.forEach((t=>e.addEventListener(t,this.handleEvent)))}destroy(){this.events.forEach((e=>this.element.removeEventListener(e,this.handleEvent)))}enableEventType(e,t){e===$t&&(this.enableMoveEvent=t),e===Qt&&(this.enableOverEvent=t),e===Jt&&(this.enableOutEvent=t),e===en&&(this.enableEnterEvent=t),e===tn&&(this.enableLeaveEvent=t)}handleOverEvent(e){this.enableOverEvent&&"mouseover"===e.type&&this._emit(Qt,e)}handleOutEvent(e){this.enableOutEvent&&"mouseout"===e.type&&this._emit(Jt,e)}handleEnterEvent(e){this.enableEnterEvent&&"mouseenter"===e.type&&this._emit(en,e)}handleLeaveEvent(e){this.enableLeaveEvent&&"mouseleave"===e.type&&this._emit(tn,e)}handleMoveEvent(e){if(this.enableMoveEvent)switch(e.type){case"mousedown":e.button>=0&&(this.pressed=!0);break;case"mousemove":0===e.which&&(this.pressed=!1),this.pressed||this._emit($t,e);break;case"mouseup":this.pressed=!1}}_emit(e,t){this.callback({type:e,center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})}}const{KEY_EVENTS:rn}=Bt,on="keydown",an="keyup";class sn extends Lt{constructor(e,t,n){super(e,t,n),this.handleEvent=e=>{const t=e.target||e.srcElement;"INPUT"===t.tagName&&"text"===t.type||"TEXTAREA"===t.tagName||(this.enableDownEvent&&"keydown"===e.type&&this.callback({type:on,srcEvent:e,key:e.key,target:e.target}),this.enableUpEvent&&"keyup"===e.type&&this.callback({type:an,srcEvent:e,key:e.key,target:e.target}))},this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=(this.options.events||[]).concat(rn),e.tabIndex=this.options.tabIndex||0,e.style.outline="none",this.events.forEach((t=>e.addEventListener(t,this.handleEvent)))}destroy(){this.events.forEach((e=>this.element.removeEventListener(e,this.handleEvent)))}enableEventType(e,t){e===on&&(this.enableDownEvent=t),e===an&&(this.enableUpEvent=t)}}const ln="contextmenu";class cn extends Lt{constructor(e,t,n){super(e,t,n),this.handleEvent=e=>{this.options.enable&&this.callback({type:ln,center:{x:e.clientX,y:e.clientY},srcEvent:e,pointerType:"mouse",target:e.target})},e.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(e,t){e===ln&&(this.options.enable=t)}}const un={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4};function dn(e){const t=un[e.srcEvent.type];if(!t)return null;const{buttons:n,button:r,which:i}=e.srcEvent;let o=!1,a=!1,s=!1;return 4===t||2===t&&!Number.isFinite(n)?(o=1===i,a=2===i,s=3===i):2===t?(o=Boolean(1&n),a=Boolean(4&n),s=Boolean(2&n)):1===t&&(o=0===r,a=1===r,s=2===r),{leftButton:o,middleButton:a,rightButton:s}}function fn(e,t){const n=e.center;if(!n)return null;const r=t.getBoundingClientRect(),i=r.width/t.offsetWidth||1,o=r.height/t.offsetHeight||1;return{center:n,offsetCenter:{x:(n.x-r.left-t.clientLeft)/i,y:(n.y-r.top-t.clientTop)/o}}}const hn={srcElement:"root",priority:0};class pn{constructor(e){this.handleEvent=e=>{if(this.isEmpty())return;const t=this._normalizeEvent(e);let n=e.srcEvent.target;for(;n&&n!==t.rootElement;){if(this._emit(t,n),t.handled)return;n=n.parentNode}this._emit(t,"root")},this.eventManager=e,this.handlers=[],this.handlersByElement=new Map,this._active=!1}isEmpty(){return!this._active}add(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{handlers:o,handlersByElement:a}=this;let s=hn;"string"===typeof n||n&&n.addEventListener?s={...hn,srcElement:n}:n&&(s={...hn,...n});let l=a.get(s.srcElement);l||(l=[],a.set(s.srcElement,l));const c={type:e,handler:t,srcElement:s.srcElement,priority:s.priority};r&&(c.once=!0),i&&(c.passive=!0),o.push(c),this._active=this._active||!c.passive;let u=l.length-1;for(;u>=0&&!(l[u].priority>=c.priority);)u--;l.splice(u+1,0,c)}remove(e,t){const{handlers:n,handlersByElement:r}=this;for(let i=n.length-1;i>=0;i--){const o=n[i];if(o.type===e&&o.handler===t){n.splice(i,1);const e=r.get(o.srcElement);e.splice(e.indexOf(o),1),0===e.length&&r.delete(o.srcElement)}}this._active=n.some((e=>!e.passive))}_emit(e,t){const n=this.handlersByElement.get(t);if(n){let t=!1;const r=()=>{e.handled=!0},i=()=>{e.handled=!0,t=!0},o=[];for(let a=0;a{e.srcEvent.preventDefault()},stopImmediatePropagation:null,stopPropagation:null,handled:!1,rootElement:t}}}const gn={events:null,recognizers:null,recognizerOptions:{},Manager:Ot,touchAction:"none",tabIndex:0};class mn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;this._onBasicInput=e=>{const{srcEvent:t}=e,n=jt[t.type];n&&this.manager.emit(n,e)},this._onOtherEvent=e=>{this.manager.emit(e.type,e)},this.options={...gn,...t},this.events=new Map,this.setElement(e);const{events:n}=this.options;n&&this.on(n)}getElement(){return this.element}setElement(e){if(this.element&&this.destroy(),this.element=e,!e)return;const{options:t}=this,n=t.Manager;this.manager=new n(e,{touchAction:t.touchAction,recognizers:t.recognizers||Nt}).on("hammer.input",this._onBasicInput),t.recognizers||Object.keys(Dt).forEach((e=>{const t=this.manager.get(e);t&&Dt[e].forEach((e=>{t.recognizeWith(e)}))}));for(const r in t.recognizerOptions){const e=this.manager.get(r);if(e){const n=t.recognizerOptions[r];delete n.enable,e.set(n)}}this.wheelInput=new Yt(e,this._onOtherEvent,{enable:!1}),this.moveInput=new nn(e,this._onOtherEvent,{enable:!1}),this.keyInput=new sn(e,this._onOtherEvent,{enable:!1,tabIndex:t.tabIndex}),this.contextmenuInput=new cn(e,this._onOtherEvent,{enable:!1});for(const[r,i]of this.events)i.isEmpty()||(this._toggleRecognizer(i.recognizerName,!0),this.manager.on(r,i.handleEvent))}destroy(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}on(e,t,n){this._addEventHandler(e,t,n,!1)}once(e,t,n){this._addEventHandler(e,t,n,!0)}watch(e,t,n){this._addEventHandler(e,t,n,!1,!0)}off(e,t){this._removeEventHandler(e,t)}_toggleRecognizer(e,t){const{manager:n}=this;if(!n)return;const r=n.get(e);if(r&&r.options.enable!==t){r.set({enable:t});const i=Ft[e];i&&!this.options.recognizers&&i.forEach((i=>{const o=n.get(i);t?(o.requireFailure(e),r.dropRequireFailure(i)):o.dropRequireFailure(e)}))}this.wheelInput.enableEventType(e,t),this.moveInput.enableEventType(e,t),this.keyInput.enableEventType(e,t),this.contextmenuInput.enableEventType(e,t)}_addEventHandler(e,t,n,r,i){if("string"!==typeof e){n=t;for(const t in e)this._addEventHandler(t,e[t],n,r,i);return}const{manager:o,events:a}=this,s=zt[e]||e;let l=a.get(s);l||(l=new pn(this),a.set(s,l),l.recognizerName=Zt[s]||s,o&&o.on(s,l.handleEvent)),l.add(e,t,n,r,i),l.isEmpty()||this._toggleRecognizer(l.recognizerName,!0)}_removeEventHandler(e,t){if("string"!==typeof e){for(const t in e)this._removeEventHandler(t,e[t]);return}const{events:n}=this,r=zt[e]||e,i=n.get(r);if(i&&(i.remove(e,t),i.isEmpty())){const{recognizerName:e}=i;let t=!1;for(const r of n.values())if(r.recognizerName===e&&!r.isEmpty()){t=!0;break}t||this._toggleRecognizer(e,!1)}}}function vn(){}const An={id:"",width:"100%",height:"100%",style:null,viewState:null,initialViewState:null,pickingRadius:0,layerFilter:null,glOptions:{},parameters:{},parent:null,gl:null,canvas:null,layers:[],effects:[],views:null,controller:null,useDevicePixels:!0,touchAction:"none",eventRecognizerOptions:{},_framebuffer:null,_animate:!1,_pickable:!0,_typedArrayManagerProps:{},_customRender:null,onWebGLInitialized:vn,onResize:vn,onViewStateChange:vn,onInteractionStateChange:vn,onBeforeRender:vn,onAfterRender:vn,onLoad:vn,onError:e=>l.Z.error(e.message)(),onHover:null,onClick:null,onDragStart:null,onDrag:null,onDragEnd:null,_onMetrics:null,getCursor:e=>{let{isDragging:t}=e;return t?"grabbing":"grab"},getTooltip:null,debug:!1,drawPickingColors:!1};class yn{constructor(e){(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"width",0),(0,r.Z)(this,"height",0),(0,r.Z)(this,"userData",{}),(0,r.Z)(this,"canvas",null),(0,r.Z)(this,"viewManager",null),(0,r.Z)(this,"layerManager",null),(0,r.Z)(this,"effectManager",null),(0,r.Z)(this,"deckRenderer",null),(0,r.Z)(this,"deckPicker",null),(0,r.Z)(this,"eventManager",null),(0,r.Z)(this,"tooltip",null),(0,r.Z)(this,"metrics",void 0),(0,r.Z)(this,"animationLoop",void 0),(0,r.Z)(this,"stats",void 0),(0,r.Z)(this,"viewState",void 0),(0,r.Z)(this,"cursorState",void 0),(0,r.Z)(this,"_needsRedraw",void 0),(0,r.Z)(this,"_pickRequest",void 0),(0,r.Z)(this,"_lastPointerDownInfo",null),(0,r.Z)(this,"_metricsCounter",void 0),(0,r.Z)(this,"_onPointerMove",(e=>{const{_pickRequest:t}=this;if("pointerleave"===e.type)t.x=-1,t.y=-1,t.radius=0;else{if(e.leftButton||e.rightButton)return;{const n=e.offsetCenter;if(!n)return;t.x=n.x,t.y=n.y,t.radius=this.props.pickingRadius}}this.layerManager&&(this.layerManager.context.mousePosition={x:t.x,y:t.y}),t.event=e})),(0,r.Z)(this,"_onEvent",(e=>{const t=be.FP[e.type],n=e.offsetCenter;if(!t||!n||!this.layerManager)return;const r=this.layerManager.getLayers(),i=this.deckPicker.getLastPickedObject({x:n.x,y:n.y,layers:r,viewports:this.getViewports(n)},this._lastPointerDownInfo),{layer:o}=i,a=o&&(o[t.handler]||o.props[t.handler]),s=this.props[t.handler];let l=!1;a&&(l=a.call(o,i,e)),!l&&s&&s(i,e)})),(0,r.Z)(this,"_onPointerDown",(e=>{const t=e.offsetCenter,n=this._pick("pickObject","pickObject Time",{x:t.x,y:t.y,radius:this.props.pickingRadius});this._lastPointerDownInfo=n.result[0]||n.emptyInfo})),this.props={...An,...e},e=this.props,this._needsRedraw="Initial render",this._pickRequest={mode:"hover",x:-1,y:-1,radius:0,event:null},this.cursorState={isHovering:!1,isDragging:!1},e.viewState&&e.initialViewState&&l.Z.warn("View state tracking is disabled. Use either `initialViewState` for auto update or `viewState` for manual update.")(),"IE"===(0,bt.Z)()&&l.Z.warn("IE 11 is not supported")(),this.viewState=e.initialViewState,e.gl||"undefined"!==typeof document&&(this.canvas=this._createCanvas(e)),this.animationLoop=this._createAnimationLoop(e),this.stats=new d.Z({id:"deck.gl"}),this.metrics={fps:0,setPropsTime:0,updateAttributesTime:0,framesRedrawn:0,pickTime:0,pickCount:0,gpuTime:0,gpuTimePerFrame:0,cpuTime:0,cpuTimePerFrame:0,bufferMemory:0,textureMemory:0,renderbufferMemory:0,gpuMemory:0},this._metricsCounter=0,this.setProps(e),e._typedArrayManagerProps&&Ke.Z.setOptions(e._typedArrayManagerProps),this.animationLoop.start()}finalize(){var e,t,n,r,i,o,a,s;(this.animationLoop.stop(),this.animationLoop=null,this._lastPointerDownInfo=null,null===(e=this.layerManager)||void 0===e||e.finalize(),this.layerManager=null,null===(t=this.viewManager)||void 0===t||t.finalize(),this.viewManager=null,null===(n=this.effectManager)||void 0===n||n.finalize(),this.effectManager=null,null===(r=this.deckRenderer)||void 0===r||r.finalize(),this.deckRenderer=null,null===(i=this.deckPicker)||void 0===i||i.finalize(),this.deckPicker=null,null===(o=this.eventManager)||void 0===o||o.destroy(),this.eventManager=null,null===(a=this.tooltip)||void 0===a||a.remove(),this.tooltip=null,this.props.canvas||this.props.gl||!this.canvas)||(null===(s=this.canvas.parentElement)||void 0===s||s.removeChild(this.canvas),this.canvas=null)}setProps(e){this.stats.get("setProps Time").timeStart(),"onLayerHover"in e&&l.Z.removed("onLayerHover","onHover")(),"onLayerClick"in e&&l.Z.removed("onLayerClick","onClick")(),e.initialViewState&&!(0,w.v)(this.props.initialViewState,e.initialViewState,3)&&(this.viewState=e.initialViewState),Object.assign(this.props,e),this._setCanvasSize(this.props);const t=Object.create(this.props);Object.assign(t,{views:this._getViews(),width:this.width,height:this.height,viewState:this._getViewState()}),this.animationLoop.setProps(t),this.layerManager&&(this.viewManager.setProps(t),this.layerManager.activateViewport(this.getViewports()[0]),this.layerManager.setProps(t),this.effectManager.setProps(t),this.deckRenderer.setProps(t),this.deckPicker.setProps(t)),this.stats.get("setProps Time").timeEnd()}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};if(!this.layerManager)return!1;if(this.props._animate)return"Deck._animate";let t=this._needsRedraw;e.clearRedrawFlags&&(this._needsRedraw=!1);const n=this.viewManager.needsRedraw(e),r=this.layerManager.needsRedraw(e),i=this.effectManager.needsRedraw(e),o=this.deckRenderer.needsRedraw(e);return t=t||n||r||i||o,t}redraw(e){if(!this.layerManager)return;let t=this.needsRedraw({clearRedrawFlags:!0});t=e||t,t&&(this.stats.get("Redraw Count").incrementCount(),this.props._customRender?this.props._customRender(t):this._drawLayers(t))}get isInitialized(){return null!==this.viewManager}getViews(){return(0,P.Z)(this.viewManager),this.viewManager.views}getViewports(e){return(0,P.Z)(this.viewManager),this.viewManager.getViewports(e)}pickObject(e){const t=this._pick("pickObject","pickObject Time",e).result;return t.length?t[0]:null}pickMultipleObjects(e){return e.depth=e.depth||10,this._pick("pickObject","pickMultipleObjects Time",e).result}pickObjects(e){return this._pick("pickObjects","pickObjects Time",e)}_addResources(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(const n in e)this.layerManager.resourceManager.add({resourceId:n,data:e[n],forceUpdate:t})}_removeResources(e){for(const t of e)this.layerManager.resourceManager.remove(t)}_addDefaultEffect(e){this.effectManager.addDefaultEffect(e)}_pick(e,t,n){(0,P.Z)(this.deckPicker);const{stats:r}=this;r.get("Pick Count").incrementCount(),r.get(t).timeStart();const i=this.deckPicker[e]({layers:this.layerManager.getLayers(n),views:this.viewManager.getViews(),viewports:this.getViewports(n),onViewportActive:this.layerManager.activateViewport,effects:this.effectManager.getEffects(),...n});return r.get(t).timeEnd(),i}_createCanvas(e){let t=e.canvas;if("string"===typeof t&&(t=document.getElementById(t),(0,P.Z)(t)),!t){t=document.createElement("canvas"),t.id=e.id||"deckgl-overlay";(e.parent||document.body).appendChild(t)}return Object.assign(t.style,e.style),t}_setCanvasSize(e){if(!this.canvas)return;const{width:t,height:n}=e;if(t||0===t){const e=Number.isFinite(t)?"".concat(t,"px"):t;this.canvas.style.width=e}if(n||0===n){var r;const t=Number.isFinite(n)?"".concat(n,"px"):n;this.canvas.style.position=(null===(r=e.style)||void 0===r?void 0:r.position)||"absolute",this.canvas.style.height=t}}_updateCanvasSize(){const{canvas:e}=this;if(!e)return;const t=e.clientWidth||e.width,n=e.clientHeight||e.height;var r;t===this.width&&n===this.height||(this.width=t,this.height=n,null===(r=this.viewManager)||void 0===r||r.setProps({width:t,height:n}),this.props.onResize({width:t,height:n}))}_createAnimationLoop(e){const{width:t,height:n,gl:r,glOptions:i,debug:o,onError:a,onBeforeRender:s,onAfterRender:l,useDevicePixels:c}=e;return new kt({width:t,height:n,useDevicePixels:c,autoResizeViewport:!1,gl:r,onCreateContext:e=>(0,Ae.s9)({...i,...e,canvas:this.canvas,debug:o,onContextLost:()=>this._onContextLost()}),onInitialize:e=>this._setGLContext(e.gl),onRender:this._onRenderFrame.bind(this),onBeforeRender:s,onAfterRender:l,onError:a})}_getViewState(){return this.props.viewState||this.viewState}_getViews(){let e=this.props.views||[new ne({id:"default-view"})];return e=Array.isArray(e)?e:[e],e.length&&this.props.controller&&(e[0].props.controller=this.props.controller),e}_onContextLost(){const{onError:e}=this.props;this.animationLoop&&e&&e(new Error("WebGL context is lost"))}_pickAndCallback(){const{_pickRequest:e}=this;if(e.event){const{result:n,emptyInfo:r}=this._pick("pickObject","pickObject Time",e);this.cursorState.isHovering=n.length>0;let i=r,o=!1;for(const a of n){var t;i=a,o=(null===(t=a.layer)||void 0===t?void 0:t.onHover(a,e.event))||o}if(!o&&this.props.onHover&&this.props.onHover(i,e.event),this.props.getTooltip&&this.tooltip){const e=this.props.getTooltip(i);this.tooltip.setTooltip(e,i.x,i.y)}e.event=null}}_updateCursor(){const e=this.props.parent||this.canvas;e&&(e.style.cursor=this.props.getCursor(this.cursorState))}_setGLContext(e){if(this.layerManager)return;this.canvas||(this.canvas=e.canvas,(0,Ae.yW)(e,{enable:!0,copyState:!0})),this.tooltip=new Ge(this.canvas),(0,Ae.dR)(e,{blend:!0,blendFunc:[770,771,1,771],polygonOffsetFill:!0,depthTest:!0,depthFunc:515}),this.props.onWebGLInitialized(e);const t=new a;t.play(),this.animationLoop.attachTimeline(t),this.eventManager=new mn(this.props.parent||e.canvas,{touchAction:this.props.touchAction,recognizerOptions:this.props.eventRecognizerOptions,events:{pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerleave:this._onPointerMove}});for(const r in be.FP)this.eventManager.on(r,this._onEvent);this.viewManager=new x({timeline:t,eventManager:this.eventManager,onViewStateChange:this._onViewStateChange.bind(this),onInteractionStateChange:this._onInteractionStateChange.bind(this),views:this._getViews(),viewState:this._getViewState(),width:this.width,height:this.height});const n=this.viewManager.getViewports()[0];this.layerManager=new _(e,{deck:this,stats:this.stats,viewport:n,timeline:t}),this.effectManager=new Oe,this.deckRenderer=new Fe(e),this.deckPicker=new Ve(e),this.setProps(this.props),this._updateCanvasSize(),this.props.onLoad()}_drawLayers(e,t){const{gl:n}=this.layerManager.context;(0,Ae.dR)(n,this.props.parameters),this.props.onBeforeRender({gl:n}),this.deckRenderer.renderLayers({target:this.props._framebuffer,layers:this.layerManager.getLayers(),viewports:this.viewManager.getViewports(),onViewportActive:this.layerManager.activateViewport,views:this.viewManager.getViews(),pass:"screen",effects:this.effectManager.getEffects(),...t}),this.props.onAfterRender({gl:n})}_onRenderFrame(e){this._getFrameStats(),this._metricsCounter++%60===0&&(this._getMetrics(),this.stats.reset(),l.Z.table(4,this.metrics)(),this.props._onMetrics&&this.props._onMetrics(this.metrics)),this._updateCanvasSize(),this._updateCursor(),this.tooltip.isVisible&&this.viewManager.needsRedraw()&&this.tooltip.setTooltip(null),this.layerManager.updateLayers(),this._pickAndCallback(),this.redraw(),this.viewManager&&this.viewManager.updateViewStates()}_onViewStateChange(e){const t=this.props.onViewStateChange(e)||e.viewState;this.viewState&&(this.viewState={...this.viewState,[e.viewId]:t},this.props.viewState||this.viewManager&&this.viewManager.setProps({viewState:this.viewState}))}_onInteractionStateChange(e){this.cursorState.isDragging=e.isDragging||!1,this.props.onInteractionStateChange(e)}_getFrameStats(){const{stats:e}=this;e.get("frameRate").timeEnd(),e.get("frameRate").timeStart();const t=this.animationLoop.stats;e.get("GPU Time").addTime(t.get("GPU Time").lastTiming),e.get("CPU Time").addTime(t.get("CPU Time").lastTiming)}_getMetrics(){const{metrics:e,stats:t}=this;e.fps=t.get("frameRate").getHz(),e.setPropsTime=t.get("setProps Time").time,e.updateAttributesTime=t.get("Update Attributes").time,e.framesRedrawn=t.get("Redraw Count").count,e.pickTime=t.get("pickObject Time").time+t.get("pickMultipleObjects Time").time+t.get("pickObjects Time").time,e.pickCount=t.get("Pick Count").count,e.gpuTime=t.get("GPU Time").time,e.cpuTime=t.get("CPU Time").time,e.gpuTimePerFrame=t.get("GPU Time").getAverageTime(),e.cpuTimePerFrame=t.get("CPU Time").getAverageTime();const n=_t.lR.get("Memory Usage");e.bufferMemory=n.get("Buffer Memory").count,e.textureMemory=n.get("Texture Memory").count,e.renderbufferMemory=n.get("Renderbuffer Memory").count,e.gpuMemory=n.get("GPU Memory").count}}(0,r.Z)(yn,"defaultProps",An),(0,r.Z)(yn,"VERSION",yt)},44602:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(68185),i=n(63549);class o{static get componentName(){return Object.prototype.hasOwnProperty.call(this,"extensionName")?this.extensionName:""}constructor(e){(0,r.Z)(this,"opts",void 0),e&&(this.opts=e)}equals(e){return this===e||this.constructor===e.constructor&&(0,i.v)(this.opts,e.opts,1)}getShaders(e){return null}getSubLayerProps(e){const{defaultProps:t}=e.constructor,n={updateTriggers:{}};for(const r in t)if(r in this.props){const e=t[r],i=this.props[r];n[r]=i,e&&"accessor"===e.type&&(n.updateTriggers[r]=this.props.updateTriggers[r],"function"===typeof i&&(n[r]=this.getSubLayerAccessor(i)))}return n}initializeState(e,t){}updateState(e,t){}onNeedsRedraw(e){}getNeedsPickingBuffer(e){return!1}draw(e,t){}finalizeState(e,t){}}(0,r.Z)(o,"defaultProps",{}),(0,r.Z)(o,"extensionName","LayerExtension")},53104:(e,t,n)=>{"use strict";n.d(t,{Z:()=>se});var r=n(68185),i=n(98029),o=n(21921),a=n(83063),s=n(30373),l=n(78191);class c extends l.Z{get value(){return this._value}_onUpdate(){const{time:e,settings:{fromValue:t,toValue:n,duration:r,easing:i}}=this,o=i(e/r);this._value=(0,s.t7)(t,n,o)}}const u=1e-5;function d(e,t,n,r,i){const o=t-e;return(n-t)*i+-o*r+o+t}function f(e,t){if(Array.isArray(e)){let n=0;for(let r=0;r