additional_plugins/serendipity_event_osm/ressources/ol.js
2022-02-02 16:06:14 +01:00

3 lines
No EOL
1.2 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! For license information please see ol.js.LICENSE.txt */
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.ol=n():t.ol=n()}(self,(function(){return function(){var t,n={9796:function(t,n,e){var r;n.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;var e="color: "+this.color;n.splice(1,0,e,"color: inherit");var r=0,i=0;n[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(r++,"%c"===t&&(i=r))})),n.splice(i,0,e)},n.save=function(t){try{t?n.storage.setItem("debug",t):n.storage.removeItem("debug")}catch(t){}},n.load=function(){var t;try{t=n.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},n.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage=function(){try{return localStorage}catch(t){}}(),n.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||function(){},t.exports=e(4701)(n),t.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},4701:function(t,n,e){function r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return i(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}t.exports=function(t){function n(t){var e,r,o,s=null;function a(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];if(a.enabled){var o=a,s=Number(new Date),u=s-(e||s);o.diff=u,o.prev=e,o.curr=s,e=s,r[0]=n.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var c=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(function(t,e){if("%%"===t)return"%";c++;var i=n.formatters[e];if("function"==typeof i){var s=r[c];t=i.call(o,s),r.splice(c,1),c--}return t})),n.formatArgs.call(o,r);var f=o.log||n.log;f.apply(o,r)}}return a.namespace=t,a.useColors=n.useColors(),a.color=n.selectColor(t),a.extend=i,a.destroy=n.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(r!==n.namespaces&&(r=n.namespaces,o=n.enabled(t)),o)},set:function(t){s=t}}),"function"==typeof n.init&&n.init(a),a}function i(t,e){var r=n(this.namespace+(void 0===e?":":e)+t);return r.log=this.log,r}function o(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},n.disable=function(){var t=[].concat(r(n.names.map(o)),r(n.skips.map(o).map((function(t){return"-"+t})))).join(",");return n.enable(""),t},n.enable=function(t){var e;n.save(t),n.namespaces=t,n.names=[],n.skips=[];var r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(e=0;e<i;e++)r[e]&&("-"===(t=r[e].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+t.substr(1)+"$")):n.names.push(new RegExp("^"+t+"$")))},n.enabled=function(t){if("*"===t[t.length-1])return!0;var e,r;for(e=0,r=n.skips.length;e<r;e++)if(n.skips[e].test(t))return!1;for(e=0,r=n.names.length;e<r;e++)if(n.names[e].test(t))return!0;return!1},n.humanize=e(7937),n.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((function(e){n[e]=t[e]})),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(t){for(var e=0,r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return n.colors[Math.abs(e)%n.colors.length]},n.enable(n.load()),n}},2549:function(t,n,e){"use strict";e.d(n,{L:function(){return r},It:function(){return s},sf:function(){return u},Ie:function(){return f},pd:function(){return h},L5:function(){return l},Qb:function(){return v},P1:function(){return d}});var r={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},i={};for(var o in r)r.hasOwnProperty(o)&&(i[r[o]]=parseInt(o,10));var s=[i.BitsPerSample,i.ExtraSamples,i.SampleFormat,i.StripByteCounts,i.StripOffsets,i.StripRowCounts,i.TileByteCounts,i.TileOffsets,i.SubIFDs],a={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},u={};for(var c in a)a.hasOwnProperty(c)&&(u[a[c]]=parseInt(c,10));var f={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},h={Unspecified:0,Assocalpha:1,Unassalpha:2},l={Version:0,AddCompression:1},v={None:0,Deflate:1},d={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},p={};for(var y in d)d.hasOwnProperty(y)&&(p[d[y]]=parseInt(y,10))},3226:function(t,n){n.read=function(t,n,e,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,f=-7,h=e?i-1:0,l=e?-1:1,v=t[n+h];for(h+=l,o=v&(1<<-f)-1,v>>=-f,f+=a;f>0;o=256*o+t[n+h],h+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[n+h],h+=l,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(v?-1:1);s+=Math.pow(2,r),o-=c}return(v?-1:1)*s*Math.pow(2,o-r)},n.write=function(t,n,e,r,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,h=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,d=r?1:-1,p=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(a=isNaN(n)?1:0,s=f):(s=Math.floor(Math.log(n)/Math.LN2),n*(u=Math.pow(2,-s))<1&&(s--,u*=2),(n+=s+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=f?(a=0,s=f):s+h>=1?(a=(n*u-1)*Math.pow(2,i),s+=h):(a=n*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[e+v]=255&a,v+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[e+v]=255&s,v+=d,s/=256,c-=8);t[e+v-d]|=128*p}},152:function(t){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return!!t&&("symbol"===n(Symbol.observable)&&"function"==typeof t[Symbol.observable]?t===t[Symbol.observable]():"function"==typeof t["@@observable"]&&t===t["@@observable"]())}},6875:function(t,n,e){"use strict";function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function i(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,n,e){return n&&i(t.prototype,n),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var s=e(8692),a=Symbol("max"),u=Symbol("length"),c=Symbol("lengthCalculator"),f=Symbol("allowStale"),h=Symbol("maxAge"),l=Symbol("dispose"),v=Symbol("noDisposeOnSet"),d=Symbol("lruList"),p=Symbol("cache"),y=Symbol("updateAgeOnGet"),m=function(){return 1},b=function(){function t(n){if(r(this,t),"number"==typeof n&&(n={max:n}),n||(n={}),n.max&&("number"!=typeof n.max||n.max<0))throw new TypeError("max must be a non-negative number");this[a]=n.max||1/0;var e=n.length||m;if(this[c]="function"!=typeof e?m:e,this[f]=n.stale||!1,n.maxAge&&"number"!=typeof n.maxAge)throw new TypeError("maxAge must be a number");this[h]=n.maxAge||0,this[l]=n.dispose,this[v]=n.noDisposeOnSet||!1,this[y]=n.updateAgeOnGet||!1,this.reset()}return o(t,[{key:"max",get:function(){return this[a]},set:function(t){if("number"!=typeof t||t<0)throw new TypeError("max must be a non-negative number");this[a]=t||1/0,x(this)}},{key:"allowStale",get:function(){return this[f]},set:function(t){this[f]=!!t}},{key:"maxAge",get:function(){return this[h]},set:function(t){if("number"!=typeof t)throw new TypeError("maxAge must be a non-negative number");this[h]=t,x(this)}},{key:"lengthCalculator",get:function(){return this[c]},set:function(t){var n=this;"function"!=typeof t&&(t=m),t!==this[c]&&(this[c]=t,this[u]=0,this[d].forEach((function(t){t.length=n[c](t.value,t.key),n[u]+=t.length}))),x(this)}},{key:"length",get:function(){return this[u]}},{key:"itemCount",get:function(){return this[d].length}},{key:"rforEach",value:function(t,n){n=n||this;for(var e=this[d].tail;null!==e;){var r=e.prev;S(this,t,e,n),e=r}}},{key:"forEach",value:function(t,n){n=n||this;for(var e=this[d].head;null!==e;){var r=e.next;S(this,t,e,n),e=r}}},{key:"keys",value:function(){return this[d].toArray().map((function(t){return t.key}))}},{key:"values",value:function(){return this[d].toArray().map((function(t){return t.value}))}},{key:"reset",value:function(){var t=this;this[l]&&this[d]&&this[d].length&&this[d].forEach((function(n){return t[l](n.key,n.value)})),this[p]=new Map,this[d]=new s,this[u]=0}},{key:"dump",value:function(){var t=this;return this[d].map((function(n){return!g(t,n)&&{k:n.key,v:n.value,e:n.now+(n.maxAge||0)}})).toArray().filter((function(t){return t}))}},{key:"dumpLru",value:function(){return this[d]}},{key:"set",value:function(t,n,e){if((e=e||this[h])&&"number"!=typeof e)throw new TypeError("maxAge must be a number");var r=e?Date.now():0,i=this[c](n,t);if(this[p].has(t)){if(i>this[a])return k(this,this[p].get(t)),!1;var o=this[p].get(t).value;return this[l]&&(this[v]||this[l](t,o.value)),o.now=r,o.maxAge=e,o.value=n,this[u]+=i-o.length,o.length=i,this.get(t),x(this),!0}var s=new _(t,n,i,r,e);return s.length>this[a]?(this[l]&&this[l](t,n),!1):(this[u]+=s.length,this[d].unshift(s),this[p].set(t,this[d].head),x(this),!0)}},{key:"has",value:function(t){if(!this[p].has(t))return!1;var n=this[p].get(t).value;return!g(this,n)}},{key:"get",value:function(t){return w(this,t,!0)}},{key:"peek",value:function(t){return w(this,t,!1)}},{key:"pop",value:function(){var t=this[d].tail;return t?(k(this,t),t.value):null}},{key:"del",value:function(t){k(this,this[p].get(t))}},{key:"load",value:function(t){this.reset();for(var n=Date.now(),e=t.length-1;e>=0;e--){var r=t[e],i=r.e||0;if(0===i)this.set(r.k,r.v);else{var o=i-n;o>0&&this.set(r.k,r.v,o)}}}},{key:"prune",value:function(){var t=this;this[p].forEach((function(n,e){return w(t,e,!1)}))}}]),t}(),w=function(t,n,e){var r=t[p].get(n);if(r){var i=r.value;if(g(t,i)){if(k(t,r),!t[f])return}else e&&(t[y]&&(r.value.now=Date.now()),t[d].unshiftNode(r));return i.value}},g=function(t,n){if(!n||!n.maxAge&&!t[h])return!1;var e=Date.now()-n.now;return n.maxAge?e>n.maxAge:t[h]&&e>t[h]},x=function(t){if(t[u]>t[a])for(var n=t[d].tail;t[u]>t[a]&&null!==n;){var e=n.prev;k(t,n),n=e}},k=function(t,n){if(n){var e=n.value;t[l]&&t[l](e.key,e.value),t[u]-=e.length,t[p].delete(e.key),t[d].removeNode(n)}},_=o((function t(n,e,i,o,s){r(this,t),this.key=n,this.value=e,this.length=i,this.now=o,this.maxAge=s||0})),S=function(t,n,e,r){var i=e.value;g(t,i)&&(k(t,e),t[f]||(i=void 0)),i&&n.call(r,i.value,i.key,t)};t.exports=b},1063:function(t){var n={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},e=" ",r=/(italic|oblique)$/i,i={};t.exports=function(t,o,s){var a=i[t];if(!a){Array.isArray(t)||(t=[t]);for(var u=400,c="normal",f=[],h=0,l=t.length;h<l;++h){var v=t[h].split(" "),d=v[v.length-1].toLowerCase();for(var p in"normal"==d||"italic"==d||"oblique"==d?(c=d,v.pop(),d=v[v.length-1].toLowerCase()):r.test(d)&&(d=d.replace(r,""),c=v[v.length-1].replace(d,"")),n)if(d==p||d==p.replace("-","")||d==p.replace("-",e)){u=n[p],v.pop();break}"number"==typeof d&&(u=d);var y=v.join(e).replace("Klokantech Noto Sans","Noto Sans");-1!==y.indexOf(e)&&(y='"'+y+'"'),f.push(y)}a=i[t]=[c,u,f]}return a[0]+e+a[1]+e+o+"px"+(s?"/"+s:"")+e+a[2]}},7937:function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var e=1e3,r=60*e,i=60*r,o=24*i,s=7*o,a=365.25*o;function u(t,n,e,r){var i=n>=1.5*e;return Math.round(t/e)+" "+r+(i?"s":"")}t.exports=function(t,c){c=c||{};var f=n(t);if("string"===f&&t.length>0)return function(t){if((t=String(t)).length>100)return;var n=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!n)return;var u=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*a;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*o;case"hours":case"hour":case"hrs":case"hr":case"h":return u*i;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(t);if("number"===f&&isFinite(t))return c.long?function(t){var n=Math.abs(t);if(n>=o)return u(t,n,o,"day");if(n>=i)return u(t,n,i,"hour");if(n>=r)return u(t,n,r,"minute");if(n>=e)return u(t,n,e,"second");return t+" ms"}(t):function(t){var n=Math.abs(t);if(n>=o)return Math.round(t/o)+"d";if(n>=i)return Math.round(t/i)+"h";if(n>=r)return Math.round(t/r)+"m";if(n>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},9694:function(t,n,e){"use strict";function r(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=function(t,n){if(!t)return;if("string"==typeof t)return i(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,s=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw s}}}}function i(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function o(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}e.r(n),e.d(n,{Observable:function(){return R},Subject:function(){return J},filter:function(){return D},flatMap:function(){return F},interval:function(){return G},map:function(){return B},merge:function(){return q},multicast:function(){return Q},scan:function(){return nt},unsubscribe:function(){return I}});var s=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,a)}u((r=r.apply(t,n||[])).next())}))},a=function(){function t(n){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this._baseObserver=n,this._pendingPromises=new Set}var n,e,i;return n=t,(e=[{key:"complete",value:function(){var t=this;Promise.all(this._pendingPromises).then((function(){return t._baseObserver.complete()})).catch((function(n){return t._baseObserver.error(n)}))}},{key:"error",value:function(t){this._baseObserver.error(t)}},{key:"schedule",value:function(t){var n=this,e=Promise.all(this._pendingPromises),i=[],o=function(t){return i.push(t)},a=Promise.resolve().then((function(){return s(n,void 0,void 0,regeneratorRuntime.mark((function n(){var s,u,c;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e;case 2:return n.next=4,t(o);case 4:this._pendingPromises.delete(a),s=r(i);try{for(s.s();!(u=s.n()).done;)c=u.value,this._baseObserver.next(c)}catch(t){s.e(t)}finally{s.f()}case 7:case"end":return n.stop()}}),n,this)})))})).catch((function(t){n._pendingPromises.delete(a),n._baseObserver.error(t)}));this._pendingPromises.add(a)}}])&&o(n.prototype,e),i&&o(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(),u=function(){return"function"==typeof Symbol},c=function(t){return u()&&Boolean(Symbol[t])},f=function(t){return c(t)?Symbol[t]:"@@"+t};function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function v(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,n,e){return n&&v(t.prototype,n),e&&v(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=function(t,n){if(!t)return;if("string"==typeof t)return y(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return y(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function y(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}c("asyncIterator")||(Symbol.asyncIterator=Symbol.asyncIterator||Symbol.for("Symbol.asyncIterator"));var m=f("iterator"),b=f("observable"),w=f("species");function g(t,n){var e=t[n];if(null!=e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}}function x(t){var n=t.constructor;return void 0!==n&&null===(n=n[w])&&(n=void 0),void 0!==n?n:C}function k(t){return t instanceof C}function _(t){_.log?_.log(t):setTimeout((function(){throw t}),0)}function S(t){Promise.resolve().then((function(){try{t()}catch(t){_(t)}}))}function M(t){var n=t._cleanup;if(void 0!==n&&(t._cleanup=void 0,n))try{if("function"==typeof n)n();else{var e=g(n,"unsubscribe");e&&e.call(n)}}catch(t){_(t)}}function j(t){t._observer=void 0,t._queue=void 0,t._state="closed"}function O(t,n,e){t._state="running";var r=t._observer;try{var i=r?g(r,n):void 0;switch(n){case"next":i&&i.call(r,e);break;case"error":if(j(t),!i)throw e;i.call(r,e);break;case"complete":j(t),i&&i.call(r)}}catch(t){_(t)}"closed"===t._state?M(t):"running"===t._state&&(t._state="ready")}function T(t,n,e){if("closed"!==t._state)return"buffering"===t._state?(t._queue=t._queue||[],void t._queue.push({type:n,value:e})):"ready"!==t._state?(t._state="buffering",t._queue=[{type:n,value:e}],void S((function(){return function(t){var n=t._queue;if(n){t._queue=void 0,t._state="ready";var e,r=p(n);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(O(t,i.type,i.value),"closed"===t._state)break}}catch(t){r.e(t)}finally{r.f()}}}(t)}))):void O(t,n,e)}var E=function(){function t(n,e){l(this,t),this._cleanup=void 0,this._observer=n,this._queue=void 0,this._state="initializing";var r=new A(this);try{this._cleanup=e.call(void 0,r)}catch(t){r.error(t)}"initializing"===this._state&&(this._state="ready")}return d(t,[{key:"closed",get:function(){return"closed"===this._state}},{key:"unsubscribe",value:function(){"closed"!==this._state&&(j(this),M(this))}}]),t}(),A=function(){function t(n){l(this,t),this._subscription=n}return d(t,[{key:"closed",get:function(){return"closed"===this._subscription._state}},{key:"next",value:function(t){T(this._subscription,"next",t)}},{key:"error",value:function(t){T(this._subscription,"error",t)}},{key:"complete",value:function(){T(this._subscription,"complete")}}]),t}(),C=function(t){function n(t){if(l(this,n),!(this instanceof n))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return d(n,[{key:"subscribe",value:function(t,n,e){return"object"===h(t)&&null!==t||(t={next:t,error:n,complete:e}),new E(t,this._subscriber)}},{key:"pipe",value:function(t){for(var n=this,e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];for(var o=0,s=[t].concat(r);o<s.length;o++){var a=s[o];n=a(n)}return n}},{key:"tap",value:function(t,e,r){var i=this,o="object"!==h(t)||null===t?{next:t,error:e,complete:r}:t;return new n((function(t){return i.subscribe({next:function(n){o.next&&o.next(n),t.next(n)},error:function(n){o.error&&o.error(n),t.error(n)},complete:function(){o.complete&&o.complete(),t.complete()},start:function(t){o.start&&o.start(t)}})}))}},{key:"forEach",value:function(t){var n=this;return new Promise((function(e,r){if("function"==typeof t)var i=n.subscribe({next:function(n){try{t(n,o)}catch(t){r(t),i.unsubscribe()}},error:function(t){r(t)},complete:function(){e(void 0)}});else r(new TypeError(t+" is not a function"));function o(){i.unsubscribe(),e(void 0)}}))}},{key:"map",value:function(t){var n=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(x(this))((function(e){return n.subscribe({next:function(n){var r=n;try{r=t(n)}catch(t){return e.error(t)}e.next(r)},error:function(t){e.error(t)},complete:function(){e.complete()}})}))}},{key:"filter",value:function(t){var n=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(x(this))((function(e){return n.subscribe({next:function(n){try{if(!t(n))return}catch(t){return e.error(t)}e.next(n)},error:function(t){e.error(t)},complete:function(){e.complete()}})}))}},{key:"reduce",value:function(t,n){var e=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");var r=x(this),i=arguments.length>1,o=!1,s=n;return new r((function(n){return e.subscribe({next:function(e){var r=!o;if(o=!0,!r||i)try{s=t(s,e)}catch(t){return n.error(t)}else s=e},error:function(t){n.error(t)},complete:function(){if(!o&&!i)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(s),n.complete()}})}))}},{key:"concat",value:function(){for(var t=this,n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];var i=x(this);return new i((function(n){var r,o=0;return function t(s){r=s.subscribe({next:function(t){n.next(t)},error:function(t){n.error(t)},complete:function(){o===e.length?(r=void 0,n.complete()):t(i.from(e[o++]))}})}(t),function(){r&&(r.unsubscribe(),r=void 0)}}))}},{key:"flatMap",value:function(t){var n=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");var e=x(this);return new e((function(r){var i=[],o=n.subscribe({next:function(n){var o;if(t)try{o=t(n)}catch(t){return r.error(t)}else o=n;var a=e.from(o).subscribe({next:function(t){r.next(t)},error:function(t){r.error(t)},complete:function(){var t=i.indexOf(a);t>=0&&i.splice(t,1),s()}});i.push(a)},error:function(t){r.error(t)},complete:function(){s()}});function s(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(t){return t.unsubscribe()})),o.unsubscribe()}}))}},{key:t,value:function(){return this}}],[{key:"from",value:function(t){var e="function"==typeof this?this:n;if(null==t)throw new TypeError(t+" is not an object");var r=g(t,b);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return k(i)&&i.constructor===e?i:new e((function(t){return i.subscribe(t)}))}if(c("iterator")){var o=g(t,m);if(o)return new e((function(n){S((function(){if(!n.closed){var e,r=p(o.call(t));try{for(r.s();!(e=r.n()).done;){var i=e.value;if(n.next(i),n.closed)return}}catch(t){r.e(t)}finally{r.f()}n.complete()}}))}))}if(Array.isArray(t))return new e((function(n){S((function(){if(!n.closed){var e,r=p(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(n.next(i),n.closed)return}}catch(t){r.e(t)}finally{r.f()}n.complete()}}))}));throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i="function"==typeof this?this:n;return new i((function(t){S((function(){if(!t.closed){var n,r=p(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(t.next(i),t.closed)return}}catch(t){r.e(t)}finally{r.f()}t.complete()}}))}))}},{key:w,get:function(){return this}}]),n}((Symbol.observable,b));u()&&Object.defineProperty(C,Symbol("extensions"),{value:{symbol:b,hostReportError:_},configurable:!0});var R=C;var I=function(t){"function"==typeof t?t():t&&"function"==typeof t.unsubscribe&&t.unsubscribe()},P=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,a)}u((r=r.apply(t,n||[])).next())}))};var D=function(t){return function(n){return new R((function(e){var r=new a(e),i=n.subscribe({complete:function(){r.complete()},error:function(t){r.error(t)},next:function(n){var e=this;r.schedule((function(r){return P(e,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(n);case 2:if(!e.sent){e.next=4;break}r(n);case 4:case"end":return e.stop()}}),e)})))}))}});return function(){return I(i)}}))}};function N(t){return t&&c("asyncIterator")&&t[Symbol.asyncIterator]}var z=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,a)}u((r=r.apply(t,n||[])).next())}))},L=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,e=t[Symbol.asyncIterator];return e?e.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(e){n[e]=t[e]&&function(n){return new Promise((function(r,i){(function(t,n,e,r){Promise.resolve(r).then((function(n){t({value:n,done:e})}),n)})(r,i,(n=t[e](n)).done,n.value)}))}}};var F=function(t){return function(n){return new R((function(e){var r=new a(e),i=n.subscribe({complete:function(){r.complete()},error:function(t){r.error(t)},next:function(n){var e=this;r.schedule((function(r){return z(e,void 0,void 0,regeneratorRuntime.mark((function e(){var i,o,s,a,u,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(n);case 2:if(s=e.sent,!((h=s)&&c("iterator")&&h[Symbol.iterator]||N(s))){e.next=31;break}e.prev=4,a=L(s);case 6:return e.next=8,a.next();case 8:if((u=e.sent).done){e.next=14;break}f=u.value,r(f);case 12:e.next=6;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),i={error:e.t0};case 19:if(e.prev=19,e.prev=20,!u||u.done||!(o=a.return)){e.next=24;break}return e.next=24,o.call(a);case 24:if(e.prev=24,!i){e.next=27;break}throw i.error;case 27:return e.finish(24);case 28:return e.finish(19);case 29:e.next=32;break;case 31:s.map((function(t){return r(t)}));case 32:case"end":return e.stop()}var h}),e,null,[[4,16,19,29],[20,,24,28]])})))}))}});return function(){return I(i)}}))}};function G(t){return new C((function(n){var e=0,r=setInterval((function(){n.next(e++)}),t);return function(){return clearInterval(r)}}))}var U=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,a)}u((r=r.apply(t,n||[])).next())}))};var B=function(t){return function(n){return new R((function(e){var r=new a(e),i=n.subscribe({complete:function(){r.complete()},error:function(t){r.error(t)},next:function(n){var e=this;r.schedule((function(r){return U(e,void 0,void 0,regeneratorRuntime.mark((function e(){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(n);case 2:i=e.sent,r(i);case 4:case"end":return e.stop()}}),e)})))}))}});return function(){return I(i)}}))}};var q=function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return 0===n.length?C.from([]):new C((function(t){var e=0,r=n.map((function(r){return r.subscribe({error:function(n){t.error(n),i()},next:function(n){t.next(n)},complete:function(){++e===n.length&&(t.complete(),i())}})})),i=function(){r.forEach((function(t){return I(t)}))};return i}))};function $(t){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function V(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=function(t,n){if(!t)return;if("string"==typeof t)return Z(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Z(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function Z(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function W(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function H(t,n){return(H=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function K(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Y(t);if(n){var i=Y(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return X(this,e)}}function X(t,n){if(n&&("object"===$(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Y(t){return(Y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var J=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&H(t,n)}(o,t);var n,e,r,i=K(o);function o(){var t;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,(function(n){return t._observers.add(n),function(){return t._observers.delete(n)}})))._observers=new Set,t}return n=o,(e=[{key:"next",value:function(t){var n,e=V(this._observers);try{for(e.s();!(n=e.n()).done;)n.value.next(t)}catch(t){e.e(t)}finally{e.f()}}},{key:"error",value:function(t){var n,e=V(this._observers);try{for(e.s();!(n=e.n()).done;)n.value.error(t)}catch(t){e.e(t)}finally{e.f()}}},{key:"complete",value:function(){var t,n=V(this._observers);try{for(n.s();!(t=n.n()).done;)t.value.complete()}catch(t){n.e(t)}finally{n.f()}}}])&&W(n.prototype,e),r&&W(n,r),Object.defineProperty(n,"prototype",{writable:!1}),o}(R);var Q=function(t){var n,e=new J,r=0;return new R((function(i){n||(n=t.subscribe(e));var o=e.subscribe(i);return r++,function(){r--,o.unsubscribe(),0===r&&(I(n),n=void 0)}}))},tt=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,a)}u((r=r.apply(t,n||[])).next())}))};var nt=function(t,n){return function(e){return new R((function(r){var i,o=0,s=new a(r),u=e.subscribe({complete:function(){s.complete()},error:function(t){s.error(t)},next:function(e){var r=this;s.schedule((function(s){return tt(r,void 0,void 0,regeneratorRuntime.mark((function r(){var a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=0===o?void 0===n?e:n:i,r.next=3,t(a,e,o++);case 3:i=r.sent,s(i);case 5:case"end":return r.stop()}}),r)})))}))}});return function(){return I(u)}}))}}},2098:function(t,n,e){"use strict";t.exports=i;var r=e(3226);function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var o=4294967296,s=1/o,a="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function u(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function c(t,n,e){return e?4294967296*n+(t>>>0):4294967296*(n>>>0)+(t>>>0)}function f(t,n,e){var r=n<=16383?1:n<=2097151?2:n<=268435455?3:Math.floor(Math.log(n)/(7*Math.LN2));e.realloc(r);for(var i=e.pos-1;i>=t;i--)e.buf[i+r]=e.buf[i]}function h(t,n){for(var e=0;e<t.length;e++)n.writeVarint(t[e])}function l(t,n){for(var e=0;e<t.length;e++)n.writeSVarint(t[e])}function v(t,n){for(var e=0;e<t.length;e++)n.writeFloat(t[e])}function d(t,n){for(var e=0;e<t.length;e++)n.writeDouble(t[e])}function p(t,n){for(var e=0;e<t.length;e++)n.writeBoolean(t[e])}function y(t,n){for(var e=0;e<t.length;e++)n.writeFixed32(t[e])}function m(t,n){for(var e=0;e<t.length;e++)n.writeSFixed32(t[e])}function b(t,n){for(var e=0;e<t.length;e++)n.writeFixed64(t[e])}function w(t,n){for(var e=0;e<t.length;e++)n.writeSFixed64(t[e])}function g(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16)+16777216*t[n+3]}function x(t,n,e){t[e]=n,t[e+1]=n>>>8,t[e+2]=n>>>16,t[e+3]=n>>>24}function k(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16)+(t[n+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,n,e){for(e=e||this.length;this.pos<e;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,t(i,n,this),this.pos===o&&this.skip(r)}return n},readMessage:function(t,n){return this.readFields(t,n,this.readVarint()+this.pos)},readFixed32:function(){var t=g(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=k(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=g(this.buf,this.pos)+g(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=g(this.buf,this.pos)+k(this.buf,this.pos+4)*o;return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var n,e,r=this.buf;return n=127&(e=r[this.pos++]),e<128?n:(n|=(127&(e=r[this.pos++]))<<7,e<128?n:(n|=(127&(e=r[this.pos++]))<<14,e<128?n:(n|=(127&(e=r[this.pos++]))<<21,e<128?n:function(t,n,e){var r,i,o=e.buf;if(i=o[e.pos++],r=(112&i)>>4,i<128)return c(t,r,n);if(i=o[e.pos++],r|=(127&i)<<3,i<128)return c(t,r,n);if(i=o[e.pos++],r|=(127&i)<<10,i<128)return c(t,r,n);if(i=o[e.pos++],r|=(127&i)<<17,i<128)return c(t,r,n);if(i=o[e.pos++],r|=(127&i)<<24,i<128)return c(t,r,n);if(i=o[e.pos++],r|=(1&i)<<31,i<128)return c(t,r,n);throw new Error("Expected varint not more than 10 bytes")}(n|=(15&(e=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,n=this.pos;return this.pos=t,t-n>=12&&a?function(t,n,e){return a.decode(t.subarray(n,e))}(this.buf,n,t):function(t,n,e){var r="",i=n;for(;i<e;){var o,s,a,u=t[i],c=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f>e)break;1===f?u<128&&(c=u):2===f?128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)<=127&&(c=null):3===f?(o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&((c=(15&u)<<12|(63&o)<<6|63&s)<=2047||c>=55296&&c<=57343)&&(c=null)):4===f&&(o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,f=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),i+=f}return r}(this.buf,n,t)},readBytes:function(){var t=this.readVarint()+this.pos,n=this.buf.subarray(this.pos,t);return this.pos=t,n},readPackedVarint:function(t,n){if(this.type!==i.Bytes)return t.push(this.readVarint(n));var e=u(this);for(t=t||[];this.pos<e;)t.push(this.readVarint(n));return t},readPackedSVarint:function(t){if(this.type!==i.Bytes)return t.push(this.readSVarint());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==i.Bytes)return t.push(this.readBoolean());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==i.Bytes)return t.push(this.readFloat());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==i.Bytes)return t.push(this.readDouble());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed32());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed32());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed64());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed64());var n=u(this);for(t=t||[];this.pos<n;)t.push(this.readSFixed64());return t},skip:function(t){var n=7&t;if(n===i.Varint)for(;this.buf[this.pos++]>127;);else if(n===i.Bytes)this.pos=this.readVarint()+this.pos;else if(n===i.Fixed32)this.pos+=4;else{if(n!==i.Fixed64)throw new Error("Unimplemented type: "+n);this.pos+=8}},writeTag:function(t,n){this.writeVarint(t<<3|n)},realloc:function(t){for(var n=this.length||16;n<this.pos+t;)n*=2;if(n!==this.length){var e=new Uint8Array(n);e.set(this.buf),this.buf=e,this.length=n}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),x(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),x(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),x(this.buf,-1&t,this.pos),x(this.buf,Math.floor(t*s),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),x(this.buf,-1&t,this.pos),x(this.buf,Math.floor(t*s),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,n){var e,r;t>=0?(e=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(e=~(-t%4294967296))?e=e+1|0:(e=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");n.realloc(10),function(t,n,e){e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos]=127&t}(e,0,n),function(t,n){var e=(7&t)<<4;if(n.buf[n.pos++]|=e|((t>>>=3)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;n.buf[n.pos++]=127&t}(r,n)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var n=this.pos;this.pos=function(t,n,e){for(var r,i,o=0;o<n.length;o++){if((r=n.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===n.length?(t[e++]=239,t[e++]=191,t[e++]=189):i=r;continue}if(r<56320){t[e++]=239,t[e++]=191,t[e++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[e++]=239,t[e++]=191,t[e++]=189,i=null);r<128?t[e++]=r:(r<2048?t[e++]=r>>6|192:(r<65536?t[e++]=r>>12|224:(t[e++]=r>>18|240,t[e++]=r>>12&63|128),t[e++]=r>>6&63|128),t[e++]=63&r|128)}return e}(this.buf,t,this.pos);var e=this.pos-n;e>=128&&f(n,e,this),this.pos=n-1,this.writeVarint(e),this.pos+=e},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var n=t.length;this.writeVarint(n),this.realloc(n);for(var e=0;e<n;e++)this.buf[this.pos++]=t[e]},writeRawMessage:function(t,n){this.pos++;var e=this.pos;t(n,this);var r=this.pos-e;r>=128&&f(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,n,e){this.writeTag(t,i.Bytes),this.writeRawMessage(n,e)},writePackedVarint:function(t,n){n.length&&this.writeMessage(t,h,n)},writePackedSVarint:function(t,n){n.length&&this.writeMessage(t,l,n)},writePackedBoolean:function(t,n){n.length&&this.writeMessage(t,p,n)},writePackedFloat:function(t,n){n.length&&this.writeMessage(t,v,n)},writePackedDouble:function(t,n){n.length&&this.writeMessage(t,d,n)},writePackedFixed32:function(t,n){n.length&&this.writeMessage(t,y,n)},writePackedSFixed32:function(t,n){n.length&&this.writeMessage(t,m,n)},writePackedFixed64:function(t,n){n.length&&this.writeMessage(t,b,n)},writePackedSFixed64:function(t,n){n.length&&this.writeMessage(t,w,n)},writeBytesField:function(t,n){this.writeTag(t,i.Bytes),this.writeBytes(n)},writeFixed32Field:function(t,n){this.writeTag(t,i.Fixed32),this.writeFixed32(n)},writeSFixed32Field:function(t,n){this.writeTag(t,i.Fixed32),this.writeSFixed32(n)},writeFixed64Field:function(t,n){this.writeTag(t,i.Fixed64),this.writeFixed64(n)},writeSFixed64Field:function(t,n){this.writeTag(t,i.Fixed64),this.writeSFixed64(n)},writeVarintField:function(t,n){this.writeTag(t,i.Varint),this.writeVarint(n)},writeSVarintField:function(t,n){this.writeTag(t,i.Varint),this.writeSVarint(n)},writeStringField:function(t,n){this.writeTag(t,i.Bytes),this.writeString(n)},writeFloatField:function(t,n){this.writeTag(t,i.Fixed32),this.writeFloat(n)},writeDoubleField:function(t,n){this.writeTag(t,i.Fixed64),this.writeDouble(n)},writeBooleanField:function(t,n){this.writeVarintField(t,Boolean(n))}}},7072:function(t,n,e){var r,i,o;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=function(){"use strict";function t(t,r,i,o,s){!function t(e,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,u=r-i+1,c=Math.log(a),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(a-f)/a)*(u-a/2<0?-1:1);t(e,r,Math.max(i,Math.floor(r-u*f/a+h)),Math.min(o,Math.floor(r+(a-u)*f/a+h)),s)}var l=e[r],v=i,d=o;for(n(e,i,r),s(e[o],l)>0&&n(e,i,o);v<d;){for(n(e,v,d),v++,d--;s(e[v],l)<0;)v++;for(;s(e[d],l)>0;)d--}0===s(e[i],l)?n(e,i,d):n(e,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(t,r,i||0,o||t.length-1,s||e)}function n(t,n,e){var r=t[n];t[n]=t[e],t[e]=r}function e(t,n){return t<n?-1:t>n?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,n,e){if(!e)return n.indexOf(t);for(var r=0;r<n.length;r++)if(e(t,n[r]))return r;return-1}function o(t,n){s(t,0,t.children.length,n,t)}function s(t,n,e,r,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=n;o<e;o++){var s=t.children[o];a(i,t.leaf?r(s):s)}return i}function a(t,n){return t.minX=Math.min(t.minX,n.minX),t.minY=Math.min(t.minY,n.minY),t.maxX=Math.max(t.maxX,n.maxX),t.maxY=Math.max(t.maxY,n.maxY),t}function u(t,n){return t.minX-n.minX}function c(t,n){return t.minY-n.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function l(t,n){return t.minX<=n.minX&&t.minY<=n.minY&&n.maxX<=t.maxX&&n.maxY<=t.maxY}function v(t,n){return n.minX<=t.maxX&&n.minY<=t.maxY&&n.maxX>=t.minX&&n.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function p(n,e,r,i,o){for(var s=[e,r];s.length;)if(!((r=s.pop())-(e=s.pop())<=i)){var a=e+Math.ceil((r-e)/i/2)*i;t(n,a,e,r,o),s.push(e,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var n=this.data,e=[];if(!v(t,n))return e;for(var r=this.toBBox,i=[];n;){for(var o=0;o<n.children.length;o++){var s=n.children[o],a=n.leaf?r(s):s;v(t,a)&&(n.leaf?e.push(s):l(t,a)?this._all(s,e):i.push(s))}n=i.pop()}return e},r.prototype.collides=function(t){var n=this.data;if(!v(t,n))return!1;for(var e=[];n;){for(var r=0;r<n.children.length;r++){var i=n.children[r],o=n.leaf?this.toBBox(i):i;if(v(t,o)){if(n.leaf||l(t,o))return!0;e.push(i)}}n=e.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var n=0;n<t.length;n++)this.insert(t[n]);return this}var e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){var r=this.data;this.data=e,e=r}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,n){if(!t)return this;for(var e,r,o,s=this.data,a=this.toBBox(t),u=[],c=[];s||u.length;){if(s||(s=u.pop(),r=u[u.length-1],e=c.pop(),o=!0),s.leaf){var f=i(t,s.children,n);if(-1!==f)return s.children.splice(f,1),u.push(s),this._condense(u),this}o||s.leaf||!l(s,a)?r?(e++,s=r.children[e],o=!1):s=null:(u.push(s),c.push(e),e=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,n){return t.minX-n.minX},r.prototype.compareMinY=function(t,n){return t.minY-n.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,n){for(var e=[];t;)t.leaf?n.push.apply(n,t.children):e.push.apply(e,t.children),t=e.pop();return n},r.prototype._build=function(t,n,e,r){var i,s=e-n+1,a=this._maxEntries;if(s<=a)return o(i=d(t.slice(n,e+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=d([])).leaf=!1,i.height=r;var u=Math.ceil(s/a),c=u*Math.ceil(Math.sqrt(a));p(t,n,e,c,this.compareMinX);for(var f=n;f<=e;f+=c){var h=Math.min(f+c-1,e);p(t,f,h,u,this.compareMinY);for(var l=f;l<=h;l+=u){var v=Math.min(l+u-1,h);i.children.push(this._build(t,l,v,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,n,e,r){for(;r.push(n),!n.leaf&&r.length-1!==e;){for(var i=1/0,o=1/0,s=void 0,a=0;a<n.children.length;a++){var u=n.children[a],c=f(u),h=(l=t,v=u,(Math.max(v.maxX,l.maxX)-Math.min(v.minX,l.minX))*(Math.max(v.maxY,l.maxY)-Math.min(v.minY,l.minY))-c);h<o?(o=h,i=c<i?c:i,s=u):h===o&&c<i&&(i=c,s=u)}n=s||n.children[0]}var l,v;return n},r.prototype._insert=function(t,n,e){var r=e?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,n,i);for(o.children.push(t),a(o,r);n>=0&&i[n].children.length>this._maxEntries;)this._split(i,n),n--;this._adjustParentBBoxes(r,i,n)},r.prototype._split=function(t,n){var e=t[n],r=e.children.length,i=this._minEntries;this._chooseSplitAxis(e,i,r);var s=this._chooseSplitIndex(e,i,r),a=d(e.children.splice(s,e.children.length-s));a.height=e.height,a.leaf=e.leaf,o(e,this.toBBox),o(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(e,a)},r.prototype._splitRoot=function(t,n){this.data=d([t,n]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,n,e){for(var r,i,o,a,u,c,h,l=1/0,v=1/0,d=n;d<=e-n;d++){var p=s(t,0,d,this.toBBox),y=s(t,d,e,this.toBBox),m=(i=p,o=y,a=Math.max(i.minX,o.minX),u=Math.max(i.minY,o.minY),c=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-u)),b=f(p)+f(y);m<l?(l=m,r=d,v=b<v?b:v):m===l&&b<v&&(v=b,r=d)}return r||e-n},r.prototype._chooseSplitAxis=function(t,n,e){var r=t.leaf?this.compareMinX:u,i=t.leaf?this.compareMinY:c;this._allDistMargin(t,n,e,r)<this._allDistMargin(t,n,e,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,n,e,r){t.children.sort(r);for(var i=this.toBBox,o=s(t,0,n,i),u=s(t,e-n,e,i),c=h(o)+h(u),f=n;f<e-n;f++){var l=t.children[f];a(o,t.leaf?i(l):l),c+=h(o)}for(var v=e-n-1;v>=n;v--){var d=t.children[v];a(u,t.leaf?i(d):d),c+=h(u)}return c},r.prototype._adjustParentBBoxes=function(t,n,e){for(var r=e;r>=0;r--)a(n[r],t)},r.prototype._condense=function(t){for(var n=t.length-1,e=void 0;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():o(t[n],this.toBBox)},r},"object"==s(n)?t.exports=o():void 0===(i="function"==typeof(r=o)?r.call(n,e,n,t):r)||(t.exports=i)},6760:function(t,n,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=function(t){"use strict";var n,e=Object.prototype,i=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,n,e){return Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{c({},"")}catch(t){c=function(t,n,e){return t[n]=e}}function f(t,n,e,r){var i=n&&n.prototype instanceof m?n:m,o=Object.create(i.prototype),s=new E(r||[]);return o._invoke=function(t,n,e){var r=l;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return C()}for(e.method=i,e.arg=o;;){var s=e.delegate;if(s){var a=j(s,e);if(a){if(a===y)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===l)throw r=p,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=d;var u=h(t,n,e);if("normal"===u.type){if(r=e.done?p:v,u.arg===y)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(r=p,e.method="throw",e.arg=u.arg)}}}(t,e,s),o}function h(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var l="suspendedStart",v="suspendedYield",d="executing",p="completed",y={};function m(){}function b(){}function w(){}var g={};c(g,s,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(A([])));k&&k!==e&&i.call(k,s)&&(g=k);var _=w.prototype=m.prototype=Object.create(g);function S(t){["next","throw","return"].forEach((function(n){c(t,n,(function(t){return this._invoke(n,t)}))}))}function M(t,n){function e(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"===r(l)&&i.call(l,"__await")?n.resolve(l.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):n.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return e("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new n((function(n,i){e(t,r,n,i)}))}return o=o?o.then(i,i):i()}}function j(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,j(t,e),"throw"===e.method))return y;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var i=h(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,y;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,y):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function O(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function T(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function A(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:n,done:!0}}return b.prototype=w,c(_,"constructor",w),c(w,"constructor",b),b.displayName=c(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===b||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,c(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},S(M.prototype),c(M.prototype,a,(function(){return this})),t.AsyncIterator=M,t.async=function(n,e,r,i,o){void 0===o&&(o=Promise);var s=new M(f(n,e,r,i),o);return t.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},S(_),c(_,u,"Generator"),c(_,s,(function(){return this})),c(_,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return a.type="throw",a.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var u=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=n,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(s)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),y},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),y}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;T(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),y}},t}("object"===r(t=e.nmd(t))?t.exports:{});try{regeneratorRuntime=i}catch(t){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},2335:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.serialize=n.deserialize=n.registerSerializer=void 0;var r=e(9713),i=r.DefaultSerializer;n.registerSerializer=function(t){i=r.extendSerializer(i,t)},n.deserialize=function(t){return i.deserialize(t)},n.serialize=function(t){return i.serialize(t)}},769:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),i=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(n,"__esModule",{value:!0}),n.Transfer=n.DefaultSerializer=n.expose=n.registerSerializer=void 0;var o=e(2335);Object.defineProperty(n,"registerSerializer",{enumerable:!0,get:function(){return o.registerSerializer}}),i(e(2305),n);var s=e(1459);Object.defineProperty(n,"expose",{enumerable:!0,get:function(){return s.expose}});var a=e(9713);Object.defineProperty(n,"DefaultSerializer",{enumerable:!0,get:function(){return a.DefaultSerializer}});var u=e(6126);Object.defineProperty(n,"Transfer",{enumerable:!0,get:function(){return u.Transfer}})},406:function(t,n){"use strict";var e;function r(t){return(""+t).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)?\/[^/]+(?:\?.*)?$/,"$1")+"/"}Object.defineProperty(n,"__esModule",{value:!0}),n.getBundleURL=n.getBaseURL=void 0,n.getBundleURL=function(){return e||(e=function(){try{throw new Error}catch(n){var t=(""+n.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(t)return r(t[0])}return"/"}()),e},n.getBaseURL=r},4002:function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&f(t,n)}function o(t){var n=c();return function(){var e,r=h(t);if(n){var i=h(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return s(this,e)}}function s(t,n){if(n&&("object"===r(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function a(t){var n="function"==typeof Map?new Map:void 0;return(a=function(t){if(null===t||(e=t,-1===Function.toString.call(e).indexOf("[native code]")))return t;var e;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return u(t,arguments,h(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f(r,t)})(t)}function u(t,n,e){return(u=c()?Reflect.construct:function(t,n,e){var r=[null];r.push.apply(r,n);var i=new(Function.bind.apply(t,r));return e&&f(i,e.prototype),i}).apply(null,arguments)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function f(t,n){return(f=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function v(t,n,e){return n&&l(t.prototype,n),e&&l(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function d(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.isWorkerRuntime=n.getWorkerImplementation=n.defaultPoolSize=void 0;var p=e(406);n.defaultPoolSize="undefined"!=typeof navigator&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:4;var y,m=function(t){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t)};function b(t){var n=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(n)}n.getWorkerImplementation=function(){return y||(y=function(){if("undefined"==typeof Worker)return v((function t(){throw d(this,t),Error("No web worker implementation available. You might have tried to spawn a worker within a worker in a browser that doesn't support workers in workers.")}));var t=function(t){i(e,t);var n=o(e);function e(t,r){var i,o;return d(this,e),"string"==typeof t&&r&&r._baseURL?t=new URL(t,r._baseURL):"string"==typeof t&&!m(t)&&p.getBundleURL().match(/^file:\/\//i)&&(t=new URL(t,p.getBundleURL().replace(/\/[^\/]+$/,"/")),(null===(i=null==r?void 0:r.CORSWorkaround)||void 0===i||i)&&(t=b("importScripts(".concat(JSON.stringify(t),");")))),"string"==typeof t&&m(t)&&(null===(o=null==r?void 0:r.CORSWorkaround)||void 0===o||o)&&(t=b("importScripts(".concat(JSON.stringify(t),");"))),n.call(this,t,r)}return v(e)}(a(Worker));return{blob:function(t){i(e,t);var n=o(e);function e(t,r){d(this,e);var i=window.URL.createObjectURL(t);return n.call(this,i,r)}return v(e,null,[{key:"fromText",value:function(t,n){return new e(new window.Blob([t],{type:"text/javascript"}),n)}}]),e}(t),default:t}}()),y},n.isWorkerRuntime=function(){var t="undefined"!=typeof self&&"undefined"!=typeof Window&&self instanceof Window;return!("undefined"==typeof self||!self.postMessage||t)}},2305:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Worker=n.BlobWorker=n.isWorkerRuntime=n.Thread=n.spawn=n.Pool=void 0;var r=e(4002);Object.defineProperty(n,"isWorkerRuntime",{enumerable:!0,get:function(){return r.isWorkerRuntime}});var i=e(3008);Object.defineProperty(n,"Pool",{enumerable:!0,get:function(){return i.Pool}});var o=e(5441);Object.defineProperty(n,"spawn",{enumerable:!0,get:function(){return o.spawn}});var s=e(906);Object.defineProperty(n,"Thread",{enumerable:!0,get:function(){return s.Thread}}),n.BlobWorker=r.getWorkerImplementation().blob,n.Worker=r.getWorkerImplementation().default},943:function(t,n,e){"use strict";function r(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=o(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,s=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw s}}}}function o(t,n){if(t){if("string"==typeof t)return s(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?s(t,n):void 0}}function s(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.createProxyModule=n.createProxyFunction=void 0;var u=a(e(9796)),c=e(9694),f=e(2335),h=e(4455),l=e(6126),v=e(8453),d=u.default("threads:master:messages"),p=1;function y(t,n){return new c.Observable((function(e){var r,i=function i(o){var s;if(d("Message from worker:",o.data),o.data&&o.data.uid===n)if((s=o.data)&&s.type===v.WorkerMessageType.running)r=o.data.resultType;else if(function(t){return t&&t.type===v.WorkerMessageType.result}(o.data))"promise"===r?(void 0!==o.data.payload&&e.next(f.deserialize(o.data.payload)),e.complete(),t.removeEventListener("message",i)):(o.data.payload&&e.next(f.deserialize(o.data.payload)),o.data.complete&&(e.complete(),t.removeEventListener("message",i)));else if(function(t){return t&&t.type===v.WorkerMessageType.error}(o.data)){var a=f.deserialize(o.data.error);e.error(a),t.removeEventListener("message",i)}};return t.addEventListener("message",i),function(){if("observable"===r||!r){var e={type:v.MasterMessageType.cancel,uid:n};t.postMessage(e)}t.removeEventListener("message",i)}}))}function m(t){if(0===t.length)return{args:[],transferables:[]};var n,e,o=[],s=[],a=i(t);try{for(a.s();!(n=a.n()).done;){var u=n.value;l.isTransferDescriptor(u)?(o.push(f.serialize(u.send)),s.push.apply(s,r(u.transferables))):o.push(f.serialize(u))}}catch(t){a.e(t)}finally{a.f()}return{args:o,transferables:0===s.length?s:(e=s,Array.from(new Set(e)))}}function b(t,n){return function(){for(var e=p++,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var s=m(i),a=s.args,u=s.transferables,f={type:v.MasterMessageType.run,uid:e,method:n,args:a};d("Sending command to run function to worker:",f);try{t.postMessage(f,u)}catch(t){return h.ObservablePromise.from(Promise.reject(t))}return h.ObservablePromise.from(c.multicast(y(t,e)))}}n.createProxyFunction=b,n.createProxyModule=function(t,n){var e,r={},o=i(n);try{for(o.s();!(e=o.n()).done;){var s=e.value;r[s]=b(t,s)}}catch(t){o.e(t)}finally{o.f()}return r}},2753:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PoolEventType=void 0,function(t){t.initialized="initialized",t.taskCanceled="taskCanceled",t.taskCompleted="taskCompleted",t.taskFailed="taskFailed",t.taskQueued="taskQueued",t.taskQueueDrained="taskQueueDrained",t.taskStart="taskStart",t.terminated="terminated"}(n.PoolEventType||(n.PoolEventType={}))},3008:function(t,n,e){"use strict";function r(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return o(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return o(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var s=this&&this.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,a)}u((r=r.apply(t,n||[])).next())}))},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.Pool=n.Thread=n.PoolEventType=void 0;var u=a(e(9796)),c=e(9694),f=e(2137),h=e(4002),l=e(2753);Object.defineProperty(n,"PoolEventType",{enumerable:!0,get:function(){return l.PoolEventType}});var v=e(906);Object.defineProperty(n,"Thread",{enumerable:!0,get:function(){return v.Thread}});var d=1;function p(t){return new Promise((function(n){return setTimeout(n,t)}))}function y(t,n){return t.reduce((function(t,e){return[].concat(i(t),i(n(e)))}),[])}var m=function(){function t(n,e){var r=this;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.eventSubject=new c.Subject,this.initErrors=[],this.isClosing=!1,this.nextTaskID=1,this.taskQueue=[];var i="number"==typeof e?{size:e}:e||{},o=i.size,s=void 0===o?h.defaultPoolSize:o;this.debug=u.default("threads:pool:".concat((i.name||String(d++)).replace(/\W/g," ").trim().replace(/\s+/g,"-"))),this.options=i,this.workers=function(t,n){return function(t){for(var n=[],e=0;e<t;e++)n.push(e);return n}(n).map((function(){return{init:t(),runningTasks:[]}}))}(n,s),this.eventObservable=c.multicast(c.Observable.from(this.eventSubject)),Promise.all(this.workers.map((function(t){return t.init}))).then((function(){return r.eventSubject.next({type:l.PoolEventType.initialized,size:r.workers.length})}),(function(t){r.debug("Error while initializing pool worker:",t),r.eventSubject.error(t),r.initErrors.push(t)}))}var n,e,o;return n=t,(e=[{key:"findIdlingWorker",value:function(){var t=this.options.concurrency,n=void 0===t?1:t;return this.workers.find((function(t){return t.runningTasks.length<n}))}},{key:"runPoolTask",value:function(t,n){return s(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.workers.indexOf(t)+1,this.debug("Running task #".concat(n.id," on worker #").concat(r,"...")),this.eventSubject.next({type:l.PoolEventType.taskStart,taskID:n.id,workerID:r}),e.prev=3,e.t0=n,e.next=7,t.init;case 7:return e.t1=e.sent,e.next=10,e.t0.run.call(e.t0,e.t1);case 10:i=e.sent,this.debug("Task #".concat(n.id," completed successfully")),this.eventSubject.next({type:l.PoolEventType.taskCompleted,returnValue:i,taskID:n.id,workerID:r}),e.next=19;break;case 15:e.prev=15,e.t2=e.catch(3),this.debug("Task #".concat(n.id," failed")),this.eventSubject.next({type:l.PoolEventType.taskFailed,taskID:n.id,error:e.t2,workerID:r});case 19:case"end":return e.stop()}}),e,this,[[3,15]])})))}},{key:"run",value:function(t,n){return s(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=s(i,void 0,void 0,regeneratorRuntime.mark((function e(){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=function(){t.runningTasks=t.runningTasks.filter((function(t){return t!==r}))},e.next=3,p(0);case 3:return e.prev=3,e.next=6,this.runPoolTask(t,n);case 6:return e.prev=6,i(),this.isClosing||this.scheduleWork(),e.finish(6);case 10:case"end":return e.stop()}}),e,this,[[3,,6,10]])}))),t.runningTasks.push(r);case 2:case"end":return e.stop()}}),e)})))}},{key:"scheduleWork",value:function(){this.debug("Attempt de-queueing a task in order to run it...");var t=this.findIdlingWorker();if(t){var n=this.taskQueue.shift();if(!n)return this.debug("Task queue is empty"),void this.eventSubject.next({type:l.PoolEventType.taskQueueDrained});this.run(t,n)}}},{key:"taskCompletion",value:function(t){var n=this;return new Promise((function(e,r){var i=n.events().subscribe((function(n){n.type===l.PoolEventType.taskCompleted&&n.taskID===t?(i.unsubscribe(),e(n.returnValue)):n.type===l.PoolEventType.taskFailed&&n.taskID===t?(i.unsubscribe(),r(n.error)):n.type===l.PoolEventType.terminated&&(i.unsubscribe(),r(Error("Pool has been terminated before task was run.")))}))}))}},{key:"settled",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return s(this,void 0,void 0,regeneratorRuntime.mark((function n(){var e,r,i,o=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e=function(){return y(o.workers,(function(t){return t.runningTasks}))},r=[],i=this.eventObservable.subscribe((function(t){t.type===l.PoolEventType.taskFailed&&r.push(t.error)})),!(this.initErrors.length>0)){n.next=5;break}return n.abrupt("return",Promise.reject(this.initErrors[0]));case 5:if(!t||0!==this.taskQueue.length){n.next=9;break}return n.next=8,f.allSettled(e());case 8:return n.abrupt("return",r);case 9:return n.next=11,new Promise((function(t,n){var e=o.eventObservable.subscribe({next:function(n){n.type===l.PoolEventType.taskQueueDrained&&(e.unsubscribe(),t(void 0))},error:n})}));case 11:return n.next=13,f.allSettled(e());case 13:return i.unsubscribe(),n.abrupt("return",r);case 15:case"end":return n.stop()}}),n,this)})))}},{key:"completed",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return s(this,void 0,void 0,regeneratorRuntime.mark((function n(){var e,r,i,o=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=this.settled(t),r=new Promise((function(t,n){var r=o.eventObservable.subscribe({next:function(i){i.type===l.PoolEventType.taskQueueDrained?(r.unsubscribe(),t(e)):i.type===l.PoolEventType.taskFailed&&(r.unsubscribe(),n(i.error))},error:n})})),n.next=4,Promise.race([e,r]);case 4:if(!((i=n.sent).length>0)){n.next=7;break}throw i[0];case 7:case"end":return n.stop()}}),n,this)})))}},{key:"events",value:function(){return this.eventObservable}},{key:"queue",value:function(t){var n=this,e=this.options.maxQueuedJobs,r=void 0===e?1/0:e;if(this.isClosing)throw Error("Cannot schedule pool tasks after terminate() has been called.");if(this.initErrors.length>0)throw this.initErrors[0];var i=this.nextTaskID++,o=this.taskCompletion(i);o.catch((function(t){n.debug("Task #".concat(i," errored:"),t)}));var s={id:i,run:t,cancel:function(){-1!==n.taskQueue.indexOf(s)&&(n.taskQueue=n.taskQueue.filter((function(t){return t!==s})),n.eventSubject.next({type:l.PoolEventType.taskCanceled,taskID:s.id}))},then:o.then.bind(o)};if(this.taskQueue.length>=r)throw Error("Maximum number of pool tasks queued. Refusing to queue another one.\nThis usually happens for one of two reasons: We are either at peak workload right now or some tasks just won't finish, thus blocking the pool.");return this.debug("Queueing task #".concat(s.id,"...")),this.taskQueue.push(s),this.eventSubject.next({type:l.PoolEventType.taskQueued,taskID:s.id}),this.scheduleWork(),s}},{key:"terminate",value:function(t){return s(this,void 0,void 0,regeneratorRuntime.mark((function n(){var e=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.isClosing=!0,t){n.next=4;break}return n.next=4,this.completed(!0);case 4:return this.eventSubject.next({type:l.PoolEventType.terminated,remainingQueue:i(this.taskQueue)}),this.eventSubject.complete(),n.next=8,Promise.all(this.workers.map((function(t){return s(e,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=v.Thread,n.next=3,t.init;case 3:return n.t1=n.sent,n.abrupt("return",n.t0.terminate.call(n.t0,n.t1));case 5:case"end":return n.stop()}}),n)})))})));case 8:case"end":return n.stop()}}),n,this)})))}}])&&r(n.prototype,e),o&&r(n,o),Object.defineProperty(n,"prototype",{writable:!1}),t}();function b(t,n){return new m(t,n)}m.EventType=l.PoolEventType,b.EventType=l.PoolEventType,n.Pool=b},5441:function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function i(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw i}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return o(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return o(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var s=this&&this.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,a)}u((r=r.apply(t,n||[])).next())}))},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.spawn=void 0;var u=a(e(9796)),c=e(9694),f=e(2335),h=e(2981),l=e(6277),v=e(6439),d=e(943),p=u.default("threads:master:messages"),y=u.default("threads:master:spawn"),m=u.default("threads:master:thread-utils"),b="undefined"!=typeof process&&process.env.THREADS_WORKER_INIT_TIMEOUT?Number.parseInt(process.env.THREADS_WORKER_INIT_TIMEOUT,10):1e4;function w(t,n,e){return s(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,s;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=new Promise((function(t,r){i=setTimeout((function(){return r(Error(e))}),n)})),r.next=3,Promise.race([t,o]);case 3:return s=r.sent,clearTimeout(i),r.abrupt("return",s);case 6:case"end":return r.stop()}}),r)})))}function g(t){return new Promise((function(n,e){t.addEventListener("message",(function r(i){var o;p("Message from worker before finishing initialization:",i.data),(o=i.data)&&"init"===o.type?(t.removeEventListener("message",r),n(i.data)):function(t){return t&&"uncaughtError"===t.type}(i.data)&&(t.removeEventListener("message",r),e(f.deserialize(i.data.error)))}))}))}function x(t,n){return new c.Observable((function(e){var r=function(t){var n={type:v.WorkerEventType.message,data:t.data};e.next(n)},i=function(t){m("Unhandled promise rejection event in thread:",t);var n={type:v.WorkerEventType.internalError,error:Error(t.reason)};e.next(n)};t.addEventListener("message",r),t.addEventListener("unhandledrejection",i),n.then((function(){var n={type:v.WorkerEventType.termination};t.removeEventListener("message",r),t.removeEventListener("unhandledrejection",i),e.next(n),e.complete()}))}))}function k(t){var n=this,e=i(h.createPromiseWithResolver(),2),r=e[0],o=e[1];return{terminate:function(){return s(n,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return m("Terminating worker"),n.next=3,t.terminate();case 3:o();case 4:case"end":return n.stop()}}),n)})))},termination:r}}function _(t,n,e,i){var o,s=e.filter((function(t){return t.type===v.WorkerEventType.internalError})).map((function(t){return t.error}));return Object.assign(t,(r(o={},l.$errors,s),r(o,l.$events,e),r(o,l.$terminate,i),r(o,l.$worker,n),o))}n.spawn=function(t,n){return s(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,i,o,s,a,u,c,f,h,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y("Initializing new thread"),r=n&&n.timeout?n.timeout:b,e.next=4,w(g(t),r,"Timeout: Did not receive an init message from worker after ".concat(r,"ms. Make sure the worker calls expose()."));case 4:if(i=e.sent,o=i.exposed,s=k(t),a=s.termination,u=s.terminate,c=x(t,a),"function"!==o.type){e.next=13;break}return f=d.createProxyFunction(t),e.abrupt("return",_(f,t,c,u));case 13:if("module"!==o.type){e.next=18;break}return h=d.createProxyModule(t,o.methods),e.abrupt("return",_(h,t,c,u));case 18:throw l=o.type,Error("Worker init message states unexpected type of expose(): ".concat(l));case 20:case"end":return e.stop()}}),e)})))}},906:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Thread=void 0;var r=e(6277);function i(t){throw Error(t)}n.Thread={errors:function(t){return t[r.$errors]||i("Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")},events:function(t){return t[r.$events]||i("Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")},terminate:function(t){return t[r.$terminate]()}}},4455:function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=function(t,n){if(!t)return;if("string"==typeof t)return o(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return o(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,s=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw s}}}}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function s(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,n,e){var r=u(t,n);if(r){var i=Object.getOwnPropertyDescriptor(r,n);return i.get?i.get.call(arguments.length<3?t:e):i.value}}).apply(this,arguments)}function u(t,n){for(;!Object.prototype.hasOwnProperty.call(t,n)&&null!==(t=v(t)););return t}function c(t,n){return(c=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function f(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=v(t);if(n){var i=v(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return h(this,e)}}function h(t,n){if(n&&("object"===r(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.ObservablePromise=void 0;var d=e(9694),p=function(){},y=function(t){return t},m=function(t){return Promise.resolve().then(t)};function b(t){throw t}var w=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&c(t,n)}(u,t);var n,e,r,o=f(u);function u(t){var n;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,u),(n=o.call(this,(function(e){var r=l(n),i=Object.assign(Object.assign({},e),{complete:function(){e.complete(),r.onCompletion()},error:function(t){e.error(t),r.onError(t)},next:function(t){e.next(t),r.onNext(t)}});try{return n.initHasRun=!0,t(i)}catch(t){i.error(t)}}))).initHasRun=!1,n.fulfillmentCallbacks=[],n.rejectionCallbacks=[],n.firstValueSet=!1,n.state="pending",n}return n=u,r=[{key:"from",value:function(t){return function(t){return t&&"function"==typeof t.then}(t)?new u((function(n){t.then((function(t){n.next(t),n.complete()}),(function(t){n.error(t)}))})):a(v(u),"from",this).call(this,t)}}],(e=[{key:"onNext",value:function(t){this.firstValueSet||(this.firstValue=t,this.firstValueSet=!0)}},{key:"onError",value:function(t){this.state="rejected",this.rejection=t;var n,e=i(this.rejectionCallbacks);try{var r=function(){var e=n.value;m((function(){return e(t)}))};for(e.s();!(n=e.n()).done;)r()}catch(t){e.e(t)}finally{e.f()}}},{key:"onCompletion",value:function(){var t=this;this.state="fulfilled";var n,e=i(this.fulfillmentCallbacks);try{var r=function(){var e=n.value;m((function(){return e(t.firstValue)}))};for(e.s();!(n=e.n()).done;)r()}catch(t){e.e(t)}finally{e.f()}}},{key:"then",value:function(t,n){var e=this,r=t||y,i=n||b,o=!1;return new Promise((function(t,n){var s=function(e){if(!o){o=!0;try{t(i(e))}catch(t){n(t)}}};return e.initHasRun||e.subscribe({error:s}),"fulfilled"===e.state?t(r(e.firstValue)):"rejected"===e.state?(o=!0,t(i(e.rejection))):(e.fulfillmentCallbacks.push((function(n){try{t(r(n))}catch(t){s(t)}})),void e.rejectionCallbacks.push(s))}))}},{key:"catch",value:function(t){return this.then(void 0,t)}},{key:"finally",value:function(t){var n=t||p;return this.then((function(t){return n(),t}),(function(){return n()}))}}])&&s(n.prototype,e),r&&s(n,r),Object.defineProperty(n,"prototype",{writable:!1}),u}(d.Observable);n.ObservablePromise=w},2137:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.allSettled=void 0,n.allSettled=function(t){return Promise.all(t.map((function(t){var n=Promise.resolve(t);try{return n.then((function(t){return{status:"fulfilled",value:t}}),(function(t){return{status:"rejected",reason:t}}))}catch(t){return Promise.reject(t)}})))}},2981:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createPromiseWithResolver=void 0;var e=function(){};n.createPromiseWithResolver=function(){var t,n=!1,r=e;return[new Promise((function(e){n?e(t):r=e})),function(e){n=!0,r(t=e)}]}},9713:function(t,n){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.DefaultSerializer=n.extendSerializer=void 0,n.extendSerializer=function(t,n){var e=t.deserialize.bind(t),r=t.serialize.bind(t);return{deserialize:function(t){return n.deserialize(t,e)},serialize:function(t){return n.serialize(t,r)}}};var r=function(t){return Object.assign(Error(t.message),{name:t.name,stack:t.stack})},i=function(t){return{__error_marker:"$$error",message:t.message,name:t.name,stack:t.stack}};n.DefaultSerializer={deserialize:function(t){return(n=t)&&"object"===e(n)&&"__error_marker"in n&&"$$error"===n.__error_marker?r(t):t;var n},serialize:function(t){return t instanceof Error?i(t):t}}},6277:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$worker=n.$transferable=n.$terminate=n.$events=n.$errors=void 0,n.$errors=Symbol("thread.errors"),n.$events=Symbol("thread.events"),n.$terminate=Symbol("thread.terminate"),n.$transferable=Symbol("thread.transferable"),n.$worker=Symbol("thread.worker")},6126:function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.Transfer=n.isTransferDescriptor=void 0;var o=e(6277);n.isTransferDescriptor=function(t){return t&&"object"===i(t)&&t[o.$transferable]},n.Transfer=function(t,n){var e,s;if(!n){if(!(s=t)||"object"!==i(s))throw Error();n=[t]}return r(e={},o.$transferable,!0),r(e,"send",t),r(e,"transferables",n),e}},6439:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WorkerEventType=void 0;e(6277);!function(t){t.internalError="internalError",t.message="message",t.termination="termination"}(n.WorkerEventType||(n.WorkerEventType={}))},8453:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WorkerMessageType=n.MasterMessageType=void 0,function(t){t.cancel="cancel",t.run="run"}(n.MasterMessageType||(n.MasterMessageType={})),function(t){t.error="error",t.init="init",t.result="result",t.running="running",t.uncaughtError="uncaughtError"}(n.WorkerMessageType||(n.WorkerMessageType={}))},2257:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default={isWorkerRuntime:function(){var t="undefined"!=typeof self&&"undefined"!=typeof Window&&self instanceof Window;return!("undefined"==typeof self||!self.postMessage||t)},postMessageToMaster:function(t,n){self.postMessage(t,n)},subscribeToMasterMessages:function(t){var n=function(n){t(n.data)};return self.addEventListener("message",n),function(){self.removeEventListener("message",n)}}}},1459:function(t,n,e){"use strict";function r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return i(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=this&&this.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,a)}u((r=r.apply(t,n||[])).next())}))},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.expose=n.isWorkerRuntime=n.Transfer=n.registerSerializer=void 0;var u=a(e(152)),c=e(2335),f=e(6126),h=e(8453),l=a(e(2257)),v=e(2335);Object.defineProperty(n,"registerSerializer",{enumerable:!0,get:function(){return v.registerSerializer}});var d=e(6126);Object.defineProperty(n,"Transfer",{enumerable:!0,get:function(){return d.Transfer}}),n.isWorkerRuntime=l.default.isWorkerRuntime;var p=!1,y=new Map,m=function(t){return t&&t.type===h.MasterMessageType.run},b=function(t){return u.default(t)||function(t){return t&&"object"===o(t)&&"function"==typeof t.subscribe}(t)};function w(t){return f.isTransferDescriptor(t)?{payload:t.send,transferables:t.transferables}:{payload:t,transferables:void 0}}function g(t,n){var e=w(n),r=e.payload,i=e.transferables,o={type:h.WorkerMessageType.error,uid:t,error:c.serialize(r)};l.default.postMessageToMaster(o,i)}function x(t,n,e){var r=w(e),i=r.payload,o=r.transferables,s={type:h.WorkerMessageType.result,uid:t,complete:!!n||void 0,payload:i};l.default.postMessageToMaster(s,o)}function k(t,n){var e={type:h.WorkerMessageType.running,uid:t,resultType:n};l.default.postMessageToMaster(e)}function _(t){try{var n={type:h.WorkerMessageType.uncaughtError,error:c.serialize(t)};l.default.postMessageToMaster(n)}catch(n){console.error("Not reporting uncaught error back to master thread as it occured while reporting an uncaught error already.\nLatest error:",n,"\nOriginal error:",t)}}function S(t,n,e){return s(this,void 0,void 0,regeneratorRuntime.mark((function i(){var o,s,a,u;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:i.prev=0,o=n.apply(void 0,r(e)),i.next=7;break;case 4:return i.prev=4,i.t0=i.catch(0),i.abrupt("return",g(t,i.t0));case 7:if(s=b(o)?"observable":"promise",k(t,s),!b(o)){i.next=14;break}a=o.subscribe((function(n){return x(t,!1,c.serialize(n))}),(function(n){g(t,c.serialize(n)),y.delete(t)}),(function(){x(t,!0),y.delete(t)})),y.set(t,a),i.next=24;break;case 14:return i.prev=14,i.next=17,o;case 17:u=i.sent,x(t,!0,c.serialize(u)),i.next=24;break;case 21:i.prev=21,i.t1=i.catch(14),g(t,c.serialize(i.t1));case 24:case"end":return i.stop()}}),i,null,[[0,4],[14,21]])})))}n.expose=function(t){if(!l.default.isWorkerRuntime())throw Error("expose() called in the master thread.");if(p)throw Error("expose() called more than once. This is not possible. Pass an object to expose() if you want to expose multiple functions.");if(p=!0,"function"==typeof t)l.default.subscribeToMasterMessages((function(n){m(n)&&!n.method&&S(n.uid,t,n.args.map(c.deserialize))})),n={type:h.WorkerMessageType.init,exposed:{type:"function"}},l.default.postMessageToMaster(n);else{if("object"!==o(t)||!t)throw Error("Invalid argument passed to expose(). Expected a function or an object, got: ".concat(t));l.default.subscribeToMasterMessages((function(n){m(n)&&n.method&&S(n.uid,t[n.method],n.args.map(c.deserialize))})),function(t){var n={type:h.WorkerMessageType.init,exposed:{type:"module",methods:t}};l.default.postMessageToMaster(n)}(Object.keys(t).filter((function(n){return"function"==typeof t[n]})))}var n;l.default.subscribeToMasterMessages((function(t){if((r=t)&&r.type===h.MasterMessageType.cancel){var n=t.uid,e=y.get(n);e&&(e.unsubscribe(),y.delete(n))}var r}))},"undefined"!=typeof self&&"function"==typeof self.addEventListener&&l.default.isWorkerRuntime()&&(self.addEventListener("error",(function(t){setTimeout((function(){return _(t.error||t)}),250)})),self.addEventListener("unhandledrejection",(function(t){var n=t.reason;n&&"string"==typeof n.message&&setTimeout((function(){return _(n)}),250)}))),"undefined"!=typeof process&&"function"==typeof process.on&&l.default.isWorkerRuntime()&&(process.on("uncaughtException",(function(t){setTimeout((function(){return _(t)}),250)})),process.on("unhandledRejection",(function(t){t&&"string"==typeof t.message&&setTimeout((function(){return _(t)}),250)})))},8338:function(t){(function(){var n;t.exports={icon:"icons/google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return n},getLink:function(t){return"https://fonts.google.com/specimen/"+t.replace(/( )/g,"+")},normalizeName:function(t){return t}},n=["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata","Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","Mystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"]}).call(this)},617:function(t,n,e){var r=e(9279);t.exports=function(t,n,e){var i=e&&e.debug||!1,o=e&&e.startIndex||0;i&&console.log("starting findTagByName with",n," and ",e);var s=r(t,"<".concat(n,"[ >]"),o);if(i&&console.log("start:",s),-1!==s){var a=t.slice(s+n.length),u=r(a,"[ /]"+n+">",0),c=-1===u;c&&(u=r(a,"[ /]>",0));var f=s+n.length+u+1+(c?0:n.length)+1;if(i&&console.log("end:",f),-1!==f){var h=t.slice(s,f);return{inner:c?null:h.slice(h.indexOf(">")+1,h.lastIndexOf("<")),outer:h,start:s,end:f}}}}},5051:function(t,n,e){var r=e(617);t.exports=function(t,n,e){for(var i,o=[],s=e&&e.debug||!1,a=e&&e.startIndex||0;i=r(t,n,{debug:s,startIndex:a});)a=i.end,o.push(i);return s&&console.log("findTagsByName found",o.length,"tags"),o}},5802:function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t,e,r){var i=r&&r.debug||!1;i&&console.log("getting "+e+" in "+t);var o="object"===n(t)?t.outer:t,s="".concat(e,'\\="([^"]*)"');i&&console.log("pattern:",s);var a=new RegExp(s).exec(o);if(i&&console.log("match:",a),a)return a[1]}},9279:function(t){t.exports=function(t,n,e){var r=new RegExp(n).exec(t.slice(e));return r?e+r.index:-1}},8518:function(t){"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.head;case 1:if(!n){t.next=7;break}return t.next=4,n.value;case 4:n=n.next,t.next=1;break;case 7:case"end":return t.stop()}}),t,this)}))}},8692:function(t,n,e){"use strict";function r(t){var n=this;if(n instanceof r||(n=new r),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach((function(t){n.push(t)}));else if(arguments.length>0)for(var e=0,i=arguments.length;e<i;e++)n.push(arguments[e]);return n}function i(t,n,e){var r=n===t.head?new a(e,null,n,t):new a(e,n,n.next,t);return null===r.next&&(t.tail=r),null===r.prev&&(t.head=r),t.length++,r}function o(t,n){t.tail=new a(n,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function s(t,n){t.head=new a(n,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function a(t,n,e,r){if(!(this instanceof a))return new a(t,n,e,r);this.list=r,this.value=t,n?(n.next=this,this.prev=n):this.prev=null,e?(e.prev=this,this.next=e):this.next=null}t.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var n=t.next,e=t.prev;return n&&(n.prev=e),e&&(e.next=n),t===this.head&&(this.head=n),t===this.tail&&(this.tail=e),t.list.length--,t.next=null,t.prev=null,t.list=null,n},r.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var n=this.head;t.list=this,t.next=n,n&&(n.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},r.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var n=this.tail;t.list=this,t.prev=n,n&&(n.next=t),this.tail=t,this.head||(this.head=t),this.length++}},r.prototype.push=function(){for(var t=0,n=arguments.length;t<n;t++)o(this,arguments[t]);return this.length},r.prototype.unshift=function(){for(var t=0,n=arguments.length;t<n;t++)s(this,arguments[t]);return this.length},r.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},r.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},r.prototype.forEach=function(t,n){n=n||this;for(var e=this.head,r=0;null!==e;r++)t.call(n,e.value,r,this),e=e.next},r.prototype.forEachReverse=function(t,n){n=n||this;for(var e=this.tail,r=this.length-1;null!==e;r--)t.call(n,e.value,r,this),e=e.prev},r.prototype.get=function(t){for(var n=0,e=this.head;null!==e&&n<t;n++)e=e.next;if(n===t&&null!==e)return e.value},r.prototype.getReverse=function(t){for(var n=0,e=this.tail;null!==e&&n<t;n++)e=e.prev;if(n===t&&null!==e)return e.value},r.prototype.map=function(t,n){n=n||this;for(var e=new r,i=this.head;null!==i;)e.push(t.call(n,i.value,this)),i=i.next;return e},r.prototype.mapReverse=function(t,n){n=n||this;for(var e=new r,i=this.tail;null!==i;)e.push(t.call(n,i.value,this)),i=i.prev;return e},r.prototype.reduce=function(t,n){var e,r=this.head;if(arguments.length>1)e=n;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,e=this.head.value}for(var i=0;null!==r;i++)e=t(e,r.value,i),r=r.next;return e},r.prototype.reduceReverse=function(t,n){var e,r=this.tail;if(arguments.length>1)e=n;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,e=this.tail.value}for(var i=this.length-1;null!==r;i--)e=t(e,r.value,i),r=r.prev;return e},r.prototype.toArray=function(){for(var t=new Array(this.length),n=0,e=this.head;null!==e;n++)t[n]=e.value,e=e.next;return t},r.prototype.toArrayReverse=function(){for(var t=new Array(this.length),n=0,e=this.tail;null!==e;n++)t[n]=e.value,e=e.prev;return t},r.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var e=new r;if(n<t||n<0)return e;t<0&&(t=0),n>this.length&&(n=this.length);for(var i=0,o=this.head;null!==o&&i<t;i++)o=o.next;for(;null!==o&&i<n;i++,o=o.next)e.push(o.value);return e},r.prototype.sliceReverse=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var e=new r;if(n<t||n<0)return e;t<0&&(t=0),n>this.length&&(n=this.length);for(var i=this.length,o=this.tail;null!==o&&i>n;i--)o=o.prev;for(;null!==o&&i>t;i--,o=o.prev)e.push(o.value);return e},r.prototype.splice=function(t,n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var e=0,r=this.head;null!==r&&e<t;e++)r=r.next;var o=[];for(e=0;r&&e<n;e++)o.push(r.value),r=this.removeNode(r);null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev);for(e=0;e<(arguments.length<=2?0:arguments.length-2);e++)r=i(this,r,e+2<2||arguments.length<=e+2?void 0:arguments[e+2]);return o},r.prototype.reverse=function(){for(var t=this.head,n=this.tail,e=t;null!==e;e=e.prev){var r=e.prev;e.prev=e.next,e.next=r}return this.head=n,this.tail=t,this};try{e(8518)(r)}catch(t){}},1555:function(){},2913:function(){},8419:function(){},2618:function(t,n,e){"use strict";function r(){return function(){throw new Error("Unimplemented abstract method.")}()}e.d(n,{default:function(){return gL}});var i=0;function o(t){return t.ol_uid||(t.ol_uid=String(++i))}var s,a="6.12.0",u=(s=function(t,n){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}s(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),c=function(t){function n(n){var e=this,r="Assertion failed. See https://openlayers.org/en/"+("v"+a.split("-")[0])+"/doc/errors/#"+n+" for details.";return(e=t.call(this,r)||this).code=n,e.name="AssertionError",e.message=r,e}return u(n,t),n}(Error);function f(t){t.stopPropagation()}var h=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}(),l="propertychange",v=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function d(t,n,e){for(var r,i,o=e||p,s=0,a=t.length,u=!1;s<a;)(i=+o(t[r=s+(a-s>>1)],n))<0?s=r+1:(a=r,u=!i);return u?s:~s}function p(t,n){return t>n?1:t<n?-1:0}function y(t,n){return t.indexOf(n)>=0}function m(t,n,e){var r=t.length;if(t[0]<=n)return 0;if(n<=t[r-1])return r-1;var i=void 0;if(e>0){for(i=1;i<r;++i)if(t[i]<n)return i-1}else if(e<0){for(i=1;i<r;++i)if(t[i]<=n)return i}else for(i=1;i<r;++i){if(t[i]==n)return i;if(t[i]<n)return"function"==typeof e?e(n,t[i-1],t[i])>0?i-1:i:t[i-1]-n<n-t[i]?i-1:i}return r-1}function b(t,n,e){for(;n<e;){var r=t[n];t[n]=t[e],t[e]=r,++n,--e}}function w(t,n){for(var e=Array.isArray(n)?n:[n],r=e.length,i=0;i<r;i++)t[t.length]=e[i]}function g(t,n){for(var e,r=t.length>>>0,i=0;i<r;i++)if(n(e=t[i],i,t))return e;return null}function x(t,n){var e=t.length;if(e!==n.length)return!1;for(var r=0;r<e;r++)if(t[r]!==n[r])return!1;return!0}function k(t,n){var e;return!t.every((function(r,i){return e=i,!n(r,i,t)}))?e:-1}function _(t,n,e){var r=n||p;return t.every((function(n,i){if(0===i)return!0;var o=r(t[i-1],n);return!(o>0||e&&0===o)}))}function S(){return!0}function M(){return!1}function j(){}function O(t){var n,e,r,i=!1;return function(){var o=Array.prototype.slice.call(arguments);return i&&this===r&&x(o,e)||(i=!0,r=this,e=o,n=t.apply(this,arguments)),n}}function T(t){return function(){var n;try{n=t()}catch(t){return Promise.reject(t)}return n instanceof Promise?n:Promise.resolve(n)}()}var E="function"==typeof Object.assign?Object.assign:function(t,n){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1,i=arguments.length;r<i;++r){var o=arguments[r];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(e[s]=o[s])}return e};function A(t){for(var n in t)delete t[n]}var C="function"==typeof Object.values?Object.values:function(t){var n=[];for(var e in t)n.push(t[e]);return n};function R(t){var n;for(n in t)return!1;return!n}var I=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),P=function(t){function n(n){var e=t.call(this)||this;return e.t=n,e._=null,e.S=null,e.O=null,e}return I(n,t),n.prototype.addEventListener=function(t,n){if(t&&n){var e=this.O||(this.O={}),r=e[t]||(e[t]=[]);-1===r.indexOf(n)&&r.push(n)}},n.prototype.dispatchEvent=function(t){var n="string"==typeof t?new h(t):t,e=n.type;n.target||(n.target=this.t||this);var r,i=this.O&&this.O[e];if(i){var o=this.S||(this.S={}),s=this._||(this._={});e in o||(o[e]=0,s[e]=0),++o[e];for(var a=0,u=i.length;a<u;++a)if(!1===(r="handleEvent"in i[a]?i[a].handleEvent(n):i[a].call(this,n))||n.propagationStopped){r=!1;break}if(--o[e],0===o[e]){var c=s[e];for(delete s[e];c--;)this.removeEventListener(e,j);delete o[e]}return r}},n.prototype.disposeInternal=function(){this.O&&A(this.O)},n.prototype.getListeners=function(t){return this.O&&this.O[t]||void 0},n.prototype.hasListener=function(t){return!!this.O&&(t?t in this.O:Object.keys(this.O).length>0)},n.prototype.removeEventListener=function(t,n){var e=this.O&&this.O[t];if(e){var r=e.indexOf(n);-1!==r&&(this._&&t in this._?(e[r]=j,++this._[t]):(e.splice(r,1),0===e.length&&delete this.O[t]))}},n}(v),D="change",N="error",z="clear",L="contextmenu",F="click",G="dblclick",U="dragenter",B="dragover",q="drop",$="keydown",V="keypress",Z="load",W="resize",H="touchmove",K="wheel";function X(t,n,e,r,i){if(r&&r!==t&&(e=e.bind(r)),i){var o=e;e=function(){t.removeEventListener(n,e),o.apply(this,arguments)}}var s={target:t,type:n,listener:e};return t.addEventListener(n,e),s}function Y(t,n,e,r){return X(t,n,e,r,!0)}function J(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),A(t))}var Q=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),tt=function(t){function n(){var n=t.call(this)||this;return n.on=n.onInternal,n.once=n.onceInternal,n.un=n.unInternal,n.T=0,n}return Q(n,t),n.prototype.changed=function(){++this.T,this.dispatchEvent(D)},n.prototype.getRevision=function(){return this.T},n.prototype.onInternal=function(t,n){if(Array.isArray(t)){for(var e=t.length,r=new Array(e),i=0;i<e;++i)r[i]=X(this,t[i],n);return r}return X(this,t,n)},n.prototype.onceInternal=function(t,n){var e;if(Array.isArray(t)){var r=t.length;e=new Array(r);for(var i=0;i<r;++i)e[i]=Y(this,t[i],n)}else e=Y(this,t,n);return n.ol_key=e,e},n.prototype.unInternal=function(t,n){var e=n.ol_key;if(e)nt(e);else if(Array.isArray(t))for(var r=0,i=t.length;r<i;++r)this.removeEventListener(t[r],n);else this.removeEventListener(t,n)},n}(P);function nt(t){if(Array.isArray(t))for(var n=0,e=t.length;n<e;++n)J(t[n]);else J(t)}tt.prototype.on,tt.prototype.once,tt.prototype.un;var et=tt,rt=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),it=function(t){function n(n,e,r){var i=t.call(this,n)||this;return i.key=e,i.oldValue=r,i}return rt(n,t),n}(h),ot=function(t){function n(n){var e=t.call(this)||this;return e.on,e.once,e.un,o(e),e.A=null,void 0!==n&&e.setProperties(n),e}return rt(n,t),n.prototype.get=function(t){var n;return this.A&&this.A.hasOwnProperty(t)&&(n=this.A[t]),n},n.prototype.getKeys=function(){return this.A&&Object.keys(this.A)||[]},n.prototype.getProperties=function(){return this.A&&E({},this.A)||{}},n.prototype.hasProperties=function(){return!!this.A},n.prototype.notify=function(t,n){var e;e="change:"+t,this.dispatchEvent(new it(e,t,n)),e=l,this.dispatchEvent(new it(e,t,n))},n.prototype.addChangeListener=function(t,n){this.addEventListener("change:"+t,n)},n.prototype.removeChangeListener=function(t,n){this.removeEventListener("change:"+t,n)},n.prototype.set=function(t,n,e){var r=this.A||(this.A={});if(e)r[t]=n;else{var i=r[t];r[t]=n,i!==n&&this.notify(t,i)}},n.prototype.setProperties=function(t,n){for(var e in t)this.set(e,t[e],n)},n.prototype.applyProperties=function(t){t.A&&E(this.A||(this.A={}),t.A)},n.prototype.unset=function(t,n){if(this.A&&t in this.A){var e=this.A[t];delete this.A[t],R(this.A)&&(this.A=null),n||this.notify(t,e)}},n}(et),st="add",at="remove",ut=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ct="length",ft=function(t){function n(n,e,r){var i=t.call(this,n)||this;return i.element=e,i.index=r,i}return ut(n,t),n}(h),ht=function(t){function n(n,e){var r=t.call(this)||this;r.on,r.once,r.un;var i=e||{};if(r.C=!!i.unique,r.R=n||[],r.C)for(var o=0,s=r.R.length;o<s;++o)r.P(r.R[o],o);return r.D(),r}return ut(n,t),n.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},n.prototype.extend=function(t){for(var n=0,e=t.length;n<e;++n)this.push(t[n]);return this},n.prototype.forEach=function(t){for(var n=this.R,e=0,r=n.length;e<r;++e)t(n[e],e,n)},n.prototype.getArray=function(){return this.R},n.prototype.item=function(t){return this.R[t]},n.prototype.getLength=function(){return this.get(ct)},n.prototype.insertAt=function(t,n){this.C&&this.P(n),this.R.splice(t,0,n),this.D(),this.dispatchEvent(new ft(st,n,t))},n.prototype.pop=function(){return this.removeAt(this.getLength()-1)},n.prototype.push=function(t){this.C&&this.P(t);var n=this.getLength();return this.insertAt(n,t),this.getLength()},n.prototype.remove=function(t){for(var n=this.R,e=0,r=n.length;e<r;++e)if(n[e]===t)return this.removeAt(e)},n.prototype.removeAt=function(t){var n=this.R[t];return this.R.splice(t,1),this.D(),this.dispatchEvent(new ft(at,n,t)),n},n.prototype.setAt=function(t,n){var e=this.getLength();if(t<e){this.C&&this.P(n,t);var r=this.R[t];this.R[t]=n,this.dispatchEvent(new ft(at,r,t)),this.dispatchEvent(new ft(st,n,t))}else{for(var i=e;i<t;++i)this.insertAt(i,void 0);this.insertAt(t,n)}},n.prototype.D=function(){this.set(ct,this.R.length)},n.prototype.P=function(t,n){for(var e=0,r=this.R.length;e<r;++e)if(this.R[e]===t&&e!==n)throw new c(58)},n}(ot),lt=0,vt=1,dt=2,pt=3,yt=4;function mt(t){return Math.pow(t,3)}function bt(t){return 1-mt(1-t)}function wt(t){return 3*t*t-2*t*t*t}function gt(t){return t}var xt=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),kt=function(t){function n(n,e,r){var i=t.call(this)||this,o=r||{};return i.tileCoord=n,i.state=e,i.interimTile=null,i.key="",i.G=void 0===o.transition?250:o.transition,i.U={},i.interpolate=!!o.interpolate,i}return xt(n,t),n.prototype.changed=function(){this.dispatchEvent(D)},n.prototype.release=function(){},n.prototype.getKey=function(){return this.key+"/"+this.tileCoord},n.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==dt)return this.G=0,t;t=t.interimTile}while(t);return this},n.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,n=this;do{if(t.getState()==dt){t.interimTile=null;break}t.getState()==vt?n=t:t.getState()==lt?n.interimTile=t.interimTile:n=t,t=n.interimTile}while(t)}},n.prototype.getTileCoord=function(){return this.tileCoord},n.prototype.getState=function(){return this.state},n.prototype.setState=function(t){if(this.state!==pt&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},n.prototype.load=function(){r()},n.prototype.getAlpha=function(t,n){if(!this.G)return 1;var e=this.U[t];if(e){if(-1===e)return 1}else e=n,this.U[t]=e;var r=n-e+1e3/60;return r>=this.G?1:mt(r/this.G)},n.prototype.inTransition=function(t){return!!this.G&&-1!==this.U[t]},n.prototype.endTransition=function(t){this.G&&(this.U[t]=-1)},n}(P),_t=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),St=function(t){function n(n){var e=this,r=lt;return(e=t.call(this,n.tileCoord,r,{transition:n.transition,interpolate:n.interpolate})||this).B=n.loader,e.q=null,e.V=null,e}return _t(n,t),n.prototype.getData=function(){return this.q},n.prototype.getError=function(){return this.V},n.prototype.load=function(){this.state=vt,this.changed();var t=this;this.B().then((function(n){t.q=n,t.state=dt,t.changed()})).catch((function(n){t.V=n,t.state=pt,t.changed()}))},n}(kt);function Mt(t,n){if(!t)throw new c(n)}var jt=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function Ot(t){return"function"==typeof t?t:(Array.isArray(t)?n=t:(Mt("function"==typeof t.getZIndex,41),n=[t]),function(){return n});var n}var Tt=function(t){function n(n){var e=t.call(this)||this;if(e.on,e.once,e.un,e.W=void 0,e.H="geometry",e.K=null,e.tt=void 0,e.nt=null,e.addChangeListener(e.H,e.et),n)if("function"==typeof n.getSimplifiedGeometry){var r=n;e.setGeometry(r)}else{var i=n;e.setProperties(i)}return e}return jt(n,t),n.prototype.clone=function(){var t=new n(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var e=this.getGeometry();e&&t.setGeometry(e.clone());var r=this.getStyle();return r&&t.setStyle(r),t},n.prototype.getGeometry=function(){return this.get(this.H)},n.prototype.getId=function(){return this.W},n.prototype.getGeometryName=function(){return this.H},n.prototype.getStyle=function(){return this.K},n.prototype.getStyleFunction=function(){return this.tt},n.prototype.rt=function(){this.changed()},n.prototype.et=function(){this.nt&&(J(this.nt),this.nt=null);var t=this.getGeometry();t&&(this.nt=X(t,D,this.rt,this)),this.changed()},n.prototype.setGeometry=function(t){this.set(this.H,t)},n.prototype.setStyle=function(t){this.K=t,this.tt=t?Ot(t):void 0,this.changed()},n.prototype.setId=function(t){this.W=t,this.changed()},n.prototype.setGeometryName=function(t){this.removeChangeListener(this.H,this.et),this.H=t,this.addChangeListener(this.H,this.et),this.et()},n}(ot),Et="XY",At="XYZ",Ct="XYM",Rt="XYZM",It={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},Pt={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Dt={9001:Pt.METERS,9002:Pt.FEET,9003:Pt.USFEET,9101:Pt.RADIANS,9102:Pt.DEGREES};function Nt(t){return Dt[t]}var zt={};zt[Pt.RADIANS]=6370997/(2*Math.PI),zt[Pt.DEGREES]=2*Math.PI*6370997/360,zt[Pt.FEET]=.3048,zt[Pt.METERS]=1,zt[Pt.USFEET]=1200/3937;var Lt,Ft=Pt,Gt="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",Ut=-1!==Gt.indexOf("firefox"),Bt=-1!==Gt.indexOf("safari")&&-1==Gt.indexOf("chrom"),qt=-1!==Gt.indexOf("webkit")&&-1==Gt.indexOf("edge"),$t=-1!==Gt.indexOf("macintosh"),Vt="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,Zt="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,Wt="undefined"!=typeof Image&&Image.prototype.decode,Ht=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,n),window.removeEventListener("_",null,n)}catch(t){}return t}(),Kt=new Array(6);function Xt(){return[1,0,0,1,0,0]}function Yt(t){return Qt(t,1,0,0,1,0,0)}function Jt(t,n){var e=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],u=n[0],c=n[1],f=n[2],h=n[3],l=n[4],v=n[5];return t[0]=e*u+i*c,t[1]=r*u+o*c,t[2]=e*f+i*h,t[3]=r*f+o*h,t[4]=e*l+i*v+s,t[5]=r*l+o*v+a,t}function Qt(t,n,e,r,i,o,s){return t[0]=n,t[1]=e,t[2]=r,t[3]=i,t[4]=o,t[5]=s,t}function tn(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function nn(t,n){var e=n[0],r=n[1];return n[0]=t[0]*e+t[2]*r+t[4],n[1]=t[1]*e+t[3]*r+t[5],n}function en(t,n){var e=Math.cos(n),r=Math.sin(n);return Jt(t,Qt(Kt,e,r,-r,e,0,0))}function rn(t,n,e){return Jt(t,Qt(Kt,n,0,0,e,0,0))}function on(t,n,e){return Qt(t,n,0,0,e,0,0)}function sn(t,n,e){return Jt(t,Qt(Kt,1,0,0,1,n,e))}function an(t,n,e,r,i,o,s,a){var u=Math.sin(o),c=Math.cos(o);return t[0]=r*c,t[1]=i*u,t[2]=-r*u,t[3]=i*c,t[4]=s*r*c-a*r*u+n,t[5]=s*i*u+a*i*c+e,t}function un(t,n){var e=cn(n);Mt(0!==e,32);var r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],u=n[5];return t[0]=s/e,t[1]=-i/e,t[2]=-o/e,t[3]=r/e,t[4]=(o*u-s*a)/e,t[5]=-(r*u-i*a)/e,t}function cn(t){return t[0]*t[3]-t[1]*t[2]}function fn(t){var n="matrix("+t.join(", ")+")";if(Zt)return n;var e=Lt||(Lt=document.createElement("div"));return e.style.transform=n,e.style.transform}var hn="bottom-left",ln="bottom-right",vn="top-left",dn="top-right",pn=0,yn=1,mn=2,bn=4,wn=8,gn=16;function xn(t){for(var n=En(),e=0,r=t.length;e<r;++e)zn(n,t[e]);return n}function kn(t,n,e){return e?(e[0]=t[0]-n,e[1]=t[1]-n,e[2]=t[2]+n,e[3]=t[3]+n,e):[t[0]-n,t[1]-n,t[2]+n,t[3]+n]}function _n(t,n){return n?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n):t.slice()}function Sn(t,n,e){var r,i;return(r=n<t[0]?t[0]-n:t[2]<n?n-t[2]:0)*r+(i=e<t[1]?t[1]-e:t[3]<e?e-t[3]:0)*i}function Mn(t,n){return On(t,n[0],n[1])}function jn(t,n){return t[0]<=n[0]&&n[2]<=t[2]&&t[1]<=n[1]&&n[3]<=t[3]}function On(t,n,e){return t[0]<=n&&n<=t[2]&&t[1]<=e&&e<=t[3]}function Tn(t,n){var e=t[0],r=t[1],i=t[2],o=t[3],s=n[0],a=n[1],u=pn;return s<e?u|=gn:s>i&&(u|=bn),a<r?u|=wn:a>o&&(u|=mn),u===pn&&(u=yn),u}function En(){return[1/0,1/0,-1/0,-1/0]}function An(t,n,e,r,i){return i?(i[0]=t,i[1]=n,i[2]=e,i[3]=r,i):[t,n,e,r]}function Cn(t){return An(1/0,1/0,-1/0,-1/0,t)}function Rn(t,n){var e=t[0],r=t[1];return An(e,r,e,r,n)}function In(t,n,e,r,i){return Fn(Cn(i),t,n,e,r)}function Pn(t,n){return t[0]==n[0]&&t[2]==n[2]&&t[1]==n[1]&&t[3]==n[3]}function Dn(t,n,e){return Math.abs(t[0]-n[0])<e&&Math.abs(t[2]-n[2])<e&&Math.abs(t[1]-n[1])<e&&Math.abs(t[3]-n[3])<e}function Nn(t,n){return n[0]<t[0]&&(t[0]=n[0]),n[2]>t[2]&&(t[2]=n[2]),n[1]<t[1]&&(t[1]=n[1]),n[3]>t[3]&&(t[3]=n[3]),t}function zn(t,n){n[0]<t[0]&&(t[0]=n[0]),n[0]>t[2]&&(t[2]=n[0]),n[1]<t[1]&&(t[1]=n[1]),n[1]>t[3]&&(t[3]=n[1])}function Ln(t,n){for(var e=0,r=n.length;e<r;++e)zn(t,n[e]);return t}function Fn(t,n,e,r,i){for(;e<r;e+=i)Un(t,n[e],n[e+1]);return t}function Gn(t,n){for(var e=0,r=n.length;e<r;++e)Ln(t,n[e]);return t}function Un(t,n,e){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],e),t[2]=Math.max(t[2],n),t[3]=Math.max(t[3],e)}function Bn(t,n){var e;return(e=n($n(t)))||(e=n(Vn(t)))||(e=n(Jn(t)))?e:(e=n(Yn(t)))||!1}function qn(t){var n=0;return ne(t)||(n=Qn(t)*Kn(t)),n}function $n(t){return[t[0],t[1]]}function Vn(t){return[t[2],t[1]]}function Zn(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function Wn(t,n){var e;return n===hn?e=$n(t):n===ln?e=Vn(t):n===vn?e=Yn(t):n===dn?e=Jn(t):Mt(!1,13),e}function Hn(t,n,e,r,i){var o=n*r[0]/2,s=n*r[1]/2,a=Math.cos(e),u=Math.sin(e),c=o*a,f=o*u,h=s*a,l=s*u,v=t[0],d=t[1],p=v-c+l,y=v-c-l,m=v+c-l,b=v+c+l,w=d-f-h,g=d-f+h,x=d+f+h,k=d+f-h;return An(Math.min(p,y,m,b),Math.min(w,g,x,k),Math.max(p,y,m,b),Math.max(w,g,x,k),i)}function Kn(t){return t[3]-t[1]}function Xn(t,n,e){var r=e||[1/0,1/0,-1/0,-1/0];return te(t,n)?(t[0]>n[0]?r[0]=t[0]:r[0]=n[0],t[1]>n[1]?r[1]=t[1]:r[1]=n[1],t[2]<n[2]?r[2]=t[2]:r[2]=n[2],t[3]<n[3]?r[3]=t[3]:r[3]=n[3]):Cn(r),r}function Yn(t){return[t[0],t[3]]}function Jn(t){return[t[2],t[3]]}function Qn(t){return t[2]-t[0]}function te(t,n){return t[0]<=n[2]&&t[2]>=n[0]&&t[1]<=n[3]&&t[3]>=n[1]}function ne(t){return t[2]<t[0]||t[3]<t[1]}function ee(t,n){return n?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n):t}function re(t,n){var e=(t[2]-t[0])/2*(n-1),r=(t[3]-t[1])/2*(n-1);t[0]-=e,t[2]+=e,t[1]-=r,t[3]+=r}function ie(t,n,e){var r=!1,i=Tn(t,n),o=Tn(t,e);if(i===yn||o===yn)r=!0;else{var s=t[0],a=t[1],u=t[2],c=t[3],f=n[0],h=n[1],l=e[0],v=e[1],d=(v-h)/(l-f),p=void 0,y=void 0;o&mn&&!(i&mn)&&(r=(p=l-(v-c)/d)>=s&&p<=u),r||!(o&bn)||i&bn||(r=(y=v-(l-u)*d)>=a&&y<=c),r||!(o&wn)||i&wn||(r=(p=l-(v-a)/d)>=s&&p<=u),r||!(o&gn)||i&gn||(r=(y=v-(l-s)*d)>=a&&y<=c)}return r}function oe(t,n,e,r){var i=[];if(r>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a<r;++a)i.push(t[0]+o*a/r,t[1],t[2],t[1]+s*a/r,t[2]-o*a/r,t[3],t[0],t[3]-s*a/r);else i=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];n(i,i,2);for(var u=[],c=[],f=(a=0,i.length);a<f;a+=2)u.push(i[a]),c.push(i[a+1]);return function(t,n,e){return An(Math.min.apply(null,t),Math.min.apply(null,n),Math.max.apply(null,t),Math.max.apply(null,n),e)}(u,c,e)}function se(t,n){var e=n.getExtent(),r=Zn(t);if(n.canWrapX()&&(r[0]<e[0]||r[0]>=e[2])){var i=Qn(e),o=Math.floor((r[0]-e[0])/i)*i;t[0]-=o,t[2]-=o}return t}var ae=function(){function t(t){this.it=t.code,this.ot=t.units,this.st=void 0!==t.extent?t.extent:null,this.ut=void 0!==t.worldExtent?t.worldExtent:null,this.ct=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.ft=void 0!==t.global&&t.global,this.ht=!(!this.ft||!this.st),this.lt=t.getPointResolution,this.vt=null,this.dt=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.ht},t.prototype.getCode=function(){return this.it},t.prototype.getExtent=function(){return this.st},t.prototype.getUnits=function(){return this.ot},t.prototype.getMetersPerUnit=function(){return this.dt||zt[this.ot]},t.prototype.getWorldExtent=function(){return this.ut},t.prototype.getAxisOrientation=function(){return this.ct},t.prototype.isGlobal=function(){return this.ft},t.prototype.setGlobal=function(t){this.ft=t,this.ht=!(!t||!this.st)},t.prototype.getDefaultTileGrid=function(){return this.vt},t.prototype.setDefaultTileGrid=function(t){this.vt=t},t.prototype.setExtent=function(t){this.st=t,this.ht=!(!this.ft||!t)},t.prototype.setWorldExtent=function(t){this.ut=t},t.prototype.setGetPointResolution=function(t){this.lt=t},t.prototype.getPointResolutionFunc=function(){return this.lt},t}();function ue(t,n,e){return Math.min(Math.max(t,n),e)}var ce="cosh"in Math?Math.cosh:function(t){var n=Math.exp(t);return(n+1/n)/2},fe="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function he(t,n,e,r,i,o){var s=i-e,a=o-r;if(0!==s||0!==a){var u=((t-e)*s+(n-r)*a)/(s*s+a*a);u>1?(e=i,r=o):u>0&&(e+=s*u,r+=a*u)}return le(t,n,e,r)}function le(t,n,e,r){var i=e-t,o=r-n;return i*i+o*o}function ve(t){for(var n=t.length,e=0;e<n;e++){for(var r=e,i=Math.abs(t[e][e]),o=e+1;o<n;o++){var s=Math.abs(t[o][e]);s>i&&(i=s,r=o)}if(0===i)return null;var a=t[r];t[r]=t[e],t[e]=a;for(var u=e+1;u<n;u++)for(var c=-t[u][e]/t[e][e],f=e;f<n+1;f++)e==f?t[u][f]=0:t[u][f]+=c*t[e][f]}for(var h=new Array(n),l=n-1;l>=0;l--){h[l]=t[l][n]/t[l][l];for(var v=l-1;v>=0;v--)t[v][n]-=t[v][l]*h[l]}return h}function de(t){return 180*t/Math.PI}function pe(t){return t*Math.PI/180}function ye(t,n){var e=t%n;return e*n<0?e+n:e}function me(t,n,e){return t+e*(n-t)}function be(t,n){var e=Math.pow(10,n);return Math.round(t*e)/e}function we(t,n){return Math.round(be(t,n))}function ge(t,n){return Math.floor(be(t,n))}function xe(t,n){return Math.ceil(be(t,n))}var ke=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),_e=6378137,Se=Math.PI*_e,Me=[-Se,-Se,Se,Se],je=[-180,-85,180,85],Oe=_e*Math.log(Math.tan(Math.PI/2)),Te=function(t){function n(n){return t.call(this,{code:n,units:Ft.METERS,extent:Me,global:!0,worldExtent:je,getPointResolution:function(t,n){return t/ce(n[1]/_e)}})||this}return ke(n,t),n}(ae),Ee=[new Te("EPSG:3857"),new Te("EPSG:102100"),new Te("EPSG:102113"),new Te("EPSG:900913"),new Te("http://www.opengis.net/def/crs/EPSG/0/3857"),new Te("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Ae(t,n,e){var r=t.length,i=e>1?e:2,o=n;void 0===o&&(o=i>2?t.slice():new Array(r));for(var s=0;s<r;s+=i){o[s]=Se*t[s]/180;var a=_e*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>Oe?a=Oe:a<-Oe&&(a=-Oe),o[s+1]=a}return o}function Ce(t,n,e){var r=t.length,i=e>1?e:2,o=n;void 0===o&&(o=i>2?t.slice():new Array(r));for(var s=0;s<r;s+=i)o[s]=180*t[s]/Se,o[s+1]=360*Math.atan(Math.exp(t[s+1]/_e))/Math.PI-90;return o}var Re=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ie=6378137,Pe=[-180,-90,180,90],De=Math.PI*Ie/180,Ne=function(t){function n(n,e){return t.call(this,{code:n,units:Ft.DEGREES,extent:Pe,axisOrientation:e,global:!0,metersPerUnit:De,worldExtent:Pe})||this}return Re(n,t),n}(ae),ze=[new Ne("CRS:84"),new Ne("EPSG:4326","neu"),new Ne("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ne("urn:ogc:def:crs:OGC:2:84"),new Ne("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Ne("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ne("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],Le={};function Fe(){Le={}}function Ge(t){return Le[t]||Le[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Ue(t,n){Le[t]=n}var Be={};function qe(){Be={}}function $e(t,n,e){var r=t.getCode(),i=n.getCode();r in Be||(Be[r]={}),Be[r][i]=e}function Ve(t,n){var e;return t in Be&&n in Be[t]&&(e=Be[t][n]),e}var Ze=6371008.8;function We(t,n,e){var r=e||Ze,i=pe(t[1]),o=pe(n[1]),s=(o-i)/2,a=pe(n[0]-t[0])/2,u=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(i)*Math.cos(o);return 2*r*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))}function He(t,n){for(var e=0,r=0,i=t.length;r<i-1;++r)e+=We(t[r],t[r+1],n);return e}function Ke(t,n){for(var e=0,r=t.length,i=t[r-1][0],o=t[r-1][1],s=0;s<r;s++){var a=t[s][0],u=t[s][1];e+=pe(a-i)*(2+Math.sin(pe(o))+Math.sin(pe(u))),i=a,o=u}return e*n*n/2}function Xe(t,n,e,r){var i=r||Ze,o=pe(t[1]),s=pe(t[0]),a=n/i,u=Math.asin(Math.sin(o)*Math.cos(a)+Math.cos(o)*Math.sin(a)*Math.cos(e));return[de(s+Math.atan2(Math.sin(e)*Math.sin(a)*Math.cos(o),Math.cos(a)-Math.sin(o)*Math.sin(u))),de(u)]}function Ye(t,n,e){var r=void 0!==e?t.toFixed(e):""+t,i=r.indexOf(".");return(i=-1===i?r.length:i)>n?r:new Array(1+n-i).join("0")+r}function Je(t,n){for(var e=(""+t).split("."),r=(""+n).split("."),i=0;i<Math.max(e.length,r.length);i++){var o=parseInt(e[i]||"0",10),s=parseInt(r[i]||"0",10);if(o>s)return 1;if(s>o)return-1}return 0}function Qe(t,n){return t[0]+=+n[0],t[1]+=+n[1],t}function tr(t,n){var e=n.getRadius(),r=n.getCenter(),i=r[0],o=r[1],s=t[0]-i,a=t[1]-o;0===s&&0===a&&(s=1);var u=Math.sqrt(s*s+a*a);return[i+e*s/u,o+e*a/u]}function nr(t,n){var e,r,i=t[0],o=t[1],s=n[0],a=n[1],u=s[0],c=s[1],f=a[0],h=a[1],l=f-u,v=h-c,d=0===l&&0===v?0:(l*(i-u)+v*(o-c))/(l*l+v*v||0);return d<=0?(e=u,r=c):d>=1?(e=f,r=h):(e=u+d*l,r=c+d*v),[e,r]}function er(t,n,e){var r=ye(n+180,360)-180,i=Math.abs(3600*r),o=e||0,s=Math.pow(10,o),a=Math.floor(i/3600),u=Math.floor((i-3600*a)/60),c=i-3600*a-60*u;return(c=Math.ceil(c*s)/s)>=60&&(c=0,u+=1),u>=60&&(u=0,a+=1),a+"° "+Ye(u,2)+" "+Ye(c,2,o)+"″"+(0==r?"":" "+t.charAt(r<0?1:0))}function rr(t,n,e){return t?n.replace("{x}",t[0].toFixed(e)).replace("{y}",t[1].toFixed(e)):""}function ir(t,n){for(var e=!0,r=t.length-1;r>=0;--r)if(t[r]!=n[r]){e=!1;break}return e}function or(t,n){var e=Math.cos(n),r=Math.sin(n),i=t[0]*e-t[1]*r,o=t[1]*e+t[0]*r;return t[0]=i,t[1]=o,t}function sr(t,n){return t[0]*=n,t[1]*=n,t}function ar(t,n){var e=t[0]-n[0],r=t[1]-n[1];return e*e+r*r}function ur(t,n){return Math.sqrt(ar(t,n))}function cr(t,n){return ar(t,nr(t,n))}function fr(t,n){return rr(t,"{x}, {y}",n)}function hr(t,n){if(n.canWrapX()){var e=Qn(n.getExtent()),r=lr(t,n,e);r&&(t[0]-=r*e)}return t}function lr(t,n,e){var r=n.getExtent(),i=0;if(n.canWrapX()&&(t[0]<r[0]||t[0]>r[2])){var o=e||Qn(r);i=Math.floor((t[0]-r[0])/o)}return i}function vr(t,n,e){var r;if(void 0!==n){for(var i=0,o=t.length;i<o;++i)n[i]=t[i];r=n}else r=t.slice();return r}function dr(t,n,e){if(void 0!==n&&t!==n){for(var r=0,i=t.length;r<i;++r)n[r]=t[r];t=n}return t}function pr(t){Ue(t.getCode(),t),$e(t,t,vr)}function yr(t){t.forEach(pr)}function mr(t){return"string"==typeof t?Ge(t):t||null}function br(t,n,e,r){var i,o=(t=mr(t)).getPointResolutionFunc();if(o){if(i=o(n,e),r&&r!==t.getUnits())(a=t.getMetersPerUnit())&&(i=i*a/zt[r])}else{var s=t.getUnits();if(s==Ft.DEGREES&&!r||r==Ft.DEGREES)i=n;else{var a,u=jr(t,mr("EPSG:4326"));if(u===dr&&s!==Ft.DEGREES)i=n*t.getMetersPerUnit();else{var c=[e[0]-n/2,e[1],e[0]+n/2,e[1],e[0],e[1]-n/2,e[0],e[1]+n/2];i=(We((c=u(c,c,2)).slice(0,2),c.slice(2,4))+We(c.slice(4,6),c.slice(6,8)))/2}void 0!==(a=r?zt[r]:t.getMetersPerUnit())&&(i/=a)}}return i}function wr(t){yr(t),t.forEach((function(n){t.forEach((function(t){n!==t&&$e(n,t,vr)}))}))}function gr(t,n,e,r){t.forEach((function(t){n.forEach((function(n){$e(t,n,e),$e(n,t,r)}))}))}function xr(t,n){return t?"string"==typeof t?mr(t):t:mr(n)}function kr(t){return function(n,e,r){for(var i=n.length,o=void 0!==r?r:2,s=void 0!==e?e:new Array(i),a=0;a<i;a+=o){var u=t([n[a],n[a+1]]);s[a]=u[0],s[a+1]=u[1];for(var c=o-1;c>=2;--c)s[a+c]=n[a+c]}return s}}function _r(t,n,e,r){var i=mr(t),o=mr(n);$e(i,o,kr(e)),$e(o,i,kr(r))}function Sr(t,n){return Tr(t,"EPSG:4326",void 0!==n?n:"EPSG:3857")}function Mr(t,n){if(t===n)return!0;var e=t.getUnits()===n.getUnits();return(t.getCode()===n.getCode()||jr(t,n)===vr)&&e}function jr(t,n){var e=Ve(t.getCode(),n.getCode());return e||(e=dr),e}function Or(t,n){return jr(mr(t),mr(n))}function Tr(t,n,e){return Or(n,e)(t,void 0,t.length)}function Er(t,n,e,r){return oe(t,Or(n,e),void 0,r)}var Ar=null;function Cr(t){Ar=mr(t)}function Rr(){return Ar}function Ir(t,n){return Ar?Tr(t,n,Ar):t}function Pr(t,n){return Ar?Tr(t,Ar,n):t}function Dr(t,n){return Ar?Er(t,n,Ar):t}function Nr(t,n){return Ar?Er(t,Ar,n):t}function zr(t,n){if(!Ar)return t;var e=mr(n).getUnits(),r=Ar.getUnits();return e&&r?t*zt[e]/zt[r]:t}function Lr(t,n){if(!Ar)return t;var e=mr(n).getUnits(),r=Ar.getUnits();return e&&r?t*zt[r]/zt[e]:t}function Fr(t,n,e){return function(r){var i,o,s=r[0],a=r[1];if(t.canWrapX()){var u=t.getExtent(),c=Qn(u);(o=lr(r,t,c))&&(s-=o*c),s=ue(s,u[0],u[2]),a=ue(a,u[1],u[3]),i=e([s,a])}else i=e(r);return o&&n.canWrapX()&&(i[0]+=o*Qn(n.getExtent())),i}}function Gr(){wr(Ee),wr(ze),gr(ze,Ee,Ae,Ce)}function Ur(t,n,e,r,i,o){for(var s=o||[],a=0,u=n;u<e;u+=r){var c=t[u],f=t[u+1];s[a++]=i[0]*c+i[2]*f+i[4],s[a++]=i[1]*c+i[3]*f+i[5]}return o&&s.length!=a&&(s.length=a),s}function Br(t,n,e,r,i,o,s){for(var a=s||[],u=Math.cos(i),c=Math.sin(i),f=o[0],h=o[1],l=0,v=n;v<e;v+=r){var d=t[v]-f,p=t[v+1]-h;a[l++]=f+d*u-p*c,a[l++]=h+d*c+p*u;for(var y=v+2;y<v+r;++y)a[l++]=t[y]}return s&&a.length!=l&&(a.length=l),a}function qr(t,n,e,r,i,o,s,a){for(var u=a||[],c=s[0],f=s[1],h=0,l=n;l<e;l+=r){var v=t[l]-c,d=t[l+1]-f;u[h++]=c+i*v,u[h++]=f+o*d;for(var p=l+2;p<l+r;++p)u[h++]=t[p]}return a&&u.length!=h&&(u.length=h),u}function $r(t,n,e,r,i,o,s){for(var a=s||[],u=0,c=n;c<e;c+=r){a[u++]=t[c]+i,a[u++]=t[c+1]+o;for(var f=c+2;f<c+r;++f)a[u++]=t[f]}return s&&a.length!=u&&(a.length=u),a}Gr();var Vr=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zr=[1,0,0,1,0,0],Wr=function(t){function n(){var n=t.call(this)||this;return n.st=[1/0,1/0,-1/0,-1/0],n.yt=-1,n.simplifiedGeometryMaxMinSquaredTolerance=0,n.simplifiedGeometryRevision=0,n.simplifyTransformedInternal=O((function(t,n,e){if(!e)return this.getSimplifiedGeometry(n);var r=this.clone();return r.applyTransform(e),r.getSimplifiedGeometry(n)})),n}return Vr(n,t),n.prototype.simplifyTransformed=function(t,n){return this.simplifyTransformedInternal(this.getRevision(),t,n)},n.prototype.clone=function(){return r()},n.prototype.closestPointXY=function(t,n,e,i){return r()},n.prototype.containsXY=function(t,n){var e=this.getClosestPoint([t,n]);return e[0]===t&&e[1]===n},n.prototype.getClosestPoint=function(t,n){var e=n||[NaN,NaN];return this.closestPointXY(t[0],t[1],e,1/0),e},n.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},n.prototype.computeExtent=function(t){return r()},n.prototype.getExtent=function(t){if(this.yt!=this.getRevision()){var n=this.computeExtent(this.st);(isNaN(n[0])||isNaN(n[1]))&&Cn(n),this.yt=this.getRevision()}return ee(this.st,t)},n.prototype.rotate=function(t,n){r()},n.prototype.scale=function(t,n,e){r()},n.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},n.prototype.getSimplifiedGeometry=function(t){return r()},n.prototype.getType=function(){return r()},n.prototype.applyTransform=function(t){r()},n.prototype.intersectsExtent=function(t){return r()},n.prototype.translate=function(t,n){r()},n.prototype.transform=function(t,n){var e=mr(t),r=e.getUnits()==Ft.TILE_PIXELS?function(t,r,i){var o=e.getExtent(),s=e.getWorldExtent(),a=Kn(s)/Kn(o);return an(Zr,s[0],s[3],a,-a,0,0,0),Ur(t,0,t.length,i,Zr,r),Or(e,n)(t,r,i)}:Or(e,n);return this.applyTransform(r),this},n}(ot),Hr=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function Kr(t){var n;return t==Et?n=2:t==At||t==Ct?n=3:t==Rt&&(n=4),n}function Xr(t,n,e){var r=t.getFlatCoordinates();if(r){var i=t.getStride();return Ur(r,0,r.length,i,n,e)}return null}var Yr=function(t){function n(){var n=t.call(this)||this;return n.layout=Et,n.stride=2,n.flatCoordinates=null,n}return Hr(n,t),n.prototype.computeExtent=function(t){return In(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},n.prototype.getCoordinates=function(){return r()},n.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},n.prototype.getFlatCoordinates=function(){return this.flatCoordinates},n.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},n.prototype.getLayout=function(){return this.layout},n.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var n=this.getSimplifiedGeometryInternal(t);return n.getFlatCoordinates().length<this.flatCoordinates.length?n:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},n.prototype.getSimplifiedGeometryInternal=function(t){return this},n.prototype.getStride=function(){return this.stride},n.prototype.setFlatCoordinates=function(t,n){this.stride=Kr(t),this.layout=t,this.flatCoordinates=n},n.prototype.setCoordinates=function(t,n){r()},n.prototype.setLayout=function(t,n,e){var r;if(t)r=Kr(t);else{for(var i=0;i<e;++i){if(0===n.length)return this.layout=Et,void(this.stride=2);n=n[0]}t=function(t){var n;2==t?n=Et:3==t?n=At:4==t&&(n=Rt);return n}(r=n.length)}this.layout=t,this.stride=r},n.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},n.prototype.rotate=function(t,n){var e=this.getFlatCoordinates();if(e){var r=this.getStride();Br(e,0,e.length,r,t,n,e),this.changed()}},n.prototype.scale=function(t,n,e){var r=n;void 0===r&&(r=t);var i=e;i||(i=Zn(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();qr(o,0,o.length,s,t,r,i,o),this.changed()}},n.prototype.translate=function(t,n){var e=this.getFlatCoordinates();if(e){var r=this.getStride();$r(e,0,e.length,r,t,n,e),this.changed()}},n}(Wr);function Jr(t,n,e,r,i,o,s){var a,u=t[n],c=t[n+1],f=t[e]-u,h=t[e+1]-c;if(0===f&&0===h)a=n;else{var l=((i-u)*f+(o-c)*h)/(f*f+h*h);if(l>1)a=e;else{if(l>0){for(var v=0;v<r;++v)s[v]=me(t[n+v],t[e+v],l);return void(s.length=r)}a=n}}for(v=0;v<r;++v)s[v]=t[a+v];s.length=r}function Qr(t,n,e,r,i){var o=t[n],s=t[n+1];for(n+=r;n<e;n+=r){var a=t[n],u=t[n+1],c=le(o,s,a,u);c>i&&(i=c),o=a,s=u}return i}function ti(t,n,e,r,i){for(var o=0,s=e.length;o<s;++o){var a=e[o];i=Qr(t,n,a,r,i),n=a}return i}function ni(t,n,e,r,i){for(var o=0,s=e.length;o<s;++o){var a=e[o];i=ti(t,n,a,r,i),n=a[a.length-1]}return i}function ei(t,n,e,r,i,o,s,a,u,c,f){if(n==e)return c;var h,l;if(0===i){if((l=le(s,a,t[n],t[n+1]))<c){for(h=0;h<r;++h)u[h]=t[n+h];return u.length=r,l}return c}for(var v=f||[NaN,NaN],d=n+r;d<e;)if(Jr(t,d-r,d,r,s,a,v),(l=le(s,a,v[0],v[1]))<c){for(c=l,h=0;h<r;++h)u[h]=v[h];u.length=r,d+=r}else d+=r*Math.max((Math.sqrt(l)-Math.sqrt(c))/i|0,1);if(o&&(Jr(t,e-r,n,r,s,a,v),(l=le(s,a,v[0],v[1]))<c)){for(c=l,h=0;h<r;++h)u[h]=v[h];u.length=r}return c}function ri(t,n,e,r,i,o,s,a,u,c,f){for(var h=f||[NaN,NaN],l=0,v=e.length;l<v;++l){var d=e[l];c=ei(t,n,d,r,i,o,s,a,u,c,h),n=d}return c}function ii(t,n,e,r,i,o,s,a,u,c,f){for(var h=f||[NaN,NaN],l=0,v=e.length;l<v;++l){var d=e[l];c=ri(t,n,d,r,i,o,s,a,u,c,h),n=d[d.length-1]}return c}function oi(t,n,e,r){for(var i=0,o=e.length;i<o;++i)t[n++]=e[i];return n}function si(t,n,e,r){for(var i=0,o=e.length;i<o;++i)for(var s=e[i],a=0;a<r;++a)t[n++]=s[a];return n}function ai(t,n,e,r,i){for(var o=i||[],s=0,a=0,u=e.length;a<u;++a){var c=si(t,n,e[a],r);o[s++]=c,n=c}return o.length=s,o}function ui(t,n,e,r,i){for(var o=i||[],s=0,a=0,u=e.length;a<u;++a){var c=ai(t,n,e[a],r,o[s]);o[s++]=c,n=c[c.length-1]}return o.length=s,o}function ci(t,n,e,r,i,o,s){var a=(e-n)/r;if(a<3){for(;n<e;n+=r)o[s++]=t[n],o[s++]=t[n+1];return s}var u=new Array(a);u[0]=1,u[a-1]=1;for(var c=[n,e-r],f=0;c.length>0;){for(var h=c.pop(),l=c.pop(),v=0,d=t[l],p=t[l+1],y=t[h],m=t[h+1],b=l+r;b<h;b+=r){var w=he(t[b],t[b+1],d,p,y,m);w>v&&(f=b,v=w)}v>i&&(u[(f-n)/r]=1,l+r<f&&c.push(l,f),f+r<h&&c.push(f,h))}for(b=0;b<a;++b)u[b]&&(o[s++]=t[n+b*r],o[s++]=t[n+b*r+1]);return s}function fi(t,n,e,r,i,o,s,a){for(var u=0,c=e.length;u<c;++u){var f=e[u];s=ci(t,n,f,r,i,o,s),a.push(s),n=f}return s}function hi(t,n,e,r,i,o,s){if(e<=n+r){for(;n<e;n+=r)o[s++]=t[n],o[s++]=t[n+1];return s}var a=t[n],u=t[n+1];o[s++]=a,o[s++]=u;var c=a,f=u;for(n+=r;n<e;n+=r)le(a,u,c=t[n],f=t[n+1])>i&&(o[s++]=c,o[s++]=f,a=c,u=f);return c==a&&f==u||(o[s++]=c,o[s++]=f),s}function li(t,n){return n*Math.round(t/n)}function vi(t,n,e,r,i,o,s){if(n==e)return s;var a,u,c=li(t[n],i),f=li(t[n+1],i);n+=r,o[s++]=c,o[s++]=f;do{if(a=li(t[n],i),u=li(t[n+1],i),(n+=r)==e)return o[s++]=a,o[s++]=u,s}while(a==c&&u==f);for(;n<e;){var h=li(t[n],i),l=li(t[n+1],i);if(n+=r,h!=a||l!=u){var v=a-c,d=u-f,p=h-c,y=l-f;v*y==d*p&&(v<0&&p<v||v==p||v>0&&p>v)&&(d<0&&y<d||d==y||d>0&&y>d)?(a=h,u=l):(o[s++]=a,o[s++]=u,c=a,f=u,a=h,u=l)}}return o[s++]=a,o[s++]=u,s}function di(t,n,e,r,i,o,s,a){for(var u=0,c=e.length;u<c;++u){var f=e[u];s=vi(t,n,f,r,i,o,s),a.push(s),n=f}return s}function pi(t,n,e,r,i,o,s,a){for(var u=0,c=e.length;u<c;++u){var f=e[u],h=[];s=di(t,n,f,r,i,o,s,h),a.push(h),n=f[f.length-1]}return s}function yi(t,n,e,r,i){for(var o=void 0!==i?i:[],s=0,a=n;a<e;a+=r)o[s++]=t.slice(a,a+r);return o.length=s,o}function mi(t,n,e,r,i){for(var o=void 0!==i?i:[],s=0,a=0,u=e.length;a<u;++a){var c=e[a];o[s++]=yi(t,n,c,r,o[s]),n=c}return o.length=s,o}function bi(t,n,e,r,i){for(var o=void 0!==i?i:[],s=0,a=0,u=e.length;a<u;++a){var c=e[a];o[s++]=mi(t,n,c,r,o[s]),n=c[c.length-1]}return o.length=s,o}function wi(t,n,e,r){for(var i=0,o=t[e-r],s=t[e-r+1];n<e;n+=r){var a=t[n],u=t[n+1];i+=s*a-o*u,o=a,s=u}return i/2}function gi(t,n,e,r){for(var i=0,o=0,s=e.length;o<s;++o){var a=e[o];i+=wi(t,n,a,r),n=a}return i}function xi(t,n,e,r){for(var i=0,o=0,s=e.length;o<s;++o){var a=e[o];i+=gi(t,n,a,r),n=a[a.length-1]}return i}var ki=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),_i=function(t){function n(n,e){var r=t.call(this)||this;return r.bt=-1,r.wt=-1,void 0===e||Array.isArray(n[0])?r.setCoordinates(n,e):r.setFlatCoordinates(e,n),r}return ki(n,t),n.prototype.clone=function(){return new n(this.flatCoordinates.slice(),this.layout)},n.prototype.closestPointXY=function(t,n,e,r){return r<Sn(this.getExtent(),t,n)?r:(this.wt!=this.getRevision()&&(this.bt=Math.sqrt(Qr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.wt=this.getRevision()),ei(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.bt,!0,t,n,e,r))},n.prototype.getArea=function(){return wi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getCoordinates=function(){return yi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getSimplifiedGeometryInternal=function(t){var e=[];return e.length=ci(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new n(e,Et)},n.prototype.getType=function(){return It.LINEAR_RING},n.prototype.intersectsExtent=function(t){return!1},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=si(this.flatCoordinates,0,t,this.stride),this.changed()},n}(Yr),Si=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Mi=function(t){function n(n,e){var r=t.call(this)||this;return r.setCoordinates(n,e),r}return Si(n,t),n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,e,r){var i=this.flatCoordinates,o=le(t,n,i[0],i[1]);if(o<r){for(var s=this.stride,a=0;a<s;++a)e[a]=i[a];return e.length=s,o}return r},n.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},n.prototype.computeExtent=function(t){return Rn(this.flatCoordinates,t)},n.prototype.getType=function(){return It.POINT},n.prototype.intersectsExtent=function(t){return On(t,this.flatCoordinates[0],this.flatCoordinates[1])},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=oi(this.flatCoordinates,0,t,this.stride),this.changed()},n}(Yr);function ji(t,n,e,r,i){return!Bn(i,(function(i){return!Oi(t,n,e,r,i[0],i[1])}))}function Oi(t,n,e,r,i,o){for(var s=0,a=t[e-r],u=t[e-r+1];n<e;n+=r){var c=t[n],f=t[n+1];u<=o?f>o&&(c-a)*(o-u)-(i-a)*(f-u)>0&&s++:f<=o&&(c-a)*(o-u)-(i-a)*(f-u)<0&&s--,a=c,u=f}return 0!==s}function Ti(t,n,e,r,i,o){if(0===e.length)return!1;if(!Oi(t,n,e[0],r,i,o))return!1;for(var s=1,a=e.length;s<a;++s)if(Oi(t,e[s-1],e[s],r,i,o))return!1;return!0}function Ei(t,n,e,r,i,o){if(0===e.length)return!1;for(var s=0,a=e.length;s<a;++s){var u=e[s];if(Ti(t,n,u,r,i,o))return!0;n=u[u.length-1]}return!1}function Ai(t,n,e,r,i,o,s){for(var a,u,c,f,h,l,v,d=i[o+1],y=[],m=0,b=e.length;m<b;++m){var w=e[m];for(f=t[w-r],l=t[w-r+1],a=n;a<w;a+=r)h=t[a],v=t[a+1],(d<=l&&v<=d||l<=d&&d<=v)&&(c=(d-l)/(v-l)*(h-f)+f,y.push(c)),f=h,l=v}var g=NaN,x=-1/0;for(y.sort(p),f=y[0],a=1,u=y.length;a<u;++a){h=y[a];var k=Math.abs(h-f);k>x&&Ti(t,n,e,r,c=(f+h)/2,d)&&(g=c,x=k),f=h}return isNaN(g)&&(g=i[o]),s?(s.push(g,d,x),s):[g,d,x]}function Ci(t,n,e,r,i){for(var o=[],s=0,a=e.length;s<a;++s){var u=e[s];o=Ai(t,n,u,r,i,2*s,o),n=u[u.length-1]}return o}function Ri(t,n,e,r,i){var o;for(n+=r;n<e;n+=r)if(o=i(t.slice(n-r,n),t.slice(n,n+r)))return o;return!1}function Ii(t,n,e,r,i){var o=Fn([1/0,1/0,-1/0,-1/0],t,n,e,r);return!!te(i,o)&&(!!jn(i,o)||(o[0]>=i[0]&&o[2]<=i[2]||(o[1]>=i[1]&&o[3]<=i[3]||Ri(t,n,e,r,(function(t,n){return ie(i,t,n)})))))}function Pi(t,n,e,r,i){for(var o=0,s=e.length;o<s;++o){if(Ii(t,n,e[o],r,i))return!0;n=e[o]}return!1}function Di(t,n,e,r,i){return!!Ii(t,n,e,r,i)||(!!Oi(t,n,e,r,i[0],i[1])||(!!Oi(t,n,e,r,i[0],i[3])||(!!Oi(t,n,e,r,i[2],i[1])||!!Oi(t,n,e,r,i[2],i[3]))))}function Ni(t,n,e,r,i){if(!Di(t,n,e[0],r,i))return!1;if(1===e.length)return!0;for(var o=1,s=e.length;o<s;++o)if(ji(t,e[o-1],e[o],r,i)&&!Ii(t,e[o-1],e[o],r,i))return!1;return!0}function zi(t,n,e,r,i){for(var o=0,s=e.length;o<s;++o){var a=e[o];if(Ni(t,n,a,r,i))return!0;n=a[a.length-1]}return!1}function Li(t,n,e,r){for(;n<e-r;){for(var i=0;i<r;++i){var o=t[n+i];t[n+i]=t[e-r+i],t[e-r+i]=o}n+=r,e-=r}}function Fi(t,n,e,r){for(var i=0,o=t[e-r],s=t[e-r+1];n<e;n+=r){var a=t[n],u=t[n+1];i+=(a-o)*(u+s),o=a,s=u}return 0===i?void 0:i>0}function Gi(t,n,e,r,i){for(var o=void 0!==i&&i,s=0,a=e.length;s<a;++s){var u=e[s],c=Fi(t,n,u,r);if(0===s){if(o&&c||!o&&!c)return!1}else if(o&&!c||!o&&c)return!1;n=u}return!0}function Ui(t,n,e,r,i){for(var o=0,s=e.length;o<s;++o){var a=e[o];if(!Gi(t,n,a,r,i))return!1;a.length&&(n=a[a.length-1])}return!0}function Bi(t,n,e,r,i){for(var o=void 0!==i&&i,s=0,a=e.length;s<a;++s){var u=e[s],c=Fi(t,n,u,r);(0===s?o&&c||!o&&!c:o&&!c||!o&&c)&&Li(t,n,u,r),n=u}return n}function qi(t,n,e,r,i){for(var o=0,s=e.length;o<s;++o)n=Bi(t,n,e[o],r,i);return n}var $i=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Vi=function(t){function n(n,e,r){var i=t.call(this)||this;return i.gt=[],i.xt=-1,i.kt=null,i.bt=-1,i.wt=-1,i._t=-1,i.St=null,void 0!==e&&r?(i.setFlatCoordinates(e,n),i.gt=r):i.setCoordinates(n,e),i}return $i(n,t),n.prototype.appendLinearRing=function(t){this.flatCoordinates?w(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.gt.push(this.flatCoordinates.length),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout,this.gt.slice());return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,e,r){return r<Sn(this.getExtent(),t,n)?r:(this.wt!=this.getRevision()&&(this.bt=Math.sqrt(ti(this.flatCoordinates,0,this.gt,this.stride,0)),this.wt=this.getRevision()),ri(this.flatCoordinates,0,this.gt,this.stride,this.bt,!0,t,n,e,r))},n.prototype.containsXY=function(t,n){return Ti(this.getOrientedFlatCoordinates(),0,this.gt,this.stride,t,n)},n.prototype.getArea=function(){return gi(this.getOrientedFlatCoordinates(),0,this.gt,this.stride)},n.prototype.getCoordinates=function(t){var n;return void 0!==t?Bi(n=this.getOrientedFlatCoordinates().slice(),0,this.gt,this.stride,t):n=this.flatCoordinates,mi(n,0,this.gt,this.stride)},n.prototype.getEnds=function(){return this.gt},n.prototype.getFlatInteriorPoint=function(){if(this.xt!=this.getRevision()){var t=Zn(this.getExtent());this.kt=Ai(this.getOrientedFlatCoordinates(),0,this.gt,this.stride,t,0),this.xt=this.getRevision()}return this.kt},n.prototype.getInteriorPoint=function(){return new Mi(this.getFlatInteriorPoint(),Ct)},n.prototype.getLinearRingCount=function(){return this.gt.length},n.prototype.getLinearRing=function(t){return t<0||this.gt.length<=t?null:new _i(this.flatCoordinates.slice(0===t?0:this.gt[t-1],this.gt[t]),this.layout)},n.prototype.getLinearRings=function(){for(var t=this.layout,n=this.flatCoordinates,e=this.gt,r=[],i=0,o=0,s=e.length;o<s;++o){var a=e[o],u=new _i(n.slice(i,a),t);r.push(u),i=a}return r},n.prototype.getOrientedFlatCoordinates=function(){if(this._t!=this.getRevision()){var t=this.flatCoordinates;Gi(t,0,this.gt,this.stride)?this.St=t:(this.St=t.slice(),this.St.length=Bi(this.St,0,this.gt,this.stride)),this._t=this.getRevision()}return this.St},n.prototype.getSimplifiedGeometryInternal=function(t){var e=[],r=[];return e.length=di(this.flatCoordinates,0,this.gt,this.stride,Math.sqrt(t),e,0,r),new n(e,Et,r)},n.prototype.getType=function(){return It.POLYGON},n.prototype.intersectsExtent=function(t){return Ni(this.getOrientedFlatCoordinates(),0,this.gt,this.stride,t)},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var e=ai(this.flatCoordinates,0,t,this.stride,this.gt);this.flatCoordinates.length=0===e.length?0:e[e.length-1],this.changed()},n}(Yr),Zi=Vi;function Wi(t,n,e,r){for(var i=e||32,o=[],s=0;s<i;++s)w(o,Xe(t,n,2*Math.PI*s/i,r));return o.push(o[0],o[1]),new Vi(o,Et,[o.length])}function Hi(t){var n=t[0],e=t[1],r=t[2],i=t[3],o=[n,e,n,i,r,i,r,e,n,e];return new Vi(o,Et,[o.length])}function Ki(t,n,e){for(var r=n||32,i=t.getStride(),o=t.getLayout(),s=t.getCenter(),a=i*(r+1),u=new Array(a),c=0;c<a;c+=i){u[c]=0,u[c+1]=0;for(var f=2;f<i;f++)u[c+f]=s[f]}var h=[u.length],l=new Vi(u,o,h);return Xi(l,s,t.getRadius(),e),l}function Xi(t,n,e,r){for(var i=t.getFlatCoordinates(),o=t.getStride(),s=i.length/o-1,a=r||0,u=0;u<=s;++u){var c=u*o,f=a+2*ye(u,s)*Math.PI/s;i[c]=n[0]+e*Math.cos(f),i[c+1]=n[1]+e*Math.sin(f)}t.changed()}var Yi=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ji="accuracy",Qi="accuracyGeometry",to="altitude",no="altitudeAccuracy",eo="heading",ro="position",io="projection",oo="speed",so="tracking",ao="trackingOptions",uo=function(t){function n(n){var e=t.call(this,N)||this;return e.code=n.code,e.message=n.message,e}return Yi(n,t),n}(h),co=function(t){function n(n){var e=t.call(this)||this;e.on,e.once,e.un;var r=n||{};return e.Mt=null,e.jt=dr,e.Ot=void 0,e.addChangeListener(io,e.Tt),e.addChangeListener(so,e.Et),void 0!==r.projection&&e.setProjection(r.projection),void 0!==r.trackingOptions&&e.setTrackingOptions(r.trackingOptions),e.setTracking(void 0!==r.tracking&&r.tracking),e}return Yi(n,t),n.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},n.prototype.Tt=function(){var t=this.getProjection();t&&(this.jt=jr(mr("EPSG:4326"),t),this.Mt&&this.set(ro,this.jt(this.Mt)))},n.prototype.Et=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.Ot?this.Ot=navigator.geolocation.watchPosition(this.At.bind(this),this.Ct.bind(this),this.getTrackingOptions()):t||void 0===this.Ot||(navigator.geolocation.clearWatch(this.Ot),this.Ot=void 0)}},n.prototype.At=function(t){var n=t.coords;this.set(Ji,n.accuracy),this.set(to,null===n.altitude?void 0:n.altitude),this.set(no,null===n.altitudeAccuracy?void 0:n.altitudeAccuracy),this.set(eo,null===n.heading?void 0:pe(n.heading)),this.Mt?(this.Mt[0]=n.longitude,this.Mt[1]=n.latitude):this.Mt=[n.longitude,n.latitude];var e=this.jt(this.Mt);this.set(ro,e),this.set(oo,null===n.speed?void 0:n.speed);var r=Wi(this.Mt,n.accuracy);r.applyTransform(this.jt),this.set(Qi,r),this.changed()},n.prototype.Ct=function(t){this.dispatchEvent(new uo(t))},n.prototype.getAccuracy=function(){return this.get(Ji)},n.prototype.getAccuracyGeometry=function(){return this.get(Qi)||null},n.prototype.getAltitude=function(){return this.get(to)},n.prototype.getAltitudeAccuracy=function(){return this.get(no)},n.prototype.getHeading=function(){return this.get(eo)},n.prototype.getPosition=function(){return this.get(ro)},n.prototype.getProjection=function(){return this.get(io)},n.prototype.getSpeed=function(){return this.get(oo)},n.prototype.getTracking=function(){return this.get(so)},n.prototype.getTrackingOptions=function(){return this.get(ao)},n.prototype.setProjection=function(t){this.set(io,mr(t))},n.prototype.setTracking=function(t){this.set(so,t)},n.prototype.setTrackingOptions=function(t){this.set(ao,t)},n}(ot),fo=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ho=function(t){function n(n,e,r,i){var o=t.call(this)||this;return o.extent=n,o.Rt=r,o.resolution=e,o.state=i,o}return fo(n,t),n.prototype.changed=function(){this.dispatchEvent(D)},n.prototype.getExtent=function(){return this.extent},n.prototype.getImage=function(){return r()},n.prototype.getPixelRatio=function(){return this.Rt},n.prototype.getResolution=function(){return this.resolution},n.prototype.getState=function(){return this.state},n.prototype.load=function(){r()},n}(P),lo=0,vo=1,po=2,yo=3,mo=4,bo=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function wo(t,n,e){var r=t,i=!0,o=!1,s=!1,a=[Y(r,Z,(function(){s=!0,o||n()}))];return r.src&&Wt?(o=!0,r.decode().then((function(){i&&n()})).catch((function(t){i&&(s?n():e())}))):a.push(Y(r,N,e)),function(){i=!1,a.forEach(J)}}var go=function(t){function n(n,e,r,i,o,s){var a=t.call(this,n,e,r,lo)||this;return a.Pt=i,a.Dt=new Image,null!==o&&(a.Dt.crossOrigin=o),a.Nt=null,a.state=lo,a.zt=s,a}return bo(n,t),n.prototype.getImage=function(){return this.Dt},n.prototype.Lt=function(){this.state=yo,this.Ft(),this.changed()},n.prototype.Gt=function(){void 0===this.resolution&&(this.resolution=Kn(this.extent)/this.Dt.height),this.state=po,this.Ft(),this.changed()},n.prototype.load=function(){this.state!=lo&&this.state!=yo||(this.state=vo,this.changed(),this.zt(this,this.Pt),this.Nt=wo(this.Dt,this.Gt.bind(this),this.Lt.bind(this)))},n.prototype.setImage=function(t){this.Dt=t,this.resolution=Kn(this.extent)/this.Dt.height},n.prototype.Ft=function(){this.Nt&&(this.Nt(),this.Nt=null)},n}(ho),xo=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ko=function(t){function n(n,e,r,i,o){var s=this,a=void 0!==o?lo:po;return(s=t.call(this,n,e,r,a)||this).B=void 0!==o?o:null,s.Ut=i,s.V=null,s}return xo(n,t),n.prototype.getError=function(){return this.V},n.prototype.Bt=function(t){t?(this.V=t,this.state=yo):this.state=po,this.changed()},n.prototype.load=function(){this.state==lo&&(this.state=vo,this.changed(),this.B(this.Bt.bind(this)))},n.prototype.getImage=function(){return this.Ut},n}(ho);function _o(t,n,e,r){var i;return i=e&&e.length?e.shift():Zt?new OffscreenCanvas(t||300,n||300):document.createElement("canvas"),t&&(i.width=t),n&&(i.height=n),i.getContext("2d",r)}function So(t){var n=t.offsetWidth,e=getComputedStyle(t);return n+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10)}function Mo(t){var n=t.offsetHeight,e=getComputedStyle(t);return n+=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}function jo(t,n){var e=n.parentNode;e&&e.replaceChild(t,n)}function Oo(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function To(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function Eo(t,n){for(var e=t.childNodes,r=0;;++r){var i=e[r],o=n[r];if(!i&&!o)break;i!==o&&(i?o?t.insertBefore(o,i):(t.removeChild(i),--r):t.appendChild(o))}}var Ao=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();var Co=function(t){function n(n,e,r,i,o,s){var a=t.call(this,n,e,s)||this;return a.qt=i,a.Pt=r,a.key=r,a.Dt=new Image,null!==i&&(a.Dt.crossOrigin=i),a.Nt=null,a.$t=o,a}return Ao(n,t),n.prototype.getImage=function(){return this.Dt},n.prototype.setImage=function(t){this.Dt=t,this.state=dt,this.Ft(),this.changed()},n.prototype.Lt=function(){var t;this.state=pt,this.Ft(),this.Dt=((t=_o(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},n.prototype.Gt=function(){var t=this.Dt;t.naturalWidth&&t.naturalHeight?this.state=dt:this.state=yt,this.Ft(),this.changed()},n.prototype.load=function(){this.state==pt&&(this.state=lt,this.Dt=new Image,null!==this.qt&&(this.Dt.crossOrigin=this.qt)),this.state==lt&&(this.state=vt,this.changed(),this.$t(this,this.Pt),this.Nt=wo(this.Dt,this.Gt.bind(this),this.Lt.bind(this)))},n.prototype.Ft=function(){this.Nt&&(this.Nt(),this.Nt=null)},n}(kt),Ro=function(){function t(t,n,e){this.Vt=t,this.Zt=n,this.Wt=e,this.Ht=[],this.Kt=0,this.Xt=0}return t.prototype.begin=function(){this.Ht.length=0,this.Kt=0,this.Xt=0},t.prototype.update=function(t,n){this.Ht.push(t,n,Date.now())},t.prototype.end=function(){if(this.Ht.length<6)return!1;var t=Date.now()-this.Wt,n=this.Ht.length-3;if(this.Ht[n+2]<t)return!1;for(var e=n-3;e>0&&this.Ht[e+2]>t;)e-=3;var r=this.Ht[n+2]-this.Ht[e+2];if(r<1e3/60)return!1;var i=this.Ht[n]-this.Ht[e],o=this.Ht[n+1]-this.Ht[e+1];return this.Kt=Math.atan2(o,i),this.Xt=Math.sqrt(i*i+o*o)/r,this.Xt>this.Zt},t.prototype.getDistance=function(){return(this.Zt-this.Xt)/this.Vt},t.prototype.getAngle=function(){return this.Kt},t}(),Io=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Po=/^([a-z]*)$|^hsla?\(.*\)$/i;function Do(t){return"string"==typeof t?t:Go(t)}function No(t){var n=document.createElement("div");if(n.style.color=t,""!==n.style.color){document.body.appendChild(n);var e=getComputedStyle(n).color;return document.body.removeChild(n),e}return""}var zo=function(){var t={},n=0;return function(e){var r;if(t.hasOwnProperty(e))r=t[e];else{if(n>=1024){var i=0;for(var o in t)0==(3&i++)&&(delete t[o],--n)}r=function(t){var n,e,r,i,o;Po.exec(t)&&(t=No(t));if(Io.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var u=4===s||8===s;n=parseInt(t.substr(1+0*a,a),16),e=parseInt(t.substr(1+1*a,a),16),r=parseInt(t.substr(1+2*a,a),16),i=u?parseInt(t.substr(1+3*a,a),16):255,1==a&&(n=(n<<4)+n,e=(e<<4)+e,r=(r<<4)+r,u&&(i=(i<<4)+i)),o=[n,e,r,i/255]}else 0==t.indexOf("rgba(")?Fo(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),Fo(o)):Mt(!1,14);return o}(e),t[e]=r,++n}return r}}();function Lo(t){return Array.isArray(t)?t:zo(t)}function Fo(t){return t[0]=ue(t[0]+.5|0,0,255),t[1]=ue(t[1]+.5|0,0,255),t[2]=ue(t[2]+.5|0,0,255),t[3]=ue(t[3],0,1),t}function Go(t){var n=t[0];n!=(0|n)&&(n=n+.5|0);var e=t[1];e!=(0|e)&&(e=e+.5|0);var r=t[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+n+","+e+","+r+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function Uo(t){return Po.test(t)&&(t=No(t)),Io.test(t)||0===t.indexOf("rgba(")||0===t.indexOf("rgb(")}var Bo=function(){function t(){this.Yt={},this.Jt=0,this.Qt=32}return t.prototype.clear=function(){this.Yt={},this.Jt=0},t.prototype.canExpireCache=function(){return this.Jt>this.Qt},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var n in this.Yt){var e=this.Yt[n];0!=(3&t++)||e.hasListener()||(delete this.Yt[n],--this.Jt)}}},t.prototype.get=function(t,n,e){var r=qo(t,n,e);return r in this.Yt?this.Yt[r]:null},t.prototype.set=function(t,n,e,r){var i=qo(t,n,e);this.Yt[i]=r,++this.Jt},t.prototype.setSize=function(t){this.Qt=t,this.expire()},t}();function qo(t,n,e){return n+":"+t+":"+(e?Do(e):"null")}var $o=Bo,Vo=new Bo,Zo="opacity",Wo="visible",Ho="extent",Ko="zIndex",Xo="maxResolution",Yo="minResolution",Jo="maxZoom",Qo="minZoom",ts="source",ns="map";function es(t){return(es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var rs=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),is=function(t){function n(n){var e=t.call(this)||this;e.on,e.once,e.un,e.tn=n.background;var r=E({},n);return"object"===es(n.properties)&&(delete r.properties,E(r,n.properties)),r[Zo]=void 0!==n.opacity?n.opacity:1,Mt("number"==typeof r[Zo],64),r[Wo]=void 0===n.visible||n.visible,r[Ko]=n.zIndex,r[Xo]=void 0!==n.maxResolution?n.maxResolution:1/0,r[Yo]=void 0!==n.minResolution?n.minResolution:0,r[Qo]=void 0!==n.minZoom?n.minZoom:-1/0,r[Jo]=void 0!==n.maxZoom?n.maxZoom:1/0,e.nn=void 0!==r.className?n.className:"ol-layer",delete r.className,e.setProperties(r),e.en=null,e}return rs(n,t),n.prototype.getBackground=function(){return this.tn},n.prototype.getClassName=function(){return this.nn},n.prototype.getLayerState=function(t){var n=this.en||{layer:this,managed:void 0===t||t},e=this.getZIndex();return n.opacity=ue(Math.round(100*this.getOpacity())/100,0,1),n.sourceState=this.getSourceState(),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=void 0!==e||n.managed?e:1/0,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.en=n,n},n.prototype.getLayersArray=function(t){return r()},n.prototype.getLayerStatesArray=function(t){return r()},n.prototype.getExtent=function(){return this.get(Ho)},n.prototype.getMaxResolution=function(){return this.get(Xo)},n.prototype.getMinResolution=function(){return this.get(Yo)},n.prototype.getMinZoom=function(){return this.get(Qo)},n.prototype.getMaxZoom=function(){return this.get(Jo)},n.prototype.getOpacity=function(){return this.get(Zo)},n.prototype.getSourceState=function(){return r()},n.prototype.getVisible=function(){return this.get(Wo)},n.prototype.getZIndex=function(){return this.get(Ko)},n.prototype.setBackground=function(t){this.tn=t,this.changed()},n.prototype.setExtent=function(t){this.set(Ho,t)},n.prototype.setMaxResolution=function(t){this.set(Xo,t)},n.prototype.setMinResolution=function(t){this.set(Yo,t)},n.prototype.setMaxZoom=function(t){this.set(Jo,t)},n.prototype.setMinZoom=function(t){this.set(Qo,t)},n.prototype.setOpacity=function(t){Mt("number"==typeof t,64),this.set(Zo,t)},n.prototype.setVisible=function(t){this.set(Wo,t)},n.prototype.setZIndex=function(t){this.set(Ko,t)},n.prototype.disposeInternal=function(){this.en&&(this.en.layer=null,this.en=null),t.prototype.disposeInternal.call(this)},n}(ot),os="prerender",ss="postrender",as="precompose",us="postcompose",cs="rendercomplete",fs="undefined",hs="loading",ls="ready",vs="error",ds=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function ps(t,n){if(!t.visible)return!1;var e=n.resolution;if(e<t.minResolution||e>=t.maxResolution)return!1;var r=n.zoom;return r>t.minZoom&&r<=t.maxZoom}var ys=function(t){function n(n){var e=this,r=E({},n);delete r.source,(e=t.call(this,r)||this).on,e.once,e.un,e.rn=null,e.sn=null,e.an=null,e.cn=null,n.render&&(e.render=n.render),n.map&&e.setMap(n.map),e.addChangeListener(ts,e.fn);var i=n.source?n.source:null;return e.setSource(i),e}return ds(n,t),n.prototype.getLayersArray=function(t){var n=t||[];return n.push(this),n},n.prototype.getLayerStatesArray=function(t){var n=t||[];return n.push(this.getLayerState()),n},n.prototype.getSource=function(){return this.get(ts)||null},n.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():fs},n.prototype.hn=function(){this.changed()},n.prototype.fn=function(){this.an&&(J(this.an),this.an=null);var t=this.getSource();t&&(this.an=X(t,D,this.hn,this)),this.changed()},n.prototype.getFeatures=function(t){return this.cn?this.cn.getFeatures(t):new Promise((function(t){return t([])}))},n.prototype.render=function(t,n){var e=this.getRenderer();if(e.prepareFrame(t))return e.renderFrame(t,n)},n.prototype.setMapInternal=function(t){this.set(ns,t)},n.prototype.getMapInternal=function(){return this.get(ns)},n.prototype.setMap=function(t){this.rn&&(J(this.rn),this.rn=null),t||this.changed(),this.sn&&(J(this.sn),this.sn=null),t&&(this.rn=X(t,as,(function(t){var n=t.frameState.layerStatesArray,e=this.getLayerState(!1);Mt(!n.some((function(t){return t.layer===e.layer})),67),n.push(e)}),this),this.sn=X(this,D,t.render,t),this.changed())},n.prototype.setSource=function(t){this.set(ts,t)},n.prototype.getRenderer=function(){return this.cn||(this.cn=this.createRenderer()),this.cn},n.prototype.hasRenderer=function(){return!!this.cn},n.prototype.createRenderer=function(){return null},n.prototype.disposeInternal=function(){this.cn&&(this.cn.dispose(),delete this.cn),this.setSource(null),t.prototype.disposeInternal.call(this)},n}(is),ms=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function bs(t,n){Vo.expire()}var ws=function(t){function n(n){var e=t.call(this)||this;return e.vn=n,e}return ms(n,t),n.prototype.dispatchRenderEvent=function(t,n){r()},n.prototype.calculateMatrices2D=function(t){var n=t.viewState,e=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;an(e,t.size[0]/2,t.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),un(r,e)},n.prototype.forEachFeatureAtCoordinate=function(t,n,e,r,i,o,s,a){var u,c=n.viewState;function f(t,n,e,r){return i.call(o,n,t?e:null,r)}var h=c.projection,l=hr(t.slice(),h),v=[[0,0]];if(h.canWrapX()&&r){var d=Qn(h.getExtent());v.push([-d,0],[d,0])}for(var p=n.layerStatesArray,y=p.length,m=[],b=[],w=0;w<v.length;w++)for(var g=y-1;g>=0;--g){var x=p[g],k=x.layer;if(k.hasRenderer()&&ps(x,c)&&s.call(a,k)){var _=k.getRenderer(),S=k.getSource();if(_&&S){var M=S.getWrapX()?l:t,j=f.bind(null,x.managed);b[0]=M[0]+v[w][0],b[1]=M[1]+v[w][1],u=_.forEachFeatureAtCoordinate(b,n,e,j,m)}if(u)return u}}if(0!==m.length){var O=1/m.length;return m.forEach((function(t,n){return t.distanceSq+=n*O})),m.sort((function(t,n){return t.distanceSq-n.distanceSq})),m.some((function(t){return u=t.callback(t.feature,t.layer,t.geometry)})),u}},n.prototype.forEachLayerAtPixel=function(t,n,e,i,o){return r()},n.prototype.hasFeatureAtCoordinate=function(t,n,e,r,i,o){return void 0!==this.forEachFeatureAtCoordinate(t,n,e,r,S,this,i,o)},n.prototype.getMap=function(){return this.vn},n.prototype.renderFrame=function(t){r()},n.prototype.scheduleExpireIconCache=function(t){Vo.canExpireCache()&&t.postRenderFunctions.push(bs)},n}(v),gs=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),xs=function(t){function n(n,e,r,i){var o=t.call(this,n)||this;return o.inversePixelTransform=e,o.frameState=r,o.context=i,o}return gs(n,t),n}(h),ks="ol-hidden",_s="ol-selectable",Ss="ol-unselectable",Ms="ol-unsupported",js="ol-control",Os="ol-collapsed",Ts=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),Es=["style","variant","weight","size","lineHeight","family"],As=function(t){var n=t.match(Ts);if(!n)return null;for(var e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,i=Es.length;r<i;++r){var o=n[r+1];void 0!==o&&(e[Es[r]]=o)}return e.families=e.family.split(/,\s?/),e};function Cs(t){return 1===t?"":String(Math.round(100*t)/100)}var Rs="10px sans-serif",Is="#000",Ps="round",Ds=[],Ns="round",zs=10,Ls="#000",Fs="center",Gs="middle",Us=[0,0,0,0],Bs=new ot,qs=new P;qs.setSize=function(){console.warn("labelCache is deprecated.")};var $s,Vs,Zs=null,Ws={},Hs=function(){var t,n,e="32px ",r=["monospace","serif"],i=r.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,s,a){for(var u=!0,c=0;c<i;++c){var f=r[c];if(n=Ys(t+" "+s+" "+e+f,o),a!=f){var h=Ys(t+" "+s+" "+e+a+","+f,o);u=u&&h!=n}}return!!u}function a(){for(var n=!0,e=Bs.getKeys(),r=0,i=e.length;r<i;++r){var o=e[r];Bs.get(o)<100&&(s.apply(this,o.split("\n"))?(A(Ws),Zs=null,$s=void 0,Bs.set(o,100)):(Bs.set(o,Bs.get(o)+1,!0),n=!1))}n&&(clearInterval(t),t=void 0)}return function(n){var e=As(n);if(e)for(var r=e.families,i=0,o=r.length;i<o;++i){var u=r[i],c=e.style+"\n"+e.weight+"\n"+u;void 0===Bs.get(c)&&(Bs.set(c,100,!0),s(e.style,e.weight,u)||(Bs.set(c,0,!0),void 0===t&&(t=setInterval(a,32))))}}}(),Ks=function(t){var n=Ws[t];if(null==n){if(Zt){var e=As(t),r=Xs(t,"Žg");n=(isNaN(Number(e.lineHeight))?1.2:Number(e.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else Vs||((Vs=document.createElement("div")).innerHTML="M",Vs.style.minHeight="0",Vs.style.maxHeight="none",Vs.style.height="auto",Vs.style.padding="0",Vs.style.border="none",Vs.style.position="absolute",Vs.style.display="block",Vs.style.left="-99999px"),Vs.style.font=t,document.body.appendChild(Vs),n=Vs.offsetHeight,document.body.removeChild(Vs);Ws[t]=n}return n};function Xs(t,n){return Zs||(Zs=_o(1,1)),t!=$s&&(Zs.font=t,$s=Zs.font),Zs.measureText(n)}function Ys(t,n){return Xs(t,n).width}function Js(t,n,e){if(n in e)return e[n];var r=Ys(t,n);return e[n]=r,r}function Qs(t,n,e){for(var r=n.length,i=0,o=0;o<r;++o){var s=Ys(t,n[o]);i=Math.max(i,s),e.push(s)}return i}function ta(t,n,e,r,i,o,s,a,u,c,f){t.save(),1!==e&&(t.globalAlpha*=e),n&&t.setTransform.apply(t,n),r.contextInstructions?(t.translate(u,c),t.scale(f[0],f[1]),function(t,n){for(var e=t.contextInstructions,r=0,i=e.length;r<i;r+=2)Array.isArray(e[r+1])?n[e[r]].apply(n,e[r+1]):n[e[r]]=e[r+1]}(r,t)):f[0]<0||f[1]<0?(t.translate(u,c),t.scale(f[0],f[1]),t.drawImage(r,i,o,s,a,0,0,s,a)):t.drawImage(r,i,o,s,a,u,c,s*f[0],a*f[1]),t.restore()}var na=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ea=function(t){function n(n){var e=t.call(this,n)||this;e.dn=X(Bs,l,n.redrawText.bind(n)),e.pn=document.createElement("div");var r=e.pn.style;r.position="absolute",r.width="100%",r.height="100%",r.zIndex="0",e.pn.className="ol-unselectable ol-layers";var i=n.getViewport();return i.insertBefore(e.pn,i.firstChild||null),e.yn=[],e.mn=!0,e}return na(n,t),n.prototype.dispatchRenderEvent=function(t,n){var e=this.getMap();if(e.hasListener(t)){var r=new xs(t,void 0,n);e.dispatchEvent(r)}},n.prototype.disposeInternal=function(){J(this.dn),this.pn.parentNode.removeChild(this.pn),t.prototype.disposeInternal.call(this)},n.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(as,t);var n=t.layerStatesArray.sort((function(t,n){return t.zIndex-n.zIndex})),e=t.viewState;this.yn.length=0;for(var r=[],i=null,o=0,s=n.length;o<s;++o){var a=n[o];if(t.layerIndex=o,ps(a,e)&&(a.sourceState==ls||a.sourceState==fs)){var u=a.layer,c=u.render(t,i);c&&(c!==i&&(this.yn.push(c),i=c),"getDeclutter"in u&&r.push(u))}}for(o=r.length-1;o>=0;--o)r[o].renderDeclutter(t);Eo(this.pn,this.yn),this.dispatchRenderEvent(us,t),this.mn||(this.pn.style.display="",this.mn=!0),this.scheduleExpireIconCache(t)}else this.mn&&(this.pn.style.display="none",this.mn=!1)},n.prototype.forEachLayerAtPixel=function(t,n,e,r,i){for(var o=n.viewState,s=n.layerStatesArray,a=s.length-1;a>=0;--a){var u=s[a],c=u.layer;if(c.hasRenderer()&&ps(u,o)&&i(c)){var f=c.getRenderer().getDataAtPixel(t,n,e);if(f){var h=r(c,f);if(h)return h}}}},n}(ws),ra=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ia=function(t){function n(n,e){var r=t.call(this,n)||this;return r.layer=e,r}return ra(n,t),n}(h),oa="layers",sa=function(t){function n(n){var e=this,r=n||{},i=E({},r);delete i.layers;var o=r.layers;return(e=t.call(this,i)||this).on,e.once,e.un,e.bn=[],e.wn={},e.addChangeListener(oa,e.gn),o?Array.isArray(o)?o=new ht(o.slice(),{unique:!0}):Mt("function"==typeof o.getArray,43):o=new ht(void 0,{unique:!0}),e.setLayers(o),e}return ra(n,t),n.prototype.xn=function(){this.changed()},n.prototype.gn=function(){this.bn.forEach(J),this.bn.length=0;var t=this.getLayers();for(var n in this.bn.push(X(t,st,this.kn,this),X(t,at,this._n,this)),this.wn)this.wn[n].forEach(J);A(this.wn);for(var e=t.getArray(),r=0,i=e.length;r<i;r++){var o=e[r];this.Sn(o),this.dispatchEvent(new ia("addlayer",o))}this.changed()},n.prototype.Sn=function(t){var e=[X(t,l,this.xn,this),X(t,D,this.xn,this)];t instanceof n&&e.push(X(t,"addlayer",this.Mn,this),X(t,"removelayer",this.jn,this)),this.wn[o(t)]=e},n.prototype.Mn=function(t){this.dispatchEvent(new ia("addlayer",t.layer))},n.prototype.jn=function(t){this.dispatchEvent(new ia("removelayer",t.layer))},n.prototype.kn=function(t){var n=t.element;this.Sn(n),this.dispatchEvent(new ia("addlayer",n)),this.changed()},n.prototype._n=function(t){var n=t.element,e=o(n);this.wn[e].forEach(J),delete this.wn[e],this.dispatchEvent(new ia("removelayer",n)),this.changed()},n.prototype.getLayers=function(){return this.get(oa)},n.prototype.setLayers=function(t){var n=this.getLayers();if(n)for(var e=n.getArray(),r=0,i=e.length;r<i;++r)this.dispatchEvent(new ia("removelayer",e[r]));this.set(oa,t)},n.prototype.getLayersArray=function(t){var n=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(n)})),n},n.prototype.getLayerStatesArray=function(t){var n=void 0!==t?t:[],e=n.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(n)}));var r=this.getLayerState(),i=r.zIndex;t||void 0!==r.zIndex||(i=0);for(var o=e,s=n.length;o<s;o++){var a=n[o];a.opacity*=r.opacity,a.visible=a.visible&&r.visible,a.maxResolution=Math.min(a.maxResolution,r.maxResolution),a.minResolution=Math.max(a.minResolution,r.minResolution),a.minZoom=Math.max(a.minZoom,r.minZoom),a.maxZoom=Math.min(a.maxZoom,r.maxZoom),void 0!==r.extent&&(void 0!==a.extent?a.extent=Xn(a.extent,r.extent):a.extent=r.extent),void 0===a.zIndex&&(a.zIndex=i)}return n},n.prototype.getSourceState=function(){return ls},n}(is),aa=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ua=function(t){function n(n,e,r){var i=t.call(this,n)||this;return i.map=e,i.frameState=void 0!==r?r:null,i}return aa(n,t),n}(h),ca=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),fa=function(t){function n(n,e,r,i,o){var s=t.call(this,n,e,o)||this;return s.originalEvent=r,s.On=null,s.Tn=null,s.dragging=void 0!==i&&i,s}return ca(n,t),Object.defineProperty(n.prototype,"pixel",{get:function(){return this.On||(this.On=this.map.getEventPixel(this.originalEvent)),this.On},set:function(t){this.On=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"coordinate",{get:function(){return this.Tn||(this.Tn=this.map.getCoordinateFromPixel(this.pixel)),this.Tn},set:function(t){this.Tn=t},enumerable:!1,configurable:!0}),n.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},n.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},n}(ua),ha={SINGLECLICK:"singleclick",CLICK:F,DBLCLICK:G,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},la="pointermove",va="pointerdown",da="pointerup",pa="pointerout",ya=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ma=function(t){function n(n,e){var r=t.call(this,n)||this;r.vn=n,r.En,r.An=!1,r.Cn=!1,r.Rn=[],r.In=void 0===e?1:e,r.Pn=null;var i=r.vn.getViewport();return r.Dn=0,r.Nn={},r.pn=i,r.zn=X(i,va,r.Ln,r),r.Fn,r.Gn=X(i,la,r.Un,r),r.Bn=r.qn.bind(r),r.pn.addEventListener(H,r.Bn,!!Ht&&{passive:!1}),r}return ya(n,t),n.prototype.$n=function(t){var n=new fa(ha.CLICK,this.vn,t);this.dispatchEvent(n),void 0!==this.En?(clearTimeout(this.En),this.En=void 0,n=new fa(ha.DBLCLICK,this.vn,t),this.dispatchEvent(n)):this.En=setTimeout(function(){this.En=void 0;var n=new fa(ha.SINGLECLICK,this.vn,t);this.dispatchEvent(n)}.bind(this),250)},n.prototype.Vn=function(t){var n=t;n.type==ha.POINTERUP||n.type==ha.POINTERCANCEL?delete this.Nn[n.pointerId]:n.type==ha.POINTERDOWN&&(this.Nn[n.pointerId]=!0),this.Dn=Object.keys(this.Nn).length},n.prototype.Zn=function(t){this.Vn(t);var n=new fa(ha.POINTERUP,this.vn,t);this.dispatchEvent(n),this.An&&!n.defaultPrevented&&!this.Cn&&this.Wn(t)&&this.$n(this.Pn),0===this.Dn&&(this.Rn.forEach(J),this.Rn.length=0,this.Cn=!1,this.Pn=null)},n.prototype.Wn=function(t){return 0===t.button},n.prototype.Ln=function(t){this.An=0===this.Dn,this.Vn(t);var n=new fa(ha.POINTERDOWN,this.vn,t);for(var e in this.dispatchEvent(n),this.Pn={},t){var r=t[e];this.Pn[e]="function"==typeof r?j:r}if(0===this.Rn.length){var i=this.vn.getOwnerDocument();this.Rn.push(X(i,ha.POINTERMOVE,this.Hn,this),X(i,ha.POINTERUP,this.Zn,this),X(this.pn,ha.POINTERCANCEL,this.Zn,this)),this.pn.getRootNode&&this.pn.getRootNode()!==i&&this.Rn.push(X(this.pn.getRootNode(),ha.POINTERUP,this.Zn,this))}},n.prototype.Hn=function(t){if(this.Kn(t)){this.Cn=!0;var n=new fa(ha.POINTERDRAG,this.vn,t,this.Cn);this.dispatchEvent(n)}},n.prototype.Un=function(t){this.Fn=t;var n=!(!this.Pn||!this.Kn(t));this.dispatchEvent(new fa(t.type,this.vn,t,n))},n.prototype.qn=function(t){var n=this.Fn;n&&!n.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()},n.prototype.Kn=function(t){return this.Cn||Math.abs(t.clientX-this.Pn.clientX)>this.In||Math.abs(t.clientY-this.Pn.clientY)>this.In},n.prototype.disposeInternal=function(){this.Gn&&(J(this.Gn),this.Gn=null),this.pn.removeEventListener(H,this.Bn),this.zn&&(J(this.zn),this.zn=null),this.Rn.forEach(J),this.Rn.length=0,this.pn=null,t.prototype.disposeInternal.call(this)},n}(P),ba="postrender",wa="movestart",ga="moveend",xa="layergroup",ka="size",_a="target",Sa="view",Ma=1/0,ja=function(){function t(t,n){this.Xn=t,this.Yn=n,this.Jn=[],this.Qn=[],this.te={}}return t.prototype.clear=function(){this.Jn.length=0,this.Qn.length=0,A(this.te)},t.prototype.dequeue=function(){var t=this.Jn,n=this.Qn,e=t[0];1==t.length?(t.length=0,n.length=0):(t[0]=t.pop(),n[0]=n.pop(),this.ne(0));var r=this.Yn(e);return delete this.te[r],e},t.prototype.enqueue=function(t){Mt(!(this.Yn(t)in this.te),31);var n=this.Xn(t);return n!=Ma&&(this.Jn.push(t),this.Qn.push(n),this.te[this.Yn(t)]=!0,this.ee(0,this.Jn.length-1),!0)},t.prototype.getCount=function(){return this.Jn.length},t.prototype.re=function(t){return 2*t+1},t.prototype.ie=function(t){return 2*t+2},t.prototype.oe=function(t){return t-1>>1},t.prototype.se=function(){var t;for(t=(this.Jn.length>>1)-1;t>=0;t--)this.ne(t)},t.prototype.isEmpty=function(){return 0===this.Jn.length},t.prototype.isKeyQueued=function(t){return t in this.te},t.prototype.isQueued=function(t){return this.isKeyQueued(this.Yn(t))},t.prototype.ne=function(t){for(var n=this.Jn,e=this.Qn,r=n.length,i=n[t],o=e[t],s=t;t<r>>1;){var a=this.re(t),u=this.ie(t),c=u<r&&e[u]<e[a]?u:a;n[t]=n[c],e[t]=e[c],t=c}n[t]=i,e[t]=o,this.ee(s,t)},t.prototype.ee=function(t,n){for(var e=this.Jn,r=this.Qn,i=e[n],o=r[n];n>t;){var s=this.oe(n);if(!(r[s]>o))break;e[n]=e[s],r[n]=r[s],n=s}e[n]=i,r[n]=o},t.prototype.reprioritize=function(){var t,n,e,r=this.Xn,i=this.Jn,o=this.Qn,s=0,a=i.length;for(n=0;n<a;++n)(e=r(t=i[n]))==Ma?delete this.te[this.Yn(t)]:(o[s]=e,i[s++]=t);i.length=s,o.length=s,this.se()},t}(),Oa=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ta=function(t){function n(n,e){var r=t.call(this,(function(t){return n.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return r.ae=r.handleTileChange.bind(r),r.ue=e,r.ce=0,r.fe={},r}return Oa(n,t),n.prototype.enqueue=function(n){var e=t.prototype.enqueue.call(this,n);e&&n[0].addEventListener(D,this.ae);return e},n.prototype.getTilesLoading=function(){return this.ce},n.prototype.handleTileChange=function(t){var n=t.target,e=n.getState();if(e===dt||e===pt||e===yt){n.removeEventListener(D,this.ae);var r=n.getKey();r in this.fe&&(delete this.fe[r],--this.ce),this.ue()}},n.prototype.loadMoreTiles=function(t,n){for(var e,r,i=0;this.ce<t&&i<n&&this.getCount()>0;)r=(e=this.dequeue()[0]).getKey(),e.getState()!==lt||r in this.fe||(this.fe[r]=!0,++this.ce,++i,e.load())},n}(ja);function Ea(t,n,e,r,i){if(!t||!(e in t.wantedTiles))return Ma;if(!t.wantedTiles[e][n.getKey()])return Ma;var o=t.viewState.center,s=r[0]-o[0],a=r[1]-o[1];return 65536*Math.log(i)+Math.sqrt(s*s+a*a)/i}var Aa=0,Ca=1,Ra={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Ia=256;function Pa(t,n,e){return function(r,i,o,s,a){if(r){var u=n?0:o[0]*i,c=n?0:o[1]*i,f=a?a[0]:0,h=a?a[1]:0,l=t[0]+u/2+f,v=t[2]-u/2+f,d=t[1]+c/2+h,p=t[3]-c/2+h;l>v&&(v=l=(v+l)/2),d>p&&(p=d=(p+d)/2);var y=ue(r[0],l,v),m=ue(r[1],d,p),b=30*i;return s&&e&&(y+=-b*Math.log(1+Math.max(0,l-r[0])/b)+b*Math.log(1+Math.max(0,r[0]-v)/b),m+=-b*Math.log(1+Math.max(0,d-r[1])/b)+b*Math.log(1+Math.max(0,r[1]-p)/b)),[y,m]}}}function Da(t){return t}function Na(t,n,e,r){var i=Qn(n)/e[0],o=Kn(n)/e[1];return r?Math.min(t,Math.max(i,o)):Math.min(t,Math.min(i,o))}function za(t,n,e){var r=Math.min(t,n);return r*=Math.log(1+50*Math.max(0,t/n-1))/50+1,e&&(r=Math.max(r,e),r/=Math.log(1+50*Math.max(0,e/t-1))/50+1),ue(r,e/2,2*n)}function La(t,n,e,r){return function(i,o,s,a){if(void 0!==i){var u=t[0],c=t[t.length-1],f=e?Na(u,e,s,r):u;if(a)return void 0===n||n?za(i,f,c):ue(i,c,f);var h=Math.min(f,i),l=Math.floor(m(t,h,o));return t[l]>f&&l<t.length-1?t[l+1]:t[l]}}}function Fa(t,n,e,r,i,o){return function(s,a,u,c){if(void 0!==s){var f=i?Na(n,i,u,o):n,h=void 0!==e?e:0;if(c)return void 0===r||r?za(s,f,h):ue(s,h,f);var l=Math.ceil(Math.log(n/f)/Math.log(t)-1e-9),v=-a*(.5-1e-9)+.5,d=Math.min(f,s),p=Math.floor(Math.log(n/d)/Math.log(t)+v),y=Math.max(l,p);return ue(n/Math.pow(t,y),h,f)}}}function Ga(t,n,e,r,i){return function(o,s,a,u){if(void 0!==o){var c=r?Na(t,r,a,i):t;return(void 0===e||e)&&u?za(o,c,n):ue(o,n,c)}}}function Ua(t){return void 0!==t?0:void 0}function Ba(t){return void 0!==t?t:void 0}function qa(t){var n=2*Math.PI/t;return function(t,e){return e?t:void 0!==t?t=Math.floor(t/n+.5)*n:void 0}}function $a(t){var n=t||pe(5);return function(t,e){return e?t:void 0!==t?Math.abs(t)<=n?0:t:void 0}}var Va=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function Za(t,n){setTimeout((function(){t(n)}),0)}function Wa(t){if(void 0!==t.extent){var n=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Pa(t.extent,t.constrainOnlyCenter,n)}var e=xr(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){var r=e.getExtent().slice();return r[0]=-1/0,r[2]=1/0,Pa(r,!1,!1)}return Da}function Ha(t){var n,e,r,i=void 0!==t.minZoom?t.minZoom:0,o=void 0!==t.maxZoom?t.maxZoom:28,s=void 0!==t.zoomFactor?t.zoomFactor:2,a=void 0!==t.multiWorld&&t.multiWorld,u=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,c=void 0!==t.showFullExtent&&t.showFullExtent,f=xr(t.projection,"EPSG:3857"),h=f.getExtent(),l=t.constrainOnlyCenter,v=t.extent;if(a||v||!f.isGlobal()||(l=!1,v=h),void 0!==t.resolutions){var d=t.resolutions;e=d[i],r=void 0!==d[o]?d[o]:d[d.length-1],n=t.constrainResolution?La(d,u,!l&&v,c):Ga(e,r,u,!l&&v,c)}else{var p=(h?Math.max(Qn(h),Kn(h)):360*zt[Ft.DEGREES]/f.getMetersPerUnit())/Ia/Math.pow(2,0),y=p/Math.pow(2,28);void 0!==(e=t.maxResolution)?i=0:e=p/Math.pow(s,i),void 0===(r=t.minResolution)&&(r=void 0!==t.maxZoom?void 0!==t.maxResolution?e/Math.pow(s,o):p/Math.pow(s,o):y),o=i+Math.floor(Math.log(e/r)/Math.log(s)),r=e/Math.pow(s,o-i),n=t.constrainResolution?Fa(s,e,r,u,!l&&v,c):Ga(e,r,u,!l&&v,c)}return{constraint:n,maxResolution:e,minResolution:r,minZoom:i,zoomFactor:s}}function Ka(t){if(void 0===t.enableRotation||t.enableRotation){var n=t.constrainRotation;return void 0===n||!0===n?$a():!1===n?Ba:"number"==typeof n?qa(n):Ba}return Ua}function Xa(t){return!(t.sourceCenter&&t.targetCenter&&!ir(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function Ya(t,n,e,r,i){var o=Math.cos(-i),s=Math.sin(-i),a=t[0]*o-t[1]*s,u=t[1]*o+t[0]*s;return[(a+=(n[0]/2-e[0])*r)*o-(u+=(e[1]-n[1]/2)*r)*(s=-s),u*o+a*s]}var Ja=function(t){function n(n){var e=t.call(this)||this;e.on,e.once,e.un;var r=E({},n);return e.he=[0,0],e.le=[],e.ve,e.de=xr(r.projection,"EPSG:3857"),e.pe=[100,100],e.ye=null,e.me,e.be,e.we=null,e.ge,e.xe,e.ke=void 0,r.center&&(r.center=Pr(r.center,e.de)),r.extent&&(r.extent=Nr(r.extent,e.de)),e._e(r),e}return Va(n,t),n.prototype._e=function(t){var n=E({},t);for(var e in Ra)delete n[e];this.setProperties(n,!0);var r=Ha(t);this.Se=r.maxResolution,this.Me=r.minResolution,this.je=r.zoomFactor,this.Oe=t.resolutions,this.Te=t.padding,this.Ee=r.minZoom;var i=Wa(t),o=r.constraint,s=Ka(t);this.Ae={center:i,resolution:o,rotation:s},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)},Object.defineProperty(n.prototype,"padding",{get:function(){return this.Te},set:function(t){var n=this.Te;this.Te=t;var e=this.getCenter();if(e){var r=t||[0,0,0,0];n=n||[0,0,0,0];var i=this.getResolution(),o=i/2*(r[3]-n[3]+n[1]-r[1]),s=i/2*(r[0]-n[0]+n[2]-r[2]);this.setCenterInternal([e[0]+o,e[1]-s])}},enumerable:!1,configurable:!0}),n.prototype.Ce=function(t){var n=this.getProperties();return void 0!==n.resolution?n.resolution=this.getResolution():n.zoom=this.getZoom(),n.center=this.getCenterInternal(),n.rotation=this.getRotation(),E({},n,t)},n.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var n=new Array(arguments.length),e=0;e<n.length;++e){var r=arguments[e];r.center&&((r=E({},r)).center=Pr(r.center,this.getProjection())),r.anchor&&((r=E({},r)).anchor=Pr(r.anchor,this.getProjection())),n[e]=r}this.animateInternal.apply(this,n)},n.prototype.animateInternal=function(t){var n,e=arguments.length;e>1&&"function"==typeof arguments[e-1]&&(n=arguments[e-1],--e);for(var r=0;r<e&&!this.isDef();++r){var i=arguments[r];i.center&&this.setCenterInternal(i.center),void 0!==i.zoom?this.setZoom(i.zoom):i.resolution&&this.setResolution(i.resolution),void 0!==i.rotation&&this.setRotation(i.rotation)}if(r!==e){for(var o=Date.now(),s=this.ye.slice(),a=this.me,u=this.be,c=[];r<e;++r){var f=arguments[r],h={start:o,complete:!1,anchor:f.anchor,duration:void 0!==f.duration?f.duration:1e3,easing:f.easing||wt,callback:n};if(f.center&&(h.sourceCenter=s,h.targetCenter=f.center.slice(),s=h.targetCenter),void 0!==f.zoom?(h.sourceResolution=a,h.targetResolution=this.getResolutionForZoom(f.zoom),a=h.targetResolution):f.resolution&&(h.sourceResolution=a,h.targetResolution=f.resolution,a=h.targetResolution),void 0!==f.rotation){h.sourceRotation=u;var l=ye(f.rotation-u+Math.PI,2*Math.PI)-Math.PI;h.targetRotation=u+l,u=h.targetRotation}Xa(h)?h.complete=!0:o+=h.duration,c.push(h)}this.le.push(c),this.setHint(Aa,1),this.Re()}else n&&Za(n,!0)},n.prototype.getAnimating=function(){return this.he[Aa]>0},n.prototype.getInteracting=function(){return this.he[Ca]>0},n.prototype.cancelAnimations=function(){var t;this.setHint(Aa,-this.he[Aa]);for(var n=0,e=this.le.length;n<e;++n){var r=this.le[n];if(r[0].callback&&Za(r[0].callback,!1),!t)for(var i=0,o=r.length;i<o;++i){var s=r[i];if(!s.complete){t=s.anchor;break}}}this.le.length=0,this.ke=t,this.we=null,this.ge=NaN,this.xe=NaN},n.prototype.Re=function(){if(void 0!==this.ve&&(cancelAnimationFrame(this.ve),this.ve=void 0),this.getAnimating()){for(var t=Date.now(),n=!1,e=this.le.length-1;e>=0;--e){for(var r=this.le[e],i=!0,o=0,s=r.length;o<s;++o){var a=r[o];if(!a.complete){var u=t-a.start,c=a.duration>0?u/a.duration:1;c>=1?(a.complete=!0,c=1):i=!1;var f=a.easing(c);if(a.sourceCenter){var h=a.sourceCenter[0],l=a.sourceCenter[1],v=a.targetCenter[0],d=a.targetCenter[1];this.we=a.targetCenter;var p=h+f*(v-h),y=l+f*(d-l);this.ye=[p,y]}if(a.sourceResolution&&a.targetResolution){var m=1===f?a.targetResolution:a.sourceResolution+f*(a.targetResolution-a.sourceResolution);if(a.anchor){var b=this.Pe(this.getRotation()),w=this.Ae.resolution(m,0,b,!0);this.ye=this.calculateCenterZoom(w,a.anchor)}this.ge=a.targetResolution,this.me=m,this.De(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var g=1===f?ye(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+f*(a.targetRotation-a.sourceRotation);if(a.anchor){var x=this.Ae.rotation(g,!0);this.ye=this.calculateCenterRotate(x,a.anchor)}this.xe=a.targetRotation,this.be=g}if(this.De(!0),n=!0,!a.complete)break}}if(i){this.le[e]=null,this.setHint(Aa,-1),this.we=null,this.ge=NaN,this.xe=NaN;var k=r[0].callback;k&&Za(k,!0)}}this.le=this.le.filter(Boolean),n&&void 0===this.ve&&(this.ve=requestAnimationFrame(this.Re.bind(this)))}},n.prototype.calculateCenterRotate=function(t,n){var e,r=this.getCenterInternal();return void 0!==r&&(or(e=[r[0]-n[0],r[1]-n[1]],t-this.getRotation()),Qe(e,n)),e},n.prototype.calculateCenterZoom=function(t,n){var e,r=this.getCenterInternal(),i=this.getResolution();void 0!==r&&void 0!==i&&(e=[n[0]-t*(n[0]-r[0])/i,n[1]-t*(n[1]-r[1])/i]);return e},n.prototype.Pe=function(t){var n=this.pe;if(t){var e=n[0],r=n[1];return[Math.abs(e*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(e*Math.sin(t))+Math.abs(r*Math.cos(t))]}return n},n.prototype.setViewportSize=function(t){this.pe=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},n.prototype.getCenter=function(){var t=this.getCenterInternal();return t?Ir(t,this.getProjection()):t},n.prototype.getCenterInternal=function(){return this.get(Ra.CENTER)},n.prototype.getConstraints=function(){return this.Ae},n.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},n.prototype.getHints=function(t){return void 0!==t?(t[0]=this.he[0],t[1]=this.he[1],t):this.he.slice()},n.prototype.calculateExtent=function(t){return Dr(this.calculateExtentInternal(t),this.getProjection())},n.prototype.calculateExtentInternal=function(t){var n=t||this.Ne(),e=this.getCenterInternal();Mt(e,1);var r=this.getResolution();Mt(void 0!==r,2);var i=this.getRotation();return Mt(void 0!==i,3),Hn(e,r,i,n)},n.prototype.getMaxResolution=function(){return this.Se},n.prototype.getMinResolution=function(){return this.Me},n.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.Me)},n.prototype.setMaxZoom=function(t){this._e(this.Ce({maxZoom:t}))},n.prototype.getMinZoom=function(){return this.getZoomForResolution(this.Se)},n.prototype.setMinZoom=function(t){this._e(this.Ce({minZoom:t}))},n.prototype.setConstrainResolution=function(t){this._e(this.Ce({constrainResolution:t}))},n.prototype.getProjection=function(){return this.de},n.prototype.getResolution=function(){return this.get(Ra.RESOLUTION)},n.prototype.getResolutions=function(){return this.Oe},n.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(Nr(t,this.getProjection()),n)},n.prototype.getResolutionForExtentInternal=function(t,n){var e=n||this.Ne(),r=Qn(t)/e[0],i=Kn(t)/e[1];return Math.max(r,i)},n.prototype.getResolutionForValueFunction=function(t){var n=t||2,e=this.getConstrainedResolution(this.Se),r=this.Me,i=Math.log(e/r)/Math.log(n);return function(t){return e/Math.pow(n,t*i)}},n.prototype.getRotation=function(){return this.get(Ra.ROTATION)},n.prototype.getValueForResolutionFunction=function(t){var n=Math.log(t||2),e=this.getConstrainedResolution(this.Se),r=this.Me,i=Math.log(e/r)/n;return function(t){return Math.log(e/t)/n/i}},n.prototype.Ne=function(t){var n=this.Pe(t),e=this.Te;return e&&(n=[n[0]-e[1]-e[3],n[1]-e[0]-e[2]]),n},n.prototype.getState=function(){var t=this.getProjection(),n=this.getResolution(),e=this.getRotation(),r=this.getCenterInternal(),i=this.Te;if(i){var o=this.Ne();r=Ya(r,this.Pe(),[o[0]/2+i[3],o[1]/2+i[0]],n,e)}return{center:r.slice(0),projection:void 0!==t?t:null,resolution:n,nextCenter:this.we,nextResolution:this.ge,nextRotation:this.xe,rotation:e,zoom:this.getZoom()}},n.prototype.getZoom=function(){var t,n=this.getResolution();return void 0!==n&&(t=this.getZoomForResolution(n)),t},n.prototype.getZoomForResolution=function(t){var n,e,r=this.Ee||0;if(this.Oe){var i=m(this.Oe,t,1);r=i,n=this.Oe[i],e=i==this.Oe.length-1?2:n/this.Oe[i+1]}else n=this.Se,e=this.je;return r+Math.log(n/t)/Math.log(e)},n.prototype.getResolutionForZoom=function(t){if(this.Oe){if(this.Oe.length<=1)return 0;var n=ue(Math.floor(t),0,this.Oe.length-2),e=this.Oe[n]/this.Oe[n+1];return this.Oe[n]/Math.pow(e,ue(t-n,0,1))}return this.Se/Math.pow(this.je,t-this.Ee)},n.prototype.fit=function(t,n){var e;if(Mt(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))Mt(!ne(t),25),e=Hi(r=Nr(t,this.getProjection()));else if(t.getType()===It.CIRCLE){var r;(e=Hi(r=Nr(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),Zn(r))}else{var i=Rr();e=i?t.clone().transform(i,this.getProjection()):t}this.fitInternal(e,n)},n.prototype.rotatedExtentForGeometry=function(t){for(var n=this.getRotation(),e=Math.cos(n),r=Math.sin(-n),i=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,u=-1/0,c=-1/0,f=0,h=i.length;f<h;f+=o){var l=i[f]*e-i[f+1]*r,v=i[f]*r+i[f+1]*e;s=Math.min(s,l),a=Math.min(a,v),u=Math.max(u,l),c=Math.max(c,v)}return[s,a,u,c]},n.prototype.fitInternal=function(t,n){var e=n||{},r=e.size;r||(r=this.Ne());var i,o=void 0!==e.padding?e.padding:[0,0,0,0],s=void 0!==e.nearest&&e.nearest;i=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.getResolutionForZoom(e.maxZoom):0;var a=this.rotatedExtentForGeometry(t),u=this.getResolutionForExtentInternal(a,[r[0]-o[1]-o[3],r[1]-o[0]-o[2]]);u=isNaN(u)?i:Math.max(u,i),u=this.getConstrainedResolution(u,s?0:1);var c=this.getRotation(),f=Math.sin(c),h=Math.cos(c),l=Zn(a);l[0]+=(o[1]-o[3])/2*u,l[1]+=(o[0]-o[2])/2*u;var v=l[0]*h-l[1]*f,d=l[1]*h+l[0]*f,p=this.getConstrainedCenter([v,d],u),y=e.callback?e.callback:j;void 0!==e.duration?this.animateInternal({resolution:u,center:p,duration:e.duration,easing:e.easing},y):(this.me=u,this.ye=p,this.De(!1,!0),Za(y,!0))},n.prototype.centerOn=function(t,n,e){this.centerOnInternal(Pr(t,this.getProjection()),n,e)},n.prototype.centerOnInternal=function(t,n,e){this.setCenterInternal(Ya(t,n,e,this.getResolution(),this.getRotation()))},n.prototype.calculateCenterShift=function(t,n,e,r){var i,o=this.Te;if(o&&t){var s=this.Ne(-e),a=Ya(t,r,[s[0]/2+o[3],s[1]/2+o[0]],n,e);i=[t[0]-a[0],t[1]-a[1]]}return i},n.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},n.prototype.adjustCenter=function(t){var n=Ir(this.ye,this.getProjection());this.setCenter([n[0]+t[0],n[1]+t[1]])},n.prototype.adjustCenterInternal=function(t){var n=this.ye;this.setCenterInternal([n[0]+t[0],n[1]+t[1]])},n.prototype.adjustResolution=function(t,n){var e=n&&Pr(n,this.getProjection());this.adjustResolutionInternal(t,e)},n.prototype.adjustResolutionInternal=function(t,n){var e=this.getAnimating()||this.getInteracting(),r=this.Pe(this.getRotation()),i=this.Ae.resolution(this.me*t,0,r,e);n&&(this.ye=this.calculateCenterZoom(i,n)),this.me*=t,this.De()},n.prototype.adjustZoom=function(t,n){this.adjustResolution(Math.pow(this.je,-t),n)},n.prototype.adjustRotation=function(t,n){n&&(n=Pr(n,this.getProjection())),this.adjustRotationInternal(t,n)},n.prototype.adjustRotationInternal=function(t,n){var e=this.getAnimating()||this.getInteracting(),r=this.Ae.rotation(this.be+t,e);n&&(this.ye=this.calculateCenterRotate(r,n)),this.be+=t,this.De()},n.prototype.setCenter=function(t){this.setCenterInternal(Pr(t,this.getProjection()))},n.prototype.setCenterInternal=function(t){this.ye=t,this.De()},n.prototype.setHint=function(t,n){return this.he[t]+=n,this.changed(),this.he[t]},n.prototype.setResolution=function(t){this.me=t,this.De()},n.prototype.setRotation=function(t){this.be=t,this.De()},n.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},n.prototype.De=function(t,n){var e=this.getAnimating()||this.getInteracting()||n,r=this.Ae.rotation(this.be,e),i=this.Pe(r),o=this.Ae.resolution(this.me,0,i,e),s=this.Ae.center(this.ye,o,i,e,this.calculateCenterShift(this.ye,o,r,i));this.get(Ra.ROTATION)!==r&&this.set(Ra.ROTATION,r),this.get(Ra.RESOLUTION)!==o&&(this.set(Ra.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),s&&this.get(Ra.CENTER)&&ir(this.get(Ra.CENTER),s)||this.set(Ra.CENTER,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.ke=void 0},n.prototype.resolveConstraints=function(t,n,e){var r=void 0!==t?t:200,i=n||0,o=this.Ae.rotation(this.be),s=this.Pe(o),a=this.Ae.resolution(this.me,i,s),u=this.Ae.center(this.ye,a,s,!1,this.calculateCenterShift(this.ye,a,o,s));if(0===r&&!this.ke)return this.me=a,this.be=o,this.ye=u,void this.De();var c=e||(0===r?this.ke:void 0);this.ke=void 0,this.getResolution()===a&&this.getRotation()===o&&this.getCenterInternal()&&ir(this.getCenterInternal(),u)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:u,resolution:a,duration:r,easing:bt,anchor:c}))},n.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(Ca,1)},n.prototype.endInteraction=function(t,n,e){var r=e&&Pr(e,this.getProjection());this.endInteractionInternal(t,n,r)},n.prototype.endInteractionInternal=function(t,n,e){this.setHint(Ca,-1),this.resolveConstraints(t,n,e)},n.prototype.getConstrainedCenter=function(t,n){var e=this.Pe(this.getRotation());return this.Ae.center(t,n||this.getResolution(),e)},n.prototype.getConstrainedZoom=function(t,n){var e=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(e,n))},n.prototype.getConstrainedResolution=function(t,n){var e=n||0,r=this.Pe(this.getRotation());return this.Ae.resolution(t,e,r)},n}(ot);function Qa(t,n,e){return void 0===e&&(e=[0,0]),e[0]=t[0]+2*n,e[1]=t[1]+2*n,e}function tu(t){return t[0]>0&&t[1]>0}function nu(t,n,e){return void 0===e&&(e=[0,0]),e[0]=t[0]*n+.5|0,e[1]=t[1]*n+.5|0,e}function eu(t,n){return Array.isArray(t)?t:(void 0===n?n=[t,t]:(n[0]=t,n[1]=t),n)}var ru=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function iu(t){t instanceof ys?t.setMapInternal(null):t instanceof sa&&t.getLayers().forEach(iu)}function ou(t,n){if(t instanceof ys)t.setMapInternal(n);else if(t instanceof sa)for(var e=t.getLayers().getArray(),r=0,i=e.length;r<i;++r)ou(e[r],n)}var su=function(t){function n(n){var e=t.call(this)||this;e.on,e.once,e.un;var r=function(t){var n=null;void 0!==t.keyboardEventTarget&&(n="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var e,r,i,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new sa({layers:t.layers});o[xa]=s,o[_a]=t.target,o[Sa]=t.view instanceof Ja?t.view:new Ja,void 0!==t.controls&&(Array.isArray(t.controls)?e=new ht(t.controls.slice()):(Mt("function"==typeof t.controls.getArray,47),e=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?r=new ht(t.interactions.slice()):(Mt("function"==typeof t.interactions.getArray,48),r=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?i=new ht(t.overlays.slice()):(Mt("function"==typeof t.overlays.getArray,49),i=t.overlays):i=new ht;return{controls:e,interactions:r,keyboardEventTarget:n,overlays:i,values:o}}(n);e.ze,e.Le=e.handleBrowserEvent.bind(e),e.Fe=void 0!==n.maxTilesLoading?n.maxTilesLoading:16,e.Rt=void 0!==n.pixelRatio?n.pixelRatio:Vt,e.Ge,e.Ue,e.Be=function(){this.Ue=void 0,this.qe(Date.now())}.bind(e),e.$e=[1,0,0,1,0,0],e.Ve=[1,0,0,1,0,0],e.Ze=0,e.We=null,e.He=null,e.Ke=null,e.Xe=null,e.Ye=null,e.Je=document.createElement("div"),e.Je.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),e.Je.style.position="relative",e.Je.style.overflow="hidden",e.Je.style.width="100%",e.Je.style.height="100%",e.Qe=document.createElement("div"),e.Qe.style.position="absolute",e.Qe.style.zIndex="0",e.Qe.style.width="100%",e.Qe.style.height="100%",e.Qe.style.pointerEvents="none",e.Qe.className="ol-overlaycontainer",e.Je.appendChild(e.Qe),e.tr=document.createElement("div"),e.tr.style.position="absolute",e.tr.style.zIndex="0",e.tr.style.width="100%",e.tr.style.height="100%",e.tr.style.pointerEvents="none",e.tr.className="ol-overlaycontainer-stopevent",e.Je.appendChild(e.tr),e.nr=null,e.In=n.moveTolerance,e.er=r.keyboardEventTarget,e.rr=null,e.controls=r.controls||new ht,e.interactions=r.interactions||new ht,e.ir=r.overlays,e.sr={},e.cn=null,e.ar=[],e.ur=new Ta(e.getTilePriority.bind(e),e.cr.bind(e)),e.addChangeListener(xa,e.hr),e.addChangeListener(Sa,e.lr),e.addChangeListener(ka,e.vr),e.addChangeListener(_a,e.dr),e.setProperties(r.values);var i=e;return!n.view||n.view instanceof Ja||n.view.then((function(t){i.setView(new Ja(t))})),e.controls.addEventListener(st,function(t){t.element.setMap(this)}.bind(e)),e.controls.addEventListener(at,function(t){t.element.setMap(null)}.bind(e)),e.interactions.addEventListener(st,function(t){t.element.setMap(this)}.bind(e)),e.interactions.addEventListener(at,function(t){t.element.setMap(null)}.bind(e)),e.ir.addEventListener(st,function(t){this.pr(t.element)}.bind(e)),e.ir.addEventListener(at,function(t){var n=t.element.getId();void 0!==n&&delete this.sr[n.toString()],t.element.setMap(null)}.bind(e)),e.controls.forEach(function(t){t.setMap(this)}.bind(e)),e.interactions.forEach(function(t){t.setMap(this)}.bind(e)),e.ir.forEach(e.pr.bind(e)),e}return ru(n,t),n.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},n.prototype.addControl=function(t){this.getControls().push(t)},n.prototype.addInteraction=function(t){this.getInteractions().push(t)},n.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},n.prototype.yr=function(t){ou(t.layer,this)},n.prototype.addOverlay=function(t){this.getOverlays().push(t)},n.prototype.pr=function(t){var n=t.getId();void 0!==n&&(this.sr[n.toString()]=t),t.setMap(this)},n.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},n.prototype.forEachFeatureAtPixel=function(t,n,e){if(this.We){var r=this.getCoordinateFromPixelInternal(t),i=void 0!==(e=void 0!==e?e:{}).hitTolerance?e.hitTolerance:0,o=void 0!==e.layerFilter?e.layerFilter:S,s=!1!==e.checkWrapped;return this.cn.forEachFeatureAtCoordinate(r,this.We,i,s,n,null,o,null)}},n.prototype.getFeaturesAtPixel=function(t,n){var e=[];return this.forEachFeatureAtPixel(t,(function(t){e.push(t)}),n),e},n.prototype.getAllLayers=function(){var t=[];return function n(e){e.forEach((function(e){e instanceof sa?n(e.getLayers()):t.push(e)}))}(this.getLayers()),t},n.prototype.forEachLayerAtPixel=function(t,n,e){if(this.We){var r=e||{},i=void 0!==r.hitTolerance?r.hitTolerance:0,o=r.layerFilter||S;return this.cn.forEachLayerAtPixel(t,this.We,i,n,o)}},n.prototype.hasFeatureAtPixel=function(t,n){if(!this.We)return!1;var e=this.getCoordinateFromPixelInternal(t),r=void 0!==(n=void 0!==n?n:{}).layerFilter?n.layerFilter:S,i=void 0!==n.hitTolerance?n.hitTolerance:0,o=!1!==n.checkWrapped;return this.cn.hasFeatureAtCoordinate(e,this.We,i,o,r,null)},n.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},n.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},n.prototype.getEventPixel=function(t){var n=this.Je.getBoundingClientRect(),e="changedTouches"in t?t.changedTouches[0]:t;return[e.clientX-n.left,e.clientY-n.top]},n.prototype.getTarget=function(){return this.get(_a)},n.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},n.prototype.getCoordinateFromPixel=function(t){return Ir(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},n.prototype.getCoordinateFromPixelInternal=function(t){var n=this.We;return n?nn(n.pixelToCoordinateTransform,t.slice()):null},n.prototype.getControls=function(){return this.controls},n.prototype.getOverlays=function(){return this.ir},n.prototype.getOverlayById=function(t){var n=this.sr[t.toString()];return void 0!==n?n:null},n.prototype.getInteractions=function(){return this.interactions},n.prototype.getLayerGroup=function(){return this.get(xa)},n.prototype.setLayers=function(t){var n=this.getLayerGroup();if(t instanceof ht)n.setLayers(t);else{var e=n.getLayers();e.clear(),e.extend(t)}},n.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},n.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),n=0,e=t.length;n<e;++n){var r=t[n].layer.getSource();if(r&&r.loading)return!0}return!1},n.prototype.getPixelFromCoordinate=function(t){var n=Pr(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(n)},n.prototype.getPixelFromCoordinateInternal=function(t){var n=this.We;return n?nn(n.coordinateToPixelTransform,t.slice(0,2)):null},n.prototype.getRenderer=function(){return this.cn},n.prototype.getSize=function(){return this.get(ka)},n.prototype.getView=function(){return this.get(Sa)},n.prototype.getViewport=function(){return this.Je},n.prototype.getOverlayContainer=function(){return this.Qe},n.prototype.getOverlayContainerStopEvent=function(){return this.tr},n.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},n.prototype.getTilePriority=function(t,n,e,r){return Ea(this.We,t,n,e,r)},n.prototype.handleBrowserEvent=function(t,n){var e=n||t.type,r=new fa(e,this,t);this.handleMapBrowserEvent(r)},n.prototype.handleMapBrowserEvent=function(t){if(this.We){var n=t.originalEvent,e=n.type;if(e===va||e===K||e===$){var r=this.getOwnerDocument(),i=this.Je.getRootNode?this.Je.getRootNode():r,o=n.target;if(this.tr.contains(o)||!(i===r?r.documentElement:i).contains(o))return}if(t.frameState=this.We,!1!==this.dispatchEvent(t))for(var s=this.getInteractions().getArray().slice(),a=s.length-1;a>=0;a--){var u=s[a];if(u.getMap()===this&&u.getActive()&&this.getTargetElement())if(!u.handleEvent(t)||t.propagationStopped)break}}},n.prototype.handlePostRender=function(){var t=this.We,n=this.ur;if(!n.isEmpty()){var e=this.Fe,r=e;if(t){var i=t.viewHints;if(i[Aa]||i[Ca]){var o=Date.now()-t.time>8;e=o?0:8,r=o?0:2}}n.getTilesLoading()<e&&(n.reprioritize(),n.loadMoreTiles(e,r))}t&&this.hasListener(cs)&&!t.animate&&this.ze&&this.cn.dispatchRenderEvent(cs,t);for(var s=this.ar,a=0,u=s.length;a<u;++a)s[a](this,t);s.length=0},n.prototype.vr=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},n.prototype.dr=function(){if(this.nr){for(var t=0,n=this.rr.length;t<n;++t)J(this.rr[t]);this.rr=null,this.Je.removeEventListener(L,this.Le),this.Je.removeEventListener(K,this.Le),this.nr.dispose(),this.nr=null,Oo(this.Je)}var e=this.getTargetElement();if(e){for(var r in e.appendChild(this.Je),this.cn||(this.cn=this.createRenderer()),this.nr=new ma(this,this.In),ha)this.nr.addEventListener(ha[r],this.handleMapBrowserEvent.bind(this));this.Je.addEventListener(L,this.Le,!1),this.Je.addEventListener(K,this.Le,!!Ht&&{passive:!1});var i=this.getOwnerDocument().defaultView,o=this.er?this.er:e;this.rr=[X(o,$,this.handleBrowserEvent,this),X(o,V,this.handleBrowserEvent,this),X(i,W,this.updateSize,this)]}else this.cn&&(clearTimeout(this.Ge),this.Ge=void 0,this.ar.length=0,this.cn.dispose(),this.cn=null),this.Ue&&(cancelAnimationFrame(this.Ue),this.Ue=void 0);this.updateSize()},n.prototype.cr=function(){this.render()},n.prototype.mr=function(){this.render()},n.prototype.lr=function(){this.Ke&&(J(this.Ke),this.Ke=null),this.Xe&&(J(this.Xe),this.Xe=null);var t=this.getView();t&&(this.br(),this.Ke=X(t,l,this.mr,this),this.Xe=X(t,D,this.mr,this),t.resolveConstraints(0)),this.render()},n.prototype.hr=function(){this.Ye&&(this.Ye.forEach(J),this.Ye=null);var t=this.getLayerGroup();t&&(this.yr(new ia("addlayer",t)),this.Ye=[X(t,l,this.render,this),X(t,D,this.render,this),X(t,"addlayer",this.yr,this),X(t,"removelayer",this.wr,this)]),this.render()},n.prototype.isRendered=function(){return!!this.We},n.prototype.renderSync=function(){this.Ue&&cancelAnimationFrame(this.Ue),this.Be()},n.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),n=0,e=t.length;n<e;++n){var r=t[n].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}},n.prototype.render=function(){this.cn&&void 0===this.Ue&&(this.Ue=requestAnimationFrame(this.Be))},n.prototype.removeControl=function(t){return this.getControls().remove(t)},n.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},n.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},n.prototype.wr=function(t){iu(t.layer)},n.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},n.prototype.qe=function(t){var n=this,e=this.getSize(),r=this.getView(),i=this.We,s=null;if(void 0!==e&&tu(e)&&r&&r.isDef()){var a=r.getHints(this.We?this.We.viewHints:void 0),u=r.getState();if(s={animate:!1,coordinateToPixelTransform:this.$e,declutterTree:null,extent:Hn(u.center,u.resolution,u.rotation,e),index:this.Ze++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.Rt,pixelToCoordinateTransform:this.Ve,postRenderFunctions:[],size:e,tileQueue:this.ur,time:t,usedTiles:{},viewState:u,viewHints:a,wantedTiles:{},mapId:o(this),renderTargets:{}},u.nextCenter&&u.nextResolution){var c=isNaN(u.nextRotation)?u.rotation:u.nextRotation;s.nextExtent=Hn(u.nextCenter,u.nextResolution,c,e)}}if(this.We=s,this.cn.renderFrame(s),s){if(s.animate&&this.render(),Array.prototype.push.apply(this.ar,s.postRenderFunctions),i)(!this.He||!ne(this.He)&&!Pn(s.extent,this.He))&&(this.dispatchEvent(new ua(wa,this,i)),this.He=Cn(this.He));this.He&&!s.viewHints[Aa]&&!s.viewHints[Ca]&&!Pn(s.extent,this.He)&&(this.dispatchEvent(new ua(ga,this,s)),_n(s.extent,this.He))}this.dispatchEvent(new ua(ba,this,s)),this.ze=!this.ur.getTilesLoading()&&!this.ur.getCount()&&!this.getLoading(),this.Ge||(this.Ge=setTimeout((function(){n.Ge=void 0,n.handlePostRender()}),0))},n.prototype.setLayerGroup=function(t){var n=this.getLayerGroup();n&&this.wr(new ia("removelayer",n)),this.set(xa,t)},n.prototype.setSize=function(t){this.set(ka,t)},n.prototype.setTarget=function(t){this.set(_a,t)},n.prototype.setView=function(t){if(!t||t instanceof Ja)this.set(Sa,t);else{this.set(Sa,new Ja);var n=this;t.then((function(t){n.setView(new Ja(t))}))}},n.prototype.updateSize=function(){var t=this.getTargetElement(),n=void 0;if(t){var e=getComputedStyle(t),r=t.offsetWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderRightWidth),i=t.offsetHeight-parseFloat(e.borderTopWidth)-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)-parseFloat(e.borderBottomWidth);isNaN(r)||isNaN(i)||!tu(n=[r,i])&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0.")}this.setSize(n),this.br()},n.prototype.br=function(){var t=this.getView();if(t){var n=void 0,e=getComputedStyle(this.Je);e.width&&e.height&&(n=[parseInt(e.width,10),parseInt(e.height,10)]),t.setViewportSize(n)}},n}(ot),au=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),uu=function(t){function n(n){var e=t.call(this)||this,r=n.element;return!r||n.target||r.style.pointerEvents||(r.style.pointerEvents="auto"),e.element=r||null,e.gr=null,e.vn=null,e.listenerKeys=[],n.render&&(e.render=n.render),n.target&&e.setTarget(n.target),e}return au(n,t),n.prototype.disposeInternal=function(){Oo(this.element),t.prototype.disposeInternal.call(this)},n.prototype.getMap=function(){return this.vn},n.prototype.setMap=function(t){this.vn&&Oo(this.element);for(var n=0,e=this.listenerKeys.length;n<e;++n)J(this.listenerKeys[n]);(this.listenerKeys.length=0,this.vn=t,this.vn)&&((this.gr?this.gr:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==j&&this.listenerKeys.push(X(t,ba,this.render,this)),t.render())},n.prototype.render=function(t){},n.prototype.setTarget=function(t){this.gr="string"==typeof t?document.getElementById(t):t},n}(ot),cu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),fu=function(t){function n(n){var e=this,r=n||{};(e=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).kr=document.createElement("ul"),e._r=void 0===r.collapsed||r.collapsed,e.Sr=e._r,e.Mr=void 0!==r.collapsible,e.jr=void 0===r.collapsible||r.collapsible,e.jr||(e._r=!1);var i=void 0!==r.className?r.className:"ol-attribution",o=void 0!==r.tipLabel?r.tipLabel:"Attributions",s=void 0!==r.expandClassName?r.expandClassName:i+"-expand",a=void 0!==r.collapseLabel?r.collapseLabel:"",u=void 0!==r.collapseClassName?r.collapseClassName:i+"-collpase";"string"==typeof a?(e.Tr=document.createElement("span"),e.Tr.textContent=a,e.Tr.className=u):e.Tr=a;var c=void 0!==r.label?r.label:"i";"string"==typeof c?(e.Er=document.createElement("span"),e.Er.textContent=c,e.Er.className=s):e.Er=c;var f=e.jr&&!e._r?e.Tr:e.Er;e.Ar=document.createElement("button"),e.Ar.setAttribute("type","button"),e.Ar.setAttribute("aria-expanded",String(!e._r)),e.Ar.title=o,e.Ar.appendChild(f),e.Ar.addEventListener(F,e.Cr.bind(e),!1);var h=i+" "+"ol-unselectable "+js+(e._r&&e.jr?" ol-collapsed":"")+(e.jr?"":" ol-uncollapsible"),l=e.element;return l.className=h,l.appendChild(e.Ar),l.appendChild(e.kr),e.Rr=[],e.mn=!0,e}return cu(n,t),n.prototype.Ir=function(t){for(var n={},e=[],r=!0,i=t.layerStatesArray,o=0,s=i.length;o<s;++o){var a=i[o];if(ps(a,t.viewState)){var u=a.layer.getSource();if(u){var c=u.getAttributions();if(c){var f=c(t);if(f)if(r=r&&!1!==u.getAttributionsCollapsible(),Array.isArray(f))for(var h=0,l=f.length;h<l;++h)f[h]in n||(e.push(f[h]),n[f[h]]=!0);else f in n||(e.push(f),n[f]=!0)}}}}return this.Mr||this.setCollapsible(r),e},n.prototype.Pr=function(t){if(t){var n=this.Ir(t),e=n.length>0;if(this.mn!=e&&(this.element.style.display=e?"":"none",this.mn=e),!x(n,this.Rr)){To(this.kr);for(var r=0,i=n.length;r<i;++r){var o=document.createElement("li");o.innerHTML=n[r],this.kr.appendChild(o)}this.Rr=n}}else this.mn&&(this.element.style.display="none",this.mn=!1)},n.prototype.Cr=function(t){t.preventDefault(),this.Dr(),this.Sr=this._r},n.prototype.Dr=function(){this.element.classList.toggle(Os),this._r?jo(this.Tr,this.Er):jo(this.Er,this.Tr),this._r=!this._r,this.Ar.setAttribute("aria-expanded",String(!this._r))},n.prototype.getCollapsible=function(){return this.jr},n.prototype.setCollapsible=function(t){this.jr!==t&&(this.jr=t,this.element.classList.toggle("ol-uncollapsible"),this.Sr&&this.Dr())},n.prototype.setCollapsed=function(t){this.Sr=t,this.jr&&this._r!==t&&this.Dr()},n.prototype.getCollapsed=function(){return this._r},n.prototype.render=function(t){this.Pr(t.frameState)},n}(uu),hu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),lu=function(t){function n(n){var e=this,r=n||{};e=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this;var i=void 0!==r.className?r.className:"ol-rotate",o=void 0!==r.label?r.label:"⇧",s=void 0!==r.compassClassName?r.compassClassName:"ol-compass";e.Er=null,"string"==typeof o?(e.Er=document.createElement("span"),e.Er.className=s,e.Er.textContent=o):(e.Er=o,e.Er.classList.add(s));var a=r.tipLabel?r.tipLabel:"Reset rotation",u=document.createElement("button");u.className=i+"-reset",u.setAttribute("type","button"),u.title=a,u.appendChild(e.Er),u.addEventListener(F,e.Cr.bind(e),!1);var c=i+" "+"ol-unselectable "+js,f=e.element;return f.className=c,f.appendChild(u),e.Nr=r.resetNorth?r.resetNorth:void 0,e.zr=void 0!==r.duration?r.duration:250,e.Lr=void 0===r.autoHide||r.autoHide,e.Fr=void 0,e.Lr&&e.element.classList.add(ks),e}return hu(n,t),n.prototype.Cr=function(t){t.preventDefault(),void 0!==this.Nr?this.Nr():this.Gr()},n.prototype.Gr=function(){var t=this.getMap().getView();if(t){var n=t.getRotation();void 0!==n&&(this.zr>0&&n%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.zr,easing:bt}):t.setRotation(0))}},n.prototype.render=function(t){var n=t.frameState;if(n){var e=n.viewState.rotation;if(e!=this.Fr){var r="rotate("+e+"rad)";if(this.Lr){var i=this.element.classList.contains(ks);i||0!==e?i&&0!==e&&this.element.classList.remove(ks):this.element.classList.add(ks)}this.Er.style.transform=r}this.Fr=e}},n}(uu),vu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),du=function(t){function n(n){var e=this,r=n||{};e=t.call(this,{element:document.createElement("div"),target:r.target})||this;var i=void 0!==r.className?r.className:"ol-zoom",o=void 0!==r.delta?r.delta:1,s=void 0!==r.zoomInClassName?r.zoomInClassName:i+"-in",a=void 0!==r.zoomOutClassName?r.zoomOutClassName:i+"-out",u=void 0!==r.zoomInLabel?r.zoomInLabel:"+",c=void 0!==r.zoomOutLabel?r.zoomOutLabel:"",f=void 0!==r.zoomInTipLabel?r.zoomInTipLabel:"Zoom in",h=void 0!==r.zoomOutTipLabel?r.zoomOutTipLabel:"Zoom out",l=document.createElement("button");l.className=s,l.setAttribute("type","button"),l.title=f,l.appendChild("string"==typeof u?document.createTextNode(u):u),l.addEventListener(F,e.Cr.bind(e,o),!1);var v=document.createElement("button");v.className=a,v.setAttribute("type","button"),v.title=h,v.appendChild("string"==typeof c?document.createTextNode(c):c),v.addEventListener(F,e.Cr.bind(e,-o),!1);var d=i+" "+"ol-unselectable "+js,p=e.element;return p.className=d,p.appendChild(l),p.appendChild(v),e.zr=void 0!==r.duration?r.duration:250,e}return vu(n,t),n.prototype.Cr=function(t,n){n.preventDefault(),this.Ur(t)},n.prototype.Ur=function(t){var n=this.getMap().getView();if(n){var e=n.getZoom();if(void 0!==e){var r=n.getConstrainedZoom(e+t);this.zr>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.zr,easing:bt})):n.setZoom(r)}}},n}(uu);function pu(t){var n=t||{},e=new ht;return(void 0===n.zoom||n.zoom)&&e.push(new du(n.zoomOptions)),(void 0===n.rotate||n.rotate)&&e.push(new lu(n.rotateOptions)),(void 0===n.attribution||n.attribution)&&e.push(new fu(n.attributionOptions)),e}var yu="active",mu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function bu(t,n,e){var r=t.getCenterInternal();if(r){var i=[r[0]+n[0],r[1]+n[1]];t.animateInternal({duration:void 0!==e?e:250,easing:gt,center:t.getConstrainedCenter(i)})}}function wu(t,n,e,r){var i=t.getZoom();if(void 0!==i){var o=t.getConstrainedZoom(i+n),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:e,duration:void 0!==r?r:250,easing:bt})}}var gu=function(t){function n(n){var e=t.call(this)||this;return e.on,e.once,e.un,n&&n.handleEvent&&(e.handleEvent=n.handleEvent),e.vn=null,e.setActive(!0),e}return mu(n,t),n.prototype.getActive=function(){return this.get(yu)},n.prototype.getMap=function(){return this.vn},n.prototype.handleEvent=function(t){return!0},n.prototype.setActive=function(t){this.set(yu,t)},n.prototype.setMap=function(t){this.vn=t},n}(ot),xu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ku=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.Br=r.delta?r.delta:1,e.zr=void 0!==r.duration?r.duration:250,e}return xu(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==ha.DBLCLICK){var e=t.originalEvent,r=t.map,i=t.coordinate,o=e.shiftKey?-this.Br:this.Br;wu(r.getView(),o,i,this.zr),e.preventDefault(),n=!0}return!n},n}(gu),_u=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function Su(t){for(var n=t.length,e=0,r=0,i=0;i<n;i++)e+=t[i].clientX,r+=t[i].clientY;return[e/n,r/n]}var Mu=function(t){function n(n){var e=this,r=n||{};return e=t.call(this,r)||this,r.handleDownEvent&&(e.handleDownEvent=r.handleDownEvent),r.handleDragEvent&&(e.handleDragEvent=r.handleDragEvent),r.handleMoveEvent&&(e.handleMoveEvent=r.handleMoveEvent),r.handleUpEvent&&(e.handleUpEvent=r.handleUpEvent),r.stopDown&&(e.stopDown=r.stopDown),e.handlingDownUpSequence=!1,e.qr={},e.targetPointers=[],e}return _u(n,t),n.prototype.getPointerCount=function(){return this.targetPointers.length},n.prototype.handleDownEvent=function(t){return!1},n.prototype.handleDragEvent=function(t){},n.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var n=!1;if(this.$r(t),this.handlingDownUpSequence){if(t.type==ha.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==ha.POINTERUP){var e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==ha.POINTERDOWN){var r=this.handleDownEvent(t);this.handlingDownUpSequence=r,n=this.stopDown(r)}else t.type==ha.POINTERMOVE&&this.handleMoveEvent(t);return!n},n.prototype.handleMoveEvent=function(t){},n.prototype.handleUpEvent=function(t){return!1},n.prototype.stopDown=function(t){return t},n.prototype.$r=function(t){if(function(t){var n=t.type;return n===ha.POINTERDOWN||n===ha.POINTERDRAG||n===ha.POINTERUP}(t)){var n=t.originalEvent,e=n.pointerId.toString();t.type==ha.POINTERUP?delete this.qr[e]:(t.type==ha.POINTERDOWN||e in this.qr)&&(this.qr[e]=n),this.targetPointers=C(this.qr)}},n}(gu);function ju(t){var n=arguments;return function(t){for(var e=!0,r=0,i=n.length;r<i&&(e=e&&n[r](t));++r);return e}}var Ou=function(t){var n=t.originalEvent;return n.altKey&&!(n.metaKey||n.ctrlKey)&&!n.shiftKey},Tu=function(t){var n=t.originalEvent;return n.altKey&&!(n.metaKey||n.ctrlKey)&&n.shiftKey},Eu=function(t){var n=t.map.getTargetElement(),e=t.map.getOwnerDocument().activeElement;return n.contains(e)},Au=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||Eu(t)},Cu=S,Ru=function(t){var n=t.originalEvent;return 0==n.button&&!(qt&&$t&&n.ctrlKey)},Iu=M,Pu=function(t){return t.type==ha.SINGLECLICK},Du=function(t){var n=t.originalEvent;return!n.altKey&&!(n.metaKey||n.ctrlKey)&&!n.shiftKey},Nu=function(t){var n=t.originalEvent;return!n.altKey&&!(n.metaKey||n.ctrlKey)&&n.shiftKey},zu=function(t){var n=t.originalEvent.target.tagName;return"INPUT"!==n&&"SELECT"!==n&&"TEXTAREA"!==n},Lu=function(t){var n=t.originalEvent;return Mt(void 0!==n,56),"mouse"==n.pointerType},Fu=function(t){var n=t.originalEvent;return Mt(void 0!==n,56),n.isPrimary&&0===n.button},Gu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Uu=function(t){function n(n){var e=t.call(this,{stopDown:M})||this,r=n||{};e.Vr=r.kinetic,e.lastCentroid=null,e.Zr,e.Wr=!1;var i=r.condition?r.condition:ju(Du,Fu);return e.Hr=r.onFocusOnly?ju(Au,i):i,e.Kr=!1,e}return Gu(n,t),n.prototype.handleDragEvent=function(t){this.Wr||(this.Wr=!0,this.getMap().getView().beginInteraction());var n=this.targetPointers,e=Su(n);if(n.length==this.Zr){if(this.Vr&&this.Vr.update(e[0],e[1]),this.lastCentroid){var r=[this.lastCentroid[0]-e[0],e[1]-this.lastCentroid[1]],i=t.map.getView();sr(r,i.getResolution()),or(r,i.getRotation()),i.adjustCenterInternal(r)}}else this.Vr&&this.Vr.begin();this.lastCentroid=e,this.Zr=n.length,t.originalEvent.preventDefault()},n.prototype.handleUpEvent=function(t){var n=t.map,e=n.getView();if(0===this.targetPointers.length){if(!this.Kr&&this.Vr&&this.Vr.end()){var r=this.Vr.getDistance(),i=this.Vr.getAngle(),o=e.getCenterInternal(),s=n.getPixelFromCoordinateInternal(o),a=n.getCoordinateFromPixelInternal([s[0]-r*Math.cos(i),s[1]-r*Math.sin(i)]);e.animateInternal({center:e.getConstrainedCenter(a),duration:500,easing:bt})}return this.Wr&&(this.Wr=!1,e.endInteraction()),!1}return this.Vr&&this.Vr.begin(),this.lastCentroid=null,!0},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.Hr(t)){var n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.Vr&&this.Vr.begin(),this.Kr=this.targetPointers.length>1,!0}return!1},n}(Mu),Bu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),qu=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this,{stopDown:M})||this).Hr=r.condition?r.condition:Tu,e.Xr=void 0,e.zr=void 0!==r.duration?r.duration:250,e}return Bu(n,t),n.prototype.handleDragEvent=function(t){if(Lu(t)){var n=t.map,e=n.getView();if(e.getConstraints().rotation!==Ua){var r=n.getSize(),i=t.pixel,o=Math.atan2(r[1]/2-i[1],i[0]-r[0]/2);if(void 0!==this.Xr){var s=o-this.Xr;e.adjustRotationInternal(-s)}this.Xr=o}}},n.prototype.handleUpEvent=function(t){return!Lu(t)||(t.map.getView().endInteraction(this.zr),!1)},n.prototype.handleDownEvent=function(t){return!!Lu(t)&&(!(!Ru(t)||!this.Hr(t))&&(t.map.getView().beginInteraction(),this.Xr=void 0,!0))},n}(Mu),$u=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Vu=function(t){function n(n){var e=t.call(this)||this;return e.Yr=null,e.pn=document.createElement("div"),e.pn.style.position="absolute",e.pn.style.pointerEvents="auto",e.pn.className="ol-box "+n,e.vn=null,e.Jr=null,e.Qr=null,e}return $u(n,t),n.prototype.disposeInternal=function(){this.setMap(null)},n.prototype.ti=function(){var t=this.Jr,n=this.Qr,e="px",r=this.pn.style;r.left=Math.min(t[0],n[0])+e,r.top=Math.min(t[1],n[1])+e,r.width=Math.abs(n[0]-t[0])+e,r.height=Math.abs(n[1]-t[1])+e},n.prototype.setMap=function(t){if(this.vn){this.vn.getOverlayContainer().removeChild(this.pn);var n=this.pn.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.vn=t,this.vn&&this.vn.getOverlayContainer().appendChild(this.pn)},n.prototype.setPixels=function(t,n){this.Jr=t,this.Qr=n,this.createOrUpdateGeometry(),this.ti()},n.prototype.createOrUpdateGeometry=function(){var t=this.Jr,n=this.Qr,e=[t,[t[0],n[1]],n,[n[0],t[1]]].map(this.vn.getCoordinateFromPixelInternal,this.vn);e[4]=e[0].slice(),this.Yr?this.Yr.setCoordinates([e]):this.Yr=new Zi([e])},n.prototype.getGeometry=function(){return this.Yr},n}(v),Zu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Wu="boxstart",Hu="boxdrag",Ku="boxend",Xu="boxcancel",Yu=function(t){function n(n,e,r){var i=t.call(this,n)||this;return i.coordinate=e,i.mapBrowserEvent=r,i}return Zu(n,t),n}(h),Ju=function(t){function n(n){var e=t.call(this)||this;e.on,e.once,e.un;var r=n||{};return e.ni=new Vu(r.className||"ol-dragbox"),e.ei=void 0!==r.minArea?r.minArea:64,r.onBoxEnd&&(e.onBoxEnd=r.onBoxEnd),e.Jr=null,e.Hr=r.condition?r.condition:Ru,e.ri=r.boxEndCondition?r.boxEndCondition:e.defaultBoxEndCondition,e}return Zu(n,t),n.prototype.defaultBoxEndCondition=function(t,n,e){var r=e[0]-n[0],i=e[1]-n[1];return r*r+i*i>=this.ei},n.prototype.getGeometry=function(){return this.ni.getGeometry()},n.prototype.handleDragEvent=function(t){this.ni.setPixels(this.Jr,t.pixel),this.dispatchEvent(new Yu(Hu,t.coordinate,t))},n.prototype.handleUpEvent=function(t){this.ni.setMap(null);var n=this.ri(t,this.Jr,t.pixel);return n&&this.onBoxEnd(t),this.dispatchEvent(new Yu(n?Ku:Xu,t.coordinate,t)),!1},n.prototype.handleDownEvent=function(t){return!!this.Hr(t)&&(this.Jr=t.pixel,this.ni.setMap(t.map),this.ni.setPixels(this.Jr,this.Jr),this.dispatchEvent(new Yu(Wu,t.coordinate,t)),!0)},n.prototype.onBoxEnd=function(t){},n}(Mu),Qu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),tc=function(t){function n(n){var e=this,r=n||{},i=r.condition?r.condition:Nu;return(e=t.call(this,{condition:i,className:r.className||"ol-dragzoom",minArea:r.minArea})||this).zr=void 0!==r.duration?r.duration:200,e.ii=void 0!==r.out&&r.out,e}return Qu(n,t),n.prototype.onBoxEnd=function(t){var n=this.getMap().getView(),e=this.getGeometry();if(this.ii){var r=n.rotatedExtentForGeometry(e),i=n.getResolutionForExtentInternal(r),o=n.getResolution()/i;(e=e.clone()).scale(o*o)}n.fitInternal(e,{duration:this.zr,easing:bt})},n}(Ju),nc=37,ec=38,rc=39,ic=40,oc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),sc=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.oi=function(t){return Du(t)&&zu(t)},e.Hr=void 0!==r.condition?r.condition:e.oi,e.zr=void 0!==r.duration?r.duration:100,e.si=void 0!==r.pixelDelta?r.pixelDelta:128,e}return oc(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==$){var e=t.originalEvent,r=e.keyCode;if(this.Hr(t)&&(r==ic||r==nc||r==rc||r==ec)){var i=t.map.getView(),o=i.getResolution()*this.si,s=0,a=0;r==ic?a=-o:r==nc?s=-o:r==rc?s=o:a=o;var u=[s,a];or(u,i.getRotation()),bu(i,u,this.zr),e.preventDefault(),n=!0}}return!n},n}(gu),ac=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),uc=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.Hr=r.condition?r.condition:zu,e.Br=r.delta?r.delta:1,e.zr=void 0!==r.duration?r.duration:100,e}return ac(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==$||t.type==V){var e=t.originalEvent,r=e.charCode;if(this.Hr(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var i=t.map,o=r=="+".charCodeAt(0)?this.Br:-this.Br;wu(i.getView(),o,void 0,this.zr),e.preventDefault(),n=!0}}return!n},n}(gu),cc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),fc="trackpad",hc="wheel",lc=function(t){function n(n){var e=this,r=n||{};(e=t.call(this,r)||this).ai=0,e.ui=0,e.bt=void 0!==r.maxDelta?r.maxDelta:1,e.zr=void 0!==r.duration?r.duration:250,e.ci=void 0!==r.timeout?r.timeout:80,e.fi=void 0===r.useAnchor||r.useAnchor,e.hi=void 0!==r.constrainResolution&&r.constrainResolution;var i=r.condition?r.condition:Cu;return e.Hr=r.onFocusOnly?ju(Au,i):i,e.li=null,e.vi=void 0,e.di,e.yi=void 0,e.mi=400,e.bi,e.wi=300,e}return cc(n,t),n.prototype.gi=function(){this.bi=void 0,this.getMap().getView().endInteraction(void 0,this.ui?this.ui>0?1:-1:0,this.li)},n.prototype.handleEvent=function(t){if(!this.Hr(t))return!0;if(t.type!==K)return!0;var n,e=t.map,r=t.originalEvent;if(r.preventDefault(),this.fi&&(this.li=t.coordinate),t.type==K&&(n=r.deltaY,Ut&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=Vt),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.ui=n;var i=Date.now();void 0===this.vi&&(this.vi=i),(!this.yi||i-this.vi>this.mi)&&(this.yi=Math.abs(n)<4?fc:hc);var o=e.getView();if(this.yi===fc&&!o.getConstrainResolution()&&!this.hi)return this.bi?clearTimeout(this.bi):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.bi=setTimeout(this.gi.bind(this),this.ci),o.adjustZoom(-n/this.wi,this.li),this.vi=i,!1;this.ai+=n;var s=Math.max(this.ci-(i-this.vi),0);return clearTimeout(this.di),this.di=setTimeout(this.xi.bind(this,e),s),!1},n.prototype.xi=function(t){var n=t.getView();n.getAnimating()&&n.cancelAnimations();var e=-ue(this.ai,-this.bt*this.wi,this.bt*this.wi)/this.wi;(n.getConstrainResolution()||this.hi)&&(e=e?e>0?1:-1:0),wu(n,e,this.li,this.zr),this.yi=void 0,this.ai=0,this.li=null,this.vi=void 0,this.di=void 0},n.prototype.setMouseAnchor=function(t){this.fi=t,t||(this.li=null)},n}(gu),vc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),dc=function(t){function n(n){var e=this,r=n||{},i=r;return i.stopDown||(i.stopDown=M),(e=t.call(this,i)||this).ki=null,e.Xr=void 0,e._i=!1,e.Si=0,e.Mi=void 0!==r.threshold?r.threshold:.3,e.zr=void 0!==r.duration?r.duration:250,e}return vc(n,t),n.prototype.handleDragEvent=function(t){var n=0,e=this.targetPointers[0],r=this.targetPointers[1],i=Math.atan2(r.clientY-e.clientY,r.clientX-e.clientX);if(void 0!==this.Xr){var o=i-this.Xr;this.Si+=o,!this._i&&Math.abs(this.Si)>this.Mi&&(this._i=!0),n=o}this.Xr=i;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Ua){var u=s.getViewport().getBoundingClientRect(),c=Su(this.targetPointers);c[0]-=u.left,c[1]-=u.top,this.ki=s.getCoordinateFromPixelInternal(c),this._i&&(s.render(),a.adjustRotationInternal(n,this.ki))}},n.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.zr),!1)},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.ki=null,this.Xr=void 0,this._i=!1,this.Si=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1},n}(Mu),pc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),yc=function(t){function n(n){var e=this,r=n||{},i=r;return i.stopDown||(i.stopDown=M),(e=t.call(this,i)||this).ki=null,e.zr=void 0!==r.duration?r.duration:400,e.ji=void 0,e.Oi=1,e}return pc(n,t),n.prototype.handleDragEvent=function(t){var n=1,e=this.targetPointers[0],r=this.targetPointers[1],i=e.clientX-r.clientX,o=e.clientY-r.clientY,s=Math.sqrt(i*i+o*o);void 0!==this.ji&&(n=this.ji/s),this.ji=s;var a=t.map,u=a.getView();1!=n&&(this.Oi=n);var c=a.getViewport().getBoundingClientRect(),f=Su(this.targetPointers);f[0]-=c.left,f[1]-=c.top,this.ki=a.getCoordinateFromPixelInternal(f),a.render(),u.adjustResolutionInternal(n,this.ki)},n.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map.getView(),e=this.Oi>1?1:-1;return n.endInteraction(this.zr,e),!1}return!0},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.ki=null,this.ji=void 0,this.Oi=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1},n}(Mu);function mc(t){var n=t||{},e=new ht,r=new Ro(-.005,.05,100);return(void 0===n.altShiftDragRotate||n.altShiftDragRotate)&&e.push(new qu),(void 0===n.doubleClickZoom||n.doubleClickZoom)&&e.push(new ku({delta:n.zoomDelta,duration:n.zoomDuration})),(void 0===n.dragPan||n.dragPan)&&e.push(new Uu({onFocusOnly:n.onFocusOnly,kinetic:r})),(void 0===n.pinchRotate||n.pinchRotate)&&e.push(new dc),(void 0===n.pinchZoom||n.pinchZoom)&&e.push(new yc({duration:n.zoomDuration})),(void 0===n.keyboard||n.keyboard)&&(e.push(new sc),e.push(new uc({delta:n.zoomDelta,duration:n.zoomDuration}))),(void 0===n.mouseWheelZoom||n.mouseWheelZoom)&&e.push(new lc({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(void 0===n.shiftDragZoom||n.shiftDragZoom)&&e.push(new tc({duration:n.zoomDuration})),e}var bc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),wc=function(t){function n(n){return(n=E({},n)).controls||(n.controls=pu()),n.interactions||(n.interactions=mc({onFocusOnly:!0})),t.call(this,n)||this}return bc(n,t),n.prototype.createRenderer=function(){return new ea(this)},n}(su),gc="bottom-left",xc="bottom-center",kc="bottom-right",_c="center-left",Sc="center-center",Mc="center-right",jc="top-left",Oc="top-center",Tc="top-right";function Ec(t){return(Ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Ac=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Cc="element",Rc="map",Ic="offset",Pc="position",Dc="positioning",Nc=function(t){function n(n){var e=t.call(this)||this;e.on,e.once,e.un,e.options=n,e.id=n.id,e.insertFirst=void 0===n.insertFirst||n.insertFirst,e.stopEvent=void 0===n.stopEvent||n.stopEvent,e.element=document.createElement("div"),e.element.className=void 0!==n.className?n.className:"ol-overlay-container ol-selectable",e.element.style.position="absolute",e.element.style.pointerEvents="auto";var r=n.autoPan;return r&&"object"!==Ec(r)&&(r={animation:n.autoPanAnimation,margin:n.autoPanMargin}),e.autoPan=r||!1,e.rendered={jt:"",visible:!0},e.mapPostrenderListenerKey=null,e.addChangeListener(Cc,e.handleElementChanged),e.addChangeListener(Rc,e.handleMapChanged),e.addChangeListener(Ic,e.handleOffsetChanged),e.addChangeListener(Pc,e.handlePositionChanged),e.addChangeListener(Dc,e.handlePositioningChanged),void 0!==n.element&&e.setElement(n.element),e.setOffset(void 0!==n.offset?n.offset:[0,0]),e.setPositioning(void 0!==n.positioning?n.positioning:jc),void 0!==n.position&&e.setPosition(n.position),e}return Ac(n,t),n.prototype.getElement=function(){return this.get(Cc)},n.prototype.getId=function(){return this.id},n.prototype.getMap=function(){return this.get(Rc)},n.prototype.getOffset=function(){return this.get(Ic)},n.prototype.getPosition=function(){return this.get(Pc)},n.prototype.getPositioning=function(){return this.get(Dc)},n.prototype.handleElementChanged=function(){To(this.element);var t=this.getElement();t&&this.element.appendChild(t)},n.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(Oo(this.element),J(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=X(t,ba,this.render,this),this.updatePixelPosition();var n=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?n.insertBefore(this.element,n.childNodes[0]||null):n.appendChild(this.element),this.performAutoPan()}},n.prototype.render=function(){this.updatePixelPosition()},n.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},n.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},n.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},n.prototype.setElement=function(t){this.set(Cc,t)},n.prototype.setMap=function(t){this.set(Rc,t)},n.prototype.setOffset=function(t){this.set(Ic,t)},n.prototype.setPosition=function(t){this.set(Pc,t)},n.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},n.prototype.panIntoView=function(t){var n=this.getMap();if(n&&n.getTargetElement()&&this.get(Pc)){var e=this.getRect(n.getTargetElement(),n.getSize()),r=this.getElement(),i=this.getRect(r,[So(r),Mo(r)]),o=t||{},s=void 0===o.margin?20:o.margin;if(!jn(e,i)){var a=i[0]-e[0],u=e[2]-i[2],c=i[1]-e[1],f=e[3]-i[3],h=[0,0];if(a<0?h[0]=a-s:u<0&&(h[0]=Math.abs(u)+s),c<0?h[1]=c-s:f<0&&(h[1]=Math.abs(f)+s),0!==h[0]||0!==h[1]){var l=n.getView().getCenterInternal(),v=n.getPixelFromCoordinateInternal(l);if(!v)return;var d=[v[0]+h[0],v[1]+h[1]],p=o.animation||{};n.getView().animateInternal({center:n.getCoordinateFromPixelInternal(d),duration:p.duration,easing:p.easing})}}}},n.prototype.getRect=function(t,n){var e=t.getBoundingClientRect(),r=e.left+window.pageXOffset,i=e.top+window.pageYOffset;return[r,i,r+n[0],i+n[1]]},n.prototype.setPositioning=function(t){this.set(Dc,t)},n.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},n.prototype.updatePixelPosition=function(){var t=this.getMap(),n=this.getPosition();if(t&&t.isRendered()&&n){var e=t.getPixelFromCoordinate(n),r=t.getSize();this.updateRenderedPosition(e,r)}else this.setVisible(!1)},n.prototype.updateRenderedPosition=function(t,n){var e=this.element.style,r=this.getOffset(),i=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+r[0])+"px",s=Math.round(t[1]+r[1])+"px",a="0%",u="0%";i==kc||i==Mc||i==Tc?a="-100%":i!=xc&&i!=Sc&&i!=Oc||(a="-50%"),i==gc||i==xc||i==kc?u="-100%":i!=_c&&i!=Sc&&i!=Mc||(u="-50%");var c="translate("+a+", "+u+") translate("+o+", "+s+")";this.rendered.jt!=c&&(this.rendered.jt=c,e.transform=c,e.msTransform=c)},n.prototype.getOptions=function(){return this.options},n}(ot),zc=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.Ti=0,this.Ei={},this.Ai=null,this.Ci=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.Ti=0,this.Ei={},this.Ai=null,this.Ci=null},t.prototype.containsKey=function(t){return this.Ei.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var n=this.Ai;n;)t(n.Ri,n.Ii,this),n=n.newer},t.prototype.get=function(t,n){var e=this.Ei[t];return Mt(void 0!==e,15),e===this.Ci||(e===this.Ai?(this.Ai=this.Ai.newer,this.Ai.older=null):(e.newer.older=e.older,e.older.newer=e.newer),e.newer=null,e.older=this.Ci,this.Ci.newer=e,this.Ci=e),e.Ri},t.prototype.remove=function(t){var n=this.Ei[t];return Mt(void 0!==n,15),n===this.Ci?(this.Ci=n.older,this.Ci&&(this.Ci.newer=null)):n===this.Ai?(this.Ai=n.newer,this.Ai&&(this.Ai.older=null)):(n.newer.older=n.older,n.older.newer=n.newer),delete this.Ei[t],--this.Ti,n.Ri},t.prototype.getCount=function(){return this.Ti},t.prototype.getKeys=function(){var t,n=new Array(this.Ti),e=0;for(t=this.Ci;t;t=t.older)n[e++]=t.Ii;return n},t.prototype.getValues=function(){var t,n=new Array(this.Ti),e=0;for(t=this.Ci;t;t=t.older)n[e++]=t.Ri;return n},t.prototype.peekLast=function(){return this.Ai.Ri},t.prototype.peekLastKey=function(){return this.Ai.Ii},t.prototype.peekFirstKey=function(){return this.Ci.Ii},t.prototype.pop=function(){var t=this.Ai;return delete this.Ei[t.Ii],t.newer&&(t.newer.older=null),this.Ai=t.newer,this.Ai||(this.Ci=null),--this.Ti,t.Ri},t.prototype.replace=function(t,n){this.get(t),this.Ei[t].Ri=n},t.prototype.set=function(t,n){Mt(!(t in this.Ei),16);var e={Ii:t,newer:null,older:this.Ci,Ri:n};this.Ci?this.Ci.newer=e:this.Ai=e,this.Ci=e,this.Ei[t]=e,++this.Ti},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function Lc(t,n,e,r){return void 0!==r?(r[0]=t,r[1]=n,r[2]=e,r):[t,n,e]}function Fc(t,n,e){return t+"/"+n+"/"+e}function Gc(t){return Fc(t[0],t[1],t[2])}function Uc(t){var n=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return Fc(n[0],n[1],n[2])}function Bc(t){return t.split("/").map(Number)}function qc(t){return(t[1]<<t[0])+t[2]}function $c(t,n){var e=t[0],r=t[1],i=t[2];if(n.getMinZoom()>e||e>n.getMaxZoom())return!1;var o=n.getFullTileRange(e);return!o||o.containsXY(r,i)}var Vc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zc=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Vc(n,t),n.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},n.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=Bc(this.peekFirstKey())[0];this.forEach(function(n){n.tileCoord[0]!==t&&(this.remove(Gc(n.tileCoord)),n.release())}.bind(this))}},n}(zc),Wc=function(){function t(t,n,e,r){this.minX=t,this.maxX=n,this.minY=e,this.maxY=r}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,n){return this.minX<=t&&t<=this.maxX&&this.minY<=n&&n<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function Hc(t,n,e,r,i){return void 0!==i?(i.minX=t,i.maxX=n,i.minY=e,i.maxY=r,i):new Wc(t,n,e,r)}var Kc=Wc,Xc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Yc=[],Jc=function(t){function n(n,e,r,i){var o=t.call(this,n,e,{transition:0})||this;return o.Pi={},o.executorGroups={},o.declutterExecutorGroups={},o.loadingSourceTiles=0,o.hitDetectionImageData={},o.Di={},o.sourceTiles=[],o.errorTileKeys={},o.wantedResolution,o.getSourceTiles=i.bind(void 0,o),o.wrappedTileCoord=r,o}return Xc(n,t),n.prototype.getContext=function(t){var n=o(t);return n in this.Pi||(this.Pi[n]=_o(1,1,Yc)),this.Pi[n]},n.prototype.hasContext=function(t){return o(t)in this.Pi},n.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},n.prototype.getReplayState=function(t){var n=o(t);return n in this.Di||(this.Di[n]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.Di[n]},n.prototype.load=function(){this.getSourceTiles()},n.prototype.release=function(){for(var n in this.Pi)Yc.push(this.Pi[n].canvas),delete this.Pi[n];t.prototype.release.call(this)},n}(kt),Qc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),tf=function(t){function n(n,e,r,i,o,s){var a=t.call(this,n,e,s)||this;return a.extent=null,a.Ni=i,a.zi=null,a.B,a.projection=null,a.resolution,a.$t=o,a.Li=r,a.key=r,a}return Qc(n,t),n.prototype.getFormat=function(){return this.Ni},n.prototype.getFeatures=function(){return this.zi},n.prototype.load=function(){this.state==lt&&(this.setState(vt),this.$t(this,this.Li),this.B&&this.B(this.extent,this.resolution,this.projection))},n.prototype.onLoad=function(t,n){this.setFeatures(t)},n.prototype.onError=function(){this.setState(pt)},n.prototype.setFeatures=function(t){this.zi=t,this.setState(dt)},n.prototype.setLoader=function(t){this.B=t},n}(kt);function nf(t){return Array.isArray(t)?Go(t):t}var ef="arraybuffer",rf="json",of="text",sf="xml",af=!1;function uf(t,n,e,r,i,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(e,r,i):t,!0),n.getType()==ef&&(a.responseType="arraybuffer"),a.withCredentials=af,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var r=n.getType(),u=void 0;r==rf||r==of?u=a.responseText:r==sf?(u=a.responseXML)||(u=(new DOMParser).parseFromString(a.responseText,"application/xml")):r==ef&&(u=a.response),u?o(n.readFeatures(u,{extent:e,featureProjection:i}),n.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function cf(t,n){return function(e,r,i,o,s){var a=this;uf(t,n,e,r,i,(function(t,n){a.addFeatures(t),void 0!==o&&o(t)}),s||j)}}function ff(t,n){return[[-1/0,-1/0,1/0,1/0]]}var hf=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function lf(t,n,e,r){var i=document.createElement("script"),s="olc_"+o(n);function a(){delete window[s],i.parentNode.removeChild(i)}i.async=!0,i.src=t+(-1==t.indexOf("?")?"?":"&")+(r||"callback")+"="+s;var u=setTimeout((function(){a(),e&&e()}),1e4);window[s]=function(t){clearTimeout(u),a(),n(t)},document.getElementsByTagName("head")[0].appendChild(i)}var vf,df=function(t){function n(n){var e=this,r="Unexpected response status: "+n.status;return(e=t.call(this,r)||this).name="ResponseError",e.response=n,e}return hf(n,t),n}(Error),pf=function(t){function n(n){var e=t.call(this,"Failed to issue request")||this;return e.name="ClientError",e.client=n,e}return hf(n,t),n}(Error);function yf(t){return new Promise((function(n,e){var r=new XMLHttpRequest;r.addEventListener("load",(function(t){var r=t.target;if(!r.status||r.status>=200&&r.status<300){var i=void 0;try{i=JSON.parse(r.responseText)}catch(t){var o="Error parsing response text as JSON: "+t.message;return void e(new Error(o))}n(i)}else e(new df(r))})),r.addEventListener("error",(function(t){e(new pf(t.target))})),r.open("GET",t),r.setRequestHeader("Accept","application/json"),r.send()}))}function mf(t,n){return n.indexOf("://")>=0?n:new URL(n,t).href}var bf=function(){function t(){}return t.prototype.drawCustom=function(t,n,e,r){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,n){},t.prototype.drawFeature=function(t,n){},t.prototype.drawGeometryCollection=function(t,n){},t.prototype.drawLineString=function(t,n){},t.prototype.drawMultiLineString=function(t,n){},t.prototype.drawMultiPoint=function(t,n){},t.prototype.drawMultiPolygon=function(t,n){},t.prototype.drawPoint=function(t,n){},t.prototype.drawPolygon=function(t,n){},t.prototype.drawText=function(t,n){},t.prototype.setFillStrokeStyle=function(t,n){},t.prototype.setImageStyle=function(t,n){},t.prototype.setTextStyle=function(t,n){},t}(),wf=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),gf=function(t){function n(n,e,r,i,o,s,a){var u=t.call(this)||this;return u.Pi=n,u.Rt=e,u.st=r,u.jt=i,u.Fi=o,u.Gi=s,u.Ui=a,u.Bi=null,u.qi=null,u.$i=null,u.Vi=null,u.Zi=null,u.Dt=null,u.Wi=0,u.Hi=0,u.Ki=0,u.Xi=0,u.Yi=0,u.Ji=0,u.Qi=!1,u.no=0,u.eo=[0,0],u.ro=0,u.io="",u.oo=0,u.so=0,u.ao=!1,u.uo=0,u.co=[0,0],u.fo=null,u.ho=null,u.lo=null,u.vo=[],u.do=[1,0,0,1,0,0],u}return wf(n,t),n.prototype.po=function(t,n,e,r){if(this.Dt){var i=Ur(t,n,e,r,this.jt,this.vo),o=this.Pi,s=this.do,a=o.globalAlpha;1!=this.Xi&&(o.globalAlpha=a*this.Xi);var u=this.no;this.Qi&&(u+=this.Fi);for(var c=0,f=i.length;c<f;c+=2){var h=i[c]-this.Wi,l=i[c+1]-this.Hi;if(0!==u||1!=this.eo[0]||1!=this.eo[1]){var v=h+this.Wi,d=l+this.Hi;an(s,v,d,1,1,u,-v,-d),o.setTransform.apply(o,s),o.translate(v,d),o.scale(this.eo[0],this.eo[1]),o.drawImage(this.Dt,this.Yi,this.Ji,this.ro,this.Ki,-this.Wi,-this.Hi,this.ro,this.Ki),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.Dt,this.Yi,this.Ji,this.ro,this.Ki,h,l,this.ro,this.Ki)}1!=this.Xi&&(o.globalAlpha=a)}},n.prototype.yo=function(t,n,e,r){if(this.lo&&""!==this.io){this.fo&&this.mo(this.fo),this.ho&&this.bo(this.ho),this.wo(this.lo);var i=Ur(t,n,e,r,this.jt,this.vo),o=this.Pi,s=this.uo;for(this.ao&&(s+=this.Fi);n<e;n+=r){var a=i[n]+this.oo,u=i[n+1]+this.so;if(0!==s||1!=this.co[0]||1!=this.co[1]){var c=an(this.do,a,u,1,1,s,-a,-u);o.setTransform.apply(o,c),o.translate(a,u),o.scale(this.co[0],this.co[1]),this.ho&&o.strokeText(this.io,0,0),this.fo&&o.fillText(this.io,0,0),o.setTransform(1,0,0,1,0,0)}else this.ho&&o.strokeText(this.io,a,u),this.fo&&o.fillText(this.io,a,u)}}},n.prototype.xo=function(t,n,e,r,i){var o=this.Pi,s=Ur(t,n,e,r,this.jt,this.vo);o.moveTo(s[0],s[1]);var a=s.length;i&&(a-=2);for(var u=2;u<a;u+=2)o.lineTo(s[u],s[u+1]);return i&&o.closePath(),e},n.prototype.ko=function(t,n,e,r){for(var i=0,o=e.length;i<o;++i)n=this.xo(t,n,e[i],r,!0);return n},n.prototype.drawCircle=function(t){if(te(this.st,t.getExtent())){if(this.Vi||this.Zi){this.Vi&&this.mo(this.Vi),this.Zi&&this.bo(this.Zi);var n=Xr(t,this.jt,this.vo),e=n[2]-n[0],r=n[3]-n[1],i=Math.sqrt(e*e+r*r),o=this.Pi;o.beginPath(),o.arc(n[0],n[1],i,0,2*Math.PI),this.Vi&&o.fill(),this.Zi&&o.stroke()}""!==this.io&&this.yo(t.getCenter(),0,2,2)}},n.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},n.prototype.setTransform=function(t){this.jt=t},n.prototype.drawGeometry=function(t){switch(t.getType()){case It.POINT:this.drawPoint(t);break;case It.LINE_STRING:this.drawLineString(t);break;case It.POLYGON:this.drawPolygon(t);break;case It.MULTI_POINT:this.drawMultiPoint(t);break;case It.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case It.MULTI_POLYGON:this.drawMultiPolygon(t);break;case It.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case It.CIRCLE:this.drawCircle(t)}},n.prototype.drawFeature=function(t,n){var e=n.getGeometryFunction()(t);e&&te(this.st,e.getExtent())&&(this.setStyle(n),this.drawGeometry(e))},n.prototype.drawGeometryCollection=function(t){for(var n=t.getGeometriesArray(),e=0,r=n.length;e<r;++e)this.drawGeometry(n[e])},n.prototype.drawPoint=function(t){this.Gi&&(t=t.simplifyTransformed(this.Gi,this.Ui));var n=t.getFlatCoordinates(),e=t.getStride();this.Dt&&this.po(n,0,n.length,e),""!==this.io&&this.yo(n,0,n.length,e)},n.prototype.drawMultiPoint=function(t){this.Gi&&(t=t.simplifyTransformed(this.Gi,this.Ui));var n=t.getFlatCoordinates(),e=t.getStride();this.Dt&&this.po(n,0,n.length,e),""!==this.io&&this.yo(n,0,n.length,e)},n.prototype.drawLineString=function(t){if(this.Gi&&(t=t.simplifyTransformed(this.Gi,this.Ui)),te(this.st,t.getExtent())){if(this.Zi){this.bo(this.Zi);var n=this.Pi,e=t.getFlatCoordinates();n.beginPath(),this.xo(e,0,e.length,t.getStride(),!1),n.stroke()}if(""!==this.io){var r=t.getFlatMidpoint();this.yo(r,0,2,2)}}},n.prototype.drawMultiLineString=function(t){this.Gi&&(t=t.simplifyTransformed(this.Gi,this.Ui));var n=t.getExtent();if(te(this.st,n)){if(this.Zi){this.bo(this.Zi);var e=this.Pi,r=t.getFlatCoordinates(),i=0,o=t.getEnds(),s=t.getStride();e.beginPath();for(var a=0,u=o.length;a<u;++a)i=this.xo(r,i,o[a],s,!1);e.stroke()}if(""!==this.io){var c=t.getFlatMidpoints();this.yo(c,0,c.length,2)}}},n.prototype.drawPolygon=function(t){if(this.Gi&&(t=t.simplifyTransformed(this.Gi,this.Ui)),te(this.st,t.getExtent())){if(this.Zi||this.Vi){this.Vi&&this.mo(this.Vi),this.Zi&&this.bo(this.Zi);var n=this.Pi;n.beginPath(),this.ko(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.Vi&&n.fill(),this.Zi&&n.stroke()}if(""!==this.io){var e=t.getFlatInteriorPoint();this.yo(e,0,2,2)}}},n.prototype.drawMultiPolygon=function(t){if(this.Gi&&(t=t.simplifyTransformed(this.Gi,this.Ui)),te(this.st,t.getExtent())){if(this.Zi||this.Vi){this.Vi&&this.mo(this.Vi),this.Zi&&this.bo(this.Zi);var n=this.Pi,e=t.getOrientedFlatCoordinates(),r=0,i=t.getEndss(),o=t.getStride();n.beginPath();for(var s=0,a=i.length;s<a;++s){var u=i[s];r=this.ko(e,r,u,o)}this.Vi&&n.fill(),this.Zi&&n.stroke()}if(""!==this.io){var c=t.getFlatInteriorPoints();this.yo(c,0,c.length,2)}}},n.prototype.mo=function(t){var n=this.Pi,e=this.Bi;e?e.fillStyle!=t.fillStyle&&(e.fillStyle=t.fillStyle,n.fillStyle=t.fillStyle):(n.fillStyle=t.fillStyle,this.Bi={fillStyle:t.fillStyle})},n.prototype.bo=function(t){var n=this.Pi,e=this.qi;e?(e.lineCap!=t.lineCap&&(e.lineCap=t.lineCap,n.lineCap=t.lineCap),n.setLineDash&&(x(e.lineDash,t.lineDash)||n.setLineDash(e.lineDash=t.lineDash),e.lineDashOffset!=t.lineDashOffset&&(e.lineDashOffset=t.lineDashOffset,n.lineDashOffset=t.lineDashOffset)),e.lineJoin!=t.lineJoin&&(e.lineJoin=t.lineJoin,n.lineJoin=t.lineJoin),e.lineWidth!=t.lineWidth&&(e.lineWidth=t.lineWidth,n.lineWidth=t.lineWidth),e.miterLimit!=t.miterLimit&&(e.miterLimit=t.miterLimit,n.miterLimit=t.miterLimit),e.strokeStyle!=t.strokeStyle&&(e.strokeStyle=t.strokeStyle,n.strokeStyle=t.strokeStyle)):(n.lineCap=t.lineCap,n.setLineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.lineWidth=t.lineWidth,n.miterLimit=t.miterLimit,n.strokeStyle=t.strokeStyle,this.qi={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},n.prototype.wo=function(t){var n=this.Pi,e=this.$i,r=t.textAlign?t.textAlign:Fs;e?(e.font!=t.font&&(e.font=t.font,n.font=t.font),e.textAlign!=r&&(e.textAlign=r,n.textAlign=r),e.textBaseline!=t.textBaseline&&(e.textBaseline=t.textBaseline,n.textBaseline=t.textBaseline)):(n.font=t.font,n.textAlign=r,n.textBaseline=t.textBaseline,this.$i={font:t.font,textAlign:r,textBaseline:t.textBaseline})},n.prototype.setFillStrokeStyle=function(t,n){var e=this;if(t){var r=t.getColor();this.Vi={fillStyle:nf(r||Is)}}else this.Vi=null;if(n){var i=n.getColor(),o=n.getLineCap(),s=n.getLineDash(),a=n.getLineDashOffset(),u=n.getLineJoin(),c=n.getWidth(),f=n.getMiterLimit(),h=s||Ds;this.Zi={lineCap:void 0!==o?o:Ps,lineDash:1===this.Rt?h:h.map((function(t){return t*e.Rt})),lineDashOffset:(a||0)*this.Rt,lineJoin:void 0!==u?u:Ns,lineWidth:(void 0!==c?c:1)*this.Rt,miterLimit:void 0!==f?f:zs,strokeStyle:nf(i||Ls)}}else this.Zi=null},n.prototype.setImageStyle=function(t){var n;if(t&&(n=t.getSize())){var e=t.getAnchor(),r=t.getOrigin();this.Dt=t.getImage(this.Rt),this.Wi=e[0]*this.Rt,this.Hi=e[1]*this.Rt,this.Ki=n[1]*this.Rt,this.Xi=t.getOpacity(),this.Yi=r[0],this.Ji=r[1],this.Qi=t.getRotateWithView(),this.no=t.getRotation(),this.eo=t.getScaleArray(),this.ro=n[0]*this.Rt}else this.Dt=null},n.prototype.setTextStyle=function(t){if(t){var n=t.getFill();if(n){var e=n.getColor();this.fo={fillStyle:nf(e||Is)}}else this.fo=null;var r=t.getStroke();if(r){var i=r.getColor(),o=r.getLineCap(),s=r.getLineDash(),a=r.getLineDashOffset(),u=r.getLineJoin(),c=r.getWidth(),f=r.getMiterLimit();this.ho={lineCap:void 0!==o?o:Ps,lineDash:s||Ds,lineDashOffset:a||0,lineJoin:void 0!==u?u:Ns,lineWidth:void 0!==c?c:1,miterLimit:void 0!==f?f:zs,strokeStyle:nf(i||Ls)}}else this.ho=null;var h=t.getFont(),l=t.getOffsetX(),v=t.getOffsetY(),d=t.getRotateWithView(),p=t.getRotation(),y=t.getScaleArray(),m=t.getText(),b=t.getTextAlign(),w=t.getTextBaseline();this.lo={font:void 0!==h?h:Rs,textAlign:void 0!==b?b:Fs,textBaseline:void 0!==w?w:Gs},this.io=void 0!==m?m:"",this.oo=void 0!==l?this.Rt*l:0,this.so=void 0!==v?this.Rt*v:0,this.ao=void 0!==d&&d,this.uo=void 0!==p?p:0,this.co=[this.Rt*y[0],this.Rt*y[1]]}else this.io=""},n}(bf),xf="Circle",kf="Default",_f="Image",Sf="LineString",Mf="Polygon",jf="Text",Of={Point:function(t,n,e,r,i){var o,s=e.getImage(),a=e.getText();i&&(t=i,o=s&&a&&a.getText()?{}:void 0);if(s){if(s.getImageState()!=po)return;var u=t.getBuilder(e.getZIndex(),_f);u.setImageStyle(s,o),u.drawPoint(n,r)}if(a&&a.getText()){var c=t.getBuilder(e.getZIndex(),jf);c.setTextStyle(a,o),c.drawText(n,r)}},LineString:function(t,n,e,r,i){var o=e.getStroke();if(o){var s=t.getBuilder(e.getZIndex(),Sf);s.setFillStrokeStyle(null,o),s.drawLineString(n,r)}var a=e.getText();if(a&&a.getText()){var u=(i||t).getBuilder(e.getZIndex(),jf);u.setTextStyle(a),u.drawText(n,r)}},Polygon:function(t,n,e,r,i){var o=e.getFill(),s=e.getStroke();if(o||s){var a=t.getBuilder(e.getZIndex(),Mf);a.setFillStrokeStyle(o,s),a.drawPolygon(n,r)}var u=e.getText();if(u&&u.getText()){var c=(i||t).getBuilder(e.getZIndex(),jf);c.setTextStyle(u),c.drawText(n,r)}},MultiPoint:function(t,n,e,r,i){var o,s=e.getImage(),a=e.getText();i&&(t=i,o=s&&a&&a.getText()?{}:void 0);if(s){if(s.getImageState()!=po)return;var u=t.getBuilder(e.getZIndex(),_f);u.setImageStyle(s,o),u.drawMultiPoint(n,r)}if(a&&a.getText()){var c=(i||t).getBuilder(e.getZIndex(),jf);c.setTextStyle(a,o),c.drawText(n,r)}},MultiLineString:function(t,n,e,r,i){var o=e.getStroke();if(o){var s=t.getBuilder(e.getZIndex(),Sf);s.setFillStrokeStyle(null,o),s.drawMultiLineString(n,r)}var a=e.getText();if(a&&a.getText()){var u=(i||t).getBuilder(e.getZIndex(),jf);u.setTextStyle(a),u.drawText(n,r)}},MultiPolygon:function(t,n,e,r,i){var o=e.getFill(),s=e.getStroke();if(s||o){var a=t.getBuilder(e.getZIndex(),Mf);a.setFillStrokeStyle(o,s),a.drawMultiPolygon(n,r)}var u=e.getText();if(u&&u.getText()){var c=(i||t).getBuilder(e.getZIndex(),jf);c.setTextStyle(u),c.drawText(n,r)}},GeometryCollection:function(t,n,e,r,i){var o,s,a=n.getGeometriesArray();for(o=0,s=a.length;o<s;++o){(0,Of[a[o].getType()])(t,a[o],e,r,i)}},Circle:function(t,n,e,r,i){var o=e.getFill(),s=e.getStroke();if(o||s){var a=t.getBuilder(e.getZIndex(),xf);a.setFillStrokeStyle(o,s),a.drawCircle(n,r)}var u=e.getText();if(u&&u.getText()){var c=(i||t).getBuilder(e.getZIndex(),jf);c.setTextStyle(u),c.drawText(n,r)}}};function Tf(t,n){return parseInt(o(t),10)-parseInt(o(n),10)}function Ef(t,n){var e=Af(t,n);return e*e}function Af(t,n){return.5*t/n}function Cf(t,n,e,r,i,o,s){var a=!1,u=e.getImage();if(u){var c=u.getImageState();c==po||c==yo?u.unlistenImageChange(i):(c==lo&&u.load(),c=u.getImageState(),u.listenImageChange(i),a=!0)}return function(t,n,e,r,i,o){var s=e.getGeometryFunction()(n);if(!s)return;var a=s.simplifyTransformed(r,i);if(e.getRenderer())Rf(t,a,e,n);else{(0,Of[a.getType()])(t,a,e,n,o)}}(t,n,e,r,o,s),a}function Rf(t,n,e,r){if(n.getType()!=It.GEOMETRY_COLLECTION)t.getBuilder(e.getZIndex(),kf).drawCustom(n,r,e.getRenderer(),e.getHitDetectionRenderer());else for(var i=n.getGeometries(),o=0,s=i.length;o<s;++o)Rf(t,i[o],e,r)}function If(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");var n,e=t.inversePixelTransform[0],r=t.frameState,i=Jt(t.inversePixelTransform.slice(),r.coordinateToPixelTransform),o=Ef(r.viewState.resolution,e),s=Rr();return s&&(n=jr(s,r.viewState.projection)),new gf(t.context,e,r.extent,i,r.viewState.rotation,o,n)}var Pf,Df={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},Nf={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0};function zf(t,n,e,r,i){t.beginPath(),t.moveTo(0,0),t.lineTo(n,e),t.lineTo(r,i),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(n,r)+1,Math.max(e,i)),t.restore()}function Lf(t,n){return Math.abs(t[4*n]-210)>2||Math.abs(t[4*n+3]-191.25)>2}function Ff(t,n,e,r){var i=Tr(e,n,t),o=br(n,r,e),s=n.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var u=t.getExtent();if(!u||Mn(u,i)){var c=br(t,o,i)/o;isFinite(c)&&c>0&&(o/=c)}return o}function Gf(t,n,e,r){var i=Zn(e),o=Ff(t,n,i,r);return(!isFinite(o)||o<=0)&&Bn(e,(function(e){return o=Ff(t,n,e,r),isFinite(o)&&o>0})),o}function Uf(t,n,e,r,i,o,s,a,u,c,f,h){var l=_o(Math.round(e*t),Math.round(e*n));if(h||E(l,Df),0===u.length)return l.canvas;function v(t){return Math.round(t*e)/e}l.scale(e,e),l.globalCompositeOperation="lighter";var d=[1/0,1/0,-1/0,-1/0];u.forEach((function(t,n,e){Nn(d,t.extent)}));var p=Qn(d),y=Kn(d),m=_o(Math.round(e*p/r),Math.round(e*y/r));h||E(m,Df);var b=e/r;u.forEach((function(t,n,e){var r=t.extent[0]-d[0],i=-(t.extent[3]-d[3]),o=Qn(t.extent),s=Kn(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,c,c,t.image.width-2*c,t.image.height-2*c,r*b,i*b,o*b,s*b)}));var w=Yn(s);return a.getTriangles().forEach((function(t,n,i){var s=t.source,a=t.target,u=s[0][0],c=s[0][1],f=s[1][0],p=s[1][1],y=s[2][0],b=s[2][1],g=v((a[0][0]-w[0])/o),x=v(-(a[0][1]-w[1])/o),k=v((a[1][0]-w[0])/o),_=v(-(a[1][1]-w[1])/o),S=v((a[2][0]-w[0])/o),M=v(-(a[2][1]-w[1])/o),j=u,O=c;u=0,c=0;var T=ve([[f-=j,p-=O,0,0,k-g],[y-=j,b-=O,0,0,S-g],[0,0,f,p,_-x],[0,0,y,b,M-x]]);if(T){if(l.save(),l.beginPath(),function(){if(void 0===Pf){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",zf(t,4,5,4,0),zf(t,4,5,0,5);var n=t.getImageData(0,0,3,3).data;Pf=Lf(n,0)||Lf(n,4)||Lf(n,8)}return Pf}()||!h){l.moveTo(k,_);for(var E=g-k,A=x-_,C=0;C<4;C++)l.lineTo(k+v((C+1)*E/4),_+v(C*A/3)),3!=C&&l.lineTo(k+v((C+1)*E/4),_+v((C+1)*A/3));l.lineTo(S,M)}else l.moveTo(k,_),l.lineTo(g,x),l.lineTo(S,M);l.clip(),l.transform(T[0],T[2],T[1],T[3],g,x),l.translate(d[0]-j,d[3]-O),l.scale(r/e,-r/e),l.drawImage(m.canvas,0,0),l.restore()}})),f&&(l.save(),l.globalCompositeOperation="source-over",l.strokeStyle="black",l.lineWidth=1,a.getTriangles().forEach((function(t,n,e){var r=t.target,i=(r[0][0]-w[0])/o,s=-(r[0][1]-w[1])/o,a=(r[1][0]-w[0])/o,u=-(r[1][1]-w[1])/o,c=(r[2][0]-w[0])/o,f=-(r[2][1]-w[1])/o;l.beginPath(),l.moveTo(a,u),l.lineTo(i,s),l.lineTo(c,f),l.closePath(),l.stroke()})),l.restore()),l.canvas}var Bf=[0,0,0],qf=function(){function t(t){var n;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.Oe=t.resolutions,Mt(_(this.Oe,(function(t,n){return n-t}),!0),17),!t.origins)for(var e=0,r=this.Oe.length-1;e<r;++e)if(n){if(this.Oe[e]/this.Oe[e+1]!==n){n=void 0;break}}else n=this.Oe[e]/this.Oe[e+1];this.je=n,this.maxZoom=this.Oe.length-1,this._o=void 0!==t.origin?t.origin:null,this.So=null,void 0!==t.origins&&(this.So=t.origins,Mt(this.So.length==this.Oe.length,20));var i=t.extent;void 0===i||this._o||this.So||(this._o=Yn(i)),Mt(!this._o&&this.So||this._o&&!this.So,18),this.Mo=null,void 0!==t.tileSizes&&(this.Mo=t.tileSizes,Mt(this.Mo.length==this.Oe.length,19)),this.jo=void 0!==t.tileSize?t.tileSize:this.Mo?null:Ia,Mt(!this.jo&&this.Mo||this.jo&&!this.Mo,22),this.st=void 0!==i?i:null,this.Oo=null,this.To=[0,0],this.Eo=[0,0,0,0],void 0!==t.sizes?this.Oo=t.sizes.map((function(t,n){var e=new Kc(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(i){var r=this.getTileRangeForExtentAndZ(i,n);e.minX=Math.max(r.minX,e.minX),e.maxX=Math.min(r.maxX,e.maxX),e.minY=Math.max(r.minY,e.minY),e.maxY=Math.min(r.maxY,e.maxY)}return e}),this):i&&this.Ao(i)}return t.prototype.forEachTileCoord=function(t,n,e){for(var r=this.getTileRangeForExtentAndZ(t,n),i=r.minX,o=r.maxX;i<=o;++i)for(var s=r.minY,a=r.maxY;s<=a;++s)e([n,i,s])},t.prototype.forEachTileCoordParentTileRange=function(t,n,e,r){var i,o,s=null,a=t[0]-1;for(2===this.je?(i=t[1],o=t[2]):s=this.getTileCoordExtent(t,r);a>=this.minZoom;){if(n(a,2===this.je?Hc(i=Math.floor(i/2),i,o=Math.floor(o/2),o,e):this.getTileRangeForExtentAndZ(s,a,e)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.st},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this._o?this._o:this.So[t]},t.prototype.getResolution=function(t){return this.Oe[t]},t.prototype.getResolutions=function(){return this.Oe},t.prototype.getTileCoordChildTileRange=function(t,n,e){if(t[0]<this.maxZoom){if(2===this.je){var r=2*t[1],i=2*t[2];return Hc(r,r+1,i,i+1,n)}var o=this.getTileCoordExtent(t,e||this.Eo);return this.getTileRangeForExtentAndZ(o,t[0]+1,n)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,n,e){if(n>this.maxZoom||n<this.minZoom)return null;var r=t[0],i=t[1],o=t[2];if(n===r)return Hc(i,o,i,o,e);if(this.je){var s=Math.pow(this.je,n-r),a=Math.floor(i*s),u=Math.floor(o*s);return n<r?Hc(a,a,u,u,e):Hc(a,Math.floor(s*(i+1))-1,u,Math.floor(s*(o+1))-1,e)}var c=this.getTileCoordExtent(t,this.Eo);return this.getTileRangeForExtentAndZ(c,n,e)},t.prototype.getTileRangeExtent=function(t,n,e){var r=this.getOrigin(t),i=this.getResolution(t),o=eu(this.getTileSize(t),this.To),s=r[0]+n.minX*o[0]*i,a=r[0]+(n.maxX+1)*o[0]*i;return An(s,r[1]+n.minY*o[1]*i,a,r[1]+(n.maxY+1)*o[1]*i,e)},t.prototype.getTileRangeForExtentAndZ=function(t,n,e){var r=Bf;this.Co(t[0],t[3],n,!1,r);var i=r[1],o=r[2];return this.Co(t[2],t[1],n,!0,r),Hc(i,r[1],o,r[2],e)},t.prototype.getTileCoordCenter=function(t){var n=this.getOrigin(t[0]),e=this.getResolution(t[0]),r=eu(this.getTileSize(t[0]),this.To);return[n[0]+(t[1]+.5)*r[0]*e,n[1]-(t[2]+.5)*r[1]*e]},t.prototype.getTileCoordExtent=function(t,n){var e=this.getOrigin(t[0]),r=this.getResolution(t[0]),i=eu(this.getTileSize(t[0]),this.To),o=e[0]+t[1]*i[0]*r,s=e[1]-(t[2]+1)*i[1]*r;return An(o,s,o+i[0]*r,s+i[1]*r,n)},t.prototype.getTileCoordForCoordAndResolution=function(t,n,e){return this.Ro(t[0],t[1],n,!1,e)},t.prototype.Ro=function(t,n,e,r,i){var o=this.getZForResolution(e),s=e/this.getResolution(o),a=this.getOrigin(o),u=eu(this.getTileSize(o),this.To),c=s*(t-a[0])/e/u[0],f=s*(a[1]-n)/e/u[1];return r?(c=xe(c,5)-1,f=xe(f,5)-1):(c=ge(c,5),f=ge(f,5)),Lc(o,c,f,i)},t.prototype.Co=function(t,n,e,r,i){var o=this.getOrigin(e),s=this.getResolution(e),a=eu(this.getTileSize(e),this.To),u=(t-o[0])/s/a[0],c=(o[1]-n)/s/a[1];return r?(u=xe(u,5)-1,c=xe(c,5)-1):(u=ge(u,5),c=ge(c,5)),Lc(e,u,c,i)},t.prototype.getTileCoordForCoordAndZ=function(t,n,e){return this.Co(t[0],t[1],n,!1,e)},t.prototype.getTileCoordResolution=function(t){return this.Oe[t[0]]},t.prototype.getTileSize=function(t){return this.jo?this.jo:this.Mo[t]},t.prototype.getFullTileRange=function(t){return this.Oo?this.Oo[t]:this.st?this.getTileRangeForExtentAndZ(this.st,t):null},t.prototype.getZForResolution=function(t,n){return ue(m(this.Oe,t,n||0),this.minZoom,this.maxZoom)},t.prototype.Ao=function(t){for(var n=this.Oe.length,e=new Array(n),r=this.minZoom;r<n;++r)e[r]=this.getTileRangeForExtentAndZ(t,r);this.Oo=e},t}();function $f(t){var n=t.getDefaultTileGrid();return n||(n=Kf(t),t.setDefaultTileGrid(n)),n}function Vf(t,n,e){var r=n[0],i=t.getTileCoordCenter(n),o=Xf(e);if(Mn(o,i))return n;var s=Qn(o),a=Math.ceil((o[0]-i[0])/s);return i[0]+=s*a,t.getTileCoordForCoordAndZ(i,r)}function Zf(t,n,e,r){var i=void 0!==r?r:vn,o=Hf(t,n,e);return new qf({extent:t,origin:Wn(t,i),resolutions:o,tileSize:e})}function Wf(t){var n=t||{},e=n.extent||mr("EPSG:3857").getExtent(),r={extent:e,minZoom:n.minZoom,tileSize:n.tileSize,resolutions:Hf(e,n.maxZoom,n.tileSize,n.maxResolution)};return new qf(r)}function Hf(t,n,e,r){for(var i=void 0!==n?n:42,o=Kn(t),s=Qn(t),a=eu(void 0!==e?e:Ia),u=r>0?r:Math.max(s/a[0],o/a[1]),c=i+1,f=new Array(c),h=0;h<c;++h)f[h]=u/Math.pow(2,h);return f}function Kf(t,n,e,r){return Zf(Xf(t),n,e,r)}function Xf(t){var n=(t=mr(t)).getExtent();if(!n){var e=180*zt[Ft.DEGREES]/t.getMetersPerUnit();n=An(-e,-e,e,e)}return n}function Yf(t,n){var e=/\{z\}/g,r=/\{x\}/g,i=/\{y\}/g,o=/\{-y\}/g;return function(s,a,u){return s?t.replace(e,s[0].toString()).replace(r,s[1].toString()).replace(i,s[2].toString()).replace(o,(function(){var t=s[0],e=n.getFullTileRange(t);return Mt(e,55),(e.getHeight()-s[2]-1).toString()})):void 0}}function Jf(t,n){for(var e=t.length,r=new Array(e),i=0;i<e;++i)r[i]=Yf(t[i],n);return Qf(r)}function Qf(t){return 1===t.length?t[0]:function(n,e,r){if(n){var i=ye(qc(n),t.length);return t[i](n,e,r)}}}function th(t,n,e){}function nh(t){var n=[],e=/\{([a-z])-([a-z])\}/.exec(t);if(e){var r=e[1].charCodeAt(0),i=e[2].charCodeAt(0),o=void 0;for(o=r;o<=i;++o)n.push(t.replace(e[0],String.fromCharCode(o)));return n}if(e=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(e[2],10),a=parseInt(e[1],10);a<=s;a++)n.push(t.replace(e[0],a.toString()));return n}return n.push(t),n}function eh(t,n){var e=[];Object.keys(n).forEach((function(t){null!==n[t]&&void 0!==n[t]&&e.push(t+"="+encodeURIComponent(n[t]))}));var r=e.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+r}var rh,ih=34962,oh=34963,sh=35044,ah=35048,uh=5126,ch=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function fh(t,n){for(var e=E({preserveDrawingBuffer:!0},n),r=ch.length,i=0;i<r;++i)try{var o=t.getContext(ch[i],e);if(o)return o}catch(t){}return null}var hh="http://www.w3.org/2001/XMLSchema-instance";function lh(t,n){return Nh().createElementNS(t,n)}function vh(t,n){return dh(t,n,[]).join("")}function dh(t,n,e){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)n?e.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):e.push(t.nodeValue);else{var r=void 0;for(r=t.firstChild;r;r=r.nextSibling)dh(r,n,e)}return e}function ph(t){return"documentElement"in t}function yh(t,n,e){return t.getAttributeNS(n,e)||""}function mh(t){return(new DOMParser).parseFromString(t,"application/xml")}function bh(t,n){return function(e,r){var i=t.call(void 0!==n?n:this,e,r);void 0!==i&&w(r[r.length-1],i)}}function wh(t,n){return function(e,r){var i=t.call(void 0!==n?n:this,e,r);void 0!==i&&r[r.length-1].push(i)}}function gh(t,n){return function(e,r){var i=t.call(void 0!==n?n:this,e,r);void 0!==i&&(r[r.length-1]=i)}}function xh(t,n,e){return function(r,i){var o=t.call(void 0!==e?e:this,r,i);if(void 0!==o){var s=i[i.length-1],a=void 0!==n?n:r.localName,u=void 0;a in s?u=s[a]:(u=[],s[a]=u),u.push(o)}}}function kh(t,n,e){return function(r,i){var o=t.call(void 0!==e?e:this,r,i);void 0!==o&&(i[i.length-1][void 0!==n?n:r.localName]=o)}}function _h(t,n){return function(e,r,i){t.call(void 0!==n?n:this,e,r,i),i[i.length-1].node.appendChild(e)}}function Sh(t,n){var e,r;return function(n,i,o){if(void 0===e){e={};var s={};s[n.localName]=t,e[n.namespaceURI]=s,r=Mh(n.localName)}Ch(e,r,i,o)}}function Mh(t,n){var e=t;return function(t,r,i){var o=r[r.length-1].node,s=e;return void 0===s&&(s=i),lh(void 0!==n?n:o.namespaceURI,s)}}var jh=Mh();function Oh(t,n){for(var e=n.length,r=new Array(e),i=0;i<e;++i)r[i]=t[n[i]];return r}function Th(t,n,e){var r,i,o=void 0!==e?e:{};for(r=0,i=t.length;r<i;++r)o[t[r]]=n;return o}function Eh(t,n,e,r){var i;for(i=n.firstElementChild;i;i=i.nextElementSibling){var o=t[i.namespaceURI];if(void 0!==o){var s=o[i.localName];void 0!==s&&s.call(r,i,e)}}}function Ah(t,n,e,r,i){return r.push(t),Eh(n,e,r,i),r.pop()}function Ch(t,n,e,r,i,o){for(var s,a,u=(void 0!==i?i:e).length,c=0;c<u;++c)void 0!==(s=e[c])&&void 0!==(a=n.call(void 0!==o?o:this,s,r,void 0!==i?i[c]:void 0))&&t[a.namespaceURI][a.localName].call(o,a,s,r)}function Rh(t,n,e,r,i,o,s){return i.push(t),Ch(n,e,r,i,o,s),i.pop()}var Ih=void 0;function Ph(){return void 0===Ih&&"undefined"!=typeof XMLSerializer&&(Ih=new XMLSerializer),Ih}var Dh=void 0;function Nh(){return void 0===Dh&&"undefined"!=typeof document&&(Dh=document.implementation.createDocument("","",null)),Dh}var zh=sh;function Lh(t){switch(t){case ih:return Float32Array;case oh:return Uint32Array;default:return Float32Array}}var Fh=function(){function t(t,n){this.array=null,this.type=t,Mt(t===ih||t===oh,62),this.usage=void 0!==n?n:zh}return t.prototype.ofSize=function(t){this.array=new(Lh(this.type))(t)},t.prototype.fromArray=function(t){var n=Lh(this.type);this.array=n.from?n.from(t):new n(t)},t.prototype.fromArrayBuffer=function(t){this.array=new(Lh(this.type))(t)},t.prototype.getType=function(){return this.type},t.prototype.getArray=function(){return this.array},t.prototype.getUsage=function(){return this.usage},t.prototype.getSize=function(){return this.array?this.array.length:0},t}(),Gh="webglcontextlost",Uh="webglcontextrestored",Bh=function(){function t(t){this.Io=t.webGlContext;var n=this.Io;this.Po=t.scaleRatio||1,this.Do=n.createTexture(),this.No=null,this.zo=n.createFramebuffer();var e=n.createShader(n.VERTEX_SHADER);n.shaderSource(e,t.vertexShader||"\n precision mediump float;\n \n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n \n uniform vec2 u_screenSize;\n \n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n"),n.compileShader(e);var r=n.createShader(n.FRAGMENT_SHADER);n.shaderSource(r,t.fragmentShader||"\n precision mediump float;\n \n uniform sampler2D u_image;\n uniform float u_opacity;\n \n varying vec2 v_texCoord;\n \n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n }\n"),n.compileShader(r),this.Lo=n.createProgram(),n.attachShader(this.Lo,e),n.attachShader(this.Lo,r),n.linkProgram(this.Lo),this.Fo=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,this.Fo),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),n.STATIC_DRAW),this.Go=n.getAttribLocation(this.Lo,"a_position"),this.Uo=n.getUniformLocation(this.Lo,"u_screenSize"),this.Bo=n.getUniformLocation(this.Lo,"u_opacity"),this.qo=n.getUniformLocation(this.Lo,"u_image"),this.$o=[],t.uniforms&&Object.keys(t.uniforms).forEach(function(e){this.$o.push({value:t.uniforms[e],location:n.getUniformLocation(this.Lo,e)})}.bind(this))}return t.prototype.getGL=function(){return this.Io},t.prototype.init=function(t){var n=this.getGL(),e=[n.drawingBufferWidth*this.Po,n.drawingBufferHeight*this.Po];if(n.bindFramebuffer(n.FRAMEBUFFER,this.getFrameBuffer()),n.viewport(0,0,e[0],e[1]),!this.No||this.No[0]!==e[0]||this.No[1]!==e[1]){this.No=e;var r=n.RGBA,i=n.RGBA,o=n.UNSIGNED_BYTE;n.bindTexture(n.TEXTURE_2D,this.Do),n.texImage2D(n.TEXTURE_2D,0,r,e[0],e[1],0,i,o,null),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.Do,0)}},t.prototype.apply=function(t,n,e,r){var i=this.getGL(),s=t.size;if(i.bindFramebuffer(i.FRAMEBUFFER,n?n.getFrameBuffer():null),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,this.Do),!n){var a=o(i.canvas);if(!t.renderTargets[a]){var u=i.getContextAttributes();u&&u.preserveDrawingBuffer&&(i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT)),t.renderTargets[a]=!0}}i.enable(i.BLEND),i.blendFunc(i.ONE,i.ONE_MINUS_SRC_ALPHA),i.viewport(0,0,i.drawingBufferWidth,i.drawingBufferHeight),i.bindBuffer(i.ARRAY_BUFFER,this.Fo),i.useProgram(this.Lo),i.enableVertexAttribArray(this.Go),i.vertexAttribPointer(this.Go,2,i.FLOAT,!1,0,0),i.uniform2f(this.Uo,s[0],s[1]),i.uniform1i(this.qo,0);var c=t.layerStatesArray[t.layerIndex].opacity;i.uniform1f(this.Bo,c),this.applyUniforms(t),e&&e(i,t),i.drawArrays(i.TRIANGLES,0,6),r&&r(i,t)},t.prototype.getFrameBuffer=function(){return this.zo},t.prototype.applyUniforms=function(t){var n,e=this.getGL(),r=1;this.$o.forEach((function(i){if((n="function"==typeof i.value?i.value(t):i.value)instanceof HTMLCanvasElement||n instanceof ImageData)i.texture||(i.texture=e.createTexture()),e.activeTexture(e["TEXTURE"+r]),e.bindTexture(e.TEXTURE_2D,i.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n instanceof ImageData?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,n.width,n.height,0,e.UNSIGNED_BYTE,new Uint8Array(n.data)):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n),e.uniform1i(i.location,r++);else if(Array.isArray(n))switch(n.length){case 2:return void e.uniform2f(i.location,n[0],n[1]);case 3:return void e.uniform3f(i.location,n[0],n[1],n[2]);case 4:return void e.uniform4f(i.location,n[0],n[1],n[2],n[3]);default:return}else"number"==typeof n&&e.uniform1f(i.location,n)}))},t}();function qh(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function $h(t,n){return t[0]=n[0],t[1]=n[1],t[4]=n[2],t[5]=n[3],t[12]=n[4],t[13]=n[5],t}var Vh=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zh="u_projectionMatrix",Wh="u_offsetScaleMatrix",Hh="u_offsetRotateMatrix",Kh="u_time",Xh="u_zoom",Yh="u_resolution",Jh={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:uh},Qh={};function tl(t){return"shared/"+t}var nl=0;function el(t){for(var n=0,e=0;e<t.length;e++){var r=t[e];n+=r.size*rl(r.type)}return n}function rl(t){switch(t){case Jh.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Jh.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Jh.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Jh.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var il=function(t){function n(n){var e,r=t.call(this)||this,i=n||{};r.Vo=r.handleWebGLContextLost.bind(r),r.Zo=r.handleWebGLContextRestored.bind(r),r.Wo=i.canvasCacheKey?tl(i.canvasCacheKey):(e="unique/"+nl,nl+=1,e),r.Ut=function(t){var n=Qh[t];if(!n){var e=document.createElement("canvas");e.style.position="absolute",e.style.left="0",n={users:0,canvas:e},Qh[t]=n}return n.users+=1,n.canvas}(r.Wo),r.Io=fh(r.Ut),r.Ho={},r.Ko={},r.Xo=null,r.Ut.addEventListener(Gh,r.Vo),r.Ut.addEventListener(Uh,r.Zo),r.Yo=[1,0,0,1,0,0],r.Jo=[1,0,0,1,0,0],r.Qo=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.ts={},r.ns={},r.$o=[],i.uniforms&&r.setUniforms(i.uniforms);var o=r.getGL();return r.es=i.postProcesses?i.postProcesses.map((function(t){return new Bh({webGlContext:o,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})})):[new Bh({webGlContext:o})],r.rs=null,r.vi=Date.now(),r}return Vh(n,t),n.prototype.setUniforms=function(t){for(var n in this.$o=[],t)this.$o.push({name:n,value:t[n]});this.ts={}},n.prototype.canvasCacheKeyMatches=function(t){return this.Wo===tl(t)},n.prototype.getExtension=function(t){if(t in this.Ko)return this.Ko[t];var n=this.Io.getExtension(t);return this.Ko[t]=n,n},n.prototype.bindBuffer=function(t){var n=this.getGL(),e=o(t),r=this.Ho[e];r||(r={buffer:t,webGlBuffer:n.createBuffer()},this.Ho[e]=r);n.bindBuffer(t.getType(),r.webGlBuffer)},n.prototype.flushBufferData=function(t){var n=this.getGL();this.bindBuffer(t),n.bufferData(t.getType(),t.getArray(),t.getUsage())},n.prototype.deleteBuffer=function(t){var n=this.getGL(),e=o(t),r=this.Ho[e];r&&!n.isContextLost()&&n.deleteBuffer(r.webGlBuffer),delete this.Ho[e]},n.prototype.disposeInternal=function(){this.Ut.removeEventListener(Gh,this.Vo),this.Ut.removeEventListener(Uh,this.Zo),function(t){var n=Qh[t];if(n&&(n.users-=1,!(n.users>0))){var e=fh(n.canvas).getExtension("WEBGL_lose_context");e&&e.loseContext(),delete Qh[t]}}(this.Wo),delete this.Io,delete this.Ut},n.prototype.prepareDraw=function(t,n){var e=this.getGL(),r=this.getCanvas(),i=t.size,o=t.pixelRatio;r.width=i[0]*o,r.height=i[1]*o,r.style.width=i[0]+"px",r.style.height=i[1]+"px",e.useProgram(this.Xo);for(var s=this.es.length-1;s>=0;s--)this.es[s].init(t);e.bindTexture(e.TEXTURE_2D,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.BLEND),e.blendFunc(e.ONE,n?e.ZERO:e.ONE_MINUS_SRC_ALPHA),e.useProgram(this.Xo),this.applyFrameState(t),this.applyUniforms(t)},n.prototype.prepareDrawToRenderTarget=function(t,n,e){var r=this.getGL(),i=n.getSize();r.bindFramebuffer(r.FRAMEBUFFER,n.getFramebuffer()),r.viewport(0,0,i[0],i[1]),r.bindTexture(r.TEXTURE_2D,n.getTexture()),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,e?r.ZERO:r.ONE_MINUS_SRC_ALPHA),r.useProgram(this.Xo),this.applyFrameState(t),this.applyUniforms(t)},n.prototype.drawElements=function(t,n){var e=this.getGL();this.getExtension("OES_element_index_uint");var r=e.UNSIGNED_INT,i=n-t,o=4*t;e.drawElements(e.TRIANGLES,i,r,o)},n.prototype.finalizeDraw=function(t,n,e){for(var r=0,i=this.es.length;r<i;r++)r===i-1?this.es[r].apply(t,null,n,e):this.es[r].apply(t,this.es[r+1])},n.prototype.getCanvas=function(){return this.Ut},n.prototype.getGL=function(){return this.Io},n.prototype.applyFrameState=function(t){var n=t.size,e=t.viewState.rotation,r=Yt(this.Jo);rn(r,2/n[0],2/n[1]);var i=Yt(this.Yo);0!==e&&en(i,-e),this.setUniformMatrixValue(Wh,$h(this.Qo,r)),this.setUniformMatrixValue(Hh,$h(this.Qo,i)),this.setUniformFloatValue(Kh,.001*(Date.now()-this.vi)),this.setUniformFloatValue(Xh,t.viewState.zoom),this.setUniformFloatValue(Yh,t.viewState.resolution)},n.prototype.applyUniforms=function(t){var n,e=this.getGL(),r=0;this.$o.forEach(function(i){if((n="function"==typeof i.value?i.value(t):i.value)instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof ImageData)i.texture||(i.prevValue=void 0,i.texture=e.createTexture()),e.activeTexture(e["TEXTURE"+r]),e.bindTexture(e.TEXTURE_2D,i.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),(!(n instanceof HTMLImageElement)||n.complete)&&i.prevValue!==n&&(i.prevValue=n,e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n)),e.uniform1i(this.getUniformLocation(i.name),r++);else if(Array.isArray(n)&&6===n.length)this.setUniformMatrixValue(i.name,$h(this.Qo,n));else if(Array.isArray(n)&&n.length<=4)switch(n.length){case 2:return void e.uniform2f(this.getUniformLocation(i.name),n[0],n[1]);case 3:return void e.uniform3f(this.getUniformLocation(i.name),n[0],n[1],n[2]);case 4:return void e.uniform4f(this.getUniformLocation(i.name),n[0],n[1],n[2],n[3]);default:return}else"number"==typeof n&&e.uniform1f(this.getUniformLocation(i.name),n)}.bind(this))},n.prototype.useProgram=function(t){return t!=this.Xo&&(this.getGL().useProgram(t),this.Xo=t,this.ts={},this.ns={},!0)},n.prototype.compileShader=function(t,n){var e=this.getGL(),r=e.createShader(n);return e.shaderSource(r,t),e.compileShader(r),r},n.prototype.getProgram=function(t,n){var e=this.getGL(),r=this.compileShader(t,e.FRAGMENT_SHADER),i=this.compileShader(n,e.VERTEX_SHADER),o=e.createProgram();if(e.attachShader(o,r),e.attachShader(o,i),e.linkProgram(o),!e.getShaderParameter(r,e.COMPILE_STATUS)){var s="Fragment shader compliation failed: "+e.getShaderInfoLog(r);throw new Error(s)}if(e.deleteShader(r),!e.getShaderParameter(i,e.COMPILE_STATUS)){s="Vertex shader compilation failed: "+e.getShaderInfoLog(i);throw new Error(s)}if(e.deleteShader(i),!e.getProgramParameter(o,e.LINK_STATUS)){s="GL program linking failed: "+e.getShaderInfoLog(i);throw new Error(s)}return o},n.prototype.getUniformLocation=function(t){return void 0===this.ts[t]&&(this.ts[t]=this.getGL().getUniformLocation(this.Xo,t)),this.ts[t]},n.prototype.getAttributeLocation=function(t){return void 0===this.ns[t]&&(this.ns[t]=this.getGL().getAttribLocation(this.Xo,t)),this.ns[t]},n.prototype.makeProjectionTransform=function(t,n){var e=t.size,r=t.viewState.rotation,i=t.viewState.resolution,o=t.viewState.center;return Yt(n),an(n,0,0,2/(i*e[0]),2/(i*e[1]),-r,-o[0],-o[1]),n},n.prototype.setUniformFloatValue=function(t,n){this.getGL().uniform1f(this.getUniformLocation(t),n)},n.prototype.setUniformMatrixValue=function(t,n){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,n)},n.prototype.os=function(t,n,e,r,i){var o=this.getAttributeLocation(t);o<0||(this.getGL().enableVertexAttribArray(o),this.getGL().vertexAttribPointer(o,n,e,!1,r,i))},n.prototype.enableAttributes=function(t){for(var n=el(t),e=0,r=0;r<t.length;r++){var i=t[r];this.os(i.name,i.size,i.type||uh,n,e),e+=i.size*rl(i.type)}},n.prototype.handleWebGLContextLost=function(){A(this.Ho),this.Xo=null},n.prototype.handleWebGLContextRestored=function(){},n.prototype.createTexture=function(t,n,e){var r=this.getGL(),i=e||r.createTexture(),o=r.RGBA,s=r.RGBA,a=r.UNSIGNED_BYTE;return r.bindTexture(r.TEXTURE_2D,i),n?r.texImage2D(r.TEXTURE_2D,0,o,s,a,n):r.texImage2D(r.TEXTURE_2D,0,o,t[0],t[1],0,s,a,null),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),i},n}(v),ol=function(){function t(t,n){this.name=t,this.data=n,this.ss=null}return t.prototype.getTexture=function(t){if(!this.ss){var n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.data.length/4,1,0,t.RGBA,t.UNSIGNED_BYTE,this.data),this.ss=n}return this.ss},t}(),sl=new Uint8Array(4),al=function(){function t(t,n){this.us=t;var e=t.getGL();this.ss=e.createTexture(),this.cs=e.createFramebuffer(),this.fs=n||[1,1],this.q=new Uint8Array(0),this.hs=!0,this.ls()}return t.prototype.setSize=function(t){x(t,this.fs)||(this.fs[0]=t[0],this.fs[1]=t[1],this.ls())},t.prototype.getSize=function(){return this.fs},t.prototype.clearCachedData=function(){this.hs=!0},t.prototype.readAll=function(){if(this.hs){var t=this.fs,n=this.us.getGL();n.bindFramebuffer(n.FRAMEBUFFER,this.cs),n.readPixels(0,0,t[0],t[1],n.RGBA,n.UNSIGNED_BYTE,this.q),this.hs=!1}return this.q},t.prototype.readPixel=function(t,n){if(t<0||n<0||t>this.fs[0]||n>=this.fs[1])return sl[0]=0,sl[1]=0,sl[2]=0,sl[3]=0,sl;this.readAll();var e=Math.floor(t)+(this.fs[1]-Math.floor(n)-1)*this.fs[0];return sl[0]=this.q[4*e],sl[1]=this.q[4*e+1],sl[2]=this.q[4*e+2],sl[3]=this.q[4*e+3],sl},t.prototype.getTexture=function(){return this.ss},t.prototype.getFramebuffer=function(){return this.cs},t.prototype.ls=function(){var t=this.fs,n=this.us.getGL();this.ss=this.us.createTexture(t,null,this.ss),n.bindFramebuffer(n.FRAMEBUFFER,this.cs),n.viewport(0,0,t[0],t[1]),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.ss,0),this.q=new Uint8Array(t[0]*t[1]*4)},t}(),ul=!0,cl=function(){function t(t,n,e,r,i,o){this.vs=t,this.ds=n;var s={},a=Or(this.ds,this.vs);this.ps=function(t){var n=t[0]+"/"+t[1];return s[n]||(s[n]=a(t)),s[n]},this.ys=r,this.bs=i*i,this.ws=[],this.gs=!1,this.xs=this.vs.canWrapX()&&!!r&&!!this.vs.getExtent()&&Qn(r)==Qn(this.vs.getExtent()),this.ks=this.vs.getExtent()?Qn(this.vs.getExtent()):null,this._s=this.ds.getExtent()?Qn(this.ds.getExtent()):null;var u=Yn(e),c=Jn(e),f=Vn(e),h=$n(e),l=this.ps(u),v=this.ps(c),d=this.ps(f),p=this.ps(h),y=10+(o?Math.max(0,Math.ceil(fe(qn(e)/(o*o*256*256)))):0);if(this.Ss(u,c,f,h,l,v,d,p,y),this.gs){var m=1/0;this.ws.forEach((function(t,n,e){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.ws.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.ks/2){var n=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];n[0][0]-m>this.ks/2&&(n[0][0]-=this.ks),n[1][0]-m>this.ks/2&&(n[1][0]-=this.ks),n[2][0]-m>this.ks/2&&(n[2][0]-=this.ks);var e=Math.min(n[0][0],n[1][0],n[2][0]);Math.max(n[0][0],n[1][0],n[2][0])-e<this.ks/2&&(t.source=n)}}.bind(this))}s={}}return t.prototype.Ms=function(t,n,e,r,i,o){this.ws.push({source:[r,i,o],target:[t,n,e]})},t.prototype.Ss=function(t,n,e,r,i,o,s,a,u){var c=xn([i,o,s,a]),f=this.ks?Qn(c)/this.ks:null,h=this.ks,l=this.vs.canWrapX()&&f>.5&&f<1,v=!1;if(u>0){if(this.ds.isGlobal()&&this._s)v=Qn(xn([t,n,e,r]))/this._s>.25||v;!l&&this.vs.isGlobal()&&f&&(v=f>.25||v)}if(!(!v&&this.ys&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3]))||te(c,this.ys)){var d=0;if(!(v||isFinite(i[0])&&isFinite(i[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(u>0)v=!0;else if(1!=(d=(isFinite(i[0])&&isFinite(i[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(u>0){if(!v){var p=[(t[0]+e[0])/2,(t[1]+e[1])/2],y=this.ps(p),m=void 0;if(l)m=(ye(i[0],h)+ye(s[0],h))/2-ye(y[0],h);else m=(i[0]+s[0])/2-y[0];var b=(i[1]+s[1])/2-y[1];v=m*m+b*b>this.bs}if(v){if(Math.abs(t[0]-e[0])<=Math.abs(t[1]-e[1])){var w=[(n[0]+e[0])/2,(n[1]+e[1])/2],g=this.ps(w),x=[(r[0]+t[0])/2,(r[1]+t[1])/2],k=this.ps(x);this.Ss(t,n,w,x,i,o,g,k,u-1),this.Ss(x,w,e,r,k,g,s,a,u-1)}else{var _=[(t[0]+n[0])/2,(t[1]+n[1])/2],S=this.ps(_),M=[(e[0]+r[0])/2,(e[1]+r[1])/2],j=this.ps(M);this.Ss(t,_,M,r,i,S,j,a,u-1),this.Ss(_,n,e,M,S,o,s,j,u-1)}return}}if(l){if(!this.xs)return;this.gs=!0}0==(11&d)&&this.Ms(t,e,r,i,s,a),0==(14&d)&&this.Ms(t,e,n,i,s,o),d&&(0==(13&d)&&this.Ms(n,r,t,o,a,i),0==(7&d)&&this.Ms(n,r,e,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.ws.forEach((function(n,e,r){var i=n.source;zn(t,i[0]),zn(t,i[1]),zn(t,i[2])})),t},t.prototype.getTriangles=function(){return this.ws},t}(),fl=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),hl=function(t){function n(n,e,r,i,o,s,a,u,c,f,h,l){var v=t.call(this,o,lt,{interpolate:!!l})||this;v.Os=void 0!==h&&h,v.Rt=a,v.Ts=u,v.Ut=null,v.Es=e,v.As=i,v.Cs=s||o,v.Rs=[],v.Is=null,v.Ps=0;var d=i.getTileCoordExtent(v.Cs),p=v.As.getExtent(),y=v.Es.getExtent(),m=p?Xn(d,p):d;if(0===qn(m))return v.state=yt,v;var b=n.getExtent();b&&(y=y?Xn(y,b):b);var w=i.getResolution(v.Cs[0]),g=Gf(n,r,m,w);if(!isFinite(g)||g<=0)return v.state=yt,v;var x=void 0!==f?f:.5;if(v.Ds=new cl(n,r,m,y,g*x,w),0===v.Ds.getTriangles().length)return v.state=yt,v;v.Ps=e.getZForResolution(g);var k=v.Ds.calculateSourceExtent();if(y&&(n.canWrapX()?(k[1]=ue(k[1],y[1],y[3]),k[3]=ue(k[3],y[1],y[3])):k=Xn(k,y)),qn(k)){for(var _=e.getTileRangeForExtentAndZ(k,v.Ps),S=_.minX;S<=_.maxX;S++)for(var M=_.minY;M<=_.maxY;M++){var j=c(v.Ps,S,M,a);j&&v.Rs.push(j)}0===v.Rs.length&&(v.state=yt)}else v.state=yt;return v}return fl(n,t),n.prototype.getImage=function(){return this.Ut},n.prototype.Ns=function(){var t=[];if(this.Rs.forEach(function(n,e,r){n&&n.getState()==dt&&t.push({extent:this.Es.getTileCoordExtent(n.tileCoord),image:n.getImage()})}.bind(this)),this.Rs.length=0,0===t.length)this.state=pt;else{var n=this.Cs[0],e=this.As.getTileSize(n),r="number"==typeof e?e:e[0],i="number"==typeof e?e:e[1],o=this.As.getResolution(n),s=this.Es.getResolution(this.Ps),a=this.As.getTileCoordExtent(this.Cs);this.Ut=Uf(r,i,this.Rt,s,this.Es.getExtent(),o,a,this.Ds,t,this.Ts,this.Os,this.interpolate),this.state=dt}this.changed()},n.prototype.load=function(){if(this.state==lt){this.state=vt,this.changed();var t=0;this.Is=[],this.Rs.forEach(function(n,e,r){var i=n.getState();if(i==lt||i==vt){t++;var o=X(n,D,(function(e){var r=n.getState();r!=dt&&r!=pt&&r!=yt||(J(o),0===--t&&(this.zs(),this.Ns()))}),this);this.Is.push(o)}}.bind(this)),0===t?setTimeout(this.Ns.bind(this),0):this.Rs.forEach((function(t,n,e){t.getState()==lt&&t.load()}))}},n.prototype.zs=function(){this.Is.forEach(J),this.Is=null},n}(kt),ll=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function vl(t,n,e){var r=e?t.LINEAR:t.NEAREST;t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,r)}function dl(t,n,e,r,i,o){var s=t.getGL();vl(s,n,o);var a,u,c=e.byteLength/r[1],f=1;switch(c%8==0?f=8:c%4==0?f=4:c%2==0&&(f=2),i){case 1:a=s.LUMINANCE;break;case 2:a=s.LUMINANCE_ALPHA;break;case 3:a=s.RGB;break;case 4:a=s.RGBA;break;default:throw new Error("Unsupported number of bands: "+i)}e instanceof Float32Array?(u=s.FLOAT,t.getExtension("OES_texture_float"),t.getExtension("OES_texture_float_linear")):u=s.UNSIGNED_BYTE;var h=s.getParameter(s.UNPACK_ALIGNMENT);s.pixelStorei(s.UNPACK_ALIGNMENT,f),s.texImage2D(s.TEXTURE_2D,0,a,r[0],r[1],0,a,u,e),s.pixelStorei(s.UNPACK_ALIGNMENT,h)}var pl=function(t){function n(n,e,r){var i=t.call(this)||this;i.tile,i.textures=[],i.cr=i.cr.bind(i),i.size=eu(e.getTileSize(n.tileCoord[0])),i.bandCount=NaN,i.us=r;var o=new Fh(ih,sh);return o.fromArray([0,1,1,1,1,0,0,0]),r.flushBufferData(o),i.coords=o,i.setTile(n),i}return ll(n,t),n.prototype.setTile=function(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(D,this.cr),this.tile=t,this.textures.length=0,this.loaded=t.getState()===dt,this.loaded)this.Ls();else{if(t instanceof Co){var n=t.getImage();n instanceof Image&&!n.crossOrigin&&(n.crossOrigin="anonymous")}t.addEventListener(D,this.cr)}},n.prototype.Ls=function(){var t=this.us,n=t.getGL(),e=this.tile;if(e instanceof Co||e instanceof hl){var r=n.createTexture();return this.textures.push(r),this.bandCount=4,void function(t,n,e,r){vl(t,n,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e)}(n,r,e.getImage(),e.interpolate)}var i=e.getData(),o=i instanceof Float32Array,s=this.size[0]*this.size[1],a=o?Float32Array:Uint8Array,u=a.BYTES_PER_ELEMENT,c=i.byteLength/this.size[1];this.bandCount=Math.floor(c/u/this.size[0]);var f=Math.ceil(this.bandCount/4);if(1===f){r=n.createTexture();return this.textures.push(r),void dl(t,r,i,this.size,this.bandCount,e.interpolate)}for(var h=new Array(f),l=0;l<f;++l){r=n.createTexture();this.textures.push(r);var v=l<f-1?4:this.bandCount%4;h[l]=new a(s*v)}for(var d=0,p=0,y=this.size[0]*this.bandCount,m=0;m<this.size[1];++m){for(var b=0;b<y;++b){var w=i[p+b],g=Math.floor(d/this.bandCount),x=b%this.bandCount;(k=h[l=Math.floor(x/4)])[g*(v=k.length/s)+x%4]=w,++d}p+=c/u}for(l=0;l<f;++l){var k;r=this.textures[l],v=(k=h[l]).length/s;dl(t,r,k,this.size,v,e.interpolate)}},n.prototype.cr=function(){this.tile.getState()===dt&&(this.loaded=!0,this.Ls(),this.dispatchEvent(D))},n.prototype.disposeInternal=function(){var t=this.us.getGL();this.us.deleteBuffer(this.coords);for(var n=0;n<this.textures.length;++n)t.deleteTexture(this.textures[n]);this.tile.removeEventListener(D,this.cr)},n}(P),yl=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ml=function(t){function n(n){var e=t.call(this)||this;return e.Fs=e.Gs.bind(e),e.Us=n,e.declutterExecutorGroup=null,e}return yl(n,t),n.prototype.getFeatures=function(t){return r()},n.prototype.prepareFrame=function(t){return r()},n.prototype.renderFrame=function(t,n){return r()},n.prototype.loadedTileCallback=function(t,n,e){t[n]||(t[n]={}),t[n][e.tileCoord.toString()]=e},n.prototype.createLoadedTileFinder=function(t,n,e){return function(r,i){var o=this.loadedTileCallback.bind(this,e,r);return t.forEachLoadedTile(n,r,i,o)}.bind(this)},n.prototype.forEachFeatureAtCoordinate=function(t,n,e,r,i){},n.prototype.getDataAtPixel=function(t,n,e){return null},n.prototype.getLayer=function(){return this.Us},n.prototype.handleFontsChanged=function(){},n.prototype.Gs=function(t){t.target.getState()===po&&this.renderIfReadyAndVisible()},n.prototype.loadImage=function(t){var n=t.getState();return n!=po&&n!=yo&&t.addEventListener(D,this.Fs),n==lo&&(t.load(),n=t.getState()),n==po},n.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==ls&&t.changed()},n}(et),bl=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),wl="GENERATE_BUFFERS",gl=function(t){function n(n,e){var r=t.call(this,n)||this,i=e||{};return r.Bs=[1,0,0,1,0,0],r.qs=null,r.$s=i.postProcesses,r.$o=i.uniforms,r.helper,n.addChangeListener(ns,r.Vs.bind(r)),r.dispatchPreComposeEvent=r.dispatchPreComposeEvent.bind(r),r.dispatchPostComposeEvent=r.dispatchPostComposeEvent.bind(r),r}return bl(n,t),n.prototype.dispatchPreComposeEvent=function(t,n){var e=this.getLayer();if(e.hasListener(as)){var r=new xs(as,void 0,n,t);e.dispatchEvent(r)}},n.prototype.dispatchPostComposeEvent=function(t,n){var e=this.getLayer();if(e.hasListener(us)){var r=new xs(us,void 0,n,t);e.dispatchEvent(r)}},n.prototype.reset=function(t){this.$o=t.uniforms,this.helper&&this.helper.setUniforms(this.$o)},n.prototype.Vs=function(){this.helper&&(this.helper.dispose(),delete this.helper)},n.prototype.prepareFrame=function(t){if(this.getLayer().getSource()){for(var e=!0,r=-1,i=void 0,o=0,s=t.layerStatesArray.length;o<s;o++){var a=t.layerStatesArray[o].layer,u=a.getRenderer();if(u instanceof n){var c=a.getClassName();if((e||c!==i)&&(r+=1,e=!1),i=c,u===this)break}else e=!0}var f="map/"+t.mapId+"/group/"+r;this.helper&&this.helper.canvasCacheKeyMatches(f)||(this.helper&&this.helper.dispose(),this.helper=new il({postProcesses:this.$s,uniforms:this.$o,canvasCacheKey:f}),i&&(this.helper.getCanvas().className=i),this.afterHelperCreated())}return this.prepareFrameInternal(t)},n.prototype.afterHelperCreated=function(){},n.prototype.prepareFrameInternal=function(t){return!0},n.prototype.disposeInternal=function(){this.Vs(),t.prototype.disposeInternal.call(this)},n.prototype.Zs=function(t,n,e){var r=this.getLayer();if(r.hasListener(t)){an(this.Bs,0,0,e.pixelRatio,-e.pixelRatio,0,0,-e.size[1]);var i=new xs(t,this.Bs,e,n);r.dispatchEvent(i)}},n.prototype.preRender=function(t,n){this.Zs(os,t,n)},n.prototype.postRender=function(t,n){this.Zs(ss,t,n)},n.prototype.getDataAtPixel=function(t,n,e){var r=nn([n.pixelRatio,0,0,n.pixelRatio,0,0],t.slice()),i=this.helper.getGL();if(!i)return null;var o=this.getLayer().getExtent();if(o&&!Mn(o,nn(n.pixelToCoordinateTransform,t.slice())))return null;var s=i.getContextAttributes();if(!s||!s.preserveDrawingBuffer)return new Uint8Array;var a,u=Math.round(r[0]),c=Math.round(r[1]),f=this.qs;if(!f){var h=document.createElement("canvas");h.width=1,h.height=1,f=h.getContext("2d"),this.qs=f}f.clearRect(0,0,1,1);try{f.drawImage(i.canvas,u,c,1,1,0,0,1,1),a=f.getImageData(0,0,1,1).data}catch(t){return a}return 0===a[3]?null:a},n}(ml),xl=[],kl={vertexPosition:0,indexPosition:0};function _l(t,n,e,r,i){t[n+0]=e,t[n+1]=r,t[n+2]=i}function Sl(t,n){var e=n||[],r=256,i=255;return e[0]=Math.floor(t/r/r/r)/i,e[1]=Math.floor(t/r/r)%r/i,e[2]=Math.floor(t/r)%r/i,e[3]=t%r/i,e}function Ml(t){var n=0,e=256,r=255;return n+=Math.round(t[0]*e*e*e*r),n+=Math.round(t[1]*e*e*r),n+=Math.round(t[2]*e*r),n+=Math.round(t[3]*r)}var jl=gl,Ol=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Tl={TILE_TEXTURE_ARRAY:"u_tileTextures",TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",RESOLUTION:"u_resolution",ZOOM:"u_zoom"},El={TEXTURE_COORD:"a_textureCoord"},Al=[{name:El.TEXTURE_COORD,size:2,type:Jh.FLOAT}],Cl={};function Rl(t){return 2*(1-1/(t+1))-1}function Il(t,n,e){e in t||(t[e]=[]),t[e].push(n)}function Pl(t,n){var e=t.layerStatesArray[t.layerIndex];e.extent&&(n=Xn(n,Nr(e.extent,t.viewState.projection)));var r=e.layer.getSource();if(!r.getWrapX()){var i=r.getTileGridForProjection(t.viewState.projection).getExtent();i&&(n=Xn(n,i))}return n}var Dl=function(t){function n(n,e){var r=t.call(this,n,{uniforms:e.uniforms})||this;r.Ws=[1,0,0,1,0,0],r.Hs=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.Ks=new Kc(0,0,0,0),r.Xs=Lc(0,0,0),r.Ys=[0,0],r.Js,r.Qs=e.vertexShader,r.ta=e.fragmentShader,r.na=new Fh(oh,sh),r.na.fromArray([0,1,3,1,2,3]);var i=void 0!==e.cacheSize?e.cacheSize:512;return r.ea=new zc(i),r.ra=e.paletteTextures||[],r}return Ol(n,t),n.prototype.reset=function(n){t.prototype.reset.call(this,{uniforms:n.uniforms}),this.Qs=n.vertexShader,this.ta=n.fragmentShader,this.ra=n.paletteTextures||[],this.helper&&(this.Js=this.helper.getProgram(this.ta,this.Qs))},n.prototype.afterHelperCreated=function(){this.Js=this.helper.getProgram(this.ta,this.Qs),this.helper.flushBufferData(this.na)},n.prototype.ia=function(t){var n=this.getLayer(),e=t.getState(),r=n.getUseInterimTilesOnError();return e==dt||e==yt||e==pt&&!r},n.prototype.prepareFrameInternal=function(t){var n=this.getLayer().getSource();return!!n&&(!ne(Pl(t,t.extent))&&n.getState()===ls)},n.prototype.enqueueTiles=function(t,n,e,r){var i=t.viewState,s=this.getLayer().getSource(),a=s.getTileGridForProjection(i.projection),u=this.ea,c=a.getTileRangeForExtentAndZ(n,e,this.Ks),f=o(s);f in t.wantedTiles||(t.wantedTiles[f]={});for(var h=t.wantedTiles[f],l=a.getResolution(e),v=c.minX;v<=c.maxX;++v)for(var d=c.minY;d<=c.maxY;++d){var p=Lc(e,v,d,this.Xs),y=Gc(p),m=void 0,b=void 0;if(u.containsKey(y)&&(b=(m=u.get(y)).tile),!m||m.tile.key!==s.getKey())if(b=s.getTile(e,v,d,t.pixelRatio,i.projection),m)if(this.ia(b))m.setTile(b);else{var w=b.getInterimTile();m.setTile(w)}else m=new pl(b,a,this.helper),u.set(y,m);Il(r,m,e);var g=b.getKey();h[g]=!0,b.getState()===lt&&(t.tileQueue.isKeyQueued(g)||t.tileQueue.enqueue([b,f,a.getTileCoordCenter(p),l]))}},n.prototype.renderFrame=function(t){var n=this.helper.getGL();this.preRender(n,t);var e=t.viewState,r=this.getLayer().getSource(),i=r.getTileGridForProjection(e.projection),s=Pl(t,t.extent),a=i.getZForResolution(e.resolution,r.zDirection),u={};if(t.nextExtent){var c=i.getZForResolution(e.nextResolution,r.zDirection),f=Pl(t,t.nextExtent);this.enqueueTiles(t,f,c,u)}this.enqueueTiles(t,s,a,u);for(var h={},l=o(this),v=t.time,d=!1,y=u[a],m=0,b=y.length;m<b;++m){var w=(N=(K=y[m]).tile).tileCoord;if(K.loaded){if(1===(z=N.getAlpha(l,v))){N.endTransition(l);continue}d=!0,h[L=Gc(w)]=z}if(!this.oa(i,w,a+1,u))for(var g=i.getMinZoom(),x=a-1;x>=g;--x){if(this.oa(i,w,x,u))break}}this.helper.useProgram(this.Js),this.helper.prepareDraw(t,!d);for(var k=Object.keys(u).map(Number).sort(p),_=e.center[0],S=e.center[1],M=0,j=k.length;M<j;++M){var O=k[M],T=i.getResolution(O),E=eu(i.getTileSize(O),this.Ys),A=i.getOrigin(O),C=(_-A[0])/(E[0]*T),R=(A[1]-S)/(E[1]*T),I=e.resolution/T,P=Rl(O),D=u[O];for(m=0,b=D.length;m<b;++m){if((K=D[m]).loaded){var N,z,L=Gc(w=(N=K.tile).tileCoord),F=w[1],G=w[2];an(this.Ws,0,0,2/(t.size[0]*I/E[0]),-2/(t.size[1]*I/E[1]),e.rotation,-(C-F),-(R-G)),this.helper.setUniformMatrixValue(Tl.TILE_TRANSFORM,$h(this.Hs,this.Ws)),this.helper.bindBuffer(K.coords),this.helper.bindBuffer(this.na),this.helper.enableAttributes(Al);for(var U=0;U<K.textures.length;){var B="TEXTURE"+U,q=Tl.TILE_TEXTURE_ARRAY+"["+U+"]";n.activeTexture(n[B]),n.bindTexture(n.TEXTURE_2D,K.textures[U]),n.uniform1i(this.helper.getUniformLocation(q),U),++U}for(var $=0;$<this.ra.length;++$){var V=this.ra[$];n.activeTexture(n["TEXTURE"+U]);var Z=V.getTexture(n);n.bindTexture(n.TEXTURE_2D,Z),n.uniform1i(this.helper.getUniformLocation(V.name),U),++U}(z=L in h?h[L]:1)<1&&(t.animate=!0),this.helper.setUniformFloatValue(Tl.TRANSITION_ALPHA,z),this.helper.setUniformFloatValue(Tl.DEPTH,P),this.helper.setUniformFloatValue(Tl.TEXTURE_PIXEL_WIDTH,E[0]),this.helper.setUniformFloatValue(Tl.TEXTURE_PIXEL_HEIGHT,E[1]),this.helper.setUniformFloatValue(Tl.RESOLUTION,e.resolution),this.helper.setUniformFloatValue(Tl.ZOOM,e.zoom),this.helper.drawElements(0,this.na.getSize())}}}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);for(var W=this.helper.getCanvas(),H=this.ea;H.canExpireCache();){var K;(K=H.pop()).dispose()}return t.postRenderFunctions.push((function(t,n){r.expireCache(n.viewState.projection,Cl)})),this.postRender(n,t),W},n.prototype.oa=function(t,n,e,r){var i=t.getTileRangeForTileCoordAndZ(n,e,this.Ks);if(!i)return!1;for(var o=!0,s=this.ea,a=i.minX;a<=i.maxX;++a)for(var u=i.minY;u<=i.maxY;++u){var c=Fc(e,a,u),f=!1;if(s.containsKey(c)){var h=s.get(c);h.loaded&&(Il(r,h,e),f=!0)}f||(o=!1)}return o},n.prototype.disposeInternal=function(){var n=this.helper,e=n.getGL();n.deleteBuffer(this.na),delete this.na,e.deleteProgram(this.Js),delete this.Js;var r=this.ea;r.forEach((function(t){t.dispose()})),r.clear(),delete this.ea,t.prototype.disposeInternal.call(this)},n}(jl);Dl.prototype.getLayer;var Nl=Dl,zl=1,Ll=2,Fl=4,Gl=8,Ul=16,Bl=31,ql=0,$l={};function Vl(t){if("number"==typeof t)return zl;if("boolean"==typeof t)return Gl;if("string"==typeof t)return Uo(t)?Fl|Ll:Ll;if(!Array.isArray(t))throw new Error("Unhandled value type: "+JSON.stringify(t));var n=t;if(n.every((function(t){return"number"==typeof t})))return 3===n.length||4===n.length?Fl|Ul:Ul;if("string"!=typeof n[0])throw new Error("Expected an expression operator but received: "+JSON.stringify(n));var e=$l[n[0]];if(void 0===e)throw new Error("Unrecognized expression operator: "+JSON.stringify(n));return e.getReturnType(n.slice(1))}function Zl(t){return fe(t)%1==0}function Wl(t){var n=t.toString();return-1===n.indexOf(".")?n+".0":n}function Hl(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec"+t.length+"("+t.map(Wl).join(", ")+")"}function Kl(t){var n=Lo(t).slice();return n.length<4&&n.push(1),Hl(n.map((function(t,n){return n<3?t/255:t})))}function Xl(t,n){return void 0===t.stringLiteralsMap[n]&&(t.stringLiteralsMap[n]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[n]}function Yl(t,n){return Wl(Xl(t,n))}function Jl(t,n,e){if(Array.isArray(n)&&"string"==typeof n[0]){var r=$l[n[0]];if(void 0===r)throw new Error("Unrecognized expression operator: "+JSON.stringify(n));return r.toGlsl(t,n.slice(1),e)}var i=Vl(n);if((i&zl)>0)return Wl(n);if((i&Gl)>0)return n.toString();if((i&Ll)>0&&(void 0===e||e==Ll))return Yl(t,n.toString());if((i&Fl)>0&&(void 0===e||e==Fl))return Kl(n);if((i&Ul)>0)return Hl(n);throw new Error("Unexpected expression "+n+" (expected type "+e+")")}function Ql(t){if(!(Vl(t)&zl))throw new Error("A numeric value was expected, got "+JSON.stringify(t)+" instead")}function tv(t){for(var n=0;n<t.length;n++)Ql(t[n])}function nv(t){if(!(Vl(t)&Ll))throw new Error("A string value was expected, got "+JSON.stringify(t)+" instead")}function ev(t){if(!(Vl(t)&Gl))throw new Error("A boolean value was expected, got "+JSON.stringify(t)+" instead")}function rv(t,n){if(t.length!==n)throw new Error("Exactly "+n+" arguments were expected, got "+t.length+" instead")}function iv(t,n){if(t.length<n)throw new Error("At least "+n+" arguments were expected, got "+t.length+" instead")}function ov(t,n){if(t.length>n)throw new Error("At most "+n+" arguments were expected, got "+t.length+" instead")}function sv(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got "+t+" instead")}function av(t,n){if(!Zl(n))throw new Error("Could not infer only one type from the following expression: "+JSON.stringify(t))}function uv(t){return"u_var_"+t}$l.get={getReturnType:function(t){return Bl},toGlsl:function(t,n){rv(n,1),nv(n[0]);var e=n[0].toString();return-1===t.attributes.indexOf(e)&&t.attributes.push(e),(t.inFragmentShader?"v_":"a_")+e}},$l.var={getReturnType:function(t){return Bl},toGlsl:function(t,n){rv(n,1),nv(n[0]);var e=n[0].toString();return-1===t.variables.indexOf(e)&&t.variables.push(e),uv(e)}};var cv="u_paletteTextures";$l.palette={getReturnType:function(t){return Fl},toGlsl:function(t,n){rv(n,2),Ql(n[0]);var e=Jl(t,n[0]),r=n[1];if(!Array.isArray(r))throw new Error("The second argument of palette must be an array");for(var i=r.length,o=new Uint8Array(4*i),s=0;s<i;s++){var a=r[s],u=void 0;if("string"==typeof a)u=zo(a);else{if(!Array.isArray(a))throw new Error("The second argument of palette must be an array of strings or colors");var c=a.length;if(4===c)u=a;else{if(3!==c)throw new Error("Expected palette color to have 3 or 4 values, got "+c);u=[a[0],a[1],a[2],1]}}var f=4*s;o[f]=u[0],o[f+1]=u[1],o[f+2]=u[2],o[f+3]=255*u[3]}t.paletteTextures||(t.paletteTextures=[]);var h="u_paletteTextures["+t.paletteTextures.length+"]",l=new ol(h,o);return t.paletteTextures.push(l),"texture2D("+h+", vec2(("+e+" + 0.5) / "+i+".0, 0.5))"}};var fv="getBandValue";function hv(t){return{getReturnType:function(t){return Gl},toGlsl:function(n,e){rv(e,2);for(var r=Bl,i=0;i<e.length;i++)r&=Vl(e[i]);if(r===ql)throw new Error("All arguments should be of compatible type, got "+JSON.stringify(e)+" instead");return r&=~Fl,"("+Jl(n,e[0],r)+" "+t+" "+Jl(n,e[1],r)+")"}}}function lv(t){return{getReturnType:function(t){return Gl},toGlsl:function(n,e){iv(e,2);for(var r=0;r<e.length;r++)ev(e[r]);return"("+e.map((function(t){return Jl(n,t)})).join(" "+t+" ")+")"}}}$l.band={getReturnType:function(t){return zl},toGlsl:function(t,n){iv(n,1),ov(n,3);var e=n[0];if(!(fv in t.functions)){for(var r="",i=t.bandCount||1,o=0;o<i;o++){var s=Math.floor(o/4),a=o%4;a===i-1&&1===a&&(a=3),r+="\n if (band == "+(o+1)+".0) {\n return texture2D("+(Tl.TILE_TEXTURE_ARRAY+"["+s+"]")+", v_textureCoord + vec2(dx, dy))["+a+"];\n }\n "}t.functions.getBandValue="\n float getBandValue(float band, float xOffset, float yOffset) {\n float dx = xOffset / "+Tl.TEXTURE_PIXEL_WIDTH+";\n float dy = yOffset / "+Tl.TEXTURE_PIXEL_HEIGHT+";\n "+r+"\n }\n "}return"getBandValue("+Jl(t,e)+", "+Jl(t,n[1]||0)+", "+Jl(t,n[2]||0)+")"}},$l.time={getReturnType:function(t){return zl},toGlsl:function(t,n){return rv(n,0),"u_time"}},$l.zoom={getReturnType:function(t){return zl},toGlsl:function(t,n){return rv(n,0),"u_zoom"}},$l.resolution={getReturnType:function(t){return zl},toGlsl:function(t,n){return rv(n,0),"u_resolution"}},$l["*"]={getReturnType:function(t){return zl},toGlsl:function(t,n){return rv(n,2),tv(n),"("+Jl(t,n[0])+" * "+Jl(t,n[1])+")"}},$l["/"]={getReturnType:function(t){return zl},toGlsl:function(t,n){return rv(n,2),tv(n),"("+Jl(t,n[0])+" / "+Jl(t,n[1])+")"}},$l["+"]={getReturnType:function(t){return zl},toGlsl:function(t,n){return rv(n,2),tv(n),"("+Jl(t,n[0])+" + "+Jl(t,n[1])+")"}},$l["-"]={getReturnType:function(t){return zl},toGlsl:function(t,n){return rv(n,2),tv(n),"("+Jl(t,n[0])+" - "+Jl(t,n[1])+")"}},$l.clamp={getReturnType:function(t){return zl},toGlsl:function(t,n){rv(n,3),tv(n);var e=Jl(t,n[1]),r=Jl(t,n[2]);return"clamp("+Jl(t,n[0])+", "+e+", "+r+")"}},$l["%"]={getReturnType:function(t){return zl},toGlsl:function(t,n){return rv(n,2),tv(n),"mod("+Jl(t,n[0])+", "+Jl(t,n[1])+")"}},$l["^"]={getReturnType:function(t){return zl},toGlsl:function(t,n){return rv(n,2),tv(n),"pow("+Jl(t,n[0])+", "+Jl(t,n[1])+")"}},$l.abs={getReturnType:function(t){return zl},toGlsl:function(t,n){return rv(n,1),tv(n),"abs("+Jl(t,n[0])+")"}},$l.sin={getReturnType:function(t){return zl},toGlsl:function(t,n){return rv(n,1),tv(n),"sin("+Jl(t,n[0])+")"}},$l.cos={getReturnType:function(t){return zl},toGlsl:function(t,n){return rv(n,1),tv(n),"cos("+Jl(t,n[0])+")"}},$l.atan={getReturnType:function(t){return zl},toGlsl:function(t,n){return iv(n,1),ov(n,2),tv(n),2===n.length?"atan("+Jl(t,n[0])+", "+Jl(t,n[1])+")":"atan("+Jl(t,n[0])+")"}},$l[">"]={getReturnType:function(t){return Gl},toGlsl:function(t,n){return rv(n,2),tv(n),"("+Jl(t,n[0])+" > "+Jl(t,n[1])+")"}},$l[">="]={getReturnType:function(t){return Gl},toGlsl:function(t,n){return rv(n,2),tv(n),"("+Jl(t,n[0])+" >= "+Jl(t,n[1])+")"}},$l["<"]={getReturnType:function(t){return Gl},toGlsl:function(t,n){return rv(n,2),tv(n),"("+Jl(t,n[0])+" < "+Jl(t,n[1])+")"}},$l["<="]={getReturnType:function(t){return Gl},toGlsl:function(t,n){return rv(n,2),tv(n),"("+Jl(t,n[0])+" <= "+Jl(t,n[1])+")"}},$l["=="]=hv("=="),$l["!="]=hv("!="),$l["!"]={getReturnType:function(t){return Gl},toGlsl:function(t,n){return rv(n,1),ev(n[0]),"(!"+Jl(t,n[0])+")"}},$l.all=lv("&&"),$l.any=lv("||"),$l.between={getReturnType:function(t){return Gl},toGlsl:function(t,n){rv(n,3),tv(n);var e=Jl(t,n[1]),r=Jl(t,n[2]),i=Jl(t,n[0]);return"("+i+" >= "+e+" && "+i+" <= "+r+")"}},$l.array={getReturnType:function(t){return Ul},toGlsl:function(t,n){iv(n,2),ov(n,4),tv(n);var e=n.map((function(n){return Jl(t,n,zl)}));return"vec"+n.length+"("+e.join(", ")+")"}},$l.color={getReturnType:function(t){return Fl},toGlsl:function(t,n){iv(n,3),ov(n,4),tv(n);var e=n;3===n.length&&e.push(1);var r=n.map((function(n,e){return Jl(t,n,zl)+(e<3?" / 255.0":"")}));return"vec"+n.length+"("+r.join(", ")+")"}},$l.interpolate={getReturnType:function(t){for(var n=Fl|zl,e=3;e<t.length;e+=2)n&=Vl(t[e]);return n},toGlsl:function(t,n,e){sv(n),iv(n,6);var r,i=n[0];switch(i[0]){case"linear":r=1;break;case"exponential":r=i[1];break;default:r=null}if(!r)throw new Error('Invalid interpolation type for "interpolate" operator, received: '+JSON.stringify(i));var o=void 0!==e?e:Bl,s=$l.interpolate.getReturnType(n)&o;av(n,s);for(var a=Jl(t,n[1]),u=Wl(r),c="",f=2;f<n.length-2;f+=2){var h=Jl(t,n[f]),l=c||Jl(t,n[f+1],s),v=Jl(t,n[f+2]);c="mix("+l+", "+Jl(t,n[f+3],s)+", pow(clamp(("+a+" - "+h+") / ("+v+" - "+h+"), 0.0, 1.0), "+u+"))"}return c}},$l.match={getReturnType:function(t){for(var n=Bl,e=2;e<t.length;e+=2)n&=Vl(t[e]);return n&=Vl(t[t.length-1])},toGlsl:function(t,n,e){sv(n),iv(n,4);var r=void 0!==e?e:Bl,i=$l.match.getReturnType(n)&r;av(n,i);for(var o=Jl(t,n[0]),s=Jl(t,n[n.length-1],i),a=null,u=n.length-3;u>=1;u-=2){a="("+o+" == "+Jl(t,n[u])+" ? "+Jl(t,n[u+1],i)+" : "+(a||s)+")"}return a}},$l.case={getReturnType:function(t){for(var n=Bl,e=1;e<t.length;e+=2)n&=Vl(t[e]);return n&=Vl(t[t.length-1])},toGlsl:function(t,n,e){!function(t){if(t.length%2==0)throw new Error("An odd amount of arguments was expected, got "+t+" instead")}(n),iv(n,3);var r=void 0!==e?e:Bl,i=$l.case.getReturnType(n)&r;av(n,i);for(var o=0;o<n.length-1;o+=2)ev(n[o]);var s=Jl(t,n[n.length-1],i),a=null;for(o=n.length-3;o>=0;o-=2){a="("+Jl(t,n[o])+" ? "+Jl(t,n[o+1],i)+" : "+(a||s)+")"}return a}};var vv=function(){function t(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return t.prototype.addUniform=function(t){return this.uniforms.push(t),this},t.prototype.addAttribute=function(t){return this.attributes.push(t),this},t.prototype.addVarying=function(t,n,e){return this.varyings.push({name:t,type:n,expression:e}),this},t.prototype.setSizeExpression=function(t){return this.sizeExpression=t,this},t.prototype.setRotationExpression=function(t){return this.rotationExpression=t,this},t.prototype.setSymbolOffsetExpression=function(t){return this.offsetExpression=t,this},t.prototype.setColorExpression=function(t){return this.colorExpression=t,this},t.prototype.setTextureCoordinateExpression=function(t){return this.texCoordExpression=t,this},t.prototype.setFragmentDiscardExpression=function(t){return this.discardExpression=t,this},t.prototype.setSymbolRotateWithView=function(t){return this.rotateWithView=t,this},t.prototype.getSizeExpression=function(){return this.sizeExpression},t.prototype.getOffsetExpression=function(){return this.offsetExpression},t.prototype.getColorExpression=function(){return this.colorExpression},t.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},t.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},t.prototype.getSymbolVertexShader=function(t){var n=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",e=this.attributes,r=this.varyings;return t&&(e=e.concat("vec4 a_hitColor"),r=r.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n"+this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n")+"\nattribute vec2 a_position;\nattribute float a_index;\n"+e.map((function(t){return"attribute "+t+";"})).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+r.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")+"\nvoid main(void) {\n mat4 offsetMatrix = "+n+";\n vec2 halfSize = "+this.sizeExpression+" * 0.5;\n vec2 offset = "+this.offsetExpression+";\n float angle = "+this.rotationExpression+";\n float offsetX;\n float offsetY;\n if (a_index == 0.0) {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n } else if (a_index == 1.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else if (a_index == 2.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n }\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n vec4 texCoord = "+this.texCoordExpression+";\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n v_texCoord = vec2(u, v);\n u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n v_quadCoord = vec2(u, v);\n"+r.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n")+"\n}"},t.prototype.getSymbolFragmentShader=function(t){var n=t?" if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",e=this.varyings;return t&&(e=e.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n"+this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+e.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")+"\nvoid main(void) {\n if ("+this.discardExpression+") { discard; }\n gl_FragColor = "+this.colorExpression+";\n gl_FragColor.rgb *= gl_FragColor.a;\n"+n+"\n}"},t}();function dv(t){var n=t.symbol,e=void 0!==n.size?n.size:1,r=n.color||"white",i=n.textureCoord||[0,0,1,1],o=n.offset||[0,0],s=void 0!==n.opacity?n.opacity:1,a=void 0!==n.rotation?n.rotation:0,u={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{},functions:{}},c=Jl(u,e,Ul|zl),f=Jl(u,o,Ul),h=Jl(u,i,Ul),l=Jl(u,a,zl),v={inFragmentShader:!0,variables:u.variables,attributes:[],stringLiteralsMap:u.stringLiteralsMap,functions:{}},d=Jl(v,r,Fl),p=Jl(v,s,zl),y="1.0",m="vec2("+Jl(v,e,Ul|zl)+").x";switch(n.symbolType){case"square":case"image":break;case"circle":y="(1.0-smoothstep(1.-4./"+m+",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))";break;case"triangle":var b="(v_quadCoord*2.-1.)",w="(atan("+b+".x,"+b+".y))";y="(1.0-smoothstep(.5-3./"+m+",.5,cos(floor(.5+"+w+"/2.094395102)*2.094395102-"+w+")*length("+b+")))";break;default:throw new Error("Unexpected symbol type: "+n.symbolType)}var g=(new vv).setSizeExpression("vec2("+c+")").setRotationExpression(l).setSymbolOffsetExpression(f).setTextureCoordinateExpression(h).setSymbolRotateWithView(!!n.rotateWithView).setColorExpression("vec4("+d+".rgb, "+d+".a * "+p+" * "+y+")");if(t.filter){var x=Jl(v,t.filter,Gl);g.setFragmentDiscardExpression("!"+x)}var k={};if(v.variables.forEach((function(n){var e=uv(n);g.addUniform("float "+e),k[e]=function(){if(!t.variables||void 0===t.variables[n])throw new Error("The following variable is missing from the style: "+n);var e=t.variables[n];return"string"==typeof e&&(e=Xl(u,e)),void 0!==e?e:-9999999}})),"image"===n.symbolType&&n.src){var _=new Image;_.src=n.src,g.addUniform("sampler2D u_texture").setColorExpression(g.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),k.u_texture=_}return v.attributes.forEach((function(t){-1===u.attributes.indexOf(t)&&u.attributes.push(t),g.addVarying("v_"+t,"float","a_"+t)})),u.attributes.forEach((function(t){g.addAttribute("float a_"+t)})),{builder:g,attributes:u.attributes.map((function(t){return{name:t,callback:function(n,e){var r=e[t];return"string"==typeof r&&(r=Xl(u,r)),void 0!==r?r:-9999999}}})),uniforms:k}}var pv=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),yv=function(t){function n(n){var e=t.call(this,{extent:n.extent,origin:n.origin,origins:n.origins,resolutions:n.resolutions,tileSize:n.tileSize,tileSizes:n.tileSizes,sizes:n.sizes})||this;return e.sa=n.matrixIds,e}return pv(n,t),n.prototype.getMatrixId=function(t){return this.sa[t]},n.prototype.getMatrixIds=function(){return this.sa},n}(qf),mv=yv;function bv(t,n,e){var r=[],i=[],o=[],s=[],a=[],u=void 0!==e?e:[],c=mr(t.SupportedCRS),f=c.getMetersPerUnit(),h="ne"==c.getAxisOrientation().substr(0,2);return t.TileMatrix.sort((function(t,n){return n.ScaleDenominator-t.ScaleDenominator})),t.TileMatrix.forEach((function(n){if(!(u.length>0)||g(u,(function(e){return n.Identifier==e.TileMatrix||-1===n.Identifier.indexOf(":")&&t.Identifier+":"+n.Identifier===e.TileMatrix}))){i.push(n.Identifier);var e=28e-5*n.ScaleDenominator/f,c=n.TileWidth,l=n.TileHeight;h?o.push([n.TopLeftCorner[1],n.TopLeftCorner[0]]):o.push(n.TopLeftCorner),r.push(e),s.push(c==l?c:[c,l]),a.push([n.MatrixWidth,n.MatrixHeight])}})),new yv({extent:n,origins:o,resolutions:r,matrixIds:i,tileSizes:s,sizes:a})}var wv=function(){function t(t){this.aa=t.opacity,this.ua=t.rotateWithView,this.Fr=t.rotation,this.ca=t.scale,this.fa=eu(t.scale),this.ha=t.displacement}return t.prototype.clone=function(){var n=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(n)?n.slice():n,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.aa},t.prototype.getRotateWithView=function(){return this.ua},t.prototype.getRotation=function(){return this.Fr},t.prototype.getScale=function(){return this.ca},t.prototype.getScaleArray=function(){return this.fa},t.prototype.getDisplacement=function(){return this.ha},t.prototype.getAnchor=function(){return r()},t.prototype.getImage=function(t){return r()},t.prototype.getHitDetectionImage=function(){return r()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return r()},t.prototype.getImageSize=function(){return r()},t.prototype.getOrigin=function(){return r()},t.prototype.getSize=function(){return r()},t.prototype.setDisplacement=function(t){this.ha=t},t.prototype.setOpacity=function(t){this.aa=t},t.prototype.setRotateWithView=function(t){this.ua=t},t.prototype.setRotation=function(t){this.Fr=t},t.prototype.setScale=function(t){this.ca=t,this.fa=eu(t)},t.prototype.listenImageChange=function(t){r()},t.prototype.load=function(){r()},t.prototype.unlistenImageChange=function(t){r()},t}(),gv=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),xv=function(t){function n(n){var e=this,r=void 0!==n.rotateWithView&&n.rotateWithView;return(e=t.call(this,{opacity:1,rotateWithView:r,rotation:void 0!==n.rotation?n.rotation:0,scale:void 0!==n.scale?n.scale:1,displacement:void 0!==n.displacement?n.displacement:[0,0]})||this).Ut=void 0,e.la=null,e.va=void 0!==n.fill?n.fill:null,e._o=[0,0],e.Ht=n.points,e.da=void 0!==n.radius?n.radius:n.radius1,e.pa=n.radius2,e.Kt=void 0!==n.angle?n.angle:0,e.ya=void 0!==n.stroke?n.stroke:null,e.fs=null,e.ma=null,e.render(),e}return gv(n,t),n.prototype.clone=function(){var t=this.getScale(),e=new n({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return e.setOpacity(this.getOpacity()),e},n.prototype.getAnchor=function(){var t=this.fs;if(!t)return null;var n=this.getDisplacement();return[t[0]/2-n[0],t[1]/2+n[1]]},n.prototype.getAngle=function(){return this.Kt},n.prototype.getFill=function(){return this.va},n.prototype.getHitDetectionImage=function(){return this.la||this.ba(this.ma),this.la},n.prototype.getImage=function(t){var n=this.Ut[t];if(!n){var e=this.ma,r=_o(e.size*t,e.size*t);this.wa(e,r,t),n=r.canvas,this.Ut[t]=n}return n},n.prototype.getPixelRatio=function(t){return t},n.prototype.getImageSize=function(){return this.fs},n.prototype.getImageState=function(){return po},n.prototype.getOrigin=function(){return this._o},n.prototype.getPoints=function(){return this.Ht},n.prototype.getRadius=function(){return this.da},n.prototype.getRadius2=function(){return this.pa},n.prototype.getSize=function(){return this.fs},n.prototype.getStroke=function(){return this.ya},n.prototype.listenImageChange=function(t){},n.prototype.load=function(){},n.prototype.unlistenImageChange=function(t){},n.prototype.ga=function(t,n,e){if(0===n||this.Ht===1/0||"bevel"!==t&&"miter"!==t)return n;var r=this.da,i=void 0===this.pa?r:this.pa;if(r<i){var o=r;r=i,i=o}var s=void 0===this.pa?this.Ht:2*this.Ht,a=2*Math.PI/s,u=i*Math.sin(a),c=r-Math.sqrt(i*i-u*u),f=Math.sqrt(u*u+c*c),h=f/u;if("miter"===t&&h<=e)return h*n;var l=n/2/h,v=n/2*(c/f),d=Math.sqrt((r+l)*(r+l)+v*v)-r;if(void 0===this.pa||"bevel"===t)return 2*d;var p=r*Math.sin(a),y=i-Math.sqrt(r*r-p*p),m=Math.sqrt(p*p+y*y)/p;if(m<=e){var b=m*n/2-i-r;return 2*Math.max(d,b)}return 2*d},n.prototype.createRenderOptions=function(){var t,n=Ns,e=0,r=null,i=0,o=0;this.ya&&(null===(t=this.ya.getColor())&&(t=Ls),t=nf(t),void 0===(o=this.ya.getWidth())&&(o=1),r=this.ya.getLineDash(),i=this.ya.getLineDashOffset(),void 0===(n=this.ya.getLineJoin())&&(n=Ns),void 0===(e=this.ya.getMiterLimit())&&(e=zs));var s=this.ga(n,o,e),a=Math.max(this.da,this.pa||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*a+s),lineDash:r,lineDashOffset:i,lineJoin:n,miterLimit:e}},n.prototype.render=function(){this.ma=this.createRenderOptions();var t=this.ma.size;this.Ut={},this.fs=[t,t]},n.prototype.wa=function(t,n,e){if(n.scale(e,e),n.translate(t.size/2,t.size/2),this.xa(n),this.va){var r=this.va.getColor();null===r&&(r=Is),n.fillStyle=nf(r),n.fill()}this.ya&&(n.strokeStyle=t.strokeStyle,n.lineWidth=t.strokeWidth,n.setLineDash&&t.lineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.miterLimit=t.miterLimit,n.stroke())},n.prototype.ba=function(t){if(this.va){var n=this.va.getColor(),e=0;if("string"==typeof n&&(n=Lo(n)),null===n?e=1:Array.isArray(n)&&(e=4===n.length?n[3]:1),0===e){var r=_o(t.size,t.size);this.la=r.canvas,this.ka(t,r)}}this.la||(this.la=this.getImage(1))},n.prototype.xa=function(t){var n=this.Ht,e=this.da;if(n===1/0)t.arc(0,0,e,0,2*Math.PI);else{var r=void 0===this.pa?e:this.pa;void 0!==this.pa&&(n*=2);for(var i=this.Kt-Math.PI/2,o=2*Math.PI/n,s=0;s<n;s++){var a=i+s*o,u=s%2==0?e:r;t.lineTo(u*Math.cos(a),u*Math.sin(a))}t.closePath()}},n.prototype.ka=function(t,n){n.translate(t.size/2,t.size/2),this.xa(n),n.fillStyle=Is,n.fill(),this.ya&&(n.strokeStyle=t.strokeStyle,n.lineWidth=t.strokeWidth,t.lineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.miterLimit=t.miterLimit,n.stroke())},n}(wv),kv=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),_v=function(t){function n(n){var e=n||{};return t.call(this,{points:1/0,fill:e.fill,radius:e.radius,stroke:e.stroke,scale:void 0!==e.scale?e.scale:1,rotation:void 0!==e.rotation?e.rotation:0,rotateWithView:void 0!==e.rotateWithView&&e.rotateWithView,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this}return kv(n,t),n.prototype.clone=function(){var t=this.getScale(),e=new n({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return e.setOpacity(this.getOpacity()),e},n.prototype.setRadius=function(t){this.da=t,this.render()},n}(xv),Sv=function(){function t(t){var n=t||{};this._a=void 0!==n.color?n.color:null}return t.prototype.clone=function(){var n=this.getColor();return new t({color:Array.isArray(n)?n.slice():n||void 0})},t.prototype.getColor=function(){return this._a},t.prototype.setColor=function(t){this._a=t},t}(),Mv="fraction",jv="pixels",Ov="bottom-left",Tv="bottom-right",Ev="top-left",Av="top-right",Cv=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Rv=null,Iv=function(t){function n(n,e,r,i,o,s){var a=t.call(this)||this;return a.Sa=null,a.Dt=n||new Image,null!==i&&(a.Dt.crossOrigin=i),a.Ut={},a._a=s,a.Nt=null,a.Ma=o,a.fs=r,a.Pt=e,a.ja,a}return Cv(n,t),n.prototype.Oa=function(){if(void 0===this.ja&&this.Ma===po){Rv||(Rv=_o(1,1)),Rv.drawImage(this.Dt,0,0);try{Rv.getImageData(0,0,1,1),this.ja=!1}catch(t){Rv=null,this.ja=!0}}return!0===this.ja},n.prototype.Ta=function(){this.dispatchEvent(D)},n.prototype.Lt=function(){this.Ma=yo,this.Ft(),this.Ta()},n.prototype.Gt=function(){this.Ma=po,this.fs?(this.Dt.width=this.fs[0],this.Dt.height=this.fs[1]):this.fs=[this.Dt.width,this.Dt.height],this.Ft(),this.Ta()},n.prototype.getImage=function(t){return this.Ea(t),this.Ut[t]?this.Ut[t]:this.Dt},n.prototype.getPixelRatio=function(t){return this.Ea(t),this.Ut[t]?t:1},n.prototype.getImageState=function(){return this.Ma},n.prototype.getHitDetectionImage=function(){if(!this.Sa)if(this.Oa()){var t=this.fs[0],n=this.fs[1],e=_o(t,n);e.fillRect(0,0,t,n),this.Sa=e.canvas}else this.Sa=this.Dt;return this.Sa},n.prototype.getSize=function(){return this.fs},n.prototype.getSrc=function(){return this.Pt},n.prototype.load=function(){if(this.Ma==lo){this.Ma=vo;try{this.Dt.src=this.Pt}catch(t){this.Lt()}this.Nt=wo(this.Dt,this.Gt.bind(this),this.Lt.bind(this))}},n.prototype.Ea=function(t){if(this._a&&!this.Ut[t]&&this.Ma===po){var n=document.createElement("canvas");this.Ut[t]=n,n.width=Math.ceil(this.Dt.width*t),n.height=Math.ceil(this.Dt.height*t);var e=n.getContext("2d");if(e.scale(t,t),e.drawImage(this.Dt,0,0),e.globalCompositeOperation="multiply","multiply"===e.globalCompositeOperation||this.Oa())e.fillStyle=Do(this._a),e.fillRect(0,0,n.width/t,n.height/t),e.globalCompositeOperation="destination-in",e.drawImage(this.Dt,0,0);else{for(var r=e.getImageData(0,0,n.width,n.height),i=r.data,o=this._a[0]/255,s=this._a[1]/255,a=this._a[2]/255,u=this._a[3],c=0,f=i.length;c<f;c+=4)i[c]*=o,i[c+1]*=s,i[c+2]*=a,i[c+3]*=u;e.putImageData(r,0,0)}}},n.prototype.Ft=function(){this.Nt&&(this.Nt(),this.Nt=null)},n}(P);function Pv(t,n,e,r,i,o){var s=Vo.get(n,r,o);return s||(s=new Iv(t,n,e,r,i,o),Vo.set(n,r,o,s)),s}var Dv=Iv,Nv=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),zv=function(t){function n(n){var e=this,r=n||{},i=void 0!==r.opacity?r.opacity:1,s=void 0!==r.rotation?r.rotation:0,a=void 0!==r.scale?r.scale:1,u=void 0!==r.rotateWithView&&r.rotateWithView;(e=t.call(this,{opacity:i,rotation:s,scale:a,displacement:void 0!==r.displacement?r.displacement:[0,0],rotateWithView:u})||this).ki=void 0!==r.anchor?r.anchor:[.5,.5],e.Aa=null,e.Ca=void 0!==r.anchorOrigin?r.anchorOrigin:Ev,e.Ra=void 0!==r.anchorXUnits?r.anchorXUnits:Mv,e.Ia=void 0!==r.anchorYUnits?r.anchorYUnits:Mv,e.qt=void 0!==r.crossOrigin?r.crossOrigin:null;var c=void 0!==r.img?r.img:null,f=void 0!==r.imgSize?r.imgSize:null,h=r.src;Mt(!(void 0!==h&&c),4),Mt(!c||c&&f,5),void 0!==h&&0!==h.length||!c||(h=c.src||o(c)),Mt(void 0!==h&&h.length>0,6);var l=void 0!==r.src?lo:po;return e._a=void 0!==r.color?Lo(r.color):null,e.Pa=Pv(c,h,f,e.qt,l,e._a),e.Da=void 0!==r.offset?r.offset:[0,0],e.Na=void 0!==r.offsetOrigin?r.offsetOrigin:Ev,e._o=null,e.fs=void 0!==r.size?r.size:null,e}return Nv(n,t),n.prototype.clone=function(){var t=this.getScale();return new n({anchor:this.ki.slice(),anchorOrigin:this.Ca,anchorXUnits:this.Ra,anchorYUnits:this.Ia,crossOrigin:this.qt,color:this._a&&this._a.slice?this._a.slice():this._a||void 0,src:this.getSrc(),offset:this.Da.slice(),offsetOrigin:this.Na,size:null!==this.fs?this.fs.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},n.prototype.getAnchor=function(){var t=this.Aa;if(!t){t=this.ki;var n=this.getSize();if(this.Ra==Mv||this.Ia==Mv){if(!n)return null;t=this.ki.slice(),this.Ra==Mv&&(t[0]*=n[0]),this.Ia==Mv&&(t[1]*=n[1])}if(this.Ca!=Ev){if(!n)return null;t===this.ki&&(t=this.ki.slice()),this.Ca!=Av&&this.Ca!=Tv||(t[0]=-t[0]+n[0]),this.Ca!=Ov&&this.Ca!=Tv||(t[1]=-t[1]+n[1])}this.Aa=t}var e=this.getDisplacement();return[t[0]-e[0],t[1]+e[1]]},n.prototype.setAnchor=function(t){this.ki=t,this.Aa=null},n.prototype.getColor=function(){return this._a},n.prototype.getImage=function(t){return this.Pa.getImage(t)},n.prototype.getPixelRatio=function(t){return this.Pa.getPixelRatio(t)},n.prototype.getImageSize=function(){return this.Pa.getSize()},n.prototype.getImageState=function(){return this.Pa.getImageState()},n.prototype.getHitDetectionImage=function(){return this.Pa.getHitDetectionImage()},n.prototype.getOrigin=function(){if(this._o)return this._o;var t=this.Da;if(this.Na!=Ev){var n=this.getSize(),e=this.Pa.getSize();if(!n||!e)return null;t=t.slice(),this.Na!=Av&&this.Na!=Tv||(t[0]=e[0]-n[0]-t[0]),this.Na!=Ov&&this.Na!=Tv||(t[1]=e[1]-n[1]-t[1])}return this._o=t,this._o},n.prototype.getSrc=function(){return this.Pa.getSrc()},n.prototype.getSize=function(){return this.fs?this.fs:this.Pa.getSize()},n.prototype.listenImageChange=function(t){this.Pa.addEventListener(D,t)},n.prototype.load=function(){this.Pa.load()},n.prototype.unlistenImageChange=function(t){this.Pa.removeEventListener(D,t)},n}(wv),Lv=function(){function t(t){var n=t||{};this._a=void 0!==n.color?n.color:null,this.za=n.lineCap,this.La=void 0!==n.lineDash?n.lineDash:null,this.Fa=n.lineDashOffset,this.Ga=n.lineJoin,this.Ua=n.miterLimit,this.Ba=n.width}return t.prototype.clone=function(){var n=this.getColor();return new t({color:Array.isArray(n)?n.slice():n||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this._a},t.prototype.getLineCap=function(){return this.za},t.prototype.getLineDash=function(){return this.La},t.prototype.getLineDashOffset=function(){return this.Fa},t.prototype.getLineJoin=function(){return this.Ga},t.prototype.getMiterLimit=function(){return this.Ua},t.prototype.getWidth=function(){return this.Ba},t.prototype.setColor=function(t){this._a=t},t.prototype.setLineCap=function(t){this.za=t},t.prototype.setLineDash=function(t){this.La=t},t.prototype.setLineDashOffset=function(t){this.Fa=t},t.prototype.setLineJoin=function(t){this.Ga=t},t.prototype.setMiterLimit=function(t){this.Ua=t},t.prototype.setWidth=function(t){this.Ba=t},t}();function Fv(t){return(Fv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Gv=function(){function t(t){var n=t||{};this.Yr=null,this.qa=Vv,void 0!==n.geometry&&this.setGeometry(n.geometry),this.va=void 0!==n.fill?n.fill:null,this.Dt=void 0!==n.image?n.image:null,this.cn=void 0!==n.renderer?n.renderer:null,this.$a=void 0!==n.hitDetectionRenderer?n.hitDetectionRenderer:null,this.ya=void 0!==n.stroke?n.stroke:null,this.io=void 0!==n.text?n.text:null,this.Va=n.zIndex}return t.prototype.clone=function(){var n=this.getGeometry();return n&&"object"===Fv(n)&&(n=n.clone()),new t({geometry:n,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.cn},t.prototype.setRenderer=function(t){this.cn=t},t.prototype.setHitDetectionRenderer=function(t){this.$a=t},t.prototype.getHitDetectionRenderer=function(){return this.$a},t.prototype.getGeometry=function(){return this.Yr},t.prototype.getGeometryFunction=function(){return this.qa},t.prototype.getFill=function(){return this.va},t.prototype.setFill=function(t){this.va=t},t.prototype.getImage=function(){return this.Dt},t.prototype.setImage=function(t){this.Dt=t},t.prototype.getStroke=function(){return this.ya},t.prototype.setStroke=function(t){this.ya=t},t.prototype.getText=function(){return this.io},t.prototype.setText=function(t){this.io=t},t.prototype.getZIndex=function(){return this.Va},t.prototype.setGeometry=function(t){"function"==typeof t?this.qa=t:"string"==typeof t?this.qa=function(n){return n.get(t)}:t?void 0!==t&&(this.qa=function(){return t}):this.qa=Vv,this.Yr=t},t.prototype.setZIndex=function(t){this.Va=t},t}();function Uv(t){var n;if("function"==typeof t)n=t;else{var e;if(Array.isArray(t))e=t;else Mt("function"==typeof t.getZIndex,41),e=[t];n=function(){return e}}return n}var Bv=null;function qv(t,n){if(!Bv){var e=new Sv({color:"rgba(255,255,255,0.4)"}),r=new Lv({color:"#3399CC",width:1.25});Bv=[new Gv({image:new _v({fill:e,stroke:r,radius:5}),fill:e,stroke:r})]}return Bv}function $v(){var t={},n=[255,255,255,1],e=[0,153,255,1];return t[It.POLYGON]=[new Gv({fill:new Sv({color:[255,255,255,.5]})})],t[It.MULTI_POLYGON]=t[It.POLYGON],t[It.LINE_STRING]=[new Gv({stroke:new Lv({color:n,width:5})}),new Gv({stroke:new Lv({color:e,width:3})})],t[It.MULTI_LINE_STRING]=t[It.LINE_STRING],t[It.CIRCLE]=t[It.POLYGON].concat(t[It.LINE_STRING]),t[It.POINT]=[new Gv({image:new _v({radius:6,fill:new Sv({color:e}),stroke:new Lv({color:n,width:1.5})}),zIndex:1/0})],t[It.MULTI_POINT]=t[It.POINT],t[It.GEOMETRY_COLLECTION]=t[It.POLYGON].concat(t[It.LINE_STRING],t[It.POINT]),t}function Vv(t){return t.getGeometry()}var Zv=Gv,Wv="point",Hv="line",Kv=function(){function t(t){var n=t||{};this.Za=n.font,this.Fr=n.rotation,this.ua=n.rotateWithView,this.ca=n.scale,this.fa=eu(void 0!==n.scale?n.scale:1),this.io=n.text,this.Wa=n.textAlign,this.Ha=n.textBaseline,this.va=void 0!==n.fill?n.fill:new Sv({color:"#333"}),this.Ka=void 0!==n.maxAngle?n.maxAngle:Math.PI/4,this.Xa=void 0!==n.placement?n.placement:Wv,this.Ya=!!n.overflow,this.ya=void 0!==n.stroke?n.stroke:null,this.Ja=void 0!==n.offsetX?n.offsetX:0,this.Qa=void 0!==n.offsetY?n.offsetY:0,this.tu=n.backgroundFill?n.backgroundFill:null,this.nu=n.backgroundStroke?n.backgroundStroke:null,this.Te=void 0===n.padding?null:n.padding}return t.prototype.clone=function(){var n=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(n)?n.slice():n,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()})},t.prototype.getOverflow=function(){return this.Ya},t.prototype.getFont=function(){return this.Za},t.prototype.getMaxAngle=function(){return this.Ka},t.prototype.getPlacement=function(){return this.Xa},t.prototype.getOffsetX=function(){return this.Ja},t.prototype.getOffsetY=function(){return this.Qa},t.prototype.getFill=function(){return this.va},t.prototype.getRotateWithView=function(){return this.ua},t.prototype.getRotation=function(){return this.Fr},t.prototype.getScale=function(){return this.ca},t.prototype.getScaleArray=function(){return this.fa},t.prototype.getStroke=function(){return this.ya},t.prototype.getText=function(){return this.io},t.prototype.getTextAlign=function(){return this.Wa},t.prototype.getTextBaseline=function(){return this.Ha},t.prototype.getBackgroundFill=function(){return this.tu},t.prototype.getBackgroundStroke=function(){return this.nu},t.prototype.getPadding=function(){return this.Te},t.prototype.setOverflow=function(t){this.Ya=t},t.prototype.setFont=function(t){this.Za=t},t.prototype.setMaxAngle=function(t){this.Ka=t},t.prototype.setOffsetX=function(t){this.Ja=t},t.prototype.setOffsetY=function(t){this.Qa=t},t.prototype.setPlacement=function(t){this.Xa=t},t.prototype.setRotateWithView=function(t){this.ua=t},t.prototype.setFill=function(t){this.va=t},t.prototype.setRotation=function(t){this.Fr=t},t.prototype.setScale=function(t){this.ca=t,this.fa=eu(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.ya=t},t.prototype.setText=function(t){this.io=t},t.prototype.setTextAlign=function(t){this.Wa=t},t.prototype.setTextBaseline=function(t){this.Ha=t},t.prototype.setBackgroundFill=function(t){this.tu=t},t.prototype.setBackgroundStroke=function(t){this.nu=t},t.prototype.setPadding=function(t){this.Te=t},t}(),Xv=function(){function t(t){this.eu,this.ru,this.iu,this.ou=void 0===t||t,this.su=0}return t.prototype.insertItem=function(t){var n={prev:void 0,next:void 0,data:t},e=this.iu;if(e){var r=e.next;n.prev=e,n.next=r,e.next=n,r&&(r.prev=n),e===this.ru&&(this.ru=n)}else this.eu=n,this.ru=n,this.ou&&(n.next=n,n.prev=n);this.iu=n,this.su++},t.prototype.removeItem=function(){var t=this.iu;if(t){var n=t.next,e=t.prev;n&&(n.prev=e),e&&(e.next=n),this.iu=n||e,this.eu===this.ru?(this.iu=void 0,this.eu=void 0,this.ru=void 0):this.eu===t?this.eu=this.iu:this.ru===t&&(this.ru=e?this.iu.prev:this.iu),this.su--}},t.prototype.firstItem=function(){if(this.iu=this.eu,this.iu)return this.iu.data},t.prototype.lastItem=function(){if(this.iu=this.ru,this.iu)return this.iu.data},t.prototype.nextItem=function(){if(this.iu&&this.iu.next)return this.iu=this.iu.next,this.iu.data},t.prototype.getNextItem=function(){if(this.iu&&this.iu.next)return this.iu.next.data},t.prototype.prevItem=function(){if(this.iu&&this.iu.prev)return this.iu=this.iu.prev,this.iu.data},t.prototype.getPrevItem=function(){if(this.iu&&this.iu.prev)return this.iu.prev.data},t.prototype.getCurrItem=function(){if(this.iu)return this.iu.data},t.prototype.setFirstItem=function(){this.ou&&this.iu&&(this.eu=this.iu,this.ru=this.iu.prev)},t.prototype.concat=function(t){if(t.iu){if(this.iu){var n=this.iu.next;this.iu.next=t.eu,t.eu.prev=this.iu,n.prev=t.ru,t.ru.next=n,this.su+=t.su}else this.iu=t.iu,this.eu=t.eu,this.ru=t.ru,this.su=t.su;t.iu=void 0,t.eu=void 0,t.ru=void 0,t.su=0}},t.prototype.getLength=function(){return this.su},t}(),Yv=e(7072),Jv=function(){function t(t){this.au=new Yv(t),this.uu={}}return t.prototype.insert=function(t,n){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:n};this.au.insert(e),this.uu[o(n)]=e},t.prototype.load=function(t,n){for(var e=new Array(n.length),r=0,i=n.length;r<i;r++){var s=t[r],a=n[r],u={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};e[r]=u,this.uu[o(a)]=u}this.au.load(e)},t.prototype.remove=function(t){var n=o(t),e=this.uu[n];return delete this.uu[n],null!==this.au.remove(e)},t.prototype.update=function(t,n){var e=this.uu[o(n)];Pn([e.minX,e.minY,e.maxX,e.maxY],t)||(this.remove(n),this.insert(t,n))},t.prototype.getAll=function(){return this.au.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.au.search(n).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.cu(this.getAll(),t)},t.prototype.forEachInExtent=function(t,n){return this.cu(this.getInExtent(t),n)},t.prototype.cu=function(t,n){for(var e,r=0,i=t.length;r<i;r++)if(e=n(t[r]))return e;return e},t.prototype.isEmpty=function(){return R(this.uu)},t.prototype.clear=function(){this.au.clear(),this.uu={}},t.prototype.getExtent=function(t){var n=this.au.toJSON();return An(n.minX,n.minY,n.maxX,n.maxY,t)},t.prototype.concat=function(t){for(var n in this.au.load(t.au.all()),t.uu)this.uu[n]=t.uu[n]},t}(),Qv="tileloadstart",td="tileloadend",nd="tileloaderror",ed=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function rd(t){return t?Array.isArray(t)?function(n){return t}:"function"==typeof t?t:function(n){return[t]}:null}var id=function(t){function n(n){var e=t.call(this)||this;e.projection=mr(n.projection),e.fu=rd(n.attributions),e.hu=void 0===n.attributionsCollapsible||n.attributionsCollapsible,e.loading=!1,e.en=void 0!==n.state?n.state:ls,e.lu=void 0!==n.wrapX&&n.wrapX,e.vu=!!n.interpolate,e.viewResolver=null,e.viewRejector=null;var r=e;return e.du=new Promise((function(t,n){r.viewResolver=t,r.viewRejector=n})),e}return ed(n,t),n.prototype.getAttributions=function(){return this.fu},n.prototype.getAttributionsCollapsible=function(){return this.hu},n.prototype.getProjection=function(){return this.projection},n.prototype.getResolutions=function(){return r()},n.prototype.getView=function(){return this.du},n.prototype.getState=function(){return this.en},n.prototype.getWrapX=function(){return this.lu},n.prototype.getInterpolate=function(){return this.vu},n.prototype.refresh=function(){this.changed()},n.prototype.setAttributions=function(t){this.fu=rd(t),this.changed()},n.prototype.setState=function(t){this.en=t,this.changed()},n}(ot),od=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),sd=function(t){function n(n){var e=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,projection:n.projection,state:n.state,wrapX:n.wrapX,interpolate:n.interpolate})||this;e.on,e.once,e.un,e.pu=void 0!==n.opaque&&n.opaque,e.yu=void 0!==n.tilePixelRatio?n.tilePixelRatio:1,e.tileGrid=void 0!==n.tileGrid?n.tileGrid:null;var r=n.tileGrid;return r&&eu(r.getTileSize(r.getMinZoom()),[256,256]),e.tileCache=new Zc(n.cacheSize||0),e.tmpSize=[0,0],e.Ii=n.key||"",e.tileOptions={transition:n.transition,interpolate:n.interpolate},e.zDirection=n.zDirection?n.zDirection:0,e}return od(n,t),n.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},n.prototype.expireCache=function(t,n){var e=this.getTileCacheForProjection(t);e&&e.expireCache(n)},n.prototype.forEachLoadedTile=function(t,n,e,r){var i=this.getTileCacheForProjection(t);if(!i)return!1;for(var o,s,a,u=!0,c=e.minX;c<=e.maxX;++c)for(var f=e.minY;f<=e.maxY;++f)s=Fc(n,c,f),a=!1,i.containsKey(s)&&(a=(o=i.get(s)).getState()===dt)&&(a=!1!==r(o)),a||(u=!1);return u},n.prototype.getGutterForProjection=function(t){return 0},n.prototype.getKey=function(){return this.Ii},n.prototype.setKey=function(t){this.Ii!==t&&(this.Ii=t,this.changed())},n.prototype.getOpaque=function(t){return this.pu},n.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},n.prototype.getTile=function(t,n,e,i,o){return r()},n.prototype.getTileGrid=function(){return this.tileGrid},n.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:$f(t)},n.prototype.getTileCacheForProjection=function(t){return Mt(Mr(this.getProjection(),t),68),this.tileCache},n.prototype.getTilePixelRatio=function(t){return this.yu},n.prototype.getTilePixelSize=function(t,n,e){var r=this.getTileGridForProjection(e),i=this.getTilePixelRatio(n),o=eu(r.getTileSize(t),this.tmpSize);return 1==i?o:nu(o,i,this.tmpSize)},n.prototype.getTileCoordForTileUrlFunction=function(t,n){var e=void 0!==n?n:this.getProjection(),r=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=Vf(r,t,e)),$c(t,r)?t:null},n.prototype.clear=function(){this.tileCache.clear()},n.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},n.prototype.updateCacheSize=function(t,n){var e=this.getTileCacheForProjection(n);t>e.highWaterMark&&(e.highWaterMark=t)},n.prototype.useTile=function(t,n,e,r){},n}(id),ad=function(t){function n(n,e){var r=t.call(this,n)||this;return r.tile=e,r}return od(n,t),n}(h),ud=sd,cd=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),fd=function(t){function n(e){var r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return r.mu=r.tileUrlFunction===n.prototype.tileUrlFunction,r.tileLoadFunction=e.tileLoadFunction,e.tileUrlFunction&&(r.tileUrlFunction=e.tileUrlFunction),r.urls=null,e.urls?r.setUrls(e.urls):e.url&&r.setUrl(e.url),r.bu={},r}return cd(n,t),n.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},n.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},n.prototype.getUrls=function(){return this.urls},n.prototype.handleTileChange=function(t){var n,e=t.target,r=o(e),i=e.getState();i==vt?(this.bu[r]=!0,n=Qv):r in this.bu&&(delete this.bu[r],n=i==pt?nd:i==dt?td:void 0),null!=n&&this.dispatchEvent(new ad(n,e))},n.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},n.prototype.setTileUrlFunction=function(t,n){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==n?this.setKey(n):this.changed()},n.prototype.setUrl=function(t){var n=nh(t);this.urls=n,this.setUrls(n)},n.prototype.setUrls=function(t){this.urls=t;var n=t.join("\n");this.mu?this.setTileUrlFunction(Jf(t,this.tileGrid),n):this.setKey(n)},n.prototype.tileUrlFunction=function(t,n,e){},n.prototype.useTile=function(t,n,e){var r=Fc(t,n,e);this.tileCache.containsKey(r)&&this.tileCache.get(r)},n}(ud),hd=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function ld(t,n){t.getImage().src=n}var vd=function(t){function n(n){var e=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),(e=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction?n.tileLoadFunction:ld,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:n.wrapX,transition:n.transition,interpolate:r,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this).crossOrigin=void 0!==n.crossOrigin?n.crossOrigin:null,e.tileClass=void 0!==n.tileClass?n.tileClass:Co,e.tileCacheForProjection={},e.tileGridForProjection={},e.wu=n.reprojectionErrorThreshold,e.gu=!1,e}return hd(n,t),n.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},n.prototype.expireCache=function(t,n){var e=this.getTileCacheForProjection(t);for(var r in this.tileCache.expireCache(this.tileCache==e?n:{}),this.tileCacheForProjection){var i=this.tileCacheForProjection[r];i.expireCache(i==e?n:{})}},n.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Mr(this.getProjection(),t)?0:this.getGutter()},n.prototype.getGutter=function(){return 0},n.prototype.getKey=function(){var n=t.prototype.getKey.call(this);return this.getInterpolate()||(n+=":disable-interpolation"),n},n.prototype.getOpaque=function(n){return!(this.getProjection()&&n&&!Mr(this.getProjection(),n))&&t.prototype.getOpaque.call(this,n)},n.prototype.getTileGridForProjection=function(t){var n=this.getProjection();if(!this.tileGrid||n&&!Mr(n,t)){var e=o(t);return e in this.tileGridForProjection||(this.tileGridForProjection[e]=$f(t)),this.tileGridForProjection[e]}return this.tileGrid},n.prototype.getTileCacheForProjection=function(t){var n=this.getProjection();if(!n||Mr(n,t))return this.tileCache;var e=o(t);return e in this.tileCacheForProjection||(this.tileCacheForProjection[e]=new Zc(this.tileCache.highWaterMark)),this.tileCacheForProjection[e]},n.prototype.xu=function(t,n,e,r,i,o){var s=[t,n,e],a=this.getTileCoordForTileUrlFunction(s,i),u=a?this.tileUrlFunction(a,r,i):void 0,c=new this.tileClass(s,void 0!==u?lt:yt,void 0!==u?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=o,c.addEventListener(D,this.handleTileChange.bind(this)),c},n.prototype.getTile=function(t,n,e,r,i){var o=this.getProjection();if(o&&i&&!Mr(o,i)){var s=this.getTileCacheForProjection(i),a=[t,n,e],u=void 0,c=Gc(a);s.containsKey(c)&&(u=s.get(c));var f=this.getKey();if(u&&u.key==f)return u;var h=this.getTileGridForProjection(o),l=this.getTileGridForProjection(i),v=this.getTileCoordForTileUrlFunction(a,i),d=new hl(o,h,i,l,a,v,this.getTilePixelRatio(r),this.getGutter(),function(t,n,e,r){return this.getTileInternal(t,n,e,r,o)}.bind(this),this.wu,this.gu,this.getInterpolate());return d.key=f,u?(d.interimTile=u,d.refreshInterimChain(),s.replace(c,d)):s.set(c,d),d}return this.getTileInternal(t,n,e,r,o||i)},n.prototype.getTileInternal=function(t,n,e,r,i){var o=null,s=Fc(t,n,e),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var u=o;o=this.xu(t,n,e,r,i,a),u.getState()==lt?o.interimTile=u.interimTile:o.interimTile=u,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.xu(t,n,e,r,i,a),this.tileCache.set(s,o);return o},n.prototype.setRenderReprojectionEdges=function(t){if(this.gu!=t){for(var n in this.gu=t,this.tileCacheForProjection)this.tileCacheForProjection[n].clear();this.changed()}},n.prototype.setTileGridForProjection=function(t,n){var e=mr(t);if(e){var r=o(e);r in this.tileGridForProjection||(this.tileGridForProjection[r]=n)}},n}(fd),dd=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function pd(t){var n,e,r=t[0],i=new Array(r),o=1<<r-1;for(n=0;n<r;++n)e=48,t[1]&o&&(e+=1),t[2]&o&&(e+=2),i[n]=String.fromCharCode(e),o>>=1;return i.join("")}for(var yd=function(t){function n(n){var e=this,r=void 0!==n.hidpi&&n.hidpi,i=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(i=n.interpolate),(e=t.call(this,{cacheSize:n.cacheSize,crossOrigin:"anonymous",interpolate:i,opaque:!0,projection:mr("EPSG:3857"),reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:hs,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:r?2:1,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).ku=r,e._u=void 0!==n.culture?n.culture:"en-us",e.Su=void 0!==n.maxZoom?n.maxZoom:-1,e.Mu=n.key,e.ju=n.imagerySet,lf("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+e.ju+"?uriScheme=https&include=ImageryProviders&key="+e.Mu+"&c="+e._u,e.handleImageryMetadataResponse.bind(e),void 0,"jsonp"),e}return dd(n,t),n.prototype.getApiKey=function(){return this.Mu},n.prototype.getImagerySet=function(){return this.ju},n.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var n=t.resourceSets[0].resources[0],e=-1==this.Su?n.zoomMax:this.Su,r=Xf(this.getProjection()),i=this.ku?2:1,o=n.imageWidth==n.imageHeight?n.imageWidth/i:[n.imageWidth/i,n.imageHeight/i],s=Wf({extent:r,minZoom:n.zoomMin,maxZoom:e,tileSize:o});this.tileGrid=s;var a=this._u,u=this.ku;if(this.tileUrlFunction=Qf(n.imageUrlSubdomains.map((function(t){var e=[0,0,0],r=n.imageUrl.replace("{subdomain}",t).replace("{culture}",a);return function(t,n,i){if(t){Lc(t[0],t[1],t[2],e);var o=r;return u&&(o+="&dpi=d1&device=mobile"),o.replace("{quadkey}",pd(e))}}}))),n.imageryProviders){var c=jr(mr("EPSG:4326"),this.getProjection());this.setAttributions(function(t){var e=[],r=t.viewState,i=this.getTileGrid(),o=i.getZForResolution(r.resolution,this.zDirection),s=i.getTileCoordForCoordAndZ(r.center,o)[0];return n.imageryProviders.map((function(n){for(var r=!1,i=n.coverageAreas,o=0,a=i.length;o<a;++o){var u=i[o];if(s>=u.zoomMin&&s<=u.zoomMax){var f=u.bbox;if(te(oe([f[1],f[0],f[3],f[2]],c),t.extent)){r=!0;break}}}r&&e.push(n.attribution)})),e.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>'),e}.bind(this))}this.setState(ls)}else this.setState(vs)},n}(vd),md=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),bd=function(t){function n(n){var e=n||{},r=void 0===e.imageSmoothing||e.imageSmoothing;void 0!==e.interpolate&&(r=e.interpolate);var i=void 0!==e.projection?e.projection:"EPSG:3857",o=void 0!==e.tileGrid?e.tileGrid:Wf({extent:Xf(i),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});return t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:r,opaque:e.opaque,projection:i,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this}return md(n,t),n}(vd),wd=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),gd=function(t){function n(n){var e=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,maxZoom:void 0!==n.maxZoom?n.maxZoom:18,minZoom:n.minZoom,projection:n.projection,transition:n.transition,wrapX:n.wrapX,zDirection:n.zDirection})||this;return e.Ou=n.account,e.Tu=n.map||"",e.Eu=n.config||{},e.Au={},e.Cu(),e}return wd(n,t),n.prototype.getConfig=function(){return this.Eu},n.prototype.updateConfig=function(t){E(this.Eu,t),this.Cu()},n.prototype.setConfig=function(t){this.Eu=t||{},this.Cu()},n.prototype.Cu=function(){var t=JSON.stringify(this.Eu);if(this.Au[t])this.Ru(this.Au[t]);else{var n="https://"+this.Ou+".carto.com/api/v1/map";this.Tu&&(n+="/named/"+this.Tu);var e=new XMLHttpRequest;e.addEventListener("load",this.Iu.bind(this,t)),e.addEventListener("error",this.Pu.bind(this)),e.open("POST",n),e.setRequestHeader("Content-type","application/json"),e.send(JSON.stringify(this.Eu))}},n.prototype.Iu=function(t,n){var e=n.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.setState(vs)}this.Ru(r),this.Au[t]=r,this.setState(ls)}else this.setState(vs)},n.prototype.Pu=function(t){this.setState(vs)},n.prototype.Ru=function(t){var n="https://"+t.cdn_url.https+"/"+this.Ou+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(n)},n}(bd),xd="addfeature",kd="changefeature",_d="clear",Sd="removefeature",Md="featuresloadstart",jd="featuresloadend",Od="featuresloaderror",Td=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ed=function(t){function n(n,e,r){var i=t.call(this,n)||this;return i.feature=e,i.features=r,i}return Td(n,t),n}(h),Ad=function(t){function n(n){var e=this,r=n||{};(e=t.call(this,{attributions:r.attributions,interpolate:!0,projection:void 0,state:ls,wrapX:void 0===r.wrapX||r.wrapX})||this).on,e.once,e.un,e.B=j,e.Ni=r.format,e.Du=void 0===r.overlaps||r.overlaps,e.Li=r.url,void 0!==r.loader?e.B=r.loader:void 0!==e.Li&&(Mt(e.Ni,7),e.B=cf(e.Li,e.Ni)),e.Nu=void 0!==r.strategy?r.strategy:ff;var i,o,s=void 0===r.useSpatialIndex||r.useSpatialIndex;return e.zu=s?new Jv:null,e.Lu=new Jv,e.Fu=0,e.Gu={},e.Uu={},e.Bu={},e.qu={},e.$u=null,Array.isArray(r.features)?o=r.features:r.features&&(o=(i=r.features).getArray()),s||void 0!==i||(i=new ht(o)),void 0!==o&&e.addFeaturesInternal(o),void 0!==i&&e.Vu(i),e}return Td(n,t),n.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},n.prototype.addFeatureInternal=function(t){var n=o(t);if(this.Zu(n,t)){this.Wu(n,t);var e=t.getGeometry();if(e){var r=e.getExtent();this.zu&&this.zu.insert(r,t)}else this.Gu[n]=t;this.dispatchEvent(new Ed(xd,t))}else this.$u&&this.$u.remove(t)},n.prototype.Wu=function(t,n){this.qu[t]=[X(n,D,this.Hu,this),X(n,l,this.Hu,this)]},n.prototype.Zu=function(t,n){var e=!0,r=n.getId();return void 0!==r&&(r.toString()in this.Uu?e=!1:this.Uu[r.toString()]=n),e&&(Mt(!(t in this.Bu),30),this.Bu[t]=n),e},n.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},n.prototype.addFeaturesInternal=function(t){for(var n=[],e=[],r=[],i=0,s=t.length;i<s;i++){var a=o(c=t[i]);this.Zu(a,c)&&e.push(c)}i=0;for(var u=e.length;i<u;i++){var c;a=o(c=e[i]);this.Wu(a,c);var f=c.getGeometry();if(f){var h=f.getExtent();n.push(h),r.push(c)}else this.Gu[a]=c}this.zu&&this.zu.load(n,r);i=0;for(var l=e.length;i<l;i++)this.dispatchEvent(new Ed(xd,e[i]))},n.prototype.Vu=function(t){var n=!1;this.addEventListener(xd,(function(e){n||(n=!0,t.push(e.feature),n=!1)})),this.addEventListener(Sd,(function(e){n||(n=!0,t.remove(e.feature),n=!1)})),t.addEventListener(st,function(t){n||(n=!0,this.addFeature(t.element),n=!1)}.bind(this)),t.addEventListener(at,function(t){n||(n=!0,this.removeFeature(t.element),n=!1)}.bind(this)),this.$u=t},n.prototype.clear=function(t){if(t){for(var n in this.qu){this.qu[n].forEach(J)}this.$u||(this.qu={},this.Uu={},this.Bu={})}else if(this.zu){var e=function(t){this.removeFeatureInternal(t)}.bind(this);for(var r in this.zu.forEach(e),this.Gu)this.removeFeatureInternal(this.Gu[r])}this.$u&&this.$u.clear(),this.zu&&this.zu.clear(),this.Gu={};var i=new Ed(_d);this.dispatchEvent(i),this.changed()},n.prototype.forEachFeature=function(t){if(this.zu)return this.zu.forEach(t);this.$u&&this.$u.forEach(t)},n.prototype.forEachFeatureAtCoordinateDirect=function(t,n){var e=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(e,(function(e){return e.getGeometry().intersectsCoordinate(t)?n(e):void 0}))},n.prototype.forEachFeatureInExtent=function(t,n){if(this.zu)return this.zu.forEachInExtent(t,n);this.$u&&this.$u.forEach(n)},n.prototype.forEachFeatureIntersectingExtent=function(t,n){return this.forEachFeatureInExtent(t,(function(e){if(e.getGeometry().intersectsExtent(t)){var r=n(e);if(r)return r}}))},n.prototype.getFeaturesCollection=function(){return this.$u},n.prototype.getFeatures=function(){var t;return this.$u?t=this.$u.getArray().slice(0):this.zu&&(t=this.zu.getAll(),R(this.Gu)||w(t,C(this.Gu))),t},n.prototype.getFeaturesAtCoordinate=function(t){var n=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){n.push(t)})),n},n.prototype.getFeaturesInExtent=function(t){return this.zu?this.zu.getInExtent(t):this.$u?this.$u.getArray().slice(0):[]},n.prototype.getClosestFeatureToCoordinate=function(t,n){var e=t[0],r=t[1],i=null,o=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],u=n||S;return this.zu.forEachInExtent(a,(function(t){if(u(t)){var n=t.getGeometry(),c=s;if((s=n.closestPointXY(e,r,o,s))<c){i=t;var f=Math.sqrt(s);a[0]=e-f,a[1]=r-f,a[2]=e+f,a[3]=r+f}}})),i},n.prototype.getExtent=function(t){return this.zu.getExtent(t)},n.prototype.getFeatureById=function(t){var n=this.Uu[t.toString()];return void 0!==n?n:null},n.prototype.getFeatureByUid=function(t){var n=this.Bu[t];return void 0!==n?n:null},n.prototype.getFormat=function(){return this.Ni},n.prototype.getOverlaps=function(){return this.Du},n.prototype.getUrl=function(){return this.Li},n.prototype.Hu=function(t){var n=t.target,e=o(n),r=n.getGeometry();if(r){var i=r.getExtent();e in this.Gu?(delete this.Gu[e],this.zu&&this.zu.insert(i,n)):this.zu&&this.zu.update(i,n)}else e in this.Gu||(this.zu&&this.zu.remove(n),this.Gu[e]=n);var s=n.getId();if(void 0!==s){var a=s.toString();this.Uu[a]!==n&&(this.Ku(n),this.Uu[a]=n)}else this.Ku(n),this.Bu[e]=n;this.changed(),this.dispatchEvent(new Ed(kd,n))},n.prototype.hasFeature=function(t){var n=t.getId();return void 0!==n?n in this.Uu:o(t)in this.Bu},n.prototype.isEmpty=function(){return this.zu.isEmpty()&&R(this.Gu)},n.prototype.loadFeatures=function(t,n,e){for(var r=this.Lu,i=this.Nu(t,n,e),o=function(t,o){var a=i[t];r.forEachInExtent(a,(function(t){return jn(t.extent,a)}))||(++s.Fu,s.dispatchEvent(new Ed(Md)),s.B.call(s,a,n,e,function(t){--this.Fu,this.dispatchEvent(new Ed(jd,void 0,t))}.bind(s),function(){--this.Fu,this.dispatchEvent(new Ed(Od))}.bind(s)),r.insert(a,{extent:a.slice()}))},s=this,a=0,u=i.length;a<u;++a)o(a);this.loading=!(this.B.length<4)&&this.Fu>0},n.prototype.refresh=function(){this.clear(!0),this.Lu.clear(),t.prototype.refresh.call(this)},n.prototype.removeLoadedExtent=function(t){var n,e=this.Lu;e.forEachInExtent(t,(function(e){if(Pn(e.extent,t))return n=e,!0})),n&&e.remove(n)},n.prototype.removeFeature=function(t){if(t){var n=o(t);n in this.Gu?delete this.Gu[n]:this.zu&&this.zu.remove(t),this.removeFeatureInternal(t)&&this.changed()}},n.prototype.removeFeatureInternal=function(t){var n=o(t),e=this.qu[n];if(e){e.forEach(J),delete this.qu[n];var r=t.getId();return void 0!==r&&delete this.Uu[r.toString()],delete this.Bu[n],this.dispatchEvent(new Ed(Sd,t)),t}},n.prototype.Ku=function(t){var n=!1;for(var e in this.Uu)if(this.Uu[e]===t){delete this.Uu[e],n=!0;break}return n},n.prototype.setLoader=function(t){this.B=t},n.prototype.setUrl=function(t){Mt(this.Ni,7),this.Li=t,this.setLoader(cf(t,this.Ni))},n}(id),Cd=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Rd=function(t){function n(n){var e=t.call(this,{attributions:n.attributions,wrapX:n.wrapX})||this;return e.resolution=void 0,e.distance=void 0!==n.distance?n.distance:20,e.minDistance=n.minDistance||0,e.interpolationRatio=0,e.features=[],e.geometryFunction=n.geometryFunction||function(t){var n=t.getGeometry();return Mt(n.getType()==It.POINT,10),n},e.Xu=n.createCluster,e.source=null,e.Yu=e.refresh.bind(e),e.updateDistance(e.distance,e.minDistance),e.setSource(n.source||null),e}return Cd(n,t),n.prototype.clear=function(n){this.features.length=0,t.prototype.clear.call(this,n)},n.prototype.getDistance=function(){return this.distance},n.prototype.getSource=function(){return this.source},n.prototype.loadFeatures=function(t,n,e){this.source.loadFeatures(t,n,e),n!==this.resolution&&(this.resolution=n,this.refresh())},n.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},n.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},n.prototype.getMinDistance=function(){return this.minDistance},n.prototype.setSource=function(t){this.source&&this.source.removeEventListener(D,this.Yu),this.source=t,t&&t.addEventListener(D,this.Yu),this.refresh()},n.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},n.prototype.updateDistance=function(t,n){var e=0===t?0:Math.min(n,t)/t,r=t!==this.distance||this.interpolationRatio!==e;this.distance=t,this.minDistance=n,this.interpolationRatio=e,r&&this.refresh()},n.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=[1/0,1/0,-1/0,-1/0],n=this.distance*this.resolution,e=this.source.getFeatures(),r={},i=0,s=e.length;i<s;i++){var a=e[i];if(!(o(a)in r)){var u=this.geometryFunction(a);if(u){Rn(u.getCoordinates(),t),kn(t,n,t);var c=this.source.getFeaturesInExtent(t).filter((function(t){var n=o(t);return!(n in r)&&(r[n]=!0,!0)}));this.features.push(this.createCluster(c,t))}}}},n.prototype.createCluster=function(t,n){for(var e=[0,0],r=t.length-1;r>=0;--r){var i=this.geometryFunction(t[r]);i?Qe(e,i.getCoordinates()):t.splice(r,1)}sr(e,1/t.length);var o=Zn(n),s=this.interpolationRatio,a=new Mi([e[0]*(1-s)+o[0]*s,e[1]*(1-s)+o[1]*s]);return this.Xu?this.Xu(a,t):new Tt({geometry:a,features:t})},n}(Ad),Id=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Pd=function(t){function n(n){var e=this,r=void 0===n.projection?"EPSG:3857":n.projection,i=n.tileGrid;return void 0===i&&r&&(i=Wf({extent:Xf(r),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize})),(e=t.call(this,{cacheSize:.1,attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,projection:r,tileGrid:i,opaque:n.opaque,state:n.state,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,interpolate:n.interpolate})||this).bu={},e.B=n.loader,e.cr=e.cr.bind(e),e.bandCount=void 0===n.bandCount?4:n.bandCount,e}return Id(n,t),n.prototype.setLoader=function(t){this.B=t},n.prototype.getTile=function(t,n,e,r,i){var o=Fc(t,n,e);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var s=this.B;var a=new St(E({tileCoord:[t,n,e],loader:function(){return T((function(){return s(t,n,e)}))}},this.tileOptions));return a.key=this.getKey(),a.addEventListener(D,this.cr),this.tileCache.set(o,a),a},n.prototype.cr=function(t){var n,e=t.target,r=o(e),i=e.getState();i==vt?(this.bu[r]=!0,n=Qv):r in this.bu&&(delete this.bu[r],n=i==pt?nd:i==dt?td:void 0),n&&this.dispatchEvent(new ad(n,e))},n}(ud),Dd=new ArrayBuffer(4),Nd=new Float32Array(Dd),zd=new Uint32Array(Dd),Ld=new Uint32Array(512),Fd=new Uint32Array(512),Gd=0;Gd<256;++Gd){var Ud=Gd-127;Ud<-27?(Ld[Gd]=0,Ld[256|Gd]=32768,Fd[Gd]=24,Fd[256|Gd]=24):Ud<-14?(Ld[Gd]=1024>>-Ud-14,Ld[256|Gd]=1024>>-Ud-14|32768,Fd[Gd]=-Ud-1,Fd[256|Gd]=-Ud-1):Ud<=15?(Ld[Gd]=Ud+15<<10,Ld[256|Gd]=Ud+15<<10|32768,Fd[Gd]=13,Fd[256|Gd]=13):Ud<128?(Ld[Gd]=31744,Ld[256|Gd]=64512,Fd[Gd]=24,Fd[256|Gd]=24):(Ld[Gd]=31744,Ld[256|Gd]=64512,Fd[Gd]=13,Fd[256|Gd]=13)}var Bd=new Uint32Array(2048),qd=new Uint32Array(64),$d=new Uint32Array(64);Bd[0]=0;for(var Vd=1;Vd<1024;++Vd){for(var Zd=Vd<<13,Wd=0;0==(8388608&Zd);)Wd-=8388608,Zd<<=1;Zd&=-8388609,Wd+=947912704,Bd[Vd]=Zd|Wd}for(var Hd=1024;Hd<2048;++Hd)Bd[Hd]=939524096+(Hd-1024<<13);qd[0]=0;for(var Kd=1;Kd<31;++Kd)qd[Kd]=Kd<<23;qd[31]=1199570944,qd[32]=2147483648;for(var Xd=33;Xd<63;++Xd)qd[Xd]=2147483648+(Xd-32<<23);qd[63]=3347054592,$d[0]=0;for(var Yd=1;Yd<64;++Yd)$d[Yd]=32===Yd?0:1024;function Jd(t){var n=t>>10;return zd[0]=Bd[$d[n]+(1023&t)]+qd[n],Nd[0]}var Qd=Reflect.getPrototypeOf(Uint8Array).prototype,tp=Reflect.getOwnPropertyDescriptor(Qd,Symbol.toStringTag).get;function np(t){return void 0!==tp.call(t)}var ep=Object.prototype.toString;function rp(t){return!!ArrayBuffer.isView(t)&&(!np(t)&&"[object DataView]"===ep.call(t))}function ip(t,n){if(!rp(t))throw new TypeError("First argument to getFloat16 function must be a DataView");for(var e=arguments.length,r=new Array(e>2?e-2:0),i=2;i<e;i++)r[i-2]=arguments[i];return Jd(t.getUint16.apply(t,[n].concat(r)))}var op=e(5802),sp=e.n(op),ap=e(5051),up=e.n(ap),cp=e(2549);function fp(t,n){for(var e,r=t.width,i=t.height,o=new Uint8Array(r*i*3),s=0,a=0;s<t.length;++s,a+=3)e=256-t[s]/n*256,o[a]=e,o[a+1]=e,o[a+2]=e;return o}function hp(t,n){for(var e,r=t.width,i=t.height,o=new Uint8Array(r*i*3),s=0,a=0;s<t.length;++s,a+=3)e=t[s]/n*256,o[a]=e,o[a+1]=e,o[a+2]=e;return o}function lp(t,n){for(var e=t.width,r=t.height,i=new Uint8Array(e*r*3),o=n.length/3,s=n.length/3*2,a=0,u=0;a<t.length;++a,u+=3){var c=t[a];i[u]=n[c]/65536*256,i[u+1]=n[c+o]/65536*256,i[u+2]=n[c+s]/65536*256}return i}function vp(t){for(var n=t.width,e=t.height,r=new Uint8Array(n*e*3),i=0,o=0;i<t.length;i+=4,o+=3){var s=t[i],a=t[i+1],u=t[i+2],c=t[i+3];r[o]=(255-s)/256*255*((255-c)/256),r[o+1]=(255-a)/256*255*((255-c)/256),r[o+2]=(255-u)/256*255*((255-c)/256)}return r}function dp(t){for(var n=t.width,e=t.height,r=new Uint8ClampedArray(n*e*3),i=0,o=0;i<t.length;i+=3,o+=3){var s=t[i],a=t[i+1],u=t[i+2];r[o]=s+1.402*(u-128),r[o+1]=s-.34414*(a-128)-.71414*(u-128),r[o+2]=s+1.772*(a-128)}return r}function pp(t){for(var n=t.width,e=t.height,r=new Uint8Array(n*e*3),i=0,o=0;i<t.length;i+=3,o+=3){var s=(t[i+0]+16)/116,a=(t[i+1]<<24>>24)/500+s,u=s-(t[i+2]<<24>>24)/200,c=void 0,f=void 0,h=void 0;f=-.9689*(a=.95047*(a*a*a>.008856?a*a*a:(a-16/116)/7.787))+1.8758*(s=1*(s*s*s>.008856?s*s*s:(s-16/116)/7.787))+.0415*(u=1.08883*(u*u*u>.008856?u*u*u:(u-16/116)/7.787)),h=.0557*a+-.204*s+1.057*u,c=(c=3.2406*a+-1.5372*s+-.4986*u)>.0031308?1.055*Math.pow(c,1/2.4)-.055:12.92*c,f=f>.0031308?1.055*Math.pow(f,1/2.4)-.055:12.92*f,h=h>.0031308?1.055*Math.pow(h,1/2.4)-.055:12.92*h,r[o]=255*Math.max(0,Math.min(1,c)),r[o+1]=255*Math.max(0,Math.min(1,f)),r[o+2]=255*Math.max(0,Math.min(1,h))}return r}function yp(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function mp(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){yp(o,r,i,s,a,"next",t)}function a(t){yp(o,r,i,s,a,"throw",t)}s(void 0)}))}}var bp=new Map;function wp(t,n){Array.isArray(t)||(t=[t]),t.forEach((function(t){return bp.set(t,n)}))}function gp(t){return xp.apply(this,arguments)}function xp(){return(xp=mp(regeneratorRuntime.mark((function t(n){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=bp.get(n.Compression)){t.next=3;break}throw new Error("Unknown compression method identifier: ".concat(n.Compression));case 3:return t.next=5,e();case 5:return r=t.sent,t.abrupt("return",new r(n));case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function kp(t,n,e){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return new(Object.getPrototypeOf(t).constructor)(n*e*r)}function _p(t,n,e,r,i){var o=n/r,s=e/i;return t.map((function(t){for(var a=kp(t,r,i),u=0;u<i;++u)for(var c=Math.min(Math.round(s*u),e-1),f=0;f<r;++f){var h=Math.min(Math.round(o*f),n-1),l=t[c*n+h];a[u*r+f]=l}return a}))}function Sp(t,n,e){return(1-e)*t+e*n}function Mp(t,n,e,r,i){var o=n/r,s=e/i;return t.map((function(t){for(var a=kp(t,r,i),u=0;u<i;++u)for(var c=s*u,f=Math.floor(c),h=Math.min(Math.ceil(c),e-1),l=0;l<r;++l){var v=o*l,d=v%1,p=Math.floor(v),y=Math.min(Math.ceil(v),n-1),m=t[f*n+p],b=t[f*n+y],w=t[h*n+p],g=t[h*n+y],x=Sp(Sp(m,b,d),Sp(w,g,d),c%1);a[u*r+l]=x}return a}))}function jp(t,n,e,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"nearest";switch(o.toLowerCase()){case"nearest":return _p(t,n,e,r,i);case"bilinear":case"linear":return Mp(t,n,e,r,i);default:throw new Error("Unsupported resampling method: '".concat(o,"'"))}}function Op(t,n,e,r,i,o){for(var s=n/r,a=e/i,u=kp(t,r,i,o),c=0;c<i;++c)for(var f=Math.min(Math.round(a*c),e-1),h=0;h<r;++h)for(var l=Math.min(Math.round(s*h),n-1),v=0;v<o;++v){var d=t[f*n*o+l*o+v];u[c*r*o+h*o+v]=d}return u}function Tp(t,n,e,r,i,o){for(var s=n/r,a=e/i,u=kp(t,r,i,o),c=0;c<i;++c)for(var f=a*c,h=Math.floor(f),l=Math.min(Math.ceil(f),e-1),v=0;v<r;++v)for(var d=s*v,p=d%1,y=Math.floor(d),m=Math.min(Math.ceil(d),n-1),b=0;b<o;++b){var w=t[h*n*o+y*o+b],g=t[h*n*o+m*o+b],x=t[l*n*o+y*o+b],k=t[l*n*o+m*o+b],_=Sp(Sp(w,g,p),Sp(x,k,p),f%1);u[c*r*o+v*o+b]=_}return u}function Ep(t,n,e,r,i,o){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"nearest";switch(s.toLowerCase()){case"nearest":return Op(t,n,e,r,i,o);case"bilinear":case"linear":return Tp(t,n,e,r,i,o);default:throw new Error("Unsupported resampling method: '".concat(s,"'"))}}function Ap(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw i}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return Cp(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Cp(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cp(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function Rp(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function Ip(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){Rp(o,r,i,s,a,"next",t)}function a(t){Rp(o,r,i,s,a,"throw",t)}s(void 0)}))}}function Pp(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Dp(t,n,e){for(var r=0,i=n;i<e;++i)r+=t[i];return r}function Np(t,n,e){switch(t){case 1:if(n<=8)return new Uint8Array(e);if(n<=16)return new Uint16Array(e);if(n<=32)return new Uint32Array(e);break;case 2:if(8===n)return new Int8Array(e);if(16===n)return new Int16Array(e);if(32===n)return new Int32Array(e);break;case 3:switch(n){case 16:case 32:return new Float32Array(e);case 64:return new Float64Array(e)}}throw Error("Unsupported data format/bitsPerSample")}function zp(t,n){return(1!==t&&2!==t||!(n<=32)||n%8!=0)&&(3!==t||16!==n&&32!==n&&64!==n)}function Lp(t,n,e,r,i,o,s){var a=new DataView(t),u=2===e?1:r,c=Np(n,i,2===e?s*o:s*o*r),f=parseInt("1".repeat(i),2);if(1===n){var h=o*(1===e?r*i:i);0!=(7&h)&&(h=h+7&-8);for(var l=0;l<s;++l)for(var v=l*h,d=0;d<o;++d)for(var p=v+d*u*i,y=0;y<u;++y){var m=p+y*i,b=(l*o+d)*u+y,w=Math.floor(m/8),g=m%8;if(g+i<=8)c[b]=a.getUint8(w)>>8-i-g&f;else if(g+i<=16)c[b]=a.getUint16(w)>>16-i-g&f;else if(g+i<=24){var x=a.getUint16(w)<<8|a.getUint8(w+2);c[b]=x>>24-i-g&f}else c[b]=a.getUint32(w)>>32-i-g&f}}return c.buffer}wp([void 0,1],(function(){return e.e(947).then(e.bind(e,6947)).then((function(t){return t.default}))})),wp(5,(function(){return e.e(25).then(e.bind(e,4025)).then((function(t){return t.default}))})),wp(6,(function(){throw new Error("old style JPEG compression is not supported.")})),wp(7,(function(){return e.e(410).then(e.bind(e,2410)).then((function(t){return t.default}))})),wp([8,32946],(function(){return Promise.all([e.e(760),e.e(998)]).then(e.bind(e,5998)).then((function(t){return t.default}))})),wp(32773,(function(){return e.e(949).then(e.bind(e,4949)).then((function(t){return t.default}))})),wp(34887,(function(){return Promise.all([e.e(760),e.e(830)]).then(e.bind(e,9830)).then((function(t){return t.default}))}));var Fp=function(){function t(n,e,r,i,o,s){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.fileDirectory=n,this.geoKeys=e,this.dataView=r,this.littleEndian=i,this.tiles=o?{}:null,this.isTiled=!n.StripOffsets;var a=n.PlanarConfiguration;if(this.planarConfiguration=void 0===a?1:a,1!==this.planarConfiguration&&2!==this.planarConfiguration)throw new Error("Invalid planar configuration.");this.source=s}var n,e,r,i,o,s,a;return n=t,(e=[{key:"getFileDirectory",value:function(){return this.fileDirectory}},{key:"getGeoKeys",value:function(){return this.geoKeys}},{key:"getWidth",value:function(){return this.fileDirectory.ImageWidth}},{key:"getHeight",value:function(){return this.fileDirectory.ImageLength}},{key:"getSamplesPerPixel",value:function(){return void 0!==this.fileDirectory.SamplesPerPixel?this.fileDirectory.SamplesPerPixel:1}},{key:"getTileWidth",value:function(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}},{key:"getTileHeight",value:function(){return this.isTiled?this.fileDirectory.TileLength:void 0!==this.fileDirectory.RowsPerStrip?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}},{key:"getBlockWidth",value:function(){return this.getTileWidth()}},{key:"getBlockHeight",value:function(t){return this.isTiled||(t+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-t*this.getTileHeight()}},{key:"getBytesPerPixel",value:function(){for(var t=0,n=0;n<this.fileDirectory.BitsPerSample.length;++n)t+=this.getSampleByteSize(n);return t}},{key:"getSampleByteSize",value:function(t){if(t>=this.fileDirectory.BitsPerSample.length)throw new RangeError("Sample index ".concat(t," is out of range."));return Math.ceil(this.fileDirectory.BitsPerSample[t]/8)}},{key:"getReaderForSample",value:function(t){var n=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,e=this.fileDirectory.BitsPerSample[t];switch(n){case 1:if(e<=8)return DataView.prototype.getUint8;if(e<=16)return DataView.prototype.getUint16;if(e<=32)return DataView.prototype.getUint32;break;case 2:if(e<=8)return DataView.prototype.getInt8;if(e<=16)return DataView.prototype.getInt16;if(e<=32)return DataView.prototype.getInt32;break;case 3:switch(e){case 16:return function(t,n){return ip(this,t,n)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}},{key:"getSampleFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1}},{key:"getBitsPerSample",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.fileDirectory.BitsPerSample[t]}},{key:"getArrayForSample",value:function(t,n){return Np(this.getSampleFormat(t),this.getBitsPerSample(t),n)}},{key:"getTileOrStrip",value:(a=Ip(regeneratorRuntime.mark((function t(n,e,r,i,o){var s,a,u,c,f,h,l,v,d=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=Math.ceil(this.getWidth()/this.getTileWidth()),a=Math.ceil(this.getHeight()/this.getTileHeight()),c=this.tiles,1===this.planarConfiguration?u=e*s+n:2===this.planarConfiguration&&(u=r*s*a+e*s+n),this.isTiled?(f=this.fileDirectory.TileOffsets[u],h=this.fileDirectory.TileByteCounts[u]):(f=this.fileDirectory.StripOffsets[u],h=this.fileDirectory.StripByteCounts[u]),t.next=7,this.source.fetch([{offset:f,length:h}],o);case 7:return l=t.sent[0],null!==c&&c[u]?v=c[u]:(v=Ip(regeneratorRuntime.mark((function t(){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.decode(d.fileDirectory,l);case 2:return n=t.sent,r=d.getSampleFormat(),o=d.getBitsPerSample(),zp(r,o)&&(n=Lp(n,r,d.planarConfiguration,d.getSamplesPerPixel(),o,d.getTileWidth(),d.getBlockHeight(e))),t.abrupt("return",n);case 7:case"end":return t.stop()}}),t)})))(),null!==c&&(c[u]=v)),t.t0=n,t.t1=e,t.t2=r,t.next=14,v;case 14:return t.t3=t.sent,t.abrupt("return",{x:t.t0,y:t.t1,sample:t.t2,data:t.t3});case 16:case"end":return t.stop()}}),t,this)}))),function(t,n,e,r,i){return a.apply(this,arguments)})},{key:"_readRaster",value:(s=Ip(regeneratorRuntime.mark((function t(n,e,r,i,o,s,a,u,c){var f,h,l,v,d,p,y,m,b,w,g,x,k,_,S,M,j,O,T,E,A=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(f=this.getTileWidth(),h=this.getTileHeight(),l=this.getWidth(),v=this.getHeight(),d=Math.max(Math.floor(n[0]/f),0),p=Math.min(Math.ceil(n[2]/f),Math.ceil(l/f)),y=Math.max(Math.floor(n[1]/h),0),m=Math.min(Math.ceil(n[3]/h),Math.ceil(v/h)),b=n[2]-n[0],w=this.getBytesPerPixel(),g=[],x=[],k=0;k<e.length;++k)1===this.planarConfiguration?g.push(Dp(this.fileDirectory.BitsPerSample,0,e[k])/8):g.push(0),x.push(this.getReaderForSample(e[k]));for(_=[],S=this.littleEndian,M=y;M<m;++M)for(j=d;j<p;++j)for(O=function(t){var s=t,a=e[t];2===A.planarConfiguration&&(w=A.getSampleByteSize(t));var u=A.getTileOrStrip(j,M,a,o,c);_.push(u),u.then((function(t){for(var o=t.data,a=new DataView(o),u=A.getBlockHeight(t.y),c=t.y*h,d=t.x*f,p=c+u,y=(t.x+1)*f,m=x[s],k=Math.min(u,u-(p-n[3]),v-c),_=Math.min(f,f-(y-n[2]),l-d),M=Math.max(0,n[1]-c);M<k;++M)for(var j=Math.max(0,n[0]-d);j<_;++j){var O=(M*f+j)*w,T=m.call(a,O+g[s],S),E=void 0;i?(E=(M+c-n[1])*b*e.length+(j+d-n[0])*e.length+s,r[E]=T):(E=(M+c-n[1])*b+j+d-n[0],r[s][E]=T)}}))},T=0;T<e.length;++T)O(T);return t.next=18,Promise.all(_);case 18:if(!(s&&n[2]-n[0]!==s||a&&n[3]-n[1]!==a)){t.next=23;break}return(E=i?Ep(r,n[2]-n[0],n[3]-n[1],s,a,e.length,u):jp(r,n[2]-n[0],n[3]-n[1],s,a,u)).width=s,E.height=a,t.abrupt("return",E);case 23:return r.width=s||n[2]-n[0],r.height=a||n[3]-n[1],t.abrupt("return",r);case 26:case"end":return t.stop()}}),t,this)}))),function(t,n,e,r,i,o,a,u,c){return s.apply(this,arguments)})},{key:"readRasters",value:(o=Ip(regeneratorRuntime.mark((function t(){var n,e,r,i,o,s,a,u,c,f,h,l,v,d,p,y,m,b,w,g,x,k,_,S,M,j,O=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=O.length>0&&void 0!==O[0]?O[0]:{},e=n.window,r=n.samples,i=void 0===r?[]:r,o=n.interleave,s=n.pool,a=void 0===s?null:s,u=n.width,c=n.height,f=n.resampleMethod,h=n.fillValue,l=n.signal,!((v=e||[0,0,this.getWidth(),this.getHeight()])[0]>v[2]||v[1]>v[3])){t.next=4;break}throw new Error("Invalid subsets");case 4:if(d=v[2]-v[0],p=v[3]-v[1],y=d*p,m=this.getSamplesPerPixel(),i&&i.length){t.next=12;break}for(b=0;b<m;++b)i.push(b);t.next=19;break;case 12:w=0;case 13:if(!(w<i.length)){t.next=19;break}if(!(i[w]>=m)){t.next=16;break}return t.abrupt("return",Promise.reject(new RangeError("Invalid sample index '".concat(i[w],"'."))));case 16:++w,t.next=13;break;case 19:if(o)x=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,k=Math.max.apply(null,this.fileDirectory.BitsPerSample),g=Np(x,k,y*i.length),h&&g.fill(h);else for(g=[],_=0;_<i.length;++_)S=this.getArrayForSample(i[_],y),Array.isArray(h)&&_<h.length?S.fill(h[_]):h&&!Array.isArray(h)&&S.fill(h),g.push(S);if(t.t0=a,t.t0){t.next=25;break}return t.next=24,gp(this.fileDirectory);case 24:t.t0=t.sent;case 25:return M=t.t0,t.next=28,this._readRaster(v,i,g,o,M,u,c,f,l);case 28:return j=t.sent,t.abrupt("return",j);case 30:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"readRGB",value:(i=Ip(regeneratorRuntime.mark((function t(){var n,e,r,i,o,s,a,u,c,f,h,l,v,d,p,y,m,b,w,g,x,k,_,S,M,j,O,T=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=T.length>0&&void 0!==T[0]?T[0]:{},e=n.window,r=n.interleave,i=void 0===r||r,o=n.pool,s=void 0===o?null:o,a=n.width,u=n.height,c=n.resampleMethod,f=n.enableAlpha,h=void 0!==f&&f,l=n.signal,!((v=e||[0,0,this.getWidth(),this.getHeight()])[0]>v[2]||v[1]>v[3])){t.next=4;break}throw new Error("Invalid subsets");case 4:if((d=this.fileDirectory.PhotometricInterpretation)!==cp.Ie.RGB){t.next=9;break}if(p=[0,1,2],this.fileDirectory.ExtraSamples!==cp.pd.Unspecified&&h)for(p=[],y=0;y<this.fileDirectory.BitsPerSample.length;y+=1)p.push(y);return t.abrupt("return",this.readRasters({window:e,interleave:i,samples:p,pool:s,width:a,height:u,resampleMethod:c,signal:l}));case 9:t.t0=d,t.next=t.t0===cp.Ie.WhiteIsZero||t.t0===cp.Ie.BlackIsZero||t.t0===cp.Ie.Palette?12:t.t0===cp.Ie.CMYK?14:t.t0===cp.Ie.YCbCr||t.t0===cp.Ie.CIELab?16:18;break;case 12:return m=[0],t.abrupt("break",19);case 14:return m=[0,1,2,3],t.abrupt("break",19);case 16:return m=[0,1,2],t.abrupt("break",19);case 18:throw new Error("Invalid or unsupported photometric interpretation.");case 19:return b={window:v,interleave:!0,samples:m,pool:s,width:a,height:u,resampleMethod:c,signal:l},w=this.fileDirectory,t.next=23,this.readRasters(b);case 23:g=t.sent,x=Math.pow(2,this.fileDirectory.BitsPerSample[0]),t.t1=d,t.next=t.t1===cp.Ie.WhiteIsZero?28:t.t1===cp.Ie.BlackIsZero?30:t.t1===cp.Ie.Palette?32:t.t1===cp.Ie.CMYK?34:t.t1===cp.Ie.YCbCr?36:t.t1===cp.Ie.CIELab?38:40;break;case 28:return k=fp(g,x),t.abrupt("break",41);case 30:return k=hp(g,x),t.abrupt("break",41);case 32:return k=lp(g,w.ColorMap),t.abrupt("break",41);case 34:return k=vp(g),t.abrupt("break",41);case 36:return k=dp(g),t.abrupt("break",41);case 38:return k=pp(g),t.abrupt("break",41);case 40:throw new Error("Unsupported photometric interpretation.");case 41:if(!i){for(_=new Uint8Array(k.length/3),S=new Uint8Array(k.length/3),M=new Uint8Array(k.length/3),j=0,O=0;j<k.length;j+=3,++O)_[O]=k[j],S[O]=k[j+1],M[O]=k[j+2];k=[_,S,M]}return k.width=g.width,k.height=g.height,t.abrupt("return",k);case 45:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"getTiePoints",value:function(){if(!this.fileDirectory.ModelTiepoint)return[];for(var t=[],n=0;n<this.fileDirectory.ModelTiepoint.length;n+=6)t.push({i:this.fileDirectory.ModelTiepoint[n],j:this.fileDirectory.ModelTiepoint[n+1],k:this.fileDirectory.ModelTiepoint[n+2],x:this.fileDirectory.ModelTiepoint[n+3],y:this.fileDirectory.ModelTiepoint[n+4],z:this.fileDirectory.ModelTiepoint[n+5]});return t}},{key:"getGDALMetadata",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n={};if(!this.fileDirectory.GDAL_METADATA)return null;var e=this.fileDirectory.GDAL_METADATA,r=up()(e,"Item");null!==t&&(r=r.filter((function(n){return Number(sp()(n,"sample"))===t})));for(var i=0;i<r.length;++i){var o=r[i];n[sp()(o,"name")]=o.inner}return n}},{key:"getGDALNoData",value:function(){if(!this.fileDirectory.GDAL_NODATA)return null;var t=this.fileDirectory.GDAL_NODATA;return Number(t.substring(0,t.length-1))}},{key:"getOrigin",value:function(){var t=this.fileDirectory.ModelTiepoint,n=this.fileDirectory.ModelTransformation;if(t&&6===t.length)return[t[3],t[4],t[5]];if(n)return[n[3],n[7],n[11]];throw new Error("The image does not have an affine transformation.")}},{key:"getResolution",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.fileDirectory.ModelPixelScale,e=this.fileDirectory.ModelTransformation;if(n)return[n[0],-n[1],n[2]];if(e)return[e[0],e[5],e[10]];if(t){var r=t.getResolution(),i=Ap(r,3),o=i[0],s=i[1],a=i[2];return[o*t.getWidth()/this.getWidth(),s*t.getHeight()/this.getHeight(),a*t.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}},{key:"pixelIsArea",value:function(){return 1===this.geoKeys.GTRasterTypeGeoKey}},{key:"getBoundingBox",value:function(){var t=this.getOrigin(),n=this.getResolution(),e=t[0],r=t[1],i=e+n[0]*this.getWidth(),o=r+n[1]*this.getHeight();return[Math.min(e,i),Math.min(r,o),Math.max(e,i),Math.max(r,o)]}}])&&Pp(n.prototype,e),r&&Pp(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();function Gp(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Up=function(){function t(n){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this._dataView=new DataView(n)}var n,e,r;return n=t,(e=[{key:"buffer",get:function(){return this._dataView.buffer}},{key:"getUint64",value:function(t,n){var e,r=this.getUint32(t,n),i=this.getUint32(t+4,n);if(n){if(e=r+Math.pow(2,32)*i,!Number.isSafeInteger(e))throw new Error("".concat(e," exceeds MAX_SAFE_INTEGER. ")+"Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return e}if(e=Math.pow(2,32)*r+i,!Number.isSafeInteger(e))throw new Error("".concat(e," exceeds MAX_SAFE_INTEGER. ")+"Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return e}},{key:"getInt64",value:function(t,n){for(var e=0,r=(128&this._dataView.getUint8(t+(n?7:0)))>0,i=!0,o=0;o<8;o++){var s=this._dataView.getUint8(t+(n?o:7-o));r&&(i?0!==s&&(s=255&~(s-1),i=!1):s=255&~s),e+=s*Math.pow(256,o)}return r&&(e=-e),e}},{key:"getUint8",value:function(t,n){return this._dataView.getUint8(t,n)}},{key:"getInt8",value:function(t,n){return this._dataView.getInt8(t,n)}},{key:"getUint16",value:function(t,n){return this._dataView.getUint16(t,n)}},{key:"getInt16",value:function(t,n){return this._dataView.getInt16(t,n)}},{key:"getUint32",value:function(t,n){return this._dataView.getUint32(t,n)}},{key:"getInt32",value:function(t,n){return this._dataView.getInt32(t,n)}},{key:"getFloat16",value:function(t,n){return ip(this._dataView,t,n)}},{key:"getFloat32",value:function(t,n){return this._dataView.getFloat32(t,n)}},{key:"getFloat64",value:function(t,n){return this._dataView.getFloat64(t,n)}}])&&Gp(n.prototype,e),r&&Gp(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();function Bp(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var qp=function(){function t(n,e,r,i){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this._dataView=new DataView(n),this._sliceOffset=e,this._littleEndian=r,this._bigTiff=i}var n,e,r;return n=t,(e=[{key:"sliceOffset",get:function(){return this._sliceOffset}},{key:"sliceTop",get:function(){return this._sliceOffset+this.buffer.byteLength}},{key:"littleEndian",get:function(){return this._littleEndian}},{key:"bigTiff",get:function(){return this._bigTiff}},{key:"buffer",get:function(){return this._dataView.buffer}},{key:"covers",value:function(t,n){return this.sliceOffset<=t&&this.sliceTop>=t+n}},{key:"readUint8",value:function(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}},{key:"readInt8",value:function(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}},{key:"readUint16",value:function(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}},{key:"readInt16",value:function(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}},{key:"readUint32",value:function(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}},{key:"readInt32",value:function(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}},{key:"readFloat32",value:function(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}},{key:"readFloat64",value:function(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}},{key:"readUint64",value:function(t){var n,e=this.readUint32(t),r=this.readUint32(t+4);if(this._littleEndian){if(n=e+Math.pow(2,32)*r,!Number.isSafeInteger(n))throw new Error("".concat(n," exceeds MAX_SAFE_INTEGER. ")+"Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return n}if(n=Math.pow(2,32)*e+r,!Number.isSafeInteger(n))throw new Error("".concat(n," exceeds MAX_SAFE_INTEGER. ")+"Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return n}},{key:"readInt64",value:function(t){for(var n=0,e=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0,r=!0,i=0;i<8;i++){var o=this._dataView.getUint8(t+(this._littleEndian?i:7-i));e&&(r?0!==o&&(o=255&~(o-1),r=!1):o=255&~o),n+=o*Math.pow(256,i)}return e&&(n=-n),n}},{key:"readOffset",value:function(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}])&&Bp(n.prototype,e),r&&Bp(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();function $p(t){return Wp(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Hp(t)||Zp()}function Vp(t,n){return Wp(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw i}}return o}(t,n)||Hp(t,n)||Zp()}function Zp(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Wp(t){if(Array.isArray(t))return t}function Hp(t,n){if(t){if("string"==typeof t)return Kp(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Kp(t,n):void 0}}function Kp(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var Xp="\r\n\r\n";function Yp(t){if(void 0!==Object.fromEntries)return Object.fromEntries(t);var n,e={},r=function(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Hp(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}(t);try{for(r.s();!(n=r.n()).done;){var i=Vp(n.value,2),o=i[0],s=i[1];e[o.toLowerCase()]=s}}catch(t){r.e(t)}finally{r.f()}return e}function Jp(t){return Yp(t.split("\r\n").map((function(t){var n=t.split(":").map((function(t){return t.trim()}));return n[0]=n[0].toLowerCase(),n})))}function Qp(t){var n,e,r;if(t){var i=Vp(t.match(/bytes (\d+)-(\d+)\/(\d+)/),4);n=i[1],e=i[2],r=i[3],n=parseInt(n,10),e=parseInt(e,10),r=parseInt(r,10)}return{start:n,end:e,total:r}}function ty(t,n){for(var e=null,r=new TextDecoder("ascii"),i=[],o="--".concat(n),s="".concat(o,"--"),a=0;a<10;++a){r.decode(new Uint8Array(t,a,o.length))===o&&(e=a)}if(null===e)throw new Error("Could not find initial boundary");for(;e<t.byteLength;){var u=r.decode(new Uint8Array(t,e,Math.min(o.length+1024,t.byteLength-e)));if(0===u.length||u.startsWith(s))break;if(!u.startsWith(o))throw new Error("Part does not start with boundary");var c=u.substr(o.length+2);if(0===c.length)break;var f=c.indexOf(Xp),h=Jp(c.substr(0,f)),l=Qp(h["content-range"]),v=l.start,d=l.end,p=l.total,y=e+o.length+f+Xp.length,m=parseInt(d,10)+1-parseInt(v,10);i.push({headers:h,data:t.slice(y,y+m),offset:v,length:m,fileSize:p}),e=y+m+4}return i}function ny(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function ey(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){ny(o,r,i,s,a,"next",t)}function a(t){ny(o,r,i,s,a,"throw",t)}s(void 0)}))}}function ry(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var iy=function(){function t(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t)}var n,e,r,i,o,s;return n=t,(e=[{key:"fetch",value:(s=ey(regeneratorRuntime.mark((function t(n){var e,r=this,i=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>1&&void 0!==i[1]?i[1]:void 0,t.abrupt("return",Promise.all(n.map((function(t){return r.fetchSlice(t,e)}))));case 2:case"end":return t.stop()}}),t)}))),function(t){return s.apply(this,arguments)})},{key:"fetchSlice",value:(o=ey(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("fetching of slice ".concat(n," not possible, not implemented"));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"fileSize",get:function(){return null}},{key:"close",value:(i=ey(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})}])&&ry(n.prototype,e),r&&ry(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(),oy=e(6875),sy=e.n(oy);function ay(t){return(ay="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function uy(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cy(t,n,e){return n&&uy(t.prototype,n),e&&uy(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function fy(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function hy(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&by(t,n)}function ly(t){var n=my();return function(){var e,r=wy(t);if(n){var i=wy(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return vy(this,e)}}function vy(t,n){if(n&&("object"===ay(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return dy(t)}function dy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function py(t){var n="function"==typeof Map?new Map:void 0;return(py=function(t){if(null===t||(e=t,-1===Function.toString.call(e).indexOf("[native code]")))return t;var e;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return yy(t,arguments,wy(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),by(r,t)})(t)}function yy(t,n,e){return(yy=my()?Reflect.construct:function(t,n,e){var r=[null];r.push.apply(r,n);var i=new(Function.bind.apply(t,r));return e&&by(i,e.prototype),i}).apply(null,arguments)}function my(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function by(t,n){return(by=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function wy(t){return(wy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function gy(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function xy(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){gy(o,r,i,s,a,"next",t)}function a(t){gy(o,r,i,s,a,"throw",t)}s(void 0)}))}}function ky(t){return _y.apply(this,arguments)}function _y(){return(_y=xy(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,n)})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Sy(t,n){var e=Array.isArray(t)?t:Array.from(t),r=Array.isArray(n)?n:Array.from(n);return e.map((function(t,n){return[t,r[n]]}))}var My=function(t){hy(e,t);var n=ly(e);function e(t){var r;return fy(this,e),r=n.call(this,t),Error.captureStackTrace&&Error.captureStackTrace(dy(r),e),r.name="AbortError",r}return cy(e)}(py(Error)),jy=function(t){hy(e,t);var n=ly(e);function e(t,r){var i;return fy(this,e),(i=n.call(this,r)).errors=t,i.message=r,i.name="AggregateError",i}return cy(e)}(py(Error));function Oy(t){return(Oy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ty(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw i}}return o}(t,n)||Ay(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ey(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Ay(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function Ay(t,n){if(t){if("string"==typeof t)return Cy(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Cy(t,n):void 0}}function Cy(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function Ry(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function Iy(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){Ry(o,r,i,s,a,"next",t)}function a(t){Ry(o,r,i,s,a,"throw",t)}s(void 0)}))}}function Py(t,n){return(Py=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Dy(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=zy(t);if(n){var i=zy(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return Ny(this,e)}}function Ny(t,n){if(n&&("object"===Oy(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zy(t){return(zy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ly(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Fy(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gy(t,n,e){return n&&Fy(t.prototype,n),e&&Fy(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var Uy=function(){function t(n,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Ly(this,t),this.offset=n,this.length=e,this.data=r}return Gy(t,[{key:"top",get:function(){return this.offset+this.length}}]),t}(),By=Gy((function t(n,e,r){Ly(this,t),this.offset=n,this.length=e,this.blockIds=r})),qy=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Py(t,n)}(r,t);var n,e=Dy(r);function r(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.blockSize,s=void 0===o?65536:o,a=i.cacheSize,u=void 0===a?100:a;return Ly(this,r),(n=e.call(this)).source=t,n.blockSize=s,n.blockCache=new(sy())({max:u}),n.blockRequests=new Map,n.blockIdsToFetch=new Set,n}return Gy(r,[{key:"fileSize",get:function(){return this.source.fileSize}},{key:"fetch",value:(n=Iy(regeneratorRuntime.mark((function t(n,e){var r,i,o,s,a,u,c,f,h,l,v,d,p,y,m,b,w,g,x,k,_,S,M,j,O,T,E,A,C,R,I,P,D,N,z,L,F,G;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=new Map,i=new Map,o=new Set,s=Ey(n);try{for(s.s();!(a=s.n()).done;)for(u=a.value,c=u.offset,f=u.length,h=c+f,null!==(l=this.fileSize)&&(h=Math.min(h,l)),v=Math.floor(c/this.blockSize)*this.blockSize,d=v;d<h;d+=this.blockSize)p=Math.floor(d/this.blockSize),this.blockCache.has(p)?r.set(p,this.blockCache.get(p)):this.blockRequests.has(p)?i.set(p,this.blockRequests.get(p)):(this.blockIdsToFetch.has(p)||this.blockIdsToFetch.add(p),o.add(p))}catch(t){s.e(t)}finally{s.f()}return t.next=7,ky();case 7:this.fetchBlocks(e),y=Ey(o),t.prev=9,y.s();case 11:if((m=y.n()).done){t.next=26;break}if(b=m.value,w=this.blockRequests.get(b),g=this.blockCache.get(b),!w){t.next=19;break}i.set(b,w),t.next=24;break;case 19:if(!g){t.next=23;break}r.set(b,g),t.next=24;break;case 23:throw new Error("Block ".concat(b," is not in the block requests"));case 24:t.next=11;break;case 26:t.next=31;break;case 28:t.prev=28,t.t0=t.catch(9),y.e(t.t0);case 31:return t.prev=31,y.f(),t.finish(31);case 34:return t.next=36,Promise.allSettled(Array.from(i.values()));case 36:if(!(x=t.sent).some((function(t){return"rejected"===t.status}))){t.next=65;break}k=new Set,_=Ey(Sy(i.keys(),x));try{for(_.s();!(S=_.n()).done;)M=Ty(S.value,2),j=M[0],O=M[1],T=O.rejected,E=O.reason,T&&"AbortError"===E.name&&E.signal!==e&&(this.blockIdsToFetch.add(j),k.add(j))}catch(t){_.e(t)}finally{_.f()}if(!(this.blockIdsToFetch.length>0)){t.next=65;break}this.fetchBlocks(e),A=Ey(k),t.prev=44,A.s();case 46:if((C=A.n()).done){t.next=54;break}if(R=C.value,I=this.blockRequests.get(R)){t.next=51;break}throw new Error("Block ".concat(R," is not in the block requests"));case 51:i.set(R,I);case 52:t.next=46;break;case 54:t.next=59;break;case 56:t.prev=56,t.t1=t.catch(44),A.e(t.t1);case 59:return t.prev=59,A.f(),t.finish(59);case 62:return t.next=64,Promise.allSettled(Array.from(i.values()));case 64:x=t.sent;case 65:if(!x.some((function(t){return"rejected"===t.status}))){t.next=69;break}if(!e||!e.aborted){t.next=68;break}throw new My("Request was aborted");case 68:throw new jy(x.filter((function(t){return"rejected"===t.status})).map((function(t){return t.reason})),"Request failed");case 69:P=x.map((function(t){return t.value})),D=new Map(Sy(Array.from(i.keys()),P)),N=Ey(r);try{for(N.s();!(z=N.n()).done;)L=Ty(z.value,2),F=L[0],G=L[1],D.set(F,G)}catch(t){N.e(t)}finally{N.f()}return t.abrupt("return",this.readSliceData(n,D));case 74:case"end":return t.stop()}}),t,this,[[9,28,31,34],[44,56,59,62]])}))),function(t,e){return n.apply(this,arguments)})},{key:"fetchBlocks",value:function(t){var n=this;this.blockIdsToFetch.size>0&&function(){for(var e=n.groupBlocks(n.blockIdsToFetch),r=n.source.fetch(e,t),i=function(i){var o,s=Ey(e[i].blockIds);try{var a=function(){var e=o.value,s=Iy(regeneratorRuntime.mark((function o(){var s,a,u,c,f,h;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,r;case 3:return o.t0=i,s=o.sent[o.t0],a=e*n.blockSize,u=a-s.offset,c=Math.min(u+n.blockSize,s.data.byteLength),f=s.data.slice(u,c),h=new Uy(a,f.byteLength,f),n.blockCache.set(e,h),o.abrupt("return",h);case 14:throw o.prev=14,o.t1=o.catch(0),"AbortError"===o.t1.name&&(o.t1.signal=t),o.t1;case 18:return o.prev=18,n.blockRequests.delete(e),o.finish(18);case 21:case"end":return o.stop()}}),o,null,[[0,14,18,21]])})))();n.blockRequests.set(e,s)};for(s.s();!(o=s.n()).done;)a()}catch(t){s.e(t)}finally{s.f()}},o=0;o<e.length;++o)i(o);n.blockIdsToFetch.clear()}()}},{key:"groupBlocks",value:function(t){var n=Array.from(t).sort((function(t,n){return t-n}));if(0===n.length)return[];var e,r=[],i=null,o=[],s=Ey(n);try{for(s.s();!(e=s.n()).done;){var a=e.value;null===i||i+1===a?(r.push(a),i=a):(o.push(new By(r[0]*this.blockSize,r.length*this.blockSize,r)),r=[a],i=a)}}catch(t){s.e(t)}finally{s.f()}return o.push(new By(r[0]*this.blockSize,r.length*this.blockSize,r)),o}},{key:"readSliceData",value:function(t,n){var e=this;return t.map((function(t){for(var r=t.offset+t.length,i=Math.floor(t.offset/e.blockSize),o=Math.floor((t.offset+t.length)/e.blockSize),s=new ArrayBuffer(t.length),a=new Uint8Array(s),u=i;u<=o;++u){var c=n.get(u),f=c.offset-t.offset,h=0,l=0,v=void 0;f<0?h=-f:f>0&&(l=f),v=c.top-r<0?c.length-h:r-c.offset-h;var d=new Uint8Array(c.data,h,v);a.set(d,l)}return s}))}}]),r}(iy);function $y(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function Vy(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){$y(o,r,i,s,a,"next",t)}function a(t){$y(o,r,i,s,a,"throw",t)}s(void 0)}))}}function Zy(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Wy(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Hy(t,n,e){return n&&Wy(t.prototype,n),e&&Wy(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var Ky=function(){function t(){Zy(this,t)}var n;return Hy(t,[{key:"ok",get:function(){return this.status>=200&&this.status<=299}},{key:"status",get:function(){throw new Error("not implemented")}},{key:"getHeader",value:function(t){throw new Error("not implemented")}},{key:"getData",value:(n=Vy(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("not implemented");case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}]),t}(),Xy=function(){function t(n){Zy(this,t),this.url=n}var n;return Hy(t,[{key:"request",value:(n=Vy(regeneratorRuntime.mark((function t(){var n,e=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw(n=e.length>0&&void 0!==e[0]?e[0]:{}).headers,n.credentials,n.signal,new Error("request is not implemented");case 2:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}]),t}();function Yy(t){return(Yy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jy(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function Qy(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){Jy(o,r,i,s,a,"next",t)}function a(t){Jy(o,r,i,s,a,"throw",t)}s(void 0)}))}}function tm(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function nm(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function em(t,n,e){return n&&nm(t.prototype,n),e&&nm(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function rm(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&im(t,n)}function im(t,n){return(im=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function om(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=am(t);if(n){var i=am(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return sm(this,e)}}function sm(t,n){if(n&&("object"===Yy(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function am(t){return(am=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var um=function(t){rm(r,t);var n,e=om(r);function r(t){var n;return tm(this,r),(n=e.call(this)).response=t,n}return em(r,[{key:"status",get:function(){return this.response.status}},{key:"getHeader",value:function(t){return this.response.headers.get(t)}},{key:"getData",value:(n=Qy(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.response.arrayBuffer){t.next=6;break}return t.next=3,this.response.arrayBuffer();case 3:t.t0=t.sent,t.next=9;break;case 6:return t.next=8,this.response.buffer();case 8:t.t0=t.sent.buffer;case 9:return n=t.t0,t.abrupt("return",n);case 11:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Ky),cm=function(t){rm(r,t);var n,e=om(r);function r(t,n){var i;return tm(this,r),(i=e.call(this,t)).credentials=n,i}return em(r,[{key:"request",value:(n=Qy(regeneratorRuntime.mark((function t(){var n,e,r,i,o,s=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.length>0&&void 0!==s[0]?s[0]:{},e=n.headers,r=n.credentials,i=n.signal,t.next=3,fetch(this.url,{headers:e,credentials:r,signal:i});case 3:return o=t.sent,t.abrupt("return",new um(o));case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Xy);function fm(t){return(fm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hm(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw i}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return lm(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return lm(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lm(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function vm(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function dm(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){vm(o,r,i,s,a,"next",t)}function a(t){vm(o,r,i,s,a,"throw",t)}s(void 0)}))}}function pm(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function ym(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function mm(t,n,e){return n&&ym(t.prototype,n),e&&ym(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function bm(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&wm(t,n)}function wm(t,n){return(wm=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function gm(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=km(t);if(n){var i=km(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return xm(this,e)}}function xm(t,n){if(n&&("object"===fm(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function km(t){return(km=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _m=function(t){bm(r,t);var n,e=gm(r);function r(t,n){var i;return pm(this,r),(i=e.call(this)).xhr=t,i.data=n,i}return mm(r,[{key:"status",get:function(){return this.xhr.status}},{key:"getHeader",value:function(t){return this.xhr.getResponseHeader(t)}},{key:"getData",value:(n=dm(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.data);case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Ky),Sm=function(t){bm(r,t);var n,e=gm(r);function r(){return pm(this,r),e.apply(this,arguments)}return mm(r,[{key:"constructRequest",value:function(t,n){var e=this;return new Promise((function(r,i){var o=new XMLHttpRequest;o.open("GET",e.url),o.responseType="arraybuffer";for(var s=0,a=Object.entries(t);s<a.length;s++){var u=hm(a[s],2),c=u[0],f=u[1];o.setRequestHeader(c,f)}o.onload=function(){var t=o.response;r(new _m(o,t))},o.onerror=i,o.onabort=function(){return i(new My("Request aborted"))},o.send(),n&&(n.aborted&&o.abort(),n.addEventListener("abort",(function(){return o.abort()})))}))}},{key:"request",value:(n=dm(regeneratorRuntime.mark((function t(){var n,e,r,i,o=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>0&&void 0!==o[0]?o[0]:{},e=n.headers,r=n.signal,t.next=3,this.constructRequest(e,r);case 3:return i=t.sent,t.abrupt("return",i);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Xy),Mm=e(1555),jm=e.n(Mm),Om=e(2913),Tm=e.n(Om),Em=e(8419),Am=e.n(Em);function Cm(t){return(Cm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rm(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function Im(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?Rm(Object(e),!0).forEach((function(n){Pm(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Rm(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function Pm(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function Dm(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function Nm(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){Dm(o,r,i,s,a,"next",t)}function a(t){Dm(o,r,i,s,a,"throw",t)}s(void 0)}))}}function zm(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Lm(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fm(t,n,e){return n&&Lm(t.prototype,n),e&&Lm(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gm(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Um(t,n)}function Um(t,n){return(Um=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Bm(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=$m(t);if(n){var i=$m(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return qm(this,e)}}function qm(t,n){if(n&&("object"===Cm(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function $m(t){return($m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Vm=function(t){Gm(r,t);var n,e=Bm(r);function r(t,n){var i;return zm(this,r),(i=e.call(this)).response=t,i.dataPromise=n,i}return Fm(r,[{key:"status",get:function(){return this.response.statusCode}},{key:"getHeader",value:function(t){return this.response.headers[t]}},{key:"getData",value:(n=Nm(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.dataPromise;case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Ky),Zm=function(t){Gm(r,t);var n,e=Bm(r);function r(t){var n;return zm(this,r),(n=e.call(this,t)).parsedUrl=Am().parse(n.url),n.httpApi="http:"===n.parsedUrl.protocol?jm():Tm(),n}return Fm(r,[{key:"constructRequest",value:function(t,n){var e=this;return new Promise((function(r,i){var o=e.httpApi.get(Im(Im({},e.parsedUrl),{},{headers:t}),(function(t){var n=new Promise((function(n){var e=[];t.on("data",(function(t){e.push(t)})),t.on("end",(function(){var t=Buffer.concat(e).buffer;n(t)})),t.on("error",i)}));r(new Vm(t,n))}));o.on("error",i),n&&(n.aborted&&o.destroy(new My("Request aborted")),n.addEventListener("abort",(function(){return o.destroy(new My("Request aborted"))})))}))}},{key:"request",value:(n=Nm(regeneratorRuntime.mark((function t(){var n,e,r,i,o=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>0&&void 0!==o[0]?o[0]:{},e=n.headers,r=n.signal,t.next=3,this.constructRequest(e,r);case 3:return i=t.sent,t.abrupt("return",i);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Xy);function Wm(t){return(Wm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Hm=["headers","credentials","maxRanges","allowFullFile"],Km=["headers","maxRanges","allowFullFile"],Xm=["headers","maxRanges","allowFullFile"],Ym=["forceXHR"];function Jm(t,n){if(null==t)return{};var e,r,i=function(t,n){if(null==t)return{};var e,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e=o[r],n.indexOf(e)>=0||(i[e]=t[e]);return i}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)e=o[r],n.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(i[e]=t[e])}return i}function Qm(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function tb(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?Qm(Object(e),!0).forEach((function(n){nb(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Qm(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function nb(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function eb(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function rb(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){eb(o,r,i,s,a,"next",t)}function a(t){eb(o,r,i,s,a,"throw",t)}s(void 0)}))}}function ib(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ob(t,n){return(ob=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function sb(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=ub(t);if(n){var i=ub(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return ab(this,e)}}function ab(t,n){if(n&&("object"===Wm(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ub(t){return(ub=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cb=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&ob(t,n)}(u,t);var n,e,r,i,o,s,a=sb(u);function u(t,n,e,r){var i;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,u),(i=a.call(this)).client=t,i.headers=n,i.maxRanges=e,i.allowFullFile=r,i._fileSize=null,i}return n=u,(e=[{key:"fetch",value:(s=rb(regeneratorRuntime.mark((function t(n,e){var r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this.maxRanges>=n.length)){t.next=4;break}return t.abrupt("return",this.fetchSlices(n,e));case 4:this.maxRanges>0&&n.length;case 5:return t.abrupt("return",Promise.all(n.map((function(t){return r.fetchSlice(t,e)}))));case 6:case"end":return t.stop()}}),t,this)}))),function(t,n){return s.apply(this,arguments)})},{key:"fetchSlices",value:(o=rb(regeneratorRuntime.mark((function t(n,e){var r,i,o,s,a,u,c,f,h,l,v,d,p=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.request({headers:tb(tb({},this.headers),{},{Range:"bytes=".concat(n.map((function(t){var n=t.offset,e=t.length;return"".concat(n,"-").concat(n+e)})).join(","))}),signal:e});case 2:if((r=t.sent).ok){t.next=7;break}throw new Error("Error fetching data.");case 7:if(206!==r.status){t.next=32;break}if(y=r.getHeader("content-type"),m=void 0,m=$p(y.split(";").map((function(t){return t.trim()}))),i={type:m[0],params:Yp(m.slice(1).map((function(t){return t.split("=")})))},o=i.params,"multipart/byteranges"!==i.type){t.next=18;break}return t.t0=ty,t.next=13,r.getData();case 13:return t.t1=t.sent,t.t2=o.boundary,s=(0,t.t0)(t.t1,t.t2),this._fileSize=s[0].fileSize||null,t.abrupt("return",s);case 18:return t.next=20,r.getData();case 20:if(a=t.sent,u=Qp(r.getHeader("content-range")),c=u.start,f=u.end,h=u.total,this._fileSize=h||null,l=[{data:a,offset:c,length:f-c}],!(n.length>1)){t.next=29;break}return t.next=27,Promise.all(n.slice(1).map((function(t){return p.fetchSlice(t,e)})));case 27:return v=t.sent,t.abrupt("return",l.concat(v));case 29:return t.abrupt("return",l);case 32:if(this.allowFullFile){t.next=34;break}throw new Error("Server responded with full file");case 34:return t.next=36,r.getData();case 36:return d=t.sent,this._fileSize=d.byteLength,t.abrupt("return",[{data:d,offset:0,length:d.byteLength}]);case 39:case"end":return t.stop()}var y,m}),t,this)}))),function(t,n){return o.apply(this,arguments)})},{key:"fetchSlice",value:(i=rb(regeneratorRuntime.mark((function t(n,e){var r,i,o,s,a,u,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.offset,i=n.length,t.next=3,this.client.request({headers:tb(tb({},this.headers),{},{Range:"bytes=".concat(r,"-").concat(r+i)}),signal:e});case 3:if((o=t.sent).ok){t.next=8;break}throw new Error("Error fetching data.");case 8:if(206!==o.status){t.next=17;break}return t.next=11,o.getData();case 11:return s=t.sent,a=Qp(o.getHeader("content-range")),u=a.total,this._fileSize=u||null,t.abrupt("return",{data:s,offset:r,length:i});case 17:if(this.allowFullFile){t.next=19;break}throw new Error("Server responded with full file");case 19:return t.next=21,o.getData();case 21:return c=t.sent,this._fileSize=c.byteLength,t.abrupt("return",{data:c,offset:0,length:c.byteLength});case 24:case"end":return t.stop()}}),t,this)}))),function(t,n){return i.apply(this,arguments)})},{key:"fileSize",get:function(){return this._fileSize}}])&&ib(n.prototype,e),r&&ib(n,r),Object.defineProperty(n,"prototype",{writable:!1}),u}(iy);function fb(t,n){var e=n.blockSize,r=n.cacheSize;return null===e?t:new qy(t,e,r)}function hb(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.headers,r=void 0===e?{}:e,i=n.credentials,o=n.maxRanges,s=void 0===o?0:o,a=n.allowFullFile,u=void 0!==a&&a,c=Jm(n,Hm),f=new cm(t,i),h=new cb(f,r,s,u);return fb(h,c)}function lb(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.headers,r=void 0===e?{}:e,i=n.maxRanges,o=void 0===i?0:i,s=n.allowFullFile,a=void 0!==s&&s,u=Jm(n,Km),c=new Sm(t),f=new cb(c,r,o,a);return fb(f,u)}function vb(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.headers,r=void 0===e?{}:e,i=n.maxRanges,o=void 0===i?0:i,s=n.allowFullFile,a=void 0!==s&&s,u=Jm(n,Xm),c=new Zm(t),f=new cb(c,r,o,a);return fb(f,u)}function db(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.forceXHR,r=void 0!==e&&e,i=Jm(n,Ym);return"function"!=typeof fetch||r?"undefined"!=typeof XMLHttpRequest?lb(t,i):vb(t,i):hb(t,i)}function pb(t){return(pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yb(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function mb(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?yb(Object(e),!0).forEach((function(n){bb(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):yb(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function bb(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function wb(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw i}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return gb(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return gb(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gb(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function xb(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function kb(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){xb(o,r,i,s,a,"next",t)}function a(t){xb(o,r,i,s,a,"throw",t)}s(void 0)}))}}function _b(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Eb(t,n)}function Sb(t){var n=Tb();return function(){var e,r=Ab(t);if(n){var i=Ab(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return Mb(this,e)}}function Mb(t,n){if(n&&("object"===pb(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jb(t){var n="function"==typeof Map?new Map:void 0;return(jb=function(t){if(null===t||(e=t,-1===Function.toString.call(e).indexOf("[native code]")))return t;var e;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return Ob(t,arguments,Ab(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Eb(r,t)})(t)}function Ob(t,n,e){return(Ob=Tb()?Reflect.construct:function(t,n,e){var r=[null];r.push.apply(r,n);var i=new(Function.bind.apply(t,r));return e&&Eb(i,e.prototype),i}).apply(null,arguments)}function Tb(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Eb(t,n){return(Eb=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Ab(t){return(Ab=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Cb(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Rb(t,n,e){return n&&Cb(t.prototype,n),e&&Cb(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ib(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Pb(t){switch(t){case cp.sf.BYTE:case cp.sf.ASCII:case cp.sf.SBYTE:case cp.sf.UNDEFINED:return 1;case cp.sf.SHORT:case cp.sf.SSHORT:return 2;case cp.sf.LONG:case cp.sf.SLONG:case cp.sf.FLOAT:case cp.sf.IFD:return 4;case cp.sf.RATIONAL:case cp.sf.SRATIONAL:case cp.sf.DOUBLE:case cp.sf.LONG8:case cp.sf.SLONG8:case cp.sf.IFD8:return 8;default:throw new RangeError("Invalid field type: ".concat(t))}}function Db(t){var n=t.GeoKeyDirectory;if(!n)return null;for(var e={},r=4;r<=4*n[3];r+=4){var i=cp.P1[n[r]],o=n[r+1]?cp.L[n[r+1]]:null,s=n[r+2],a=n[r+3],u=null;if(o){if(null==(u=t[o]))throw new Error("Could not get value of geoKey '".concat(i,"'."));"string"==typeof u?u=u.substring(a,a+s-1):u.subarray&&(u=u.subarray(a,a+s),1===s&&(u=u[0]))}else u=a;e[i]=u}return e}function Nb(t,n,e,r){var i=null,o=null,s=Pb(n);switch(n){case cp.sf.BYTE:case cp.sf.ASCII:case cp.sf.UNDEFINED:i=new Uint8Array(e),o=t.readUint8;break;case cp.sf.SBYTE:i=new Int8Array(e),o=t.readInt8;break;case cp.sf.SHORT:i=new Uint16Array(e),o=t.readUint16;break;case cp.sf.SSHORT:i=new Int16Array(e),o=t.readInt16;break;case cp.sf.LONG:case cp.sf.IFD:i=new Uint32Array(e),o=t.readUint32;break;case cp.sf.SLONG:i=new Int32Array(e),o=t.readInt32;break;case cp.sf.LONG8:case cp.sf.IFD8:i=new Array(e),o=t.readUint64;break;case cp.sf.SLONG8:i=new Array(e),o=t.readInt64;break;case cp.sf.RATIONAL:i=new Uint32Array(2*e),o=t.readUint32;break;case cp.sf.SRATIONAL:i=new Int32Array(2*e),o=t.readInt32;break;case cp.sf.FLOAT:i=new Float32Array(e),o=t.readFloat32;break;case cp.sf.DOUBLE:i=new Float64Array(e),o=t.readFloat64;break;default:throw new RangeError("Invalid field type: ".concat(n))}if(n!==cp.sf.RATIONAL&&n!==cp.sf.SRATIONAL)for(var a=0;a<e;++a)i[a]=o.call(t,r+a*s);else for(var u=0;u<e;u+=2)i[u]=o.call(t,r+u*s),i[u+1]=o.call(t,r+(u*s+4));return n===cp.sf.ASCII?new TextDecoder("utf-8").decode(i):i}var zb=Rb((function t(n,e,r){Ib(this,t),this.fileDirectory=n,this.geoKeyDirectory=e,this.nextIFDByteOffset=r})),Lb=function(t){_b(e,t);var n=Sb(e);function e(t){var r;return Ib(this,e),(r=n.call(this,"No image at index ".concat(t))).index=t,r}return Rb(e)}(jb(Error)),Fb=function(){function t(){Ib(this,t)}var n;return Rb(t,[{key:"readRasters",value:(n=kb(regeneratorRuntime.mark((function t(){var n,e,r,i,o,s,a,u,c,f,h,l,v,d,p,y,m,b,w,g,x,k,_,S,M,j,O,T,E,A,C,R,I,P,D,N,z,L,F,G=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=G.length>0&&void 0!==G[0]?G[0]:{},e=n.window,r=n.width,i=n.height,o=n.resX,s=n.resY,a=n.bbox,t.next=5,this.getImage();case 5:return u=t.sent,c=u,t.next=9,this.getImageCount();case 9:if(f=t.sent,h=u.getBoundingBox(),!e||!a){t.next=13;break}throw new Error('Both "bbox" and "window" passed.');case 13:if(!r&&!i){t.next=24;break}if(e&&(l=u.getOrigin(),v=wb(l,2),d=v[0],p=v[1],y=u.getResolution(),m=wb(y,2),b=m[0],w=m[1],a=[d+e[0]*b,p+e[1]*w,d+e[2]*b,p+e[3]*w]),g=a||h,!r){t.next=20;break}if(!o){t.next=19;break}throw new Error("Both width and resX passed");case 19:o=(g[2]-g[0])/r;case 20:if(!i){t.next=24;break}if(!s){t.next=23;break}throw new Error("Both width and resY passed");case 23:s=(g[3]-g[1])/i;case 24:if(!o&&!s){t.next=48;break}x=[],k=0;case 27:if(!(k<f)){t.next=36;break}return t.next=30,this.getImage(k);case 30:_=t.sent,S=_.fileDirectory,M=S.SubfileType,j=S.NewSubfileType,(0===k||2===M||1&j)&&x.push(_);case 33:++k,t.next=27;break;case 36:x.sort((function(t,n){return t.getWidth()-n.getWidth()})),O=0;case 38:if(!(O<x.length)){t.next=48;break}if(T=x[O],E=(h[2]-h[0])/T.getWidth(),A=(h[3]-h[1])/T.getHeight(),c=T,!(o&&o>E||s&&s>A)){t.next=45;break}return t.abrupt("break",48);case 45:++O,t.next=38;break;case 48:return C=e,a&&(R=u.getOrigin(),I=wb(R,2),P=I[0],D=I[1],N=c.getResolution(u),z=wb(N,2),L=z[0],F=z[1],C=[Math.round((a[0]-P)/L),Math.round((a[1]-D)/F),Math.round((a[2]-P)/L),Math.round((a[3]-D)/F)],C=[Math.min(C[0],C[2]),Math.min(C[1],C[3]),Math.max(C[0],C[2]),Math.max(C[1],C[3])]),t.abrupt("return",c.readRasters(mb(mb({},n),{},{window:C})));case 51:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),t}(),Gb=function(t){_b(c,t);var n,e,r,i,o,s,a,u=Sb(c);function c(t,n,e,r){var i,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return Ib(this,c),(i=u.call(this)).source=t,i.littleEndian=n,i.bigTiff=e,i.firstIFDOffset=r,i.cache=o.cache||!1,i.ifdRequests=[],i.ghostValues=null,i}return Rb(c,[{key:"getSlice",value:(a=kb(regeneratorRuntime.mark((function t(n,e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.bigTiff?4048:1024,t.t0=qp,t.next=4,this.source.fetch([{offset:n,length:void 0!==e?e:r}]);case 4:return t.t1=t.sent[0],t.t2=n,t.t3=this.littleEndian,t.t4=this.bigTiff,t.abrupt("return",new t.t0(t.t1,t.t2,t.t3,t.t4));case 9:case"end":return t.stop()}}),t,this)}))),function(t,n){return a.apply(this,arguments)})},{key:"parseFileDirectoryAt",value:(s=kb(regeneratorRuntime.mark((function t(n){var e,r,i,o,s,a,u,c,f,h,l,v,d,p,y,m,b,w,g,x;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.bigTiff?20:12,r=this.bigTiff?8:2,t.next=4,this.getSlice(n);case 4:if(i=t.sent,o=this.bigTiff?i.readUint64(n):i.readUint16(n),s=o*e+(this.bigTiff?16:6),i.covers(n,s)){t.next=11;break}return t.next=10,this.getSlice(n,s);case 10:i=t.sent;case 11:a={},u=n+(this.bigTiff?8:2),c=0;case 14:if(!(c<o)){t.next=41;break}if(f=i.readUint16(u),h=i.readUint16(u+2),l=this.bigTiff?i.readUint64(u+4):i.readUint32(u+4),v=void 0,d=void 0,p=Pb(h),y=u+(this.bigTiff?12:8),!(p*l<=(this.bigTiff?8:4))){t.next=26;break}v=Nb(i,h,l,y),t.next=36;break;case 26:if(m=i.readOffset(y),b=Pb(h)*l,!i.covers(m,b)){t.next=32;break}v=Nb(i,h,l,m),t.next=36;break;case 32:return t.next=34,this.getSlice(m,b);case 34:w=t.sent,v=Nb(w,h,l,m);case 36:d=1===l&&-1===cp.It.indexOf(f)&&h!==cp.sf.RATIONAL&&h!==cp.sf.SRATIONAL?v[0]:v,a[cp.L[f]]=d;case 38:u+=e,++c,t.next=14;break;case 41:return g=Db(a),x=i.readOffset(n+r+e*o),t.abrupt("return",new zb(a,g,x));case 44:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"requestIFD",value:(o=kb(regeneratorRuntime.mark((function t(n){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.ifdRequests[n]){t.next=4;break}return t.abrupt("return",this.ifdRequests[n]);case 4:if(0!==n){t.next=9;break}return this.ifdRequests[n]=this.parseFileDirectoryAt(this.firstIFDOffset),t.abrupt("return",this.ifdRequests[n]);case 9:if(this.ifdRequests[n-1]){t.next=19;break}t.prev=10,this.ifdRequests[n-1]=this.requestIFD(n-1),t.next=19;break;case 14:if(t.prev=14,t.t0=t.catch(10),!(t.t0 instanceof Lb)){t.next=18;break}throw new Lb(n);case 18:throw t.t0;case 19:return this.ifdRequests[n]=kb(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.ifdRequests[n-1];case 2:if(0!==(r=t.sent).nextIFDByteOffset){t.next=5;break}throw new Lb(n);case 5:return t.abrupt("return",e.parseFileDirectoryAt(r.nextIFDByteOffset));case 6:case"end":return t.stop()}}),t)})))(),t.abrupt("return",this.ifdRequests[n]);case 21:case"end":return t.stop()}}),t,this,[[10,14]])}))),function(t){return o.apply(this,arguments)})},{key:"getImage",value:(i=kb(regeneratorRuntime.mark((function t(){var n,e,r=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:0,t.next=3,this.requestIFD(n);case 3:return e=t.sent,t.abrupt("return",new Fp(e.fileDirectory,e.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source));case 5:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"getImageCount",value:(r=kb(regeneratorRuntime.mark((function t(){var n,e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=0,e=!0;case 2:if(!e){t.next=18;break}return t.prev=3,t.next=6,this.requestIFD(n);case 6:++n,t.next=16;break;case 9:if(t.prev=9,t.t0=t.catch(3),!(t.t0 instanceof Lb)){t.next=15;break}e=!1,t.next=16;break;case 15:throw t.t0;case 16:t.next=2;break;case 18:return t.abrupt("return",n);case 19:case"end":return t.stop()}}),t,this,[[3,9]])}))),function(){return r.apply(this,arguments)})},{key:"getGhostValues",value:(e=kb(regeneratorRuntime.mark((function t(){var n,e,r,i,o,s,a,u,c=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.bigTiff?16:8,!this.ghostValues){t.next=3;break}return t.abrupt("return",this.ghostValues);case 3:return r=(e="GDAL_STRUCTURAL_METADATA_SIZE=").length+100,t.next=7,this.getSlice(n,r);case 7:if(i=t.sent,e!==Nb(i,cp.sf.ASCII,e.length,n)){t.next=19;break}if(o=Nb(i,cp.sf.ASCII,r,n),s=o.split("\n")[0],!((a=Number(s.split("=")[1].split(" ")[0])+s.length)>r)){t.next=16;break}return t.next=15,this.getSlice(n,a);case 15:i=t.sent;case 16:u=Nb(i,cp.sf.ASCII,a,n),this.ghostValues={},u.split("\n").filter((function(t){return t.length>0})).map((function(t){return t.split("=")})).forEach((function(t){var n=wb(t,2),e=n[0],r=n[1];c.ghostValues[e]=r}));case 19:return t.abrupt("return",this.ghostValues);case 20:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"close",value:function(){return"function"==typeof this.source.close&&this.source.close()}}],[{key:"fromSource",value:(n=kb(regeneratorRuntime.mark((function t(n,e,r){var i,o,s,a,u,f,h;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.fetch([{offset:0,length:1024}],r);case 2:if(i=t.sent[0],o=new Up(i),18761!==(s=o.getUint16(0,0))){t.next=9;break}a=!0,t.next=14;break;case 9:if(19789!==s){t.next=13;break}a=!1,t.next=14;break;case 13:throw new TypeError("Invalid byte order value.");case 14:if(42!==(u=o.getUint16(2,a))){t.next=19;break}f=!1,t.next=27;break;case 19:if(43!==u){t.next=26;break}if(f=!0,8===o.getUint16(4,a)){t.next=24;break}throw new Error("Unsupported offset byte-size.");case 24:t.next=27;break;case 26:throw new TypeError("Invalid magic number.");case 27:return h=f?o.getUint64(8,a):o.getUint32(4,a),t.abrupt("return",new c(n,a,f,h,e));case 29:case"end":return t.stop()}}),t)}))),function(t,e,r){return n.apply(this,arguments)})}]),c}(Fb),Ub=function(t){_b(o,t);var n,e,r,i=Sb(o);function o(t,n){var e;return Ib(this,o),(e=i.call(this)).mainFile=t,e.overviewFiles=n,e.imageFiles=[t].concat(n),e.fileDirectoriesPerFile=null,e.fileDirectoriesPerFileParsing=null,e.imageCount=null,e}return Rb(o,[{key:"parseFileDirectoriesPerFile",value:(r=kb(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map((function(t){return t.parseFileDirectoryAt(t.firstIFDOffset)}))),t.next=3,Promise.all(n);case 3:return this.fileDirectoriesPerFile=t.sent,t.abrupt("return",this.fileDirectoriesPerFile);case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"getImage",value:(e=kb(regeneratorRuntime.mark((function t(){var n,e,r,i,o,s,a,u=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=u.length>0&&void 0!==u[0]?u[0]:0,t.next=3,this.getImageCount();case 3:return t.next=5,this.parseFileDirectoriesPerFile();case 5:e=0,r=0,i=0;case 8:if(!(i<this.imageFiles.length)){t.next=26;break}o=this.imageFiles[i],s=0;case 11:if(!(s<this.imageCounts[i])){t.next=22;break}if(n!==e){t.next=17;break}return t.next=15,o.requestIFD(r);case 15:return a=t.sent,t.abrupt("return",new Fp(a.fileDirectory,a.geoKeyDirectory,o.dataView,o.littleEndian,o.cache,o.source));case 17:e++,r++;case 19:s++,t.next=11;break;case 22:r=0;case 23:i++,t.next=8;break;case 26:throw new RangeError("Invalid image index");case 27:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getImageCount",value:(n=kb(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null===this.imageCount){t.next=2;break}return t.abrupt("return",this.imageCount);case 2:return n=[this.mainFile.getImageCount()].concat(this.overviewFiles.map((function(t){return t.getImageCount()}))),t.next=5,Promise.all(n);case 5:return this.imageCounts=t.sent,this.imageCount=this.imageCounts.reduce((function(t,n){return t+n}),0),t.abrupt("return",this.imageCount);case 8:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),o}(Fb);function Bb(){return(Bb=kb(regeneratorRuntime.mark((function t(n){var e,r,i=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>1&&void 0!==i[1]?i[1]:{},r=i.length>2?i[2]:void 0,t.abrupt("return",Gb.fromSource(db(n,e),r));case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function qb(){return(qb=kb(regeneratorRuntime.mark((function t(n){var e,r,i,o,s,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:[],r=a.length>2&&void 0!==a[2]?a[2]:{},i=a.length>3?a[3]:void 0,t.next=5,Gb.fromSource(db(n,r),i);case 5:return o=t.sent,t.next=8,Promise.all(e.map((function(t){return Gb.fromSource(db(t,r))})));case 8:return s=t.sent,t.abrupt("return",new Ub(o,s));case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var $b=e(769),Vb=($b.registerSerializer,$b.spawn),Zb=($b.BlobWorker,$b.DefaultSerializer,$b.Pool),Wb=($b.Thread,$b.Transfer),Hb=$b.Worker;function Kb(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function Xb(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){Kb(o,r,i,s,a,"next",t)}function a(t){Kb(o,r,i,s,a,"throw",t)}s(void 0)}))}}function Yb(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Jb(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Qb="undefined"!=typeof navigator?navigator.hardwareConcurrency:null,tw=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qb,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Hb("./decoder.worker.js");Yb(this,t),this.pool=Zb((function(){return Vb(e)}),n)}var n,e,r,i;return n=t,(e=[{key:"decode",value:(i=Xb(regeneratorRuntime.mark((function t(n,e){var r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,i){r.pool.queue(function(){var r=Xb(regeneratorRuntime.mark((function r(o){var s;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,o(n,Wb(e));case 3:s=r.sent,t(s),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(0),i(r.t0);case 10:case"end":return r.stop()}}),r,null,[[0,7]])})));return function(t){return r.apply(this,arguments)}}())})));case 1:case"end":return t.stop()}}),t)}))),function(t,n){return i.apply(this,arguments)})},{key:"destroy",value:function(){this.pool.terminate(!0)}}])&&Jb(n.prototype,e),r&&Jb(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();var nw,ew=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),rw="STATISTICS_MAXIMUM",iw="STATISTICS_MINIMUM";function ow(){return nw||(nw=new tw(void 0,function(){var t='function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function asyncGeneratorStep(e,t,r,n,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){asyncGeneratorStep(i,n,a,o,s,"next",e)}function s(e){asyncGeneratorStep(i,n,a,o,s,"throw",e)}o(void 0)}))}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var runtime={exports:{}};!function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var a=t&&t.prototype instanceof g?t:g,i=Object.create(a.prototype),o=new A(n||[]);return i._invoke=function(e,t,r){var n=u;return function(a,i){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===a)throw i;return I()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=x(o,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===u)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var l=c(e,t,r);if("normal"===l.type){if(n=r.done?p:d,l.arg===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=p,r.method="throw",r.arg=l.arg)}}}(e,r,o),i}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var u="suspendedStart",d="suspendedYield",h="executing",p="completed",m={};function g(){}function y(){}function _(){}var b={};l(b,i,(function(){return this}));var v=Object.getPrototypeOf,w=v&&v(v(M([])));w&&w!==r&&n.call(w,i)&&(b=w);var k=_.prototype=g.prototype=Object.create(b);function T(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,i,o,s){var l=c(e[a],e,i);if("throw"!==l.type){var f=l.arg,u=f.value;return u&&"object"===_typeof(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(u).then((function(e){f.value=e,o(f)}),(function(e){return r("throw",e,o,s)}))}s(l.arg)}var a;this._invoke=function(e,n){function i(){return new t((function(t,a){r(e,n,t,a)}))}return a=a?a.then(i,i):i()}}function x(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a \'throw\' method")}return m}var a=c(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function M(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,o=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}return{next:I}}function I(){return{value:t,done:!0}}return y.prototype=_,l(k,"constructor",_),l(_,"constructor",y),y.displayName=l(_,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,l(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},T(E.prototype),l(E.prototype,o,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new E(f(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},T(k),l(k,s,"Generator"),l(k,i,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=M,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),f=n.call(o,"finallyLoc");if(l&&f){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"===("undefined"==typeof globalThis?"undefined":_typeof(globalThis))?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(runtime);var worker={},isObservable=function(e){return!!e&&("symbol"===_typeof(Symbol.observable)&&"function"==typeof e[Symbol.observable]?e===e[Symbol.observable]():"function"==typeof e["@@observable"]&&e===e["@@observable"]())},common$1={},serializers={};function extendSerializer(e,t){var r=e.deserialize.bind(e),n=e.serialize.bind(e);return{deserialize:function(e){return t.deserialize(e,r)},serialize:function(e){return t.serialize(e,n)}}}Object.defineProperty(serializers,"__esModule",{value:!0}),serializers.DefaultSerializer=serializers.extendSerializer=void 0,serializers.extendSerializer=extendSerializer;var DefaultErrorSerializer={deserialize:function(e){return Object.assign(Error(e.message),{name:e.name,stack:e.stack})},serialize:function(e){return{__error_marker:"$$error",message:e.message,name:e.name,stack:e.stack}}},isSerializedError=function(e){return e&&"object"===_typeof(e)&&"__error_marker"in e&&"$$error"===e.__error_marker};serializers.DefaultSerializer={deserialize:function(e){return isSerializedError(e)?DefaultErrorSerializer.deserialize(e):e},serialize:function(e){return e instanceof Error?DefaultErrorSerializer.serialize(e):e}},Object.defineProperty(common$1,"__esModule",{value:!0}),common$1.serialize=common$1.deserialize=common$1.registerSerializer=void 0;var serializers_1=serializers,registeredSerializer=serializers_1.DefaultSerializer;function registerSerializer(e){registeredSerializer=serializers_1.extendSerializer(registeredSerializer,e)}function deserialize(e){return registeredSerializer.deserialize(e)}function serialize(e){return registeredSerializer.serialize(e)}common$1.registerSerializer=registerSerializer,common$1.deserialize=deserialize,common$1.serialize=serialize;var transferable={},symbols={};Object.defineProperty(symbols,"__esModule",{value:!0}),symbols.$worker=symbols.$transferable=symbols.$terminate=symbols.$events=symbols.$errors=void 0,symbols.$errors=Symbol("thread.errors"),symbols.$events=Symbol("thread.events"),symbols.$terminate=Symbol("thread.terminate"),symbols.$transferable=Symbol("thread.transferable"),symbols.$worker=Symbol("thread.worker"),Object.defineProperty(transferable,"__esModule",{value:!0}),transferable.Transfer=transferable.isTransferDescriptor=void 0;var symbols_1=symbols;function isTransferable(e){return!(!e||"object"!==_typeof(e))}function isTransferDescriptor(e){return e&&"object"===_typeof(e)&&e[symbols_1.$transferable]}function Transfer$1(e,t){var r;if(!t){if(!isTransferable(e))throw Error();t=[e]}return _defineProperty(r={},symbols_1.$transferable,!0),_defineProperty(r,"send",e),_defineProperty(r,"transferables",t),r}transferable.isTransferDescriptor=isTransferDescriptor,transferable.Transfer=Transfer$1;var messages$1={},exports,MasterMessageType,WorkerMessageType;exports=messages$1,Object.defineProperty(exports,"__esModule",{value:!0}),exports.WorkerMessageType=exports.MasterMessageType=void 0,(MasterMessageType=exports.MasterMessageType||(exports.MasterMessageType={})).cancel="cancel",MasterMessageType.run="run",(WorkerMessageType=exports.WorkerMessageType||(exports.WorkerMessageType={})).error="error",WorkerMessageType.init="init",WorkerMessageType.result="result",WorkerMessageType.running="running",WorkerMessageType.uncaughtError="uncaughtError";var implementation$1={},implementation_browser={};Object.defineProperty(implementation_browser,"__esModule",{value:!0});var isWorkerRuntime$2=function(){var e="undefined"!=typeof self&&"undefined"!=typeof Window&&self instanceof Window;return!("undefined"==typeof self||!self.postMessage||e)},postMessageToMaster$2=function(e,t){self.postMessage(e,t)},subscribeToMasterMessages$2=function(e){var t=function(t){e(t.data)};return self.addEventListener("message",t),function(){self.removeEventListener("message",t)}};implementation_browser.default={isWorkerRuntime:isWorkerRuntime$2,postMessageToMaster:postMessageToMaster$2,subscribeToMasterMessages:subscribeToMasterMessages$2};var implementation_tinyWorker={};Object.defineProperty(implementation_tinyWorker,"__esModule",{value:!0}),"undefined"==typeof self&&(commonjsGlobal.self=commonjsGlobal);var isWorkerRuntime$1=function(){return!("undefined"==typeof self||!self.postMessage)},postMessageToMaster$1=function(e){self.postMessage(e)},muxingHandlerSetUp=!1,messageHandlers=new Set,subscribeToMasterMessages$1=function(e){muxingHandlerSetUp||(self.addEventListener("message",(function(e){messageHandlers.forEach((function(t){return t(e.data)}))})),muxingHandlerSetUp=!0),messageHandlers.add(e);return function(){return messageHandlers.delete(e)}};implementation_tinyWorker.default={isWorkerRuntime:isWorkerRuntime$1,postMessageToMaster:postMessageToMaster$1,subscribeToMasterMessages:subscribeToMasterMessages$1};var implementation_worker_threads={},worker_threads={},implementation;function selectImplementation(){return"function"==typeof __non_webpack_require__?__non_webpack_require__("worker_threads"):eval("require")("worker_threads")}function getImplementation(){return implementation||(implementation=selectImplementation()),implementation}Object.defineProperty(worker_threads,"__esModule",{value:!0}),worker_threads.default=getImplementation;var __importDefault$1=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(implementation_worker_threads,"__esModule",{value:!0});var worker_threads_1=__importDefault$1(worker_threads);function assertMessagePort(e){if(!e)throw Error("Invariant violation: MessagePort to parent is not available.");return e}var isWorkerRuntime=function(){return!worker_threads_1.default().isMainThread},postMessageToMaster=function(e,t){assertMessagePort(worker_threads_1.default().parentPort).postMessage(e,t)},subscribeToMasterMessages=function(e){var t=worker_threads_1.default().parentPort;if(!t)throw Error("Invariant violation: MessagePort to parent is not available.");var r=function(t){e(t)};return assertMessagePort(t).on("message",r),function(){assertMessagePort(t).off("message",r)}};function testImplementation(){worker_threads_1.default()}implementation_worker_threads.default={isWorkerRuntime:isWorkerRuntime,postMessageToMaster:postMessageToMaster,subscribeToMasterMessages:subscribeToMasterMessages,testImplementation:testImplementation};var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(implementation$1,"__esModule",{value:!0});var implementation_browser_1=__importDefault(implementation_browser),implementation_tiny_worker_1=__importDefault(implementation_tinyWorker),implementation_worker_threads_1=__importDefault(implementation_worker_threads),runningInNode="undefined"!=typeof process&&"browser"!==process.arch&&"pid"in process;function selectNodeImplementation(){try{return implementation_worker_threads_1.default.testImplementation(),implementation_worker_threads_1.default}catch(e){return implementation_tiny_worker_1.default}}implementation$1.default=runningInNode?selectNodeImplementation():implementation_browser_1.default,function(e){var t=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))},r=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.expose=e.isWorkerRuntime=e.Transfer=e.registerSerializer=void 0;var n=r(isObservable),a=common$1,i=transferable,o=messages$1,s=r(implementation$1),l=common$1;Object.defineProperty(e,"registerSerializer",{enumerable:!0,get:function(){return l.registerSerializer}});var f=transferable;Object.defineProperty(e,"Transfer",{enumerable:!0,get:function(){return f.Transfer}}),e.isWorkerRuntime=s.default.isWorkerRuntime;var c=!1,u=new Map,d=function(e){return e&&e.type===o.MasterMessageType.run},h=function(e){return n.default(e)||function(e){return e&&"object"===_typeof(e)&&"function"==typeof e.subscribe}(e)};function p(e){return i.isTransferDescriptor(e)?{payload:e.send,transferables:e.transferables}:{payload:e,transferables:void 0}}function m(e,t){var r=p(t),n=r.payload,i=r.transferables,l={type:o.WorkerMessageType.error,uid:e,error:a.serialize(n)};s.default.postMessageToMaster(l,i)}function g(e,t,r){var n=p(r),a=n.payload,i=n.transferables,l={type:o.WorkerMessageType.result,uid:e,complete:!!t||void 0,payload:a};s.default.postMessageToMaster(l,i)}function y(e,t){var r={type:o.WorkerMessageType.running,uid:e,resultType:t};s.default.postMessageToMaster(r)}function _(e){try{var t={type:o.WorkerMessageType.uncaughtError,error:a.serialize(e)};s.default.postMessageToMaster(t)}catch(t){console.error("Not reporting uncaught error back to master thread as it occured while reporting an uncaught error already.\\nLatest error:",t,"\\nOriginal error:",e)}}function b(e,r,n){return t(this,void 0,void 0,regeneratorRuntime.mark((function t(){var i,o,s,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,i=r.apply(void 0,_toConsumableArray(n)),t.next=7;break;case 4:return t.prev=4,t.t0=t.catch(0),t.abrupt("return",m(e,t.t0));case 7:if(o=h(i)?"observable":"promise",y(e,o),!h(i)){t.next=14;break}s=i.subscribe((function(t){return g(e,!1,a.serialize(t))}),(function(t){m(e,a.serialize(t)),u.delete(e)}),(function(){g(e,!0),u.delete(e)})),u.set(e,s),t.next=24;break;case 14:return t.prev=14,t.next=17,i;case 17:l=t.sent,g(e,!0,a.serialize(l)),t.next=24;break;case 21:t.prev=21,t.t1=t.catch(14),m(e,a.serialize(t.t1));case 24:case"end":return t.stop()}}),t,null,[[0,4],[14,21]])})))}e.expose=function(e){if(!s.default.isWorkerRuntime())throw Error("expose() called in the master thread.");if(c)throw Error("expose() called more than once. This is not possible. Pass an object to expose() if you want to expose multiple functions.");if(c=!0,"function"==typeof e)s.default.subscribeToMasterMessages((function(t){d(t)&&!t.method&&b(t.uid,e,t.args.map(a.deserialize))})),t={type:o.WorkerMessageType.init,exposed:{type:"function"}},s.default.postMessageToMaster(t);else{if("object"!==_typeof(e)||!e)throw Error("Invalid argument passed to expose(). Expected a function or an object, got: ".concat(e));s.default.subscribeToMasterMessages((function(t){d(t)&&t.method&&b(t.uid,e[t.method],t.args.map(a.deserialize))})),function(e){var t={type:o.WorkerMessageType.init,exposed:{type:"module",methods:e}};s.default.postMessageToMaster(t)}(Object.keys(e).filter((function(t){return"function"==typeof e[t]})))}var t;s.default.subscribeToMasterMessages((function(e){if((n=e)&&n.type===o.MasterMessageType.cancel){var t=e.uid,r=u.get(t);r&&(r.unsubscribe(),u.delete(t))}var n}))},"undefined"!=typeof self&&"function"==typeof self.addEventListener&&s.default.isWorkerRuntime()&&(self.addEventListener("error",(function(e){setTimeout((function(){return _(e.error||e)}),250)})),self.addEventListener("unhandledrejection",(function(e){var t=e.reason;t&&"string"==typeof t.message&&setTimeout((function(){return _(t)}),250)}))),"undefined"!=typeof process&&"function"==typeof process.on&&s.default.isWorkerRuntime()&&(process.on("uncaughtException",(function(e){setTimeout((function(){return _(e)}),250)})),process.on("unhandledRejection",(function(e){e&&"string"==typeof e.message&&setTimeout((function(){return _(e)}),250)})))}(worker);var WorkerContext=getDefaultExportFromCjs(worker),expose=WorkerContext.expose;WorkerContext.registerSerializer;var Transfer=WorkerContext.Transfer,registry=new Map;function addDecoder(e,t){Array.isArray(e)||(e=[e]),e.forEach((function(e){return registry.set(e,t)}))}function getDecoder(e){return _getDecoder.apply(this,arguments)}function _getDecoder(){return(_getDecoder=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=registry.get(t.Compression)){e.next=3;break}throw new Error("Unknown compression method identifier: ".concat(t.Compression));case 3:return e.next=5,r();case 5:return n=e.sent,e.abrupt("return",new n(t));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function decode(e,t){return _decode.apply(this,arguments)}function _decode(){return(_decode=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){var n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,getDecoder(t);case 2:return n=e.sent,e.next=5,n.decode(t,r);case 5:return a=e.sent,e.abrupt("return",Transfer(a));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function decodeRowAcc(e,t){var r=e.length-t,n=0;do{for(var a=t;a>0;a--)e[n+t]+=e[n],n++;r-=t}while(r>0)}function decodeRowFloatingPoint(e,t,r){for(var n=0,a=e.length,i=a/r;a>t;){for(var o=t;o>0;--o)e[n+t]+=e[n],++n;a-=t}for(var s=e.slice(),l=0;l<i;++l)for(var f=0;f<r;++f)e[r*l+f]=s[(r-f-1)*i+l]}function applyPredictor(e,t,r,n,a,i){if(!t||1===t)return e;for(var o=0;o<a.length;++o){if(a[o]%8!=0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(a[o]!==a[0])throw new Error("When decoding with predictor, all samples must have the same size.")}for(var s=a[0]/8,l=2===i?1:a.length,f=0;f<n&&!(f*l*r*s>=e.byteLength);++f){var c=void 0;if(2===t){switch(a[0]){case 8:c=new Uint8Array(e,f*l*r*s,l*r*s);break;case 16:c=new Uint16Array(e,f*l*r*s,l*r*s/2);break;case 32:c=new Uint32Array(e,f*l*r*s,l*r*s/4);break;default:throw new Error("Predictor 2 not allowed with ".concat(a[0]," bits per sample."))}decodeRowAcc(c,l)}else 3===t&&decodeRowFloatingPoint(c=new Uint8Array(e,f*l*r*s,l*r*s),l,s)}return e}addDecoder([void 0,1],(function(){return Promise.resolve().then((function(){return raw})).then((function(e){return e.default}))})),addDecoder(5,(function(){return Promise.resolve().then((function(){return lzw})).then((function(e){return e.default}))})),addDecoder(6,(function(){throw new Error("old style JPEG compression is not supported.")})),addDecoder(7,(function(){return Promise.resolve().then((function(){return jpeg})).then((function(e){return e.default}))})),addDecoder([8,32946],(function(){return Promise.resolve().then((function(){return deflate})).then((function(e){return e.default}))})),addDecoder(32773,(function(){return Promise.resolve().then((function(){return packbits})).then((function(e){return e.default}))})),addDecoder(34887,(function(){return Promise.resolve().then((function(){return lerc})).then((function(e){return e.default}))})),expose(decode);var BaseDecoder=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"decode",value:function(){var e=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){var n,a,i,o,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.decodeBlock(r);case 2:if(n=e.sent,1===(a=t.Predictor||1)){e.next=9;break}return i=!t.StripOffsets,o=i?t.TileWidth:t.ImageWidth,s=i?t.TileLength:t.RowsPerStrip||t.ImageLength,e.abrupt("return",applyPredictor(n,a,o,s,t.BitsPerSample,t.PlanarConfiguration));case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()}]),e}(),RawDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"decodeBlock",value:function(e){return e}}]),r}(),raw=Object.freeze({__proto__:null,default:RawDecoder}),MIN_BITS=9,CLEAR_CODE=256,EOI_CODE=257,MAX_BYTELENGTH=12;function getByte(e,t,r){var n=t%8,a=Math.floor(t/8),i=8-n,o=t+r-8*(a+1),s=8*(a+2)-(t+r),l=8*(a+2)-t;if(s=Math.max(0,s),a>=e.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),EOI_CODE;var f=e[a]&Math.pow(2,8-n)-1,c=f<<=r-i;if(a+1<e.length){var u=e[a+1]>>>s;c+=u<<=Math.max(0,r-l)}if(o>8&&a+2<e.length){var d=8*(a+3)-(t+r);c+=e[a+2]>>>d}return c}function appendReversed(e,t){for(var r=t.length-1;r>=0;r--)e.push(t[r]);return e}function decompress(e){for(var t=new Uint16Array(4093),r=new Uint8Array(4093),n=0;n<=257;n++)t[n]=4096,r[n]=n;var a=258,i=MIN_BITS,o=0;function s(){a=258,i=MIN_BITS}function l(e){var t=getByte(e,o,i);return o+=i,t}function f(e,n){return r[a]=n,t[a]=e,++a-1}function c(e){for(var n=[],a=e;4096!==a;a=t[a])n.push(r[a]);return n}var u=[];s();for(var d,h=new Uint8Array(e),p=l(h);p!==EOI_CODE;){if(p===CLEAR_CODE){for(s(),p=l(h);p===CLEAR_CODE;)p=l(h);if(p===EOI_CODE)break;if(p>CLEAR_CODE)throw new Error("corrupted code at scanline ".concat(p));appendReversed(u,c(p)),d=p}else if(p<a){var m=c(p);appendReversed(u,m),f(d,m[m.length-1]),d=p}else{var g=c(d);if(!g)throw new Error("Bogus entry. Not in dictionary, ".concat(d," / ").concat(a,", position: ").concat(o));appendReversed(u,g),u.push(g[g.length-1]),f(d,g[g.length-1]),d=p}a+1>=Math.pow(2,i)&&(i===MAX_BYTELENGTH?d=void 0:i++),p=l(h)}return new Uint8Array(u)}var LZWDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"decodeBlock",value:function(e){return decompress(e).buffer}}]),r}(),lzw=Object.freeze({__proto__:null,default:LZWDecoder}),dctZigZag=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),dctCos1=4017,dctSin1=799,dctCos3=3406,dctSin3=2276,dctCos6=1567,dctSin6=3784,dctSqrt2=5793,dctSqrt1d2=2896;function buildHuffmanTable(e,t){for(var r=0,n=[],a=16;a>0&&!e[a-1];)--a;n.push({children:[],index:0});for(var i,o=n[0],s=0;s<a;s++){for(var l=0;l<e[s];l++){for((o=n.pop()).children[o.index]=t[r];o.index>0;)o=n.pop();for(o.index++,n.push(o);n.length<=s;)n.push(i={children:[],index:0}),o.children[o.index]=i.children,o=i;r++}s+1<a&&(n.push(i={children:[],index:0}),o.children[o.index]=i.children,o=i)}return n[0].children}function decodeScan(e,t,r,n,a,i,o,s,l){var f=r.mcusPerLine,c=r.progressive,u=t,d=t,h=0,p=0;function m(){if(p>0)return p--,h>>p&1;if(255===(h=e[d++])){var t=e[d++];if(t)throw new Error("unexpected marker: ".concat((h<<8|t).toString(16)))}return p=7,h>>>7}function g(e){for(var t,r=e;null!==(t=m());){if("number"==typeof(r=r[t]))return r;if("object"!==_typeof(r))throw new Error("invalid huffman sequence")}return null}function y(e){for(var t=e,r=0;t>0;){var n=m();if(null===n)return;r=r<<1|n,--t}return r}function _(e){var t=y(e);return t>=1<<e-1?t:t+(-1<<e)+1}var b=0;var v,w=0;function k(e,t,r,n,a){var i=r%f,o=(r/f|0)*e.v+n,s=i*e.h+a;t(e,e.blocks[o][s])}function T(e,t,r){var n=r/e.blocksPerLine|0,a=r%e.blocksPerLine;t(e,e.blocks[n][a])}var E,x,S,D,A,M,I=n.length;M=c?0===i?0===s?function(e,t){var r=g(e.huffmanTableDC),n=0===r?0:_(r)<<l;e.pred+=n,t[0]=e.pred}:function(e,t){t[0]|=m()<<l}:0===s?function(e,t){if(b>0)b--;else for(var r=i,n=o;r<=n;){var a=g(e.huffmanTableAC),s=15&a,f=a>>4;if(0===s){if(f<15){b=y(f)+(1<<f)-1;break}r+=16}else t[dctZigZag[r+=f]]=_(s)*(1<<l),r++}}:function(e,t){for(var r=i,n=o,a=0;r<=n;){var s=dctZigZag[r],f=t[s]<0?-1:1;switch(w){case 0:var c=g(e.huffmanTableAC),u=15&c;if(a=c>>4,0===u)a<15?(b=y(a)+(1<<a),w=4):(a=16,w=1);else{if(1!==u)throw new Error("invalid ACn encoding");v=_(u),w=a?2:3}continue;case 1:case 2:t[s]?t[s]+=(m()<<l)*f:0==--a&&(w=2===w?3:0);break;case 3:t[s]?t[s]+=(m()<<l)*f:(t[s]=v<<l,w=0);break;case 4:t[s]&&(t[s]+=(m()<<l)*f)}r++}4===w&&0==--b&&(w=0)}:function(e,t){var r=g(e.huffmanTableDC),n=0===r?0:_(r);e.pred+=n,t[0]=e.pred;for(var a=1;a<64;){var i=g(e.huffmanTableAC),o=15&i,s=i>>4;if(0===o){if(s<15)break;a+=16}else t[dctZigZag[a+=s]]=_(o),a++}};var R,O,C=0;O=1===I?n[0].blocksPerLine*n[0].blocksPerColumn:f*r.mcusPerColumn;for(var P=a||O;C<O;){for(x=0;x<I;x++)n[x].pred=0;if(b=0,1===I)for(E=n[0],A=0;A<P;A++)T(E,M,C),C++;else for(A=0;A<P;A++){for(x=0;x<I;x++){var L=E=n[x],U=L.h,B=L.v;for(S=0;S<B;S++)for(D=0;D<U;D++)k(E,M,C,S,D)}if(++C===O)break}if(p=0,(R=e[d]<<8|e[d+1])<65280)throw new Error("marker was not found");if(!(R>=65488&&R<=65495))break;d+=2}return d-u}function buildComponentData(e,t){var r=[],n=t.blocksPerLine,a=t.blocksPerColumn,i=n<<3,o=new Int32Array(64),s=new Uint8Array(64);function l(e,r,n){var a,i,o,s,l,f,c,u,d,h,p=t.quantizationTable,m=n;for(h=0;h<64;h++)m[h]=e[h]*p[h];for(h=0;h<8;++h){var g=8*h;0!==m[1+g]||0!==m[2+g]||0!==m[3+g]||0!==m[4+g]||0!==m[5+g]||0!==m[6+g]||0!==m[7+g]?(a=dctSqrt2*m[0+g]+128>>8,i=dctSqrt2*m[4+g]+128>>8,o=m[2+g],s=m[6+g],l=dctSqrt1d2*(m[1+g]-m[7+g])+128>>8,u=dctSqrt1d2*(m[1+g]+m[7+g])+128>>8,f=m[3+g]<<4,c=m[5+g]<<4,d=a-i+1>>1,a=a+i+1>>1,i=d,d=o*dctSin6+s*dctCos6+128>>8,o=o*dctCos6-s*dctSin6+128>>8,s=d,d=l-c+1>>1,l=l+c+1>>1,c=d,d=u+f+1>>1,f=u-f+1>>1,u=d,d=a-s+1>>1,a=a+s+1>>1,s=d,d=i-o+1>>1,i=i+o+1>>1,o=d,d=l*dctSin3+u*dctCos3+2048>>12,l=l*dctCos3-u*dctSin3+2048>>12,u=d,d=f*dctSin1+c*dctCos1+2048>>12,f=f*dctCos1-c*dctSin1+2048>>12,c=d,m[0+g]=a+u,m[7+g]=a-u,m[1+g]=i+c,m[6+g]=i-c,m[2+g]=o+f,m[5+g]=o-f,m[3+g]=s+l,m[4+g]=s-l):(d=dctSqrt2*m[0+g]+512>>10,m[0+g]=d,m[1+g]=d,m[2+g]=d,m[3+g]=d,m[4+g]=d,m[5+g]=d,m[6+g]=d,m[7+g]=d)}for(h=0;h<8;++h){var y=h;0!==m[8+y]||0!==m[16+y]||0!==m[24+y]||0!==m[32+y]||0!==m[40+y]||0!==m[48+y]||0!==m[56+y]?(a=dctSqrt2*m[0+y]+2048>>12,i=dctSqrt2*m[32+y]+2048>>12,o=m[16+y],s=m[48+y],l=dctSqrt1d2*(m[8+y]-m[56+y])+2048>>12,u=dctSqrt1d2*(m[8+y]+m[56+y])+2048>>12,f=m[24+y],c=m[40+y],d=a-i+1>>1,a=a+i+1>>1,i=d,d=o*dctSin6+s*dctCos6+2048>>12,o=o*dctCos6-s*dctSin6+2048>>12,s=d,d=l-c+1>>1,l=l+c+1>>1,c=d,d=u+f+1>>1,f=u-f+1>>1,u=d,d=a-s+1>>1,a=a+s+1>>1,s=d,d=i-o+1>>1,i=i+o+1>>1,o=d,d=l*dctSin3+u*dctCos3+2048>>12,l=l*dctCos3-u*dctSin3+2048>>12,u=d,d=f*dctSin1+c*dctCos1+2048>>12,f=f*dctCos1-c*dctSin1+2048>>12,c=d,m[0+y]=a+u,m[56+y]=a-u,m[8+y]=i+c,m[48+y]=i-c,m[16+y]=o+f,m[40+y]=o-f,m[24+y]=s+l,m[32+y]=s-l):(d=dctSqrt2*n[h+0]+8192>>14,m[0+y]=d,m[8+y]=d,m[16+y]=d,m[24+y]=d,m[32+y]=d,m[40+y]=d,m[48+y]=d,m[56+y]=d)}for(h=0;h<64;++h){var _=128+(m[h]+8>>4);r[h]=_<0?0:_>255?255:_}}for(var f=0;f<a;f++){for(var c=f<<3,u=0;u<8;u++)r.push(new Uint8Array(i));for(var d=0;d<n;d++){l(t.blocks[f][d],s,o);for(var h=0,p=d<<3,m=0;m<8;m++)for(var g=r[c+m],y=0;y<8;y++)g[p+y]=s[h++]}}return r}var JpegStreamReader=function(){function e(){_classCallCheck(this,e),this.jfif=null,this.adobe=null,this.quantizationTables=[],this.huffmanTablesAC=[],this.huffmanTablesDC=[],this.resetFrames()}return _createClass(e,[{key:"resetFrames",value:function(){this.frames=[]}},{key:"parse",value:function(e){var t=0;function r(){var r=e[t]<<8|e[t+1];return t+=2,r}function n(e){var t,r,n=0,a=0;for(r in e.components)e.components.hasOwnProperty(r)&&(n<(t=e.components[r]).h&&(n=t.h),a<t.v&&(a=t.v));var i=Math.ceil(e.samplesPerLine/8/n),o=Math.ceil(e.scanLines/8/a);for(r in e.components)if(e.components.hasOwnProperty(r)){t=e.components[r];for(var s=Math.ceil(Math.ceil(e.samplesPerLine/8)*t.h/n),l=Math.ceil(Math.ceil(e.scanLines/8)*t.v/a),f=i*t.h,c=o*t.v,u=[],d=0;d<c;d++){for(var h=[],p=0;p<f;p++)h.push(new Int32Array(64));u.push(h)}t.blocksPerLine=s,t.blocksPerColumn=l,t.blocks=u}e.maxH=n,e.maxV=a,e.mcusPerLine=i,e.mcusPerColumn=o}var a,i,o=r();if(65496!==o)throw new Error("SOI not found");for(o=r();65497!==o;){switch(o){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var s=(a=void 0,i=void 0,a=r(),i=e.subarray(t,t+a-2),t+=i.length,i);65504===o&&74===s[0]&&70===s[1]&&73===s[2]&&70===s[3]&&0===s[4]&&(this.jfif={version:{major:s[5],minor:s[6]},densityUnits:s[7],xDensity:s[8]<<8|s[9],yDensity:s[10]<<8|s[11],thumbWidth:s[12],thumbHeight:s[13],thumbData:s.subarray(14,14+3*s[12]*s[13])}),65518===o&&65===s[0]&&100===s[1]&&111===s[2]&&98===s[3]&&101===s[4]&&0===s[5]&&(this.adobe={version:s[6],flags0:s[7]<<8|s[8],flags1:s[9]<<8|s[10],transformCode:s[11]});break;case 65499:for(var l=r()+t-2;t<l;){var f=e[t++],c=new Int32Array(64);if(f>>4==0)for(var u=0;u<64;u++){c[dctZigZag[u]]=e[t++]}else{if(f>>4!=1)throw new Error("DQT: invalid table spec");for(var d=0;d<64;d++){c[dctZigZag[d]]=r()}}this.quantizationTables[15&f]=c}break;case 65472:case 65473:case 65474:r();for(var h={extended:65473===o,progressive:65474===o,precision:e[t++],scanLines:r(),samplesPerLine:r(),components:{},componentsOrder:[]},p=e[t++],m=void 0,g=0;g<p;g++){m=e[t];var y=e[t+1]>>4,_=15&e[t+1],b=e[t+2];h.componentsOrder.push(m),h.components[m]={h:y,v:_,quantizationIdx:b},t+=3}n(h),this.frames.push(h);break;case 65476:for(var v=r(),w=2;w<v;){for(var k=e[t++],T=new Uint8Array(16),E=0,x=0;x<16;x++,t++)T[x]=e[t],E+=T[x];for(var S=new Uint8Array(E),D=0;D<E;D++,t++)S[D]=e[t];w+=17+E,k>>4==0?this.huffmanTablesDC[15&k]=buildHuffmanTable(T,S):this.huffmanTablesAC[15&k]=buildHuffmanTable(T,S)}break;case 65501:r(),this.resetInterval=r();break;case 65498:r();for(var A=e[t++],M=[],I=this.frames[0],R=0;R<A;R++){var O=I.components[e[t++]],C=e[t++];O.huffmanTableDC=this.huffmanTablesDC[C>>4],O.huffmanTableAC=this.huffmanTablesAC[15&C],M.push(O)}var P=e[t++],L=e[t++],U=e[t++],B=decodeScan(e,t,I,M,this.resetInterval,P,L,U>>4,15&U);t+=B;break;case 65535:255!==e[t]&&t--;break;default:if(255===e[t-3]&&e[t-2]>=192&&e[t-2]<=254){t-=3;break}throw new Error("unknown JPEG marker ".concat(o.toString(16)))}o=r()}}},{key:"getResult",value:function(){var e=this.frames;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length>1&&console.warn("more than one frame is not supported");for(var t=0;t<this.frames.length;t++)for(var r=this.frames[t].components,n=0,a=Object.keys(r);n<a.length;n++){var i=a[n];r[i].quantizationTable=this.quantizationTables[r[i].quantizationIdx],delete r[i].quantizationIdx}for(var o=e[0],s=o.components,l=o.componentsOrder,f=[],c=o.samplesPerLine,u=o.scanLines,d=0;d<l.length;d++){var h=s[l[d]];f.push({lines:buildComponentData(o,h),scaleX:h.h/o.maxH,scaleY:h.v/o.maxV})}for(var p=new Uint8Array(c*u*f.length),m=0,g=0;g<u;++g)for(var y=0;y<c;++y)for(var _=0;_<f.length;++_){var b=f[_];p[m]=b.lines[0|g*b.scaleY][0|y*b.scaleX],++m}return p}}]),e}(),JpegDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(e){var n;return _classCallCheck(this,r),(n=t.call(this)).reader=new JpegStreamReader,e.JPEGTables&&n.reader.parse(e.JPEGTables),n}return _createClass(r,[{key:"decodeBlock",value:function(e){return this.reader.resetFrames(),this.reader.parse(new Uint8Array(e)),this.reader.getResult().buffer}}]),r}(),jpeg=Object.freeze({__proto__:null,default:JpegDecoder});function zero$1(e){for(var t=e.length;--t>=0;)e[t]=0}var MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,DIST_CODE_LEN=512,static_ltree=new Array(2*(L_CODES$1+2));zero$1(static_ltree);var static_dtree=new Array(2*D_CODES$1);zero$1(static_dtree);var _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);var _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);var base_length=new Array(LENGTH_CODES$1);zero$1(base_length);var base_dist=new Array(D_CODES$1);zero$1(base_dist);var adler32=function(e,t,r,n){for(var a=65535&e|0,i=e>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{i=i+(a=a+t[n++]|0)|0}while(--o);a%=65521,i%=65521}return a|i<<16|0},adler32_1=adler32,makeTable=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t},crcTable=new Uint32Array(makeTable()),crc32=function(e,t,r,n){var a=crcTable,i=n+r;e^=-1;for(var o=n;o<i;o++)e=e>>>8^a[255&(e^t[o])];return-1^e},crc32_1=crc32,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},constants$2={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},_has=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!==_typeof(r))throw new TypeError(r+"must be non-object");for(var n in r)_has(r,n)&&(e[n]=r[n])}}return e},flattenChunks=function(e){for(var t=0,r=0,n=e.length;r<n;r++)t+=e[r].length;for(var a=new Uint8Array(t),i=0,o=0,s=e.length;i<s;i++){var l=e[i];a.set(l,o),o+=l.length}return a},common={assign:assign,flattenChunks:flattenChunks},STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){STR_APPLY_UIA_OK=!1}for(var _utf8len=new Uint8Array(256),q=0;q<256;q++)_utf8len[q]=q>=252?6:q>=248?5:q>=240?4:q>=224?3:q>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,r,n,a,i,o=e.length,s=0;for(a=0;a<o;a++)55296==(64512&(r=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=e.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(n-56320),a++),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(s),i=0,a=0;i<s;a++)55296==(64512&(r=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=e.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(n-56320),a++),r<128?t[i++]=r:r<2048?(t[i++]=192|r>>>6,t[i++]=128|63&r):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r);return t},buf2binstring=function(e,t){if(t<65534&&e.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r},buf2string=function(e,t){var r,n,a=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var i=new Array(2*a);for(n=0,r=0;r<a;){var o=e[r++];if(o<128)i[n++]=o;else{var s=_utf8len[o];if(s>4)i[n++]=65533,r+=s-1;else{for(o&=2===s?31:3===s?15:7;s>1&&r<a;)o=o<<6|63&e[r++],s--;s>1?i[n++]=65533:o<65536?i[n++]=o:(o-=65536,i[n++]=55296|o>>10&1023,i[n++]=56320|1023&o)}}}return buf2binstring(i,n)},utf8border=function(e,t){(t=t||e.length)>e.length&&(t=e.length);for(var r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+_utf8len[e[r]]>t?r:t},strings={string2buf:string2buf,buf2string:buf2string,utf8border:utf8border};function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream,BAD$1=30,TYPE$1=12,inffast=function(e,t){var r,n,a,i,o,s,l,f,c,u,d,h,p,m,g,y,_,b,v,w,k,T,E,x,S=e.state;r=e.next_in,E=e.input,n=r+(e.avail_in-5),a=e.next_out,x=e.output,i=a-(t-e.avail_out),o=a+(e.avail_out-257),s=S.dmax,l=S.wsize,f=S.whave,c=S.wnext,u=S.window,d=S.hold,h=S.bits,p=S.lencode,m=S.distcode,g=(1<<S.lenbits)-1,y=(1<<S.distbits)-1;e:do{h<15&&(d+=E[r++]<<h,h+=8,d+=E[r++]<<h,h+=8),_=p[d&g];t:for(;;){if(d>>>=b=_>>>24,h-=b,0===(b=_>>>16&255))x[a++]=65535&_;else{if(!(16&b)){if(0==(64&b)){_=p[(65535&_)+(d&(1<<b)-1)];continue t}if(32&b){S.mode=TYPE$1;break e}e.msg="invalid literal/length code",S.mode=BAD$1;break e}v=65535&_,(b&=15)&&(h<b&&(d+=E[r++]<<h,h+=8),v+=d&(1<<b)-1,d>>>=b,h-=b),h<15&&(d+=E[r++]<<h,h+=8,d+=E[r++]<<h,h+=8),_=m[d&y];r:for(;;){if(d>>>=b=_>>>24,h-=b,!(16&(b=_>>>16&255))){if(0==(64&b)){_=m[(65535&_)+(d&(1<<b)-1)];continue r}e.msg="invalid distance code",S.mode=BAD$1;break e}if(w=65535&_,h<(b&=15)&&(d+=E[r++]<<h,(h+=8)<b&&(d+=E[r++]<<h,h+=8)),(w+=d&(1<<b)-1)>s){e.msg="invalid distance too far back",S.mode=BAD$1;break e}if(d>>>=b,h-=b,w>(b=a-i)){if((b=w-b)>f&&S.sane){e.msg="invalid distance too far back",S.mode=BAD$1;break e}if(k=0,T=u,0===c){if(k+=l-b,b<v){v-=b;do{x[a++]=u[k++]}while(--b);k=a-w,T=x}}else if(c<b){if(k+=l+c-b,(b-=c)<v){v-=b;do{x[a++]=u[k++]}while(--b);if(k=0,c<v){v-=b=c;do{x[a++]=u[k++]}while(--b);k=a-w,T=x}}}else if(k+=c-b,b<v){v-=b;do{x[a++]=u[k++]}while(--b);k=a-w,T=x}for(;v>2;)x[a++]=T[k++],x[a++]=T[k++],x[a++]=T[k++],v-=3;v&&(x[a++]=T[k++],v>1&&(x[a++]=T[k++]))}else{k=a-w;do{x[a++]=x[k++],x[a++]=x[k++],x[a++]=x[k++],v-=3}while(v>2);v&&(x[a++]=x[k++],v>1&&(x[a++]=x[k++]))}break}}break}}while(r<n&&a<o);r-=v=h>>3,d&=(1<<(h-=v<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<n?n-r+5:5-(r-n),e.avail_out=a<o?o-a+257:257-(a-o),S.hold=d,S.bits=h},MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),lext=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),dbase=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),dext=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),inflate_table=function(e,t,r,n,a,i,o,s){var l,f,c,u,d,h,p,m,g,y=s.bits,_=0,b=0,v=0,w=0,k=0,T=0,E=0,x=0,S=0,D=0,A=null,M=0,I=new Uint16Array(MAXBITS+1),R=new Uint16Array(MAXBITS+1),O=null,C=0;for(_=0;_<=MAXBITS;_++)I[_]=0;for(b=0;b<n;b++)I[t[r+b]]++;for(k=y,w=MAXBITS;w>=1&&0===I[w];w--);if(k>w&&(k=w),0===w)return a[i++]=20971520,a[i++]=20971520,s.bits=1,0;for(v=1;v<w&&0===I[v];v++);for(k<v&&(k=v),x=1,_=1;_<=MAXBITS;_++)if(x<<=1,(x-=I[_])<0)return-1;if(x>0&&(e===CODES$1||1!==w))return-1;for(R[1]=0,_=1;_<MAXBITS;_++)R[_+1]=R[_]+I[_];for(b=0;b<n;b++)0!==t[r+b]&&(o[R[t[r+b]]++]=b);if(e===CODES$1?(A=O=o,h=19):e===LENS$1?(A=lbase,M-=257,O=lext,C-=257,h=256):(A=dbase,O=dext,h=-1),D=0,b=0,_=v,d=i,T=k,E=0,c=-1,u=(S=1<<k)-1,e===LENS$1&&S>ENOUGH_LENS$1||e===DISTS$1&&S>ENOUGH_DISTS$1)return 1;for(;;){p=_-E,o[b]<h?(m=0,g=o[b]):o[b]>h?(m=O[C+o[b]],g=A[M+o[b]]):(m=96,g=0),l=1<<_-E,v=f=1<<T;do{a[d+(D>>E)+(f-=l)]=p<<24|m<<16|g|0}while(0!==f);for(l=1<<_-1;D&l;)l>>=1;if(0!==l?(D&=l-1,D+=l):D=0,b++,0==--I[_]){if(_===w)break;_=t[r+o[b]]}if(_>k&&(D&u)!==c){for(0===E&&(E=k),d+=v,x=1<<(T=_-E);T+E<w&&!((x-=I[T+E])<=0);)T++,x<<=1;if(S+=1<<T,e===LENS$1&&S>ENOUGH_LENS$1||e===DISTS$1&&S>ENOUGH_DISTS$1)return 1;a[c=D&u]=k<<24|T<<16|d-i|0}}return 0!==D&&(a[d+D]=_-E<<24|64<<16|0),s.bits=k,0},inftrees=inflate_table,CODES=0,LENS=1,DISTS=2,Z_FINISH$1=constants$2.Z_FINISH,Z_BLOCK=constants$2.Z_BLOCK,Z_TREES=constants$2.Z_TREES,Z_OK$1=constants$2.Z_OK,Z_STREAM_END$1=constants$2.Z_STREAM_END,Z_NEED_DICT$1=constants$2.Z_NEED_DICT,Z_STREAM_ERROR$1=constants$2.Z_STREAM_ERROR,Z_DATA_ERROR$1=constants$2.Z_DATA_ERROR,Z_MEM_ERROR$1=constants$2.Z_MEM_ERROR,Z_BUF_ERROR=constants$2.Z_BUF_ERROR,Z_DEFLATED=constants$2.Z_DEFLATED,HEAD=1,FLAGS=2,TIME=3,OS=4,EXLEN=5,EXTRA=6,NAME=7,COMMENT=8,HCRC=9,DICTID=10,DICT=11,TYPE=12,TYPEDO=13,STORED=14,COPY_=15,COPY=16,TABLE=17,LENLENS=18,CODELENS=19,LEN_=20,LEN=21,LENEXT=22,DIST=23,DISTEXT=24,MATCH=25,LIT=26,CHECK=27,LENGTH=28,DONE=29,BAD=30,MEM=31,SYNC=32,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function InflateState(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var inflateResetKeep=function(e){if(!e||!e.state)return Z_STREAM_ERROR$1;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=HEAD,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(ENOUGH_LENS),t.distcode=t.distdyn=new Int32Array(ENOUGH_DISTS),t.sane=1,t.back=-1,Z_OK$1},inflateReset=function(e){if(!e||!e.state)return Z_STREAM_ERROR$1;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,inflateResetKeep(e)},inflateReset2=function(e,t){var r;if(!e||!e.state)return Z_STREAM_ERROR$1;var n=e.state;return t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Z_STREAM_ERROR$1:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,inflateReset(e))},inflateInit2=function(e,t){if(!e)return Z_STREAM_ERROR$1;var r=new InflateState;e.state=r,r.window=null;var n=inflateReset2(e,t);return n!==Z_OK$1&&(e.state=null),n},inflateInit=function(e){return inflateInit2(e,DEF_WBITS)},virgin=!0,lenfix,distfix,fixedtables=function(e){if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(inftrees(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;inftrees(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5},updatewindow=function(e,t,r,n){var a,i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),n>=i.wsize?(i.window.set(t.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):((a=i.wsize-i.wnext)>n&&(a=n),i.window.set(t.subarray(r-n,r-n+a),i.wnext),(n-=a)?(i.window.set(t.subarray(r-n,r),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=a,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=a))),0},inflate$2=function(e,t){var r,n,a,i,o,s,l,f,c,u,d,h,p,m,g,y,_,b,v,w,k,T,E,x,S=0,D=new Uint8Array(4),A=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return Z_STREAM_ERROR$1;(r=e.state).mode===TYPE&&(r.mode=TYPEDO),o=e.next_out,a=e.output,l=e.avail_out,i=e.next_in,n=e.input,s=e.avail_in,f=r.hold,c=r.bits,u=s,d=l,T=Z_OK$1;e:for(;;)switch(r.mode){case HEAD:if(0===r.wrap){r.mode=TYPEDO;break}for(;c<16;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}if(2&r.wrap&&35615===f){r.check=0,D[0]=255&f,D[1]=f>>>8&255,r.check=crc32_1(r.check,D,2,0),f=0,c=0,r.mode=FLAGS;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&f)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=BAD;break}if((15&f)!==Z_DEFLATED){e.msg="unknown compression method",r.mode=BAD;break}if(c-=4,k=8+(15&(f>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=BAD;break}r.dmax=1<<r.wbits,e.adler=r.check=1,r.mode=512&f?DICTID:TYPE,f=0,c=0;break;case FLAGS:for(;c<16;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}if(r.flags=f,(255&r.flags)!==Z_DEFLATED){e.msg="unknown compression method",r.mode=BAD;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=BAD;break}r.head&&(r.head.text=f>>8&1),512&r.flags&&(D[0]=255&f,D[1]=f>>>8&255,r.check=crc32_1(r.check,D,2,0)),f=0,c=0,r.mode=TIME;case TIME:for(;c<32;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}r.head&&(r.head.time=f),512&r.flags&&(D[0]=255&f,D[1]=f>>>8&255,D[2]=f>>>16&255,D[3]=f>>>24&255,r.check=crc32_1(r.check,D,4,0)),f=0,c=0,r.mode=OS;case OS:for(;c<16;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}r.head&&(r.head.xflags=255&f,r.head.os=f>>8),512&r.flags&&(D[0]=255&f,D[1]=f>>>8&255,r.check=crc32_1(r.check,D,2,0)),f=0,c=0,r.mode=EXLEN;case EXLEN:if(1024&r.flags){for(;c<16;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}r.length=f,r.head&&(r.head.extra_len=f),512&r.flags&&(D[0]=255&f,D[1]=f>>>8&255,r.check=crc32_1(r.check,D,2,0)),f=0,c=0}else r.head&&(r.head.extra=null);r.mode=EXTRA;case EXTRA:if(1024&r.flags&&((h=r.length)>s&&(h=s),h&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(i,i+h),k)),512&r.flags&&(r.check=crc32_1(r.check,n,h,i)),s-=h,i+=h,r.length-=h),r.length))break e;r.length=0,r.mode=NAME;case NAME:if(2048&r.flags){if(0===s)break e;h=0;do{k=n[i+h++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k))}while(k&&h<s);if(512&r.flags&&(r.check=crc32_1(r.check,n,h,i)),s-=h,i+=h,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=COMMENT;case COMMENT:if(4096&r.flags){if(0===s)break e;h=0;do{k=n[i+h++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k))}while(k&&h<s);if(512&r.flags&&(r.check=crc32_1(r.check,n,h,i)),s-=h,i+=h,k)break e}else r.head&&(r.head.comment=null);r.mode=HCRC;case HCRC:if(512&r.flags){for(;c<16;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}if(f!==(65535&r.check)){e.msg="header crc mismatch",r.mode=BAD;break}f=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=TYPE;break;case DICTID:for(;c<32;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}e.adler=r.check=zswap32(f),f=0,c=0,r.mode=DICT;case DICT:if(0===r.havedict)return e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=s,r.hold=f,r.bits=c,Z_NEED_DICT$1;e.adler=r.check=1,r.mode=TYPE;case TYPE:if(t===Z_BLOCK||t===Z_TREES)break e;case TYPEDO:if(r.last){f>>>=7&c,c-=7&c,r.mode=CHECK;break}for(;c<3;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}switch(r.last=1&f,c-=1,3&(f>>>=1)){case 0:r.mode=STORED;break;case 1:if(fixedtables(r),r.mode=LEN_,t===Z_TREES){f>>>=2,c-=2;break e}break;case 2:r.mode=TABLE;break;case 3:e.msg="invalid block type",r.mode=BAD}f>>>=2,c-=2;break;case STORED:for(f>>>=7&c,c-=7&c;c<32;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}if((65535&f)!=(f>>>16^65535)){e.msg="invalid stored block lengths",r.mode=BAD;break}if(r.length=65535&f,f=0,c=0,r.mode=COPY_,t===Z_TREES)break e;case COPY_:r.mode=COPY;case COPY:if(h=r.length){if(h>s&&(h=s),h>l&&(h=l),0===h)break e;a.set(n.subarray(i,i+h),o),s-=h,i+=h,l-=h,o+=h,r.length-=h;break}r.mode=TYPE;break;case TABLE:for(;c<14;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}if(r.nlen=257+(31&f),f>>>=5,c-=5,r.ndist=1+(31&f),f>>>=5,c-=5,r.ncode=4+(15&f),f>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=BAD;break}r.have=0,r.mode=LENLENS;case LENLENS:for(;r.have<r.ncode;){for(;c<3;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}r.lens[A[r.have++]]=7&f,f>>>=3,c-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,E={bits:r.lenbits},T=inftrees(CODES,r.lens,0,19,r.lencode,0,r.work,E),r.lenbits=E.bits,T){e.msg="invalid code lengths set",r.mode=BAD;break}r.have=0,r.mode=CODELENS;case CODELENS:for(;r.have<r.nlen+r.ndist;){for(;y=(S=r.lencode[f&(1<<r.lenbits)-1])>>>16&255,_=65535&S,!((g=S>>>24)<=c);){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}if(_<16)f>>>=g,c-=g,r.lens[r.have++]=_;else{if(16===_){for(x=g+2;c<x;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}if(f>>>=g,c-=g,0===r.have){e.msg="invalid bit length repeat",r.mode=BAD;break}k=r.lens[r.have-1],h=3+(3&f),f>>>=2,c-=2}else if(17===_){for(x=g+3;c<x;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}c-=g,k=0,h=3+(7&(f>>>=g)),f>>>=3,c-=3}else{for(x=g+7;c<x;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}c-=g,k=0,h=11+(127&(f>>>=g)),f>>>=7,c-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=BAD;break}for(;h--;)r.lens[r.have++]=k}}if(r.mode===BAD)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=BAD;break}if(r.lenbits=9,E={bits:r.lenbits},T=inftrees(LENS,r.lens,0,r.nlen,r.lencode,0,r.work,E),r.lenbits=E.bits,T){e.msg="invalid literal/lengths set",r.mode=BAD;break}if(r.distbits=6,r.distcode=r.distdyn,E={bits:r.distbits},T=inftrees(DISTS,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,E),r.distbits=E.bits,T){e.msg="invalid distances set",r.mode=BAD;break}if(r.mode=LEN_,t===Z_TREES)break e;case LEN_:r.mode=LEN;case LEN:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=s,r.hold=f,r.bits=c,inffast(e,d),o=e.next_out,a=e.output,l=e.avail_out,i=e.next_in,n=e.input,s=e.avail_in,f=r.hold,c=r.bits,r.mode===TYPE&&(r.back=-1);break}for(r.back=0;y=(S=r.lencode[f&(1<<r.lenbits)-1])>>>16&255,_=65535&S,!((g=S>>>24)<=c);){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}if(y&&0==(240&y)){for(b=g,v=y,w=_;y=(S=r.lencode[w+((f&(1<<b+v)-1)>>b)])>>>16&255,_=65535&S,!(b+(g=S>>>24)<=c);){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}f>>>=b,c-=b,r.back+=b}if(f>>>=g,c-=g,r.back+=g,r.length=_,0===y){r.mode=LIT;break}if(32&y){r.back=-1,r.mode=TYPE;break}if(64&y){e.msg="invalid literal/length code",r.mode=BAD;break}r.extra=15&y,r.mode=LENEXT;case LENEXT:if(r.extra){for(x=r.extra;c<x;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}r.length+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=DIST;case DIST:for(;y=(S=r.distcode[f&(1<<r.distbits)-1])>>>16&255,_=65535&S,!((g=S>>>24)<=c);){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}if(0==(240&y)){for(b=g,v=y,w=_;y=(S=r.distcode[w+((f&(1<<b+v)-1)>>b)])>>>16&255,_=65535&S,!(b+(g=S>>>24)<=c);){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}f>>>=b,c-=b,r.back+=b}if(f>>>=g,c-=g,r.back+=g,64&y){e.msg="invalid distance code",r.mode=BAD;break}r.offset=_,r.extra=15&y,r.mode=DISTEXT;case DISTEXT:if(r.extra){for(x=r.extra;c<x;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}r.offset+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=BAD;break}r.mode=MATCH;case MATCH:if(0===l)break e;if(h=d-l,r.offset>h){if((h=r.offset-h)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=BAD;break}h>r.wnext?(h-=r.wnext,p=r.wsize-h):p=r.wnext-h,h>r.length&&(h=r.length),m=r.window}else m=a,p=o-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do{a[o++]=m[p++]}while(--h);0===r.length&&(r.mode=LEN);break;case LIT:if(0===l)break e;a[o++]=r.length,l--,r.mode=LEN;break;case CHECK:if(r.wrap){for(;c<32;){if(0===s)break e;s--,f|=n[i++]<<c,c+=8}if(d-=l,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?crc32_1(r.check,a,d,o-d):adler32_1(r.check,a,d,o-d)),d=l,(r.flags?f:zswap32(f))!==r.check){e.msg="incorrect data check",r.mode=BAD;break}f=0,c=0}r.mode=LENGTH;case LENGTH:if(r.wrap&&r.flags){for(;c<32;){if(0===s)break e;s--,f+=n[i++]<<c,c+=8}if(f!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=BAD;break}f=0,c=0}r.mode=DONE;case DONE:T=Z_STREAM_END$1;break e;case BAD:T=Z_DATA_ERROR$1;break e;case MEM:return Z_MEM_ERROR$1;case SYNC:default:return Z_STREAM_ERROR$1}return e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=s,r.hold=f,r.bits=c,(r.wsize||d!==e.avail_out&&r.mode<BAD&&(r.mode<CHECK||t!==Z_FINISH$1))&&updatewindow(e,e.output,e.next_out,d-e.avail_out),u-=e.avail_in,d-=e.avail_out,e.total_in+=u,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?crc32_1(r.check,a,d,e.next_out-d):adler32_1(r.check,a,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===TYPE?128:0)+(r.mode===LEN_||r.mode===COPY_?256:0),(0===u&&0===d||t===Z_FINISH$1)&&T===Z_OK$1&&(T=Z_BUF_ERROR),T},inflateEnd=function(e){if(!e||!e.state)return Z_STREAM_ERROR$1;var t=e.state;return t.window&&(t.window=null),e.state=null,Z_OK$1},inflateGetHeader=function(e,t){if(!e||!e.state)return Z_STREAM_ERROR$1;var r=e.state;return 0==(2&r.wrap)?Z_STREAM_ERROR$1:(r.head=t,t.done=!1,Z_OK$1)},inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&r.mode!==DICT?Z_STREAM_ERROR$1:r.mode===DICT&&adler32_1(1,t,n,0)!==r.check?Z_DATA_ERROR$1:updatewindow(e,t,n,n)?(r.mode=MEM,Z_MEM_ERROR$1):(r.havedict=1,Z_OK$1):Z_STREAM_ERROR$1},inflateReset_1=inflateReset,inflateReset2_1=inflateReset2,inflateResetKeep_1=inflateResetKeep,inflateInit_1=inflateInit,inflateInit2_1=inflateInit2,inflate_2$1=inflate$2,inflateEnd_1=inflateEnd,inflateGetHeader_1=inflateGetHeader,inflateSetDictionary_1=inflateSetDictionary,inflateInfo="pako inflate (from Nodeca project)",inflate_1$2={inflateReset:inflateReset_1,inflateReset2:inflateReset2_1,inflateResetKeep:inflateResetKeep_1,inflateInit:inflateInit_1,inflateInit2:inflateInit2_1,inflate:inflate_2$1,inflateEnd:inflateEnd_1,inflateGetHeader:inflateGetHeader_1,inflateSetDictionary:inflateSetDictionary_1,inflateInfo:inflateInfo};function GZheader(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader,toString=Object.prototype.toString,Z_NO_FLUSH=constants$2.Z_NO_FLUSH,Z_FINISH=constants$2.Z_FINISH,Z_OK=constants$2.Z_OK,Z_STREAM_END=constants$2.Z_STREAM_END,Z_NEED_DICT=constants$2.Z_NEED_DICT,Z_STREAM_ERROR=constants$2.Z_STREAM_ERROR,Z_DATA_ERROR=constants$2.Z_DATA_ERROR,Z_MEM_ERROR=constants$2.Z_MEM_ERROR;function Inflate$1(e){this.options=common.assign({chunkSize:65536,windowBits:15,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;var r=inflate_1$2.inflateInit2(this.strm,t.windowBits);if(r!==Z_OK)throw new Error(messages[r]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=strings.string2buf(t.dictionary):"[object ArrayBuffer]"===toString.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=inflate_1$2.inflateSetDictionary(this.strm,t.dictionary))!==Z_OK))throw new Error(messages[r])}function inflate$1(e,t){var r=new Inflate$1(t);if(r.push(e),r.err)throw r.msg||messages[r.err];return r.result}function inflateRaw$1(e,t){return(t=t||{}).raw=!0,inflate$1(e,t)}Inflate$1.prototype.push=function(e,t){var r,n,a,i=this.strm,o=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(n=t===~~t?t:!0===t?Z_FINISH:Z_NO_FLUSH,"[object ArrayBuffer]"===toString.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(r=inflate_1$2.inflate(i,n))===Z_NEED_DICT&&s&&((r=inflate_1$2.inflateSetDictionary(i,s))===Z_OK?r=inflate_1$2.inflate(i,n):r===Z_DATA_ERROR&&(r=Z_NEED_DICT));i.avail_in>0&&r===Z_STREAM_END&&i.state.wrap>0&&0!==e[i.next_in];)inflate_1$2.inflateReset(i),r=inflate_1$2.inflate(i,n);switch(r){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(r),this.ended=!0,!1}if(a=i.avail_out,i.next_out&&(0===i.avail_out||r===Z_STREAM_END))if("string"===this.options.to){var l=strings.utf8border(i.output,i.next_out),f=i.next_out-l,c=strings.buf2string(i.output,l);i.next_out=f,i.avail_out=o-f,f&&i.output.set(i.output.subarray(l,l+f),0),this.onData(c)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(r!==Z_OK||0!==a){if(r===Z_STREAM_END)return r=inflate_1$2.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===i.avail_in)break}}return!0},Inflate$1.prototype.onData=function(e){this.chunks.push(e)},Inflate$1.prototype.onEnd=function(e){e===Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,constants=constants$2,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1,constants:constants},inflate=inflate_1$1.inflate,inflate_1=inflate,DeflateDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"decodeBlock",value:function(e){return inflate_1(new Uint8Array(e)).buffer}}]),r}(),deflate=Object.freeze({__proto__:null,default:DeflateDecoder}),PackbitsDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"decodeBlock",value:function(e){for(var t=new DataView(e),r=[],n=0;n<e.byteLength;++n){var a=t.getInt8(n);if(a<0){var i=t.getUint8(n+1);a=-a;for(var o=0;o<=a;++o)r.push(i);n+=1}else{for(var s=0;s<=a;++s)r.push(t.getUint8(n+s+1));n+=a+1}}return new Uint8Array(r).buffer}}]),r}(),packbits=Object.freeze({__proto__:null,default:PackbitsDecoder}),LercDecode={exports:{}},module;module=LercDecode,\n/* Copyright 2015-2021 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */\nfunction(){var e,t,r,n,a,i,o,s,l,f,c,u,d,h,p,m,g=(e={defaultNoDataValue:-34027999387901484e22,decode:function(i,o){var s=(o=o||{}).encodedMaskData||null===o.encodedMaskData,l=a(i,o.inputOffset||0,s),f=null!==o.noDataValue?o.noDataValue:e.defaultNoDataValue,c=t(l,o.pixelType||Float32Array,o.encodedMaskData,f,o.returnMask),u={width:l.width,height:l.height,pixelData:c.resultPixels,minValue:c.minValue,maxValue:l.pixels.maxValue,noDataValue:f};return c.resultMask&&(u.maskData=c.resultMask),o.returnEncodedMask&&l.mask&&(u.encodedMaskData=l.mask.bitset?l.mask.bitset:null),o.returnFileInfo&&(u.fileInfo=r(l),o.computeUsedBitDepths&&(u.fileInfo.bitDepths=n(l))),u}},t=function(e,t,r,n,a){var o,s,l,f=0,c=e.pixels.numBlocksX,u=e.pixels.numBlocksY,d=Math.floor(e.width/c),h=Math.floor(e.height/u),p=2*e.maxZError,m=Number.MAX_VALUE;r=r||(e.mask?e.mask.bitset:null),s=new t(e.width*e.height),a&&r&&(l=new Uint8Array(e.width*e.height));for(var g,y,_=new Float32Array(d*h),b=0;b<=u;b++){var v=b!==u?h:e.height%u;if(0!==v)for(var w=0;w<=c;w++){var k=w!==c?d:e.width%c;if(0!==k){var T,E,x,S,D=b*e.width*h+w*d,A=e.width-k,M=e.pixels.blocks[f];if(M.encoding<2?(0===M.encoding?T=M.rawData:(i(M.stuffedData,M.bitsPerPixel,M.numValidPixels,M.offset,p,_,e.pixels.maxValue),T=_),E=0):x=2===M.encoding?0:M.offset,r)for(y=0;y<v;y++){for(7&D&&(S=r[D>>3],S<<=7&D),g=0;g<k;g++)7&D||(S=r[D>>3]),128&S?(l&&(l[D]=1),m=m>(o=M.encoding<2?T[E++]:x)?o:m,s[D++]=o):(l&&(l[D]=0),s[D++]=n),S<<=1;D+=A}else if(M.encoding<2)for(y=0;y<v;y++){for(g=0;g<k;g++)m=m>(o=T[E++])?o:m,s[D++]=o;D+=A}else for(m=m>x?x:m,y=0;y<v;y++){for(g=0;g<k;g++)s[D++]=x;D+=A}if(1===M.encoding&&E!==M.numValidPixels)throw"Block and Mask do not match";f++}}}return{resultPixels:s,resultMask:l,minValue:m}},r=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},n=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,r={},n=0;n<t;n++){var a=e.pixels.blocks[n];0===a.encoding?r.float32=!0:1===a.encoding?r[a.bitsPerPixel]=!0:r[0]=!0}return Object.keys(r)},a=function(e,t,r){var n={},a=new Uint8Array(e,t,10);if(n.fileIdentifierString=String.fromCharCode.apply(null,a),"CntZImage"!==n.fileIdentifierString.trim())throw"Unexpected file identifier string: "+n.fileIdentifierString;t+=10;var i=new DataView(e,t,24);if(n.fileVersion=i.getInt32(0,!0),n.imageType=i.getInt32(4,!0),n.height=i.getUint32(8,!0),n.width=i.getUint32(12,!0),n.maxZError=i.getFloat64(16,!0),t+=24,!r)if(i=new DataView(e,t,16),n.mask={},n.mask.numBlocksY=i.getUint32(0,!0),n.mask.numBlocksX=i.getUint32(4,!0),n.mask.numBytes=i.getUint32(8,!0),n.mask.maxValue=i.getFloat32(12,!0),t+=16,n.mask.numBytes>0){var o=new Uint8Array(Math.ceil(n.width*n.height/8)),s=(i=new DataView(e,t,n.mask.numBytes)).getInt16(0,!0),l=2,f=0;do{if(s>0)for(;s--;)o[f++]=i.getUint8(l++);else{var c=i.getUint8(l++);for(s=-s;s--;)o[f++]=c}s=i.getInt16(l,!0),l+=2}while(l<n.mask.numBytes);if(-32768!==s||f<o.length)throw"Unexpected end of mask RLE encoding";n.mask.bitset=o,t+=n.mask.numBytes}else 0==(n.mask.numBytes|n.mask.numBlocksY|n.mask.maxValue)&&(n.mask.bitset=new Uint8Array(Math.ceil(n.width*n.height/8)));i=new DataView(e,t,16),n.pixels={},n.pixels.numBlocksY=i.getUint32(0,!0),n.pixels.numBlocksX=i.getUint32(4,!0),n.pixels.numBytes=i.getUint32(8,!0),n.pixels.maxValue=i.getFloat32(12,!0),t+=16;var u=n.pixels.numBlocksX,d=n.pixels.numBlocksY,h=u+(n.width%u>0?1:0),p=d+(n.height%d>0?1:0);n.pixels.blocks=new Array(h*p);for(var m=0,g=0;g<p;g++)for(var y=0;y<h;y++){var _=0,b=e.byteLength-t;i=new DataView(e,t,Math.min(10,b));var v={};n.pixels.blocks[m++]=v;var w=i.getUint8(0);if(_++,v.encoding=63&w,v.encoding>3)throw"Invalid block encoding ("+v.encoding+")";if(2!==v.encoding){if(0!==w&&2!==w){if(w>>=6,v.offsetType=w,2===w)v.offset=i.getInt8(1),_++;else if(1===w)v.offset=i.getInt16(1,!0),_+=2;else{if(0!==w)throw"Invalid block offset type";v.offset=i.getFloat32(1,!0),_+=4}if(1===v.encoding)if(w=i.getUint8(_),_++,v.bitsPerPixel=63&w,w>>=6,v.numValidPixelsType=w,2===w)v.numValidPixels=i.getUint8(_),_++;else if(1===w)v.numValidPixels=i.getUint16(_,!0),_+=2;else{if(0!==w)throw"Invalid valid pixel count type";v.numValidPixels=i.getUint32(_,!0),_+=4}}var k;if(t+=_,3!==v.encoding)if(0===v.encoding){var T=(n.pixels.numBytes-1)/4;if(T!==Math.floor(T))throw"uncompressed block has invalid length";k=new ArrayBuffer(4*T),new Uint8Array(k).set(new Uint8Array(e,t,4*T));var E=new Float32Array(k);v.rawData=E,t+=4*T}else if(1===v.encoding){var x=Math.ceil(v.numValidPixels*v.bitsPerPixel/8),S=Math.ceil(x/4);k=new ArrayBuffer(4*S),new Uint8Array(k).set(new Uint8Array(e,t,x)),v.stuffedData=new Uint32Array(k),t+=x}}else t++}return n.eofOffset=t,n},i=function(e,t,r,n,a,i,o){var s,l,f,c=(1<<t)-1,u=0,d=0,h=Math.ceil((o-n)/a),p=4*e.length-Math.ceil(t*r/8);for(e[e.length-1]<<=8*p,s=0;s<r;s++){if(0===d&&(f=e[u++],d=32),d>=t)l=f>>>d-t&c,d-=t;else{var m=t-d;l=(f&c)<<m&c,l+=(f=e[u++])>>>(d=32-m)}i[s]=l<h?n+l*a:o}return i},e),y=(o=function(e,t,r,n,a,i,o,s){var l,f,c,u,d,h=(1<<r)-1,p=0,m=0,g=4*e.length-Math.ceil(r*n/8);if(e[e.length-1]<<=8*g,a)for(l=0;l<n;l++)0===m&&(c=e[p++],m=32),m>=r?(f=c>>>m-r&h,m-=r):(f=(c&h)<<(u=r-m)&h,f+=(c=e[p++])>>>(m=32-u)),t[l]=a[f];else for(d=Math.ceil((s-i)/o),l=0;l<n;l++)0===m&&(c=e[p++],m=32),m>=r?(f=c>>>m-r&h,m-=r):(f=(c&h)<<(u=r-m)&h,f+=(c=e[p++])>>>(m=32-u)),t[l]=f<d?i+f*o:s},s=function(e,t,r,n,a,i){var o,s=(1<<t)-1,l=0,f=0,c=0,u=0,d=0,h=[],p=4*e.length-Math.ceil(t*r/8);e[e.length-1]<<=8*p;var m=Math.ceil((i-n)/a);for(f=0;f<r;f++)0===u&&(o=e[l++],u=32),u>=t?(d=o>>>u-t&s,u-=t):(d=(o&s)<<(c=t-u)&s,d+=(o=e[l++])>>>(u=32-c)),h[f]=d<m?n+d*a:i;return h.unshift(n),h},l=function(e,t,r,n,a,i,o,s){var l,f,c,u,d=(1<<r)-1,h=0,p=0,m=0;if(a)for(l=0;l<n;l++)0===p&&(c=e[h++],p=32,m=0),p>=r?(f=c>>>m&d,p-=r,m+=r):(f=c>>>m&d,p=32-(u=r-p),f|=((c=e[h++])&(1<<u)-1)<<r-u,m=u),t[l]=a[f];else{var g=Math.ceil((s-i)/o);for(l=0;l<n;l++)0===p&&(c=e[h++],p=32,m=0),p>=r?(f=c>>>m&d,p-=r,m+=r):(f=c>>>m&d,p=32-(u=r-p),f|=((c=e[h++])&(1<<u)-1)<<r-u,m=u),t[l]=f<g?i+f*o:s}return t},f=function(e,t,r,n,a,i){var o,s=(1<<t)-1,l=0,f=0,c=0,u=0,d=0,h=0,p=[],m=Math.ceil((i-n)/a);for(f=0;f<r;f++)0===u&&(o=e[l++],u=32,h=0),u>=t?(d=o>>>h&s,u-=t,h+=t):(d=o>>>h&s,u=32-(c=t-u),d|=((o=e[l++])&(1<<c)-1)<<t-c,h=c),p[f]=d<m?n+d*a:i;return p.unshift(n),p},c=function(e,t,r,n){var a,i,o,s,l=(1<<r)-1,f=0,c=0,u=4*e.length-Math.ceil(r*n/8);for(e[e.length-1]<<=8*u,a=0;a<n;a++)0===c&&(o=e[f++],c=32),c>=r?(i=o>>>c-r&l,c-=r):(i=(o&l)<<(s=r-c)&l,i+=(o=e[f++])>>>(c=32-s)),t[a]=i;return t},u=function(e,t,r,n){var a,i,o,s,l=(1<<r)-1,f=0,c=0,u=0;for(a=0;a<n;a++)0===c&&(o=e[f++],c=32,u=0),c>=r?(i=o>>>u&l,c-=r,u+=r):(i=o>>>u&l,c=32-(s=r-c),i|=((o=e[f++])&(1<<s)-1)<<r-s,u=s),t[a]=i;return t},d={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,r=65535,n=e.length,a=Math.floor(n/2),i=0;a;){var o=a>=359?359:a;a-=o;do{t+=e[i++]<<8,r+=t+=e[i++]}while(--o);t=(65535&t)+(t>>>16),r=(65535&r)+(r>>>16)}return 1&n&&(r+=t+=e[i]<<8),((r=(65535&r)+(r>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var r=t.ptr,n=new Uint8Array(e,r,6),a={};if(a.fileIdentifierString=String.fromCharCode.apply(null,n),0!==a.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+a.fileIdentifierString;r+=6;var i,o=new DataView(e,r,8),s=o.getInt32(0,!0);if(a.fileVersion=s,r+=4,s>=3&&(a.checksum=o.getUint32(4,!0),r+=4),o=new DataView(e,r,12),a.height=o.getUint32(0,!0),a.width=o.getUint32(4,!0),r+=8,s>=4?(a.numDims=o.getUint32(8,!0),r+=4):a.numDims=1,o=new DataView(e,r,40),a.numValidPixel=o.getUint32(0,!0),a.microBlockSize=o.getInt32(4,!0),a.blobSize=o.getInt32(8,!0),a.imageType=o.getInt32(12,!0),a.maxZError=o.getFloat64(16,!0),a.zMin=o.getFloat64(24,!0),a.zMax=o.getFloat64(32,!0),r+=40,t.headerInfo=a,t.ptr=r,s>=3&&(i=s>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,r-i,a.blobSize-14))!==a.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var r=t.headerInfo,n=this.getDataTypeArray(r.imageType),a=r.numDims*this.getDataTypeSize(r.imageType),i=this.readSubArray(e,t.ptr,n,a),o=this.readSubArray(e,t.ptr+a,n,a);t.ptr+=2*a;var s,l=!0;for(s=0;s<r.numDims;s++)if(i[s]!==o[s]){l=!1;break}return r.minValues=i,r.maxValues=o,l},readSubArray:function(e,t,r,n){var a;if(r===Uint8Array)a=new Uint8Array(e,t,n);else{var i=new ArrayBuffer(n);new Uint8Array(i).set(new Uint8Array(e,t,n)),a=new r(i)}return a},readMask:function(e,t){var r,n,a=t.ptr,i=t.headerInfo,o=i.width*i.height,s=i.numValidPixel,l=new DataView(e,a,4),f={};if(f.numBytes=l.getUint32(0,!0),a+=4,(0===s||o===s)&&0!==f.numBytes)throw"invalid mask";if(0===s)r=new Uint8Array(Math.ceil(o/8)),f.bitset=r,n=new Uint8Array(o),t.pixels.resultMask=n,a+=f.numBytes;else if(f.numBytes>0){r=new Uint8Array(Math.ceil(o/8));var c=(l=new DataView(e,a,f.numBytes)).getInt16(0,!0),u=2,d=0,h=0;do{if(c>0)for(;c--;)r[d++]=l.getUint8(u++);else for(h=l.getUint8(u++),c=-c;c--;)r[d++]=h;c=l.getInt16(u,!0),u+=2}while(u<f.numBytes);if(-32768!==c||d<r.length)throw"Unexpected end of mask RLE encoding";n=new Uint8Array(o);var p=0,m=0;for(m=0;m<o;m++)7&m?(p=r[m>>3],p<<=7&m):p=r[m>>3],128&p&&(n[m]=1);t.pixels.resultMask=n,f.bitset=r,a+=f.numBytes}return t.ptr=a,t.mask=f,!0},readDataOneSweep:function(e,t,r,n){var a,i=t.ptr,o=t.headerInfo,s=o.numDims,l=o.width*o.height,f=o.imageType,c=o.numValidPixel*d.getDataTypeSize(f)*s,u=t.pixels.resultMask;if(r===Uint8Array)a=new Uint8Array(e,i,c);else{var h=new ArrayBuffer(c);new Uint8Array(h).set(new Uint8Array(e,i,c)),a=new r(h)}if(a.length===l*s)t.pixels.resultPixels=n?d.swapDimensionOrder(a,l,s,r,!0):a;else{t.pixels.resultPixels=new r(l*s);var p=0,m=0,g=0,y=0;if(s>1){if(n){for(m=0;m<l;m++)if(u[m])for(y=m,g=0;g<s;g++,y+=l)t.pixels.resultPixels[y]=a[p++]}else for(m=0;m<l;m++)if(u[m])for(y=m*s,g=0;g<s;g++)t.pixels.resultPixels[y+g]=a[p++]}else for(m=0;m<l;m++)u[m]&&(t.pixels.resultPixels[m]=a[p++])}return i+=c,t.ptr=i,!0},readHuffmanTree:function(e,t){var r=this.HUFFMAN_LUT_BITS_MAX,n=new DataView(e,t.ptr,16);if(t.ptr+=16,n.getInt32(0,!0)<2)throw"unsupported Huffman version";var a=n.getInt32(4,!0),i=n.getInt32(8,!0),o=n.getInt32(12,!0);if(i>=o)return!1;var s=new Uint32Array(o-i);d.decodeBits(e,t,s);var l,f,c,u,p=[];for(l=i;l<o;l++)p[f=l-(l<a?0:a)]={first:s[l-i],second:null};var m=e.byteLength-t.ptr,g=Math.ceil(m/4),y=new ArrayBuffer(4*g);new Uint8Array(y).set(new Uint8Array(e,t.ptr,m));var _,b=new Uint32Array(y),v=0,w=0;for(_=b[0],l=i;l<o;l++)(u=p[f=l-(l<a?0:a)].first)>0&&(p[f].second=_<<v>>>32-u,32-v>=u?32===(v+=u)&&(v=0,_=b[++w]):(v+=u-32,_=b[++w],p[f].second|=_>>>32-v));var k=0,T=0,E=new h;for(l=0;l<p.length;l++)void 0!==p[l]&&(k=Math.max(k,p[l].first));T=k>=r?r:k;var x,S,D,A,M,I=[];for(l=i;l<o;l++)if((u=p[f=l-(l<a?0:a)].first)>0)if(x=[u,f],u<=T)for(S=p[f].second<<T-u,D=1<<T-u,c=0;c<D;c++)I[S|c]=x;else for(S=p[f].second,M=E,A=u-1;A>=0;A--)S>>>A&1?(M.right||(M.right=new h),M=M.right):(M.left||(M.left=new h),M=M.left),0!==A||M.val||(M.val=x[1]);return{decodeLut:I,numBitsLUTQick:T,numBitsLUT:k,tree:E,stuffedData:b,srcPtr:w,bitPos:v}},readHuffman:function(e,t,r,n){var a,i,o,s,l,f,c,u,h,p=t.headerInfo.numDims,m=t.headerInfo.height,g=t.headerInfo.width,y=g*m,_=this.readHuffmanTree(e,t),b=_.decodeLut,v=_.tree,w=_.stuffedData,k=_.srcPtr,T=_.bitPos,E=_.numBitsLUTQick,x=_.numBitsLUT,S=0===t.headerInfo.imageType?128:0,D=t.pixels.resultMask,A=0;T>0&&(k++,T=0);var M,I=w[k],R=1===t.encodeMode,O=new r(y*p),C=O;if(p<2||R){for(M=0;M<p;M++)if(p>1&&(C=new r(O.buffer,y*M,y),A=0),t.headerInfo.numValidPixel===g*m)for(u=0,f=0;f<m;f++)for(c=0;c<g;c++,u++){if(i=0,l=s=I<<T>>>32-E,32-T<E&&(l=s|=w[k+1]>>>64-T-E),b[l])i=b[l][1],T+=b[l][0];else for(l=s=I<<T>>>32-x,32-T<x&&(l=s|=w[k+1]>>>64-T-x),a=v,h=0;h<x;h++)if(!(a=s>>>x-h-1&1?a.right:a.left).left&&!a.right){i=a.val,T=T+h+1;break}T>=32&&(T-=32,I=w[++k]),o=i-S,R?(o+=c>0?A:f>0?C[u-g]:A,o&=255,C[u]=o,A=o):C[u]=o}else for(u=0,f=0;f<m;f++)for(c=0;c<g;c++,u++)if(D[u]){if(i=0,l=s=I<<T>>>32-E,32-T<E&&(l=s|=w[k+1]>>>64-T-E),b[l])i=b[l][1],T+=b[l][0];else for(l=s=I<<T>>>32-x,32-T<x&&(l=s|=w[k+1]>>>64-T-x),a=v,h=0;h<x;h++)if(!(a=s>>>x-h-1&1?a.right:a.left).left&&!a.right){i=a.val,T=T+h+1;break}T>=32&&(T-=32,I=w[++k]),o=i-S,R?(c>0&&D[u-1]?o+=A:f>0&&D[u-g]?o+=C[u-g]:o+=A,o&=255,C[u]=o,A=o):C[u]=o}}else for(u=0,f=0;f<m;f++)for(c=0;c<g;c++)if(u=f*g+c,!D||D[u])for(M=0;M<p;M++,u+=y){if(i=0,l=s=I<<T>>>32-E,32-T<E&&(l=s|=w[k+1]>>>64-T-E),b[l])i=b[l][1],T+=b[l][0];else for(l=s=I<<T>>>32-x,32-T<x&&(l=s|=w[k+1]>>>64-T-x),a=v,h=0;h<x;h++)if(!(a=s>>>x-h-1&1?a.right:a.left).left&&!a.right){i=a.val,T=T+h+1;break}T>=32&&(T-=32,I=w[++k]),o=i-S,C[u]=o}t.ptr=t.ptr+4*(k+1)+(T>0?4:0),t.pixels.resultPixels=O,p>1&&!n&&(t.pixels.resultPixels=d.swapDimensionOrder(O,y,p,r))},decodeBits:function(e,t,r,n,a){var i=t.headerInfo,d=i.fileVersion,h=0,p=e.byteLength-t.ptr>=5?5:e.byteLength-t.ptr,m=new DataView(e,t.ptr,p),g=m.getUint8(0);h++;var y=g>>6,_=0===y?4:3-y,b=(32&g)>0,v=31&g,w=0;if(1===_)w=m.getUint8(h),h++;else if(2===_)w=m.getUint16(h,!0),h+=2;else{if(4!==_)throw"Invalid valid pixel count type";w=m.getUint32(h,!0),h+=4}var k,T,E,x,S,D,A,M,I,R=2*i.maxZError,O=i.numDims>1?i.maxValues[a]:i.zMax;if(b){for(t.counter.lut++,M=m.getUint8(h),h++,x=Math.ceil((M-1)*v/8),S=Math.ceil(x/4),T=new ArrayBuffer(4*S),E=new Uint8Array(T),t.ptr+=h,E.set(new Uint8Array(e,t.ptr,x)),A=new Uint32Array(T),t.ptr+=x,I=0;M-1>>>I;)I++;x=Math.ceil(w*I/8),S=Math.ceil(x/4),T=new ArrayBuffer(4*S),(E=new Uint8Array(T)).set(new Uint8Array(e,t.ptr,x)),k=new Uint32Array(T),t.ptr+=x,D=d>=3?f(A,v,M-1,n,R,O):s(A,v,M-1,n,R,O),d>=3?l(k,r,I,w,D):o(k,r,I,w,D)}else t.counter.bitstuffer++,I=v,t.ptr+=h,I>0&&(x=Math.ceil(w*I/8),S=Math.ceil(x/4),T=new ArrayBuffer(4*S),(E=new Uint8Array(T)).set(new Uint8Array(e,t.ptr,x)),k=new Uint32Array(T),t.ptr+=x,d>=3?null==n?u(k,r,I,w):l(k,r,I,w,!1,n,R,O):null==n?c(k,r,I,w):o(k,r,I,w,!1,n,R,O))},readTiles:function(e,t,r,n){var a=t.headerInfo,i=a.width,o=a.height,s=i*o,l=a.microBlockSize,f=a.imageType,c=d.getDataTypeSize(f),u=Math.ceil(i/l),h=Math.ceil(o/l);t.pixels.numBlocksY=h,t.pixels.numBlocksX=u,t.pixels.ptr=0;var p,m,g,y,_,b,v,w,k,T,E=0,x=0,S=0,D=0,A=0,M=0,I=0,R=0,O=0,C=0,P=0,L=0,U=0,B=0,$=0,N=new r(l*l),z=o%l||l,Z=i%l||l,G=a.numDims,j=t.pixels.resultMask,V=t.pixels.resultPixels,F=a.fileVersion>=5?14:15,K=a.zMax;for(S=0;S<h;S++)for(A=S!==h-1?l:z,D=0;D<u;D++)for(C=S*i*l+D*l,P=i-(M=D!==u-1?l:Z),w=0;w<G;w++){if(G>1?(T=V,C=S*i*l+D*l,V=new r(t.pixels.resultPixels.buffer,s*w*c,s),K=a.maxValues[w]):T=null,I=e.byteLength-t.ptr,m={},$=0,R=(p=new DataView(e,t.ptr,Math.min(10,I))).getUint8(0),$++,k=a.fileVersion>=5?4&R:0,O=R>>6&255,(R>>2&F)!=(D*l>>3&F))throw"integrity issue";if(k&&0===w)throw"integrity issue";if((_=3&R)>3)throw t.ptr+=$,"Invalid block encoding ("+_+")";if(2!==_)if(0===_){if(k)throw"integrity issue";if(t.counter.uncompressed++,t.ptr+=$,L=(L=A*M*c)<(U=e.byteLength-t.ptr)?L:U,g=new ArrayBuffer(L%c==0?L:L+c-L%c),new Uint8Array(g).set(new Uint8Array(e,t.ptr,L)),y=new r(g),B=0,j)for(E=0;E<A;E++){for(x=0;x<M;x++)j[C]&&(V[C]=y[B++]),C++;C+=P}else for(E=0;E<A;E++){for(x=0;x<M;x++)V[C++]=y[B++];C+=P}t.ptr+=B*c}else if(b=d.getDataTypeUsed(k&&f<6?4:f,O),v=d.getOnePixel(m,$,b,p),$+=d.getDataTypeSize(b),3===_)if(t.ptr+=$,t.counter.constantoffset++,j)for(E=0;E<A;E++){for(x=0;x<M;x++)j[C]&&(V[C]=k?Math.min(K,T[C]+v):v),C++;C+=P}else for(E=0;E<A;E++){for(x=0;x<M;x++)V[C]=k?Math.min(K,T[C]+v):v,C++;C+=P}else if(t.ptr+=$,d.decodeBits(e,t,N,v,w),$=0,k)if(j)for(E=0;E<A;E++){for(x=0;x<M;x++)j[C]&&(V[C]=N[$++]+T[C]),C++;C+=P}else for(E=0;E<A;E++){for(x=0;x<M;x++)V[C]=N[$++]+T[C],C++;C+=P}else if(j)for(E=0;E<A;E++){for(x=0;x<M;x++)j[C]&&(V[C]=N[$++]),C++;C+=P}else for(E=0;E<A;E++){for(x=0;x<M;x++)V[C++]=N[$++];C+=P}else{if(k)if(j)for(E=0;E<A;E++)for(x=0;x<M;x++)j[C]&&(V[C]=T[C]),C++;else for(E=0;E<A;E++)for(x=0;x<M;x++)V[C]=T[C],C++;t.counter.constant++,t.ptr+=$}}G>1&&!n&&(t.pixels.resultPixels=d.swapDimensionOrder(t.pixels.resultPixels,s,G,r))},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:d.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e,t){var r=e.headerInfo.zMax,n=e.headerInfo.zMin,a=e.headerInfo.maxValues,i=e.headerInfo.numDims,o=e.headerInfo.height*e.headerInfo.width,s=0,l=0,f=0,c=e.pixels.resultMask,u=e.pixels.resultPixels;if(c)if(i>1){if(t)for(s=0;s<i;s++)for(f=s*o,r=a[s],l=0;l<o;l++)c[l]&&(u[f+l]=r);else for(l=0;l<o;l++)if(c[l])for(f=l*i,s=0;s<i;s++)u[f+i]=a[s]}else for(l=0;l<o;l++)c[l]&&(u[l]=r);else if(i>1&&n!==r)if(t)for(s=0;s<i;s++)for(f=s*o,r=a[s],l=0;l<o;l++)u[f+l]=r;else for(l=0;l<o;l++)for(f=l*i,s=0;s<i;s++)u[f+s]=a[s];else for(l=0;l<o*i;l++)u[l]=r},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:t=Float32Array;break;case 7:t=Float64Array;break;default:t=Float32Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:t="F32";break;case 7:t="F64";break;default:t="F32"}return t},isValidPixelValue:function(e,t){if(null==t)return!1;var r;switch(e){case 0:r=t>=-128&&t<=127;break;case 1:r=t>=0&&t<=255;break;case 2:r=t>=-32768&&t<=32767;break;case 3:r=t>=0&&t<=65536;break;case 4:r=t>=-2147483648&&t<=2147483647;break;case 5:r=t>=0&&t<=4294967296;break;case 6:r=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:r=t>=-17976931348623157e292&&t<=17976931348623157e292;break;default:r=!1}return r},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var r=e;switch(e){case 2:case 4:r=e-t;break;case 3:case 5:r=e-2*t;break;case 6:r=0===t?e:1===t?2:1;break;case 7:r=0===t?e:e-2*t+1;break;default:r=e}return r},getOnePixel:function(e,t,r,n){var a=0;switch(r){case 0:a=n.getInt8(t);break;case 1:a=n.getUint8(t);break;case 2:a=n.getInt16(t,!0);break;case 3:a=n.getUint16(t,!0);break;case 4:a=n.getInt32(t,!0);break;case 5:a=n.getUInt32(t,!0);break;case 6:a=n.getFloat32(t,!0);break;case 7:a=n.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return a},swapDimensionOrder:function(e,t,r,n,a){var i=0,o=0,s=0,l=0,f=e;if(r>1)if(f=new n(t*r),a)for(i=0;i<t;i++)for(l=i,s=0;s<r;s++,l+=t)f[l]=e[o++];else for(i=0;i<t;i++)for(l=i,s=0;s<r;s++,l+=t)f[o++]=e[l];return f}},h=function(e,t,r){this.val=e,this.left=t,this.right=r},{decode:function(e,t){var r=(t=t||{}).noDataValue,n=0,a={};a.ptr=t.inputOffset||0,a.pixels={},d.readHeaderInfo(e,a);var i=a.headerInfo,o=i.fileVersion,s=d.getDataTypeArray(i.imageType);if(o>5)throw"unsupported lerc version 2."+o;d.readMask(e,a),i.numValidPixel===i.width*i.height||a.pixels.resultMask||(a.pixels.resultMask=t.maskData);var l=i.width*i.height;a.pixels.resultPixels=new s(l*i.numDims),a.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0};var f,c=!t.returnPixelInterleavedDims;if(0!==i.numValidPixel)if(i.zMax===i.zMin)d.constructConstantSurface(a,c);else if(o>=4&&d.checkMinMaxRanges(e,a))d.constructConstantSurface(a,c);else{var u=new DataView(e,a.ptr,2),h=u.getUint8(0);if(a.ptr++,h)d.readDataOneSweep(e,a,s,c);else if(o>1&&i.imageType<=1&&Math.abs(i.maxZError-.5)<1e-5){var p=u.getUint8(1);if(a.ptr++,a.encodeMode=p,p>2||o<4&&p>1)throw"Invalid Huffman flag "+p;p?d.readHuffman(e,a,s,c):d.readTiles(e,a,s,c)}else d.readTiles(e,a,s,c)}a.eofOffset=a.ptr,t.inputOffset?(f=a.headerInfo.blobSize+t.inputOffset-a.ptr,Math.abs(f)>=1&&(a.eofOffset=t.inputOffset+a.headerInfo.blobSize)):(f=a.headerInfo.blobSize-a.ptr,Math.abs(f)>=1&&(a.eofOffset=a.headerInfo.blobSize));var m={width:i.width,height:i.height,pixelData:a.pixels.resultPixels,minValue:i.zMin,maxValue:i.zMax,validPixelCount:i.numValidPixel,dimCount:i.numDims,dimStats:{minValues:i.minValues,maxValues:i.maxValues},maskData:a.pixels.resultMask};if(a.pixels.resultMask&&d.isValidPixelValue(i.imageType,r)){var g=a.pixels.resultMask;for(n=0;n<l;n++)g[n]||(m.pixelData[n]=r);m.noDataValue=r}return a.noDataValue=r,t.returnFileInfo&&(m.fileInfo=d.formatFileInfo(a)),m},getBandCount:function(e){for(var t=0,r=0,n={ptr:0,pixels:{}};r<e.byteLength-58;)d.readHeaderInfo(e,n),r+=n.headerInfo.blobSize,t++,n.ptr=r;return t}}),_=(p=new ArrayBuffer(4),m=new Uint8Array(p),new Uint32Array(p)[0]=1,1===m[0]),b={decode:function(e,t){if(!_)throw"Big endian system is not supported.";var r,n,a=(t=t||{}).inputOffset||0,i=new Uint8Array(e,a,10),o=String.fromCharCode.apply(null,i);if("CntZImage"===o.trim())r=g,n=1;else{if("Lerc2"!==o.substring(0,5))throw"Unexpected file identifier string: "+o;r=y,n=2}for(var s,l,f,c,u,d,h=0,p=e.byteLength-10,m=[],b={width:0,height:0,pixels:[],pixelType:t.pixelType,mask:null,statistics:[]},v=0;a<p;){var w=r.decode(e,{inputOffset:a,encodedMaskData:s,maskData:f,returnMask:0===h,returnEncodedMask:0===h,returnFileInfo:!0,returnPixelInterleavedDims:t.returnPixelInterleavedDims,pixelType:t.pixelType||null,noDataValue:t.noDataValue||null});a=w.fileInfo.eofOffset,f=w.maskData,0===h&&(s=w.encodedMaskData,b.width=w.width,b.height=w.height,b.dimCount=w.dimCount||1,b.pixelType=w.pixelType||w.fileInfo.pixelType,b.mask=f),n>1&&(f&&m.push(f),w.fileInfo.mask&&w.fileInfo.mask.numBytes>0&&v++),h++,b.pixels.push(w.pixelData),b.statistics.push({minValue:w.minValue,maxValue:w.maxValue,noDataValue:w.noDataValue,dimStats:w.dimStats})}if(n>1&&v>1){for(d=b.width*b.height,b.bandMasks=m,(f=new Uint8Array(d)).set(m[0]),c=1;c<m.length;c++)for(l=m[c],u=0;u<d;u++)f[u]=f[u]&l[u];b.maskData=f}return b}};module.exports?module.exports=b:this.Lerc=b}();var Lerc=LercDecode.exports,fieldTagNames={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},fieldTags={};for(var key in fieldTagNames)fieldTagNames.hasOwnProperty(key)&&(fieldTags[fieldTagNames[key]]=parseInt(key,10));fieldTags.BitsPerSample,fieldTags.ExtraSamples,fieldTags.SampleFormat,fieldTags.StripByteCounts,fieldTags.StripOffsets,fieldTags.StripRowCounts,fieldTags.TileByteCounts,fieldTags.TileOffsets,fieldTags.SubIFDs;var fieldTypeNames={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},fieldTypes={};for(var _key in fieldTypeNames)fieldTypeNames.hasOwnProperty(_key)&&(fieldTypes[fieldTypeNames[_key]]=parseInt(_key,10));var LercParameters={Version:0,AddCompression:1},LercAddCompression={None:0,Deflate:1},geoKeyNames={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},geoKeys={};for(var _key2 in geoKeyNames)geoKeyNames.hasOwnProperty(_key2)&&(geoKeys[geoKeyNames[_key2]]=parseInt(_key2,10));var LercDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(e){var n;return _classCallCheck(this,r),(n=t.call(this)).planarConfiguration=void 0!==e.PlanarConfiguration?e.PlanarConfiguration:1,n.samplesPerPixel=void 0!==e.SamplesPerPixel?e.SamplesPerPixel:1,n.addCompression=e.LercParameters[LercParameters.AddCompression],n}return _createClass(r,[{key:"decodeBlock",value:function(e){switch(this.addCompression){case LercAddCompression.None:break;case LercAddCompression.Deflate:e=inflate_1(new Uint8Array(e)).buffer;break;default:throw new Error("Unsupported LERC additional compression method identifier: ".concat(this.addCompression))}return Lerc.decode(e,{returnPixelInterleavedDims:1===this.planarConfiguration}).pixels[0].buffer}}]),r}(),lerc=Object.freeze({__proto__:null,default:LercDecoder});';return new Worker("undefined"==typeof Blob?"data:application/javascript;base64,"+Buffer.from(t,"binary").toString("base64"):URL.createObjectURL(new Blob([t],{type:"application/javascript"})))}())),nw}function sw(t){try{return t.getBoundingBox()}catch(e){var n=t.fileDirectory;return[0,0,n.ImageWidth,n.ImageLength]}}function aw(t){try{return t.getOrigin().slice(0,2)}catch(n){return[0,t.fileDirectory.ImageLength]}}function uw(t,n){try{return t.getResolution(n)[0]}catch(e){return n.fileDirectory.ImageWidth/t.fileDirectory.ImageWidth}}function cw(t){var n=t.geoKeys;if(!n)return null;if(n.ProjectedCSTypeGeoKey){if(!(r=mr(e="EPSG:"+n.ProjectedCSTypeGeoKey)))(i=Nt(n.ProjLinearUnitsGeoKey))&&(r=new ae({code:e,units:i}));return r}if(n.GeographicTypeGeoKey){var e,r,i;if(!(r=mr(e="EPSG:"+n.GeographicTypeGeoKey)))(i=Nt(n.GeogAngularUnitsGeoKey))&&(r=new ae({code:e,units:i}));return r}return null}function fw(t){return t.getImageCount().then((function(n){for(var e=new Array(n),r=0;r<n;++r)e[r]=t.getImage(r);return Promise.all(e)}))}function hw(t){return(t.overviews?function(t){return qb.apply(this,arguments)}(t.url,t.overviews):function(t){return Bb.apply(this,arguments)}(t.url)).then(fw)}function lw(t,n,e,r,i){if(Array.isArray(t)){var o=t.length;if(!Array.isArray(n)||o!=n.length){var s=new Error(r);throw i(s),s}for(var a=0;a<o;++a)lw(t[a],n[a],e,r,i)}else if(n=n,Math.abs(t-n)>e*t)throw new Error(r)}function vw(t){return t instanceof Int8Array?-128:t instanceof Int16Array?-32768:t instanceof Int32Array?-2147483648:t instanceof Float32Array?12e-39:0}function dw(t){return t instanceof Int8Array?127:t instanceof Uint8Array||t instanceof Uint8ClampedArray?255:t instanceof Int16Array?32767:t instanceof Uint16Array?65535:t instanceof Int32Array?2147483647:t instanceof Uint32Array?4294967295:t instanceof Float32Array?34e37:255}var pw=function(t){function n(n){var e=t.call(this,{state:hs,tileGrid:null,projection:null,opaque:n.opaque,transition:n.transition,interpolate:!1!==n.interpolate,wrapX:n.wrapX})||this;e.Ju=n.sources;var r=e.Ju.length;e.Qu=new Array(r),e.tc=new Array(r),e.ec,e.rc,e.ic,e.oc=!1!==n.normalize,e.sc=!1,e.V=null,e.ac=n.convertToRGB?"readRGB":"readRasters",e.setKey(e.Ju.map((function(t){return t.url})).join(","));for(var i=e,o=new Array(r),s=0;s<r;++s)o[s]=hw(e.Ju[s]);return Promise.all(o).then((function(t){i.uc(t)})).catch((function(t){console.error(t),i.V=t,i.setState(vs)})),e}return ew(n,t),n.prototype.getError=function(){return this.V},n.prototype.uc=function(t){for(var n,e,r,i,o=new Array(t.length),s=new Array(t.length),a=new Array(t.length),u=0,c=t.length,f=function(c){var f=t[c],l=f.length,v=void 0,d=void 0,p=new Array(l),y=new Array(l);s[c]=new Array(l),a[c]=new Array(l);for(var m=0;m<l;++m){var b=f[m],w=b.getGDALNoData();a[c][m]=b.getGDALMetadata(),s[c][m]=null===w?NaN:w;var g=h.Ju[c].bands;o[c]=g?g.length:b.getSamplesPerPixel();var x=l-(m+1);v||(v=sw(b)),d||(d=aw(b)),y[x]=uw(b,f[0]),p[x]=[b.getTileWidth(),b.getTileHeight()]}(n?Xn(n,v,n):n=v,e)?lw(e,d,0,S="Origin mismatch for source "+c+", got ["+d+"] but expected ["+e+"]",h.viewRejector):e=d;if(i){i.length-u>y.length&&(u=i.length-y.length);var k=i[i.length-1]/y[y.length-1];h.tc[c]=k;var _=y.map((function(t){return t*k})),S="Resolution mismatch for source "+c+", got ["+_+"] but expected ["+i+"]";lw(i.slice(u,i.length),_,.005,S,h.viewRejector)}else i=y,h.tc[c]=1;r?lw(r.slice(u,r.length),p,0,"Tile size mismatch for source "+c,h.viewRejector):r=p,h.Qu[c]=f.reverse()},h=this,l=0;l<c;++l)f(l);for(var v=0,d=this.Qu.length;v<d;++v)for(var p=this.Qu[v];p.length<i.length;)p.unshift(void 0);if(!this.getProjection()){var y=t[0];for(v=y.length-1;v>=0;--v){var m=cw(y[v]);if(m){this.projection=m;break}}}this.ec=o,this.rc=s,this.ic=a;t:for(l=0;l<c;++l){if(void 0!==this.Ju[l].nodata){this.sc=!0;break}var b=s[l],w=this.Ju[l].bands;if(w){for(v=0;v<w.length;++v)if(!isNaN(b[w[v]-1])){this.sc=!0;break t}}else for(var g=0;g<b.length;++g)if(!isNaN(b[g])){this.sc=!0;break t}}var x=this.sc?1:0;this.bandCount=o.reduce((function(t,n){return t+=n}),0)+x;var k=new qf({extent:n,minZoom:u,origin:e,resolutions:i,tileSizes:r});this.tileGrid=k,this.setLoader(this.cc.bind(this)),this.setState(ls),this.viewResolver({projection:this.projection,resolutions:i,center:Ir(Zn(n),this.projection),extent:Dr(n,this.projection),zoom:0})},n.prototype.cc=function(t,n,e){for(var r=eu(this.tileGrid.getTileSize(t)),i=this.Qu.length,o=new Array(i),s=this.sc,a=this.bandCount,u=this.ec,c=this.rc,f=this.Ju,h=function(i){var s=f[i],a=l.tc[i],u=[Math.round(n*(r[0]*a)),Math.round(e*(r[1]*a)),Math.round((n+1)*(r[0]*a)),Math.round((e+1)*(r[1]*a))],h=l.Qu[i][t],v=void 0;s.bands&&(v=s.bands.map((function(t){return t-1})));var d=void 0;d=isNaN(s.nodata)?v?v.map((function(t){return c[i][t]})):c[i]:s.nodata,o[i]=h[l.ac]({window:u,width:r[0],height:r[1],samples:v,fillValue:d,pool:ow(),interleave:!1})},l=this,v=0;v<i;++v)h(v);var d=r[0]*r[1],p=d*a,y=this.oc,m=this.ic;return Promise.all(o).then((function(t){var n;n=y?new Uint8Array(p):new Float32Array(p);for(var e=0,r=0;r<d;++r){for(var o=s,a=0;a<i;++a){var h=f[a],l=h.min,v=h.max,b=void 0,w=void 0;if(y){var g=m[a][0];void 0===l&&(l=g&&iw in g?parseFloat(g.STATISTICS_MINIMUM):vw(t[a][0])),void 0===v&&(v=g&&rw in g?parseFloat(g.STATISTICS_MAXIMUM):dw(t[a][0])),w=-l*(b=255/(v-l))}for(var x=0;x<u[a];++x){var k=t[a][x][r],_=void 0;if(_=y?ue(b*k+w,0,255):k,s){var S=h.nodata;if(void 0===S){var M=void 0;M=h.bands?h.bands[x]-1:x,S=c[a][M]}k!==S&&(o=!1,n[e]=_)}else n[e]=_;e++}}s&&(o||(n[e]=255),e++)}return n}))},n}(Pd);pw.prototype.getView;var yw=pw,mw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),bw="default",ww="truncated",gw=function(t){function n(n,e,r,i,o,s,a){var u=t.call(this,e,r,i,o,s,a)||this;return u.fc=null,u.jo=n,u}return mw(n,t),n.prototype.getImage=function(){if(this.fc)return this.fc;var n=t.prototype.getImage.call(this);if(this.state==dt){var e=this.jo;if(n.width==e[0]&&n.height==e[1])return this.fc=n,n;var r=_o(e[0],e[1]);return r.drawImage(n,0,0),this.fc=r.canvas,r.canvas}return n},n}(Co),xw=function(t){function n(n){var e=this,r=n,i=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(i=r.interpolate);var o=r.size,s=void 0!==r.tierSizeCalculation?r.tierSizeCalculation:bw,a=r.tilePixelRatio||1,u=o[0],c=o[1],f=[],h=r.tileSize||Ia,l=h*a;switch(s){case bw:for(;u>l||c>l;)f.push([Math.ceil(u/l),Math.ceil(c/l)]),l+=l;break;case ww:for(var v=u,d=c;v>l||d>l;)f.push([Math.ceil(v/l),Math.ceil(d/l)]),v>>=1,d>>=1;break;default:Mt(!1,53)}f.push([1,1]),f.reverse();for(var p=[a],y=[0],m=1,b=f.length;m<b;m++)p.push(a<<m),y.push(f[m-1][0]*f[m-1][1]+y[m-1]);p.reverse();var w=new qf({tileSize:h,extent:r.extent||[0,-c,u,0],resolutions:p}),g=r.url;g&&-1==g.indexOf("{TileGroup}")&&-1==g.indexOf("{tileIndex}")&&(g+="{TileGroup}/{z}-{x}-{y}.jpg");var x=nh(g),k=h*a;var _=Qf(x.map((function(t){return function(n,e,r){if(n){var i=n[0],o=n[1],s=n[2],a=o+s*f[i][0],u={z:i,x:o,y:s,tileIndex:a,TileGroup:"TileGroup"+((a+y[i])/k|0)};return t.replace(/\{(\w+?)\}/g,(function(t,n){return u[n]}))}}}))),S=gw.bind(null,eu(h*a));(e=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:i,projection:r.projection,tilePixelRatio:a,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileClass:S,tileGrid:w,tileUrlFunction:_,transition:r.transition})||this).zDirection=r.zDirection;var M=_(w.getTileCoordForCoordAndResolution(Zn(w.getExtent()),p[p.length-1]),1,null),j=new Image;return j.addEventListener("error",function(){k=h,this.changed()}.bind(e)),j.src=M,e}return mw(n,t),n}(vd),kw=function(t,n){for(var e=0,r=n.length,i=t.length;e<r;e++,i++)t[i]=n[e];return t},_w="version1",Sw="version2",Mw="version3",jw={};jw[_w]={level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}},jw[Sw]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},jw[Mw]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}},jw.none={none:{supports:[],formats:[],qualities:[]}};var Ow=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,Tw=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,Ew=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;var Aw={};Aw[_w]=function(t){var n=t.getComplianceLevelSupportedFeatures();return void 0===n&&(n=jw[_w].level0),{url:void 0===t.imageInfo["@id"]?void 0:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:n.supports,formats:kw(kw([],n.formats),[void 0===t.imageInfo.formats?[]:t.imageInfo.formats]),qualities:kw(kw([],n.qualities),[void 0===t.imageInfo.qualities?[]:t.imageInfo.qualities]),resolutions:t.imageInfo.scale_factors,tileSize:void 0!==t.imageInfo.tile_width?void 0!==t.imageInfo.tile_height?[t.imageInfo.tile_width,t.imageInfo.tile_height]:[t.imageInfo.tile_width,t.imageInfo.tile_width]:null!=t.imageInfo.tile_height?[t.imageInfo.tile_height,t.imageInfo.tile_height]:void 0}},Aw[Sw]=function(t){var n=t.getComplianceLevelSupportedFeatures(),e=Array.isArray(t.imageInfo.profile)&&t.imageInfo.profile.length>1,r=e&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],i=e&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],o=e&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return void 0===t.height?t.width:t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:kw(kw([],n.supports),r),formats:kw(kw([],n.formats),i),qualities:kw(kw([],n.qualities),o)}},Aw[Mw]=function(t){var n=t.getComplianceLevelSupportedFeatures(),e=void 0===t.imageInfo.extraFormats?n.formats:kw(kw([],n.formats),t.imageInfo.extraFormats),r=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return y(["jpg","png","gif"],t)})).reduce((function(t,n){return void 0===t&&y(e,n)?n:t}),void 0):void 0;return{url:t.imageInfo.id,sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:void 0===t.imageInfo.extraFeatures?n.supports:kw(kw([],n.supports),t.imageInfo.extraFeatures),formats:e,qualities:void 0===t.imageInfo.extraQualities?n.qualities:kw(kw([],n.qualities),t.imageInfo.extraQualities),preferredFormat:r}};var Cw=function(){function t(t){this.setImageInfo(t)}return t.prototype.setImageInfo=function(t){this.imageInfo="string"==typeof t?JSON.parse(t):t},t.prototype.getImageApiVersion=function(){if(void 0!==this.imageInfo){var t=this.imageInfo["@context"]||"ol-no-context";"string"==typeof t&&(t=[t]);for(var n=0;n<t.length;n++)switch(t[n]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/context.json":return _w;case"http://iiif.io/api/image/2/context.json":return Sw;case"http://iiif.io/api/image/3/context.json":return Mw;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(_w)&&this.imageInfo.identifier)return _w}Mt(!1,61)}},t.prototype.getComplianceLevelEntryFromProfile=function(t){if(void 0!==this.imageInfo&&void 0!==this.imageInfo.profile)switch(void 0===t&&(t=this.getImageApiVersion()),t){case _w:if(Ow.test(this.imageInfo.profile))return this.imageInfo.profile;break;case Mw:if(Ew.test(this.imageInfo.profile))return this.imageInfo.profile;break;case Sw:if("string"==typeof this.imageInfo.profile&&Tw.test(this.imageInfo.profile))return this.imageInfo.profile;if(Array.isArray(this.imageInfo.profile)&&this.imageInfo.profile.length>0&&"string"==typeof this.imageInfo.profile[0]&&Tw.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}},t.prototype.getComplianceLevelFromProfile=function(t){var n=this.getComplianceLevelEntryFromProfile(t);if(void 0!==n){var e=n.match(/level[0-2](?:\.json)?$/g);return Array.isArray(e)?e[0].replace(".json",""):void 0}},t.prototype.getComplianceLevelSupportedFeatures=function(){if(void 0!==this.imageInfo){var t=this.getImageApiVersion(),n=this.getComplianceLevelFromProfile(t);return void 0===n?jw.none.none:jw[t][n]}},t.prototype.getTileSourceOptions=function(t){var n=t||{},e=this.getImageApiVersion();if(void 0!==e){var r=void 0===e?void 0:Aw[e](this);if(void 0!==r)return{url:r.url,version:e,size:[this.imageInfo.width,this.imageInfo.height],sizes:r.sizes,format:void 0!==n.format&&y(r.formats,n.format)?n.format:void 0!==r.preferredFormat?r.preferredFormat:"jpg",supports:r.supports,quality:n.quality&&y(r.qualities,n.quality)?n.quality:y(r.qualities,"native")?"native":"default",resolutions:Array.isArray(r.resolutions)?r.resolutions.sort((function(t,n){return n-t})):void 0,tileSize:r.tileSize}}},t}(),Rw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function Iw(t){return t.toLocaleString("en",{maximumFractionDigits:10})}var Pw=function(t){function n(n){var e=this,r=n||{},i=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(i=r.interpolate);var o=r.url||"";o+=o.lastIndexOf("/")===o.length-1||""===o?"":"/";var s=r.version||Sw,a=r.sizes||[],u=r.size;Mt(null!=u&&Array.isArray(u)&&2==u.length&&!isNaN(u[0])&&u[0]>0&&!isNaN(u[1])&&u[1]>0,60);var c,f,h,l=u[0],v=u[1],d=r.tileSize,p=r.tilePixelRatio||1,m=r.format||"jpg",b=r.quality||(r.version==_w?"native":"default"),w=r.resolutions||[],g=r.supports||[],x=r.extent||[0,-v,l,0],k=null!=a&&Array.isArray(a)&&a.length>0,_=void 0!==d&&("number"==typeof d&&Number.isInteger(d)&&d>0||Array.isArray(d)&&d.length>0),S=null!=g&&Array.isArray(g)&&(y(g,"regionByPx")||y(g,"regionByPct"))&&(y(g,"sizeByWh")||y(g,"sizeByH")||y(g,"sizeByW")||y(g,"sizeByPct"));if(w.sort((function(t,n){return n-t})),_||S)if(null!=d&&("number"==typeof d&&Number.isInteger(d)&&d>0?(c=d,f=d):Array.isArray(d)&&d.length>0&&((1==d.length||null==d[1]&&Number.isInteger(d[0]))&&(c=d[0],f=d[0]),2==d.length&&(Number.isInteger(d[0])&&Number.isInteger(d[1])?(c=d[0],f=d[1]):null==d[0]&&Number.isInteger(d[1])&&(c=d[1],f=d[1])))),void 0!==c&&void 0!==f||(c=Ia,f=Ia),0==w.length)for(var M=h=Math.max(Math.ceil(Math.log(l/c)/Math.LN2),Math.ceil(Math.log(v/f)/Math.LN2));M>=0;M--)w.push(Math.pow(2,M));else{var j=Math.max.apply(Math,w);h=Math.round(Math.log(j)/Math.LN2)}else if(c=l,f=v,w=[],k){a.sort((function(t,n){return t[0]-n[0]})),h=-1;var O=[];for(M=0;M<a.length;M++){var T=l/a[M][0];w.length>0&&w[w.length-1]==T?O.push(M):(w.push(T),h++)}if(O.length>0)for(M=0;M<O.length;M++)a.splice(O[M]-M,1)}else w.push(1),a.push([l,v]),h=0;var E=new qf({tileSize:[c,f],extent:x,origin:Yn(x),resolutions:w}),A=gw.bind(null,eu(d||256).map((function(t){return t*p})));return(e=t.call(this,{attributions:r.attributions,attributionsCollapsible:r.attributionsCollapsible,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:i,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,state:r.state,tileClass:A,tileGrid:E,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:function(t,n,e){var r,i,u=t[0];if(!(u>h)){var d=t[1],p=t[2],x=w[u];if(!(void 0===d||void 0===p||void 0===x||d<0||Math.ceil(l/x/c)<=d||p<0||Math.ceil(v/x/f)<=p)){if(S||_){var M=d*c*x,j=p*f*x,O=c*x,T=f*x,E=c,A=f;if(M+O>l&&(O=l-M),j+T>v&&(T=v-j),M+c*x>l&&(E=Math.floor((l-M+x-1)/x)),j+f*x>v&&(A=Math.floor((v-j+x-1)/x)),0==M&&O==l&&0==j&&T==v)r="full";else if(!S||y(g,"regionByPx"))r=M+","+j+","+O+","+T;else if(y(g,"regionByPct")){r="pct:"+Iw(M/l*100)+","+Iw(j/v*100)+","+Iw(O/l*100)+","+Iw(T/v*100)}s!=Mw||S&&!y(g,"sizeByWh")?!S||y(g,"sizeByW")?i=E+",":y(g,"sizeByH")?i=","+A:y(g,"sizeByWh")?i=E+","+A:y(g,"sizeByPct")&&(i="pct:"+Iw(100/x)):i=E+","+A}else if(r="full",k){var C=a[u][0],R=a[u][1];i=s==Mw?C==l&&R==v?"max":C+","+R:C==l?"full":C+","}else i=s==Mw?"max":"full";return o+r+"/"+i+"/0/"+b+"."+m}}},transition:r.transition})||this).zDirection=r.zDirection,e}return Rw(n,t),n}(vd),Dw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Nw=function(t){function n(n,e,r,i,o,s,a){var u=this,c=n.getExtent(),f=e.getExtent(),h=f?Xn(r,f):r,l=Ff(n,e,Zn(h),i),v=new cl(n,e,h,c,.5*l,i),d=s(v.calculateSourceExtent(),l,o),p=d?lo:mo,y=d?d.getPixelRatio():1;return(u=t.call(this,r,i,y,p)||this).ds=e,u.ys=c,u.Ds=v,u.me=i,u.hc=r,u.lc=d,u.vc=y,u.vu=a,u.Ut=null,u.dc=null,u}return Dw(n,t),n.prototype.disposeInternal=function(){this.state==vo&&this.yc(),t.prototype.disposeInternal.call(this)},n.prototype.getImage=function(){return this.Ut},n.prototype.getProjection=function(){return this.ds},n.prototype.Ns=function(){var t=this.lc.getState();if(t==po){var n=Qn(this.hc)/this.me,e=Kn(this.hc)/this.me;this.Ut=Uf(n,e,this.vc,this.lc.getResolution(),this.ys,this.me,this.hc,this.Ds,[{extent:this.lc.getExtent(),image:this.lc.getImage()}],0,void 0,this.vu)}this.state=t,this.changed()},n.prototype.load=function(){if(this.state==lo){this.state=vo,this.changed();var t=this.lc.getState();t==po||t==yo?this.Ns():(this.dc=X(this.lc,D,(function(t){var n=this.lc.getState();n!=po&&n!=yo||(this.yc(),this.Ns())}),this),this.lc.load())}},n.prototype.yc=function(){J(this.dc),this.dc=null},n}(ho),zw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Lw="imageloadstart",Fw="imageloadend",Gw="imageloaderror",Uw=function(t){function n(n,e){var r=t.call(this,n)||this;return r.image=e,r}return zw(n,t),n}(h);function Bw(t,n){t.getImage().src=n}var qw=function(t){function n(n){var e=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),(e=t.call(this,{attributions:n.attributions,projection:n.projection,state:n.state,interpolate:r})||this).on,e.once,e.un,e.Oe=void 0!==n.resolutions?n.resolutions:null,e.mc=null,e.bc=0,e}return zw(n,t),n.prototype.getResolutions=function(){return this.Oe},n.prototype.findNearestResolution=function(t){if(this.Oe){var n=m(this.Oe,t,0);t=this.Oe[n]}return t},n.prototype.getImage=function(t,n,e,r){var i=this.getProjection();if(i&&r&&!Mr(i,r)){if(this.mc){if(this.bc==this.getRevision()&&Mr(this.mc.getProjection(),r)&&this.mc.getResolution()==n&&Pn(this.mc.getExtent(),t))return this.mc;this.mc.dispose(),this.mc=null}return this.mc=new Nw(i,r,t,n,e,function(t,n,e){return this.getImageInternal(t,n,e,i)}.bind(this),this.getInterpolate()),this.bc=this.getRevision(),this.mc}return i&&(r=i),this.getImageInternal(t,n,e,r)},n.prototype.getImageInternal=function(t,n,e,i){return r()},n.prototype.handleImageChange=function(t){var n=t.target;switch(n.getState()){case vo:this.loading=!0,this.dispatchEvent(new Uw(Lw,n));break;case po:this.loading=!1,this.dispatchEvent(new Uw(Fw,n));break;case yo:this.loading=!1,this.dispatchEvent(new Uw(Gw,n))}},n}(id),$w=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Vw=function(t){function n(n){var e=this,r=n||{},i=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(i=r.interpolate),(e=t.call(this,{attributions:r.attributions,interpolate:i,projection:r.projection,resolutions:r.resolutions})||this).qt=void 0!==r.crossOrigin?r.crossOrigin:null,e.ku=void 0===r.hidpi||r.hidpi,e.Li=r.url,e.zt=void 0!==r.imageLoadFunction?r.imageLoadFunction:Bw,e.wc=r.params||{},e.Dt=null,e.gc=[0,0],e.xc=0,e.kc=void 0!==r.ratio?r.ratio:1.5,e}return $w(n,t),n.prototype.getParams=function(){return this.wc},n.prototype.getImageInternal=function(t,n,e,r){if(void 0===this.Li)return null;n=this.findNearestResolution(n),e=this.ku?e:1;var i=this.Dt;if(i&&this.xc==this.getRevision()&&i.getResolution()==n&&i.getPixelRatio()==e&&jn(i.getExtent(),t))return i;var o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};E(o,this.wc);var s=((t=t.slice())[0]+t[2])/2,a=(t[1]+t[3])/2;if(1!=this.kc){var u=this.kc*Qn(t)/2,c=this.kc*Kn(t)/2;t[0]=s-u,t[1]=a-c,t[2]=s+u,t[3]=a+c}var f=n/e,h=Math.ceil(Qn(t)/f),l=Math.ceil(Kn(t)/f);t[0]=s-f*h/2,t[2]=s+f*h/2,t[1]=a-f*l/2,t[3]=a+f*l/2,this.gc[0]=h,this.gc[1]=l;var v=this._c(t,this.gc,e,r,o);return this.Dt=new go(t,n,e,v,this.qt,this.zt),this.xc=this.getRevision(),this.Dt.addEventListener(D,this.handleImageChange.bind(this)),this.Dt},n.prototype.getImageLoadFunction=function(){return this.zt},n.prototype._c=function(t,n,e,r,i){var o=r.getCode().split(/:(?=\d+$)/).pop();i.SIZE=n[0]+","+n[1],i.BBOX=t.join(","),i.BBOXSR=o,i.IMAGESR=o,i.DPI=Math.round(90*e);var s=this.Li,a=s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return a==s&&Mt(!1,50),eh(a,i)},n.prototype.getUrl=function(){return this.Li},n.prototype.setImageLoadFunction=function(t){this.Dt=null,this.zt=t,this.changed()},n.prototype.setUrl=function(t){t!=this.Li&&(this.Li=t,this.Dt=null,this.changed())},n.prototype.updateParams=function(t){E(this.wc,t),this.Dt=null,this.changed()},n}(qw),Zw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ww=function(t){function n(n){var e=this,r=n||{},i=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(i=r.interpolate),(e=t.call(this,{attributions:r.attributions,interpolate:i,projection:r.projection,resolutions:r.resolutions,state:r.state})||this).Sc=r.canvasFunction,e.Ut=null,e.xc=0,e.kc=void 0!==r.ratio?r.ratio:1.5,e}return Zw(n,t),n.prototype.getImageInternal=function(t,n,e,r){n=this.findNearestResolution(n);var i=this.Ut;if(i&&this.xc==this.getRevision()&&i.getResolution()==n&&i.getPixelRatio()==e&&jn(i.getExtent(),t))return i;re(t=t.slice(),this.kc);var o=[Qn(t)/n*e,Kn(t)/n*e],s=this.Sc.call(this,t,n,e,o,r);return s&&(i=new ko(t,n,e,s)),this.Ut=i,this.xc=this.getRevision(),i},n}(qw),Hw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();var Kw=function(t){function n(n){var e=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),(e=t.call(this,{interpolate:r,projection:n.projection,resolutions:n.resolutions})||this).qt=void 0!==n.crossOrigin?n.crossOrigin:null,e.Mc=void 0!==n.displayDpi?n.displayDpi:96,e.wc=n.params||{},e.Li=n.url,e.zt=void 0!==n.imageLoadFunction?n.imageLoadFunction:Bw,e.ku=void 0===n.hidpi||n.hidpi,e.dt=void 0!==n.metersPerUnit?n.metersPerUnit:1,e.kc=void 0!==n.ratio?n.ratio:1,e.jc=void 0!==n.useOverlay&&n.useOverlay,e.Dt=null,e.xc=0,e}return Hw(n,t),n.prototype.getParams=function(){return this.wc},n.prototype.getImageInternal=function(t,n,e,r){n=this.findNearestResolution(n),e=this.ku?e:1;var i=this.Dt;if(i&&this.xc==this.getRevision()&&i.getResolution()==n&&i.getPixelRatio()==e&&jn(i.getExtent(),t))return i;1!=this.kc&&re(t=t.slice(),this.kc);var o=[Qn(t)/n*e,Kn(t)/n*e];if(void 0!==this.Li){var s=this.getUrl(this.Li,this.wc,t,o,r);(i=new go(t,n,e,s,this.qt,this.zt)).addEventListener(D,this.handleImageChange.bind(this))}else i=null;return this.Dt=i,this.xc=this.getRevision(),i},n.prototype.getImageLoadFunction=function(){return this.zt},n.prototype.updateParams=function(t){E(this.wc,t),this.changed()},n.prototype.getUrl=function(t,n,e,r,i){var o=function(t,n,e,r){var i=Qn(t),o=Kn(t),s=n[0],a=n[1],u=.0254/r;return a*i>s*o?i*e/(s*u):o*e/(a*u)}(e,r,this.dt,this.Mc),s=Zn(e),a={OPERATION:this.jc?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.Mc,SETDISPLAYWIDTH:Math.round(r[0]),SETDISPLAYHEIGHT:Math.round(r[1]),SETVIEWSCALE:o,SETVIEWCENTERX:s[0],SETVIEWCENTERY:s[1]};return E(a,n),eh(t,a)},n.prototype.setImageLoadFunction=function(t){this.Dt=null,this.zt=t,this.changed()},n}(qw),Xw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Yw=function(t){function n(n){var e=this,r=void 0!==n.crossOrigin?n.crossOrigin:null,i=void 0!==n.imageLoadFunction?n.imageLoadFunction:Bw,o=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(o=n.interpolate),(e=t.call(this,{attributions:n.attributions,interpolate:o,projection:mr(n.projection)})||this).Li=n.url,e.Oc=n.imageExtent,e.Dt=new go(e.Oc,void 0,1,e.Li,r,i),e.gc=n.imageSize?n.imageSize:null,e.Dt.addEventListener(D,e.handleImageChange.bind(e)),e}return Xw(n,t),n.prototype.getImageExtent=function(){return this.Oc},n.prototype.getImageInternal=function(t,n,e,r){return te(t,this.Dt.getExtent())?this.Dt:null},n.prototype.getUrl=function(){return this.Li},n.prototype.handleImageChange=function(n){if(this.Dt.getState()==po){var e=this.Dt.getExtent(),r=this.Dt.getImage(),i=void 0,o=void 0;this.gc?(i=this.gc[0],o=this.gc[1]):(i=r.width,o=r.height);var s=Qn(e),a=Kn(e),u=s/i,c=a/o,f=i,h=o;if(u>c?f=Math.round(s/c):h=Math.round(a/u),f!==i||h!==o){var l=_o(f,h);this.getInterpolate()||E(l,Df);var v=l.canvas;l.drawImage(r,0,0,i,o,0,0,v.width,v.height),this.Dt.setImage(v)}}t.prototype.handleImageChange.call(this,n)},n}(qw),Jw="1.3.0",Qw="carmentaserver",tg="geoserver",ng="mapserver",eg="qgis",rg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ig=[101,101],og=function(t){function n(n){var e=this,r=n||{},i=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(i=r.interpolate),(e=t.call(this,{attributions:r.attributions,interpolate:i,projection:r.projection,resolutions:r.resolutions})||this).qt=void 0!==r.crossOrigin?r.crossOrigin:null,e.Li=r.url,e.zt=void 0!==r.imageLoadFunction?r.imageLoadFunction:Bw,e.wc=r.params||{},e.Tc=!0,e.Ec(),e.Ac=r.serverType,e.ku=void 0===r.hidpi||r.hidpi,e.Dt=null,e.gc=[0,0],e.xc=0,e.kc=void 0!==r.ratio?r.ratio:1.5,e}return rg(n,t),n.prototype.getFeatureInfoUrl=function(t,n,e,r){if(void 0!==this.Li){var i=mr(e),o=this.getProjection();o&&o!==i&&(n=Ff(o,i,t,n),t=Tr(t,i,o));var s=Hn(t,n,0,ig),a={SERVICE:"WMS",VERSION:Jw,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.wc.LAYERS};E(a,this.wc,r);var u=ge((t[0]-s[0])/n,4),c=ge((s[3]-t[1])/n,4);return a[this.Tc?"I":"X"]=u,a[this.Tc?"J":"Y"]=c,this._c(s,ig,1,o||i,a)}},n.prototype.getLegendUrl=function(t,n){if(void 0!==this.Li){var e={SERVICE:"WMS",VERSION:Jw,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===n||void 0===n.LAYER){var r=this.wc.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;e.LAYER=r}if(void 0!==t){var i=this.getProjection()?this.getProjection().getMetersPerUnit():1;e.SCALE=t*i/28e-5}return E(e,n),eh(this.Li,e)}},n.prototype.getParams=function(){return this.wc},n.prototype.getImageInternal=function(t,n,e,r){if(void 0===this.Li)return null;n=this.findNearestResolution(n),1==e||this.ku&&void 0!==this.Ac||(e=1);var i=n/e,o=Zn(t),s=Hn(o,i,0,[xe(Qn(t)/i,4),xe(Kn(t)/i,4)]),a=Hn(o,i,0,[xe(this.kc*Qn(t)/i,4),xe(this.kc*Kn(t)/i,4)]),u=this.Dt;if(u&&this.xc==this.getRevision()&&u.getResolution()==n&&u.getPixelRatio()==e&&jn(u.getExtent(),s))return u;var c={SERVICE:"WMS",VERSION:Jw,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};E(c,this.wc),this.gc[0]=we(Qn(a)/i,4),this.gc[1]=we(Kn(a)/i,4);var f=this._c(a,this.gc,e,r,c);return this.Dt=new go(a,n,e,f,this.qt,this.zt),this.xc=this.getRevision(),this.Dt.addEventListener(D,this.handleImageChange.bind(this)),this.Dt},n.prototype.getImageLoadFunction=function(){return this.zt},n.prototype._c=function(t,n,e,r,i){if(Mt(void 0!==this.Li,9),i[this.Tc?"CRS":"SRS"]=r.getCode(),"STYLES"in this.wc||(i.STYLES=""),1!=e)switch(this.Ac){case tg:var o=90*e+.5|0;"FORMAT_OPTIONS"in i?i.FORMAT_OPTIONS+=";dpi:"+o:i.FORMAT_OPTIONS="dpi:"+o;break;case ng:i.MAP_RESOLUTION=90*e;break;case Qw:case eg:i.DPI=90*e;break;default:Mt(!1,8)}i.WIDTH=n[0],i.HEIGHT=n[1];var s,a=r.getAxisOrientation();return s=this.Tc&&"ne"==a.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,i.BBOX=s.join(","),eh(this.Li,i)},n.prototype.getUrl=function(){return this.Li},n.prototype.setImageLoadFunction=function(t){this.Dt=null,this.zt=t,this.changed()},n.prototype.setUrl=function(t){t!=this.Li&&(this.Li=t,this.Dt=null,this.changed())},n.prototype.updateParams=function(t){E(this.wc,t),this.Ec(),this.Dt=null,this.changed()},n.prototype.Ec=function(){var t=this.wc.VERSION||Jw;this.Tc=Je(t,"1.3")>=0},n}(qw),sg={"image/png":!0,"image/jpeg":!0,"image/gif":!0,"image/webp":!0},ag={"application/vnd.mapbox-vector-tile":!0,"application/geo+json":!0};function ug(t,n){for(var e,r,i=0;i<t.length;++i){var o=t[i];if("item"===o.rel){if(o.type===n){e=o.href;break}sg[o.type]?r=o.href:r||0!==o.type.indexOf("image/")||(r=o.href)}}if(!e){if(!r)throw new Error('Could not find "item" link');e=r}return e}function cg(t,n,e){for(var r,i,o={},s=0;s<t.length;++s){var a=t[s];if(o[a.type]=a.href,"item"===a.rel){if(a.type===n){r=a.href;break}ag[a.type]&&(i=a.href)}}if(!r&&e)for(s=0;s<e.length;++s){var u=e[s];if(o[u]){r=o[u];break}}if(!r){if(!i)throw new Error('Could not find "item" link');r=i}return r}function fg(t,n,e,r){var i=t.projection;if(!i&&!(i=mr(n.crs)))throw new Error("Unsupported CRS: "+n.crs);for(var o="en"!==i.getAxisOrientation().substr(0,2),s=n.tileMatrices,a={},u=0;u<s.length;++u){var c=s[u];a[c.id]=c}var f={},h=[];if(r)for(u=0;u<r.length;++u){var l=(w=r[u]).tileMatrix;h.push(l),f[l]=w}else for(u=0;u<s.length;++u){l=s[u].id;h.push(l)}var v=h.length,d=new Array(v),p=new Array(v),y=new Array(v),m=new Array(v),b=[-1/0,-1/0,1/0,1/0];for(u=0;u<v;++u){l=h[u];var w,g=(c=a[l]).pointOfOrigin;if(d[u]=o?[g[1],g[0]]:g,p[u]=c.cellSize,y[u]=[c.matrixWidth,c.matrixHeight],m[u]=[c.tileWidth,c.tileHeight],w=f[l]){var x=c.cellSize*c.tileWidth,k=d[u][0]+w.minTileCol*x,_=d[u][0]+(w.maxTileCol+1)*x,S=c.cellSize*c.tileHeight,M=void 0,j=void 0;"bottomLeft"===c.cornerOfOrigin?(M=d[u][1]+w.minTileRow*S,j=d[u][1]+(w.maxTileRow+1)*S):(M=d[u][1]-(w.maxTileRow+1)*S,j=d[u][1]-w.minTileRow*S),Xn(b,[k,M,_,j],b)}}var O=new qf({origins:d,resolutions:p,sizes:y,tileSizes:m,extent:r?b:void 0}),T=t.context,A=t.url;return{grid:O,urlTemplate:e,urlFunction:function(t,n,i){if(t){var o=h[t[0]],s=a[o],u="bottomLeft"===s.cornerOfOrigin,c={tileMatrix:o,tileCol:t[1],tileRow:u?-t[2]-1:t[2]};if(r){var l=f[s.id];if(c.tileCol<l.minTileCol||c.tileCol>l.maxTileCol||c.tileRow<l.minTileRow||c.tileRow>l.maxTileRow)return}E(c,T);var v=e.replace(/\{(\w+?)\}/g,(function(t,n){return c[n]}));return mf(A,v)}}}}function hg(t){return yf(t.url).then((function(n){return function(t,n){var e,r=n.tileMatrixSetLimits;if("map"===n.dataType)e=ug(n.links,t.mediaType);else{if("vector"!==n.dataType)throw new Error('Expected tileset data type to be "map" or "vector"');e=cg(n.links,t.mediaType,t.supportedMediaTypes)}if(n.tileMatrixSet)return fg(t,n.tileMatrixSet,e,r);var i=n.links.find((function(t){return"http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme"===t.rel}));if(!i)throw new Error("Expected http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme link or tileMatrixSet");var o=i.href;return yf(mf(t.url,o)).then((function(n){return fg(t,n,e,r)}))}(t,n)}))}var lg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),vg=function(t){function n(n){var e=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),e=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:r,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:hs,tileLoadFunction:n.tileLoadFunction,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})||this,hg({url:n.url,projection:e.getProjection(),mediaType:n.mediaType,context:n.context||null}).then(e.Cc.bind(e)).catch(e.Rc.bind(e)),e}return lg(n,t),n.prototype.Cc=function(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState(ls)},n.prototype.Rc=function(t){console.error(t),this.setState(vs)},n}(vd),dg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),pg=function(t){function n(n){var e=this,r=n.projection||"EPSG:3857",i=n.extent||Xf(r),o=n.tileGrid||Wf({extent:i,maxResolution:n.maxResolution,maxZoom:void 0!==n.maxZoom?n.maxZoom:22,minZoom:n.minZoom,tileSize:n.tileSize||512});return(e=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,interpolate:!0,opaque:!1,projection:r,state:n.state,tileGrid:o,tileLoadFunction:n.tileLoadFunction?n.tileLoadFunction:yg,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:void 0===n.zDirection?1:n.zDirection})||this).Ni=n.format?n.format:null,e.sourceTileCache=new Zc(e.tileCache.highWaterMark),e.Du=null==n.overlaps||n.overlaps,e.tileClass=n.tileClass?n.tileClass:tf,e.Ic={},e}return dg(n,t),n.prototype.getFeaturesInExtent=function(t){var n=[],e=this.tileCache;if(0===e.getCount())return n;var r=Bc(e.peekFirstKey())[0],i=this.tileGrid;return e.forEach((function(e){if(e.tileCoord[0]===r&&e.getState()===dt)for(var o=e.getSourceTiles(),s=0,a=o.length;s<a;++s){var u=o[s],c=u.tileCoord;if(te(t,i.getTileCoordExtent(c))){var f=u.getFeatures();if(f)for(var h=0,l=f.length;h<l;++h){var v=f[h],d=v.getGeometry();te(t,d.getExtent())&&n.push(v)}}}})),n},n.prototype.getOverlaps=function(){return this.Du},n.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},n.prototype.expireCache=function(n,e){var r=this.getTileCacheForProjection(n),i=Object.keys(e).reduce((function(t,n){var e=Uc(n);if(r.containsKey(e))for(var i=r.get(e).sourceTiles,o=0,s=i.length;o<s;++o)t[i[o].getKey()]=!0;return t}),{});t.prototype.expireCache.call(this,n,e),this.sourceTileCache.expireCache(i)},n.prototype.getSourceTiles=function(t,n,e){var r=this;if(e.getState()===lt){e.setState(vt);var i=e.wrappedTileCoord,o=this.getTileGridForProjection(n),s=o.getTileCoordExtent(i),a=i[0],u=o.getResolution(a);kn(s,-u,s);var c=this.tileGrid,f=c.getExtent();f&&Xn(s,f,s);var h=c.getZForResolution(u,1);c.forEachTileCoord(s,h,(function(i){var o=r.tileUrlFunction(i,t,n),s=r.sourceTileCache.containsKey(o)?r.sourceTileCache.get(o):new r.tileClass(i,o?lt:yt,o,r.Ni,r.tileLoadFunction);e.sourceTiles.push(s);var a=s.getState();if(a<dt){s.addEventListener(D,(function t(n){r.handleTileChange(n);var i=s.getState();if(i===dt||i===pt){var o=s.getKey();o in e.errorTileKeys?s.getState()===dt&&delete e.errorTileKeys[o]:e.loadingSourceTiles--,i===pt?e.errorTileKeys[o]=!0:s.removeEventListener(D,t),0===e.loadingSourceTiles&&e.setState(R(e.errorTileKeys)?dt:pt)}})),e.loadingSourceTiles++}a===lt&&(s.extent=c.getTileCoordExtent(i),s.projection=n,s.resolution=c.getResolution(i[0]),r.sourceTileCache.set(o,s),s.load())})),e.loadingSourceTiles||e.setState(e.sourceTiles.some((function(t){return t.getState()===pt}))?pt:dt)}return e.sourceTiles},n.prototype.getTile=function(t,n,e,r,i){var o,s=Fc(t,n,e),a=this.getKey();if(this.tileCache.containsKey(s)&&(o=this.tileCache.get(s)).key===a)return o;var u=[t,n,e],c=this.getTileCoordForTileUrlFunction(u,i),f=this.getTileGrid().getExtent(),h=this.getTileGridForProjection(i);if(c&&f){var l=h.getTileCoordExtent(c);kn(l,-h.getResolution(t),l),te(f,l)||(c=null)}var v=!0;if(null!==c){var d=this.tileGrid,p=h.getResolution(t),y=d.getZForResolution(p,1),m=h.getTileCoordExtent(c);kn(m,-p,m),d.forEachTileCoord(m,y,function(t){v=v&&!this.tileUrlFunction(t,r,i)}.bind(this))}var b=new Jc(u,v?yt:lt,c,this.getSourceTiles.bind(this,r,i));return b.key=a,o?(b.interimTile=o,b.refreshInterimChain(),this.tileCache.replace(s,b)):this.tileCache.set(s,b),b},n.prototype.getTileGridForProjection=function(t){var n=t.getCode(),e=this.Ic[n];if(!e){var r=this.tileGrid;e=Kf(t,void 0,r?r.getTileSize(r.getMinZoom()):void 0),this.Ic[n]=e}return e},n.prototype.getTilePixelRatio=function(t){return t},n.prototype.getTilePixelSize=function(t,n,e){var r=eu(this.getTileGridForProjection(e).getTileSize(t),this.tmpSize);return[Math.round(r[0]*n),Math.round(r[1]*n)]},n.prototype.updateCacheSize=function(n,e){t.prototype.updateCacheSize.call(this,2*n,e),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(e).highWaterMark},n}(fd);function yg(t,n){t.setLoader((function(e,r,i){uf(n,t.getFormat(),e,r,i,t.onLoad.bind(t),t.onError.bind(t))}))}var mg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),bg=function(t){function n(n){var e=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,format:n.format,overlaps:n.overlaps,projection:n.projection,tileClass:n.tileClass,transition:n.transition,wrapX:n.wrapX,zDirection:n.zDirection,state:hs})||this;return hg({url:n.url,projection:e.getProjection(),mediaType:n.mediaType,supportedMediaTypes:n.format.supportedMediaTypes,context:n.context||null}).then(e.Cc.bind(e)).catch(e.Rc.bind(e)),e}return mg(n,t),n.prototype.Cc=function(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState(ls)},n.prototype.Rc=function(t){console.error(t),this.setState(vs)},n}(pg),wg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),gg='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',xg=function(t){function n(n){var e,r=n||{},i=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(i=r.interpolate),e=void 0!==r.attributions?r.attributions:[gg];var o=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",s=void 0!==r.url?r.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:e,attributionsCollapsible:!1,cacheSize:r.cacheSize,crossOrigin:o,interpolate:i,maxZoom:void 0!==r.maxZoom?r.maxZoom:19,opaque:void 0===r.opaque||r.opaque,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileLoadFunction:r.tileLoadFunction,transition:r.transition,url:s,wrapX:r.wrapX,zDirection:r.zDirection})||this}return wg(n,t),n}(bd),kg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),_g=function(t){function n(n){var e=n||{};return t.call(this,e)||this}return kg(n,t),n}(ys),Sg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Mg=function(t){function n(n){var e=t.call(this,n)||this;return e.container=null,e.renderedResolution,e.tempTransform=[1,0,0,1,0,0],e.pixelTransform=[1,0,0,1,0,0],e.inversePixelTransform=[1,0,0,1,0,0],e.context=null,e.containerReused=!1,e.qs=null,e}return Sg(n,t),n.prototype.getBackground=function(t){var n=this.getLayer().getBackground();return"function"==typeof n&&(n=n(t.viewState.resolution)),n||void 0},n.prototype.useContainer=function(t,n,e,r){var i,o,s=this.getLayer().getClassName();t&&t.className===s&&""===t.style.opacity&&1===e&&(!r||t.style.backgroundColor&&x(Lo(t.style.backgroundColor),Lo(r)))&&((u=t.firstElementChild)instanceof HTMLCanvasElement&&(o=u.getContext("2d")));if(o&&o.canvas.style.transform===n?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(i=document.createElement("div")).className=s;var a=i.style;a.position="absolute",a.width="100%",a.height="100%",r&&(a.backgroundColor=r);var u=(o=_o()).canvas;i.appendChild(u),(a=u.style).position="absolute",a.left="0",a.transformOrigin="top left",this.container=i,this.context=o}},n.prototype.clipUnrotated=function(t,n,e){var r=Yn(e),i=Jn(e),o=Vn(e),s=$n(e);nn(n.coordinateToPixelTransform,r),nn(n.coordinateToPixelTransform,i),nn(n.coordinateToPixelTransform,o),nn(n.coordinateToPixelTransform,s);var a=this.inversePixelTransform;nn(a,r),nn(a,i),nn(a,o),nn(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},n.prototype.Zs=function(t,n,e){var r=this.getLayer();if(r.hasListener(t)){var i=new xs(t,this.inversePixelTransform,e,n);r.dispatchEvent(i)}},n.prototype.preRender=function(t,n){this.Zs(os,t,n)},n.prototype.postRender=function(t,n){this.Zs(ss,t,n)},n.prototype.getRenderTransform=function(t,n,e,r,i,o,s){var a=i/2,u=o/2,c=r/n,f=-c,h=-t[0]+s,l=-t[1];return an(this.tempTransform,a,u,c,f,-e,h,l)},n.prototype.getDataAtPixel=function(t,n,e){var r=nn(this.inversePixelTransform,t.slice()),i=this.context,o=this.getLayer().getExtent();if(o&&!Mn(o,nn(n.pixelToCoordinateTransform,t.slice())))return null;var s,a=Math.round(r[0]),u=Math.round(r[1]),c=this.qs;if(!c){var f=document.createElement("canvas");f.width=1,f.height=1,c=f.getContext("2d"),this.qs=c}c.clearRect(0,0,1,1);try{c.drawImage(i.canvas,a,u,1,1,0,0,1,1),s=c.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?(this.qs=null,new Uint8Array):s}return 0===s[3]?null:s},n}(ml),jg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Og=function(t){function n(n){var e=t.call(this,n)||this;return e.Dt=null,e}return jg(n,t),n.prototype.getImage=function(){return this.Dt?this.Dt.getImage():null},n.prototype.prepareFrame=function(t){var n=t.layerStatesArray[t.layerIndex],e=t.pixelRatio,r=t.viewState,i=r.resolution,o=this.getLayer().getSource(),s=t.viewHints,a=t.extent;if(void 0!==n.extent&&(a=Xn(a,Nr(n.extent,r.projection))),!s[Aa]&&!s[Ca]&&!ne(a))if(o){var u=r.projection,c=o.getImage(a,i,e,u);c&&this.loadImage(c)&&(this.Dt=c)}else this.Dt=null;return!!this.Dt},n.prototype.renderFrame=function(t,n){var e=this.Dt,r=e.getExtent(),i=e.getResolution(),o=e.getPixelRatio(),s=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,u=t.viewState,c=u.center,f=u.resolution,h=t.size,l=a*i/(f*o),v=Math.round(h[0]*a),d=Math.round(h[1]*a),p=u.rotation;if(p){var y=Math.round(Math.sqrt(v*v+d*d));v=y,d=y}an(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,p,-v/2,-d/2),un(this.inversePixelTransform,this.pixelTransform);var m=fn(this.pixelTransform);this.useContainer(n,m,s.opacity,this.getBackground(t));var b=this.context,w=b.canvas;w.width!=v||w.height!=d?(w.width=v,w.height=d):this.containerReused||b.clearRect(0,0,v,d);var g=!1,x=!0;if(s.extent){var k=Nr(s.extent,u.projection);(g=(x=te(k,t.extent))&&!jn(k,t.extent))&&this.clipUnrotated(b,t,k)}var _=e.getImage(),S=an(this.tempTransform,v/2,d/2,l,l,0,o*(r[0]-c[0])/i,o*(c[1]-r[3])/i);this.renderedResolution=i*a/o;var M=_.width*S[0],j=_.height*S[3];if(this.getLayer().getSource().getInterpolate()||E(b,Df),this.preRender(b,t),x&&M>=.5&&j>=.5){var O=S[4],T=S[5],A=s.opacity,C=void 0;1!==A&&(C=b.globalAlpha,b.globalAlpha=A),b.drawImage(_,0,0,+_.width,+_.height,Math.round(O),Math.round(T),Math.round(M),Math.round(j)),1!==A&&(b.globalAlpha=C)}return this.postRender(b,t),g&&b.restore(),E(b,Nf),m!==w.style.transform&&(w.style.transform=m),this.container},n}(Mg),Tg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Eg=function(t){function n(n){return t.call(this,n)||this}return Tg(n,t),n.prototype.createRenderer=function(){return new Og(this)},n}(_g),Ag="preload",Cg="useInterimTilesOnError",Rg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ig=function(t){function n(n){var e=this,r=n||{},i=E({},r);return delete i.preload,delete i.useInterimTilesOnError,(e=t.call(this,i)||this).on,e.once,e.un,e.setPreload(void 0!==r.preload?r.preload:0),e.setUseInterimTilesOnError(void 0===r.useInterimTilesOnError||r.useInterimTilesOnError),e}return Rg(n,t),n.prototype.getPreload=function(){return this.get(Ag)},n.prototype.setPreload=function(t){this.set(Ag,t)},n.prototype.getUseInterimTilesOnError=function(){return this.get(Cg)},n.prototype.setUseInterimTilesOnError=function(t){this.set(Cg,t)},n}(ys),Pg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Dg=function(t){function n(n){var e=t.call(this,n)||this;return e.extentChanged=!0,e.Pc=null,e.renderedPixelRatio,e.renderedProjection=null,e.renderedRevision,e.renderedTiles=[],e.Dc=!1,e.tmpExtent=[1/0,1/0,-1/0,-1/0],e.Nc=new Kc(0,0,0,0),e}return Pg(n,t),n.prototype.isDrawableTile=function(t){var n=this.getLayer(),e=t.getState(),r=n.getUseInterimTilesOnError();return e==dt||e==yt||e==pt&&!r},n.prototype.getTile=function(t,n,e,r){var i=r.pixelRatio,o=r.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,n,e,i,o);return a.getState()==pt&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.Dc=!0):a.setState(dt)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},n.prototype.loadedTileCallback=function(n,e,r){return!!this.isDrawableTile(r)&&t.prototype.loadedTileCallback.call(this,n,e,r)},n.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},n.prototype.renderFrame=function(t,n){var e=t.layerStatesArray[t.layerIndex],r=t.viewState,i=r.projection,s=r.resolution,a=r.center,u=r.rotation,c=t.pixelRatio,f=this.getLayer(),h=f.getSource(),l=h.getRevision(),v=h.getTileGridForProjection(i),d=v.getZForResolution(s,h.zDirection),y=v.getResolution(d),m=t.extent,b=e.extent&&Nr(e.extent,i);b&&(m=Xn(m,Nr(e.extent,i)));var w=h.getTilePixelRatio(c),g=Math.round(t.size[0]*w),x=Math.round(t.size[1]*w);if(u){var k=Math.round(Math.sqrt(g*g+x*x));g=k,x=k}var _=y*g/2/w,S=y*x/2/w,M=[a[0]-_,a[1]-S,a[0]+_,a[1]+S],j=v.getTileRangeForExtentAndZ(m,d),O={};O[d]={};var T=this.createLoadedTileFinder(h,i,O),A=this.tmpExtent,C=this.Nc;this.Dc=!1;for(var R=j.minX;R<=j.maxX;++R)for(var I=j.minY;I<=j.maxY;++I){var P=this.getTile(d,R,I,t);if(this.isDrawableTile(P)){var D=o(this);if(P.getState()==dt){O[d][P.tileCoord.toString()]=P;var N=P.inTransition(D);this.Dc||!N&&-1!==this.renderedTiles.indexOf(P)||(this.Dc=!0)}if(1===P.getAlpha(D,t.time))continue}var z=v.getTileCoordChildTileRange(P.tileCoord,C,A),L=!1;z&&(L=T(d+1,z)),L||v.forEachTileCoordParentTileRange(P.tileCoord,T,C,A)}var F=y/s;an(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/w,1/w,u,-g/2,-x/2);var G=fn(this.pixelTransform);this.useContainer(n,G,e.opacity,this.getBackground(t));var U=this.context,B=U.canvas;un(this.inversePixelTransform,this.pixelTransform),an(this.tempTransform,g/2,x/2,F,F,0,-g/2,-x/2),B.width!=g||B.height!=x?(B.width=g,B.height=x):this.containerReused||U.clearRect(0,0,g,x),b&&this.clipUnrotated(U,t,b),h.getInterpolate()||E(U,Df),this.preRender(U,t),this.renderedTiles.length=0;var q,$,V,Z=Object.keys(O).map(Number);Z.sort(p),1!==e.opacity||this.containerReused&&!h.getOpaque(t.viewState.projection)?(q=[],$=[]):Z=Z.reverse();for(var W=Z.length-1;W>=0;--W){var H=Z[W],K=h.getTilePixelSize(H,c,i),X=v.getResolution(H)/y,Y=K[0]*X*F,J=K[1]*X*F,Q=v.getTileCoordForCoordAndZ(Yn(M),H),tt=v.getTileCoordExtent(Q),nt=nn(this.tempTransform,[w*(tt[0]-M[0])/y,w*(M[3]-tt[3])/y]),et=w*h.getGutterForProjection(i),rt=O[H];for(var it in rt){var ot=(P=rt[it]).tileCoord,st=Q[1]-ot[1],at=Math.round(nt[0]-(st-1)*Y),ut=Q[2]-ot[2],ct=Math.round(nt[1]-(ut-1)*J),ft=at-(R=Math.round(nt[0]-st*Y)),ht=ct-(I=Math.round(nt[1]-ut*J)),lt=d===H;if(!(N=lt&&1!==P.getAlpha(o(this),t.time)))if(q){U.save(),V=[R,I,R+ft,I,R+ft,I+ht,R,I+ht];for(var vt=0,pt=q.length;vt<pt;++vt)if(d!==H&&H<$[vt]){var yt=q[vt];U.beginPath(),U.moveTo(V[0],V[1]),U.lineTo(V[2],V[3]),U.lineTo(V[4],V[5]),U.lineTo(V[6],V[7]),U.moveTo(yt[6],yt[7]),U.lineTo(yt[4],yt[5]),U.lineTo(yt[2],yt[3]),U.lineTo(yt[0],yt[1]),U.clip()}q.push(V),$.push(H)}else U.clearRect(R,I,ft,ht);this.drawTileImage(P,t,R,I,ft,ht,et,lt),q&&!N?(U.restore(),this.renderedTiles.unshift(P)):this.renderedTiles.push(P),this.updateUsedTiles(t.usedTiles,h,P)}}this.renderedRevision=l,this.renderedResolution=y,this.extentChanged=!this.Pc||!Pn(this.Pc,M),this.Pc=M,this.renderedPixelRatio=c,this.renderedProjection=i,this.manageTilePyramid(t,h,v,c,i,m,d,f.getPreload()),this.scheduleExpireCache(t,h),this.postRender(U,t),e.extent&&U.restore(),E(U,Nf),G!==B.style.transform&&(B.style.transform=G);var mt=Cs(e.opacity),bt=this.container;return mt!==bt.style.opacity&&(bt.style.opacity=mt),this.container},n.prototype.drawTileImage=function(t,n,e,r,i,s,a,u){var c=this.getTileImage(t);if(c){var f=o(this),h=u?t.getAlpha(f,n.time):1,l=h!==this.context.globalAlpha;l&&(this.context.save(),this.context.globalAlpha=h),this.context.drawImage(c,a,a,c.width-2*a,c.height-2*a,e,r,i,s),l&&this.context.restore(),1!==h?n.animate=!0:u&&t.endTransition(f)}},n.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},n.prototype.getTileImage=function(t){return t.getImage()},n.prototype.scheduleExpireCache=function(t,n){if(n.canExpireCache()){var e=function(t,n,e){var r=o(t);r in e.usedTiles&&t.expireCache(e.viewState.projection,e.usedTiles[r])}.bind(null,n);t.postRenderFunctions.push(e)}},n.prototype.updateUsedTiles=function(t,n,e){var r=o(n);r in t||(t[r]={}),t[r][e.getKey()]=!0},n.prototype.manageTilePyramid=function(t,n,e,r,i,s,a,u,c){var f=o(n);f in t.wantedTiles||(t.wantedTiles[f]={});var h,l,v,d,p,y,m=t.wantedTiles[f],b=t.tileQueue,w=0;for(y=e.getMinZoom();y<=a;++y)for(l=e.getTileRangeForExtentAndZ(s,y,l),v=e.getResolution(y),d=l.minX;d<=l.maxX;++d)for(p=l.minY;p<=l.maxY;++p)a-y<=u?(++w,(h=n.getTile(y,d,p,r,i)).getState()==lt&&(m[h.getKey()]=!0,b.isKeyQueued(h.getKey())||b.enqueue([h,f,e.getTileCoordCenter(h.tileCoord),v])),void 0!==c&&c(h)):n.useTile(y,d,p,i);n.updateCacheSize(w,i)},n}(Mg);Dg.prototype.getLayer;var Ng,zg=Dg,Lg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Fg=function(t){function n(n){return t.call(this,n)||this}return Lg(n,t),n.prototype.createRenderer=function(){return new zg(this)},n}(Ig),Gg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ug=!0;try{new ImageData(10,10)}catch(t){Ug=!1}function Bg(t,n,e){if(Ug)return new ImageData(t,n,e);Ng||(Ng=document.createElement("canvas").getContext("2d"));var r=Ng.createImageData(n,e);return r.data.set(t),r}function qg(t){var n=!0;try{new ImageData(10,10)}catch(t){n=!1}function e(t,e,r){return n?new ImageData(t,e,r):{data:t,width:e,height:r}}return function(n){var r=n.buffers,i=n.meta,o=n.imageOps,s=n.width,a=n.height,u=r.length,c=r[0].byteLength;if(o){for(var f=new Array(u),h=0;h<u;++h)f[h]=e(new Uint8ClampedArray(r[h]),s,a);return t(f,i).data.buffer}var l=new Uint8ClampedArray(c),v=new Array(u),d=new Array(u);for(h=0;h<u;++h)v[h]=new Uint8ClampedArray(r[h]),d[h]=[0,0,0,0];for(var p=0;p<c;p+=4){for(var y=0;y<u;++y){var m=v[y];d[y][0]=m[p],d[y][1]=m[p+1],d[y][2]=m[p+2],d[y][3]=m[p+3]}var b=t(d,i);l[p]=b[0],l[p+1]=b[1],l[p+2]=b[2],l[p+3]=b[3]}return l.buffer}}function $g(t,n){var e=Object.keys(t.lib||{}).map((function(n){return"var "+n+" = "+t.lib[n].toString()+";"})).concat(["var __minion__ = ("+qg.toString()+")(",t.operation.toString(),");",'self.addEventListener("message", function(event) {'," var buffer = __minion__(event.data);"," self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),r=new Worker("undefined"==typeof Blob?"data:text/javascript;base64,"+Buffer.from(e.join("\n"),"binary").toString("base64"):URL.createObjectURL(new Blob(e,{type:"text/javascript"})));return r.addEventListener("message",n),r}var Vg=function(t){function n(n){var e,r=t.call(this)||this;r._imageOps=!!n.imageOps,e=0===n.threads?0:r._imageOps?1:n.threads||1;var i=new Array(e);if(e)for(var o=0;o<e;++o)i[o]=$g(n,r._onWorkerMessage.bind(r,o));else i[0]=function(t,n){var e=qg(t.operation),r=!1;return{postMessage:function(t){setTimeout((function(){r||n({data:{buffer:e(t),meta:t.meta}})}),0)},terminate:function(){r=!0}}}(n,r._onWorkerMessage.bind(r,0));return r._workers=i,r._queue=[],r._maxQueueLength=n.queue||1/0,r._running=0,r._dataLookup={},r._job=null,r}return Gg(n,t),n.prototype.process=function(t,n,e){this._enqueue({inputs:t,meta:n,callback:e}),this._dispatch()},n.prototype._enqueue=function(t){for(this._queue.push(t);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)},n.prototype._dispatch=function(){if(!this._running&&0!==this._queue.length){var t=this._queue.shift();this._job=t;var n=t.inputs[0].width,e=t.inputs[0].height,r=t.inputs.map((function(t){return t.data.buffer})),i=this._workers.length;if(this._running=i,1!==i)for(var o=t.inputs[0].data.length,s=4*Math.ceil(o/4/i),a=0;a<i;++a){for(var u=a*s,c=[],f=0,h=r.length;f<h;++f)c.push(r[f].slice(u,u+s));this._workers[a].postMessage({buffers:c,meta:t.meta,imageOps:this._imageOps,width:n,height:e},c)}else this._workers[0].postMessage({buffers:r,meta:t.meta,imageOps:this._imageOps,width:n,height:e},r)}},n.prototype._onWorkerMessage=function(t,n){this.disposed||(this._dataLookup[t]=n.data,--this._running,0===this._running&&this._resolveJob())},n.prototype._resolveJob=function(){var t,n,e=this._job,r=this._workers.length;if(1===r)t=new Uint8ClampedArray(this._dataLookup[0].buffer),n=this._dataLookup[0].meta;else{var i=e.inputs[0].data.length;t=new Uint8ClampedArray(i),n=new Array(r);for(var o=4*Math.ceil(i/4/r),s=0;s<r;++s){var a=this._dataLookup[s].buffer,u=s*o;t.set(new Uint8ClampedArray(a),u),n[s]=this._dataLookup[s].meta}}this._job=null,this._dataLookup={},e.callback(null,Bg(t,e.inputs[0].width,e.inputs[0].height),n),this._dispatch()},n.prototype.disposeInternal=function(){for(var t=0;t<this._workers.length;++t)this._workers[t].terminate();this._workers.length=0},n}(v),Zg="beforeoperations",Wg="afteroperations",Hg="pixel",Kg="image",Xg=function(t){function n(n,e,r){var i=t.call(this,n)||this;return i.extent=e.extent,i.resolution=e.viewState.resolution/e.pixelRatio,i.data=r,i}return Gg(n,t),n}(h),Yg=function(t){function n(n){var e=t.call(this,{projection:null})||this;e.on,e.once,e.un,e.zc=null,e.Lc=void 0!==n.operationType?n.operationType:Hg,e.Fc=void 0!==n.threads?n.threads:1,e.Gc=function(t){for(var n=t.length,e=new Array(n),r=0;r<n;++r)e[r]=tx(t[r]);return e}(n.sources);for(var r,i=e.changed.bind(e),s=0,a=e.Gc.length;s<a;++s)e.Gc[s].addEventListener(D,i);return e.ur=new Ta((function(){return 1}),e.changed.bind(e)),e.Uc,e.Bc=null,e.xc,e.We={animate:!1,coordinateToPixelTransform:[1,0,0,1,0,0],declutterTree:null,extent:null,index:0,layerIndex:0,layerStatesArray:(r=e.Gc,r.map((function(t){return t.getLayerState()}))),pixelRatio:1,pixelToCoordinateTransform:[1,0,0,1,0,0],postRenderFunctions:[],size:[0,0],tileQueue:e.ur,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},mapId:o(e),renderTargets:{}},e.setAttributions((function(t){for(var e=[],r=0,i=n.sources.length;r<i;++r){var o=n.sources[r],s=(o instanceof id?o:o.getSource()).getAttributions();if("function"==typeof s){var a=s(t);e.push.apply(e,a)}}return 0!==e.length?e:null})),void 0!==n.operation&&e.setOperation(n.operation,n.lib),e}return Gg(n,t),n.prototype.setOperation=function(t,n){this.zc&&this.zc.dispose(),this.zc=new Vg({operation:t,imageOps:this.Lc===Kg,queue:1,lib:n,threads:this.Fc}),this.changed()},n.prototype.qc=function(t,n,e){var r=E({},this.We);r.viewState=E({},r.viewState);var i=Zn(t);r.extent=t.slice(),r.size[0]=Math.round(Qn(t)/n),r.size[1]=Math.round(Kn(t)/n),r.time=Date.now();var o=r.viewState;return o.center=i,o.projection=e,o.resolution=n,r},n.prototype.$c=function(){for(var t=!0,n=0,e=this.Gc.length;n<e;++n)if(this.Gc[n].getSource().getState()!==ls){t=!1;break}return t},n.prototype.getImage=function(t,n,e,r){if(!this.$c())return null;var i=this.qc(t,n,r);if(this.Uc=i,this.Bc){var o=this.Bc.getResolution(),s=this.Bc.getExtent();n===o&&Pn(t,s)||(this.Bc=null)}return this.Bc&&this.getRevision()===this.xc||this.Vc(),i.tileQueue.loadMoreTiles(16,16),i.animate&&requestAnimationFrame(this.changed.bind(this)),this.Bc},n.prototype.Vc=function(){for(var t=this.Uc,n=this.Gc.length,e=new Array(n),r=0;r<n;++r){t.layerIndex=r;var i=Qg(this.Gc[r],t);if(!i)return;e[r]=i}var o={};this.dispatchEvent(new Xg(Zg,t,o)),this.zc.process(e,o,this.Zc.bind(this,t))},n.prototype.Zc=function(t,n,e,r){if(!n&&e){var i=t.extent,o=t.viewState.resolution;if(o===this.Uc.viewState.resolution&&Pn(i,this.Uc.extent)){var s;if(this.Bc)s=this.Bc.getImage().getContext("2d");else s=_o(Math.round(Qn(i)/o),Math.round(Kn(i)/o)),this.Bc=new ko(i,o,1,s.canvas);s.putImageData(e,0,0),this.changed(),this.xc=this.getRevision(),this.dispatchEvent(new Xg(Wg,t,r)),t.animate&&requestAnimationFrame(this.changed.bind(this))}}},n.prototype.disposeInternal=function(){this.zc&&this.zc.dispose(),t.prototype.disposeInternal.call(this)},n}(qw);Yg.prototype.dispose;var Jg=null;function Qg(t,n){var e=t.getRenderer();if(!e)throw new Error("Unsupported layer type: "+t);if(!e.prepareFrame(n))return null;var r=n.size[0],i=n.size[1];if(0===r||0===i)return null;var o,s=e.renderFrame(n,null);if(s&&(o=s.firstElementChild),!(o instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+o);if(o.width===r&&o.height===i)return o.getContext("2d").getImageData(0,0,r,i);if(Jg){var a=Jg.canvas;a.width!==r||a.height!==i?Jg=_o(r,i):Jg.clearRect(0,0,r,i)}else Jg=_o(r,i);return Jg.drawImage(o,0,0,r,i),Jg.getImageData(0,0,r,i)}function tx(t){var n;return t instanceof id?t instanceof ud?n=new Fg({source:t}):t instanceof qw&&(n=new Eg({source:t})):n=t,n}var nx=Yg,ex=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),rx=['Map tiles by <a href="https://stamen.com/" target="_blank">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.',gg],ix={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},ox={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},sx=function(t){function n(n){var e=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(e=n.interpolate);var r=n.layer.indexOf("-"),i=-1==r?n.layer:n.layer.slice(0,r),o=ox[i],s=ix[n.layer],a=void 0!==n.url?n.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+n.layer+"/{z}/{x}/{y}."+s.extension;return t.call(this,{attributions:rx,cacheSize:n.cacheSize,crossOrigin:"anonymous",interpolate:e,maxZoom:null!=n.maxZoom?n.maxZoom:o.maxZoom,minZoom:null!=n.minZoom?n.minZoom:o.minZoom,opaque:s.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:a,wrapX:n.wrapX,zDirection:n.zDirection})||this}return ex(n,t),n}(bd),ax=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ux=function(t){function n(n){var e=this,r=n||{},i=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(i=r.interpolate),(e=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:i,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:r.tileGrid,tileLoadFunction:r.tileLoadFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,zDirection:r.zDirection})||this).wc=r.params||{},e.ku=void 0===r.hidpi||r.hidpi,e.Eo=[1/0,1/0,-1/0,-1/0],e.setKey(e.Wc()),e}return ax(n,t),n.prototype.Wc=function(){var t=0,n=[];for(var e in this.wc)n[t++]=e+"-"+this.wc[e];return n.join("/")},n.prototype.getParams=function(){return this.wc},n.prototype._c=function(t,n,e,r,i,o){var s=this.urls;if(s){var a,u=i.getCode().split(/:(?=\d+$)/).pop();if(o.SIZE=n[0]+","+n[1],o.BBOX=e.join(","),o.BBOXSR=u,o.IMAGESR=u,o.DPI=Math.round(o.DPI?o.DPI*r:90*r),1==s.length)a=s[0];else a=s[ye(qc(t),s.length)];return eh(a.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},n.prototype.getTilePixelRatio=function(t){return this.ku?t:1},n.prototype.updateParams=function(t){E(this.wc,t),this.setKey(this.Wc())},n.prototype.tileUrlFunction=function(t,n,e){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(e)),!(r.getResolutions().length<=t[0])){1==n||this.ku||(n=1);var i=r.getTileCoordExtent(t,this.Eo),o=eu(r.getTileSize(t[0]),this.tmpSize);1!=n&&(o=nu(o,n,this.tmpSize));var s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return E(s,this.wc),this._c(t,o,i,n,e,s)}},n}(vd),cx=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),fx=function(t){function n(n){var e=this,r=n||{};return e=t.call(this,{opaque:!1,projection:r.projection,tileGrid:r.tileGrid,wrapX:void 0===r.wrapX||r.wrapX,zDirection:r.zDirection,url:r.template||"z:{z} x:{x} y:{y}",tileLoadFunction:function(t,n){var r=t.getTileCoord()[0],i=eu(e.tileGrid.getTileSize(r)),o=_o(i[0],i[1]);o.strokeStyle="grey",o.strokeRect(.5,.5,i[0]+.5,i[1]+.5),o.fillStyle="grey",o.strokeStyle="white",o.textAlign="center",o.textBaseline="middle",o.font="24px sans-serif",o.lineWidth=4,o.strokeText(n,i[0]/2,i[1]/2,i[0]),o.fillText(n,i[0]/2,i[1]/2,i[0]),t.setImage(o.canvas)}})||this}return cx(n,t),n}(bd),hx=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),lx=function(t){function n(n){var e=this,r=void 0===n.imageSmoothing||n.imageSmoothing;if(void 0!==n.interpolate&&(r=n.interpolate),(e=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:r,projection:mr("EPSG:3857"),reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:hs,tileLoadFunction:n.tileLoadFunction,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).Hc=null,e.jo=n.tileSize,n.url)if(n.jsonp)lf(n.url,e.handleTileJSONResponse.bind(e),e.handleTileJSONError.bind(e));else{var i=new XMLHttpRequest;i.addEventListener("load",e.Kc.bind(e)),i.addEventListener("error",e.Xc.bind(e)),i.open("GET",n.url),i.send()}else n.tileJSON?e.handleTileJSONResponse(n.tileJSON):Mt(!1,51);return e}return hx(n,t),n.prototype.Kc=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var e=void 0;try{e=JSON.parse(n.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(e)}else this.handleTileJSONError()},n.prototype.Xc=function(t){this.handleTileJSONError()},n.prototype.getTileJSON=function(){return this.Hc},n.prototype.handleTileJSONResponse=function(t){var n,e=mr("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var i=jr(e,r);n=oe(t.bounds,i)}var o=Xf(r),s=t.minzoom||0,a=Wf({extent:o,maxZoom:t.maxzoom||22,minZoom:s,tileSize:this.jo});if(this.tileGrid=a,this.tileUrlFunction=Jf(t.tiles,a),void 0!==t.attribution&&!this.getAttributions()){var u=void 0!==n?n:o;this.setAttributions((function(n){return te(u,n.extent)?[t.attribution]:null}))}this.Hc=t,this.setState(ls)},n.prototype.handleTileJSONError=function(){this.setState(vs)},n}(vd),vx=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),dx=function(t){function n(n){var e=this,r=n||{},i=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(i=r.interpolate);var o=r.params||{},s=!("TRANSPARENT"in o)||o.TRANSPARENT;return(e=t.call(this,{attributions:r.attributions,attributionsCollapsible:r.attributionsCollapsible,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:i,opaque:!s,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileClass:r.tileClass,tileGrid:r.tileGrid,tileLoadFunction:r.tileLoadFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,zDirection:r.zDirection})||this).Ts=void 0!==r.gutter?r.gutter:0,e.wc=o,e.Tc=!0,e.Ac=r.serverType,e.ku=void 0===r.hidpi||r.hidpi,e.Eo=[1/0,1/0,-1/0,-1/0],e.Ec(),e.setKey(e.Wc()),e}return vx(n,t),n.prototype.getFeatureInfoUrl=function(t,n,e,r){var i=mr(e),o=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(i));var a=s.getZForResolution(n,this.zDirection),u=s.getTileCoordForCoordAndZ(t,a);if(!(s.getResolutions().length<=u[0])){var c=s.getResolution(u[0]),f=s.getTileCoordExtent(u,this.Eo),h=eu(s.getTileSize(u[0]),this.tmpSize),l=this.Ts;0!==l&&(h=Qa(h,l,this.tmpSize),f=kn(f,c*l,f)),o&&o!==i&&(c=Ff(o,i,t,c),f=Er(f,i,o),t=Tr(t,i,o));var v={SERVICE:"WMS",VERSION:Jw,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.wc.LAYERS};E(v,this.wc,r);var d=Math.floor((t[0]-f[0])/c),p=Math.floor((f[3]-t[1])/c);return v[this.Tc?"I":"X"]=d,v[this.Tc?"J":"Y"]=p,this._c(u,h,f,1,o||i,v)}},n.prototype.getLegendUrl=function(t,n){if(void 0!==this.urls[0]){var e={SERVICE:"WMS",VERSION:Jw,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===n||void 0===n.LAYER){var r=this.wc.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;e.LAYER=r}if(void 0!==t){var i=this.getProjection()?this.getProjection().getMetersPerUnit():1;e.SCALE=t*i/28e-5}return E(e,n),eh(this.urls[0],e)}},n.prototype.getGutter=function(){return this.Ts},n.prototype.getParams=function(){return this.wc},n.prototype._c=function(t,n,e,r,i,o){var s=this.urls;if(s){if(o.WIDTH=n[0],o.HEIGHT=n[1],o[this.Tc?"CRS":"SRS"]=i.getCode(),"STYLES"in this.wc||(o.STYLES=""),1!=r)switch(this.Ac){case tg:var a=90*r+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+a:o.FORMAT_OPTIONS="dpi:"+a;break;case ng:o.MAP_RESOLUTION=90*r;break;case Qw:case eg:o.DPI=90*r;break;default:Mt(!1,52)}var u,c=i.getAxisOrientation(),f=e;if(this.Tc&&"ne"==c.substr(0,2)){var h=void 0;h=e[0],f[0]=e[1],f[1]=h,h=e[2],f[2]=e[3],f[3]=h}if(o.BBOX=f.join(","),1==s.length)u=s[0];else u=s[ye(qc(t),s.length)];return eh(u,o)}},n.prototype.getTilePixelRatio=function(t){return this.ku&&void 0!==this.Ac?t:1},n.prototype.Wc=function(){var t=0,n=[];for(var e in this.wc)n[t++]=e+"-"+this.wc[e];return n.join("/")},n.prototype.updateParams=function(t){E(this.wc,t),this.Ec(),this.setKey(this.Wc())},n.prototype.Ec=function(){var t=this.wc.VERSION||Jw;this.Tc=Je(t,"1.3")>=0},n.prototype.tileUrlFunction=function(t,n,e){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(e)),!(r.getResolutions().length<=t[0])){1==n||this.ku&&void 0!==this.Ac||(n=1);var i=r.getResolution(t[0]),o=r.getTileCoordExtent(t,this.Eo),s=eu(r.getTileSize(t[0]),this.tmpSize),a=this.Ts;0!==a&&(s=Qa(s,a,this.tmpSize),o=kn(o,i*a,o)),1!=n&&(s=nu(s,n,this.tmpSize));var u={SERVICE:"WMS",VERSION:Jw,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return E(u,this.wc),this._c(t,s,o,n,e,u)}},n}(vd),px=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),yx=function(t){function n(n,e,r,i,o,s){var a=t.call(this,n,e)||this;return a.Pt=r,a.st=i,a.Yc=o,a.Jc=null,a.Qc=null,a.q=null,a.tf=s,a}return px(n,t),n.prototype.getImage=function(){return null},n.prototype.getData=function(t){if(!this.Jc||!this.Qc)return null;var n=(t[0]-this.st[0])/(this.st[2]-this.st[0]),e=(t[1]-this.st[1])/(this.st[3]-this.st[1]),r=this.Jc[Math.floor((1-e)*this.Jc.length)];if("string"!=typeof r)return null;var i=r.charCodeAt(Math.floor(n*r.length));i>=93&&i--,i>=35&&i--;var o=null;if((i-=32)in this.Qc){var s=this.Qc[i];o=this.q&&s in this.q?this.q[s]:s}return o},n.prototype.forDataAtCoordinate=function(t,n,e){this.state==yt&&!0===e?(this.state=lt,Y(this,D,(function(e){n(this.getData(t))}),this),this.nf()):!0===e?setTimeout(function(){n(this.getData(t))}.bind(this),0):n(this.getData(t))},n.prototype.getKey=function(){return this.Pt},n.prototype.Rc=function(){this.state=pt,this.changed()},n.prototype.Bt=function(t){this.Jc=t.grid,this.Qc=t.keys,this.q=t.data,this.state=dt,this.changed()},n.prototype.nf=function(){if(this.state==lt)if(this.state=vt,this.tf)lf(this.Pt,this.Bt.bind(this),this.Rc.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.Kc.bind(this)),t.addEventListener("error",this.Xc.bind(this)),t.open("GET",this.Pt),t.send()}},n.prototype.Kc=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var e=void 0;try{e=JSON.parse(n.responseText)}catch(t){return void this.Rc()}this.Bt(e)}else this.Rc()},n.prototype.Xc=function(t){this.Rc()},n.prototype.load=function(){this.Yc?this.nf():this.setState(yt)},n}(kt),mx=function(t){function n(n){var e=t.call(this,{projection:mr("EPSG:3857"),state:hs,zDirection:n.zDirection})||this;if(e.Yc=void 0===n.preemptive||n.preemptive,e.ef=th,e.rf=void 0,e.tf=n.jsonp||!1,n.url)if(e.tf)lf(n.url,e.handleTileJSONResponse.bind(e),e.handleTileJSONError.bind(e));else{var r=new XMLHttpRequest;r.addEventListener("load",e.Kc.bind(e)),r.addEventListener("error",e.Xc.bind(e)),r.open("GET",n.url),r.send()}else n.tileJSON?e.handleTileJSONResponse(n.tileJSON):Mt(!1,51);return e}return px(n,t),n.prototype.Kc=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var e=void 0;try{e=JSON.parse(n.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(e)}else this.handleTileJSONError()},n.prototype.Xc=function(t){this.handleTileJSONError()},n.prototype.getTemplate=function(){return this.rf},n.prototype.forDataAtCoordinateAndResolution=function(t,n,e,r){if(this.tileGrid){var i=this.tileGrid.getZForResolution(n,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,i);this.getTile(o[0],o[1],o[2],1,this.getProjection()).forDataAtCoordinate(t,e,r)}else!0===r?setTimeout((function(){e(null)}),0):e(null)},n.prototype.handleTileJSONError=function(){this.setState(vs)},n.prototype.handleTileJSONResponse=function(t){var n,e=mr("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var i=jr(e,r);n=oe(t.bounds,i)}var o=Xf(r),s=t.minzoom||0,a=Wf({extent:o,maxZoom:t.maxzoom||22,minZoom:s});this.tileGrid=a,this.rf=t.template;var u=t.grids;if(u){if(this.ef=Jf(u,a),void 0!==t.attribution){var c=void 0!==n?n:o;this.setAttributions((function(n){return te(c,n.extent)?[t.attribution]:null}))}this.setState(ls)}else this.setState(vs)},n.prototype.getTile=function(t,n,e,r,i){var o=Fc(t,n,e);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var s=[t,n,e],a=this.getTileCoordForTileUrlFunction(s,i),u=this.ef(a,r,i),c=new yx(s,void 0!==u?lt:yt,void 0!==u?u:"",this.tileGrid.getTileCoordExtent(s),this.Yc,this.tf);return this.tileCache.set(o,c),c},n.prototype.useTile=function(t,n,e){var r=Fc(t,n,e);this.tileCache.containsKey(r)&&this.tileCache.get(r)},n}(ud),bx="KVP",wx="REST",gx=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),xx=function(t){function n(n){var e=this,r=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(r=n.interpolate);var i=void 0!==n.requestEncoding?n.requestEncoding:bx,o=n.tileGrid,s=n.urls;return void 0===s&&void 0!==n.url&&(s=nh(n.url)),(e=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:r,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileClass:n.tileClass,tileGrid:o,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,urls:s,wrapX:void 0!==n.wrapX&&n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).if=void 0!==n.version?n.version:"1.0.0",e.Ni=void 0!==n.format?n.format:"image/jpeg",e.af=void 0!==n.dimensions?n.dimensions:{},e.Us=n.layer,e.uf=n.matrixSet,e.K=n.style,e.cf=i,e.setKey(e.ff()),s&&s.length>0&&(e.tileUrlFunction=Qf(s.map(e.createFromWMTSTemplate.bind(e)))),e}return gx(n,t),n.prototype.setUrls=function(t){this.urls=t;var n=t.join("\n");this.setTileUrlFunction(Qf(t.map(this.createFromWMTSTemplate.bind(this))),n)},n.prototype.getDimensions=function(){return this.af},n.prototype.getFormat=function(){return this.Ni},n.prototype.getLayer=function(){return this.Us},n.prototype.getMatrixSet=function(){return this.uf},n.prototype.getRequestEncoding=function(){return this.cf},n.prototype.getStyle=function(){return this.K},n.prototype.getVersion=function(){return this.if},n.prototype.ff=function(){var t=0,n=[];for(var e in this.af)n[t++]=e+"-"+this.af[e];return n.join("/")},n.prototype.updateDimensions=function(t){E(this.af,t),this.setKey(this.ff())},n.prototype.createFromWMTSTemplate=function(t){var n=this.cf,e={layer:this.Us,style:this.K,tilematrixset:this.uf};n==bx&&E(e,{Service:"WMTS",Request:"GetTile",Version:this.if,Format:this.Ni}),t=n==bx?eh(t,e):t.replace(/\{(\w+?)\}/g,(function(t,n){return n.toLowerCase()in e?e[n.toLowerCase()]:t}));var r=this.tileGrid,i=this.af;return function(e,o,s){if(e){var a={TileMatrix:r.getMatrixId(e[0]),TileCol:e[1],TileRow:e[2]};E(a,i);var u=t;return u=n==bx?eh(u,a):u.replace(/\{(\w+?)\}/g,(function(t,n){return a[n]}))}}},n}(vd);var kx=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),_x="renderOrder",Sx=function(t){function n(n){var e=this,r=n||{},i=E({},r);return delete i.style,delete i.renderBuffer,delete i.updateWhileAnimating,delete i.updateWhileInteracting,(e=t.call(this,i)||this).hf=void 0!==r.declutter&&r.declutter,e.lf=void 0!==r.renderBuffer?r.renderBuffer:100,e.K=null,e.tt=void 0,e.setStyle(r.style),e.vf=void 0!==r.updateWhileAnimating&&r.updateWhileAnimating,e.df=void 0!==r.updateWhileInteracting&&r.updateWhileInteracting,e}return kx(n,t),n.prototype.getDeclutter=function(){return this.hf},n.prototype.getFeatures=function(n){return t.prototype.getFeatures.call(this,n)},n.prototype.getRenderBuffer=function(){return this.lf},n.prototype.getRenderOrder=function(){return this.get(_x)},n.prototype.getStyle=function(){return this.K},n.prototype.getStyleFunction=function(){return this.tt},n.prototype.getUpdateWhileAnimating=function(){return this.vf},n.prototype.getUpdateWhileInteracting=function(){return this.df},n.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new Yv(9)),this.getRenderer().renderDeclutter(t)},n.prototype.setRenderOrder=function(t){this.set(_x,t)},n.prototype.setStyle=function(t){this.K=void 0!==t?t:qv,this.tt=null===t?void 0:Uv(this.K),this.changed()},n}(ys);var Mx=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),jx=function(t){function n(n,e){var r=this,i=e.uniforms||{},s=[1,0,0,1,0,0];i[Zh]=s,(r=t.call(this,n,{uniforms:i,postProcesses:e.postProcesses})||this).pf=-1,r.yf=new Fh(ih,ah),r.mf=new Fh(ih,ah),r.bf=new Fh(oh,ah),r.Qs=e.vertexShader,r.ta=e.fragmentShader,r.Js,r.wf=!(!e.hitFragmentShader||!e.hitVertexShader),r.gf=e.hitVertexShader,r.xf=e.hitFragmentShader,r.kf;var a=e.attributes?e.attributes.map((function(t){return{name:"a_"+t.name,size:1,type:Jh.FLOAT}})):[];r.attributes=[{name:"a_position",size:2,type:Jh.FLOAT},{name:"a_index",size:1,type:Jh.FLOAT}].concat(a),r.hitDetectionAttributes=[{name:"a_position",size:2,type:Jh.FLOAT},{name:"a_index",size:1,type:Jh.FLOAT},{name:"a_hitColor",size:4,type:Jh.FLOAT},{name:"a_featureUid",size:1,type:Jh.FLOAT}].concat(a),r.customAttributes=e.attributes?e.attributes:[],r.He=[1/0,1/0,-1/0,-1/0],r._f=s,r.Sf=[1,0,0,1,0,0],r.Mf=[1,0,0,1,0,0],r.jf=new Float32Array(0),r.Of=new Float32Array(0),r.Tf,r.Ef=function(){var t='var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};';return new Worker("undefined"==typeof Blob?"data:application/javascript;base64,"+Buffer.from(t,"binary").toString("base64"):URL.createObjectURL(new Blob([t],{type:"application/javascript"})))}(),r.Ef.addEventListener("message",function(t){var n=t.data;if(n.type===wl){var e=n.projectionTransform;n.hitDetection?(this.mf.fromArrayBuffer(n.vertexBuffer),this.helper.flushBufferData(this.mf)):(this.yf.fromArrayBuffer(n.vertexBuffer),this.helper.flushBufferData(this.yf)),this.bf.fromArrayBuffer(n.indexBuffer),this.helper.flushBufferData(this.bf),this.Sf=e,un(this.Mf,this.Sf),n.hitDetection?this.Of=new Float32Array(t.data.renderInstructions):this.jf=new Float32Array(t.data.renderInstructions),this.getLayer().changed()}}.bind(r)),r.Af={},r.Cf=0;var u=r.getLayer().getSource();return r.Rf=[X(u,xd,r.If,r),X(u,kd,r.Pf,r),X(u,Sd,r.Df,r),X(u,_d,r.Nf,r)],u.forEachFeature(function(t){this.Af[o(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.Cf++}.bind(r)),r}return Mx(n,t),n.prototype.afterHelperCreated=function(){this.Js=this.helper.getProgram(this.ta,this.Qs),this.wf&&(this.kf=this.helper.getProgram(this.xf,this.gf),this.Tf=new al(this.helper))},n.prototype.If=function(t){var n=t.feature;this.Af[o(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()},this.Cf++},n.prototype.Pf=function(t){var n=t.feature;this.Af[o(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()}},n.prototype.Df=function(t){var n=t.feature;delete this.Af[o(n)],this.Cf--},n.prototype.Nf=function(){this.Af={},this.Cf=0},n.prototype.renderFrame=function(t){var n=this.helper.getGL();this.preRender(n,t);var e=this.bf.getSize();this.helper.drawElements(0,e),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);var r=this.helper.getCanvas();return this.wf&&(this.renderHitDetection(t),this.Tf.clearCachedData()),this.postRender(n,t),r},n.prototype.prepareFrameInternal=function(t){var n=this.getLayer(),e=n.getSource(),r=t.viewState,i=!t.viewHints[Aa]&&!t.viewHints[Ca],o=!Pn(this.He,t.extent),s=this.pf<e.getRevision();if(s&&(this.pf=e.getRevision()),i&&(o||s)){var a=r.projection,u=r.resolution,c=n instanceof Sx?n.getRenderBuffer():0,f=kn(t.extent,c*u);e.loadFeatures(f,u,a),this.zf(t),this.He=t.extent.slice()}return this.helper.makeProjectionTransform(t,this._f),Jt(this._f,this.Mf),this.helper.useProgram(this.Js),this.helper.prepareDraw(t),this.helper.bindBuffer(this.yf),this.helper.bindBuffer(this.bf),this.helper.enableAttributes(this.attributes),!0},n.prototype.zf=function(t){var n=[1,0,0,1,0,0];this.helper.makeProjectionTransform(t,n);var e,r,i=(2+this.customAttributes.length)*this.Cf;if(this.jf&&this.jf.length===i||(this.jf=new Float32Array(i)),this.wf){var o=(7+this.customAttributes.length)*this.Cf;this.Of&&this.Of.length===o||(this.Of=new Float32Array(o))}var s,a=[],u=[],c=0,f=0;for(var h in this.Af)if((r=(e=this.Af[h]).geometry)&&r.getType()===It.POINT){a[0]=r.getFlatCoordinates()[0],a[1]=r.getFlatCoordinates()[1],nn(n,a),s=Sl(f+6,u),this.jf[c++]=a[0],this.jf[c++]=a[1],this.wf&&(this.Of[f++]=a[0],this.Of[f++]=a[1],this.Of[f++]=s[0],this.Of[f++]=s[1],this.Of[f++]=s[2],this.Of[f++]=s[3],this.Of[f++]=Number(h));for(var l=void 0,v=0;v<this.customAttributes.length;v++)l=this.customAttributes[v].callback(e.feature,e.properties),this.jf[c++]=l,this.wf&&(this.Of[f++]=l)}var d={type:wl,renderInstructions:this.jf.buffer,customAttributesCount:this.customAttributes.length};if(d.projectionTransform=n,this.Ef.postMessage(d,[this.jf.buffer]),this.jf=null,this.wf){var p={type:wl,renderInstructions:this.Of.buffer,customAttributesCount:5+this.customAttributes.length};p.projectionTransform=n,p.hitDetection=!0,this.Ef.postMessage(p,[this.Of.buffer]),this.Of=null}},n.prototype.forEachFeatureAtCoordinate=function(t,n,e,r,i){if(Mt(this.wf,66),this.Of){var o=nn(n.coordinateToPixelTransform,t.slice()),s=this.Tf.readPixel(o[0]/2,o[1]/2),a=Ml([s[0]/255,s[1]/255,s[2]/255,s[3]/255]),u=this.Of[a],c=Math.floor(u).toString(),f=this.getLayer().getSource().getFeatureByUid(c);return f?r(f,this.getLayer(),null):void 0}},n.prototype.renderHitDetection=function(t){if(this.mf.getSize()){this.Tf.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.kf),this.helper.prepareDrawToRenderTarget(t,this.Tf,!0),this.helper.bindBuffer(this.mf),this.helper.bindBuffer(this.bf),this.helper.enableAttributes(this.hitDetectionAttributes);var n=this.bf.getSize();this.helper.drawElements(0,n)}},n.prototype.disposeInternal=function(){this.Ef.terminate(),this.Us=null,this.Rf.forEach((function(t){J(t)})),this.Rf=null,t.prototype.disposeInternal.call(this)},n}(jl),Ox={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Tx=[Ox.FILL],Ex=[Ox.STROKE],Ax=[Ox.BEGIN_PATH],Cx=[Ox.CLOSE_PATH],Rx=Ox,Ix=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Px=function(t){function n(n,e,r,i){var o=t.call(this)||this;return o.tolerance=n,o.maxExtent=e,o.pixelRatio=i,o.maxLineWidth=0,o.resolution=r,o.Lf=null,o.Ff=null,o.Gf=null,o.instructions=[],o.coordinates=[],o.Uf=[],o.hitDetectionInstructions=[],o.state={},o}return Ix(n,t),n.prototype.applyPixelRatio=function(t){var n=this.pixelRatio;return 1==n?t:t.map((function(t){return t*n}))},n.prototype.appendFlatPointCoordinates=function(t,n){for(var e=this.getBufferedMaxExtent(),r=this.Uf,i=this.coordinates,o=i.length,s=0,a=t.length;s<a;s+=n)r[0]=t[s],r[1]=t[s+1],Mn(e,r)&&(i[o++]=r[0],i[o++]=r[1]);return o},n.prototype.appendFlatLineCoordinates=function(t,n,e,r,i,o){var s=this.coordinates,a=s.length,u=this.getBufferedMaxExtent();o&&(n+=r);var c,f,h,l=t[n],v=t[n+1],d=this.Uf,p=!0;for(c=n+r;c<e;c+=r)d[0]=t[c],d[1]=t[c+1],(h=Tn(u,d))!==f?(p&&(s[a++]=l,s[a++]=v,p=!1),s[a++]=d[0],s[a++]=d[1]):h===yn?(s[a++]=d[0],s[a++]=d[1],p=!1):p=!0,l=d[0],v=d[1],f=h;return(i&&p||c===n+r)&&(s[a++]=l,s[a++]=v),a},n.prototype.Bf=function(t,n,e,r,i){for(var o=0,s=e.length;o<s;++o){var a=e[o],u=this.appendFlatLineCoordinates(t,n,a,r,!1,!1);i.push(u),n=a}return n},n.prototype.drawCustom=function(t,n,e,r){this.beginGeometry(t,n);var i,o,s,a,u,c=t.getType(),f=t.getStride(),h=this.coordinates.length;switch(c){case It.MULTI_POLYGON:i=t.getOrientedFlatCoordinates(),a=[];var l=t.getEndss();u=0;for(var v=0,d=l.length;v<d;++v){var p=[];u=this.Bf(i,u,l[v],f,p),a.push(p)}this.instructions.push([Rx.CUSTOM,h,a,t,e,bi]),this.hitDetectionInstructions.push([Rx.CUSTOM,h,a,t,r||e,bi]);break;case It.POLYGON:case It.MULTI_LINE_STRING:s=[],i=c==It.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),u=this.Bf(i,0,t.getEnds(),f,s),this.instructions.push([Rx.CUSTOM,h,s,t,e,mi]),this.hitDetectionInstructions.push([Rx.CUSTOM,h,s,t,r||e,mi]);break;case It.LINE_STRING:case It.CIRCLE:i=t.getFlatCoordinates(),o=this.appendFlatLineCoordinates(i,0,i.length,f,!1,!1),this.instructions.push([Rx.CUSTOM,h,o,t,e,yi]),this.hitDetectionInstructions.push([Rx.CUSTOM,h,o,t,r||e,yi]);break;case It.MULTI_POINT:i=t.getFlatCoordinates(),(o=this.appendFlatPointCoordinates(i,f))>h&&(this.instructions.push([Rx.CUSTOM,h,o,t,e,yi]),this.hitDetectionInstructions.push([Rx.CUSTOM,h,o,t,r||e,yi]));break;case It.POINT:i=t.getFlatCoordinates(),this.coordinates.push(i[0],i[1]),o=this.coordinates.length,this.instructions.push([Rx.CUSTOM,h,o,t,e]),this.hitDetectionInstructions.push([Rx.CUSTOM,h,o,t,r||e])}this.endGeometry(n)},n.prototype.beginGeometry=function(t,n){this.Lf=[Rx.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.Lf),this.Ff=[Rx.BEGIN_GEOMETRY,n,0,t],this.hitDetectionInstructions.push(this.Ff)},n.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},n.prototype.reverseHitDetectionInstructions=function(){var t,n=this.hitDetectionInstructions;n.reverse();var e,r,i=n.length,o=-1;for(t=0;t<i;++t)(r=(e=n[t])[0])==Rx.END_GEOMETRY?o=t:r==Rx.BEGIN_GEOMETRY&&(e[2]=t,b(this.hitDetectionInstructions,o,t),o=-1)},n.prototype.setFillStrokeStyle=function(t,n){var e=this.state;if(t){var r=t.getColor();e.fillStyle=nf(r||Is)}else e.fillStyle=void 0;if(n){var i=n.getColor();e.strokeStyle=nf(i||Ls);var o=n.getLineCap();e.lineCap=void 0!==o?o:Ps;var s=n.getLineDash();e.lineDash=s?s.slice():Ds;var a=n.getLineDashOffset();e.lineDashOffset=a||0;var u=n.getLineJoin();e.lineJoin=void 0!==u?u:Ns;var c=n.getWidth();e.lineWidth=void 0!==c?c:1;var f=n.getMiterLimit();e.miterLimit=void 0!==f?f:zs,e.lineWidth>this.maxLineWidth&&(this.maxLineWidth=e.lineWidth,this.Gf=null)}else e.strokeStyle=void 0,e.lineCap=void 0,e.lineDash=null,e.lineDashOffset=void 0,e.lineJoin=void 0,e.lineWidth=void 0,e.miterLimit=void 0},n.prototype.createFill=function(t){var n=t.fillStyle,e=[Rx.SET_FILL_STYLE,n];return"string"!=typeof n&&e.push(!0),e},n.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},n.prototype.createStroke=function(t){return[Rx.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},n.prototype.updateFillStyle=function(t,n){var e=t.fillStyle;"string"==typeof e&&t.currentFillStyle==e||(void 0!==e&&this.instructions.push(n.call(this,t)),t.currentFillStyle=e)},n.prototype.updateStrokeStyle=function(t,n){var e=t.strokeStyle,r=t.lineCap,i=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,u=t.miterLimit;(t.currentStrokeStyle!=e||t.currentLineCap!=r||i!=t.currentLineDash&&!x(t.currentLineDash,i)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=u)&&(void 0!==e&&n.call(this,t),t.currentStrokeStyle=e,t.currentLineCap=r,t.currentLineDash=i,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=u)},n.prototype.endGeometry=function(t){this.Lf[2]=this.instructions.length,this.Lf=null,this.Ff[2]=this.hitDetectionInstructions.length,this.Ff=null;var n=[Rx.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},n.prototype.getBufferedMaxExtent=function(){if(!this.Gf&&(this.Gf=_n(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;kn(this.Gf,t,this.Gf)}return this.Gf},n}(bf),Dx=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Nx=function(t){function n(n,e,r,i){var o=t.call(this,n,e,r,i)||this;return o.Sa=null,o.Dt=null,o.qf=void 0,o.$f=void 0,o.Vf=void 0,o.Zf=void 0,o.aa=void 0,o.Wf=void 0,o.Hf=void 0,o.ua=void 0,o.Fr=void 0,o.ca=void 0,o.Ba=void 0,o.Kf=void 0,o}return Dx(n,t),n.prototype.drawPoint=function(t,n){if(this.Dt){this.beginGeometry(t,n);var e=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(e,r);this.instructions.push([Rx.DRAW_IMAGE,i,o,this.Dt,this.$f*this.qf,this.Vf*this.qf,Math.ceil(this.Zf*this.qf),this.aa,this.Wf,this.Hf,this.ua,this.Fr,[this.ca[0]*this.pixelRatio/this.qf,this.ca[1]*this.pixelRatio/this.qf],Math.ceil(this.Ba*this.qf),this.Kf]),this.hitDetectionInstructions.push([Rx.DRAW_IMAGE,i,o,this.Sa,this.$f,this.Vf,this.Zf,this.aa,this.Wf,this.Hf,this.ua,this.Fr,this.ca,this.Ba,this.Kf]),this.endGeometry(n)}},n.prototype.drawMultiPoint=function(t,n){if(this.Dt){this.beginGeometry(t,n);var e=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(e,r);this.instructions.push([Rx.DRAW_IMAGE,i,o,this.Dt,this.$f*this.qf,this.Vf*this.qf,Math.ceil(this.Zf*this.qf),this.aa,this.Wf,this.Hf,this.ua,this.Fr,[this.ca[0]*this.pixelRatio/this.qf,this.ca[1]*this.pixelRatio/this.qf],Math.ceil(this.Ba*this.qf),this.Kf]),this.hitDetectionInstructions.push([Rx.DRAW_IMAGE,i,o,this.Sa,this.$f,this.Vf,this.Zf,this.aa,this.Wf,this.Hf,this.ua,this.Fr,this.ca,this.Ba,this.Kf]),this.endGeometry(n)}},n.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.$f=void 0,this.Vf=void 0,this.Sa=null,this.Dt=null,this.qf=void 0,this.Zf=void 0,this.ca=void 0,this.aa=void 0,this.Wf=void 0,this.Hf=void 0,this.ua=void 0,this.Fr=void 0,this.Ba=void 0,t.prototype.finish.call(this)},n.prototype.setImageStyle=function(t,n){var e=t.getAnchor(),r=t.getSize(),i=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.qf=t.getPixelRatio(this.pixelRatio),this.$f=e[0],this.Vf=e[1],this.Sa=i,this.Dt=o,this.Zf=r[1],this.aa=t.getOpacity(),this.Wf=s[0]*this.qf,this.Hf=s[1]*this.qf,this.ua=t.getRotateWithView(),this.Fr=t.getRotation(),this.ca=t.getScaleArray(),this.Ba=r[0],this.Kf=n},n}(Px),zx=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Lx=function(t){function n(n,e,r,i){return t.call(this,n,e,r,i)||this}return zx(n,t),n.prototype.Xf=function(t,n,e,r){var i=this.coordinates.length,o=this.appendFlatLineCoordinates(t,n,e,r,!1,!1),s=[Rx.MOVE_TO_LINE_TO,i,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),e},n.prototype.drawLineString=function(t,n){var e=this.state,r=e.strokeStyle,i=e.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(e,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([Rx.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth,e.lineCap,e.lineJoin,e.miterLimit,Ds,0],Ax);var o=t.getFlatCoordinates(),s=t.getStride();this.Xf(o,0,o.length,s),this.hitDetectionInstructions.push(Ex),this.endGeometry(n)}},n.prototype.drawMultiLineString=function(t,n){var e=this.state,r=e.strokeStyle,i=e.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(e,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([Rx.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth,e.lineCap,e.lineJoin,e.miterLimit,e.lineDash,e.lineDashOffset],Ax);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),u=0,c=0,f=o.length;c<f;++c)u=this.Xf(s,u,o[c],a);this.hitDetectionInstructions.push(Ex),this.endGeometry(n)}},n.prototype.finish=function(){var n=this.state;return null!=n.lastStroke&&n.lastStroke!=this.coordinates.length&&this.instructions.push(Ex),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},n.prototype.applyStroke=function(n){null!=n.lastStroke&&n.lastStroke!=this.coordinates.length&&(this.instructions.push(Ex),n.lastStroke=this.coordinates.length),n.lastStroke=0,t.prototype.applyStroke.call(this,n),this.instructions.push(Ax)},n}(Px),Fx=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Gx=function(t){function n(n,e,r,i){return t.call(this,n,e,r,i)||this}return Fx(n,t),n.prototype.Yf=function(t,n,e,r){var i=this.state,o=void 0!==i.fillStyle,s=void 0!==i.strokeStyle,a=e.length;this.instructions.push(Ax),this.hitDetectionInstructions.push(Ax);for(var u=0;u<a;++u){var c=e[u],f=this.coordinates.length,h=this.appendFlatLineCoordinates(t,n,c,r,!0,!s),l=[Rx.MOVE_TO_LINE_TO,f,h];this.instructions.push(l),this.hitDetectionInstructions.push(l),s&&(this.instructions.push(Cx),this.hitDetectionInstructions.push(Cx)),n=c}return o&&(this.instructions.push(Tx),this.hitDetectionInstructions.push(Tx)),s&&(this.instructions.push(Ex),this.hitDetectionInstructions.push(Ex)),n},n.prototype.drawCircle=function(t,n){var e=this.state,r=e.fillStyle,i=e.strokeStyle;if(void 0!==r||void 0!==i){this.Jf(),this.beginGeometry(t,n),void 0!==e.fillStyle&&this.hitDetectionInstructions.push([Rx.SET_FILL_STYLE,Is]),void 0!==e.strokeStyle&&this.hitDetectionInstructions.push([Rx.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth,e.lineCap,e.lineJoin,e.miterLimit,e.lineDash,e.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,s,!1,!1);var u=[Rx.CIRCLE,a];this.instructions.push(Ax,u),this.hitDetectionInstructions.push(Ax,u),void 0!==e.fillStyle&&(this.instructions.push(Tx),this.hitDetectionInstructions.push(Tx)),void 0!==e.strokeStyle&&(this.instructions.push(Ex),this.hitDetectionInstructions.push(Ex)),this.endGeometry(n)}},n.prototype.drawPolygon=function(t,n){var e=this.state,r=e.fillStyle,i=e.strokeStyle;if(void 0!==r||void 0!==i){this.Jf(),this.beginGeometry(t,n),void 0!==e.fillStyle&&this.hitDetectionInstructions.push([Rx.SET_FILL_STYLE,Is]),void 0!==e.strokeStyle&&this.hitDetectionInstructions.push([Rx.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth,e.lineCap,e.lineJoin,e.miterLimit,e.lineDash,e.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.Yf(s,0,o,a),this.endGeometry(n)}},n.prototype.drawMultiPolygon=function(t,n){var e=this.state,r=e.fillStyle,i=e.strokeStyle;if(void 0!==r||void 0!==i){this.Jf(),this.beginGeometry(t,n),void 0!==e.fillStyle&&this.hitDetectionInstructions.push([Rx.SET_FILL_STYLE,Is]),void 0!==e.strokeStyle&&this.hitDetectionInstructions.push([Rx.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth,e.lineCap,e.lineJoin,e.miterLimit,e.lineDash,e.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),u=0,c=0,f=o.length;c<f;++c)u=this.Yf(s,u,o[c],a);this.endGeometry(n)}},n.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var n=this.tolerance;if(0!==n)for(var e=this.coordinates,r=0,i=e.length;r<i;++r)e[r]=li(e[r],n);return t.prototype.finish.call(this)},n.prototype.Jf=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},n}(Px);function Ux(t,n,e,r,i){var o,s,a,u,c,f,h,l,v,d=e,p=e,y=0,m=0,b=e;for(o=e;o<r;o+=i){var w=n[o],g=n[o+1];void 0!==u&&(l=w-u,v=g-c,a=Math.sqrt(l*l+v*v),void 0!==f&&(m+=s,Math.acos((f*l+h*v)/(s*a))>t&&(m>y&&(y=m,d=b,p=o),m=0,b=o-i)),s=a,f=l,h=v),u=w,c=g}return(m+=a)>y?[b,o]:[d,p]}var Bx=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),qx={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},$x=function(t){function n(n,e,r,i){var o=t.call(this,n,e,r,i)||this;return o.Qf=null,o.io="",o.oo=0,o.so=0,o.ao=void 0,o.uo=0,o.fo=null,o.fillStates={},o.ho=null,o.strokeStates={},o.lo={},o.textStates={},o.th="",o.nh="",o.eh="",o.Kf=void 0,o}return Bx(n,t),n.prototype.finish=function(){var n=t.prototype.finish.call(this);return n.textStates=this.textStates,n.fillStates=this.fillStates,n.strokeStates=this.strokeStates,n},n.prototype.drawText=function(t,n){var e=this.fo,r=this.ho,i=this.lo;if(""!==this.io&&i&&(e||r)){var o=this.coordinates,s=o.length,a=t.getType(),u=null,c=t.getStride();if(i.placement!==Hv||a!=It.LINE_STRING&&a!=It.MULTI_LINE_STRING&&a!=It.POLYGON&&a!=It.MULTI_POLYGON){var f=i.overflow?null:[];switch(a){case It.POINT:case It.MULTI_POINT:u=t.getFlatCoordinates();break;case It.LINE_STRING:u=t.getFlatMidpoint();break;case It.CIRCLE:u=t.getCenter();break;case It.MULTI_LINE_STRING:u=t.getFlatMidpoints(),c=2;break;case It.POLYGON:u=t.getFlatInteriorPoint(),i.overflow||f.push(u[2]/this.resolution),c=3;break;case It.MULTI_POLYGON:var h=t.getFlatInteriorPoints();u=[];for(k=0,_=h.length;k<_;k+=3)i.overflow||f.push(h[k+2]/this.resolution),u.push(h[k],h[k+1]);if(0===u.length)return;c=2}if((A=this.appendFlatPointCoordinates(u,c))===s)return;if(f&&(A-s)/2!=u.length/c){var l=s/2;f=f.filter((function(t,n){var e=o[2*(l+n)]===u[n*c]&&o[2*(l+n)+1]===u[n*c+1];return e||--l,e}))}this.rh(),(i.backgroundFill||i.backgroundStroke)&&(this.setFillStrokeStyle(i.backgroundFill,i.backgroundStroke),i.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),i.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,n);var v=i.padding;if(v!=Us&&(i.scale[0]<0||i.scale[1]<0)){var d=i.padding[0],p=i.padding[1],y=i.padding[2],m=i.padding[3];i.scale[0]<0&&(p=-p,m=-m),i.scale[1]<0&&(d=-d,y=-y),v=[d,p,y,m]}var b=this.pixelRatio;this.instructions.push([Rx.DRAW_IMAGE,s,A,null,NaN,NaN,NaN,1,0,0,this.ao,this.uo,[1,1],NaN,this.Kf,v==Us?Us:v.map((function(t){return t*b})),!!i.backgroundFill,!!i.backgroundStroke,this.io,this.th,this.eh,this.nh,this.oo,this.so,f]);var w=1/b;this.hitDetectionInstructions.push([Rx.DRAW_IMAGE,s,A,null,NaN,NaN,NaN,1,0,0,this.ao,this.uo,[w,w],NaN,this.Kf,v,!!i.backgroundFill,!!i.backgroundStroke,this.io,this.th,this.eh,this.nh,this.oo,this.so,f]),this.endGeometry(n)}else{if(!te(this.getBufferedMaxExtent(),t.getExtent()))return;var g=void 0;if(u=t.getFlatCoordinates(),a==It.LINE_STRING)g=[u.length];else if(a==It.MULTI_LINE_STRING)g=t.getEnds();else if(a==It.POLYGON)g=t.getEnds().slice(0,1);else if(a==It.MULTI_POLYGON){var x=t.getEndss();g=[];for(var k=0,_=x.length;k<_;++k)g.push(x[k][0])}this.beginGeometry(t,n);for(var S=i.textAlign,M=0,j=void 0,O=0,T=g.length;O<T;++O){if(null==S){var E=Ux(i.maxAngle,u,M,g[O],c);M=E[0],j=E[1]}else j=g[O];for(var k=M;k<j;k+=c)o.push(u[k],u[k+1]);var A=o.length;M=g[O],this.ih(s,A),s=A}this.endGeometry(n)}}},n.prototype.rh=function(){var t=this.ho,n=this.lo,e=this.fo,r=this.eh;t&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var i=this.th;i in this.textStates||(this.textStates[i]={font:n.font,textAlign:n.textAlign||Fs,textBaseline:n.textBaseline||Gs,scale:n.scale});var o=this.nh;e&&(o in this.fillStates||(this.fillStates[o]={fillStyle:e.fillStyle}))},n.prototype.ih=function(t,n){var e=this.ho,r=this.lo,i=this.eh,o=this.th,s=this.nh;this.rh();var a=this.pixelRatio,u=qx[r.textBaseline],c=this.so*a,f=this.io,h=e?e.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([Rx.DRAW_CHARS,t,n,u,r.overflow,s,r.maxAngle,a,c,i,h*a,f,o,1]),this.hitDetectionInstructions.push([Rx.DRAW_CHARS,t,n,u,r.overflow,s,r.maxAngle,1,c,i,h,f,o,1/a])},n.prototype.setTextStyle=function(t,n){var e,r,i;if(t){var s=t.getFill();s?((r=this.fo)||(r={},this.fo=r),r.fillStyle=nf(s.getColor()||Is)):(r=null,this.fo=r);var a=t.getStroke();if(a){(i=this.ho)||(i={},this.ho=i);var u=a.getLineDash(),c=a.getLineDashOffset(),f=a.getWidth(),h=a.getMiterLimit();i.lineCap=a.getLineCap()||Ps,i.lineDash=u?u.slice():Ds,i.lineDashOffset=void 0===c?0:c,i.lineJoin=a.getLineJoin()||Ns,i.lineWidth=void 0===f?1:f,i.miterLimit=void 0===h?zs:h,i.strokeStyle=nf(a.getColor()||Ls)}else i=null,this.ho=i;e=this.lo;var l=t.getFont()||Rs;Hs(l);var v=t.getScaleArray();e.overflow=t.getOverflow(),e.font=l,e.maxAngle=t.getMaxAngle(),e.placement=t.getPlacement(),e.textAlign=t.getTextAlign(),e.textBaseline=t.getTextBaseline()||Gs,e.backgroundFill=t.getBackgroundFill(),e.backgroundStroke=t.getBackgroundStroke(),e.padding=t.getPadding()||Us,e.scale=void 0===v?[1,1]:v;var d=t.getOffsetX(),p=t.getOffsetY(),y=t.getRotateWithView(),m=t.getRotation();this.io=t.getText()||"",this.oo=void 0===d?0:d,this.so=void 0===p?0:p,this.ao=void 0!==y&&y,this.uo=void 0===m?0:m,this.eh=i?("string"==typeof i.strokeStyle?i.strokeStyle:o(i.strokeStyle))+i.lineCap+i.lineDashOffset+"|"+i.lineWidth+i.lineJoin+i.miterLimit+"["+i.lineDash.join()+"]":"",this.th=e.font+e.scale+(e.textAlign||"?")+(e.textBaseline||"?"),this.nh=r?"string"==typeof r.fillStyle?r.fillStyle:"|"+o(r.fillStyle):""}else this.io="";this.Kf=n},n}(Px),Vx={Circle:Gx,Default:Px,Image:Nx,LineString:Lx,Polygon:Gx,Text:$x},Zx=function(){function t(t,n,e,r){this.oh=t,this.sh=n,this.Rt=r,this.ah=e,this.uh={}}return t.prototype.finish=function(){var t={};for(var n in this.uh){t[n]=t[n]||{};var e=this.uh[n];for(var r in e){var i=e[r].finish();t[n][r]=i}}return t},t.prototype.getBuilder=function(t,n){var e=void 0!==t?t.toString():"0",r=this.uh[e];void 0===r&&(r={},this.uh[e]=r);var i=r[n];void 0===i&&(i=new(0,Vx[n])(this.oh,this.sh,this.ah,this.Rt),r[n]=i);return i},t}();function Wx(t,n,e,r,i,o,s,a,u,c,f,h){var l=t[n],v=t[n+1],d=0,p=0,y=0,m=0;function b(){d=l,p=v,l=t[n+=r],v=t[n+1],m+=y,y=Math.sqrt((l-d)*(l-d)+(v-p)*(v-p))}do{b()}while(n<e-r&&m+y<o);for(var w=0===y?0:(o-m)/y,g=me(d,l,w),x=me(p,v,w),k=n-r,_=m,S=o+a*u(c,i,f);n<e-r&&m+y<S;)b();var M,j=me(d,l,w=0===y?0:(S-m)/y),O=me(p,v,w);if(h){var T=[g,x,j,O];Br(T,0,4,2,h,T,T),M=T[0]>T[2]}else M=g>j;var E,A=Math.PI,C=[],R=k+r===n;if(y=0,m=_,l=t[n=k],v=t[n+1],R){b(),E=Math.atan2(v-p,l-d),M&&(E+=E>0?-A:A);var I=(j+g)/2,P=(O+x)/2;return C[0]=[I,P,(S-o)/2,E,i],C}for(var D=0,N=i.length;D<N;){b();var z=Math.atan2(v-p,l-d);if(M&&(z+=z>0?-A:A),void 0!==E){var L=z-E;if(L+=L>A?-2*A:L<-A?2*A:0,Math.abs(L)>s)return null}E=z;for(var F=D,G=0;D<N;++D){var U=a*u(c,i[M?N-D-1:D],f);if(n+r<e&&m+y<o+G+U/2)break;G+=U}if(D!==F){var B=M?i.substring(N-F,N-D):i.substring(F,D);I=me(d,l,w=0===y?0:(o+G/2-m)/y),P=me(p,v,w);C.push([I,P,G/2,z,B]),o+=G}}return C}function Hx(t,n,e,r){for(var i=t[n],o=t[n+1],s=0,a=n+r;a<e;a+=r){var u=t[a],c=t[a+1];s+=Math.sqrt((u-i)*(u-i)+(c-o)*(c-o)),i=u,o=c}return s}var Kx=[1/0,1/0,-1/0,-1/0],Xx=[],Yx=[],Jx=[],Qx=[];function tk(t){return t[3].declutterBox}var nk=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function ek(t,n){return"start"!==n&&"end"!==n||nk.test(t)||(n="start"===n?"left":"right"),qx[n]}var rk=function(){function t(t,n,e,r){this.overlaps=e,this.pixelRatio=n,this.resolution=t,this.fh,this.instructions=r.instructions,this.coordinates=r.coordinates,this.hh={},this.lh=[1,0,0,1,0,0],this.hitDetectionInstructions=r.hitDetectionInstructions,this.vo=null,this.Fi=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.dh={},this.Qf={}}return t.prototype.createLabel=function(t,n,e,r){var i=t+n+e+r;if(this.Qf[i])return this.Qf[i];var o=r?this.strokeStates[r]:null,s=e?this.fillStates[e]:null,a=this.textStates[n],u=this.pixelRatio,c=[a.scale[0]*u,a.scale[1]*u],f=ek(t,a.textAlign||Fs),h=r&&o.lineWidth?o.lineWidth:0,l=t.split("\n"),v=l.length,d=[],p=Qs(a.font,l,d),y=Ks(a.font),m=p+h,b=[],w=(m+2)*c[0],g=(y*v+h)*c[1],x={width:w<0?Math.floor(w):Math.ceil(w),height:g<0?Math.floor(g):Math.ceil(g),contextInstructions:b};(1==c[0]&&1==c[1]||b.push("scale",c),b.push("font",a.font),r)&&(b.push("strokeStyle",o.strokeStyle),b.push("lineWidth",h),b.push("lineCap",o.lineCap),b.push("lineJoin",o.lineJoin),b.push("miterLimit",o.miterLimit),(Zt?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(b.push("setLineDash",[o.lineDash]),b.push("lineDashOffset",o.lineDashOffset)));e&&b.push("fillStyle",s.fillStyle),b.push("textBaseline","middle"),b.push("textAlign","center");var k,_=.5-f,S=f*m+_*h;if(r)for(k=0;k<v;++k)b.push("strokeText",[l[k],S+_*d[k],.5*(h+y)+k*y]);if(e)for(k=0;k<v;++k)b.push("fillText",[l[k],S+_*d[k],.5*(h+y)+k*y]);return this.Qf[i]=x,x},t.prototype.ph=function(t,n,e,r,i,o,s){t.beginPath(),t.moveTo.apply(t,n),t.lineTo.apply(t,e),t.lineTo.apply(t,r),t.lineTo.apply(t,i),t.lineTo.apply(t,n),o&&(this.fh=o[2],this.va(t)),s&&(this.yh(t,s),t.stroke())},t.prototype.mh=function(t,n,e,r,i,o,s,a,u,c,f,h,l,v,d,p){var y,m=e-(s*=h[0]),b=r-(a*=h[1]),w=i+u>t?t-u:i,g=o+c>n?n-c:o,x=v[3]+w*h[0]+v[1],k=v[0]+g*h[1]+v[2],_=m-v[3],S=b-v[0];return(d||0!==f)&&(Xx[0]=_,Qx[0]=_,Xx[1]=S,Yx[1]=S,Yx[0]=_+x,Jx[0]=Yx[0],Jx[1]=S+k,Qx[1]=Jx[1]),0!==f?(nn(y=an([1,0,0,1,0,0],e,r,1,1,f,-e,-r),Xx),nn(y,Yx),nn(y,Jx),nn(y,Qx),An(Math.min(Xx[0],Yx[0],Jx[0],Qx[0]),Math.min(Xx[1],Yx[1],Jx[1],Qx[1]),Math.max(Xx[0],Yx[0],Jx[0],Qx[0]),Math.max(Xx[1],Yx[1],Jx[1],Qx[1]),Kx)):An(Math.min(_,_+x),Math.min(S,S+k),Math.max(_,_+x),Math.max(S,S+k),Kx),l&&(m=Math.round(m),b=Math.round(b)),{drawImageX:m,drawImageY:b,drawImageW:w,drawImageH:g,originX:u,originY:c,declutterBox:{minX:Kx[0],minY:Kx[1],maxX:Kx[2],maxY:Kx[3],value:p},canvasTransform:y,scale:h}},t.prototype.bh=function(t,n,e,r,i,o,s){var a=!(!o&&!s),u=r.declutterBox,c=t.canvas,f=s?s[2]*r.scale[0]/2:0;return u.minX-f<=c.width/n&&u.maxX+f>=0&&u.minY-f<=c.height/n&&u.maxY+f>=0&&(a&&this.ph(t,Xx,Yx,Jx,Qx,o,s),ta(t,r.canvasTransform,i,e,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0},t.prototype.va=function(t){if(this.fh){var n=nn(this.lh,[0,0]),e=512*this.pixelRatio;t.save(),t.translate(n[0]%e,n[1]%e),t.rotate(this.Fi)}t.fill(),this.fh&&t.restore()},t.prototype.yh=function(t,n){t.strokeStyle=n[1],t.lineWidth=n[2],t.lineCap=n[3],t.lineJoin=n[4],t.miterLimit=n[5],t.setLineDash&&(t.lineDashOffset=n[7],t.setLineDash(n[6]))},t.prototype.wh=function(t,n,e,r){var i=this.textStates[n],o=this.createLabel(t,n,r,e),s=this.strokeStates[e],a=this.pixelRatio,u=ek(t,i.textAlign||Fs),c=qx[i.textBaseline||Gs],f=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:u*(o.width/a-2*i.scale[0])+2*(.5-u)*f,anchorY:c*o.height/a+2*(.5-c)*f}},t.prototype.gh=function(t,n,e,r,i,o,s,a){var u;this.vo&&x(e,this.lh)?u=this.vo:(this.vo||(this.vo=[]),u=Ur(this.coordinates,0,this.coordinates.length,2,e,this.vo),tn(this.lh,e));for(var c,f,h,l,v,d,p,y,m,b,w,g,k,_,S,M,j=0,O=r.length,T=0,E=0,A=0,C=null,R=null,I=this.hh,P=this.Fi,D=Math.round(1e12*Math.atan2(-e[1],e[0]))/1e12,N={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:P},z=this.instructions!=r||this.overlaps?0:200;j<O;){var L=r[j];switch(L[0]){case Rx.BEGIN_GEOMETRY:k=L[1],M=L[3],k.getGeometry()?void 0===s||te(s,M.getExtent())?++j:j=L[2]+1:j=L[2];break;case Rx.BEGIN_PATH:E>z&&(this.va(t),E=0),A>z&&(t.stroke(),A=0),E||A||(t.beginPath(),l=NaN,v=NaN),++j;break;case Rx.CIRCLE:var F=u[T=L[1]],G=u[T+1],U=u[T+2]-F,B=u[T+3]-G,q=Math.sqrt(U*U+B*B);t.moveTo(F+q,G),t.arc(F,G,q,0,2*Math.PI,!0),++j;break;case Rx.CLOSE_PATH:t.closePath(),++j;break;case Rx.CUSTOM:T=L[1],c=L[2];var $=L[3],V=L[4],Z=6==L.length?L[5]:void 0;N.geometry=$,N.feature=k,j in I||(I[j]=[]);var W=I[j];Z?Z(u,T,c,2,W):(W[0]=u[T],W[1]=u[T+1],W.length=2),V(W,N),++j;break;case Rx.DRAW_IMAGE:T=L[1],c=L[2],y=L[3],f=L[4],h=L[5];var H=L[6],K=L[7],X=L[8],Y=L[9],J=L[10],Q=L[11],tt=L[12],nt=L[13],et=L[14];if(!y&&L.length>=19){m=L[18],b=L[19],w=L[20],g=L[21];var rt=this.wh(m,b,w,g);y=rt.label,L[3]=y;var it=L[22];f=(rt.anchorX-it)*this.pixelRatio,L[4]=f;var ot=L[23];h=(rt.anchorY-ot)*this.pixelRatio,L[5]=h,H=y.height,L[6]=H,nt=y.width,L[13]=nt}var st=void 0;L.length>24&&(st=L[24]);var at=void 0,ut=void 0,ct=void 0;L.length>16?(at=L[15],ut=L[16],ct=L[17]):(at=Us,ut=!1,ct=!1),J&&D?Q+=P:J||D||(Q-=P);for(var ft=0;T<c;T+=2)if(!(st&&st[ft++]<nt/this.pixelRatio)){var ht=[t,n,y,Lt=this.mh(y.width,y.height,u[T],u[T+1],nt,H,f,h,X,Y,Q,tt,i,at,ut||ct,k),K,ut?C:null,ct?R:null],lt=void 0,vt=void 0;if(a&&et){var dt=c-T;if(!et[dt]){et[dt]=ht;continue}if(lt=et[dt],delete et[dt],vt=tk(lt),a.collides(vt))continue}a&&a.collides(Lt.declutterBox)||(lt&&(a&&a.insert(vt),this.bh.apply(this,lt)),a&&a.insert(Lt.declutterBox),this.bh.apply(this,ht))}++j;break;case Rx.DRAW_CHARS:var pt=L[1],yt=L[2],mt=L[3],bt=L[4];g=L[5];var wt=L[6],gt=L[7],xt=L[8];w=L[9];var kt=L[10];m=L[11],b=L[12];var _t=[L[13],L[13]],St=this.textStates[b],Mt=St.font,jt=[St.scale[0]*gt,St.scale[1]*gt],Ot=void 0;Mt in this.dh?Ot=this.dh[Mt]:(Ot={},this.dh[Mt]=Ot);var Tt=Hx(u,pt,yt,2),Et=Math.abs(jt[0])*Js(Mt,m,Ot);if(bt||Et<=Tt){var At=this.textStates[b].textAlign,Ct=Wx(u,pt,yt,2,m,(Tt-Et)*qx[At],wt,Math.abs(jt[0]),Js,Mt,Ot,D?0:this.Fi);t:if(Ct){var Rt=[],It=void 0,Pt=void 0,Dt=void 0,Nt=void 0,zt=void 0;if(w)for(It=0,Pt=Ct.length;It<Pt;++It){Dt=(zt=Ct[It])[4],Nt=this.createLabel(Dt,b,"",w),f=zt[2]+(jt[0]<0?-kt:kt),h=mt*Nt.height+2*(.5-mt)*kt*jt[1]/jt[0]-xt;var Lt=this.mh(Nt.width,Nt.height,zt[0],zt[1],Nt.width,Nt.height,f,h,0,0,zt[3],_t,!1,Us,!1,k);if(a&&a.collides(Lt.declutterBox))break t;Rt.push([t,n,Nt,Lt,1,null,null])}if(g)for(It=0,Pt=Ct.length;It<Pt;++It){Dt=(zt=Ct[It])[4],Nt=this.createLabel(Dt,b,g,""),f=zt[2],h=mt*Nt.height-xt;Lt=this.mh(Nt.width,Nt.height,zt[0],zt[1],Nt.width,Nt.height,f,h,0,0,zt[3],_t,!1,Us,!1,k);if(a&&a.collides(Lt.declutterBox))break t;Rt.push([t,n,Nt,Lt,1,null,null])}a&&a.load(Rt.map(tk));for(var Ft=0,Gt=Rt.length;Ft<Gt;++Ft)this.bh.apply(this,Rt[Ft])}}++j;break;case Rx.END_GEOMETRY:if(void 0!==o){var Ut=o(k=L[1],M);if(Ut)return Ut}++j;break;case Rx.FILL:z?E++:this.va(t),++j;break;case Rx.MOVE_TO_LINE_TO:for(T=L[1],c=L[2],_=u[T],p=(S=u[T+1])+.5|0,(d=_+.5|0)===l&&p===v||(t.moveTo(_,S),l=d,v=p),T+=2;T<c;T+=2)d=(_=u[T])+.5|0,p=(S=u[T+1])+.5|0,T!=c-2&&d===l&&p===v||(t.lineTo(_,S),l=d,v=p);++j;break;case Rx.SET_FILL_STYLE:C=L,this.fh=L[2],E&&(this.va(t),E=0,A&&(t.stroke(),A=0)),t.fillStyle=L[1],++j;break;case Rx.SET_STROKE_STYLE:R=L,A&&(t.stroke(),A=0),this.yh(t,L),++j;break;case Rx.STROKE:z?A++:t.stroke(),++j;break;default:++j}}E&&this.va(t),A&&t.stroke()},t.prototype.execute=function(t,n,e,r,i,o){this.Fi=r,this.gh(t,n,e,this.instructions,i,void 0,void 0,o)},t.prototype.executeHitDetection=function(t,n,e,r,i){return this.Fi=e,this.gh(t,1,n,this.hitDetectionInstructions,!0,r,i)},t}(),ik=[Mf,xf,Sf,_f,jf,kf],ok=function(){function t(t,n,e,r,i,o){this.sh=t,this.Du=r,this.Rt=e,this.ah=n,this.lf=o,this.xh={},this.kh=null,this._h=[1,0,0,1,0,0],this.Sh(i)}return t.prototype.clip=function(t,n){var e=this.getClipCoords(n);t.beginPath(),t.moveTo(e[0],e[1]),t.lineTo(e[2],e[3]),t.lineTo(e[4],e[5]),t.lineTo(e[6],e[7]),t.clip()},t.prototype.Sh=function(t){for(var n in t){var e=this.xh[n];void 0===e&&(e={},this.xh[n]=e);var r=t[n];for(var i in r){var o=r[i];e[i]=new rk(this.ah,this.Rt,this.Du,o)}}},t.prototype.hasExecutors=function(t){for(var n in this.xh)for(var e=this.xh[n],r=0,i=t.length;r<i;++r)if(t[r]in e)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,n,e,r,i,o){var s=2*(r=Math.round(r))+1,a=an(this._h,r+.5,r+.5,1/n,-1/n,-e,-t[0],-t[1]),u=!this.kh;u&&(this.kh=_o(s,s));var c,f=this.kh;f.canvas.width!==s||f.canvas.height!==s?(f.canvas.width=s,f.canvas.height=s):u||f.clearRect(0,0,s,s),void 0!==this.lf&&(zn(c=[1/0,1/0,-1/0,-1/0],t),kn(c,n*(this.lf+r),c));var h,l=ak(r);function v(t,n){for(var e=f.getImageData(0,0,s,s).data,a=0,u=l.length;a<u;a++)if(e[l[a]]>0){if(!o||h!==_f&&h!==jf||-1!==o.indexOf(t)){var c=(l[a]-3)/4,v=r-c%s,d=r-(c/s|0),p=i(t,n,v*v+d*d);if(p)return p}f.clearRect(0,0,s,s);break}}var d,y,m,b,w,g=Object.keys(this.xh).map(Number);for(g.sort(p),d=g.length-1;d>=0;--d){var x=g[d].toString();for(m=this.xh[x],y=ik.length-1;y>=0;--y)if(void 0!==(b=m[h=ik[y]])&&(w=b.executeHitDetection(f,a,e,v,c)))return w}},t.prototype.getClipCoords=function(t){var n=this.sh;if(!n)return null;var e=n[0],r=n[1],i=n[2],o=n[3],s=[e,r,e,o,i,o,i,r];return Ur(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return R(this.xh)},t.prototype.execute=function(t,n,e,r,i,o,s){var a=Object.keys(this.xh).map(Number);a.sort(p),this.sh&&(t.save(),this.clip(t,e));var u,c,f,h,l,v,d=o||ik;for(s&&a.reverse(),u=0,c=a.length;u<c;++u){var y=a[u].toString();for(l=this.xh[y],f=0,h=d.length;f<h;++f){void 0!==(v=l[d[f]])&&v.execute(t,n,e,r,i,s)}}this.sh&&t.restore()},t}(),sk={};function ak(t){if(void 0!==sk[t])return sk[t];for(var n=2*t+1,e=t*t,r=new Array(e+1),i=0;i<=t;++i)for(var o=0;o<=t;++o){var s=i*i+o*o;if(s>e)break;var a=r[s];a||(a=[],r[s]=a),a.push(4*((t+i)*n+(t+o))+3),i>0&&a.push(4*((t-i)*n+(t+o))+3),o>0&&(a.push(4*((t+i)*n+(t-o))+3),i>0&&a.push(4*((t-i)*n+(t-o))+3))}for(var u=[],c=(i=0,r.length);i<c;++i)r[i]&&u.push.apply(u,r[i]);return sk[t]=u,u}var uk=ok,ck=.5;function fk(t,n,e,r,i,o,s){var a=_o(t[0]*ck,t[1]*ck);a.imageSmoothingEnabled=!1;for(var u=a.canvas,c=new gf(a,ck,i,null,s),f=e.length,h=Math.floor(16777215/f),l={},v=1;v<=f;++v){var d=e[v-1],y=d.getStyleFunction()||r;if(r){var m=y(d,o);if(m){Array.isArray(m)||(m=[m]);for(var b="#"+("000000"+(v*h).toString(16)).slice(-6),w=0,g=m.length;w<g;++w){var x=m[w],k=x.getGeometryFunction()(d);if(k&&te(i,k.getExtent())){var _=x.clone(),S=_.getFill();S&&S.setColor(b);var M=_.getStroke();M&&(M.setColor(b),M.setLineDash(null)),_.setText(void 0);var j=x.getImage();if(j&&0!==j.getOpacity()){var O=j.getImageSize();if(!O)continue;var T=_o(O[0],O[1],void 0,{alpha:!1}),E=T.canvas;T.fillStyle=b,T.fillRect(0,0,E.width,E.height),_.setImage(new zv({img:E,imgSize:O,anchor:j.getAnchor(),anchorXUnits:jv,anchorYUnits:jv,offset:j.getOrigin(),opacity:1,size:j.getSize(),scale:j.getScale(),rotation:j.getRotation(),rotateWithView:j.getRotateWithView()}))}var A=_.getZIndex()||0;(I=l[A])||(I={},l[A]=I,I[It.POLYGON]=[],I[It.CIRCLE]=[],I[It.LINE_STRING]=[],I[It.POINT]=[]),I[k.getType().replace("Multi","")].push(k,_)}}}}}for(var C=Object.keys(l).map(Number).sort(p),R=(v=0,C.length);v<R;++v){var I=l[C[v]];for(var P in I){var D=I[P];for(w=0,g=D.length;w<g;w+=2){c.setStyle(D[w+1]);for(var N=0,z=n.length;N<z;++N)c.setTransform(n[N]),c.drawGeometry(D[w])}}}return a.getImageData(0,0,u.width,u.height)}function hk(t,n,e){var r=[];if(e){var i=Math.floor(Math.round(t[0])*ck),o=Math.floor(Math.round(t[1])*ck),s=4*(ue(i,0,e.width-1)+ue(o,0,e.height-1)*e.width),a=e.data[s],u=e.data[s+1],c=e.data[s+2]+256*(u+256*a),f=Math.floor(16777215/n.length);c&&c%f==0&&r.push(n[c/f-1])}return r}var lk=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),vk=function(t){function n(n){var e=t.call(this,n)||this;return e.Mh=e.jh.bind(e),e.Oh,e.Th=!1,e.Eh=null,e.Ah=null,e.xc=-1,e.Ch=NaN,e.Pc=[1/0,1/0,-1/0,-1/0],e.Rh=[1/0,1/0,-1/0,-1/0],e.Ih,e.Ph=null,e.Dh=null,e.Nh=null,e.zh=null,e.replayGroupChanged=!0,e.declutterExecutorGroup=null,e.clipping=!0,e}return lk(n,t),n.prototype.renderWorlds=function(t,n,e){var r=n.extent,i=n.viewState,o=i.center,s=i.resolution,a=i.projection,u=i.rotation,c=a.getExtent(),f=this.getLayer().getSource(),h=n.pixelRatio,l=n.viewHints,v=!(l[Aa]||l[Ca]),d=this.context,p=Math.round(n.size[0]*h),y=Math.round(n.size[1]*h),m=f.getWrapX()&&a.canWrapX(),b=m?Qn(c):null,w=m?Math.ceil((r[2]-c[2])/b)+1:1,g=m?Math.floor((r[0]-c[0])/b):0;do{var x=this.getRenderTransform(o,s,u,h,p,y,g*b);t.execute(d,1,x,u,v,void 0,e)}while(++g<w)},n.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},n.prototype.renderFrame=function(t,n){var e=t.pixelRatio,r=t.layerStatesArray[t.layerIndex];on(this.pixelTransform,1/e,1/e),un(this.inversePixelTransform,this.pixelTransform);var i=fn(this.pixelTransform);this.useContainer(n,i,r.opacity,this.getBackground(t));var o=this.context,s=o.canvas,a=this.zh,u=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!u||u.isEmpty()))return null;var c=Math.round(t.size[0]*e),f=Math.round(t.size[1]*e);s.width!=c||s.height!=f?(s.width=c,s.height=f,s.style.transform!==i&&(s.style.transform=i)):this.containerReused||o.clearRect(0,0,c,f),this.preRender(o,t);var h=t.viewState,l=h.projection,v=!1,d=!0;if(r.extent&&this.clipping){var p=Nr(r.extent,l);(v=(d=te(p,t.extent))&&!jn(p,t.extent))&&this.clipUnrotated(o,t,p)}d&&this.renderWorlds(a,t),v&&o.restore(),this.postRender(o,t);var y=Cs(r.opacity),m=this.container;return y!==m.style.opacity&&(m.style.opacity=y),this.Ih!==h.rotation&&(this.Ih=h.rotation,this.Eh=null),this.container},n.prototype.getFeatures=function(t){return new Promise(function(n){if(!this.Eh&&!this.Oh){var e=[this.context.canvas.width,this.context.canvas.height];nn(this.pixelTransform,e);var r=this.Ph,i=this.Ch,o=this.Ih,s=this.Dh,a=this.Rh,u=this.getLayer(),c=[],f=e[0]*ck,h=e[1]*ck;c.push(this.getRenderTransform(r,i,o,ck,f,h,0).slice());var l=u.getSource(),v=s.getExtent();if(l.getWrapX()&&s.canWrapX()&&!jn(v,a)){for(var d=a[0],p=Qn(v),y=0,m=void 0;d<v[0];)m=p*--y,c.push(this.getRenderTransform(r,i,o,ck,f,h,m).slice()),d+=p;for(y=0,d=a[2];d>v[2];)m=p*++y,c.push(this.getRenderTransform(r,i,o,ck,f,h,m).slice()),d-=p}this.Eh=fk(e,c,this.Ah,u.getStyleFunction(),a,i,o)}n(hk(t,this.Ah,this.Eh))}.bind(this))},n.prototype.forEachFeatureAtCoordinate=function(t,n,e,r,i){var s=this;if(this.zh){var a,u=n.viewState.resolution,c=n.viewState.rotation,f=this.getLayer(),h={},l=function(t,n,e){var s=o(t),a=h[s];if(a){if(!0!==a&&e<a.distanceSq){if(0===e)return h[s]=!0,i.splice(i.lastIndexOf(a),1),r(t,f,n);a.geometry=n,a.distanceSq=e}}else{if(0===e)return h[s]=!0,r(t,f,n);i.push(h[s]={feature:t,layer:f,geometry:n,distanceSq:e,callback:r})}},v=[this.zh];return this.declutterExecutorGroup&&v.push(this.declutterExecutorGroup),v.some((function(r){return a=r.forEachFeatureAtCoordinate(t,u,c,e,l,r===s.declutterExecutorGroup&&n.declutterTree?n.declutterTree.all().map((function(t){return t.value})):null)})),a}},n.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.zh&&t.changed()},n.prototype.jh=function(t){this.renderIfReadyAndVisible()},n.prototype.prepareFrame=function(t){var n=this.getLayer(),e=n.getSource();if(!e)return!1;var r=t.viewHints[Aa],i=t.viewHints[Ca],o=n.getUpdateWhileAnimating(),s=n.getUpdateWhileInteracting();if(!this.Th&&!o&&r||!s&&i)return this.Oh=!0,!0;this.Oh=!1;var a=t.extent,u=t.viewState,c=u.projection,f=u.resolution,h=t.pixelRatio,l=n.getRevision(),v=n.getRenderBuffer(),d=n.getRenderOrder();void 0===d&&(d=Tf);var p=u.center.slice(),y=kn(a,v*f),m=y.slice(),b=[y.slice()],w=c.getExtent();if(e.getWrapX()&&c.canWrapX()&&!jn(w,t.extent)){var g=Qn(w),k=Math.max(Qn(y)/2,g);y[0]=w[0]-k,y[2]=w[2]+k,hr(p,c);var _=se(b[0],c);_[0]<w[0]&&_[2]<w[2]?b.push([_[0]+g,_[1],_[2]+g,_[3]]):_[0]>w[0]&&_[2]>w[2]&&b.push([_[0]-g,_[1],_[2]-g,_[3]])}if(!this.Th&&this.Ch==f&&this.xc==l&&this.Nh==d&&jn(this.Rh,y))return x(this.Pc,m)||(this.Eh=null,this.Pc=m),this.Ph=p,this.replayGroupChanged=!1,!0;this.zh=null,this.Th=!1;var S,M=new Zx(Af(f,h),y,f,h);this.getLayer().getDeclutter()&&(S=new Zx(Af(f,h),y,f,h));var j,O=Rr();if(O){for(var T=0,E=b.length;T<E;++T){var A=Dr(b[T],c);e.loadFeatures(A,zr(f,c),O)}j=jr(O,c)}else for(T=0,E=b.length;T<E;++T)e.loadFeatures(b[T],f,c);var C=Ef(f,h),R=function(t){var e,r=t.getStyleFunction()||n.getStyleFunction();if(r&&(e=r(t,f)),e){var i=this.renderFeature(t,C,e,M,j,S);this.Th=this.Th||i}}.bind(this),I=Dr(y,c),P=e.getFeaturesInExtent(I);d&&P.sort(d);for(T=0,E=P.length;T<E;++T)R(P[T]);this.Ah=P;var D=M.finish(),N=new uk(y,f,h,e.getOverlaps(),D,n.getRenderBuffer());return S&&(this.declutterExecutorGroup=new uk(y,f,h,e.getOverlaps(),S.finish(),n.getRenderBuffer())),this.Ch=f,this.xc=l,this.Nh=d,this.Pc=m,this.Rh=y,this.Ph=p,this.Dh=c,this.zh=N,this.Eh=null,this.replayGroupChanged=!0,!0},n.prototype.renderFeature=function(t,n,e,r,i,o){if(!e)return!1;var s=!1;if(Array.isArray(e))for(var a=0,u=e.length;a<u;++a)s=Cf(r,t,e[a],n,this.Mh,i,o)||s;else s=Cf(r,t,e,n,this.Mh,i,o);return s},n}(Mg),dk=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),pk=function(t){function n(n){var e=t.call(this,n)||this;return e.Lh=new vk(n),e.Fh=n.getImageRatio(),e.Gh=[1,0,0,1,0,0],e.Uh=null,e}return dk(n,t),n.prototype.disposeInternal=function(){this.Lh.dispose(),t.prototype.disposeInternal.call(this)},n.prototype.getFeatures=function(t){if(!this.Lh)return new Promise((function(t){return t([])}));var n=nn(this.Gh,nn(this.Uh,t.slice()));return this.Lh.getFeatures(n)},n.prototype.handleFontsChanged=function(){this.Lh.handleFontsChanged()},n.prototype.prepareFrame=function(t){var n=t.pixelRatio,e=t.viewState,r=e.resolution,i=t.viewHints,o=this.Lh,s=t.extent;1!==this.Fh&&re(s=s.slice(0),this.Fh);var a=Qn(s)/r,u=Kn(s)/r;if(!i[Aa]&&!i[Ca]&&!ne(s)){o.useContainer(null,null,1);var c=o.context,f=E({},t,{declutterTree:new Yv(9),extent:s,size:[a,u],viewState:E({},t.viewState,{rotation:0})}),h=!0,l=new ko(s,r,n,c.canvas,(function(t){o.prepareFrame(f)&&o.replayGroupChanged&&(o.clipping=!1,o.renderFrame(f,null)&&(o.renderDeclutter(f),h=!1),t())}));l.addEventListener(D,function(){if(l.getState()===po){this.Dt=h?null:l;var t=l.getResolution(),r=l.getPixelRatio(),i=t*n/r;this.renderedResolution=i,this.Gh=an(this.Gh,a/2,u/2,1/i,-1/i,0,-e.center[0],-e.center[1])}}.bind(this)),l.load()}return this.Dt&&(this.Uh=t.pixelToCoordinateTransform.slice()),!!this.Dt},n.prototype.preRender=function(){},n.prototype.postRender=function(){},n.prototype.renderDeclutter=function(){},n.prototype.forEachFeatureAtCoordinate=function(n,e,r,i,o){return this.Lh?this.Lh.forEachFeatureAtCoordinate(n,e,r,i,o):t.prototype.forEachFeatureAtCoordinate.call(this,n,e,r,i,o)},n}(Og),yk="image",mk="hybrid",bk="vector",wk=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),gk={image:[Mf,xf,Sf,_f,jf],hybrid:[Mf,Sf],vector:[]},xk={hybrid:[_f,jf,kf],vector:[Mf,xf,Sf,_f,jf,kf]},kk=function(t){function n(n){var e=t.call(this,n)||this;return e.Mh=e.jh.bind(e),e.Th=!1,e.Bh,e.Uh=null,e.Ih,e.qh=[1,0,0,1,0,0],e}return wk(n,t),n.prototype.prepareTile=function(t,n,e){var r,i=t.getState();return i!==dt&&i!==pt||(this.$h(t,n,e),this.Vh(t)&&(r=!0)),r},n.prototype.getTile=function(n,e,r,i){var o=i.pixelRatio,s=i.viewState,a=s.resolution,u=s.projection,c=this.getLayer(),f=c.getSource().getTile(n,e,r,o,u),h=i.viewHints,l=!(h[Aa]||h[Ca]);return!l&&f.wantedResolution||(f.wantedResolution=a),this.prepareTile(f,o,u)&&(l||Date.now()-i.time<8)&&c.getRenderMode()!==bk&&this.Zh(f,i),t.prototype.getTile.call(this,n,e,r,i)},n.prototype.isDrawableTile=function(n){var e=this.getLayer();return t.prototype.isDrawableTile.call(this,n)&&(e.getRenderMode()===bk?o(e)in n.executorGroups:n.hasContext(e))},n.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},n.prototype.prepareFrame=function(n){var e=this.getLayer().getRevision();return this.Bh!=e&&(this.renderedTiles.length=0),this.Bh=e,t.prototype.prepareFrame.call(this,n)},n.prototype.$h=function(t,n,e){var r=this.getLayer(),i=r.getRevision(),s=r.getRenderOrder()||null,a=t.wantedResolution,u=t.getReplayState(r);if(u.dirty||u.renderedResolution!==a||u.renderedRevision!=i||u.renderedRenderOrder!=s){var c=r.getSource(),f=r.getDeclutter(),h=c.getTileGrid(),l=c.getTileGridForProjection(e).getTileCoordExtent(t.wrappedTileCoord),v=c.getSourceTiles(n,e,t),d=o(r);delete t.hitDetectionImageData[d],t.executorGroups[d]=[],f&&(t.declutterExecutorGroups[d]=[]);for(var p=function(e,i){var o=v[e];if(o.getState()!=dt)return"continue";var p=o.tileCoord,m=h.getTileCoordExtent(p),b=Xn(l,m),w=kn(b,r.getRenderBuffer()*a,y.tmpExtent),g=Pn(m,b)?null:w;u.dirty=!1;var x=new Zx(0,w,a,n),k=f?new Zx(0,b,a,n):void 0,_=Ef(a,n),S=function(t){var n,e=t.getStyleFunction()||r.getStyleFunction();if(e&&(n=e(t,a)),n){var i=this.renderFeature(t,_,n,x,k);this.Th=this.Th||i,u.dirty=u.dirty||i}},M=o.getFeatures();s&&s!==u.renderedRenderOrder&&M.sort(s);for(var j=0,O=M.length;j<O;++j){var T=M[j];g&&!te(g,T.getGeometry().getExtent())||S.call(y,T)}var E=x.finish(),A=r.getRenderMode()!==bk&&f&&1===v.length?null:b,C=new uk(A,a,n,c.getOverlaps(),E,r.getRenderBuffer());if(t.executorGroups[d].push(C),k){var R=new uk(null,a,n,c.getOverlaps(),k.finish(),r.getRenderBuffer());t.declutterExecutorGroups[d].push(R)}},y=this,m=0,b=v.length;m<b;++m)p(m);u.renderedRevision=i,u.renderedRenderOrder=s,u.renderedResolution=a}},n.prototype.forEachFeatureAtCoordinate=function(t,n,e,r,i){var s=n.viewState.resolution,a=n.viewState.rotation;e=null==e?0:e;var u=this.getLayer(),c=u.getSource().getTileGridForProjection(n.viewState.projection),f=xn([t]);kn(f,s*e,f);for(var h,l={},v=function(t,n,e){var s=t.getId();void 0===s&&(s=o(t));var a=l[s];if(a){if(!0!==a&&e<a.distanceSq){if(0===e)return l[s]=!0,i.splice(i.lastIndexOf(a),1),r(t,u,n);a.geometry=n,a.distanceSq=e}}else{if(0===e)return l[s]=!0,r(t,u,n);i.push(l[s]={feature:t,layer:u,geometry:n,distanceSq:e,callback:r})}},d=this.renderedTiles,p=function(r,i){var l=d[r];if(!te(c.getTileCoordExtent(l.wrappedTileCoord),f))return"continue";var p=o(u),y=[l.executorGroups[p]],m=l.declutterExecutorGroups[p];m&&y.push(m),y.some((function(r){for(var i=r===m?n.declutterTree.all().map((function(t){return t.value})):null,o=0,u=r.length;o<u;++o){var c=r[o];if(h=c.forEachFeatureAtCoordinate(t,s,a,e,v,i))return!0}}))},y=0,m=d.length;!h&&y<m;++y)p(y);return h},n.prototype.getFeatures=function(t){return new Promise(function(n,e){for(var r,i=this.getLayer(),s=o(i),a=i.getSource(),u=this.renderedProjection,c=u.getExtent(),f=this.renderedResolution,h=a.getTileGridForProjection(u),l=nn(this.Uh,t.slice()),v=h.getTileCoordForCoordAndResolution(l,f),d=0,p=this.renderedTiles.length;d<p;++d)if(v.toString()===this.renderedTiles[d].tileCoord.toString()){if((r=this.renderedTiles[d]).getState()===dt){var y=h.getTileCoordExtent(r.tileCoord);a.getWrapX()&&u.canWrapX()&&!jn(c,y)&&hr(l,u);break}r=void 0}if(!r||r.loadingSourceTiles>0)n([]);else{var m=Yn(h.getTileCoordExtent(r.wrappedTileCoord)),b=[(l[0]-m[0])/f,(m[1]-l[1])/f],w=r.getSourceTiles().reduce((function(t,n){return t.concat(n.getFeatures())}),[]),g=r.hitDetectionImageData[s];if(!g&&!this.Oh){var x=eu(h.getTileSize(h.getZForResolution(f))),k=this.Ih;g=fk(x,[this.getRenderTransform(h.getTileCoordCenter(r.wrappedTileCoord),f,0,ck,x[0]*ck,x[1]*ck,0)],w,i.getStyleFunction(),h.getTileCoordExtent(r.wrappedTileCoord),r.getReplayState(i).renderedResolution,k),r.hitDetectionImageData[s]=g}n(hk(b,w,g))}}.bind(this))},n.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&void 0!==this.Bh&&t.changed()},n.prototype.jh=function(t){this.renderIfReadyAndVisible()},n.prototype.renderDeclutter=function(t){var n=this.context,e=n.globalAlpha;n.globalAlpha=this.getLayer().getOpacity();for(var r=t.viewHints,i=!(r[Aa]||r[Ca]),s=this.renderedTiles,a=0,u=s.length;a<u;++a){var c=s[a],f=c.declutterExecutorGroups[o(this.getLayer())];if(f)for(var h=f.length-1;h>=0;--h)f[h].execute(this.context,1,this.getTileRenderTransform(c,t),t.viewState.rotation,i,void 0,t.declutterTree)}n.globalAlpha=e},n.prototype.getTileRenderTransform=function(t,n){var e=n.pixelRatio,r=n.viewState,i=r.center,o=r.resolution,s=r.rotation,a=n.size,u=Math.round(a[0]*e),c=Math.round(a[1]*e),f=this.getLayer().getSource().getTileGridForProjection(n.viewState.projection),h=t.tileCoord,l=f.getTileCoordExtent(t.wrappedTileCoord),v=f.getTileCoordExtent(h,this.tmpExtent)[0]-l[0];return Jt(rn(this.inversePixelTransform.slice(),1/e,1/e),this.getRenderTransform(i,o,s,e,u,c,v))},n.prototype.renderFrame=function(n,e){var r=n.viewHints,i=!(r[Aa]||r[Ca]);t.prototype.renderFrame.call(this,n,e),this.Uh=n.pixelToCoordinateTransform.slice(),this.Ih=n.viewState.rotation;var s=this.getLayer(),a=s.getRenderMode(),u=this.context,c=u.globalAlpha;u.globalAlpha=s.getOpacity();for(var f=xk[a],h=n.viewState.rotation,l=this.renderedTiles,v=[],d=[],p=l.length-1;p>=0;--p)for(var y=l[p],m=this.getTileRenderTransform(y,n),b=y.executorGroups[o(s)],w=!1,g=0,x=b.length;g<x;++g){var k=b[g];if(k.hasExecutors(f)){var _=y.tileCoord[0],S=void 0;if(!w&&(S=k.getClipCoords(m))){u.save();for(var M=0,j=v.length;M<j;++M){var O=v[M];_<d[M]&&(u.beginPath(),u.moveTo(S[0],S[1]),u.lineTo(S[2],S[3]),u.lineTo(S[4],S[5]),u.lineTo(S[6],S[7]),u.moveTo(O[6],O[7]),u.lineTo(O[4],O[5]),u.lineTo(O[2],O[3]),u.lineTo(O[0],O[1]),u.clip())}}k.execute(u,1,m,h,i,f),!w&&S&&(u.restore(),v.push(S),d.push(_),w=!0)}}return u.globalAlpha=c,this.container},n.prototype.renderFeature=function(t,n,e,r,i){if(!e)return!1;var o=!1;if(Array.isArray(e))for(var s=0,a=e.length;s<a;++s)o=Cf(r,t,e[s],n,this.Mh,void 0,i)||o;else o=Cf(r,t,e,n,this.Mh,void 0,i);return o},n.prototype.Vh=function(t){var n=this.getLayer();if(n.getRenderMode()===bk)return!1;var e=t.getReplayState(n),r=n.getRevision(),i=t.wantedResolution;return e.renderedTileResolution!==i||e.renderedTileRevision!==r},n.prototype.Zh=function(t,n){var e=this.getLayer(),r=t.getReplayState(e),i=e.getRevision(),s=t.executorGroups[o(e)];r.renderedTileRevision=i;var a=t.wrappedTileCoord,u=a[0],c=e.getSource(),f=n.pixelRatio,h=n.viewState.projection,l=c.getTileGridForProjection(h),v=l.getResolution(t.tileCoord[0]),d=n.pixelRatio/t.wantedResolution*v,p=l.getResolution(u),y=t.getContext(e);f=Math.round(Math.max(f,d/f));var m=c.getTilePixelSize(u,f,h);y.canvas.width=m[0],y.canvas.height=m[1];var b=f/d;if(1!==b){var w=Yt(this.qh);rn(w,b,b),y.setTransform.apply(y,w)}var g=l.getTileCoordExtent(a,this.tmpExtent),x=d/p,k=Yt(this.qh);rn(k,x,-x),sn(k,-g[0],-g[3]);for(var _=0,S=s.length;_<S;++_){s[_].execute(y,b,k,0,!0,gk[e.getRenderMode()])}r.renderedTileResolution=t.wantedResolution},n}(zg);function _k(t,n,e,r,i,o,s){var a,u,c=(e-n)/r;if(1===c)a=n;else if(2===c)a=n,u=i;else if(0!==c){for(var f=t[n],h=t[n+1],l=0,v=[0],p=n+r;p<e;p+=r){var y=t[p],m=t[p+1];l+=Math.sqrt((y-f)*(y-f)+(m-h)*(m-h)),v.push(l),f=y,h=m}var b=i*l,w=d(v,b);w<0?(u=(b-v[-w-2])/(v[-w-1]-v[-w-2]),a=n+(-w-2)*r):a=n+w*r}var g=s>1?s:2,x=o||new Array(g);for(p=0;p<g;++p)x[p]=void 0===a?NaN:void 0===u?t[a+p]:me(t[a+p],t[a+r+p],u);return x}function Sk(t,n,e,r,i,o){if(e==n)return null;var s;if(i<t[n+r-1])return o?((s=t.slice(n,n+r))[r-1]=i,s):null;if(t[e-1]<i)return o?((s=t.slice(e-r,e))[r-1]=i,s):null;if(i==t[n+r-1])return t.slice(n,n+r);for(var a=n/r,u=e/r;a<u;){var c=a+u>>1;i<t[(c+1)*r-1]?u=c:a=c+1}var f=t[a*r-1];if(i==f)return t.slice((a-1)*r,(a-1)*r+r);var h=(i-f)/(t[(a+1)*r-1]-f);s=[];for(var l=0;l<r-1;++l)s.push(me(t[(a-1)*r+l],t[a*r+l],h));return s.push(i),s}function Mk(t,n,e,r,i,o,s){if(s)return Sk(t,n,e[e.length-1],r,i,o);var a;if(i<t[r-1])return o?((a=t.slice(0,r))[r-1]=i,a):null;if(t[t.length-1]<i)return o?((a=t.slice(t.length-r))[r-1]=i,a):null;for(var u=0,c=e.length;u<c;++u){var f=e[u];if(n!=f){if(i<t[n+r-1])return null;if(i<=t[f-1])return Sk(t,n,f,r,i,!1);n=f}}return null}function jk(t,n,e,r){for(var i=[],o=[1/0,1/0,-1/0,-1/0],s=0,a=e.length;s<a;++s){var u=e[s];o=In(t,n,u[0],r),i.push((o[0]+o[2])/2,(o[1]+o[3])/2),n=u[u.length-1]}return i}var Ok=[1,0,0,1,0,0],Tk=function(){function t(t,n,e,r,i){this.styleFunction,this.st,this.W=i,this.Wh=t,this.Hh=n,this.Kh=null,this.Xh=null,this.gt=e,this.Yh=r}return t.prototype.get=function(t){return this.Yh[t]},t.prototype.getExtent=function(){return this.st||(this.st=this.Wh===It.POINT?Rn(this.Hh):In(this.Hh,0,this.Hh.length,2)),this.st},t.prototype.getFlatInteriorPoint=function(){if(!this.Kh){var t=Zn(this.getExtent());this.Kh=Ai(this.Hh,0,this.gt,2,t,0)}return this.Kh},t.prototype.getFlatInteriorPoints=function(){if(!this.Kh){var t=jk(this.Hh,0,this.gt,2);this.Kh=Ci(this.Hh,0,this.gt,2,t)}return this.Kh},t.prototype.getFlatMidpoint=function(){return this.Xh||(this.Xh=_k(this.Hh,0,this.Hh.length,2,.5)),this.Xh},t.prototype.getFlatMidpoints=function(){if(!this.Xh){this.Xh=[];for(var t=this.Hh,n=0,e=this.gt,r=0,i=e.length;r<i;++r){var o=e[r],s=_k(t,n,o,2,.5);w(this.Xh,s),n=o}}return this.Xh},t.prototype.getId=function(){return this.W},t.prototype.getOrientedFlatCoordinates=function(){return this.Hh},t.prototype.getGeometry=function(){return this},t.prototype.getSimplifiedGeometry=function(t){return this},t.prototype.simplifyTransformed=function(t,n){return this},t.prototype.getProperties=function(){return this.Yh},t.prototype.getStride=function(){return 2},t.prototype.getStyleFunction=function(){return this.styleFunction},t.prototype.getType=function(){return this.Wh},t.prototype.transform=function(t){var n=(t=mr(t)).getExtent(),e=t.getWorldExtent();if(n&&e){var r=Kn(e)/Kn(n);an(Ok,e[0],e[3],r,-r,0,0,0),Ur(this.Hh,0,this.Hh.length,2,Ok,this.Hh)}},t.prototype.getEnds=function(){return this.gt},t}();Tk.prototype.getEndss=Tk.prototype.getEnds,Tk.prototype.getFlatCoordinates=Tk.prototype.getOrientedFlatCoordinates;var Ek=Tk;var Ak=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ck=function(t){function n(n,e){var r=t.call(this)||this;return r.Jh=null,r.Qh=-1,r.bt=-1,r.wt=-1,void 0===e||Array.isArray(n[0])?r.setCoordinates(n,e):r.setFlatCoordinates(e,n),r}return Ak(n,t),n.prototype.appendCoordinate=function(t){this.flatCoordinates?w(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,e,r){return r<Sn(this.getExtent(),t,n)?r:(this.wt!=this.getRevision()&&(this.bt=Math.sqrt(Qr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.wt=this.getRevision()),ei(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.bt,!1,t,n,e,r))},n.prototype.forEachSegment=function(t){return Ri(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},n.prototype.getCoordinateAtM=function(t,n){if(this.layout!=Ct&&this.layout!=Rt)return null;var e=void 0!==n&&n;return Sk(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e)},n.prototype.getCoordinates=function(){return yi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getCoordinateAt=function(t,n){return _k(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,this.stride)},n.prototype.getLength=function(){return Hx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getFlatMidpoint=function(){return this.Qh!=this.getRevision()&&(this.Jh=this.getCoordinateAt(.5,this.Jh),this.Qh=this.getRevision()),this.Jh},n.prototype.getSimplifiedGeometryInternal=function(t){var e=[];return e.length=ci(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new n(e,Et)},n.prototype.getType=function(){return It.LINE_STRING},n.prototype.intersectsExtent=function(t){return Ii(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=si(this.flatCoordinates,0,t,this.stride),this.changed()},n}(Yr),Rk=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ik=function(t){function n(n){return t.call(this,n)||this}return Rk(n,t),n.prototype.createRenderer=function(){return new vk(this)},n}(Sx);function Pk(t,n,e){for(var r,i,o,s,a,u,c=[],f=t(0),h=t(1),l=n(f),v=n(h),d=[h,f],p=[v,l],y=[1,0],m={},b=1e5;--b>0&&y.length>0;)o=y.pop(),f=d.pop(),l=p.pop(),(u=o.toString())in m||(c.push(l[0],l[1]),m[u]=!0),s=y.pop(),h=d.pop(),v=p.pop(),he((i=n(r=t(a=(o+s)/2)))[0],i[1],l[0],l[1],v[0],v[1])<e?(c.push(v[0],v[1]),m[u=s.toString()]=!0):(y.push(s,a,a,o),p.push(v,i,i,l),d.push(h,r,r,f));return c}function Dk(t,n,e,r,i){return Pk((function(r){return[t,n+(e-n)*r]}),Or(mr("EPSG:4326"),r),i)}function Nk(t,n,e,r,i){return Pk((function(r){return[n+(e-n)*r,t]}),Or(mr("EPSG:4326"),r),i)}var zk=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Lk=new Lv({color:"rgba(0,0,0,0.2)"}),Fk=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001],Gk=function(t){function n(n){var e=this,r=n||{},i=E({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},r);return delete i.maxLines,delete i.strokeStyle,delete i.targetSize,delete i.showLabels,delete i.lonLabelFormatter,delete i.latLabelFormatter,delete i.lonLabelPosition,delete i.latLabelPosition,delete i.lonLabelStyle,delete i.latLabelStyle,delete i.intervals,(e=t.call(this,i)||this).de=null,e.tl=1/0,e.nl=1/0,e.el=-1/0,e.rl=-1/0,e.il=1/0,e.sl=1/0,e.al=-1/0,e.ul=-1/0,e.cl=void 0!==r.targetSize?r.targetSize:100,e.fl=void 0!==r.maxLines?r.maxLines:100,e.hl=[],e.ll=[],e.vl=void 0!==r.strokeStyle?r.strokeStyle:Lk,e.dl=void 0,e.pl=void 0,e.yl=null,e.ml=null,e.bl=null,e.wl=null,e.gl=null,e.xl=null,e.kl=null,r.showLabels&&(e._l=null==r.lonLabelFormatter?er.bind(e,"EW"):r.lonLabelFormatter,e.Sl=null==r.latLabelFormatter?er.bind(e,"NS"):r.latLabelFormatter,e.Ml=null==r.lonLabelPosition?0:r.lonLabelPosition,e.jl=null==r.latLabelPosition?1:r.latLabelPosition,e.Ol=new Zv({text:void 0!==r.lonLabelStyle?r.lonLabelStyle.clone():new Kv({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new Sv({color:"rgba(0,0,0,1)"}),stroke:new Lv({color:"rgba(255,255,255,1)",width:3})})}),e.Tl=function(t){var n=t.get("graticule_label");return this.Ol.getText().setText(n),this.Ol}.bind(e),e.El=new Zv({text:void 0!==r.latLabelStyle?r.latLabelStyle.clone():new Kv({font:"12px Calibri,sans-serif",textAlign:"right",fill:new Sv({color:"rgba(0,0,0,1)"}),stroke:new Lv({color:"rgba(255,255,255,1)",width:3})})}),e.Al=function(t){var n=t.get("graticule_label");return this.El.getText().setText(n),this.El}.bind(e),e.xl=[],e.kl=[],e.addEventListener(ss,e.Cl.bind(e))),e.Rl=void 0!==r.intervals?r.intervals:Fk,e.setSource(new Ad({loader:e.loaderFunction.bind(e),strategy:e.strategyFunction.bind(e),features:new ht,overlaps:!1,useSpatialIndex:!1,wrapX:r.wrapX})),e.Il=[],e.Pl=new Zv({stroke:e.vl}),e.Dl=null,e.Pc=null,e.setRenderOrder(null),e}return zk(n,t),n.prototype.strategyFunction=function(t,n){var e=t.slice();return this.de&&this.getSource().getWrapX()&&se(e,this.de),this.Dl&&(Dn(this.Dl,e,n)?e=this.Dl.slice():this.getSource().removeLoadedExtent(this.Dl)),[e]},n.prototype.loaderFunction=function(t,n,e){this.Dl=t;var r=this.getSource(),i=Xn(this.getExtent()||[-1/0,-1/0,1/0,1/0],t);if(!(this.Pc&&Pn(this.Pc,i)||(this.Pc=i,ne(i)))){var o=Zn(i),s=n*n/4;(!this.de||!Mr(this.de,e))&&this.Nl(e),this.zl(i,o,n,s);var a,u=this.hl.length+this.ll.length;for(this.xl&&(u+=this.hl.length),this.kl&&(u+=this.ll.length);u>this.Il.length;)a=new Tt,this.Il.push(a);var c=r.getFeaturesCollection();c.clear();var f,h,l=0;for(f=0,h=this.hl.length;f<h;++f)(a=this.Il[l++]).setGeometry(this.hl[f]),a.setStyle(this.Pl),c.push(a);for(f=0,h=this.ll.length;f<h;++f)(a=this.Il[l++]).setGeometry(this.ll[f]),a.setStyle(this.Pl),c.push(a)}},n.prototype.Ll=function(t,n,e,r,i,o){var s=this.Fl(t,n,e,r,o);if(te(s.getExtent(),i)){if(this.xl){var a=this._l(t);o in this.xl?this.xl[o].text=a:this.xl[o]={geom:new Mi([]),text:a}}this.hl[o++]=s}return o},n.prototype.Gl=function(t,n,e,r,i,o){var s=this.Ul(t,n,e,r,o);if(te(s.getExtent(),i)){if(this.kl){var a=this.Sl(t);o in this.kl?this.kl[o].text=a:this.kl[o]={geom:new Mi([]),text:a}}this.ll[o++]=s}return o},n.prototype.Cl=function(t){var n=t.frameState.viewState.rotation,e=t.frameState.extent,r=Zn(e),i=e;if(n){var o=Qn(e),s=Kn(e),a=Math.abs(Math.cos(n)),u=Math.abs(Math.sin(n)),c=(u*s-a*o)/(u*u-a*a),f=(u*o-a*s)/(u*u-a*a);i=[r[0]-c/2,r[1]-f/2,r[0]+c/2,r[1]+f/2]}var h=0,l=0,v=this.jl<.5,d=this.de.getExtent(),p=Qn(d);this.getSource().getWrapX()&&this.de.canWrapX()&&!jn(d,e)&&(h=Math.floor((e[0]-d[0])/p),l=Math.ceil((e[2]-d[2])/p),v=v!==Math.abs(n)>Math.PI/2);for(var y=If(t),m=h;m<=l;++m){var b=this.hl.length+this.ll.length,w=void 0,g=void 0,x=void 0,k=void 0;if(this.xl)for(g=0,x=this.xl.length;g<x;++g){var _=this.hl[g];if(n||0!==m)(S=_.clone()).translate(m*p,0),S.rotate(-n,r),(k=this.Bl(S,i,g)).rotate(n,r);else k=this.Bl(_,e,g);(w=this.Il[b++]).setGeometry(k),w.set("graticule_label",this.xl[g].text),y.drawFeature(w,this.Tl(w))}if(this.kl&&(m===h&&v||m===l&&!v))for(g=0,x=this.ll.length;g<x;++g){var S;_=this.ll[g];if(n||0!==m)(S=_.clone()).translate(m*p,0),S.rotate(-n,r),(k=this.ql(S,i,g)).rotate(n,r);else k=this.ql(_,e,g);(w=this.Il[b++]).setGeometry(k),w.set("graticule_label",this.kl[g].text),y.drawFeature(w,this.Al(w))}}},n.prototype.zl=function(t,n,e,r){var i=this.$l(e);if(-1==i)return this.hl.length=0,this.ll.length=0,this.xl&&(this.xl.length=0),void(this.kl&&(this.kl.length=0));var o=!1,s=this.de.getExtent(),a=Qn(s);this.getSource().getWrapX()&&this.de.canWrapX()&&!jn(s,t)&&(Qn(t)>=a?(t[0]=s[0],t[2]=s[2]):o=!0);var u=[ue(n[0],this.al,this.il),ue(n[1],this.ul,this.sl)],c=this.pl(u);isNaN(c[1])&&(c[1]=Math.abs(this.tl)>=Math.abs(this.el)?this.tl:this.el);var f,h,l,v,d=ue(c[0],this.rl,this.nl),p=ue(c[1],this.el,this.tl),y=this.fl,m=t;o||(m=[ue(t[0],this.al,this.il),ue(t[1],this.ul,this.sl),ue(t[2],this.al,this.il),ue(t[3],this.ul,this.sl)]);var b=oe(m,this.pl,void 0,8),w=b[3],g=b[2],x=b[1],k=b[0];if(o||(Mn(m,this.ml)&&(k=this.rl,x=this.el),Mn(m,this.bl)&&(g=this.nl,x=this.el),Mn(m,this.wl)&&(k=this.rl,w=this.tl),Mn(m,this.gl)&&(g=this.nl,w=this.tl),w=ue(w,p,this.tl),g=ue(g,d,this.nl),x=ue(x,this.el,p),k=ue(k,this.rl,d)),v=ue(d=Math.floor(d/i)*i,this.rl,this.nl),h=this.Ll(v,x,w,r,t,0),f=0,o)for(;(v-=i)>=k&&f++<y;)h=this.Ll(v,x,w,r,t,h);else for(;v!=this.rl&&f++<y;)v=Math.max(v-i,this.rl),h=this.Ll(v,x,w,r,t,h);if(v=ue(d,this.rl,this.nl),f=0,o)for(;(v+=i)<=g&&f++<y;)h=this.Ll(v,x,w,r,t,h);else for(;v!=this.nl&&f++<y;)v=Math.min(v+i,this.nl),h=this.Ll(v,x,w,r,t,h);for(this.hl.length=h,this.xl&&(this.xl.length=h),l=ue(p=Math.floor(p/i)*i,this.el,this.tl),h=this.Gl(l,k,g,r,t,0),f=0;l!=this.el&&f++<y;)l=Math.max(l-i,this.el),h=this.Gl(l,k,g,r,t,h);for(l=ue(p,this.el,this.tl),f=0;l!=this.tl&&f++<y;)l=Math.min(l+i,this.tl),h=this.Gl(l,k,g,r,t,h);this.ll.length=h,this.kl&&(this.kl.length=h)},n.prototype.$l=function(t){for(var n=this.yl[0],e=this.yl[1],r=-1,i=Math.pow(this.cl*t,2),o=[],s=[],a=0,u=this.Rl.length;a<u;++a){var c=ue(this.Rl[a]/2,0,90),f=ue(e,-90+c,90-c);if(o[0]=n-c,o[1]=f-c,s[0]=n+c,s[1]=f+c,this.dl(o,o),this.dl(s,s),Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)<=i)break;r=this.Rl[a]}return r},n.prototype.Fl=function(t,n,e,r,i){var o=Dk(t,n,e,this.de,r),s=this.hl[i];return s?(s.setFlatCoordinates(Et,o),s.changed()):(s=new Ck(o,Et),this.hl[i]=s),s},n.prototype.Bl=function(t,n,e){var r=t.getFlatCoordinates(),i=1,o=r.length-1;r[i]>r[o]&&(i=o,o=1);var s=Math.max(n[1],r[i]),a=Math.min(n[3],r[o]),u=ue(n[1]+Math.abs(n[1]-n[3])*this.Ml,s,a),c=[r[i-1]+(r[o-1]-r[i-1])*(u-r[i])/(r[o]-r[i]),u],f=this.xl[e].geom;return f.setCoordinates(c),f},n.prototype.getMeridians=function(){return this.hl},n.prototype.Ul=function(t,n,e,r,i){var o=Nk(t,n,e,this.de,r),s=this.ll[i];return s?(s.setFlatCoordinates(Et,o),s.changed()):s=new Ck(o,Et),s},n.prototype.ql=function(t,n,e){var r=t.getFlatCoordinates(),i=0,o=r.length-2;r[i]>r[o]&&(i=o,o=0);var s=Math.max(n[0],r[i]),a=Math.min(n[2],r[o]),u=ue(n[0]+Math.abs(n[0]-n[2])*this.jl,s,a),c=[u,r[i+1]+(r[o+1]-r[i+1])*(u-r[i])/(r[o]-r[i])],f=this.kl[e].geom;return f.setCoordinates(c),f},n.prototype.getParallels=function(){return this.ll},n.prototype.Nl=function(t){var n=mr("EPSG:4326"),e=t.getWorldExtent();this.tl=e[3],this.nl=e[2],this.el=e[1],this.rl=e[0];var r=Or(t,n);if(this.rl<this.nl)this.pl=r;else{var i=this.rl+this.nl/2;this.nl+=360,this.pl=function(t,n,e){for(var o=e||2,s=r(t,n,o),a=0,u=s.length;a<u;a+=o)s[a]<i&&(s[a]+=360);return s}}this.dl=Or(n,t);var o=oe([this.rl,this.el,this.nl,this.tl],this.dl,void 0,8);this.al=o[0],this.il=o[2],this.ul=o[1],this.sl=o[3],this.ml=this.dl([this.rl,this.el]),this.bl=this.dl([this.nl,this.el]),this.wl=this.dl([this.rl,this.tl]),this.gl=this.dl([this.nl,this.tl]),this.yl=this.pl(Zn(t.getExtent())),isNaN(this.yl[1])&&(this.yl[1]=Math.abs(this.tl)>=Math.abs(this.el)?this.tl:this.el),this.de=t},n}(Ik),Uk=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Bk="blur",qk="gradient",$k="radius",Vk=["#00f","#0ff","#0f0","#ff0","#f00"];var Zk=function(t){function n(n){var e=this,r=n||{},i=E({},r);delete i.gradient,delete i.radius,delete i.blur,delete i.weight,(e=t.call(this,i)||this).Vl=null,e.addChangeListener(qk,e.Zl),e.setGradient(r.gradient?r.gradient:Vk),e.setBlur(void 0!==r.blur?r.blur:15),e.setRadius(void 0!==r.radius?r.radius:8);var o=r.weight?r.weight:"weight";return e.Wl="string"==typeof o?function(t){return t.get(o)}:o,e.setRenderOrder(null),e}return Uk(n,t),n.prototype.getBlur=function(){return this.get(Bk)},n.prototype.getGradient=function(){return this.get(qk)},n.prototype.getRadius=function(){return this.get($k)},n.prototype.Zl=function(){this.Vl=function(t){for(var n=1,e=256,r=_o(n,e),i=r.createLinearGradient(0,0,n,e),o=1/(t.length-1),s=0,a=t.length;s<a;++s)i.addColorStop(s*o,t[s]);return r.fillStyle=i,r.fillRect(0,0,n,e),r.canvas}(this.getGradient())},n.prototype.setBlur=function(t){this.set(Bk,t)},n.prototype.setGradient=function(t){this.set(qk,t)},n.prototype.setRadius=function(t){this.set($k,t)},n.prototype.createRenderer=function(){return new jx(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var n=this.Wl(t);return void 0!==n?ue(n,0,1):1}.bind(this)}],vertexShader:"\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n uniform float u_size;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_weight;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_weight = a_weight;\n }",fragmentShader:"\n precision mediump float;\n uniform float u_blurSlope;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n\n void main(void) {\n vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n }",hitVertexShader:"\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n uniform float u_size;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_weight;\n attribute vec4 a_hitColor;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n varying vec4 v_hitColor;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_hitColor = a_hitColor;\n v_weight = a_weight;\n }",hitFragmentShader:"\n precision mediump float;\n uniform float u_blurSlope;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n varying vec4 v_hitColor;\n\n void main(void) {\n vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n if (alpha < 0.05) {\n discard;\n }\n\n gl_FragColor = v_hitColor;\n }",uniforms:{u_size:function(){return 2*(this.get($k)+this.get(Bk))}.bind(this),u_blurSlope:function(){return this.get($k)/Math.max(1,this.get(Bk))}.bind(this)},postProcesses:[{fragmentShader:"\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform sampler2D u_gradientTexture;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor.a = color.a * u_opacity;\n gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n gl_FragColor.rgb *= gl_FragColor.a;\n }",uniforms:{u_gradientTexture:function(){return this.Vl}.bind(this),u_opacity:function(){return this.getOpacity()}.bind(this)}}]})},n.prototype.renderDeclutter=function(){},n}(Sx),Wk=function(){function t(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return t.prototype.getReadOptions=function(t,n){var e;if(n){var r=n.dataProjection?mr(n.dataProjection):this.readProjection(t);n.extent&&r&&r.getUnits()===Ft.TILE_PIXELS&&(r=mr(r)).setWorldExtent(n.extent),e={dataProjection:r,featureProjection:n.featureProjection}}return this.adaptOptions(e)},t.prototype.adaptOptions=function(t){return E({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return r()},t.prototype.readFeature=function(t,n){return r()},t.prototype.readFeatures=function(t,n){return r()},t.prototype.readGeometry=function(t,n){return r()},t.prototype.readProjection=function(t){return r()},t.prototype.writeFeature=function(t,n){return r()},t.prototype.writeFeatures=function(t,n){return r()},t.prototype.writeGeometry=function(t,n){return r()},t}();function Hk(t,n,e){var r,i=e?mr(e.featureProjection):null,o=e?mr(e.dataProjection):null;if(r=i&&o&&!Mr(i,o)?(n?t.clone():t).transform(n?i:o,n?o:i):t,n&&e&&void 0!==e.decimals){var s=Math.pow(10,e.decimals);r===t&&(r=t.clone()),r.applyTransform((function(t){for(var n=0,e=t.length;n<e;++n)t[n]=Math.round(t[n]*s)/s;return t}))}return r}function Kk(t,n){var e=n?mr(n.featureProjection):null,r=n?mr(n.dataProjection):null;return e&&r&&!Mr(e,r)?Er(t,r,e):t}var Xk=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Yk=function(t){function n(n,e,r){var i=t.call(this)||this;if(i.gt=[],i.bt=-1,i.wt=-1,Array.isArray(n[0]))i.setCoordinates(n,e);else if(void 0!==e&&r)i.setFlatCoordinates(e,n),i.gt=r;else{for(var o=i.getLayout(),s=n,a=[],u=[],c=0,f=s.length;c<f;++c){var h=s[c];0===c&&(o=h.getLayout()),w(a,h.getFlatCoordinates()),u.push(a.length)}i.setFlatCoordinates(o,a),i.gt=u}return i}return Xk(n,t),n.prototype.appendLineString=function(t){this.flatCoordinates?w(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.gt.push(this.flatCoordinates.length),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout,this.gt.slice());return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,e,r){return r<Sn(this.getExtent(),t,n)?r:(this.wt!=this.getRevision()&&(this.bt=Math.sqrt(ti(this.flatCoordinates,0,this.gt,this.stride,0)),this.wt=this.getRevision()),ri(this.flatCoordinates,0,this.gt,this.stride,this.bt,!1,t,n,e,r))},n.prototype.getCoordinateAtM=function(t,n,e){if(this.layout!=Ct&&this.layout!=Rt||0===this.flatCoordinates.length)return null;var r=void 0!==n&&n,i=void 0!==e&&e;return Mk(this.flatCoordinates,0,this.gt,this.stride,t,r,i)},n.prototype.getCoordinates=function(){return mi(this.flatCoordinates,0,this.gt,this.stride)},n.prototype.getEnds=function(){return this.gt},n.prototype.getLineString=function(t){return t<0||this.gt.length<=t?null:new Ck(this.flatCoordinates.slice(0===t?0:this.gt[t-1],this.gt[t]),this.layout)},n.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,n=this.gt,e=this.layout,r=[],i=0,o=0,s=n.length;o<s;++o){var a=n[o],u=new Ck(t.slice(i,a),e);r.push(u),i=a}return r},n.prototype.getFlatMidpoints=function(){for(var t=[],n=this.flatCoordinates,e=0,r=this.gt,i=this.stride,o=0,s=r.length;o<s;++o){var a=r[o];w(t,_k(n,e,a,i,.5)),e=a}return t},n.prototype.getSimplifiedGeometryInternal=function(t){var e=[],r=[];return e.length=fi(this.flatCoordinates,0,this.gt,this.stride,t,e,0,r),new n(e,Et,r)},n.prototype.getType=function(){return It.MULTI_LINE_STRING},n.prototype.intersectsExtent=function(t){return Pi(this.flatCoordinates,0,this.gt,this.stride,t)},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var e=ai(this.flatCoordinates,0,t,this.stride,this.gt);this.flatCoordinates.length=0===e.length?0:e[e.length-1],this.changed()},n}(Yr),Jk=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Qk=function(t){function n(n,e){var r=t.call(this)||this;return e&&!Array.isArray(n[0])?r.setFlatCoordinates(e,n):r.setCoordinates(n,e),r}return Jk(n,t),n.prototype.appendPoint=function(t){this.flatCoordinates?w(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,e,r){if(r<Sn(this.getExtent(),t,n))return r;for(var i=this.flatCoordinates,o=this.stride,s=0,a=i.length;s<a;s+=o){var u=le(t,n,i[s],i[s+1]);if(u<r){r=u;for(var c=0;c<o;++c)e[c]=i[s+c];e.length=o}}return r},n.prototype.getCoordinates=function(){return yi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getPoint=function(t){var n=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||n<=t?null:new Mi(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},n.prototype.getPoints=function(){for(var t=this.flatCoordinates,n=this.layout,e=this.stride,r=[],i=0,o=t.length;i<o;i+=e){var s=new Mi(t.slice(i,i+e),n);r.push(s)}return r},n.prototype.getType=function(){return It.MULTI_POINT},n.prototype.intersectsExtent=function(t){for(var n=this.flatCoordinates,e=this.stride,r=0,i=n.length;r<i;r+=e){if(On(t,n[r],n[r+1]))return!0}return!1},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=si(this.flatCoordinates,0,t,this.stride),this.changed()},n}(Yr),t_=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),n_=function(t){function n(n,e,r){var i=t.call(this)||this;if(i.Hl=[],i.Kl=-1,i.Kh=null,i.bt=-1,i.wt=-1,i._t=-1,i.St=null,!r&&!Array.isArray(n[0])){for(var o=i.getLayout(),s=n,a=[],u=[],c=0,f=s.length;c<f;++c){var h=s[c];0===c&&(o=h.getLayout());for(var l=a.length,v=h.getEnds(),d=0,p=v.length;d<p;++d)v[d]+=l;w(a,h.getFlatCoordinates()),u.push(v)}e=o,n=a,r=u}return void 0!==e&&r?(i.setFlatCoordinates(e,n),i.Hl=r):i.setCoordinates(n,e),i}return t_(n,t),n.prototype.appendPolygon=function(t){var n;if(this.flatCoordinates){var e=this.flatCoordinates.length;w(this.flatCoordinates,t.getFlatCoordinates());for(var r=0,i=(n=t.getEnds().slice()).length;r<i;++r)n[r]+=e}else this.flatCoordinates=t.getFlatCoordinates().slice(),n=t.getEnds().slice(),this.Hl.push();this.Hl.push(n),this.changed()},n.prototype.clone=function(){for(var t=this.Hl.length,e=new Array(t),r=0;r<t;++r)e[r]=this.Hl[r].slice();var i=new n(this.flatCoordinates.slice(),this.layout,e);return i.applyProperties(this),i},n.prototype.closestPointXY=function(t,n,e,r){return r<Sn(this.getExtent(),t,n)?r:(this.wt!=this.getRevision()&&(this.bt=Math.sqrt(ni(this.flatCoordinates,0,this.Hl,this.stride,0)),this.wt=this.getRevision()),ii(this.getOrientedFlatCoordinates(),0,this.Hl,this.stride,this.bt,!0,t,n,e,r))},n.prototype.containsXY=function(t,n){return Ei(this.getOrientedFlatCoordinates(),0,this.Hl,this.stride,t,n)},n.prototype.getArea=function(){return xi(this.getOrientedFlatCoordinates(),0,this.Hl,this.stride)},n.prototype.getCoordinates=function(t){var n;return void 0!==t?qi(n=this.getOrientedFlatCoordinates().slice(),0,this.Hl,this.stride,t):n=this.flatCoordinates,bi(n,0,this.Hl,this.stride)},n.prototype.getEndss=function(){return this.Hl},n.prototype.getFlatInteriorPoints=function(){if(this.Kl!=this.getRevision()){var t=jk(this.flatCoordinates,0,this.Hl,this.stride);this.Kh=Ci(this.getOrientedFlatCoordinates(),0,this.Hl,this.stride,t),this.Kl=this.getRevision()}return this.Kh},n.prototype.getInteriorPoints=function(){return new Qk(this.getFlatInteriorPoints().slice(),Ct)},n.prototype.getOrientedFlatCoordinates=function(){if(this._t!=this.getRevision()){var t=this.flatCoordinates;Ui(t,0,this.Hl,this.stride)?this.St=t:(this.St=t.slice(),this.St.length=qi(this.St,0,this.Hl,this.stride)),this._t=this.getRevision()}return this.St},n.prototype.getSimplifiedGeometryInternal=function(t){var e=[],r=[];return e.length=pi(this.flatCoordinates,0,this.Hl,this.stride,Math.sqrt(t),e,0,r),new n(e,Et,r)},n.prototype.getPolygon=function(t){if(t<0||this.Hl.length<=t)return null;var n;if(0===t)n=0;else{var e=this.Hl[t-1];n=e[e.length-1]}var r=this.Hl[t].slice(),i=r[r.length-1];if(0!==n)for(var o=0,s=r.length;o<s;++o)r[o]-=n;return new Zi(this.flatCoordinates.slice(n,i),this.layout,r)},n.prototype.getPolygons=function(){for(var t=this.layout,n=this.flatCoordinates,e=this.Hl,r=[],i=0,o=0,s=e.length;o<s;++o){var a=e[o].slice(),u=a[a.length-1];if(0!==i)for(var c=0,f=a.length;c<f;++c)a[c]-=i;var h=new Zi(n.slice(i,u),t,a);r.push(h),i=u}return r},n.prototype.getType=function(){return It.MULTI_POLYGON},n.prototype.intersectsExtent=function(t){return zi(this.getOrientedFlatCoordinates(),0,this.Hl,this.stride,t)},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var e=ui(this.flatCoordinates,0,t,this.stride,this.Hl);if(0===e.length)this.flatCoordinates.length=0;else{var r=e[e.length-1];this.flatCoordinates.length=0===r.length?0:r[r.length-1]}this.changed()},n}(Yr),e_=e(2098),r_=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function i_(t,n,e){if(3===t){var r={keys:[],values:[],features:[]},i=e.readVarint()+e.pos;e.readFields(o_,r,i),r.length=r.features.length,r.length&&(n[r.name]=r)}}function o_(t,n,e){if(15===t)n.version=e.readVarint();else if(1===t)n.name=e.readString();else if(5===t)n.extent=e.readVarint();else if(2===t)n.features.push(e.pos);else if(3===t)n.keys.push(e.readString());else if(4===t){for(var r=null,i=e.readVarint()+e.pos;e.pos<i;)r=1===(t=e.readVarint()>>3)?e.readString():2===t?e.readFloat():3===t?e.readDouble():4===t?e.readVarint64():5===t?e.readVarint():6===t?e.readSVarint():7===t?e.readBoolean():null;n.values.push(r)}}function s_(t,n,e){if(1==t)n.id=e.readVarint();else if(2==t)for(var r=e.readVarint()+e.pos;e.pos<r;){var i=n.layer.keys[e.readVarint()],o=n.layer.values[e.readVarint()];n.properties[i]=o}else 3==t?n.type=e.readVarint():4==t&&(n.geometry=e.pos)}function a_(t,n,e){t.pos=n.features[e];var r=t.readVarint()+t.pos,i={layer:n,type:0,properties:{}};return t.readFields(s_,i,r),i}var u_=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.dataProjection=new ae({code:"",units:Ft.TILE_PIXELS}),e.Xl=r.featureClass?r.featureClass:Ek,e.H=r.geometryName,e.Yl=r.layerName?r.layerName:"layer",e.Gc=r.layers?r.layers:null,e.Jl=r.idProperty,e.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"],e}return r_(n,t),n.prototype.Ql=function(t,n,e,r){t.pos=n.geometry;for(var i=t.readVarint()+t.pos,o=1,s=0,a=0,u=0,c=0,f=0;t.pos<i;){if(!s){var h=t.readVarint();o=7&h,s=h>>3}s--,1===o||2===o?(a+=t.readSVarint(),u+=t.readSVarint(),1===o&&c>f&&(r.push(c),f=c),e.push(a,u),c+=2):7===o?c>f&&(e.push(e[f],e[f+1]),c+=2):Mt(!1,59)}c>f&&(r.push(c),f=c)},n.prototype.tv=function(t,n,e){var r,i=n.type;if(0===i)return null;var o,s=n.properties;this.Jl?(o=s[this.Jl],delete s[this.Jl]):o=n.id,s[this.Yl]=n.layer.name;var a=[],u=[];this.Ql(t,n,a,u);var c=function(t,n){var e;1===t?e=1===n?It.POINT:It.MULTI_POINT:2===t?e=1===n?It.LINE_STRING:It.MULTI_LINE_STRING:3===t&&(e=It.POLYGON);return e}(i,u.length);if(this.Xl===Ek)(r=new this.Xl(c,a,u,s,o)).transform(e.dataProjection);else{var f=void 0;if(c==It.POLYGON){for(var h=[],l=0,v=0,d=0,p=u.length;d<p;++d){var y=u[d];if(Fi(a,l,y,2)){if(0===h.length)continue;h[h.length-1].push(u[v])}else h.push(u.slice(v,d+1));v=d+1,l=y}f=h.length>1?new n_(a,Et,h):new Zi(a,Et,u)}else f=c===It.POINT?new Mi(a,Et):c===It.LINE_STRING?new Ck(a,Et):c===It.POLYGON?new Zi(a,Et,u):c===It.MULTI_POINT?new Qk(a,Et):c===It.MULTI_LINE_STRING?new Yk(a,Et,u):null;r=new(0,this.Xl),this.H&&r.setGeometryName(this.H);var m=Hk(f,!1,e);r.setGeometry(m),r.setId(o),r.setProperties(s,!0)}return r},n.prototype.getType=function(){return ef},n.prototype.readFeatures=function(t,n){var e=this.Gc,r=this.adaptOptions(n),i=mr(r.dataProjection);i.setWorldExtent(r.extent),r.dataProjection=i;var o=new e_(t),s=o.readFields(i_,{}),a=[];for(var u in s)if(!e||-1!=e.indexOf(u)){var c=s[u],f=c?[0,0,c.extent,c.extent]:null;i.setExtent(f);for(var h=0,l=c.length;h<l;++h){var v=a_(o,c,h),d=this.tv(o,v,r);null!==d&&a.push(d)}}return a},n.prototype.readProjection=function(t){return this.dataProjection},n.prototype.setLayers=function(t){this.Gc=t},n}(Wk),c_=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),f_=function(t){function n(n){var e=this,r=n||{},i=E({},r);delete i.preload,delete i.useInterimTilesOnError,(e=t.call(this,i)||this).on,e.once,e.un,r.renderMode===yk&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),r.renderMode=void 0);var o=r.renderMode||mk;return Mt(o==mk||o==bk,28),e.nv=o,e.setPreload(r.preload?r.preload:0),e.setUseInterimTilesOnError(void 0===r.useInterimTilesOnError||r.useInterimTilesOnError),e.getBackground,e.setBackground,e}return c_(n,t),n.prototype.createRenderer=function(){return new kk(this)},n.prototype.getFeatures=function(n){return t.prototype.getFeatures.call(this,n)},n.prototype.getRenderMode=function(){return this.nv},n.prototype.getPreload=function(){return this.get(Ag)},n.prototype.getUseInterimTilesOnError=function(){return this.get(Cg)},n.prototype.setPreload=function(t){this.set(Ag,t)},n.prototype.setUseInterimTilesOnError=function(t){this.set(Cg,t)},n}(Sx),h_=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function l_(t){for(var n=[],e=0,r=t.length;e<r;++e)n.push(t[e].clone());return n}var v_=function(t){function n(n){var e=t.call(this)||this;return e.ev=n||null,e.rv=[],e.iv(),e}return h_(n,t),n.prototype.ov=function(){this.rv.forEach(J),this.rv.length=0},n.prototype.iv=function(){if(this.ev)for(var t=0,n=this.ev.length;t<n;++t)this.rv.push(X(this.ev[t],D,this.changed,this))},n.prototype.clone=function(){var t=new n(null);return t.setGeometries(this.ev),t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,e,r){if(r<Sn(this.getExtent(),t,n))return r;for(var i=this.ev,o=0,s=i.length;o<s;++o)r=i[o].closestPointXY(t,n,e,r);return r},n.prototype.containsXY=function(t,n){for(var e=this.ev,r=0,i=e.length;r<i;++r)if(e[r].containsXY(t,n))return!0;return!1},n.prototype.computeExtent=function(t){Cn(t);for(var n=this.ev,e=0,r=n.length;e<r;++e)Nn(t,n[e].getExtent());return t},n.prototype.getGeometries=function(){return l_(this.ev)},n.prototype.getGeometriesArray=function(){return this.ev},n.prototype.getGeometriesArrayRecursive=function(){for(var t=[],n=this.ev,e=0,r=n.length;e<r;++e)n[e].getType()===this.getType()?t=t.concat(n[e].getGeometriesArrayRecursive()):t.push(n[e]);return t},n.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var e=[],r=this.ev,i=!1,o=0,s=r.length;o<s;++o){var a=r[o],u=a.getSimplifiedGeometry(t);e.push(u),u!==a&&(i=!0)}if(i){var c=new n(null);return c.setGeometriesArray(e),c}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},n.prototype.getType=function(){return It.GEOMETRY_COLLECTION},n.prototype.intersectsExtent=function(t){for(var n=this.ev,e=0,r=n.length;e<r;++e)if(n[e].intersectsExtent(t))return!0;return!1},n.prototype.isEmpty=function(){return 0===this.ev.length},n.prototype.rotate=function(t,n){for(var e=this.ev,r=0,i=e.length;r<i;++r)e[r].rotate(t,n);this.changed()},n.prototype.scale=function(t,n,e){var r=e;r||(r=Zn(this.getExtent()));for(var i=this.ev,o=0,s=i.length;o<s;++o)i[o].scale(t,n,r);this.changed()},n.prototype.setGeometries=function(t){this.setGeometriesArray(l_(t))},n.prototype.setGeometriesArray=function(t){this.ov(),this.ev=t,this.iv(),this.changed()},n.prototype.applyTransform=function(t){for(var n=this.ev,e=0,r=n.length;e<r;++e)n[e].applyTransform(t);this.changed()},n.prototype.translate=function(t,n){for(var e=this.ev,r=0,i=e.length;r<i;++r)e[r].translate(t,n);this.changed()},n.prototype.disposeInternal=function(){this.ov(),t.prototype.disposeInternal.call(this)},n}(Wr),d_=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function p_(t){if("string"==typeof t){var n=JSON.parse(t);return n||null}return null!==t?t:null}var y_=function(t){function n(){return t.call(this)||this}return d_(n,t),n.prototype.getType=function(){return rf},n.prototype.readFeature=function(t,n){return this.readFeatureFromObject(p_(t),this.getReadOptions(t,n))},n.prototype.readFeatures=function(t,n){return this.readFeaturesFromObject(p_(t),this.getReadOptions(t,n))},n.prototype.readFeatureFromObject=function(t,n){return r()},n.prototype.readFeaturesFromObject=function(t,n){return r()},n.prototype.readGeometry=function(t,n){return this.readGeometryFromObject(p_(t),this.getReadOptions(t,n))},n.prototype.readGeometryFromObject=function(t,n){return r()},n.prototype.readProjection=function(t){return this.readProjectionFromObject(p_(t))},n.prototype.readProjectionFromObject=function(t){return r()},n.prototype.writeFeature=function(t,n){return JSON.stringify(this.writeFeatureObject(t,n))},n.prototype.writeFeatureObject=function(t,n){return r()},n.prototype.writeFeatures=function(t,n){return JSON.stringify(this.writeFeaturesObject(t,n))},n.prototype.writeFeaturesObject=function(t,n){return r()},n.prototype.writeGeometry=function(t,n){return JSON.stringify(this.writeGeometryObject(t,n))},n.prototype.writeGeometryObject=function(t,n){return r()},n}(Wk),m_=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function b_(t,n){if(!t)return null;var e;switch(t.type){case It.POINT:e=function(t){return new Mi(t.coordinates)}(t);break;case It.LINE_STRING:e=function(t){return new Ck(t.coordinates)}(t);break;case It.POLYGON:e=function(t){return new Zi(t.coordinates)}(t);break;case It.MULTI_POINT:e=function(t){return new Qk(t.coordinates)}(t);break;case It.MULTI_LINE_STRING:e=function(t){return new Yk(t.coordinates)}(t);break;case It.MULTI_POLYGON:e=function(t){return new n_(t.coordinates)}(t);break;case It.GEOMETRY_COLLECTION:e=function(t,n){var e=t.geometries.map((function(t){return b_(t,n)}));return new v_(e)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return Hk(e,!1,n)}function w_(t,n){var e,r=(t=Hk(t,!0,n)).getType();switch(r){case It.POINT:e=function(t,n){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case It.LINE_STRING:e=function(t,n){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case It.POLYGON:e=function(t,n){var e;n&&(e=n.rightHanded);return{type:"Polygon",coordinates:t.getCoordinates(e)}}(t,n);break;case It.MULTI_POINT:e=function(t,n){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case It.MULTI_LINE_STRING:e=function(t,n){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case It.MULTI_POLYGON:e=function(t,n){var e;n&&(e=n.rightHanded);return{type:"MultiPolygon",coordinates:t.getCoordinates(e)}}(t,n);break;case It.GEOMETRY_COLLECTION:e=function(t,n){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map((function(t){var e=E({},n);return delete e.featureProjection,w_(t,e)}))}}(t,n);break;case It.CIRCLE:e={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+r)}return e}var g_=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this)||this).dataProjection=mr(r.dataProjection?r.dataProjection:"EPSG:4326"),r.featureProjection&&(e.defaultFeatureProjection=mr(r.featureProjection)),e.H=r.geometryName,e.sv=r.extractGeometryName,e.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],e}return m_(n,t),n.prototype.readFeatureFromObject=function(t,n){var e=null,r=b_((e="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,n),i=new Tt;return this.H?i.setGeometryName(this.H):this.sv&&"geometry_name"in e!==void 0&&i.setGeometryName(e.geometry_name),i.setGeometry(r),"id"in e&&i.setId(e.id),e.properties&&i.setProperties(e.properties,!0),i},n.prototype.readFeaturesFromObject=function(t,n){var e=null;if("FeatureCollection"===t.type){e=[];for(var r=t.features,i=0,o=r.length;i<o;++i)e.push(this.readFeatureFromObject(r[i],n))}else e=[this.readFeatureFromObject(t,n)];return e},n.prototype.readGeometryFromObject=function(t,n){return b_(t,n)},n.prototype.readProjectionFromObject=function(t){var n,e=t.crs;return e?"name"==e.type?n=mr(e.properties.name):"EPSG"===e.type?n=mr("EPSG:"+e.properties.code):Mt(!1,36):n=this.dataProjection,n},n.prototype.writeFeatureObject=function(t,n){n=this.adaptOptions(n);var e={type:"Feature",geometry:null,properties:null},r=t.getId();if(void 0!==r&&(e.id=r),!t.hasProperties())return e;var i=t.getProperties(),o=t.getGeometry();return o&&(e.geometry=w_(o,n),delete i[t.getGeometryName()]),R(i)||(e.properties=i),e},n.prototype.writeFeaturesObject=function(t,n){n=this.adaptOptions(n);for(var e=[],r=0,i=t.length;r<i;++r)e.push(this.writeFeatureObject(t[r],n));return{type:"FeatureCollection",features:e}},n.prototype.writeGeometryObject=function(t,n){return w_(t,this.adaptOptions(n))},n}(y_),x_=e(1063);function k_(t){return function(t){if(Array.isArray(t))return L_(t)}(t)||__(t)||z_(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function __(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function S_(t,n){return j_(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw i}}return o}(t,n)||z_(t,n)||M_()}function M_(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function j_(t){if(Array.isArray(t))return t}function O_(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function T_(t,n,e){return n&&O_(t.prototype,n),e&&O_(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function E_(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function A_(t,n){if(n&&("object"===F_(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function C_(t){var n="function"==typeof Map?new Map:void 0;return(C_=function(t){if(null===t||(e=t,-1===Function.toString.call(e).indexOf("[native code]")))return t;var e;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return R_(t,arguments,D_(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),P_(r,t)})(t)}function R_(t,n,e){return(R_=I_()?Reflect.construct:function(t,n,e){var r=[null];r.push.apply(r,n);var i=new(Function.bind.apply(t,r));return e&&P_(i,e.prototype),i}).apply(null,arguments)}function I_(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function P_(t,n){return(P_=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function D_(t){return(D_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function N_(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=z_(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function z_(t,n){if(t){if("string"==typeof t)return L_(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L_(t,n):void 0}}function L_(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function F_(t){return(F_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var G_={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},terrain:{type:"terrain",doc:"A global modifier that elevates layers and markers based on a DEM data source."},fog:{type:"fog",doc:"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features."},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesnt support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ... fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object. Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Gets the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0"}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},terrain:{source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.","sdk-support":{"basic functionality":{js:"2.0.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}};var U_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function B_(t){var n={exports:{}};return t(n,n.exports),n.exports}var q_=B_((function(t,n){!function(e){var r=n&&!n.nodeType&&n,i=t&&!t.nodeType&&t,o="object"==F_(U_)&&U_;o.global!==o&&o.window!==o&&o.self!==o||(e=o);var s,a,u=2147483647,c=36,f=/^xn--/,h=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function y(t){throw RangeError(v[t])}function m(t,n){for(var e=t.length,r=[];e--;)r[e]=n(t[e]);return r}function b(t,n){var e=t.split("@"),r="";return e.length>1&&(r=e[0]+"@",t=e[1]),r+m((t=t.replace(l,".")).split("."),n).join(".")}function w(t){for(var n,e,r=[],i=0,o=t.length;i<o;)(n=t.charCodeAt(i++))>=55296&&n<=56319&&i<o?56320==(64512&(e=t.charCodeAt(i++)))?r.push(((1023&n)<<10)+(1023&e)+65536):(r.push(n),i--):r.push(n);return r}function g(t){return m(t,(function(t){var n="";return t>65535&&(n+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),n+=p(t)})).join("")}function x(t,n){return t+22+75*(t<26)-((0!=n)<<5)}function k(t,n,e){var r=0;for(t=e?d(t/700):t>>1,t+=d(t/n);t>455;r+=c)t=d(t/35);return d(r+36*t/(t+38))}function _(t){var n,e,r,i,o,s,a,f,h,l,v,p=[],m=t.length,b=0,w=128,x=72;for((e=t.lastIndexOf("-"))<0&&(e=0),r=0;r<e;++r)t.charCodeAt(r)>=128&&y("not-basic"),p.push(t.charCodeAt(r));for(i=e>0?e+1:0;i<m;){for(o=b,s=1,a=c;i>=m&&y("invalid-input"),((f=(v=t.charCodeAt(i++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:c)>=c||f>d((u-b)/s))&&y("overflow"),b+=f*s,!(f<(h=a<=x?1:a>=x+26?26:a-x));a+=c)s>d(u/(l=c-h))&&y("overflow"),s*=l;x=k(b-o,n=p.length+1,0==o),d(b/n)>u-w&&y("overflow"),w+=d(b/n),b%=n,p.splice(b++,0,w)}return g(p)}function S(t){var n,e,r,i,o,s,a,f,h,l,v,m,b,g,_,S=[];for(m=(t=w(t)).length,n=128,e=0,o=72,s=0;s<m;++s)(v=t[s])<128&&S.push(p(v));for(r=i=S.length,i&&S.push("-");r<m;){for(a=u,s=0;s<m;++s)(v=t[s])>=n&&v<a&&(a=v);for(a-n>d((u-e)/(b=r+1))&&y("overflow"),e+=(a-n)*b,n=a,s=0;s<m;++s)if((v=t[s])<n&&++e>u&&y("overflow"),v==n){for(f=e,h=c;!(f<(l=h<=o?1:h>=o+26?26:h-o));h+=c)_=f-l,g=c-l,S.push(p(x(l+_%g,0))),f=d(_/g);S.push(p(x(f,0))),o=k(e,b,r==i),e=0,++r}++e,++n}return S.join("")}if(s={version:"1.3.2",ucs2:{decode:w,encode:g},decode:_,encode:S,toASCII:function(t){return b(t,(function(t){return h.test(t)?"xn--"+S(t):t}))},toUnicode:function(t){return b(t,(function(t){return f.test(t)?_(t.slice(4).toLowerCase()):t}))}},r&&i)if(t.exports==r)i.exports=s;else for(a in s)s.hasOwnProperty(a)&&(r[a]=s[a]);else e.punycode=s}(U_)})),$_=function(t){return"string"==typeof t},V_=function(t){return"object"===F_(t)&&null!==t},Z_=function(t){return null===t},W_=function(t){return null==t};function H_(t,n){return Object.prototype.hasOwnProperty.call(t,n)}var K_=function(t,n,e,r){n=n||"&",e=e||"=";var i={};if("string"!=typeof t||0===t.length)return i;var o=/\+/g;t=t.split(n);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var u=0;u<a;++u){var c,f,h,l,v=t[u].replace(o,"%20"),d=v.indexOf(e);d>=0?(c=v.substr(0,d),f=v.substr(d+1)):(c=v,f=""),h=decodeURIComponent(c),l=decodeURIComponent(f),H_(i,h)?Array.isArray(i[h])?i[h].push(l):i[h]=[i[h],l]:i[h]=l}return i},X_=function(t){switch(F_(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},Y_=function(t,n,e,r){return n=n||"&",e=e||"=",null===t&&(t=void 0),"object"===F_(t)?Object.keys(t).map((function(r){var i=encodeURIComponent(X_(r))+e;return Array.isArray(t[r])?t[r].map((function(t){return i+encodeURIComponent(X_(t))})).join(n):i+encodeURIComponent(X_(t[r]))})).join(n):r?encodeURIComponent(X_(r))+e+encodeURIComponent(X_(t)):""},J_=B_((function(t,n){n.decode=n.parse=K_,n.encode=n.stringify=Y_}));function Q_(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var tS=/^([a-z0-9.+-]+:)/i,nS=/:[0-9]*$/,eS=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,rS=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),iS=["'"].concat(rS),oS=["%","/","?",";","#"].concat(iS),sS=["/","?","#"],aS=/^[+a-z0-9A-Z_-]{0,63}$/,uS=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,cS={javascript:!0,"javascript:":!0},fS={javascript:!0,"javascript:":!0},hS={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function lS(t,n,e){if(t&&V_(t)&&t instanceof Q_)return t;var r=new Q_;return r.parse(t,n,e),r}Q_.prototype.parse=function(t,n,e){if(!$_(t))throw new TypeError("Parameter 'url' must be a string, not "+F_(t));var r=t.indexOf("?"),i=-1!==r&&r<t.indexOf("#")?"?":"#",o=t.split(i);o[0]=o[0].replace(/\\/g,"/");var s=t=o.join(i);if(s=s.trim(),!e&&1===t.split("#").length){var a=eS.exec(s);if(a)return this.path=s,this.href=s,this.pathname=a[1],a[2]?(this.search=a[2],this.query=n?J_.parse(this.search.substr(1)):this.search.substr(1)):n&&(this.search="",this.query={}),this}var u=tS.exec(s);if(u){var c=(u=u[0]).toLowerCase();this.protocol=c,s=s.substr(u.length)}if(e||u||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var f="//"===s.substr(0,2);!f||u&&fS[u]||(s=s.substr(2),this.slashes=!0)}if(!fS[u]&&(f||u&&!hS[u])){for(var h,l,v=-1,d=0;d<sS.length;d++){-1!==(p=s.indexOf(sS[d]))&&(-1===v||p<v)&&(v=p)}-1!==(l=-1===v?s.lastIndexOf("@"):s.lastIndexOf("@",v))&&(h=s.slice(0,l),s=s.slice(l+1),this.auth=decodeURIComponent(h)),v=-1;for(d=0;d<oS.length;d++){var p;-1!==(p=s.indexOf(oS[d]))&&(-1===v||p<v)&&(v=p)}-1===v&&(v=s.length),this.host=s.slice(0,v),s=s.slice(v),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var m=this.hostname.split(/\./),b=(d=0,m.length);d<b;d++){var w=m[d];if(w&&!w.match(aS)){for(var g="",x=0,k=w.length;x<k;x++)w.charCodeAt(x)>127?g+="x":g+=w[x];if(!g.match(aS)){var _=m.slice(0,d),S=m.slice(d+1),M=w.match(uS);M&&(_.push(M[1]),S.unshift(M[2])),S.length&&(s="/"+S.join(".")+s),this.hostname=_.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=q_.toASCII(this.hostname));var j=this.port?":"+this.port:"",O=this.hostname||"";this.host=O+j,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!cS[c])for(d=0,b=iS.length;d<b;d++){var T=iS[d];if(-1!==s.indexOf(T)){var E=encodeURIComponent(T);E===T&&(E=escape(T)),s=s.split(T).join(E)}}var A=s.indexOf("#");-1!==A&&(this.hash=s.substr(A),s=s.slice(0,A));var C=s.indexOf("?");if(-1!==C?(this.search=s.substr(C),this.query=s.substr(C+1),n&&(this.query=J_.parse(this.query)),s=s.slice(0,C)):n&&(this.search="",this.query={}),s&&(this.pathname=s),hS[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var R=this.search||"";this.path=j+R}return this.href=this.format(),this},Q_.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var n=this.protocol||"",e=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&V_(this.query)&&Object.keys(this.query).length&&(o=J_.stringify(this.query));var s=this.search||o&&"?"+o||"";return n&&":"!==n.substr(-1)&&(n+=":"),this.slashes||(!n||hS[n])&&!1!==i?(i="//"+(i||""),e&&"/"!==e.charAt(0)&&(e="/"+e)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),n+i+(e=e.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace("#","%23"))+r},Q_.prototype.resolve=function(t){return this.resolveObject(lS(t,!1,!0)).format()},Q_.prototype.resolveObject=function(t){if($_(t)){var n=new Q_;n.parse(t,!1,!0),t=n}for(var e=new Q_,r=Object.keys(this),i=0;i<r.length;i++){var o=r[i];e[o]=this[o]}if(e.hash=t.hash,""===t.href)return e.href=e.format(),e;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),a=0;a<s.length;a++){var u=s[a];"protocol"!==u&&(e[u]=t[u])}return hS[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e}if(t.protocol&&t.protocol!==e.protocol){if(!hS[t.protocol]){for(var c=Object.keys(t),f=0;f<c.length;f++){var h=c[f];e[h]=t[h]}return e.href=e.format(),e}if(e.protocol=t.protocol,t.host||fS[t.protocol])e.pathname=t.pathname;else{for(var l=(t.pathname||"").split("/");l.length&&!(t.host=l.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==l[0]&&l.unshift(""),l.length<2&&l.unshift(""),e.pathname=l.join("/")}if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var v=e.pathname||"",d=e.search||"";e.path=v+d}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var p=e.pathname&&"/"===e.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),m=y||p||e.host&&t.pathname,b=m,w=e.pathname&&e.pathname.split("/")||[],g=(l=t.pathname&&t.pathname.split("/")||[],e.protocol&&!hS[e.protocol]);if(g&&(e.hostname="",e.port=null,e.host&&(""===w[0]?w[0]=e.host:w.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===l[0]?l[0]=t.host:l.unshift(t.host)),t.host=null),m=m&&(""===l[0]||""===w[0])),y)e.host=t.host||""===t.host?t.host:e.host,e.hostname=t.hostname||""===t.hostname?t.hostname:e.hostname,e.search=t.search,e.query=t.query,w=l;else if(l.length)w||(w=[]),w.pop(),w=w.concat(l),e.search=t.search,e.query=t.query;else if(!W_(t.search)){if(g)e.hostname=e.host=w.shift(),(M=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@"))&&(e.auth=M.shift(),e.host=e.hostname=M.shift());return e.search=t.search,e.query=t.query,Z_(e.pathname)&&Z_(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!w.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var x=w.slice(-1)[0],k=(e.host||t.host||w.length>1)&&("."===x||".."===x)||""===x,_=0,S=w.length;S>=0;S--)"."===(x=w[S])?w.splice(S,1):".."===x?(w.splice(S,1),_++):_&&(w.splice(S,1),_--);if(!m&&!b)for(;_--;_)w.unshift("..");!m||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),k&&"/"!==w.join("/").substr(-1)&&w.push("");var M,j=""===w[0]||w[0]&&"/"===w[0].charAt(0);g&&(e.hostname=e.host=j?"":w.length?w.shift():"",(M=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@"))&&(e.auth=M.shift(),e.host=e.hostname=M.shift()));return(m=m||e.host&&w.length)&&!j&&w.unshift(""),w.length?e.pathname=w.join("/"):(e.pathname=null,e.path=null),Z_(e.pathname)&&Z_(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Q_.prototype.parseHost=function(){var t=this.host,n=nS.exec(t);n&&(":"!==(n=n[0])&&(this.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(this.hostname=t)};function vS(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];for(var i=0,o=e;i<o.length;i++){var s=o[i];for(var a in s)t[a]=s[a]}return t}var dS=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&P_(t,n)}(i,t);var n,e,r=(n=i,e=I_(),function(){var t,r=D_(n);if(e){var i=D_(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return A_(this,t)});function i(t,n){var e;return E_(this,i),(e=r.call(this,n)).message=n,e.key=t,e}return T_(i)}(C_(Error)),pS=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];E_(this,t),this.parent=n,this.bindings={};var r,i=N_(e);try{for(i.s();!(r=i.n()).done;){var o=S_(r.value,2),s=o[0],a=o[1];this.bindings[s]=a}}catch(t){i.e(t)}finally{i.f()}}return T_(t,[{key:"concat",value:function(n){return new t(this,n)}},{key:"get",value:function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error("".concat(t," not found in scope."))}},{key:"has",value:function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}]),t}(),yS={kind:"null"},mS={kind:"number"},bS={kind:"string"},wS={kind:"boolean"},gS={kind:"color"},xS={kind:"object"},kS={kind:"value"},_S={kind:"collator"},SS={kind:"formatted"},MS={kind:"resolvedImage"};function jS(t,n){return{kind:"array",itemType:t,N:n}}function OS(t){if("array"===t.kind){var n=OS(t.itemType);return"number"==typeof t.N?"array<".concat(n,", ").concat(t.N,">"):"value"===t.itemType.kind?"array":"array<".concat(n,">")}return t.kind}var TS=[yS,mS,bS,wS,gS,SS,xS,jS(kS),MS];function ES(t,n){if("error"===n.kind)return null;if("array"===t.kind){if("array"===n.kind&&(0===n.N&&"value"===n.itemType.kind||!ES(t.itemType,n.itemType))&&("number"!=typeof t.N||t.N===n.N))return null}else{if(t.kind===n.kind)return null;if("value"===t.kind){var e,r=N_(TS);try{for(r.s();!(e=r.n()).done;){if(!ES(e.value,n))return null}}catch(t){r.e(t)}finally{r.f()}}}return"Expected ".concat(OS(t)," but found ").concat(OS(n)," instead.")}function AS(t,n){return n.some((function(n){return n.kind===t.kind}))}function CS(t,n){return n.some((function(n){return"null"===n?null===t:"array"===n?Array.isArray(t):"object"===n?t&&!Array.isArray(t)&&"object"===F_(t):n===F_(t)}))}var RS=B_((function(t,n){var e={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?r(parseFloat(t)/100*255):r(parseInt(t))}function s(t){return"%"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function a(t,n,e){return e<0?e+=1:e>1&&(e-=1),6*e<1?t+(n-t)*e*6:2*e<1?n:3*e<2?t+(n-t)*(2/3-e)*6:t}try{n.parseCSSColor=function(t){var n,i=t.replace(/ /g,"").toLowerCase();if(i in e)return e[i].slice();if("#"===i[0])return 4===i.length?(n=parseInt(i.substr(1),16))>=0&&n<=4095?[(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1]:null:7===i.length&&(n=parseInt(i.substr(1),16))>=0&&n<=16777215?[(16711680&n)>>16,(65280&n)>>8,255&n,1]:null;var u=i.indexOf("("),c=i.indexOf(")");if(-1!==u&&c+1===i.length){var f=i.substr(0,u),h=i.substr(u+1,c-(u+1)).split(","),l=1;switch(f){case"rgba":if(4!==h.length)return null;l=s(h.pop());case"rgb":return 3!==h.length?null:[o(h[0]),o(h[1]),o(h[2]),l];case"hsla":if(4!==h.length)return null;l=s(h.pop());case"hsl":if(3!==h.length)return null;var v=(parseFloat(h[0])%360+360)%360/360,d=s(h[1]),p=s(h[2]),y=p<=.5?p*(d+1):p+d-p*d,m=2*p-y;return[r(255*a(m,y,v+1/3)),r(255*a(m,y,v)),r(255*a(m,y,v-1/3)),l];default:return null}}return null}}catch(t){}})),IS=function(){function t(n,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;E_(this,t),this.r=n,this.g=e,this.b=r,this.a=i}return T_(t,[{key:"toString",value:function(){var t=S_(this.toArray(),4),n=t[0],e=t[1],r=t[2],i=t[3];return"rgba(".concat(Math.round(n),",").concat(Math.round(e),",").concat(Math.round(r),",").concat(i,")")}},{key:"toArray",value:function(){var t=this.r,n=this.g,e=this.b,r=this.a;return 0===r?[0,0,0,0]:[255*t/r,255*n/r,255*e/r,r]}}],[{key:"parse",value:function(n){if(n){if(n instanceof t)return n;if("string"==typeof n){var e=RS.parseCSSColor(n);if(e)return new t(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}}}]),t}();IS.black=new IS(0,0,0,1),IS.white=new IS(1,1,1,1),IS.transparent=new IS(0,0,0,0),IS.red=new IS(1,0,0,1),IS.blue=new IS(0,0,1,1);var PS=function(){function t(n,e,r){E_(this,t),this.sensitivity=n?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}return T_(t,[{key:"compare",value:function(t,n){return this.collator.compare(t,n)}},{key:"resolvedLocale",value:function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}]),t}(),DS=T_((function t(n,e,r,i,o){E_(this,t),this.text=n,this.image=e,this.scale=r,this.fontStack=i,this.textColor=o})),NS=function(){function t(n){E_(this,t),this.sections=n}return T_(t,[{key:"isEmpty",value:function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))}},{key:"toString",value:function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")}},{key:"serialize",value:function(){var t,n=["format"],e=N_(this.sections);try{for(e.s();!(t=e.n()).done;){var r=t.value;if(r.image)n.push(["image",r.image.name]);else{n.push(r.text);var i={};r.fontStack&&(i["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(i["font-scale"]=r.scale),r.textColor&&(i["text-color"]=["rgba"].concat(r.textColor.toArray())),n.push(i)}}}catch(t){e.e(t)}finally{e.f()}return n}}],[{key:"fromString",value:function(n){return new t([new DS(n,null,null,null,null)])}},{key:"factory",value:function(n){return n instanceof t?n:t.fromString(n)}}]),t}(),zS=function(){function t(n){E_(this,t),this.name=n.name,this.available=n.available}return T_(t,[{key:"toString",value:function(){return this.name}},{key:"serialize",value:function(){return["image",this.name]}}],[{key:"fromString",value:function(n){return n?new t({name:n,available:!1}):null}}]),t}();function LS(t,n,e,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof n&&n>=0&&n<=255&&"number"==typeof e&&e>=0&&e<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value [".concat([t,n,e,r].join(", "),"]: 'a' must be between 0 and 1."):"Invalid rgba value [".concat(("number"==typeof r?[t,n,e,r]:[t,n,e]).join(", "),"]: 'r', 'g', and 'b' must be between 0 and 255.")}function FS(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof IS)return!0;if(t instanceof PS)return!0;if(t instanceof NS)return!0;if(t instanceof zS)return!0;if(Array.isArray(t)){var n,e=N_(t);try{for(e.s();!(n=e.n()).done;){if(!FS(n.value))return!1}}catch(t){e.e(t)}finally{e.f()}return!0}if("object"===F_(t)){for(var r in t)if(!FS(t[r]))return!1;return!0}return!1}function GS(t){if(null===t)return yS;if("string"==typeof t)return bS;if("boolean"==typeof t)return wS;if("number"==typeof t)return mS;if(t instanceof IS)return gS;if(t instanceof PS)return _S;if(t instanceof NS)return SS;if(t instanceof zS)return MS;if(Array.isArray(t)){var n,e,r=t.length,i=N_(t);try{for(i.s();!(e=i.n()).done;){var o=GS(e.value);if(n){if(n===o)continue;n=kS;break}n=o}}catch(t){i.e(t)}finally{i.f()}return jS(n||kS,r)}return xS}function US(t){var n=F_(t);return null===t?"":"string"===n||"number"===n||"boolean"===n?String(t):t instanceof IS||t instanceof NS||t instanceof zS?t.toString():JSON.stringify(t)}var BS=function(){function t(n,e){E_(this,t),this.type=n,this.value=e}return T_(t,[{key:"evaluate",value:function(){return this.value}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof IS?["rgba"].concat(this.value.toArray()):this.value instanceof NS?this.value.serialize():this.value}}],[{key:"parse",value:function(n,e){if(2!==n.length)return e.error("'literal' expression requires exactly one argument, but found ".concat(n.length-1," instead."));if(!FS(n[1]))return e.error("invalid value");var r=n[1],i=GS(r),o=e.expectedType;return"array"!==i.kind||0!==i.N||!o||"array"!==o.kind||"number"==typeof o.N&&0!==o.N||(i=o),new t(i,r)}}]),t}(),qS=function(){function t(n){E_(this,t),this.name="ExpressionEvaluationError",this.message=n}return T_(t,[{key:"toJSON",value:function(){return this.message}}]),t}(),$S={string:bS,number:mS,boolean:wS,object:xS},VS=function(){function t(n,e){E_(this,t),this.type=n,this.args=e}return T_(t,[{key:"evaluate",value:function(t){for(var n=0;n<this.args.length;n++){var e=this.args[n].evaluate(t);if(!ES(this.type,GS(e)))return e;if(n===this.args.length-1)throw new qS("Expected value to be of type ".concat(OS(this.type),", but found ").concat(OS(GS(e))," instead."))}return null}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){var t=this.type,n=[t.kind];if("array"===t.kind){var e=t.itemType;if("string"===e.kind||"number"===e.kind||"boolean"===e.kind){n.push(e.kind);var r=t.N;("number"==typeof r||this.args.length>1)&&n.push(r)}}return n.concat(this.args.map((function(t){return t.serialize()})))}}],[{key:"parse",value:function(n,e){if(n.length<2)return e.error("Expected at least one argument.");var r,i=1,o=n[0];if("array"===o){var s,a;if(n.length>2){var u=n[1];if("string"!=typeof u||!(u in $S)||"object"===u)return e.error('The item type argument of "array" must be one of string, number, boolean',1);s=$S[u],i++}else s=kS;if(n.length>3){if(null!==n[2]&&("number"!=typeof n[2]||n[2]<0||n[2]!==Math.floor(n[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=n[2],i++}r=jS(s,a)}else r=$S[o];for(var c=[];i<n.length;i++){var f=e.parse(n[i],i,kS);if(!f)return null;c.push(f)}return new t(r,c)}}]),t}(),ZS=function(){function t(n){E_(this,t),this.type=SS,this.sections=n}return T_(t,[{key:"evaluate",value:function(t){return new NS(this.sections.map((function(n){var e=n.content.evaluate(t);return GS(e)===MS?new DS("",e,null,null,null):new DS(US(e),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null)})))}},{key:"eachChild",value:function(t){var n,e=N_(this.sections);try{for(e.s();!(n=e.n()).done;){var r=n.value;t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor)}}catch(t){e.e(t)}finally{e.f()}}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t,n=["format"],e=N_(this.sections);try{for(e.s();!(t=e.n()).done;){var r=t.value;n.push(r.content.serialize());var i={};r.scale&&(i["font-scale"]=r.scale.serialize()),r.font&&(i["text-font"]=r.font.serialize()),r.textColor&&(i["text-color"]=r.textColor.serialize()),n.push(i)}}catch(t){e.e(t)}finally{e.f()}return n}}],[{key:"parse",value:function(n,e){if(n.length<2)return e.error("Expected at least one argument.");var r=n[1];if(!Array.isArray(r)&&"object"===F_(r))return e.error("First argument must be an image or text section.");for(var i=[],o=!1,s=1;s<=n.length-1;++s){var a=n[s];if(o&&"object"===F_(a)&&!Array.isArray(a)){o=!1;var u=null;if(a["font-scale"]&&!(u=e.parse(a["font-scale"],1,mS)))return null;var c=null;if(a["text-font"]&&!(c=e.parse(a["text-font"],1,jS(bS))))return null;var f=null;if(a["text-color"]&&!(f=e.parse(a["text-color"],1,gS)))return null;var h=i[i.length-1];h.scale=u,h.font=c,h.textColor=f}else{var l=e.parse(n[s],1,kS);if(!l)return null;var v=l.type.kind;if("string"!==v&&"value"!==v&&"null"!==v&&"resolvedImage"!==v)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,i.push({content:l,scale:null,font:null,textColor:null})}}return new t(i)}}]),t}(),WS=function(){function t(n){E_(this,t),this.type=MS,this.input=n}return T_(t,[{key:"evaluate",value:function(t){var n=this.input.evaluate(t),e=zS.fromString(n);return e&&t.availableImages&&(e.available=t.availableImages.indexOf(n)>-1),e}},{key:"eachChild",value:function(t){t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["image",this.input.serialize()]}}],[{key:"parse",value:function(n,e){if(2!==n.length)return e.error("Expected two arguments.");var r=e.parse(n[1],1,bS);return r?new t(r):e.error("No image name provided.")}}]),t}(),HS={"to-boolean":wS,"to-color":gS,"to-number":mS,"to-string":bS},KS=function(){function t(n,e){E_(this,t),this.type=n,this.args=e}return T_(t,[{key:"evaluate",value:function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){var n,e,r,i=N_(this.args);try{for(i.s();!(r=i.n()).done;){if(n=r.value.evaluate(t),e=null,n instanceof IS)return n;if("string"==typeof n){var o=t.parseColor(n);if(o)return o}else if(Array.isArray(n)&&!(e=n.length<3||n.length>4?"Invalid rbga value ".concat(JSON.stringify(n),": expected an array containing either three or four numeric values."):LS(n[0],n[1],n[2],n[3])))return new IS(n[0]/255,n[1]/255,n[2]/255,n[3])}}catch(t){i.e(t)}finally{i.f()}throw new qS(e||"Could not parse color from value '".concat("string"==typeof n?n:String(JSON.stringify(n)),"'"))}if("number"===this.type.kind){var s,a=null,u=N_(this.args);try{for(u.s();!(s=u.n()).done;){if(null===(a=s.value.evaluate(t)))return 0;var c=Number(a);if(!isNaN(c))return c}}catch(t){u.e(t)}finally{u.f()}throw new qS("Could not convert ".concat(JSON.stringify(a)," to number."))}return"formatted"===this.type.kind?NS.fromString(US(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?zS.fromString(US(this.args[0].evaluate(t))):US(this.args[0].evaluate(t))}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){if("formatted"===this.type.kind)return new ZS([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new WS(this.args[0]).serialize();var t=["to-".concat(this.type.kind)];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,e){if(n.length<2)return e.error("Expected at least one argument.");var r=n[0];if(("to-boolean"===r||"to-string"===r)&&2!==n.length)return e.error("Expected one argument.");for(var i=HS[r],o=[],s=1;s<n.length;s++){var a=e.parse(n[s],s,kS);if(!a)return null;o.push(a)}return new t(i,o)}}]),t}(),XS=["Unknown","Point","LineString","Polygon"],YS=function(){function t(){E_(this,t),this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}return T_(t,[{key:"id",value:function(){return this.feature&&"id"in this.feature?this.feature.id:null}},{key:"geometryType",value:function(){return this.feature?"number"==typeof this.feature.type?XS[this.feature.type]:this.feature.type:null}},{key:"geometry",value:function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}},{key:"canonicalID",value:function(){return this.canonical}},{key:"properties",value:function(){return this.feature&&this.feature.properties||{}}},{key:"parseColor",value:function(t){var n=this._parseColorCache[t];return n||(n=this._parseColorCache[t]=IS.parse(t)),n}}]),t}(),JS=function(){function t(n,e,r,i){E_(this,t),this.name=n,this.type=e,this._evaluate=r,this.args=i}return T_(t,[{key:"evaluate",value:function(t){return this._evaluate(t,this.args)}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))}}],[{key:"parse",value:function(n,e){var r=n[0],i=t.definitions[r];if(!i)return e.error('Unknown expression "'.concat(r,'". If you wanted a literal array, use ["literal", [...]].'),0);var o,s=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,u=a.filter((function(t){var e=S_(t,1)[0];return!Array.isArray(e)||e.length===n.length-1})),c=null,f=N_(u);try{for(f.s();!(o=f.n()).done;){var h=S_(o.value,2),l=h[0],v=h[1];c=new kM(e.registry,e.path,null,e.scope);for(var d=[],p=!1,y=1;y<n.length;y++){var m=n[y],b=Array.isArray(l)?l[y-1]:l.type,w=c.parse(m,1+d.length,b);if(!w){p=!0;break}d.push(w)}if(!p)if(Array.isArray(l)&&l.length!==d.length)c.error("Expected ".concat(l.length," arguments, but found ").concat(d.length," instead."));else{for(var g=0;g<d.length;g++){var x=Array.isArray(l)?l[g]:l.type,k=d[g];c.concat(g+1).checkSubtype(x,k.type)}if(0===c.errors.length)return new t(r,s,v,d)}}}catch(t){f.e(t)}finally{f.f()}if(1===u.length){var _;(_=e.errors).push.apply(_,k_(c.errors))}else{for(var S=(u.length?u:a).map((function(t){var n,e=S_(t,1)[0];return n=e,Array.isArray(n)?"(".concat(n.map(OS).join(", "),")"):"(".concat(OS(n.type),"...)")})).join(" | "),M=[],j=1;j<n.length;j++){var O=e.parse(n[j],1+M.length);if(!O)return null;M.push(OS(O.type))}e.error("Expected arguments of type ".concat(S,", but found (").concat(M.join(", "),") instead."))}return null}},{key:"register",value:function(n,e){for(var r in t.definitions=e,e)n[r]=t}}]),t}();var QS=function(){function t(n,e,r){E_(this,t),this.type=_S,this.locale=r,this.caseSensitive=n,this.diacriticSensitive=e}return T_(t,[{key:"evaluate",value:function(t){return new PS(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}},{key:"eachChild",value:function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]}}],[{key:"parse",value:function(n,e){if(2!==n.length)return e.error("Expected one argument.");var r=n[1];if("object"!==F_(r)||Array.isArray(r))return e.error("Collator options argument must be an object.");var i=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,wS);if(!i)return null;var o=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,wS);if(!o)return null;var s=null;return r.locale&&!(s=e.parse(r.locale,1,bS))?null:new t(i,o,s)}}]),t}(),tM=8192;function nM(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.max(t[2],n[0]),t[3]=Math.max(t[3],n[1])}function eM(t,n){return!(t[0]<=n[0])&&(!(t[2]>=n[2])&&(!(t[1]<=n[1])&&!(t[3]>=n[3])))}function rM(t,n){var e,r=(180+t[0])/360,i=(e=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360),o=Math.pow(2,n.z);return[Math.round(r*o*tM),Math.round(i*o*tM)]}function iM(t,n,e){var r=t[0]-n[0],i=t[1]-n[1],o=t[0]-e[0],s=t[1]-e[1];return r*s-o*i==0&&r*o<=0&&i*s<=0}function oM(t,n,e){return n[1]>t[1]!=e[1]>t[1]&&t[0]<(e[0]-n[0])*(t[1]-n[1])/(e[1]-n[1])+n[0]}function sM(t,n){for(var e=!1,r=0,i=n.length;r<i;r++)for(var o=n[r],s=0,a=o.length;s<a-1;s++){if(iM(t,o[s],o[s+1]))return!1;oM(t,o[s],o[s+1])&&(e=!e)}return e}function aM(t,n){for(var e=0;e<n.length;e++)if(sM(t,n[e]))return!0;return!1}function uM(t,n,e,r){var i=t[0]-e[0],o=t[1]-e[1],s=n[0]-e[0],a=n[1]-e[1],u=r[0]-e[0],c=r[1]-e[1],f=i*c-u*o,h=s*c-u*a;return f>0&&h<0||f<0&&h>0}function cM(t,n,e){var r,i,o,s,a,u,c,f,h,l=N_(e);try{for(l.s();!(r=l.n()).done;)for(var v=r.value,d=0;d<v.length-1;++d)if(i=t,o=n,s=v[d],a=v[d+1],u=void 0,c=void 0,f=void 0,h=void 0,f=[o[0]-i[0],o[1]-i[1]],h=[a[0]-s[0],a[1]-s[1]],0!=(u=h)[0]*(c=f)[1]-u[1]*c[0]&&uM(i,o,s,a)&&uM(s,a,i,o))return!0}catch(t){l.e(t)}finally{l.f()}return!1}function fM(t,n){for(var e=0;e<t.length;++e)if(!sM(t[e],n))return!1;for(var r=0;r<t.length-1;++r)if(cM(t[r],t[r+1],n))return!1;return!0}function hM(t,n){for(var e=0;e<n.length;e++)if(fM(t,n[e]))return!0;return!1}function lM(t,n,e){for(var r=[],i=0;i<t.length;i++){for(var o=[],s=0;s<t[i].length;s++){var a=rM(t[i][s],e);nM(n,a),o.push(a)}r.push(o)}return r}function vM(t,n,e){for(var r=[],i=0;i<t.length;i++){var o=lM(t[i],n,e);r.push(o)}return r}function dM(t,n,e,r){if(t[0]<e[0]||t[0]>e[2]){var i=.5*r,o=t[0]-e[0]>i?-r:e[0]-t[0]>i?r:0;0===o&&(o=t[0]-e[2]>i?-r:e[2]-t[0]>i?r:0),t[0]+=o}nM(n,t)}function pM(t,n,e,r){var i,o=Math.pow(2,r.z)*tM,s=[r.x*tM,r.y*tM],a=[],u=N_(t);try{for(u.s();!(i=u.n()).done;){var c,f=N_(i.value);try{for(f.s();!(c=f.n()).done;){var h=c.value,l=[h.x+s[0],h.y+s[1]];dM(l,n,e,o),a.push(l)}}catch(t){f.e(t)}finally{f.f()}}}catch(t){u.e(t)}finally{u.f()}return a}function yM(t,n,e,r){var i,o=Math.pow(2,r.z)*tM,s=[r.x*tM,r.y*tM],a=[],u=N_(t);try{for(u.s();!(i=u.n()).done;){var c,f=i.value,h=[],l=N_(f);try{for(l.s();!(c=l.n()).done;){var v=c.value,d=[v.x+s[0],v.y+s[1]];nM(n,d),h.push(d)}}catch(t){l.e(t)}finally{l.f()}a.push(h)}}catch(t){u.e(t)}finally{u.f()}if(n[2]-n[0]<=o/2){!function(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}(n);var p,y=N_(a);try{for(y.s();!(p=y.n()).done;){var m,b=N_(p.value);try{for(b.s();!(m=b.n()).done;){dM(m.value,n,e,o)}}catch(t){b.e(t)}finally{b.f()}}}catch(t){y.e(t)}finally{y.f()}}return a}var mM=function(){function t(n,e){E_(this,t),this.type=wS,this.geojson=n,this.geometries=e}return T_(t,[{key:"evaluate",value:function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,n){var e=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===n.type){var o=lM(n.coordinates,r,i),s=pM(t.geometry(),e,r,i);if(!eM(e,r))return!1;var a,u=N_(s);try{for(u.s();!(a=u.n()).done;)if(!sM(a.value,o))return!1}catch(t){u.e(t)}finally{u.f()}}if("MultiPolygon"===n.type){var c=vM(n.coordinates,r,i),f=pM(t.geometry(),e,r,i);if(!eM(e,r))return!1;var h,l=N_(f);try{for(l.s();!(h=l.n()).done;)if(!aM(h.value,c))return!1}catch(t){l.e(t)}finally{l.f()}}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,n){var e=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===n.type){var o=lM(n.coordinates,r,i),s=yM(t.geometry(),e,r,i);if(!eM(e,r))return!1;var a,u=N_(s);try{for(u.s();!(a=u.n()).done;)if(!fM(a.value,o))return!1}catch(t){u.e(t)}finally{u.f()}}if("MultiPolygon"===n.type){var c=vM(n.coordinates,r,i),f=yM(t.geometry(),e,r,i);if(!eM(e,r))return!1;var h,l=N_(f);try{for(l.s();!(h=l.n()).done;)if(!hM(h.value,c))return!1}catch(t){l.e(t)}finally{l.f()}}return!0}(t,this.geometries)}return!1}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return["within",this.geojson]}}],[{key:"parse",value:function(n,e){if(2!==n.length)return e.error("'within' expression requires exactly one argument, but found ".concat(n.length-1," instead."));if(FS(n[1])){var r=n[1];if("FeatureCollection"===r.type)for(var i=0;i<r.features.length;++i){var o=r.features[i].geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new t(r,r.features[i].geometry)}else if("Feature"===r.type){var s=r.geometry.type;if("Polygon"===s||"MultiPolygon"===s)return new t(r,r.geometry)}else if("Polygon"===r.type||"MultiPolygon"===r.type)return new t(r,r)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")}}]),t}();function bM(t){if(t instanceof JS){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof mM)return!1;var n=!0;return t.eachChild((function(t){n&&!bM(t)&&(n=!1)})),n}function wM(t){if(t instanceof JS&&"feature-state"===t.name)return!1;var n=!0;return t.eachChild((function(t){n&&!wM(t)&&(n=!1)})),n}function gM(t,n){if(t instanceof JS&&n.indexOf(t.name)>=0)return!1;var e=!0;return t.eachChild((function(t){e&&!gM(t,n)&&(e=!1)})),e}var xM=function(){function t(n,e){E_(this,t),this.type=e.type,this.name=n,this.boundExpression=e}return T_(t,[{key:"evaluate",value:function(t){return this.boundExpression.evaluate(t)}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["var",this.name]}}],[{key:"parse",value:function(n,e){if(2!==n.length||"string"!=typeof n[1])return e.error("'var' expression requires exactly one string literal argument.");var r=n[1];return e.scope.has(r)?new t(r,e.scope.get(r)):e.error('Unknown variable "'.concat(r,'". Make sure "').concat(r,'" has been bound in an enclosing "let" expression before using it.'),1)}}]),t}(),kM=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new pS,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];E_(this,t),this.registry=n,this.path=e,this.key=e.map((function(t){return"[".concat(t,"]")})).join(""),this.scope=i,this.errors=o,this.expectedType=r}return T_(t,[{key:"parse",value:function(t,n,e,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return n?this.concat(n,e,r)._parse(t,i):this._parse(t,i)}},{key:"_parse",value:function(t,n){function e(t,n,e){return"assert"===e?new VS(n,[t]):"coerce"===e?new KS(n,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found ".concat(F_(r),' instead. If you wanted a literal array, use ["literal", [...]].'),0),null;var i=this.registry[r];if(i){var o=i.parse(t,this);if(!o)return null;if(this.expectedType){var s=this.expectedType,a=o.type;if("string"!==s.kind&&"number"!==s.kind&&"boolean"!==s.kind&&"object"!==s.kind&&"array"!==s.kind||"value"!==a.kind)if("color"!==s.kind&&"formatted"!==s.kind&&"resolvedImage"!==s.kind||"value"!==a.kind&&"string"!==a.kind){if(this.checkSubtype(s,a))return null}else o=e(o,s,n.typeAnnotation||"coerce");else o=e(o,s,n.typeAnnotation||"assert")}if(!(o instanceof BS)&&"resolvedImage"!==o.type.kind&&_M(o)){var u=new YS;try{o=new BS(o.type,o.evaluate(u))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'.concat(r,'". If you wanted a literal array, use ["literal", [...]].'),0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"===F_(t)?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found ".concat(F_(t)," instead."))}},{key:"concat",value:function(n,e,r){var i="number"==typeof n?this.path.concat(n):this.path,o=r?this.scope.concat(r):this.scope;return new t(this.registry,i,e||null,o,this.errors)}},{key:"error",value:function(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];var i="".concat(this.key).concat(e.map((function(t){return"[".concat(t,"]")})).join(""));this.errors.push(new dS(i,t))}},{key:"checkSubtype",value:function(t,n){var e=ES(t,n);return e&&this.error(e),e}}]),t}();function _M(t){if(t instanceof xM)return _M(t.boundExpression);if(t instanceof JS&&"error"===t.name)return!1;if(t instanceof QS)return!1;if(t instanceof mM)return!1;var n=t instanceof KS||t instanceof VS,e=!0;return t.eachChild((function(t){e=n?e&&_M(t):e&&t instanceof BS})),!!e&&(bM(t)&&gM(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script"]))}function SM(t,n){for(var e,r,i=t.length-1,o=0,s=i,a=0;o<=s;)if(e=t[a=Math.floor((o+s)/2)],r=t[a+1],e<=n){if(a===i||n<r)return a;o=a+1}else{if(!(e>n))throw new qS("Input is not a number.");s=a-1}return 0}var MM=function(){function t(n,e,r){E_(this,t),this.type=n,this.input=e,this.labels=[],this.outputs=[];var i,o=N_(r);try{for(o.s();!(i=o.n()).done;){var s=S_(i.value,2),a=s[0],u=s[1];this.labels.push(a),this.outputs.push(u)}}catch(t){o.e(t)}finally{o.f()}}return T_(t,[{key:"evaluate",value:function(t){var n=this.labels,e=this.outputs;if(1===n.length)return e[0].evaluate(t);var r=this.input.evaluate(t);if(r<=n[0])return e[0].evaluate(t);var i=n.length;return r>=n[i-1]?e[i-1].evaluate(t):e[SM(n,r)].evaluate(t)}},{key:"eachChild",value:function(t){t(this.input);var n,e=N_(this.outputs);try{for(e.s();!(n=e.n()).done;){t(n.value)}}catch(t){e.e(t)}finally{e.f()}}},{key:"outputDefined",value:function(){return this.outputs.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){for(var t=["step",this.input.serialize()],n=0;n<this.labels.length;n++)n>0&&t.push(this.labels[n]),t.push(this.outputs[n].serialize());return t}}],[{key:"parse",value:function(n,e){if(n.length-1<4)return e.error("Expected at least 4 arguments, but found only ".concat(n.length-1,"."));if((n.length-1)%2!=0)return e.error("Expected an even number of arguments.");var r=e.parse(n[1],1,mS);if(!r)return null;var i=[],o=null;e.expectedType&&"value"!==e.expectedType.kind&&(o=e.expectedType);for(var s=1;s<n.length;s+=2){var a=1===s?-1/0:n[s],u=n[s+1],c=s,f=s+1;if("number"!=typeof a)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',c);if(i.length&&i[i.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);var h=e.parse(u,f,o);if(!h)return null;o=o||h.type,i.push([a,h])}return new t(o,r,i)}}]),t}(),jM=OM;function OM(t,n,e,r){this.cx=3*t,this.bx=3*(e-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*n,this.by=3*(r-n)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=e,this.p2y=r}function TM(t,n,e){return t*(1-e)+n*e}OM.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},OM.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},OM.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},OM.prototype.solveCurveX=function(t,n){var e,r,i,o,s;for(void 0===n&&(n=1e-6),i=t,s=0;s<8;s++){if(o=this.sampleCurveX(i)-t,Math.abs(o)<n)return i;var a=this.sampleCurveDerivativeX(i);if(Math.abs(a)<1e-6)break;i-=o/a}if((i=t)<(e=0))return e;if(i>(r=1))return r;for(;e<r;){if(o=this.sampleCurveX(i),Math.abs(o-t)<n)return i;t>o?e=i:r=i,i=.5*(r-e)+e}return i},OM.prototype.solve=function(t,n){return this.sampleCurveY(this.solveCurveX(t,n))};var EM=Object.freeze({__proto__:null,number:TM,color:function(t,n,e){return new IS(TM(t.r,n.r,e),TM(t.g,n.g,e),TM(t.b,n.b,e),TM(t.a,n.a,e))},array:function(t,n,e){return t.map((function(t,r){return TM(t,n[r],e)}))}}),AM=.95047,CM=1.08883,RM=4/29,IM=6/29,PM=3*IM*IM,DM=Math.PI/180,NM=180/Math.PI;function zM(t){return t>.008856451679035631?Math.pow(t,1/3):t/PM+RM}function LM(t){return t>IM?t*t*t:PM*(t-RM)}function FM(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function GM(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function UM(t){var n=GM(t.r),e=GM(t.g),r=GM(t.b),i=zM((.4124564*n+.3575761*e+.1804375*r)/AM),o=zM((.2126729*n+.7151522*e+.072175*r)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-zM((.0193339*n+.119192*e+.9503041*r)/CM)),alpha:t.a}}function BM(t){var n=(t.l+16)/116,e=isNaN(t.a)?n:n+t.a/500,r=isNaN(t.b)?n:n-t.b/200;return n=1*LM(n),e=AM*LM(e),r=CM*LM(r),new IS(FM(3.2404542*e-1.5371385*n-.4985314*r),FM(-.969266*e+1.8760108*n+.041556*r),FM(.0556434*e-.2040259*n+1.0572252*r),t.alpha)}function qM(t,n,e){var r=n-t;return t+e*(r>180||r<-180?r-360*Math.round(r/360):r)}var $M={forward:UM,reverse:BM,interpolate:function(t,n,e){return{l:TM(t.l,n.l,e),a:TM(t.a,n.a,e),b:TM(t.b,n.b,e),alpha:TM(t.alpha,n.alpha,e)}}},VM={forward:function(t){var n=UM(t),e=n.l,r=n.a,i=n.b,o=Math.atan2(i,r)*NM;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:e,alpha:t.a}},reverse:function(t){var n=t.h*DM,e=t.c;return BM({l:t.l,a:Math.cos(n)*e,b:Math.sin(n)*e,alpha:t.alpha})},interpolate:function(t,n,e){return{h:qM(t.h,n.h,e),c:TM(t.c,n.c,e),l:TM(t.l,n.l,e),alpha:TM(t.alpha,n.alpha,e)}}},ZM=function(){function t(n,e,r,i,o){E_(this,t),this.type=n,this.operator=e,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];var s,a=N_(o);try{for(a.s();!(s=a.n()).done;){var u=S_(s.value,2),c=u[0],f=u[1];this.labels.push(c),this.outputs.push(f)}}catch(t){a.e(t)}finally{a.f()}}return T_(t,[{key:"evaluate",value:function(n){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(n);var i=this.input.evaluate(n);if(i<=e[0])return r[0].evaluate(n);var o=e.length;if(i>=e[o-1])return r[o-1].evaluate(n);var s=SM(e,i),a=e[s],u=e[s+1],c=t.interpolationFactor(this.interpolation,i,a,u),f=r[s].evaluate(n),h=r[s+1].evaluate(n);return"interpolate"===this.operator?EM[this.type.kind.toLowerCase()](f,h,c):"interpolate-hcl"===this.operator?VM.reverse(VM.interpolate(VM.forward(f),VM.forward(h),c)):$M.reverse($M.interpolate($M.forward(f),$M.forward(h),c))}},{key:"eachChild",value:function(t){t(this.input);var n,e=N_(this.outputs);try{for(e.s();!(n=e.n()).done;){t(n.value)}}catch(t){e.e(t)}finally{e.f()}}},{key:"outputDefined",value:function(){return this.outputs.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var n=[this.operator,t,this.input.serialize()],e=0;e<this.labels.length;e++)n.push(this.labels[e],this.outputs[e].serialize());return n}}],[{key:"interpolationFactor",value:function(t,n,e,r){var i=0;if("exponential"===t.name)i=WM(n,t.base,e,r);else if("linear"===t.name)i=WM(n,1,e,r);else if("cubic-bezier"===t.name){var o=t.controlPoints;i=new jM(o[0],o[1],o[2],o[3]).solve(WM(n,1,e,r))}return i}},{key:"parse",value:function(n,e){var r,i=j_(r=n)||__(r)||z_(r)||M_(),o=i[0],s=i[1],a=i[2],u=i.slice(3);if(!Array.isArray(s)||0===s.length)return e.error("Expected an interpolation type expression.",1);if("linear"===s[0])s={name:"linear"};else if("exponential"===s[0]){var c=s[1];if("number"!=typeof c)return e.error("Exponential interpolation requires a numeric base.",1,1);s={name:"exponential",base:c}}else{if("cubic-bezier"!==s[0])return e.error("Unknown interpolation type ".concat(String(s[0])),1,0);var f=s.slice(1);if(4!==f.length||f.some((function(t){return"number"!=typeof t||t<0||t>1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);s={name:"cubic-bezier",controlPoints:f}}if(n.length-1<4)return e.error("Expected at least 4 arguments, but found only ".concat(n.length-1,"."));if((n.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(a=e.parse(a,2,mS)))return null;var h=[],l=null;"interpolate-hcl"===o||"interpolate-lab"===o?l=gS:e.expectedType&&"value"!==e.expectedType.kind&&(l=e.expectedType);for(var v=0;v<u.length;v+=2){var d=u[v],p=u[v+1],y=v+3,m=v+4;if("number"!=typeof d)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',y);if(h.length&&h[h.length-1][0]>=d)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',y);var b=e.parse(p,m,l);if(!b)return null;l=l||b.type,h.push([d,b])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new t(l,o,s,a,h):e.error("Type ".concat(OS(l)," is not interpolatable."))}}]),t}();function WM(t,n,e,r){var i=r-e,o=t-e;return 0===i?0:1===n?o/i:(Math.pow(n,o)-1)/(Math.pow(n,i)-1)}var HM=function(){function t(n,e){E_(this,t),this.type=n,this.args=e}return T_(t,[{key:"evaluate",value:function(t){var n,e,r=null,i=0,o=N_(this.args);try{for(o.s();!(e=o.n()).done;){var s=e.value;if(i++,(r=s.evaluate(t))&&r instanceof zS&&!r.available&&(n||(n=r.name),r=null,i===this.args.length&&(r=n)),null!==r)break}}catch(t){o.e(t)}finally{o.f()}return r}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){var t=["coalesce"];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,e){if(n.length<2)return e.error("Expectected at least one argument.");var r=null,i=e.expectedType;i&&"value"!==i.kind&&(r=i);var o,s=[],a=N_(n.slice(1));try{for(a.s();!(o=a.n()).done;){var u=o.value,c=e.parse(u,1+s.length,r,void 0,{typeAnnotation:"omit"});if(!c)return null;r=r||c.type,s.push(c)}}catch(t){a.e(t)}finally{a.f()}return new t(i&&s.some((function(t){return ES(i,t.type)}))?kS:r,s)}}]),t}(),KM=function(){function t(n,e){E_(this,t),this.type=e.type,this.bindings=[].concat(n),this.result=e}return T_(t,[{key:"evaluate",value:function(t){return this.result.evaluate(t)}},{key:"eachChild",value:function(t){var n,e=N_(this.bindings);try{for(e.s();!(n=e.n()).done;){t(n.value[1])}}catch(t){e.e(t)}finally{e.f()}t(this.result)}},{key:"outputDefined",value:function(){return this.result.outputDefined()}},{key:"serialize",value:function(){var t,n=["let"],e=N_(this.bindings);try{for(e.s();!(t=e.n()).done;){var r=S_(t.value,2),i=r[0],o=r[1];n.push(i,o.serialize())}}catch(t){e.e(t)}finally{e.f()}return n.push(this.result.serialize()),n}}],[{key:"parse",value:function(n,e){if(n.length<4)return e.error("Expected at least 3 arguments, but found ".concat(n.length-1," instead."));for(var r=[],i=1;i<n.length-1;i+=2){var o=n[i];if("string"!=typeof o)return e.error("Expected string, but found ".concat(F_(o)," instead."),i);if(/[^a-zA-Z0-9_]/.test(o))return e.error("Variable names must contain only alphanumeric characters or '_'.",i);var s=e.parse(n[i+1],i+1);if(!s)return null;r.push([o,s])}var a=e.parse(n[n.length-1],n.length-1,e.expectedType,r);return a?new t(r,a):null}}]),t}(),XM=function(){function t(n,e,r){E_(this,t),this.type=n,this.index=e,this.input=r}return T_(t,[{key:"evaluate",value:function(t){var n=this.index.evaluate(t),e=this.input.evaluate(t);if(n<0)throw new qS("Array index out of bounds: ".concat(n," < 0."));if(n>=e.length)throw new qS("Array index out of bounds: ".concat(n," > ").concat(e.length-1,"."));if(n!==Math.floor(n))throw new qS("Array index must be an integer, but found ".concat(n," instead."));return e[n]}},{key:"eachChild",value:function(t){t(this.index),t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["at",this.index.serialize(),this.input.serialize()]}}],[{key:"parse",value:function(n,e){if(3!==n.length)return e.error("Expected 2 arguments, but found ".concat(n.length-1," instead."));var r=e.parse(n[1],1,mS),i=e.parse(n[2],2,jS(e.expectedType||kS));return r&&i?new t(i.type.itemType,r,i):null}}]),t}(),YM=function(){function t(n,e){E_(this,t),this.type=wS,this.needle=n,this.haystack=e}return T_(t,[{key:"evaluate",value:function(t){var n=this.needle.evaluate(t),e=this.haystack.evaluate(t);if(!e)return!1;if(!CS(n,["boolean","string","number","null"]))throw new qS("Expected first argument to be of type boolean, string, number or null, but found ".concat(OS(GS(n))," instead."));if(!CS(e,["string","array"]))throw new qS("Expected second argument to be of type array or string, but found ".concat(OS(GS(e))," instead."));return e.indexOf(n)>=0}},{key:"eachChild",value:function(t){t(this.needle),t(this.haystack)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return["in",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(n,e){if(3!==n.length)return e.error("Expected 2 arguments, but found ".concat(n.length-1," instead."));var r=e.parse(n[1],1,kS),i=e.parse(n[2],2,kS);return r&&i?AS(r.type,[wS,bS,mS,yS,kS])?new t(r,i):e.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(OS(r.type)," instead")):null}}]),t}(),JM=function(){function t(n,e,r){E_(this,t),this.type=mS,this.needle=n,this.haystack=e,this.fromIndex=r}return T_(t,[{key:"evaluate",value:function(t){var n=this.needle.evaluate(t),e=this.haystack.evaluate(t);if(!CS(n,["boolean","string","number","null"]))throw new qS("Expected first argument to be of type boolean, string, number or null, but found ".concat(OS(GS(n))," instead."));if(!CS(e,["string","array"]))throw new qS("Expected second argument to be of type array or string, but found ".concat(OS(GS(e))," instead."));if(this.fromIndex){var r=this.fromIndex.evaluate(t);return e.indexOf(n,r)}return e.indexOf(n)}},{key:"eachChild",value:function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(n,e){if(n.length<=2||n.length>=5)return e.error("Expected 3 or 4 arguments, but found ".concat(n.length-1," instead."));var r=e.parse(n[1],1,kS),i=e.parse(n[2],2,kS);if(!r||!i)return null;if(!AS(r.type,[wS,bS,mS,yS,kS]))return e.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(OS(r.type)," instead"));if(4===n.length){var o=e.parse(n[3],3,mS);return o?new t(r,i,o):null}return new t(r,i)}}]),t}(),QM=function(){function t(n,e,r,i,o,s){E_(this,t),this.inputType=n,this.type=e,this.input=r,this.cases=i,this.outputs=o,this.otherwise=s}return T_(t,[{key:"evaluate",value:function(t){var n=this.input.evaluate(t);return(GS(n)===this.inputType&&this.outputs[this.cases[n]]||this.otherwise).evaluate(t)}},{key:"eachChild",value:function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}},{key:"outputDefined",value:function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var t,n=this,e=["match",this.input.serialize()],r=[],i={},o=N_(Object.keys(this.cases).sort());try{for(o.s();!(t=o.n()).done;){var s=t.value,a=i[this.cases[s]];void 0===a?(i[this.cases[s]]=r.length,r.push([this.cases[s],[s]])):r[a][1].push(s)}}catch(t){o.e(t)}finally{o.f()}for(var u=function(t){return"number"===n.inputType.kind?Number(t):t},c=0,f=r;c<f.length;c++){var h=S_(f[c],2),l=h[0],v=h[1];1===v.length?e.push(u(v[0])):e.push(v.map(u)),e.push(this.outputs[l].serialize())}return e.push(this.otherwise.serialize()),e}}],[{key:"parse",value:function(n,e){if(n.length<5)return e.error("Expected at least 4 arguments, but found only ".concat(n.length-1,"."));if(n.length%2!=1)return e.error("Expected an even number of arguments.");var r,i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var o={},s=[],a=2;a<n.length-1;a+=2){var u=n[a],c=n[a+1];Array.isArray(u)||(u=[u]);var f=e.concat(a);if(0===u.length)return f.error("Expected at least one branch label.");var h,l=N_(u);try{for(l.s();!(h=l.n()).done;){var v=h.value;if("number"!=typeof v&&"string"!=typeof v)return f.error("Branch labels must be numbers or strings.");if("number"==typeof v&&Math.abs(v)>Number.MAX_SAFE_INTEGER)return f.error("Branch labels must be integers no larger than ".concat(Number.MAX_SAFE_INTEGER,"."));if("number"==typeof v&&Math.floor(v)!==v)return f.error("Numeric branch labels must be integer values.");if(r){if(f.checkSubtype(r,GS(v)))return null}else r=GS(v);if(void 0!==o[String(v)])return f.error("Branch labels must be unique.");o[String(v)]=s.length}}catch(t){l.e(t)}finally{l.f()}var d=e.parse(c,a,i);if(!d)return null;i=i||d.type,s.push(d)}var p=e.parse(n[1],1,kS);if(!p)return null;var y=e.parse(n[n.length-1],n.length-1,i);return y?"value"!==p.type.kind&&e.concat(1).checkSubtype(r,p.type)?null:new t(r,i,p,o,s,y):null}}]),t}(),tj=function(){function t(n,e,r){E_(this,t),this.type=n,this.branches=e,this.otherwise=r}return T_(t,[{key:"evaluate",value:function(t){var n,e=N_(this.branches);try{for(e.s();!(n=e.n()).done;){var r=S_(n.value,2),i=r[0],o=r[1];if(i.evaluate(t))return o.evaluate(t)}}catch(t){e.e(t)}finally{e.f()}return this.otherwise.evaluate(t)}},{key:"eachChild",value:function(t){var n,e=N_(this.branches);try{for(e.s();!(n=e.n()).done;){var r=S_(n.value,2),i=r[0],o=r[1];t(i),t(o)}}catch(t){e.e(t)}finally{e.f()}t(this.otherwise)}},{key:"outputDefined",value:function(){return this.branches.every((function(t){var n=S_(t,2);n[0];return n[1].outputDefined()}))&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var t=["case"];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,e){if(n.length<4)return e.error("Expected at least 3 arguments, but found only ".concat(n.length-1,"."));if(n.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i=[],o=1;o<n.length-1;o+=2){var s=e.parse(n[o],o,wS);if(!s)return null;var a=e.parse(n[o+1],o+1,r);if(!a)return null;i.push([s,a]),r=r||a.type}var u=e.parse(n[n.length-1],n.length-1,r);return u?new t(r,i,u):null}}]),t}(),nj=function(){function t(n,e,r,i){E_(this,t),this.type=n,this.input=e,this.beginIndex=r,this.endIndex=i}return T_(t,[{key:"evaluate",value:function(t){var n=this.input.evaluate(t),e=this.beginIndex.evaluate(t);if(!CS(n,["string","array"]))throw new qS("Expected first argument to be of type array or string, but found ".concat(OS(GS(n))," instead."));if(this.endIndex){var r=this.endIndex.evaluate(t);return n.slice(e,r)}return n.slice(e)}},{key:"eachChild",value:function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}],[{key:"parse",value:function(n,e){if(n.length<=2||n.length>=5)return e.error("Expected 3 or 4 arguments, but found ".concat(n.length-1," instead."));var r=e.parse(n[1],1,kS),i=e.parse(n[2],2,mS);if(!r||!i)return null;if(!AS(r.type,[jS(kS),bS,kS]))return e.error("Expected first argument to be of type array or string, but found ".concat(OS(r.type)," instead"));if(4===n.length){var o=e.parse(n[3],3,mS);return o?new t(r.type,r,i,o):null}return new t(r.type,r,i)}}]),t}();function ej(t,n){return"=="===t||"!="===t?"boolean"===n.kind||"string"===n.kind||"number"===n.kind||"null"===n.kind||"value"===n.kind:"string"===n.kind||"number"===n.kind||"value"===n.kind}function rj(t,n,e,r){return 0===r.compare(n,e)}function ij(t,n,e){var r="=="!==t&&"!="!==t;return function(){function i(t,n,e){E_(this,i),this.type=wS,this.lhs=t,this.rhs=n,this.collator=e,this.hasUntypedArgument="value"===t.type.kind||"value"===n.type.kind}return T_(i,[{key:"evaluate",value:function(i){var o=this.lhs.evaluate(i),s=this.rhs.evaluate(i);if(r&&this.hasUntypedArgument){var a=GS(o),u=GS(s);if(a.kind!==u.kind||"string"!==a.kind&&"number"!==a.kind)throw new qS('Expected arguments for "'.concat(t,'" to be (string, string) or (number, number), but found (').concat(a.kind,", ").concat(u.kind,") instead."))}if(this.collator&&!r&&this.hasUntypedArgument){var c=GS(o),f=GS(s);if("string"!==c.kind||"string"!==f.kind)return n(i,o,s)}return this.collator?e(i,o,s,this.collator.evaluate(i)):n(i,o,s)}},{key:"eachChild",value:function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){var n=[t];return this.eachChild((function(t){n.push(t.serialize())})),n}}],[{key:"parse",value:function(t,n){if(3!==t.length&&4!==t.length)return n.error("Expected two or three arguments.");var e=t[0],o=n.parse(t[1],1,kS);if(!o)return null;if(!ej(e,o.type))return n.concat(1).error('"'.concat(e,"\" comparisons are not supported for type '").concat(OS(o.type),"'."));var s=n.parse(t[2],2,kS);if(!s)return null;if(!ej(e,s.type))return n.concat(2).error('"'.concat(e,"\" comparisons are not supported for type '").concat(OS(s.type),"'."));if(o.type.kind!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return n.error("Cannot compare types '".concat(OS(o.type),"' and '").concat(OS(s.type),"'."));r&&("value"===o.type.kind&&"value"!==s.type.kind?o=new VS(s.type,[o]):"value"!==o.type.kind&&"value"===s.type.kind&&(s=new VS(o.type,[s])));var a=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return n.error("Cannot use collator to compare non-string types.");if(!(a=n.parse(t[3],3,_S)))return null}return new i(o,s,a)}}]),i}()}var oj=ij("==",(function(t,n,e){return n===e}),rj),sj=ij("!=",(function(t,n,e){return n!==e}),(function(t,n,e,r){return!rj(0,n,e,r)})),aj=ij("<",(function(t,n,e){return n<e}),(function(t,n,e,r){return r.compare(n,e)<0})),uj=ij(">",(function(t,n,e){return n>e}),(function(t,n,e,r){return r.compare(n,e)>0})),cj=ij("<=",(function(t,n,e){return n<=e}),(function(t,n,e,r){return r.compare(n,e)<=0})),fj=ij(">=",(function(t,n,e){return n>=e}),(function(t,n,e,r){return r.compare(n,e)>=0})),hj=function(){function t(n,e,r,i,o){E_(this,t),this.type=bS,this.number=n,this.locale=e,this.currency=r,this.minFractionDigits=i,this.maxFractionDigits=o}return T_(t,[{key:"evaluate",value:function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}},{key:"eachChild",value:function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}],[{key:"parse",value:function(n,e){if(3!==n.length)return e.error("Expected two arguments.");var r=e.parse(n[1],1,mS);if(!r)return null;var i=n[2];if("object"!==F_(i)||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");var o=null;if(i.locale&&!(o=e.parse(i.locale,1,bS)))return null;var s=null;if(i.currency&&!(s=e.parse(i.currency,1,bS)))return null;var a=null;if(i["min-fraction-digits"]&&!(a=e.parse(i["min-fraction-digits"],1,mS)))return null;var u=null;return i["max-fraction-digits"]&&!(u=e.parse(i["max-fraction-digits"],1,mS))?null:new t(r,o,s,a,u)}}]),t}(),lj={"==":oj,"!=":sj,">":uj,"<":aj,">=":fj,"<=":cj,array:VS,at:XM,boolean:VS,case:tj,coalesce:HM,collator:QS,format:ZS,image:WS,in:YM,"index-of":JM,interpolate:ZM,"interpolate-hcl":ZM,"interpolate-lab":ZM,length:function(){function t(n){E_(this,t),this.type=mS,this.input=n}return T_(t,[{key:"evaluate",value:function(t){var n=this.input.evaluate(t);if("string"==typeof n)return n.length;if(Array.isArray(n))return n.length;throw new qS("Expected value to be of type string or array, but found ".concat(OS(GS(n))," instead."))}},{key:"eachChild",value:function(t){t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t=["length"];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,e){if(2!==n.length)return e.error("Expected 1 argument, but found ".concat(n.length-1," instead."));var r=e.parse(n[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found ".concat(OS(r.type)," instead.")):new t(r):null}}]),t}(),let:KM,literal:BS,match:QM,number:VS,"number-format":hj,object:VS,slice:nj,step:MM,string:VS,"to-boolean":KS,"to-color":KS,"to-number":KS,"to-string":KS,var:xM,within:mM};function vj(t,n){var e=S_(n,4),r=e[0],i=e[1],o=e[2],s=e[3];r=r.evaluate(t),i=i.evaluate(t),o=o.evaluate(t);var a=s?s.evaluate(t):1,u=LS(r,i,o,a);if(u)throw new qS(u);return new IS(r/255*a,i/255*a,o/255*a,a)}function dj(t,n){return t in n}function pj(t,n){var e=n[t];return void 0===e?null:e}function yj(t){return{type:t}}function mj(t){return{result:"success",value:t}}function bj(t){return{result:"error",value:t}}function wj(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function gj(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function xj(t){return!!t.expression&&t.expression.interpolated}function kj(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":F_(t)}function _j(t){return"object"===F_(t)&&null!==t&&!Array.isArray(t)}JS.register(lj,{error:[{kind:"error"},[bS],function(t,n){var e=S_(n,1)[0];throw new qS(e.evaluate(t))}],typeof:[bS,[kS],function(t,n){return OS(GS(S_(n,1)[0].evaluate(t)))}],"to-rgba":[jS(mS,4),[gS],function(t,n){return S_(n,1)[0].evaluate(t).toArray()}],rgb:[gS,[mS,mS,mS],vj],rgba:[gS,[mS,mS,mS,mS],vj],has:{type:wS,overloads:[[[bS],function(t,n){return dj(S_(n,1)[0].evaluate(t),t.properties())}],[[bS,xS],function(t,n){var e=S_(n,2),r=e[0],i=e[1];return dj(r.evaluate(t),i.evaluate(t))}]]},get:{type:kS,overloads:[[[bS],function(t,n){return pj(S_(n,1)[0].evaluate(t),t.properties())}],[[bS,xS],function(t,n){var e=S_(n,2),r=e[0],i=e[1];return pj(r.evaluate(t),i.evaluate(t))}]]},"feature-state":[kS,[bS],function(t,n){return pj(S_(n,1)[0].evaluate(t),t.featureState||{})}],properties:[xS,[],function(t){return t.properties()}],"geometry-type":[bS,[],function(t){return t.geometryType()}],id:[kS,[],function(t){return t.id()}],zoom:[mS,[],function(t){return t.globals.zoom}],"heatmap-density":[mS,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[mS,[],function(t){return t.globals.lineProgress||0}],"sky-radial-progress":[mS,[],function(t){return t.globals.skyRadialProgress||0}],accumulated:[kS,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[mS,yj(mS),function(t,n){var e,r=0,i=N_(n);try{for(i.s();!(e=i.n()).done;){r+=e.value.evaluate(t)}}catch(t){i.e(t)}finally{i.f()}return r}],"*":[mS,yj(mS),function(t,n){var e,r=1,i=N_(n);try{for(i.s();!(e=i.n()).done;){r*=e.value.evaluate(t)}}catch(t){i.e(t)}finally{i.f()}return r}],"-":{type:mS,overloads:[[[mS,mS],function(t,n){var e=S_(n,2),r=e[0],i=e[1];return r.evaluate(t)-i.evaluate(t)}],[[mS],function(t,n){return-S_(n,1)[0].evaluate(t)}]]},"/":[mS,[mS,mS],function(t,n){var e=S_(n,2),r=e[0],i=e[1];return r.evaluate(t)/i.evaluate(t)}],"%":[mS,[mS,mS],function(t,n){var e=S_(n,2),r=e[0],i=e[1];return r.evaluate(t)%i.evaluate(t)}],ln2:[mS,[],function(){return Math.LN2}],pi:[mS,[],function(){return Math.PI}],e:[mS,[],function(){return Math.E}],"^":[mS,[mS,mS],function(t,n){var e=S_(n,2),r=e[0],i=e[1];return Math.pow(r.evaluate(t),i.evaluate(t))}],sqrt:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.sqrt(e.evaluate(t))}],log10:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.log(e.evaluate(t))/Math.LN10}],ln:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.log(e.evaluate(t))}],log2:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.log(e.evaluate(t))/Math.LN2}],sin:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.sin(e.evaluate(t))}],cos:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.cos(e.evaluate(t))}],tan:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.tan(e.evaluate(t))}],asin:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.asin(e.evaluate(t))}],acos:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.acos(e.evaluate(t))}],atan:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.atan(e.evaluate(t))}],min:[mS,yj(mS),function(t,n){return Math.min.apply(Math,k_(n.map((function(n){return n.evaluate(t)}))))}],max:[mS,yj(mS),function(t,n){return Math.max.apply(Math,k_(n.map((function(n){return n.evaluate(t)}))))}],abs:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.abs(e.evaluate(t))}],round:[mS,[mS],function(t,n){var e=S_(n,1)[0].evaluate(t);return e<0?-Math.round(-e):Math.round(e)}],floor:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.floor(e.evaluate(t))}],ceil:[mS,[mS],function(t,n){var e=S_(n,1)[0];return Math.ceil(e.evaluate(t))}],"filter-==":[wS,[bS,kS],function(t,n){var e=S_(n,2),r=e[0],i=e[1];return t.properties()[r.value]===i.value}],"filter-id-==":[wS,[kS],function(t,n){var e=S_(n,1)[0];return t.id()===e.value}],"filter-type-==":[wS,[bS],function(t,n){var e=S_(n,1)[0];return t.geometryType()===e.value}],"filter-<":[wS,[bS,kS],function(t,n){var e=S_(n,2),r=e[0],i=e[1],o=t.properties()[r.value],s=i.value;return F_(o)===F_(s)&&o<s}],"filter-id-<":[wS,[kS],function(t,n){var e=S_(n,1)[0],r=t.id(),i=e.value;return F_(r)===F_(i)&&r<i}],"filter->":[wS,[bS,kS],function(t,n){var e=S_(n,2),r=e[0],i=e[1],o=t.properties()[r.value],s=i.value;return F_(o)===F_(s)&&o>s}],"filter-id->":[wS,[kS],function(t,n){var e=S_(n,1)[0],r=t.id(),i=e.value;return F_(r)===F_(i)&&r>i}],"filter-<=":[wS,[bS,kS],function(t,n){var e=S_(n,2),r=e[0],i=e[1],o=t.properties()[r.value],s=i.value;return F_(o)===F_(s)&&o<=s}],"filter-id-<=":[wS,[kS],function(t,n){var e=S_(n,1)[0],r=t.id(),i=e.value;return F_(r)===F_(i)&&r<=i}],"filter->=":[wS,[bS,kS],function(t,n){var e=S_(n,2),r=e[0],i=e[1],o=t.properties()[r.value],s=i.value;return F_(o)===F_(s)&&o>=s}],"filter-id->=":[wS,[kS],function(t,n){var e=S_(n,1)[0],r=t.id(),i=e.value;return F_(r)===F_(i)&&r>=i}],"filter-has":[wS,[kS],function(t,n){return S_(n,1)[0].value in t.properties()}],"filter-has-id":[wS,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[wS,[jS(bS)],function(t,n){return S_(n,1)[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[wS,[jS(kS)],function(t,n){return S_(n,1)[0].value.indexOf(t.id())>=0}],"filter-in-small":[wS,[bS,jS(kS)],function(t,n){var e=S_(n,2),r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[wS,[bS,jS(kS)],function(t,n){var e=S_(n,2),r=e[0],i=e[1];return function(t,n,e,r){for(;e<=r;){var i=e+r>>1;if(n[i]===t)return!0;n[i]>t?r=i-1:e=i+1}return!1}(t.properties()[r.value],i.value,0,i.value.length-1)}],all:{type:wS,overloads:[[[wS,wS],function(t,n){var e=S_(n,2),r=e[0],i=e[1];return r.evaluate(t)&&i.evaluate(t)}],[yj(wS),function(t,n){var e,r=N_(n);try{for(r.s();!(e=r.n()).done;){if(!e.value.evaluate(t))return!1}}catch(t){r.e(t)}finally{r.f()}return!0}]]},any:{type:wS,overloads:[[[wS,wS],function(t,n){var e=S_(n,2),r=e[0],i=e[1];return r.evaluate(t)||i.evaluate(t)}],[yj(wS),function(t,n){var e,r=N_(n);try{for(r.s();!(e=r.n()).done;){if(e.value.evaluate(t))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}]]},"!":[wS,[wS],function(t,n){return!S_(n,1)[0].evaluate(t)}],"is-supported-script":[wS,[bS],function(t,n){var e=S_(n,1)[0],r=t.globals&&t.globals.isSupportedScript;return!r||r(e.evaluate(t))}],upcase:[bS,[bS],function(t,n){return S_(n,1)[0].evaluate(t).toUpperCase()}],downcase:[bS,[bS],function(t,n){return S_(n,1)[0].evaluate(t).toLowerCase()}],concat:[bS,yj(kS),function(t,n){return n.map((function(n){return US(n.evaluate(t))})).join("")}],"resolved-locale":[bS,[_S],function(t,n){return S_(n,1)[0].evaluate(t).resolvedLocale()}]});var Sj=function(){function t(n,e){var r;E_(this,t),this.expression=n,this._warningHistory={},this._evaluator=new YS,this._defaultValue=e?"color"===(r=e).type&&_j(r.default)?new IS(0,0,0,0):"color"===r.type?IS.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=e&&"enum"===e.type?e.values:null}return T_(t,[{key:"evaluateWithoutErrorHandling",value:function(t,n,e,r,i,o){return this._evaluator.globals=t,this._evaluator.feature=n,this._evaluator.featureState=e,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}},{key:"evaluate",value:function(t,n,e,r,i,o){this._evaluator.globals=t,this._evaluator.feature=n||null,this._evaluator.featureState=e||null,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{var s=this.expression.evaluate(this._evaluator);if(null==s||"number"==typeof s&&s!=s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new qS("Expected value to be one of ".concat(Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", "),", but found ").concat(JSON.stringify(s)," instead."));return s}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}]),t}();function Mj(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in lj}function jj(t,n){var e=new kM(lj,[],n?function(t){var n={color:gS,string:bS,number:mS,enum:bS,boolean:wS,formatted:SS,resolvedImage:MS};if("array"===t.type)return jS(n[t.value]||kS,t.length);return n[t.type]}(n):void 0),r=e.parse(t,void 0,void 0,void 0,n&&"string"===n.type?{typeAnnotation:"coerce"}:void 0);return r?mj(new Sj(r,n)):bj(e.errors)}var Oj=function(){function t(n,e){E_(this,t),this.kind=n,this._styleExpression=e,this.isStateDependent="constant"!==n&&!wM(e.expression)}return T_(t,[{key:"evaluateWithoutErrorHandling",value:function(t,n,e,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,n,e,r,i,o)}},{key:"evaluate",value:function(t,n,e,r,i,o){return this._styleExpression.evaluate(t,n,e,r,i,o)}}]),t}(),Tj=function(){function t(n,e,r,i){E_(this,t),this.kind=n,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==n&&!wM(e.expression),this.interpolationType=i}return T_(t,[{key:"evaluateWithoutErrorHandling",value:function(t,n,e,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,n,e,r,i,o)}},{key:"evaluate",value:function(t,n,e,r,i,o){return this._styleExpression.evaluate(t,n,e,r,i,o)}},{key:"interpolationFactor",value:function(t,n,e){return this.interpolationType?ZM.interpolationFactor(this.interpolationType,t,n,e):0}}]),t}();function Ej(t,n){if("error"===(t=jj(t,n)).result)return t;var e=t.value.expression,r=bM(e);if(!r&&!wj(n))return bj([new dS("","data expressions not supported")]);var i=gM(e,["zoom"]);if(!i&&!gj(n))return bj([new dS("","zoom expressions not supported")]);var o=Aj(e);if(!o&&!i)return bj([new dS("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof dS)return bj([o]);if(o instanceof ZM&&!xj(n))return bj([new dS("",'"interpolate" expressions cannot be used with this property')]);if(!o)return mj(new Oj(r?"constant":"source",t.value));var s=o instanceof ZM?o.interpolation:void 0;return mj(new Tj(r?"camera":"composite",t.value,o.labels,s))}function Aj(t){var n=null;if(t instanceof KM)n=Aj(t.result);else if(t instanceof HM){var e,r=N_(t.args);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(n=Aj(i))break}}catch(t){r.e(t)}finally{r.f()}}else(t instanceof MM||t instanceof ZM)&&t.input instanceof JS&&"zoom"===t.input.name&&(n=t);return n instanceof dS||t.eachChild((function(t){var e=Aj(t);e instanceof dS?n=e:!n&&e?n=new dS("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):n&&e&&n!==e&&(n=new dS("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),n}function Cj(t){return"object"===F_(t)?["literal",t]:t}function Rj(t,n){var e=t.stops;if(!e)return function(t,n){var e=["get",t.property];if(void 0===t.default)return"string"===n.type?["string",e]:e;if("enum"===n.type)return["match",e,Object.keys(n.values),e,t.default];var r=["color"===n.type?"to-color":n.type,e,Cj(t.default)];return"array"===n.type&&r.splice(1,0,n.value,n.length||null),r}(t,n);var r=e&&"object"===F_(e[0][0]),i=r||void 0!==t.property,o=r||!i;return e=e.map((function(t){return!i&&n.tokens&&"string"==typeof t[1]?[t[0],Fj(t[1])]:[t[0],Cj(t[1])]})),r?function(t,n,e){for(var r={},i={},o=[],s=0;s<e.length;s++){var a=e[s],u=a[0].zoom;void 0===r[u]&&(r[u]={zoom:u,type:t.type,property:t.property,default:t.default},i[u]=[],o.push(u)),i[u].push([a[0].value,a[1]])}if("exponential"===Lj({},n)){var c,f=[Ij(t),["linear"],["zoom"]],h=N_(o);try{for(h.s();!(c=h.n()).done;){var l=c.value;zj(f,l,Dj(r[l],n,i[l]),!1)}}catch(t){h.e(t)}finally{h.f()}return f}var v,d=["step",["zoom"]],p=N_(o);try{for(p.s();!(v=p.n()).done;){var y=v.value;zj(d,y,Dj(r[y],n,i[y]),!0)}}catch(t){p.e(t)}finally{p.f()}return Nj(d),d}(t,n,e):o?function(t,n,e){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["zoom"],o=Lj(t,n),s=!1;if("interval"===o)r=["step",i],s=!0;else{if("exponential"!==o)throw new Error('Unknown zoom function type "'.concat(o,'"'));var a=void 0!==t.base?t.base:1;r=[Ij(t),1===a?["linear"]:["exponential",a],i]}var u,c=N_(e);try{for(c.s();!(u=c.n()).done;){var f=u.value;zj(r,f[0],f[1],s)}}catch(t){c.e(t)}finally{c.f()}return Nj(r),r}(t,n,e):Dj(t,n,e)}function Ij(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Pj(t,n){var e,r,i=Cj((e=t.default,r=n.default,void 0!==e?e:void 0!==r?r:void 0));return void 0===i&&"resolvedImage"===n.type?"":i}function Dj(t,n,e){var r=Lj(t,n),i=["get",t.property];if("categorical"===r&&"boolean"==typeof e[0][0]){var o,s=["case"],a=N_(e);try{for(a.s();!(o=a.n()).done;){var u=o.value;s.push(["==",i,u[0]],u[1])}}catch(t){a.e(t)}finally{a.f()}return s.push(Pj(t,n)),s}if("categorical"===r){var c,f=["match",i],h=N_(e);try{for(h.s();!(c=h.n()).done;){var l=c.value;zj(f,l[0],l[1],!1)}}catch(t){h.e(t)}finally{h.f()}return f.push(Pj(t,n)),f}if("interval"===r){var v,d=["step",["number",i]],p=N_(e);try{for(p.s();!(v=p.n()).done;){var y=v.value;zj(d,y[0],y[1],!0)}}catch(t){p.e(t)}finally{p.f()}return Nj(d),void 0===t.default?d:["case",["==",["typeof",i],"number"],d,Cj(t.default)]}if("exponential"===r){var m,b=void 0!==t.base?t.base:1,w=[Ij(t),1===b?["linear"]:["exponential",b],["number",i]],g=N_(e);try{for(g.s();!(m=g.n()).done;){var x=m.value;zj(w,x[0],x[1],!1)}}catch(t){g.e(t)}finally{g.f()}return void 0===t.default?w:["case",["==",["typeof",i],"number"],w,Cj(t.default)]}throw new Error("Unknown property function type ".concat(r))}function Nj(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function zj(t,n,e,r){t.length>3&&n===t[t.length-2]||(r&&2===t.length||t.push(n),t.push(e))}function Lj(t,n){return t.type?t.type:n.expression.interpolated?"exponential":"interval"}function Fj(t){for(var n=["concat"],e=/{([^{}]+)}/g,r=0,i=e.exec(t);null!==i;i=e.exec(t)){var o=t.slice(r,e.lastIndex-i[0].length);r=e.lastIndex,o.length>0&&n.push(o),n.push(["get",i[1]])}if(1===n.length)return t;if(r<t.length)n.push(t.slice(r));else if(2===n.length)return["to-string",n[1]];return n}function Gj(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":var n,e=N_(t.slice(1));try{for(e.s();!(n=e.n()).done;){var r=n.value;if(!Gj(r)&&"boolean"!=typeof r)return!1}}catch(t){e.e(t)}finally{e.f()}return!0;default:return!0}}var Uj={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Bj(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};Gj(t)||(t=Vj(t));var n=jj(t,Uj);if("error"===n.result)throw new Error(n.value.map((function(t){return"".concat(t.key,": ").concat(t.message)})).join(", "));return{filter:function(t,e,r){return n.value.evaluate(t,e,{},r)},needGeometry:$j(t)}}function qj(t,n){return t<n?-1:t>n?1:0}function $j(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var n=1;n<t.length;n++)if($j(t[n]))return!0;return!1}function Vj(t){if(!t)return!0;var n,e=t[0];return t.length<=1?"any"!==e:"=="===e?Zj(t[1],t[2],"=="):"!="===e?Kj(Zj(t[1],t[2],"==")):"<"===e||">"===e||"<="===e||">="===e?Zj(t[1],t[2],e):"any"===e?(n=t.slice(1),["any"].concat(n.map(Vj))):"all"===e?["all"].concat(t.slice(1).map(Vj)):"none"===e?["all"].concat(t.slice(1).map(Vj).map(Kj)):"in"===e?Wj(t[1],t.slice(2)):"!in"===e?Kj(Wj(t[1],t.slice(2))):"has"===e?Hj(t[1]):"!has"===e?Kj(Hj(t[1])):"within"!==e||t}function Zj(t,n,e){switch(t){case"$type":return["filter-type-".concat(e),n];case"$id":return["filter-id-".concat(e),n];default:return["filter-".concat(e),t,n]}}function Wj(t,n){if(0===n.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",n]];case"$id":return["filter-id-in",["literal",n]];default:return n.length>200&&!n.some((function(t){return F_(t)!==F_(n[0])}))?["filter-in-large",t,["literal",n.sort(qj)]]:["filter-in-small",t,["literal",n]]}}function Hj(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Kj(t){return["!",t]}var Xj=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Yj(t,n){var e={};for(var r in t)"ref"!==r&&(e[r]=t[r]);return Xj.forEach((function(t){t in n&&(e[t]=n[t])})),e}var Jj=T_((function t(n,e,r,i){E_(this,t),this.message=(n?"".concat(n,": "):"")+r,i&&(this.identifier=i),null!=e&&e.av&&(this.line=e.av)})),Qj=T_((function t(n){E_(this,t),this.error=n,this.message=n.message;var e=n.message.match(/line (\d+)/);this.line=e?parseInt(e[1],10):0}));function tO(t){var n=t.key,e=t.value;return e?[new Jj(n,e,"constants have been deprecated as of v8")]:[]}function nO(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function eO(t){if(Array.isArray(t))return t.map(eO);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var n={};for(var e in t)n[e]=eO(t[e]);return n}return nO(t)}function rO(t){var n=t.key,e=t.value,r=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,s=t.styleSpec,a=[],u=kj(e);if("object"!==u)return[new Jj(n,e,"object expected, ".concat(u," found"))];for(var c in e){var f=c.split(".")[0],h=r[f]||r["*"],l=void 0;if(i[f])l=i[f];else if(r[f])l=kO;else if(i["*"])l=i["*"];else{if(!r["*"]){a.push(new Jj(n,e[c],'unknown property "'.concat(c,'"')));continue}l=kO}a=a.concat(l({key:(n?"".concat(n,"."):n)+c,value:e[c],valueSpec:h,style:o,styleSpec:s,object:e,objectKey:c},e))}for(var v in r)i[v]||r[v].required&&void 0===r[v].default&&void 0===e[v]&&a.push(new Jj(n,e,'missing required property "'.concat(v,'"')));return a}function iO(t){var n=t.value,e=t.valueSpec,r=t.style,i=t.styleSpec,o=t.key,s=t.arrayElementValidator||kO;if("array"!==kj(n))return[new Jj(o,n,"array expected, ".concat(kj(n)," found"))];if(e.length&&n.length!==e.length)return[new Jj(o,n,"array length ".concat(e.length," expected, length ").concat(n.length," found"))];if(e["min-length"]&&n.length<e["min-length"])return[new Jj(o,n,"array length at least ".concat(e["min-length"]," expected, length ").concat(n.length," found"))];var a={type:e.value,values:e.values,minimum:e.minimum,maximum:e.maximum};i.$version<7&&(a.function=e.function),"object"===kj(e.value)&&(a=e.value);for(var u=[],c=0;c<n.length;c++)u=u.concat(s({array:n,arrayIndex:c,value:n[c],valueSpec:a,style:r,styleSpec:i,key:"".concat(o,"[").concat(c,"]")}));return u}function oO(t){var n=t.key,e=t.value,r=t.valueSpec,i=kj(e);if("number"===i&&e!=e&&(i="NaN"),"number"!==i)return[new Jj(n,e,"number expected, ".concat(i," found"))];if("minimum"in r){var o=r.minimum;if("array"===kj(r.minimum)){var s=t.arrayIndex;o=r.minimum[s]}if(e<o)return[new Jj(n,e,"".concat(e," is less than the minimum value ").concat(o))]}if("maximum"in r){var a=r.maximum;if("array"===kj(r.maximum)){var u=t.arrayIndex;a=r.maximum[u]}if(e>a)return[new Jj(n,e,"".concat(e," is greater than the maximum value ").concat(a))]}return[]}function sO(t){var n,e,r,i=t.valueSpec,o=nO(t.value.type),s={},a="categorical"!==o&&void 0===t.value.property,u=!a,c="array"===kj(t.value.stops)&&"array"===kj(t.value.stops[0])&&"object"===kj(t.value.stops[0][0]),f=rO({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new Jj(t.key,t.value,'identity function may not have a "stops" property')];var n=[],e=t.value;n=n.concat(iO({key:t.key,value:e,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===kj(e)&&0===e.length&&n.push(new Jj(t.key,e,"array must have at least one stop"));return n},default:function(t){return kO({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&a&&f.push(new Jj(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||f.push(new Jj(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!xj(t.valueSpec)&&f.push(new Jj(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(u&&!wj(t.valueSpec)?f.push(new Jj(t.key,t.value,"property functions not supported")):a&&!gj(t.valueSpec)&&f.push(new Jj(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!c||void 0!==t.value.property||f.push(new Jj(t.key,t.value,'"property" property is required')),f;function h(t){var n=[],o=t.value,a=t.key;if("array"!==kj(o))return[new Jj(a,o,"array expected, ".concat(kj(o)," found"))];if(2!==o.length)return[new Jj(a,o,"array length 2 expected, length ".concat(o.length," found"))];if(c){if("object"!==kj(o[0]))return[new Jj(a,o,"object expected, ".concat(kj(o[0])," found"))];if(void 0===o[0].zoom)return[new Jj(a,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Jj(a,o,"object stop key must have value")];if(r&&r>nO(o[0].zoom))return[new Jj(a,o[0].zoom,"stop zoom values must appear in ascending order")];nO(o[0].zoom)!==r&&(r=nO(o[0].zoom),e=void 0,s={}),n=n.concat(rO({key:"".concat(a,"[0]"),value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:oO,value:l}}))}else n=n.concat(l({key:"".concat(a,"[0]"),value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return Mj(eO(o[1]))?n.concat([new Jj("".concat(a,"[1]"),o[1],"expressions are not allowed in function stops.")]):n.concat(kO({key:"".concat(a,"[1]"),value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function l(t,r){var a=kj(t.value),u=nO(t.value),c=null!==t.value?t.value:r;if(n){if(a!==n)return[new Jj(t.key,c,"".concat(a," stop domain type must match previous stop domain type ").concat(n))]}else n=a;if("number"!==a&&"string"!==a&&"boolean"!==a)return[new Jj(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==a&&"categorical"!==o){var f="number expected, ".concat(a," found");return wj(i)&&void 0===o&&(f+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Jj(t.key,c,f)]}return"categorical"!==o||"number"!==a||isFinite(u)&&Math.floor(u)===u?"categorical"!==o&&"number"===a&&void 0!==e&&u<e?[new Jj(t.key,c,"stop domain values must appear in ascending order")]:(e=u,"categorical"===o&&u in s?[new Jj(t.key,c,"stop domain values must be unique")]:(s[u]=!0,[])):[new Jj(t.key,c,"integer expected, found ".concat(u))]}}function aO(t){var n=("property"===t.expressionContext?Ej:jj)(eO(t.value),t.valueSpec);if("error"===n.result)return n.value.map((function(n){return new Jj("".concat(t.key).concat(n.key),t.value,n.message)}));var e=n.value.expression||n.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!e.outputDefined())return[new Jj(t.key,t.value,'Invalid data expression for "'.concat(t.propertyKey,'". Output values must be contained as literals within the expression.'))];if("property"===t.expressionContext&&"layout"===t.propertyType&&!wM(e))return[new Jj(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!wM(e))return[new Jj(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!gM(e,["zoom","feature-state"]))return[new Jj(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!bM(e))return[new Jj(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function uO(t){var n=t.key,e=t.value,r=t.valueSpec,i=[];return Array.isArray(r.values)?-1===r.values.indexOf(nO(e))&&i.push(new Jj(n,e,"expected one of [".concat(r.values.join(", "),"], ").concat(JSON.stringify(e)," found"))):-1===Object.keys(r.values).indexOf(nO(e))&&i.push(new Jj(n,e,"expected one of [".concat(Object.keys(r.values).join(", "),"], ").concat(JSON.stringify(e)," found"))),i}function cO(t){return Gj(eO(t.value))?aO(vS({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):fO(t)}function fO(t){var n=t.value,e=t.key;if("array"!==kj(n))return[new Jj(e,n,"array expected, ".concat(kj(n)," found"))];var r,i=t.styleSpec,o=[];if(n.length<1)return[new Jj(e,n,"filter array must have at least 1 element")];switch(o=o.concat(uO({key:"".concat(e,"[0]"),value:n[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),nO(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===nO(n[1])&&o.push(new Jj(e,n,'"$type" cannot be use with operator "'.concat(n[0],'"')));case"==":case"!=":3!==n.length&&o.push(new Jj(e,n,'filter array for operator "'.concat(n[0],'" must have 3 elements')));case"in":case"!in":n.length>=2&&"string"!==(r=kj(n[1]))&&o.push(new Jj("".concat(e,"[1]"),n[1],"string expected, ".concat(r," found")));for(var s=2;s<n.length;s++)r=kj(n[s]),"$type"===nO(n[1])?o=o.concat(uO({key:"".concat(e,"[").concat(s,"]"),value:n[s],valueSpec:i.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==r&&"number"!==r&&"boolean"!==r&&o.push(new Jj("".concat(e,"[").concat(s,"]"),n[s],"string, number, or boolean expected, ".concat(r," found")));break;case"any":case"all":case"none":for(var a=1;a<n.length;a++)o=o.concat(fO({key:"".concat(e,"[").concat(a,"]"),value:n[a],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":r=kj(n[1]),2!==n.length?o.push(new Jj(e,n,'filter array for "'.concat(n[0],'" operator must have 2 elements'))):"string"!==r&&o.push(new Jj("".concat(e,"[1]"),n[1],"string expected, ".concat(r," found")));break;case"within":r=kj(n[1]),2!==n.length?o.push(new Jj(e,n,'filter array for "'.concat(n[0],'" operator must have 2 elements'))):"object"!==r&&o.push(new Jj("".concat(e,"[1]"),n[1],"object expected, ".concat(r," found")))}return o}function hO(t,n){var e=t.key,r=t.style,i=t.styleSpec,o=t.value,s=t.objectKey,a=i["".concat(n,"_").concat(t.layerType)];if(!a)return[];var u=s.match(/^(.*)-transition$/);if("paint"===n&&u&&a[u[1]]&&a[u[1]].transition)return kO({key:e,value:o,valueSpec:i.transition,style:r,styleSpec:i});var c,f=t.valueSpec||a[s];if(!f)return[new Jj(e,o,'unknown property "'.concat(s,'"'))];if("string"===kj(o)&&wj(f)&&!f.tokens&&(c=/^{([^}]+)}$/.exec(o)))return[new Jj(e,o,'"'.concat(s,'" does not support interpolation syntax\n')+'Use an identity property function instead: `{ "type": "identity", "property": '.concat(JSON.stringify(c[1])," }`."))];var h=[];return"symbol"===t.layerType&&("text-field"===s&&r&&!r.glyphs&&h.push(new Jj(e,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===s&&_j(eO(o))&&"identity"===nO(o.type)&&h.push(new Jj(e,o,'"text-font" does not support identity functions'))),h.concat(kO({key:t.key,value:o,valueSpec:f,style:r,styleSpec:i,expressionContext:"property",propertyType:n,propertyKey:s}))}function lO(t){return hO(t,"paint")}function vO(t){return hO(t,"layout")}function dO(t){var n=[],e=t.value,r=t.key,i=t.style,o=t.styleSpec;e.type||e.ref||n.push(new Jj(r,e,'either "type" or "ref" is required'));var s,a=nO(e.type),u=nO(e.ref);if(e.id)for(var c=nO(e.id),f=0;f<t.arrayIndex;f++){var h=i.layers[f];nO(h.id)===c&&n.push(new Jj(r,e.id,'duplicate layer id "'.concat(e.id,'", previously used at line ').concat(h.id.av)))}if("ref"in e)["type","source","source-layer","filter","layout"].forEach((function(t){t in e&&n.push(new Jj(r,e[t],'"'.concat(t,'" is prohibited for ref layers')))})),i.layers.forEach((function(t){nO(t.id)===u&&(s=t)})),s?s.ref?n.push(new Jj(r,e.ref,"ref cannot reference another ref layer")):a=nO(s.type):n.push(new Jj(r,e.ref,'ref layer "'.concat(u,'" not found')));else if("background"!==a&&"sky"!==a)if(e.source){var l=i.sources&&i.sources[e.source],v=l&&nO(l.type);l?"vector"===v&&"raster"===a?n.push(new Jj(r,e.source,'layer "'.concat(e.id,'" requires a raster source'))):"raster"===v&&"raster"!==a?n.push(new Jj(r,e.source,'layer "'.concat(e.id,'" requires a vector source'))):"vector"!==v||e["source-layer"]?"raster-dem"===v&&"hillshade"!==a?n.push(new Jj(r,e.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==a||!e.paint||!e.paint["line-gradient"]||"geojson"===v&&l.lineMetrics||n.push(new Jj(r,e,'layer "'.concat(e.id,'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.'))):n.push(new Jj(r,e,'layer "'.concat(e.id,'" must specify a "source-layer"'))):n.push(new Jj(r,e.source,'source "'.concat(e.source,'" not found')))}else n.push(new Jj(r,e,'missing required property "source"'));return n=n.concat(rO({key:r,value:e,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return kO({key:"".concat(r,".type"),value:e.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:e,objectKey:"type"})},filter:cO,layout:function(t){return rO({layer:e,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return vO(vS({layerType:a},t))}}})},paint:function(t){return rO({layer:e,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return lO(vS({layerType:a},t))}}})}}}))}function pO(t){var n=t.value,e=t.key,r=kj(n);return"string"!==r?[new Jj(e,n,"string expected, ".concat(r," found"))]:[]}var yO={promoteId:function(t){var n=t.key,e=t.value;if("string"===kj(e))return pO({key:n,value:e});var r=[];for(var i in e)r.push.apply(r,k_(pO({key:"".concat(n,".").concat(i),value:e[i]})));return r}};function mO(t){var n=t.value,e=t.key,r=t.styleSpec,i=t.style;if(!n.type)return[new Jj(e,n,'"type" is required')];var o,s=nO(n.type);switch(s){case"vector":case"raster":case"raster-dem":return o=rO({key:e,value:n,valueSpec:r["source_".concat(s.replace("-","_"))],style:t.style,styleSpec:r,objectElementValidators:yO});case"geojson":if(o=rO({key:e,value:n,valueSpec:r.source_geojson,style:i,styleSpec:r,objectElementValidators:yO}),n.cluster)for(var a in n.clusterProperties){var u,c,f=S_(n.clusterProperties[a],2),h=f[0],l=f[1],v="string"==typeof h?[h,["accumulated"],["get",a]]:h;(u=o).push.apply(u,k_(aO({key:"".concat(e,".").concat(a,".map"),value:l,expressionContext:"cluster-map"}))),(c=o).push.apply(c,k_(aO({key:"".concat(e,".").concat(a,".reduce"),value:v,expressionContext:"cluster-reduce"})))}return o;case"video":return rO({key:e,value:n,valueSpec:r.source_video,style:i,styleSpec:r});case"image":return rO({key:e,value:n,valueSpec:r.source_image,style:i,styleSpec:r});case"canvas":return[new Jj(e,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return uO({key:"".concat(e,".type"),value:n.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,styleSpec:r})}}function bO(t){var n=t.value,e=t.styleSpec,r=e.light,i=t.style,o=[],s=kj(n);if(void 0===n)return o;if("object"!==s)return o=o.concat([new Jj("light",n,"object expected, ".concat(s," found"))]);for(var a in n){var u=a.match(/^(.*)-transition$/);o=u&&r[u[1]]&&r[u[1]].transition?o.concat(kO({key:a,value:n[a],valueSpec:e.transition,style:i,styleSpec:e})):r[a]?o.concat(kO({key:a,value:n[a],valueSpec:r[a],style:i,styleSpec:e})):o.concat([new Jj(a,n[a],'unknown property "'.concat(a,'"'))])}return o}function wO(t){var n=t.value,e=t.key,r=t.style,i=t.styleSpec,o=i.terrain,s=[],a=kj(n);if(void 0===n)return s;if("object"!==a)return s=s.concat([new Jj("terrain",n,"object expected, ".concat(a," found"))]);for(var u in n){var c=u.match(/^(.*)-transition$/);s=c&&o[c[1]]&&o[c[1]].transition?s.concat(kO({key:u,value:n[u],valueSpec:i.transition,style:r,styleSpec:i})):o[u]?s.concat(kO({key:u,value:n[u],valueSpec:o[u],style:r,styleSpec:i})):s.concat([new Jj(u,n[u],'unknown property "'.concat(u,'"'))])}if(n.source){var f=r.sources&&r.sources[n.source],h=f&&nO(f.type);f?"raster-dem"!==h&&s.push(new Jj(e,n.source,"terrain cannot be used with a source of type ".concat(h,', it only be used with a "raster-dem" source type'))):s.push(new Jj(e,n.source,'source "'.concat(n.source,'" not found')))}else s.push(new Jj(e,n,'terrain is missing required property "source"'));return s}function gO(t){var n=t.value,e=t.style,r=t.styleSpec,i=r.fog,o=[],s=kj(n);if(void 0===n)return o;if("object"!==s)return o=o.concat([new Jj("fog",n,"object expected, ".concat(s," found"))]);for(var a in n){var u=a.match(/^(.*)-transition$/);o=u&&i[u[1]]&&i[u[1]].transition?o.concat(kO({key:a,value:n[a],valueSpec:r.transition,style:e,styleSpec:r})):i[a]?o.concat(kO({key:a,value:n[a],valueSpec:i[a],style:e,styleSpec:r})):o.concat([new Jj(a,n[a],'unknown property "'.concat(a,'"'))])}return o}var xO={"*":function(){return[]},array:iO,boolean:function(t){var n=t.value,e=t.key,r=kj(n);return"boolean"!==r?[new Jj(e,n,"boolean expected, ".concat(r," found"))]:[]},number:oO,color:function(t){var n=t.key,e=t.value,r=kj(e);return"string"!==r?[new Jj(n,e,"color expected, ".concat(r," found"))]:null===RS.parseCSSColor(e)?[new Jj(n,e,'color expected, "'.concat(e,'" found'))]:[]},constants:tO,enum:uO,filter:cO,function:sO,layer:dO,object:rO,source:mO,light:bO,terrain:wO,fog:gO,string:pO,formatted:function(t){return 0===pO(t).length?[]:aO(t)},resolvedImage:function(t){return 0===pO(t).length?[]:aO(t)}};function kO(t){var n=t.value,e=t.valueSpec,r=t.styleSpec;return e.expression&&_j(nO(n))?sO(t):e.expression&&Mj(eO(n))?aO(t):e.type&&xO[e.type]?xO[e.type](t):rO(vS({},t,{valueSpec:e.type?r[e.type]:e}))}function _O(t){var n=t.value,e=t.key,r=pO(t);return r.length||(-1===n.indexOf("{fontstack}")&&r.push(new Jj(e,n,'"glyphs" url must include a "{fontstack}" token')),-1===n.indexOf("{range}")&&r.push(new Jj(e,n,'"glyphs" url must include a "{range}" token'))),r}function SO(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G_,e=[];return e=e.concat(kO({key:"",value:t,valueSpec:n.$root,styleSpec:n,style:t,objectElementValidators:{glyphs:_O,"*":function(){return[]}}})),t.constants&&(e=e.concat(tO({key:"constants",value:t.constants,style:t,styleSpec:n}))),MO(e)}function MO(t){return[].concat(t).sort((function(t,n){return t.line-n.line}))}function jO(t){return function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];return MO(t.apply(this,e))}}SO.source=jO(mO),SO.light=jO(bO),SO.terrain=jO(wO),SO.fog=jO(gO),SO.layer=jO(dO),SO.filter=jO(cO),SO.paintProperty=jO(lO),SO.layoutProperty=jO(vO);var OO=B_((function(t,n){var e=function(){var t=function(t,n,e,r){for(e=e||{},r=t.length;r--;e[t[r]]=n);return e},n=[1,12],e=[1,13],r=[1,9],i=[1,10],o=[1,11],s=[1,14],a=[1,15],u=[14,18,22,24],c=[18,22],f=[22,24],h={trace:function(){},yy:{},uv:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},cv:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},fv:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(t,n,e,r,i,o,s){var a=o.length-1;switch(i){case 1:this.$=new String(t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.av=this._$.first_line;break;case 2:this.$=new Number(t),this.$.av=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.av=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.av=this._$.first_line;break;case 6:return this.$=o[a-1];case 13:this.$={},Object.defineProperty(this.$,"av",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=o[a-1],Object.defineProperty(this.$,"av",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[o[a-2],o[a]];break;case 16:this.$={},this.$[o[a][0]]=o[a][1];break;case 17:this.$=o[a-2],o[a-2][o[a][0]]=o[a][1];break;case 18:this.$=[],Object.defineProperty(this.$,"av",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[o[a]];break;case 21:this.$=o[a-2],o[a-2].push(o[a])}},table:[{3:5,4:n,5:6,6:e,7:3,8:r,9:4,10:i,11:o,12:1,13:2,15:7,16:8,17:s,23:a},{1:[3]},{14:[1,16]},t(u,[2,7]),t(u,[2,8]),t(u,[2,9]),t(u,[2,10]),t(u,[2,11]),t(u,[2,12]),t(u,[2,3]),t(u,[2,4]),t(u,[2,5]),t([14,18,21,22,24],[2,1]),t(u,[2,2]),{3:20,4:n,18:[1,17],19:18,20:19},{3:5,4:n,5:6,6:e,7:3,8:r,9:4,10:i,11:o,13:23,15:7,16:8,17:s,23:a,24:[1,21],25:22},{1:[2,6]},t(u,[2,13]),{18:[1,24],22:[1,25]},t(c,[2,16]),{21:[1,26]},t(u,[2,18]),{22:[1,28],24:[1,27]},t(f,[2,20]),t(u,[2,14]),{3:20,4:n,20:29},{3:5,4:n,5:6,6:e,7:3,8:r,9:4,10:i,11:o,13:30,15:7,16:8,17:s,23:a},t(u,[2,19]),{3:5,4:n,5:6,6:e,7:3,8:r,9:4,10:i,11:o,13:31,15:7,16:8,17:s,23:a},t(c,[2,17]),t(c,[2,15]),t(f,[2,21])],defaultActions:{16:[2,6]},parseError:function(t,n){if(!n.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var n=this,e=[0],r=[null],i=[],o=this.table,s="",a=0,u=0,c=2,f=1,h=i.slice.call(arguments,1),l=Object.create(this.lexer),v={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(v.yy[d]=this.yy[d]);l.setInput(t,v.yy),v.yy.lexer=l,v.yy.parser=this,void 0===l.yylloc&&(l.yylloc={});var p=l.yylloc;i.push(p);var y=l.options&&l.options.ranges;function m(){var t;return"number"!=typeof(t=l.lex()||f)&&(t=n.uv[t]||t),t}"function"==typeof v.yy.parseError?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,w,g,x,k,_,S,M,j={};;){if(w=e[e.length-1],this.defaultActions[w]?g=this.defaultActions[w]:(null==b&&(b=m()),g=o[w]&&o[w][b]),void 0===g||!g.length||!g[0]){var O="";for(k in M=[],o[w])this.cv[k]&&k>c&&M.push("'"+this.cv[k]+"'");O=l.showPosition?"Parse error on line "+(a+1)+":\n"+l.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.cv[b]||b)+"'":"Parse error on line "+(a+1)+": Unexpected "+(b==f?"end of input":"'"+(this.cv[b]||b)+"'"),this.parseError(O,{text:l.match,token:this.cv[b]||b,line:l.yylineno,loc:p,expected:M})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(g[0]){case 1:e.push(b),r.push(l.yytext),i.push(l.yylloc),e.push(g[1]),b=null,u=l.yyleng,s=l.yytext,a=l.yylineno,p=l.yylloc;break;case 2:if(_=this.fv[g[1]][1],j.$=r[r.length-_],j._$={first_line:i[i.length-(_||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(_||1)].first_column,last_column:i[i.length-1].last_column},y&&(j._$.range=[i[i.length-(_||1)].range[0],i[i.length-1].range[1]]),void 0!==(x=this.performAction.apply(j,[s,u,a,v.yy,g[1],r,i].concat(h))))return x;_&&(e=e.slice(0,-1*_*2),r=r.slice(0,-1*_),i=i.slice(0,-1*_)),e.push(this.fv[g[1]][0]),r.push(j.$),i.push(j._$),S=o[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,n,e,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((e=this._input.match(this.rules[i[o]]))&&(!n||e[0].length>n[0].length)){if(n=e,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,i[o])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,n,e,r){switch(e){case 0:break;case 1:return 6;case 2:return n.yytext=n.yytext.substr(1,n.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function v(){this.yy={}}return h.lexer=l,v.prototype=h,h.Parser=v,new v}();n.parser=e,n.Parser=e.Parser,n.parse=function(){return e.parse.apply(e,arguments)}}));function TO(t){if(t instanceof String||"string"==typeof t||t instanceof Buffer)try{return OO.parse(t.toString())}catch(t){throw new Qj(t)}return t}function EO(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G_,e=t;try{e=TO(e)}catch(t){return[t]}return SO(e,n)}new Set(["vector","raster","raster-dem"]);var AO=Mj,CO=Ej,RO=Rj,IO=_j;EO.parsed=EO,EO.latest=EO;var PO="function"==typeof Object.assign?Object.assign:function(t,n){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1,i=arguments.length;r<i;++r){var o=arguments[r];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(e[s]=o[s])}return e};function DO(t){return t*Math.PI/180}var NO=function(){for(var t=[],n=78271.51696402048;t.length<=24;n/=2)t.push(n);return t}();function zO(t,n){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,n);var e=document.createElement("canvas");return e.width=t,e.height=n,e}var LO,FO=Array(256).join("");function GO(t,n){if(n>=.05){for(var e="",r=t.split("\n"),i=FO.slice(0,Math.round(n/.1)),o=0,s=r.length;o<s;++o)o>0&&(e+="\n"),e+=r[o].split("").join(i);return e}return t}function UO(){return LO||(LO=zO(1,1).getContext("2d")),LO}function BO(t,n){return UO().measureText(t).width+(t.length-1)*n}var qO={};function $O(t,n,e,r){if(-1!==t.indexOf("\n")){for(var i=t.split("\n"),o=[],s=0,a=i.length;s<a;++s)o.push($O(i[s],n,e,r));return o.join("\n")}var u=e+","+n+","+t+","+r,c=qO[u];if(!c){var f=t.split(" ");if(f.length>1){var h=UO();h.font=n;var l=h.measureText("M").width*e,v="";for(o=[],s=0,a=f.length;s<a;++s){var d=f[s],p=v+(v?" ":"")+d;BO(p,r)<=l?v=p:(v&&o.push(v),v=d)}v&&o.push(v);for(s=0,a=o.length;s<a&&a>1;++s){var y=o[s];if(BO(y,r)<.35*l){var m=s>0?BO(o[s-1],r):1/0,b=s<a-1?BO(o[s+1],r):1/0;o.splice(s,1),a-=1,m<b?(o[s-1]+=" "+y,s-=1):o[s]=y+" "+o[s]}}for(s=0,a=o.length-1;s<a;++s){var w=o[s],g=o[s+1];if(BO(w,r)>.7*l&&BO(g,r)<.6*l){var x=w.split(" "),k=x.pop();BO(k,r)<.2*l&&(o[s]=x.join(" "),o[s+1]=k+" "+g),a-=1}}c=o.join("\n")}else c=t;c=GO(c,r),qO[u]=c}return c}qs&&X(qs,z,(function(){qO={}}));var VO,ZO,WO=IO,HO=RO,KO=AO,XO=CO,YO={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},JO={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},QO={},tT={zoom:0};function nT(t,n,e,r,i,o){var s=t.id;o||(o={},console.warn("No functionCache provided to getValue()")),o[s]||(o[s]={});var a=o[s];if(!a[e]){var u=(t[n]||QO)[e],c=G_["".concat(n,"_").concat(t.type)][e];void 0===u&&(u=c.default);var f=KO(u);if(!f&&WO(u)&&(u=HO(u,c),f=!0),f){var h=function(t,n){var e=XO(t,n);if("error"===e.result)throw new Error(e.value.map((function(t){return"".concat(t.key,": ").concat(t.message)})).join(", "));return e.value}(u,c);a[e]=h.evaluate.bind(h)}else"color"==c.type&&(u=IS.parse(u)),a[e]=function(){return u}}return tT.zoom=r,a[e](tT,i)}var eT=!1;function rT(t,n){if(t){if(!eT&&(0===t.a||0===n))return;var e=t.a;return n=void 0===n?1:n,0===e?"transparent":"rgba("+Math.round(255*t.r/e)+","+Math.round(255*t.g/e)+","+Math.round(255*t.b/e)+","+e*n+")"}return t}var iT=/^([^]*)\{(.*)\}([^]*)$/;function oT(t,n){var e;do{if(e=t.match(iT)){var r=n[e[2]]||"";t=e[1]+r+e[3]}}while(e);return t}var sT=!1;function aT(t,n,e,r,i,o,s){if(void 0===r&&(r=NO),"string"==typeof n&&(n=JSON.parse(n)),8!=n.version)throw new Error("glStyle version 8 required.");var a,u;if(o)if("undefined"!=typeof Image){var c=new Image;c.crossOrigin="anonymous",c.onload=function(){a=c,u=[c.width,c.height],t.changed(),c.onload=null},c.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var f=self;f.postMessage({action:"loadImage",src:o}),f.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===o&&(a=t.data.image,u=[a.width,a.height])}))}for(var h,l=function(t){t=t.slice();for(var n=Object.create(null),e=0;e<t.length;e++)n[t[e].id]=t[e];for(var r=0;r<t.length;r++)"ref"in t[r]&&(t[r]=Yj(t[r],n[t[r].ref]));return t}(n.layers),v={},d=[],p={},y={},m={},b={},w=0,g=l.length;w<g;++w){var x=l[w],k=x.id;if("string"==typeof e&&x.source==e||-1!==e.indexOf(k)){var _=x["source-layer"];if(!h){h=x.source;var S=n.sources[h];if(!S)throw new Error('Source "'.concat(h,'" is not defined'));var M=S.type;if("vector"!==M&&"geojson"!==M)throw new Error('Source "'.concat(h,'" is not of type "vector" or "geojson", but "').concat(M,'"'))}var j=v[_];j||(j=[],v[_]=j),j.push({layer:x,index:w}),d.push(k)}}var O=new Lv,T=new Sv,E=[],A=function(t,n){var e=t.getProperties(),o=v[e.layer];if(o){var c=r.indexOf(n);-1==c&&(c=function(t,n){for(var e=0,r=n.length;e<r;++e)if(n[e]<t&&e+1<r){var i=n[e]/n[e+1];return e+Math.log(n[e]/t)/Math.log(i)}return r-1}(n,r));for(var f,h=YO[t.getGeometry().getType()],l={properties:e,type:h},d=-1,w=function(r,v){var w=o[r],g=w.layer,x=g.id,k=g.layout||QO,_=g.paint||QO;if("none"===k.visibility||"minzoom"in g&&c<g.minzoom||"maxzoom"in g&&c>=g.maxzoom)return"continue";var S=g.filter;if(!S||function(t,n,e,r,i){return i||console.warn("No filterCache provided to evaluateFilter()"),t in i||(i[t]=Bj(n).filter),tT.zoom=r,i[t](tT,e)}(x,S,l,c,b)){f=g;var M=void 0,j=void 0,A=void 0,C=void 0,R=void 0,I=void 0,P=w.index;if(3==h&&("fill"==g.type||"fill-extrusion"==g.type))if(j=nT(g,"paint",g.type+"-opacity",c,l,m),g.type+"-pattern"in _){var D=nT(g,"paint",g.type+"-pattern",c,l,m);if(D){var N="string"==typeof D?oT(D,e):D.toString();if(a&&i&&i[N]){++d,(I=E[d])&&I.getFill()&&!I.getStroke()&&!I.getText()||(I=new Zv({fill:new Sv}),E[d]=I),A=I.getFill(),I.setZIndex(P);var z=y[vt=N+"."+j];if(!z){var L=zO((dt=i[N]).width,dt.height),F=L.getContext("2d");F.globalAlpha=j,F.drawImage(a,dt.x,dt.y,dt.width,dt.height,0,0,dt.width,dt.height),z=F.createPattern(L,"repeat"),y[vt]=z}A.setColor(z)}}}else(M=rT(nT(g,"paint",g.type+"-color",c,l,m),j))&&(g.type+"-outline-color"in _&&(R=rT(nT(g,"paint",g.type+"-outline-color",c,l,m),j)),R||(R=M),++d,(I=E[d])&&I.getFill()&&I.getStroke()&&!I.getText()||(I=new Zv({fill:new Sv,stroke:new Lv}),E[d]=I),(A=I.getFill()).setColor(M),(C=I.getStroke()).setColor(R),C.setWidth(.5),I.setZIndex(P));if(1!=h&&"line"==g.type){M=!("line-pattern"in _)&&"line-color"in _?rT(nT(g,"paint","line-color",c,l,m),nT(g,"paint","line-opacity",c,l,m)):void 0;var G=nT(g,"paint","line-width",c,l,m);M&&G>0&&(++d,(I=E[d])&&I.getStroke()&&!I.getFill()&&!I.getText()||(I=new Zv({stroke:new Lv}),E[d]=I),(C=I.getStroke()).setLineCap(nT(g,"layout","line-cap",c,l,m)),C.setLineJoin(nT(g,"layout","line-join",c,l,m)),C.setMiterLimit(nT(g,"layout","line-miter-limit",c,l,m)),C.setColor(M),C.setWidth(G),C.setLineDash(_["line-dasharray"]?nT(g,"paint","line-dasharray",c,l,m).map((function(t){return t*G})):null),I.setZIndex(P))}var U=!1,B=null,q=0,$=void 0,V=void 0,Z=void 0;if((1==h||2==h)&&"icon-image"in k){var W=nT(g,"layout","icon-image",c,l,m);if(W){$="string"==typeof W?oT(W,e):W.toString();var H=void 0;if(a&&i&&i[$]){var K=nT(g,"layout","icon-rotation-alignment",c,l,m);if(2==h){var X=t.getGeometry();if(X.getFlatMidpoint||X.getFlatMidpoints){var Y=X.getExtent();if(Math.sqrt(Math.max(Math.pow((Y[2]-Y[0])/n,2),Math.pow((Y[3]-Y[1])/n,2)))>150){var J="MultiLineString"===X.getType()?X.getFlatMidpoints():X.getFlatMidpoint();if(ZO||(ZO=new Ek("Point",VO=[NaN,NaN],[],{},null)),H=ZO,VO[0]=J[0],VO[1]=J[1],"line"===(At=nT(g,"layout","symbol-placement",c,l,m))&&"map"===K)for(var Q=X.getStride(),tt=X.getFlatCoordinates(),nt=0,et=tt.length-Q;nt<et;nt+=Q){var rt=tt[nt],it=tt[nt+1],ot=tt[nt+Q],st=tt[nt+Q+1],at=Math.min(rt,ot),ut=Math.min(it,st),ct=Math.max(rt,ot),ft=Math.max(it,st);if(J[0]>=at&&J[0]<=ct&&J[1]>=ut&&J[1]<=ft){q=Math.atan2(it-st,ot-rt);break}}}}}if(2!==h||H){var ht=nT(g,"layout","icon-size",c,l,m),lt=void 0!==_["icon-color"]?nT(g,"paint","icon-color",c,l,m):null;if(!lt||0!==lt.a){var vt=$+"."+ht;if(null!==lt&&(vt+="."+lt),!(V=p[vt])){var dt=i[$];V=new zv({color:lt?[255*lt.r,255*lt.g,255*lt.b,lt.a]:void 0,img:a,imgSize:u,size:[dt.width,dt.height],offset:[dt.x,dt.y],rotateWithView:"map"===K,scale:ht/dt.pixelRatio}),p[vt]=V}}V&&(++d,(I=E[d])&&I.getImage()&&!I.getFill()&&!I.getStroke()||(I=new Zv,E[d]=I),I.setGeometry(H),V.setRotation(q+DO(nT(g,"layout","icon-rotate",c,l,m))),V.setOpacity(nT(g,"paint","icon-opacity",c,l,m)),V.setAnchor(JO[nT(g,"layout","icon-anchor",c,l,m)]),I.setImage(V),B=I.getText(),I.setText(void 0),I.setZIndex(P),U=!0,Z=!1)}else Z=!0}}}if(1==h&&"circle-radius"in _){++d,(I=E[d])&&I.getImage()&&!I.getFill()&&!I.getStroke()||(I=new Zv,E[d]=I);var pt=nT(g,"paint","circle-radius",c,l,m),yt=rT(nT(g,"paint","circle-stroke-color",c,l,m),nT(g,"paint","circle-stroke-opacity",c,l,m)),mt=rT(nT(g,"paint","circle-color",c,l,m),nT(g,"paint","circle-opacity",c,l,m)),bt=nT(g,"paint","circle-stroke-width",c,l,m),wt=pt+"."+yt+"."+mt+"."+bt;(V=p[wt])||(V=new _v({radius:pt,stroke:yt&&bt>0?new Lv({width:bt,color:yt}):void 0,fill:mt?new Sv({color:mt}):void 0}),p[wt]=V),I.setImage(V),B=I.getText(),I.setText(void 0),I.setGeometry(void 0),I.setZIndex(P),U=!0}var gt=void 0;if("text-field"in k)gt=oT(nT(g,"layout","text-field",c,l,m).toString(),e).trim(),j=nT(g,"paint","text-opacity",c,l,m);if(gt&&j&&!Z){U||(++d,(I=E[d])&&I.getText()&&!I.getFill()&&!I.getStroke()||(I=new Zv,E[d]=I),I.setImage(void 0),I.setGeometry(void 0)),I.getText()||I.setText(B||new Kv({padding:[2,2,2,2]})),B=I.getText();var xt=Math.round(nT(g,"layout","text-size",c,l,m)),kt=nT(g,"layout","text-font",c,l,m),_t=nT(g,"layout","text-line-height",c,l,m),St=x_(s?s(kt):kt,xt,_t),Mt=k["text-transform"];"uppercase"==Mt?gt=gt.toUpperCase():"lowercase"==Mt&&(gt=gt.toLowerCase());var jt=nT(g,"layout","text-max-width",c,l,m),Ot=nT(g,"layout","text-letter-spacing",c,l,m),Tt=2==h?GO(gt,Ot):$O(gt,St,jt,Ot);B.setText(Tt),B.setFont(St),B.setRotation(DO(nT(g,"layout","text-rotate",c,l,m)));var Et=nT(g,"layout","text-anchor",c,l,m),At=U||1==h?"point":nT(g,"layout","symbol-placement",c,l,m);B.setPlacement(At);var Ct=nT(g,"paint","text-halo-width",c,l,m),Rt=nT(g,"layout","text-offset",c,l,m),It=nT(g,"paint","text-translate",c,l,m),Pt=0,Dt=0;if("point"==At){var Nt="center";-1!==Et.indexOf("left")?(Nt="left",Dt=Ct):-1!==Et.indexOf("right")&&(Nt="right",Dt=-Ct),B.setTextAlign(Nt);var zt=nT(g,"layout","text-rotation-alignment",c,l,m);B.setRotateWithView("map"==zt)}else B.setMaxAngle(DO(nT(g,"layout","text-max-angle",c,l,m))*gt.length/Tt.length),B.setTextAlign(),B.setRotateWithView(!1);var Lt="middle";0==Et.indexOf("bottom")?(Lt="bottom",Pt=-Ct-.5*(_t-1)*xt):0==Et.indexOf("top")&&(Lt="top",Pt=Ct+.5*(_t-1)*xt),B.setTextBaseline(Lt),B.setOffsetX(Rt[0]*xt+Dt+It[0]),B.setOffsetY(Rt[1]*xt+Pt+It[1]),T.setColor(rT(nT(g,"paint","text-color",c,l,m),j)),B.setFill(T);var Ft=rT(nT(g,"paint","text-halo-color",c,l,m),j);if(Ft){O.setColor(Ft),Ct*=2;var Gt=.5*xt;O.setWidth(Ct<=Gt?Ct:Gt),B.setStroke(O)}else B.setStroke(void 0);var Ut=nT(g,"layout","text-padding",c,l,m),Bt=B.getPadding();Ut!==Bt[0]&&(Bt[0]=Ut,Bt[1]=Ut,Bt[2]=Ut,Bt[3]=Ut),I.setZIndex(P)}}},g=0,x=o.length;g<x;++g)w(g);return d>-1?(E.length=d+1,sT&&("function"==typeof t.set?t.set("mapbox-layer",f):t.getProperties()["mapbox-layer"]=f),E):void 0}};return t.setStyle(A),t.set("mapbox-source",h),t.set("mapbox-layers",d),A}var uT=e(8338);function cT(t){return(cT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var fT,hT={},lT=/font-family: ?([^;]*);/,vT=/("|')/g;function dT(t){if(!fT){fT={};for(var n=document.styleSheets,e=0,r=n.length;e<r;++e){var i=n[e];try{var o=i.rules||i.cssRules;if(o)for(var s=0,a=o.length;s<a;++s){var u=o[s];if(5==u.type){var c=u.cssText.match(lT);fT[c[1].replace(vT,"")]=!0}}}catch(t){}}}return t in fT}var pT={},yT=uT.getNames();function mT(t){var n=t.toString();if(n in pT)return t;for(var e=t.map((function(t){var n=x_(t,1).split(" ");return[n.slice(3).join(" ").replace(/"/g,""),n[1]+n[0]]})),r=0,i=e.length;r<i;++r){var o=e[r],s=o[0];if(!dT(s)&&-1!==yT.indexOf(s)){var a="https://fonts.googleapis.com/css?family="+s.replace(/ /g,"+")+":"+o[1];if(!document.querySelector('link[href="'+a+'"]')){var u=document.createElement("link");u.href=a,u.rel="stylesheet",document.head.appendChild(u)}}}return pT[n]=!0,t}var bT=/^(.*)(\?.*)$/;function wT(t,n){return n&&0===t.indexOf(".")&&(t=n+t),t}function gT(t,n,e){var r=(t=wT(t,n)).match(bT);return r?r[1]+e+(r.length>2?r[2]:""):t+e}function xT(t,n,e,r,i){return new Promise((function(o,s){if("object"!=cT(n)&&(n=JSON.parse(n)),8!=n.version)return s(new Error("glStyle version 8 required."));if(!(t instanceof Ik||t instanceof f_))return s(new Error("Can only apply to VectorLayer or VectorTileLayer"));var a,u,c;function f(){c||n.sprite&&!a?c?(t.setStyle(c),o()):s(new Error("Something went wrong trying to apply style.")):(c=aT(t,n,e,i,a,u,mT),t.getStyle()?o():s(new Error("Nothing to show for source [".concat(e,"]"))))}if(n.sprite){var h=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",l=gT(n.sprite,r,h+".json");fetch(l,{credentials:"same-origin"}).then((function(t){return t.ok||""===h?t:(l=gT(n.sprite,r,".json"),fetch(l,{credentials:"same-origin"}))})).then((function(t){if(t.ok)return t.json();s(new Error("Problem fetching sprite from ".concat(l,": ").concat(t.statusText)))})).then((function(t){if(void 0===t)return s(new Error("No sprites found."));a=t,u=gT(n.sprite,r,h+".png"),f()})).catch((function(t){s(new Error("Sprites cannot be loaded: ".concat(l,": ").concat(t.message)))}))}else f()}))}var kT={};function _T(t,n){var e={id:n.id,type:n.type},r={};function i(i){var o=n.layout||{},s=n.paint||{};e.paint=s;var a,u,c="function"==typeof t.getSource?t.getSource().getTileGrid().getZForResolution(i):t.getView().getZoom(),f="function"==typeof t.getTargetElement?t.getTargetElement():void 0;if(void 0!==s["background-color"]&&(a=nT(e,"paint","background-color",c,kT,r),f&&(f.style.background=IS.parse(a).toString())),void 0!==s["background-opacity"]&&(u=nT(e,"paint","background-opacity",c,kT,r),f&&(f.style.opacity=u)),"none"!=o.visibility)return rT(a,u);f&&(f.style.backgroundColor="",f.style.opacity="")}if("function"==typeof t.getTargetElement)t.getTargetElement()&&i(),t.on(["change:resolution","change:target"],i);else{if("function"!=typeof t.setBackground)throw new Error("Unable to apply background.");t.setBackground(i)}}function ST(t){var n=t.bounds;if(n){var e=Sr([n[0],n[1]]),r=Sr([n[2],n[3]]);return[e[0],e[1],r[0],r[1]]}}function MT(t,n){t=PO({},t);var e=[n,JSON.stringify(t)].toString(),r=hT[e];return r||(r=new lx({url:t.tiles?void 0:n,tileJSON:t.tiles?t:void 0}),hT[e]=r),new Promise((function(t){var e=r.on("change",(function(){var i=r.getState();if("ready"===i){var o=r.getTileJSON(),s=Array.isArray(o.tiles)?o.tiles:[o.tiles];if(n)for(var a=0,u=s.length;a<u;++a)s[a]=decodeURI(new URL(s[a],n).href);var c=r.getTileGrid(),f=ST(o),h=o.minzoom||0,l=o.maxzoom||22,v=r.get("ol-source");void 0===v&&(v=new pg({attributions:r.getAttributions(),format:new u_,tileGrid:new qf({origin:c.getOrigin(0),extent:f||c.getExtent(),minZoom:h,resolutions:NO.slice(0,l+1),tileSize:512}),urls:s}),r.set("ol-source",v)),nt(e),t(v)}else"error"===i&&(r.set("ol-source",null),nt(e),t(void 0))}));"ready"===r.getState()&&r.changed()}))}new g_;var jT=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),OT="https://api.mapbox.com";function TT(t){var n="mapbox://";return 0!==t.indexOf(n)?"":t.slice(n.length)}function ET(t,n,e){var r=TT(t);if(!r)return decodeURI(new URL(t,e).href);var i="sprites/";if(0!==r.indexOf(i))throw new Error("unexpected sprites url: "+t);var o=r.slice(i.length);return OT+"/styles/v1/"+o+"/sprite?access_token="+n}function AT(t,n,e){var r=TT(t);if(!r)return decodeURI(new URL(t,e).href);var i="fonts/";if(0!==r.indexOf(i))throw new Error("unexpected fonts url: "+t);var o=r.slice(i.length);return OT+"/fonts/v1/"+o+"/0-255.pbf?access_token="+n}function CT(t,n){var e=TT(t);if(!e)return decodeURI(new URL(t,location.href).href);var r="styles/";if(0!==e.indexOf(r))throw new Error("unexpected style url: "+t);var i=e.slice(r.length);return OT+"/styles/v1/"+i+"?&access_token="+n}function RT(t,n,e,r){var i=new URL(t,r),o=TT(t);return o?"https://{a-d}.tiles.mapbox.com/v4/"+o+"/{z}/{x}/{y}.vector.pbf?access_token="+n:n?(i.searchParams.set(e,n),decodeURI(i.href)):decodeURI(i.href)}var IT=function(t){function n(n){var e=t.call(this,N)||this;return e.error=n,e}return jT(n,t),n}(h),PT="vector",DT=function(t){function n(n){var e=this,r=!("declutter"in n)||n.declutter,i=new pg({state:hs,format:new u_});((e=t.call(this,{source:i,background:n.background,declutter:r,className:n.className,opacity:n.opacity,visible:n.visible,zIndex:n.zIndex,minResolution:n.minResolution,maxResolution:n.maxResolution,minZoom:n.minZoom,maxZoom:n.maxZoom,renderOrder:n.renderOrder,renderBuffer:n.renderBuffer,renderMode:n.renderMode,map:n.map,updateWhileAnimating:n.updateWhileAnimating,updateWhileInteracting:n.updateWhileInteracting,preload:n.preload,useInterimTilesOnError:n.useInterimTilesOnError,properties:n.properties})||this).hv=void 0===n.maxResolution&&void 0===n.minZoom,e.sourceId=n.source,e.layers=n.layers,n.accessToken)?e.accessToken=n.accessToken:new URL(n.styleUrl,location.href).searchParams.forEach((function(t,n){e.accessToken=t,e.lv=n}));return e.fetchStyle(n.styleUrl),e}return jT(n,t),n.prototype.fetchStyle=function(t){var n=this,e=CT(t,this.accessToken);fetch(e).then((function(t){if(!t.ok)throw new Error("unexpected response when fetching style: "+t.status);return t.json()})).then((function(t){n.onStyleLoad(t,e.startsWith("data:")?location.href:e)})).catch((function(t){n.handleError(t)}))},n.prototype.onStyleLoad=function(t,n){var e,r,i=this;if(this.layers){for(var o={},s=0;s<t.layers.length;++s){var a=t.layers[s];a.source&&(o[a.id]=a.source)}var u=void 0;for(s=0;s<this.layers.length;++s){var c=o[this.layers[s]];if(!c)return void this.handleError(new Error("could not find source for "+this.layers[s]));if(u){if(u!==c)return void this.handleError(new Error("layers can only use a single source, found "+u+" and "+c))}else u=c}e=u,r=this.layers}else e=this.sourceId,r=e;r||(e=Object.keys(t.sources)[0],r=e),t.sprite&&(t.sprite=ET(t.sprite,this.accessToken,n)),t.glyphs&&(t.glyphs=AT(t.glyphs,this.accessToken,n));var f=t.sources[e];if(f.type===PT){var h=this.getSource();f.url&&0===f.url.indexOf("mapbox://")?(h.setUrl(RT(f.url,this.accessToken,this.lv,n)),xT(this,t,r).then((function(){i.configureSource(h,t)})).catch((function(t){i.handleError(t)}))):(f.tiles&&(f.tiles=f.tiles.map((function(t){return RT(t,i.accessToken,i.lv,n)}))),MT(f,f.url?RT(f.url,this.accessToken,this.lv,n):void 0).then((function(n){xT(i,t,r).then((function(){i.configureSource(n,t)})).catch((function(e){i.configureSource(n,t),i.handleError(e)}))})))}else this.handleError(new Error("only works for vector sources, found "+f.type))},n.prototype.configureSource=function(t,n){var e,r=this.getSource();if(t!==r&&(r.setAttributions(t.getAttributions()),r.setTileUrlFunction(t.getTileUrlFunction()),r.setTileLoadFunction(t.getTileLoadFunction()),r.tileGrid=t.tileGrid),void 0===this.getBackground()&&(e=this,n.layers.some((function(t){if("background"==t.type)return _T(e,t),!0}))),this.hv){var i=r.getTileGrid();this.setMaxResolution(i.getResolution(i.getMinZoom()))}r.setState(ls)},n.prototype.handleError=function(t){this.dispatchEvent(new IT(t)),this.getSource().setState(vs)},n}(f_),NT=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),zT=function(t){function n(n){var e=this,r=n||{},i=E({},r);return delete i.imageRatio,(e=t.call(this,i)||this).vv=void 0!==r.imageRatio?r.imageRatio:1,e}return NT(n,t),n.prototype.getImageRatio=function(){return this.vv},n.prototype.createRenderer=function(){return new pk(this)},n}(Sx),LT=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),FT=function(t){function n(n){var e=this,r=E({},n);return(e=t.call(this,r)||this).dv=dv(n.style),e.pv=!!n.disableHitDetection,e}return LT(n,t),n.prototype.createRenderer=function(){return new jx(this,{vertexShader:this.dv.builder.getSymbolVertexShader(),fragmentShader:this.dv.builder.getSymbolFragmentShader(),hitVertexShader:!this.pv&&this.dv.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.pv&&this.dv.builder.getSymbolFragmentShader(!0),uniforms:this.dv.uniforms,attributes:this.dv.attributes})},n}(ys),GT=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function UT(t,n){var e="\n attribute vec2 "+El.TEXTURE_COORD+";\n uniform mat4 "+Tl.TILE_TRANSFORM+";\n uniform float "+Tl.DEPTH+";\n\n varying vec2 v_textureCoord;\n\n void main() {\n v_textureCoord = "+El.TEXTURE_COORD+";\n gl_Position = "+Tl.TILE_TRANSFORM+" * vec4("+El.TEXTURE_COORD+", "+Tl.DEPTH+", 1.0);\n }\n ",r={inFragmentShader:!0,variables:[],attributes:[],stringLiteralsMap:{},functions:{},bandCount:n},i=[];if(void 0!==t.color){var o=Jl(r,t.color,Fl);i.push("color = "+o+";")}if(void 0!==t.contrast){var s=Jl(r,t.contrast,zl);i.push("color.rgb = clamp(("+s+" + 1.0) * color.rgb - ("+s+" / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));")}if(void 0!==t.exposure){var a=Jl(r,t.exposure,zl);i.push("color.rgb = clamp(("+a+" + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));")}if(void 0!==t.saturation){var u=Jl(r,t.saturation,zl);i.push("\n float saturation = "+u+" + 1.0;\n float sr = (1.0 - saturation) * 0.2126;\n float sg = (1.0 - saturation) * 0.7152;\n float sb = (1.0 - saturation) * 0.0722;\n mat3 saturationMatrix = mat3(\n sr + saturation, sr, sr,\n sg, sg + saturation, sg,\n sb, sb, sb + saturation\n );\n color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n ")}if(void 0!==t.gamma){var c=Jl(r,t.gamma,zl);i.push("color.rgb = pow(color.rgb, vec3(1.0 / "+c+"));")}if(void 0!==t.brightness){var f=Jl(r,t.brightness,zl);i.push("color.rgb = clamp(color.rgb + "+f+", vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));")}var h={},l=r.variables.length;if(l>1&&!t.variables)throw new Error("Missing variables in style (expected "+r.variables+")");for(var v=function(n){var e=r.variables[n];if(!(e in t.variables))throw new Error("Missing '"+e+"' in style variables");var i=uv(e);h[i]=function(){var n=t.variables[e];return"string"==typeof n&&(n=Xl(r,n)),void 0!==n?n:-9999999}},d=0;d<l;++d)v(d);var p=Object.keys(h).map((function(t){return"uniform float "+t+";"})),y=Math.ceil(n/4);p.push("uniform sampler2D "+Tl.TILE_TEXTURE_ARRAY+"["+y+"];"),r.paletteTextures&&p.push("uniform sampler2D u_paletteTextures["+r.paletteTextures.length+"];");var m=Object.keys(r.functions).map((function(t){return r.functions[t]}));return{vertexShader:e,fragmentShader:"\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n #else\n precision mediump float;\n #endif\n\n varying vec2 v_textureCoord;\n uniform float "+Tl.TRANSITION_ALPHA+";\n uniform float "+Tl.TEXTURE_PIXEL_WIDTH+";\n uniform float "+Tl.TEXTURE_PIXEL_HEIGHT+";\n uniform float "+Tl.RESOLUTION+";\n uniform float "+Tl.ZOOM+";\n\n "+p.join("\n")+"\n\n "+m.join("\n")+"\n\n void main() {\n vec4 color = texture2D("+Tl.TILE_TEXTURE_ARRAY+"[0], v_textureCoord);\n\n "+i.join("\n")+"\n\n if (color.a == 0.0) {\n discard;\n }\n\n gl_FragColor = color;\n gl_FragColor.rgb *= gl_FragColor.a;\n gl_FragColor *= "+Tl.TRANSITION_ALPHA+";\n }",uniforms:h,paletteTextures:r.paletteTextures}}var BT=function(t){function n(n){var e=this,r=n?E({},n):{},i=r.style||{};delete r.style;var o=r.cacheSize;return delete r.cacheSize,(e=t.call(this,r)||this).K=i,e.Jt=o,e.yv=e.K.variables||{},e.addChangeListener(ts,e.mv),e}return GT(n,t),n.prototype.mv=function(){this.setStyle(this.K)},n.prototype.bv=function(){var t=this.getSource();return t&&"bandCount"in t?t.bandCount:4},n.prototype.createRenderer=function(){var t=UT(this.K,this.bv());return new Nl(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.Jt,paletteTextures:t.paletteTextures})},n.prototype.setStyle=function(t){this.K=t;var n=UT(this.K,this.bv());this.getRenderer().reset({vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,uniforms:n.uniforms,paletteTextures:n.paletteTextures}),this.changed()},n.prototype.updateStyleVariables=function(t){E(this.yv,t),this.changed()},n}(Ig);BT.prototype.dispose;var qT=BT,$T=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),VT="addfeatures",ZT=function(t){function n(n,e,r,i){var o=t.call(this,n)||this;return o.features=r,o.file=e,o.projection=i,o}return $T(n,t),n}(h),WT=function(t){function n(n){var e=this,r=n||{};(e=t.call(this,{handleEvent:S})||this).on,e.once,e.un,e.wv=!1,e.gv=[];for(var i=r.formatConstructors?r.formatConstructors:[],o=0,s=i.length;o<s;++o){var a=i[o];"function"==typeof a&&(a=new a),e.gv.push(a),e.wv=e.wv||a.getType()===ef}return e.de=r.projection?mr(r.projection):null,e.xv=null,e.kv=r.source||null,e.target=r.target?r.target:null,e}return $T(n,t),n.prototype._v=function(t,n){var e,r=n.target.result,i=this.getMap(),o=this.de;o||(o=i.getView().getProjection());for(var s=this.gv,a=0,u=s.length;a<u;++a){var c=s[a],f=r;this.wv&&c.getType()!==ef&&(void 0===e&&(e=(new TextDecoder).decode(r)),f=e);var h=this.Sv(c,f,{featureProjection:o});if(h&&h.length>0){this.kv&&(this.kv.clear(),this.kv.addFeatures(h)),this.dispatchEvent(new ZT(VT,t,h,o));break}}},n.prototype.Mv=function(){var t=this.getMap();if(t){var n=this.target?this.target:t.getViewport();this.xv=[X(n,q,this.handleDrop,this),X(n,U,this.handleStop,this),X(n,B,this.handleStop,this),X(n,q,this.handleStop,this)]}},n.prototype.setActive=function(n){!this.getActive()&&n&&this.Mv(),this.getActive()&&!n&&this.jv(),t.prototype.setActive.call(this,n)},n.prototype.setMap=function(n){this.jv(),t.prototype.setMap.call(this,n),this.getActive()&&this.Mv()},n.prototype.Sv=function(t,n,e){try{return t.readFeatures(n,e)}catch(t){return null}},n.prototype.jv=function(){this.xv&&(this.xv.forEach(J),this.xv=null)},n.prototype.handleDrop=function(t){for(var n=t.dataTransfer.files,e=0,r=n.length;e<r;++e){var i=n.item(e),o=new FileReader;o.addEventListener(Z,this._v.bind(this,i)),this.wv?o.readAsArrayBuffer(i):o.readAsText(i)}},n.prototype.handleStop=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},n}(gu),HT=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),KT=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this,r)||this).Hr=r.condition?r.condition:Nu,e.Xr=void 0,e.Ov=void 0,e.Oi=0,e.zr=void 0!==r.duration?r.duration:400,e}return HT(n,t),n.prototype.handleDragEvent=function(t){if(Lu(t)){var n=t.map,e=n.getSize(),r=t.pixel,i=r[0]-e[0]/2,o=e[1]/2-r[1],s=Math.atan2(o,i),a=Math.sqrt(i*i+o*o),u=n.getView();if(void 0!==this.Xr){var c=this.Xr-s;u.adjustRotationInternal(c)}this.Xr=s,void 0!==this.Ov&&u.adjustResolutionInternal(this.Ov/a),void 0!==this.Ov&&(this.Oi=this.Ov/a),this.Ov=a}},n.prototype.handleUpEvent=function(t){if(!Lu(t))return!0;var n=t.map.getView(),e=this.Oi>1?1:-1;return n.endInteraction(this.zr,e),this.Oi=0,!1},n.prototype.handleDownEvent=function(t){return!!Lu(t)&&(!!this.Hr(t)&&(t.map.getView().beginInteraction(),this.Xr=void 0,this.Ov=void 0,!0))},n}(Mu),XT=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),YT=function(t){function n(n,e,r){var i=t.call(this)||this;if(void 0!==r&&void 0===e)i.setFlatCoordinates(r,n);else{var o=e||0;i.setCenterAndRadius(n,o,r)}return i}return XT(n,t),n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,e,r){var i=this.flatCoordinates,o=t-i[0],s=n-i[1],a=o*o+s*s;if(a<r){if(0===a)for(var u=0;u<this.stride;++u)e[u]=i[u];else{var c=this.getRadius()/Math.sqrt(a);e[0]=i[0]+c*o,e[1]=i[1]+c*s;for(u=2;u<this.stride;++u)e[u]=i[u]}return e.length=this.stride,a}return r},n.prototype.containsXY=function(t,n){var e=this.flatCoordinates,r=t-e[0],i=n-e[1];return r*r+i*i<=this.Tv()},n.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},n.prototype.computeExtent=function(t){var n=this.flatCoordinates,e=n[this.stride]-n[0];return An(n[0]-e,n[1]-e,n[0]+e,n[1]+e,t)},n.prototype.getRadius=function(){return Math.sqrt(this.Tv())},n.prototype.Tv=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],n=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+n*n},n.prototype.getType=function(){return It.CIRCLE},n.prototype.intersectsExtent=function(t){if(te(t,this.getExtent())){var n=this.getCenter();return t[0]<=n[0]&&t[2]>=n[0]||(t[1]<=n[1]&&t[3]>=n[1]||Bn(t,this.intersectsCoordinate.bind(this)))}return!1},n.prototype.setCenter=function(t){var n=this.stride,e=this.flatCoordinates[n]-this.flatCoordinates[0],r=t.slice();r[n]=r[0]+e;for(var i=1;i<n;++i)r[n+i]=t[i];this.setFlatCoordinates(this.layout,r),this.changed()},n.prototype.setCenterAndRadius=function(t,n,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var r=this.flatCoordinates,i=oi(r,0,t,this.stride);r[i++]=r[0]+n;for(var o=1,s=this.stride;o<s;++o)r[i++]=r[o];r.length=i,this.changed()},n.prototype.getCoordinates=function(){return null},n.prototype.setCoordinates=function(t,n){},n.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},n.prototype.rotate=function(t,n){var e=this.getCenter(),r=this.getStride();this.setCenter(Br(e,0,e.length,r,t,n,e)),this.changed()},n.prototype.translate=function(t,n){var e=this.getCenter(),r=this.getStride();this.setCenter($r(e,0,e.length,r,t,n,e)),this.changed()},n}(Yr);YT.prototype.transform;var JT=YT,QT=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),tE="Point",nE="LineString",eE="Polygon",rE="Circle",iE="drawstart",oE="drawend",sE="drawabort",aE=function(t){function n(n,e){var r=t.call(this,n)||this;return r.feature=e,r}return QT(n,t),n}(h);var uE=function(t){function n(n){var e=this,r=n;r.stopDown||(r.stopDown=M),(e=t.call(this,r)||this).on,e.once,e.un,e.Ev=!1,e.Av=null,e.Cv,e.Rv,e.Iv,e.Pv=!1,e.kv=n.source?n.source:null,e.zi=n.features?n.features:null,e.Dv=n.snapTolerance?n.snapTolerance:12,e.Wh=n.type,e.yi=function(t){switch(t){case It.POINT:case It.MULTI_POINT:return tE;case It.LINE_STRING:case It.MULTI_LINE_STRING:return nE;case It.POLYGON:case It.MULTI_POLYGON:return eE;case It.CIRCLE:return rE;default:throw new Error("Invalid type: "+t)}}(e.Wh),e.Nv=!!n.stopClick,e.zv=n.minPoints?n.minPoints:e.yi===eE?3:2,e.Lv=e.yi===rE?2:n.maxPoints?n.maxPoints:1/0,e.Fv=n.finishCondition?n.finishCondition:S;var i,o=n.geometryFunction;if(!o){var s,a=e.yi;if(a===rE)o=function(t,n,e){var r=n||new JT([NaN,NaN]),i=Pr(t[0],e),o=ar(i,Pr(t[t.length-1],e));r.setCenterAndRadius(i,Math.sqrt(o));var s=Rr();return s&&r.transform(e,s),r};else a===tE?s=Mi:a===nE?s=Ck:a===eE&&(s=Zi),o=function(t,n,e){return n?a===eE?t[0].length?n.setCoordinates([t[0].concat([t[0][0]])]):n.setCoordinates([]):n.setCoordinates(t):n=new s(t),n}}return e.qa=o,e.Gv=void 0!==n.dragVertexDelay?n.dragVertexDelay:500,e.Uv=null,e.Bv=null,e.qv=null,e.$v=null,e.Vv=null,e.Zv=null,e.Wv=n.clickTolerance?n.clickTolerance*n.clickTolerance:36,e.Hv=new Ik({source:new Ad({useSpatialIndex:!1,wrapX:!!n.wrapX&&n.wrapX}),style:n.style?n.style:(i=$v(),function(t,n){return i[t.getGeometry().getType()]}),updateWhileInteracting:!0}),e.H=n.geometryName,e.Hr=n.condition?n.condition:Du,e.Kv,n.freehand?e.Kv=Cu:e.Kv=n.freehandCondition?n.freehandCondition:Nu,e.addChangeListener(yu,e.Xv),e}return QT(n,t),n.prototype.setMap=function(n){t.prototype.setMap.call(this,n),this.Xv()},n.prototype.getOverlay=function(){return this.Hv},n.prototype.handleEvent=function(n){n.originalEvent.type===L&&n.originalEvent.preventDefault(),this.Pv=this.yi!==tE&&this.Kv(n);var e=n.type===ha.POINTERMOVE,r=!0;!this.Pv&&this.Rv&&n.type===ha.POINTERDRAG&&(Date.now()-this.Rv>=this.Gv?(this.Av=n.pixel,this.Ev=!this.Pv,e=!0):this.Rv=void 0,this.Ev&&void 0!==this.Cv&&(clearTimeout(this.Cv),this.Cv=void 0));return this.Pv&&n.type===ha.POINTERDRAG&&null!==this.Bv?(this.Yv(n.coordinate),r=!1):this.Pv&&n.type===ha.POINTERDOWN?r=!1:e&&this.getPointerCount()<2?(r=n.type===ha.POINTERMOVE)&&this.Pv?(this.Hn(n),this.Ev&&n.originalEvent.preventDefault()):("mouse"===n.originalEvent.pointerType||n.type===ha.POINTERDRAG&&void 0===this.Cv)&&this.Hn(n):n.type===ha.DBLCLICK&&(r=!1),t.prototype.handleEvent.call(this,n)&&r},n.prototype.handleDownEvent=function(t){return this.Ev=!this.Pv,this.Pv?(this.Av=t.pixel,this.Uv||this.Jv(t.coordinate),!0):this.Hr(t)?(this.Rv=Date.now(),this.Cv=setTimeout(function(){this.Hn(new fa(ha.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.Gv),this.Av=t.pixel,!0):(this.Rv=void 0,!1)},n.prototype.handleUpEvent=function(t){var n=!0;if(0===this.getPointerCount())if(this.Cv&&(clearTimeout(this.Cv),this.Cv=void 0),this.Hn(t),this.Ev){var e=!this.Uv;e&&this.Jv(t.coordinate),!e&&this.Pv?this.finishDrawing():this.Pv||e&&this.yi!==tE||(this.Qv(t.pixel)?this.Fv(t)&&this.finishDrawing():this.Yv(t.coordinate)),n=!1}else this.Pv&&this.abortDrawing();return!n&&this.Nv&&t.preventDefault(),n},n.prototype.Hn=function(t){if(this.Iv=t.originalEvent.pointerType,this.Av&&(!this.Pv&&this.Ev||this.Pv&&!this.Ev)){var n=this.Av,e=t.pixel,r=n[0]-e[0],i=n[1]-e[1],o=r*r+i*i;if(this.Ev=this.Pv?o>this.Wv:o<=this.Wv,!this.Ev)return}this.Uv?this.td(t.coordinate):this.ed(t.coordinate.slice())},n.prototype.Qv=function(t){var n=!1;if(this.Bv){var e=!1,r=[this.Uv],i=this.yi;if(i===tE)n=!0;else if(i===rE)n=2===this.$v.length;else if(i===nE)e=this.$v.length>this.zv;else if(i===eE){var o=this.$v;e=o[0].length>this.zv,r=[o[0][0],o[0][o[0].length-2]]}if(e)for(var s=this.getMap(),a=0,u=r.length;a<u;a++){var c=r[a],f=s.getPixelFromCoordinate(c),h=t[0]-f[0],l=t[1]-f[1],v=this.Pv?1:this.Dv;if(n=Math.sqrt(h*h+l*l)<=v){this.Uv=c;break}}}return n},n.prototype.ed=function(t){this.qv?this.qv.getGeometry().setCoordinates(t):(this.qv=new Tt(new Mi(t)),this.rd())},n.prototype.od=function(t){this.Vv||(this.Vv=new Tt);var n=t.getLinearRing(0),e=this.Vv.getGeometry();e?(e.setFlatCoordinates(n.getLayout(),n.getFlatCoordinates()),e.changed()):(e=new Ck(n.getFlatCoordinates(),n.getLayout()),this.Vv.setGeometry(e))},n.prototype.Jv=function(t){var n=this.getMap().getView().getProjection();this.Uv=t,this.yi===tE?this.$v=t.slice():this.yi===eE?(this.$v=[[t.slice(),t.slice()]],this.Zv=this.$v[0]):this.$v=[t.slice(),t.slice()],this.Zv&&(this.Vv=new Tt(new Ck(this.Zv)));var e=this.qa(this.$v,void 0,n);this.Bv=new Tt,this.H&&this.Bv.setGeometryName(this.H),this.Bv.setGeometry(e),this.rd(),this.dispatchEvent(new aE(iE,this.Bv))},n.prototype.td=function(t){var n,e,r=this.getMap(),i=this.Bv.getGeometry(),o=r.getView().getProjection();(this.yi===tE?e=this.$v:this.yi===eE?(e=(n=this.$v[0])[n.length-1],this.Qv(r.getPixelFromCoordinate(t))&&(t=this.Uv.slice())):e=(n=this.$v)[n.length-1],e[0]=t[0],e[1]=t[1],this.qa(this.$v,i,o),this.qv)&&this.qv.getGeometry().setCoordinates(t);if(i.getType()===It.POLYGON&&this.yi!==eE)this.od(i);else if(this.Zv){this.Vv.getGeometry().setCoordinates(this.Zv)}this.rd()},n.prototype.Yv=function(t){var n,e,r=this.Bv.getGeometry(),i=this.getMap().getView().getProjection(),o=this.yi;o===nE||o===rE?(this.Uv=t.slice(),(e=this.$v).length>=this.Lv&&(this.Pv?e.pop():n=!0),e.push(t.slice()),this.qa(e,r,i)):o===eE&&((e=this.$v[0]).length>=this.Lv&&(this.Pv?e.pop():n=!0),e.push(t.slice()),n&&(this.Uv=e[0]),this.qa(this.$v,r,i)),this.ed(t.slice()),this.rd(),n&&this.finishDrawing()},n.prototype.removeLastPoint=function(){if(this.Bv){var t,n=this.Bv.getGeometry(),e=this.getMap().getView().getProjection(),r=this.yi;if(r===nE||r===rE){if((t=this.$v).splice(-2,1),t.length>=2){this.Uv=t[t.length-2].slice();var i=this.Uv.slice();t[t.length-1]=i,this.ed(i)}this.qa(t,n,e),n.getType()===It.POLYGON&&this.Vv&&this.od(n)}else if(r===eE){(t=this.$v[0]).splice(-2,1);var o=this.Vv.getGeometry();if(t.length>=2){i=t[t.length-2].slice();t[t.length-1]=i,this.ed(i)}o.setCoordinates(t),this.qa(this.$v,n,e)}1===t.length&&this.abortDrawing(),this.rd()}},n.prototype.finishDrawing=function(){var t=this.sd();if(t){var n=this.$v,e=t.getGeometry(),r=this.getMap().getView().getProjection();this.yi===nE?(n.pop(),this.qa(n,e,r)):this.yi===eE&&(n[0].pop(),this.qa(n,e,r),n=e.getCoordinates()),this.Wh===It.MULTI_POINT?t.setGeometry(new Qk([n])):this.Wh===It.MULTI_LINE_STRING?t.setGeometry(new Yk([n])):this.Wh===It.MULTI_POLYGON&&t.setGeometry(new n_([n])),this.dispatchEvent(new aE(oE,t)),this.zi&&this.zi.push(t),this.kv&&this.kv.addFeature(t)}},n.prototype.sd=function(){this.Uv=null;var t=this.Bv;return this.Bv=null,this.qv=null,this.Vv=null,this.Hv.getSource().clear(!0),t},n.prototype.abortDrawing=function(){var t=this.sd();t&&this.dispatchEvent(new aE(sE,t))},n.prototype.appendCoordinates=function(t){var n,e=this.yi,r=!this.Bv;if(r&&this.Jv(t[0]),e===nE||e===rE)n=this.$v;else{if(e!==eE)return;n=this.$v&&this.$v.length?this.$v[0]:[]}r&&n.shift(),n.pop();for(var i=0;i<t.length;i++)this.Yv(t[i]);var o=t[t.length-1];this.Yv(o),this.td(o)},n.prototype.extend=function(t){var n=t.getGeometry();this.Bv=t,this.$v=n.getCoordinates();var e=this.$v[this.$v.length-1];this.Uv=e.slice(),this.$v.push(e.slice()),this.qv=new Tt(new Mi(e)),this.rd(),this.dispatchEvent(new aE(iE,this.Bv))},n.prototype.rd=function(){var t=[];this.Bv&&t.push(this.Bv),this.Vv&&t.push(this.Vv),this.qv&&t.push(this.qv);var n=this.Hv.getSource();n.clear(!0),n.addFeatures(t)},n.prototype.Xv=function(){var t=this.getMap(),n=this.getActive();t&&n||this.abortDrawing(),this.Hv.setMap(n?t:null)},n}(Mu),cE=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),fE="extentchanged",hE=function(t){function n(n){var e=t.call(this,fE)||this;return e.extent=n,e}return cE(n,t),n}(h);function lE(){var t=$v();return function(n,e){return t[It.POINT]}}function vE(t){return function(n){return xn([t,n])}}function dE(t,n){return t[0]==n[0]?function(e){return xn([t,[e[0],n[1]]])}:t[1]==n[1]?function(e){return xn([t,[n[0],e[1]]])}:null}var pE=function(t){function n(n){var e,r=this,i=n||{};return(r=t.call(this,i)||this).on,r.once,r.un,r.Hr=i.condition?i.condition:Cu,r.st=null,r.ad=null,r.ud=void 0!==i.pixelTolerance?i.pixelTolerance:10,r.fd=!1,r.hd=null,r.ld=null,n||(n={}),r.vd=new Ik({source:new Ad({useSpatialIndex:!1,wrapX:!!n.wrapX}),style:n.boxStyle?n.boxStyle:(e=$v(),function(t,n){return e[It.POLYGON]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),r.dd=new Ik({source:new Ad({useSpatialIndex:!1,wrapX:!!n.wrapX}),style:n.pointerStyle?n.pointerStyle:lE(),updateWhileAnimating:!0,updateWhileInteracting:!0}),n.extent&&r.setExtent(n.extent),r}return cE(n,t),n.prototype.yd=function(t,n){var e=n.getCoordinateFromPixelInternal(t),r=this.getExtentInternal();if(r){var i=function(t){return[[[t[0],t[1]],[t[0],t[3]]],[[t[0],t[3]],[t[2],t[3]]],[[t[2],t[3]],[t[2],t[1]]],[[t[2],t[1]],[t[0],t[1]]]]}(r);i.sort((function(t,n){return cr(e,t)-cr(e,n)}));var o=i[0],s=nr(e,o),a=n.getPixelFromCoordinateInternal(s);if(ur(t,a)<=this.ud){var u=n.getPixelFromCoordinateInternal(o[0]),c=n.getPixelFromCoordinateInternal(o[1]),f=ar(a,u),h=ar(a,c),l=Math.sqrt(Math.min(f,h));return this.fd=l<=this.ud,this.fd&&(s=f>h?o[1]:o[0]),s}}return null},n.prototype.Hn=function(t){var n=t.pixel,e=t.map,r=this.yd(n,e);r||(r=e.getCoordinateFromPixelInternal(n)),this.md(r)},n.prototype.bd=function(t){var n=this.hd;return n?t?n.setGeometry(Hi(t)):n.setGeometry(void 0):(n=new Tt(t?Hi(t):{}),this.hd=n,this.vd.getSource().addFeature(n)),n},n.prototype.md=function(t){var n=this.ld;n?n.getGeometry().setCoordinates(t):(n=new Tt(new Mi(t)),this.ld=n,this.dd.getSource().addFeature(n));return n},n.prototype.handleEvent=function(n){return!n.originalEvent||!this.Hr(n)||(n.type!=ha.POINTERMOVE||this.handlingDownUpSequence||this.Hn(n),t.prototype.handleEvent.call(this,n),!1)},n.prototype.handleDownEvent=function(t){var n=t.pixel,e=t.map,r=this.getExtentInternal(),i=this.yd(n,e),o=function(t){var n=null,e=null;return t[0]==r[0]?n=r[2]:t[0]==r[2]&&(n=r[0]),t[1]==r[1]?e=r[3]:t[1]==r[3]&&(e=r[1]),null!==n&&null!==e?[n,e]:null};if(i&&r){var s=i[0]==r[0]||i[0]==r[2]?i[0]:null,a=i[1]==r[1]||i[1]==r[3]?i[1]:null;null!==s&&null!==a?this.ad=vE(o(i)):null!==s?this.ad=dE(o([s,r[1]]),o([s,r[3]])):null!==a&&(this.ad=dE(o([r[0],a]),o([r[2],a])))}else i=e.getCoordinateFromPixelInternal(n),this.setExtent([i[0],i[1],i[0],i[1]]),this.ad=vE(i);return!0},n.prototype.handleDragEvent=function(t){if(this.ad){var n=t.coordinate;this.setExtent(this.ad(n)),this.md(n)}},n.prototype.handleUpEvent=function(t){this.ad=null;var n=this.getExtentInternal();return n&&0!==qn(n)||this.setExtent(null),!1},n.prototype.setMap=function(n){this.vd.setMap(n),this.dd.setMap(n),t.prototype.setMap.call(this,n)},n.prototype.getExtent=function(){return Dr(this.getExtentInternal(),this.getMap().getView().getProjection())},n.prototype.getExtentInternal=function(){return this.st},n.prototype.setExtent=function(t){this.st=t||null,this.bd(t),this.dispatchEvent(new hE(this.st))},n}(Mu);function yE(t){return(yE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var mE=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),bE=[0,0,0,0],wE=[],gE="modifystart",xE="modifyend",kE=function(t){function n(n,e,r){var i=t.call(this,n)||this;return i.features=e,i.mapBrowserEvent=r,i}return mE(n,t),n}(h);function _E(t,n){return t.index-n.index}function SE(t,n,e){var r=n.geometry;if(r.getType()===It.CIRCLE){var i=r;if(1===n.index){var o=Rr();o&&(i=i.clone().transform(o,e));var s=ar(i.getCenter(),Pr(t,e)),a=Math.sqrt(s)-i.getRadius();return a*a}}var u=Pr(t,e);return wE[0]=Pr(n.segment[0],e),wE[1]=Pr(n.segment[1],e),cr(u,wE)}function ME(t,n,e){var r=n.geometry;if(r.getType()===It.CIRCLE&&1===n.index){var i=r,o=Rr();return o&&(i=i.clone().transform(o,e)),Ir(i.getClosestPoint(Pr(t,e)),e)}var s=Pr(t,e);return wE[0]=Pr(n.segment[0],e),wE[1]=Pr(n.segment[1],e),Ir(nr(s,wE),e)}var jE=function(t){function n(n){var e,r,i=t.call(this,n)||this;if(i.on,i.once,i.un,i.wd=i.Hu.bind(i),i.Hr=n.condition?n.condition:Fu,i.gd=function(t){return Ou(t)&&Pu(t)},i.xd=n.deleteCondition?n.deleteCondition:i.gd,i.kd=n.insertVertexCondition?n.insertVertexCondition:Cu,i.ld=null,i._d=null,i.Sd=[0,0],i.Md=!1,i.jd=null,i.Od=new Jv,i.ud=void 0!==n.pixelTolerance?n.pixelTolerance:10,i.fd=!1,i.Td=!1,i.Ed=[],i.Hv=new Ik({source:new Ad({useSpatialIndex:!1,wrapX:!!n.wrapX}),style:n.style?n.style:(e=$v(),function(t,n){return e[It.POINT]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),i.Ad={Point:i.Cd.bind(i),LineString:i.Rd.bind(i),LinearRing:i.Rd.bind(i),Polygon:i.Id.bind(i),MultiPoint:i.Pd.bind(i),MultiLineString:i.Dd.bind(i),MultiPolygon:i.Nd.bind(i),Circle:i.zd.bind(i),GeometryCollection:i.Ld.bind(i)},i.kv=null,i.Fd=null,n.features?r=n.features:n.source&&(i.kv=n.source,r=new ht(i.kv.getFeatures()),i.kv.addEventListener(xd,i.Gd.bind(i)),i.kv.addEventListener(Sd,i.Ud.bind(i))),!r)throw new Error("The modify interaction requires features, a source or a layer");return n.hitDetection&&(i.Fd=n.hitDetection),i.zi=r,i.zi.forEach(i.Bd.bind(i)),i.zi.addEventListener(st,i.qd.bind(i)),i.zi.addEventListener(at,i.$d.bind(i)),i.Vd=null,i.Br=[0,0],i.Zd=void 0===n.snapToPointer?!i.Fd:n.snapToPointer,i}return mE(n,t),n.prototype.Bd=function(t){var n=t.getGeometry();if(n){var e=this.Ad[n.getType()];e&&e(t,n)}var r=this.getMap();r&&r.isRendered()&&this.getActive()&&this.Wd(this.Sd,r),t.addEventListener(D,this.wd)},n.prototype.Hd=function(t,n){if(!this.jd){this.jd=new ht;for(var e=this.jd.getArray(),r=0,i=n.length;r<i;++r)for(var o=n[r],s=0,a=o.length;s<a;++s){var u=o[s].feature;u&&-1===e.indexOf(u)&&this.jd.push(u)}0===this.jd.getLength()?this.jd=null:this.dispatchEvent(new kE(gE,this.jd,t))}},n.prototype.Kd=function(t){this.Xd(t),this.ld&&0===this.zi.getLength()&&(this.Hv.getSource().removeFeature(this.ld),this.ld=null),t.removeEventListener(D,this.wd)},n.prototype.Xd=function(t){var n=this.Od,e=[];n.forEach((function(n){t===n.feature&&e.push(n)}));for(var r=e.length-1;r>=0;--r){for(var i=e[r],o=this.Ed.length-1;o>=0;--o)this.Ed[o][0]===i&&this.Ed.splice(o,1);n.remove(i)}},n.prototype.setActive=function(n){this.ld&&!n&&(this.Hv.getSource().removeFeature(this.ld),this.ld=null),t.prototype.setActive.call(this,n)},n.prototype.setMap=function(n){this.Hv.setMap(n),t.prototype.setMap.call(this,n)},n.prototype.getOverlay=function(){return this.Hv},n.prototype.Gd=function(t){t.feature&&this.zi.push(t.feature)},n.prototype.Ud=function(t){t.feature&&this.zi.remove(t.feature)},n.prototype.qd=function(t){this.Bd(t.element)},n.prototype.Hu=function(t){if(!this.Td){var n=t.target;this.Kd(n),this.Bd(n)}},n.prototype.$d=function(t){var n=t.element;this.Kd(n)},n.prototype.Cd=function(t,n){var e=n.getCoordinates(),r={feature:t,geometry:n,segment:[e,e]};this.Od.insert(n.getExtent(),r)},n.prototype.Pd=function(t,n){for(var e=n.getCoordinates(),r=0,i=e.length;r<i;++r){var o=e[r],s={feature:t,geometry:n,depth:[r],index:r,segment:[o,o]};this.Od.insert(n.getExtent(),s)}},n.prototype.Rd=function(t,n){for(var e=n.getCoordinates(),r=0,i=e.length-1;r<i;++r){var o=e.slice(r,r+2),s={feature:t,geometry:n,index:r,segment:o};this.Od.insert(xn(o),s)}},n.prototype.Dd=function(t,n){for(var e=n.getCoordinates(),r=0,i=e.length;r<i;++r)for(var o=e[r],s=0,a=o.length-1;s<a;++s){var u=o.slice(s,s+2),c={feature:t,geometry:n,depth:[r],index:s,segment:u};this.Od.insert(xn(u),c)}},n.prototype.Id=function(t,n){for(var e=n.getCoordinates(),r=0,i=e.length;r<i;++r)for(var o=e[r],s=0,a=o.length-1;s<a;++s){var u=o.slice(s,s+2),c={feature:t,geometry:n,depth:[r],index:s,segment:u};this.Od.insert(xn(u),c)}},n.prototype.Nd=function(t,n){for(var e=n.getCoordinates(),r=0,i=e.length;r<i;++r)for(var o=e[r],s=0,a=o.length;s<a;++s)for(var u=o[s],c=0,f=u.length-1;c<f;++c){var h=u.slice(c,c+2),l={feature:t,geometry:n,depth:[s,r],index:c,segment:h};this.Od.insert(xn(h),l)}},n.prototype.zd=function(t,n){var e=n.getCenter(),r={feature:t,geometry:n,index:0,segment:[e,e]},i={feature:t,geometry:n,index:1,segment:[e,e]},o=[r,i];r.featureSegments=o,i.featureSegments=o,this.Od.insert(Rn(e),r);var s=n,a=Rr();if(a&&this.getMap()){var u=this.getMap().getView().getProjection();s=Ki(s=s.clone().transform(a,u)).transform(u,a)}this.Od.insert(s.getExtent(),i)},n.prototype.Ld=function(t,n){for(var e=n.getGeometriesArray(),r=0;r<e.length;++r){var i=e[r];(0,this.Ad[i.getType()])(t,i)}},n.prototype.Yd=function(t,n,e){var r=this.ld;r?r.getGeometry().setCoordinates(t):(r=new Tt(new Mi(t)),this.ld=r,this.Hv.getSource().addFeature(r));return r.set("features",n),r.set("geometries",e),r},n.prototype.handleEvent=function(n){return!n.originalEvent||(this.Vd=n,n.map.getView().getInteracting()||n.type!=ha.POINTERMOVE||this.handlingDownUpSequence||this.Hn(n),this.ld&&this.xd(n)&&(e=!(n.type!=ha.SINGLECLICK||!this.Md)||this.removePoint()),n.type==ha.SINGLECLICK&&(this.Md=!1),t.prototype.handleEvent.call(this,n)&&!e);var e},n.prototype.handleDragEvent=function(t){this.Md=!1,this.Hd(t,this.Ed);for(var n=[t.coordinate[0]+this.Br[0],t.coordinate[1]+this.Br[1]],e=[],r=[],i=0,o=this.Ed.length;i<o;++i){var s=this.Ed[i],a=s[0],u=a.feature;-1===e.indexOf(u)&&e.push(u);var c=a.geometry;-1===r.indexOf(c)&&r.push(c);for(var f=a.depth,h=void 0,l=a.segment,v=s[1];n.length<c.getStride();)n.push(l[v][n.length]);switch(c.getType()){case It.POINT:h=n,l[0]=n,l[1]=n;break;case It.MULTI_POINT:(h=c.getCoordinates())[a.index]=n,l[0]=n,l[1]=n;break;case It.LINE_STRING:(h=c.getCoordinates())[a.index+v]=n,l[v]=n;break;case It.MULTI_LINE_STRING:case It.POLYGON:(h=c.getCoordinates())[f[0]][a.index+v]=n,l[v]=n;break;case It.MULTI_POLYGON:(h=c.getCoordinates())[f[1]][f[0]][a.index+v]=n,l[v]=n;break;case It.CIRCLE:if(l[0]=n,l[1]=n,0===a.index)this.Td=!0,c.setCenter(n),this.Td=!1;else{this.Td=!0;var d=t.map.getView().getProjection(),p=ur(Pr(c.getCenter(),d),Pr(n,d)),y=Rr();if(y){var m=c.clone().transform(y,d);m.setRadius(p),p=m.transform(d,y).getRadius()}c.setRadius(p),this.Td=!1}}h&&this.Jd(c,h)}this.Yd(n,e,r)},n.prototype.handleDownEvent=function(t){if(!this.Hr(t))return!1;var n=t.coordinate;this.Wd(t.pixel,t.map,n),this.Ed.length=0,this.jd=null;var e=this.ld;if(e){var r=t.map.getView().getProjection(),i=[],s=e.getGeometry().getCoordinates(),a=xn([s]),u=this.Od.getInExtent(a),c={};u.sort(_E);for(var f=0,h=u.length;f<h;++f){var l=u[f],v=l.segment,d=o(l.geometry),p=l.depth;if(p&&(d+="-"+p.join("-")),c[d]||(c[d]=new Array(2)),l.geometry.getType()!==It.CIRCLE||1!==l.index)if(!ir(v[0],s)||c[d][0])if(!ir(v[1],s)||c[d][1])o(v)in this._d&&!c[d][0]&&!c[d][1]&&this.kd(t)&&i.push(l);else{if((l.geometry.getType()===It.LINE_STRING||l.geometry.getType()===It.MULTI_LINE_STRING)&&c[d][0]&&0===c[d][0].index)continue;this.Ed.push([l,1]),c[d][1]=l}else this.Ed.push([l,0]),c[d][0]=l;else ir(ME(n,l,r),s)&&!c[d][0]&&(this.Ed.push([l,0]),c[d][0]=l)}i.length&&this.Hd(t,[i]);for(var y=i.length-1;y>=0;--y)this.Qd(i[y],s)}return!!this.ld},n.prototype.handleUpEvent=function(t){for(var n=this.Ed.length-1;n>=0;--n){var e=this.Ed[n][0],r=e.geometry;if(r.getType()===It.CIRCLE){var i=r.getCenter(),o=e.featureSegments[0],s=e.featureSegments[1];o.segment[0]=i,o.segment[1]=i,s.segment[0]=i,s.segment[1]=i,this.Od.update(Rn(i),o);var a=r,u=Rr();if(u){var c=t.map.getView().getProjection();a=Ki(a=a.clone().transform(u,c)).transform(c,u)}this.Od.update(a.getExtent(),s)}else this.Od.update(xn(e.segment),e)}return this.jd&&(this.dispatchEvent(new kE(xE,this.jd,t)),this.jd=null),!1},n.prototype.Hn=function(t){this.Sd=t.pixel,this.Wd(t.pixel,t.map,t.coordinate)},n.prototype.Wd=function(t,n,e){var r,i,s=this,a=e||n.getCoordinateFromPixel(t),u=n.getView().getProjection();if(this.Fd){var c="object"===yE(this.Fd)?function(t){return t===s.Fd}:void 0;n.forEachFeatureAtPixel(t,(function(t,n,e){if((e=e||t.getGeometry()).getType()===It.POINT&&y(s.zi.getArray(),t)){i=e;var o=e.getFlatCoordinates().slice(0,2);r=[{feature:t,geometry:e,segment:[o,o]}]}return!0}),{layerFilter:c})}if(!r){var f=Dr(kn(Nr(Rn(a,bE),u),n.getView().getResolution()*this.ud,bE),u);r=this.Od.getInExtent(f)}if(r&&r.length>0){var h=r.sort((function(t,n){return SE(a,t,u)-SE(a,n,u)}))[0],l=h.segment,v=ME(a,h,u),d=n.getPixelFromCoordinate(v),p=ur(t,d);if(i||p<=this.ud){var m={};if(m[o(l)]=!0,this.Zd||(this.Br[0]=v[0]-a[0],this.Br[1]=v[1]-a[1]),h.geometry.getType()===It.CIRCLE&&1===h.index)this.fd=!0,this.Yd(v,[h.feature],[h.geometry]);else{var b=n.getPixelFromCoordinate(l[0]),w=n.getPixelFromCoordinate(l[1]),g=ar(d,b),x=ar(d,w);p=Math.sqrt(Math.min(g,x)),this.fd=p<=this.ud,this.fd&&(v=g>x?l[1]:l[0]),this.Yd(v,[h.feature],[h.geometry]);var k={};k[o(h.geometry)]=!0;for(var _=1,S=r.length;_<S;++_){var M=r[_].segment;if(!(ir(l[0],M[0])&&ir(l[1],M[1])||ir(l[0],M[1])&&ir(l[1],M[0])))break;var j=o(r[_].geometry);j in k||(k[j]=!0,m[o(M)]=!0)}}return void(this._d=m)}}this.ld&&(this.Hv.getSource().removeFeature(this.ld),this.ld=null)},n.prototype.Qd=function(t,n){for(var e,r=t.segment,i=t.feature,o=t.geometry,s=t.depth,a=t.index;n.length<o.getStride();)n.push(0);switch(o.getType()){case It.MULTI_LINE_STRING:case It.POLYGON:(e=o.getCoordinates())[s[0]].splice(a+1,0,n);break;case It.MULTI_POLYGON:(e=o.getCoordinates())[s[1]][s[0]].splice(a+1,0,n);break;case It.LINE_STRING:(e=o.getCoordinates()).splice(a+1,0,n);break;default:return}this.Jd(o,e);var u=this.Od;u.remove(t),this.tp(o,a,s,1);var c={segment:[r[0],n],feature:i,geometry:o,depth:s,index:a};u.insert(xn(c.segment),c),this.Ed.push([c,1]);var f={segment:[n,r[1]],feature:i,geometry:o,depth:s,index:a+1};u.insert(xn(f.segment),f),this.Ed.push([f,0]),this.Md=!0},n.prototype.removePoint=function(){if(this.Vd&&this.Vd.type!=ha.POINTERDRAG){var t=this.Vd;this.Hd(t,this.Ed);var n=this.np();return this.jd&&this.dispatchEvent(new kE(xE,this.jd,t)),this.jd=null,n}return!1},n.prototype.np=function(){var t,n,e,r,i,s,a,u,c,f,h,l=this.Ed,v={},d=!1;for(i=l.length-1;i>=0;--i)h=o((f=(e=l[i])[0]).feature),f.depth&&(h+="-"+f.depth.join("-")),h in v||(v[h]={}),0===e[1]?(v[h].right=f,v[h].index=f.index):1==e[1]&&(v[h].left=f,v[h].index=f.index+1);for(h in v){switch(c=v[h].right,a=v[h].left,(u=(s=v[h].index)-1)<0&&(u=0),t=n=(r=(f=void 0!==a?a:c).geometry).getCoordinates(),d=!1,r.getType()){case It.MULTI_LINE_STRING:n[f.depth[0]].length>2&&(n[f.depth[0]].splice(s,1),d=!0);break;case It.LINE_STRING:n.length>2&&(n.splice(s,1),d=!0);break;case It.MULTI_POLYGON:t=t[f.depth[1]];case It.POLYGON:(t=t[f.depth[0]]).length>4&&(s==t.length-1&&(s=0),t.splice(s,1),d=!0,0===s&&(t.pop(),t.push(t[0]),u=t.length-1))}if(d){this.Jd(r,n);var p=[];if(void 0!==a&&(this.Od.remove(a),p.push(a.segment[0])),void 0!==c&&(this.Od.remove(c),p.push(c.segment[1])),void 0!==a&&void 0!==c){var y={depth:f.depth,feature:f.feature,geometry:f.geometry,index:u,segment:p};this.Od.insert(xn(y.segment),y)}this.tp(r,s,f.depth,-1),this.ld&&(this.Hv.getSource().removeFeature(this.ld),this.ld=null),l.length=0}}return d},n.prototype.Jd=function(t,n){this.Td=!0,t.setCoordinates(n),this.Td=!1},n.prototype.tp=function(t,n,e,r){this.Od.forEachInExtent(t.getExtent(),(function(i){i.geometry===t&&(void 0===e||void 0===i.depth||x(i.depth,e))&&i.index>n&&(i.index+=r)}))},n}(Mu),OE=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),TE="select",EE=function(t){function n(n,e,r,i){var o=t.call(this,n)||this;return o.selected=e,o.deselected=r,o.mapBrowserEvent=i,o}return OE(n,t),n}(h),AE={};var CE=function(t){function n(n){var e=t.call(this)||this;e.on,e.once,e.un;var r,i,o=n||{};if(e.ep=e.Bd.bind(e),e.rp=e.Kd.bind(e),e.Hr=o.condition?o.condition:Pu,e.ip=o.addCondition?o.addCondition:Iu,e.op=o.removeCondition?o.removeCondition:Iu,e.sp=o.toggleCondition?o.toggleCondition:Nu,e.ap=!!o.multi&&o.multi,e.up=o.filter?o.filter:S,e.cp=o.hitTolerance?o.hitTolerance:0,e.K=void 0!==o.style?o.style:(w((r=$v())[It.POLYGON],r[It.LINE_STRING]),w(r[It.GEOMETRY_COLLECTION],r[It.LINE_STRING]),function(t){return t.getGeometry()?r[t.getGeometry().getType()]:null}),e.zi=o.features||new ht,o.layers)if("function"==typeof o.layers)i=o.layers;else{var s=o.layers;i=function(t){return y(s,t)}}else i=S;return e.fp=i,e.hp={},e}return OE(n,t),n.prototype.lp=function(t,n){this.hp[o(t)]=n},n.prototype.getFeatures=function(){return this.zi},n.prototype.getHitTolerance=function(){return this.cp},n.prototype.getLayer=function(t){return this.hp[o(t)]},n.prototype.setHitTolerance=function(t){this.cp=t},n.prototype.setMap=function(n){this.getMap()&&this.K&&this.zi.forEach(this.vp.bind(this)),t.prototype.setMap.call(this,n),n?(this.zi.addEventListener(st,this.ep),this.zi.addEventListener(at,this.rp),this.K&&this.zi.forEach(this.dp.bind(this))):(this.zi.removeEventListener(st,this.ep),this.zi.removeEventListener(at,this.rp))},n.prototype.Bd=function(t){var n=t.element;if(this.K&&this.dp(n),!this.getLayer(n)){var e=this.getMap().getAllLayers().find((function(t){if(t instanceof Ik&&t.getSource()&&t.getSource().hasFeature(n))return t}));e&&this.lp(n,e)}},n.prototype.Kd=function(t){var n=t.element;this.K&&this.vp(n)},n.prototype.getStyle=function(){return this.K},n.prototype.dp=function(t){var n=o(t);n in AE||(AE[n]=t.getStyle()),t.setStyle(this.K)},n.prototype.vp=function(t){for(var e=this.getMap().getInteractions().getArray(),r=e.length-1;r>=0;--r){var i=e[r];if(i!==this&&i instanceof n&&i.getStyle()&&-1!==i.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(i.getStyle())}var s=o(t);t.setStyle(AE[s]),delete AE[s]},n.prototype.pp=function(t){delete this.hp[o(t)]},n.prototype.handleEvent=function(t){if(!this.Hr(t))return!0;var n=this.ip(t),e=this.op(t),r=this.sp(t),i=!n&&!e&&!r,o=t.map,s=this.getFeatures(),a=[],u=[];if(i){A(this.hp),o.forEachFeatureAtPixel(t.pixel,function(t,n){if(this.up(t,n))return this.lp(t,n),u.push(t),!this.ap}.bind(this),{layerFilter:this.fp,hitTolerance:this.cp});for(var c=s.getLength()-1;c>=0;--c){var f=s.item(c),h=u.indexOf(f);h>-1?u.splice(h,1):(s.remove(f),a.push(f))}0!==u.length&&s.extend(u)}else{o.forEachFeatureAtPixel(t.pixel,function(t,i){if(this.up(t,i))return!n&&!r||y(s.getArray(),t)?(e||r)&&y(s.getArray(),t)&&(a.push(t),this.pp(t)):(this.lp(t,i),u.push(t)),!this.ap}.bind(this),{layerFilter:this.fp,hitTolerance:this.cp});for(var l=a.length-1;l>=0;--l)s.remove(a[l]);s.extend(u)}return(u.length>0||a.length>0)&&this.dispatchEvent(new EE(TE,u,a,t)),!0},n}(gu),RE=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function IE(t){return t.feature?t.feature:t.element?t.element:void 0}var PE=[],DE=function(t){function n(n){var e=this,r=n||{},i=r;return i.handleDownEvent||(i.handleDownEvent=S),i.stopDown||(i.stopDown=M),(e=t.call(this,i)||this).kv=r.source?r.source:null,e.yp=void 0===r.vertex||r.vertex,e.mp=void 0===r.edge||r.edge,e.zi=r.features?r.features:null,e.bp=[],e.wp={},e.gp={},e.xp={},e.ud=void 0!==r.pixelTolerance?r.pixelTolerance:10,e.Od=new Jv,e.Ad={Point:e.Cd.bind(e),LineString:e.Rd.bind(e),LinearRing:e.Rd.bind(e),Polygon:e.Id.bind(e),MultiPoint:e.Pd.bind(e),MultiLineString:e.Dd.bind(e),MultiPolygon:e.Nd.bind(e),GeometryCollection:e.Ld.bind(e),Circle:e.zd.bind(e)},e}return RE(n,t),n.prototype.addFeature=function(t,n){var e=void 0===n||n,r=o(t),i=t.getGeometry();if(i){var s=this.Ad[i.getType()];s&&(this.gp[r]=i.getExtent([1/0,1/0,-1/0,-1/0]),s(t,i))}e&&(this.wp[r]=X(t,D,this.Hu,this))},n.prototype.kp=function(t){this.addFeature(t)},n.prototype._p=function(t){this.removeFeature(t)},n.prototype.Sp=function(){var t;return this.zi?t=this.zi:this.kv&&(t=this.kv.getFeatures()),t},n.prototype.handleEvent=function(n){var e=this.snapTo(n.pixel,n.coordinate,n.map);return e.snapped&&(n.coordinate=e.vertex.slice(0,2),n.pixel=e.vertexPixel),t.prototype.handleEvent.call(this,n)},n.prototype.qd=function(t){var n=IE(t);this.addFeature(n)},n.prototype.$d=function(t){var n=IE(t);this.removeFeature(n)},n.prototype.Hu=function(t){var n=t.target;if(this.handlingDownUpSequence){var e=o(n);e in this.xp||(this.xp[e]=n)}else this.Mp(n)},n.prototype.handleUpEvent=function(t){var n=C(this.xp);return n.length&&(n.forEach(this.Mp.bind(this)),this.xp={}),!1},n.prototype.removeFeature=function(t,n){var e=void 0===n||n,r=o(t),i=this.gp[r];if(i){var s=this.Od,a=[];s.forEachInExtent(i,(function(n){t===n.feature&&a.push(n)}));for(var u=a.length-1;u>=0;--u)s.remove(a[u])}e&&(J(this.wp[r]),delete this.wp[r])},n.prototype.setMap=function(n){var e=this.getMap(),r=this.bp,i=this.Sp();e&&(r.forEach(J),r.length=0,i.forEach(this._p.bind(this))),t.prototype.setMap.call(this,n),n&&(this.zi?r.push(X(this.zi,st,this.qd,this),X(this.zi,at,this.$d,this)):this.kv&&r.push(X(this.kv,xd,this.qd,this),X(this.kv,Sd,this.$d,this)),i.forEach(this.kp.bind(this)))},n.prototype.snapTo=function(t,n,e){var r=xn([e.getCoordinateFromPixel([t[0]-this.ud,t[1]+this.ud]),e.getCoordinateFromPixel([t[0]+this.ud,t[1]-this.ud])]),i=this.Od.getInExtent(r);this.yp&&!this.mp&&(i=i.filter((function(t){return t.feature.getGeometry().getType()!==It.CIRCLE})));var o=!1,s=null,a=null;if(0===i.length)return{snapped:o,vertex:s,vertexPixel:a};for(var u,c=e.getView().getProjection(),f=Pr(n,c),h=1/0,l=0;l<i.length;++l){var v=i[l];PE[0]=Pr(v.segment[0],c),PE[1]=Pr(v.segment[1],c);var d=cr(f,PE);d<h&&(u=v,h=d)}var p=u.segment;if(this.yp&&!this.mp){var y=e.getPixelFromCoordinate(p[0]),m=e.getPixelFromCoordinate(p[1]),b=ar(t,y),w=ar(t,m);Math.sqrt(Math.min(b,w))<=this.ud&&(o=!0,s=b>w?p[1]:p[0],a=e.getPixelFromCoordinate(s))}else if(this.mp){var g=u.feature.getGeometry().getType()===It.CIRCLE;if(g){var x=u.feature.getGeometry(),k=Rr();k&&(x=x.clone().transform(k,c)),s=Ir(tr(f,x),c)}else PE[0]=Pr(p[0],c),PE[1]=Pr(p[1],c),s=Ir(nr(f,PE),c);if(ur(t,a=e.getPixelFromCoordinate(s))<=this.ud&&(o=!0,this.yp&&!g)){y=e.getPixelFromCoordinate(p[0]),m=e.getPixelFromCoordinate(p[1]),b=ar(a,y),w=ar(a,m);Math.sqrt(Math.min(b,w))<=this.ud&&(s=b>w?p[1]:p[0],a=e.getPixelFromCoordinate(s))}}return o&&(a=[Math.round(a[0]),Math.round(a[1])]),{snapped:o,vertex:s,vertexPixel:a}},n.prototype.Mp=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},n.prototype.zd=function(t,n){var e=this.getMap().getView().getProjection(),r=n,i=Rr();i&&(r=r.clone().transform(i,e));var o=Ki(r);i&&o.transform(e,i);for(var s=o.getCoordinates()[0],a=0,u=s.length-1;a<u;++a){var c=s.slice(a,a+2),f={feature:t,segment:c};this.Od.insert(xn(c),f)}},n.prototype.Ld=function(t,n){for(var e=n.getGeometriesArray(),r=0;r<e.length;++r){var i=this.Ad[e[r].getType()];i&&i(t,e[r])}},n.prototype.Rd=function(t,n){for(var e=n.getCoordinates(),r=0,i=e.length-1;r<i;++r){var o=e.slice(r,r+2),s={feature:t,segment:o};this.Od.insert(xn(o),s)}},n.prototype.Dd=function(t,n){for(var e=n.getCoordinates(),r=0,i=e.length;r<i;++r)for(var o=e[r],s=0,a=o.length-1;s<a;++s){var u=o.slice(s,s+2),c={feature:t,segment:u};this.Od.insert(xn(u),c)}},n.prototype.Pd=function(t,n){for(var e=n.getCoordinates(),r=0,i=e.length;r<i;++r){var o=e[r],s={feature:t,segment:[o,o]};this.Od.insert(n.getExtent(),s)}},n.prototype.Nd=function(t,n){for(var e=n.getCoordinates(),r=0,i=e.length;r<i;++r)for(var o=e[r],s=0,a=o.length;s<a;++s)for(var u=o[s],c=0,f=u.length-1;c<f;++c){var h=u.slice(c,c+2),l={feature:t,segment:h};this.Od.insert(xn(h),l)}},n.prototype.Cd=function(t,n){var e=n.getCoordinates(),r={feature:t,segment:[e,e]};this.Od.insert(n.getExtent(),r)},n.prototype.Id=function(t,n){for(var e=n.getCoordinates(),r=0,i=e.length;r<i;++r)for(var o=e[r],s=0,a=o.length-1;s<a;++s){var u=o.slice(s,s+2),c={feature:t,segment:u};this.Od.insert(xn(u),c)}},n}(Mu),NE=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),zE="translatestart",LE="translating",FE="translateend",GE=function(t){function n(n,e,r,i,o){var s=t.call(this,n)||this;return s.features=e,s.coordinate=r,s.startCoordinate=i,s.mapBrowserEvent=o,s}return NE(n,t),n}(h),UE=function(t){function n(n){var e,r=this,i=n||{};if((r=t.call(this,i)||this).on,r.once,r.un,r.jp=null,r.Op=null,r.zi=void 0!==i.features?i.features:null,i.layers&&!r.zi)if("function"==typeof i.layers)e=i.layers;else{var o=i.layers;e=function(t){return y(o,t)}}else e=S;return r.fp=e,r.up=i.filter&&!r.zi?i.filter:S,r.cp=i.hitTolerance?i.hitTolerance:0,r.Hr=i.condition?i.condition:Cu,r.Tp=null,r.addChangeListener(yu,r.Ep),r}return NE(n,t),n.prototype.handleDownEvent=function(t){if(!t.originalEvent||!this.Hr(t))return!1;if(this.Tp=this.Ap(t.pixel,t.map),!this.jp&&this.Tp){this.Op=t.coordinate,this.jp=t.coordinate,this.handleMoveEvent(t);var n=this.zi||new ht([this.Tp]);return this.dispatchEvent(new GE(zE,n,t.coordinate,this.Op,t)),!0}return!1},n.prototype.handleUpEvent=function(t){if(this.jp){this.jp=null,this.handleMoveEvent(t);var n=this.zi||new ht([this.Tp]);return this.dispatchEvent(new GE(FE,n,t.coordinate,this.Op,t)),this.Op=null,!0}return!1},n.prototype.handleDragEvent=function(t){if(this.jp){var n=t.coordinate,e=n[0]-this.jp[0],r=n[1]-this.jp[1],i=this.zi||new ht([this.Tp]);i.forEach((function(t){var n=t.getGeometry();n.translate(e,r),t.setGeometry(n)})),this.jp=n,this.dispatchEvent(new GE(LE,i,n,this.Op,t))}},n.prototype.handleMoveEvent=function(t){var n=t.map.getViewport();this.Ap(t.pixel,t.map)?(n.classList.remove(this.jp?"ol-grab":"ol-grabbing"),n.classList.add(this.jp?"ol-grabbing":"ol-grab")):n.classList.remove("ol-grab","ol-grabbing")},n.prototype.Ap=function(t,n){return n.forEachFeatureAtPixel(t,function(t,n){if(this.up(t,n)&&(!this.zi||y(this.zi.getArray(),t)))return t}.bind(this),{layerFilter:this.fp,hitTolerance:this.cp})},n.prototype.getHitTolerance=function(){return this.cp},n.prototype.setHitTolerance=function(t){this.cp=t},n.prototype.setMap=function(n){var e=this.getMap();t.prototype.setMap.call(this,n),this.Xv(e)},n.prototype.Ep=function(){this.Xv(null)},n.prototype.Xv=function(t){var n=this.getMap(),e=this.getActive();n&&e||(n=n||t)&&n.getViewport().classList.remove("ol-grab","ol-grabbing")},n}(Mu);function BE(t,n,e,r,i,o){var s,a;void 0!==i?(s=i,a=void 0!==o?o:0):(s=[],a=0);for(var u=n;u<e;){var c=t[u++];s[a++]=t[u++],s[a++]=c;for(var f=2;f<r;++f)s[a++]=t[u++]}return s.length=a,s}var qE=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),$E={};$E[It.POINT]=function(t){var n;n=void 0!==t.m&&void 0!==t.z?new Mi([t.x,t.y,t.z,t.m],Rt):void 0!==t.z?new Mi([t.x,t.y,t.z],At):void 0!==t.m?new Mi([t.x,t.y,t.m],Ct):new Mi([t.x,t.y]);return n},$E[It.LINE_STRING]=function(t){var n=WE(t);return new Ck(t.paths[0],n)},$E[It.POLYGON]=function(t){var n=WE(t);return new Zi(t.rings,n)},$E[It.MULTI_POINT]=function(t){var n=WE(t);return new Qk(t.points,n)},$E[It.MULTI_LINE_STRING]=function(t){var n=WE(t);return new Yk(t.paths,n)},$E[It.MULTI_POLYGON]=function(t){var n=WE(t);return new n_(t.rings,n)};var VE={};function ZE(t,n){var e,r,i;if(!t)return null;if("number"==typeof t.x&&"number"==typeof t.y)i=It.POINT;else if(t.points)i=It.MULTI_POINT;else if(t.paths){i=1===t.paths.length?It.LINE_STRING:It.MULTI_LINE_STRING}else if(t.rings){var o=t,s=WE(o),a=function(t,n){var e,r,i=[],o=[],s=[];for(e=0,r=t.length;e<r;++e){i.length=0,si(i,0,t[e],n.length),Fi(i,0,i.length,n.length)?o.push([t[e]]):s.push(t[e])}for(;s.length;){var a=s.shift(),u=!1;for(e=o.length-1;e>=0;e--){var c=o[e][0];if(jn(new _i(c).getExtent(),new _i(a).getExtent())){o[e].push(a),u=!0;break}}u||o.push([a.reverse()])}return o}(o.rings,s);1===a.length?(i=It.POLYGON,t=E({},t,((e={}).rings=a[0],e))):(i=It.MULTI_POLYGON,t=E({},t,((r={}).rings=a,r)))}return Hk((0,$E[i])(t),!1,n)}function WE(t){var n=Et;return!0===t.hasZ&&!0===t.hasM?n=Rt:!0===t.hasZ?n=At:!0===t.hasM&&(n=Ct),n}function HE(t){var n=t.getLayout();return{hasZ:n===At||n===Rt,hasM:n===Ct||n===Rt}}function KE(t,n){return(0,VE[t.getType()])(Hk(t,!0,n),n)}VE[It.POINT]=function(t,n){var e,r=t.getCoordinates(),i=t.getLayout();i===At?e={x:r[0],y:r[1],z:r[2]}:i===Ct?e={x:r[0],y:r[1],m:r[2]}:i===Rt?e={x:r[0],y:r[1],z:r[2],m:r[3]}:i===Et?e={x:r[0],y:r[1]}:Mt(!1,34);return e},VE[It.LINE_STRING]=function(t,n){var e=HE(t);return{hasZ:e.hasZ,hasM:e.hasM,paths:[t.getCoordinates()]}},VE[It.POLYGON]=function(t,n){var e=HE(t);return{hasZ:e.hasZ,hasM:e.hasM,rings:t.getCoordinates(!1)}},VE[It.MULTI_POINT]=function(t,n){var e=HE(t);return{hasZ:e.hasZ,hasM:e.hasM,points:t.getCoordinates()}},VE[It.MULTI_LINE_STRING]=function(t,n){var e=HE(t);return{hasZ:e.hasZ,hasM:e.hasM,paths:t.getCoordinates()}},VE[It.MULTI_POLYGON]=function(t,n){for(var e=HE(t),r=t.getCoordinates(!1),i=[],o=0;o<r.length;o++)for(var s=r[o].length-1;s>=0;s--)i.push(r[o][s]);return{hasZ:e.hasZ,hasM:e.hasM,rings:i}};var XE=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this)||this).H=r.geometryName,e}return qE(n,t),n.prototype.readFeatureFromObject=function(t,n,e){var r=t,i=ZE(r.geometry,n),o=new Tt;if(this.H&&o.setGeometryName(this.H),o.setGeometry(i),r.attributes){o.setProperties(r.attributes,!0);var s=r.attributes[e];void 0!==s&&o.setId(s)}return o},n.prototype.readFeaturesFromObject=function(t,n){var e=n||{};if(t.features){for(var r=[],i=t.features,o=0,s=i.length;o<s;++o)r.push(this.readFeatureFromObject(i[o],e,t.objectIdFieldName));return r}return[this.readFeatureFromObject(t,e)]},n.prototype.readGeometryFromObject=function(t,n){return ZE(t,n)},n.prototype.readProjectionFromObject=function(t){return t.spatialReference&&void 0!==t.spatialReference.wkid?mr("EPSG:"+t.spatialReference.wkid):null},n.prototype.writeGeometryObject=function(t,n){return KE(t,this.adaptOptions(n))},n.prototype.writeFeatureObject=function(t,n){n=this.adaptOptions(n);var e={};if(!t.hasProperties())return e.attributes={},e;var r=t.getProperties(),i=t.getGeometry();if(i){e.geometry=KE(i,n);var o=n&&(n.dataProjection||n.featureProjection);o&&(e.geometry.spatialReference={wkid:Number(mr(o).getCode().split(":").pop())}),delete r[t.getGeometryName()]}return R(r)?e.attributes={}:e.attributes=r,e},n.prototype.writeFeaturesObject=function(t,n){n=this.adaptOptions(n);for(var e=[],r=0,i=t.length;r<i;++r)e.push(this.writeFeatureObject(t[r],n));return{features:e}},n}(y_),YE=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),JE=function(t){function n(){var n=t.call(this)||this;return n.Cp=Ph(),n}return YE(n,t),n.prototype.getType=function(){return sf},n.prototype.readFeature=function(t,n){if(t){if("string"==typeof t){var e=mh(t);return this.readFeatureFromDocument(e,n)}return ph(t)?this.readFeatureFromDocument(t,n):this.readFeatureFromNode(t,n)}return null},n.prototype.readFeatureFromDocument=function(t,n){var e=this.readFeaturesFromDocument(t,n);return e.length>0?e[0]:null},n.prototype.readFeatureFromNode=function(t,n){return null},n.prototype.readFeatures=function(t,n){if(t){if("string"==typeof t){var e=mh(t);return this.readFeaturesFromDocument(e,n)}return ph(t)?this.readFeaturesFromDocument(t,n):this.readFeaturesFromNode(t,n)}return[]},n.prototype.readFeaturesFromDocument=function(t,n){for(var e=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&w(e,this.readFeaturesFromNode(r,n));return e},n.prototype.readFeaturesFromNode=function(t,n){return r()},n.prototype.readGeometry=function(t,n){if(t){if("string"==typeof t){var e=mh(t);return this.readGeometryFromDocument(e,n)}return ph(t)?this.readGeometryFromDocument(t,n):this.readGeometryFromNode(t,n)}return null},n.prototype.readGeometryFromDocument=function(t,n){return null},n.prototype.readGeometryFromNode=function(t,n){return null},n.prototype.readProjection=function(t){if(t){if("string"==typeof t){var n=mh(t);return this.readProjectionFromDocument(n)}return ph(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},n.prototype.readProjectionFromDocument=function(t){return this.dataProjection},n.prototype.readProjectionFromNode=function(t){return this.dataProjection},n.prototype.writeFeature=function(t,n){var e=this.writeFeatureNode(t,n);return this.Cp.serializeToString(e)},n.prototype.writeFeatureNode=function(t,n){return null},n.prototype.writeFeatures=function(t,n){var e=this.writeFeaturesNode(t,n);return this.Cp.serializeToString(e)},n.prototype.writeFeaturesNode=function(t,n){return null},n.prototype.writeGeometry=function(t,n){var e=this.writeGeometryNode(t,n);return this.Cp.serializeToString(e)},n.prototype.writeGeometryNode=function(t,n){return null},n}(Wk),QE=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),tA="http://www.opengis.net/gml",nA=/^[\s\xa0]*$/,eA=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.featureType=r.featureType,e.featureNS=r.featureNS,e.srsName=r.srsName,e.schemaLocation="",e.FEATURE_COLLECTION_PARSERS={},e.FEATURE_COLLECTION_PARSERS[e.namespace]={featureMember:wh(e.readFeaturesInternal),featureMembers:gh(e.readFeaturesInternal)},e.supportedMediaTypes=["application/gml+xml"],e}return QE(n,t),n.prototype.readFeaturesInternal=function(t,n){var e=t.localName,r=null;if("FeatureCollection"==e)r=Ah([],this.FEATURE_COLLECTION_PARSERS,t,n,this);else if("featureMembers"==e||"featureMember"==e||"member"==e){var i=n[0],o=i.featureType,s=i.featureNS;if(!o&&t.childNodes){o=[],s={};for(var a=0,u=t.childNodes.length;a<u;++a){var c=t.childNodes[a];if(1===c.nodeType){var f=c.nodeName.split(":").pop();if(-1===o.indexOf(f)){var h="",l=0,v=c.namespaceURI;for(var d in s){if(s[d]===v){h=d;break}++l}h||(s[h="p"+l]=v),o.push(h+":"+f)}}}"featureMember"!=e&&(i.featureType=o,i.featureNS=s)}if("string"==typeof s){var p=s;(s={}).p0=p}var y={},m=Array.isArray(o)?o:[o];for(var b in s){var w={};for(a=0,u=m.length;a<u;++a){(-1===m[a].indexOf(":")?"p0":m[a].split(":")[0])===b&&(w[m[a].split(":").pop()]="featureMembers"==e?wh(this.readFeatureElement,this):gh(this.readFeatureElement,this))}y[s[b]]=w}r=Ah("featureMember"==e||"member"==e?void 0:[],y,t,n)}return null===r&&(r=[]),r},n.prototype.readGeometryElement=function(t,n){var e=n[0];e.srsName=t.firstElementChild.getAttribute("srsName"),e.srsDimension=t.firstElementChild.getAttribute("srsDimension");var r=Ah(null,this.GEOMETRY_PARSERS,t,n,this);return r?Array.isArray(r)?Kk(r,e):Hk(r,!1,e):void 0},n.prototype.readFeatureElementInternal=function(t,n,e){for(var r,i={},o=t.firstElementChild;o;o=o.nextElementSibling){var s=void 0,a=o.localName;0===o.childNodes.length||1===o.childNodes.length&&(3===o.firstChild.nodeType||4===o.firstChild.nodeType)?(s=vh(o,!1),nA.test(s)&&(s=void 0)):(e&&(s=this.readGeometryElement(o,n)),s?"boundedBy"!==a&&(r=a):s=this.readFeatureElementInternal(o,n,!1)),i[a]?(i[a]instanceof Array||(i[a]=[i[a]]),i[a].push(s)):i[a]=s;var u=o.attributes.length;if(u>0){i[a]={Rp:i[a]};for(var c=0;c<u;c++){var f=o.attributes[c].name;i[a][f]=o.attributes[c].value}}}if(e){var h=new Tt(i);r&&h.setGeometryName(r);var l=t.getAttribute("fid")||yh(t,this.namespace,"id");return l&&h.setId(l),h}return i},n.prototype.readFeatureElement=function(t,n){return this.readFeatureElementInternal(t,n,!0)},n.prototype.readPoint=function(t,n){var e=this.readFlatCoordinatesFromNode(t,n);if(e)return new Mi(e,At)},n.prototype.readMultiPoint=function(t,n){var e=Ah([],this.MULTIPOINT_PARSERS,t,n,this);return e?new Qk(e):void 0},n.prototype.readMultiLineString=function(t,n){var e=Ah([],this.MULTILINESTRING_PARSERS,t,n,this);if(e)return new Yk(e)},n.prototype.readMultiPolygon=function(t,n){var e=Ah([],this.MULTIPOLYGON_PARSERS,t,n,this);if(e)return new n_(e)},n.prototype.pointMemberParser=function(t,n){Eh(this.POINTMEMBER_PARSERS,t,n,this)},n.prototype.lineStringMemberParser=function(t,n){Eh(this.LINESTRINGMEMBER_PARSERS,t,n,this)},n.prototype.polygonMemberParser=function(t,n){Eh(this.POLYGONMEMBER_PARSERS,t,n,this)},n.prototype.readLineString=function(t,n){var e=this.readFlatCoordinatesFromNode(t,n);return e?new Ck(e,At):void 0},n.prototype.readFlatLinearRing=function(t,n){var e=Ah(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this);return e||void 0},n.prototype.readLinearRing=function(t,n){var e=this.readFlatCoordinatesFromNode(t,n);if(e)return new _i(e,At)},n.prototype.readPolygon=function(t,n){var e=Ah([null],this.FLAT_LINEAR_RINGS_PARSERS,t,n,this);if(e&&e[0]){var r,i=e[0],o=[i.length],s=void 0;for(s=1,r=e.length;s<r;++s)w(i,e[s]),o.push(i.length);return new Zi(i,At,o)}},n.prototype.readFlatCoordinatesFromNode=function(t,n){return Ah(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this)},n.prototype.readGeometryFromNode=function(t,n){var e=this.readGeometryElement(t,[this.getReadOptions(t,n||{})]);return e||null},n.prototype.readFeaturesFromNode=function(t,n){var e={featureType:this.featureType,featureNS:this.featureNS};return n&&E(e,this.getReadOptions(t,n)),this.readFeaturesInternal(t,[e])||[]},n.prototype.readProjectionFromNode=function(t){return mr(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},n}(JE);eA.prototype.namespace=tA,eA.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},eA.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}},eA.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},eA.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:wh(eA.prototype.pointMemberParser),pointMembers:wh(eA.prototype.pointMemberParser)}},eA.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:wh(eA.prototype.lineStringMemberParser),lineStringMembers:wh(eA.prototype.lineStringMemberParser)}},eA.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:wh(eA.prototype.polygonMemberParser),polygonMembers:wh(eA.prototype.polygonMemberParser)}},eA.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:wh(eA.prototype.readFlatCoordinatesFromNode)}},eA.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:wh(eA.prototype.readLineString)}},eA.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:wh(eA.prototype.readPolygon)}},eA.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:gh(eA.prototype.readFlatLinearRing)}};var rA=eA;function iA(t){return oA(vh(t,!1))}function oA(t){var n=/^\s*(true|1)|(false|0)\s*$/.exec(t);return n?void 0!==n[1]||!1:void 0}function sA(t){var n=vh(t,!1),e=Date.parse(n);return isNaN(e)?void 0:e/1e3}function aA(t){return uA(vh(t,!1))}function uA(t){var n=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(t);return n?parseFloat(n[1]):void 0}function cA(t){return fA(vh(t,!1))}function fA(t){var n=/^\s*(\d+)\s*$/.exec(t);return n?parseInt(n[1],10):void 0}function hA(t){return vh(t,!1).trim()}function lA(t,n){mA(t,n?"1":"0")}function vA(t,n){t.appendChild(Nh().createCDATASection(n))}function dA(t,n){var e=new Date(1e3*n),r=e.getUTCFullYear()+"-"+Ye(e.getUTCMonth()+1,2)+"-"+Ye(e.getUTCDate(),2)+"T"+Ye(e.getUTCHours(),2)+":"+Ye(e.getUTCMinutes(),2)+":"+Ye(e.getUTCSeconds(),2)+"Z";t.appendChild(Nh().createTextNode(r))}function pA(t,n){var e=n.toPrecision();t.appendChild(Nh().createTextNode(e))}function yA(t,n){var e=n.toString();t.appendChild(Nh().createTextNode(e))}function mA(t,n){t.appendChild(Nh().createTextNode(n))}var bA=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),wA={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},gA=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this,r)||this).FEATURE_COLLECTION_PARSERS[tA].featureMember=wh(e.readFeaturesInternal),e.schemaLocation=r.schemaLocation?r.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",e}return bA(n,t),n.prototype.readFlatCoordinates=function(t,n){var e=vh(t,!1).replace(/^\s*|\s*$/g,""),r=n[0].srsName,i="enu";if(r){var o=mr(r);o&&(i=o.getAxisOrientation())}for(var s=e.trim().split(/\s+/),a=[],u=0,c=s.length;u<c;u++){var f=s[u].split(/,+/),h=parseFloat(f[0]),l=parseFloat(f[1]),v=3===f.length?parseFloat(f[2]):0;"en"===i.substr(0,2)?a.push(h,l,v):a.push(l,h,v)}return a},n.prototype.readBox=function(t,n){var e=Ah([null],this.Ip,t,n,this);return An(e[1][0],e[1][1],e[1][3],e[1][4])},n.prototype.innerBoundaryIsParser=function(t,n){var e=Ah(void 0,this.RING_PARSERS,t,n,this);e&&n[n.length-1].push(e)},n.prototype.outerBoundaryIsParser=function(t,n){var e=Ah(void 0,this.RING_PARSERS,t,n,this);e&&(n[n.length-1][0]=e)},n.prototype.Pp=function(t,n,e){var r,i=n[n.length-1],o=i.multiSurface,s=i.surface,a=i.multiCurve;return Array.isArray(t)?r="Envelope":"MultiPolygon"===(r=t.getType())&&!0===o?r="MultiSurface":"Polygon"===r&&!0===s?r="Surface":"MultiLineString"===r&&!0===a&&(r="MultiCurve"),lh("http://www.opengis.net/gml",r)},n.prototype.writeFeatureElement=function(t,n,e){var r=n.getId();r&&t.setAttribute("fid",r);var i=e[e.length-1],o=i.featureNS,s=n.getGeometryName();i.serializers||(i.serializers={},i.serializers[o]={});var a=[],u=[];if(n.hasProperties()){var c=n.getProperties();for(var f in c){var h=c[f];null!==h&&(a.push(f),u.push(h),f==s||"function"==typeof h.getSimplifiedGeometry?f in i.serializers[o]||(i.serializers[o][f]=_h(this.writeGeometryElement,this)):f in i.serializers[o]||(i.serializers[o][f]=_h(mA)))}}var l=E({},i);l.node=t,Rh(l,i.serializers,Mh(void 0,o),u,e,a)},n.prototype.writeCurveOrLineString=function(t,n,e){var r=e[e.length-1].srsName;if("LineStringSegment"!==t.nodeName&&r&&t.setAttribute("srsName",r),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var i=this.Dp(t.namespaceURI);t.appendChild(i),this.Np(i,n,e)}else if("Curve"===t.nodeName){var o=lh(t.namespaceURI,"segments");t.appendChild(o),this.zp(o,n,e)}},n.prototype.writeLineStringOrCurveMember=function(t,n,e){var r=this.Pp(n,e);r&&(t.appendChild(r),this.writeCurveOrLineString(r,n,e))},n.prototype.writeMultiCurveOrLineString=function(t,n,e){var r=e[e.length-1],i=r.hasZ,o=r.srsName,s=r.curve;o&&t.setAttribute("srsName",o);var a=n.getLineStrings();Rh({node:t,hasZ:i,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.Lp,a,e,void 0,this)},n.prototype.writeGeometryElement=function(t,n,e){var r,i=e[e.length-1],o=E({},i);o.node=t,r=Array.isArray(n)?Kk(n,i):Hk(n,!0,i),Rh(o,this.GEOMETRY_SERIALIZERS,this.Pp,[r],e,void 0,this)},n.prototype.Dp=function(t){var n=lh(t,"coordinates");return n.setAttribute("decimal","."),n.setAttribute("cs",","),n.setAttribute("ts"," "),n},n.prototype.Np=function(t,n,e){for(var r=e[e.length-1],i=r.hasZ,o=r.srsName,s=n.getCoordinates(),a=s.length,u=new Array(a),c=0;c<a;++c){var f=s[c];u[c]=this.Fp(f,o,i)}mA(t,u.join(" "))},n.prototype.zp=function(t,n,e){var r=lh(t.namespaceURI,"LineStringSegment");t.appendChild(r),this.writeCurveOrLineString(r,n,e)},n.prototype.writeSurfaceOrPolygon=function(t,n,e){var r=e[e.length-1],i=r.hasZ,o=r.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=n.getLinearRings();Rh({node:t,hasZ:i,srsName:o},this.RING_SERIALIZERS,this.Gp,s,e,void 0,this)}else if("Surface"===t.nodeName){var a=lh(t.namespaceURI,"patches");t.appendChild(a),this.Up(a,n,e)}},n.prototype.Gp=function(t,n,e){var r=n[n.length-1],i=r.node,o=r.exteriorWritten;return void 0===o&&(r.exteriorWritten=!0),lh(i.namespaceURI,void 0!==o?"innerBoundaryIs":"outerBoundaryIs")},n.prototype.Up=function(t,n,e){var r=lh(t.namespaceURI,"PolygonPatch");t.appendChild(r),this.writeSurfaceOrPolygon(r,n,e)},n.prototype.writeRing=function(t,n,e){var r=lh(t.namespaceURI,"LinearRing");t.appendChild(r),this.writeLinearRing(r,n,e)},n.prototype.Fp=function(t,n,e){var r="enu";n&&(r=mr(n).getAxisOrientation());var i="en"===r.substr(0,2)?t[0]+","+t[1]:t[1]+","+t[0];e&&(i+=","+(t[2]||0));return i},n.prototype.writePoint=function(t,n,e){var r=e[e.length-1],i=r.hasZ,o=r.srsName;o&&t.setAttribute("srsName",o);var s=this.Dp(t.namespaceURI);t.appendChild(s);var a=n.getCoordinates();mA(s,this.Fp(a,o,i))},n.prototype.writeMultiPoint=function(t,n,e){var r=e[e.length-1],i=r.hasZ,o=r.srsName;o&&t.setAttribute("srsName",o);var s=n.getPoints();Rh({node:t,hasZ:i,srsName:o},this.POINTMEMBER_SERIALIZERS,Mh("pointMember"),s,e,void 0,this)},n.prototype.writePointMember=function(t,n,e){var r=lh(t.namespaceURI,"Point");t.appendChild(r),this.writePoint(r,n,e)},n.prototype.writeLinearRing=function(t,n,e){var r=e[e.length-1].srsName;r&&t.setAttribute("srsName",r);var i=this.Dp(t.namespaceURI);t.appendChild(i),this.Np(i,n,e)},n.prototype.writeMultiSurfaceOrPolygon=function(t,n,e){var r=e[e.length-1],i=r.hasZ,o=r.srsName,s=r.surface;o&&t.setAttribute("srsName",o);var a=n.getPolygons();Rh({node:t,hasZ:i,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.Lp,a,e,void 0,this)},n.prototype.writeSurfaceOrPolygonMember=function(t,n,e){var r=this.Pp(n,e);r&&(t.appendChild(r),this.writeSurfaceOrPolygon(r,n,e))},n.prototype.writeEnvelope=function(t,n,e){var r=e[e.length-1].srsName;r&&t.setAttribute("srsName",r);var i=[n[0]+" "+n[1],n[2]+" "+n[3]];Rh({node:t},this.ENVELOPE_SERIALIZERS,jh,i,e,["lowerCorner","upperCorner"],this)},n.prototype.Lp=function(t,n,e){var r=n[n.length-1].node;return lh("http://www.opengis.net/gml",wA[r.nodeName])},n}(rA);gA.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:gh(gA.prototype.readFlatCoordinates)}},gA.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:gA.prototype.innerBoundaryIsParser,outerBoundaryIs:gA.prototype.outerBoundaryIsParser}},gA.prototype.Ip={"http://www.opengis.net/gml":{coordinates:wh(gA.prototype.readFlatCoordinates)}},gA.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:gh(rA.prototype.readPoint),MultiPoint:gh(rA.prototype.readMultiPoint),LineString:gh(rA.prototype.readLineString),MultiLineString:gh(rA.prototype.readMultiLineString),LinearRing:gh(rA.prototype.readLinearRing),Polygon:gh(rA.prototype.readPolygon),MultiPolygon:gh(rA.prototype.readMultiPolygon),Box:gh(gA.prototype.readBox)}},gA.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:_h(gA.prototype.writeCurveOrLineString),MultiCurve:_h(gA.prototype.writeMultiCurveOrLineString),Point:_h(gA.prototype.writePoint),MultiPoint:_h(gA.prototype.writeMultiPoint),LineString:_h(gA.prototype.writeCurveOrLineString),MultiLineString:_h(gA.prototype.writeMultiCurveOrLineString),LinearRing:_h(gA.prototype.writeLinearRing),Polygon:_h(gA.prototype.writeSurfaceOrPolygon),MultiPolygon:_h(gA.prototype.writeMultiSurfaceOrPolygon),Surface:_h(gA.prototype.writeSurfaceOrPolygon),MultiSurface:_h(gA.prototype.writeMultiSurfaceOrPolygon),Envelope:_h(gA.prototype.writeEnvelope)}},gA.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:_h(gA.prototype.writeLineStringOrCurveMember),curveMember:_h(gA.prototype.writeLineStringOrCurveMember)}},gA.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:_h(gA.prototype.writeRing),innerBoundaryIs:_h(gA.prototype.writeRing)}},gA.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:_h(gA.prototype.writePointMember)}},gA.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:_h(gA.prototype.writeSurfaceOrPolygonMember),polygonMember:_h(gA.prototype.writeSurfaceOrPolygonMember)}},gA.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:_h(mA),upperCorner:_h(mA)}};var xA=gA,kA=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),_A={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},SA=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this,r)||this).Bp=void 0!==r.surface&&r.surface,e.qp=void 0!==r.curve&&r.curve,e.$p=void 0===r.multiCurve||r.multiCurve,e.Vp=void 0===r.multiSurface||r.multiSurface,e.schemaLocation=r.schemaLocation?r.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",e.hasZ=void 0!==r.hasZ&&r.hasZ,e}return kA(n,t),n.prototype.readMultiCurve=function(t,n){var e=Ah([],this.MULTICURVE_PARSERS,t,n,this);return e?new Yk(e):void 0},n.prototype.readMultiSurface=function(t,n){var e=Ah([],this.MULTISURFACE_PARSERS,t,n,this);if(e)return new n_(e)},n.prototype.curveMemberParser=function(t,n){Eh(this.CURVEMEMBER_PARSERS,t,n,this)},n.prototype.surfaceMemberParser=function(t,n){Eh(this.SURFACEMEMBER_PARSERS,t,n,this)},n.prototype.readPatch=function(t,n){return Ah([null],this.PATCHES_PARSERS,t,n,this)},n.prototype.readSegment=function(t,n){return Ah([null],this.SEGMENTS_PARSERS,t,n,this)},n.prototype.readPolygonPatch=function(t,n){return Ah([null],this.FLAT_LINEAR_RINGS_PARSERS,t,n,this)},n.prototype.readLineStringSegment=function(t,n){return Ah([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this)},n.prototype.interiorParser=function(t,n){var e=Ah(void 0,this.RING_PARSERS,t,n,this);e&&n[n.length-1].push(e)},n.prototype.exteriorParser=function(t,n){var e=Ah(void 0,this.RING_PARSERS,t,n,this);e&&(n[n.length-1][0]=e)},n.prototype.readSurface=function(t,n){var e=Ah([null],this.SURFACE_PARSERS,t,n,this);if(e&&e[0]){var r,i=e[0],o=[i.length],s=void 0;for(s=1,r=e.length;s<r;++s)w(i,e[s]),o.push(i.length);return new Zi(i,At,o)}},n.prototype.readCurve=function(t,n){var e=Ah([null],this.CURVE_PARSERS,t,n,this);return e?new Ck(e,At):void 0},n.prototype.readEnvelope=function(t,n){var e=Ah([null],this.ENVELOPE_PARSERS,t,n,this);return An(e[1][0],e[1][1],e[2][0],e[2][1])},n.prototype.readFlatPos=function(t,n){for(var e,r=vh(t,!1),i=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,o=[];e=i.exec(r);)o.push(parseFloat(e[1])),r=r.substr(e[0].length);if(""===r){var s=n[0].srsName,a="enu";if(s)a=mr(s).getAxisOrientation();if("neu"===a){var u,c=void 0;for(c=0,u=o.length;c<u;c+=3){var f=o[c],h=o[c+1];o[c]=h,o[c+1]=f}}var l=o.length;if(2==l&&o.push(0),0!==l)return o}},n.prototype.readFlatPosList=function(t,n){var e=vh(t,!1).replace(/^\s*|\s*$/g,""),r=n[0],i=r.srsName,o=r.srsDimension,s="enu";i&&(s=mr(i).getAxisOrientation());var a,u,c,f=e.split(/\s+/),h=2;t.getAttribute("srsDimension")?h=fA(t.getAttribute("srsDimension")):t.getAttribute("dimension")?h=fA(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?h=fA(t.parentNode.getAttribute("srsDimension")):o&&(h=fA(o));for(var l=[],v=0,d=f.length;v<d;v+=h)a=parseFloat(f[v]),u=parseFloat(f[v+1]),c=3===h?parseFloat(f[v+2]):0,"en"===s.substr(0,2)?l.push(a,u,c):l.push(u,a,c);return l},n.prototype.Zp=function(t,n,e){var r=e[e.length-1],i=r.hasZ,o=i?"3":"2";t.setAttribute("srsDimension",o);var s=r.srsName,a="enu";s&&(a=mr(s).getAxisOrientation());var u,c=n.getCoordinates();(u="en"===a.substr(0,2)?c[0]+" "+c[1]:c[1]+" "+c[0],i)&&(u+=" "+(c[2]||0));mA(t,u)},n.prototype.Fp=function(t,n,e){var r="enu";n&&(r=mr(n).getAxisOrientation());var i="en"===r.substr(0,2)?t[0]+" "+t[1]:t[1]+" "+t[0];e&&(i+=" "+(t[2]||0));return i},n.prototype.Wp=function(t,n,e){var r=e[e.length-1],i=r.hasZ,o=i?"3":"2";t.setAttribute("srsDimension",o);for(var s,a=r.srsName,u=n.getCoordinates(),c=u.length,f=new Array(c),h=0;h<c;++h)s=u[h],f[h]=this.Fp(s,a,i);mA(t,f.join(" "))},n.prototype.writePoint=function(t,n,e){var r=e[e.length-1].srsName;r&&t.setAttribute("srsName",r);var i=lh(t.namespaceURI,"pos");t.appendChild(i),this.Zp(i,n,e)},n.prototype.writeEnvelope=function(t,n,e){var r=e[e.length-1].srsName;r&&t.setAttribute("srsName",r);var i=[n[0]+" "+n[1],n[2]+" "+n[3]];Rh({node:t},this.ENVELOPE_SERIALIZERS,jh,i,e,["lowerCorner","upperCorner"],this)},n.prototype.writeLinearRing=function(t,n,e){var r=e[e.length-1].srsName;r&&t.setAttribute("srsName",r);var i=lh(t.namespaceURI,"posList");t.appendChild(i),this.Wp(i,n,e)},n.prototype.Gp=function(t,n,e){var r=n[n.length-1],i=r.node,o=r.exteriorWritten;return void 0===o&&(r.exteriorWritten=!0),lh(i.namespaceURI,void 0!==o?"interior":"exterior")},n.prototype.writeSurfaceOrPolygon=function(t,n,e){var r=e[e.length-1],i=r.hasZ,o=r.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=n.getLinearRings();Rh({node:t,hasZ:i,srsName:o},this.RING_SERIALIZERS,this.Gp,s,e,void 0,this)}else if("Surface"===t.nodeName){var a=lh(t.namespaceURI,"patches");t.appendChild(a),this.Up(a,n,e)}},n.prototype.writeCurveOrLineString=function(t,n,e){var r=e[e.length-1].srsName;if("LineStringSegment"!==t.nodeName&&r&&t.setAttribute("srsName",r),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var i=lh(t.namespaceURI,"posList");t.appendChild(i),this.Wp(i,n,e)}else if("Curve"===t.nodeName){var o=lh(t.namespaceURI,"segments");t.appendChild(o),this.zp(o,n,e)}},n.prototype.writeMultiSurfaceOrPolygon=function(t,n,e){var r=e[e.length-1],i=r.hasZ,o=r.srsName,s=r.surface;o&&t.setAttribute("srsName",o);var a=n.getPolygons();Rh({node:t,hasZ:i,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.Lp,a,e,void 0,this)},n.prototype.writeMultiPoint=function(t,n,e){var r=e[e.length-1],i=r.srsName,o=r.hasZ;i&&t.setAttribute("srsName",i);var s=n.getPoints();Rh({node:t,hasZ:o,srsName:i},this.POINTMEMBER_SERIALIZERS,Mh("pointMember"),s,e,void 0,this)},n.prototype.writeMultiCurveOrLineString=function(t,n,e){var r=e[e.length-1],i=r.hasZ,o=r.srsName,s=r.curve;o&&t.setAttribute("srsName",o);var a=n.getLineStrings();Rh({node:t,hasZ:i,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.Lp,a,e,void 0,this)},n.prototype.writeRing=function(t,n,e){var r=lh(t.namespaceURI,"LinearRing");t.appendChild(r),this.writeLinearRing(r,n,e)},n.prototype.writeSurfaceOrPolygonMember=function(t,n,e){var r=this.Pp(n,e);r&&(t.appendChild(r),this.writeSurfaceOrPolygon(r,n,e))},n.prototype.writePointMember=function(t,n,e){var r=lh(t.namespaceURI,"Point");t.appendChild(r),this.writePoint(r,n,e)},n.prototype.writeLineStringOrCurveMember=function(t,n,e){var r=this.Pp(n,e);r&&(t.appendChild(r),this.writeCurveOrLineString(r,n,e))},n.prototype.Up=function(t,n,e){var r=lh(t.namespaceURI,"PolygonPatch");t.appendChild(r),this.writeSurfaceOrPolygon(r,n,e)},n.prototype.zp=function(t,n,e){var r=lh(t.namespaceURI,"LineStringSegment");t.appendChild(r),this.writeCurveOrLineString(r,n,e)},n.prototype.writeGeometryElement=function(t,n,e){var r,i=e[e.length-1],o=E({},i);o.node=t,r=Array.isArray(n)?Kk(n,i):Hk(n,!0,i),Rh(o,this.GEOMETRY_SERIALIZERS,this.Pp,[r],e,void 0,this)},n.prototype.writeFeatureElement=function(t,n,e){var r=n.getId();r&&t.setAttribute("fid",r);var i=e[e.length-1],o=i.featureNS,s=n.getGeometryName();i.serializers||(i.serializers={},i.serializers[o]={});var a=[],u=[];if(n.hasProperties()){var c=n.getProperties();for(var f in c){var h=c[f];null!==h&&(a.push(f),u.push(h),f==s||"function"==typeof h.getSimplifiedGeometry?f in i.serializers[o]||(i.serializers[o][f]=_h(this.writeGeometryElement,this)):f in i.serializers[o]||(i.serializers[o][f]=_h(mA)))}}var l=E({},i);l.node=t,Rh(l,i.serializers,Mh(void 0,o),u,e,a)},n.prototype.Hp=function(t,n,e){var r=e[e.length-1],i=r.featureType,o=r.featureNS,s={};s[o]={},s[o][i]=_h(this.writeFeatureElement,this);var a=E({},r);a.node=t,Rh(a,s,Mh(i,o),n,e)},n.prototype.Lp=function(t,n,e){var r=n[n.length-1].node;return lh(this.namespace,_A[r.nodeName])},n.prototype.Pp=function(t,n,e){var r,i=n[n.length-1],o=i.multiSurface,s=i.surface,a=i.curve,u=i.multiCurve;return Array.isArray(t)?r="Envelope":"MultiPolygon"===(r=t.getType())&&!0===o?r="MultiSurface":"Polygon"===r&&!0===s?r="Surface":"LineString"===r&&!0===a?r="Curve":"MultiLineString"===r&&!0===u&&(r="MultiCurve"),lh(this.namespace,r)},n.prototype.writeGeometryNode=function(t,n){n=this.adaptOptions(n);var e=lh(this.namespace,"geom"),r={node:e,hasZ:this.hasZ,srsName:this.srsName,curve:this.qp,surface:this.Bp,multiSurface:this.Vp,multiCurve:this.$p};return n&&E(r,n),this.writeGeometryElement(e,t,[r]),e},n.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var e=lh(this.namespace,"featureMembers");e.setAttributeNS(hh,"xsi:schemaLocation",this.schemaLocation);var r={srsName:this.srsName,hasZ:this.hasZ,curve:this.qp,surface:this.Bp,multiSurface:this.Vp,multiCurve:this.$p,featureNS:this.featureNS,featureType:this.featureType};return n&&E(r,n),this.Hp(e,t,[r]),e},n}(rA);SA.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:gh(SA.prototype.readFlatPos),posList:gh(SA.prototype.readFlatPosList),coordinates:gh(xA.prototype.readFlatCoordinates)}},SA.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:SA.prototype.interiorParser,exterior:SA.prototype.exteriorParser}},SA.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:gh(rA.prototype.readPoint),MultiPoint:gh(rA.prototype.readMultiPoint),LineString:gh(rA.prototype.readLineString),MultiLineString:gh(rA.prototype.readMultiLineString),LinearRing:gh(rA.prototype.readLinearRing),Polygon:gh(rA.prototype.readPolygon),MultiPolygon:gh(rA.prototype.readMultiPolygon),Surface:gh(SA.prototype.readSurface),MultiSurface:gh(SA.prototype.readMultiSurface),Curve:gh(SA.prototype.readCurve),MultiCurve:gh(SA.prototype.readMultiCurve),Envelope:gh(SA.prototype.readEnvelope)}},SA.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:wh(SA.prototype.curveMemberParser),curveMembers:wh(SA.prototype.curveMemberParser)}},SA.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:wh(SA.prototype.surfaceMemberParser),surfaceMembers:wh(SA.prototype.surfaceMemberParser)}},SA.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:wh(rA.prototype.readLineString),Curve:wh(SA.prototype.readCurve)}},SA.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:wh(rA.prototype.readPolygon),Surface:wh(SA.prototype.readSurface)}},SA.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:gh(SA.prototype.readPatch)}},SA.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:gh(SA.prototype.readSegment)}},SA.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:wh(SA.prototype.readFlatPosList),upperCorner:wh(SA.prototype.readFlatPosList)}},SA.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:gh(SA.prototype.readPolygonPatch)}},SA.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:gh(SA.prototype.readLineStringSegment)}},SA.prototype.writeFeatures,SA.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:_h(SA.prototype.writeRing),interior:_h(SA.prototype.writeRing)}},SA.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:_h(mA),upperCorner:_h(mA)}},SA.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:_h(SA.prototype.writeSurfaceOrPolygonMember),polygonMember:_h(SA.prototype.writeSurfaceOrPolygonMember)}},SA.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:_h(SA.prototype.writePointMember)}},SA.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:_h(SA.prototype.writeLineStringOrCurveMember),curveMember:_h(SA.prototype.writeLineStringOrCurveMember)}},SA.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:_h(SA.prototype.writeCurveOrLineString),MultiCurve:_h(SA.prototype.writeMultiCurveOrLineString),Point:_h(SA.prototype.writePoint),MultiPoint:_h(SA.prototype.writeMultiPoint),LineString:_h(SA.prototype.writeCurveOrLineString),MultiLineString:_h(SA.prototype.writeMultiCurveOrLineString),LinearRing:_h(SA.prototype.writeLinearRing),Polygon:_h(SA.prototype.writeSurfaceOrPolygon),MultiPolygon:_h(SA.prototype.writeMultiSurfaceOrPolygon),Surface:_h(SA.prototype.writeSurfaceOrPolygon),MultiSurface:_h(SA.prototype.writeMultiSurfaceOrPolygon),Envelope:_h(SA.prototype.writeEnvelope)}};var MA=SA,jA=MA;jA.prototype.writeFeatures,jA.prototype.writeFeaturesNode;var OA=jA,TA=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),EA=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this,r)||this).schemaLocation=r.schemaLocation?r.schemaLocation:e.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd",e}return TA(n,t),n}(MA);EA.prototype.namespace="http://www.opengis.net/gml/3.2",EA.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:gh(MA.prototype.readFlatPos),posList:gh(MA.prototype.readFlatPosList),coordinates:gh(xA.prototype.readFlatCoordinates)}},EA.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:MA.prototype.interiorParser,exterior:MA.prototype.exteriorParser}},EA.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:gh(rA.prototype.readPoint),MultiPoint:gh(rA.prototype.readMultiPoint),LineString:gh(rA.prototype.readLineString),MultiLineString:gh(rA.prototype.readMultiLineString),LinearRing:gh(rA.prototype.readLinearRing),Polygon:gh(rA.prototype.readPolygon),MultiPolygon:gh(rA.prototype.readMultiPolygon),Surface:gh(EA.prototype.readSurface),MultiSurface:gh(MA.prototype.readMultiSurface),Curve:gh(EA.prototype.readCurve),MultiCurve:gh(MA.prototype.readMultiCurve),Envelope:gh(EA.prototype.readEnvelope)}},EA.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:wh(MA.prototype.curveMemberParser),curveMembers:wh(MA.prototype.curveMemberParser)}},EA.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:wh(MA.prototype.surfaceMemberParser),surfaceMembers:wh(MA.prototype.surfaceMemberParser)}},EA.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:wh(rA.prototype.readLineString),Curve:wh(MA.prototype.readCurve)}},EA.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:wh(rA.prototype.readPolygon),Surface:wh(MA.prototype.readSurface)}},EA.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:gh(MA.prototype.readPatch)}},EA.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:gh(MA.prototype.readSegment)}},EA.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:wh(MA.prototype.readFlatPosList),upperCorner:wh(MA.prototype.readFlatPosList)}},EA.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:gh(MA.prototype.readPolygonPatch)}},EA.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:gh(MA.prototype.readLineStringSegment)}},EA.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:wh(rA.prototype.pointMemberParser),pointMembers:wh(rA.prototype.pointMemberParser)}},EA.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:wh(rA.prototype.lineStringMemberParser),lineStringMembers:wh(rA.prototype.lineStringMemberParser)}},EA.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:wh(rA.prototype.polygonMemberParser),polygonMembers:wh(rA.prototype.polygonMemberParser)}},EA.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:wh(rA.prototype.readFlatCoordinatesFromNode)}},EA.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:wh(rA.prototype.readLineString)}},EA.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:wh(rA.prototype.readPolygon)}},EA.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:gh(rA.prototype.readFlatLinearRing)}},EA.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:_h(MA.prototype.writeRing),interior:_h(MA.prototype.writeRing)}},EA.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:_h(mA),upperCorner:_h(mA)}},EA.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:_h(MA.prototype.writeSurfaceOrPolygonMember),polygonMember:_h(MA.prototype.writeSurfaceOrPolygonMember)}},EA.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:_h(MA.prototype.writePointMember)}},EA.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:_h(MA.prototype.writeLineStringOrCurveMember),curveMember:_h(MA.prototype.writeLineStringOrCurveMember)}},EA.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:_h(MA.prototype.writeCurveOrLineString),MultiCurve:_h(MA.prototype.writeMultiCurveOrLineString),Point:_h(EA.prototype.writePoint),MultiPoint:_h(MA.prototype.writeMultiPoint),LineString:_h(MA.prototype.writeCurveOrLineString),MultiLineString:_h(MA.prototype.writeMultiCurveOrLineString),LinearRing:_h(MA.prototype.writeLinearRing),Polygon:_h(MA.prototype.writeSurfaceOrPolygon),MultiPolygon:_h(MA.prototype.writeMultiSurfaceOrPolygon),Surface:_h(MA.prototype.writeSurfaceOrPolygon),MultiSurface:_h(MA.prototype.writeMultiSurfaceOrPolygon),Envelope:_h(MA.prototype.writeEnvelope)}};var AA=EA,CA=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),RA=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],IA={rte:aC,trk:uC,wpt:cC},PA=Th(RA,{rte:wh(aC),trk:wh(uC),wpt:wh(cC)}),DA=Th(RA,{text:kh(hA,"linkText"),type:kh(hA,"linkType")}),NA=Th(RA,{rte:_h((function(t,n,e){var r=e[0],i=n.getProperties(),o={node:t};o.properties=i;var s=n.getGeometry();if(s.getType()==It.LINE_STRING){var a=Hk(s,!0,r);o.geometryLayout=a.getLayout(),i.rtept=a.getCoordinates()}var u=e[e.length-1].node,c=ZA[u.namespaceURI],f=Oh(i,c);Rh(o,WA,jh,f,e,c)})),trk:_h((function(t,n,e){var r=e[0],i=n.getProperties(),o={node:t};o.properties=i;var s=n.getGeometry();if(s.getType()==It.MULTI_LINE_STRING){var a=Hk(s,!0,r);i.trkseg=a.getLineStrings()}var u=e[e.length-1].node,c=KA[u.namespaceURI],f=Oh(i,c);Rh(o,XA,jh,f,e,c)})),wpt:_h((function(t,n,e){var r=e[0],i=e[e.length-1];i.properties=n.getProperties();var o=n.getGeometry();if(o.getType()==It.POINT){var s=Hk(o,!0,r);i.geometryLayout=s.getLayout(),hC(t,s.getCoordinates(),e)}}))}),zA=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.dataProjection=mr("EPSG:4326"),e.Kp=r.readExtensions,e}return CA(n,t),n.prototype.Xp=function(t){t||(t=[]);for(var n=0,e=t.length;n<e;++n){var r=t[n];if(this.Kp){var i=r.get("extensionsNode_")||null;this.Kp(r,i)}r.set("extensionsNode_",void 0)}},n.prototype.readFeatureFromNode=function(t,n){if(!y(RA,t.namespaceURI))return null;var e=IA[t.localName];if(!e)return null;var r=e(t,[this.getReadOptions(t,n)]);return r?(this.Xp([r]),r):null},n.prototype.readFeaturesFromNode=function(t,n){if(!y(RA,t.namespaceURI))return[];if("gpx"==t.localName){var e=Ah([],PA,t,[this.getReadOptions(t,n)]);return e?(this.Xp(e),e):[]}return[]},n.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var e=lh("http://www.topografix.com/GPX/1/1","gpx");return e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",hh),e.setAttributeNS(hh,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),e.setAttribute("version","1.1"),e.setAttribute("creator","OpenLayers"),Rh({node:e},NA,eC,t,[n]),e},n}(JE),LA=Th(RA,{name:kh(hA),cmt:kh(hA),desc:kh(hA),src:kh(hA),link:oC,number:kh(cA),extensions:sC,type:kh(hA),rtept:function(t,n){var e=Ah({},FA,t,n);if(e){var r=n[n.length-1],i=r.flatCoordinates,o=r.layoutOptions;rC(i,o,t,e)}}}),FA=Th(RA,{ele:kh(aA),time:kh(sA)}),GA=Th(RA,{name:kh(hA),cmt:kh(hA),desc:kh(hA),src:kh(hA),link:oC,number:kh(cA),type:kh(hA),extensions:sC,trkseg:function(t,n){var e=n[n.length-1];Eh(UA,t,n);var r=e.flatCoordinates;e.ends.push(r.length)}}),UA=Th(RA,{trkpt:function(t,n){var e=Ah({},BA,t,n);if(e){var r=n[n.length-1],i=r.flatCoordinates,o=r.layoutOptions;rC(i,o,t,e)}}}),BA=Th(RA,{ele:kh(aA),time:kh(sA)}),qA=Th(RA,{ele:kh(aA),time:kh(sA),magvar:kh(aA),geoidheight:kh(aA),name:kh(hA),cmt:kh(hA),desc:kh(hA),src:kh(hA),link:oC,sym:kh(hA),type:kh(hA),fix:kh(hA),sat:kh(cA),hdop:kh(aA),vdop:kh(aA),pdop:kh(aA),ageofdgpsdata:kh(aA),dgpsid:kh(cA),extensions:sC}),$A=["text","type"],VA=Th(RA,{text:_h(mA),type:_h(mA)}),ZA=Th(RA,["name","cmt","desc","src","link","number","type","rtept"]),WA=Th(RA,{name:_h(mA),cmt:_h(mA),desc:_h(mA),src:_h(mA),link:_h(fC),number:_h(yA),type:_h(mA),rtept:Sh(_h(hC))}),HA=Th(RA,["ele","time"]),KA=Th(RA,["name","cmt","desc","src","link","number","type","trkseg"]),XA=Th(RA,{name:_h(mA),cmt:_h(mA),desc:_h(mA),src:_h(mA),link:_h(fC),number:_h(yA),type:_h(mA),trkseg:Sh(_h((function(t,n,e){var r={node:t};r.geometryLayout=n.getLayout(),r.properties={},Rh(r,JA,YA,n.getCoordinates(),e)})))}),YA=Mh("trkpt"),JA=Th(RA,{trkpt:_h(hC)}),QA=Th(RA,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),tC=Th(RA,{ele:_h(pA),time:_h(dA),magvar:_h(pA),geoidheight:_h(pA),name:_h(mA),cmt:_h(mA),desc:_h(mA),src:_h(mA),link:_h(fC),sym:_h(mA),type:_h(mA),fix:_h(mA),sat:_h(yA),hdop:_h(pA),vdop:_h(pA),pdop:_h(pA),ageofdgpsdata:_h(pA),dgpsid:_h(yA)}),nC={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function eC(t,n,e){var r=t.getGeometry();if(r){var i=nC[r.getType()];if(i)return lh(n[n.length-1].node.namespaceURI,i)}}function rC(t,n,e,r){return t.push(parseFloat(e.getAttribute("lon")),parseFloat(e.getAttribute("lat"))),"ele"in r?(t.push(r.ele),delete r.ele,n.hasZ=!0):t.push(0),"time"in r?(t.push(r.time),delete r.time,n.hasM=!0):t.push(0),t}function iC(t,n,e){var r=Et,i=2;if(t.hasZ&&t.hasM?(r=Rt,i=4):t.hasZ?(r=At,i=3):t.hasM&&(r=Ct,i=3),4!==i){for(var o=0,s=n.length/4;o<s;o++)n[o*i]=n[4*o],n[o*i+1]=n[4*o+1],t.hasZ&&(n[o*i+2]=n[4*o+2]),t.hasM&&(n[o*i+2]=n[4*o+3]);if(n.length=n.length/4*i,e)for(o=0,s=e.length;o<s;o++)e[o]=e[o]/4*i}return r}function oC(t,n){var e=n[n.length-1],r=t.getAttribute("href");null!==r&&(e.link=r),Eh(DA,t,n)}function sC(t,n){n[n.length-1].Yp=t}function aC(t,n){var e=n[0],r=Ah({flatCoordinates:[],layoutOptions:{}},LA,t,n);if(r){var i=r.flatCoordinates;delete r.flatCoordinates;var o=r.layoutOptions;delete r.layoutOptions;var s=iC(o,i),a=new Ck(i,s);Hk(a,!1,e);var u=new Tt(a);return u.setProperties(r,!0),u}}function uC(t,n){var e=n[0],r=Ah({flatCoordinates:[],ends:[],layoutOptions:{}},GA,t,n);if(r){var i=r.flatCoordinates;delete r.flatCoordinates;var o=r.ends;delete r.ends;var s=r.layoutOptions;delete r.layoutOptions;var a=iC(s,i,o),u=new Yk(i,a,o);Hk(u,!1,e);var c=new Tt(u);return c.setProperties(r,!0),c}}function cC(t,n){var e=n[0],r=Ah({},qA,t,n);if(r){var i={},o=rC([],i,t,r),s=iC(i,o),a=new Mi(o,s);Hk(a,!1,e);var u=new Tt(a);return u.setProperties(r,!0),u}}function fC(t,n,e){t.setAttribute("href",n);var r=e[e.length-1].properties,i=[r.linkText,r.linkType];Rh({node:t},VA,jh,i,e,$A)}function hC(t,n,e){var r=e[e.length-1],i=r.node.namespaceURI,o=r.properties;switch(t.setAttributeNS(null,"lat",String(n[1])),t.setAttributeNS(null,"lon",String(n[0])),r.geometryLayout){case Rt:0!==n[3]&&(o.time=n[3]);case At:0!==n[2]&&(o.ele=n[2]);break;case Ct:0!==n[2]&&(o.time=n[2])}var s="rtept"==t.nodeName?HA[i]:QA[i],a=Oh(o,s);Rh({node:t,properties:o},tC,jh,a,e,s)}var lC=zA,vC=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function dC(t){return"string"==typeof t?t:""}var pC=function(t){function n(){return t.call(this)||this}return vC(n,t),n.prototype.getType=function(){return of},n.prototype.readFeature=function(t,n){return this.readFeatureFromText(dC(t),this.adaptOptions(n))},n.prototype.readFeatureFromText=function(t,n){return r()},n.prototype.readFeatures=function(t,n){return this.readFeaturesFromText(dC(t),this.adaptOptions(n))},n.prototype.readFeaturesFromText=function(t,n){return r()},n.prototype.readGeometry=function(t,n){return this.readGeometryFromText(dC(t),this.adaptOptions(n))},n.prototype.readGeometryFromText=function(t,n){return r()},n.prototype.readProjection=function(t){return this.readProjectionFromText(dC(t))},n.prototype.readProjectionFromText=function(t){return this.dataProjection},n.prototype.writeFeature=function(t,n){return this.writeFeatureText(t,this.adaptOptions(n))},n.prototype.writeFeatureText=function(t,n){return r()},n.prototype.writeFeatures=function(t,n){return this.writeFeaturesText(t,this.adaptOptions(n))},n.prototype.writeFeaturesText=function(t,n){return r()},n.prototype.writeGeometry=function(t,n){return this.writeGeometryText(t,this.adaptOptions(n))},n.prototype.writeGeometryText=function(t,n){return r()},n}(Wk),yC=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),mC="barometric",bC="gps",wC="none",gC=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,xC=/^H.([A-Z]{3}).*?:(.*)/,kC=/^HFDTE(\d{2})(\d{2})(\d{2})/,_C=/\r\n|\r|\n/,SC=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.dataProjection=mr("EPSG:4326"),e.Jp=r.altitudeMode?r.altitudeMode:wC,e}return yC(n,t),n.prototype.readFeatureFromText=function(t,n){var e,r,i=this.Jp,o=t.split(_C),s={},a=[],u=2e3,c=0,f=1,h=-1;for(e=0,r=o.length;e<r;++e){var l=o[e],v=void 0;if("B"==l.charAt(0)){if(v=gC.exec(l)){var d=parseInt(v[1],10),p=parseInt(v[2],10),y=parseInt(v[3],10),m=parseInt(v[4],10)+parseInt(v[5],10)/6e4;"S"==v[6]&&(m=-m);var b=parseInt(v[7],10)+parseInt(v[8],10)/6e4;if("W"==v[9]&&(b=-b),a.push(b,m),i!=wC){var w=void 0;w=i==bC?parseInt(v[11],10):i==mC?parseInt(v[12],10):0,a.push(w)}var g=Date.UTC(u,c,f,d,p,y);g<h&&(g=Date.UTC(u,c,f+1,d,p,y)),a.push(g/1e3),h=g}}else"H"==l.charAt(0)&&((v=kC.exec(l))?(f=parseInt(v[1],10),c=parseInt(v[2],10)-1,u=2e3+parseInt(v[3],10)):(v=xC.exec(l))&&(s[v[1]]=v[2].trim()))}if(0===a.length)return null;var x=new Ck(a,i==wC?Ct:Rt),k=new Tt(Hk(x,!1,n));return k.setProperties(s,!0),k},n.prototype.readFeaturesFromText=function(t,n){var e=this.readFeatureFromText(t,n);return e?[e]:[]},n}(pC);function MC(t){return(MC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var jC,OC,TC,EC,AC,CC,RC=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),IC=["http://www.google.com/kml/ext/2.2"],PC=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],DC={fraction:Mv,pixels:jv,insetPixels:jv},NC=Th(PC,{ExtendedData:IR,Region:PR,MultiGeometry:kh(SR,"geometry"),LineString:kh(xR,"geometry"),LinearRing:kh(kR,"geometry"),Point:kh(MR,"geometry"),Polygon:kh(OR,"geometry"),Style:kh(ER),StyleMap:function(t,n){var e=aR.call(this,t,n);if(!e)return;var r=n[n.length-1];Array.isArray(e)?r.Style=e:"string"==typeof e?r.styleUrl=e:Mt(!1,38)},address:kh(hA),description:kh(hA),name:kh(hA),open:kh(iA),phoneNumber:kh(hA),styleUrl:kh(iR),visibility:kh(iA)},Th(IC,{MultiTrack:kh((function(t,n){var e=Ah([],dR,t,n);if(!e)return;return new Yk(e)}),"geometry"),Track:kh(yR,"geometry")})),zC=Th(PC,{ExtendedData:IR,Region:PR,Link:function(t,n){Eh(LC,t,n)},address:kh(hA),description:kh(hA),name:kh(hA),open:kh(iA),phoneNumber:kh(hA),visibility:kh(iA)}),LC=Th(PC,{href:kh(rR)}),FC=Th(PC,{LatLonAltBox:function(t,n){var e=Ah({},zR,t,n);if(!e)return;var r=n[n.length-1],i=[parseFloat(e.west),parseFloat(e.south),parseFloat(e.east),parseFloat(e.north)];r.extent=i,r.altitudeMode=e.altitudeMode,r.minAltitude=parseFloat(e.minAltitude),r.maxAltitude=parseFloat(e.maxAltitude)},Lod:function(t,n){var e=Ah({},LR,t,n);if(!e)return;var r=n[n.length-1];r.minLodPixels=parseFloat(e.minLodPixels),r.maxLodPixels=parseFloat(e.maxLodPixels),r.minFadeExtent=parseFloat(e.minFadeExtent),r.maxFadeExtent=parseFloat(e.maxFadeExtent)}}),GC=Th(PC,["Document","Placemark"]),UC=Th(PC,{Document:_h((function(t,n,e){Rh({node:t},qR,$R,n,e,void 0,this)})),Placemark:_h(dI)}),BC=null;var qC,$C=null;var VC,ZC=null;var WC=null;var HC=null;var KC,XC=null;function YC(t){return 32/Math.min(t[0],t[1])}function JC(t){return t}var QC=function(t){function n(n){var e=t.call(this)||this,r=n||{};return XC||(BC=new Sv({color:jC=[255,255,255,1]}),CC="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",$C=new zv({anchor:OC=[20,2],anchorOrigin:Ov,anchorXUnits:TC=jv,anchorYUnits:EC=jv,crossOrigin:"anonymous",rotation:0,scale:YC(AC=[64,64]),size:AC,src:CC}),qC="NO_IMAGE",ZC=new Lv({color:jC,width:1}),VC=new Lv({color:[51,51,51,1],width:2}),WC=new Kv({font:"bold 16px Helvetica",fill:BC,stroke:VC,scale:.8}),HC=new Zv({fill:BC,image:$C,text:WC,stroke:ZC,zIndex:0}),XC=[HC]),e.dataProjection=mr("EPSG:4326"),e.Qp=r.defaultStyle?r.defaultStyle:XC,e.ty=void 0===r.extractStyles||r.extractStyles,e.ny=void 0===r.writeStyles||r.writeStyles,e.ey={},e.iy=void 0===r.showPointNames||r.showPointNames,e.qt=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",e.oy=r.iconUrlFunction?r.iconUrlFunction:JC,e.supportedMediaTypes=["application/vnd.google-earth.kml+xml"],e}return RC(n,t),n.prototype.sy=function(t,n){var e=Ah([],Th(PC,{Document:bh(this.sy,this),Folder:bh(this.sy,this),Placemark:wh(this.uy,this),Style:this.hy.bind(this),StyleMap:this.ly.bind(this)}),t,n,this);return e||void 0},n.prototype.uy=function(t,n){var e=Ah({geometry:null},NC,t,n,this);if(e){var r=new Tt,i=t.getAttribute("id");null!==i&&r.setId(i);var o=n[0],s=e.geometry;if(s&&Hk(s,!1,o),r.setGeometry(s),delete e.geometry,this.ty){var a=function(t,n,e,r,i){return function(o,s){var a=i,u="",c=[];if(a){var f=o.getGeometry();if(f){var h=f.getType();a=h===It.GEOMETRY_COLLECTION?(c=f.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===It.POINT||n===It.MULTI_POINT}))).length>0:h===It.POINT||h===It.MULTI_POINT}}a&&(u=o.get("name"),(a=a&&!!u)&&u.search(/&[^&]+;/)>-1&&(KC||(KC=document.createElement("textarea")),KC.innerHTML=u,u=KC.value));var l=e;if(t?l=t:n&&(l=tR(n,e,r)),a){var v=function(t,n){var e=[0,0],r="start",i=t.getImage();if(i){var o=i.getSize();if(o&&2==o.length){var s=i.getScaleArray(),a=i.getAnchor();e[0]=s[0]*(o[0]-a[0]),e[1]=s[1]*(o[1]/2-a[1]),r="left"}}var u=t.getText();u?((u=u.clone()).setFont(u.getFont()||WC.getFont()),u.setScale(u.getScale()||WC.getScale()),u.setFill(u.getFill()||WC.getFill()),u.setStroke(u.getStroke()||VC)):u=WC.clone();return u.setText(n),u.setOffsetX(e[0]),u.setOffsetY(e[1]),u.setTextAlign(r),new Zv({image:i,text:u})}(l[0],u);return c.length>0?(v.setGeometry(new v_(c)),[v,new Zv({geometry:l[0].getGeometry(),image:null,fill:l[0].getFill(),stroke:l[0].getStroke(),text:null})].concat(l.slice(1))):v}return l}}(e.Style,e.styleUrl,this.Qp,this.ey,this.iy);r.setStyle(a)}return delete e.Style,r.setProperties(e,!0),r}},n.prototype.hy=function(t,n){var e=t.getAttribute("id");if(null!==e){var r=ER.call(this,t,n);if(r){var i=void 0,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)i=new URL("#"+e,o).href;else i="#"+e;this.ey[i]=r}}},n.prototype.ly=function(t,n){var e=t.getAttribute("id");if(null!==e){var r=aR.call(this,t,n);if(r){var i,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)i=new URL("#"+e,o).href;else i="#"+e;this.ey[i]=r}}},n.prototype.readFeatureFromNode=function(t,n){if(!y(PC,t.namespaceURI))return null;var e=this.uy(t,[this.getReadOptions(t,n)]);return e||null},n.prototype.readFeaturesFromNode=function(t,n){if(!y(PC,t.namespaceURI))return[];var e,r=t.localName;if("Document"==r||"Folder"==r)return(e=this.sy(t,[this.getReadOptions(t,n)]))||[];if("Placemark"==r){var i=this.uy(t,[this.getReadOptions(t,n)]);return i?[i]:[]}if("kml"==r){e=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var s=this.readFeaturesFromNode(o,n);s&&w(e,s)}return e}return[]},n.prototype.readName=function(t){if(t){if("string"==typeof t){var n=mh(t);return this.readNameFromDocument(n)}return ph(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},n.prototype.readNameFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE){var e=this.readNameFromNode(n);if(e)return e}},n.prototype.readNameFromNode=function(t){for(var n=t.firstElementChild;n;n=n.nextElementSibling)if(y(PC,n.namespaceURI)&&"name"==n.localName)return hA(n);for(n=t.firstElementChild;n;n=n.nextElementSibling){var e=n.localName;if(y(PC,n.namespaceURI)&&("Document"==e||"Folder"==e||"Placemark"==e||"kml"==e)){var r=this.readNameFromNode(n);if(r)return r}}},n.prototype.readNetworkLinks=function(t){var n=[];if("string"==typeof t){var e=mh(t);w(n,this.readNetworkLinksFromDocument(e))}else ph(t)?w(n,this.readNetworkLinksFromDocument(t)):w(n,this.readNetworkLinksFromNode(t));return n},n.prototype.readNetworkLinksFromDocument=function(t){for(var n=[],e=t.firstChild;e;e=e.nextSibling)e.nodeType==Node.ELEMENT_NODE&&w(n,this.readNetworkLinksFromNode(e));return n},n.prototype.readNetworkLinksFromNode=function(t){for(var n=[],e=t.firstElementChild;e;e=e.nextElementSibling)if(y(PC,e.namespaceURI)&&"NetworkLink"==e.localName){var r=Ah({},zC,e,[]);n.push(r)}for(e=t.firstElementChild;e;e=e.nextElementSibling){var i=e.localName;!y(PC,e.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||w(n,this.readNetworkLinksFromNode(e))}return n},n.prototype.readRegion=function(t){var n=[];if("string"==typeof t){var e=mh(t);w(n,this.readRegionFromDocument(e))}else ph(t)?w(n,this.readRegionFromDocument(t)):w(n,this.readRegionFromNode(t));return n},n.prototype.readRegionFromDocument=function(t){for(var n=[],e=t.firstChild;e;e=e.nextSibling)e.nodeType==Node.ELEMENT_NODE&&w(n,this.readRegionFromNode(e));return n},n.prototype.readRegionFromNode=function(t){for(var n=[],e=t.firstElementChild;e;e=e.nextElementSibling)if(y(PC,e.namespaceURI)&&"Region"==e.localName){var r=Ah({},FC,e,[]);n.push(r)}for(e=t.firstElementChild;e;e=e.nextElementSibling){var i=e.localName;!y(PC,e.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||w(n,this.readRegionFromNode(e))}return n},n.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var e=lh(PC[4],"kml"),r="http://www.w3.org/2000/xmlns/";e.setAttributeNS(r,"xmlns:gx",IC[0]),e.setAttributeNS(r,"xmlns:xsi",hh),e.setAttributeNS(hh,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var i={node:e},o={};t.length>1?o.Document=t:1==t.length&&(o.Placemark=t[0]);var s=GC[e.namespaceURI],a=Oh(o,s);return Rh(i,UC,jh,a,[n],s,this),e},n}(JE);function tR(t,n,e){return Array.isArray(t)?t:"string"==typeof t?tR(e[t],n,e):n}function nR(t){var n=vh(t,!1),e=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(n);if(e){var r=e[1];return[parseInt(r.substr(6,2),16),parseInt(r.substr(4,2),16),parseInt(r.substr(2,2),16),parseInt(r.substr(0,2),16)/255]}}function eR(t){var n=vh(t,!1),e=[];n=n.replace(/\s*,\s*/g,",");for(var r,i=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;r=i.exec(n);){var o=parseFloat(r[1]),s=parseFloat(r[2]),a=r[3]?parseFloat(r[3]):0;e.push(o,s,a),n=n.substr(r[0].length)}if(""===n)return e}function rR(t){var n=vh(t,!1).trim(),e=t.baseURI;return e&&"about:blank"!=e||(e=window.location.href),e?new URL(n,e).href:n}function iR(t){var n=vh(t,!1).trim().replace(/^(?!.*#)/,"#"),e=t.baseURI;return e&&"about:blank"!=e||(e=window.location.href),e?new URL(n,e).href:n}function oR(t){return aA(t)}var sR=Th(PC,{Pair:function(t,n){var e=Ah({},DR,t,n,this);if(!e)return;var r=e.key;if(r&&"normal"==r){var i=e.styleUrl;i&&(n[n.length-1]=i);var o=e.Style;o&&(n[n.length-1]=o)}}});function aR(t,n){return Ah(void 0,sR,t,n,this)}var uR=Th(PC,{Icon:kh((function(t,n){var e=Ah({},mR,t,n);return e||null})),color:kh(nR),heading:kh(aA),hotSpot:kh((function(t){var n,e=t.getAttribute("xunits"),r=t.getAttribute("yunits");return n="insetPixels"!==e?"insetPixels"!==r?Ov:Ev:"insetPixels"!==r?Tv:Av,{x:parseFloat(t.getAttribute("x")),xunits:DC[e],y:parseFloat(t.getAttribute("y")),yunits:DC[r],origin:n}})),scale:kh(oR)});var cR=Th(PC,{color:kh(nR),scale:kh(oR)});var fR=Th(PC,{color:kh(nR),width:kh(aA)});var hR=Th(PC,{color:kh(nR),fill:kh(iA),outline:kh(iA)});var lR=Th(PC,{coordinates:gh(eR)});function vR(t,n){return Ah(null,lR,t,n)}var dR=Th(IC,{Track:wh(yR)});var pR=Th(PC,{when:function(t,n){var e=n[n.length-1].whens,r=vh(t,!1),i=Date.parse(r);e.push(isNaN(i)?0:i)}},Th(IC,{coord:function(t,n){var e=n[n.length-1].coordinates,r=vh(t,!1),i=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(r);if(i){var o=parseFloat(i[1]),s=parseFloat(i[2]),a=parseFloat(i[3]);e.push([o,s,a])}else e.push([])}}));function yR(t,n){var e=Ah({coordinates:[],whens:[]},pR,t,n);if(e){for(var r=[],i=e.coordinates,o=e.whens,s=0,a=Math.min(i.length,o.length);s<a;++s)3==i[s].length&&r.push(i[s][0],i[s][1],i[s][2],o[s]);return new Ck(r,Rt)}}var mR=Th(PC,{href:kh(rR)},Th(IC,{x:kh(aA),y:kh(aA),w:kh(aA),h:kh(aA)}));var bR=Th(PC,{coordinates:gh(eR)});function wR(t,n){return Ah(null,bR,t,n)}var gR=Th(PC,{extrude:kh(iA),tessellate:kh(iA),altitudeMode:kh(hA)});function xR(t,n){var e=Ah({},gR,t,n),r=wR(t,n);if(r){var i=new Ck(r,At);return i.setProperties(e,!0),i}}function kR(t,n){var e=Ah({},gR,t,n),r=wR(t,n);if(r){var i=new Zi(r,At,[r.length]);return i.setProperties(e,!0),i}}var _R=Th(PC,{LineString:wh(xR),LinearRing:wh(kR),MultiGeometry:wh(SR),Point:wh(MR),Polygon:wh(OR)});function SR(t,n){var e,r=Ah([],_R,t,n);if(!r)return null;if(0===r.length)return new v_(r);for(var i=!0,o=r[0].getType(),s=1,a=r.length;s<a;++s)if(r[s].getType()!=o){i=!1;break}if(i){var u=void 0,c=void 0;if(o==It.POINT){var f=r[0];u=f.getLayout(),c=f.getFlatCoordinates();for(s=1,a=r.length;s<a;++s)w(c,r[s].getFlatCoordinates());AR(e=new Qk(c,u),r)}else o==It.LINE_STRING?AR(e=new Yk(r),r):o==It.POLYGON?AR(e=new n_(r),r):o==It.GEOMETRY_COLLECTION?e=new v_(r):Mt(!1,37)}else e=new v_(r);return e}function MR(t,n){var e=Ah({},gR,t,n),r=wR(t,n);if(r){var i=new Mi(r,At);return i.setProperties(e,!0),i}}var jR=Th(PC,{innerBoundaryIs:function(t,n){var e=Ah([],FR,t,n);if(e.length>0){var r=n[n.length-1];r.push.apply(r,e)}},outerBoundaryIs:function(t,n){var e=Ah(void 0,GR,t,n);if(e){n[n.length-1][0]=e}}});function OR(t,n){var e=Ah({},gR,t,n),r=Ah([null],jR,t,n);if(r&&r[0]){for(var i=r[0],o=[i.length],s=1,a=r.length;s<a;++s)w(i,r[s]),o.push(i.length);var u=new Zi(i,At,o);return u.setProperties(e,!0),u}}var TR=Th(PC,{IconStyle:function(t,n){var e=Ah({},uR,t,n);if(e){var r,i,o,s,a=n[n.length-1],u="Icon"in e?e.Icon:{},c=!("Icon"in e)||Object.keys(u).length>0,f=u.href;f?r=f:c&&(r=CC);var h,l=Ov,v=e.hotSpot;v?(i=[v.x,v.y],o=v.xunits,s=v.yunits,l=v.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(r)&&(/pushpin/.test(r)?(i=OC,o=TC,s=EC):/arrow-reverse/.test(r)?(i=[54,42],o=TC,s=EC):/paddle/.test(r)&&(i=[32,1],o=TC,s=EC));var d,p=u.x,y=u.y;void 0!==p&&void 0!==y&&(h=[p,y]);var m,b=u.w,w=u.h;void 0!==b&&void 0!==w&&(d=[b,w]);var g=e.heading;void 0!==g&&(m=pe(g));var x=e.scale,k=e.color;if(c){r==CC&&(d=AC);var _=new zv({anchor:i,anchorOrigin:l,anchorXUnits:o,anchorYUnits:s,crossOrigin:this.qt,offset:h,offsetOrigin:Ov,rotation:m,scale:x,size:d,src:this.oy(r),color:k}),S=_.getScaleArray()[0],M=_.getSize();if(null===M){var j=_.getImageState();if(j===lo||j===vo){_.listenImageChange((function t(){var n=_.getImageState();if(n!==lo&&n!==vo){var e=_.getSize();if(e&&2==e.length){var r=YC(e);_.setScale(S*r)}_.unlistenImageChange(t)}})),j===lo&&_.load()}}else if(2==M.length){var O=YC(M);_.setScale(S*O)}a.imageStyle=_}else a.imageStyle=qC}},LabelStyle:function(t,n){var e=Ah({},cR,t,n);if(e){var r=n[n.length-1],i=new Kv({fill:new Sv({color:"color"in e?e.color:jC}),scale:e.scale});r.textStyle=i}},LineStyle:function(t,n){var e=Ah({},fR,t,n);if(e){var r=n[n.length-1],i=new Lv({color:"color"in e?e.color:jC,width:"width"in e?e.width:1});r.strokeStyle=i}},PolyStyle:function(t,n){var e=Ah({},hR,t,n);if(e){var r=n[n.length-1],i=new Sv({color:"color"in e?e.color:jC});r.fillStyle=i;var o=e.fill;void 0!==o&&(r.fill=o);var s=e.outline;void 0!==s&&(r.outline=s)}}});function ER(t,n){var e=Ah({},TR,t,n,this);if(!e)return null;var r,i="fillStyle"in e?e.fillStyle:BC,o=e.fill;void 0===o||o||(i=null),"imageStyle"in e?e.imageStyle!=qC&&(r=e.imageStyle):r=$C;var s="textStyle"in e?e.textStyle:WC,a="strokeStyle"in e?e.strokeStyle:ZC,u=e.outline;return void 0===u||u?[new Zv({fill:i,image:r,stroke:a,text:s,zIndex:void 0})]:[new Zv({geometry:function(t){var n=t.getGeometry(),e=n.getType();return e===It.GEOMETRY_COLLECTION?new v_(n.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n!==It.POLYGON&&n!==It.MULTI_POLYGON}))):e!==It.POLYGON&&e!==It.MULTI_POLYGON?n:void 0},fill:i,image:r,stroke:a,text:s,zIndex:void 0}),new Zv({geometry:function(t){var n=t.getGeometry(),e=n.getType();return e===It.GEOMETRY_COLLECTION?new v_(n.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===It.POLYGON||n===It.MULTI_POLYGON}))):e===It.POLYGON||e===It.MULTI_POLYGON?n:void 0},fill:i,stroke:null,zIndex:void 0})]}function AR(t,n){var e,r,i,o=n.length,s=new Array(n.length),a=new Array(n.length),u=new Array(n.length);e=!1,r=!1,i=!1;for(var c=0;c<o;++c){var f=n[c];s[c]=f.get("extrude"),a[c]=f.get("tessellate"),u[c]=f.get("altitudeMode"),e=e||void 0!==s[c],r=r||void 0!==a[c],i=i||u[c]}e&&t.set("extrude",s),r&&t.set("tessellate",a),i&&t.set("altitudeMode",u)}var CR=Th(PC,{displayName:kh(hA),value:kh(hA)});var RR=Th(PC,{Data:function(t,n){var e=t.getAttribute("name");Eh(CR,t,n);var r=n[n.length-1];e&&r.displayName?r[e]={value:r.value,displayName:r.displayName,toString:function(){return r.value}}:null!==e?r[e]=r.value:null!==r.displayName&&(r[r.displayName]=r.value),delete r.value},SchemaData:function(t,n){Eh(NR,t,n)}});function IR(t,n){Eh(RR,t,n)}function PR(t,n){Eh(FC,t,n)}var DR=Th(PC,{Style:kh(ER),key:kh(hA),styleUrl:kh(iR)});var NR=Th(PC,{SimpleData:function(t,n){var e=t.getAttribute("name");if(null!==e){var r=hA(t);n[n.length-1][e]=r}}});var zR=Th(PC,{altitudeMode:kh(hA),minAltitude:kh(aA),maxAltitude:kh(aA),north:kh(aA),south:kh(aA),east:kh(aA),west:kh(aA)});var LR=Th(PC,{minLodPixels:kh(aA),maxLodPixels:kh(aA),minFadeExtent:kh(aA),maxFadeExtent:kh(aA)});var FR=Th(PC,{LinearRing:wh(vR)});var GR=Th(PC,{LinearRing:gh(vR)});function UR(t,n){for(var e=Lo(n),r=[255*(4==e.length?e[3]:1),e[2],e[1],e[0]],i=0;i<4;++i){var o=Math.floor(r[i]).toString(16);r[i]=1==o.length?"0"+o:o}mA(t,r.join(""))}var BR=Th(PC,{Data:_h((function(t,n,e){t.setAttribute("name",n.name);var r={node:t},i=n.value;"object"==MC(i)?(null!==i&&i.displayName&&Rh(r,BR,jh,[i.displayName],e,["displayName"]),null!==i&&i.value&&Rh(r,BR,jh,[i.value],e,["value"])):Rh(r,BR,jh,[i],e,["value"])})),value:_h((function(t,n){mA(t,n)})),displayName:_h((function(t,n){vA(t,n)}))});var qR=Th(PC,{Placemark:_h(dI)}),$R=function(t,n,e){return lh(n[n.length-1].node.namespaceURI,"Placemark")};var VR=Mh("Data");var ZR=Th(PC,["href"],Th(IC,["x","y","w","h"])),WR=Th(PC,{href:_h(mA)},Th(IC,{x:_h(pA),y:_h(pA),w:_h(pA),h:_h(pA)})),HR=function(t,n,e){return lh(IC[0],"gx:"+e)};var KR=Th(PC,["scale","heading","Icon","color","hotSpot"]),XR=Th(PC,{Icon:_h((function(t,n,e){var r={node:t},i=e[e.length-1].node,o=ZR[i.namespaceURI],s=Oh(n,o);Rh(r,WR,jh,s,e,o),s=Oh(n,o=ZR[IC[0]]),Rh(r,WR,HR,s,e,o)})),color:_h(UR),heading:_h(pA),hotSpot:_h((function(t,n){t.setAttribute("x",String(n.x)),t.setAttribute("y",String(n.y)),t.setAttribute("xunits",n.xunits),t.setAttribute("yunits",n.yunits)})),scale:_h(SI)});var YR=Th(PC,["color","scale"]),JR=Th(PC,{color:_h(UR),scale:_h(SI)});var QR=Th(PC,["color","width"]),tI=Th(PC,{color:_h(UR),width:_h(pA)});var nI={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},eI=function(t,n,e){if(t)return lh(n[n.length-1].node.namespaceURI,nI[t.getType()])},rI=Mh("Point"),iI=Mh("LineString"),oI=Mh("LinearRing"),sI=Mh("Polygon"),aI=Th(PC,{LineString:_h(mI),Point:_h(mI),Polygon:_h(kI),GeometryCollection:_h(uI)});function uI(t,n,e){var r,i={node:t},o=n.getType(),s=[];o===It.GEOMETRY_COLLECTION?(n.getGeometriesArrayRecursive().forEach((function(t){var n=t.getType();n===It.MULTI_POINT?s=s.concat(t.getPoints()):n===It.MULTI_LINE_STRING?s=s.concat(t.getLineStrings()):n===It.MULTI_POLYGON?s=s.concat(t.getPolygons()):n===It.POINT||n===It.LINE_STRING||n===It.POLYGON?s.push(t):Mt(!1,39)})),r=eI):o===It.MULTI_POINT?(s=n.getPoints(),r=rI):o===It.MULTI_LINE_STRING?(s=n.getLineStrings(),r=iI):o===It.MULTI_POLYGON?(s=n.getPolygons(),r=sI):Mt(!1,39),Rh(i,aI,r,s,e)}var cI=Th(PC,{LinearRing:_h(mI)});function fI(t,n,e){Rh({node:t},cI,oI,[n],e)}var hI=Th(PC,{ExtendedData:_h((function(t,n,e){for(var r={node:t},i=n.names,o=n.values,s=i.length,a=0;a<s;a++)Rh(r,BR,VR,[{name:i[a],value:o[a]}],e)})),MultiGeometry:_h(uI),LineString:_h(mI),LinearRing:_h(mI),Point:_h(mI),Polygon:_h(kI),Style:_h((function(t,n,e){var r={node:t},i={};if(n.pointStyles.length){var o=n.pointStyles[0].getText();o&&(i.LabelStyle=o);var s=n.pointStyles[0].getImage();s&&"function"==typeof s.getSrc&&(i.IconStyle=s)}if(n.lineStyles.length){(a=n.lineStyles[0].getStroke())&&(i.LineStyle=a)}if(n.polyStyles.length){var a;(a=n.polyStyles[0].getStroke())&&!i.LineStyle&&(i.LineStyle=a),i.PolyStyle=n.polyStyles[0]}var u=e[e.length-1].node,c=MI[u.namespaceURI],f=Oh(i,c);Rh(r,jI,jh,f,e,c)})),address:_h(mA),description:_h(mA),name:_h(mA),open:_h(lA),phoneNumber:_h(mA),styleUrl:_h(mA),visibility:_h(lA)}),lI=Th(PC,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),vI=Mh("ExtendedData");function dI(t,n,e){var r={node:t};n.getId()&&t.setAttribute("id",n.getId());var i=n.getProperties(),o={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};o[n.getGeometryName()]=1;var s=Object.keys(i||{}).sort().filter((function(t){return!o[t]})),a=n.getStyleFunction();if(a){var u=a(n,0);if(u){var c=Array.isArray(u)?u:[u],f=c;if(n.getGeometry()&&(f=c.filter((function(t){var e=t.getGeometryFunction()(n);if(e){var r=e.getType();return r===It.GEOMETRY_COLLECTION?e.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===It.POINT||n===It.MULTI_POINT})).length:r===It.POINT||r===It.MULTI_POINT}}))),this.ny){var h=c,l=c;n.getGeometry()&&(h=c.filter((function(t){var e=t.getGeometryFunction()(n);if(e){var r=e.getType();return r===It.GEOMETRY_COLLECTION?e.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===It.LINE_STRING||n===It.MULTI_LINE_STRING})).length:r===It.LINE_STRING||r===It.MULTI_LINE_STRING}})),l=c.filter((function(t){var e=t.getGeometryFunction()(n);if(e){var r=e.getType();return r===It.GEOMETRY_COLLECTION?e.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===It.POLYGON||n===It.MULTI_POLYGON})).length:r===It.POLYGON||r===It.MULTI_POLYGON}}))),i.Style={pointStyles:f,lineStyles:h,polyStyles:l}}if(f.length&&void 0===i.name){var v=f[0].getText();v&&(i.name=v.getText())}}}var d=e[e.length-1].node,p=lI[d.namespaceURI],y=Oh(i,p);if(Rh(r,hI,jh,y,e,p),s.length>0){var m=Oh(i,s);Rh(r,hI,vI,[{names:s,values:m}],e)}var b=e[0],w=n.getGeometry();w&&(w=Hk(w,!0,b)),Rh(r,hI,eI,[w],e)}var pI=Th(PC,["extrude","tessellate","altitudeMode","coordinates"]),yI=Th(PC,{extrude:_h(lA),tessellate:_h(lA),altitudeMode:_h(mA),coordinates:_h((function(t,n,e){var r,i=e[e.length-1],o=i.layout,s=i.stride;o==Et||o==Ct?r=2:o==At||o==Rt?r=3:Mt(!1,34);var a=n.length,u="";if(a>0){u+=n[0];for(var c=1;c<r;++c)u+=","+n[c];for(var f=s;f<a;f+=s){u+=" "+n[f];for(c=1;c<r;++c)u+=","+n[f+c]}}mA(t,u)}))});function mI(t,n,e){var r=n.getFlatCoordinates(),i={node:t};i.layout=n.getLayout(),i.stride=n.getStride();var o=n.getProperties();o.coordinates=r;var s=e[e.length-1].node,a=pI[s.namespaceURI],u=Oh(o,a);Rh(i,yI,jh,u,e,a)}var bI=Th(PC,["color","fill","outline"]),wI=Th(PC,{outerBoundaryIs:_h(fI),innerBoundaryIs:_h(fI)}),gI=Mh("innerBoundaryIs"),xI=Mh("outerBoundaryIs");function kI(t,n,e){var r=n.getLinearRings(),i=r.shift(),o={node:t};Rh(o,wI,gI,r,e),Rh(o,wI,xI,[i],e)}var _I=Th(PC,{color:_h(UR),fill:_h(lA),outline:_h(lA)});function SI(t,n){pA(t,Math.round(1e6*n)/1e6)}var MI=Th(PC,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),jI=Th(PC,{IconStyle:_h((function(t,n,e){var r={node:t},i={},o=n.getSrc(),s=n.getSize(),a=n.getImageSize(),u={href:o};if(s){u.w=s[0],u.h=s[1];var c=n.getAnchor(),f=n.getOrigin();if(f&&a&&0!==f[0]&&f[1]!==s[1]&&(u.x=f[0],u.y=a[1]-(f[1]+s[1])),c&&(c[0]!==s[0]/2||c[1]!==s[1]/2)){var h={x:c[0],xunits:jv,y:s[1]-c[1],yunits:jv};i.hotSpot=h}}i.Icon=u;var l=n.getScaleArray()[0],v=s;null===v&&(v=AC),2==v.length&&(l/=YC(v)),1!==l&&(i.scale=l);var d=n.getRotation();0!==d&&(i.heading=d);var p=n.getColor();p&&(i.color=p);var y=e[e.length-1].node,m=KR[y.namespaceURI],b=Oh(i,m);Rh(r,XR,jh,b,e,m)})),LabelStyle:_h((function(t,n,e){var r={node:t},i={},o=n.getFill();o&&(i.color=o.getColor());var s=n.getScale();s&&1!==s&&(i.scale=s);var a=e[e.length-1].node,u=YR[a.namespaceURI],c=Oh(i,u);Rh(r,JR,jh,c,e,u)})),LineStyle:_h((function(t,n,e){var r={node:t},i={color:n.getColor(),width:Number(n.getWidth())||1},o=e[e.length-1].node,s=QR[o.namespaceURI],a=Oh(i,s);Rh(r,tI,jh,a,e,s)})),PolyStyle:_h((function(t,n,e){var r={node:t},i=n.getFill(),o=n.getStroke(),s={color:i?i.getColor():void 0,fill:!!i&&void 0,outline:!!o&&void 0},a=e[e.length-1].node,u=bI[a.namespaceURI],c=Oh(s,u);Rh(r,_I,jh,c,e,u)}))});var OI=QC,TI=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),EI=[null],AI=Th(EI,{nd:function(t,n){n[n.length-1].ndrefs.push(t.getAttribute("ref"))},tag:PI}),CI=Th(EI,{node:function(t,n){var e=n[0],r=n[n.length-1],i=t.getAttribute("id"),o=[parseFloat(t.getAttribute("lon")),parseFloat(t.getAttribute("lat"))];r.nodes[i]=o;var s=Ah({tags:{}},II,t,n);if(!R(s.tags)){var a=new Mi(o);Hk(a,!1,e);var u=new Tt(a);u.setId(i),u.setProperties(s.tags,!0),r.features.push(u)}},way:function(t,n){var e=Ah({id:t.getAttribute("id"),ndrefs:[],tags:{}},AI,t,n);n[n.length-1].ways.push(e)}}),RI=function(t){function n(){var n=t.call(this)||this;return n.dataProjection=mr("EPSG:4326"),n}return TI(n,t),n.prototype.readFeaturesFromNode=function(t,n){var e=this.getReadOptions(t,n);if("osm"==t.localName){for(var r=Ah({nodes:{},ways:[],features:[]},CI,t,[e]),i=0;i<r.ways.length;i++){for(var o=r.ways[i],s=[],a=0,u=o.ndrefs.length;a<u;a++){w(s,r.nodes[o.ndrefs[a]])}var c=void 0;Hk(c=o.ndrefs[0]==o.ndrefs[o.ndrefs.length-1]?new Zi(s,Et,[s.length]):new Ck(s,Et),!1,e);var f=new Tt(c);f.setId(o.id),f.setProperties(o.tags,!0),r.features.push(f)}if(r.features)return r.features}return[]},n}(JE),II=Th(EI,{tag:PI});function PI(t,n){n[n.length-1].tags[t.getAttribute("k")]=t.getAttribute("v")}var DI=RI,NI=function(){function t(){}return t.prototype.read=function(t){if(t){if("string"==typeof t){var n=mh(t);return this.readFromDocument(n)}return ph(t)?this.readFromDocument(t):this.readFromNode(t)}return null},t.prototype.readFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readFromNode(n);return null},t.prototype.readFromNode=function(t){},t}();function zI(t){return t.getAttributeNS("http://www.w3.org/1999/xlink","href")}var LI=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),FI=[null,"http://www.opengis.net/ows/1.1"],GI=Th(FI,{ServiceIdentification:kh((function(t,n){return Ah({},QI,t,n)})),ServiceProvider:kh((function(t,n){return Ah({},tP,t,n)})),OperationsMetadata:kh((function(t,n){return Ah({},KI,t,n)}))}),UI=function(t){function n(){return t.call(this)||this}return LI(n,t),n.prototype.readFromNode=function(t){var n=Ah({},GI,t,[]);return n||null},n}(NI),BI=Th(FI,{DeliveryPoint:kh(hA),City:kh(hA),AdministrativeArea:kh(hA),PostalCode:kh(hA),Country:kh(hA),ElectronicMailAddress:kh(hA)}),qI=Th(FI,{Value:xh((function(t,n){return hA(t)}))}),$I=Th(FI,{AllowedValues:kh((function(t,n){return Ah({},qI,t,n)}))}),VI=Th(FI,{Phone:kh((function(t,n){return Ah({},XI,t,n)})),Address:kh((function(t,n){return Ah({},BI,t,n)}))}),ZI=Th(FI,{HTTP:kh((function(t,n){return Ah({},WI,t,n)}))}),WI=Th(FI,{Get:xh((function(t,n){var e=zI(t);if(!e)return;return Ah({href:e},YI,t,n)})),Post:void 0}),HI=Th(FI,{DCP:kh((function(t,n){return Ah({},ZI,t,n)}))}),KI=Th(FI,{Operation:function(t,n){var e=t.getAttribute("name"),r=Ah({},HI,t,n);if(!r)return;n[n.length-1][e]=r}}),XI=Th(FI,{Voice:kh(hA),Facsimile:kh(hA)}),YI=Th(FI,{Constraint:xh((function(t,n){var e=t.getAttribute("name");if(!e)return;return Ah({name:e},$I,t,n)}))}),JI=Th(FI,{IndividualName:kh(hA),PositionName:kh(hA),ContactInfo:kh((function(t,n){return Ah({},VI,t,n)}))}),QI=Th(FI,{Abstract:kh(hA),AccessConstraints:kh(hA),Fees:kh(hA),Title:kh(hA),ServiceTypeVersion:kh(hA),ServiceType:kh(hA)}),tP=Th(FI,{ProviderName:kh(hA),ProviderSite:kh(zI),ServiceContact:kh((function(t,n){return Ah({},JI,t,n)}))});var nP=UI,eP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function rP(t,n,e){var r,i=e||1e5,o=new Array(n);for(r=0;r<n;++r)o[r]=0;for(var s=0,a=t.length;s<a;)for(r=0;r<n;++r,++s){var u=t[s],c=u-o[r];o[r]=u,t[s]=c}return oP(t,i)}function iP(t,n,e){var r,i=e||1e5,o=new Array(n);for(r=0;r<n;++r)o[r]=0;for(var s=sP(t,i),a=0,u=s.length;a<u;)for(r=0;r<n;++r,++a)o[r]+=s[a],s[a]=o[r];return s}function oP(t,n){for(var e=n||1e5,r=0,i=t.length;r<i;++r)t[r]=Math.round(t[r]*e);return aP(t)}function sP(t,n){for(var e=n||1e5,r=uP(t),i=0,o=r.length;i<o;++i)r[i]/=e;return r}function aP(t){for(var n=0,e=t.length;n<e;++n){var r=t[n];t[n]=r<0?~(r<<1):r<<1}return cP(t)}function uP(t){for(var n=fP(t),e=0,r=n.length;e<r;++e){var i=n[e];n[e]=1&i?~(i>>1):i>>1}return n}function cP(t){for(var n="",e=0,r=t.length;e<r;++e)n+=hP(t[e]);return n}function fP(t){for(var n=[],e=0,r=0,i=0,o=t.length;i<o;++i){var s=t.charCodeAt(i)-63;e|=(31&s)<<r,s<32?(n.push(e),e=0,r=0):r+=5}return n}function hP(t){for(var n,e="";t>=32;)n=63+(32|31&t),e+=String.fromCharCode(n),t>>=5;return n=t+63,e+=String.fromCharCode(n)}var lP=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.dataProjection=mr("EPSG:4326"),e.vy=r.factor?r.factor:1e5,e.py=r.geometryLayout?r.geometryLayout:Et,e}return eP(n,t),n.prototype.readFeatureFromText=function(t,n){var e=this.readGeometryFromText(t,n);return new Tt(e)},n.prototype.readFeaturesFromText=function(t,n){return[this.readFeatureFromText(t,n)]},n.prototype.readGeometryFromText=function(t,n){var e=Kr(this.py),r=iP(t,e,this.vy);BE(r,0,r.length,e,r);var i=yi(r,0,r.length,e);return Hk(new Ck(i,this.py),!1,this.adaptOptions(n))},n.prototype.writeFeatureText=function(t,n){var e=t.getGeometry();return e?this.writeGeometryText(e,n):(Mt(!1,40),"")},n.prototype.writeFeaturesText=function(t,n){return this.writeFeatureText(t[0],n)},n.prototype.writeGeometryText=function(t,n){var e=(t=Hk(t,!0,this.adaptOptions(n))).getFlatCoordinates(),r=t.getStride();return BE(e,0,e.length,r,e),rP(e,r,this.vy)},n}(pC),vP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),dP=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.Yl=r.layerName,e.Gc=r.layers?r.layers:null,e.dataProjection=mr(r.dataProjection?r.dataProjection:"EPSG:4326"),e}return vP(n,t),n.prototype.readFeaturesFromObject=function(t,n){if("Topology"==t.type){var e=t,r=void 0,i=null,o=null;e.transform&&(i=(r=e.transform).scale,o=r.translate);var s=e.arcs;r&&function(t,n,e){for(var r=0,i=t.length;r<i;++r)wP(t[r],n,e)}(s,i,o);var a=[],u=e.objects,c=this.Yl,f=void 0;for(var h in u)this.Gc&&-1==this.Gc.indexOf(h)||("GeometryCollection"===u[h].type?(f=u[h],a.push.apply(a,mP(f,s,i,o,c,h,n))):(f=u[h],a.push(bP(f,s,i,o,c,h,n))));return a}return[]},n.prototype.readProjectionFromObject=function(t){return this.dataProjection},n}(y_),pP={Point:function(t,n,e){var r=t.coordinates;n&&e&&gP(r,n,e);return new Mi(r)},LineString:function(t,n){var e=yP(t.arcs,n);return new Ck(e)},Polygon:function(t,n){for(var e=[],r=0,i=t.arcs.length;r<i;++r)e[r]=yP(t.arcs[r],n);return new Zi(e)},MultiPoint:function(t,n,e){var r=t.coordinates;if(n&&e)for(var i=0,o=r.length;i<o;++i)gP(r[i],n,e);return new Qk(r)},MultiLineString:function(t,n){for(var e=[],r=0,i=t.arcs.length;r<i;++r)e[r]=yP(t.arcs[r],n);return new Yk(e)},MultiPolygon:function(t,n){for(var e=[],r=0,i=t.arcs.length;r<i;++r){for(var o=t.arcs[r],s=[],a=0,u=o.length;a<u;++a)s[a]=yP(o[a],n);e[r]=s}return new n_(e)}};function yP(t,n){for(var e,r=[],i=0,o=t.length;i<o;++i)if(e=t[i],i>0&&r.pop(),e>=0)for(var s=0,a=(u=n[e]).length;s<a;++s)r.push(u[s].slice(0));else{var u;for(s=(u=n[~e]).length-1;s>=0;--s)r.push(u[s].slice(0))}return r}function mP(t,n,e,r,i,o,s){for(var a=t.geometries,u=[],c=0,f=a.length;c<f;++c)u[c]=bP(a[c],n,e,r,i,o,s);return u}function bP(t,n,e,r,i,o,s){var a=null,u=t.type;if(u){var c=pP[u];a=Hk(a="Point"===u||"MultiPoint"===u?c(t,e,r):c(t,n),!1,s)}var f=new Tt({geometry:a});void 0!==t.id&&f.setId(t.id);var h=t.properties;return i&&(h||(h={}),h[i]=o),h&&f.setProperties(h,!0),f}function wP(t,n,e){for(var r=0,i=0,o=0,s=t.length;o<s;++o){var a=t[o];r+=a[0],i+=a[1],a[0]=r,a[1]=i,gP(a,n,e)}}function gP(t,n,e){t[0]=t[0]*n[0]+e[0],t[1]=t[1]*n[1]+e[1]}var xP=dP,kP=function(){function t(t){this.my=t}return t.prototype.getTagName=function(){return this.my},t}(),_P=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),SP=function(t){function n(n,e){var r=t.call(this,n)||this;return r.conditions=e,Mt(r.conditions.length>=2,57),r}return _P(n,t),n}(kP),MP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),jP=function(t){function n(n){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return MP(n,t),n}(SP),OP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),TP=function(t){function n(n,e,r){var i=t.call(this,"BBOX")||this;if(i.geometryName=n,i.extent=e,4!==e.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return i.srsName=r,i}return OP(n,t),n}(kP),EP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),AP=function(t){function n(n,e,r,i){var o=t.call(this,n)||this;return o.geometryName=e||"the_geom",o.geometry=r,o.srsName=i,o}return EP(n,t),n}(kP),CP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),RP=function(t){function n(n,e,r){return t.call(this,"Contains",n,e,r)||this}return CP(n,t),n}(AP),IP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),PP=function(t){function n(n,e,r,i,o){var s=t.call(this,"DWithin",n,e,o)||this;return s.distance=r,s.unit=i,s}return IP(n,t),n}(AP),DP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),NP=function(t){function n(n,e,r){return t.call(this,"Disjoint",n,e,r)||this}return DP(n,t),n}(AP),zP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),LP=function(t){function n(n,e){var r=t.call(this,n)||this;return r.propertyName=e,r}return zP(n,t),n}(kP),FP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),GP=function(t){function n(n,e,r){var i=t.call(this,"During",n)||this;return i.begin=e,i.end=r,i}return FP(n,t),n}(LP),UP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),BP=function(t){function n(n,e,r,i){var o=t.call(this,n,e)||this;return o.expression=r,o.matchCase=i,o}return UP(n,t),n}(LP),qP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),$P=function(t){function n(n,e,r){return t.call(this,"PropertyIsEqualTo",n,e,r)||this}return qP(n,t),n}(BP),VP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ZP=function(t){function n(n,e){return t.call(this,"PropertyIsGreaterThan",n,e)||this}return VP(n,t),n}(BP),WP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),HP=function(t){function n(n,e){return t.call(this,"PropertyIsGreaterThanOrEqualTo",n,e)||this}return WP(n,t),n}(BP),KP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),XP=function(t){function n(n,e,r){return t.call(this,"Intersects",n,e,r)||this}return KP(n,t),n}(AP),YP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),JP=function(t){function n(n,e,r){var i=t.call(this,"PropertyIsBetween",n)||this;return i.lowerBoundary=e,i.upperBoundary=r,i}return YP(n,t),n}(LP),QP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),tD=function(t){function n(n,e,r,i,o,s){var a=t.call(this,"PropertyIsLike",n)||this;return a.pattern=e,a.wildCard=void 0!==r?r:"*",a.singleChar=void 0!==i?i:".",a.escapeChar=void 0!==o?o:"!",a.matchCase=s,a}return QP(n,t),n}(LP),nD=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),eD=function(t){function n(n){return t.call(this,"PropertyIsNull",n)||this}return nD(n,t),n}(LP),rD=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),iD=function(t){function n(n,e){return t.call(this,"PropertyIsLessThan",n,e)||this}return rD(n,t),n}(BP),oD=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),sD=function(t){function n(n,e){return t.call(this,"PropertyIsLessThanOrEqualTo",n,e)||this}return oD(n,t),n}(BP),aD=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),uD=function(t){function n(n){var e=t.call(this,"Not")||this;return e.condition=n,e}return aD(n,t),n}(kP),cD=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),fD=function(t){function n(n,e,r){return t.call(this,"PropertyIsNotEqualTo",n,e,r)||this}return cD(n,t),n}(BP),hD=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),lD=function(t){function n(n){return t.call(this,"Or",Array.prototype.slice.call(arguments))||this}return hD(n,t),n}(SP),vD=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),dD=function(t){function n(n){var e=t.call(this,"ResourceId")||this;return e.rid=n,e}return vD(n,t),n}(kP),pD=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),yD=function(t){function n(n,e,r){return t.call(this,"Within",n,e,r)||this}return pD(n,t),n}(AP);function mD(t){var n=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(jP,n))}function bD(t,n,e){return new TP(t,n,e)}var wD=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),gD={"http://www.opengis.net/gml":{boundedBy:kh(rA.prototype.readGeometryElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:wh(rA.prototype.readFeaturesInternal)}},xD={"http://www.opengis.net/wfs":{totalInserted:kh(cA),totalUpdated:kh(cA),totalDeleted:kh(cA)},"http://www.opengis.net/wfs/2.0":{totalInserted:kh(cA),totalUpdated:kh(cA),totalDeleted:kh(cA)}},kD={"http://www.opengis.net/wfs":{TransactionSummary:kh(PD,"transactionSummary"),InsertResults:kh(LD,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:kh(PD,"transactionSummary"),InsertResults:kh(LD,"insertIds")}},_D={"http://www.opengis.net/wfs":{PropertyName:_h(mA)},"http://www.opengis.net/wfs/2.0":{PropertyName:_h(mA)}},SD={"http://www.opengis.net/wfs":{Insert:_h(FD),Update:_h(qD),Delete:_h(BD),Property:_h($D),Native:_h(VD)},"http://www.opengis.net/wfs/2.0":{Insert:_h(FD),Update:_h(qD),Delete:_h(BD),Property:_h($D),Native:_h(VD)}},MD="feature",jD="http://www.w3.org/2000/xmlns/",OD={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},TD={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},ED={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},AD={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},CD={"2.0.0":AA,"1.1.0":MA,"1.0.0":xA},RD=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.if=r.version?r.version:"1.1.0",e.wy=r.featureType,e.gy=r.featureNS,e.xy=r.gmlFormat?r.gmlFormat:new CD[e.if],e.ky=r.schemaLocation?r.schemaLocation:AD[e.if],e}return wD(n,t),n.prototype.getFeatureType=function(){return this.wy},n.prototype.setFeatureType=function(t){this.wy=t},n.prototype.readFeaturesFromNode=function(t,n){var e={node:t};E(e,{featureType:this.wy,featureNS:this.gy}),E(e,this.getReadOptions(t,n||{}));var r=[e],i=Ah([],"2.0.0"===this.if?gD:this.xy.FEATURE_COLLECTION_PARSERS,t,r,this.xy);return i||(i=[]),i},n.prototype.readTransactionResponse=function(t){if(t){if("string"==typeof t){var n=mh(t);return this.readTransactionResponseFromDocument(n)}return ph(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}},n.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"==typeof t){var n=mh(t);return this.readFeatureCollectionMetadataFromDocument(n)}return ph(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},n.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(n)},n.prototype.readFeatureCollectionMetadataFromNode=function(t){var n={},e=fA(t.getAttribute("numberOfFeatures"));return n.numberOfFeatures=e,Ah(n,gD,t,[],this.xy)},n.prototype.readTransactionResponseFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(n)},n.prototype.readTransactionResponseFromNode=function(t){return Ah({},kD,t,[])},n.prototype.writeGetFeature=function(t){var n=this,e=lh(TD[this.if],"GetFeature");e.setAttribute("service","WFS"),e.setAttribute("version",this.if),t.handle&&e.setAttribute("handle",t.handle),t.outputFormat&&e.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&e.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&e.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&e.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&e.setAttribute("count",String(t.count)),void 0!==t.viewParams&&e.setAttribute("viewParams",t.viewParams),e.setAttributeNS(hh,"xsi:schemaLocation",this.ky);var r={node:e};if(E(r,{version:this.if,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.gy,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),Mt(Array.isArray(t.featureTypes),11),"string"==typeof t.featureTypes[0]){var i=t.filter;t.bbox&&(Mt(t.geometryName,12),i=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,i)),E(r,{geometryName:t.geometryName,filter:i}),cN(e,t.featureTypes,[r])}else t.featureTypes.forEach((function(i){var o=n.combineBboxAndFilter(i.geometryName,i.bbox,t.srsName,t.filter);E(r,{geometryName:i.geometryName,filter:o}),cN(e,[i.name],[r])}));return e},n.prototype.combineBboxAndFilter=function(t,n,e,r){var i=bD(t,n,e);return r?mD(r,i):i},n.prototype.writeTransaction=function(t,n,e,r){var i,o=[],s=r.version?r.version:this.if,a=lh(TD[s],"Transaction");a.setAttribute("service","WFS"),a.setAttribute("version",s),r&&(i=r.gmlOptions?r.gmlOptions:{},r.handle&&a.setAttribute("handle",r.handle)),a.setAttributeNS(hh,"xsi:schemaLocation",AD[s]);var u=function(t,n,e,r){var i,o=r.featurePrefix?r.featurePrefix:MD;"1.0.0"===e?i=2:"1.1.0"===e?i=3:"2.0.0"===e&&(i=3.2);return E({node:t},{version:e,featureNS:r.featureNS,featureType:r.featureType,featurePrefix:o,gmlVersion:i,hasZ:r.hasZ,srsName:r.srsName},n)}(a,i,s,r);return t&&ID("Insert",t,o,u),n&&ID("Update",n,o,u),e&&ID("Delete",e,o,u),r.nativeElements&&ID("Native",r.nativeElements,o,u),a},n.prototype.readProjectionFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(n);return null},n.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(var n=(t=t.firstElementChild.firstElementChild).firstElementChild;n;n=n.nextElementSibling)if(0!==n.childNodes.length&&(1!==n.childNodes.length||3!==n.firstChild.nodeType)){var e=[{}];return this.xy.readGeometryElement(n,e),mr(e.pop().srsName)}return null},n}(JE);function ID(t,n,e,r){Rh(r,SD,Mh(t),n,e)}function PD(t,n){return Ah({},xD,t,n)}var DD={"http://www.opengis.net/ogc":{FeatureId:wh((function(t,n){return t.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:wh((function(t,n){return t.getAttribute("fid")}))}};function ND(t,n){Eh(DD,t,n)}var zD={"http://www.opengis.net/wfs":{Feature:ND},"http://www.opengis.net/wfs/2.0":{Feature:ND}};function LD(t,n){return Ah([],zD,t,n)}function FD(t,n,e){var r=e[e.length-1],i=r.featureType,o=r.featureNS,s=r.gmlVersion,a=lh(o,i);t.appendChild(a),2===s?xA.prototype.writeFeatureElement(a,n,e):3===s?MA.prototype.writeFeatureElement(a,n,e):AA.prototype.writeFeatureElement(a,n,e)}function GD(t,n,e){var r=e[e.length-1].version,i=OD[r],o=lh(i,"Filter"),s=lh(i,"FeatureId");o.appendChild(s),s.setAttribute("fid",n),t.appendChild(o)}function UD(t,n){var e=(t=t||MD)+":";return 0===n.indexOf(e)?n:e+n}function BD(t,n,e){var r=e[e.length-1];Mt(void 0!==n.getId(),26);var i=r.featureType,o=r.featurePrefix,s=r.featureNS,a=UD(o,i);t.setAttribute("typeName",a),t.setAttributeNS(jD,"xmlns:"+o,s);var u=n.getId();void 0!==u&&GD(t,u,e)}function qD(t,n,e){var r=e[e.length-1];Mt(void 0!==n.getId(),27);var i=r.version,o=r.featureType,s=r.featurePrefix,a=r.featureNS,u=UD(s,o),c=n.getGeometryName();t.setAttribute("typeName",u),t.setAttributeNS(jD,"xmlns:"+s,a);var f=n.getId();if(void 0!==f){for(var h=n.getKeys(),l=[],v=0,d=h.length;v<d;v++){var p=n.get(h[v]);if(void 0!==p){var y=h[v];p&&"function"==typeof p.getSimplifiedGeometry&&(y=c),l.push({name:y,value:p})}}Rh({version:i,gmlVersion:r.gmlVersion,node:t,hasZ:r.hasZ,srsName:r.srsName},SD,Mh("Property"),l,e),GD(t,f,e)}}function $D(t,n,e){var r=e[e.length-1],i=r.version,o=TD[i],s=lh(o,"Name"),a=r.gmlVersion;if(t.appendChild(s),mA(s,n.name),void 0!==n.value&&null!==n.value){var u=lh(o,"Value");t.appendChild(u),n.value&&"function"==typeof n.value.getSimplifiedGeometry?2===a?xA.prototype.writeGeometryElement(u,n.value,e):3===a?MA.prototype.writeGeometryElement(u,n.value,e):AA.prototype.writeGeometryElement(u,n.value,e):mA(u,n.value)}}function VD(t,n,e){n.vendorId&&t.setAttribute("vendorId",n.vendorId),void 0!==n.safeToIgnore&&t.setAttribute("safeToIgnore",String(n.safeToIgnore)),void 0!==n.value&&mA(t,n.value)}var ZD={"http://www.opengis.net/wfs":{Query:_h(WD)},"http://www.opengis.net/wfs/2.0":{Query:_h(WD)},"http://www.opengis.net/ogc":{During:_h(JD),And:_h(QD),Or:_h(QD),Not:_h(tN),BBOX:_h(KD),Contains:_h(XD),Intersects:_h(XD),Within:_h(XD),DWithin:_h(YD),PropertyIsEqualTo:_h(nN),PropertyIsNotEqualTo:_h(nN),PropertyIsLessThan:_h(nN),PropertyIsLessThanOrEqualTo:_h(nN),PropertyIsGreaterThan:_h(nN),PropertyIsGreaterThanOrEqualTo:_h(nN),PropertyIsNull:_h(eN),PropertyIsBetween:_h(rN),PropertyIsLike:_h(iN)},"http://www.opengis.net/fes/2.0":{During:_h(JD),And:_h(QD),Or:_h(QD),Not:_h(tN),BBOX:_h(KD),Contains:_h(XD),Disjoint:_h(XD),Intersects:_h(XD),ResourceId:_h((function(t,n,e){t.setAttribute("rid",n.rid)})),Within:_h(XD),DWithin:_h(YD),PropertyIsEqualTo:_h(nN),PropertyIsNotEqualTo:_h(nN),PropertyIsLessThan:_h(nN),PropertyIsLessThanOrEqualTo:_h(nN),PropertyIsGreaterThan:_h(nN),PropertyIsGreaterThanOrEqualTo:_h(nN),PropertyIsNull:_h(eN),PropertyIsBetween:_h(rN),PropertyIsLike:_h(iN)}};function WD(t,n,e){var r,i,o=e[e.length-1],s=o.version,a=o.featurePrefix,u=o.featureNS,c=o.propertyNames,f=o.srsName;r=a?UD(a,n):n,i="2.0.0"===s?"typeNames":"typeName",t.setAttribute(i,r),f&&t.setAttribute("srsName",f),u&&t.setAttributeNS(jD,"xmlns:"+a,u);var h=E({},o);h.node=t,Rh(h,_D,Mh("PropertyName"),c,e);var l=o.filter;if(l){var v=lh(fN(s),"Filter");t.appendChild(v),HD(v,l,e)}}function HD(t,n,e){var r=e[e.length-1],i={node:t};E(i,{context:r}),Rh(i,ZD,Mh(n.getTagName()),[n],e)}function KD(t,n,e){var r=e[e.length-1],i=r.context.version;r.srsName=n.srsName;var o=CD[i];aN(i,t,n.geometryName),o.prototype.writeGeometryElement(t,n.extent,e)}function XD(t,n,e){var r=e[e.length-1],i=r.context.version;r.srsName=n.srsName;var o=CD[i];aN(i,t,n.geometryName),o.prototype.writeGeometryElement(t,n.geometry,e)}function YD(t,n,e){var r=e[e.length-1].context.version;XD(t,n,e);var i=lh(fN(r),"Distance");mA(i,n.distance.toString()),"2.0.0"===r?i.setAttribute("uom",n.unit):i.setAttribute("units",n.unit),t.appendChild(i)}function JD(t,n,e){var r=e[e.length-1].context.version;oN(ED[r],"ValueReference",t,n.propertyName);var i=lh(tA,"TimePeriod");t.appendChild(i);var o=lh(tA,"begin");i.appendChild(o),uN(o,n.begin);var s=lh(tA,"end");i.appendChild(s),uN(s,n.end)}function QD(t,n,e){var r=e[e.length-1].context,i={node:t};E(i,{context:r});for(var o=n.conditions,s=0,a=o.length;s<a;++s){var u=o[s];Rh(i,ZD,Mh(u.getTagName()),[u],e)}}function tN(t,n,e){var r=e[e.length-1].context,i={node:t};E(i,{context:r});var o=n.condition;Rh(i,ZD,Mh(o.getTagName()),[o],e)}function nN(t,n,e){var r=e[e.length-1].context.version;void 0!==n.matchCase&&t.setAttribute("matchCase",n.matchCase.toString()),aN(r,t,n.propertyName),sN(r,t,""+n.expression)}function eN(t,n,e){aN(e[e.length-1].context.version,t,n.propertyName)}function rN(t,n,e){var r=e[e.length-1].context.version,i=fN(r);aN(r,t,n.propertyName);var o=lh(i,"LowerBoundary");t.appendChild(o),sN(r,o,""+n.lowerBoundary);var s=lh(i,"UpperBoundary");t.appendChild(s),sN(r,s,""+n.upperBoundary)}function iN(t,n,e){var r=e[e.length-1].context.version;t.setAttribute("wildCard",n.wildCard),t.setAttribute("singleChar",n.singleChar),t.setAttribute("escapeChar",n.escapeChar),void 0!==n.matchCase&&t.setAttribute("matchCase",n.matchCase.toString()),aN(r,t,n.propertyName),sN(r,t,""+n.pattern)}function oN(t,n,e,r){var i=lh(t,n);mA(i,r),e.appendChild(i)}function sN(t,n,e){oN(fN(t),"Literal",n,e)}function aN(t,n,e){"2.0.0"===t?oN(ED[t],"ValueReference",n,e):oN(OD[t],"PropertyName",n,e)}function uN(t,n){var e=lh(tA,"TimeInstant");t.appendChild(e);var r=lh(tA,"timePosition");e.appendChild(r),mA(r,n)}function cN(t,n,e){var r=e[e.length-1],i=E({},r);i.node=t,Rh(i,ZD,Mh("Query"),n,e)}function fN(t){return"2.0.0"===t?ED[t]:OD[t]}var hN=RD,lN=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),vN=1,dN=2,pN=3,yN=4,mN=5,bN=6,wN=7,gN=15,xN=16,kN=17,_N=function(){function t(t){this._y=t,this.Sy=0,this.My=!1,this.jy=!1,this.Oy=!1,this.Ty=!1,this.Ey=null,this.Ay=Et}return t.prototype.readUint8=function(){return this._y.getUint8(this.Sy++)},t.prototype.readUint32=function(t){return this._y.getUint32((this.Sy+=4)-4,void 0!==t?t:this.jy)},t.prototype.readDouble=function(t){return this._y.getFloat64((this.Sy+=8)-8,void 0!==t?t:this.jy)},t.prototype.readPoint=function(){var t=[];return t.push(this.readDouble()),t.push(this.readDouble()),this.Oy&&t.push(this.readDouble()),this.Ty&&t.push(this.readDouble()),t},t.prototype.readLineString=function(){for(var t=this.readUint32(),n=[],e=0;e<t;e++)n.push(this.readPoint());return n},t.prototype.readPolygon=function(){for(var t=this.readUint32(),n=[],e=0;e<t;e++)n.push(this.readLineString());return n},t.prototype.readWkbHeader=function(t){var n=this.readUint8()>0,e=this.readUint32(n),r=Math.floor((268435455&e)/1e3),i=Boolean(2147483648&e)||1===r||3===r,o=Boolean(1073741824&e)||2===r||3===r,s=Boolean(536870912&e),a=(268435455&e)%1e3,u=["XY",i?"Z":"",o?"M":""].join(""),c=s?this.readUint32(n):null;if(void 0!==t&&t!==a)throw new Error("Unexpected WKB geometry type "+a);if(this.My){if(this.jy!==n)throw new Error("Inconsistent endian");if(this.Ay!==u)throw new Error("Inconsistent geometry layout");if(c&&this.Ey!==c)throw new Error("Inconsistent coordinate system (SRID)")}else this.jy=n,this.Oy=i,this.Ty=o,this.Ay=u,this.Ey=c,this.My=!0;return a},t.prototype.readWkbPayload=function(t){switch(t){case vN:return this.readPoint();case dN:return this.readLineString();case pN:case kN:return this.readPolygon();case yN:return this.readMultiPoint();case mN:return this.readMultiLineString();case bN:case gN:case xN:return this.readMultiPolygon();case wN:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+t+" is found")}},t.prototype.readWkbBlock=function(t){return this.readWkbPayload(this.readWkbHeader(t))},t.prototype.readWkbCollection=function(t,n){for(var e=this.readUint32(),r=[],i=0;i<e;i++){var o=t.call(this,n);o&&r.push(o)}return r},t.prototype.readMultiPoint=function(){return this.readWkbCollection(this.readWkbBlock,vN)},t.prototype.readMultiLineString=function(){return this.readWkbCollection(this.readWkbBlock,dN)},t.prototype.readMultiPolygon=function(){return this.readWkbCollection(this.readWkbBlock,pN)},t.prototype.readGeometryCollection=function(){return this.readWkbCollection(this.readGeometry)},t.prototype.readGeometry=function(){var t=this.readWkbHeader(),n=this.readWkbPayload(t);switch(t){case vN:return new Mi(n,this.Ay);case dN:return new Ck(n,this.Ay);case pN:case kN:return new Zi(n,this.Ay);case yN:return new Qk(n,this.Ay);case mN:return new Yk(n,this.Ay);case bN:case gN:case xN:return new n_(n,this.Ay);case wN:return new v_(n);default:return null}},t.prototype.getSrid=function(){return this.Ey},t}(),SN=function(){function t(t){t=t||{},this.Ay=t.layout,this.jy=!1!==t.littleEndian,this.Cy=!1!==t.ewkb,this.Ry=[],this.Iy=E({X:0,Y:0,Z:0,M:0},t.nodata)}return t.prototype.writeUint8=function(t){this.Ry.push([1,t])},t.prototype.writeUint32=function(t){this.Ry.push([4,t])},t.prototype.writeDouble=function(t){this.Ry.push([8,t])},t.prototype.writePoint=function(t,n){for(var e=E.apply(null,n.split("").map((function(n,e){var r;return(r={})[n]=t[e],r}))),r=0,i=this.Ay;r<i.length;r++){var o=i[r];this.writeDouble(o in e?e[o]:this.Iy[o])}},t.prototype.writeLineString=function(t,n){this.writeUint32(t.length);for(var e=0;e<t.length;e++)this.writePoint(t[e],n)},t.prototype.writePolygon=function(t,n){this.writeUint32(t.length);for(var e=0;e<t.length;e++)this.writeLineString(t[e],n)},t.prototype.writeWkbHeader=function(t,n){t%=1e3,this.Ay.indexOf("Z")>=0&&(t+=this.Cy?2147483648:1e3),this.Ay.indexOf("M")>=0&&(t+=this.Cy?1073741824:2e3),this.Cy&&Number.isInteger(n)&&(t|=536870912),this.writeUint8(this.jy?1:0),this.writeUint32(t),this.Cy&&Number.isInteger(n)&&this.writeUint32(n)},t.prototype.writeMultiPoint=function(t,n){this.writeUint32(t.length);for(var e=0;e<t.length;e++)this.writeWkbHeader(1),this.writePoint(t[e],n)},t.prototype.writeMultiLineString=function(t,n){this.writeUint32(t.length);for(var e=0;e<t.length;e++)this.writeWkbHeader(2),this.writeLineString(t[e],n)},t.prototype.writeMultiPolygon=function(t,n){this.writeUint32(t.length);for(var e=0;e<t.length;e++)this.writeWkbHeader(3),this.writePolygon(t[e],n)},t.prototype.writeGeometryCollection=function(t){this.writeUint32(t.length);for(var n=0;n<t.length;n++)this.writeGeometry(t[n])},t.prototype.findMinimumLayout=function(t,n){void 0===n&&(n=Rt);var e,r;if(t instanceof Yr)return(e=t.getLayout())===(r=n)?e:e===Rt?r:r===Rt?e:Et;if(t instanceof v_)for(var i=t.getGeometriesArray(),o=0;o<i.length&&n!==Et;o++)n=this.findMinimumLayout(i[o],n);return n},t.prototype.writeGeometry=function(t,n){var e,r,i=((e={})[It.POINT]=vN,e[It.LINE_STRING]=dN,e[It.POLYGON]=pN,e[It.MULTI_POINT]=yN,e[It.MULTI_LINE_STRING]=mN,e[It.MULTI_POLYGON]=bN,e[It.GEOMETRY_COLLECTION]=wN,e),o=t.getType(),s=i[o];if(!s)throw new Error("GeometryType "+o+" is not supported");(this.Ay||(this.Ay=this.findMinimumLayout(t)),this.writeWkbHeader(s,n),t instanceof Yr)?((r={})[It.POINT]=this.writePoint,r[It.LINE_STRING]=this.writeLineString,r[It.POLYGON]=this.writePolygon,r[It.MULTI_POINT]=this.writeMultiPoint,r[It.MULTI_LINE_STRING]=this.writeMultiLineString,r[It.MULTI_POLYGON]=this.writeMultiPolygon,r)[o].call(this,t.getCoordinates(),t.getLayout()):t instanceof v_&&this.writeGeometryCollection(t.getGeometriesArray())},t.prototype.getBuffer=function(){var t=this,n=this.Ry.reduce((function(t,n){return t+n[0]}),0),e=new ArrayBuffer(n),r=new DataView(e),i=0;return this.Ry.forEach((function(n){switch(n[0]){case 1:r.setUint8(i,n[1]);break;case 4:r.setUint32(i,n[1],t.jy);break;case 8:r.setFloat64(i,n[1],t.jy)}i+=n[0]})),e},t}();function MN(t){return"string"==typeof t?function(t){for(var n=new Uint8Array(t.length/2),e=0;e<t.length/2;e++)n[e]=parseInt(t.substr(2*e,2),16);return new DataView(n.buffer)}(t):ArrayBuffer.isView(t)?t instanceof DataView?t:new DataView(t.buffer,t.byteOffset,t.byteLength):t instanceof ArrayBuffer?new DataView(t):null}var jN=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.splitCollection=Boolean(r.splitCollection),e.Py=null,e.Dy=!1!==r.hex,e.Ny=!1!==r.littleEndian,e.zy=!1!==r.ewkb,e.Ay=r.geometryLayout,e.Ly=r.nodataZ||0,e.Fy=r.nodataM||0,e.Ey=r.srid,e}return lN(n,t),n.prototype.getType=function(){return this.Dy?of:ef},n.prototype.readFeature=function(t,n){return new Tt({geometry:this.readGeometry(t,n)})},n.prototype.readFeatures=function(t,n){var e=this.readGeometry(t,n);return(this.splitCollection&&e instanceof v_?e.getGeometriesArray():[e]).map((function(t){return new Tt({geometry:t})}))},n.prototype.readGeometry=function(t,n){var e=MN(t);if(!e)return null;var r=new _N(e).readGeometry();this.Py=e;var i=this.getReadOptions(t,n);return this.Py=null,Hk(r,!1,i)},n.prototype.readProjection=function(t){var n=this.Py||MN(t);if(n){var e=new _N(n);return e.readWkbHeader(),e.getSrid()&&mr("EPSG:"+e.getSrid())||void 0}},n.prototype.writeFeature=function(t,n){return this.writeGeometry(t.getGeometry(),n)},n.prototype.writeFeatures=function(t,n){return this.writeGeometry(new v_(t.map((function(t){return t.getGeometry()}))),n)},n.prototype.writeGeometry=function(t,n){var e=this.adaptOptions(n),r=new SN({layout:this.Ay,littleEndian:this.Ny,ewkb:this.zy,nodata:{Z:this.Ly,M:this.Fy}}),i=Number.isInteger(this.Ey)?Number(this.Ey):null;if(!1!==this.Ey&&!Number.isInteger(this.Ey)){var o=e.dataProjection&&mr(e.dataProjection);if(o){var s=o.getCode();0===s.indexOf("EPSG:")&&(i=Number(s.substring(5)))}}r.writeGeometry(Hk(t,!0,e),i);var a=r.getBuffer();return this.Dy?function(t){var n=new Uint8Array(t);return Array.from(n.values()).map((function(t){return(t<16?"0":"")+Number(t).toString(16).toUpperCase()})).join("")}(a):a},n}(Wk),ON=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),TN={POINT:Mi,LINESTRING:Ck,POLYGON:Zi,MULTIPOINT:Qk,MULTILINESTRING:Yk,MULTIPOLYGON:n_},EN="EMPTY",AN=0,CN=1,RN=2,IN=3,PN=4,DN=5,NN=6,zN={};for(var LN in It)zN[LN]=It[LN].toUpperCase();var FN=function(){function t(t){this.wkt=t,this.Gy=-1}return t.prototype.Uy=function(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.By=function(t,n){return t>="0"&&t<="9"||"."==t&&!(void 0!==n&&n)},t.prototype.qy=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype.$y=function(){return this.wkt.charAt(++this.Gy)},t.prototype.nextToken=function(){var t,n=this.$y(),e=this.Gy,r=n;if("("==n)t=RN;else if(","==n)t=DN;else if(")"==n)t=IN;else if(this.By(n)||"-"==n)t=PN,r=this.Vy();else if(this.Uy(n))t=CN,r=this.Zy();else{if(this.qy(n))return this.nextToken();if(""!==n)throw new Error("Unexpected character: "+n);t=NN}return{position:e,value:r,type:t}},t.prototype.Vy=function(){var t,n=this.Gy,e=!1,r=!1;do{"."==t?e=!0:"e"!=t&&"E"!=t||(r=!0),t=this.$y()}while(this.By(t,e)||!r&&("e"==t||"E"==t)||r&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(n,this.Gy--))},t.prototype.Zy=function(){var t,n=this.Gy;do{t=this.$y()}while(this.Uy(t));return this.wkt.substring(n,this.Gy--).toUpperCase()},t}(),GN=function(){function t(t){this.Wy=t,this.Hy={position:0,type:AN},this.Ay=Et}return t.prototype.Ky=function(){this.Hy=this.Wy.nextToken()},t.prototype.isTokenType=function(t){return this.Hy.type==t},t.prototype.match=function(t){var n=this.isTokenType(t);return n&&this.Ky(),n},t.prototype.parse=function(){return this.Ky(),this.Xy()},t.prototype.Yy=function(){var t=Et,n=this.Hy;if(this.isTokenType(CN)){var e=n.value;"Z"===e?t=At:"M"===e?t=Ct:"ZM"===e&&(t=Rt),t!==Et&&this.Ky()}return t},t.prototype.Jy=function(){if(this.match(RN)){var t=[];do{t.push(this.Xy())}while(this.match(DN));if(this.match(IN))return t}throw new Error(this.Qy())},t.prototype.tm=function(){if(this.match(RN)){var t=this.nm();if(this.match(IN))return t}throw new Error(this.Qy())},t.prototype.rm=function(){if(this.match(RN)){var t=this.im();if(this.match(IN))return t}throw new Error(this.Qy())},t.prototype.om=function(){if(this.match(RN)){var t=this.sm();if(this.match(IN))return t}throw new Error(this.Qy())},t.prototype.am=function(){if(this.match(RN)){var t=void 0;if(t=this.Hy.type==RN?this.um():this.im(),this.match(IN))return t}throw new Error(this.Qy())},t.prototype.fm=function(){if(this.match(RN)){var t=this.sm();if(this.match(IN))return t}throw new Error(this.Qy())},t.prototype.hm=function(){if(this.match(RN)){var t=this.lm();if(this.match(IN))return t}throw new Error(this.Qy())},t.prototype.nm=function(){for(var t=[],n=this.Ay.length,e=0;e<n;++e){var r=this.Hy;if(!this.match(PN))break;t.push(r.value)}if(t.length==n)return t;throw new Error(this.Qy())},t.prototype.im=function(){for(var t=[this.nm()];this.match(DN);)t.push(this.nm());return t},t.prototype.um=function(){for(var t=[this.tm()];this.match(DN);)t.push(this.tm());return t},t.prototype.sm=function(){for(var t=[this.rm()];this.match(DN);)t.push(this.rm());return t},t.prototype.lm=function(){for(var t=[this.om()];this.match(DN);)t.push(this.om());return t},t.prototype.vm=function(){var t=this.isTokenType(CN)&&this.Hy.value==EN;return t&&this.Ky(),t},t.prototype.Qy=function(){return"Unexpected `"+this.Hy.value+"` at position "+this.Hy.position+" in `"+this.Wy.wkt+"`"},t.prototype.Xy=function(){var t=this.Hy;if(this.match(CN)){var n=t.value;this.Ay=this.Yy();var e=this.vm();if("GEOMETRYCOLLECTION"==n){if(e)return new v_([]);var r=this.Jy();return new v_(r)}var i=TN[n];if(!i)throw new Error("Invalid geometry type: "+n);var o=void 0;if(e)o="POINT"==n?[NaN,NaN]:[];else switch(n){case"POINT":o=this.tm();break;case"LINESTRING":o=this.rm();break;case"POLYGON":o=this.om();break;case"MULTIPOINT":o=this.am();break;case"MULTILINESTRING":o=this.fm();break;case"MULTIPOLYGON":o=this.hm()}return new i(o,this.Ay)}throw new Error(this.Qy())},t}(),UN=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.dm=void 0!==r.splitCollection&&r.splitCollection,e}return ON(n,t),n.prototype.pm=function(t){var n=new FN(t);return new GN(n).parse()},n.prototype.readFeatureFromText=function(t,n){var e=this.readGeometryFromText(t,n),r=new Tt;return r.setGeometry(e),r},n.prototype.readFeaturesFromText=function(t,n){for(var e=[],r=this.readGeometryFromText(t,n),i=[],o=0,s=(e=this.dm&&r.getType()==It.GEOMETRY_COLLECTION?r.getGeometriesArray():[r]).length;o<s;++o){var a=new Tt;a.setGeometry(e[o]),i.push(a)}return i},n.prototype.readGeometryFromText=function(t,n){return Hk(this.pm(t),!1,n)},n.prototype.writeFeatureText=function(t,n){var e=t.getGeometry();return e?this.writeGeometryText(e,n):""},n.prototype.writeFeaturesText=function(t,n){if(1==t.length)return this.writeFeatureText(t[0],n);for(var e=[],r=0,i=t.length;r<i;++r)e.push(t[r].getGeometry());var o=new v_(e);return this.writeGeometryText(o,n)},n.prototype.writeGeometryText=function(t,n){return ZN(Hk(t,!0,n))},n}(pC);function BN(t){var n=t.getCoordinates();return 0===n.length?"":n.join(" ")}function qN(t){for(var n=t.getCoordinates(),e=[],r=0,i=n.length;r<i;++r)e.push(n[r].join(" "));return e.join(",")}function $N(t){for(var n=[],e=t.getLinearRings(),r=0,i=e.length;r<i;++r)n.push("("+qN(e[r])+")");return n.join(",")}var VN={Point:BN,LineString:qN,Polygon:$N,MultiPoint:function(t){for(var n=[],e=t.getPoints(),r=0,i=e.length;r<i;++r)n.push("("+BN(e[r])+")");return n.join(",")},MultiLineString:function(t){for(var n=[],e=t.getLineStrings(),r=0,i=e.length;r<i;++r)n.push("("+qN(e[r])+")");return n.join(",")},MultiPolygon:function(t){for(var n=[],e=t.getPolygons(),r=0,i=e.length;r<i;++r)n.push("("+$N(e[r])+")");return n.join(",")},GeometryCollection:function(t){for(var n=[],e=t.getGeometries(),r=0,i=e.length;r<i;++r)n.push(ZN(e[r]));return n.join(",")}};function ZN(t){var n=t.getType(),e=(0,VN[n])(t);if(n=n.toUpperCase(),"function"==typeof t.getFlatCoordinates){var r=function(t){var n=t.getLayout(),e="";return n!==At&&n!==Rt||(e+="Z"),n!==Ct&&n!==Rt||(e+="M"),e}(t);r.length>0&&(n+=" "+r)}return 0===e.length?n+" "+EN:n+"("+e+")"}var WN=UN,HN=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),KN=[null,"http://www.opengis.net/wms"],XN=Th(KN,{Service:kh((function(t,n){return Ah({},QN,t,n)})),Capability:kh((function(t,n){return Ah({},YN,t,n)}))}),YN=Th(KN,{Request:kh((function(t,n){return Ah({},az,t,n)})),Exception:kh((function(t,n){return Ah([],rz,t,n)})),Layer:kh((function(t,n){var e=Ah({},iz,t,n);if(void 0===e.Layer)return Object.assign(e,dz(t,n));return e}))}),JN=function(t){function n(){var n=t.call(this)||this;return n.version=void 0,n}return HN(n,t),n.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var n=Ah({version:this.version},XN,t,[]);return n||null},n}(NI),QN=Th(KN,{Name:kh(hA),Title:kh(hA),Abstract:kh(hA),KeywordList:kh(bz),OnlineResource:kh(zI),ContactInformation:kh((function(t,n){return Ah({},tz,t,n)})),Fees:kh(hA),AccessConstraints:kh(hA),LayerLimit:kh(cA),MaxWidth:kh(cA),MaxHeight:kh(cA)}),tz=Th(KN,{ContactPersonPrimary:kh((function(t,n){return Ah({},nz,t,n)})),ContactPosition:kh(hA),ContactAddress:kh((function(t,n){return Ah({},ez,t,n)})),ContactVoiceTelephone:kh(hA),ContactFacsimileTelephone:kh(hA),ContactElectronicMailAddress:kh(hA)}),nz=Th(KN,{ContactPerson:kh(hA),ContactOrganization:kh(hA)}),ez=Th(KN,{AddressType:kh(hA),Address:kh(hA),City:kh(hA),StateOrProvince:kh(hA),PostCode:kh(hA),Country:kh(hA)}),rz=Th(KN,{Format:wh(hA)}),iz=Th(KN,{Name:kh(hA),Title:kh(hA),Abstract:kh(hA),KeywordList:kh(bz),CRS:xh(hA),EX_GeographicBoundingBox:kh((function(t,n){var e=Ah({},sz,t,n);if(!e)return;var r=e.westBoundLongitude,i=e.southBoundLatitude,o=e.eastBoundLongitude,s=e.northBoundLatitude;if(void 0===r||void 0===i||void 0===o||void 0===s)return;return[r,i,o,s]})),BoundingBox:xh((function(t,n){var e=[uA(t.getAttribute("minx")),uA(t.getAttribute("miny")),uA(t.getAttribute("maxx")),uA(t.getAttribute("maxy"))],r=[uA(t.getAttribute("resx")),uA(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:e,res:r}})),Dimension:xh((function(t,n){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:oA(t.getAttribute("multipleValues")),nearestValue:oA(t.getAttribute("nearestValue")),current:oA(t.getAttribute("current")),values:hA(t)}})),Attribution:kh((function(t,n){return Ah({},oz,t,n)})),AuthorityURL:xh((function(t,n){var e=pz(t,n);if(e)return e.name=t.getAttribute("name"),e;return})),Identifier:xh(hA),MetadataURL:xh((function(t,n){var e=pz(t,n);if(e)return e.type=t.getAttribute("type"),e;return})),DataURL:xh(pz),FeatureListURL:xh(pz),Style:xh((function(t,n){return Ah({},hz,t,n)})),MinScaleDenominator:kh(aA),MaxScaleDenominator:kh(aA),Layer:xh(dz)}),oz=Th(KN,{Title:kh(hA),OnlineResource:kh(zI),LogoURL:kh(mz)}),sz=Th(KN,{westBoundLongitude:kh(aA),eastBoundLongitude:kh(aA),southBoundLatitude:kh(aA),northBoundLatitude:kh(aA)}),az=Th(KN,{GetCapabilities:kh(yz),GetMap:kh(yz),GetFeatureInfo:kh(yz)}),uz=Th(KN,{Format:xh(hA),DCPType:xh((function(t,n){return Ah({},cz,t,n)}))}),cz=Th(KN,{HTTP:kh((function(t,n){return Ah({},fz,t,n)}))}),fz=Th(KN,{Get:kh(pz),Post:kh(pz)}),hz=Th(KN,{Name:kh(hA),Title:kh(hA),Abstract:kh(hA),LegendURL:xh(mz),StyleSheetURL:kh(pz),StyleURL:kh(pz)}),lz=Th(KN,{Format:kh(hA),OnlineResource:kh(zI)}),vz=Th(KN,{Keyword:wh(hA)});function dz(t,n){var e=n[n.length-1],r=Ah({},iz,t,n);if(r){var i=oA(t.getAttribute("queryable"));void 0===i&&(i=e.queryable),r.queryable=void 0!==i&&i;var o=fA(t.getAttribute("cascaded"));void 0===o&&(o=e.cascaded),r.cascaded=o;var s=oA(t.getAttribute("opaque"));void 0===s&&(s=e.opaque),r.opaque=void 0!==s&&s;var a=oA(t.getAttribute("noSubsets"));void 0===a&&(a=e.noSubsets),r.noSubsets=void 0!==a&&a;var u=uA(t.getAttribute("fixedWidth"));u||(u=e.fixedWidth),r.fixedWidth=u;var c=uA(t.getAttribute("fixedHeight"));c||(c=e.fixedHeight),r.fixedHeight=c;["Style","CRS","AuthorityURL"].forEach((function(t){if(t in e){var n=r[t]||[];r[t]=n.concat(e[t])}}));return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach((function(t){if(!(t in r)){var n=e[t];r[t]=n}})),r}}function pz(t,n){return Ah({},lz,t,n)}function yz(t,n){return Ah({},uz,t,n)}function mz(t,n){var e=pz(t,n);if(e){var r=[fA(t.getAttribute("width")),fA(t.getAttribute("height"))];return e.size=r,e}}function bz(t,n){return Ah([],vz,t,n)}var wz=JN,gz=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),xz=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.gy="http://mapserver.gis.umn.edu/mapserver",e.xy=new xA,e.Gc=r.layers?r.layers:null,e}return gz(n,t),n.prototype.getLayers=function(){return this.Gc},n.prototype.setLayers=function(t){this.Gc=t},n.prototype.ym=function(t,n){t.setAttribute("namespaceURI",this.gy);var e=t.localName,r=[];if(0===t.childNodes.length)return r;if("msGMLOutput"==e)for(var i=0,o=t.childNodes.length;i<o;i++){var s=t.childNodes[i];if(s.nodeType===Node.ELEMENT_NODE){var a=s,u=n[0],c=a.localName.replace("_layer","");if(!this.Gc||y(this.Gc,c)){var f=c+"_feature";u.featureType=f,u.featureNS=this.gy;var h={};h[f]=wh(this.xy.readFeatureElement,this.xy);var l=Th([u.featureNS,null],h);a.setAttribute("namespaceURI",this.gy);var v=Ah([],l,a,n,this.xy);v&&w(r,v)}}}if("FeatureCollection"==e){var d=Ah([],this.xy.FEATURE_COLLECTION_PARSERS,t,[{}],this.xy);d&&(r=d)}return r},n.prototype.readFeaturesFromNode=function(t,n){var e={};return n&&E(e,this.getReadOptions(t,n)),this.ym(t,[e])},n}(JE),kz=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),_z=[null,"http://www.opengis.net/wmts/1.0"],Sz=[null,"http://www.opengis.net/ows/1.1"],Mz=Th(_z,{Contents:kh((function(t,n){return Ah({},Oz,t,n)}))}),jz=function(t){function n(){var n=t.call(this)||this;return n.bm=new nP,n}return kz(n,t),n.prototype.readFromNode=function(t){var n=t.getAttribute("version");n&&(n=n.trim());var e=this.bm.readFromNode(t);return e?(e.version=n,(e=Ah(e,Mz,t,[]))||null):null},n}(NI),Oz=Th(_z,{Layer:xh((function(t,n){return Ah({},Tz,t,n)})),TileMatrixSet:xh((function(t,n){return Ah({},Dz,t,n)}))}),Tz=Th(_z,{Style:xh((function(t,n){var e=Ah({},Ez,t,n);if(!e)return;var r="true"===t.getAttribute("isDefault");return e.isDefault=r,e})),Format:xh(hA),TileMatrixSetLink:xh((function(t,n){return Ah({},Az,t,n)})),Dimension:xh((function(t,n){return Ah({},Iz,t,n)})),ResourceURL:xh((function(t,n){var e=t.getAttribute("format"),r=t.getAttribute("template"),i=t.getAttribute("resourceType"),o={};e&&(o.format=e);r&&(o.template=r);i&&(o.resourceType=i);return o}))},Th(Sz,{Title:kh(hA),Abstract:kh(hA),WGS84BoundingBox:kh(zz),Identifier:kh(hA)})),Ez=Th(_z,{LegendURL:xh((function(t,n){var e={};return e.format=t.getAttribute("format"),e.href=zI(t),e}))},Th(Sz,{Title:kh(hA),Identifier:kh(hA)})),Az=Th(_z,{TileMatrixSet:kh(hA),TileMatrixSetLimits:kh((function(t,n){return Ah([],Cz,t,n)}))}),Cz=Th(_z,{TileMatrixLimits:wh((function(t,n){return Ah({},Rz,t,n)}))}),Rz=Th(_z,{TileMatrix:kh(hA),MinTileRow:kh(cA),MaxTileRow:kh(cA),MinTileCol:kh(cA),MaxTileCol:kh(cA)}),Iz=Th(_z,{Default:kh(hA),Value:xh(hA)},Th(Sz,{Identifier:kh(hA)})),Pz=Th(Sz,{LowerCorner:wh(Lz),UpperCorner:wh(Lz)}),Dz=Th(_z,{WellKnownScaleSet:kh(hA),TileMatrix:xh((function(t,n){return Ah({},Nz,t,n)}))},Th(Sz,{SupportedCRS:kh(hA),Identifier:kh(hA),BoundingBox:kh(zz)})),Nz=Th(_z,{TopLeftCorner:kh(Lz),ScaleDenominator:kh(aA),TileWidth:kh(cA),TileHeight:kh(cA),MatrixWidth:kh(cA),MatrixHeight:kh(cA)},Th(Sz,{Identifier:kh(hA)}));function zz(t,n){var e=Ah([],Pz,t,n);if(2==e.length)return xn(e)}function Lz(t,n){var e=hA(t).split(/\s+/);if(e&&2==e.length){var r=+e[0],i=+e[1];if(!isNaN(r)&&!isNaN(i))return[r,i]}}var Fz=jz,Gz=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Uz=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],Bz="enterfullscreen",qz="leavefullscreen";function $z(t){var n=t.body;return!!(n.webkitRequestFullscreen||n.msRequestFullscreen&&t.msFullscreenEnabled||n.requestFullscreen&&t.fullscreenEnabled)}function Vz(t){return!!(t.webkitIsFullScreen||t.msFullscreenElement||t.fullscreenElement)}function Zz(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}var Wz=function(t){function n(n){var e=this,r=n||{};(e=t.call(this,{element:document.createElement("div"),target:r.target})||this).on,e.once,e.un,e.wm=void 0!==r.className?r.className:"ol-full-screen",e.gm=[],e.xm=void 0!==r.activeClassName?r.activeClassName.split(" "):[e.wm+"-true"],e.km=void 0!==r.inactiveClassName?r.inactiveClassName.split(" "):[e.wm+"-false"];var i=void 0!==r.label?r.label:"⤢";e._m="string"==typeof i?document.createTextNode(i):i;var o=void 0!==r.labelActive?r.labelActive:"×";e.Sm="string"==typeof o?document.createTextNode(o):o,e.Mm=document.createElement("button");var s=r.tipLabel?r.tipLabel:"Toggle full-screen";return e.Mm.setAttribute("type","button"),e.Mm.title=s,e.Mm.appendChild(e._m),e.Mm.addEventListener(F,e.Cr.bind(e),!1),e.element.className=e.wm+" "+"ol-unselectable "+js,e.element.appendChild(e.Mm),e.Qc=void 0!==r.keys&&r.keys,e.kv=r.source,e.jm=!1,e.Om=e.Tm.bind(e),e}return Gz(n,t),n.prototype.Cr=function(t){t.preventDefault(),this.Em()},n.prototype.Em=function(){var t=this.getMap();if(t){var n=t.getOwnerDocument();if($z(n))if(Vz(n))!function(t){t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}(n);else{var e=void 0;e=this.kv?"string"==typeof this.kv?n.getElementById(this.kv):this.kv:t.getTargetElement(),this.Qc?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():Zz(t)}(e):Zz(e)}}},n.prototype.Am=function(){var t=this.getMap();if(t){var n=this.jm;this.jm=Vz(t.getOwnerDocument()),n!==this.jm&&(this.Cm(this.Mm,this.jm),this.jm?(jo(this.Sm,this._m),this.dispatchEvent(Bz)):(jo(this._m,this.Sm),this.dispatchEvent(qz)),t.updateSize())}},n.prototype.Cm=function(t,n){var e,r,i,o=this.xm,s=this.km,a=n?o:s;(e=t.classList).remove.apply(e,o),(r=t.classList).remove.apply(r,s),(i=t.classList).add.apply(i,a)},n.prototype.setMap=function(n){var e=this.getMap();e&&e.removeChangeListener(_a,this.Om),t.prototype.setMap.call(this,n),this.Tm(),n&&n.addChangeListener(_a,this.Om)},n.prototype.Tm=function(){for(var t=this.gm,n=0,e=t.length;n<e;++n)J(t[n]);t.length=0;var r=this.getMap();if(r){var i=r.getOwnerDocument();$z(i)?this.element.classList.remove(Ms):this.element.classList.add(Ms);for(n=0,e=Uz.length;n<e;++n)t.push(X(i,Uz[n],this.Am,this));this.Am()}},n}(uu),Hz=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Kz="projection",Xz="coordinateFormat",Yz=function(t){function n(n){var e=this,r=n||{},i=document.createElement("div");i.className=void 0!==r.className?r.className:"ol-mouse-position",(e=t.call(this,{element:i,render:r.render,target:r.target})||this).on,e.once,e.un,e.addChangeListener(Kz,e.Tt),r.coordinateFormat&&e.setCoordinateFormat(r.coordinateFormat),r.projection&&e.setProjection(r.projection);var o=!0,s="&#160;";return"undefinedHTML"in r?(void 0!==r.undefinedHTML&&(s=r.undefinedHTML),o=!!s):"placeholder"in r&&(!1===r.placeholder?o=!1:s=String(r.placeholder)),e.Rm=s,e.Im=o,e.Pm=i.innerHTML,e.Dm=null,e.jt=null,e}return Hz(n,t),n.prototype.Tt=function(){this.jt=null},n.prototype.getCoordinateFormat=function(){return this.get(Xz)},n.prototype.getProjection=function(){return this.get(Kz)},n.prototype.handleMouseMove=function(t){var n=this.getMap();this.Nm(n.getEventPixel(t))},n.prototype.handleMouseOut=function(t){this.Nm(null)},n.prototype.setMap=function(n){if(t.prototype.setMap.call(this,n),n){var e=n.getViewport();this.listenerKeys.push(X(e,la,this.handleMouseMove,this)),this.Im&&this.listenerKeys.push(X(e,pa,this.handleMouseOut,this)),this.Nm(null)}},n.prototype.setCoordinateFormat=function(t){this.set(Xz,t)},n.prototype.setProjection=function(t){this.set(Kz,mr(t))},n.prototype.Nm=function(t){var n=this.Rm;if(t&&this.Dm){if(!this.jt){var e=this.getProjection();this.jt=e?jr(this.Dm,e):dr}var r=this.getMap().getCoordinateFromPixelInternal(t);if(r){var i=Rr();i&&(this.jt=jr(this.Dm,i)),this.jt(r,r);var o=this.getCoordinateFormat();n=o?o(r):r.toString()}}this.Pm&&n===this.Pm||(this.element.innerHTML=n,this.Pm=n)},n.prototype.render=function(t){var n=t.frameState;n?this.Dm!=n.viewState.projection&&(this.Dm=n.viewState.projection,this.jt=null):this.Dm=null},n}(uu),Jz=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Qz=.75,tL=.1,nL=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Jz(n,t),n.prototype.createRenderer=function(){return new ea(this)},n}(su),eL=function(t){function n(n){var e=this,r=n||{};(e=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).zm=e.Lm.bind(e),e._r=void 0===r.collapsed||r.collapsed,e.jr=void 0===r.collapsible||r.collapsible,e.jr||(e._r=!1),e.ua=void 0!==r.rotateWithView&&r.rotateWithView,e.Fm=void 0;var i=void 0!==r.className?r.className:"ol-overviewmap",o=void 0!==r.tipLabel?r.tipLabel:"Overview map",s=void 0!==r.collapseLabel?r.collapseLabel:"";"string"==typeof s?(e.Tr=document.createElement("span"),e.Tr.textContent=s):e.Tr=s;var a=void 0!==r.label?r.label:"";"string"==typeof a?(e.Er=document.createElement("span"),e.Er.textContent=a):e.Er=a;var u=e.jr&&!e._r?e.Tr:e.Er,c=document.createElement("button");c.setAttribute("type","button"),c.title=o,c.appendChild(u),c.addEventListener(F,e.Cr.bind(e),!1),e.Gm=document.createElement("div"),e.Gm.className="ol-overviewmap-map",e._y=r.view,e.Um=new nL({view:r.view});var f=e.Um;r.layers&&r.layers.forEach((function(t){f.addLayer(t)}));var h=document.createElement("div");h.className="ol-overviewmap-box",h.style.boxSizing="border-box",e.Bm=new Nc({position:[0,0],positioning:Sc,element:h}),e.Um.addOverlay(e.Bm);var l=i+" "+"ol-unselectable "+js+(e._r&&e.jr?" ol-collapsed":"")+(e.jr?"":" ol-uncollapsible"),v=e.element;v.className=l,v.appendChild(e.Gm),v.appendChild(c);var d=e,p=e.Bm,y=e.Bm.getElement(),m=function(t){var n,e={clientX:(n=t).clientX,clientY:n.clientY},r=f.getEventCoordinateInternal(e);p.setPosition(r)},b=function t(n){var e=f.getEventCoordinateInternal(n);d.getMap().getView().setCenterInternal(e),window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",t)};return y.addEventListener("mousedown",(function(){window.addEventListener("mousemove",m),window.addEventListener("mouseup",b)})),e}return Jz(n,t),n.prototype.setMap=function(n){var e=this.getMap();if(n!==e){if(e){var r=e.getView();r&&this.qm(r),this.Um.setTarget(null)}if(t.prototype.setMap.call(this,n),n){this.Um.setTarget(this.Gm),this.listenerKeys.push(X(n,l,this.$m,this));var i=n.getView();i&&(this.Vm(i),i.isDef()&&(this.Um.updateSize(),this.Zm())),this.Um.isRendered()||this.Wm()}}},n.prototype.$m=function(t){if(t.key===Sa){var n=t.oldValue;n&&this.qm(n);var e=this.getMap().getView();this.Vm(e)}else this.Um.isRendered()||t.key!==_a&&t.key!==ka||this.Um.updateSize()},n.prototype.Vm=function(t){if(!this._y){var n=new Ja({projection:t.getProjection()});this.Um.setView(n)}t.addChangeListener(Ra.ROTATION,this.zm),this.Lm()},n.prototype.qm=function(t){t.removeChangeListener(Ra.ROTATION,this.zm)},n.prototype.Lm=function(){this.ua&&this.Um.getView().setRotation(this.getMap().getView().getRotation())},n.prototype.Hm=function(){var t=this.getMap(),n=this.Um;if(t.isRendered()&&n.isRendered()){var e=t.getSize(),r=t.getView().calculateExtentInternal(e);if(!this.Fm||!Pn(r,this.Fm)){this.Fm=r;var i=n.getSize(),o=n.getView().calculateExtentInternal(i),s=n.getPixelFromCoordinateInternal(Yn(r)),a=n.getPixelFromCoordinateInternal(Vn(r)),u=Math.abs(s[0]-a[0]),c=Math.abs(s[1]-a[1]),f=i[0],h=i[1];u<f*tL||c<h*tL||u>f*Qz||c>h*Qz?this.Zm():jn(o,r)||this.Km()}}},n.prototype.Zm=function(){var t=this.getMap(),n=this.Um,e=t.getSize(),r=t.getView().calculateExtentInternal(e),i=n.getView(),o=Math.log(7.5)/Math.LN2;re(r,1/(Math.pow(2,o/2)*tL)),i.fitInternal(Hi(r))},n.prototype.Km=function(){var t=this.getMap(),n=this.Um,e=t.getView();n.getView().setCenterInternal(e.getCenterInternal())},n.prototype.Xm=function(){var t=this.getMap(),n=this.Um;if(t.isRendered()&&n.isRendered()){var e=t.getSize(),r=t.getView(),i=n.getView(),o=this.ua?0:-r.getRotation(),s=this.Bm,a=this.Bm.getElement(),u=r.getCenterInternal(),c=r.getResolution(),f=i.getResolution(),h=e[0]*c/f,l=e[1]*c/f;if(s.setPosition(u),a){a.style.width=h+"px",a.style.height=l+"px";var v="rotate("+o+"rad)";a.style.transform=v}}},n.prototype.Wm=function(){this.Ym||(this.Ym=Y(this.Um,ba,(function(t){delete this.Ym,this.Xm()}),this))},n.prototype.Cr=function(t){t.preventDefault(),this.Dr()},n.prototype.Dr=function(){this.element.classList.toggle(Os),this._r?jo(this.Tr,this.Er):jo(this.Er,this.Tr),this._r=!this._r;var t=this.Um;if(!this._r){if(t.isRendered())return this.Fm=void 0,void t.render();t.updateSize(),this.Zm(),this.Wm()}},n.prototype.getCollapsible=function(){return this.jr},n.prototype.setCollapsible=function(t){this.jr!==t&&(this.jr=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this._r&&this.Dr())},n.prototype.setCollapsed=function(t){this.jr&&this._r!==t&&this.Dr()},n.prototype.getCollapsed=function(){return this._r},n.prototype.getRotateWithView=function(){return this.ua},n.prototype.setRotateWithView=function(t){this.ua!==t&&(this.ua=t,0!==this.getMap().getView().getRotation()&&(this.ua?this.Lm():this.Um.getView().setRotation(0),this.Fm=void 0,this.Hm(),this.Xm()))},n.prototype.getOverviewMap=function(){return this.Um},n.prototype.render=function(t){this.Hm(),this.Xm()},n}(uu),rL=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),iL="units",oL="degrees",sL="imperial",aL="nautical",uL="metric",cL="us",fL=[1,2,5],hL=25.4/.28,lL=function(t){function n(n){var e=this,r=n||{},i=void 0!==r.className?r.className:r.bar?"ol-scale-bar":"ol-scale-line";return(e=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).on,e.once,e.un,e.Jm=document.createElement("div"),e.Jm.className=i+"-inner",e.element.className=i+" "+Ss,e.element.appendChild(e.Jm),e.Qm=null,e.tb=void 0!==r.minWidth?r.minWidth:64,e.mn=!1,e.nb=void 0,e.Pm="",e.addChangeListener(iL,e.eb),e.setUnits(r.units||uL),e.rb=r.bar||!1,e.ib=r.steps||4,e.ob=r.text||!1,e.sb=r.dpi||void 0,e}return rL(n,t),n.prototype.getUnits=function(){return this.get(iL)},n.prototype.eb=function(){this.Pr()},n.prototype.setUnits=function(t){this.set(iL,t)},n.prototype.setDpi=function(t){this.sb=t},n.prototype.Pr=function(){var t=this.Qm;if(t){var n=t.center,e=t.projection,r=this.getUnits(),i=r==oL?Ft.DEGREES:Ft.METERS,o=br(e,t.resolution,n,i),s=this.tb*(this.sb||hL)/hL,a=s*o,u="";if(r==oL){var c=zt[Ft.DEGREES];(a*=c)<c/60?(u="″",o*=3600):a<c?(u="",o*=60):u="°"}else r==sL?a<.9144?(u="in",o/=.0254):a<1609.344?(u="ft",o/=.3048):(u="mi",o/=1609.344):r==aL?(o/=1852,u="nm"):r==uL?a<.001?(u="μm",o*=1e6):a<1?(u="mm",o*=1e3):a<1e3?u="m":(u="km",o/=1e3):r==cL?a<.9144?(u="in",o*=39.37):a<1609.344?(u="ft",o/=.30480061):(u="mi",o/=1609.3472):Mt(!1,33);for(var f,h,l,v,d=3*Math.floor(Math.log(s*o)/Math.log(10));;){l=Math.floor(d/3);var p=Math.pow(10,l);if(f=fL[(d%3+3)%3]*p,h=Math.round(f/o),isNaN(h))return this.element.style.display="none",void(this.mn=!1);if(h>=s)break;++d}v=this.rb?this.createScaleBar(h,f,u):f.toFixed(l<0?-l:0)+" "+u,this.Pm!=v&&(this.Jm.innerHTML=v,this.Pm=v),this.nb!=h&&(this.Jm.style.width=h+"px",this.nb=h),this.mn||(this.element.style.display="",this.mn=!0)}else this.mn&&(this.element.style.display="none",this.mn=!1)},n.prototype.createScaleBar=function(t,n,e){for(var r="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),i=[],o=t/this.ib,s="#ffffff",a=0;a<this.ib;a++)0===a&&i.push(this.createMarker("absolute",a)),i.push('<div><div class="ol-scale-singlebar" style="width: '+o+"px;background-color: "+s+';"></div>'+this.createMarker("relative",a)+(a%2==0||2===this.ib?this.createStepText(a,t,!1,n,e):"")+"</div>"),a===this.ib-1&&i.push(this.createStepText(a+1,t,!0,n,e)),s="#ffffff"===s?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.ob?'<div class="ol-scale-text" style="width: '+t+'px;">'+r+"</div>":"")+i.join("")+"</div>"},n.prototype.createMarker=function(t,n){return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+("absolute"===t?3:-10)+'px;"></div>'},n.prototype.createStepText=function(t,n,e,r,i){var o=(0===t?0:Math.round(r/this.ib*t*100)/100)+(0===t?"":" "+i);return'<div class="ol-scale-step-text" style="margin-left: '+(0===t?-3:n/this.ib*-1)+"px;text-align: "+(0===t?"left":"center")+"; min-width: "+(0===t?0:n/this.ib*2)+"px;left: "+(e?n+"px":"unset")+';">'+o+"</div>"},n.prototype.getScaleForResolution=function(){var t=br(this.Qm.projection,this.Qm.resolution,this.Qm.center,Ft.METERS),n=this.sb||hL;return parseFloat(t.toString())*(1e3/25.4)*n},n.prototype.render=function(t){var n=t.frameState;this.Qm=n?n.viewState:null,this.Pr()},n}(uu),vL=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),dL=0,pL=1,yL=function(t){function n(n){var e=this,r=n||{};(e=t.call(this,{element:document.createElement("div"),render:r.render})||this).Rn=[],e.ab=void 0,e.ub=dL,e.Cn,e.cb=0,e.fb=0,e.hb,e.lb,e.vb=null,e.pb=!1,e.zr=void 0!==r.duration?r.duration:200;var i=void 0!==r.className?r.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=i+"-thumb "+Ss;var s=e.element;return s.className=i+" "+"ol-unselectable "+js,s.appendChild(o),s.addEventListener(va,e.yb.bind(e),!1),s.addEventListener(la,e.mb.bind(e),!1),s.addEventListener(da,e.bb.bind(e),!1),s.addEventListener(F,e.wb.bind(e),!1),o.addEventListener(F,f,!1),e}return vL(n,t),n.prototype.setMap=function(n){t.prototype.setMap.call(this,n),n&&n.render()},n.prototype.gb=function(){var t=this.element,n=t.offsetWidth,e=t.offsetHeight;if(0===n&&0===e)return this.pb=!1;var r=getComputedStyle(t);n-=parseFloat(r.paddingRight)+parseFloat(r.paddingLeft),e-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom);var i=t.firstElementChild,o=getComputedStyle(i),s=i.offsetWidth+parseFloat(o.marginRight)+parseFloat(o.marginLeft),a=i.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom);return this.vb=[s,a],n>e?(this.ub=pL,this.fb=n-s):(this.ub=dL,this.cb=e-a),this.pb=!0},n.prototype.wb=function(t){var n=this.getMap().getView(),e=this.xb(t.offsetX-this.vb[0]/2,t.offsetY-this.vb[1]/2),r=this.kb(e),i=n.getConstrainedZoom(n.getZoomForResolution(r));n.animateInternal({zoom:i,duration:this.zr,easing:bt})},n.prototype.yb=function(t){if(!this.Cn&&t.target===this.element.firstElementChild){var n=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.hb=t.clientX-parseFloat(n.style.left),this.lb=t.clientY-parseFloat(n.style.top),this.Cn=!0,0===this.Rn.length){var e=this.mb,r=this.bb,i=this.getMap().getOwnerDocument();this.Rn.push(X(i,la,e,this),X(i,da,r,this))}}},n.prototype.mb=function(t){if(this.Cn){var n=t.clientX-this.hb,e=t.clientY-this.lb,r=this.xb(n,e);this.ab=this.kb(r),this.getMap().getView().setResolution(this.ab)}},n.prototype.bb=function(t){this.Cn&&(this.getMap().getView().endInteraction(),this.Cn=!1,this.hb=void 0,this.lb=void 0,this.Rn.forEach(J),this.Rn.length=0)},n.prototype._b=function(t){var n=this.Sb(t),e=this.element.firstElementChild;this.ub==pL?e.style.left=this.fb*n+"px":e.style.top=this.cb*n+"px"},n.prototype.xb=function(t,n){return ue(this.ub===pL?t/this.fb:n/this.cb,0,1)},n.prototype.kb=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},n.prototype.Sb=function(t){return ue(1-this.getMap().getView().getValueForResolutionFunction()(t),0,1)},n.prototype.render=function(t){if(t.frameState&&(this.pb||this.gb())){var n=t.frameState.viewState.resolution;this.ab=n,this._b(n)}},n}(uu),mL=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),bL=function(t){function n(n){var e=this,r=n||{};(e=t.call(this,{element:document.createElement("div"),target:r.target})||this).extent=r.extent?r.extent:null;var i=void 0!==r.className?r.className:"ol-zoom-extent",o=void 0!==r.label?r.label:"E",s=void 0!==r.tipLabel?r.tipLabel:"Fit to extent",a=document.createElement("button");a.setAttribute("type","button"),a.title=s,a.appendChild("string"==typeof o?document.createTextNode(o):o),a.addEventListener(F,e.Cr.bind(e),!1);var u=i+" "+"ol-unselectable "+js,c=e.element;return c.className=u,c.appendChild(a),e}return mL(n,t),n.prototype.Cr=function(t){t.preventDefault(),this.handleZoomToExtent()},n.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),n=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(Hi(n))},n}(uu),wL={};wL.AssertionError=c,wL.Collection=ht,wL.Collection.CollectionEvent=ft,wL.DataTile=St,wL.Disposable=v,wL.Feature=Tt,wL.Feature.createStyleFunction=Ot,wL.Geolocation=co,wL.Image=go,wL.Image.listenImage=wo,wL.ImageBase=ho,wL.ImageCanvas=ko,wL.ImageTile=Co,wL.Kinetic=Ro,wL.Map=wc,wL.MapBrowserEvent=fa,wL.MapBrowserEventHandler=ma,wL.MapEvent=ua,wL.Object=ot,wL.Object.ObjectEvent=it,wL.Observable=et,wL.Observable.unByKey=nt,wL.Overlay=Nc,wL.PluggableMap=su,wL.Tile=kt,wL.TileCache=Zc,wL.TileQueue=Ta,wL.TileQueue.getTilePriority=Ea,wL.TileRange=Kc,wL.TileRange.createOrUpdate=Hc,wL.VectorRenderTile=Jc,wL.VectorTile=tf,wL.View=Ja,wL.View.createCenterConstraint=Wa,wL.View.createResolutionConstraint=Ha,wL.View.createRotationConstraint=Ka,wL.View.isNoopAnimation=Xa,wL.array={},wL.array.binarySearch=d,wL.array.equals=x,wL.array.extend=w,wL.array.find=g,wL.array.findIndex=k,wL.array.includes=y,wL.array.isSorted=_,wL.array.linearFindNearest=m,wL.array.numberSafeCompareFunction=p,wL.array.remove=function(t,n){var e=t.indexOf(n),r=e>-1;return r&&t.splice(e,1),r},wL.array.reverseSubArray=b,wL.array.stableSort=function(t,n){var e,r=t.length,i=Array(t.length);for(e=0;e<r;e++)i[e]={index:e,value:t[e]};for(i.sort((function(t,e){return n(t.value,e.value)||t.index-e.index})),e=0;e<t.length;e++)t[e]=i[e].value},wL.asserts={},wL.asserts.assert=Mt,wL.centerconstraint={},wL.centerconstraint.createExtent=Pa,wL.centerconstraint.none=Da,wL.color={},wL.color.asArray=Lo,wL.color.asString=Do,wL.color.fromString=zo,wL.color.isStringColor=Uo,wL.color.normalize=Fo,wL.color.toString=Go,wL.colorlike={},wL.colorlike.asColorLike=nf,wL.control={},wL.control.Attribution=fu,wL.control.Control=uu,wL.control.FullScreen=Wz,wL.control.MousePosition=Yz,wL.control.OverviewMap=eL,wL.control.Rotate=lu,wL.control.ScaleLine=lL,wL.control.Zoom=du,wL.control.ZoomSlider=yL,wL.control.ZoomToExtent=bL,wL.control.defaults=pu,wL.coordinate={},wL.coordinate.add=Qe,wL.coordinate.closestOnCircle=tr,wL.coordinate.closestOnSegment=nr,wL.coordinate.createStringXY=function(t){return function(n){return fr(n,t)}},wL.coordinate.degreesToStringHDMS=er,wL.coordinate.distance=ur,wL.coordinate.equals=ir,wL.coordinate.format=rr,wL.coordinate.getWorldsAway=lr,wL.coordinate.rotate=or,wL.coordinate.scale=sr,wL.coordinate.squaredDistance=ar,wL.coordinate.squaredDistanceToSegment=cr,wL.coordinate.toStringHDMS=function(t,n){return t?er("NS",t[1],n)+" "+er("EW",t[0],n):""},wL.coordinate.toStringXY=fr,wL.coordinate.wrapX=hr,wL.css={},wL.css.CLASS_COLLAPSED=Os,wL.css.CLASS_CONTROL=js,wL.css.CLASS_HIDDEN=ks,wL.css.CLASS_SELECTABLE=_s,wL.css.CLASS_UNSELECTABLE=Ss,wL.css.CLASS_UNSUPPORTED=Ms,wL.css.cssOpacity=Cs,wL.css.getFontParameters=As,wL.dom={},wL.dom.createCanvasContext2D=_o,wL.dom.outerHeight=Mo,wL.dom.outerWidth=So,wL.dom.removeChildren=To,wL.dom.removeNode=Oo,wL.dom.replaceChildren=Eo,wL.dom.replaceNode=jo,wL.easing={},wL.easing.easeIn=mt,wL.easing.easeOut=bt,wL.easing.inAndOut=wt,wL.easing.linear=gt,wL.easing.upAndDown=function(t){return t<.5?wt(2*t):1-wt(2*(t-.5))},wL.events={},wL.events.Event=h,wL.events.Event.preventDefault=function(t){t.preventDefault()},wL.events.Event.stopPropagation=f,wL.events.Target=P,wL.events.condition={},wL.events.condition.all=ju,wL.events.condition.altKeyOnly=Ou,wL.events.condition.altShiftKeysOnly=Tu,wL.events.condition.always=Cu,wL.events.condition.click=function(t){return t.type==ha.CLICK},wL.events.condition.doubleClick=function(t){return t.type==ha.DBLCLICK},wL.events.condition.focus=Eu,wL.events.condition.focusWithTabindex=Au,wL.events.condition.mouseActionButton=Ru,wL.events.condition.mouseOnly=Lu,wL.events.condition.never=Iu,wL.events.condition.noModifierKeys=Du,wL.events.condition.penOnly=function(t){var n=t.originalEvent;return Mt(void 0!==n,56),"pen"===n.pointerType},wL.events.condition.platformModifierKeyOnly=function(t){var n=t.originalEvent;return!n.altKey&&($t?n.metaKey:n.ctrlKey)&&!n.shiftKey},wL.events.condition.pointerMove=function(t){return"pointermove"==t.type},wL.events.condition.primaryAction=Fu,wL.events.condition.shiftKeyOnly=Nu,wL.events.condition.singleClick=Pu,wL.events.condition.targetNotEditable=zu,wL.events.condition.touchOnly=function(t){var n=t.originalEvent;return Mt(void 0!==n,56),"touch"===n.pointerType},wL.events.listen=X,wL.events.listenOnce=Y,wL.events.unlistenByKey=J,wL.extent={},wL.extent.applyTransform=oe,wL.extent.approximatelyEquals=Dn,wL.extent.boundingExtent=xn,wL.extent.buffer=kn,wL.extent.clone=_n,wL.extent.closestSquaredDistanceXY=Sn,wL.extent.containsCoordinate=Mn,wL.extent.containsExtent=jn,wL.extent.containsXY=On,wL.extent.coordinateRelationship=Tn,wL.extent.createEmpty=En,wL.extent.createOrUpdate=An,wL.extent.createOrUpdateEmpty=Cn,wL.extent.createOrUpdateFromCoordinate=Rn,wL.extent.createOrUpdateFromCoordinates=function(t,n){return Ln(Cn(n),t)},wL.extent.createOrUpdateFromFlatCoordinates=In,wL.extent.createOrUpdateFromRings=function(t,n){return Gn(Cn(n),t)},wL.extent.equals=Pn,wL.extent.extend=Nn,wL.extent.extendCoordinate=zn,wL.extent.extendCoordinates=Ln,wL.extent.extendFlatCoordinates=Fn,wL.extent.extendRings=Gn,wL.extent.extendXY=Un,wL.extent.forEachCorner=Bn,wL.extent.getArea=qn,wL.extent.getBottomLeft=$n,wL.extent.getBottomRight=Vn,wL.extent.getCenter=Zn,wL.extent.getCorner=Wn,wL.extent.getEnlargedArea=function(t,n){var e=Math.min(t[0],n[0]),r=Math.min(t[1],n[1]);return(Math.max(t[2],n[2])-e)*(Math.max(t[3],n[3])-r)},wL.extent.getForViewAndSize=Hn,wL.extent.getHeight=Kn,wL.extent.getIntersection=Xn,wL.extent.getIntersectionArea=function(t,n){return qn(Xn(t,n))},wL.extent.getMargin=function(t){return Qn(t)+Kn(t)},wL.extent.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]},wL.extent.getTopLeft=Yn,wL.extent.getTopRight=Jn,wL.extent.getWidth=Qn,wL.extent.intersects=te,wL.extent.intersectsSegment=ie,wL.extent.isEmpty=ne,wL.extent.returnOrUpdate=ee,wL.extent.scaleFromCenter=re,wL.extent.wrapX=se,wL.featureloader={},wL.featureloader.loadFeaturesXhr=uf,wL.featureloader.setWithCredentials=function(t){af=t},wL.featureloader.xhr=cf,wL.format={},wL.format.EsriJSON=XE,wL.format.Feature=Wk,wL.format.Feature.transformExtentWithOptions=Kk,wL.format.Feature.transformGeometryWithOptions=Hk,wL.format.GML=OA,wL.format.GML2=xA,wL.format.GML3=MA,wL.format.GML32=AA,wL.format.GMLBase=rA,wL.format.GMLBase.GMLNS=tA,wL.format.GPX=lC,wL.format.GeoJSON=g_,wL.format.IGC=SC,wL.format.IIIFInfo=Cw,wL.format.JSONFeature=y_,wL.format.KML=OI,wL.format.KML.getDefaultFillStyle=function(){return BC},wL.format.KML.getDefaultImageStyle=function(){return $C},wL.format.KML.getDefaultStrokeStyle=function(){return ZC},wL.format.KML.getDefaultStyle=function(){return HC},wL.format.KML.getDefaultStyleArray=function(){return XC},wL.format.KML.getDefaultTextStyle=function(){return WC},wL.format.KML.readFlatCoordinates=eR,wL.format.MVT=u_,wL.format.OSMXML=DI,wL.format.OWS=nP,wL.format.Polyline=lP,wL.format.Polyline.decodeDeltas=iP,wL.format.Polyline.decodeFloats=sP,wL.format.Polyline.decodeSignedIntegers=uP,wL.format.Polyline.decodeUnsignedIntegers=fP,wL.format.Polyline.encodeDeltas=rP,wL.format.Polyline.encodeFloats=oP,wL.format.Polyline.encodeSignedIntegers=aP,wL.format.Polyline.encodeUnsignedInteger=hP,wL.format.Polyline.encodeUnsignedIntegers=cP,wL.format.TextFeature=pC,wL.format.TopoJSON=xP,wL.format.WFS=hN,wL.format.WFS.writeFilter=function(t,n){var e=n||"1.1.0",r=lh(fN(e),"Filter"),i={node:r};return E(i,{version:e,filter:t}),HD(r,t,[i]),r},wL.format.WKB=jN,wL.format.WKT=WN,wL.format.WMSCapabilities=wz,wL.format.WMSGetFeatureInfo=xz,wL.format.WMTSCapabilities=Fz,wL.format.XML=NI,wL.format.XMLFeature=JE,wL.format.filter={},wL.format.filter.And=jP,wL.format.filter.Bbox=TP,wL.format.filter.Comparison=LP,wL.format.filter.ComparisonBinary=BP,wL.format.filter.Contains=RP,wL.format.filter.DWithin=PP,wL.format.filter.Disjoint=NP,wL.format.filter.During=GP,wL.format.filter.EqualTo=$P,wL.format.filter.Filter=kP,wL.format.filter.GreaterThan=ZP,wL.format.filter.GreaterThanOrEqualTo=HP,wL.format.filter.Intersects=XP,wL.format.filter.IsBetween=JP,wL.format.filter.IsLike=tD,wL.format.filter.IsNull=eD,wL.format.filter.LessThan=iD,wL.format.filter.LessThanOrEqualTo=sD,wL.format.filter.LogicalNary=SP,wL.format.filter.Not=uD,wL.format.filter.NotEqualTo=fD,wL.format.filter.Or=lD,wL.format.filter.ResourceId=dD,wL.format.filter.Spatial=AP,wL.format.filter.Within=yD,wL.format.filter.and=mD,wL.format.filter.bbox=bD,wL.format.filter.between=function(t,n,e){return new JP(t,n,e)},wL.format.filter.contains=function(t,n,e){return new RP(t,n,e)},wL.format.filter.disjoint=function(t,n,e){return new NP(t,n,e)},wL.format.filter.during=function(t,n,e){return new GP(t,n,e)},wL.format.filter.dwithin=function(t,n,e,r,i){return new PP(t,n,e,r,i)},wL.format.filter.equalTo=function(t,n,e){return new $P(t,n,e)},wL.format.filter.greaterThan=function(t,n){return new ZP(t,n)},wL.format.filter.greaterThanOrEqualTo=function(t,n){return new HP(t,n)},wL.format.filter.intersects=function(t,n,e){return new XP(t,n,e)},wL.format.filter.isNull=function(t){return new eD(t)},wL.format.filter.lessThan=function(t,n){return new iD(t,n)},wL.format.filter.lessThanOrEqualTo=function(t,n){return new sD(t,n)},wL.format.filter.like=function(t,n,e,r,i,o){return new tD(t,n,e,r,i,o)},wL.format.filter.not=function(t){return new uD(t)},wL.format.filter.notEqualTo=function(t,n,e){return new fD(t,n,e)},wL.format.filter.or=function(t){var n=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(lD,n))},wL.format.filter.resourceId=function(t){return new dD(t)},wL.format.filter.within=function(t,n,e){return new yD(t,n,e)},wL.format.xlink={},wL.format.xlink.readHref=zI,wL.format.xsd={},wL.format.xsd.readBoolean=iA,wL.format.xsd.readBooleanString=oA,wL.format.xsd.readDateTime=sA,wL.format.xsd.readDecimal=aA,wL.format.xsd.readDecimalString=uA,wL.format.xsd.readNonNegativeIntegerString=fA,wL.format.xsd.readPositiveInteger=cA,wL.format.xsd.readString=hA,wL.format.xsd.writeBooleanTextNode=lA,wL.format.xsd.writeCDATASection=vA,wL.format.xsd.writeDateTimeTextNode=dA,wL.format.xsd.writeDecimalTextNode=pA,wL.format.xsd.writeNonNegativeIntegerTextNode=yA,wL.format.xsd.writeStringTextNode=mA,wL.functions={},wL.functions.FALSE=M,wL.functions.TRUE=S,wL.functions.VOID=j,wL.functions.memoizeOne=O,wL.functions.toPromise=T,wL.geom={},wL.geom.Circle=JT,wL.geom.Geometry=Wr,wL.geom.GeometryCollection=v_,wL.geom.LineString=Ck,wL.geom.LinearRing=_i,wL.geom.MultiLineString=Yk,wL.geom.MultiPoint=Qk,wL.geom.MultiPolygon=n_,wL.geom.Point=Mi,wL.geom.Polygon=Zi,wL.geom.Polygon.circular=Wi,wL.geom.Polygon.fromCircle=Ki,wL.geom.Polygon.fromExtent=Hi,wL.geom.Polygon.makeRegular=Xi,wL.geom.SimpleGeometry=Yr,wL.geom.SimpleGeometry.getStrideForLayout=Kr,wL.geom.SimpleGeometry.transformGeom2D=Xr,wL.geom.flat={},wL.geom.flat.area={},wL.geom.flat.area.linearRing=wi,wL.geom.flat.area.linearRings=gi,wL.geom.flat.area.linearRingss=xi,wL.geom.flat.center={},wL.geom.flat.center.linearRingss=jk,wL.geom.flat.closest={},wL.geom.flat.closest.arrayMaxSquaredDelta=ti,wL.geom.flat.closest.assignClosestArrayPoint=ri,wL.geom.flat.closest.assignClosestMultiArrayPoint=ii,wL.geom.flat.closest.assignClosestPoint=ei,wL.geom.flat.closest.maxSquaredDelta=Qr,wL.geom.flat.closest.multiArrayMaxSquaredDelta=ni,wL.geom.flat.contains={},wL.geom.flat.contains.linearRingContainsExtent=ji,wL.geom.flat.contains.linearRingContainsXY=Oi,wL.geom.flat.contains.linearRingsContainsXY=Ti,wL.geom.flat.contains.linearRingssContainsXY=Ei,wL.geom.flat.deflate={},wL.geom.flat.deflate.deflateCoordinate=oi,wL.geom.flat.deflate.deflateCoordinates=si,wL.geom.flat.deflate.deflateCoordinatesArray=ai,wL.geom.flat.deflate.deflateMultiCoordinatesArray=ui,wL.geom.flat.flip={},wL.geom.flat.flip.flipXY=BE,wL.geom.flat.geodesic={},wL.geom.flat.geodesic.greatCircleArc=function(t,n,e,r,i,o){var s=mr("EPSG:4326"),a=Math.cos(pe(n)),u=Math.sin(pe(n)),c=Math.cos(pe(r)),f=Math.sin(pe(r)),h=Math.cos(pe(e-t)),l=Math.sin(pe(e-t)),v=u*f+a*c*h;return Pk((function(n){if(1<=v)return[e,r];var i=n*Math.acos(v),o=Math.cos(i),s=Math.sin(i),d=l*c,p=a*f-u*c*h,y=Math.atan2(d,p),m=Math.asin(u*o+a*s*Math.cos(y));return[de(pe(t)+Math.atan2(Math.sin(y)*s*a,o-u*Math.sin(m))),de(m)]}),Or(s,i),o)},wL.geom.flat.geodesic.meridian=Dk,wL.geom.flat.geodesic.parallel=Nk,wL.geom.flat.inflate={},wL.geom.flat.inflate.inflateCoordinates=yi,wL.geom.flat.inflate.inflateCoordinatesArray=mi,wL.geom.flat.inflate.inflateMultiCoordinatesArray=bi,wL.geom.flat.interiorpoint={},wL.geom.flat.interiorpoint.getInteriorPointOfArray=Ai,wL.geom.flat.interiorpoint.getInteriorPointsOfMultiArray=Ci,wL.geom.flat.interpolate={},wL.geom.flat.interpolate.interpolatePoint=_k,wL.geom.flat.interpolate.lineStringCoordinateAtM=Sk,wL.geom.flat.interpolate.lineStringsCoordinateAtM=Mk,wL.geom.flat.intersectsextent={},wL.geom.flat.intersectsextent.intersectsLineString=Ii,wL.geom.flat.intersectsextent.intersectsLineStringArray=Pi,wL.geom.flat.intersectsextent.intersectsLinearRing=Di,wL.geom.flat.intersectsextent.intersectsLinearRingArray=Ni,wL.geom.flat.intersectsextent.intersectsLinearRingMultiArray=zi,wL.geom.flat.length={},wL.geom.flat.length.lineStringLength=Hx,wL.geom.flat.length.linearRingLength=function(t,n,e,r){var i=Hx(t,n,e,r),o=t[e-r]-t[n],s=t[e-r+1]-t[n+1];return i+=Math.sqrt(o*o+s*s)},wL.geom.flat.orient={},wL.geom.flat.orient.linearRingIsClockwise=Fi,wL.geom.flat.orient.linearRingsAreOriented=Gi,wL.geom.flat.orient.linearRingssAreOriented=Ui,wL.geom.flat.orient.orientLinearRings=Bi,wL.geom.flat.orient.orientLinearRingsArray=qi,wL.geom.flat.reverse={},wL.geom.flat.reverse.coordinates=Li,wL.geom.flat.segments={},wL.geom.flat.segments.forEach=Ri,wL.geom.flat.simplify={},wL.geom.flat.simplify.douglasPeucker=ci,wL.geom.flat.simplify.douglasPeuckerArray=fi,wL.geom.flat.simplify.douglasPeuckerMultiArray=function(t,n,e,r,i,o,s,a){for(var u=0,c=e.length;u<c;++u){var f=e[u],h=[];s=fi(t,n,f,r,i,o,s,h),a.push(h),n=f[f.length-1]}return s},wL.geom.flat.simplify.quantize=vi,wL.geom.flat.simplify.quantizeArray=di,wL.geom.flat.simplify.quantizeMultiArray=pi,wL.geom.flat.simplify.radialDistance=hi,wL.geom.flat.simplify.simplifyLineString=function(t,n,e,r,i,o,s){var a=void 0!==s?s:[];return o||(e=hi(t,n,e,r,i,a,0),t=a,n=0,r=2),a.length=ci(t,n,e,r,i,a,0),a},wL.geom.flat.simplify.snap=li,wL.geom.flat.straightchunk={},wL.geom.flat.straightchunk.matchingChunk=Ux,wL.geom.flat.textpath={},wL.geom.flat.textpath.drawTextOnPath=Wx,wL.geom.flat.topology={},wL.geom.flat.topology.lineStringIsClosed=function(t,n,e,r){var i=e-r;return t[n]===t[i]&&t[n+1]===t[i+1]&&(e-n)/r>3&&!!wi(t,n,e,r)},wL.geom.flat.transform={},wL.geom.flat.transform.rotate=Br,wL.geom.flat.transform.scale=qr,wL.geom.flat.transform.transform2D=Ur,wL.geom.flat.transform.translate=$r,wL.has={},wL.has.DEVICE_PIXEL_RATIO=Vt,wL.has.FIREFOX=Ut,wL.has.IMAGE_DECODE=Wt,wL.has.MAC=$t,wL.has.PASSIVE_EVENT_LISTENERS=Ht,wL.has.SAFARI=Bt,wL.has.WEBKIT=qt,wL.has.WORKER_OFFSCREEN_CANVAS=Zt,wL.interaction={},wL.interaction.DoubleClickZoom=ku,wL.interaction.DragAndDrop=WT,wL.interaction.DragAndDrop.DragAndDropEvent=ZT,wL.interaction.DragBox=Ju,wL.interaction.DragBox.DragBoxEvent=Yu,wL.interaction.DragPan=Uu,wL.interaction.DragRotate=qu,wL.interaction.DragRotateAndZoom=KT,wL.interaction.DragZoom=tc,wL.interaction.Draw=uE,wL.interaction.Draw.DrawEvent=aE,wL.interaction.Draw.createBox=function(){return function(t,n,e){var r=xn([t[0],t[t.length-1]].map((function(t){return Pr(t,e)}))),i=[[$n(r),Vn(r),Jn(r),Yn(r),$n(r)]],o=n;o?o.setCoordinates(i):o=new Zi(i);var s=Rr();return s&&o.transform(e,s),o}},wL.interaction.Draw.createRegularPolygon=function(t,n){return function(e,r,i){var o=Pr(e[0],i),s=Pr(e[e.length-1],i),a=Math.sqrt(ar(o,s)),u=r||Ki(new JT(o),t),c=n;if(!n&&0!==n){var f=s[0]-o[0],h=s[1]-o[1];c=Math.atan2(h,f)}Xi(u,o,a,c);var l=Rr();return l&&u.transform(i,l),u}},wL.interaction.Extent=pE,wL.interaction.Extent.ExtentEvent=hE,wL.interaction.Interaction=gu,wL.interaction.Interaction.pan=bu,wL.interaction.Interaction.zoomByDelta=wu,wL.interaction.KeyboardPan=sc,wL.interaction.KeyboardZoom=uc,wL.interaction.Modify=jE,wL.interaction.Modify.ModifyEvent=kE,wL.interaction.MouseWheelZoom=lc,wL.interaction.PinchRotate=dc,wL.interaction.PinchZoom=yc,wL.interaction.Pointer=Mu,wL.interaction.Pointer.centroid=Su,wL.interaction.Select=CE,wL.interaction.Select.SelectEvent=EE,wL.interaction.Snap=DE,wL.interaction.Translate=UE,wL.interaction.Translate.TranslateEvent=GE,wL.interaction.defaults=mc,wL.layer={},wL.layer.Base=is,wL.layer.BaseImage=_g,wL.layer.BaseTile=Ig,wL.layer.BaseVector=Sx,wL.layer.Graticule=Gk,wL.layer.Group=sa,wL.layer.Group.GroupEvent=ia,wL.layer.Heatmap=Zk,wL.layer.Image=Eg,wL.layer.Layer=ys,wL.layer.Layer.inView=ps,wL.layer.MapboxVector=DT,wL.layer.MapboxVector.getMapboxPath=TT,wL.layer.MapboxVector.normalizeGlyphsUrl=AT,wL.layer.MapboxVector.normalizeSourceUrl=RT,wL.layer.MapboxVector.normalizeSpriteUrl=ET,wL.layer.MapboxVector.normalizeStyleUrl=CT,wL.layer.Tile=Fg,wL.layer.Vector=Ik,wL.layer.VectorImage=zT,wL.layer.VectorTile=f_,wL.layer.WebGLPoints=FT,wL.layer.WebGLTile=qT,wL.loadingstrategy={},wL.loadingstrategy.all=ff,wL.loadingstrategy.bbox=function(t,n){return[t]},wL.loadingstrategy.tile=function(t){return function(n,e,r){var i=t.getZForResolution(Lr(e,r)),o=t.getTileRangeForExtentAndZ(Nr(n,r),i),s=[],a=[i,0,0];for(a[1]=o.minX;a[1]<=o.maxX;++a[1])for(a[2]=o.minY;a[2]<=o.maxY;++a[2])s.push(Dr(t.getTileCoordExtent(a),r));return s}},wL.math={},wL.math.ceil=xe,wL.math.clamp=ue,wL.math.cosh=ce,wL.math.floor=ge,wL.math.lerp=me,wL.math.log2=fe,wL.math.modulo=ye,wL.math.round=we,wL.math.solveLinearSystem=ve,wL.math.squaredDistance=le,wL.math.squaredSegmentDistance=he,wL.math.toDegrees=de,wL.math.toFixed=be,wL.math.toRadians=pe,wL.net={},wL.net.ClientError=pf,wL.net.ResponseError=df,wL.net.getJSON=yf,wL.net.jsonp=lf,wL.net.overrideXHR=function(t){"undefined"!=typeof XMLHttpRequest&&(vf=XMLHttpRequest),global.XMLHttpRequest=t},wL.net.resolveUrl=mf,wL.net.restoreXHR=function(){global.XMLHttpRequest=vf},wL.obj={},wL.obj.assign=E,wL.obj.clear=A,wL.obj.getValues=C,wL.obj.isEmpty=R,wL.proj={},wL.proj.Projection=ae,wL.proj.Units={},wL.proj.Units.METERS_PER_UNIT=zt,wL.proj.Units.fromCode=Nt,wL.proj.addCommon=Gr,wL.proj.addCoordinateTransforms=_r,wL.proj.addEquivalentProjections=wr,wL.proj.addEquivalentTransforms=gr,wL.proj.addProjection=pr,wL.proj.addProjections=yr,wL.proj.clearAllProjections=function(){Fe(),qe()},wL.proj.clearUserProjection=function(){Ar=null},wL.proj.cloneTransform=vr,wL.proj.createProjection=xr,wL.proj.createSafeCoordinateTransform=Fr,wL.proj.createTransformFromCoordinateTransform=kr,wL.proj.epsg3857={},wL.proj.epsg3857.EXTENT=Me,wL.proj.epsg3857.HALF_SIZE=Se,wL.proj.epsg3857.MAX_SAFE_Y=Oe,wL.proj.epsg3857.PROJECTIONS=Ee,wL.proj.epsg3857.RADIUS=_e,wL.proj.epsg3857.WORLD_EXTENT=je,wL.proj.epsg3857.fromEPSG4326=Ae,wL.proj.epsg3857.toEPSG4326=Ce,wL.proj.epsg4326={},wL.proj.epsg4326.EXTENT=Pe,wL.proj.epsg4326.METERS_PER_UNIT=De,wL.proj.epsg4326.PROJECTIONS=ze,wL.proj.epsg4326.RADIUS=Ie,wL.proj.equivalent=Mr,wL.proj.fromLonLat=Sr,wL.proj.fromUserCoordinate=Pr,wL.proj.fromUserExtent=Nr,wL.proj.fromUserResolution=Lr,wL.proj.get=mr,wL.proj.getPointResolution=br,wL.proj.getTransform=Or,wL.proj.getTransformFromProjections=jr,wL.proj.getUserProjection=Rr,wL.proj.identityTransform=dr,wL.proj.proj4={},wL.proj.proj4.register=function(t){var n,e,r=Object.keys(t.defs),i=r.length;for(n=0;n<i;++n){var o=r[n];if(!mr(o)){var s=t.defs(o),a=s.units;a||"longlat"!==s.projName||(a=Ft.DEGREES),pr(new ae({code:o,axisOrientation:s.axis,metersPerUnit:s.to_meter,units:a}))}}for(n=0;n<i;++n){var u=r[n],c=mr(u);for(e=0;e<i;++e){var f=r[e],h=mr(f);if(!Ve(u,f))if(t.defs[u]===t.defs[f])wr([c,h]);else{var l=t(u,f);_r(c,h,Fr(c,h,l.forward),Fr(h,c,l.inverse))}}}},wL.proj.projections={},wL.proj.projections.add=Ue,wL.proj.projections.clear=Fe,wL.proj.projections.get=Ge,wL.proj.setUserProjection=Cr,wL.proj.toLonLat=function(t,n){var e=Tr(t,void 0!==n?n:"EPSG:3857","EPSG:4326"),r=e[0];return(r<-180||r>180)&&(e[0]=ye(r+180,360)-180),e},wL.proj.toUserCoordinate=Ir,wL.proj.toUserExtent=Dr,wL.proj.toUserResolution=zr,wL.proj.transform=Tr,wL.proj.transformExtent=Er,wL.proj.transformWithProjections=function(t,n,e){return jr(n,e)(t)},wL.proj.transforms={},wL.proj.transforms.add=$e,wL.proj.transforms.clear=qe,wL.proj.transforms.get=Ve,wL.proj.transforms.remove=function(t,n){var e=t.getCode(),r=n.getCode(),i=Be[e][r];return delete Be[e][r],R(Be[e])&&delete Be[e],i},wL.proj.useGeographic=function(){Cr("EPSG:4326")},wL.render={},wL.render.Box=Vu,wL.render.Event=xs,wL.render.Feature=Ek,wL.render.VectorContext=bf,wL.render.canvas={},wL.render.canvas.Builder=Px,wL.render.canvas.BuilderGroup=Zx,wL.render.canvas.Executor=rk,wL.render.canvas.ExecutorGroup=uk,wL.render.canvas.ExecutorGroup.getPixelIndexArray=ak,wL.render.canvas.ImageBuilder=Nx,wL.render.canvas.Immediate=gf,wL.render.canvas.Instruction={},wL.render.canvas.Instruction.beginPathInstruction=Ax,wL.render.canvas.Instruction.closePathInstruction=Cx,wL.render.canvas.Instruction.fillInstruction=Tx,wL.render.canvas.Instruction.strokeInstruction=Ex,wL.render.canvas.LineStringBuilder=Lx,wL.render.canvas.PolygonBuilder=Gx,wL.render.canvas.TextBuilder=$x,wL.render.canvas.checkedFonts=Bs,wL.render.canvas.defaultFillStyle=Is,wL.render.canvas.defaultFont=Rs,wL.render.canvas.defaultLineCap=Ps,wL.render.canvas.defaultLineDash=Ds,wL.render.canvas.defaultLineDashOffset=0,wL.render.canvas.defaultLineJoin=Ns,wL.render.canvas.defaultLineWidth=1,wL.render.canvas.defaultMiterLimit=zs,wL.render.canvas.defaultPadding=Us,wL.render.canvas.defaultStrokeStyle=Ls,wL.render.canvas.defaultTextAlign=Fs,wL.render.canvas.defaultTextBaseline=Gs,wL.render.canvas.drawImageOrLabel=ta,wL.render.canvas.hitdetect={},wL.render.canvas.hitdetect.HIT_DETECT_RESOLUTION=ck,wL.render.canvas.hitdetect.createHitDetectionImageData=fk,wL.render.canvas.hitdetect.hitDetect=hk,wL.render.canvas.labelCache=qs,wL.render.canvas.measureAndCacheTextWidth=Js,wL.render.canvas.measureTextHeight=Ks,wL.render.canvas.measureTextWidth=Ys,wL.render.canvas.measureTextWidths=Qs,wL.render.canvas.registerFont=Hs,wL.render.canvas.rotateAtOffset=function(t,n,e,r){0!==n&&(t.translate(e,r),t.rotate(n),t.translate(-e,-r))},wL.render.canvas.textHeights=Ws,wL.render.getRenderPixel=function(t,n){return nn(t.inversePixelTransform,n.slice(0))},wL.render.getVectorContext=If,wL.render.toContext=function(t,n){var e=t.canvas,r=n||{},i=r.pixelRatio||Vt,o=r.size;o&&(e.width=o[0]*i,e.height=o[1]*i,e.style.width=o[0]+"px",e.style.height=o[1]+"px");var s=[0,0,e.width,e.height],a=rn([1,0,0,1,0,0],i,i);return new gf(t,i,s,a,0)},wL.renderer={},wL.renderer.Composite=ea,wL.renderer.Layer=ml,wL.renderer.Map=ws,wL.renderer.canvas={},wL.renderer.canvas.ImageLayer=Og,wL.renderer.canvas.Layer=Mg,wL.renderer.canvas.TileLayer=zg,wL.renderer.canvas.VectorImageLayer=pk,wL.renderer.canvas.VectorLayer=vk,wL.renderer.canvas.VectorTileLayer=kk,wL.renderer.canvas.common={},wL.renderer.canvas.common.IMAGE_SMOOTHING_DISABLED=Df,wL.renderer.canvas.common.IMAGE_SMOOTHING_ENABLED=Nf,wL.renderer.vector={},wL.renderer.vector.defaultOrder=Tf,wL.renderer.vector.getSquaredTolerance=Ef,wL.renderer.vector.getTolerance=Af,wL.renderer.vector.renderFeature=Cf,wL.renderer.webgl={},wL.renderer.webgl.Layer=jl,wL.renderer.webgl.Layer.colorDecodeId=Ml,wL.renderer.webgl.Layer.colorEncodeId=Sl,wL.renderer.webgl.Layer.getBlankImageData=function(){var t=document.createElement("canvas").getContext("2d").createImageData(1,1);return t.data[0]=255,t.data[1]=255,t.data[2]=255,t.data[3]=255,t},wL.renderer.webgl.Layer.writePointFeatureToBuffers=function(t,n,e,r,i,o){var s=3+i,a=t[n+0],u=t[n+1],c=xl;c.length=i;for(var f=0;f<c.length;f++)c[f]=t[n+2+f];var h=o?o.vertexPosition:0,l=o?o.indexPosition:0,v=h/s;return _l(e,h,a,u,0),c.length&&e.set(c,h+3),_l(e,h+=s,a,u,1),c.length&&e.set(c,h+3),_l(e,h+=s,a,u,2),c.length&&e.set(c,h+3),_l(e,h+=s,a,u,3),c.length&&e.set(c,h+3),h+=s,r[l++]=v,r[l++]=v+1,r[l++]=v+3,r[l++]=v+1,r[l++]=v+2,r[l++]=v+3,kl.vertexPosition=h,kl.indexPosition=l,kl},wL.renderer.webgl.PointsLayer=jx,wL.renderer.webgl.TileLayer=Nl,wL.renderer.webgl.TileLayer.Attributes=El,wL.renderer.webgl.TileLayer.Uniforms=Tl,wL.reproj={},wL.reproj.Image=Nw,wL.reproj.Tile=hl,wL.reproj.Triangulation=cl,wL.reproj.calculateSourceExtentResolution=Gf,wL.reproj.calculateSourceResolution=Ff,wL.reproj.common={},wL.reproj.common.ENABLE_RASTER_REPROJECTION=ul,wL.reproj.common.ERROR_THRESHOLD=.5,wL.reproj.render=Uf,wL.resolutionconstraint={},wL.resolutionconstraint.createMinMaxResolution=Ga,wL.resolutionconstraint.createSnapToPower=Fa,wL.resolutionconstraint.createSnapToResolutions=La,wL.rotationconstraint={},wL.rotationconstraint.createSnapToN=qa,wL.rotationconstraint.createSnapToZero=$a,wL.rotationconstraint.disable=Ua,wL.rotationconstraint.none=Ba,wL.size={},wL.size.buffer=Qa,wL.size.hasArea=tu,wL.size.scale=nu,wL.size.toSize=eu,wL.source={},wL.source.BingMaps=yd,wL.source.BingMaps.quadKey=pd,wL.source.CartoDB=gd,wL.source.Cluster=Rd,wL.source.DataTile=Pd,wL.source.GeoTIFF=yw,wL.source.IIIF=Pw,wL.source.Image=qw,wL.source.Image.ImageSourceEvent=Uw,wL.source.Image.defaultImageLoadFunction=Bw,wL.source.ImageArcGISRest=Vw,wL.source.ImageCanvas=Ww,wL.source.ImageMapGuide=Kw,wL.source.ImageStatic=Yw,wL.source.ImageWMS=og,wL.source.OGCMapTile=vg,wL.source.OGCVectorTile=bg,wL.source.OSM=xg,wL.source.OSM.ATTRIBUTION=gg,wL.source.Raster=nx,wL.source.Raster.Processor=Vg,wL.source.Raster.RasterSourceEvent=Xg,wL.source.Raster.newImageData=Bg,wL.source.Source=id,wL.source.Stamen=sx,wL.source.Tile=ud,wL.source.Tile.TileSourceEvent=ad,wL.source.TileArcGISRest=ux,wL.source.TileDebug=fx,wL.source.TileImage=vd,wL.source.TileJSON=lx,wL.source.TileWMS=dx,wL.source.UTFGrid=mx,wL.source.UTFGrid.CustomTile=yx,wL.source.UrlTile=fd,wL.source.Vector=Ad,wL.source.Vector.VectorSourceEvent=Ed,wL.source.VectorTile=pg,wL.source.VectorTile.defaultLoadFunction=yg,wL.source.WMTS=xx,wL.source.WMTS.optionsFromCapabilities=function(t,n){var e=g(t.Contents.Layer,(function(t,e,r){return t.Identifier==n.layer}));if(null===e)return null;var r,i=t.Contents.TileMatrixSet;(r=e.TileMatrixSetLink.length>1?k(e.TileMatrixSetLink,"projection"in n?function(t,e,r){var o=g(i,(function(n){return n.Identifier==t.TileMatrixSet})).SupportedCRS,s=mr(o),a=mr(n.projection);return s&&a?Mr(s,a):o==n.projection}:function(t,e,r){return t.TileMatrixSet==n.matrixSet}):0)<0&&(r=0);var o=e.TileMatrixSetLink[r].TileMatrixSet,s=e.TileMatrixSetLink[r].TileMatrixSetLimits,a=e.Format[0];"format"in n&&(a=n.format),(r=k(e.Style,(function(t,e,r){return"style"in n?t.Title==n.style:t.isDefault})))<0&&(r=0);var u=e.Style[r].Identifier,c={};"Dimension"in e&&e.Dimension.forEach((function(t,n,e){var r=t.Identifier,i=t.Default;void 0===i&&(i=t.Value[0]),c[r]=i}));var f,h=g(t.Contents.TileMatrixSet,(function(t,n,e){return t.Identifier==o})),l=h.SupportedCRS;if(l&&(f=mr(l)),"projection"in n){var v=mr(n.projection);v&&(f&&!Mr(v,f)||(f=v))}var d=!1,p="ne"==f.getAxisOrientation().substr(0,2),m=h.TileMatrix[0],b={MinTileCol:0,MinTileRow:0,MaxTileCol:m.MatrixWidth-1,MaxTileRow:m.MatrixHeight-1};if(s){b=s[s.length-1];var w=g(h.TileMatrix,(function(t){return t.Identifier===b.TileMatrix||h.Identifier+":"+t.Identifier===b.TileMatrix}));w&&(m=w)}var x=28e-5*m.ScaleDenominator/f.getMetersPerUnit(),_=p?[m.TopLeftCorner[1],m.TopLeftCorner[0]]:m.TopLeftCorner,S=m.TileWidth*x,M=m.TileHeight*x,j=h.BoundingBox,O=[_[0]+S*b.MinTileCol,_[1]-M*(1+b.MaxTileRow),_[0]+S*(1+b.MaxTileCol),_[1]-M*b.MinTileRow];if(void 0!==j&&!jn(j,O)){var T=e.WGS84BoundingBox,E=mr("EPSG:4326").getExtent();if(O=j,T)d=T[0]===E[0]&&T[2]===E[2];else{var A=Er(j,h.SupportedCRS,"EPSG:4326");d=A[0]-1e-10<=E[0]&&A[2]+1e-10>=E[2]}}var C=bv(h,O,s),R=[],I=n.requestEncoding;if(I=void 0!==I?I:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata)for(var P=t.OperationsMetadata.GetTile.DCP.HTTP.Get,D=0,N=P.length;D<N;++D)if(P[D].Constraint){var z=g(P[D].Constraint,(function(t){return"GetEncoding"==t.name})).AllowedValues.Value;if(""===I&&(I=z[0]),I!==bx)break;y(z,bx)&&R.push(P[D].href)}else P[D].href&&(I=bx,R.push(P[D].href));return 0===R.length&&(I=wx,e.ResourceURL.forEach((function(t){"tile"===t.resourceType&&(a=t.format,R.push(t.template))}))),{urls:R,layer:n.layer,matrixSet:o,format:a,projection:f,requestEncoding:I,tileGrid:C,style:u,dimensions:c,wrapX:d,crossOrigin:n.crossOrigin}},wL.source.XYZ=bd,wL.source.Zoomify=xw,wL.source.Zoomify.CustomTile=gw,wL.source.common={},wL.source.common.DEFAULT_WMS_VERSION=Jw,wL.source.ogcTileUtil={},wL.source.ogcTileUtil.getMapTileUrlTemplate=ug,wL.source.ogcTileUtil.getTileSetInfo=hg,wL.source.ogcTileUtil.getVectorTileUrlTemplate=cg,wL.sphere={},wL.sphere.DEFAULT_RADIUS=Ze,wL.sphere.getArea=function t(n,e){var r=e||{},i=r.radius||Ze,o=r.projection||"EPSG:3857",s=n.getType();s!==It.GEOMETRY_COLLECTION&&(n=n.clone().transform(o,"EPSG:4326"));var a,u,c,f,h,l,v=0;switch(s){case It.POINT:case It.MULTI_POINT:case It.LINE_STRING:case It.MULTI_LINE_STRING:case It.LINEAR_RING:break;case It.POLYGON:for(a=n.getCoordinates(),v=Math.abs(Ke(a[0],i)),c=1,f=a.length;c<f;++c)v-=Math.abs(Ke(a[c],i));break;case It.MULTI_POLYGON:for(c=0,f=(a=n.getCoordinates()).length;c<f;++c)for(u=a[c],v+=Math.abs(Ke(u[0],i)),h=1,l=u.length;h<l;++h)v-=Math.abs(Ke(u[h],i));break;case It.GEOMETRY_COLLECTION:var d=n.getGeometries();for(c=0,f=d.length;c<f;++c)v+=t(d[c],e);break;default:throw new Error("Unsupported geometry type: "+s)}return v},wL.sphere.getDistance=We,wL.sphere.getLength=function t(n,e){var r=e||{},i=r.radius||Ze,o=r.projection||"EPSG:3857",s=n.getType();s!==It.GEOMETRY_COLLECTION&&(n=n.clone().transform(o,"EPSG:4326"));var a,u,c,f,h,l,v=0;switch(s){case It.POINT:case It.MULTI_POINT:break;case It.LINE_STRING:case It.LINEAR_RING:v=He(a=n.getCoordinates(),i);break;case It.MULTI_LINE_STRING:case It.POLYGON:for(c=0,f=(a=n.getCoordinates()).length;c<f;++c)v+=He(a[c],i);break;case It.MULTI_POLYGON:for(c=0,f=(a=n.getCoordinates()).length;c<f;++c)for(h=0,l=(u=a[c]).length;h<l;++h)v+=He(u[h],i);break;case It.GEOMETRY_COLLECTION:var d=n.getGeometries();for(c=0,f=d.length;c<f;++c)v+=t(d[c],e);break;default:throw new Error("Unsupported geometry type: "+s)}return v},wL.sphere.offset=Xe,wL.string={},wL.string.compareVersions=Je,wL.string.padNumber=Ye,wL.structs={},wL.structs.LRUCache=zc,wL.structs.LinkedList=Xv,wL.structs.PriorityQueue=ja,wL.structs.PriorityQueue.DROP=Ma,wL.structs.RBush=Jv,wL.style={},wL.style.Circle=_v,wL.style.Fill=Sv,wL.style.Icon=zv,wL.style.IconImage=Dv,wL.style.IconImage.get=Pv,wL.style.IconImageCache=$o,wL.style.IconImageCache.shared=Vo,wL.style.Image=wv,wL.style.RegularShape=xv,wL.style.Stroke=Lv,wL.style.Style=Zv,wL.style.Style.createDefaultStyle=qv,wL.style.Style.createEditingStyle=$v,wL.style.Style.toFunction=Uv,wL.style.Text=Kv,wL.style.expressions={},wL.style.expressions.Operators=$l,wL.style.expressions.PALETTE_TEXTURE_ARRAY=cv,wL.style.expressions.arrayToGlsl=Hl,wL.style.expressions.colorToGlsl=Kl,wL.style.expressions.expressionToGlsl=Jl,wL.style.expressions.getStringNumberEquivalent=Xl,wL.style.expressions.getValueType=Vl,wL.style.expressions.isTypeUnique=Zl,wL.style.expressions.numberToGlsl=Wl,wL.style.expressions.stringToGlsl=Yl,wL.style.expressions.uniformNameForVariable=uv,wL.tilecoord={},wL.tilecoord.createOrUpdate=Lc,wL.tilecoord.fromKey=Bc,wL.tilecoord.getCacheKeyForTileKey=Uc,wL.tilecoord.getKey=Gc,wL.tilecoord.getKeyZXY=Fc,wL.tilecoord.hash=qc,wL.tilecoord.withinExtentAndZ=$c,wL.tilegrid={},wL.tilegrid.TileGrid=qf,wL.tilegrid.WMTS=mv,wL.tilegrid.WMTS.createFromCapabilitiesMatrixSet=bv,wL.tilegrid.common={},wL.tilegrid.common.DEFAULT_MAX_ZOOM=42,wL.tilegrid.common.DEFAULT_TILE_SIZE=Ia,wL.tilegrid.createForExtent=Zf,wL.tilegrid.createForProjection=Kf,wL.tilegrid.createXYZ=Wf,wL.tilegrid.extentFromProjection=Xf,wL.tilegrid.getForProjection=$f,wL.tilegrid.wrapX=Vf,wL.tileurlfunction={},wL.tileurlfunction.createFromTemplate=Yf,wL.tileurlfunction.createFromTemplates=Jf,wL.tileurlfunction.createFromTileUrlFunctions=Qf,wL.tileurlfunction.expandUrl=nh,wL.tileurlfunction.nullTileUrlFunction=th,wL.transform={},wL.transform.apply=nn,wL.transform.compose=an;wL.transform.composeCssTransform=function(t,n,e,r,i,o,s){return fn(an([1,0,0,1,0,0],t,n,e,r,i,o,s))},wL.transform.create=Xt,wL.transform.determinant=cn,wL.transform.invert=function(t){return un(t,t)},wL.transform.makeInverse=un,wL.transform.makeScale=on,wL.transform.multiply=Jt,wL.transform.reset=Yt,wL.transform.rotate=en,wL.transform.scale=rn,wL.transform.set=Qt,wL.transform.setFromArray=tn,wL.transform.toString=fn,wL.transform.translate=sn,wL.uri={},wL.uri.appendParams=eh,wL.util={},wL.util.VERSION=a,wL.util.abstract=r,wL.util.getUid=o,wL.vec={},wL.vec.mat4={},wL.vec.mat4.create=qh,wL.vec.mat4.fromTransform=$h,wL.webgl={},wL.webgl.ARRAY_BUFFER=ih,wL.webgl.Buffer=Fh,wL.webgl.Buffer.getArrayClassForType=Lh,wL.webgl.DYNAMIC_DRAW=ah,wL.webgl.ELEMENT_ARRAY_BUFFER=oh,wL.webgl.FLOAT=uh,wL.webgl.Helper=il,wL.webgl.Helper.computeAttributesStride=el,wL.webgl.PaletteTexture=ol,wL.webgl.PostProcessingPass=Bh,wL.webgl.RenderTarget=al,wL.webgl.STATIC_DRAW=sh,wL.webgl.STREAM_DRAW=35040,wL.webgl.ShaderBuilder={},wL.webgl.ShaderBuilder.ShaderBuilder=vv,wL.webgl.ShaderBuilder.parseLiteralStyle=dv,wL.webgl.TileTexture=pl,wL.webgl.UNSIGNED_BYTE=5121,wL.webgl.UNSIGNED_INT=5125,wL.webgl.UNSIGNED_SHORT=5123,wL.webgl.getContext=fh,wL.webgl.getSupportedExtensions=function(){if(!rh){var t=fh(document.createElement("canvas"));t&&(rh=t.getSupportedExtensions())}return rh},wL.xml={},wL.xml.OBJECT_PROPERTY_NODE_FACTORY=jh,wL.xml.XML_SCHEMA_INSTANCE_URI=hh,wL.xml.createElementNS=lh,wL.xml.getAllTextContent=vh,wL.xml.Mb=dh,wL.xml.getAttributeNS=yh,wL.xml.getDocument=Nh,wL.xml.getXMLSerializer=Ph,wL.xml.isDocument=ph,wL.xml.makeArrayExtender=bh,wL.xml.makeArrayPusher=wh,wL.xml.makeArraySerializer=Sh,wL.xml.makeChildAppender=_h,wL.xml.makeObjectPropertyPusher=xh,wL.xml.makeObjectPropertySetter=kh,wL.xml.makeReplacer=gh,wL.xml.makeSequence=Oh,wL.xml.makeSimpleNodeFactory=Mh,wL.xml.makeStructureNS=Th,wL.xml.parse=mh,wL.xml.parseNode=Eh,wL.xml.pushParseAndPop=Ah,wL.xml.pushSerializeAndPop=Rh,wL.xml.registerDocument=function(t){Dh=t},wL.xml.registerXMLSerializer=function(t){Ih=t},wL.xml.serialize=Ch;var gL=wL}},e={};function r(t){var i=e[t];if(void 0!==i)return i.exports;var o=e[t]={id:t,loaded:!1,exports:{}};return n[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=n,r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,{a:n}),n},r.d=function(t,n){for(var e in n)r.o(n,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},r.f={},r.e=function(t){return Promise.all(Object.keys(r.f).reduce((function(n,e){return r.f[e](t,n),n}),[]))},r.u=function(t){return t+".ol.js"},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},t={},r.l=function(n,e,i,o){if(t[n])t[n].push(e);else{var s,a;if(void 0!==i)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var f=u[c];if(f.getAttribute("src")==n||f.getAttribute("data-webpack")=="ol:"+i){s=f;break}}s||(a=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,r.nc&&s.setAttribute("nonce",r.nc),s.setAttribute("data-webpack","ol:"+i),s.src=n),t[n]=[e];var h=function(e,r){s.onerror=s.onload=null,clearTimeout(l);var i=t[n];if(delete t[n],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((function(t){return t(r)})),e)return e(r)},l=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),a&&document.head.appendChild(s)}},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},r.p="",function(){var t={179:0};r.f.j=function(n,e){var i=r.o(t,n)?t[n]:void 0;if(0!==i)if(i)e.push(i[2]);else{var o=new Promise((function(e,r){i=t[n]=[e,r]}));e.push(i[2]=o);var s=r.p+r.u(n),a=new Error;r.l(s,(function(e){if(r.o(t,n)&&(0!==(i=t[n])&&(t[n]=void 0),i)){var o=e&&("load"===e.type?"missing":e.type),s=e&&e.target&&e.target.src;a.message="Loading chunk "+n+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,i[1](a)}}),"chunk-"+n,n)}};var n=function(n,e){var i,o,s=e[0],a=e[1],u=e[2],c=0;if(s.some((function(n){return 0!==t[n]}))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(u)u(r)}for(n&&n(e);c<s.length;c++)o=s[c],r.o(t,o)&&t[o]&&t[o][0](),t[s[c]]=0},e=self.webpackChunkol=self.webpackChunkol||[];e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))}(),r(6760);var i=r(2618);return i=i.default}()}));
//# sourceMappingURL=ol.js.map