hereva-rendrerer/theme-xyz/public/lightgallery/js/lg-exif.min.js

3 lines
163 KiB
JavaScript

(function(){var e=!1,t=this,n=function(e){if(e instanceof n)return e;if(!(this instanceof n))return new n(e);this.EXIFwrapped=e};typeof exports!=='undefined'?(typeof module!=='undefined'&&module.exports&&(exports=module.exports=n),exports.EXIF=n):(t.EXIF=n);var o=n.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",42240:"Gamma",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber"},i=n.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},r=n.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},a=n.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},s=n.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function l(e){return!!e.exifdata}function u(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/mi)[1]||'';e=e.replace(/^data\:([^\;]+)\;base64,/gmi,'');var n=atob(e),o=n.length,i=new ArrayBuffer(o),r=new Uint8Array(i);for(var a=0;a<o;a++)r[a]=n.charCodeAt(a);return i}function c(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0);n.responseType="blob";n.onload=function(e){(this.status==200||this.status===0)&&t(this.response)};n.send()}function _(t,o){function i(e){var i=d(e);t.exifdata=i||{};var r=p(e);t.iptcdata=r||{};if(n.isXmpEnabled){var a=w(e);t.xmpdata=a||{}}o&&o.call(t)}if(t.src){if(/^data\:/i.test(t.src)){var r=u(t.src);i(r)}else if(/^blob\:/i.test(t.src)){var a=new FileReader;a.onload=function(e){i(e.target.result)};c(t.src,function(e){a.readAsArrayBuffer(e)})}else{var s=new XMLHttpRequest;s.onload=function(){if(this.status==200||this.status===0)i(s.response);else{throw "Could not load image"}s=null};s.open("GET",t.src,!0);s.responseType="arraybuffer";s.send(null)}}else if(self.FileReader&&(t instanceof self.Blob||t instanceof self.File)){a=new FileReader;a.onload=function(t){e&&console.log("Got file of length "+t.target.result.byteLength);i(t.target.result)};a.readAsArrayBuffer(t)}}function d(t){var n=new DataView(t);e&&console.log("Got file of length "+t.byteLength);if(n.getUint8(0)!=255||n.getUint8(1)!=216){e&&console.log("Not a valid JPEG");return!1}var o=2,i=t.byteLength,r;while(o<i){if(n.getUint8(o)!=255){e&&console.log("Not a valid marker at offset "+o+", found: "+n.getUint8(o));return!1}r=n.getUint8(o+1);e&&console.log(r);if(r==225){e&&console.log("Found 0xFFE1 marker");return P(n,o+4,n.getUint16(o+2)-2)}else o+=2+n.getUint16(o+2)}}function p(t){var n=new DataView(t);e&&console.log("Got file of length "+t.byteLength);if(n.getUint8(0)!=255||n.getUint8(1)!=216){e&&console.log("Not a valid JPEG");return!1}var o=2,i=t.byteLength,r=function(e,t){return e.getUint8(t)===56&&e.getUint8(t+1)===66&&e.getUint8(t+2)===73&&e.getUint8(t+3)===77&&e.getUint8(t+4)===4&&e.getUint8(t+5)===4};while(o<i){if(r(n,o)){var a=n.getUint8(o+7);a%2!==0&&(a+=1);a===0&&(a=4);var s=o+8+a,l=n.getUint16(o+6+a);return f(t,s,l)}o++}}var m={120:'caption',110:'credit',25:'keywords',55:'dateCreated',80:'byline',85:'bylineTitle',122:'captionWriter',105:'headline',116:'copyright',15:'category',16:'imageRank',101:'country',115:'source',92:'venue',90:'city',5:'objectName',7:'editStatus',20:'supplementalCategories',100:'countryCode',95:'state',40:'specialInstructions',101:'composition',75:'objectCycle'};function f(e,t,n){var o=new DataView(e),i={},r,a,s,l,u,c=t;while(c<t+n)o.getUint8(c)===28&&o.getUint8(c+1)===2&&(l=o.getUint8(c+2),l in m&&(s=o.getInt16(c+3),u=s+5,a=m[l],r=v(o,c+5,s),i.hasOwnProperty(a)?(i[a] instanceof Array?i[a].push(r):(i[a]=[i[a],r])):(i[a]=r))),c++;return i}function g(t,n,o,i,r){var a=t.getUint16(o,!r),s={},l,u,c;for(c=0;c<a;c++)l=o+c*12+2,u=i[t.getUint16(l,!r)],!u&&e&&console.log("Unknown tag: "+t.getUint16(l,!r)),s[u]=y(t,l,n,o,r);return s}function y(e,t,n,o,i){var r=e.getUint16(t+2,!i),a=e.getUint32(t+4,!i),s=e.getUint32(t+8,!i)+n,l,u,c,_,d,p;switch(r){case 1:;case 7:if(a==1){return e.getUint8(t+8,!i)}else{l=a>4?s:t+8;u=[];for(_=0;_<a;_++)u[_]=e.getUint8(l+_);return u};case 2:l=a>4?s:t+8;return v(e,l,a-1);case 3:if(a==1){return e.getUint16(t+8,!i)}else{l=a>2?s:t+8;u=[];for(_=0;_<a;_++)u[_]=e.getUint16(l+2*_,!i);return u};case 4:if(a==1){return e.getUint32(t+8,!i)}else{u=[];for(_=0;_<a;_++)u[_]=e.getUint32(s+4*_,!i);return u};case 5:if(a==1){d=e.getUint32(s,!i);p=e.getUint32(s+4,!i);c=new Number(d/p);c.numerator=d;c.denominator=p;return c}else{u=[];for(_=0;_<a;_++)d=e.getUint32(s+8*_,!i),p=e.getUint32(s+4+8*_,!i),u[_]=new Number(d/p),u[_].numerator=d,u[_].denominator=p;return u};case 9:if(a==1){return e.getInt32(t+8,!i)}else{u=[];for(_=0;_<a;_++)u[_]=e.getInt32(s+4*_,!i);return u};case 10:if(a==1){return e.getInt32(s,!i)/e.getInt32(s+4,!i)}else{u=[];for(_=0;_<a;_++)u[_]=e.getInt32(s+8*_,!i)/e.getInt32(s+4+8*_,!i);return u}}}function h(e,t,n){var o=e.getUint16(t,!n);return e.getUint32(t+2+o*12,!n)}function x(e,t,n,o){var i=h(e,t+n,o);if(!i){return{}}else if(i>e.byteLength){return{}}var r=g(e,t,t+i,a,o);if(r.Compression){switch(r.Compression){case 6:if(r.JpegIFOffset&&r.JpegIFByteCount){var s=t+r.JpegIFOffset,l=r.JpegIFByteCount;r.blob=new Blob([new Uint8Array(e.buffer,s,l)],{type:'image/jpeg'})};break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",r.Compression)}}else r.PhotometricInterpretation==2&&console.log("Thumbnail image format is RGB, which is not implemented.");return r}function v(e,t,n){var o="";for(var i=t;i<t+n;i++)o+=String.fromCharCode(e.getUint8(i));return o}function P(t,n){if(v(t,n,4)!="Exif"){e&&console.log("Not valid EXIF data! "+v(t,n,4));return!1}var a,l,u,c,_,d=n+6;if(t.getUint16(d)==18761)a=!1;else if(t.getUint16(d)==19789)a=!0;else{e&&console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)");return!1}if(t.getUint16(d+2,!a)!=42){e&&console.log("Not valid TIFF data! (no 0x002A)");return!1}var p=t.getUint32(d+4,!a);if(p<8){e&&console.log("Not valid TIFF data! (First offset less than 8)",t.getUint32(d+4,!a));return!1}l=g(t,d,d+p,i,a);if(l.ExifIFDPointer){c=g(t,d,d+l.ExifIFDPointer,o,a);for(u in c){switch(u){case "LightSource" :;case "Flash" :;case "MeteringMode" :;case "ExposureProgram" :;case "SensingMethod" :;case "SceneCaptureType" :;case "SceneType" :;case "CustomRendered" :;case "WhiteBalance" :;case "GainControl" :;case "Contrast" :;case "Saturation" :;case "Sharpness" :;case "SubjectDistanceRange" :;case "FileSource":c[u]=s[u][c[u]];break;case "ExifVersion" :;case "FlashpixVersion":c[u]=String.fromCharCode(c[u][0],c[u][1],c[u][2],c[u][3]);break;case "ComponentsConfiguration":c[u]=s.Components[c[u][0]]+s.Components[c[u][1]]+s.Components[c[u][2]]+s.Components[c[u][3]];break}l[u]=c[u]}}if(l.GPSInfoIFDPointer){_=g(t,d,d+l.GPSInfoIFDPointer,r,a);for(u in _){switch(u){case "GPSVersionID":_[u]=_[u][0]+"."+_[u][1]+"."+_[u][2]+"."+_[u][3];break}l[u]=_[u]}}l.thumbnail=x(t,d,p,a);return l}function w(t){if(!('DOMParser' in self)){return}var n=new DataView(t);e&&console.log("Got file of length "+t.byteLength);if(n.getUint8(0)!=255||n.getUint8(1)!=216){e&&console.log("Not a valid JPEG");return!1}var o=2,i=t.byteLength,r=new DOMParser;while(o<i-4){if(v(n,o,4)=="http"){var a=o-1,s=n.getUint16(o-2)-1,l=v(n,a,s),u=l.indexOf('xmpmeta>')+8;l=l.substring(l.indexOf('<x:xmpmeta'),u);var c=l.indexOf('x:xmpmeta')+10;l=l.slice(0,c)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" '+'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '+'xmlns:tiff="http://ns.adobe.com/tiff/1.0/" '+'xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" '+'xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" '+'xmlns:exif="http://ns.adobe.com/exif/1.0/" '+'xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" '+'xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" '+'xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" '+'xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" '+'xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+l.slice(c);var _=r.parseFromString(l,'text/xml');return L(_)}else o++}}function b(e){var t={};if(e.nodeType==1){if(e.attributes.length>0){t['@attributes']={};for(var n=0;n<e.attributes.length;n++){var o=e.attributes.item(n);t['@attributes'][o.nodeName]=o.nodeValue}}}else if(e.nodeType==3){return e.nodeValue}if(e.hasChildNodes()){for(var i=0;i<e.childNodes.length;i++){var r=e.childNodes.item(i),a=r.nodeName;if(t[a]==null)t[a]=b(r);else{if(t[a].push==null){var s=t[a];t[a]=[];t[a].push(s)}t[a].push(b(r))}}}return t}function L(e){try{var t={};if(e.children.length>0){for(var n=0;n<e.children.length;n++){var o=e.children.item(n),i=o.attributes;for(var r in i){var a=i[r],s=a.nodeName,l=a.nodeValue;s!==void 0&&(t[s]=l)}var u=o.nodeName;if(typeof t[u]=="undefined")t[u]=b(o);else{if(typeof t[u].push=="undefined"){var c=t[u];t[u]=[];t[u].push(c)}t[u].push(b(o))}}}else t=e.textContent;return t}catch(e){console.log(e.message)}}n.enableXmp=function(){n.isXmpEnabled=!0};n.disableXmp=function(){n.isXmpEnabled=!1};n.getData=function(e,t){if((self.Image&&e instanceof self.Image||self.HTMLImageElement&&e instanceof self.HTMLImageElement)&&!e.complete)return!1;l(e)?(t&&t.call(e)):_(e,t);return!0};n.getTag=function(e,t){if(!l(e))return;return e.exifdata[t]};n.getIptcTag=function(e,t){if(!l(e))return;return e.iptcdata[t]};n.getAllTags=function(e){if(!l(e))return{};var t,n=e.exifdata,o={};for(t in n)n.hasOwnProperty(t)&&(o[t]=n[t]);return o};n.getAllIptcTags=function(e){if(!l(e))return{};var t,n=e.iptcdata,o={};for(t in n)n.hasOwnProperty(t)&&(o[t]=n[t]);return o};n.pretty=function(e){if(!l(e))return"";var t,n=e.exifdata,o="";for(t in n)n.hasOwnProperty(t)&&(typeof n[t]=="object"?(n[t] instanceof Number?(o+=t+" : "+n[t]+" ["+n[t].numerator+"/"+n[t].denominator+"]\r\n"):(o+=t+" : ["+n[t].length+" values]\r\n")):(o+=t+" : "+n[t]+"\r\n"));return o};n.readFromBinaryFile=function(e){return d(e)};typeof define==='function'&&define.amd&&define('exif-js',[],function(){return n})}.call(this)),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.L={})}(this,function(e){"use strict";function t(e){var t,n,o,i;for(n=1,o=arguments.length;n<o;n++){i=arguments[n];for(t in i)e[t]=i[t]}return e}function n(e,t){var n=Array.prototype.slice;if(e.bind)return e.bind.apply(e,n.call(arguments,1));var o=n.call(arguments,2);return function(){return e.apply(t,o.length?o.concat(n.call(arguments)):arguments)}}function o(e){return e._leaflet_id=e._leaflet_id||++nt,e._leaflet_id}function i(e,t,n){var o,i,r,a;return a=function(){o=!1,i&&(r.apply(n,i),i=!1)},r=function(){o?i=arguments:(e.apply(n,arguments),setTimeout(a,t),o=!0)}}function r(e,t,n){var o=t[1],i=t[0],r=o-i;return e===o&&n?e:((e-i)%r+r)%r+i}function a(){return!1}function s(e,t){var n=Math.pow(10,void 0===t?6:t);return Math.round(e*n)/n}function l(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function u(e){return l(e).split(/\s+/)}function c(e,t){e.hasOwnProperty("options")||(e.options=e.options?tt(e.options):{});for(var n in t)e.options[n]=t[n];return e.options}function _(e,t,n){var o=[];for(var i in e)o.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(e[i]));return(t&&-1!==t.indexOf("?")?"&":"?")+o.join("&")}function d(e,t){return e.replace(ot,function(e,n){var o=t[n];if(void 0===o)throw new Error("No value provided for variable "+e);return"function"==typeof o&&(o=o(t)),o})}function p(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}function m(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}function f(e){var t=+new Date,n=Math.max(0,16-(t-at));return at=t+n,window.setTimeout(e,n)}function g(e,t,o){if(!o||st!==f)return st.call(window,n(e,t));e.call(t)}function y(e){e&&lt.call(window,e)}function h(){}function x(e){if("undefined"!=typeof L&&L&&L.Mixin){e=it(e)?e:[e];for(var t=0;t<e.length;t++)e[t]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}function v(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}function P(e,t,n){return e instanceof v?e:it(e)?new v(e[0],e[1]):void 0===e||null===e?e:"object"==typeof e&&"x" in e&&"y" in e?new v(e.x,e.y):new v(e,t,n)}function w(e,t){if(e)for(var n=t?[e,t]:e,o=0,i=n.length;o<i;o++)this.extend(n[o])}function b(e,t){return!e||e instanceof w?e:new w(e,t)}function T(e,t){if(e)for(var n=t?[e,t]:e,o=0,i=n.length;o<i;o++)this.extend(n[o])}function S(e,t){return e instanceof T?e:new T(e,t)}function z(e,t,n){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==n&&(this.alt=+n)}function C(e,t,n){return e instanceof z?e:it(e)&&"object"!=typeof e[0]?3===e.length?new z(e[0],e[1],e[2]):2===e.length?new z(e[0],e[1]):null:void 0===e||null===e?e:"object"==typeof e&&"lat" in e?new z(e.lat,"lng" in e?e.lng:e.lon,e.alt):void 0===t?null:new z(e,t,n)}function A(e,t,n,o){if(it(e))return this._a=e[0],this._b=e[1],this._c=e[2],void(this._d=e[3]);this._a=e,this._b=t,this._c=n,this._d=o}function k(e,t,n,o){return new A(e,t,n,o)}function E(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function B(e,t){var n,o,i,r,a,s,l="";for(n=0,i=e.length;n<i;n++){for(o=0,r=(a=e[n]).length;o<r;o++)s=a[o],l+=(o?"L":"M")+s.x+" "+s.y;l+=t?Xt?"z":"x":""}return l||"M0 0"}function I(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}function Z(e,t,n,o){return"touchstart"===t?O(e,n,o):"touchmove"===t?j(e,n,o):"touchend"===t&&U(e,n,o),this}function M(e,t,n){var o=e["_leaflet_"+t+n];return"touchstart"===t?e.removeEventListener(en,o,!1):"touchmove"===t?e.removeEventListener(tn,o,!1):"touchend"===t&&(e.removeEventListener(nn,o,!1),e.removeEventListener(on,o,!1)),this}function O(e,t,o){var i=n(function(e){if("mouse"!==e.pointerType&&e.MSPOINTER_TYPE_MOUSE&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE){if(!(rn.indexOf(e.target.tagName)<0))return;we(e)}F(e,t)});e["_leaflet_touchstart"+o]=i,e.addEventListener(en,i,!1),sn||(document.documentElement.addEventListener(en,R,!0),document.documentElement.addEventListener(tn,N,!0),document.documentElement.addEventListener(nn,D,!0),document.documentElement.addEventListener(on,D,!0),sn=!0)}function R(e){an[e.pointerId]=e,ln++}function N(e){an[e.pointerId]&&(an[e.pointerId]=e)}function D(e){delete an[e.pointerId],ln--}function F(e,t){e.touches=[];for(var n in an)e.touches.push(an[n]);e.changedTouches=[e],t(e)}function j(e,t,n){var o=function(e){(e.pointerType!==e.MSPOINTER_TYPE_MOUSE&&"mouse"!==e.pointerType||0!==e.buttons)&&F(e,t)};e["_leaflet_touchmove"+n]=o,e.addEventListener(tn,o,!1)}function U(e,t,n){var o=function(e){F(e,t)};e["_leaflet_touchend"+n]=o,e.addEventListener(nn,o,!1),e.addEventListener(on,o,!1)}function G(e,t,n){function o(e){var t;if(Ht){if(!Lt||"mouse"===e.pointerType)return;t=ln}else t=e.touches.length;if(!(t>1)){var n=Date.now(),o=n-(r||n);a=e.touches?e.touches[0]:e,s=o>0&&o<=l,r=n}}function i(e){if(s&&!a.cancelBubble){if(Ht){if(!Lt||"mouse"===e.pointerType)return;var n,o,i={};for(o in a)n=a[o],i[o]=n&&n.bind?n.bind(a):n;a=i}a.type="dblclick",t(a),r=null}}var r,a,s=!1,l=250;return e[_n+un+n]=o,e[_n+cn+n]=i,e[_n+"dblclick"+n]=t,e.addEventListener(un,o,!1),e.addEventListener(cn,i,!1),e.addEventListener("dblclick",t,!1),this}function W(e,t){var n=e[_n+un+t],o=e[_n+cn+t],i=e[_n+"dblclick"+t];return e.removeEventListener(un,n,!1),e.removeEventListener(cn,o,!1),Lt||e.removeEventListener("dblclick",i,!1),this}function H(e){return"string"==typeof e?document.getElementById(e):e}function V(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){var o=document.defaultView.getComputedStyle(e,null);n=o?o[t]:null}return"auto"===n?null:n}function q(e,t,n){var o=document.createElement(e);return o.className=t||"",n&&n.appendChild(o),o}function K(e){var t=e.parentNode;t&&t.removeChild(e)}function Y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function J(e){var t=e.parentNode;t.lastChild!==e&&t.appendChild(e)}function X(e){var t=e.parentNode;t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function Q(e,t){if(void 0!==e.classList)return e.classList.contains(t);var n=ne(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}function $(e,t){if(void 0!==e.classList)for(var n=u(t),o=0,i=n.length;o<i;o++)e.classList.add(n[o]);else if(!Q(e,t)){var r=ne(e);te(e,(r?r+" ":"")+t)}}function ee(e,t){void 0!==e.classList?e.classList.remove(t):te(e,l((" "+ne(e)+" ").replace(" "+t+" "," ")))}function te(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}function ne(e){return void 0===e.className.baseVal?e.className:e.className.baseVal}function oe(e,t){"opacity" in e.style?e.style.opacity=t:"filter" in e.style&&ie(e,t)}function ie(e,t){var n=!1,o="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(o)}catch(e){if(1===t)return};t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+o+"(opacity="+t+")"}function re(e){for(var t=document.documentElement.style,n=0;n<e.length;n++)if(e[n] in t)return e[n];return!1}function ae(e,t,n){var o=t||new v(0,0);e.style[dn]=(Rt?"translate("+o.x+"px,"+o.y+"px)":"translate3d("+o.x+"px,"+o.y+"px,0)")+(n?" scale("+n+")":"")}function se(e,t){e._leaflet_pos=t,Ft?ae(e,t):(e.style.left=t.x+"px",e.style.top=t.y+"px")}function le(e){return e._leaflet_pos||new v(0,0)}function ue(){fe(window,"dragstart",we)}function ce(){ge(window,"dragstart",we)}function _e(e){for(;-1===e.tabIndex;)e=e.parentNode;e.style&&(de(),gn=e,yn=e.style.outline,e.style.outline="none",fe(window,"keydown",de))}function de(){gn&&(gn.style.outline=yn,gn=void 0,yn=void 0,ge(window,"keydown",de))}function pe(e){do{e=e.parentNode}while(!(e.offsetWidth&&e.offsetHeight||e===document.body));return e}function me(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}function fe(e,t,n,o){if("object"==typeof t)for(var i in t)ye(e,i,t[i],n);else for(var r=0,a=(t=u(t)).length;r<a;r++)ye(e,t[r],n,o);return this}function ge(e,t,n,o){if("object"==typeof t)for(var i in t)he(e,i,t[i],n);else if(t)for(var r=0,a=(t=u(t)).length;r<a;r++)he(e,t[r],n,o);else{for(var s in e[vn])he(e,s,e[vn][s]);delete e[vn]}return this}function ye(e,t,n,i){var r=t+o(n)+(i?"_"+o(i):"");if(e[vn]&&e[vn][r])return this;var a=function(t){return n.call(i||e,t||window.event)},s=a;Ht&&0===t.indexOf("touch")?Z(e,t,a,r):!Vt||"dblclick"!==t||!G||Ht&&Et?"addEventListener" in e?"mousewheel"===t?e.addEventListener("onwheel" in e?"wheel":"mousewheel",a,!1):"mouseenter"===t||"mouseleave"===t?(a=function(t){t=t||window.event,Ce(e,t)&&s(t)},e.addEventListener("mouseenter"===t?"mouseover":"mouseout",a,!1)):("click"===t&&St&&(a=function(e){Ae(e,s)}),e.addEventListener(t,a,!1)):"attachEvent" in e&&e.attachEvent("on"+t,a):G(e,a,r),e[vn]=e[vn]||{},e[vn][r]=a}function he(e,t,n,i){var r=t+o(n)+(i?"_"+o(i):""),a=e[vn]&&e[vn][r];if(!a)return this;Ht&&0===t.indexOf("touch")?M(e,t,r):!Vt||"dblclick"!==t||!W||Ht&&Et?"removeEventListener" in e?"mousewheel"===t?e.removeEventListener("onwheel" in e?"wheel":"mousewheel",a,!1):e.removeEventListener("mouseenter"===t?"mouseover":"mouseleave"===t?"mouseout":t,a,!1):"detachEvent" in e&&e.detachEvent("on"+t,a):W(e,r),e[vn][r]=null}function xe(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,ze(e),this}function ve(e){return ye(e,"mousewheel",xe),this}function Pe(e){return fe(e,"mousedown touchstart dblclick",xe),ye(e,"click",Se),this}function we(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function be(e){return we(e),xe(e),this}function Le(e,t){if(!t)return new v(e.clientX,e.clientY);var n=me(t),o=n.boundingClientRect;return new v((e.clientX-o.left)/n.x-t.clientLeft,(e.clientY-o.top)/n.y-t.clientTop)}function Te(e){return Lt?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/Pn:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function Se(e){wn[e.type]=!0}function ze(e){var t=wn[e.type];return wn[e.type]=!1,t}function Ce(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(e){return!1};return n!==e}function Ae(e,t){var n=e.timeStamp||e.originalEvent&&e.originalEvent.timeStamp,o=hn&&n-hn;o&&o>100&&o<500||e.target._simulatedClick&&!e._simulated?be(e):(hn=n,t(e))}function ke(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=Ze(e,n),e=Be(e,n)}function Ee(e,t,n){return Math.sqrt(De(e,t,n,!0))}function Be(e,t){var n=e.length,o=new(typeof Uint8Array!="undefined"?Uint8Array:Array)(n);o[0]=o[n-1]=1,Ie(e,o,t,0,n-1);var i,r=[];for(i=0;i<n;i++)o[i]&&r.push(e[i]);return r}function Ie(e,t,n,o,i){var r,a,s,l=0;for(a=o+1;a<=i-1;a++)(s=De(e[a],e[o],e[i],!0))>l&&(r=a,l=s);l>n&&(t[r]=1,Ie(e,t,n,o,r),Ie(e,t,n,r,i))}function Ze(e,t){for(var n=[e[0]],o=1,i=0,r=e.length;o<r;o++)Ne(e[o],e[i])>t&&(n.push(e[o]),i=o);return i<r-1&&n.push(e[r-1]),n}function Me(e,t,n,o,i){var r,a,s,l=o?In:Re(e,n),u=Re(t,n);for(In=u;;){if(!(l|u))return[e,t];if(l&u)return!1;s=Re(a=Oe(e,t,r=l||u,n,i),n),r===l?(e=a,l=s):(t=a,u=s)}}function Oe(e,t,n,o,i){var r,a,s=t.x-e.x,l=t.y-e.y,u=o.min,c=o.max;return 8&n?(r=e.x+s*(c.y-e.y)/l,a=c.y):4&n?(r=e.x+s*(u.y-e.y)/l,a=u.y):2&n?(r=c.x,a=e.y+l*(c.x-e.x)/s):1&n&&(r=u.x,a=e.y+l*(u.x-e.x)/s),new v(r,a,i)}function Re(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function Ne(e,t){var n=t.x-e.x,o=t.y-e.y;return n*n+o*o}function De(e,t,n,o){var i,r=t.x,a=t.y,s=n.x-r,l=n.y-a,u=s*s+l*l;return u>0&&((i=((e.x-r)*s+(e.y-a)*l)/u)>1?(r=n.x,a=n.y):i>0&&(r+=s*i,a+=l*i)),s=e.x-r,l=e.y-a,o?s*s+l*l:new v(r,a)}function Fe(e){return!it(e[0])||"object"!=typeof e[0][0]&&void 0!==e[0][0]}function je(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Fe(e)}function Ue(e,t,n){var o,i,r,a,s,l,u,c,_,d=[1,4,2,8];for(i=0,u=e.length;i<u;i++)e[i]._code=Re(e[i],t);for(a=0;a<4;a++){for(c=d[a],o=[],i=0,r=(u=e.length)-1;i<u;r=i++)s=e[i],l=e[r],s._code&c?l._code&c||((_=Oe(l,s,c,t,n))._code=Re(_,t),o.push(_)):(l._code&c&&((_=Oe(l,s,c,t,n))._code=Re(_,t),o.push(_)),o.push(s));e=o}return e}function Ge(e,t){var n,o,i,r,a="Feature"===e.type?e.geometry:e,s=a?a.coordinates:null,l=[],u=t&&t.pointToLayer,c=t&&t.coordsToLatLng||We;if(!s&&!a)return null;switch(a.type){case"Point":return n=c(s),u?u(e,n):new $n(n);case"MultiPoint":for(i=0,r=s.length;i<r;i++)n=c(s[i]),l.push(u?u(e,n):new $n(n));return new Yn(l);case"LineString":;case"MultiLineString":return o=He(s,"LineString"===a.type?0:1,c),new oo(o,t);case"Polygon":;case"MultiPolygon":return o=He(s,"Polygon"===a.type?1:2,c),new io(o,t);case"GeometryCollection":for(i=0,r=a.geometries.length;i<r;i++){var _=Ge({geometry:a.geometries[i],type:"Feature",properties:e.properties},t);_&&l.push(_)};return new Yn(l);default:throw new Error("Invalid GeoJSON object.")}}function We(e){return new z(e[1],e[0],e[2])}function He(e,t,n){for(var o,i=[],r=0,a=e.length;r<a;r++)o=t?He(e[r],t-1,n):(n||We)(e[r]),i.push(o);return i}function Ve(e,t){return t="number"==typeof t?t:6,void 0!==e.alt?[s(e.lng,t),s(e.lat,t),s(e.alt,t)]:[s(e.lng,t),s(e.lat,t)]}function qe(e,t,n,o){for(var i=[],r=0,a=e.length;r<a;r++)i.push(t?qe(e[r],t-1,n,o):Ve(e[r],o));return!t&&n&&i.push(i[0]),i}function Ke(e,n){return e.feature?t({},e.feature,{geometry:n}):Ye(n)}function Ye(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}function Je(e,t){return new ro(e,t)}function Xe(e,t){return new go(e,t)}function Qe(e){return Jt?new xo(e):null}function $e(e){return Xt||Qt?new bo(e):null}var et=Object.freeze;Object.freeze=function(e){return e};var tt=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}(),nt=0,ot=/\{ *([\w_-]+) *\}/g,it=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},rt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",at=0,st=window.requestAnimationFrame||m("RequestAnimationFrame")||f,lt=window.cancelAnimationFrame||m("CancelAnimationFrame")||m("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)},ut=(Object.freeze||Object)({freeze:et,extend:t,create:tt,bind:n,lastId:nt,stamp:o,throttle:i,wrapNum:r,falseFn:a,formatNum:s,trim:l,splitWords:u,setOptions:c,getParamString:_,template:d,isArray:it,indexOf:p,emptyImageUrl:rt,requestFn:st,cancelFn:lt,requestAnimFrame:g,cancelAnimFrame:y});h.extend=function(e){var n=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=n.__super__=this.prototype,i=tt(o);i.constructor=n,n.prototype=i;for(var r in this)this.hasOwnProperty(r)&&"prototype"!==r&&"__super__"!==r&&(n[r]=this[r]);return e.statics&&(t(n,e.statics),delete e.statics),e.includes&&(x(e.includes),t.apply(null,[i].concat(e.includes)),delete e.includes),i.options&&(e.options=t(tt(i.options),e.options)),t(i,e),i._initHooks=[],i.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=i._initHooks.length;e<t;e++)i._initHooks[e].call(this)}},n},h.include=function(e){return t(this.prototype,e),this},h.mergeOptions=function(e){return t(this.prototype.options,e),this},h.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var ct={on:function(e,t,n){if("object"==typeof e)for(var o in e)this._on(o,e[o],t);else for(var i=0,r=(e=u(e)).length;i<r;i++)this._on(e[i],t,n);return this},off:function(e,t,n){if(e)if("object"==typeof e)for(var o in e)this._off(o,e[o],t);else for(var i=0,r=(e=u(e)).length;i<r;i++)this._off(e[i],t,n);else delete this._events;return this},_on:function(e,t,n){this._events=this._events||{};var o=this._events[e];o||(o=[],this._events[e]=o),n===this&&(n=void 0);for(var i={fn:t,ctx:n},r=o,a=0,s=r.length;a<s;a++)if(r[a].fn===t&&r[a].ctx===n)return;r.push(i)},_off:function(e,t,n){var o,i,r;if(this._events&&(o=this._events[e]))if(t){if(n===this&&(n=void 0),o)for(i=0,r=o.length;i<r;i++){var s=o[i];if(s.ctx===n&&s.fn===t)return s.fn=a,this._firingCount&&(this._events[e]=o=o.slice()),void o.splice(i,1)}}else{for(i=0,r=o.length;i<r;i++)o[i].fn=a;delete this._events[e]}},fire:function(e,n,o){if(!this.listens(e,o))return this;var i=t({},n,{type:e,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var r=this._events[e];if(r){this._firingCount=this._firingCount+1||1;for(var a=0,s=r.length;a<s;a++){var l=r[a];l.fn.call(l.ctx||this,i)}this._firingCount--}}return o&&this._propagateEvent(i),this},listens:function(e,t){var n=this._events&&this._events[e];if(n&&n.length)return!0;if(t)for(var o in this._eventParents)if(this._eventParents[o].listens(e,t))return!0;return!1},once:function(e,t,o){if("object"==typeof e){for(var i in e)this.once(i,e[i],t);return this}var r=n(function(){this.off(e,t,o).off(e,r,o)},this);return this.on(e,t,o).on(e,r,o)},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[o(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[o(e)],this},_propagateEvent:function(e){for(var n in this._eventParents)this._eventParents[n].fire(e.type,t({layer:e.target,propagatedFrom:e.target},e),!0)}};ct.addEventListener=ct.on,ct.removeEventListener=ct.clearAllEventListeners=ct.off,ct.addOneTimeEventListener=ct.once,ct.fireEvent=ct.fire,ct.hasEventListeners=ct.listens;var _t=h.extend(ct),dt=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};v.prototype={clone:function(){return new v(this.x,this.y)},add:function(e){return this.clone()._add(P(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(P(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new v(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new v(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=dt(this.x),this.y=dt(this.y),this},distanceTo:function(e){var t=(e=P(e)).x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return(e=P(e)).x===this.x&&e.y===this.y},contains:function(e){return e=P(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+s(this.x)+", "+s(this.y)+")"}},w.prototype={extend:function(e){return e=P(e),this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(e.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(e.y,this.max.y)):(this.min=e.clone(),this.max=e.clone()),this},getCenter:function(e){return new v((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return new v(this.min.x,this.max.y)},getTopRight:function(){return new v(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,n;return(e="number"==typeof e[0]||e instanceof v?P(e):b(e)) instanceof w?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=b(e);var t=this.min,n=this.max,o=e.min,i=e.max,r=i.x>=t.x&&o.x<=n.x,a=i.y>=t.y&&o.y<=n.y;return r&&a},overlaps:function(e){e=b(e);var t=this.min,n=this.max,o=e.min,i=e.max,r=i.x>t.x&&o.x<n.x,a=i.y>t.y&&o.y<n.y;return r&&a},isValid:function(){return!(!this.min||!this.max)}},T.prototype={extend:function(e){var t,n,o=this._southWest,i=this._northEast;if(e instanceof z)t=e,n=e;else{if(!(e instanceof T))return e?this.extend(C(e)||S(e)):this;if(t=e._southWest,n=e._northEast,!t||!n)return this}return o||i?(o.lat=Math.min(t.lat,o.lat),o.lng=Math.min(t.lng,o.lng),i.lat=Math.max(n.lat,i.lat),i.lng=Math.max(n.lng,i.lng)):(this._southWest=new z(t.lat,t.lng),this._northEast=new z(n.lat,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,o=Math.abs(t.lat-n.lat)*e,i=Math.abs(t.lng-n.lng)*e;return new T(new z(t.lat-o,t.lng-i),new z(n.lat+o,n.lng+i))},getCenter:function(){return new z((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new z(this.getNorth(),this.getWest())},getSouthEast:function(){return new z(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e="number"==typeof e[0]||e instanceof z||"lat" in e?C(e):S(e);var t,n,o=this._southWest,i=this._northEast;return e instanceof T?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=o.lat&&n.lat<=i.lat&&t.lng>=o.lng&&n.lng<=i.lng},intersects:function(e){e=S(e);var t=this._southWest,n=this._northEast,o=e.getSouthWest(),i=e.getNorthEast(),r=i.lat>=t.lat&&o.lat<=n.lat,a=i.lng>=t.lng&&o.lng<=n.lng;return r&&a},overlaps:function(e){e=S(e);var t=this._southWest,n=this._northEast,o=e.getSouthWest(),i=e.getNorthEast(),r=i.lat>t.lat&&o.lat<n.lat,a=i.lng>t.lng&&o.lng<n.lng;return r&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,t){return!!e&&(e=S(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t))},isValid:function(){return!(!this._southWest||!this._northEast)}},z.prototype={equals:function(e,t){return!!e&&(e=C(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+s(this.lat,e)+", "+s(this.lng,e)+")"},distanceTo:function(e){return mt.distance(this,C(e))},wrap:function(){return mt.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return S([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])},clone:function(){return new z(this.lat,this.lng,this.alt)}};var pt={latLngToPoint:function(e,t){var n=this.projection.project(e),o=this.scale(t);return this.transformation._transform(n,o)},pointToLatLng:function(e,t){var n=this.scale(t),o=this.transformation.untransform(e,n);return this.projection.unproject(o)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,n=this.scale(e);return new w(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?r(e.lng,this.wrapLng,!0):e.lng;return new z(this.wrapLat?r(e.lat,this.wrapLat,!0):e.lat,t,e.alt)},wrapLatLngBounds:function(e){var t=e.getCenter(),n=this.wrapLatLng(t),o=t.lat-n.lat,i=t.lng-n.lng;if(0===o&&0===i)return e;var r=e.getSouthWest(),a=e.getNorthEast();return new T(new z(r.lat-o,r.lng-i),new z(a.lat-o,a.lng-i))}},mt=t({},pt,{wrapLng:[-180,180],R:6371000,distance:function(e,t){var n=Math.PI/180,o=e.lat*n,i=t.lat*n,r=Math.sin((t.lat-e.lat)*n/2),a=Math.sin((t.lng-e.lng)*n/2),s=r*r+Math.cos(o)*Math.cos(i)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),ft={R:6378137,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,o=Math.max(Math.min(n,e.lat),-n),i=Math.sin(o*t);return new v(this.R*e.lng*t,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(e){var t=180/Math.PI;return new z((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:function(){var e=6378137*Math.PI;return new w([-e,-e],[e,e])}()};A.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t=t||1,new v((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}};var gt,yt,ht,xt=t({},mt,{code:"EPSG:3857",projection:ft,transformation:function(){var e=.5/(Math.PI*ft.R);return k(e,.5,-e,.5)}()}),vt=t({},xt,{code:"EPSG:900913"}),Pt=document.documentElement.style,wt="ActiveXObject" in window,bt=wt&&!document.addEventListener,Lt="msLaunchUri" in navigator&&!("documentMode" in document),Tt=I("webkit"),St=I("android"),zt=I("android 2")||I("android 3"),Ct=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),At=St&&I("Google")&&Ct<537&&!("AudioNode" in window),kt=!!window.opera,Et=I("chrome"),Bt=I("gecko")&&!Tt&&!kt&&!wt,It=!Et&&I("safari"),Zt=I("phantom"),Mt="OTransition" in Pt,Ot=0===navigator.platform.indexOf("Win"),Rt=wt&&"transition" in Pt,Nt="WebKitCSSMatrix" in window&&"m11" in new window.WebKitCSSMatrix&&!zt,Dt="MozPerspective" in Pt,Ft=!window.L_DISABLE_3D&&(Rt||Nt||Dt)&&!Mt&&!Zt,jt="undefined"!=typeof orientation||I("mobile"),Ut=jt&&Tt,Gt=jt&&Nt,Wt=!window.PointerEvent&&window.MSPointerEvent,Ht=!(!window.PointerEvent&&!Wt),Vt=!window.L_NO_TOUCH&&(Ht||"ontouchstart" in window||window.DocumentTouch&&document instanceof window.DocumentTouch),qt=jt&&kt,Kt=jt&&Bt,Yt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Jt=!!document.createElement("canvas").getContext,Xt=!(!document.createElementNS||!E("svg").createSVGRect),Qt=!Xt&&function(){try{var e=document.createElement("div");e.innerHTML='<v:shape adj="1"/>';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(e){return!1}}(),$t=(Object.freeze||Object)({ie:wt,ielt9:bt,edge:Lt,webkit:Tt,android:St,android23:zt,androidStock:At,opera:kt,chrome:Et,gecko:Bt,safari:It,phantom:Zt,opera12:Mt,win:Ot,ie3d:Rt,webkit3d:Nt,gecko3d:Dt,any3d:Ft,mobile:jt,mobileWebkit:Ut,mobileWebkit3d:Gt,msPointer:Wt,pointer:Ht,touch:Vt,mobileOpera:qt,mobileGecko:Kt,retina:Yt,canvas:Jt,svg:Xt,vml:Qt}),en=Wt?"MSPointerDown":"pointerdown",tn=Wt?"MSPointerMove":"pointermove",nn=Wt?"MSPointerUp":"pointerup",on=Wt?"MSPointerCancel":"pointercancel",rn=["INPUT","SELECT","OPTION"],an={},sn=!1,ln=0,un=Wt?"MSPointerDown":Ht?"pointerdown":"touchstart",cn=Wt?"MSPointerUp":Ht?"pointerup":"touchend",_n="_leaflet_",dn=re(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),pn=re(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),mn="webkitTransition"===pn||"OTransition"===pn?pn+"End":"transitionend";if("onselectstart" in document)gt=function(){fe(window,"selectstart",we)},yt=function(){ge(window,"selectstart",we)};else{var fn=re(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);gt=function(){if(fn){var e=document.documentElement.style;ht=e[fn],e[fn]="none"}},yt=function(){fn&&(document.documentElement.style[fn]=ht,ht=void 0)}}var gn,yn,hn,xn=(Object.freeze||Object)({TRANSFORM:dn,TRANSITION:pn,TRANSITION_END:mn,get:H,getStyle:V,create:q,remove:K,empty:Y,toFront:J,toBack:X,hasClass:Q,addClass:$,removeClass:ee,setClass:te,getClass:ne,setOpacity:oe,testProp:re,setTransform:ae,setPosition:se,getPosition:le,disableTextSelection:gt,enableTextSelection:yt,disableImageDrag:ue,enableImageDrag:ce,preventOutline:_e,restoreOutline:de,getSizedParentNode:pe,getScale:me}),vn="_leaflet_events",Pn=Ot&&Et?2*window.devicePixelRatio:Bt?window.devicePixelRatio:1,wn={},bn=(Object.freeze||Object)({on:fe,off:ge,stopPropagation:xe,disableScrollPropagation:ve,disableClickPropagation:Pe,preventDefault:we,stop:be,getMousePosition:Le,getWheelDelta:Te,fakeStop:Se,skipped:ze,isExternalTarget:Ce,addListener:fe,removeListener:ge}),Ln=_t.extend({run:function(e,t,n,o){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(o||.5,.2),this._startPos=le(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=g(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=1e3*this._duration;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){var n=this._startPos.add(this._offset.multiplyBy(e));t&&n._round(),se(this._el,n),this.fire("step")},_complete:function(){y(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),Tn=_t.extend({options:{crs:xt,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,t){t=c(this,t),this._initContainer(e),this._initLayout(),this._onResize=n(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),void 0!==t.zoom&&(this._zoom=this._limitZoom(t.zoom)),t.center&&void 0!==t.zoom&&this.setView(C(t.center),t.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._zoomAnimated=pn&&Ft&&!qt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),fe(this._proxy,mn,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,n,o){return n=void 0===n?this._zoom:this._limitZoom(n),e=this._limitCenter(C(e),n,this.options.maxBounds),o=o||{},this._stop(),this._loaded&&!o.reset&&!0!==o&&(void 0!==o.animate&&(o.zoom=t({animate:o.animate},o.zoom),o.pan=t({animate:o.animate,duration:o.duration},o.pan)),this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,n,o.zoom):this._tryAnimatedPan(e,o.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,n),this)},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e=e||(Ft?this.options.zoomDelta:1),this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e=e||(Ft?this.options.zoomDelta:1),this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,n){var o=this.getZoomScale(t),i=this.getSize().divideBy(2),r=(e instanceof v?e:this.latLngToContainerPoint(e)).subtract(i).multiplyBy(1-1/o),a=this.containerPointToLatLng(i.add(r));return this.setView(a,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():S(e);var n=P(t.paddingTopLeft||t.padding||[0,0]),o=P(t.paddingBottomRight||t.padding||[0,0]),i=this.getBoundsZoom(e,!1,n.add(o));if((i="number"==typeof t.maxZoom?Math.min(t.maxZoom,i):i)===1/0)return{center:e.getCenter(),zoom:i};var r=o.subtract(n).divideBy(2),a=this.project(e.getSouthWest(),i),s=this.project(e.getNorthEast(),i);return{center:this.unproject(a.add(s).divideBy(2).add(r),i),zoom:i}},fitBounds:function(e,t){if(!(e=S(e)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(e,t);return this.setView(n.center,n.zoom,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){if(e=P(e).round(),t=t||{},!e.x&&!e.y)return this.fire("moveend");if(!0!==t.animate&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ln,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate){$(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},flyTo:function(e,t,n){function o(e){var t=(y*y-f*f+(e?-1:1)*v*v*h*h)/(2*(e?y:f)*v*h),n=Math.sqrt(t*t+1)-t;return n<1e-9?-18:Math.log(n)}function i(e){return(Math.exp(e)-Math.exp(-e))/2}function r(e){return(Math.exp(e)+Math.exp(-e))/2}function a(e){return i(e)/r(e)}function s(e){return f*(r(P)/r(P+x*e))}function l(e){return f*(r(P)*a(P+x*e)-i(P))/v}function u(e){return 1-Math.pow(1-e,1.5)}function c(){var n=(Date.now()-w)/L,o=u(n)*b;n<=1?(this._flyToFrame=g(c,this),this._move(this.unproject(_.add(d.subtract(_).multiplyBy(l(o)/h)),m),this.getScaleZoom(f/s(o),m),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}if(!1===(n=n||{}).animate||!Ft)return this.setView(e,t,n);this._stop();var _=this.project(this.getCenter()),d=this.project(e),p=this.getSize(),m=this._zoom;e=C(e),t=void 0===t?m:t;var f=Math.max(p.x,p.y),y=f*this.getZoomScale(m,t),h=d.distanceTo(_)||1,x=1.42,v=x*x,P=o(0),w=Date.now(),b=(o(1)-P)/x,L=n.duration?1e3*n.duration:1e3*b*.8;return this._moveStart(!0,n.noMoveStart),c.call(this),this},flyToBounds:function(e,t){var n=this._getBoundsCenterZoom(e,t);return this.flyTo(n.center,n.zoom,t)},setMaxBounds:function(e){return(e=S(e)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),o=this._limitCenter(n,this._zoom,S(e));return n.equals(o)||this.panTo(o,t),this._enforcingBounds=!1,this},invalidateSize:function(e){if(!this._loaded)return this;e=t({animate:!1,pan:!0},!0===e?{animate:!0}:e);var o=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),r=o.divideBy(2).round(),a=i.divideBy(2).round(),s=r.subtract(a);return s.x||s.y?(e.animate&&e.pan?this.panBy(s):(e.pan&&this._rawPanBy(s),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:o,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=t({timeout:1e4,watch:!1},e),!("geolocation" in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var o=n(this._handleGeolocationResponse,this),i=n(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(o,i,e):navigator.geolocation.getCurrentPosition(o,i,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){var t=e.code,n=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(e){var t=new z(e.coords.latitude,e.coords.longitude),n=t.toBounds(2*e.coords.accuracy),o=this._locateOptions;if(o.setView){var i=this.getBoundsZoom(n);this.setView(t,o.maxZoom?Math.min(i,o.maxZoom):i)}var r={latlng:t,bounds:n,timestamp:e.timestamp};for(var a in e.coords)"number"==typeof e.coords[a]&&(r[a]=e.coords[a]);this.fire("locationfound",r)},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0};void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),K(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(y(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var e;for(e in this._layers)this._layers[e].remove();for(e in this._panes)K(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n=q("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane);return e&&(this._panes[e]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new T(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,n){e=S(e),n=P(n||[0,0]);var o=this.getZoom()||0,i=this.getMinZoom(),r=this.getMaxZoom(),a=e.getNorthWest(),s=e.getSouthEast(),l=this.getSize().subtract(n),u=b(this.project(s,o),this.project(a,o)).getSize(),c=Ft?this.options.zoomSnap:1,_=l.x/u.x,d=l.y/u.y,p=t?Math.max(_,d):Math.min(_,d);return o=this.getScaleZoom(p,o),c&&(o=Math.round(o/(c/100))*(c/100),o=t?Math.ceil(o/c)*c:Math.floor(o/c)*c),Math.max(i,Math.min(r,o))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new v(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var n=this._getTopLeftPoint(e,t);return new w(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=void 0===t?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs;t=void 0===t?this._zoom:t;var o=n.zoom(e*n.scale(t));return isNaN(o)?1/0:o},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(C(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(P(e),t)},layerPointToLatLng:function(e){var t=P(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(C(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(C(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(S(e))},distance:function(e,t){return this.options.crs.distance(C(e),C(t))},containerPointToLayerPoint:function(e){return P(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return P(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(P(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(C(e)))},mouseEventToContainerPoint:function(e){return Le(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=H(e);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");fe(t,"scroll",this._onScroll,this),this._containerId=o(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ft,$(e,"leaflet-container"+(Vt?" leaflet-touch":"")+(Yt?" leaflet-retina":"")+(bt?" leaflet-oldie":"")+(It?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=V(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),se(this._mapPane,new v(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||($(e.markerPane,"leaflet-zoom-hide"),$(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t){se(this._mapPane,new v(0,0));var n=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var o=this._zoom!==t;this._moveStart(o,!1)._move(e,t)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,n){void 0===t&&(t=this._zoom);var o=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),(o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return y(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){se(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[o(this._container)]=this;var t=e?ge:fe;t(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),Ft&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){y(this._resizeRequest),this._resizeRequest=g(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n,i=[],r="mouseout"===t||"mouseover"===t,a=e.target||e.srcElement,s=!1;a;){if((n=this._targets[o(a)])&&("click"===t||"preclick"===t)&&!e._simulated&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(t,!0)){if(r&&!Ce(a,e))break;if(i.push(n),r)break}if(a===this._container)break;a=a.parentNode}return i.length||s||r||!Ce(a,e)||(i=[this]),i},_handleDOMEvent:function(e){if(this._loaded&&!ze(e)){var t=e.type;"mousedown"!==t&&"keypress"!==t||_e(e.target||e.srcElement),this._fireDOMEvent(e,t)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,n,o){if("click"===e.type){var i=t({},e);i.type="preclick",this._fireDOMEvent(i,i.type,o)}if(!e._stopped&&(o=(o||[]).concat(this._findEventTargets(e,n))).length){var r=o[0];"contextmenu"===n&&r.listens(n,!0)&&we(e);var a={originalEvent:e};if("keypress"!==e.type){var s=r.getLatLng&&(!r._radius||r._radius<=10);a.containerPoint=s?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(e),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=s?r.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var l=0;l<o.length;l++)if(o[l].fire(n,a,!0),a.originalEvent._stopped||!1===o[l].options.bubblingMouseEvents&&-1!==p(this._mouseEvents,n))return}},_draggableMoved:function(e){return(e=e.dragging&&e.dragging.enabled()?e:this).dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on("load",e,t),this},_getMapPanePos:function(){return le(this._mapPane)||new v(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&void 0!==t?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,n){var o=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(o)},_latLngBoundsToNewLayerBounds:function(e,t,n){var o=this._getNewPixelOrigin(n,t);return b([this.project(e.getSouthWest(),t)._subtract(o),this.project(e.getNorthWest(),t)._subtract(o),this.project(e.getSouthEast(),t)._subtract(o),this.project(e.getNorthEast(),t)._subtract(o)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){if(!n)return e;var o=this.project(e,t),i=this.getSize().divideBy(2),r=new w(o.subtract(i),o.add(i)),a=this._getBoundsOffset(r,n,t);return a.round().equals([0,0])?e:this.unproject(o.add(a),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),o=new w(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(o,t))},_getBoundsOffset:function(e,t,n){var o=b(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n)),i=o.min.subtract(e.min),r=o.max.subtract(e.max);return new v(this._rebound(i.x,-r.x),this._rebound(i.y,-r.y))},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),o=Ft?this.options.zoomSnap:1;return o&&(e=Math.round(e/o)*o),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ee(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(n))&&(this.panBy(n,t),!0)},_createAnimProxy:function(){var e=this._proxy=q("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(e){var t=dn,n=this._proxy.style[t];ae(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var e=this.getCenter(),t=this.getZoom();ae(this._proxy,this.project(e,t),this.getZoomScale(t,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){K(this._proxy),delete this._proxy},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var o=this.getZoomScale(t),i=this._getCenterOffset(e)._divideBy(1-1/o);return!(!0!==n.animate&&!this.getSize().contains(i))&&(g(function(){this._moveStart(!0,!1)._animateZoom(e,t,!0)},this),!0)},_animateZoom:function(e,t,o,i){this._mapPane&&(o&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,$(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:i}),setTimeout(n(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ee(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),g(function(){this._moveEnd(!0)},this))}}),Sn=h.extend({options:{position:"topright"},initialize:function(e){c(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),o=e._controlCorners[n];return $(t,"leaflet-control"),-1!==n.indexOf("bottom")?o.insertBefore(t,o.firstChild):o.appendChild(t),this},remove:function(){return this._map?(K(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),zn=function(e){return new Sn(e)};Tn.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){function e(e,i){var r=n+e+" "+n+i;t[e+i]=q("div",r,o)}var t=this._controlCorners={},n="leaflet-",o=this._controlContainer=q("div",n+"control-container",this._container);e("top","left"),e("top","right"),e("bottom","left"),e("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)K(this._controlCorners[e]);K(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Cn=Sn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,o){return n<o?-1:o<n?1:0}},initialize:function(e,t,n){c(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1;for(var o in e)this._addLayer(e[o],o);for(o in t)this._addLayer(t[o],o,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(e){return Sn.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){e.off("add remove",this._onLayerChange,this);var t=this._getLayer(o(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){$(this._container,"leaflet-control-layers-expanded"),this._form.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._form.clientHeight?($(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=e+"px"):ee(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ee(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=q("div",e),n=this.options.collapsed;t.setAttribute("aria-haspopup",!0),Pe(t),ve(t);var o=this._form=q("form",e+"-list");n&&(this._map.on("click",this.collapse,this),St||fe(t,{mouseenter:this.expand,mouseleave:this.collapse},this));var i=this._layersLink=q("a",e+"-toggle",t);i.href="#",i.title="Layers",Vt?(fe(i,"click",be),fe(i,"click",this.expand,this)):fe(i,"focus",this.expand,this),n||this.expand(),this._baseLayersList=q("div",e+"-base",o),this._separator=q("div",e+"-separator",o),this._overlaysList=q("div",e+"-overlays",o),t.appendChild(o)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&o(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,o){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:o}),this.options.sortLayers&&this._layers.sort(n(function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Y(this._baseLayersList),Y(this._overlaysList),this._layerControlInputs=[];var e,t,n,o,i=0;for(n=0;n<this._layers.length;n++)o=this._layers[n],this._addItem(o),t=t||o.overlay,e=e||!o.overlay,i+=o.overlay?0:1;return this.options.hideSingleBase&&(e=e&&i>1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=t&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(o(e.target)),n=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null;n&&this._map.fire(n,t)},_createRadioElement:function(e,t){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(t?' checked="checked"':"")+"/>",o=document.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(e){var t,n=document.createElement("label"),i=this._map.hasLayer(e.layer);e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=i):t=this._createRadioElement("leaflet-base-layers",i),this._layerControlInputs.push(t),t.layerId=o(e.layer),fe(t,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+e.name;var a=document.createElement("div");return n.appendChild(a),a.appendChild(t),a.appendChild(r),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var e,t,n=this._layerControlInputs,o=[],i=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)e=n[r],t=this._getLayer(e.layerId).layer,e.checked?o.push(t):e.checked||i.push(t);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])&&this._map.removeLayer(i[r]);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])||this._map.addLayer(o[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var e,t,n=this._layerControlInputs,o=this._map.getZoom(),i=n.length-1;i>=0;i--)e=n[i],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&o<t.options.minZoom||void 0!==t.options.maxZoom&&o>t.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),An=Sn.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=q("div",t+" leaflet-bar"),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,t+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,t+"-out",n,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,o,i){var r=q("a",n,o);return r.innerHTML=e,r.href="#",r.title=t,r.setAttribute("role","button"),r.setAttribute("aria-label",t),Pe(r),fe(r,"click",be),fe(r,"click",i,this),fe(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";ee(this._zoomInButton,t),ee(this._zoomOutButton,t),(this._disabled||e._zoom===e.getMinZoom())&&$(this._zoomOutButton,t),(this._disabled||e._zoom===e.getMaxZoom())&&$(this._zoomInButton,t)}});Tn.mergeOptions({zoomControl:!0}),Tn.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new An,this.addControl(this.zoomControl))});var kn=Sn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t=q("div","leaflet-control-scale"),n=this.options;return this._addScales(n,"leaflet-control-scale-line",t),e.on(n.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),t},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=q("div",t,n)),e.imperial&&(this._iScale=q("div",t,n))},_update:function(){var e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),n=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,n,t/e)},_updateImperial:function(e){var t,n,o,i=3.2808399*e;i>5280?(t=i/5280,n=this._getRoundNum(t),this._updateScale(this._iScale,n+" mi",n/t)):(o=this._getRoundNum(i),this._updateScale(this._iScale,o+" ft",o/i))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,t*n}}),En=Sn.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(e){c(this,e),this._attributions={}},onAdd:function(e){e.attributionControl=this,this._container=q("div","leaflet-control-attribution"),Pe(this._container);for(var t in e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),this._container},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(" | ")}}});Tn.mergeOptions({attributionControl:!0}),Tn.addInitHook(function(){this.options.attributionControl&&(new En).addTo(this)});Sn.Layers=Cn,Sn.Zoom=An,Sn.Scale=kn,Sn.Attribution=En,zn.layers=function(e,t,n){return new Cn(e,t,n)},zn.zoom=function(e){return new An(e)},zn.scale=function(e){return new kn(e)},zn.attribution=function(e){return new En(e)};var Bn=h.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Bn.addTo=function(e,t){return e.addHandler(t,this),this};var In,Zn={Events:ct},Mn=Vt?"touchstart mousedown":"mousedown",On={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Rn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Nn=_t.extend({options:{clickTolerance:3},initialize:function(e,t,n,o){c(this,o),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||(fe(this._dragStartTarget,Mn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Nn._dragging===this&&this.finishDrag(),ge(this._dragStartTarget,Mn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(!e._simulated&&this._enabled&&(this._moved=!1,!Q(this._element,"leaflet-zoom-anim")&&!(Nn._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||(Nn._dragging=this,this._preventOutline&&_e(this._element),ue(),gt(),this._moving)))){this.fire("down");var t=e.touches?e.touches[0]:e,n=pe(this._element);this._startPoint=new v(t.clientX,t.clientY),this._parentScale=me(n),fe(document,Rn[e.type],this._onMove,this),fe(document,On[e.type],this._onUp,this)}},_onMove:function(e){if(!e._simulated&&this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var t=e.touches&&1===e.touches.length?e.touches[0]:e,n=new v(t.clientX,t.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,we(e),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=le(this._element).subtract(n),$(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),$(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,y(this._animRequest),this._lastEvent=e,this._animRequest=g(this._updatePosition,this,!0)))}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),se(this._element,this._newPos),this.fire("drag",e)},_onUp:function(e){!e._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){ee(document.body,"leaflet-dragging"),this._lastTarget&&(ee(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var e in Rn)ge(document,Rn[e],this._onMove,this),ge(document,On[e],this._onUp,this);ce(),yt(),this._moved&&this._moving&&(y(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,Nn._dragging=!1}}),Dn=(Object.freeze||Object)({simplify:ke,pointToSegmentDistance:Ee,closestPointOnSegment:function(e,t,n){return De(e,t,n)},clipSegment:Me,_getEdgeIntersection:Oe,_getBitCode:Re,_sqClosestPointOnSegment:De,isFlat:Fe,_flat:je}),Fn=(Object.freeze||Object)({clipPolygon:Ue}),jn={project:function(e){return new v(e.lng,e.lat)},unproject:function(e){return new z(e.y,e.x)},bounds:new w([-180,-90],[180,90])},Un={R:6378137,R_MINOR:6356752.314245179,bounds:new w([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,n=this.R,o=e.lat*t,i=this.R_MINOR/n,r=Math.sqrt(1-i*i),a=r*Math.sin(o),s=Math.tan(Math.PI/4-o/2)/Math.pow((1-a)/(1+a),r/2);return o=-n*Math.log(Math.max(s,1e-10)),new v(e.lng*t*n,o)},unproject:function(e){for(var t,n=180/Math.PI,o=this.R,i=this.R_MINOR/o,r=Math.sqrt(1-i*i),a=Math.exp(-e.y/o),s=Math.PI/2-2*Math.atan(a),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)t=r*Math.sin(s),t=Math.pow((1-t)/(1+t),r/2),s+=u=Math.PI/2-2*Math.atan(a*t)-s;return new z(s*n,e.x*n/o)}},Gn=(Object.freeze||Object)({LonLat:jn,Mercator:Un,SphericalMercator:ft}),Wn=t({},mt,{code:"EPSG:3395",projection:Un,transformation:function(){var e=.5/(Math.PI*Un.R);return k(e,.5,-e,.5)}()}),Hn=t({},mt,{code:"EPSG:4326",projection:jn,transformation:k(.005555555555555556,1,-.005555555555555556,.5)}),Vn=t({},pt,{projection:jn,transformation:k(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,o=t.lat-e.lat;return Math.sqrt(n*n+o*o)},infinite:!0});pt.Earth=mt,pt.EPSG3395=Wn,pt.EPSG3857=xt,pt.EPSG900913=vt,pt.EPSG4326=Hn,pt.Simple=Vn;var qn=_t.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[o(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[o(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var n=this.getEvents();t.on(n,this),this.once("remove",function(){t.off(n,this)},this)}this.onAdd(t),this.getAttribution&&t.attributionControl&&t.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),t.fire("layeradd",{layer:this})}}});Tn.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=o(e);return this._layers[t]?this:(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var t=o(e);return this._layers[t]?(this._loaded&&e.onRemove(this),e.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(e.getAttribution()),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return!!e&&o(e) in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){for(var t=0,n=(e=e?it(e)?e:[e]:[]).length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){!isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[o(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=o(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,t=-1/0,n=this._getZoomSpan();for(var o in this._zoomBoundLayers){var i=this._zoomBoundLayers[o].options;e=void 0===i.minZoom?e:Math.min(e,i.minZoom),t=void 0===i.maxZoom?t:Math.max(t,i.maxZoom)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Kn=qn.extend({initialize:function(e,t){c(this,t),this._layers={};var n,o;if(e)for(n=0,o=e.length;n<o;n++)this.addLayer(e[n])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return!!e&&(e in this._layers||this.getLayerId(e) in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t,n,o=Array.prototype.slice.call(arguments,1);for(t in this._layers)(n=this._layers[t])[e]&&n[e].apply(n,o);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return o(e)}}),Yn=Kn.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),Kn.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),Kn.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new T;for(var t in this._layers){var n=this._layers[t];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}}),Jn=h.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(e){c(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var n=this._getIconUrl(e);if(!n){if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var o=this._createImg(n,t&&"IMG"===t.tagName?t:null);return this._setIconStyles(o,e),o},_setIconStyles:function(e,t){var n=this.options,o=n[t+"Size"];"number"==typeof o&&(o=[o,o]);var i=P(o),r=P("shadow"===t&&n.shadowAnchor||n.iconAnchor||i&&i.divideBy(2,!0));e.className="leaflet-marker-"+t+" "+(n.className||""),r&&(e.style.marginLeft=-r.x+"px",e.style.marginTop=-r.y+"px"),i&&(e.style.width=i.x+"px",e.style.height=i.y+"px")},_createImg:function(e,t){return t=t||document.createElement("img"),t.src=e,t},_getIconUrl:function(e){return Yt&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}}),Xn=Jn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return Xn.imagePath||(Xn.imagePath=this._detectIconPath()),(this.options.imagePath||Xn.imagePath)+Jn.prototype._getIconUrl.call(this,e)},_detectIconPath:function(){var e=q("div","leaflet-default-icon-path",document.body),t=V(e,"background-image")||V(e,"backgroundImage");return document.body.removeChild(e),t=null===t||0!==t.indexOf("url")?"":t.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Qn=Bn.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new Nn(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),$(e,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&ee(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,n=t._map,o=this._marker.options.autoPanSpeed,i=this._marker.options.autoPanPadding,r=le(t._icon),a=n.getPixelBounds(),s=n.getPixelOrigin(),l=b(a.min._subtract(s).add(i),a.max._subtract(s).subtract(i));if(!l.contains(r)){var u=P((Math.max(l.max.x,r.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(o);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),se(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=g(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(y(this._panRequest),this._panRequest=g(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,o=le(t._icon),i=t._map.layerPointToLatLng(o);n&&se(n,o),t._latlng=i,e.latlng=i,e.oldLatLng=this._oldLatLng,t.fire("move",e).fire("drag",e)},_onDragEnd:function(e){y(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),$n=qn.extend({options:{icon:new Xn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,t){c(this,t),this._latlng=C(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var t=this._latlng;return this._latlng=C(e),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,t="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=e.icon.createIcon(this._icon),o=!1;n!==this._icon&&(this._icon&&this._removeIcon(),o=!0,e.title&&(n.title=e.title),"IMG"===n.tagName&&(n.alt=e.alt||"")),$(n,t),e.keyboard&&(n.tabIndex="0"),this._icon=n,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var i=e.icon.createShadow(this._shadow),r=!1;i!==this._shadow&&(this._removeShadow(),r=!0),i&&($(i,t),i.alt=""),this._shadow=i,e.opacity<1&&this._updateOpacity(),o&&this.getPane().appendChild(this._icon),this._initInteraction(),i&&r&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),K(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&K(this._shadow),this._shadow=null},_setPos:function(e){se(this._icon,e),this._shadow&&se(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon.style.zIndex=this._zIndex+e},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&($(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Qn)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Qn(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;oe(this._icon,e),this._shadow&&oe(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),eo=qn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return c(this,e),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),to=eo.extend({options:{fill:!0,radius:10},initialize:function(e,t){c(this,t),this._latlng=C(e),this._radius=this.options.radius},setLatLng:function(e){return this._latlng=C(e),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return eo.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,n=this._clickTolerance(),o=[e+n,t+n];this._pxBounds=new w(this._point.subtract(o),this._point.add(o))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),no=to.extend({initialize:function(e,n,o){if("number"==typeof n&&(n=t({},o,{radius:n})),c(this,n),this._latlng=C(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new T(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:eo.prototype.setStyle,_project:function(){var e=this._latlng.lng,t=this._latlng.lat,n=this._map,o=n.options.crs;if(o.distance===mt.distance){var i=Math.PI/180,r=this._mRadius/mt.R/i,a=n.project([t+r,e]),s=n.project([t-r,e]),l=a.add(s).divideBy(2),u=n.unproject(l).lat,c=Math.acos((Math.cos(r*i)-Math.sin(t*i)*Math.sin(u*i))/(Math.cos(t*i)*Math.cos(u*i)))/i;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*t)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,e-c]).x,this._radiusY=l.y-a.y}else{var _=o.unproject(o.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(_).x}this._updateBounds()}}),oo=eo.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){c(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t,n,o=1/0,i=null,r=De,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],u=1,c=l.length;u<c;u++){var _=r(e,t=l[u-1],n=l[u],!0);_<o&&(o=_,i=r(e,t,n))};return i&&(i.distance=Math.sqrt(o)),i},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var e,t,n,o,i,r,a,s=this._rings[0],l=s.length;if(!l)return null;for(e=0,t=0;e<l-1;e++)t+=s[e].distanceTo(s[e+1])/2;if(0===t)return this._map.layerPointToLatLng(s[0]);for(e=0,o=0;e<l-1;e++)if(i=s[e],r=s[e+1],n=i.distanceTo(r),(o+=n)>t)return a=(o-t)/n,this._map.layerPointToLatLng([r.x-a*(r.x-i.x),r.y-a*(r.y-i.y)])},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=C(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new T,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return Fe(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=Fe(e),o=0,i=e.length;o<i;o++)n?(t[o]=C(e[o]),this._bounds.extend(t[o])):t[o]=this._convertLatLngs(e[o]);return t},_project:function(){var e=new w;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e);var t=this._clickTolerance(),n=new v(t,t);this._bounds.isValid()&&e.isValid()&&(e.min._subtract(n),e.max._add(n),this._pxBounds=e)},_projectLatlngs:function(e,t,n){var o,i,r=e[0] instanceof z,a=e.length;if(r){for(i=[],o=0;o<a;o++)i[o]=this._map.latLngToLayerPoint(e[o]),n.extend(i[o]);t.push(i)}else for(o=0;o<a;o++)this._projectLatlngs(e[o],t,n)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else{var t,n,o,i,r,a,s,l=this._parts;for(t=0,o=0,i=this._rings.length;t<i;t++)for(n=0,r=(s=this._rings[t]).length;n<r-1;n++)(a=Me(s[n],s[n+1],e,n,!0))&&(l[o]=l[o]||[],l[o].push(a[0]),a[1]===s[n+1]&&n!==r-2||(l[o].push(a[1]),o++))}},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,n=0,o=e.length;n<o;n++)e[n]=ke(e[n],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var n,o,i,r,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(n=0,r=this._parts.length;n<r;n++)for(o=0,i=(a=(s=this._parts[n]).length)-1;o<a;i=o++)if((t||0!==o)&&Ee(e,s[i],s[o])<=l)return!0;return!1}});oo._flat=je;var io=oo.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var e,t,n,o,i,r,a,s,l,u=this._rings[0],c=u.length;if(!c)return null;for(r=a=s=0,e=0,t=c-1;e<c;t=e++)n=u[e],o=u[t],i=n.y*o.x-o.y*n.x,a+=(n.x+o.x)*i,s+=(n.y+o.y)*i,r+=3*i;return l=0===r?u[0]:[a/r,s/r],this._map.layerPointToLatLng(l)},_convertLatLngs:function(e){var t=oo.prototype._convertLatLngs.call(this,e),n=t.length;return n>=2&&t[0] instanceof z&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){oo.prototype._setLatLngs.call(this,e),Fe(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Fe(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,n=new v(t,t);if(e=new w(e.min.subtract(n),e.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var o,i=0,r=this._rings.length;i<r;i++)(o=Ue(this._rings[i],e,!0)).length&&this._parts.push(o)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t,n,o,i,r,a,s,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(i=0,s=this._parts.length;i<s;i++)for(r=0,a=(l=(t=this._parts[i]).length)-1;r<l;a=r++)n=t[r],o=t[a],n.y>e.y!=o.y>e.y&&e.x<(o.x-n.x)*(e.y-n.y)/(o.y-n.y)+n.x&&(u=!u);return u||oo.prototype._containsPoint.call(this,e,!0)}}),ro=Yn.extend({initialize:function(e,t){c(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,o,i=it(e)?e:e.features;if(i){for(t=0,n=i.length;t<n;t++)((o=i[t]).geometries||o.geometry||o.features||o.coordinates)&&this.addData(o);return this}var r=this.options;if(r.filter&&!r.filter(e))return this;var a=Ge(e,r);return a?(a.feature=Ye(e),a.defaultOptions=a.options,this.resetStyle(a),r.onEachFeature&&r.onEachFeature(e,a),this.addLayer(a)):this},resetStyle:function(e){return e.options=t({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(e,t){"function"==typeof t&&(t=t(e.feature)),e.setStyle&&e.setStyle(t)}}),ao={toGeoJSON:function(e){return Ke(this,{type:"Point",coordinates:Ve(this.getLatLng(),e)})}};$n.include(ao),no.include(ao),to.include(ao),oo.include({toGeoJSON:function(e){var t=!Fe(this._latlngs),n=qe(this._latlngs,t?1:0,!1,e);return Ke(this,{type:(t?"Multi":"")+"LineString",coordinates:n})}}),io.include({toGeoJSON:function(e){var t=!Fe(this._latlngs),n=t&&!Fe(this._latlngs[0]),o=qe(this._latlngs,n?2:t?1:0,!0,e);return t||(o=[o]),Ke(this,{type:(n?"Multi":"")+"Polygon",coordinates:o})}}),Kn.include({toMultiPoint:function(e){var t=[];return this.eachLayer(function(n){t.push(n.toGeoJSON(e).geometry.coordinates)}),Ke(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(e);var n="GeometryCollection"===t,o=[];return this.eachLayer(function(t){if(t.toGeoJSON){var i=t.toGeoJSON(e);if(n)o.push(i.geometry);else{var r=Ye(i);"FeatureCollection"===r.type?o.push.apply(o,r.features):o.push(r)}}}),n?Ke(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}});var so=Je,lo=qn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,n){this._url=e,this._bounds=S(t),c(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&($(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){K(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&J(this._image),this},bringToBack:function(){return this._map&&X(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=S(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e="IMG"===this._url.tagName,t=this._image=e?this._url:q("img");$(t,"leaflet-image-layer"),this._zoomAnimated&&$(t,"leaflet-zoom-animated"),this.options.className&&$(t,this.options.className),t.onselectstart=a,t.onmousemove=a,t.onload=n(this.fire,this,"load"),t.onerror=n(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(t.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e?this._url=t.src:(t.src=this._url,t.alt=this.options.alt)},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;ae(this._image,n,t)},_reset:function(){var e=this._image,t=new w(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();se(e,t.min),e.style.width=n.x+"px",e.style.height=n.y+"px"},_updateOpacity:function(){oe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)}}),uo=lo.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var e="VIDEO"===this._url.tagName,t=this._image=e?this._url:q("video");if($(t,"leaflet-image-layer"),this._zoomAnimated&&$(t,"leaflet-zoom-animated"),t.onselectstart=a,t.onmousemove=a,t.onloadeddata=n(this.fire,this,"load"),e){for(var o=t.getElementsByTagName("source"),i=[],r=0;r<o.length;r++)i.push(o[r].src);this._url=o.length>0?i:[t.src]}else{it(this._url)||(this._url=[this._url]),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop;for(var s=0;s<this._url.length;s++){var l=q("source");l.src=this._url[s],t.appendChild(l)}}}}),co=qn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(e,t){c(this,e),this._source=t},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&oe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&oe(this._container,1),this.bringToFront()},onRemove:function(e){e._fadeAnimated?(oe(this._container,0),this._removeTimeout=setTimeout(n(K,void 0,this._container),200)):K(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=C(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&J(this._container),this},bringToBack:function(){return this._map&&X(this._container),this},_updateContent:function(){if(this._content){var e=this._contentNode,t="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof t)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=P(this.options.offset),n=this._getAnchor();this._zoomAnimated?se(this._container,e.add(n)):t=t.add(e).add(n);var o=this._containerBottom=-t.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=o+"px",this._container.style.left=i+"px"}},_getAnchor:function(){return[0,0]}}),_o=co.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(e){return e.openPopup(this),this},onAdd:function(e){co.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof eo||this._source.on("preclick",xe))},onRemove:function(e){co.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof eo||this._source.off("preclick",xe))},getEvents:function(){var e=co.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this._close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var e="leaflet-popup",t=this._container=q("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=q("div",e+"-content-wrapper",t);if(this._contentNode=q("div",e+"-content",n),Pe(n),ve(this._contentNode),fe(n,"contextmenu",xe),this._tipContainer=q("div",e+"-tip-container",t),this._tip=q("div",e+"-tip",this._tipContainer),this.options.closeButton){var o=this._closeButton=q("a",e+"-close-button",t);o.href="#close",o.innerHTML="&#215;",fe(o,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width="",t.whiteSpace="nowrap";var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),t.width=n+1+"px",t.whiteSpace="",t.height="";var o=e.offsetHeight,i=this.options.maxHeight;i&&o>i?(t.height=i+"px",$(e,"leaflet-popup-scrolled")):ee(e,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();se(this._container,t.add(n))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var e=this._map,t=parseInt(V(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+t,o=this._containerWidth,i=new v(this._containerLeft,-n-this._containerBottom);i._add(le(this._container));var r=e.layerPointToContainerPoint(i),a=P(this.options.autoPanPadding),s=P(this.options.autoPanPaddingTopLeft||a),l=P(this.options.autoPanPaddingBottomRight||a),u=e.getSize(),c=0,_=0;r.x+o+l.x>u.x&&(c=r.x+o-u.x+l.x),r.x-c-s.x<0&&(c=r.x-s.x),r.y+n+l.y>u.y&&(_=r.y+n-u.y+l.y),r.y-_-s.y<0&&(_=r.y-s.y),(c||_)&&e.fire("autopanstart").panBy([c,_])}},_onCloseButtonClick:function(e){this._close(),be(e)},_getAnchor:function(){return P(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Tn.mergeOptions({closePopupOnClick:!0}),Tn.include({openPopup:function(e,t,n){return e instanceof _o||(e=new _o(n).setContent(e)),t&&e.setLatLng(t),this.hasLayer(e)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=e,this.addLayer(e))},closePopup:function(e){return e&&e!==this._popup||(e=this._popup,this._popup=null),e&&this.removeLayer(e),this}}),qn.include({bindPopup:function(e,t){return e instanceof _o?(c(e,t),this._popup=e,e._source=this):(this._popup&&!t||(this._popup=new _o(t,this)),this._popup.setContent(e)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e,t){if(e instanceof qn||(t=e,e=this),e instanceof Yn)for(var n in this._layers){e=this._layers[n];break};return t||(t=e.getCenter?e.getCenter():e.getLatLng()),this._popup&&this._map&&(this._popup._source=e,this._popup.update(),this._map.openPopup(this._popup,t)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(e){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(e)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){var t=e.layer||e.target;this._popup&&this._map&&(be(e),t instanceof eo?this.openPopup(e.layer||e.target,e.latlng):this._map.hasLayer(this._popup)&&this._popup._source===t?this.closePopup():this.openPopup(t,e.latlng))},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}});var po=co.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(e){co.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(e){co.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var e=co.prototype.getEvents.call(this);return Vt&&!this.options.permanent&&(e.preclick=this._close),e},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=q("div",e)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t=this._map,n=this._container,o=t.latLngToContainerPoint(t.getCenter()),i=t.layerPointToContainerPoint(e),r=this.options.direction,a=n.offsetWidth,s=n.offsetHeight,l=P(this.options.offset),u=this._getAnchor();"top"===r?e=e.add(P(-a/2+l.x,-s+l.y+u.y,!0)):"bottom"===r?e=e.subtract(P(a/2-l.x,-l.y,!0)):"center"===r?e=e.subtract(P(a/2+l.x,s/2-u.y+l.y,!0)):"right"===r||"auto"===r&&i.x<o.x?(r="right",e=e.add(P(l.x+u.x,u.y-s/2+l.y,!0))):(r="left",e=e.subtract(P(a+u.x-l.x,s/2-u.y-l.y,!0))),ee(n,"leaflet-tooltip-right"),ee(n,"leaflet-tooltip-left"),ee(n,"leaflet-tooltip-top"),ee(n,"leaflet-tooltip-bottom"),$(n,"leaflet-tooltip-"+r),se(n,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&oe(this._container,e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)},_getAnchor:function(){return P(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Tn.include({openTooltip:function(e,t,n){return e instanceof po||(e=new po(n).setContent(e)),t&&e.setLatLng(t),this.hasLayer(e)?this:this.addLayer(e)},closeTooltip:function(e){return e&&this.removeLayer(e),this}}),qn.include({bindTooltip:function(e,t){return e instanceof po?(c(e,t),this._tooltip=e,e._source=this):(this._tooltip&&!t||(this._tooltip=new po(t,this)),this._tooltip.setContent(e)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(e){if(e||!this._tooltipHandlersAdded){var t=e?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),Vt&&(n.click=this._openTooltip)),this[t](n),this._tooltipHandlersAdded=!e}},openTooltip:function(e,t){if(e instanceof qn||(t=e,e=this),e instanceof Yn)for(var n in this._layers){e=this._layers[n];break};return t||(t=e.getCenter?e.getCenter():e.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=e,this._tooltip.update(),this._map.openTooltip(this._tooltip,t),this._tooltip.options.interactive&&this._tooltip._container&&($(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(ee(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(e){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(e)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_openTooltip:function(e){var t=e.layer||e.target;this._tooltip&&this._map&&this.openTooltip(t,this._tooltip.options.sticky?e.latlng:void 0)},_moveTooltip:function(e){var t,n,o=e.latlng;this._tooltip.options.sticky&&e.originalEvent&&(t=this._map.mouseEventToContainerPoint(e.originalEvent),n=this._map.containerPointToLayerPoint(t),o=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(o)}});var mo=Jn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var t=e&&"DIV"===e.tagName?e:document.createElement("div"),n=this.options;if(t.innerHTML=!1!==n.html?n.html:"",n.bgPos){var o=P(n.bgPos);t.style.backgroundPosition=-o.x+"px "+-o.y+"px"}return this._setIconStyles(t,"icon"),t},createShadow:function(){return null}});Jn.Default=Xn;var fo=qn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:jt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(e){c(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),K(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(J(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(X(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=i(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof v?e:new v(e,e)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t,n=this.getPane().children,o=-e(-1/0,1/0),i=0,r=n.length;i<r;i++)t=n[i].style.zIndex,n[i]!==this._container&&t&&(o=e(o,+t));isFinite(o)&&(this.options.zIndex=o+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!bt){oe(this._container,this.options.opacity);var e=+new Date,t=!1,n=!1;for(var o in this._tiles){var i=this._tiles[o];if(i.current&&i.loaded){var r=Math.min(1,(e-i.loaded)/200);oe(i.el,r),r<1?t=!0:(i.active?n=!0:this._onOpaqueTile(i),i.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),t&&(y(this._fadeFrame),this._fadeFrame=g(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=q("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var n in this._levels)this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(K(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var o=this._levels[e],i=this._map;return o||((o=this._levels[e]={}).el=q("div","leaflet-tile-container leaflet-zoom-animated",this._container),o.el.style.zIndex=t,o.origin=i.project(i.unproject(i.getPixelOrigin()),e).round(),o.zoom=e,this._setZoomTransform(o,i.getCenter(),i.getZoom()),o.el.offsetWidth,this._onCreateLevel(o)),this._level=o,o}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var e,t,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(e in this._tiles)(t=this._tiles[e]).retain=t.current;for(e in this._tiles)if((t=this._tiles[e]).current&&!t.active){var o=t.coords;this._retainParent(o.x,o.y,o.z,o.z-5)||this._retainChildren(o.x,o.y,o.z,o.z+2)};for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)K(this._levels[e].el),this._onRemoveLevel(e),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,n,o){var i=Math.floor(e/2),r=Math.floor(t/2),a=n-1,s=new v(+i,+r);s.z=+a;var l=this._tileCoordsToKey(s),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),a>o&&this._retainParent(i,r,a,o))},_retainChildren:function(e,t,n,o){for(var i=2*e;i<2*e+2;i++)for(var r=2*t;r<2*t+2;r++){var a=new v(i,r);a.z=n+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<o&&this._retainChildren(i,r,n+1,o))}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return void 0!==t.minNativeZoom&&e<t.minNativeZoom?t.minNativeZoom:void 0!==t.maxNativeZoom&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,o){var i=this._clampZoom(Math.round(t));(void 0!==this.options.maxZoom&&i>this.options.maxZoom||void 0!==this.options.minZoom&&i<this.options.minZoom)&&(i=void 0);var r=this.options.updateWhenZooming&&i!==this._tileZoom;o&&!r||(this._tileZoom=i,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==i&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var n in this._levels)this._setZoomTransform(this._levels[n],e,t)},_setZoomTransform:function(e,t,n){var o=this._map.getZoomScale(n,e.zoom),i=e.origin.multiplyBy(o).subtract(this._map._getNewPixelOrigin(t,n)).round();Ft?ae(e.el,i,o):se(e.el,i)},_resetGrid:function(){var e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),o=this._tileZoom,i=this._map.getPixelWorldBounds(this._tileZoom);i&&(this._globalTileRange=this._pxBoundsToTileRange(i)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],o).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],o).x/n.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],o).y/n.x),Math.ceil(e.project([t.wrapLat[1],0],o).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(e){var t=this._map,n=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),o=t.getZoomScale(n,this._tileZoom),i=t.project(e,this._tileZoom).floor(),r=t.getSize().divideBy(2*o);return new w(i.subtract(r),i.add(r))},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(void 0===e&&(e=t.getCenter()),void 0!==this._tileZoom){var o=this._getTiledPixelBounds(e),i=this._pxBoundsToTileRange(o),r=i.getCenter(),a=[],s=this.options.keepBuffer,l=new w(i.getBottomLeft().subtract([s,-s]),i.getTopRight().add([s,-s]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new v(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(var _=i.min.y;_<=i.max.y;_++)for(var d=i.min.x;d<=i.max.x;d++){var p=new v(d,_);if(p.z=this._tileZoom,this._isValidTile(p)){var m=this._tiles[this._tileCoordsToKey(p)];m?m.current=!0:a.push(p)}};if(a.sort(function(e,t){return e.distanceTo(r)-t.distanceTo(r)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(d=0;d<a.length;d++)this._addTile(a[d],f);this._level.el.appendChild(f)}}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}if(!this.options.bounds)return!0;var o=this._tileCoordsToBounds(e);return S(this.options.bounds).overlaps(o)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),o=e.scaleBy(n),i=o.add(n);return[t.unproject(o,e.z),t.unproject(i,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),n=new T(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),n=new v(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(K(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){$(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=a,e.onmousemove=a,bt&&this.options.opacity<1&&oe(e,this.options.opacity),St&&!zt&&(e.style.WebkitBackfaceVisibility="hidden")},_addTile:function(e,t){var o=this._getTilePos(e),i=this._tileCoordsToKey(e),r=this.createTile(this._wrapCoords(e),n(this._tileReady,this,e));this._initTile(r),this.createTile.length<2&&g(n(this._tileReady,this,e,null,r)),se(r,o),this._tiles[i]={el:r,coords:e,current:!0},t.appendChild(r),this.fire("tileloadstart",{tile:r,coords:e})},_tileReady:function(e,t,o){t&&this.fire("tileerror",{error:t,tile:o,coords:e});var i=this._tileCoordsToKey(e);(o=this._tiles[i])&&(o.loaded=+new Date,this._map._fadeAnimated?(oe(o.el,0),y(this._fadeFrame),this._fadeFrame=g(this._updateOpacity,this)):(o.active=!0,this._pruneTiles()),t||($(o.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:o.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),bt||!this._map._fadeAnimated?g(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new v(this._wrapX?r(e.x,this._wrapX):e.x,this._wrapY?r(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new w(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}}),go=fo.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(e,t){this._url=e,(t=c(this,t)).detectRetina&&Yt&&t.maxZoom>0&&(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom++):(t.zoomOffset++,t.maxZoom--),t.minZoom=Math.max(0,t.minZoom)),"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),St||this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url=e,t||this.redraw(),this},createTile:function(e,t){var o=document.createElement("img");return fe(o,"load",n(this._tileOnLoad,this,t,o)),fe(o,"error",n(this._tileOnError,this,t,o)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(o.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),o.alt="",o.setAttribute("role","presentation"),o.src=this.getTileUrl(e),o},getTileUrl:function(e){var n={r:Yt?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-e.y;this.options.tms&&(n.y=o),n["-y"]=o}return d(this._url,t(n,this.options))},_tileOnLoad:function(e,t){bt?setTimeout(n(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var o=this.options.errorTileUrl;o&&t.getAttribute("src")!==o&&(t.src=o),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom,n=this.options.zoomReverse,o=this.options.zoomOffset;return n&&(e=t-e),e+o},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)this._tiles[e].coords.z!==this._tileZoom&&((t=this._tiles[e].el).onload=a,t.onerror=a,t.complete||(t.src=rt,K(t),delete this._tiles[e]))},_removeTile:function(e){var t=this._tiles[e];if(t)return At||t.el.setAttribute("src",rt),fo.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(this._map&&(!n||n.getAttribute("src")!==rt))return fo.prototype._tileReady.call(this,e,t,n)}}),yo=go.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,n){this._url=e;var o=t({},this.defaultWmsParams);for(var i in n)i in this.options||(o[i]=n[i]);var r=(n=c(this,n)).detectRetina&&Yt?2:1,a=this.getTileSize();o.width=a.x*r,o.height=a.y*r,this.wmsParams=o},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,go.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),n=this._crs,o=b(n.project(t[0]),n.project(t[1])),i=o.min,r=o.max,a=(this._wmsVersion>=1.3&&this._crs===Hn?[i.y,i.x,r.y,r.x]:[i.x,i.y,r.x,r.y]).join(","),s=go.prototype.getTileUrl.call(this,e);return s+_(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(e,n){return t(this.wmsParams,e),n||this.redraw(),this}});go.WMS=yo,Xe.wms=function(e,t){return new yo(e,t)};var ho=qn.extend({options:{padding:.1,tolerance:0},initialize:function(e){c(this,e),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&$(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),o=le(this._container),i=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,t),a=this._map.project(e,t).subtract(r),s=i.multiplyBy(-n).add(o).add(i).subtract(a);Ft?ae(this._container,s,n):se(this._container,s)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var e in this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new w(n,n.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),xo=ho.extend({getEvents:function(){var e=ho.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ho.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");fe(e,"mousemove",i(this._onMouseMove,32,this),this),fe(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),fe(e,"mouseout",this._handleMouseOut,this),this._ctx=e.getContext("2d")},_destroyContainer:function(){y(this._redrawRequest),delete this._ctx,K(this._container),ge(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(var e in this._layers)this._layers[e]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},ho.prototype._update.call(this);var e=this._bounds,t=this._container,n=e.getSize(),o=Yt?2:1;se(t,e.min),t.width=o*n.x,t.height=o*n.y,t.style.width=n.x+"px",t.style.height=n.y+"px",Yt&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){ho.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[o(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,n=t.next,i=t.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete this._drawnLayers[e._leaflet_id],delete e._order,delete this._layers[o(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"==typeof e.options.dashArray){var t,n=e.options.dashArray.split(/[, ]+/),o=[];for(t=0;t<n.length;t++)o.push(Number(n[t]));e.options._dashArray=o}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||g(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new w,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var e=this._redrawBounds;if(e){var t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var e,t=this._redrawBounds;if(this._ctx.save(),t){var n=t.getSize();this._ctx.beginPath(),this._ctx.rect(t.min.x,t.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var o=this._drawFirst;o;o=o.next)e=o.layer,(!t||e._pxBounds&&e._pxBounds.intersects(t))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var n,o,i,r,a=e._parts,s=a.length,l=this._ctx;if(s){for(this._drawnLayers[e._leaflet_id]=e,l.beginPath(),n=0;n<s;n++){for(o=0,i=a[n].length;o<i;o++)r=a[n][o],l[o?"lineTo":"moveTo"](r.x,r.y);t&&l.closePath()}this._fillStroke(l,e)}}},_updateCircle:function(e){if(this._drawing&&!e._empty()){var t=e._point,n=this._ctx,o=Math.max(Math.round(e._radius),1),i=(Math.max(Math.round(e._radiusY),1)||o)/o;this._drawnLayers[e._leaflet_id]=e,1!==i&&(n.save(),n.scale(1,i)),n.beginPath(),n.arc(t.x,t.y/i,o,0,2*Math.PI,!1),1!==i&&n.restore(),this._fillStroke(n,e)}},_fillStroke:function(e,t){var n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor||n.color,e.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())},_onClick:function(e){for(var t,n,o=this._map.mouseEventToLayerPoint(e),i=this._drawFirst;i;i=i.next)(t=i.layer).options.interactive&&t._containsPoint(o)&&!this._map._draggableMoved(t)&&(n=t);n&&(Se(e),this._fireEvent([n],e))},_onMouseMove:function(e){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var t=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,t)}},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(ee(this._container,"leaflet-interactive"),this._fireEvent([t],e,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(e,t){for(var n,o,i=this._drawFirst;i;i=i.next)(n=i.layer).options.interactive&&n._containsPoint(t)&&(o=n);o!==this._hoveredLayer&&(this._handleMouseOut(e),o&&($(this._container,"leaflet-interactive"),this._fireEvent([o],e,"mouseover"),this._hoveredLayer=o)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],e)},_fireEvent:function(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)},_bringToFront:function(e){var t=e._order,n=t.next,o=t.prev;n&&(n.prev=o,o?o.next=n:n&&(this._drawFirst=n),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e))},_bringToBack:function(e){var t=e._order,n=t.next,o=t.prev;o&&(o.next=n,n?n.prev=o:o&&(this._drawLast=o),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e))}}),vo=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch(e){return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),Po={_initContainer:function(){this._container=q("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ho.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=vo("shape");$(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=vo("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[o(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;K(t),e.removeInteractiveTarget(t),delete this._layers[o(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,o=e.options,i=e._container;i.stroked=!!o.stroke,i.filled=!!o.fill,o.stroke?(t||(t=e._stroke=vo("stroke")),i.appendChild(t),t.weight=o.weight+"px",t.color=o.color,t.opacity=o.opacity,o.dashArray?t.dashStyle=it(o.dashArray)?o.dashArray.join(" "):o.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=o.lineCap.replace("butt","flat"),t.joinstyle=o.lineJoin):t&&(i.removeChild(t),e._stroke=null),o.fill?(n||(n=e._fill=vo("fill")),i.appendChild(n),n.color=o.fillColor||o.color,n.opacity=o.fillOpacity):n&&(i.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),o=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+n+","+o+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){J(e._container)},_bringToBack:function(e){X(e._container)}},wo=Qt?vo:E,bo=ho.extend({getEvents:function(){var e=ho.prototype.getEvents.call(this);return e.zoomstart=this._onZoomStart,e},_initContainer:function(){this._container=wo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=wo("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){K(this._container),ge(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){ho.prototype._update.call(this);var e=this._bounds,t=e.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,n.setAttribute("width",t.x),n.setAttribute("height",t.y)),se(n,e.min),n.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=wo("path");e.options.className&&$(t,e.options.className),e.options.interactive&&$(t,"leaflet-interactive"),this._updateStyle(e),this._layers[o(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){K(e._path),e.removeInteractiveTarget(e._path),delete this._layers[o(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute("stroke",n.color),t.setAttribute("stroke-opacity",n.opacity),t.setAttribute("stroke-width",n.weight),t.setAttribute("stroke-linecap",n.lineCap),t.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?t.setAttribute("stroke-dasharray",n.dashArray):t.removeAttribute("stroke-dasharray"),n.dashOffset?t.setAttribute("stroke-dashoffset",n.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),n.fill?(t.setAttribute("fill",n.fillColor||n.color),t.setAttribute("fill-opacity",n.fillOpacity),t.setAttribute("fill-rule",n.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,B(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),o="a"+n+","+(Math.max(Math.round(e._radiusY),1)||n)+" 0 1,0 ",i=e._empty()?"M0 0":"M"+(t.x-n)+","+t.y+o+2*n+",0 "+o+2*-n+",0 ";this._setPath(e,i)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){J(e._path)},_bringToBack:function(e){X(e._path)}});Qt&&bo.include(Po),Tn.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||void 0===e)return!1;var t=this._paneRenderers[e];return void 0===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&Qe(e)||$e(e)}});var Lo=io.extend({initialize:function(e,t){io.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=S(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});bo.create=wo,bo.pointsToPath=B,ro.geometryToLayer=Ge,ro.coordsToLatLng=We,ro.coordsToLatLngs=He,ro.latLngToCoords=Ve,ro.latLngsToCoords=qe,ro.getFeature=Ke,ro.asFeature=Ye,Tn.mergeOptions({boxZoom:!0});var To=Bn.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){fe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){ge(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){K(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),gt(),ue(),this._startPoint=this._map.mouseEventToContainerPoint(e),fe(document,{contextmenu:be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=q("div","leaflet-zoom-box",this._container),$(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new w(this._point,this._startPoint),n=t.getSize();se(this._box,t.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(K(this._box),ee(this._container,"leaflet-crosshair")),yt(),ce(),ge(document,{contextmenu:be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(n(this._resetState,this),0);var t=new T(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){27===e.keyCode&&this._finish()}});Tn.addInitHook("addHandler","boxZoom",To),Tn.mergeOptions({doubleClickZoom:!0});var So=Bn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),o=t.options.zoomDelta,i=e.originalEvent.shiftKey?n-o:n+o;"center"===t.options.doubleClickZoom?t.setZoom(i):t.setZoomAround(e.containerPoint,i)}});Tn.addInitHook("addHandler","doubleClickZoom",So),Tn.mergeOptions({dragging:!0,inertia:!zt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var zo=Bn.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new Nn(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}$(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ee(this._map._container,"leaflet-grab"),ee(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=S(this._map.options.maxBounds);this._offsetLimit=b(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(t),this._prunePositions(t)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,o=this._draggable._newPos.x,i=(o-t+n)%e+t-n,r=(o+t+n)%e-t-n,a=Math.abs(i+n)<Math.abs(r+n)?i:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(e){var t=this._map,n=t.options,o=!n.inertia||this._times.length<2;if(t.fire("dragend",e),o)t.fire("moveend");else{this._prunePositions(+new Date);var i=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=n.easeLinearity,s=i.multiplyBy(a/r),l=s.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=s.multiplyBy(u/l),_=u/(n.inertiaDeceleration*a),d=c.multiplyBy(-_/2).round();d.x||d.y?(d=t._limitOffset(d,t.options.maxBounds),g(function(){t.panBy(d,{duration:_,easeLinearity:a,noMoveStart:!0,animate:!0})})):t.fire("moveend")}}});Tn.addInitHook("addHandler","dragging",zo),Tn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Co=Bn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),fe(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),ge(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var e=document.body,t=document.documentElement,n=e.scrollTop||t.scrollTop,o=e.scrollLeft||t.scrollLeft;this._map._container.focus(),window.scrollTo(o,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var t,n,o=this._panKeys={},i=this.keyCodes;for(t=0,n=i.left.length;t<n;t++)o[i.left[t]]=[-1*e,0];for(t=0,n=i.right.length;t<n;t++)o[i.right[t]]=[e,0];for(t=0,n=i.down.length;t<n;t++)o[i.down[t]]=[0,e];for(t=0,n=i.up.length;t<n;t++)o[i.up[t]]=[0,-1*e]},_setZoomDelta:function(e){var t,n,o=this._zoomKeys={},i=this.keyCodes;for(t=0,n=i.zoomIn.length;t<n;t++)o[i.zoomIn[t]]=e;for(t=0,n=i.zoomOut.length;t<n;t++)o[i.zoomOut[t]]=-e},_addHooks:function(){fe(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){ge(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t,n=e.keyCode,o=this._map;if(n in this._panKeys)o._panAnim&&o._panAnim._inProgress||(t=this._panKeys[n],e.shiftKey&&(t=P(t).multiplyBy(3)),o.panBy(t),o.options.maxBounds&&o.panInsideBounds(o.options.maxBounds));else if(n in this._zoomKeys)o.setZoom(o.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!o._popup||!o._popup.options.closeOnEscapeKey)return;o.closePopup()}be(e)}}});Tn.addInitHook("addHandler","keyboard",Co),Tn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Ao=Bn.extend({addHooks:function(){fe(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){ge(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var t=Te(e),o=this._map.options.wheelDebounceTime;this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var i=Math.max(o-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(n(this._performZoom,this),i),be(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var o=this._delta/(4*this._map.options.wheelPxPerZoomLevel),i=4*Math.log(2/(1+Math.exp(-Math.abs(o))))/Math.LN2,r=n?Math.ceil(i/n)*n:i,a=e._limitZoom(t+(this._delta>0?r:-r))-t;this._delta=0,this._startTime=null,a&&("center"===e.options.scrollWheelZoom?e.setZoom(t+a):e.setZoomAround(this._lastMousePos,t+a))}});Tn.addInitHook("addHandler","scrollWheelZoom",Ao),Tn.mergeOptions({tap:!0,tapTolerance:15});var ko=Bn.extend({addHooks:function(){fe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){ge(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(e.touches){if(we(e),this._fireClick=!0,e.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var t=e.touches[0],o=t.target;this._startPos=this._newPos=new v(t.clientX,t.clientY),o.tagName&&"a"===o.tagName.toLowerCase()&&$(o,"leaflet-active"),this._holdTimeout=setTimeout(n(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",t))},this),1e3),this._simulateEvent("mousedown",t),fe(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(e){if(clearTimeout(this._holdTimeout),ge(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&e&&e.changedTouches){var t=e.changedTouches[0],n=t.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&ee(n,"leaflet-active"),this._simulateEvent("mouseup",t),this._isTapValid()&&this._simulateEvent("click",t)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(e){var t=e.touches[0];this._newPos=new v(t.clientX,t.clientY),this._simulateEvent("mousemove",t)},_simulateEvent:function(e,t){var n=document.createEvent("MouseEvents");n._simulated=!0,t.target._simulatedClick=!0,n.initMouseEvent(e,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(n)}});Vt&&!Ht&&Tn.addInitHook("addHandler","tap",ko),Tn.mergeOptions({touchZoom:Vt&&!zt,bounceAtZoomLimits:!0});var Eo=Bn.extend({addHooks:function(){$(this._map._container,"leaflet-touch-zoom"),fe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ee(this._map._container,"leaflet-touch-zoom"),ge(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&!t._animatingZoom&&!this._zooming){var n=t.mouseEventToContainerPoint(e.touches[0]),o=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(o)._divideBy(2))),this._startDist=n.distanceTo(o),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),fe(document,"touchmove",this._onTouchMove,this),fe(document,"touchend",this._onTouchEnd,this),we(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,o=t.mouseEventToContainerPoint(e.touches[0]),i=t.mouseEventToContainerPoint(e.touches[1]),r=o.distanceTo(i)/this._startDist;if(this._zoom=t.getScaleZoom(r,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&r<1||this._zoom>t.getMaxZoom()&&r>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var a=o._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===a.x&&0===a.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),y(this._animRequest);var s=n(t._move,t,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=g(s,this,!0),we(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,y(this._animRequest),ge(document,"touchmove",this._onTouchMove),ge(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Tn.addInitHook("addHandler","touchZoom",Eo),Tn.BoxZoom=To,Tn.DoubleClickZoom=So,Tn.Drag=zo,Tn.Keyboard=Co,Tn.ScrollWheelZoom=Ao,Tn.Tap=ko,Tn.TouchZoom=Eo,Object.freeze=et,e.version="1.3.4+HEAD.0e566b2",e.Control=Sn,e.control=zn,e.Browser=$t,e.Evented=_t,e.Mixin=Zn,e.Util=ut,e.Class=h,e.Handler=Bn,e.extend=t,e.bind=n,e.stamp=o,e.setOptions=c,e.DomEvent=bn,e.DomUtil=xn,e.PosAnimation=Ln,e.Draggable=Nn,e.LineUtil=Dn,e.PolyUtil=Fn,e.Point=v,e.point=P,e.Bounds=w,e.bounds=b,e.Transformation=A,e.transformation=k,e.Projection=Gn,e.LatLng=z,e.latLng=C,e.LatLngBounds=T,e.latLngBounds=S,e.CRS=pt,e.GeoJSON=ro,e.geoJSON=Je,e.geoJson=so,e.Layer=qn,e.LayerGroup=Kn,e.layerGroup=function(e,t){return new Kn(e,t)},e.FeatureGroup=Yn,e.featureGroup=function(e){return new Yn(e)},e.ImageOverlay=lo,e.imageOverlay=function(e,t,n){return new lo(e,t,n)},e.VideoOverlay=uo,e.videoOverlay=function(e,t,n){return new uo(e,t,n)},e.DivOverlay=co,e.Popup=_o,e.popup=function(e,t){return new _o(e,t)},e.Tooltip=po,e.tooltip=function(e,t){return new po(e,t)},e.Icon=Jn,e.icon=function(e){return new Jn(e)},e.DivIcon=mo,e.divIcon=function(e){return new mo(e)},e.Marker=$n,e.marker=function(e,t){return new $n(e,t)},e.TileLayer=go,e.tileLayer=Xe,e.GridLayer=fo,e.gridLayer=function(e){return new fo(e)},e.SVG=bo,e.svg=$e,e.Renderer=ho,e.Canvas=xo,e.canvas=Qe,e.Path=eo,e.CircleMarker=to,e.circleMarker=function(e,t){return new to(e,t)},e.Circle=no,e.circle=function(e,t,n){return new no(e,t,n)},e.Polyline=oo,e.polyline=function(e,t){return new oo(e,t)},e.Polygon=io,e.polygon=function(e,t){return new io(e,t)},e.Rectangle=Lo,e.rectangle=function(e,t){return new Lo(e,t)},e.Map=Tn,e.map=function(e,t){return new Tn(e,t)};var Bo=window.L;e.noConflict=function(){return window.L=Bo,this},window.L=e}),!function(e){"use strict";var t={exif:!0},n=L.icon({iconUrl:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=',iconRetinaUrl:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==',shadowUrl:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC',iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]}),o=function(n){this.core=e(n).data('lightGallery');this.$el=e(n);this.core.s=e.extend({},t,this.core.s);this.exif={};this.html='';this.fadeDuration=250;this.init();return this};o.prototype.appendData=function(e,t,n,o){var i=this.exif[e];if(i){t=(t||e)+": ";n=n||"";o=o||"";var r="";typeof i==="string"&&i.startsWith(n)&&(n="");typeof i==="string"&&i.endsWith(o)&&(o="");e==="ExposureTime"&&i<1?(i="1/"+Math.round(1/parseFloat(i))):e==="DateTimeOriginal"?(i=this.parseDate(i).toLocaleString()):e==="GPSLatitude"&&this.exif.Geo?(i=Number.parseFloat(Math.abs(this.exif.Geo[0]).toFixed(5)),this.exif.GPSLatitudeRef&&(o=" "+this.exif.GPSLatitudeRef.replace("North","N").replace("South","S"))):e==="GPSLongitude"&&this.exif.Geo?(i=Number.parseFloat(Math.abs(this.exif.Geo[1]).toFixed(5)),this.exif.GPSLongitudeRef&&(o=" "+this.exif.GPSLongitudeRef.replace("East","E").replace("West","W"))):isNaN(i)||(i=+parseFloat(i).toFixed(2));(e==='Make'||e==='Model')&&(i=i.toLowerCase(),r='style="text-transform: capitalize;"');this.html+='<li '+r+'>'+t+n+i+o+'</li>'}};o.prototype.renderExif=function(){this.html='<ul>';this.appendData("Filename");this.appendData("DateTimeOriginal","Date Taken");this.appendData("SourceResolution","Resolution");this.appendData("FNumber","Aperature","f/");this.appendData("ExposureTime","Exposure",""," sec");this.appendData("ISOSpeedRatings","ISO");this.appendData("FocalLength","Focal Length","","mm");this.appendData("LensModel","Lens");this.appendData("Model");this.appendData("Make");this.exif.Geo&&(this.html+='<hr>',this.appendData("GPSLatitude","Latitude"),this.appendData("GPSLongitude","Longitude"),this.appendData("GPSAltitude","Altitude",""," m"));this.html+='</ul>';e('.lg-exif .content').html(this.html);this.exif.Geo&&(e('#map').fadeIn(this.fadeDuration),this.map.setView(this.exif.Geo,15),this.marker.setLatLng(this.exif.Geo))};o.prototype.update=function(){let t=this,n=this.core.$items.get(this.core.index),o=n.dataset.filename;if(o)t.exif={Filename:n.dataset.filename,DateTimeOriginal:n.dataset.datetimeoriginal,FNumber:n.dataset.fnumber,ExposureTime:n.dataset.exposuretime,ISOSpeedRatings:n.dataset.isospeedratings,FocalLength:n.dataset.focallength,LensModel:n.dataset.lensmodel,Model:n.dataset.model,Make:n.dataset.make,GPSLatitude:n.dataset.gpslatitude,GPSLongitude:n.dataset.gpslongitude,GPSLatitudeRef:n.dataset.gpslatituderef,GPSLongitudeRef:n.dataset.gpslongituderef,GPSAltitude:n.dataset.gpsaltitude},t.exif.Geo=t.getGeo(),t.renderExif();else{let o=e(n).find('img').get(0);EXIF.getData(o,function(){t.exif=EXIF.getAllTags(this);t.exif.Filename=o.src.replace(/^.*[\\\/]/,'');t.exif.Geo=t.getGeo();t.renderExif()})}if(typeof USE_DATA_ATTRIBUTES!=="undefined"){let t="Image Information";o?(t+=" (Data)"):(t+=" (EXIF)");e('.lg-exif h3').html(t)}};o.prototype.init=function(){let t='<div class="lg-exif hidden"><div><h3>Image Information</h3>\
<span class="lg-hide lg-icon"></span></div><hr><div class="content"></div>\
<div id="map"</div></div>';this.core.$outer.prepend(t);this.element=this.core.$outer.find('.lg-exif');let o=this;this.$el.on('onAfterSlide.lg',function(){o.update();e('.lg-exif .content').fadeIn(o.fadeDuration)});this.$el.on('onBeforeSlide.lg',function(){e('.lg-exif .content').fadeOut(o.fadeDuration);e('#map').fadeOut(o.fadeDuration,()=>{o.map.setZoom(15)})});let i=this.core.$outer.find('.lg-toolbar .lg-close');i.after('<span class="lg-icon lg-info"></span>');this.core.$outer.find('.lg-toolbar .lg-info, .lg-exif .lg-hide').on('click',function(){o.element.toggleClass('hidden')});this.marker=L.marker([0,0],{icon:n});this.map=L.map('map',{zoom:15,layers:[L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}),this.marker]});e('#map').hide();this.update()};o.prototype.parseDate=function(e){var t=e.split(/\D/);return new Date(t[0],t[1]-1,t[2],t[3],t[4],t[5])};o.prototype.getGeo=function(){if(this.exif.GPSLatitude&&this.exif.GPSLongitude){var e=this.parseDMS(this.exif.GPSLatitude)*(this.exif.GPSLatitudeRef==="S"||this.exif.GPSLatitudeRef==="South"?-1:1),t=this.parseDMS(this.exif.GPSLongitude)*(this.exif.GPSLongitudeRef==="W"||this.exif.GPSLongitudeRef==="West"?-1:1);return[e,t]}return null};o.prototype.parseDMS=function(e){if(e.length===3){return e[0]+e[1]/60+e[2]/3600}return e};o.prototype.destroy=function(){this.element.remove()};e.fn.lightGallery.modules.exif=o}(jQuery,window,document)