diff -Nru eoxserver-1.0rc21/.bumpversion.cfg eoxserver-1.0rc22/.bumpversion.cfg --- eoxserver-1.0rc21/.bumpversion.cfg 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/.bumpversion.cfg 2021-02-05 10:41:29.000000000 +0000 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.0.0-rc21 +current_version = 1.0.0-rc22 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-z]+)(?P\d+))? diff -Nru eoxserver-1.0rc21/debian/changelog eoxserver-1.0rc22/debian/changelog --- eoxserver-1.0rc21/debian/changelog 2021-01-24 20:00:00.000000000 +0000 +++ eoxserver-1.0rc22/debian/changelog 2021-02-05 13:00:00.000000000 +0000 @@ -1,3 +1,9 @@ +eoxserver (1.0rc22-0~focal0) focal; urgency=low + + * New upstream version. + + -- Angelos Tzotsos Fri, 05 Feb 2021 15:00:00 +0200 + eoxserver (1.0rc21-0~focal0) focal; urgency=low * New upstream version. diff -Nru eoxserver-1.0rc21/eoxserver/contrib/vrt.py eoxserver-1.0rc22/eoxserver/contrib/vrt.py --- eoxserver-1.0rc21/eoxserver/contrib/vrt.py 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/contrib/vrt.py 2021-02-05 10:41:29.000000000 +0000 @@ -399,7 +399,7 @@ band.SetMetadataItem("source_0", """ <{source_type}Source> - {filename} + {filename} {band} @@ -437,7 +437,7 @@ out_band.SetMetadataItem("source_0", """ - {filename} + {filename} {band} """.format( @@ -481,7 +481,7 @@ out_band.SetMetadataItem("source_0", """ - {filename} + {filename} {band} diff -Nru eoxserver-1.0rc21/eoxserver/core/util/xmltools.py eoxserver-1.0rc22/eoxserver/core/util/xmltools.py --- eoxserver-1.0rc21/eoxserver/core/util/xmltools.py 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/core/util/xmltools.py 2021-02-05 10:41:29.000000000 +0000 @@ -140,7 +140,13 @@ elif isinstance(obj, etree._ElementTree): return obj try: - tree_or_elem = etree.fromstring(obj.encode('ascii')) + try: + # convert str -> bytes if necessary + obj = obj.encode('ascii') + except AttributeError: + pass + + tree_or_elem = etree.fromstring(obj) if etree.iselement(tree_or_elem): return tree_or_elem.getroottree() return tree_or_elem diff -Nru eoxserver-1.0rc21/eoxserver/__init__.py eoxserver-1.0rc22/eoxserver/__init__.py --- eoxserver-1.0rc21/eoxserver/__init__.py 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/__init__.py 2021-02-05 10:41:29.000000000 +0000 @@ -28,7 +28,7 @@ # ------------------------------------------------------------------------------ -__version__ = '1.0.0-rc21' +__version__ = '1.0.0-rc22' def get_version(): diff -Nru eoxserver-1.0rc21/eoxserver/resources/coverages/dateline.py eoxserver-1.0rc22/eoxserver/resources/coverages/dateline.py --- eoxserver-1.0rc21/eoxserver/resources/coverages/dateline.py 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/resources/coverages/dateline.py 2021-02-05 10:41:29.000000000 +0000 @@ -1,9 +1,9 @@ -#------------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # # Project: EOxServer # Authors: Fabian Schindler # -#------------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (C) 2011 EOX IT Services GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -13,8 +13,8 @@ # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # -# The above copyright notice and this permission notice shall be included in all -# copies of this Software or works derived from this Software. +# The above copyright notice and this permission notice shall be included in +# all copies of this Software or works derived from this Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -23,13 +23,25 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -#------------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -from django.contrib.gis.geos import Polygon +# from django.contrib.gis.geos import Polygon +from osgeo import ogr +from osgeo import osr + + +EXTENT_EPSG_4326 = ogr.CreateGeometryFromWkt( + 'POLYGON ((-180 -90, -180 90, 180 90, 180 -90, -180 -90))' +) +SR_EPSG_4326 = osr.SpatialReference() +SR_EPSG_4326.ImportFromEPSG(4326) +try: + SR_EPSG_4326.SetAxisMappingStrategy(0) +except AttributeError: + # earlier version did not have this behavior + pass -EXTENT_EPSG_4326 = Polygon.from_bbox((-180, -90, 180, 90)) -EXTENT_EPSG_4326.srid = 4326 CRS_WIDTH = { 3857: -20037508.3428 * 2, @@ -40,12 +52,29 @@ def extent_crosses_dateline(extent, srid=4326): """ Returns ``True`` if a dataset crosses the dateline border. """ - poly = Polygon.from_bbox(extent) - poly.srid = srid + poly = ogr.CreateGeometryFromWkt( + 'POLYGON (({minx} {miny}, {minx} {maxy}, {maxx} {maxy}, ' + '{maxx} {miny}, {minx} {miny}))'.format( + minx=extent[0], + miny=extent[1], + maxx=extent[2], + maxy=extent[3], + ) + ) - poly.transform(EXTENT_EPSG_4326.srs) + sr = osr.SpatialReference() + sr.ImportFromEPSG(srid) + try: + sr.SetAxisMappingStrategy(0) + except AttributeError: + # earlier version did not have this behavior + pass + + if not sr.IsSame(SR_EPSG_4326): + transform = osr.CoordinateTransformation(sr, SR_EPSG_4326) + poly.Transform(transform) - if not EXTENT_EPSG_4326.contains(poly): + if not EXTENT_EPSG_4326.Contains(poly): return True return False @@ -62,5 +91,5 @@ raise NotImplementedError( "Dateline wrapping is not implemented for SRID " "%d. Supported are SRIDs %s." % - (srid, ", ".join(CRS_WIDTH.keys())) + (srid, ", ".join(str(v) for v in CRS_WIDTH.keys())) ) diff -Nru eoxserver-1.0rc21/eoxserver/resources/coverages/management/commands/stac.py eoxserver-1.0rc22/eoxserver/resources/coverages/management/commands/stac.py --- eoxserver-1.0rc21/eoxserver/resources/coverages/management/commands/stac.py 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/resources/coverages/management/commands/stac.py 2021-02-05 10:41:29.000000000 +0000 @@ -57,7 +57,7 @@ help='The location of the STAC Items. Mandatory.' ) parser.add_argument( - '--in', '-i', dest='stdin', action="store_true", default=False, + '--in', dest='stdin', action="store_true", default=False, help='Read the STAC Item from stdin instead from a file.' ) @@ -84,7 +84,7 @@ 'The name of the new product type. Optional.' ) ) - register_parser.add_argument( + types_parser.add_argument( "--ignore-existing", "-i", dest="ignore_existing", action="store_true", default=False, help=( diff -Nru eoxserver-1.0rc21/eoxserver/resources/coverages/registration/stac.py eoxserver-1.0rc22/eoxserver/resources/coverages/registration/stac.py --- eoxserver-1.0rc21/eoxserver/resources/coverages/registration/stac.py 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/resources/coverages/registration/stac.py 2021-02-05 10:41:29.000000000 +0000 @@ -38,6 +38,7 @@ from eoxserver.backends import models as backends from eoxserver.backends.access import gdal_open from eoxserver.resources.coverages import models +from eoxserver.resources.coverages.registration.registrators.gdal import GDALRegistrator from eoxserver.resources.coverages.registration.exceptions import ( RegistrationError ) @@ -208,7 +209,10 @@ # actually create the metadata object create_metadata(product, metadata) + registrator = GDALRegistrator() + for asset_name, asset in assets.items(): + overrides = {} bands = asset.get('eo:bands') if not bands: continue @@ -224,7 +228,7 @@ for band_name in band_names ] ) - coverage_id = '%s_%s' % (identifier, asset_name) + overrides['identifier'] = '%s_%s' % (identifier, asset_name) # create the storage item parsed = urlparse(asset['href']) @@ -234,11 +238,11 @@ else: path = parsed.path - arraydata_item = models.ArrayDataItem( - location=path, - storage=storage, - band_count=len(bands), - ) + # arraydata_item = models.ArrayDataItem( + # location=path, + # storage=storage, + # band_count=len(bands), + # ) coverage_footprint = footprint if 'proj:geometry' in asset: @@ -246,10 +250,7 @@ json.dumps(asset['proj:geometry']) ) - # get/create Grid - grid_def = None - size = None - origin = None + overrides['footprint'] = coverage_footprint.wkt shape = asset.get('proj:shape') or properties.get('proj:shape') transform = asset.get('proj:transform') or \ @@ -257,10 +258,10 @@ epsg = asset.get('proj:epsg') or properties.get('proj:epsg') if shape: - size = shape + overrides['size'] = shape if transform: - origin = [transform[transform[0], transform[3]]] + overrides['origin'] = [transform[transform[0], transform[3]]] if epsg and transform: sr = osr.SpatialReference(epsg) @@ -271,46 +272,56 @@ 'axis_types': ['spatial', 'spatial'], 'axis_offsets': [transform[1], transform[5]], } + overrides['grid'] = grid_def # get_grid(grid_def) - if not grid_def or not size or not origin: - ds = gdal_open(arraydata_item) - reader = get_reader_by_test(ds) - if not reader: - raise RegistrationError( - 'Failed to get metadata reader for coverage' - ) - values = reader.read(ds) - grid_def = values['grid'] - size = values['size'] - origin = values['origin'] - - grid = get_grid(grid_def) - - if models.Coverage.objects.filter(identifier=coverage_id).exists(): - if replace: - models.Coverage.objects.filter(identifier=coverage_id).delete() - else: - raise RegistrationError( - 'Coverage %s already exists' % coverage_id - ) - - coverage = models.Coverage.objects.create( - identifier=coverage_id, - footprint=coverage_footprint, - begin_time=start_time, - end_time=end_time, - grid=grid, - axis_1_origin=origin[0], - axis_2_origin=origin[1], - axis_1_size=size[0], - axis_2_size=size[1], - coverage_type=coverage_type, - parent_product=product, + # if not grid_def or not size or not origin: + # ds = gdal_open(arraydata_item) + # reader = get_reader_by_test(ds) + # if not reader: + # raise RegistrationError( + # 'Failed to get metadata reader for coverage' + # ) + # values = reader.read(ds) + # grid_def = values['grid'] + # size = values['size'] + # origin = values['origin'] + + registrator.register( + data_locations=[([storage.name] if storage else []) + [path]], + metadata_locations=[], + coverage_type_name=coverage_type.name, + footprint_from_extent=False, + overrides=overrides, + replace=replace, ) - arraydata_item.coverage = coverage - arraydata_item.full_clean() - arraydata_item.save() + # grid = get_grid(grid_def) + + # if models.Coverage.objects.filter(identifier=coverage_id).exists(): + # if replace: + # models.Coverage.objects.filter(identifier=coverage_id).delete() + # else: + # raise RegistrationError( + # 'Coverage %s already exists' % coverage_id + # ) + + # coverage = models.Coverage.objects.create( + # identifier=coverage_id, + # footprint=coverage_footprint, + # begin_time=start_time, + # end_time=end_time, + # grid=grid, + # axis_1_origin=origin[0], + # axis_2_origin=origin[1], + # axis_1_size=size[0], + # axis_2_size=size[1], + # coverage_type=coverage_type, + # parent_product=product, + # ) + + # arraydata_item.coverage = coverage + # arraydata_item.full_clean() + # arraydata_item.save() # TODO: browses if possible diff -Nru eoxserver-1.0rc21/eoxserver/webclient/migrations/0002_extra_fields.py eoxserver-1.0rc22/eoxserver/webclient/migrations/0002_extra_fields.py --- eoxserver-1.0rc21/eoxserver/webclient/migrations/0002_extra_fields.py 1970-01-01 00:00:00.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/webclient/migrations/0002_extra_fields.py 2021-02-05 10:41:29.000000000 +0000 @@ -0,0 +1,38 @@ +# Generated by Django 2.2.17 on 2021-02-04 15:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('webclient', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='extra', + name='histogram_bin_count', + field=models.IntegerField(default=28), + ), + migrations.AddField( + model_name='extra', + name='histogram_threshold', + field=models.IntegerField(default=600), + ), + migrations.AddField( + model_name='extra', + name='load_more', + field=models.IntegerField(default=600), + ), + migrations.AddField( + model_name='extra', + name='max_zoom', + field=models.IntegerField(default=15), + ), + migrations.AddField( + model_name='extra', + name='search_limit', + field=models.IntegerField(default=600), + ), + ] diff -Nru eoxserver-1.0rc21/eoxserver/webclient/models.py eoxserver-1.0rc22/eoxserver/webclient/models.py --- eoxserver-1.0rc21/eoxserver/webclient/models.py 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/webclient/models.py 2021-02-05 10:41:29.000000000 +0000 @@ -37,3 +37,8 @@ info = models.TextField(blank=True, null=True) color = models.CharField(max_length=64, blank=True, null=True) default_visible = models.BooleanField(default=False) + max_zoom = models.IntegerField(default=15) + histogram_bin_count = models.IntegerField(default=28) + histogram_threshold = models.IntegerField(default=600) + search_limit = models.IntegerField(default=600) + load_more = models.IntegerField(default=600) diff -Nru eoxserver-1.0rc21/eoxserver/webclient/static/822268aa1a6cd4dedba8.worker.js eoxserver-1.0rc22/eoxserver/webclient/static/822268aa1a6cd4dedba8.worker.js --- eoxserver-1.0rc21/eoxserver/webclient/static/822268aa1a6cd4dedba8.worker.js 1970-01-01 00:00:00.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/webclient/static/822268aa1a6cd4dedba8.worker.js 2021-02-05 10:41:29.000000000 +0000 @@ -0,0 +1,22 @@ +/*! + * PRISM version: 1.1.0-rc.25 + * eoxc version: 1.1.0-rc.21 + */ +!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){return self.services[t]||(e?self.services[t]=p.default.resolve((0,u.deserialize)(e)):self.services[t]=(0,u.discover)(t)),self.services[t]}function o(t,e,n,r,o,s,a,u,c,l){var p=o.maxCount,f=o.totalResults,d=o.itemsPerPage;return i(t,a).then(function(t){var i=(0,h.convertFilters)(n,r,o,s,t),a=t.getPaginator(i,{type:s,method:e,baseOffset:o.startIndex,maxUrlLength:u,dropEmptyParameters:c,parseOptions:l,totalResults:f,serverItemsPerPage:d});return a.searchFirstRecords(p)})}function s(){self.search&&(self.search.cancel(),self.search=null),self.emitter&&(self.emitter.emit("cancel"),self.emitter=null)}var a=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();n(79),n(80);var u=n(139),c=n(129),l=n(52),p=r(l),h=n(144);p.default.config({cancellation:!0}),(0,u.config)({useXHR:!0,Promise:p.default}),self.Promise=p.default,self.DOMParser=c.DOMParser,self.services={},self.promises={},self.onmessage=function(t){var e=t.data,n=a(e,2),r=n[0],i=n[1];switch(r){case"searchAll":var u=i.url,c=i.method,l=i.filterParams,p=i.mapParams,f=i.options,d=i.format,g=i.description,y=i.maxUrlLength,_=i.dropEmptyParameters,m=i.parseOptions,v=i.switchMultiPolygonCoordinates;self.search=o(u,c,l,p,f,d,g,y,_,m),self.search.then(function(t){self.emitter=t,t.on("page",function(t){return self.postMessage(["progress",Object.assign(t,{records:(0,h.prepareRecords)(t.records,v)})])}).on("success",function(t){return self.postMessage(["success",t])}).on("error",function(t){return self.postMessage(["error",t.toString()])})},function(t){return self.postMessage(["error",t.toString()])});break;case"cancel":s();break;case"terminate":s(),self.close()}}},function(t,e,n){(function(e,r){"use strict";function i(){try{var t=T;return T=null,t.apply(this,arguments)}catch(t){return P.e=t,P}}function o(t){return T=t,i}function s(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function a(t){return"function"==typeof t||"object"==typeof t&&null!==t}function u(t){return s(t)?new Error(_(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;n1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=D.test(t+"")&&S.names(t).length>0;if(n||r||i)return!0}return!1}catch(t){return!1}}function d(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function g(t){return M.test(t)}function y(t,e,n){for(var r=new Array(t),i=0;i10||t[0]>0}(),B.isNode&&B.toFastProperties(r);try{throw new Error}catch(t){B.lastLineError=t}t.exports=B}).call(e,function(){return this}(),n(8))},function(t,e,n){"use strict";function r(t){for(var e=t.indexOf("?")===-1?t:t.substring(t.indexOf("?")),n=e.split("&"),r={},i=0;i3&&void 0!==arguments[3]?arguments[3]:I;if(!t)return[];var i=r[e]||e,s=o(t);return n&&i?s.filter(function(t){return t.localName===n&&t.namespaceURI===i}):n?s.filter(function(t){return t.localName===n}):s}function a(t,e,n,r){if(!e&&!n&&t.firstElementChild)return t.firstElementChild;var i=s(t,e,n,r);return i.length?i[0]:null}function u(t,e,n,r){var i=a(t,e,n,r);return i?i.textContent:null}function c(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:I,o=i[e]||e;return t.hasAttributeNS(o,n)?t.getAttributeNS(o,n):r}function l(t){return t.indexOf(":")!==-1?t.split(":"):[null,t]}function p(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=e.split("/").filter(function(t){return t.length}),o=n?t:[t],u=0;u=400)throw new Error("Bad response from server");return t})}function g(t){return"undefined"==typeof t||null===t}function y(t){function e(t){return"("+t+")"}function n(t){return t.join(" ")}function r(t){return t.map(n).join(", ")}function i(t){return t.map(r).map(e).join(", ")}function o(t){return t.map(i).map(e).join(", ")}switch("Feature"===t.type&&(t=t.geometry),t.type){case"Point":return"POINT("+n(t.coordinates)+")";case"LineString":return"LINESTRING("+r(t.coordinates)+")";case"Polygon":return"POLYGON("+i(t.coordinates)+")";case"MultiPoint":return"MULTIPOINT("+r(t.coordinates)+")";case"MultiPolygon":return"MULTIPOLYGON("+o(t.coordinates)+")";case"MultiLineString":return"MULTILINESTRING("+i(t.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION("+t.geometries.map(y).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}}function _(t,e){return new Request(t,e)}function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new XMLHttpRequest;return n.open(e.method||"GET",t),e.headers&&Object.keys(e.headers).forEach(function(t){n.setRequestHeader(t,e.headers[t])}),n.send(e.body?e.body:null),n}function v(t,e,n){if(Array.prototype.find)return t.find(e,n);for(var r=0;r1?e-1:0),r=1;r1)for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:null;if(!t)return r;for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e]);return r}Object.defineProperty(e,"__esModule",{value:!0}),e.config=n;var r={useXHR:!1,Promise:Promise}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(7),i=n(6),o=n(12),s=n(37),a=n(31),u="prototype",c=function(t,e,n){var l,p,h,f,d=t&c.F,g=t&c.G,y=t&c.S,_=t&c.P,m=t&c.B,v=g?r:y?r[e]||(r[e]={}):(r[e]||{})[u],b=g?i:i[e]||(i[e]={}),E=b[u]||(b[u]={});g&&(n=e);for(l in n)p=!d&&v&&void 0!==v[l],h=(p?v:n)[l],f=m&&p?a(h,r):_&&"function"==typeof h?a(Function.call,h):h,v&&s(v,l,h,t&c.U),b[l]!=h&&o(b,l,f),_&&E[l]!=h&&(E[l]=h)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports={}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(22)("keys"),i=n(25);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(6),i=n(7),o="__core-js_shared__",s=i[o]||(i[o]={});(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(35)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(15);t.exports=function(t){return Object(r(t))}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){"use strict";var r=n(107)();t.exports=function(t){return t!==r&&null!==t}},function(t,e,n){"use strict";function r(){return Object.keys(l)}function i(t){return l[t]}function o(t,e){l[t]=e}Object.defineProperty(e,"__esModule",{value:!0}),e.getSupportedTypes=r,e.getFormat=i,e.registerFormat=o;var s=n(135),a=n(137),u=n(136),c=n(138),l={};o("application/atom+xml",new s.AtomFormat),o("application/rss+xml",new a.RSSFormat),o("application/json",new u.GeoJSONFormat),o("application/vnd.geo+json",new u.GeoJSONFormat),o("application/x-suggestions+json",new c.SuggestionsJSONFormat)},function(t,e,n){"use strict";t.exports=function(t){function e(e,n,a){return function(u){var c=a._boundValue();t:for(var l=0;l0?i(r(t),9007199254740991):0}},function(t,e,n){n(128),t.exports=self.fetch.bind(self)},function(t,e){"use strict";var n=void 0;t.exports=function(t){return t!==n&&null!==t}},function(t,e,n){(function(e){"use strict";function r(t){return(t?t:"").toString().replace(g,"")}function i(t){var n;n="undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{};var r=n.location||{};t=t||r;var i,o={},s=typeof t;if("blob:"===t.protocol)o=new a(unescape(t.pathname),{});else if("string"===s){o=new a(t,{});for(i in _)delete o[i]}else if("object"===s){for(i in t)i in _||(o[i]=t[i]);void 0===o.slashes&&(o.slashes=h.test(t.href))}return o}function o(t){t=r(t);var e=f.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function s(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],o=!1,s=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),s++):s&&(0===r&&(o=!0),n.splice(r,1),s--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}function a(t,e,n){if(t=r(t),!(this instanceof a))return new a(t,e,n);var u,c,h,f,d,g,_=y.slice(),m=typeof e,v=this,b=0;for("object"!==m&&"string"!==m&&(n=e,e=null),n&&"function"!=typeof n&&(n=p.parse),e=i(e),c=o(t||""),u=!c.protocol&&!c.slashes,v.slashes=c.slashes||u&&e.slashes,v.protocol=c.protocol||e.protocol||"",t=c.rest,c.slashes||(_[3]=[/(.*)/,"pathname"]);b<_.length;b++)f=_[b],"function"!=typeof f?(h=f[0],g=f[1],h!==h?v[g]=t:"string"==typeof h?~(d=t.indexOf(h))&&("number"==typeof f[2]?(v[g]=t.slice(0,d),t=t.slice(d+f[2])):(v[g]=t.slice(d),t=t.slice(0,d))):(d=h.exec(t))&&(v[g]=d[1],t=t.slice(0,d.index)),v[g]=v[g]||(u&&f[3]?e[g]||"":""),f[4]&&(v[g]=v[g].toLowerCase())):t=f(t);n&&(v.query=n(v.query)),u&&e.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==e.pathname)&&(v.pathname=s(v.pathname,e.pathname)),l(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(f=v.auth.split(":"),v.username=f[0]||"",v.password=f[1]||""),v.origin=v.protocol&&v.host&&"file:"!==v.protocol?v.protocol+"//"+v.host:"null",v.href=v.toString()}function u(t,e,n){var r=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||p.parse)(e)),r[t]=e;break;case"port":r[t]=e,l(e,r.protocol)?e&&(r.host=r.hostname+":"+e):(r.host=r.hostname,r[t]="");break;case"hostname":r[t]=e,r.port&&(e+=":"+r.port),r.host=e;break;case"host":r[t]=e,/:\d+$/.test(e)?(e=e.split(":"),r.port=e.pop(),r.hostname=e.join(":")):(r.hostname=e,r.port="");break;case"protocol":r.protocol=e.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(e){var i="pathname"===t?"/":"#";r[t]=e.charAt(0)!==i?i+e:e}else r[t]=e;break;default:r[t]=e}for(var o=0;o=0))throw i(st,new Error(t.tagName+"@"+n));for(var o=e.length-1;r"==t&&">"||"&"==t&&"&"||'"'==t&&"""||"&#"+t.charCodeAt()+";"}function g(t,e){if(e(t))return!0;if(t=t.firstChild)do if(g(t,e))return!0;while(t=t.nextSibling)}function y(){}function _(t,e,n){t&&t._inc++;var r=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==r&&(e._nsMap[n.prefix?n.localName:""]=n.value)}function m(t,e,n,r){t&&t._inc++;var i=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==i&&delete e._nsMap[n.prefix?n.localName:""]}function v(t,e,n){if(t&&t._inc){t._inc++;var r=e.childNodes;if(n)r[r.length++]=n;else{for(var i=e.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function b(t,e){var n=e.previousSibling,r=e.nextSibling;return n?n.nextSibling=r:t.firstChild=r,r?r.previousSibling=n:t.lastChild=n,v(t.ownerDocument,t),e}function E(t,e,n){var r=e.parentNode;if(r&&r.removeChild(e),e.nodeType===et){var i=e.firstChild;if(null==i)return e;var o=e.lastChild}else i=o=e;var s=n?n.previousSibling:t.lastChild;i.previousSibling=s,o.nextSibling=n,s?s.nextSibling=i:t.firstChild=i,null==n?t.lastChild=o:n.previousSibling=o;do i.parentNode=t;while(i!==o&&(i=i.nextSibling));return v(t.ownerDocument||t,t),e.nodeType==et&&(e.firstChild=e.lastChild=null),e}function x(t,e){var n=e.parentNode;if(n){var r=t.lastChild;n.removeChild(e);var r=t.lastChild}var r=t.lastChild;return e.parentNode=t,e.previousSibling=r,e.nextSibling=null,r?r.nextSibling=e:t.firstChild=e,t.lastChild=e,v(t.ownerDocument,t,e),e}function w(){this._nsMap={}}function I(){}function N(){}function C(){}function S(){}function O(){}function P(){}function T(){}function R(){}function L(){}function A(){}function D(){}function M(){}function F(t,e){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i){var i=r.lookupPrefix(o);if(null==i)var s=[{namespace:o,prefix:null}]}return j(this,n,t,e,s),n.join("")}function k(t,e,n){var r=t.prefix||"",i=t.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var s=n[o];if(s.prefix==r)return s.namespace!=i}return!0}function j(t,e,n,r,i){if(r){if(t=r(t),!t)return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case X:i||(i=[]);var o=(i.length,t.attributes),s=o.length,a=t.firstChild,u=t.tagName;n=V===t.namespaceURI||n,e.push("<",u);for(var c=0;c"),n&&/^script$/i.test(u))for(;a;)a.data?e.push(a.data):j(a,e,n,r,i),a=a.nextSibling;else for(;a;)j(a,e,n,r,i),a=a.nextSibling;e.push("")}else e.push("/>");return;case Z:case et:for(var a=t.firstChild;a;)j(a,e,n,r,i),a=a.nextSibling;return;case Y:return e.push(" ",t.name,'="',t.value.replace(/[<&"]/g,d),'"');case H:return e.push(t.data.replace(/[<&]/g,d));case W:return e.push("");case J:return e.push("");case tt:var g=t.publicId,y=t.systemId;if(e.push("');else if(y&&"."!=y)e.push(' SYSTEM "',y,'">');else{var _=t.internalSubset;_&&e.push(" [",_,"]"),e.push(">")}return;case K:return e.push("");case $:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function G(t,e,n){var r;switch(e.nodeType){case X:r=e.cloneNode(!1),r.ownerDocument=t;case et:break;case Y:n=!0}if(r||(r=e.cloneNode(!1)),r.ownerDocument=t,r.parentNode=null,n)for(var i=e.firstChild;i;)r.appendChild(G(t,i,n)),i=i.nextSibling;return r}function U(t,e,n){var r=new e.constructor;for(var i in e){var s=e[i];"object"!=typeof s&&s!=r[i]&&(r[i]=s)}switch(e.childNodes&&(r.childNodes=new o),r.ownerDocument=t,r.nodeType){case X:var a=e.attributes,c=r.attributes=new u,l=a.length;c._ownerElement=r;for(var p=0;p0},lookupPrefix:function(t){for(var e=this;e;){var n=e._nsMap;if(n)for(var r in n)if(n[r]==t)return r;e=e.nodeType==Y?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var n=e._nsMap;if(n&&t in n)return n[t];e=e.nodeType==Y?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){var e=this.lookupPrefix(t);return null==e}},n(z,f),n(z,f.prototype),y.prototype={nodeName:"#document",nodeType:Z,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==et){for(var n=t.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,e),n=r}return t}return null==this.documentElement&&t.nodeType==X&&(this.documentElement=t),E(this,t,e),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),b(this,t)},importNode:function(t,e){return G(this,t,e)},getElementById:function(t){var e=null;return g(this.documentElement,function(n){if(n.nodeType==X&&n.getAttribute("id")==t)return e=n,!0}),e},createElement:function(t){var e=new w;e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.childNodes=new o;var n=e.attributes=new u;return n._ownerElement=e,e},createDocumentFragment:function(){var t=new A;return t.ownerDocument=this,t.childNodes=new o,t},createTextNode:function(t){var e=new C;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new S;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new O;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var n=new D;return n.ownerDocument=this,n.tagName=n.target=t,n.nodeValue=n.data=e,n},createAttribute:function(t){var e=new I;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new L;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var n=new w,r=e.split(":"),i=n.attributes=new u;return n.childNodes=new o,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=t,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=e,i._ownerElement=n,n},createAttributeNS:function(t,e){var n=new I,r=e.split(":");return n.ownerDocument=this,n.nodeName=e,n.name=e,n.namespaceURI=t,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=e,n}},r(y,f),w.prototype={nodeType:X,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var n=this.ownerDocument.createAttribute(t);n.value=n.nodeValue=""+e,this.setAttributeNode(n)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===et?this.insertBefore(t,null):x(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);n&&this.removeAttributeNode(n)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);return n&&n.value||""},setAttributeNS:function(t,e,n){var r=this.ownerDocument.createAttributeNS(t,e);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new s(this,function(e){var n=[];return g(e,function(r){r===e||r.nodeType!=X||"*"!==t&&r.tagName!=t||n.push(r)}),n})},getElementsByTagNameNS:function(t,e){return new s(this,function(n){var r=[];return g(n,function(i){i===n||i.nodeType!==X||"*"!==t&&i.namespaceURI!==t||"*"!==e&&i.localName!=e||r.push(i)}),r})}},y.prototype.getElementsByTagName=w.prototype.getElementsByTagName,y.prototype.getElementsByTagNameNS=w.prototype.getElementsByTagNameNS,r(w,f),I.prototype.nodeType=Y,r(I,f),N.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(it[ot])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,n){var r=this.data.substring(0,t),i=this.data.substring(t+e);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},r(N,f),C.prototype={nodeName:"#text",nodeType:H,splitText:function(t){var e=this.data,n=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(C,N),S.prototype={nodeName:"#comment",nodeType:J},r(S,N),O.prototype={nodeName:"#cdata-section",nodeType:W},r(O,N),P.prototype.nodeType=tt,r(P,f),T.prototype.nodeType=nt,r(T,f),R.prototype.nodeType=Q,r(R,f),L.prototype.nodeType=$,r(L,f),A.prototype.nodeName="#document-fragment",A.prototype.nodeType=et,r(A,f),D.prototype.nodeType=K,r(D,f),M.prototype.serializeToString=function(t,e,n){return F.call(t,e,n)},f.prototype.toString=F;try{Object.defineProperty&&(Object.defineProperty(s.prototype,"length",{get:function(){return a(this),this.$$length}}),Object.defineProperty(f.prototype,"textContent",{get:function(){return q(this)},set:function(t){switch(this.nodeType){case X:case et:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),B=function(t,e,n){t["$$"+e]=n})}catch(t){}e.DOMImplementation=h,e.XMLSerializer=M},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);er?a:r,i=null===i||u>i?u:i}return[e,n,r,i]}Object.defineProperty(e,"__esModule",{value:!0}),e.BaseFeedFormat=void 0;var h=function(){function t(t,e){for(var n=0;n=1)return[new Date(n[0]),new Date(n[1])]}return null}},{key:"parseLinks",value:function(t){return(0,d.getElements)(t,"atom","link").map(function(t){var e={href:t.getAttribute("href")},n=t.getAttribute("rel"),r=t.getAttribute("type"),i=t.getAttribute("title");return n&&(e.rel=n),r&&(e.type=r),i&&(e.title=i),e})}},{key:"parseMedia",value:function(t){var e=(0,d.getElements)(t,"media","content"),n=(0,d.getElements)(t,"media","group"),r=n.map(function(t){return(0,d.getElements)(t,"media","content")}).reduce(function(t,e){return t.concat(e)},[]),i=e.concat(r);return i.map(function(t){var e=(0,d.getFirstElement)(t,"media","category");return{url:t.getAttribute("url"),category:e?e.textContent:void 0,scheme:e?e.getAttribute("scheme"):void 0}})}},{key:"parseEOP",value:function(t){var e=(0,d.getFirstElement)(t,null,"EarthObservation");if(e){var n=(0,d.simplePath)(e,"om:procedure/EarthObservationEquipment",!0);return{productType:(0,d.simplePath)(e,"metaDataProperty/EarthObservationMetaData/productType/text()",!0),processingLevel:(0,d.simplePath)(e,"metaDataProperty/EarthObservationMetaData/processing/ProcessingInformation/processingLevel/text()",!0),platformShortName:(0,d.simplePath)(n,"platform/Platform/shortName/text()",!0),platformSerialIdentifier:(0,d.simplePath)(n,"platform/Platform/serialIdentifier/text()",!0),instrumentShortName:(0,d.simplePath)(n,"instrument/Instrument/shortName/text()",!0),sensorType:(0,d.simplePath)(n,"sensor/Sensor/sensorType/text()",!0),resolution:(0,d.simplePath)(n,"sensor/Sensor/resolution/text()",!0)+(0,d.simplePath)(n,"sensor/Sensor/resolution@uom",!0),orbitNumber:(0,d.simplePath)(n,"acquisitionParameters/Acquisition/orbitNumber/text()",!0),cloudCoverPercentage:(0,d.simplePath)(e,"om:result/opt:EarthObservationResult/opt:cloudCoverPercentage/text()",!0)}}return null}},{key:"parseS3Path",value:function(t){return(0,d.getText)(t,null,"s3Path")}},{key:"parseExtraFields",value:function(t,e,n,r){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=e[i],s=void 0,a=!0;if(Array.isArray(o)){var u=f(o,2);s=u[0],a=u[1]}else s=o;for(var c=i.split("."),l=r,p=0;p1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.type,o=n.raw,a=n.maxUrlLength,u=n.dropEmptyParameters,f=n.parseOptions,d=n.headers,g=i(t,e,u,d),y=(0,h.config)(),_=y.useXHR,m=y.Promise;if("undefined"!=typeof a&&g.url.length>a)return m.reject(new Error("Search URL too long: "+g.url.length+", maximum: "+a));var v=null;if(_)v=new m(function(t,e,n){var r=(0,l.createXHR)(g.url,g);r.onload=function(){o&&t(r),t([r.responseText,r.status])},r.onerror=function(){e(new TypeError("Failed to fetch"))},n&&"function"==typeof n&&n(function(){r.abort()})});else{if(v=fetch((0,l.createRequest)(g.url,g)),o)return v;v=v.then(function(t){return t.text().then(function(e){return[e,t.status]})})}return v.then(function(e){var n=s(e,2),i=n[0],o=n[1];if(o>=400){var a=(0,p.getErrorFromXml)(i);throw a||new Error(i)}var u=(0,c.getFormat)(r||t.type);if(!u)throw new Error("Could not parse response of type '"+r+"'.");return u.parse(i,f)})}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.createBaseRequest=i,e.search=o;var a=n(43),u=r(a),c=n(27),l=n(2),p=n(134),h=n(14)},function(t,e){"use strict";function n(t,e,n){if(n=n||{},!N(n))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(void 0===t)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");r&&C(r),i&&S(i);var o={type:"Feature"};return i&&(o.id=i),r&&(o.bbox=r),o.properties=e||{},o.geometry=t,o}function r(t,e,n){if(n=n||{},!N(n))throw new Error("options is invalid");var r=n.bbox;if(!t)throw new Error("type is required");if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");r&&C(r);var o;switch(t){case"Point":o=i(e).geometry;break;case"LineString":o=u(e).geometry;break;case"Polygon":o=s(e).geometry;break;case"MultiPoint":o=h(e).geometry;break;case"MultiLineString":o=p(e).geometry;break;case"MultiPolygon":o=f(e).geometry;break;default:throw new Error(t+" is invalid")}return r&&(o.bbox=r),o}function i(t,e,r){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!I(t[0])||!I(t[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:t},e,r)}function o(t,e,n){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");return l(t.map(function(t){return i(t,e)}),n)}function s(t,e,r){if(!t)throw new Error("coordinates is required");for(var i=0;i=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function y(t,e){if(void 0===t||null===t)throw new Error("radians is required");if(e&&"string"!=typeof e)throw new Error("units must be a string");var n=F[e||"kilometers"];if(!n)throw new Error(e+" units is invalid");return t*n}function _(t,e){if(void 0===t||null===t)throw new Error("distance is required");if(e&&"string"!=typeof e)throw new Error("units must be a string");var n=F[e||"kilometers"];if(!n)throw new Error(e+" units is invalid");return t/n}function m(t,e){return b(_(t,e))}function v(t){if(null===t||void 0===t)throw new Error("bearing is required");var e=t%360;return e<0&&(e+=360),e}function b(t){if(null===t||void 0===t)throw new Error("radians is required");var e=t%(2*Math.PI);return 180*e/Math.PI}function E(t){if(null===t||void 0===t)throw new Error("degrees is required");var e=t%360;return e*Math.PI/180}function x(t,e,n){if(null===t||void 0===t)throw new Error("length is required");if(!(t>=0))throw new Error("length must be a positive number");return y(_(t,e),n||"kilometers")}function w(t,e,n){if(null===t||void 0===t)throw new Error("area is required");if(!(t>=0))throw new Error("area must be a positive number");var r=j[e||"meters"];if(!r)throw new Error("invalid original units");var i=j[n||"kilometers"];if(!i)throw new Error("invalid final units");return t/r*i}function I(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function N(t){return!!t&&t.constructor===Object}function C(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!I(t))throw new Error("bbox must only contain numbers")})}function S(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}function O(){throw new Error("method has been renamed to `radiansToDegrees`")}function P(){throw new Error("method has been renamed to `degreesToRadians`")}function T(){throw new Error("method has been renamed to `lengthToDegrees`")}function R(){throw new Error("method has been renamed to `lengthToRadians`")}function L(){throw new Error("method has been renamed to `radiansToLength`")}function A(){throw new Error("method has been renamed to `bearingToAzimuth`")}function D(){throw new Error("method has been renamed to `convertLength`")}Object.defineProperty(e,"__esModule",{value:!0});var M=6371008.8,F={meters:M,metres:M,millimeters:1e3*M,millimetres:1e3*M,centimeters:100*M,centimetres:100*M,kilometers:M/1e3,kilometres:M/1e3,miles:M/1609.344,nauticalmiles:M/1852,inches:39.37*M,yards:M/1.0936,feet:3.28084*M,radians:1,degrees:M/111325},k={meters:1,metres:1,millimeters:1e3,millimetres:1e3,centimeters:100,centimetres:100,kilometers:.001,kilometres:.001,miles:1/1609.344,nauticalmiles:1/1852,inches:39.37,yards:1/1.0936,feet:3.28084,radians:1/M,degrees:1/111325},j={meters:1,metres:1,millimeters:1e6,millimetres:1e6,centimeters:1e4,centimetres:1e4,kilometers:1e-6,kilometres:1e-6,acres:247105e-9,miles:3.86e-7,yards:1.195990046,feet:10.763910417,inches:1550.003100006};e.earthRadius=M,e.factors=F,e.unitsFactors=k,e.areaFactors=j,e.feature=n,e.geometry=r,e.point=i,e.points=o,e.polygon=s,e.polygons=a,e.lineString=u,e.lineStrings=c,e.featureCollection=l,e.multiLineString=p,e.multiPoint=h,e.multiPolygon=f,e.geometryCollection=d,e.round=g,e.radiansToLength=y,e.lengthToRadians=_,e.lengthToDegrees=m,e.bearingToAzimuth=v,e.radiansToDegrees=b,e.degreesToRadians=E,e.convertLength=x,e.convertArea=w,e.isNumber=I,e.isObject=N,e.validateBBox=C,e.validateId=S,e.radians2degrees=O,e.degrees2radians=P,e.distanceToDegrees=T,e.distanceToRadians=R,e.radiansToDistance=L,e.bearingToAngle=A,e.convertDistance=D},function(t,e,n){"use strict";function r(){for(var t=new i.GeoJSONReader,e=t.read(JSON.stringify(arguments[0].geometry)),n=1;n0;)u(t)}function u(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var c;try{throw new Error}catch(t){c=t}var l=n(72),p=n(69),h=n(1);r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){h.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,n){n?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},h.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s),r.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},t.exports=r,t.exports.firstLineError=c}).call(e,n(8))},function(t,e){"use strict";t.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var c=n(o),l=new t(e);l._propagateFrom(this,1);var p=this._target();if(l._setBoundTo(c),c instanceof t){var h={promiseRejectionQueued:!1,promise:l,target:p,bindingPromise:c};p._then(e,s,void 0,l,h),c._then(a,u,void 0,l,h),l._setOnCancel(c)}else l._resolveCallback(p);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=this._bitField&-2097153},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},function(t,e,n){"use strict";function r(){ +try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=n(65)();o.noConflict=r,t.exports=o},function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}t.exports=function(t){function e(e,n){var r;if(null!=e&&(r=e[n]),"function"!=typeof r){var i="Object "+l.classString(e)+" has no method '"+l.toString(n)+"'";throw new t.TypeError(i)}return r}function r(t){var n=this.pop(),r=e(t,n);return r.apply(t,this)}function s(t){return t[this]}function a(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var u,c,l=n(1),p=l.canEvaluate,h=l.isIdentifier,f=function(t){return new Function("ensureMethod"," \n\t return function(obj) { \n\t 'use strict' \n\t var len = this.length; \n\t ensureMethod(obj, 'methodName'); \n\t switch(len) { \n\t case 1: return obj.methodName(this[0]); \n\t case 2: return obj.methodName(this[0], this[1]); \n\t case 3: return obj.methodName(this[0], this[1], this[2]); \n\t case 0: return obj.methodName(); \n\t default: \n\t return obj.methodName.apply(obj, this); \n\t } \n\t }; \n\t ".replace(/methodName/g,t))(e)},d=function(t){return new Function("obj"," \n\t 'use strict'; \n\t return obj.propertyName; \n\t ".replace("propertyName",t))},g=function(t,e,n){var r=n[t];if("function"!=typeof r){if(!h(t))return null;if(r=e(t),n[t]=r,n[" size"]++,n[" size"]>512){for(var i=Object.keys(n),o=0;o<256;++o)delete n[i[o]];n[" size"]=i.length-256}}return r};u=function(t){return g(t,f,i)},c=function(t){return g(t,d,o)},t.prototype.call=function(t){for(var e=arguments.length,n=new Array(Math.max(e-1,0)),i=1;i0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0)return o[t]}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,u=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=u,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},function(t,e,n){(function(e){"use strict";t.exports=function(t,r){function i(t,e){return{promise:e}}function o(){return!1}function s(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+U.toString(t));r._attachCancellationCallback(t)})}catch(t){return t}}function a(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?U.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function u(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function p(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function f(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function d(){this._trace=new A(this._peekContext())}function g(t,e){if(q(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=N(t);U.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),U.notEnumerableProp(t,"__stackCleaned__",!0)}}}function y(){this._trace=void 0}function _(t,e,n,r,i){if(void 0===t&&null!==e&&J){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),u=w(a),c=u.length-1;c>=0;--c){var l=u[c];if(!z.test(l)){var p=l.match(X);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(u.length>0)for(var h=u[0],c=0;c0&&(s="\n"+a[c-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function m(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),v(n)}function v(e,n,r){if(ut.warnings){var i,o=new G(e);if(n)r._attachExtraTrace(o);else if(ut.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var s=N(o);o.stack=s.message+"\n"+s.stack.join("\n")}rt("warning",o)||C(o,"",!0)}}function b(t,e){for(var n=0;n=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var u=r[a];if(e[i]!==u)break;e.pop(),i--}e=r}}function w(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function N(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?I(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:w(e)}}function C(t,e,n){if("undefined"!=typeof console){var r;if(U.isObject(t)){var i=t.stack;r=e+H(i,t)}else r=e+String(t);"function"==typeof F?F(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function S(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(t){j.throwLater(t)}"unhandledRejection"===t?rt(t,n,r)||i||C(n,"Unhandled rejection "):rt(t,r)}function O(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():U.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+P(e)+">, no stack trace)"}function P(t){var e=41;return t.length=a||(ot=function(t){if(V.test(t))return!0;var e=R(t);return!!(e&&e.fileName===n&&s<=e.line&&e.line<=a)})}}function A(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);at(this,A),e>32&&this.uncycle()}var D,M,F,k=t._getDomain,j=t._async,G=n(3).Warning,U=n(1),B=n(4),q=U.canAttachTrace,V=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,z=/\((?:timers\.js):\d+:\d+\)/,X=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,Y=null,H=null,W=!1,$=!(0==U.env("BLUEBIRD_DEBUG")||!U.env("BLUEBIRD_DEBUG")&&"development"!==U.env("NODE_ENV")),Q=!(0==U.env("BLUEBIRD_WARNINGS")||!$&&!U.env("BLUEBIRD_WARNINGS")),K=!(0==U.env("BLUEBIRD_LONG_STACK_TRACES")||!$&&!U.env("BLUEBIRD_LONG_STACK_TRACES")),J=0!=U.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(Q||!!U.env("BLUEBIRD_W_FORGOTTEN_RETURN"));t.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=t._bitField&-1048577|524288},t.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},t.prototype._notifyUnhandledRejectionIsHandled=function(){S("rejectionHandled",D,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),S("unhandledRejection",M,t,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(t,e,n){return v(t,e,n||this)},t.onPossiblyUnhandledRejection=function(t){var e=k();M="function"==typeof t?null===e?t:U.domainBind(e,t):void 0},t.onUnhandledRejectionHandled=function(t){var e=k();D="function"==typeof t?null===e?t:U.domainBind(e,t):void 0};var Z=function(){};t.longStackTraces=function(){if(j.haveItemsQueued()&&!ut.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ut.longStackTraces&&T()){var e=t.prototype._captureStackTrace,n=t.prototype._attachExtraTrace,i=t.prototype._dereferenceTrace;ut.longStackTraces=!0,Z=function(){if(j.haveItemsQueued()&&!ut.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=n,t.prototype._dereferenceTrace=i,r.deactivateLongStackTraces(),j.enableTrampoline(),ut.longStackTraces=!1},t.prototype._captureStackTrace=d,t.prototype._attachExtraTrace=g,t.prototype._dereferenceTrace=y,r.activateLongStackTraces(),j.disableTrampolineIfNecessary()}},t.hasLongStackTraces=function(){return ut.longStackTraces&&T()};var tt=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return U.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};B.defineProperty(n,"promise",{value:e.promise}),B.defineProperty(n,"reason",{value:e.reason});var r=new CustomEvent(t.toLowerCase(),n);return!U.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return U.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,B.defineProperty(n,"promise",{value:e.promise}),B.defineProperty(n,"reason",{value:e.reason}),!U.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),U.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!U.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),et=function(){return U.isNode?function(){return e.emit.apply(e,arguments)}:U.global?function(t){var e="on"+t.toLowerCase(),n=U.global[e];return!!n&&(n.apply(U.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),nt={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:i},rt=function(t){var e=!1;try{e=et.apply(null,arguments)}catch(t){j.throwLater(t),e=!0}var n=!1;try{n=tt(t,nt[t].apply(null,arguments))}catch(t){j.throwLater(t),n=!0}return n||e};t.config=function(e){if(e=Object(e),"longStackTraces"in e&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&Z()),"warnings"in e){var n=e.warnings;ut.warnings=!!n,J=ut.warnings,U.isObject(n)&&"wForgottenReturn"in n&&(J=!!n.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!ut.cancellation){if(j.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=l,t.prototype._propagateFrom=p,t.prototype._onCancel=u,t.prototype._setOnCancel=c,t.prototype._attachCancellationCallback=a,t.prototype._execute=s,it=p,ut.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!ut.monitoring?(ut.monitoring=!0,t.prototype._fireEvent=rt):!e.monitoring&&ut.monitoring&&(ut.monitoring=!1,t.prototype._fireEvent=o)),t},t.prototype._fireEvent=o,t.prototype._execute=function(t,e,n){try{t(e,n)}catch(t){return t}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(t){},t.prototype._attachCancellationCallback=function(t){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(t,e){};var it=h,ot=function(){return!1},st=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;U.inherits(A,Error),r.CapturedTrace=A,A.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;r0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var u=r>0?e[r-1]:this;a=0;--l)e[l]._length=c,c++;return}}}},A.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=N(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(w(i.stack.split("\n"))),i=i._parent;x(r),E(r),U.notEnumerableProp(t,"stack",b(n,r)),U.notEnumerableProp(t,"__stackCleaned__",!0)}};var at=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():O(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,Y=t,H=e;var n=Error.captureStackTrace;return ot=function(t){return V.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return Y=/@/,H=e,W=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(t){i="stack"in t}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(H=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?O(e):e.toString()},null):(Y=t,H=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(F=function(t){console.warn(t)},U.isNode&&e.stderr.isTTY?F=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:U.isNode||"string"!=typeof(new Error).stack||(F=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ut={warnings:Q,longStackTraces:!1,cancellation:!1,monitoring:!1};return K&&t.longStackTraces(),{longStackTraces:function(){return ut.longStackTraces},warnings:function(){return ut.warnings},cancellation:function(){return ut.cancellation},monitoring:function(){return ut.monitoring},propagateFromFunction:function(){return it},boundValueFunction:function(){return f},checkForgottenReturns:_,setBounds:L,warn:v,deprecated:m,CapturedTrace:A,fireDomEvent:tt,fireGlobalEvent:et}}}).call(e,n(8))},function(t,e){"use strict";t.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},function(t,e){"use strict";t.exports=function(t,e){var n=t.map;t.prototype.filter=function(t,r){return n(this,t,r,e)},t.filter=function(t,r,i){return n(t,r,i,e)}}},function(t,e,n){"use strict";t.exports=function(t,e,r){function i(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function o(t){this.finallyHandler=t}function s(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function a(){return c.call(this,this.promise._target()._settledValue())}function u(t){if(!s(this,t))return h.e=t,h}function c(n){var i=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(i._boundValue()):c.call(i._boundValue(),n);if(l===r)return l;if(void 0!==l){i._setReturnedNonUndefined();var f=e(l,i);if(f instanceof t){if(null!=this.cancelPromise){if(f._isCancelled()){var d=new p("late cancellation observer");return i._attachExtraTrace(d),h.e=d,h}f.isPending()&&f._attachCancellationCallback(new o(this))}return f._then(a,u,void 0,this,void 0)}}}return i.isRejected()?(s(this),h.e=n,h):(s(this),n)}var l=n(1),p=t.CancellationError,h=l.errorObj,f=n(28)(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){s(this.finallyHandler)},t.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new i(this,e,t),void 0)},t.prototype.lastly=t.prototype.finally=function(t){return this._passThrough(t,0,c,c)},t.prototype.tap=function(t){return this._passThrough(t,1,c)},t.prototype.tapCatch=function(e){var n=arguments.length;if(1===n)return this._passThrough(e,1,void 0,c);var r,i=new Array(n-1),o=0;for(r=0;r0&&"function"==typeof arguments[o]&&(n=arguments[o],o<=8&&c)){var l=new t(i);l._captureStackTrace();for(var p=g[o-1],h=new p(n),f=y,d=0;d=1?s:0,new a(e,n,s,o).promise()}var c=t._getDomain,l=n(1),p=l.tryCatch,h=l.errorObj,f=t._async;l.inherits(a,e),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(e,n){var r=this._values,o=this.length(),a=this._preservedValues,u=this._limit;if(n<0){if(n=n*-1-1,r[n]=e,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return r[n]=e,this._queue.push(n),!1;null!==a&&(a[n]=e);var c=this._promise,l=this._callback,f=c._boundValue();c._pushContext();var d=p(l).call(f,e,n,o),g=c._popContext();if(s.checkForgottenReturns(d,g,null!==a?"Promise.filter":"Promise.map",c),d===h)return this._reject(d.e),!0;var y=i(d,this._promise);if(y instanceof t){y=y._target();var _=y._bitField;if(0===(50397184&_))return u>=1&&this._inFlight++,r[n]=y,y._proxy(this,(n+1)*-1),!1;if(0===(33554432&_))return 0!==(16777216&_)?(this._reject(y._reason()),!0):(this._cancel(),!0);d=y._value()}r[n]=d}var m=++this._totalResolved;return m>=o&&(null!==a?this._filter(r,a):this._resolve(r),!0)},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];u=s.isArray(c)?a(n).apply(l,c):a(n).call(l,c)}else u=a(n)();var p=r._popContext();return o.checkForgottenReturns(u,p,"Promise.try",r),r._resolveFromSyncValue(u),r},t.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},function(t,e,n){"use strict";t.exports=function(t){function e(t,e){var n=this;if(!o.isArray(t))return r.call(n,t,e);var i=a(e).apply(n._boundValue(),[null].concat(t));i===u&&s.throwLater(i.e)}function r(t,e){var n=this,r=n._boundValue(),i=void 0===t?a(e).call(r,null):a(e).call(r,null,t);i===u&&s.throwLater(i.e)}function i(t,e){var n=this;if(!t){var r=new Error(t+"");r.cause=t,t=r}var i=a(e).call(n._boundValue(),t);i===u&&s.throwLater(i.e)}var o=n(1),s=t._async,a=o.tryCatch,u=o.errorObj;t.prototype.asCallback=t.prototype.nodeify=function(t,n){if("function"==typeof t){var o=r;void 0!==n&&Object(n).spread&&(o=e),this._then(o,i,void 0,this,t)}return this}}},function(t,e,n){(function(e){"use strict";t.exports=function(){function r(){}function i(t,e){if(null==t||t.constructor!==o)throw new v("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new v("expecting a function but got "+d.classString(e))}function o(t){t!==E&&i(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function s(t){this.promise._resolveCallback(t)}function a(t){this.promise._rejectCallback(t,!1)}function u(t){var e=new o(E);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new v("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},p=function(){return new o.PromiseInspection(this._target())},h=function(t){return o.reject(new v(t))},f={},d=n(1);c=d.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},d.notEnumerableProp(o,"_getDomain",c);var g=n(4),y=n(50),_=new y;g.defineProperty(o,"_async",{value:_});var m=n(3),v=o.TypeError=m.TypeError;o.RangeError=m.RangeError;var b=o.CancellationError=m.CancellationError;o.TimeoutError=m.TimeoutError,o.OperationalError=m.OperationalError,o.RejectionError=m.OperationalError,o.AggregateError=m.AggregateError;var E=function(){},x={},w={},I=n(76)(o,E),N=n(66)(o,E,I,h,r),C=n(55)(o),S=C.create,O=n(56)(o,C),P=(O.CapturedTrace,n(59)(o,I,w)),T=n(28)(w),R=n(29),L=d.errorObj,A=d.tryCatch;return o.prototype.toString=function(){return"[object Promise]"},o.prototype.caught=o.prototype.catch=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;n0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+d.classString(t);arguments.length>1&&(n+=", "+d.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},o.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},o.prototype.spread=function(t){return"function"!=typeof t?h("expecting a function but got "+d.classString(t)):this.all()._then(t,void 0,void 0,x,void 0)},o.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new N(this).promise()},o.prototype.error=function(t){return this.caught(d.originatesFromRejection,t)},o.getNewLibraryCopy=t.exports,o.is=function(t){return t instanceof o},o.fromNode=o.fromCallback=function(t){var e=new o(E);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=A(t)(R(e,n));return r===L&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},o.all=function(t){return new N(t).promise()},o.cast=function(t){var e=I(t);return e instanceof o||(e=new o(E),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(t){var e=new o(E);return e._captureStackTrace(),e._rejectCallback(t,!0),e},o.setScheduler=function(t){if("function"!=typeof t)throw new v("expecting a function but got "+d.classString(t));return _.setScheduler(t)},o.prototype._then=function(t,e,n,r,i){var s=void 0!==i,a=s?i:new o(E),u=this._target(),l=u._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!==(50397184&l)){var h,f,g=u._settlePromiseCtx;0!==(33554432&l)?(f=u._rejectionHandler0,h=t):0!==(16777216&l)?(f=u._fulfillmentHandler0,h=e,u._unsetRejectionIsUnhandled()):(g=u._settlePromiseLateCancellationObserver,f=new b("late cancellation observer"),u._attachExtraTrace(f),h=e),_.invoke(g,u,{handler:null===p?h:"function"==typeof h&&d.domainBind(p,h),promise:a,receiver:r,value:f})}else u._addCallbacks(t,e,a,r,p);return a},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},o.prototype._setLength=function(t){this._bitField=this._bitField&-65536|65535&t},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){_.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==f)return void 0===e&&this._isBound()?this._boundValue():e},o.prototype._promiseAt=function(t){return this[4*t-4+2]},o.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},o.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=f),this._addCallbacks(e,n,r,i,null)},o.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=f),this._addCallbacks(n,r,i,o,null)},o.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:d.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:d.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:d.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:d.domainBind(i,e))}return this._setLength(o+1),o},o.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},o.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=I(t,this);if(!(n instanceof o))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var i=r._bitField;if(0===(50397184&i)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;a>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():_.settlePromises(this),this._dereferenceTrace())}},o.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?_.fatalError(t,d.isNode):void((65535&e)>0?_.settlePromises(this):this._ensurePossibleRejectionHandled())},o.prototype._fulfillPromises=function(t,e){for(var n=1;n0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&g.defineProperty(o.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),o.defer=o.pending=function(){O.deprecated("Promise.defer","new Promise");var t=new o(E);return{promise:t,resolve:s,reject:a}},d.notEnumerableProp(o,"_makeSelfResolutionError",l),n(63)(o,E,I,h,O),n(51)(o,E,I,O),n(54)(o,N,h,O),n(131)(o),n(75)(o),n(61)(o,N,I,E,_,c),o.Promise=o,o.version="3.5.5",n(53)(o),n(60)(o,h,E,I,r,O),n(62)(o,N,h,I,E,O),n(64)(o),n(67)(o,E),n(68)(o,N,I,h),n(70)(o,E,I,h),n(71)(o,N,h,I,E,O),n(73)(o,N,O),n(74)(o,N,h),n(77)(o,E,O),n(78)(o,h,I,S,E,O),n(49)(o),n(57)(o,E),n(58)(o,E),d.toFastProperties(o),d.toFastProperties(o.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new o(E)),O.setBounds(y.firstLineError,d.lastLineError),o}}).call(e,n(8))},function(t,e,n){"use strict";t.exports=function(t,e,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function a(n){var r=this._promise=new t(e);n instanceof t&&r._propagateFrom(n,3),r._setOnCancel(this),this._values=n,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=n(1);u.isArray;return u.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function e(n,o){var a=r(this._values,this._promise);if(a instanceof t){a=a._target();var c=a._bitField;if(this._values=a,0===(50397184&c))return this._promise._setAsyncGuaranteed(),a._then(e,this._reject,void 0,this,o);if(0===(33554432&c))return 0!==(16777216&c)?this._reject(a._reason()):this._cancel();a=a._value()}if(a=u.asArray(a),null===a){var l=i("expecting an array or an iterable object but got "+u.classString(a)).reason();return void this._promise._rejectCallback(l,!1)}return 0===a.length?void(o===-5?this._resolveEmptyArray():this._resolve(s(o))):void this._iterate(a)},a.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;a=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var n=0;n=n;--r)e.push(r);for(var r=t+1;r<=3;++r)e.push(r);return e},C=function(t){return f.filledRange(t,"_arg","")},S=function(t){return f.filledRange(Math.max(t,3),"_arg","")},O=function(t){return"number"==typeof t.length?Math.max(Math.min(t.length,1024),0):0};p=function(n,r,i,o,s,a){function u(t){var e,n=C(t).join(", "),i=t>0?", ":"";return e=_?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===r?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n",e.replace("{{args}}",n).replace(", ",i)}function c(){for(var t="",e=0;e=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();o>1},t.prototype.props=function(){return s(this)},t.props=function(t){return s(t)}}},function(t,e){"use strict";function n(t,e,n,r,i){for(var o=0;o=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432, +n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},t.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},t.prototype.settle=function(){return t.settle(this)}}},function(t,e,n){"use strict";t.exports=function(t,e,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||e<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=n(1),a=n(3).RangeError,u=n(3).AggregateError,c=s.isArray,l={};s.inherits(i,e),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new u,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(t,e){return o(t,e)},t.prototype.some=function(t){return o(this,t)},t._SomePromiseArray=i}},function(t,e){"use strict";t.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},function(t,e,n){"use strict";t.exports=function(t,e){function r(n,r){if(l(n)){if(n instanceof t)return n;var i=o(n);if(i===c){r&&r._pushContext();var u=t.reject(i.e);return r&&r._popContext(),u}if("function"==typeof i){if(s(n)){var u=new t(e);return n._then(u._fulfill,u._reject,void 0,u,null),u}return a(n,i,r)}}return n}function i(t){return t.then}function o(t){try{return i(t)}catch(t){return c.e=t,c}}function s(t){try{return p.call(t,"_promise0")}catch(t){return!1}}function a(n,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new t(e),l=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=u.tryCatch(r).call(n,o,s);return p=!1,a&&h===c&&(a._rejectCallback(h.e,!0,!0),a=null),l}var u=n(1),c=u.errorObj,l=u.isObject,p={}.hasOwnProperty;return r}},function(t,e,n){"use strict";t.exports=function(t,e,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=n(1),u=t.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(t){return l(+this).thenReturn(t)},l=t.delay=function(n,o){var s,a;return void 0!==o?(s=t.resolve(o)._then(c,null,null,n,void 0),r.cancellation()&&o instanceof t&&s._setOnCancel(o)):(s=new t(e),a=setTimeout(function(){s._fulfill()},+n),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};t.prototype.delay=function(t){return l(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new u("operation timed out"):new u(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};t.prototype.timeout=function(t,e){t=+t;var n,a,u=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,u,void 0),n._setOnCancel(u)):n=this._then(o,s,void 0,u,void 0),n}}},function(t,e,n){"use strict";t.exports=function(t,e,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function u(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function c(e,n){function i(){if(s>=c)return l._fulfill();var o=u(e[s++]);if(o instanceof t&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),e.promise)}catch(t){return a(t)}if(o instanceof t)return o._then(i,a,null,null,null)}i()}var s=0,c=e.length,l=new t(o);return i(),l}function l(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return l.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var d=n(1),g=n(3).TypeError,y=n(1).inherits,_=d.errorObj,m=d.tryCatch,v={};l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():v},l.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==v?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},l.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},y(p,l),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},f.prototype._resultCancelled=function(){for(var e=this.length,n=0;n0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},t.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new g}}},function(t,e,n){n(105),n(103),t.exports=n(6).Array.from},function(t,e,n){n(104),t.exports=n(6).Object.assign},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(39),i=n(40),o=n(132);t.exports=function(t){return function(e,n,s){var a,u=r(e),c=i(u.length),l=o(s,c);if(t&&n!=n){for(;c>l;)if(a=u[l++],a!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(30),i=n(5)("toStringTag"),o="Arguments"==r(function(){return arguments}()),s=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=s(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){"use strict";var r=n(13),i=n(20);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){t.exports=n(22)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(7).document;t.exports=r&&r.documentElement},function(t,e,n){t.exports=!n(9)&&!n(17)(function(){return 7!=Object.defineProperty(n(32)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(19),i=n(5)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(10);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){"use strict";var r=n(94),i=n(20),o=n(38),s={};n(12)(s,n(5)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(35),i=n(16),o=n(37),s=n(12),a=n(19),u=n(90),c=n(38),l=n(97),p=n(5)("iterator"),h=!([].keys&&"next"in[].keys()),f="@@iterator",d="keys",g="values",y=function(){return this};t.exports=function(t,e,n,_,m,v,b){u(n,e,_);var E,x,w,I=function(t){if(!h&&t in O)return O[t];switch(t){case d:return function(){return new n(this,t)};case g:return function(){return new n(this,t)}}return function(){return new n(this,t)}},N=e+" Iterator",C=m==g,S=!1,O=t.prototype,P=O[p]||O[f]||m&&O[m],T=P||I(m),R=m?C?I("entries"):T:void 0,L="Array"==e?O.entries||P:P;if(L&&(w=l(L.call(new t)),w!==Object.prototype&&w.next&&(c(w,N,!0),r||"function"==typeof w[p]||s(w,p,y))),C&&P&&P.name!==g&&(S=!0,T=function(){return P.call(this)}),r&&!b||!h&&!S&&O[p]||s(O,p,T),a[e]=T,a[N]=y,m)if(E={values:C?T:I(g),keys:v?T:I(d),entries:R},b)for(x in E)x in O||o(O,x,E[x]);else i(i.P+i.F*(h||S),e,E);return E}},function(t,e,n){var r=n(5)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(9),i=n(36),o=n(96),s=n(99),a=n(24),u=n(34),c=Object.assign;t.exports=!c||n(17)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=a(t),c=arguments.length,l=1,p=o.f,h=s.f;c>l;)for(var f,d=u(arguments[l++]),g=p?i(d).concat(p(d)):i(d),y=g.length,_=0;y>_;)f=g[_++],r&&!h.call(d,f)||(n[f]=d[f]);return n}:c},function(t,e,n){var r=n(10),i=n(95),o=n(33),s=n(21)("IE_PROTO"),a=function(){},u="prototype",c=function(){var t,e=n(32)("iframe"),r=o.length,i="<",s=">";for(e.style.display="none",n(86).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+s+"document.F=Object"+i+"/script"+s),t.close(),c=t.F;r--;)delete c[u][o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[u]=r(t),n=new a,a[u]=null,n[s]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(13),i=n(10),o=n(36);t.exports=n(9)?Object.defineProperties:function(t,e){i(t);for(var n,s=o(e),a=s.length,u=0;a>u;)r.f(t,n=s[u++],e[n]);return t}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(11),i=n(24),o=n(21)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var r=n(11),i=n(39),o=n(82)(!1),s=n(21)("IE_PROTO");t.exports=function(t,e){var n,a=i(t),u=0,c=[];for(n in a)n!=s&&r(a,n)&&c.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(23),i=n(15);t.exports=function(t){return function(e,n){var o,s,a=String(i(e)),u=r(n),c=a.length;return u<0||u>=c?t?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):(o-55296<<10)+(s-56320)+65536)}}},function(t,e,n){var r=n(18);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(83),i=n(5)("iterator"),o=n(19);t.exports=n(6).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){"use strict";var r=n(31),i=n(16),o=n(24),s=n(89),a=n(88),u=n(40),c=n(84),l=n(102);i(i.S+i.F*!n(92)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,p,h=o(t),f="function"==typeof this?this:Array,d=arguments.length,g=d>1?arguments[1]:void 0,y=void 0!==g,_=0,m=l(h);if(y&&(g=r(g,d>2?arguments[2]:void 0,2)),void 0==m||f==Array&&a(m))for(e=u(h.length),n=new f(e);e>_;_++)c(n,_,y?g(h[_],_):h[_]);else for(p=m.call(h),n=new f;!(i=p.next()).done;_++)c(n,_,y?s(p,g,[i.value,_],!0):i.value);return n.length=_,n}})},function(t,e,n){var r=n(16);r(r.S+r.F,"Object",{assign:n(93)})},function(t,e,n){"use strict";var r=n(100)(!0);n(91)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(42),i=n(126),o=n(108),s=n(114),a=n(117),u=t.exports=function(t,e){var n,i,u,c,l;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],r(t)?(n=a.call(t,"c"),i=a.call(t,"e"),u=a.call(t,"w")):(n=u=!0,i=!1),l={value:e,configurable:n,enumerable:i,writable:u},c?o(s(c),l):l};u.gs=function(t,e,n){var u,c,l,p;return"string"!=typeof t?(l=n,n=e,e=t,t=null):l=arguments[3],r(e)?i(e)?r(n)?i(n)||(l=n,n=void 0):n=void 0:(l=e,e=n=void 0):e=void 0,r(t)?(u=a.call(t,"c"),c=a.call(t,"e")):(u=!0,c=!1),p={get:e,set:n,configurable:u,enumerable:c},l?o(s(l),p):p}},function(t,e){"use strict";t.exports=function(){}},function(t,e,n){"use strict";t.exports=n(109)()?Object.assign:n(110)},function(t,e){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,n){"use strict";var r=n(111),i=n(116),o=Math.max;t.exports=function(t,e){var n,s,a,u=o(arguments.length,2);for(t=Object(i(t)),a=function(r){try{t[r]=e[r]}catch(t){n||(n=t)}},s=1;s-1}},function(t,e,n){"use strict";var r,i,o,s,a,u,c,l=n(106),p=n(115),h=Function.prototype.apply,f=Function.prototype.call,d=Object.create,g=Object.defineProperty,y=Object.defineProperties,_=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var n;return p(e),_.call(this,"__ee__")?n=this.__ee__:(n=m.value=d(null),g(this,"__ee__",m),m.value=null),n[t]?"object"==typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},i=function(t,e){var n,i;return p(e),i=this,r.call(this,t,n=function(){o.call(i,t,n),h.call(e,this,arguments)}),n.__eeOnceListener__=e,this},o=function(t,e){var n,r,i,o;if(p(e),!_.call(this,"__ee__"))return this;if(n=this.__ee__,!n[t])return this;if(r=n[t],"object"==typeof r)for(o=0;i=r[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===r.length?n[t]=r[o?0:1]:r.splice(o,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},s=function(t){var e,n,r,i,o;if(_.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(n=arguments.length,o=new Array(n-1),e=1;ee.x?1:this.ye.y?1:0},I.prototype.clone=function(){},I.prototype.copy=function(){return new I(this)},I.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},I.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)},I.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},I.prototype.hashCode=function(){var t=17;return t=37*t+I.hashCode(this.x),t=37*t+I.hashCode(this.y)},I.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},I.prototype.interfaces_=function(){return[E,x,e]},I.prototype.getClass=function(){return I},I.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=v.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},N.DimensionalComparator.get=function(){return C},N.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},N.NULL_ORDINATE.get=function(){return v.NaN},N.X.get=function(){return 0},N.Y.get=function(){return 1},N.Z.get=function(){return 2},Object.defineProperties(I,N);var C=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new m("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};C.prototype.compare=function(t,e){var n=t,r=e,i=C.compare(n.x,r.x);if(0!==i)return i;var o=C.compare(n.y,r.y);return 0!==o?o:this._dimensionsToTest<=2?0:C.compare(n.z,r.z)},C.prototype.interfaces_=function(){return[w]},C.prototype.getClass=function(){return C},C.compare=function(t,e){return te?1:v.isNaN(t)?v.isNaN(e)?0:-1:v.isNaN(e)?1:0};var S=function(){};S.prototype.create=function(){},S.prototype.interfaces_=function(){return[]},S.prototype.getClass=function(){return S};var O=function(){},P={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};O.prototype.interfaces_=function(){return[]},O.prototype.getClass=function(){return O},O.toLocationSymbol=function(t){switch(t){case O.EXTERIOR:return"e";case O.BOUNDARY:return"b";case O.INTERIOR:return"i";case O.NONE:return"-"}throw new m("Unknown location value: "+t)},P.INTERIOR.get=function(){return 0},P.BOUNDARY.get=function(){return 1},P.EXTERIOR.get=function(){return 2},P.NONE.get=function(){return-1},Object.defineProperties(O,P);var T=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},R=function(){},L={LOG_10:{configurable:!0}};R.prototype.interfaces_=function(){return[]},R.prototype.getClass=function(){return R},R.log10=function(t){var e=Math.log(t);return v.isInfinite(e)?e:v.isNaN(e)?e:e/R.LOG_10},R.min=function(t,e,n,r){var i=t;return en?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],o=arguments[2];return ro?o:r}},R.wrap=function(t,e){return t<0?e- -t%e:t%e},R.max=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],u=i;return o>u&&(u=o),s>u&&(u=s),a>u&&(u=a),u}},R.average=function(t,e){return(t+e)/2},L.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(R,L);var A=function(t){this.str=t};A.prototype.append=function(t){this.str+=t},A.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},A.prototype.toString=function(t){return this.str};var D=function(t){this.value=t};D.prototype.intValue=function(){return this.value},D.prototype.compareTo=function(t){return this.valuet?1:0},D.isNaN=function(t){return Number.isNaN(t)};var M=function(){};M.isWhitespace=function(t){return t<=32&&t>=0||127===t},M.toUpperCase=function(t){return t.toUpperCase()};var F=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if("string"==typeof arguments[0]){var r=arguments[0];t.call(this,t.parse(r))}}else if(2===arguments.length){var i=arguments[0],o=arguments[1];this.init(i,o)}},k={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};F.prototype.le=function(t){return(this._hi9?(l=!0,p="9"):p="0"+c,s.append(p),n=n.subtract(F.valueOf(c)).multiply(F.TEN),l&&n.selfAdd(F.TEN);var h=!0,f=F.magnitude(n._hi);if(f<0&&Math.abs(f)>=a-u&&(h=!1),!h)break}return e[0]=r,s.toString()},F.prototype.sqr=function(){return this.multiply(this)},F.prototype.doubleValue=function(){return this._hi+this._lo},F.prototype.subtract=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},F.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},F.prototype.isZero=function(){return 0===this._hi&&0===this._lo},F.prototype.selfSubtract=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},F.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},F.prototype.min=function(t){return this.le(t)?this:t},F.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,s=null,a=null,u=null,c=null,l=null,p=null;return u=this._hi/n,c=F.SPLIT*u,i=c-u,p=F.SPLIT*n,i=c-i,o=u-i,s=p-n,l=u*n,s=p-s,a=n-s,p=i*s-l+i*a+o*s+o*a,c=(this._hi-l-p+this._lo-u*r)/n,p=u+c,this._hi=p,this._lo=u-p+c,this}},F.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},F.prototype.divide=function(){if(arguments[0]instanceof F){var t=arguments[0],e=null,n=null,r=null,i=null,o=null,s=null,a=null,u=null;return n=(o=this._hi/t._hi)-(e=(s=F.SPLIT*o)-(e=s-o)),u=e*(r=(u=F.SPLIT*t._hi)-(r=u-t._hi))-(a=o*t._hi)+e*(i=t._hi-r)+n*r+n*i,s=(this._hi-a-u+this._lo-o*t._lo)/t._hi,new F(u=o+s,o-u+s)}if("number"==typeof arguments[0]){var c=arguments[0];return v.isNaN(c)?F.createNaN():F.copy(this).selfDivide(c,0)}},F.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},F.prototype.pow=function(t){if(0===t)return F.valueOf(1);var e=new F(this),n=F.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2==1&&n.selfMultiply(e),(r/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},F.prototype.ceil=function(){if(this.isNaN())return F.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new F(t,e)},F.prototype.compareTo=function(t){var e=t;return this._hie._hi?1:this._loe._lo?1:0},F.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},F.prototype.setValue=function(){if(arguments[0]instanceof F){ +var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},F.prototype.max=function(t){return this.ge(t)?this:t},F.prototype.sqrt=function(){if(this.isZero())return F.valueOf(0);if(this.isNegative())return F.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=F.valueOf(e),r=this.subtract(n.sqr())._hi*(.5*t);return n.add(r)},F.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,r=null,i=null,o=null,s=null,a=null;return i=this._hi+e,s=i-this._hi,o=i-s,o=e-s+(this._hi-o),a=o+this._lo,n=i+a,r=a+(i-n),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(2===arguments.length){var u=arguments[0],c=arguments[1],l=null,p=null,h=null,f=null,d=null,g=null,y=null;f=this._hi+u,p=this._lo+c,d=f-(g=f-this._hi),h=p-(y=p-this._lo);var _=(l=f+(g=(d=u-g+(this._hi-d))+p))+(g=(h=c-y+(this._lo-h))+(g+(f-l))),m=g+(l-_);return this._hi=_,this._lo=m,this}},F.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,s=null,a=null,u=null,c=null;i=(u=F.SPLIT*this._hi)-this._hi,c=F.SPLIT*n,i=u-i,o=this._hi-i,s=c-n;var l=(u=this._hi*n)+(c=i*(s=c-s)-u+i*(a=n-s)+o*s+o*a+(this._hi*r+this._lo*n)),p=c+(i=u-l);return this._hi=l,this._lo=p,this}},F.prototype.selfSqr=function(){return this.selfMultiply(this)},F.prototype.floor=function(){if(this.isNaN())return F.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new F(t,e)},F.prototype.negate=function(){return this.isNaN()?this:new F(-this._hi,-this._lo)},F.prototype.clone=function(){},F.prototype.multiply=function(){if(arguments[0]instanceof F){var t=arguments[0];return t.isNaN()?F.createNaN():F.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return v.isNaN(e)?F.createNaN():F.copy(this).selfMultiply(e,0)}},F.prototype.isNaN=function(){return v.isNaN(this._hi)},F.prototype.intValue=function(){return Math.trunc(this._hi)},F.prototype.toString=function(){var t=F.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},F.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if("."===n.charAt(0))i="0"+n;else if(r<0)i="0."+F.stringOfChar("0",-r)+n;else if(-1===n.indexOf(".")){var o=r-n.length;i=n+F.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+i:i},F.prototype.reciprocal=function(){var t=null,e=null,n=null,r=null,i=null,o=null,s=null,a=null;e=(i=1/this._hi)-(t=(o=F.SPLIT*i)-(t=o-i)),n=(a=F.SPLIT*this._hi)-this._hi;var u=i+(o=(1-(s=i*this._hi)-(a=t*(n=a-n)-s+t*(r=this._hi-n)+e*n+e*r)-i*this._lo)/this._hi);return new F(u,i-u+o)},F.prototype.toSciNotation=function(){if(this.isZero())return F.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=F.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var o=n.charAt(0)+"."+i;return this.isNegative()?"-"+o+r:o+r},F.prototype.abs=function(){return this.isNaN()?F.NaN:this.isNegative()?this.negate():new F(this)},F.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},F.prototype.lt=function(t){return(this._hit._hi||this._hi===t._hi)&&this._lo>t._lo},F.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},F.prototype.trunc=function(){return this.isNaN()?F.NaN:this.isPositive()?this.floor():this.ceil()},F.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},F.prototype.interfaces_=function(){return[e,E,x]},F.prototype.getClass=function(){return F},F.sqr=function(t){return F.valueOf(t).selfMultiply(t)},F.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return F.parse(t)}if("number"==typeof arguments[0]){var e=arguments[0];return new F(e)}},F.sqrt=function(t){return F.valueOf(t).sqrt()},F.parse=function(t){for(var e=0,n=t.length;M.isWhitespace(t.charAt(e));)e++;var r=!1;if(e=n);){var c=t.charAt(e);if(e++,M.isDigit(c)){var l=c-"0";o.selfMultiply(F.TEN),o.selfAdd(l),s++}else{if("."!==c){if("e"===c||"E"===c){var p=t.substring(e);try{u=D.parseInt(p)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+p+" in string "+t):e}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}a=s}}var h=o,f=s-a-u;if(0===f)h=o;else if(f>0){var d=F.TEN.pow(f);h=o.divide(d)}else if(f<0){var g=F.TEN.pow(-f);h=o.multiply(g)}return r?h.negate():h},F.createNaN=function(){return new F(v.NaN,v.NaN)},F.copy=function(t){return new F(t)},F.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n));return 10*Math.pow(10,r)<=e&&(r+=1),r},F.stringOfChar=function(t,e){for(var n=new A,r=0;r0){if(o<=0)return j.signum(s);r=i+o}else{if(!(i<0))return j.signum(s);if(o>=0)return j.signum(s);r=-i-o}var a=j.DP_SAFE_EPSILON*r;return s>=a||-s>=a?j.signum(s):2},j.signum=function(t){return t>0?1:t<0?-1:0},G.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(j,G);var U=function(){},B={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};B.X.get=function(){return 0},B.Y.get=function(){return 1},B.Z.get=function(){return 2},B.M.get=function(){return 3},U.prototype.setOrdinate=function(t,e,n){},U.prototype.size=function(){},U.prototype.getOrdinate=function(t,e){},U.prototype.getCoordinate=function(){},U.prototype.getCoordinateCopy=function(t){},U.prototype.getDimension=function(){},U.prototype.getX=function(t){},U.prototype.clone=function(){},U.prototype.expandEnvelope=function(t){},U.prototype.copy=function(){},U.prototype.getY=function(t){},U.prototype.toCoordinateArray=function(){},U.prototype.interfaces_=function(){return[x]},U.prototype.getClass=function(){return U},Object.defineProperties(U,B);var q=function(){},V=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(q),z=function(){};z.arraycopy=function(t,e,n,r,i){for(var o=0,s=e;st._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,r=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}},Y.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof Y){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxxthis._maxy||t._maxythis._maxx||nthis._maxy||rthis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(nthis._maxx&&(this._maxx=n),rthis._maxy&&(this._maxy=r))}},Y.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te._minx?1:this._minye._miny?1:this._maxxe._maxx?1:this._maxye._maxy?1:0},Y.prototype.translate=function(t,e){return this.isNull()?null:void this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},Y.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},Y.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},Y.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},Y.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},Y.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},Y.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof Y){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof I){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},Y.prototype.centre=function(){return this.isNull()?null:new I((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},Y.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof I){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof Y){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];it._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxyt._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},Y.prototype.hashCode=function(){var t=17;return t=37*t+I.hashCode(this._minx),t=37*t+I.hashCode(this._maxx),t=37*t+I.hashCode(this._miny),t=37*t+I.hashCode(this._maxy)},Y.prototype.interfaces_=function(){return[E,e]},Y.prototype.getClass=function(){return Y},Y.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],s=arguments[3],a=Math.min(o.x,s.x),u=Math.max(o.x,s.x),c=Math.min(r.x,i.x),l=Math.max(r.x,i.x);return!(c>u||lu||lthis.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},nt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},nt.prototype.setPrecisionModel=function(t){this._precisionModel=t},nt.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;ei?r:i;else{var s=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);0!==(o=r>i?s:a)||t.equals(e)||(o=Math.max(s,a))}return et.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o},nt.nonRobustComputeEdgeDistance=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,o=Math.sqrt(r*r+i*i);return et.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o},rt.DONT_INTERSECT.get=function(){return 0},rt.DO_INTERSECT.get=function(){return 1},rt.COLLINEAR.get=function(){return 2},rt.NO_INTERSECTION.get=function(){return 0},rt.POINT_INTERSECTION.get=function(){return 1},rt.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(nt,rt);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.isInSegmentEnvelopes=function(t){var e=new Y(this._inputLines[0][0],this._inputLines[0][1]),n=new Y(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],r=arguments[2];return this._isProper=!1,Y.intersects(n,r,e)&&0===at.orientationIndex(n,r,e)&&0===at.orientationIndex(r,n,e)?(this._isProper=!0,(e.equals(n)||e.equals(r))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null):void(this._result=t.NO_INTERSECTION)},e.prototype.normalizeToMinimum=function(t,e,n,r,i){i.x=this.smallestInAbsValue(t.x,e.x,n.x,r.x),i.y=this.smallestInAbsValue(t.y,e.y,n.y,r.y),t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},e.prototype.safeHCoordinateIntersection=function(t,n,r,i){var o=null;try{o=X.intersection(t,n,r,i)}catch(s){if(!(s instanceof V))throw s;o=e.nearestEndpoint(t,n,r,i)}return o},e.prototype.intersection=function(t,n,r,i){var o=this.intersectionWithNormalization(t,n,r,i);return this.isInSegmentEnvelopes(o)||(o=new I(e.nearestEndpoint(t,n,r,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,r){var i=t,o=Math.abs(i);return Math.abs(e)1e-4&&z.out.println("Distance = "+i.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,r){var i=new I(t),o=new I(e),s=new I(n),a=new I(r),u=new I;this.normalizeToEnvCentre(i,o,s,a,u);var c=this.safeHCoordinateIntersection(i,o,s,a);return c.x+=u.x,c.y+=u.y,c},e.prototype.computeCollinearIntersection=function(e,n,r,i){var o=Y.intersects(e,n,r),s=Y.intersects(e,n,i),a=Y.intersects(r,i,e),u=Y.intersects(r,i,n);return o&&s?(this._intPt[0]=r,this._intPt[1]=i,t.COLLINEAR_INTERSECTION):a&&u?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&a?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||s||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&u?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||s||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&a?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||o||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&u?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||o||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,r,i){var o=t.xe.x?t.x:e.x,u=t.y>e.y?t.y:e.y,c=n.xr.x?n.x:r.x,h=n.y>r.y?n.y:r.y,f=((o>c?o:c)+(al?s:l)+(u0&&s>0||o<0&&s<0)return t.NO_INTERSECTION;var a=at.orientationIndex(r,i,e),u=at.orientationIndex(r,i,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,r,i):(0===o||0===s||0===a||0===u?(this._isProper=!1,e.equals2D(r)||e.equals2D(i)?this._intPt[0]=e:n.equals2D(r)||n.equals2D(i)?this._intPt[0]=n:0===o?this._intPt[0]=new I(r):0===s?this._intPt[0]=new I(i):0===a?this._intPt[0]=new I(e):0===u&&(this._intPt[0]=new I(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,r,i)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,r){var i=t,o=at.distancePointLine(t,n,r),s=at.distancePointLine(e,n,r);return s0?n>0?-i:i:n>0?i:-i;if(0===e||0===n)return r>0?t>0?i:-i:t>0?-i:i;if(e>0?r>0?e<=r||(i=-i,o=t,t=n,n=o,o=e,e=r,r=o):e<=-r?(i=-i,n=-n,r=-r):(o=t,t=-n,n=o,o=e,e=-r,r=o):r>0?-e<=r?(i=-i,t=-t,e=-e):(o=-t,t=n, +n=o,o=-e,e=r,r=o):e>=r?(t=-t,e=-e,n=-n,r=-r):(i=-i,o=-t,t=-n,n=o,o=-e,e=-r,r=o),t>0){if(!(n>0))return i;if(!(t<=n))return i}else{if(n>0)return-i;if(!(t>=n))return-i;i=-i,t=-t,n=-n}for(;;){if(s=Math.floor(n/t),n-=s*t,(r-=s*e)<0)return-i;if(r>e)return i;if(t>n+n){if(er+r)return-i;n=t-n,r=e-r,i=-i}if(0===r)return 0===n?0:-i;if(0===n)return i;if(s=Math.floor(t/n),t-=s*n,(e-=s*r)<0)return i;if(e>r)return-i;if(n>t+t){if(re+e)return i;t=n-t,e=r-e,i=-i}if(0===e)return 0===t?0:i;if(0===t)return-i}};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.xr&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=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(i,o,s,a);if(0===u)return this._isPointOnSegment=!0,null;a0&&this._crossingCount++}},st.prototype.isPointInPolygon=function(){return this.getLocation()!==O.EXTERIOR},st.prototype.getLocation=function(){return this._isPointOnSegment?O.BOUNDARY:this._crossingCount%2==1?O.INTERIOR:O.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 I&&T(arguments[1],U)){for(var t=arguments[0],e=arguments[1],n=new st(t),r=new I,i=new I,o=1;o1||a<0||a>1)&&(i=!0)}}else i=!0;return i?R.min(at.distancePointLine(t,n,r),at.distancePointLine(e,n,r),at.distancePointLine(n,t,e),at.distancePointLine(r,t,e)):0},at.isPointInRing=function(t,e){return at.locatePointInRing(t,e)!==O.EXTERIOR},at.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new I;t.getCoordinate(0,r);for(var i=r.x,o=r.y,s=1;sn.y&&(n=o,r=i)}var s=r;do(s-=1)<0&&(s=e);while(t[s].equals2D(n)&&s!==r);var a=r;do a=(a+1)%e;while(t[a].equals2D(n)&&a!==r);var u=t[s],c=t[a];if(u.equals2D(n)||c.equals2D(n)||u.equals2D(c))return!1;var l=at.computeOrientation(u,n,c),p=!1;return p=0===l?u.x>c.x:l>0},at.locatePointInRing=function(t,e){return st.locatePointInRing(t,e)},at.distancePointLinePerpendicular=function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)},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]),r=0;r=1)return o.distance(a);var l=((s.y-o.y)*(a.x-s.x)-(s.x-o.x)*(a.y-s.y))/u;return Math.abs(l)*Math.sqrt(u)}},at.isOnLine=function(t,e){for(var n=new it,r=1;r0},_t.prototype.interfaces_=function(){return[dt]},_t.prototype.getClass=function(){return _t};var mt=function(){};mt.prototype.isInBoundary=function(t){return t>1},mt.prototype.interfaces_=function(){return[dt]},mt.prototype.getClass=function(){return mt};var vt=function(){};vt.prototype.isInBoundary=function(t){return 1===t},vt.prototype.interfaces_=function(){return[dt]},vt.prototype.getClass=function(){return vt};var bt=function(){};bt.prototype.add=function(){},bt.prototype.addAll=function(){},bt.prototype.isEmpty=function(){},bt.prototype.iterator=function(){},bt.prototype.size=function(){},bt.prototype.toArray=function(){},bt.prototype.remove=function(){},(n.prototype=new Error).name="IndexOutOfBoundsException";var Et=function(){};Et.prototype.hasNext=function(){},Et.prototype.next=function(){},Et.prototype.remove=function(){};var xt=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}(bt);(r.prototype=new Error).name="NoSuchElementException";var wt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof bt&&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,bt]},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 It(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(i))return null;t.prototype.add.call(this,i)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],s=arguments[1];return this.add(o,s),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var a=arguments[0],u=arguments[1];if(arguments[2])for(var c=0;c=0;l--)this.add(a[l],u);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof I){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=y;v!==_;v+=m)this.add(d[v],g);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new I(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(wt),Ct=function(){},St={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};St.ForwardComparator.get=function(){return Ot},St.BidirectionalComparator.get=function(){return Pt},St.coordArrayType.get=function(){return new Array(0).fill(null)},Ct.prototype.interfaces_=function(){return[]},Ct.prototype.getClass=function(){return Ct},Ct.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},Ct.ptNotInList=function(t,e){for(var n=0;n=t?e:[]},Ct.indexOf=function(t,e){for(var n=0;n0)&&(e=t[n]);return e},Ct.extract=function(t,e,n){e=R.clamp(e,0,t.length);var r=(n=R.clamp(n,-1,t.length))-e+1;n<0&&(r=0),e>=t.length&&(r=0),nr.length)return 1;if(0===n.length)return 0;var i=Ct.compare(n,r);return Ct.isEqualReversed(n,r)?0:i},Pt.prototype.OLDcompare=function(t,e){var n=t,r=e;if(n.lengthr.length)return 1;if(0===n.length)return 0;for(var i=Ct.increasingDirection(n),o=Ct.increasingDirection(r),s=i>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,r,i=this.root_;do if(n=i,(r=t.compareTo(i.key))<0)i=i.left;else{if(!(r>0)){var o=i.value;return i.value=e,o}i=i.right}while(null!==i);var s={key:t,left:null,right:null,value:e,parent:n,color:Dt,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null},p.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(a(t)===c(a(a(t)))){var e=l(a(a(t)));1===s(e)?(u(a(t),Dt),u(e,Dt),u(a(a(t)),1),t=a(a(t))):(t===l(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=c(a(a(t)));1===s(n)?(u(a(t),Dt),u(n,Dt),u(a(a(t)),1),t=a(a(t))):(t===c(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 wt,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 Lt,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,r=t;null!==n&&r===n.right;)r=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=i.substring(0,o);r.add(s),o=(i=i.substring(o+n)).indexOf(e)}i.length>0&&r.add(i);for(var a=new Array(r.size()).fill(null),u=0;u0)for(var o=i;o0&&r.append(" ");for(var o=0;o0&&r.append(","),r.append(Yt.toString(t.getOrdinate(i,o)))}return r.append(")"),r.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 r=t.create(n,e.getDimension()),i=e.size();Wt.copy(e,0,r,0,i);for(var o=i;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()?jt.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}($t),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 lt.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[re.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 $t?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Kt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},ae.prototype.interfaces_=function(){return[re.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&&(r=3),r<2?new ue(n):new ue(n,r)}},le.prototype.interfaces_=function(){return[S,e]},le.prototype.getClass=function(){return le},le.instance=function(){return le.instanceObject},pe.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},pe.instanceObject.get=function(){return new le},Object.defineProperties(le,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 wt,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 Lt;return this.map_.entries().forEach(function(e){return t.add(e)}),t},e.prototype.size=function(){return this.map_.size()},e}(Tt),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 ge){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}},de={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(),r=e.getMaximumSignificantDigits();return new D(n).compareTo(new D(r))},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)?t:this._modelType===fe.FLOATING_SINGLE?t:this._modelType===fe.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof I){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,E]},fe.prototype.getClass=function(){return fe},fe.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},de.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},de.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(fe,de);var ge=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},ye={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ge.prototype.readResolve=function(){return ge.nameToTypeMap.get(this._name)},ge.prototype.toString=function(){return this._name},ge.prototype.interfaces_=function(){return[e]},ge.prototype.getClass=function(){return ge},ye.serialVersionUID.get=function(){return-552860263173159e4},ye.nameToTypeMap.get=function(){return new he},Object.defineProperties(ge,ye),fe.Type=ge,fe.FIXED=new ge("FIXED"),fe.FLOATING=new ge("FLOATING"),fe.FLOATING_SINGLE=new ge("FLOATING SINGLE");var _e=function t(){this._precisionModel=new fe,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?T(arguments[0],S)?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 I(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new I(t.getMinX(),t.getMinY()),new I(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new I(t.getMinX(),t.getMinY()),new I(t.getMinX(),t.getMaxY()),new I(t.getMaxX(),t.getMaxY()),new I(t.getMaxX(),t.getMinY()),new I(t.getMinX(),t.getMinY())]),null)},_e.prototype.createLineString=function(t){return t?t instanceof Array?new $t(this.getCoordinateSequenceFactory().create(t),this):T(t,U)?new $t(t,this):void 0:new $t(this.getCoordinateSequenceFactory().create([]),this)},_e.prototype.createMultiLineString=function(){if(0===arguments.length)return new Vt(null,this);if(1===arguments.length){var t=arguments[0];return new Vt(t,this)}},_e.prototype.buildGeometry=function(t){for(var e=null,n=!1,r=!1,i=t.iterator();i.hasNext();){var o=i.next(),s=o.getClass();null===e&&(e=s),s!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(r=!0)}if(null===e)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(_e.toGeometryArray(t));var a=t.iterator().next();if(t.size()>1){if(a instanceof Zt)return this.createMultiPolygon(_e.toPolygonArray(t));if(a instanceof $t)return this.createMultiLineString(_e.toLineStringArray(t));if(a instanceof Kt)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 I){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(T(arguments[0],U)){var e=arguments[0];return new Kt(e,this)}}},_e.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},_e.prototype.createPolygon=function(){if(0===arguments.length)return new Zt(null,null,this);if(1===arguments.length){if(T(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){var r=arguments[0],i=arguments[1];return new Zt(r,i,this)}},_e.prototype.getSRID=function(){return this._SRID},_e.prototype.createGeometryCollection=function(){if(0===arguments.length)return new qt(null,this);if(1===arguments.length){var t=arguments[0];return new qt(t,this)}},_e.prototype.createGeometry=function(t){return new re(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(T(arguments[0],U)){var e=arguments[0];return new ee(e,this)}}},_e.prototype.createMultiPolygon=function(){if(0===arguments.length)return new ne(null,this);if(1===arguments.length){var t=arguments[0];return new ne(t,this)}},_e.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new te(t,this)}if(arguments[0]instanceof Array){var e=arguments[0];return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(T(arguments[0],U)){var n=arguments[0];if(null===n)return this.createMultiPoint(new Array(0).fill(null));for(var r=new Array(n.size()).fill(null),i=0;i=this.size())throw new Error;return this.array_[t]},y.prototype.push=function(t){return this.array_.push(t),t},y.prototype.pop=function(t){if(0===this.array_.length)throw new g;return this.array_.pop()},y.prototype.peek=function(){if(0===this.array_.length)throw new g;return this.array_[this.array_.length-1]},y.prototype.empty=function(){return 0===this.array_.length},y.prototype.isEmpty=function(){return this.empty()},y.prototype.search=function(t){return this.array_.indexOf(t)},y.prototype.size=function(){return this.array_.length},y.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&r===at.CLOCKWISE&&(i=!0),i&&(this._minIndex=this._minIndex-1)},Se.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 r=Ne.LEFT;return n[e].ythis._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},Se.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)},Se.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)===Ne.LEFT&&(this._orientedDe=this._minDe.getSym())},Se.prototype.interfaces_=function(){return[]},Se.prototype.getClass=function(){return Se};var Oe=function(t){function e(n,r){t.call(this,e.msgWithCoord(n,r)),this.pt=r?new I(r):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}(Z),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 Te=function(){this._finder=null,this._dirEdgeList=new wt,this._nodes=new wt,this._rightMostCoord=null,this._env=null,this._finder=new Se};Te.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},Te.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Te.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){e=r;break}}if(null===e)throw new Oe("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var i=t.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}},Te.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Ne.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Te.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Te.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Ne.RIGHT)>=1&&e.getDepth(Ne.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Te.prototype.computeDepths=function(t){var e=new Lt,n=new Pe,r=t.getNode();for(n.addLast(r),e.add(r),t.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();e.add(i),this.computeNodeDepth(i);for(var o=i.getEdges().iterator();o.hasNext();){var s=o.next().getSym();if(!s.isVisited()){var a=s.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}},Te.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0},Te.prototype.getEnvelope=function(){if(null===this._env){for(var t=new Y,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),r=0;rthis.location.length){var e=new Array(3).fill(null);e[Ne.ON]=this.location[Ne.ON],e[Ne.LEFT]=O.NONE,e[Ne.RIGHT]=O.NONE,this.location=e}for(var n=0;n1&&t.append(O.toLocationSymbol(this.location[Ne.LEFT])),t.append(O.toLocationSymbol(this.location[Ne.ON])),this.location.length>1&&t.append(O.toLocationSymbol(this.location[Ne.RIGHT])),t.toString()},Re.prototype.setLocations=function(t,e,n){this.location[Ne.ON]=t,this.location[Ne.LEFT]=e,this.location[Ne.RIGHT]=n},Re.prototype.get=function(t){return t1},Re.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 r=t.getCoordinates();if(e){var i=1;n&&(i=0);for(var o=i;o=0;a--)this._pts.add(r[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[0],n=arguments[1],r=e.getLocation(n,Ne.RIGHT);if(r===O.NONE)return null;if(this._label.getLocation(n)===O.NONE)return this._label.setLocation(n,r),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 ke=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 Le(0,O.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=O.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var r=t.getLocation(e);n!==O.BOUNDARY&&(n=r)}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 Le(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 Le)for(var n=arguments[0],r=0;r<2;r++){ +var i=this.computeMergedLocation(n,r);this._label.getLocation(r)===O.NONE&&this._label.setLocation(r,i)}},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=O.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case O.BOUNDARY:n=O.INTERIOR;break;case O.INTERIOR:default:n=O.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Fe),je=function(){this.nodeMap=new p,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};je.prototype.find=function(t){return this.nodeMap.get(t)},je.prototype.addNode=function(){if(arguments[0]instanceof I){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 ke){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return null===r?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}},je.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},je.prototype.iterator=function(){return this.nodeMap.values().iterator()},je.prototype.values=function(){return this.nodeMap.values()},je.prototype.getBoundaryNodes=function(t){for(var e=new wt,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===O.BOUNDARY&&e.add(r)}return e},je.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var Ge=function(){},Ue={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Ge.prototype.interfaces_=function(){return[]},Ge.prototype.getClass=function(){return Ge},Ge.isNorthern=function(t){return t===Ge.NE||t===Ge.NW},Ge.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},Ge.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=te?t:e)?3:n},Ge.isInHalfPlane=function(t,e){return e===Ge.SE?t===Ge.SE||t===Ge.SW:t===e||t===e+1},Ge.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?Ge.NE:Ge.SE:e>=0?Ge.NW:Ge.SW}if(arguments[0]instanceof I&&arguments[1]instanceof I){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new m("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?Ge.NE:Ge.SE:r.y>=n.y?Ge.NW:Ge.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(Ge,Ue);var Be=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],r=arguments[2];this._edge=e,this.init(n,r),this._label=null}else if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this._edge=i,this.init(o,s),this._label=a}};Be.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 r.add(o)}return r},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 wt,n=t.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&null===r.getEdgeRing()){var i=new Me(r,this._geometryFactory);e.add(i),i.setInResult()}}return e},Xe.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}},Xe.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},Xe.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),o=null,s=null,a=e.iterator();a.hasNext();){var u=a.next(),c=u.getLinearRing(),l=c.getEnvelopeInternal();null!==o&&(s=o.getLinearRing().getEnvelopeInternal());var p=!1;l.contains(r)&&at.isPointInRing(i,c.getCoordinates())&&(p=!0),p&&(null===o||s.contains(l))&&(o=u)}return o},Xe.prototype.findShell=function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,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];ze.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new wt,o=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var Ye=function(){};Ye.prototype.getBounds=function(){},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye};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[Ye,e]},He.prototype.getClass=function(){return He};var We=function(){this._size=null,this._items=null,this._size=0,this._items=new wt,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 $e=function(){};$e.prototype.visitItem=function(t){},$e.prototype.interfaces_=function(){return[]},$e.prototype.getClass=function(){return $e};var Qe=function(){};Qe.prototype.insert=function(t,e){},Qe.prototype.remove=function(t,e){},Qe.prototype.query=function(){},Qe.prototype.interfaces_=function(){return[]},Qe.prototype.getClass=function(){return Qe};var Ke=function(){if(this._childBoundables=new wt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},Je={serialVersionUID:{configurable:!0}};Ke.prototype.getLevel=function(){return this._level},Ke.prototype.size=function(){return this._childBoundables.size()},Ke.prototype.getChildBoundables=function(){return this._childBoundables},Ke.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},Ke.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Ke.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Ke.prototype.interfaces_=function(){return[Ye,e]},Ke.prototype.getClass=function(){return Ke},Je.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Ke,Je);var Ze=function(){};Ze.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},Ze.min=function(t){return Ze.sort(t),t.get(0)},Ze.sort=function(t,e){var n=t.toArray();e?kt.sort(n,e):kt.sort(n);for(var r=t.iterator(),i=0,o=n.length;itn.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(r)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,r){for(var i=t.getChildBoundables().iterator();i.hasNext();){var o=i.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 Ke?t+=this.size(n):n instanceof He&&(t+=1)}return t}},en.prototype.removeItem=function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof He&&i.getItem()===e&&(n=i)}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 wt:t}if(1===arguments.length){for(var e=arguments[0],n=new wt,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();if(i instanceof Ke){var o=this.itemsTree(i);null!==o&&n.add(o)}else i instanceof He?n.add(i.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 wt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];if(et.isTrue(n>-2),r.getLevel()===n)return i.add(r),null;for(var o=r.getChildBoundables().iterator();o.hasNext();){var s=o.next();s instanceof Ke?this.boundablesAtLevel(n,s,i):(et.isTrue(s instanceof He),-1===n&&i.add(s))}return null}},en.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new wt;return this.isEmpty()?e:(this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e)}if(2===arguments.length){var n=arguments[0],r=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,r)}else if(3===arguments.length)if(T(arguments[2],$e)&&arguments[0]instanceof Object&&arguments[1]instanceof Ke)for(var i=arguments[0],o=arguments[1],s=arguments[2],a=o.getChildBoundables(),u=0;ut&&(t=r)}}return t+1}},en.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var n=new wt;n.add(this.createNode(e));var r=new wt(t);Ze.sort(r,this.getComparator());for(var i=r.iterator();i.hasNext();){var o=i.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},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 wt,r=0;r0;){var p=l.poll(),h=p.getDistance();if(h>=u)break;p.isLeaves()?(u=h,c=p):p.expandToQueue(l,u)}return[c.getBoundable(0).getItem(),c.getBoundable(1).getItem()]}}else if(3===arguments.length){var f=arguments[0],d=arguments[1],g=arguments[2],y=new He(f,d),_=new tn(this.getRoot(),y,g);return this.nearestNeighbour(_)[0]}},n.prototype.interfaces_=function(){return[Qe,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())},r.STRtreeNode.get=function(){return an},r.serialVersionUID.get=function(){return 0x39920f7d5f261e0},r.xComparator.get=function(){return{interfaces_:function(){return[w]},compare:function(e,r){return t.compareDoubles(n.centreX(e.getBounds()),n.centreX(r.getBounds()))}}},r.yComparator.get=function(){return{interfaces_:function(){return[w]},compare:function(e,r){return t.compareDoubles(n.centreY(e.getBounds()),n.centreY(r.getBounds()))}}},r.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},r.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,r),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 Y(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ke),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 r=un.relativeSign(e.x,n.x),i=un.relativeSign(e.y,n.y);switch(t){case 0:return un.compareValue(r,i);case 1:return un.compareValue(i,r);case 2:return un.compareValue(i,-r);case 3:return un.compareValue(-r,i);case 4:return un.compareValue(-r,-i);case 5:return un.compareValue(-i,-r);case 6:return un.compareValue(-i,r);case 7:return un.compareValue(r,-i)}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 cn=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._segString=t,this.coord=new I(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))};cn.prototype.getCoordinate=function(){return this.coord},cn.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},cn.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)},cn.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},cn.prototype.isInterior=function(){return this._isInterior},cn.prototype.interfaces_=function(){return[E]},cn.prototype.getClass=function(){return cn};var ln=function(){this._nodeMap=new p,this._edge=null;var t=arguments[0];this._edge=t};ln.prototype.getSplitCoordinates=function(){var t=new Nt;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next();this.addEdgeCoordinates(n,r,t),n=r}return t.toCoordinateArray()},ln.prototype.addCollapsedNodes=function(){var t=new wt;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)}},ln.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},ln.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}if(arguments[0]instanceof I&&arguments[1]instanceof I){var i=arguments[0],o=arguments[1],s=o.x-i.x,a=o.y-i.y;if(0===s&&0===a)throw new m("Cannot compute the octant for two identical points "+i);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 dn=function(){this._nodeList=new ln(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};dn.prototype.getCoordinates=function(){return this._pts},dn.prototype.size=function(){return this._pts.length},dn.prototype.getCoordinate=function(t){return this._pts[t]},dn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},dn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},dn.prototype.setData=function(t){this._data=t},dn.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:pn.octant(t,e)},dn.prototype.getData=function(){return this._data},dn.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[0],r=arguments[1],i=arguments[3],o=new I(n.getIntersection(i));this.addIntersection(o,r)}},dn.prototype.toString=function(){return J.toLineString(new ue(this._pts))},dn.prototype.getNodeList=function(){return this._nodeList},dn.prototype.addIntersectionNode=function(t,e){var n=e,r=n+1;if(r=0&&n>=0?Math.max(e,n):e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof I){var r=arguments[0];return at.orientationIndex(this.p0,this.p1,r)}},gn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},gn.prototype.isVertical=function(){return this.p0.x===this.p1.x},gn.prototype.equals=function(t){if(!(t instanceof gn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},gn.prototype.intersection=function(t){var e=new it;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},gn.prototype.project=function(){if(arguments[0]instanceof I){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new I(t);var e=this.projectionFactor(t),n=new I;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 gn){var r=arguments[0],i=this.projectionFactor(r.p0),o=this.projectionFactor(r.p1);if(i>=1&&o>=1)return null;if(i<=0&&o<=0)return null;var s=this.project(r.p0);i<0&&(s=this.p0),i>1&&(s=this.p1);var a=this.project(r.p1);return o<0&&(a=this.p0),o>1&&(a=this.p1),new gn(s,a)}},gn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},gn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},gn.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},gn.prototype.distancePerpendicular=function(t){return at.distancePointLinePerpendicular(t,this.p0,this.p1)},gn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},gn.prototype.midPoint=function(){return gn.midPoint(this.p0,this.p1)},gn.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,r=e*e+n*n;return r<=0?v.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r},gn.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),r=v.MAX_VALUE,i=null,o=this.closestPoint(t.p0);r=o.distance(t.p0),n[0]=o,n[1]=t.p0;var s=this.closestPoint(t.p1);(i=s.distance(t.p1))0&&e<1?this.project(t):this.p0.distance(t)1||v.isNaN(e))&&(e=1),e},gn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},gn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},gn.prototype.distance=function(){if(arguments[0]instanceof gn){var t=arguments[0];return at.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof I){var e=arguments[0];return at.distancePointLine(e,this.p0,this.p1)}},gn.prototype.pointAlong=function(t){var e=new I;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},gn.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))},gn.prototype.interfaces_=function(){return[E,e]},gn.prototype.getClass=function(){return gn},gn.midPoint=function(t,e){return new I((t.x+e.x)/2,(t.y+e.y)/2)},yn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(gn,yn);var _n=function(){this.tempEnv1=new Y,this.tempEnv2=new Y,this._overlapSeg1=new gn,this._overlapSeg2=new gn};_n.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(r,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],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r};mn.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},mn.prototype.computeSelect=function(t,e,n,r){var i=this._pts[e],o=this._pts[n];if(r.tempEnv1.init(i,o),n-e==1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var s=Math.trunc((e+n)/2);e=t.length-1)return t.length-1;for(var r=Ge.quadrant(t[n],t[n+1]),i=e+1;in.getId()&&(n.computeOverlaps(i,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return wn},Object.defineProperties(e,n),e}(En),wn=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[0],n=arguments[1],r=arguments[2],i=arguments[3],o=e.getContext(),s=r.getContext();this._si.processIntersections(o,n,s,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(_n),In=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],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(s),this.setMitreLimit(a)}},Nn={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}};In.prototype.getEndCapStyle=function(){return this._endCapStyle},In.prototype.isSingleSided=function(){return this._isSingleSided},In.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=In.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=In.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==In.JOIN_ROUND&&(this._quadrantSegments=In.DEFAULT_QUADRANT_SEGMENTS)},In.prototype.getJoinStyle=function(){return this._joinStyle},In.prototype.setJoinStyle=function(t){this._joinStyle=t},In.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},In.prototype.getSimplifyFactor=function(){return this._simplifyFactor},In.prototype.getQuadrantSegments=function(){return this._quadrantSegments},In.prototype.setEndCapStyle=function(t){this._endCapStyle=t},In.prototype.getMitreLimit=function(){return this._mitreLimit},In.prototype.setMitreLimit=function(t){this._mitreLimit=t},In.prototype.setSingleSided=function(t){this._isSingleSided=t},In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In},In.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Nn.CAP_ROUND.get=function(){return 1},Nn.CAP_FLAT.get=function(){return 2},Nn.CAP_SQUARE.get=function(){return 3},Nn.JOIN_ROUND.get=function(){return 1},Nn.JOIN_MITRE.get=function(){return 2},Nn.JOIN_BEVEL.get=function(){return 3},Nn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Nn.DEFAULT_MITRE_LIMIT.get=function(){return 5},Nn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(In,Nn);var Cn=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=at.COUNTERCLOCKWISE,this._inputLine=t||null},Sn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Cn.prototype.isDeletable=function(t,e,n,r){var i=this._inputLine[t],o=this._inputLine[e],s=this._inputLine[n];return!!this.isConcave(i,o,s)&&!!this.isShallow(i,o,s,r)&&this.isShallowSampled(i,o,t,n,r)},Cn.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),r=!1;n=0;r--)this.addPt(t[r])},On.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-=Tn.PI_TIMES_2;for(;t<=-Math.PI;)t+=Tn.PI_TIMES_2;return t},Tn.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],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}},Tn.isAcute=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)>0},Tn.isObtuse=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)<0},Tn.interiorAngle=function(t,e,n){var r=Tn.angle(e,t),i=Tn.angle(e,n);return Math.abs(i-r)},Tn.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Tn.PI_TIMES_2;t>=Tn.PI_TIMES_2&&(t=0)}else{for(;t>=Tn.PI_TIMES_2;)t-=Tn.PI_TIMES_2;t<0&&(t=0)}return t},Tn.angleBetween=function(t,e,n){var r=Tn.angle(e,t),i=Tn.angle(e,n);return Tn.diff(r,i)},Tn.diff=function(t,e){var n=null;return(n=tMath.PI&&(n=2*Math.PI-n),n},Tn.toRadians=function(t){return t*Math.PI/180},Tn.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Tn.COUNTERCLOCKWISE:n<0?Tn.CLOCKWISE:Tn.NONE},Tn.angleBetweenOriented=function(t,e,n){var r=Tn.angle(e,t),i=Tn.angle(e,n)-r;return i<=-Math.PI?i+Tn.PI_TIMES_2:i>Math.PI?i-Tn.PI_TIMES_2:i},Rn.PI_TIMES_2.get=function(){return 2*Math.PI},Rn.PI_OVER_2.get=function(){return Math.PI/2},Rn.PI_OVER_4.get=function(){return Math.PI/4},Rn.COUNTERCLOCKWISE.get=function(){return at.COUNTERCLOCKWISE},Rn.CLOCKWISE.get=function(){return at.CLOCKWISE},Rn.NONE.get=function(){return at.COLLINEAR},Object.defineProperties(Tn,Rn);var Ln=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 gn,this._seg1=new gn,this._offset0=new gn,this._offset1=new gn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new it,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===In.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},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}};Ln.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),r=n===at.CLOCKWISE&&this._side===Ne.LEFT||n===at.COUNTERCLOCKWISE&&this._side===Ne.RIGHT;0===n?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Ln.prototype.addLineEndCap=function(t,e){var n=new gn(t,e),r=new gn;this.computeOffsetSegment(n,Ne.LEFT,this._distance,r);var i=new gn;this.computeOffsetSegment(n,Ne.RIGHT,this._distance,i);var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case In.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,a+Math.PI/2,a-Math.PI/2,at.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case In.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case In.CAP_SQUARE:var u=new I;u.x=Math.abs(this._distance)*Math.cos(a),u.y=Math.abs(this._distance)*Math.sin(a);var c=new I(r.p1.x+u.x,r.p1.y+u.y),l=new I(i.p1.x+u.x,i.p1.y+u.y);this._segList.addPt(c),this._segList.addPt(l)}},Ln.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Ln.prototype.addMitreJoin=function(t,e,n,r){var i=!0,o=null;try{o=X.intersection(e.p0,e.p1,n.p0,n.p1),(r<=0?1:o.distance(t)/Math.abs(r))>this._bufParams.getMitreLimit()&&(i=!1)}catch(t){if(!(t instanceof V))throw t;o=new I(0,0),i=!1}i?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())},Ln.prototype.addFilletCorner=function(t,e,n,r,i){var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o),u=n.x-t.x,c=n.y-t.y,l=Math.atan2(c,u);r===at.CLOCKWISE?a<=l&&(a+=2*Math.PI):a>=l&&(a-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,a,l,r,i),this._segList.addPt(n)},Ln.prototype.addOutsideTurn=function(t,e){return this._offset0.p1.distance(this._offset1.p0)0){var n=new I((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 r=new I((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(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Ln.prototype.createCircle=function(t){var e=new I(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Ln.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Ln.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new On,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Ln.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Ln.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===In.JOIN_BEVEL||this._bufParams.getJoinStyle()===In.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))},Ln.prototype.closeRing=function(){this._segList.closeRing()},Ln.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Ln.prototype.interfaces_=function(){return[]},Ln.prototype.getClass=function(){return Ln},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(Ln,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,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var o=i.getCoordinates();return n&&Ct.reverse(o),o},Dn.prototype.computeSingleSidedBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=Cn.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Ne.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(i[s],!0)}else{n.addSegments(t,!1);var a=Cn.simplify(t,r),u=a.length-1;n.initSideSegments(a[0],a[1],Ne.LEFT),n.addFirstSegment();for(var c=2;c<=u;c++)n.addNextSegment(a[c],!0)}n.addLastSegment(),n.closeRing()},Dn.prototype.computeRingBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);e===Ne.RIGHT&&(r=-r);var i=Cn.simplify(t,r),o=i.length-1;n.initSideSegments(i[o-1],i[0],e);for(var s=1;s<=o;s++){var a=1!==s;n.addNextSegment(i[s],a)}n.closeRing()},Dn.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),r=Cn.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],Ne.LEFT);for(var o=2;o<=i;o++)e.addNextSegment(r[o],!0); +e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var s=Cn.simplify(t,-n),a=s.length-1;e.initSideSegments(s[a],s[a-1],Ne.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 In.CAP_ROUND:e.createCircle(t);break;case In.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),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);return r.getCoordinates()},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 r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()},Dn.prototype.computeOffsetCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=Cn.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Ne.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(i[s],!0)}else{var a=Cn.simplify(t,r),u=a.length-1;n.initSideSegments(a[0],a[1],Ne.LEFT),n.addFirstSegment();for(var c=2;c<=u;c++)n.addNextSegment(a[c],!0)}n.addLastSegment()},Dn.prototype.getSegGen=function(t){return new Ln(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;ni.getMaxY()||this.findStabbedSegments(t,r.getDirectedEdges(),e)}return e}if(3===arguments.length)if(T(arguments[2],xt)&&arguments[0]instanceof I&&arguments[1]instanceof qe){for(var o=arguments[0],s=arguments[1],a=arguments[2],u=s.getEdge().getCoordinates(),c=0;cthis._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 l=s.getDepth(Ne.LEFT);this._seg.p0.equals(u[c])||(l=s.getDepth(Ne.RIGHT));var p=new kn(this._seg,l);a.add(p)}}else if(T(arguments[2],xt)&&arguments[0]instanceof I&&T(arguments[1],xt))for(var h=arguments[0],f=arguments[1],d=arguments[2],g=f.iterator();g.hasNext();){var y=g.next();y.isForward()&&this.findStabbedSegments(h,y,d)}},Mn.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:Ze.min(e)._leftDepth},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Fn.DepthSegment.get=function(){return kn},Object.defineProperties(Mn,Fn);var kn=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new gn(t),this._leftDepth=e};kn.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?n:0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},kn.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},kn.prototype.toString=function(){return this._upwardSeg.toString()},kn.prototype.interfaces_=function(){return[E]},kn.prototype.getClass=function(){return kn};var jn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};jn.prototype.area=function(){return jn.area(this.p0,this.p1,this.p2)},jn.prototype.signedArea=function(){return jn.signedArea(this.p0,this.p1,this.p2)},jn.prototype.interpolateZ=function(t){if(null===t)throw new m("Supplied point is null.");return jn.interpolateZ(t,this.p0,this.p1,this.p2)},jn.prototype.longestSideLength=function(){return jn.longestSideLength(this.p0,this.p1,this.p2)},jn.prototype.isAcute=function(){return jn.isAcute(this.p0,this.p1,this.p2)},jn.prototype.circumcentre=function(){return jn.circumcentre(this.p0,this.p1,this.p2)},jn.prototype.area3D=function(){return jn.area3D(this.p0,this.p1,this.p2)},jn.prototype.centroid=function(){return jn.centroid(this.p0,this.p1,this.p2)},jn.prototype.inCentre=function(){return jn.inCentre(this.p0,this.p1,this.p2)},jn.prototype.interfaces_=function(){return[]},jn.prototype.getClass=function(){return jn},jn.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)},jn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},jn.det=function(t,e,n,r){return t*r-e*n},jn.interpolateZ=function(t,e,n,r){var i=e.x,o=e.y,s=n.x-i,a=r.x-i,u=n.y-o,c=r.y-o,l=s*c-a*u,p=t.x-i,h=t.y-o,f=(c*p-a*h)/l,d=(-u*p+s*h)/l;return e.z+f*(n.z-e.z)+d*(r.z-e.z)},jn.longestSideLength=function(t,e,n){var r=t.distance(e),i=e.distance(n),o=n.distance(t),s=r;return i>s&&(s=i),o>s&&(s=o),s},jn.isAcute=function(t,e,n){return!!Tn.isAcute(t,e,n)&&!!Tn.isAcute(e,n,t)&&!!Tn.isAcute(n,t,e)},jn.circumcentre=function(t,e,n){var r=n.x,i=n.y,o=t.x-r,s=t.y-i,a=e.x-r,u=e.y-i,c=2*jn.det(o,s,a,u),l=jn.det(s,o*o+s*s,u,a*a+u*u),p=jn.det(o,o*o+s*s,a,a*a+u*u);return new I(r-l/c,i+p/c)},jn.perpendicularBisector=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new X(t.x+n/2,t.y+r/2,1),o=new X(t.x-r+n/2,t.y+n+r/2,1);return new X(i,o)},jn.angleBisector=function(t,e,n){var r=e.distance(t),i=r/(r+e.distance(n)),o=n.x-t.x,s=n.y-t.y;return new I(t.x+i*o,t.y+i*s)},jn.area3D=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=e.z-t.z,s=n.x-t.x,a=n.y-t.y,u=n.z-t.z,c=i*u-o*a,l=o*s-r*u,p=r*a-i*s,h=c*c+l*l+p*p,f=Math.sqrt(h)/2;return f},jn.centroid=function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new I(r,i)},jn.inCentre=function(t,e,n){var r=e.distance(n),i=t.distance(n),o=t.distance(e),s=r+i+o,a=(r*t.x+i*e.x+o*n.x)/s,u=(r*t.y+i*e.y+o*n.y)/s;return new I(a,u)};var Gn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new wt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};Gn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,O.EXTERIOR,O.INTERIOR)},Gn.prototype.addPolygon=function(t){var e=this._distance,n=Ne.LEFT;this._distance<0&&(e=-this._distance,n=Ne.RIGHT);var r=t.getExteriorRing(),i=Ct.removeRepeatedPoints(r.getCoordinates());if(this._distance<0&&this.isErodedCompletely(r,this._distance))return null;if(this._distance<=0&&i.length<3)return null;this.addPolygonRing(i,e,n,O.EXTERIOR,O.INTERIOR);for(var o=0;o0&&this.isErodedCompletely(s,-this._distance)||this.addPolygonRing(a,e,Ne.opposite(n),O.INTERIOR,O.EXTERIOR)}},Gn.prototype.isTriangleErodedCompletely=function(t,e){var n=new jn(t[0],t[1],t[2]),r=n.inCentre();return at.distancePointLine(r,n.p0,n.p1)=ee.MINIMUM_VALID_SIZE&&at.isCCW(t)&&(o=i,s=r,n=Ne.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,o,s)},Gn.prototype.add=function(t){return t.isEmpty()?null:void(t instanceof Zt?this.addPolygon(t):t instanceof $t?this.addLineString(t):t instanceof Kt?this.addPoint(t):t instanceof te?this.addCollection(t):t instanceof Vt?this.addCollection(t):t instanceof ne?this.addCollection(t):t instanceof qt&&this.addCollection(t))},Gn.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 r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i},Gn.prototype.addCollection=function(t){for(var e=0;e=this._max)throw new r;var t=this._parent.getGeometryN(this._index++);return t instanceof qt?(this._subcollectionIterator=new Bn(t),this._subcollectionIterator.next()):t},Bn.prototype.remove=function(){throw new Error(this.getClass().getName())},Bn.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)},Bn.prototype.interfaces_=function(){return[Et]},Bn.prototype.getClass=function(){return Bn},Bn.isAtomic=function(t){return!(t instanceof qt)};var qn=function(){this._geom=null;var t=arguments[0];this._geom=t};qn.prototype.locate=function(t){return qn.locate(t,this._geom)},qn.prototype.interfaces_=function(){return[Un]},qn.prototype.getClass=function(){return qn},qn.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&at.isPointInRing(t,e.getCoordinates())},qn.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!qn.isPointInRing(t,n))return!1;for(var r=0;r=0;n--){var r=this._edgeList.get(n),i=r.getSym();null===e&&(e=i),null!==t&&i.setNext(t),t=r}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(Ne.LEFT),r=t.getDepth(Ne.RIGHT),i=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,i)!==r)throw new Oe("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[0],s=arguments[1],a=arguments[2],u=o;u=0;i--){var o=this._resultAreaEdgeList.get(i),s=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),r){case this._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==t)continue;n=s,r=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),r=this._SCANNING_FOR_INCOMING}}r===this._LINKING_TO_OUTGOING&&(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],r=0,i=this.iterator();i.hasNext();)i.next().getEdgeRing()===n&&r++;return r}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=O.NONE,e=this.iterator();e.hasNext();){var n=e.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=O.INTERIOR;break}if(r.isInResult()){t=O.EXTERIOR;break}}}if(t===O.NONE)return null;for(var i=t,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getSym();s.isLineEdge()?s.getEdge().setCovered(i===O.INTERIOR):(s.isInResult()&&(i=O.EXTERIOR),a.isInResult()&&(i=O.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Le(O.NONE);for(var n=this.iterator();n.hasNext();)for(var r=n.next().getEdge().getLabel(),i=0;i<2;i++){var o=r.getLocation(i);o!==O.INTERIOR&&o!==O.BOUNDARY||this._label.setLocation(i,O.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 ke(t,new zn)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ve),Yn=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};Yn.prototype.compareTo=function(t){var e=t;return Yn.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},Yn.prototype.interfaces_=function(){return[E]},Yn.prototype.getClass=function(){return Yn},Yn.orientation=function(t){return 1===Ct.increasingDirection(t)},Yn.compareOriented=function(t,e,n,r){for(var i=e?1:-1,o=r?1:-1,s=e?t.length:-1,a=r?n.length:-1,u=e?0:t.length-1,c=r?0:n.length-1;;){var l=t[u].compareTo(n[c]);if(0!==l)return l;var p=(u+=i)===s,h=(c+=o)===a;if(p&&!h)return-1;if(!p&&h)return 1;if(p&&h)return 0}};var Hn=function(){this._edges=new wt,this._ocaMap=new p};Hn.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e0&&t.print(","),t.print("(");for(var r=n.getCoordinates(),i=0;i0&&t.print(","),t.print(r[i].x+" "+r[i].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(r);i||n--;var o=new Array(n).fill(null),s=0;o[s++]=new I(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this.edge.pts[a];return i&&(o[s]=e.coord),new nr(o,new Le(this.edge._label))},Kn.prototype.add=function(t,e,n){var r=new Qn(t,e,n),i=this._nodeMap.get(r);return null!==i?i:(this._nodeMap.put(r,r),r)},Kn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1},Kn.prototype.interfaces_=function(){return[]},Kn.prototype.getClass=function(){return Kn};var Jn=function(){};Jn.prototype.getChainStartIndices=function(t){var e=0,n=new wt;n.add(new D(e));do{var r=this.findChainEnd(t,e);n.add(new D(r)),e=r}while(en?e:n},Zn.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return ee&&(r=1),this._depth[t][n]=r}}},tr.prototype.getDelta=function(t){return this._depth[t][Ne.RIGHT]-this._depth[t][Ne.LEFT]},tr.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?O.EXTERIOR:O.INTERIOR},tr.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},tr.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 r=t.getLocation(e,n);r!==O.EXTERIOR&&r!==O.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=tr.depthAtLocation(r):this._depth[e][n]+=tr.depthAtLocation(r))}else if(3===arguments.length){var i=arguments[0],o=arguments[1];arguments[2]===O.INTERIOR&&this._depth[i][o]++}},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},tr.depthAtLocation=function(t){return t===O.EXTERIOR?0:t===O.INTERIOR?1:tr.NULL_VALUE},er.NULL_VALUE.get=function(){return-1},Object.defineProperties(tr,er);var nr=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Kn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new tr,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}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,Le.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 r=!0,i=!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 Zn(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new Y;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;er||this._maxyo;if(s)return!1;var a=this.intersectsToleranceSquare(t,e);return et.isTrue(!(s&&a),"Found bad envelope test"),a},ar.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 I(this._maxx,this._maxy),this._corner[1]=new I(this._minx,this._maxy),this._corner[2]=new I(this._minx,this._miny),this._corner[3]=new I(this._maxx,this._miny)},ar.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))},ar.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},ar.prototype.getCoordinate=function(){return this._originalPt},ar.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},ar.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=ar.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Y(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},ar.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()))))},ar.prototype.intersectsToleranceSquare=function(t,e){var n=!1,r=!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()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper()||n&&r||t.equals(this._pt)||e.equals(this._pt)))))},ar.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return!!this.intersects(n,r)&&(t.addIntersection(this.getCoordinate(),e),!0)},ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar},ur.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(ar,ur);var cr=function(){this.tempEnv1=new Y,this.selectedSegment=new gn};cr.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr};var lr=function(){this._index=null;var t=arguments[0];this._index=t},pr={HotPixelSnapAction:{configurable:!0}};lr.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],r=arguments[2],i=e.getSafeEnvelope(),o=new hr(e,n,r);return this._index.query(i,{interfaces_:function(){return[$e]},visitItem:function(t){t.select(i,o)}}),o.isNodeAdded()}},lr.prototype.interfaces_=function(){return[]},lr.prototype.getClass=function(){return lr},pr.HotPixelSnapAction.get=function(){return hr},Object.defineProperties(lr,pr);var hr=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],r=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=r}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[0],n=arguments[1],r=e.getContext();return null!==this._parentEdge&&r===this._parentEdge&&n===this._hotPixelVertexIndex?null:void(this._isNodeAdded=this._hotPixel.addSnappedNode(r,n))},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(cr),fr=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new wt};fr.prototype.processIntersections=function(t,e,n,r){if(t===n&&e===r)return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[r],a=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof Oe))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],r=gr.precisionScaleFactor(this._argGeom,this._distance,n),i=new fe(r);this.bufferFixedPrecision(i)}},gr.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()},gr.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},gr.prototype.bufferOriginalPrecision=function(){try{var t=new rr(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof Z))throw t;this._saveException=t}},gr.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},gr.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},gr.prototype.interfaces_=function(){return[]},gr.prototype.getClass=function(){return gr},gr.bufferOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new gr(t).getResultGeometry(e)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof lt&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1],i=arguments[2],o=new gr(n);return o.setQuadrantSegments(i),o.getResultGeometry(r)}if(arguments[2]instanceof In&&arguments[0]instanceof lt&&"number"==typeof arguments[1]){var s=arguments[0],a=arguments[1],u=arguments[2];return new gr(s,u).getResultGeometry(a)}}else if(4===arguments.length){var c=arguments[0],l=arguments[1],p=arguments[2],h=arguments[3],f=new gr(c);return f.setQuadrantSegments(p),f.setEndCapStyle(h),f.getResultGeometry(l)}},gr.precisionScaleFactor=function(t,e,n){var r=t.getEnvelopeInternal(),i=R.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,o)},yr.CAP_ROUND.get=function(){return In.CAP_ROUND},yr.CAP_BUTT.get=function(){return In.CAP_FLAT},yr.CAP_FLAT.get=function(){return In.CAP_FLAT},yr.CAP_SQUARE.get=function(){return In.CAP_SQUARE},yr.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(gr,yr);var _r=function(){this._pt=[new I,new I],this._distance=v.NaN,this._isNull=!0};_r.prototype.getCoordinates=function(){return this._pt},_r.prototype.getCoordinate=function(t){return this._pt[t]},_r.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 r=e.distance(n);rthis._distance&&this.initialize(e,n,r)}},_r.prototype.interfaces_=function(){return[]},_r.prototype.getClass=function(){return _r};var mr=function(){};mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr},mr.computeDistance=function(){if(arguments[2]instanceof _r&&arguments[0]instanceof $t&&arguments[1]instanceof I)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=t.getCoordinates(),i=new gn,o=0;o0||this._isIn?O.INTERIOR:O.EXTERIOR)},Nr.prototype.interfaces_=function(){return[]},Nr.prototype.getClass=function(){return Nr};var Cr=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._component=r,this._segIndex=i,this._pt=o}},Sr={INSIDE_AREA:{configurable:!0}};Cr.prototype.isInsideArea=function(){return this._segIndex===Cr.INSIDE_AREA},Cr.prototype.getCoordinate=function(){return this._pt},Cr.prototype.getGeometryComponent=function(){return this._component},Cr.prototype.getSegmentIndex=function(){return this._segIndex},Cr.prototype.interfaces_=function(){return[]},Cr.prototype.getClass=function(){return Cr},Sr.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Cr,Sr);var Or=function(t){this._pts=t||null};Or.prototype.filter=function(t){t instanceof Kt&&this._pts.add(t)},Or.prototype.interfaces_=function(){return[Ut]},Or.prototype.getClass=function(){return Or},Or.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Kt?Ze.singletonList(t):Or.getPoints(t,new wt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Kt?n.add(e):e instanceof qt&&e.apply(new Or(n)),n}};var Pr=function(){this._locations=null;var t=arguments[0];this._locations=t};Pr.prototype.filter=function(t){(t instanceof Kt||t instanceof $t||t instanceof Zt)&&this._locations.add(new Cr(t,0,t.getCoordinate()))},Pr.prototype.interfaces_=function(){return[Ut]},Pr.prototype.getClass=function(){return Pr},Pr.getLocations=function(t){var e=new wt;return t.apply(new Pr(e)),e};var Tr=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Nr,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],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Tr.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],r=1-e,i=wr.getPolygons(this._geom[e]);if(i.size()>0){var o=Pr.getLocations(this._geom[r]);if(this.computeContainmentDistance(o,i,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[r]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&T(arguments[0],xt)&&T(arguments[1],xt)){for(var s=arguments[0],a=arguments[1],u=arguments[2],c=0;cthis._minDistance)return null;for(var r=t.getCoordinates(),i=e.getCoordinate(),o=0;othis._minDistance)return null;for(var p=u.getCoordinates(),h=c.getCoordinates(),f=0;fthis._distance&&this.initialize(e,n,r)}},Rr.prototype.interfaces_=function(){return[]},Rr.prototype.getClass=function(){return Rr};var Lr=function(){};Lr.prototype.interfaces_=function(){return[]},Lr.prototype.getClass=function(){return Lr},Lr.computeDistance=function(){if(arguments[2]instanceof Rr&&arguments[0]instanceof $t&&arguments[1]instanceof I)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new gn,i=t.getCoordinates(),o=0;o1||t<=0)throw new m("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Ar.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Ar.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Ar.prototype.computeOrientedDistance=function(t,e,n){var r=new Mr(e);if(t.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new Fr(e,this._densifyFrac);t.apply(i),n.setMaximum(i.getMaxPointDistance())}},Ar.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Ar.prototype.interfaces_=function(){return[]},Ar.prototype.getClass=function(){return Ar},Ar.distance=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new Ar(t,e).distance()}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=new Ar(n,r);return o.setDensifyFraction(i),o.distance()}},Dr.MaxPointDistanceFilter.get=function(){return Mr},Dr.MaxDensifiedByFractionDistanceFilter.get=function(){return Fr},Object.defineProperties(Ar,Dr);var Mr=function(){this._maxPtDist=new Rr,this._minPtDist=new Rr,this._euclideanDist=new Lr,this._geom=null;var t=arguments[0];this._geom=t};Mr.prototype.filter=function(t){this._minPtDist.initialize(),Lr.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Mr.prototype.getMaxPointDistance=function(){return this._maxPtDist},Mr.prototype.interfaces_=function(){return[ft]},Mr.prototype.getClass=function(){return Mr};var Fr=function(){this._maxPtDist=new Rr,this._minPtDist=new Rr,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Fr.prototype.filter=function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),r=t.getCoordinate(e),i=(r.x-n.x)/this._numSubSegs,o=(r.y-n.y)/this._numSubSegs,s=0;sn){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+J.toLineString(i[0],i[1])+")"}},kr.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=kr.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(),kr.VERBOSE&&z.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},kr.prototype.checkNegativeValid=function(){if(!(this._input instanceof Zt||this._input instanceof ne||this._input instanceof qt))return null;var t=this.getPolygonLines(this._input);return this.checkMinimumDistance(t,this._result,this._minValidDistance),this._isValid?void this.checkMaximumDistance(t,this._result,this._maxValidDistance):null},kr.prototype.getErrorIndicator=function(){return this._errorIndicator},kr.prototype.checkMinimumDistance=function(t,e,n){var r=new Tr(t,e,n);if(this._minDistanceFound=r.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?null:this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},Gr.prototype.report=function(t){return Gr.VERBOSE?void z.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED")):null},Gr.prototype.getErrorMessage=function(){return this._errorMsg},Gr.prototype.interfaces_=function(){return[]},Gr.prototype.getClass=function(){return Gr},Gr.isValidMsg=function(t,e,n){var r=new Gr(t,e,n);return r.isValid()?null:r.getErrorMessage()},Gr.isValid=function(t,e,n){return!!new Gr(t,e,n).isValid()},Ur.VERBOSE.get=function(){return!1},Ur.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Gr,Ur);var Br=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Br.prototype.getCoordinates=function(){return this._pts},Br.prototype.size=function(){return this._pts.length},Br.prototype.getCoordinate=function(t){return this._pts[t]},Br.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Br.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:pn.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Br.prototype.setData=function(t){this._data=t},Br.prototype.getData=function(){return this._data},Br.prototype.toString=function(){return J.toLineString(new ue(this._pts))},Br.prototype.interfaces_=function(){return[hn]},Br.prototype.getClass=function(){return Br};var qr=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new wt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};qr.prototype.getInteriorIntersection=function(){return this._interiorIntersection},qr.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},qr.prototype.getIntersectionSegments=function(){return this._intSegments},qr.prototype.count=function(){return this._intersectionCount},qr.prototype.getIntersections=function(){return this._intersections},qr.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},qr.prototype.setKeepIntersections=function(t){this._keepIntersections=t},qr.prototype.processIntersections=function(t,e,n,r){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===r)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(t,e)&&!this.isEndSegment(n,r))return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[r],a=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=i,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++)},qr.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},qr.prototype.hasIntersection=function(){return null!==this._interiorIntersection},qr.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},qr.prototype.interfaces_=function(){return[Wn]},qr.prototype.getClass=function(){return qr},qr.createAllIntersectionsFinder=function(t){var e=new qr(t);return e.setFindAllIntersections(!0),e},qr.createAnyIntersectionFinder=function(t){return new qr(t)},qr.createIntersectionCounter=function(t){var e=new qr(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Vr=function(){this._li=new it,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Vr.prototype.execute=function(){return null!==this._segInt?null:void this.checkInteriorIntersections()},Vr.prototype.getIntersections=function(){return this._segInt.getIntersections()},Vr.prototype.isValid=function(){return this.execute(),this._isValid},Vr.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Vr.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new qr(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new xn;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Vr.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Oe(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Vr.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+J.toLineString(t[0],t[1])+" and "+J.toLineString(t[2],t[3])},Vr.prototype.interfaces_=function(){return[]},Vr.prototype.getClass=function(){return Vr},Vr.computeIntersections=function(t){var e=new Vr(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var zr=function t(){this._nv=null;var e=arguments[0];this._nv=new Vr(t.toSegmentStrings(e))};zr.prototype.checkValid=function(){this._nv.checkValid()},zr.prototype.interfaces_=function(){return[]},zr.prototype.getClass=function(){return zr},zr.toSegmentStrings=function(t){for(var e=new wt,n=t.iterator();n.hasNext();){var r=n.next();e.add(new Br(r.getCoordinates(),r))}return e},zr.checkValid=function(t){new zr(t).checkValid()};var Xr=function(t){this._mapOp=t};Xr.prototype.map=function(t){for(var e=new wt,n=0;n0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Wr.prototype.interfaces_=function(){return[]},Wr.prototype.getClass=function(){return Wr};var $r=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new gn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof $t&&"number"==typeof arguments[1]){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=t.isClosed(r),this._snapTolerance=i}};$r.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),r=0;r=0&&t.add(o+1,new I(i),!1)}},$r.prototype.findSegmentIndexToSnap=function(t,e){for(var n=v.MAX_VALUE,r=-1,i=0;ie&&(e=r)}return e}if(2===arguments.length){var i=arguments[0],o=arguments[1];return Math.min(Qr.computeOverlaySnapTolerance(i),Qr.computeOverlaySnapTolerance(o))}},Qr.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*Qr.SNAP_PRECISION_FACTOR},Qr.snapToSelf=function(t,e,n){return new Qr(t).snapToSelf(e,n)},Kr.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Qr,Kr);var Jr=function(t){function e(e,n,r){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==r&&r}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 $r(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),r=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wr),Zr=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Zr.prototype.getCommon=function(){return v.longBitsToDouble(this._commonBits)},Zr.prototype.add=function(t){var e=v.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=Zr.signExpBits(this._commonBits),this._isFirst=!1,null):Zr.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=Zr.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=Zr.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},Zr.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=v.longBitsToDouble(t),n="0000000000000000000000000000000000000000000000000000000000000000"+v.toBinaryString(t),r=n.substring(n.length-64);return r.substring(0,1)+" "+r.substring(1,12)+"(exp) "+r.substring(12)+" [ "+e+" ]"}},Zr.prototype.interfaces_=function(){return[]},Zr.prototype.getClass=function(){return Zr},Zr.getBit=function(t,e){return 0!=(t&1<>52},Zr.zeroLowerBits=function(t,e){return t&~((1<=0;r--){if(Zr.getBit(t,r)!==Zr.getBit(e,r))return n;n++}return 52};var ti=function(){this._commonCoord=null,this._ccFilter=new ni},ei={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};ti.prototype.addCommonBits=function(t){var e=new ri(this._commonCoord);t.apply(e),t.geometryChanged()},ti.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new I(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new ri(e);return t.apply(n),t.geometryChanged(),t},ti.prototype.getCommonCoordinate=function(){return this._commonCoord},ti.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},ei.CommonCoordinateFilter.get=function(){return ni},ei.Translater.get=function(){return ri},Object.defineProperties(ti,ei);var ni=function(){this._commonBitsX=new Zr,this._commonBitsY=new Zr};ni.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},ni.prototype.getCommonCoordinate=function(){return new I(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},ni.prototype.interfaces_=function(){return[ft]},ni.prototype.getClass=function(){return ni};var ri=function(){this.trans=null;var t=arguments[0]; +this.trans=t};ri.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)},ri.prototype.isDone=function(){return!1},ri.prototype.isGeometryChanged=function(){return!0},ri.prototype.interfaces_=function(){return[Bt]},ri.prototype.getClass=function(){return ri};var ii=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()};ii.prototype.selfSnap=function(t){return new Qr(t).snapTo(t,this._snapTolerance)},ii.prototype.removeCommonBits=function(t){this._cbr=new ti,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},ii.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},ii.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Ci.overlayOp(e[0],e[1],t);return this.prepareResult(n)},ii.prototype.checkValid=function(t){t.isValid()||z.out.println("Snapped geometry is invalid")},ii.prototype.computeSnapTolerance=function(){this._snapTolerance=Qr.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ii.prototype.snap=function(t){var e=this.removeCommonBits(t);return Qr.snap(e[0],e[1],this._snapTolerance)},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii},ii.overlayOp=function(t,e,n){return new ii(t,e).getResultGeometry(n)},ii.union=function(t,e){return ii.overlayOp(t,e,Ci.UNION)},ii.intersection=function(t,e){return ii.overlayOp(t,e,Ci.INTERSECTION)},ii.symDifference=function(t,e){return ii.overlayOp(t,e,Ci.SYMDIFFERENCE)},ii.difference=function(t,e){return ii.overlayOp(t,e,Ci.DIFFERENCE)};var oi=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};oi.prototype.getResultGeometry=function(t){var e=null,n=!1,r=null;try{e=Ci.overlayOp(this._geom[0],this._geom[1],t),n=!0}catch(t){if(!(t instanceof Z))throw t;r=t}if(!n)try{e=ii.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof Z?r:t}return e},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi},oi.overlayOp=function(t,e,n){return new oi(t,e).getResultGeometry(n)},oi.union=function(t,e){return oi.overlayOp(t,e,Ci.UNION)},oi.intersection=function(t,e){return oi.overlayOp(t,e,Ci.INTERSECTION)},oi.symDifference=function(t,e){return oi.overlayOp(t,e,Ci.SYMDIFFERENCE)},oi.difference=function(t,e){return oi.overlayOp(t,e,Ci.DIFFERENCE)};var si=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};si.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},si.prototype.interfaces_=function(){return[]},si.prototype.getClass=function(){return si};var ai=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 r=arguments[0],i=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=r,this._xValue=i,this._obj=o}},ui={INSERT:{configurable:!0},DELETE:{configurable:!0}};ai.prototype.isDelete=function(){return this._eventType===ai.DELETE},ai.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},ai.prototype.getObject=function(){return this._obj},ai.prototype.compareTo=function(t){var e=t;return this._xValuee._xValue?1:this._eventTypee._eventType?1:0},ai.prototype.getInsertEvent=function(){return this._insertEvent},ai.prototype.isInsert=function(){return this._eventType===ai.INSERT},ai.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},ai.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},ai.prototype.interfaces_=function(){return[E]},ai.prototype.getClass=function(){return ai},ui.INSERT.get=function(){return 1},ui.DELETE.get=function(){return 2},Object.defineProperties(ai,ui);var ci=function(){};ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci};var li=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};li.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(li.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1},li.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},li.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},li.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},li.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next().getCoordinate();if(t.isIntersection(r))return!0}return!1},li.prototype.hasProperIntersection=function(){return this._hasProper},li.prototype.hasIntersection=function(){return this._hasIntersection},li.prototype.isDone=function(){return this._isDone},li.prototype.isBoundaryPoint=function(t,e){return!(null===e||!this.isBoundaryPointInternal(t,e[0])&&!this.isBoundaryPointInternal(t,e[1]))},li.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},li.prototype.addIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[r],a=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,s,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,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))))},li.prototype.interfaces_=function(){return[]},li.prototype.getClass=function(){return li},li.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var pi=function(t){function e(){t.call(this),this.events=new wt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){Ze.sort(this.events);for(var t=0;te||this._maxo?1:0},di.prototype.interfaces_=function(){return[w]},di.prototype.getClass=function(){return di};var gi=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],r=arguments[2];this._min=e,this._max=n,this._item=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){return this.intersects(t,e)?void n.visitItem(this._item):null},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hi),yi=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){return this.intersects(t,e)?(null!==this._node1&&this._node1.query(t,e,n),void(null!==this._node2&&this._node2.query(t,e,n))):null},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hi),_i=function(){this._leaves=new wt,this._root=null,this._level=0};_i.prototype.buildTree=function(){Ze.sort(this._leaves,new hi.NodeComparator);for(var t=this._leaves,e=null,n=new wt;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},_i.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 gi(t,e,n))},_i.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},_i.prototype.buildRoot=function(){return null!==this._root?null:void(this._root=this.buildTree())},_i.prototype.printNode=function(t){z.out.println(J.toLineString(new I(t._min,this._level),new I(t._max,this._level)))},_i.prototype.init=function(){return null!==this._root?null:void this.buildRoot()},_i.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,r=t.iterator();r.hasNext();){var i=r.next();e[n++]=i.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){return this.isBoundaryNode(t,e)?null:void(n===O.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 r=Ct.removeRepeatedPoints(t.getCoordinates());if(r.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=r[0],null;var i=e,o=n;at.isCCW(r)&&(i=n,o=e);var s=new nr(r,new Le(this._argIndex,O.BOUNDARY,i,o));this._lineEdgeMap.put(t,s),this.insertEdge(s),this.insertPoint(this._argIndex,r[0],O.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var r=this._nodes.addNode(e),i=r.getLabel();null===i?r._label=new Le(t,n):i.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new pi},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),r=n.getLabel().getLocation(t),i=n.eiList.iterator();i.hasNext();){var o=i.next();this.addSelfIntersectionNode(t,o.coord,r)}},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 Zt)this.addPolygon(e);else if(e instanceof $t)this.addLineString(e);else if(e instanceof Kt)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 qt))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 vi(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)?O.BOUNDARY:O.INTERIOR},e}(ze),Ii=function(){if(this._li=new it,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 wi(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=dt.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 wi(0,e,r),this._arg[1]=new wi(1,n,r)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2];i.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new wi(0,i,s),this._arg[1]=new wi(1,o,s)}};Ii.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Ii.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Ii.prototype.interfaces_=function(){return[]},Ii.prototype.getClass=function(){return Ii};var Ni=function(){};Ni.prototype.interfaces_=function(){return[]},Ni.prototype.getClass=function(){return Ni},Ni.map=function(){if(arguments[0]instanceof lt&&T(arguments[1],Ni.MapOp)){for(var t=arguments[0],e=arguments[1],n=new wt,r=0;r=t.size()?null:t.get(e)},Ai.union=function(t){return new Ai(t).union()},Di.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Ai,Di);var Mi=function(){};Mi.prototype.interfaces_=function(){return[]},Mi.prototype.getClass=function(){return Mi},Mi.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Ci.createEmptyResult(Ci.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Ci.UNION)},t.GeoJSONReader=we,t.GeoJSONWriter=Ie,t.OverlayOp=Ci,t.UnionOp=Mi,t.BufferOp=gr,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){"use strict";var r=n(127);t.exports=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(t){return!1}return!r(t)}},function(t,e,n){"use strict";var r=n(42),i={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!r(t)&&hasOwnProperty.call(i,typeof t)}},function(t,e,n){"use strict";var r=n(124),i=/^\s*class[\s{\/}]/,o=Function.prototype.toString;t.exports=function(t){return!!r(t)&&!i.test(o.call(t))}},function(t,e,n){"use strict";var r=n(125);t.exports=function(t){if(!r(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},function(t,e,n){!function(t,n){n(e)}(this,function(t){"use strict";function e(t){return t&&DataView.prototype.isPrototypeOf(t)}function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function r(t){return"string"!=typeof t&&(t=String(t)),t}function i(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return v.iterable&&(e[Symbol.iterator]=function(){return e}),e}function o(t){this.map={},t instanceof o?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function s(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function a(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function u(t){var e=new FileReader,n=a(e);return e.readAsArrayBuffer(t),n}function c(t){var e=new FileReader,n=a(e);return e.readAsText(t),n}function l(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r-1?e:t}function d(t,e){e=e||{};var n=e.body;if(t instanceof d){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new o(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new o(e.headers)),this.method=f(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function g(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function y(t){var e=new o,n=t.replace(/\r?\n[\t ]+/g," ");return n.split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e}function _(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new o(e.headers),this.url=e.url||"",this._initBody(t)}function m(e,n){return new Promise(function(r,i){function o(){a.abort()}var s=new d(e,n);if(s.signal&&s.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;a.onload=function(){var t={status:a.status,statusText:a.statusText,headers:y(a.getAllResponseHeaders()||"")};t.url="responseURL"in a?a.responseURL:t.headers.get("X-Request-URL");var e="response"in a?a.response:a.responseText;r(new _(e,t))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&v.blob&&(a.responseType="blob"),s.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),s.signal&&(s.signal.addEventListener("abort",o),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",o)}),a.send("undefined"==typeof s._bodyInit?null:s._bodyInit)})}var v={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(v.arrayBuffer)var b=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],E=ArrayBuffer.isView||function(t){return t&&b.indexOf(Object.prototype.toString.call(t))>-1};o.prototype.append=function(t,e){t=n(t),e=r(e);var i=this.map[t];this.map[t]=i?i+", "+e:e},o.prototype.delete=function(t){delete this.map[n(t)]},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.set=function(t,e){this.map[n(t)]=r(e)},o.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},o.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),i(t)},o.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),i(t)},o.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),i(t)},v.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},h.call(d.prototype),h.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},_.error=function(){var t=new _(null,{status:0,statusText:""});return t.type="error",t};var w=[301,302,303,307,308];_.redirect=function(t,e){if(w.indexOf(e)===-1)throw new RangeError("Invalid status code");return new _(null,{status:e,headers:{location:t}})},t.DOMException=self.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}m.polyfill=!0,self.fetch||(self.fetch=m,self.Headers=o,self.Request=d,self.Response=_),t.Headers=o,t.Request=d,t.Response=_,t.fetch=m,Object.defineProperty(t,"__esModule",{value:!0})})},function(t,e,n){function r(t){this.options=t||{locator:{}}}function i(t,e,n){function r(e){var r=t[e];!r&&s&&(r=2==t.length?function(n){t(e,n)}:t),i[e]=r&&function(t){r("[xmldom "+e+"]\t"+t+a(n))}||function(){}}if(!t){if(e instanceof o)return e;t=e}var i={},s=t instanceof Function;return n=n||{},r("warning"),r("error"),r("fatalError"),i}function o(){this.cdata=!1}function s(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function a(t){if(t)return"\n@"+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function u(t,e,n){return"string"==typeof t?t.substr(e,n):t.length>=e+n||e?new java.lang.String(t,e,n)+"":t}function c(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}r.prototype.parseFromString=function(t,e){var n=this.options,r=new l,s=n.domBuilder||new o,a=n.errorHandler,u=n.locator,c=n.xmlns||{},p={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&s.setDocumentLocator(u),r.errorHandler=i(a,s,u),r.domBuilder=n.domBuilder||s,/\/x?html?$/.test(e)&&(p.nbsp=" ",p.copy="©",c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",t?r.parse(t,c,p):r.errorHandler.error("invalid doc source"),s.doc},o.prototype={startDocument:function(){this.doc=(new p).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,n,r){var i=this.doc,o=i.createElementNS(t,n||e),a=r.length;c(this,o),this.currentElement=o,this.locator&&s(this.locator,o);for(var u=0;u65535){t-=65536;var e=55296+(t>>10),n=56320+(1023&t);return String.fromCharCode(e,n)}return String.fromCharCode(t)}function d(t){var e=t.slice(1,-1);return e in n?n[e]:"#"===e.charAt(0)?f(parseInt(e.substr(1).replace("x","0x"))):(c.error("entity not found:"+t),t)}function g(e){if(e>w){var n=t.substring(w,e).replace(/&#?\w+;/g,d);b&&y(w),r.characters(n,0,e-w),w=e}}function y(e,n){for(;e>=m&&(n=v.exec(t));)_=n.index,m=_+n[0].length,b.lineNumber++;b.columnNumber=e-_+1}for(var _=0,m=0,v=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,E=[{currentNSMap:e}],x={},w=0;;){try{var I=t.indexOf("<",w);if(I<0){if(!t.substr(w).match(/^\s*$/)){var N=r.doc,C=N.createTextNode(t.substr(w));N.appendChild(C),r.currentElement=C}return}switch(I>w&&g(I),t.charAt(I+1)){case"/":var S=t.indexOf(">",I+3),O=t.substring(I+2,S),P=E.pop();S<0?(O=t.substring(I+2).replace(/[\s<].*/,""),c.error("end tag name: "+O+" is not complete:"+P.tagName),S=I+1+O.length):O.match(/\sw?w=S:g(Math.max(I,w)+1)}}function i(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function o(t,e,n,r,i,o){for(var s,a,u=++e,c=m;;){var l=t.charAt(u);switch(l){case"=":if(c===v)s=t.slice(e,u),c=E;else{if(c!==b)throw new Error("attribute equal must after attrName");c=E}break;case"'":case'"':if(c===E||c===v){if(c===v&&(o.warning('attribute value must after "="'),s=t.slice(e,u)),e=u+1,u=t.indexOf(l,e),!(u>0))throw new Error("attribute value no end '"+l+"' match");a=t.slice(e,u).replace(/&#?\w+;/g,i),n.add(s,a,e-1),c=w}else{if(c!=x)throw new Error('attribute value must after "="');a=t.slice(e,u).replace(/&#?\w+;/g,i),n.add(s,a,e),o.warning('attribute "'+s+'" missed start quot('+l+")!!"),e=u+1,c=w}break;case"/":switch(c){case m:n.setTagName(t.slice(e,u));case w:case I:case N:c=N,n.closed=!0;case x:case v:case b:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),c==m&&n.setTagName(t.slice(e,u)),u;case">":switch(c){case m:n.setTagName(t.slice(e,u));case w:case I:case N:break;case x:case v:a=t.slice(e,u),"/"===a.slice(-1)&&(n.closed=!0,a=a.slice(0,-1));case b:c===b&&(a=s),c==x?(o.warning('attribute "'+a+'" missed quot(")!!'),n.add(s,a.replace(/&#?\w+;/g,i),e)):("http://www.w3.org/1999/xhtml"===r[""]&&a.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+a+'" missed value!! "'+a+'" instead!!'),n.add(a,a,e));break;case E:throw new Error("attribute value missed!!")}return u;case"€":l=" ";default:if(l<=" ")switch(c){case m:n.setTagName(t.slice(e,u)),c=I;break;case v:s=t.slice(e,u),c=b;break;case x:var a=t.slice(e,u).replace(/&#?\w+;/g,i);o.warning('attribute "'+a+'" missed quot(")!!'),n.add(s,a,e);case w:c=I}else switch(c){case b:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&s.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),n.add(s,s,e),e=u,c=v;break;case w:o.warning('attribute space is required"'+s+'"!!');case I:c=v,e=u;break;case E:c=x,e=u;break;case N:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function s(t,e,n){for(var r=t.tagName,i=null,o=t.length;o--;){var s=t[o],a=s.qName,u=s.value,l=a.indexOf(":");if(l>0)var p=s.prefix=a.slice(0,l),h=a.slice(l+1),f="xmlns"===p&&h;else h=a,p=null,f="xmlns"===a&&"";s.localName=h,f!==!1&&(null==i&&(i={},c(n,n={})),n[f]=i[f]=u,s.uri="http://www.w3.org/2000/xmlns/",e.startPrefixMapping(f,u))}for(var o=t.length;o--;){s=t[o];var p=s.prefix;p&&("xml"===p&&(s.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==p&&(s.uri=n[p||""]))}var l=r.indexOf(":");l>0?(p=t.prefix=r.slice(0,l),h=t.localName=r.slice(l+1)):(p=null,h=t.localName=r);var d=t.uri=n[p||""];if(e.startElement(d,h,r,t),!t.closed)return t.currentNSMap=n,t.localNSMap=i,!0;if(e.endElement(d,h,r),i)for(p in i)e.endPrefixMapping(p)}function a(t,e,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=t.indexOf("",e),s=t.substring(e+1,o);if(/[&<]/.test(s))return/^script$/i.test(n)?(i.characters(s,0,s.length),o):(s=s.replace(/&#?\w+;/g,r),i.characters(s,0,s.length),o)}return e+1}function u(t,e,n,r){var i=r[n];return null==i&&(i=t.lastIndexOf(""),i",e+4);return o>e?(n.comment(t,e+4,o-e-4),o+3):(r.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==t.substr(e+3,6)){var o=t.indexOf("]]>",e+9);return n.startCDATA(),n.characters(t,e+9,o-e-9),n.endCDATA(),o+3}var s=d(t,e),a=s.length;if(a>1&&/!doctype/i.test(s[0][0])){var u=s[1][0],c=a>3&&/^public$/i.test(s[2][0])&&s[3][0],l=a>4&&s[4][0],p=s[a-1];return n.startDTD(u,c&&c.replace(/^(['"])(.*?)\1$/,"$2"),l&&l.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),p.index+p[0].length}}return-1}function p(t,e,n){var r=t.indexOf("?>",e);if(r){var i=t.substring(e,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function h(t){}function f(t,e){return t.__proto__=e,t}function d(t,e){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=e,i.exec(t);n=i.exec(t);)if(r.push(n),n[1])return r}var g=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,y=new RegExp("[\\-\\.0-9"+g.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),_=new RegExp("^"+g.source+y.source+"*(?::"+g.source+y.source+"*)?$"),m=0,v=1,b=2,E=3,x=4,w=5,I=6,N=7;n.prototype={parse:function(t,e,n){var i=this.domBuilder;i.startDocument(),c(e,e={}),r(t,e,n,i,this.errorHandler),i.endDocument()}},h.prototype={setTagName:function(t){if(!_.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},add:function(t,e,n){if(!_.test(t))throw new Error("invalid attribute:"+t);this[this.length++]={qName:t,value:e,offset:n}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},f({},f.prototype)instanceof f||(f=function(t,e){function n(){}n.prototype=e,n=new n;for(e in t)n[e]=t[e];return n}),e.XMLReader=n},function(t,e){"use strict";t.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},function(t,e,n){"use strict";var r=n(23),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.OpenSearchDescription=void 0;var i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.urls.filter(function(t){return(0,s.find)(t.relations,function(t){return"results"===t})});return e&&(r=r.filter(function(t){return Array.isArray(e)?e.indexOf(t.type)>-1:t.type===e})),n&&(r=r.filter(function(t){return Array.isArray(n)?n.indexOf(t.method)>-1:t.method===n})),t?r.filter(function(e){return e.isCompatible(t)}):r}},{key:"serialize",value:function(){return{shortName:this.shortName,description:this.description,tags:this.tags,contact:this.contact,urls:this.urls.map(function(t){return t.serialize()}),longName:this.longName,images:this.images,queries:this.queries,developer:this.developer,attribution:this.attribution,syndicationRight:this.syndicationRight,adultContent:this.adultContent,language:this.language,outputEncoding:this.outputEncoding,inputEncoding:this.inputEncoding}}}],[{key:"fromXml",value:function(e){var n=(0,s.parseXml)(e).documentElement,r={shortName:(0,s.getText)(n,"os","ShortName"),description:(0,s.getText)(n,"os","Description"),tags:(0,s.getText)(n,"os","Tags"),contact:(0,s.getText)(n,"os","Contact"),urls:(0,s.getElements)(n,"os","Url").map(function(t){return o.OpenSearchUrl.fromNode(t)}),longName:(0,s.getText)(n,"os","LongName"),images:(0,s.getElements)(n,"os","Image").map(function(t){return{height:parseInt(t.getAttribute("height"),10),width:parseInt(t.getAttribute("width"),10),type:t.getAttribute("type"),url:t.textContent}}),queries:(0,s.getElements)(n,"os","Query").map(function(t){for(var e={role:t.getAttribute("role")},n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=n.extraFields,i=void 0===r?void 0:r,o=n.namespaces,s=void 0===o?void 0:o,a=(0,u.parseXml)(t).documentElement,c=(0,u.getElements)(a,"atom","entry").map(function(t){var n={id:(0,u.getText)(t,"dc","identifier")||(0,u.getText)(t,"atom","id"),properties:{title:(0,u.getText)(t,"atom","title"),updated:new Date((0,u.getText)(t,"atom","updated")),content:(0,u.getText)(t,"atom","content"),summary:(0,u.getText)(t,"atom","summary"),links:e.parseLinks(t),media:e.parseMedia(t)}},r=e.parseBox(t);r&&(n.bbox=r);var o=e.parseGeometry(t);o&&(n.geometry=o,n.bbox||(n.bbox=e.getBoxFromGeometry(o)));var a=e.parseDate(t);a&&(n.properties.time=a);var c=e.parseEOP(t);c&&(n.properties.eop=c);var l=e.parseS3Path(t);return l&&(n.properties.s3Path=l),i&&e.parseExtraFields(t,i,s,n),n});return{totalResults:parseInt((0,u.getText)(a,"os","totalResults"),10),startIndex:parseInt((0,u.getText)(a,"os","startIndex"),10),itemsPerPage:parseInt((0,u.getText)(a,"os","itemsPerPage"),10),query:{},links:this.parseLinks(a),records:c}}}]),e}(c.BaseFeedFormat)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.GeoJSONFormat=void 0;var i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=n.extraFields,i=void 0===r?void 0:r,o=n.namespaces,s=void 0===o?void 0:o,a=(0,u.parseXml)(t).documentElement,c=(0,u.getFirstElement)(a,null,"channel"),l=(0,u.getElements)(c,null,"item").map(function(t){var n={id:(0,u.getText)(t,"dc","identifier")||(0,u.getText)(t,null,"guid"),properties:{title:(0,u.getText)(t,null,"title"),content:(0,u.getText)(t,null,"description"),summary:(0,u.getText)(t,null,"description"),links:e.parseLinks(t),media:e.parseMedia(t)}},r=e.parseBox(t);r&&(n.bbox=r);var o=e.parseGeometry(t);o&&(n.geometry=o,n.bbox||(n.bbox=e.getBoxFromGeometry(o)));var a=e.parseDate(t);a&&(n.properties.time=a);var c=e.parseEOP(t);c&&(n.properties.eop=c);var l=e.parseS3Path(t);return l&&(n.properties.s3Path=l),i&&e.parseExtraFields(t,i,s,n),n});return{totalResults:parseInt((0,u.getText)(c,"os","totalResults"),10),startIndex:parseInt((0,u.getText)(c,"os","startIndex"),10),itemsPerPage:parseInt((0,u.getText)(c,"os","itemsPerPage"),10),query:{},links:this.parseLinks(a),records:l}}}]),e}(c.BaseFeedFormat)},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":l(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":l(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){return t&&"function"==typeof t.cancel&&!t.isCancelled()}function c(t){var e=t[0],n=t.reduce(function(t,e){return t.concat(e.records)},[]);return{totalResults:e.totalResults,startIndex:e.startIndex,itemsPerPage:e.itemsPerPage,records:n}}var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Object.defineProperty(e,"__esModule",{value:!0}),e.OpenSearchPaginator=e.PagedSearchProgressEmitter=void 0;var p=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};o(this,t);var s=r.useCache,a=void 0===s||s,u=r.preferredItemsPerPage,c=void 0===u?void 0:u,l=r.preferStartIndex,p=void 0===l||l,h=r.baseOffset,f=void 0===h?0:h,d=r.totalResults,g=void 0===d?void 0:d,y=r.serverItemsPerPage,_=void 0===y?void 0:y,m=i(r,["useCache","preferredItemsPerPage","preferStartIndex","baseOffset","totalResults","serverItemsPerPage"]);this._url=e,this._parameters=n,this._cache=a?{}:null,this._preferredItemsPerPage=c,this._preferStartIndex=p,this._baseOffset=f,this._totalResults=g,this._serverItemsPerPage=_,this._searchOptions=m}return p(t,[{key:"fetchPage",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=(0,g.assign)({},this._parameters),i=this.getActualPageSize();return i&&n?r.count=Math.min(n,i):i?r.count=i:n&&(r.count=n),this._preferStartIndex?"undefined"==typeof i?r.startIndex=this._baseOffset+this._url.indexOffset:r.startIndex=this._baseOffset+i*e+this._url.indexOffset:r.startPage=e+this._url.pageOffset,(0,d.search)(this._url,r,this._searchOptions).then(function(e){return t._totalResults=e.totalResults,!t._serverItemsPerPage&&e.itemsPerPage&&(t._serverItemsPerPage=e.itemsPerPage),e})}},{key:"fetchAllPages",value:function(){var t=this;return this.fetchPage().then(function(e){for(var n=t.getPageCount(),r=[e],i=1;ii&&(a=i-n.itemsPerPage*s),r.push(e.fetchPage(s,a))}return Promise.all(r).then(function(t){return c(t)})})}},{key:"searchFirstRecords",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=new _,i=null,o=null;this._serverItemsPerPage&&this._totalResults&&"undefined"!=typeof e&&0!==e?(i=Promise.resolve({itemsPerPage:this._serverItemsPerPage,records:[],totalResults:this._totalResults,startIndex:this._baseOffset}),o=0):(i=this.fetchPage(0,e),o=1);var s=[i];r.on("cancel",function(){s.forEach(function(t){u(t)&&t.cancel()})});var a=!1,l=function(t){return a=!0,r.emit("error",t),t};return i.catch(l).then(function(i){if(a)throw i;var u=[];1===o&&u.push(Promise.resolve(i));for(var p=e?Math.min(e,i.totalResults-i.startIndex+t._url.indexOffset):i.totalResults,h=i.itemsPerPage?Math.ceil(p/i.itemsPerPage):1,f=o;fp&&(d=p-i.itemsPerPage*f),u.push(t.fetchPage(f,d))}s=u;var g=Array(s.length);n?!function(){var t=0,e=Array.from(s),n=function n(i){if(!a){g[t]=i,t+=1,r.emit("page",i);var o=e.shift();o?o.then(n,l):r.emit("success",c(g))}};e.shift().then(n,l)}():!function(){var t=0;s.forEach(function(e,n){e.then(function(e){a||(t+=1,g[n]=e,t===s.length&&r.emit("success",c(g)))},l)})}()}),r}},{key:"getActualPageSize",value:function(){if(this._preferredItemsPerPage&&this._serverItemsPerPage)return Math.min(this._preferredItemsPerPage,this._serverItemsPerPage);if(this._serverItemsPerPage)return this._serverItemsPerPage;if(this._preferredItemsPerPage)return this._preferredItemsPerPage;var t=this._url.getParameter("count");if(t){if("undefined"!=typeof t.maxExclusive)return t.maxExclusive-1;if(t.maxInclusive)return t.maxInclusive}}},{key:"getPageCount",value:function(){var t=this.getActualPageSize();if(!this._totalResults)return this._totalResults;if(t)return Math.ceil(this._totalResults/t)}}]),t}()},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=p.exec(t);return e?e[1]:null}function o(t){return"?"!==p.exec(t)[2]}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=e?new RegExp(e):null;if(t instanceof Date){var r=t.toISOString(),i=r;return!n||n.test(i)?i:(i=r.split(".")[0]+"Z",!n||n.test(i)?i:(i=r.slice(0,-1),!n||n.test(i)?i:(i=r.split(".")[0],!n||n.test(i)?i:r)))}return t}function a(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=function(t){return s(t,n)};if("string"==typeof t)return t;if("number"==typeof t)return t.toString();if(e&&t instanceof Date)return r(t);if(Array.isArray(t))return e?"{"+t.map(r).join(",")+"}":"{"+t.join(",")+"}";var i=null,o=null;return Object.prototype.hasOwnProperty.call(t,"min")?i="["+(e?r(t.min):t.min):Object.prototype.hasOwnProperty.call(t,"minExclusive")&&(i="]"+(e?r(t.minExclusive):t.minExclusive)),Object.prototype.hasOwnProperty.call(t,"max")?o=(e?r(t.max):t.max)+"]":Object.prototype.hasOwnProperty.call(t,"maxExclusive")&&(o=(e?r(t.maxExclusive):t.maxExclusive)+"["),null!==i&&null!==o?i+","+o:null!==i?i:o}function u(t,e,n){switch(e){case"time:start":case"time:end":return s(t,n);case"geo:box":if(Array.isArray(t))return t.join(",");break;case"geo:geometry":return(0,l.toWKT)(t);case"eo:orbitNumber":case"eo:track":case"eo:frame":case"eo:cloudCover":case"eo:snowCover":case"eo:startTimeFromAscendingNode":case"eo:completionTimeFromAscendingNode":case"eo:illuminationAzimuthAngle":case"eo:illuminationZenithAngle":case"eo:illuminationElevationAngle":case"eo:minimumIncidenceAngle":case"eo:maximumIncidenceAngle":case"eo:dopplerFrequency":case"eo:incidenceAngleVariation":return a(t,!1,n);case"eo:availabilityTime":case"eo:creationDate":case"eo:modificationDate":case"eo:processingDate":return a(t,!0,n)}return t}Object.defineProperty(e,"__esModule",{value:!0}),e.OpenSearchParameter=void 0;var c=function(){function t(t,e){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:void 0;r(this,t),this._type=e,this._name=n,this._mandatory=i,this._options=o,this._minExclusive=s,this._maxExclusive=a,this._minInclusive=u,this._maxInclusive=c,this._pattern=l}return c(t,[{key:"combined",value:function(e){return new t(this.type,this.name,(0,l.isNullOrUndefined)(this.mandatory)?e.mandatory:this.mandatory,(0,l.isNullOrUndefined)(this.options)?e.options:this.options,(0,l.isNullOrUndefined)(this.minExclusive)?e.minExclusive:this.minExclusive,(0,l.isNullOrUndefined)(this.maxExclusive)?e.maxExclusive:this.maxExclusive,(0,l.isNullOrUndefined)(this.minInclusive)?e.minInclusive:this.minInclusive,(0,l.isNullOrUndefined)(this.maxInclusive)?e.maxInclusive:this.maxInclusive,(0,l.isNullOrUndefined)(this.pattern)?e.pattern:this.pattern)}},{key:"serializeValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=this.type;return this.isMulti&&e?Array.isArray(t)?u(t[this.types.indexOf(e)],e,this.pattern):Object.prototype.hasOwnProperty.call(t,e)?u(t[e],e,this.pattern):u(t,e,this.pattern):u(t,n,this.pattern)}},{key:"serialize",value:function(){var t={type:this._type,name:this._name,mandatory:this._mandatory,options:this._options,pattern:this._pattern};return"undefined"!=typeof this._minExclusive&&(t.minExclusive=this._minExclusive),"undefined"!=typeof this._maxExclusive&&(t.maxExclusive=this._maxExclusive),"undefined"!=typeof this._minInclusive&&(t.minInclusive=this._minInclusive),"undefined"!=typeof this._maxInclusive&&(t.maxInclusive=this._maxInclusive),t}},{key:"type",get:function(){return this._type}},{key:"name",get:function(){return this._name}},{key:"mandatory",get:function(){return this._mandatory}},{key:"options",get:function(){return this._options}},{key:"minExclusive",get:function(){return this._minExclusive}},{key:"maxExclusive",get:function(){return this._maxExclusive}},{key:"minInclusive",get:function(){return this._minInclusive}},{key:"maxInclusive",get:function(){return this._maxInclusive}},{key:"pattern",get:function(){return this._pattern}},{key:"isMulti",get:function(){return Array.isArray(this.type)}}],[{key:"fromNode",value:function(e){var n=i(e.getAttribute("value")),r=e.getAttribute("name"),o=e.hasAttribute("minimum")?"0"!==e.getAttribute("minimum"):void 0,s=e.hasAttribute("minExclusive")?parseInt(e.getAttribute("minExclusive"),10):void 0,a=e.hasAttribute("maxExclusive")?parseInt(e.getAttribute("maxExclusive"),10):void 0,u=e.hasAttribute("minInclusive")?parseInt(e.getAttribute("minInclusive"),10):void 0,c=e.hasAttribute("maxInclusive")?parseInt(e.getAttribute("maxInclusive"),10):void 0,p=e.hasAttribute("pattern")?e.getAttribute("pattern"):void 0,h=(0,l.getElements)(e,"parameters","Option"),f=void 0;return h.length&&(f=h.map(function(t){return{label:t.getAttribute("label"),value:t.getAttribute("value")}})),new t(n,r,o,f,s,a,u,c,p)}},{key:"fromKeyValuePair",value:function(e,n){var r=i(n);if(r){var s=n.match(h);if(s.length>1){var a=s.map(i),u=s.map(o).reduce(function(t,e){return t||e},!1);return new t(a,e,u)}return new t(r,e,o(n))}return null}},{key:"deserialize",value:function(e){return new t(e.type,e.name,e.mandatory,e.options,e.minExclusive,e.maxExclusive,e.minInclusive,e.maxInclusive,e.pattern)}}]),t}()},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.OpenSearchService=void 0;var i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null;if(e)r=this.getUrl(t,e,n);else{for(var i=(0,u.getSupportedTypes)(),o=0;o1&&void 0!==arguments[1]?arguments[1]:{},n=e.type,r=void 0===n?null:n,i=e.method,o=void 0===i?null:i,s=null;if(r)s=this.getUrl(t,r,o);else{for(var c=(0,u.getSupportedTypes)(),l=0;l1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r="application/x-suggestions+json",i=void 0;try{i=this.getUrl(t,r,e)}catch(t){var o=(0,l.config)(),s=o.Promise;return s.reject(new Error("No suggestion URL found."))}return(0,a.search)(i,t,r,!1,n)}},{key:"getPaginator",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.type,r=void 0===n?null:n,i=e.method,o=void 0===i?null:i;return new s.OpenSearchPaginator(this.getUrl(t,r,o),t,e)}},{key:"serialize",value:function(){return{description:this.descriptionDocument.serialize()}}}],[{key:"discover",value:function(e){var n=(0,l.config)(),r=n.useXHR,i=n.Promise;return r?new i(function(n,r,i){var o=(0,c.createXHR)(e);o.onload=function(){try{n(t.fromXml(o.responseText))}catch(t){r(t)}},o.onerror=function(){r(new TypeError("Failed to fetch"))},i&&"function"==typeof i&&i(function(){o.abort()})}):(0,c.fetchAndCheck)(e).then(function(t){return t.text()}).then(function(e){return t.fromXml(e)})}},{key:"fromXml",value:function(e){return new t(o.OpenSearchDescription.fromXml(e))}},{key:"deserialize",value:function(e){return new t(o.OpenSearchDescription.deserialize(e.description))}}]),t}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(Object.prototype.hasOwnProperty.call(t,e.name))return!1;if(e.isMulti){for(var n=e.type,r=0;r2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"GET",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"application/x-www-form-urlencoded",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,u=this,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:["results"];i(this,t),this._type=e,this._url=n,this._method=o,this._enctype=s,this._indexOffset=a,this._pageOffset=c,this._relations=l,this._parameters=r,this._parametersByName={},this._parametersByType={},this._multiParameters={},r.forEach(function(t){var e=t.type;if(Array.isArray(e))for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"GET",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/x-www-form-urlencoded",o=(0,l.default)(n,!0),s=Object.keys(o.query).map(function(t){return h.OpenSearchParameter.fromKeyValuePair(t,o.query[t])}).filter(function(t){return t});return new t(e,n,s,r,i)}},{key:"deserialize",value:function(e){return new t(e.type,e.url,e.parameters.map(function(t){return h.OpenSearchParameter.deserialize(t)}),e.method,e.enctype,e.indexOffset,e.pageOffset,e.relations)}}]),t}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e180;)e[n]-=360;for(;e[n]<-180;)e[n]+=360}return e}function s(t,e){return t.map(function(t){var n=!1;if(t.geometry&&"Polygon"===t.geometry.type)for(var r=0;r180&&(u[0]-=360,n=!0)),s=u}else if(e&&t.geometry&&"MultiPolygon"===t.geometry.type){for(var p=0;p=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(145),e.setImmediate="undefined"!=typeof self&&self.setImmediate||"undefined"!=typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||"undefined"!=typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(e,function(){return this}())}]); +//# sourceMappingURL=27bebdebc3e7ff51ebb1.worker.js.map \ No newline at end of file diff -Nru eoxserver-1.0rc21/eoxserver/webclient/static/bower_components/backbone-amd/backbone-min.js eoxserver-1.0rc22/eoxserver/webclient/static/bower_components/backbone-amd/backbone-min.js --- eoxserver-1.0rc21/eoxserver/webclient/static/bower_components/backbone-amd/backbone-min.js 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/webclient/static/bower_components/backbone-amd/backbone-min.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -(function(t,e){if(typeof exports!=="undefined"){e(t,exports,require("underscore"))}else if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,s){t.Backbone=e(t,s,i,r)})}else{t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}})(this,function(t,e,i,r){var s=t.Backbone;var n=[];var a=n.push;var h=n.slice;var o=n.splice;e.VERSION="1.0.0";e.$=r;e.noConflict=function(){t.Backbone=s;return this};e.emulateHTTP=false;e.emulateJSON=false;var u=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,r){if(!c(this,"once",t,[e,r])||!e)return this;var s=this;var n=i.once(function(){s.off(t,n);e.apply(this,arguments)});n._callback=e;return this.on(t,n,r)},off:function(t,e,r){var s,n,a,h,o,u,l,f;if(!this._events||!c(this,"off",t,[e,r]))return this;if(!t&&!e&&!r){this._events={};return this}h=t?[t]:i.keys(this._events);for(o=0,u=h.length;o").attr(t);this.setElement(r,false)}else{this.setElement(i.result(this,"el"),false)}}});e.sync=function(t,r,s){var n=S[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:n,dataType:"json"};if(!s.url){a.url=i.result(r,"url")||R()}if(s.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(s.attrs||r.toJSON(s))}if(s.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(s.emulateHTTP&&(n==="PUT"||n==="DELETE"||n==="PATCH")){a.type="POST";if(s.emulateJSON)a.data._method=n;var h=s.beforeSend;s.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",n);if(h)return h.apply(this,arguments)}}if(a.type!=="GET"&&!s.emulateJSON){a.processData=false}if(a.type==="PATCH"&&window.ActiveXObject&&!(window.external&&window.external.msActiveXFilteringEnabled)){a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var o=s.xhr=e.ajax(i.extend(a,s));r.trigger("request",r,o,s);return o};var S={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var T=/\((.*?)\)/g;var H=/(\(\?)?:\w+/g;var A=/\*\w+/g;var I=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,u,{initialize:function(){},route:function(t,r,s){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){s=r;r=""}if(!s)s=this[r];var n=this;e.history.route(t,function(i){var a=n._extractParameters(t,i);s&&s.apply(n,a);n.trigger.apply(n,["route:"+r].concat(a));n.trigger("route",r,a);e.history.trigger("route",n,r,a)});return this},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(I,"\\$&").replace(T,"(?:$1)?").replace(H,function(t,e){return e?t:"([^/]+)"}).replace(A,"(.*?)");return new RegExp("^"+t+"$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t){return t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[];i.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var P=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var C=/msie [\w.]+/;var j=/\/$/;N.started=false;i.extend(N.prototype,u,{interval:50,getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=this.location.pathname;var i=this.root.replace(j,"");if(!t.indexOf(i))t=t.substr(i.length)}else{t=this.getHash()}}return t.replace(P,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");N.started=true;this.options=i.extend({},{root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment();var s=document.documentMode;var n=C.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);this.root=("/"+this.root+"/").replace(O,"/");if(n&&this._wantsHashChange){this.iframe=e.$('');(0,M.default)("body").append(e);var A=e[0].contentDocument,i='
';A.write(i),(0,M.default)("form",A).submit(),setTimeout(function(){e.remove()},2e4)})})}}function r(t,e,A){(0,c.saveAs)(new Blob([A],{type:e}),t)}function a(t,e,A,i){var n=void 0;return n="EO-WCS"===t.get("download.protocol")?(0,g.getDownloadInfos)(t,e,A,i):"S3"===t.get("download.protocol")?(0,u.getDownloadInfos)(t,A):(0,l.getDownloadInfos)(A),n.then(function(e){return e.map(function(e){return Object.assign({},e,{href:(0,I.default)(e.href,t.get("download.rewrite"))})})})}Object.defineProperty(e,"__esModule",{value:!0}),e.isRecordDownloadable=n,e.downloadRecord=o,e.downloadCustom=r,e.getDownloadInfos=a;var s=A(11),M=i(s),c=A(961),g=A(168),l=A(532),u=A(531),d=A(241),I=i(d)},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4,ABORT:5}},function(t,e,A){var i=A(51),n=A(128),o=A(27),r=A(22),a=A(193);t.exports=function(t,e){var A=1==t,s=2==t,M=3==t,c=4==t,g=6==t,l=5==t||g,u=e||a;return function(e,a,d){for(var I,h,T=o(e),N=n(T),E=i(a,d,3),f=r(N.length),C=0,p=A?u(e,f):s?u(e,0):void 0;f>C;C++)if((l||C in N)&&(I=N[C],h=E(I,C,T),t))if(A)p[C]=h;else if(h)switch(t){case 3:return!0;case 5:return I;case 6:return C;case 2:p.push(I)}else if(c)return!1;return g?-1:M||c?c:p}}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,A){var i=A(1),n=A(50),o=A(12);t.exports=function(t,e){var A=(n.Object||{})[t]||Object[t],r={};r[t]=e(A),i(i.S+i.F*o(function(){A(1)}),"Object",r)}},function(t,e,A){var i=A(16);t.exports=function(t,e){if(!i(t))return t;var A,n;if(e&&"function"==typeof(A=t.toString)&&!i(n=A.call(t)))return n;if("function"==typeof(A=t.valueOf)&&!i(n=A.call(t)))return n;if(!e&&"function"==typeof(A=t.toString)&&!i(n=A.call(t)))return n;throw TypeError("Can't convert object to primitive value")}},function(t,e,A){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){var e;return 2==t?e=l.default.XY:3==t?e=l.default.XYZ:4==t&&(e=l.default.XYZM),e}function o(t){var e;return t==l.default.XY?e=2:t==l.default.XYZ||t==l.default.XYM?e=3:t==l.default.XYZM&&(e=4),e}function r(t,e,A){var i=t.getFlatCoordinates();if(i){var n=t.getStride();return(0,u.transform2D)(i,0,i.length,n,e,A)}return null}Object.defineProperty(e,"__esModule",{value:!0}),e.getStrideForLayout=o,e.transformGeom2D=r;var a=A(9),s=A(4),M=A(262),c=i(M),g=A(102),l=i(g),u=A(120),d=A(17),I=function(t){function e(){t.call(this),this.layout=l.default.XY,this.stride=2,this.flatCoordinates=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeExtent=function(t){return(0,s.createOrUpdateFromFlatCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return(0,a.abstract)()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!=this.getRevision()&&((0,d.clear)(this.simplifiedGeometryCache),this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=t.toString();if(this.simplifiedGeometryCache.hasOwnProperty(e))return this.simplifiedGeometryCache[e];var A=this.getSimplifiedGeometryInternal(t),i=A.getFlatCoordinates();return i.lengthA;)n[A]=e[A++];return n},vt=function(t,e,A){H(t,e,{get:function(){return this._d[A]}})},bt=function(t){var e,A,i,n,o,r,a=p(t),s=arguments.length,c=s>1?arguments[1]:void 0,g=void 0!==c,l=L(a);if(void 0!=l&&!y(l)){for(r=l.call(a),i=[],e=0;!(o=r.next()).done;e++)i.push(o.value);a=i}for(g&&s>2&&(c=M(c,arguments[2],2)),e=0,A=I(a.length),n=jt(this,A);A>e;e++)n[e]=g?c(a[e],e):a[e];return n},Yt=function(){for(var t=0,e=arguments.length,A=jt(this,e);e>t;)A[t]=arguments[t++];return A},Ot=!!P&&o(function(){Tt.call(new P(1))}),Ut=function(){return Tt.apply(Ot?It.call(mt(this)):mt(this),arguments)},kt={copyWithin:function(t,e){return U.call(mt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return At(mt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return O.apply(mt(this),arguments)},filter:function(t){return St(this,tt(mt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return it(mt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return nt(mt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){$(mt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return rt(mt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return ot(mt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ut.apply(mt(this),arguments)},lastIndexOf:function(t){return ct.apply(mt(this),arguments)},map:function(t){return xt(mt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return gt.apply(mt(this),arguments)},reduceRight:function(t){return lt.apply(mt(this),arguments)},reverse:function(){for(var t,e=this,A=mt(e).length,i=Math.floor(A/2),n=0;n1?arguments[1]:void 0)},sort:function(t){return dt.call(mt(this),t)},subarray:function(t,e){var A=mt(this),i=A.length,n=T(t,i);return new(S(A,A[Ct]))(A.buffer,A.byteOffset+n*A.BYTES_PER_ELEMENT,I((void 0===e?i:T(e,i))-n))}},Ft=function(t,e){return St(this,It.call(mt(this),t,e))},Ht=function(t){mt(this);var e=Qt(arguments[1],1),A=this.length,i=p(t),n=I(i.length),o=0;if(n+e>A)throw G(wt);for(;o255?255:255&i),n.v[u](A*e+n.o,i,Lt)},Q=function(t,e){H(t,e,{get:function(){return L(this,e)},set:function(t){return B(this,e,t)},enumerable:!0})};E?(d=A(function(t,A,i,n){c(t,d,M,"_d");var o,r,a,s,g=0,u=0;if(C(A)){if(!(A instanceof K||(s=f(A))==_||s==V))return yt in A?zt(d,A):bt.call(d,A);o=A,u=Qt(i,e);var T=A.byteLength;if(void 0===n){if(T%e)throw G(wt);if(r=T-u,r<0)throw G(wt)}else if(r=I(n)*e,r+u>T)throw G(wt);a=r/e}else a=h(A),r=a*e,o=new K(r);for(l(t,"_d",{b:o,o:u,l:r,e:a,v:new q(o)});g":">",'"':""","'":"'","`":"`","=":"="},g=/[&<>"'`=]/g,l=/[&<>"'`=]/,u=Object.prototype.toString;e.toString=u;var d=function(t){return"function"==typeof t};d(/x/)&&(e.isFunction=d=function(t){return"function"==typeof t&&"[object Function]"===u.call(t)}),e.isFunction=d;var I=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===u.call(t)};e.isArray=I},function(t,e){"use strict";function A(t,e,A){if(A=A||{},!w(A))throw new Error("options is invalid");var i=A.bbox,n=A.id;if(void 0===t)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");i&&x(i),n&&L(n);var o={type:"Feature"};return n&&(o.id=n),i&&(o.bbox=i),o.properties=e||{},o.geometry=t,o}function i(t,e,A){if(A=A||{},!w(A))throw new Error("options is invalid");var i=A.bbox;if(!t)throw new Error("type is required");if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");i&&x(i);var o;switch(t){case"Point":o=n(e).geometry;break;case"LineString":o=s(e).geometry;break;case"Polygon":o=r(e).geometry;break;case"MultiPoint":o=l(e).geometry;break;case"MultiLineString":o=g(e).geometry;break;case"MultiPolygon":o=u(e).geometry;break;default:throw new Error(t+" is invalid")}return i&&(o.bbox=i),o}function n(t,e,i){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!D(t[0])||!D(t[1]))throw new Error("coordinates must contain numbers");return A({type:"Point",coordinates:t},e,i)}function o(t,e,A){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");return c(t.map(function(t){return n(t,e)}),A)}function r(t,e,i){if(!t)throw new Error("coordinates is required");for(var n=0;n=0))throw new Error("precision must be a positive number");var A=Math.pow(10,e||0);return Math.round(t*A)/A}function h(t,e){if(void 0===t||null===t)throw new Error("radians is required");if(e&&"string"!=typeof e)throw new Error("units must be a string");var A=Y[e||"kilometers"];if(!A)throw new Error(e+" units is invalid");return t*A}function T(t,e){if(void 0===t||null===t)throw new Error("distance is required");if(e&&"string"!=typeof e)throw new Error("units must be a string");var A=Y[e||"kilometers"];if(!A)throw new Error(e+" units is invalid");return t/A}function N(t,e){return f(T(t,e))}function E(t){if(null===t||void 0===t)throw new Error("bearing is required");var e=t%360;return e<0&&(e+=360),e}function f(t){if(null===t||void 0===t)throw new Error("radians is required");var e=t%(2*Math.PI);return 180*e/Math.PI}function C(t){if(null===t||void 0===t)throw new Error("degrees is required");var e=t%360;return e*Math.PI/180}function p(t,e,A){if(null===t||void 0===t)throw new Error("length is required");if(!(t>=0))throw new Error("length must be a positive number");return h(T(t,e),A||"kilometers")}function y(t,e,A){if(null===t||void 0===t)throw new Error("area is required");if(!(t>=0))throw new Error("area must be a positive number");var i=U[e||"meters"];if(!i)throw new Error("invalid original units");var n=U[A||"kilometers"];if(!n)throw new Error("invalid final units");return t/i*n}function D(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function w(t){return!!t&&t.constructor===Object}function x(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!D(t))throw new Error("bbox must only contain numbers")})}function L(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}function B(){throw new Error("method has been renamed to `radiansToDegrees`")}function Q(){throw new Error("method has been renamed to `degreesToRadians`")}function m(){throw new Error("method has been renamed to `lengthToDegrees`")}function j(){throw new Error("method has been renamed to `lengthToRadians`")}function S(){throw new Error("method has been renamed to `radiansToLength`")}function z(){throw new Error("method has been renamed to `bearingToAzimuth`")}function v(){throw new Error("method has been renamed to `convertLength`")}Object.defineProperty(e,"__esModule",{value:!0});var b=6371008.8,Y={meters:b,metres:b,millimeters:1e3*b,millimetres:1e3*b,centimeters:100*b,centimetres:100*b,kilometers:b/1e3,kilometres:b/1e3,miles:b/1609.344,nauticalmiles:b/1852,inches:39.37*b,yards:b/1.0936,feet:3.28084*b,radians:1,degrees:b/111325},O={meters:1,metres:1,millimeters:1e3,millimetres:1e3,centimeters:100,centimetres:100,kilometers:.001,kilometres:.001,miles:1/1609.344,nauticalmiles:1/1852,inches:39.37,yards:1/1.0936,feet:3.28084,radians:1/b,degrees:1/111325},U={meters:1,metres:1,millimeters:1e6,millimetres:1e6,centimeters:1e4,centimetres:1e4,kilometers:1e-6,kilometres:1e-6,acres:247105e-9,miles:3.86e-7,yards:1.195990046,feet:10.763910417,inches:1550.003100006};e.earthRadius=b,e.factors=Y,e.unitsFactors=O,e.areaFactors=U,e.feature=A,e.geometry=i,e.point=n,e.points=o,e.polygon=r,e.polygons=a,e.lineString=s,e.lineStrings=M,e.featureCollection=c,e.multiLineString=g,e.multiPoint=l,e.multiPolygon=u,e.geometryCollection=d,e.round=I,e.radiansToLength=h,e.lengthToRadians=T,e.lengthToDegrees=N,e.bearingToAzimuth=E,e.radiansToDegrees=f,e.degreesToRadians=C,e.convertLength=p,e.convertArea=y,e.isNumber=D,e.isObject=w,e.validateBBox=x,e.validateId=L,e.radians2degrees=B,e.degrees2radians=Q,e.distanceToDegrees=m,e.distanceToRadians=j,e.radiansToDistance=S,e.bearingToAngle=z,e.convertDistance=v},function(t,e,A){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CollectionEvent=void 0;var n=A(243),o=i(n),r=A(83),a=i(r),s=A(32),M=i(s),c=A(31),g=i(c),l={LENGTH:"length"},u=e.CollectionEvent=function(t){function e(e,A){t.call(this,e),this.element=A}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(g.default),d=function(t){function e(e,A){t.call(this);var i=A||{};if(this.unique_=!!i.unique,this.array_=e?e:[],this.unique_)for(var n=0,o=this.array_.length;n0;)this.pop()},e.prototype.extend=function(t){for(var e=0,A=t.length;e=1?(A=c,i=g):(A=s+d*l,i=M+d*u),[A,i]}function r(t){return function(e){return h(e,t)}}function a(t,e,A){var i=(0,T.modulo)(e+180,360)-180,n=Math.abs(3600*i),o=A||0,r=Math.pow(10,o),a=Math.floor(n/3600),s=Math.floor((n-3600*a)/60),M=n-3600*a-60*s;return M=Math.ceil(M*r)/r,M>=60&&(M=0,s+=1),s>=60&&(s=0,a+=1),a+"° "+(0,N.padNumber)(s,2)+"′ "+(0,N.padNumber)(M,2,o)+"″"+(0==i?"":" "+t.charAt(i<0?1:0))}function s(t,e,A){return t?e.replace("{x}",t[0].toFixed(A)).replace("{y}",t[1].toFixed(A)):""}function M(t,e){for(var A=!0,i=t.length-1;i>=0;--i)if(t[i]!=e[i]){A=!1;break}return A}function c(t,e){var A=Math.cos(e),i=Math.sin(e),n=t[0]*A-t[1]*i,o=t[1]*A+t[0]*i;return t[0]=n,t[1]=o,t}function g(t,e){return t[0]*=e,t[1]*=e,t}function l(t,e){var A=t[0]-e[0],i=t[1]-e[1];return A*A+i*i}function u(t,e){return Math.sqrt(l(t,e))}function d(t,e){return l(t,o(t,e))}function I(t,e){return t?a("NS",t[1],e)+" "+a("EW",t[0],e):""}function h(t,e){return s(t,"{x}, {y}",e)}Object.defineProperty(e,"__esModule",{value:!0}),e.add=i,e.closestOnCircle=n,e.closestOnSegment=o,e.createStringXY=r,e.degreesToStringHDMS=a,e.format=s,e.equals=M,e.rotate=c,e.scale=g,e.squaredDistance=l,e.distance=u,e.squaredDistanceToSegment=d,e.toStringHDMS=I,e.toStringXY=h;var T=A(19),N=A(181)},function(t,e){"use strict";function A(t){return Math.pow(t,3)}function i(t){return 1-A(1-t)}function n(t){return 3*t*t-2*t*t*t}function o(t){return t}function r(t){return t<.5?n(2*t):1-n(2*(t-.5))}Object.defineProperty(e,"__esModule",{value:!0}),e.easeIn=A,e.easeOut=i,e.inAndOut=n,e.linear=o,e.upAndDown=r},function(t,e,A){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e,A,i){for(var n=A?A:32,o=[],r=0;r1&&void 0!==arguments[1]?arguments[1]:{};A(this,t),this.subs=[],this.init(e,i)}return t.prototype.init=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||n,this.options=e,this.debug=e.debug!==!1},t.prototype.setDebug=function(t){this.debug=t,this.subs.forEach(function(e){e.setDebug(t)})},t.prototype.log=function(){this.forward(arguments,"log","",!0)},t.prototype.warn=function(){this.forward(arguments,"warn","",!0)},t.prototype.error=function(){this.forward(arguments,"error","")},t.prototype.deprecate=function(){this.forward(arguments,"warn","WARNING DEPRECATED: ",!0)},t.prototype.forward=function(t,e,A,i){i&&!this.debug||("string"==typeof t[0]&&(t[0]=A+this.prefix+" "+t[0]),this.logger[e](t))},t.prototype.create=function(e){var A=new t(this.logger,i({prefix:this.prefix+":"+e+":"},this.options));return this.subs.push(A),A},t}();e.default=new o},function(t,e){"use strict";function A(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var i=e.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)A(i,n)&&(t[n]=i[n])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,A,i,n){if(e.subarray&&t.subarray)return void t.set(e.subarray(A,A+i),n);for(var o=0;o>=1;return n.join("")}function s(t,e){var A=t[0],i=t[1],n=t[2];if(e.getMinZoom()>A||A>e.getMaxZoom())return!1;var o,r=e.getExtent();return o=r?e.getTileRangeForExtentAndZ(r,A):e.getFullTileRange(A),!o||o.containsXY(i,n)}Object.defineProperty(e,"__esModule",{value:!0}),e.createOrUpdate=A,e.getKeyZXY=i,e.getKey=n,e.fromKey=o,e.hash=r,e.quadKey=a,e.withinExtentAndZ=s},function(t,e){var A=function(){"use strict";return void 0===this}();if(A)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:A,propertyIsWritable:function(t,e){var A=Object.getOwnPropertyDescriptor(t,e);return!(A&&!A.writable&&!A.set)}};else{var i={}.hasOwnProperty,n={}.toString,o={}.constructor.prototype,r=function(t){var e=[];for(var A in t)i.call(t,A)&&e.push(A);return e},a=function(t,e){return{value:t[e]}},s=function(t,e,A){return t[e]=A.value,t},M=function(t){return t},c=function(t){try{return Object(t).constructor.prototype}catch(t){return o}},g=function(t){try{return"[object Array]"===n.call(t)}catch(t){return!1}};t.exports={isArray:g,keys:r,names:r,defineProperty:s,getDescriptor:a,freeze:M,getPrototypeOf:c,isES5:A,propertyIsWritable:function(){return!0}}}},function(t,e){t.exports=function(t,e,A,i){if(!(t instanceof e)||void 0!==i&&i in t)throw TypeError(A+": incorrect invocation!");return t}},function(t,e,A){var i=A(51),n=A(316),o=A(200),r=A(5),a=A(22),s=A(216),M={},c={},e=t.exports=function(t,e,A,g,l){var u,d,I,h,T=l?function(){return t}:s(t),N=i(A,g,e?2:1),E=0;if("function"!=typeof T)throw TypeError(t+" is not iterable!");if(o(T)){for(u=a(t.length);u>E;E++)if(h=e?N(r(d=t[E])[0],d[1]):N(t[E]),h===M||h===c)return h}else for(I=T.call(t);!(d=I.next()).done;)if(h=n(I,N,d.value,e),h===M||h===c)return h};e.BREAK=M,e.RETURN=c},function(t,e,A){var i=A(5),n=A(322),o=A(196),r=A(209)("IE_PROTO"),a=function(){},s="prototype",M=function(){var t,e=A(195)("iframe"),i=o.length,n="<",r=">";for(e.style.display="none",A(198).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(n+"script"+r+"document.F=Object"+n+"/script"+r),t.close(),M=t.F;i--;)delete M[s][o[i]];return M()};t.exports=Object.create||function(t,e){var A;return null!==t?(a[s]=i(t),A=new a,a[s]=null,A[r]=t):A=M(),void 0===e?A:n(A,e)}},function(t,e,A){var i=A(324),n=A(196).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,n)}},function(t,e,A){var i=A(324),n=A(196);t.exports=Object.keys||function(t){return i(t,n)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,A){var i=A(37);t.exports=function(t,e,A){for(var n in e)i(t,n,e[n],A);return t}},function(t,e,A){"use strict";var i=A(10),n=A(25),o=A(23),r=A(20)("species");t.exports=function(t){var e=i[t];o&&e&&!e[r]&&n.f(e,r,{configurable:!0,get:function(){return this}})}},function(t,e){var A=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++A+i).toString(36))}},function(t,e){function A(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function n(t){if(c===setTimeout)return setTimeout(t,0);if((c===A||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(g===clearTimeout)return clearTimeout(t);if((g===i||!g)&&clearTimeout)return g=clearTimeout,clearTimeout(t);try{return g(t)}catch(e){try{return g.call(null,t)}catch(e){return g.call(this,t)}}}function r(){I&&u&&(I=!1,u.length?d=u.concat(d):h=-1,d.length&&a())}function a(){if(!I){var t=n(r);I=!0;for(var e=d.length;e;){for(u=d,d=[];++h1)for(var A=1;A0},e.prototype.removeEventListener=function(t,e){var A=this.listeners_[t];if(A){var i=A.indexOf(e);t in this.pendingRemovals_?(A[i]=a.VOID,++this.pendingRemovals_[t]):(A.splice(i,1),0===A.length&&delete this.listeners_[t])}},e}(o.default);e.default=c},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"}},function(t,e,A){"use strict";function i(t,e,A,i,o,r,s){var M=void 0!==s?s:[];return r||(A=a(t,e,A,i,o,M,0),t=M,e=0,i=2),M.length=n(t,e,A,i,o,M,0),M}function n(t,e,A,i,n,o,r){var a=(A-e)/i;if(a<3){for(;e0;){for(var g=M.pop(),u=M.pop(),d=0,I=t[u],h=t[u+1],T=t[g],N=t[g+1],E=u+i;Ed&&(c=E,d=p)}d>n&&(s[(c-e)/i]=1,u+in&&(o[r++]=M,o[r++]=c,a=M,s=c);return M==a&&c==s||(o[r++]=M,o[r++]=c),r}function s(t,e){return e*Math.round(t/e)}function M(t,e,A,i,n,o,r){if(e==A)return r;var a=s(t[e],n),M=s(t[e+1],n);e+=i,o[r++]=a,o[r++]=M;var c,g;do if(c=s(t[e],n),g=s(t[e+1],n),e+=i,e==A)return o[r++]=c,o[r++]=g,r;while(c==a&&g==M);for(;e0&&h>d)&&(I<0&&T0&&T>I)?(c=l,g=u):(o[r++]=c,o[r++]=g,a=c,M=g,c=l,g=u)}}return o[r++]=c,o[r++]=g,r}function c(t,e,A,i,n,o,r,a){for(var s=0,c=A.length;se[1]?[[t[0],e[0]],[e[1],t[1]]]:t[0]e[1]?[[e[1],t[1]]]:[]:[t]},M=function(t){var e,A,i,n,o,r;return isNaN(parseFloat(t))?(i=t.match(/^P(?:([0-9]+)Y|)?(?:([0-9]+)M|)?(?:([0-9]+)D|)?T?(?:([0-9]+)H|)?(?:([0-9]+)M|)?(?:([0-9]+)S|)?$/),i?(r=parseInt(i[1])||0,o=(parseInt(i[2])||0)+12*r,e=(parseInt(i[3])||0)+30*o,A=(parseInt(i[4])||0)+24*e,n=(parseInt(i[5])||0)+60*A,(parseInt(i[6])||0)+60*n):void 0):parseFloat(t)},s=function(t,e){return new Date(t.getTime()+1e3*e)},n=function(t,e,A,i){var n,o,r;return null==A&&(A="center"),null==i&&(i=[0,0]),n=e.getBoundingClientRect(),o=t[0][0].getBoundingClientRect(),r="left"===A?n.left:"right"===A?n.right:n.left+n.width/2,t.style("left",r-o.width/2+i[0]+"px").style("top",n.top-o.height+i[1]+"px")},t.exports={split:u,bisect:i,insort:o,intersects:r,pixelDistance:c,pixelWidth:l,pixelMaxDifference:g,merged:a,after:A,subtract:d,parseDuration:M,offsetDate:s,centerTooltipOn:n}},function(t,e,A){var i=A(49),n=A(20)("toStringTag"),o="Arguments"==i(function(){return arguments}()),r=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,A,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(A=r(e=Object(t),n))?A:o?i(e):"Object"==(a=i(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e){t.exports={}},function(t,e,A){var i=A(25).f,n=A(43),o=A(20)("toStringTag");t.exports=function(t,e,A){t&&!n(t=A?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,A){var i=A(1),n=A(58),o=A(12),r=A(212),a="["+r+"]",s="​…",M=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),g=function(t,e,A){var n={},a=o(function(){return!!r[t]()||s[t]()!=s}),M=n[t]=a?e(l):r[t];A&&(n[A]=M),i(i.P+i.F*a,"String",n)},l=g.trim=function(t,e){return t=String(n(t)),1&e&&(t=t.replace(M,"")),2&e&&(t=t.replace(c,"")),t};t.exports=g},function(t,e,A){var i,n,o;!function(r){n=[A(11)],i=r,o="function"==typeof i?i.apply(e,n):i,!(void 0!==o&&(t.exports=o))}(function(t){return t.ui=t.ui||{},t.ui.version="1.12.1"})},function(t,e,A){(function(t){"use strict";if(e.base64=!0,e.array=!0,e.string=!0,e.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,e.nodebuffer="undefined"!=typeof t,e.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)e.blob=!1;else{var A=new ArrayBuffer(0);try{e.blob=0===new Blob([A],{type:"application/zip"}).size}catch(t){try{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,n=new i;n.append(A),e.blob=0===n.getBlob("application/zip").size}catch(t){e.blob=!1}}}}).call(e,A(190).Buffer)},function(t,e,A){"use strict";function i(t){if(!t)throw new Error("coord is required");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&&void 0===t[0].length&&void 0===t[1].length)return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function n(t){if(!t)throw new Error("coords is required");if("Feature"===t.type&&null!==t.geometry)return t.geometry.coordinates;if(t.coordinates)return t.coordinates;if(Array.isArray(t))return t;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function o(t){if(t.length>1&&l.isNumber(t[0])&&l.isNumber(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return o(t[0]);throw new Error("coordinates must only contain numbers")}function r(t,e,A){if(!e||!A)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+A+": must be a "+e+", given "+t.type)}function a(t,e,A){if(!t)throw new Error("No feature passed");if(!A)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+A+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+A+": must be a "+e+", given "+t.geometry.type)}function s(t,e,A){if(!t)throw new Error("No featureCollection passed");if(!A)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+A+", FeatureCollection required");for(var i=0;ie[2])return"minX larger than maxX";if(e[1]>e[3])return"minX larger than maxX"}if(A&&Array.isArray(A)){if(2!==A.length)return"invalid time span specification";if(A[0]>A[1])return"min time larger than max time"}return null}},{key:"show",value:function(t){this.trigger("show:time",t||this.get("time"))}}]),e}(M.default.Model);c.prototype.defaults={area:null,time:null},e.default=c},function(t,e,A){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=A(15),o=i(n);A(1088);var r=A(966),a=i(r),s=o.default.LayoutView.extend({template:a.default,className:"modal fade",regions:{content:".modal-body"},events:function(){for(var t={"click .close":"close","shown.bs.modal":"onModalShown"},e=this.options.buttons||[],A=0;A0,buttons:this.buttonDescs.map(function(t){return t[0]})}},useBackdrop:function(){return!0},onAttach:function(){this.initialDisplay=this.$el.css("display"),this.$el.modal({backdrop:this.useBackdrop()}),this.$el.modal("show")},onModalShown:function(){this.showChildView("content",this.view)},open:function(){this.$el.modal("show"),this.closed=!1},close:function(){this.$el.modal("hide"),this.closed=!0},toggleOpen:function(){this.closed?this.open():this.close()},getView:function(){return this.view}});e.default=s},function(t,e,A){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){if("function"==typeof t)return t;var e;if(Array.isArray(t))e=t;else{(0,o.assert)("function"==typeof t.getZIndex,41);var A=t;e=[A]}return function(){return e}}Object.defineProperty(e,"__esModule",{value:!0}),e.createStyleFunction=n;var o=A(30),r=A(13),a=A(14),s=i(a),M=A(32),c=i(M),g=function(t){function e(e){if(t.call(this),this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,(0,r.listen)(this,(0,M.getChangeEventType)(this.geometryName_),this.handleGeometryChanged_,this),e)if("function"==typeof e.getSimplifiedGeometry){var A=e;this.setGeometry(A)}else{var i=e;this.setProperties(i)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function t(){var t=new e(this.getProperties());t.setGeometryName(this.getGeometryName());var A=this.getGeometry();A&&t.setGeometry(A.clone());var i=this.getStyle();return i&&t.setStyle(i),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&((0,r.unlistenByKey)(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=(0,r.listen)(t,s.default.CHANGE,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?n(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){(0,r.unlisten)(this,(0,M.getChangeEventType)(this.geometryName_),this.handleGeometryChanged_,this),this.geometryName_=t,(0,r.listen)(this,(0,M.getChangeEventType)(this.geometryName_),this.handleGeometryChanged_,this),this.handleGeometryChanged_()},e}(c.default);e.default=g},function(t,e,A){"use strict";function i(t){return"string"==typeof t?t:s(t)}function n(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var A=getComputedStyle(e).color;return document.body.removeChild(e),A}return""}function o(t){return Array.isArray(t)?t:u(t)}function r(t){var e,A,i,o,r;if(l.exec(t)&&(t=n(t)),g.exec(t)){var s,c=t.length-1;s=c<=4?1:2;var u=4===c||8===c;e=parseInt(t.substr(1+0*s,s),16),A=parseInt(t.substr(1+1*s,s),16),i=parseInt(t.substr(1+2*s,s),16),o=u?parseInt(t.substr(1+3*s,s),16):255,1==s&&(e=(e<<4)+e,A=(A<<4)+A,i=(i<<4)+i,u&&(o=(o<<4)+o)),r=[e,A,i,o/255]}else 0==t.indexOf("rgba(")?(r=t.slice(5,-1).split(",").map(Number),a(r)):0==t.indexOf("rgb(")?(r=t.slice(4,-1).split(",").map(Number),r.push(1),a(r)):(0,M.assert)(!1,14);return r}function a(t){return t[0]=(0,c.clamp)(t[0]+.5|0,0,255),t[1]=(0,c.clamp)(t[1]+.5|0,0,255),t[2]=(0,c.clamp)(t[2]+.5|0,0,255),t[3]=(0,c.clamp)(t[3],0,1),t}function s(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var A=t[1];A!=(0|A)&&(A=A+.5|0);var i=t[2];i!=(0|i)&&(i=i+.5|0);var n=void 0===t[3]?1:t[3];return"rgba("+e+","+A+","+i+","+n+")"}Object.defineProperty(e,"__esModule",{value:!0}),e.fromString=void 0,e.asString=i,e.asArray=o,e.normalize=a,e.toString=s;var M=A(30),c=A(19),g=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,l=/^([a-z]*)$/i,u=e.fromString=function(){var t=1024,e={},A=0;return function(i){var n;if(e.hasOwnProperty(i))n=e[i];else{if(A>=t){var o=0;for(var a in e)0===(3&o++)&&(delete e[a],--A)}n=r(i),e[i]=n,++A}return n}}()},function(t,e,A){"use strict";function i(t,e,A,i,n,o,r){var a,s=t[e],M=t[e+1],g=t[A]-s,l=t[A+1]-M;if(0===g&&0===l)a=e;else{var u=((n-s)*g+(o-M)*l)/(g*g+l*l);if(u>1)a=A;else{if(u>0){for(var d=0;dn&&(n=M),o=a,r=s}return n}function o(t,e,A,i,o){for(var r=0,a=A.length;r=t.minResolution&&ei.width?i.width-c:I,Q=s+g>i.height?i.height-g:s,m=h[3]+B*u+h[1],j=h[0]+Q*u+h[2],S=e-h[3],z=A-h[0];(E||0!==l)&&(C=[S,z],p=[S+m,z],y=[S+m,z+j],L=[S,z+j]);var v=null;if(0!==l){var b=e+n,Y=A+o;v=(0,D.compose)(x,b,Y,1,1,l,-b,-Y),(0,a.createOrUpdateEmpty)(w),(0,a.extendCoordinate)(w,(0,D.apply)(x,C)),(0,a.extendCoordinate)(w,(0,D.apply)(x,p)),(0,a.extendCoordinate)(w,(0,D.apply)(x,y)),(0,a.extendCoordinate)(w,(0,D.apply)(x,L))}else(0,a.createOrUpdate)(S,z,S+m,z+j,w);var O=t.canvas,U=N?N[2]*u/2:0,k=w[0]-U<=O.width&&w[2]+U>=0&&w[1]-U<=O.height&&w[3]+U>=0;if(d&&(e=Math.round(e),A=Math.round(A)),r){if(!k&&1==r[4])return;(0,a.extend)(r,w);var F=k?[t,v?v.slice(0):null,M,i,c,g,B,Q,e,A,u]:null;F&&E&&F.push(T,N,C,p,y,L),r.push(F)}else k&&(E&&this.replayTextBackground_(t,C,p,y,L,T,N),(0,f.drawImage)(t,v,M,i,c,g,B,Q,e,A,u))},e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map(function(t){return t*e})},e.prototype.appendFlatCoordinates=function(t,e,A,i,n,o){var r=this.coordinates.length,s=this.getBufferedMaxExtent();o&&(e+=i);var c,g,l,u=[t[e],t[e+1]],d=[NaN,NaN],I=!0;for(c=e+i;c5){var A=t[4];if(1==A||A==t.length-5){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};if(!this.declutterTree.collides(i)){this.declutterTree.insert(i);for(var n=5,o=t.length;n11&&this.replayTextBackground_(r[0],r[13],r[14],r[15],r[16],r[11],r[12]),f.drawImage.apply(void 0,r))}}t.length=5,(0,a.createOrUpdateEmpty)(t)}}},e.prototype.replay_=function(t,e,A,i,r,s,M){var c;this.pixelCoordinates_&&(0,o.equals)(e,this.renderedTransform_)?c=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),c=(0,I.transform2D)(this.coordinates,0,this.coordinates.length,2,e,this.pixelCoordinates_),(0,D.setFromArray)(this.renderedTransform_,e));for(var g,l,h,N,E,C,w,x,L,B,Q,m,j=!(0,T.isEmpty)(A),S=0,z=i.length,v=0,b=0,Y=0,O=null,U=null,k=this.coordinateCache_,F=this.viewRotation_,H={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:F},R=this.instructions!=i||this.overlaps?0:200;SR&&(this.fill_(t),b=0),Y>R&&(t.stroke(),Y=0),b||Y||(t.beginPath(),N=E=NaN),++S;break;case p.default.CIRCLE:v=G[1];var P=c[v],_=c[v+1],V=c[v+2],W=c[v+3],J=V-P,Z=W-_,K=Math.sqrt(J*J+Z*Z);t.moveTo(P+K,_),t.arc(P,_,K,0,2*Math.PI,!0),++S;break;case p.default.CLOSE_PATH:t.closePath(),++S;break;case p.default.CUSTOM:v=G[1],g=G[2];var q=G[3],$=G[4],tt=6==G.length?G[5]:void 0;H.geometry=q,H.feature=B,S in k||(k[S]=[]);var et=k[S];tt?tt(c,v,g,2,et):(et[0]=c[v],et[1]=c[v+1],et.length=2),$(et,H),++S;break;case p.default.DRAW_IMAGE:v=G[1],g=G[2],L=G[3],l=G[4],h=G[5],x=s?null:G[6];var At=G[7],it=G[8],nt=G[9],ot=G[10],rt=G[11],at=G[12],st=G[13],Mt=G[14],ct=void 0,gt=void 0,lt=void 0;for(G.length>16?(ct=G[15],gt=G[16],lt=G[17]):(ct=f.defaultPadding,gt=lt=!1),rt&&(at+=F);vthis.maxLineWidth&&(this.maxLineWidth=A.lineWidth,this.bufferedMaxExtent_=null)}else A.strokeStyle=void 0,A.lineCap=void 0,A.lineDash=null,A.lineDashOffset=void 0,A.lineJoin=void 0,A.lineWidth=void 0,A.miterLimit=void 0},e.prototype.createFill=function(t,e){var A=t.fillStyle,i=[p.default.SET_FILL_STYLE,A];return"string"!=typeof A&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[p.default.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e,A){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t,A)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,e){var A=t.strokeStyle,i=t.lineCap,n=t.lineDash,r=t.lineDashOffset,a=t.lineJoin,s=t.lineWidth,M=t.miterLimit;(t.currentStrokeStyle!=A||t.currentLineCap!=i||n!=t.currentLineDash&&!(0,o.equals)(t.currentLineDash,n)||t.currentLineDashOffset!=r||t.currentLineJoin!=a||t.currentLineWidth!=s||t.currentMiterLimit!=M)&&(void 0!==A&&e.call(this,t),t.currentStrokeStyle=A,t.currentLineCap=i,t.currentLineDash=n,t.currentLineDashOffset=r,t.currentLineJoin=a,t.currentLineWidth=s,t.currentMiterLimit=M)},e.prototype.endGeometry=function(t,e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var A=[p.default.END_GEOMETRY,e];this.instructions.push(A),this.hitDetectionInstructions.push(A)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,a.clone)(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;(0,a.buffer)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(E.default);e.default=L},function(t,e){"use strict";function A(t,e,A){return void 0===A&&(A=[0,0]),A[0]=t[0]+2*e,A[1]=t[1]+2*e,A}function i(t){return t[0]>0&&t[1]>0}function n(t,e,A){return void 0===A&&(A=[0,0]),A[0]=t[0]*e+.5|0,A[1]=t[1]*e+.5|0,A}function o(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:e[0]=e[1]=t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.buffer=A,e.hasArea=i,e.scale=n,e.toSize=o},function(t,e,A){"use strict";var i=A(5);t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,A){var i=A(49);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,A){var i=A(50),n=A(10),o="__core-js_shared__",r=n[o]||(n[o]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:i.version,mode:A(77)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,A){var i=A(5),n=A(34),o=A(20)("species");t.exports=function(t,e){var A,r=i(t).constructor;return void 0===r||void 0==(A=i(r)[o])?e:n(A)}},function(t,e){"use strict";function A(t,e){var n=e&&e.loc,o=void 0,r=void 0;n&&(o=n.start.line,r=n.start.column,t+=" - "+o+":"+r);for(var a=Error.prototype.constructor.call(this,t),s=0;s-1&&A.observers[t].splice(i,1)}else delete A.observers[t]})},t.prototype.emit=function(t){for(var e=arguments.length,A=Array(e>1?e-1:0),i=1;i-1?t.replace(/###/g,"."):t}for(var n="string"!=typeof e?[].concat(e):e.split(".");n.length>1;){if(!t)return{};var o=i(n.shift());!t[o]&&A&&(t[o]=new A),t=t[o]}return t?{obj:t,k:i(n.shift())}:{}}function o(t,e,A){var i=n(t,e,Object),o=i.obj,r=i.k;o[r]=A}function r(t,e,A,i){var o=n(t,e,Object),r=o.obj,a=o.k;r[a]=r[a]||[],i&&(r[a]=r[a].concat(A)),i||r[a].push(A)}function a(t,e){var A=n(t,e),i=A.obj,o=A.k;if(i)return i[o]}function s(t,e,A){for(var i in e)i in t?"string"==typeof t[i]||t[i]instanceof String||"string"==typeof e[i]||e[i]instanceof String?A&&(t[i]=e[i]):s(t[i],e[i],A):t[i]=e[i];return t}function M(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function c(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,function(t){return g[t]}):t}Object.defineProperty(e,"__esModule",{value:!0}),e.makeString=A,e.copy=i,e.setPath=o,e.pushPath=r,e.getPath=a,e.deepExtend=s,e.regexEscape=M,e.escape=c;var g={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}},function(t,e,A){(function(e){"use strict";function i(t){return(t?t:"").toString().replace(I,"")}function n(t){var A;A="undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{};var i=A.location||{};t=t||i;var n,o={},r=typeof t;if("blob:"===t.protocol)o=new a(unescape(t.pathname),{});else if("string"===r){o=new a(t,{});for(n in T)delete o[n]}else if("object"===r){for(n in t)n in T||(o[n]=t[n]);void 0===o.slashes&&(o.slashes=l.test(t.href))}return o}function o(t){t=i(t);var e=u.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function r(t,e){if(""===t)return e;for(var A=(e||"/").split("/").slice(0,-1).concat(t.split("/")),i=A.length,n=A[i-1],o=!1,r=0;i--;)"."===A[i]?A.splice(i,1):".."===A[i]?(A.splice(i,1),r++):r&&(0===i&&(o=!0),A.splice(i,1),r--);return o&&A.unshift(""),"."!==n&&".."!==n||A.push(""),A.join("/")}function a(t,e,A){if(t=i(t),!(this instanceof a))return new a(t,e,A);var s,M,l,u,d,I,T=h.slice(),N=typeof e,E=this,f=0;for("object"!==N&&"string"!==N&&(A=e,e=null),A&&"function"!=typeof A&&(A=g.parse),e=n(e),M=o(t||""),s=!M.protocol&&!M.slashes,E.slashes=M.slashes||s&&e.slashes,E.protocol=M.protocol||e.protocol||"",t=M.rest,M.slashes||(T[3]=[/(.*)/,"pathname"]);f1&&void 0!==arguments[1])||arguments[1],i=A(String(t.getUTCHours()),"0",2),o=A(String(t.getUTCMinutes()),"0",2),r=A(String(t.getUTCSeconds()),"0",2),a=t.getUTCMilliseconds();if(0!==a&&e){var s=A(String(a),"0",3);return""+n(t)+i+":"+o+":"+r+"."+s+"Z"}return""+n(t)+i+":"+o+":"+r+"Z"}function r(t,e){for(var A=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:null,i=t.attributes;return Object.keys(i).map(function(t){return A&&A.hasOwnProperty(t)?[A[t],i[t]]:A?null:t.startsWith("eo:")?[t.split(":")[1],i[t]]:null}).filter(function(t){return!!t}).map(function(t){var A=s(t,2),i=A[0],n=A[1];return n.min&&n.max?n.min instanceof Date&&n.max instanceof Date?i+" DURING "+e(n.min)+"/"+e(n.max):i+" BETWEEN "+e(n.min)+" AND "+e(n.max):n.min?n.min instanceof Date?i+" AFTER "+e(n.min):i+" >= "+e(n.min):n.max?n.max instanceof Date?i+" BEFORE "+e(n.min):i+" <= "+e(n.max):"string"==typeof n?i+" = '"+n+"'":i+" = "+e(n)}).join(" AND ")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var A=[],i=!0,n=!1,o=void 0;try{for(var r,a=t[Symbol.iterator]();!(i=(r=a.next()).done)&&(A.push(r.value),!e||A.length!==e);i=!0);}catch(t){n=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(n)throw o}}return A}return function(e,A){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.padLeft=A,e.getDateString=i,e.getISODateString=n,e.getISODateTimeString=o,e.uniqueBy=r,e.filtersToCQL=a},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={IDLE:0,LOADING:1,LOADED:2,ERROR:3}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={PROPERTYCHANGE:"propertychange"}},function(t,e,A){"use strict";function i(t){return Array.isArray(t)?(0,n.toString)(t):t}Object.defineProperty(e,"__esModule",{value:!0}),e.asColorLike=i;var n=A(118)},function(t,e,A){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=A(28),o=A(171),r=i(o),a=A(32),s=i(a),M=A(33),c=A(13),g=function(t){function e(e){t.call(this),this.element=e.element?e.element:null,this.target_=null,this.map_=null,this.listenerKeys=[],this.render=e.render?e.render:n.VOID,e.target&&this.setTarget(e.target)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){(0,M.removeNode)(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&(0,M.removeNode)(this.element);for(var e=0,A=this.listenerKeys.length;eo&&(M-a)*(o-s)-(n-a)*(c-s)>0&&r++:c<=o&&(M-a)*(o-s)-(n-a)*(c-s)<0&&r--,a=M,s=c}return 0!==r}function o(t,e,A,i,o,r){if(0===A.length)return!1;if(!n(t,e,A[0],i,o,r))return!1;for(var a=1,s=A.length;a=n[0]&&o[2]<=n[2]||(o[1]>=n[1]&&o[3]<=n[3]||(0,c.forEach)(t,e,A,i,function(t,e){return(0,s.intersectsSegment)(n,t,e)}))))}function n(t,e,A,n,o){for(var r=0,a=A.length;r1?l:l[0]}}if(t){var o="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){A(e),n(t,e)},t.bridget}}var i=Array.prototype.slice;A(t)}(t),function(t){function n(e,A){function i(t,e){var A="data-slider-"+e.replace(/_/g,"-"),i=t.getAttribute(A);try{return JSON.parse(i)}catch(t){return i}}this._state={value:null,enabled:null,offset:null,size:null,percentage:null,inDrag:!1,over:!1},this.ticksCallbackMap={},this.handleCallbackMap={},"string"==typeof e?this.element=document.querySelector(e):e instanceof HTMLElement&&(this.element=e),A=A?A:{};for(var n=Object.keys(this.defaultOptions),o=0;o0)for(var E=0;E0){for(this.ticksContainer=document.createElement("div"),this.ticksContainer.className="slider-tick-container",o=0;o0)for(this.tickLabelContainer=document.createElement("div"),this.tickLabelContainer.className="slider-tick-label-container",o=0;o0&&(this.options.max=Math.max.apply(Math,this.options.ticks),this.options.min=Math.min.apply(Math,this.options.ticks)),Array.isArray(this.options.value)?(this.options.range=!0,this._state.value=this.options.value):this.options.range?this._state.value=[this.options.value,this.options.max]:this._state.value=this.options.value,this.trackLow=c||this.trackLow,this.trackSelection=M||this.trackSelection,this.trackHigh=g||this.trackHigh,"none"===this.options.selection?(this._addClass(this.trackLow,"hide"),this._addClass(this.trackSelection,"hide"),this._addClass(this.trackHigh,"hide")):"after"!==this.options.selection&&"before"!==this.options.selection||(this._removeClass(this.trackLow,"hide"),this._removeClass(this.trackSelection,"hide"),this._removeClass(this.trackHigh,"hide")),this.handle1=l||this.handle1,this.handle2=u||this.handle2,I===!0)for(this._removeClass(this.handle1,"round triangle"),this._removeClass(this.handle2,"round triangle hide"),o=0;o0){for(var i,n,o,r=0,a=1;athis.options.max?this.options.max:c},toPercentage:function(t){if(this.options.max===this.options.min)return 0;if(this.options.ticks_positions.length>0){for(var e,A,i,n=0,o=0;o0?this.options.ticks[o-1]:0,i=o>0?this.options.ticks_positions[o-1]:0,A=this.options.ticks[o],n=this.options.ticks_positions[o];break}if(o>0){var r=(t-e)/(A-e);return i+r*(n-i)}}return 100*(t-this.options.min)/(this.options.max-this.options.min)}},logarithmic:{toValue:function(t){var e=0===this.options.min?0:Math.log(this.options.min),A=Math.log(this.options.max),i=Math.exp(e+(A-e)*t/100);return Math.round(i)===this.options.max?this.options.max:(i=this.options.min+Math.round((i-this.options.min)/this.options.step)*this.options.step,ithis.options.max?this.options.max:i)},toPercentage:function(t){if(this.options.max===this.options.min)return 0;var e=Math.log(this.options.max),A=0===this.options.min?0:Math.log(this.options.min),i=0===t?0:Math.log(t);return 100*(i-A)/(e-A)}}};if(i=function(t,e){return n.call(this,t,e),this},i.prototype={_init:function(){},constructor:i,defaultOptions:{id:"",min:0,max:10,step:1,precision:0,orientation:"horizontal",value:5,range:!1,selection:"before",tooltip:"show",tooltip_split:!1,handle:"round",reversed:!1,rtl:"auto",enabled:!0,formatter:function(t){return Array.isArray(t)?t[0]+" : "+t[1]:t},natural_arrow_keys:!1,ticks:[],ticks_positions:[],ticks_labels:[],ticks_snap_bounds:0,ticks_tooltip:!1,scale:"linear",focus:!1,tooltip_position:null,labelledby:null,rangeHighlights:[]},getElement:function(){return this.sliderElem},getValue:function(){return this.options.range?this._state.value:this._state.value[0]},setValue:function(t,e,A){t||(t=0);var i=this.getValue();this._state.value=this._validateInputValue(t);var n=this._applyPrecision.bind(this);this.options.range?(this._state.value[0]=n(this._state.value[0]),this._state.value[1]=n(this._state.value[1]),this._state.value[0]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[0])),this._state.value[1]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[1]))):(this._state.value=n(this._state.value),this._state.value=[Math.max(this.options.min,Math.min(this.options.max,this._state.value))],this._addClass(this.handle2,"hide"),"after"===this.options.selection?this._state.value[1]=this.options.max:this._state.value[1]=this.options.min), +this.options.max>this.options.min?this._state.percentage=[this._toPercentage(this._state.value[0]),this._toPercentage(this._state.value[1]),100*this.options.step/(this.options.max-this.options.min)]:this._state.percentage=[0,0,100],this._layout();var o=this.options.range?this._state.value:this._state.value[0];return this._setDataVal(o),e===!0&&this._trigger("slide",o),i!==o&&A===!0&&this._trigger("change",{oldValue:i,newValue:o}),this},destroy:function(){this._removeSliderEventHandlers(),this.sliderElem.parentNode.removeChild(this.sliderElem),this.element.style.display="",this._cleanUpEventCallbacksMap(),this.element.removeAttribute("data"),t&&(this._unbindJQueryEventHandlers(),this.$element.removeData("slider"))},disable:function(){return this._state.enabled=!1,this.handle1.removeAttribute("tabindex"),this.handle2.removeAttribute("tabindex"),this._addClass(this.sliderElem,"slider-disabled"),this._trigger("slideDisabled"),this},enable:function(){return this._state.enabled=!0,this.handle1.setAttribute("tabindex",0),this.handle2.setAttribute("tabindex",0),this._removeClass(this.sliderElem,"slider-disabled"),this._trigger("slideEnabled"),this},toggle:function(){return this._state.enabled?this.disable():this.enable(),this},isEnabled:function(){return this._state.enabled},on:function(t,e){return this._bindNonQueryEventHandler(t,e),this},off:function(e,A){t?(this.$element.off(e,A),this.$sliderElem.off(e,A)):this._unbindNonQueryEventHandler(e,A)},getAttribute:function(t){return t?this.options[t]:this.options},setAttribute:function(t,e){return this.options[t]=e,this},refresh:function(){return this._removeSliderEventHandlers(),n.call(this,this.element,this.options),t&&t.data(this.element,"slider",this),this},relayout:function(){return this._resize(),this._layout(),this},_removeSliderEventHandlers:function(){if(this.handle1.removeEventListener("keydown",this.handle1Keydown,!1),this.handle2.removeEventListener("keydown",this.handle2Keydown,!1),this.options.ticks_tooltip){for(var t=this.ticksContainer.getElementsByClassName("slider-tick"),e=0;e=0?A:this.attributes["aria-valuenow"].value,n=parseInt(i,10);e.value[0]=n,e.percentage[0]=t.options.ticks_positions[n],t._setToolTipOnMouseOver(e),t._showTooltip()};return e.addEventListener("mouseenter",i,!1),i},addMouseLeave:function(t,e){var A=function(){t._hideTooltip()};return e.addEventListener("mouseleave",A,!1),A}}},_layout:function(){var t;if(t=this.options.reversed?[100-this._state.percentage[0],this.options.range?100-this._state.percentage[1]:this._state.percentage[1]]:[this._state.percentage[0],this._state.percentage[1]],this.handle1.style[this.stylePos]=t[0]+"%",this.handle1.setAttribute("aria-valuenow",this._state.value[0]),isNaN(this.options.formatter(this._state.value[0]))&&this.handle1.setAttribute("aria-valuetext",this.options.formatter(this._state.value[0])),this.handle2.style[this.stylePos]=t[1]+"%",this.handle2.setAttribute("aria-valuenow",this._state.value[1]),isNaN(this.options.formatter(this._state.value[1]))&&this.handle2.setAttribute("aria-valuetext",this.options.formatter(this._state.value[1])),this.rangeHighlightElements.length>0&&Array.isArray(this.options.rangeHighlights)&&this.options.rangeHighlights.length>0)for(var e=0;e0){var r,a="vertical"===this.options.orientation?"height":"width";r="vertical"===this.options.orientation?"marginTop":this.options.rtl?"marginRight":"marginLeft";var s=this._state.size/(this.options.ticks.length-1);if(this.tickLabelContainer){var M=0;if(0===this.options.ticks_positions.length)"vertical"!==this.options.orientation&&(this.tickLabelContainer.style[r]=-s/2+"px"),M=this.tickLabelContainer.offsetHeight;else for(c=0;cM&&(M=this.tickLabelContainer.childNodes[c].offsetHeight);"horizontal"===this.options.orientation&&(this.sliderElem.style.marginBottom=M+"px")}for(var c=0;c=t[0]&&g<=t[1]&&this._addClass(this.ticks[c],"in-selection"):"after"===this.options.selection&&g>=t[0]?this._addClass(this.ticks[c],"in-selection"):"before"===this.options.selection&&g<=t[0]&&this._addClass(this.ticks[c],"in-selection"),this.tickLabels[c]&&(this.tickLabels[c].style[a]=s+"px","vertical"!==this.options.orientation&&void 0!==this.options.ticks_positions[c]?(this.tickLabels[c].style.position="absolute",this.tickLabels[c].style[this.stylePos]=g+"%",this.tickLabels[c].style[r]=-s/2+"px"):"vertical"===this.options.orientation&&(this.options.rtl?this.tickLabels[c].style.marginRight=this.sliderElem.offsetWidth+"px":this.tickLabels[c].style.marginLeft=this.sliderElem.offsetWidth+"px",this.tickLabelContainer.style[r]=this.sliderElem.offsetWidth/2*-1+"px"))}}var l;if(this.options.range){l=this.options.formatter(this._state.value),this._setText(this.tooltipInner,l),this.tooltip.style[this.stylePos]=(t[1]+t[0])/2+"%","vertical"===this.options.orientation?this._css(this.tooltip,"margin-"+this.stylePos,-this.tooltip.offsetHeight/2+"px"):this._css(this.tooltip,"margin-"+this.stylePos,-this.tooltip.offsetWidth/2+"px");var u=this.options.formatter(this._state.value[0]);this._setText(this.tooltipInner_min,u);var d=this.options.formatter(this._state.value[1]);this._setText(this.tooltipInner_max,d),this.tooltip_min.style[this.stylePos]=t[0]+"%","vertical"===this.options.orientation?this._css(this.tooltip_min,"margin-"+this.stylePos,-this.tooltip_min.offsetHeight/2+"px"):this._css(this.tooltip_min,"margin-"+this.stylePos,-this.tooltip_min.offsetWidth/2+"px"),this.tooltip_max.style[this.stylePos]=t[1]+"%","vertical"===this.options.orientation?this._css(this.tooltip_max,"margin-"+this.stylePos,-this.tooltip_max.offsetHeight/2+"px"):this._css(this.tooltip_max,"margin-"+this.stylePos,-this.tooltip_max.offsetWidth/2+"px")}else l=this.options.formatter(this._state.value[0]),this._setText(this.tooltipInner,l),this.tooltip.style[this.stylePos]=t[0]+"%","vertical"===this.options.orientation?this._css(this.tooltip,"margin-"+this.stylePos,-this.tooltip.offsetHeight/2+"px"):this._css(this.tooltip,"margin-"+this.stylePos,-this.tooltip.offsetWidth/2+"px");if("vertical"===this.options.orientation)this.trackLow.style.top="0",this.trackLow.style.height=Math.min(t[0],t[1])+"%",this.trackSelection.style.top=Math.min(t[0],t[1])+"%",this.trackSelection.style.height=Math.abs(t[0]-t[1])+"%",this.trackHigh.style.bottom="0",this.trackHigh.style.height=100-Math.min(t[0],t[1])-Math.abs(t[0]-t[1])+"%";else{"right"===this.stylePos?this.trackLow.style.right="0":this.trackLow.style.left="0",this.trackLow.style.width=Math.min(t[0],t[1])+"%","right"===this.stylePos?this.trackSelection.style.right=Math.min(t[0],t[1])+"%":this.trackSelection.style.left=Math.min(t[0],t[1])+"%",this.trackSelection.style.width=Math.abs(t[0]-t[1])+"%","right"===this.stylePos?this.trackHigh.style.left="0":this.trackHigh.style.right="0",this.trackHigh.style.width=100-Math.min(t[0],t[1])-Math.abs(t[0]-t[1])+"%";var I=this.tooltip_min.getBoundingClientRect(),h=this.tooltip_max.getBoundingClientRect();"bottom"===this.options.tooltip_position?I.right>h.left?(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top="",this.tooltip_max.style.bottom="22px"):(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top=this.tooltip_min.style.top,this.tooltip_max.style.bottom=""):I.right>h.left?(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top="18px"):(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top=this.tooltip_min.style.top)}},_createHighlightRange:function(t,e){return this._isHighlightRange(t,e)?t>e?{start:e,size:t-e}:{start:t,size:e-t}:null},_isHighlightRange:function(t,e){return 0<=t&&t<=100&&0<=e&&e<=100},_resize:function(t){this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this._layout()},_removeProperty:function(t,e){t.style.removeProperty?t.style.removeProperty(e):t.style.removeAttribute(e)},_mousedown:function(t){if(!this._state.enabled)return!1;this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos];var e=this._getPercentage(t);if(this.options.range){var A=Math.abs(this._state.percentage[0]-e),i=Math.abs(this._state.percentage[1]-e);this._state.dragged=A=-5&&(i>=15||i<=-15)?this._mousedown(t):i<=5&&i>=-5&&(A>=15||A<=-15)&&this._mousedown(t))}},_adjustPercentageForRangeSliders:function(t){if(this.options.range){var e=this._getNumDigitsAfterDecimalPlace(t);e=e?e-1:0;var A=this._applyToFixedAndParseFloat(t,e);0===this._state.dragged&&this._applyToFixedAndParseFloat(this._state.percentage[1],e)A?(this._state.percentage[1]=this._state.percentage[0],this._state.dragged=0):0===this._state.keyCtrl&&this._state.value[1]/this.options.max*100t&&(this._state.percentage[1]=this._state.percentage[0],this._state.keyCtrl=0,this.handle1.focus())}},_mouseup:function(){if(!this._state.enabled)return!1;this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),document.removeEventListener("mousemove",this.mousemove,!1),document.removeEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!1,this._state.over===!1&&this._hideTooltip();var t=this._calculateValue(!0);return this._layout(),this._setDataVal(t),this._trigger("slideStop",t),!1},_calculateValue:function(t){var e;if(this.options.range?(e=[this.options.min,this.options.max],0!==this._state.percentage[0]&&(e[0]=this._toValue(this._state.percentage[0]),e[0]=this._applyPrecision(e[0])),100!==this._state.percentage[1]&&(e[1]=this._toValue(this._state.percentage[1]),e[1]=this._applyPrecision(e[1]))):(e=this._toValue(this._state.percentage[0]),e=parseFloat(e),e=this._applyPrecision(e)),t){for(var A=[e,1/0],i=0;ic;)if(a=s[c++],a!=a)return!0}else for(;M>c;c++)if((t||c in s)&&s[c]===A)return t||c||0;return!t&&-1}}},function(t,e,A){"use strict";A(335);var i=A(37),n=A(36),o=A(12),r=A(58),a=A(20),s=A(207),M=a("species"),c=!o(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),g=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var A="ab".split(t);return 2===A.length&&"a"===A[0]&&"b"===A[1]}();t.exports=function(t,e,A){var l=a(t),u=!o(function(){var e={};return e[l]=function(){return 7},7!=""[t](e)}),d=u?!o(function(){var e=!1,A=/a/;return A.exec=function(){return e=!0,null},"split"===t&&(A.constructor={},A.constructor[M]=function(){return A}),A[l](""),!e}):void 0;if(!u||!d||"replace"===t&&!c||"split"===t&&!g){var I=/./[l],h=A(r,l,""[t],function(t,e,A,i,n){return e.exec===s?u&&!n?{done:!0,value:I.call(e,A,i)}:{done:!0,value:t.call(A,e,i)}:{done:!1}}),T=h[0],N=h[1];i(String.prototype,t,T),n(RegExp.prototype,l,2==e?function(t,e){return N.call(t,this,e)}:function(t){return N.call(t,this)})}}},function(t,e,A){var i=A(49);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,A){var i=A(16),n=A(49),o=A(20)("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==n(t))}},function(t,e,A){var i=A(20)("iterator"),n=!1;try{var o=[7][i]();o.return=function(){n=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!n)return!1;var A=!1;try{var o=[7],r=o[i]();r.next=function(){return{done:A=!0}},o[i]=function(){return r},t(o)}catch(t){}return A}},function(t,e,A){"use strict";t.exports=A(77)||!A(12)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete A(10)[t]})},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,A){"use strict";var i=A(107),n=RegExp.prototype.exec;t.exports=function(t,e){var A=t.exec;if("function"==typeof A){var o=A.call(t,e);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(t))throw new TypeError("RegExp#exec called on incompatible receiver");return n.call(t,e)}},function(t,e,A){var i=A(53),n=A(58);t.exports=function(t){return function(e,A){var o,r,a=String(n(e)),s=i(A),M=a.length;return s<0||s>=M?t?"":void 0:(o=a.charCodeAt(s),o<55296||o>56319||s+1===M||(r=a.charCodeAt(s+1))<56320||r>57343?t?a.charAt(s):o:t?a.slice(s,s+2):(o-55296<<10)+(r-56320)+65536)}}},function(t,e,A){for(var i,n=A(10),o=A(36),r=A(97),a=r("typed_array"),s=r("view"),M=!(!n.ArrayBuffer||!n.DataView),c=M,g=0,l=9,u="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");gt[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]0&&e-1 in t))}function a(t,e,A){if(it.isFunction(e))return it.grep(t,function(t,i){return!!e.call(t,i,t)!==A});if(e.nodeType)return it.grep(t,function(t){return t===e!==A});if("string"==typeof e){if(gt.test(e))return it.filter(e,t,A);e=it.filter(e,t)}return it.grep(t,function(t){return Z.call(e,t)>=0!==A})}function s(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function M(t){var e=Nt[t]={};return it.each(t.match(Tt)||[],function(t,A){e[A]=!0}),e}function c(){et.removeEventListener("DOMContentLoaded",c,!1),A.removeEventListener("load",c,!1),it.ready()}function g(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=it.expando+Math.random()}function l(t,e,A){var i;if(void 0===A&&1===t.nodeType)if(i="data-"+e.replace(Dt,"-$1").toLowerCase(),A=t.getAttribute(i),"string"==typeof A){try{A="true"===A||"false"!==A&&("null"===A?null:+A+""===A?+A:yt.test(A)?it.parseJSON(A):A)}catch(t){}pt.set(t,e,A)}else A=void 0;return A}function u(){return!0}function d(){return!1}function I(){try{return et.activeElement}catch(t){}}function h(t,e){return it.nodeName(t,"table")&&it.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function T(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function N(t){var e=Ft.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function E(t,e){for(var A=0,i=t.length;A")).appendTo(e.documentElement),e=Gt[0].contentDocument,e.write(),e.close(),A=y(t,e),Gt.detach()),Xt[t]=A),A}function w(t,e,A){var i,n,o,r,a=t.style;return A=A||Vt(t),A&&(r=A.getPropertyValue(e)||A[e]),A&&(""!==r||it.contains(t.ownerDocument,t)||(r=it.style(t,e)),_t.test(r)&&Pt.test(e)&&(i=a.width,n=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=A.width,a.width=i,a.minWidth=n,a.maxWidth=o)),void 0!==r?r+"":r}function x(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function L(t,e){if(e in t)return e;for(var A=e[0].toUpperCase()+e.slice(1),i=e,n=$t.length;n--;)if(e=$t[n]+A,e in t)return e;return i}function B(t,e,A){var i=Jt.exec(e);return i?Math.max(0,i[1]-(A||0))+(i[2]||"px"):e}function Q(t,e,A,i,n){for(var o=A===(i?"border":"content")?4:"width"===e?1:0,r=0;o<4;o+=2)"margin"===A&&(r+=it.css(t,A+xt[o],!0,n)),i?("content"===A&&(r-=it.css(t,"padding"+xt[o],!0,n)),"margin"!==A&&(r-=it.css(t,"border"+xt[o]+"Width",!0,n))):(r+=it.css(t,"padding"+xt[o],!0,n),"padding"!==A&&(r+=it.css(t,"border"+xt[o]+"Width",!0,n)));return r}function m(t,e,A){var i=!0,n="width"===e?t.offsetWidth:t.offsetHeight,o=Vt(t),r="border-box"===it.css(t,"boxSizing",!1,o);if(n<=0||null==n){if(n=w(t,e,o),(n<0||null==n)&&(n=t.style[e]),_t.test(n))return n;i=r&&(tt.boxSizingReliable()||n===t.style[e]),n=parseFloat(n)||0}return n+Q(t,e,A||(r?"border":"content"),i,o)+"px"}function j(t,e){for(var A,i,n,o=[],r=0,a=t.length;r=0&&A=0},isPlainObject:function(t){return"object"===it.type(t)&&!t.nodeType&&!it.isWindow(t)&&!(t.constructor&&!$.call(t.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?K[q.call(t)]||"object":typeof t},globalEval:function(t){var e,A=eval;t=it.trim(t),t&&(1===t.indexOf("use strict")?(e=et.createElement("script"),e.text=t,et.head.appendChild(e).parentNode.removeChild(e)):A(t))},camelCase:function(t){return t.replace(ot,"ms-").replace(rt,at)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,A){var i,n=0,o=t.length,a=r(t);if(A){if(a)for(;np.cacheLength&&delete t[e.shift()],t[A+" "]=i}var e=[];return t}function i(t){return t[k]=!0,t}function n(t){var e=S.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var A=t.split("|"),i=t.length;i--;)p.attrHandle[A[i]]=e}function r(t,e){var A=e&&t,i=A&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||W)-(~t.sourceIndex||W);if(i)return i;if(A)for(;A=A.nextSibling;)if(A===e)return-1;return t?1:-1}function a(t){return function(e){var A=e.nodeName.toLowerCase();return"input"===A&&e.type===t}}function s(t){return function(e){var A=e.nodeName.toLowerCase();return("input"===A||"button"===A)&&e.type===t}}function M(t){return i(function(e){return e=+e,i(function(A,i){for(var n,o=t([],A.length,e),r=o.length;r--;)A[n=o[r]]&&(A[n]=!(i[n]=A[n]))})})}function c(t){return t&&typeof t.getElementsByTagName!==V&&t}function g(){}function l(t){for(var e=0,A=t.length,i="";e1?function(e,A,i){for(var n=t.length;n--;)if(!t[n](e,A,i))return!1;return!0}:t[0]}function I(t,A,i){for(var n=0,o=A.length;n-1&&(i[M]=!(r[M]=g))}}else E=h(E===r?E.splice(d,E.length):E),o?o(null,r,E,s):$.apply(r,E)})}function N(t){for(var e,A,i,n=t.length,o=p.relative[t[0].type],r=o||p.relative[" "],a=o?1:0,s=u(function(t){return t===e},r,!0),M=u(function(t){return et.call(e,t)>-1},r,!0),c=[function(t,A,i){return!o&&(i||A!==B)||((e=A).nodeType?s(t,A,i):M(t,A,i))}];a1&&d(c),a>1&&l(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(st,"$1"),A,a0,o=t.length>0,r=function(i,r,a,s,M){var c,g,l,u=0,d="0",I=i&&[],T=[],N=B,E=i||o&&p.find.TAG("*",M),f=H+=null==N?1:Math.random()||.1,C=E.length;for(M&&(B=r!==S&&r);d!==C&&null!=(c=E[d]);d++){if(o&&c){for(g=0;l=t[g++];)if(l(c,r,a)){s.push(c);break}M&&(H=f)}n&&((c=!l&&c)&&u--,i&&I.push(c))}if(u+=d,n&&d!==u){for(g=0;l=A[g++];)l(I,T,r,a);if(i){if(u>0)for(;d--;)I[d]||T[d]||(T[d]=K.call(s));T=h(T)}$.apply(s,T),M&&!i&&T.length>0&&u+A.length>1&&e.uniqueSort(s)}return M&&(H=f,B=N),I};return n?i(r):r}var f,C,p,y,D,w,x,L,B,Q,m,j,S,z,v,b,Y,O,U,k="sizzle"+-new Date,F=t.document,H=0,R=0,G=A(),X=A(),P=A(),_=function(t,e){return t===e&&(m=!0),0},V="undefined",W=1<<31,J={}.hasOwnProperty,Z=[],K=Z.pop,q=Z.push,$=Z.push,tt=Z.slice,et=Z.indexOf||function(t){for(var e=0,A=this.length;e+~]|"+it+")"+it+"*"),gt=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),lt=new RegExp(at),ut=new RegExp("^"+ot+"$"),dt={ID:new RegExp("^#("+nt+")"),CLASS:new RegExp("^\\.("+nt+")"),TAG:new RegExp("^("+nt.replace("w","w*")+")"),ATTR:new RegExp("^"+rt),PSEUDO:new RegExp("^"+at),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+At+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},It=/^(?:input|select|textarea|button)$/i,ht=/^h\d$/i,Tt=/^[^{]+\{\s*\[native \w/,Nt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Et=/[+~]/,ft=/'|\\/g,Ct=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),pt=function(t,e,A){var i="0x"+e-65536;return i!==i||A?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{$.apply(Z=tt.call(F.childNodes),F.childNodes),Z[F.childNodes.length].nodeType}catch(t){$={apply:Z.length?function(t,e){q.apply(t,tt.call(e))}:function(t,e){for(var A=t.length,i=0;t[A++]=e[i++];);t.length=A-1}}}C=e.support={},D=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},j=e.setDocument=function(t){var e,A=t?t.ownerDocument||t:F,i=A.defaultView;return A!==S&&9===A.nodeType&&A.documentElement?(S=A,z=A.documentElement,v=!D(A),i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",function(){j()},!1):i.attachEvent&&i.attachEvent("onunload",function(){j()})),C.attributes=n(function(t){return t.className="i",!t.getAttribute("className")}),C.getElementsByTagName=n(function(t){return t.appendChild(A.createComment("")),!t.getElementsByTagName("*").length}),C.getElementsByClassName=Tt.test(A.getElementsByClassName)&&n(function(t){return t.innerHTML="
",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),C.getById=n(function(t){return z.appendChild(t).id=k,!A.getElementsByName||!A.getElementsByName(k).length}),C.getById?(p.find.ID=function(t,e){if(typeof e.getElementById!==V&&v){var A=e.getElementById(t);return A&&A.parentNode?[A]:[]}},p.filter.ID=function(t){var e=t.replace(Ct,pt);return function(t){return t.getAttribute("id")===e}}):(delete p.find.ID,p.filter.ID=function(t){var e=t.replace(Ct,pt);return function(t){var A=typeof t.getAttributeNode!==V&&t.getAttributeNode("id");return A&&A.value===e}}),p.find.TAG=C.getElementsByTagName?function(t,e){if(typeof e.getElementsByTagName!==V)return e.getElementsByTagName(t)}:function(t,e){var A,i=[],n=0,o=e.getElementsByTagName(t);if("*"===t){for(;A=o[n++];)1===A.nodeType&&i.push(A);return i}return o},p.find.CLASS=C.getElementsByClassName&&function(t,e){if(typeof e.getElementsByClassName!==V&&v)return e.getElementsByClassName(t)},Y=[],b=[],(C.qsa=Tt.test(A.querySelectorAll))&&(n(function(t){t.innerHTML="",t.querySelectorAll("[msallowclip^='']").length&&b.push("[*^$]="+it+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||b.push("\\["+it+"*(?:value|"+At+")"),t.querySelectorAll(":checked").length||b.push(":checked")}),n(function(t){var e=A.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&b.push("name"+it+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||b.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),b.push(",.*:")})),(C.matchesSelector=Tt.test(O=z.matches||z.webkitMatchesSelector||z.mozMatchesSelector||z.oMatchesSelector||z.msMatchesSelector))&&n(function(t){C.disconnectedMatch=O.call(t,"div"),O.call(t,"[s!='']:x"),Y.push("!=",at)}),b=b.length&&new RegExp(b.join("|")),Y=Y.length&&new RegExp(Y.join("|")),e=Tt.test(z.compareDocumentPosition),U=e||Tt.test(z.contains)?function(t,e){var A=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(A.contains?A.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},_=e?function(t,e){if(t===e)return m=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i?i:(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!C.sortDetached&&e.compareDocumentPosition(t)===i?t===A||t.ownerDocument===F&&U(F,t)?-1:e===A||e.ownerDocument===F&&U(F,e)?1:Q?et.call(Q,t)-et.call(Q,e):0:4&i?-1:1)}:function(t,e){if(t===e)return m=!0,0;var i,n=0,o=t.parentNode,a=e.parentNode,s=[t],M=[e];if(!o||!a)return t===A?-1:e===A?1:o?-1:a?1:Q?et.call(Q,t)-et.call(Q,e):0;if(o===a)return r(t,e);for(i=t;i=i.parentNode;)s.unshift(i);for(i=e;i=i.parentNode;)M.unshift(i);for(;s[n]===M[n];)n++;return n?r(s[n],M[n]):s[n]===F?-1:M[n]===F?1:0},A):S},e.matches=function(t,A){return e(t,null,null,A)},e.matchesSelector=function(t,A){if((t.ownerDocument||t)!==S&&j(t),A=A.replace(gt,"='$1']"),C.matchesSelector&&v&&(!Y||!Y.test(A))&&(!b||!b.test(A)))try{var i=O.call(t,A);if(i||C.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return e(A,S,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==S&&j(t),U(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==S&&j(t);var A=p.attrHandle[e.toLowerCase()],i=A&&J.call(p.attrHandle,e.toLowerCase())?A(t,e,!v):void 0;return void 0!==i?i:C.attributes||!v?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,A=[],i=0,n=0;if(m=!C.detectDuplicates,Q=!C.sortStable&&t.slice(0),t.sort(_),m){for(;e=t[n++];)e===t[n]&&(i=A.push(n));for(;i--;)t.splice(A[i],1)}return Q=null,t},y=e.getText=function(t){var e,A="",i=0,n=t.nodeType;if(n){if(1===n||9===n||11===n){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)A+=y(t)}else if(3===n||4===n)return t.nodeValue}else for(;e=t[i++];)A+=y(e);return A},p=e.selectors={cacheLength:50,createPseudo:i,match:dt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Ct,pt),t[3]=(t[3]||t[4]||t[5]||"").replace(Ct,pt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,A=!t[6]&&t[2];return dt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":A&<.test(A)&&(e=w(A,!0))&&(e=A.indexOf(")",A.length-e)-A.length)&&(t[0]=t[0].slice(0,e),t[2]=A.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Ct,pt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=G[t+" "];return e||(e=new RegExp("(^|"+it+")"+t+"("+it+"|$)"))&&G(t,function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==V&&t.getAttribute("class")||"")})},ATTR:function(t,A,i){return function(n){var o=e.attr(n,t);return null==o?"!="===A:!A||(o+="","="===A?o===i:"!="===A?o!==i:"^="===A?i&&0===o.indexOf(i):"*="===A?i&&o.indexOf(i)>-1:"$="===A?i&&o.slice(-i.length)===i:"~="===A?(" "+o+" ").indexOf(i)>-1:"|="===A&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,A,i,n){var o="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===n?function(t){return!!t.parentNode}:function(e,A,s){var M,c,g,l,u,d,I=o!==r?"nextSibling":"previousSibling",h=e.parentNode,T=a&&e.nodeName.toLowerCase(),N=!s&&!a;if(h){if(o){for(;I;){for(g=e;g=g[I];)if(a?g.nodeName.toLowerCase()===T:1===g.nodeType)return!1;d=I="only"===t&&!d&&"nextSibling"}return!0}if(d=[r?h.firstChild:h.lastChild],r&&N){for(c=h[k]||(h[k]={}),M=c[t]||[],u=M[0]===H&&M[1],l=M[0]===H&&M[2],g=u&&h.childNodes[u];g=++u&&g&&g[I]||(l=u=0)||d.pop();)if(1===g.nodeType&&++l&&g===e){c[t]=[H,u,l];break}}else if(N&&(M=(e[k]||(e[k]={}))[t])&&M[0]===H)l=M[1];else for(;(g=++u&&g&&g[I]||(l=u=0)||d.pop())&&((a?g.nodeName.toLowerCase()!==T:1!==g.nodeType)||!++l||(N&&((g[k]||(g[k]={}))[t]=[H,l]),g!==e)););return l-=n,l===i||l%i===0&&l/i>=0}}},PSEUDO:function(t,A){var n,o=p.pseudos[t]||p.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[k]?o(A):o.length>1?(n=[t,t,"",A],p.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,n=o(t,A),r=n.length;r--;)i=et.call(t,n[r]),t[i]=!(e[i]=n[r])}):function(t){return o(t,0,n)}):o}},pseudos:{not:i(function(t){var e=[],A=[],n=x(t.replace(st,"$1"));return n[k]?i(function(t,e,A,i){for(var o,r=n(t,null,i,[]),a=t.length;a--;)(o=r[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,n(e,null,o,A),!A.pop()}}),has:i(function(t){return function(A){return e(t,A).length>0}}),contains:i(function(t){return function(e){return(e.textContent||e.innerText||y(e)).indexOf(t)>-1}}),lang:i(function(t){return ut.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(Ct,pt).toLowerCase(),function(e){var A;do if(A=v?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return A=A.toLowerCase(),A===t||0===A.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var A=t.location&&t.location.hash;return A&&A.slice(1)===e.id},root:function(t){return t===z},focus:function(t){return t===S.activeElement&&(!S.hasFocus||S.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!p.pseudos.empty(t)},header:function(t){return ht.test(t.nodeName)},input:function(t){return It.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:M(function(){return[0]}),last:M(function(t,e){return[e-1]}),eq:M(function(t,e,A){return[A<0?A+e:A]}),even:M(function(t,e){for(var A=0;A=0;)t.push(i);return t}),gt:M(function(t,e,A){for(var i=A<0?A+e:A;++i2&&"ID"===(r=o[0]).type&&C.getById&&9===e.nodeType&&v&&p.relative[o[1].type]){if(e=(p.find.ID(r.matches[0].replace(Ct,pt),e)||[])[0],!e)return A;M&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(n=dt.needsContext.test(t)?0:o.length;n--&&(r=o[n],!p.relative[a=r.type]);)if((s=p.find[a])&&(i=s(r.matches[0].replace(Ct,pt),Et.test(o[0].type)&&c(e.parentNode)||e))){if(o.splice(n,1),t=i.length&&l(o),!t)return $.apply(A,i),A;break}}return(M||x(t,g))(i,e,!v,A,Et.test(t)&&c(e.parentNode)||e),A},C.sortStable=k.split("").sort(_).join("")===k,C.detectDuplicates=!!m,j(),C.sortDetached=n(function(t){return 1&t.compareDocumentPosition(S.createElement("div"))}),n(function(t){return t.innerHTML="
","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,A){if(!A)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),C.attributes&&n(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,A){if(!A&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),n(function(t){return null==t.getAttribute("disabled")})||o(At,function(t,e,A){var i;if(!A)return t[e]===!0?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(A);it.find=st,it.expr=st.selectors,it.expr[":"]=it.expr.pseudos,it.unique=st.uniqueSort,it.text=st.getText,it.isXMLDoc=st.isXML,it.contains=st.contains;var Mt=it.expr.match.needsContext,ct=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,gt=/^.[^:#\[\.,]*$/;it.filter=function(t,e,A){var i=e[0];return A&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?it.find.matchesSelector(i,t)?[i]:[]:it.find.matches(t,it.grep(e,function(t){return 1===t.nodeType}))},it.fn.extend({find:function(t){var e,A=this.length,i=[],n=this;if("string"!=typeof t)return this.pushStack(it(t).filter(function(){for(e=0;e1?it.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(a(this,t||[],!1))},not:function(t){return this.pushStack(a(this,t||[],!0))},is:function(t){return!!a(this,"string"==typeof t&&Mt.test(t)?it(t):t||[],!1).length}});var lt,ut=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,dt=it.fn.init=function(t,e){var A,i;if(!t)return this;if("string"==typeof t){if(A="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:ut.exec(t),!A||!A[1]&&e)return!e||e.jquery?(e||lt).find(t):this.constructor(e).find(t);if(A[1]){if(e=e instanceof it?e[0]:e,it.merge(this,it.parseHTML(A[1],e&&e.nodeType?e.ownerDocument||e:et,!0)),ct.test(A[1])&&it.isPlainObject(e))for(A in e)it.isFunction(this[A])?this[A](e[A]):this.attr(A,e[A]);return this}return i=et.getElementById(A[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=et,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):it.isFunction(t)?"undefined"!=typeof lt.ready?lt.ready(t):t(it):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),it.makeArray(t,this))};dt.prototype=it.fn,lt=it(et);var It=/^(?:parents|prev(?:Until|All))/,ht={children:!0,contents:!0,next:!0,prev:!0};it.extend({dir:function(t,e,A){for(var i=[],n=void 0!==A;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(n&&it(t).is(A))break;i.push(t)}return i},sibling:function(t,e){for(var A=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&A.push(t);return A}}),it.fn.extend({has:function(t){var e=it(t,this),A=e.length;return this.filter(function(){for(var t=0;t-1:1===A.nodeType&&it.find.matchesSelector(A,t))){o.push(A);break}return this.pushStack(o.length>1?it.unique(o):o)},index:function(t){return t?"string"==typeof t?Z.call(it(t),this[0]):Z.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(it.unique(it.merge(this.get(),it(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),it.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return it.dir(t,"parentNode")},parentsUntil:function(t,e,A){return it.dir(t,"parentNode",A)},next:function(t){return s(t,"nextSibling")},prev:function(t){return s(t,"previousSibling")},nextAll:function(t){return it.dir(t,"nextSibling")},prevAll:function(t){return it.dir(t,"previousSibling")},nextUntil:function(t,e,A){return it.dir(t,"nextSibling",A)},prevUntil:function(t,e,A){return it.dir(t,"previousSibling",A)},siblings:function(t){return it.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return it.sibling(t.firstChild)},contents:function(t){return t.contentDocument||it.merge([],t.childNodes)}},function(t,e){it.fn[t]=function(A,i){var n=it.map(this,e,A);return"Until"!==t.slice(-5)&&(i=A),i&&"string"==typeof i&&(n=it.filter(i,n)),this.length>1&&(ht[t]||it.unique(n),It.test(t)&&n.reverse()),this.pushStack(n)}});var Tt=/\S+/g,Nt={};it.Callbacks=function(t){t="string"==typeof t?Nt[t]||M(t):it.extend({},t);var e,A,i,n,o,r,a=[],s=!t.once&&[],c=function(M){for(e=t.memory&&M,A=!0,r=n||0,n=0,o=a.length,i=!0;a&&r-1;)a.splice(A,1),i&&(A<=o&&o--,A<=r&&r--)}),this},has:function(t){return t?it.inArray(t,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=s=e=void 0,this},disabled:function(){return!a},lock:function(){return s=void 0,e||g.disable(),this},locked:function(){return!s},fireWith:function(t,e){return!a||A&&!s||(e=e||[],e=[t,e.slice?e.slice():e],i?s.push(e):c(e)),this},fire:function(){return g.fireWith(this,arguments),this},fired:function(){return!!A}};return g},it.extend({Deferred:function(t){var e=[["resolve","done",it.Callbacks("once memory"),"resolved"],["reject","fail",it.Callbacks("once memory"),"rejected"],["notify","progress",it.Callbacks("memory")]],A="pending",i={state:function(){return A},always:function(){return n.done(arguments).fail(arguments),this},then:function(){var t=arguments;return it.Deferred(function(A){it.each(e,function(e,o){var r=it.isFunction(t[e])&&t[e];n[o[1]](function(){var t=r&&r.apply(this,arguments);t&&it.isFunction(t.promise)?t.promise().done(A.resolve).fail(A.reject).progress(A.notify):A[o[0]+"With"](this===i?A.promise():this,r?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?it.extend(t,i):i}},n={};return i.pipe=i.then,it.each(e,function(t,o){var r=o[2],a=o[3];i[o[1]]=r.add,a&&r.add(function(){A=a},e[1^t][2].disable,e[2][2].lock),n[o[0]]=function(){return n[o[0]+"With"](this===n?i:this,arguments),this},n[o[0]+"With"]=r.fireWith}),i.promise(n),t&&t.call(n,n),n},when:function(t){var e,A,i,n=0,o=V.call(arguments),r=o.length,a=1!==r||t&&it.isFunction(t.promise)?r:0,s=1===a?t:it.Deferred(),M=function(t,A,i){return function(n){A[t]=this,i[t]=arguments.length>1?V.call(arguments):n,i===e?s.notifyWith(A,i):--a||s.resolveWith(A,i)}};if(r>1)for(e=new Array(r),A=new Array(r),i=new Array(r);n0||(Et.resolveWith(et,[it]),it.fn.triggerHandler&&(it(et).triggerHandler("ready"),it(et).off("ready"))))}}),it.ready.promise=function(t){return Et||(Et=it.Deferred(),"complete"===et.readyState?setTimeout(it.ready):(et.addEventListener("DOMContentLoaded",c,!1),A.addEventListener("load",c,!1))),Et.promise(t)},it.ready.promise();var ft=it.access=function(t,e,A,i,n,o,r){var a=0,s=t.length,M=null==A;if("object"===it.type(A)){n=!0;for(a in A)it.access(t,e,a,A[a],!0,o,r)}else if(void 0!==i&&(n=!0,it.isFunction(i)||(r=!0),M&&(r?(e.call(t,i),e=null):(M=e,e=function(t,e,A){return M.call(it(t),A)})),e))for(;a1,null,!0)},removeData:function(t){return this.each(function(){pt.remove(this,t)})}}),it.extend({queue:function(t,e,A){var i;if(t)return e=(e||"fx")+"queue",i=Ct.get(t,e),A&&(!i||it.isArray(A)?i=Ct.access(t,e,it.makeArray(A)):i.push(A)),i||[]},dequeue:function(t,e){e=e||"fx";var A=it.queue(t,e),i=A.length,n=A.shift(),o=it._queueHooks(t,e),r=function(){it.dequeue(t,e)};"inprogress"===n&&(n=A.shift(),i--),n&&("fx"===e&&A.unshift("inprogress"),delete o.stop,n.call(t,r,o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var A=e+"queueHooks";return Ct.get(t,A)||Ct.access(t,A,{empty:it.Callbacks("once memory").add(function(){Ct.remove(t,[e+"queue",A])})})}}),it.fn.extend({queue:function(t,e){var A=2;return"string"!=typeof t&&(e=t,t="fx",A--),arguments.lengthx",tt.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Qt="undefined";tt.focusinBubbles="onfocusin"in A;var mt=/^key/,jt=/^(?:mouse|pointer|contextmenu)|click/,St=/^(?:focusinfocus|focusoutblur)$/,zt=/^([^.]*)(?:\.(.+)|)$/;it.event={global:{},add:function(t,e,A,i,n){var o,r,a,s,M,c,g,l,u,d,I,h=Ct.get(t);if(h)for(A.handler&&(o=A,A=o.handler,n=o.selector),A.guid||(A.guid=it.guid++),(s=h.events)||(s=h.events={}),(r=h.handle)||(r=h.handle=function(e){return typeof it!==Qt&&it.event.triggered!==e.type?it.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(Tt)||[""],M=e.length;M--;)a=zt.exec(e[M])||[],u=I=a[1],d=(a[2]||"").split(".").sort(),u&&(g=it.event.special[u]||{},u=(n?g.delegateType:g.bindType)||u,g=it.event.special[u]||{},c=it.extend({type:u,origType:I,data:i,handler:A,guid:A.guid,selector:n,needsContext:n&&it.expr.match.needsContext.test(n),namespace:d.join(".")},o),(l=s[u])||(l=s[u]=[],l.delegateCount=0,g.setup&&g.setup.call(t,i,d,r)!==!1||t.addEventListener&&t.addEventListener(u,r,!1)),g.add&&(g.add.call(t,c),c.handler.guid||(c.handler.guid=A.guid)),n?l.splice(l.delegateCount++,0,c):l.push(c),it.event.global[u]=!0)},remove:function(t,e,A,i,n){var o,r,a,s,M,c,g,l,u,d,I,h=Ct.hasData(t)&&Ct.get(t);if(h&&(s=h.events)){for(e=(e||"").match(Tt)||[""],M=e.length;M--;)if(a=zt.exec(e[M])||[],u=I=a[1],d=(a[2]||"").split(".").sort(),u){for(g=it.event.special[u]||{},u=(i?g.delegateType:g.bindType)||u,l=s[u]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=o=l.length;o--;)c=l[o],!n&&I!==c.origType||A&&A.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(l.splice(o,1),c.selector&&l.delegateCount--,g.remove&&g.remove.call(t,c));r&&!l.length&&(g.teardown&&g.teardown.call(t,d,h.handle)!==!1||it.removeEvent(t,u,h.handle),delete s[u])}else for(u in s)it.event.remove(t,u+e[M],A,i,!0);it.isEmptyObject(s)&&(delete h.handle,Ct.remove(t,"events"))}},trigger:function(t,e,i,n){var o,r,a,s,M,c,g,l=[i||et],u=$.call(t,"type")?t.type:t,d=$.call(t,"namespace")?t.namespace.split("."):[];if(r=a=i=i||et,3!==i.nodeType&&8!==i.nodeType&&!St.test(u+it.event.triggered)&&(u.indexOf(".")>=0&&(d=u.split("."),u=d.shift(),d.sort()),M=u.indexOf(":")<0&&"on"+u,t=t[it.expando]?t:new it.Event(u,"object"==typeof t&&t),t.isTrigger=n?2:3,t.namespace=d.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null, +t.result=void 0,t.target||(t.target=i),e=null==e?[t]:it.makeArray(e,[t]),g=it.event.special[u]||{},n||!g.trigger||g.trigger.apply(i,e)!==!1)){if(!n&&!g.noBubble&&!it.isWindow(i)){for(s=g.delegateType||u,St.test(s+u)||(r=r.parentNode);r;r=r.parentNode)l.push(r),a=r;a===(i.ownerDocument||et)&&l.push(a.defaultView||a.parentWindow||A)}for(o=0;(r=l[o++])&&!t.isPropagationStopped();)t.type=o>1?s:g.bindType||u,c=(Ct.get(r,"events")||{})[t.type]&&Ct.get(r,"handle"),c&&c.apply(r,e),c=M&&r[M],c&&c.apply&&it.acceptData(r)&&(t.result=c.apply(r,e),t.result===!1&&t.preventDefault());return t.type=u,n||t.isDefaultPrevented()||g._default&&g._default.apply(l.pop(),e)!==!1||!it.acceptData(i)||M&&it.isFunction(i[u])&&!it.isWindow(i)&&(a=i[M],a&&(i[M]=null),it.event.triggered=u,i[u](),it.event.triggered=void 0,a&&(i[M]=a)),t.result}},dispatch:function(t){t=it.event.fix(t);var e,A,i,n,o,r=[],a=V.call(arguments),s=(Ct.get(this,"events")||{})[t.type]||[],M=it.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!M.preDispatch||M.preDispatch.call(this,t)!==!1){for(r=it.event.handlers.call(this,t,s),e=0;(n=r[e++])&&!t.isPropagationStopped();)for(t.currentTarget=n.elem,A=0;(o=n.handlers[A++])&&!t.isImmediatePropagationStopped();)t.namespace_re&&!t.namespace_re.test(o.namespace)||(t.handleObj=o,t.data=o.data,i=((it.event.special[o.origType]||{}).handle||o.handler).apply(n.elem,a),void 0!==i&&(t.result=i)===!1&&(t.preventDefault(),t.stopPropagation()));return M.postDispatch&&M.postDispatch.call(this,t),t.result}},handlers:function(t,e){var A,i,n,o,r=[],a=e.delegateCount,s=t.target;if(a&&s.nodeType&&(!t.button||"click"!==t.type))for(;s!==this;s=s.parentNode||this)if(s.disabled!==!0||"click"!==t.type){for(i=[],A=0;A=0:it.find(n,this,null,[s]).length),i[n]&&i.push(o);i.length&&r.push({elem:s,handlers:i})}return a]*)\/>/gi,bt=/<([\w:]+)/,Yt=/<|&#?\w+;/,Ot=/<(?:script|style|link)/i,Ut=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Ft=/^true\/(.*)/,Ht=/^\s*\s*$/g,Rt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Rt.optgroup=Rt.option,Rt.tbody=Rt.tfoot=Rt.colgroup=Rt.caption=Rt.thead,Rt.th=Rt.td,it.extend({clone:function(t,e,A){var i,n,o,r,a=t.cloneNode(!0),s=it.contains(t.ownerDocument,t);if(!(tt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||it.isXMLDoc(t)))for(r=C(a),o=C(t),i=0,n=o.length;i0&&E(r,!s&&C(t,"script")),a},buildFragment:function(t,e,A,i){for(var n,o,r,a,s,M,c=e.createDocumentFragment(),g=[],l=0,u=t.length;l")+a[2],M=a[0];M--;)o=o.lastChild;it.merge(g,o.childNodes),o=c.firstChild,o.textContent=""}else g.push(e.createTextNode(n));for(c.textContent="",l=0;n=g[l++];)if((!i||it.inArray(n,i)===-1)&&(s=it.contains(n.ownerDocument,n),o=C(c.appendChild(n),"script"),s&&E(o),A))for(M=0;n=o[M++];)kt.test(n.type||"")&&A.push(n);return c},cleanData:function(t){for(var e,A,i,n,o=it.event.special,r=0;void 0!==(A=t[r]);r++){if(it.acceptData(A)&&(n=A[Ct.expando],n&&(e=Ct.cache[n]))){if(e.events)for(i in e.events)o[i]?it.event.remove(A,i):it.removeEvent(A,i,e.handle);Ct.cache[n]&&delete Ct.cache[n]}delete pt.cache[A[pt.expando]]}}}),it.fn.extend({text:function(t){return ft(this,function(t){return void 0===t?it.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=h(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=h(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var A,i=t?it.filter(t,this):this,n=0;null!=(A=i[n]);n++)e||1!==A.nodeType||it.cleanData(C(A)),A.parentNode&&(e&&it.contains(A.ownerDocument,A)&&E(C(A,"script")),A.parentNode.removeChild(A));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(it.cleanData(C(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return it.clone(this,t,e)})},html:function(t){return ft(this,function(t){var e=this[0]||{},A=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ot.test(t)&&!Rt[(bt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(vt,"<$1>");try{for(;A1&&"string"==typeof l&&!tt.checkClone&&Ut.test(l))return this.each(function(A){var i=c.eq(A);u&&(t[0]=l.call(this,A,i.html())),i.domManip(t,e)});if(M&&(A=it.buildFragment(t,this[0].ownerDocument,!1,this),i=A.firstChild,1===A.childNodes.length&&(A=i),i)){for(n=it.map(C(A,"script"),T),o=n.length;s1)},show:function(){return j(this,!0)},hide:function(){return j(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Lt(this)?it(this).show():it(this).hide()})}}),it.Tween=S,S.prototype={constructor:S,init:function(t,e,A,i,n,o){this.elem=t,this.prop=A,this.easing=n||"swing",this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(it.cssNumber[A]?"":"px")},cur:function(){var t=S.propHooks[this.prop];return t&&t.get?t.get(this):S.propHooks._default.get(this)},run:function(t){var e,A=S.propHooks[this.prop];return this.options.duration?this.pos=e=it.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),A&&A.set?A.set(this):S.propHooks._default.set(this),this}},S.prototype.init.prototype=S.prototype,S.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=it.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){it.fx.step[t.prop]?it.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[it.cssProps[t.prop]]||it.cssHooks[t.prop])?it.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},S.propHooks.scrollTop=S.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},it.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},it.fx=S.prototype.init,it.fx.step={};var te,ee,Ae=/^(?:toggle|show|hide)$/,ie=new RegExp("^(?:([+-])=|)("+wt+")([a-z%]*)$","i"),ne=/queueHooks$/,oe=[Y],re={"*":[function(t,e){var A=this.createTween(t,e),i=A.cur(),n=ie.exec(e),o=n&&n[3]||(it.cssNumber[t]?"":"px"),r=(it.cssNumber[t]||"px"!==o&&+i)&&ie.exec(it.css(A.elem,t)),a=1,s=20;if(r&&r[3]!==o){o=o||r[3],n=n||[],r=+i||1;do a=a||".5",r/=a,it.style(A.elem,t,r+o);while(a!==(a=A.cur()/i)&&1!==a&&--s)}return n&&(r=A.start=+r||+i||0,A.unit=o,A.end=n[1]?r+(n[1]+1)*n[2]:+n[2]),A}]};it.Animation=it.extend(U,{tweener:function(t,e){it.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var A,i=0,n=t.length;i1)},removeAttr:function(t){return this.each(function(){it.removeAttr(this,t)})}}),it.extend({attr:function(t,e,A){var i,n,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return typeof t.getAttribute===Qt?it.prop(t,e,A):(1===o&&it.isXMLDoc(t)||(e=e.toLowerCase(),i=it.attrHooks[e]||(it.expr.match.bool.test(e)?se:ae)),void 0===A?i&&"get"in i&&null!==(n=i.get(t,e))?n:(n=it.find.attr(t,e),null==n?void 0:n):null!==A?i&&"set"in i&&void 0!==(n=i.set(t,A,e))?n:(t.setAttribute(e,A+""),A):void it.removeAttr(t,e))},removeAttr:function(t,e){var A,i,n=0,o=e&&e.match(Tt);if(o&&1===t.nodeType)for(;A=o[n++];)i=it.propFix[A]||A,it.expr.match.bool.test(A)&&(t[i]=!1),t.removeAttribute(A)},attrHooks:{type:{set:function(t,e){if(!tt.radioValue&&"radio"===e&&it.nodeName(t,"input")){var A=t.value;return t.setAttribute("type",e),A&&(t.value=A),e}}}}}),se={set:function(t,e,A){return e===!1?it.removeAttr(t,A):t.setAttribute(A,A),A}},it.each(it.expr.match.bool.source.match(/\w+/g),function(t,e){var A=Me[e]||it.find.attr;Me[e]=function(t,e,i){var n,o;return i||(o=Me[e],Me[e]=n,n=null!=A(t,e,i)?e.toLowerCase():null,Me[e]=o),n}});var ce=/^(?:input|select|textarea|button)$/i;it.fn.extend({prop:function(t,e){return ft(this,it.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[it.propFix[t]||t]})}}),it.extend({propFix:{for:"htmlFor",class:"className"},prop:function(t,e,A){var i,n,o,r=t.nodeType;if(t&&3!==r&&8!==r&&2!==r)return o=1!==r||!it.isXMLDoc(t),o&&(e=it.propFix[e]||e,n=it.propHooks[e]),void 0!==A?n&&"set"in n&&void 0!==(i=n.set(t,A,e))?i:t[e]=A:n&&"get"in n&&null!==(i=n.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){return t.hasAttribute("tabindex")||ce.test(t.nodeName)||t.href?t.tabIndex:-1}}}}),tt.optSelected||(it.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),it.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){it.propFix[this.toLowerCase()]=this});var ge=/[\t\r\n\f]/g;it.fn.extend({addClass:function(t){var e,A,i,n,o,r,a="string"==typeof t&&t,s=0,M=this.length;if(it.isFunction(t))return this.each(function(e){it(this).addClass(t.call(this,e,this.className))});if(a)for(e=(t||"").match(Tt)||[];s=0;)i=i.replace(" "+n+" "," ");r=t?it.trim(i):"",A.className!==r&&(A.className=r)}return this},toggleClass:function(t,e){var A=typeof t;return"boolean"==typeof e&&"string"===A?e?this.addClass(t):this.removeClass(t):it.isFunction(t)?this.each(function(A){it(this).toggleClass(t.call(this,A,this.className,e),e)}):this.each(function(){if("string"===A)for(var e,i=0,n=it(this),o=t.match(Tt)||[];e=o[i++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else A!==Qt&&"boolean"!==A||(this.className&&Ct.set(this,"__className__",this.className),this.className=this.className||t===!1?"":Ct.get(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",A=0,i=this.length;A=0)return!0;return!1}});var le=/\r/g;it.fn.extend({val:function(t){var e,A,i,n=this[0];{if(arguments.length)return i=it.isFunction(t),this.each(function(A){var n;1===this.nodeType&&(n=i?t.call(this,A,it(this).val()):t,null==n?n="":"number"==typeof n?n+="":it.isArray(n)&&(n=it.map(n,function(t){return null==t?"":t+""})),e=it.valHooks[this.type]||it.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,n,"value")||(this.value=n))});if(n)return e=it.valHooks[n.type]||it.valHooks[n.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(A=e.get(n,"value"))?A:(A=n.value,"string"==typeof A?A.replace(le,""):null==A?"":A)}}}),it.extend({valHooks:{option:{get:function(t){var e=it.find.attr(t,"value");return null!=e?e:it.trim(it.text(t))}},select:{get:function(t){for(var e,A,i=t.options,n=t.selectedIndex,o="select-one"===t.type||n<0,r=o?null:[],a=o?n+1:i.length,s=n<0?a:o?n:0;s=0)&&(A=!0);return A||(t.selectedIndex=-1),o}}}}),it.each(["radio","checkbox"],function(){it.valHooks[this]={set:function(t,e){if(it.isArray(e))return t.checked=it.inArray(it(t).val(),e)>=0}},tt.checkOn||(it.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),it.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){it.fn[e]=function(t,A){return arguments.length>0?this.on(e,null,t,A):this.trigger(e)}}),it.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,A){return this.on(t,null,e,A)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,A,i){return this.on(e,t,A,i)},undelegate:function(t,e,A){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",A)}});var ue=it.now(),de=/\?/;it.parseJSON=function(t){return JSON.parse(t+"")},it.parseXML=function(t){var e,A;if(!t||"string"!=typeof t)return null;try{A=new DOMParser,e=A.parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||it.error("Invalid XML: "+t),e};var Ie,he,Te=/#.*$/,Ne=/([?&])_=[^&]*/,Ee=/^(.*?):[ \t]*([^\r\n]*)$/gm,fe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ce=/^(?:GET|HEAD)$/,pe=/^\/\//,ye=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,De={},we={},xe="*/".concat("*");try{he=location.href}catch(t){he=et.createElement("a"),he.href="",he=he.href}Ie=ye.exec(he.toLowerCase())||[],it.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:he,type:"GET",isLocal:fe.test(Ie[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":xe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":it.parseJSON,"text xml":it.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?H(H(t,it.ajaxSettings),e):H(it.ajaxSettings,t)},ajaxPrefilter:k(De),ajaxTransport:k(we),ajax:function(t,e){function A(t,e,A,r){var s,c,T,N,f,p=e;2!==E&&(E=2,a&&clearTimeout(a),i=void 0,o=r||"",C.readyState=t>0?4:0,s=t>=200&&t<300||304===t,A&&(N=R(g,C,A)),N=G(g,N,C,s),s?(g.ifModified&&(f=C.getResponseHeader("Last-Modified"),f&&(it.lastModified[n]=f),f=C.getResponseHeader("etag"),f&&(it.etag[n]=f)),204===t||"HEAD"===g.type?p="nocontent":304===t?p="notmodified":(p=N.state,c=N.data,T=N.error,s=!T)):(T=p,!t&&p||(p="error",t<0&&(t=0))),C.status=t,C.statusText=(e||p)+"",s?d.resolveWith(l,[c,p,C]):d.rejectWith(l,[C,p,T]),C.statusCode(h),h=void 0,M&&u.trigger(s?"ajaxSuccess":"ajaxError",[C,g,s?c:T]),I.fireWith(l,[C,p]),M&&(u.trigger("ajaxComplete",[C,g]),--it.active||it.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,n,o,r,a,s,M,c,g=it.ajaxSetup({},e),l=g.context||g,u=g.context&&(l.nodeType||l.jquery)?it(l):it.event,d=it.Deferred(),I=it.Callbacks("once memory"),h=g.statusCode||{},T={},N={},E=0,f="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(2===E){if(!r)for(r={};e=Ee.exec(o);)r[e[1].toLowerCase()]=e[2];e=r[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===E?o:null},setRequestHeader:function(t,e){var A=t.toLowerCase();return E||(t=N[A]=N[A]||t,T[t]=e),this},overrideMimeType:function(t){return E||(g.mimeType=t),this},statusCode:function(t){var e;if(t)if(E<2)for(e in t)h[e]=[h[e],t[e]];else C.always(t[C.status]);return this},abort:function(t){var e=t||f;return i&&i.abort(e),A(0,e),this}};if(d.promise(C).complete=I.add,C.success=C.done,C.error=C.fail,g.url=((t||g.url||he)+"").replace(Te,"").replace(pe,Ie[1]+"//"),g.type=e.method||e.type||g.method||g.type,g.dataTypes=it.trim(g.dataType||"*").toLowerCase().match(Tt)||[""],null==g.crossDomain&&(s=ye.exec(g.url.toLowerCase()),g.crossDomain=!(!s||s[1]===Ie[1]&&s[2]===Ie[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(Ie[3]||("http:"===Ie[1]?"80":"443")))),g.data&&g.processData&&"string"!=typeof g.data&&(g.data=it.param(g.data,g.traditional)),F(De,g,e,C),2===E)return C;M=g.global,M&&0===it.active++&&it.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!Ce.test(g.type),n=g.url,g.hasContent||(g.data&&(n=g.url+=(de.test(n)?"&":"?")+g.data,delete g.data),g.cache===!1&&(g.url=Ne.test(n)?n.replace(Ne,"$1_="+ue++):n+(de.test(n)?"&":"?")+"_="+ue++)),g.ifModified&&(it.lastModified[n]&&C.setRequestHeader("If-Modified-Since",it.lastModified[n]),it.etag[n]&&C.setRequestHeader("If-None-Match",it.etag[n])),(g.data&&g.hasContent&&g.contentType!==!1||e.contentType)&&C.setRequestHeader("Content-Type",g.contentType),C.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+xe+"; q=0.01":""):g.accepts["*"]);for(c in g.headers)C.setRequestHeader(c,g.headers[c]);if(g.beforeSend&&(g.beforeSend.call(l,C,g)===!1||2===E))return C.abort();f="abort";for(c in{success:1,error:1,complete:1})C[c](g[c]);if(i=F(we,g,e,C)){C.readyState=1,M&&u.trigger("ajaxSend",[C,g]),g.async&&g.timeout>0&&(a=setTimeout(function(){C.abort("timeout")},g.timeout));try{E=1,i.send(T,A)}catch(t){if(!(E<2))throw t;A(-1,t)}}else A(-1,"No Transport");return C},getJSON:function(t,e,A){return it.get(t,e,A,"json")},getScript:function(t,e){return it.get(t,void 0,e,"script")}}),it.each(["get","post"],function(t,e){it[e]=function(t,A,i,n){return it.isFunction(A)&&(n=n||i,i=A,A=void 0),it.ajax({url:t,type:e,dataType:n,data:A,success:i})}}),it.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){it.fn[e]=function(t){return this.on(e,t)}}),it._evalUrl=function(t){return it.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},it.fn.extend({wrapAll:function(t){var e;return it.isFunction(t)?this.each(function(e){it(this).wrapAll(t.call(this,e))}):(this[0]&&(e=it(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return it.isFunction(t)?this.each(function(e){it(this).wrapInner(t.call(this,e))}):this.each(function(){var e=it(this),A=e.contents();A.length?A.wrapAll(t):e.append(t)})},wrap:function(t){var e=it.isFunction(t);return this.each(function(A){it(this).wrapAll(e?t.call(this,A):t)})},unwrap:function(){return this.parent().each(function(){ +it.nodeName(this,"body")||it(this).replaceWith(this.childNodes)}).end()}}),it.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},it.expr.filters.visible=function(t){return!it.expr.filters.hidden(t)};var Le=/%20/g,Be=/\[\]$/,Qe=/\r?\n/g,me=/^(?:submit|button|image|reset|file)$/i,je=/^(?:input|select|textarea|keygen)/i;it.param=function(t,e){var A,i=[],n=function(t,e){e=it.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=it.ajaxSettings&&it.ajaxSettings.traditional),it.isArray(t)||t.jquery&&!it.isPlainObject(t))it.each(t,function(){n(this.name,this.value)});else for(A in t)X(A,t[A],e,n);return i.join("&").replace(Le,"+")},it.fn.extend({serialize:function(){return it.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=it.prop(this,"elements");return t?it.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!it(this).is(":disabled")&&je.test(this.nodeName)&&!me.test(t)&&(this.checked||!Bt.test(t))}).map(function(t,e){var A=it(this).val();return null==A?null:it.isArray(A)?it.map(A,function(t){return{name:e.name,value:t.replace(Qe,"\r\n")}}):{name:e.name,value:A.replace(Qe,"\r\n")}}).get()}}),it.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(t){}};var Se=0,ze={},ve={0:200,1223:204},be=it.ajaxSettings.xhr();A.ActiveXObject&&it(A).on("unload",function(){for(var t in ze)ze[t]()}),tt.cors=!!be&&"withCredentials"in be,tt.ajax=be=!!be,it.ajaxTransport(function(t){var e;if(tt.cors||be&&!t.crossDomain)return{send:function(A,i){var n,o=t.xhr(),r=++Se;if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(n in t.xhrFields)o[n]=t.xhrFields[n];t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||A["X-Requested-With"]||(A["X-Requested-With"]="XMLHttpRequest");for(n in A)o.setRequestHeader(n,A[n]);e=function(t){return function(){e&&(delete ze[r],e=o.onload=o.onerror=null,"abort"===t?o.abort():"error"===t?i(o.status,o.statusText):i(ve[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=e(),o.onerror=e("error"),e=ze[r]=e("abort");try{o.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),it.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return it.globalEval(t),t}}}),it.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),it.ajaxTransport("script",function(t){if(t.crossDomain){var e,A;return{send:function(i,n){e=it(" - - - - - - - -
-
-
- - -
-
-
- - - - -
- -
- - -
- Preload image -
- -
- - -
-

×

-

Terrain map data

-
    -
  • OpenStreetMap © OpenStreetMap contributors
  • -
  • NaturalEarth public domain
  • -
  • EU-DEM © Produced using Copernicus data and information
    funded by the European Union
  • -
  • SRTM © NASA
  • -
  • GTOPO30
  • -
  • CleanTOPO2 public domain
  • -
  • GlobCover © ESA
  • -
-

Terrain map design © EOX IT Services GmbH

-
- - - - - - - - - + + + EOxServer - Webclient + + + + + +
+ + + \ No newline at end of file diff -Nru eoxserver-1.0rc21/eoxserver/webclient/templates/webclient/webclient.base.html eoxserver-1.0rc22/eoxserver/webclient/templates/webclient/webclient.base.html --- eoxserver-1.0rc21/eoxserver/webclient/templates/webclient/webclient.base.html 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/webclient/templates/webclient/webclient.base.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,108 +0,0 @@ - - - - {% block title %}EOxServer Webclient{% endblock %} - - - - - - - - - - - - - - - - - - - - - - - - - - - {% block map %}
{% endblock %} - {% block main %}
{% endblock %} -
-
-
-
- -
- - {% block extra %}{% endblock %} - - - - {% block javascript_templates %}{% endblock %} - - {% block initialization %} - - {% endblock %} - - diff -Nru eoxserver-1.0rc21/eoxserver/webclient/templates/webclient/webclient.html eoxserver-1.0rc22/eoxserver/webclient/templates/webclient/webclient.html --- eoxserver-1.0rc21/eoxserver/webclient/templates/webclient/webclient.html 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/webclient/templates/webclient/webclient.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -{% extends "webclient/webclient.base.html" %} - diff -Nru eoxserver-1.0rc21/eoxserver/webclient/urls.py eoxserver-1.0rc22/eoxserver/webclient/urls.py --- eoxserver-1.0rc21/eoxserver/webclient/urls.py 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/webclient/urls.py 2021-02-05 10:41:29.000000000 +0000 @@ -1,9 +1,9 @@ -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------ # # Project: EOxServer # Authors: Fabian Schindler # -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------ # Copyright (C) 2014 EOX IT Services GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -13,8 +13,8 @@ # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # -# The above copyright notice and this permission notice shall be included in all -# copies of this Software or works derived from this Software. +# The above copyright notice and this permission notice shall be included in +# all copies of this Software or works derived from this Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -23,16 +23,16 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------ try: from django.conf.urls import url as re_path except ImportError: from django.urls import re_path -from eoxserver.webclient.views import index, configuration +from eoxserver.webclient.views import index + app_name = 'webclient' urlpatterns = [ - re_path(r'^$', index, name='index'), - re_path(r'^configuration/$', configuration, name='configuration') + re_path(r'^$', index, name='index') ] diff -Nru eoxserver-1.0rc21/eoxserver/webclient/views.py eoxserver-1.0rc22/eoxserver/webclient/views.py --- eoxserver-1.0rc21/eoxserver/webclient/views.py 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/eoxserver/webclient/views.py 2021-02-05 10:41:29.000000000 +0000 @@ -1,11 +1,11 @@ -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------ # # Project: EOxServer # Authors: Stephan Krause # Stephan Meissl # Fabian Schindler # -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------ # Copyright (C) 2011 EOX IT Services GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -15,8 +15,8 @@ # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # -# The above copyright notice and this permission notice shall be included in all -# copies of this Software or works derived from this Software. +# The above copyright notice and this permission notice shall be included in +# all copies of this Software or works derived from this Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,14 +25,15 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------ import logging from datetime import timedelta from django.shortcuts import render from django.utils.timezone import now -from django.db.models import Q, Max, Min +from django.db.models import Max, Min +from django.contrib.gis.db.models import Extent from eoxserver.core.util.timetools import isoformat from eoxserver.resources.coverages import models @@ -42,52 +43,39 @@ def index(request): - return render( - request, 'webclient/index.html', { - "path": request.path, - } - ) - - -def configuration(request): # select collections or coverages not contained in collections that are # visible - qs = models.EOObject.objects.filter( - Q(collection__isnull=False) | - Q(mosaic__isnull=False) | - Q( - coverage__isnull=False, - coverage__service_visibility__service="wc", - coverage__service_visibility__visibility=True, - ) + qs = models.Collection.objects.all().exclude( + service_visibility__visibility=False, + service_visibility__service="wc" ) # get the min/max values for begin and end time - values = qs.aggregate(Min("begin_time"), Max("end_time")) + values = qs.aggregate( + Min("begin_time"), + Max("end_time"), + Extent('footprint') + ) start_time = values["begin_time__min"] or now() - timedelta(days=5) end_time = values["end_time__max"] or now() start_time_full = start_time - timedelta(days=5) end_time_full = end_time + timedelta(days=5) - # try: - # # get only coverages that are in a collection or are visible - # # limit them to 10 and select the first time, so that we can limit the - # # initial brush - # coverages_qs = models.EOObject.objects.filter( - # Q(collection__isnull=True), - # Q(collections__isnull=False) | Q(coverage__visible=True) - # ) - # first = list(coverages_qs.order_by("-begin_time")[:10])[-1] - # start_time = first.begin_time - # except (models.EOObject.DoesNotExist, IndexError): - # pass + extent = values["footprint__extent"] + if extent is not None: + bbox = ",".join(str(v) for v in extent) + else: + bbox = "-180,-90,180,90" + base_url = request.get_host() + '/' return render( - request, 'webclient/config.json', { + request, 'webclient/index.html', { + "path": base_url, "layers": qs, "start_time_full": isoformat(start_time_full), "end_time_full": isoformat(end_time_full), "start_time": isoformat(start_time), - "end_time": isoformat(end_time) + "end_time": isoformat(end_time), + "bbox": bbox } ) diff -Nru eoxserver-1.0rc21/setup.py eoxserver-1.0rc22/setup.py --- eoxserver-1.0rc21/setup.py 2021-01-12 01:37:12.000000000 +0000 +++ eoxserver-1.0rc22/setup.py 2021-02-05 10:41:29.000000000 +0000 @@ -93,7 +93,7 @@ "tools/eoxserver-preprocess.py" ], install_requires=[ - 'django>=1.4', + 'django<3', 'python-dateutil', 'django-model-utils<4.0.0', 'zipstream',