diff --git a/hopglass-frontend.nix b/hopglass-frontend.nix index 894d01c..ea580e1 100644 --- a/hopglass-frontend.nix +++ b/hopglass-frontend.nix @@ -1,9 +1,7 @@ { config, lib, pkgs, ... }: let - hopglass-fe = (pkgs.callPackage ./pkg-hopglass-fe.nix { - conf = ./hopglass-frontend.config.json; - } ); + hopglass-fe = ./hopglass-frontend; in { services.nginx.virtualHosts."map.hamburg.freifunk.net" = { diff --git a/hopglass-frontend/app.js b/hopglass-frontend/app.js new file mode 100644 index 0000000..875585a --- /dev/null +++ b/hopglass-frontend/app.js @@ -0,0 +1,254 @@ +/** + * @license almond 0.3.3 Copyright jQuery Foundation and other contributors. + * Released under MIT license, http://github.com/requirejs/almond/LICENSE + */ + +/* + Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com + (c) 2010-2013, Vladimir Agafonkin + (c) 2010-2011, CloudMade +*/ + +/** + * chroma.js - JavaScript library for color conversions + * + * Copyright (c) 2011-2019, Gregor Aisch + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name Gregor Aisch may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ------------------------------------------------------- + * + * chroma.js includes colors from colorbrewer2.org, which are released under + * the following license: + * + * Copyright (c) 2002 Cynthia Brewer, Mark Harrower, + * and The Pennsylvania State University. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the License. + * + * ------------------------------------------------------ + * + * Named colors are taken from X11 Color Names. + * http://www.w3.org/TR/css3-color/#svg-color + * + * @preserve + */ + +/* + Leaflet.label, a plugin that adds labels to markers and vectors for Leaflet powered maps. + (c) 2012-2013, Jacob Toye, Smartrak + + https://github.com/Leaflet/Leaflet.label + http://leafletjs.com + https://github.com/jacobtoye +*/ + +// NLS maps are copyright National library of Scotland. + +/*! + * Cross-Browser Split 1.1.1 + * Copyright 2007-2012 Steven Levithan + * Available under the MIT License + * ECMAScript compliant, uniform cross-browser split method + */ + +/*! + * numeral.js + * version : 1.5.3 + * author : Adam Draper + * license : MIT + * http://adamwdraper.github.com/Numeral-js/ + */ + +/*! + * tablesort v3.0.2 (2015-02-25) + * http://tristen.ca/tablesort/demo/ + * Copyright (c) 2015 ; Licensed MIT +*/ + +/*! + * numeral.js language configuration + * language : belgium-dutch (be-nl) + * author : Dieter Luypaert : https://github.com/moeriki + */ + +/*! + * numeral.js language configuration + * language : simplified chinese + * author : badplum : https://github.com/badplum + */ + +/*! + * numeral.js language configuration + * language : czech (cs) + * author : Anatoli Papirovski : https://github.com/apapirovski + */ + +/*! + * numeral.js language configuration + * language : danish denmark (dk) + * author : Michael Storgaard : https://github.com/mstorgaard + */ + +/*! + * numeral.js language configuration + * language : German in Switzerland (de-ch) + * author : Michael Piefel : https://github.com/piefel (based on work from Marco Krage : https://github.com/sinky) + */ + +/*! + * numeral.js language configuration + * language : German (de) – generally useful in Germany, Austria, Luxembourg, Belgium + * author : Marco Krage : https://github.com/sinky + */ + +/*! + * numeral.js language configuration + * language : english united kingdom (uk) + * author : Dan Ristic : https://github.com/dristic + */ + +/*! + * numeral.js language configuration + * language : spanish Spain + * author : Hernan Garcia : https://github.com/hgarcia + */ + +/*! + * numeral.js language configuration + * language : spanish + * author : Hernan Garcia : https://github.com/hgarcia + */ + +/*! + * numeral.js language configuration + * language : Estonian + * author : Illimar Tambek : https://github.com/ragulka + * + * Note: in Estonian, abbreviations are always separated + * from numbers with a space + */ + +/*! + * numeral.js language configuration + * language : Finnish + * author : Sami Saada : https://github.com/samitheberber + */ + +/*! + * numeral.js language configuration + * language : french (Canada) (fr-CA) + * author : Léo Renaud-Allaire : https://github.com/renaudleo + */ + +/*! + * numeral.js language configuration + * language : french (fr-ch) + * author : Adam Draper : https://github.com/adamwdraper + */ + +/*! + * numeral.js language configuration + * language : french (fr) + * author : Adam Draper : https://github.com/adamwdraper + */ + +/*! + * numeral.js language configuration + * language : Hungarian (hu) + * author : Peter Bakondy : https://github.com/pbakondy + */ + +/*! + * numeral.js language configuration + * language : italian Italy (it) + * author : Giacomo Trombi : http://cinquepunti.it + */ + +/*! + * numeral.js language configuration + * language : japanese + * author : teppeis : https://github.com/teppeis + */ + +/*! + * numeral.js language configuration + * language : netherlands-dutch (nl-nl) + * author : Dave Clayton : https://github.com/davedx + */ + +/*! + * numeral.js language configuration + * language : polish (pl) + * author : Dominik Bulaj : https://github.com/dominikbulaj + */ + +/*! + * numeral.js language configuration + * language : portuguese brazil (pt-br) + * author : Ramiro Varandas Jr : https://github.com/ramirovjr + */ + +/*! + * numeral.js language configuration + * language : portuguese (pt-pt) + * author : Diogo Resende : https://github.com/dresende + */ + +/*! + * numeral.js language configuration + * language : russian (ru) + * author : Anatoli Papirovski : https://github.com/apapirovski + */ + +/*! + * numeral.js language configuration + * language : slovak (sk) + * author : Ahmed Al Hafoudh : http://www.freevision.sk + */ + +/*! + * numeral.js language configuration + * language : thai (th) + * author : Sathit Jittanupat : https://github.com/jojosati + */ + +/*! + * numeral.js language configuration + * language : turkish (tr) + * author : Ecmel Ercan : https://github.com/ecmel, Erhan Gundogan : https://github.com/erhangundogan, Burak Yiğit Kaya: https://github.com/BYK + */ + +(function(){function r(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.open("GET",e),r.onload=function(){r.status==200?t(r.response):n(Error(r.statusText))},r.onerror=function(){n(Error("Network Error"))},r.send()})}function i(e){return r(e).then(JSON.parse)}function s(e,t){return t.slice().sort(function(t,n){return t[e]-n[e]}).reverse()}function o(e,t,n){return n.filter(function(n){return n[e].isAfter(t)})}function u(e){return e.reduce(function(e,t){return e+t},0)}function a(){return 1}function f(e){return e===undefined?!0:e}function l(e,t){var n=t.shift();return n in e?t.length==0?e[n]:l(e[n],t):null}function c(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}}function h(e,t){for(key in t){var n=new RegExp(key,"g");e=e.replace(n,t[key])}return e}function p(e){return!e.flags.online}function d(e){return e.flags.online}function v(e){return"location"in e.nodeinfo&&Math.abs(e.nodeinfo.location.latitude)<90&&Math.abs(e.nodeinfo.location.longitude)<180}function m(e,t){var n={};return t.forEach(function(e){n[e.nodeinfo.node_id]=!0}),e.filter(function(e){return!(e.nodeinfo.node_id in n)})}function g(e){if(isNaN(e.distance))return;return numeral(e.distance).format("0,0")+" m"}function y(e){return numeral(1/e.tq).format("0%")}function b(e,t,n){if(n===null||n==undefined)return;var r=document.createElement("tr"),i=document.createElement("th");typeof t=="string"?i.textContent=t:(i.appendChild(t),r.className="routerpic"),r.appendChild(i);var s=document.createElement("td");return typeof n=="function"?n(s):s.appendChild(document.createTextNode(n)),r.appendChild(s),e.appendChild(r),s}function w(e,t,n){return el=document.createElement("iframe"),t=typeof t!="undefined"?t:"100%",n=typeof n!="undefined"?n:"350px",e.src?el.src=e.src:el.src=e,e.frameBorder?el.frameBorder=e.frameBorder:el.frameBorder=1,e.width?el.width=e.width:el.width=t,e.height?el.height=e.height:el.height=n,el.scrolling="no",el.seamless="seamless",el}function E(e,t){var n,r;t=typeof t!="undefined"?t:{},e.thumbnail&&(n=document.createElement("img"),n.src=h(e.thumbnail,t)),e.caption&&(r=h(e.caption,t),n||(n=document.createTextNode(r))),e.iframe&&(n=w(e.iframe,e.width,e.height),e.iframe.src?n.src=h(e.iframe.src,t):n.src=h(e.iframe,t));var i=document.createElement("p");if(e.href){var s=document.createElement("a");s.target="_blank",s.href=h(e.href,t),s.appendChild(n),r&&e.thumbnail&&(s.title=r),i.appendChild(s)}else i.appendChild(n);return i}function S(e){if(!e.clients)return[];var t=Math.max(e.clients.total-e.clients.wifi,0),n=Math.max(e.clients.wifi-e.clients.wifi24-e.clients.wifi5,0),r=e.clients.wifi24,i=e.clients.wifi5;return[{count:t,label:"Kabel",color:"#E3A619"},{count:n,label:"Sonstige Wifi",color:"#D10E2A"},{count:r,label:"2.4GHz",color:"#DC0067"},{count:i,label:"5GHz",color:"#0A9C92"}]}function x(e,t){var n=S(e),r=n.map(function(e){return e.count}).reduce(function(e,t){return e+t},0),i;for(var s=0;s0&&(e.splice(c-1,2),c-=2)}}e=e.join("/")}if((m||y)&&g){n=e.split("/");for(c=n.length;c>0;c-=1){r=n.slice(0,c).join("/");if(m)for(h=m.length;h>0;h-=1){i=g[m.slice(0,h).join("/")];if(i){i=i[r];if(i){s=i,u=c;break}}}if(s)break;!a&&y&&y[r]&&(a=y[r],f=c)}!s&&a&&(s=a,u=f),s&&(n.splice(0,u,s),e=n.join("/"))}return e}function g(e,t){return function(){var n=p.call(arguments,0);return typeof n[0]!="string"&&n.length===1&&n.push(null),s.apply(r,n.concat([e,t]))}}function y(e){return function(t){return m(t,e)}}function b(e){return function(t){a[e]=t}}function w(e){if(v(f,e)){var t=f[e];delete f[e],c[e]=!0,i.apply(r,t)}if(!v(a,e)&&!v(c,e))throw new Error("No "+e);return a[e]}function E(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?E(e):[]}function x(e){return function(){return l&&l.config&&l.config[e]||{}}}var i,s,o,u,a={},f={},l={},c={},h=Object.prototype.hasOwnProperty,p=[].slice,d=/\.js$/;o=function(e,t){var n,r=E(e),i=r[0],s=t[1];return e=r[1],i&&(i=m(i,s),n=w(i)),i?n&&n.normalize?e=n.normalize(e,y(s)):e=m(e,s):(e=m(e,s),r=E(e),i=r[0],e=r[1],i&&(n=w(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},u={require:function(e){return g(e)},exports:function(e){var t=a[e];return typeof t!="undefined"?t:a[e]={}},module:function(e){return{id:e,uri:"",exports:a[e],config:x(e)}}},i=function(e,t,n,i){var s,l,h,p,d,m,y=[],E=typeof n,x;i=i||e,m=S(i);if(E==="undefined"||E==="function"){t=!t.length&&n.length?["require","exports","module"]:t;for(d=0;dTt(e)?(s=e+1,u-Tt(e)):(s=e,u),{year:s,dayOfYear:o}}function zt(e,t,n){var r,i,s=Rt(e.year(),t,n),o=Math.floor((e.dayOfYear()-s-1)/7)+1;return o<1?r=o+Wt(i=e.year()-1,t,n):o>Wt(e.year(),t,n)?(r=o-Wt(e.year(),t,n),i=e.year()+1):(i=e.year(),r=o),{week:r,year:i}}function Wt(e,t,n){var r=Rt(e,t,n),i=Rt(e+1,t,n);return(Tt(e)-r+i)/7}function Xt(e,t){return e.slice(t,7).concat(e.slice(0,t))}function Yt(){function e(e,t){return t.length-e.length}var t,n,r,i,s,o=[],u=[],a=[],f=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),s=this.weekdays(n,""),o.push(r),u.push(i),a.push(s),f.push(r),f.push(i),f.push(s);for(o.sort(e),u.sort(e),a.sort(e),f.sort(e),t=0;t<7;t++)u[t]=ct(u[t]),a[t]=ct(a[t]),f[t]=ct(f[t]);this._weekdaysRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Zt(){return this.hours()%12||12}function en(e,t){z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function tn(e,t){return t._meridiemParse}function an(e){return e?e.toLowerCase().replace("_","-"):e}function fn(e){var n=null;if(!on[e]&&"undefined"!=typeof module&&module&&module.exports)try{n=nn._abbr,t("./locale/"+e),ln(n)}catch(e){}return on[e]}function ln(e,t){var n;return e&&((n=o(t)?hn(e):cn(e,t))?nn=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nn._abbr}function cn(e,t){if(null===t)return delete on[e],null;var n,r=sn;if(t.abbr=e,null!=on[e])L("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=on[e]._config;else if(null!=t.parentLocale)if(null!=on[t.parentLocale])r=on[t.parentLocale]._config;else{if(null==(n=fn(t.parentLocale)))return un[t.parentLocale]||(un[t.parentLocale]=[]),un[t.parentLocale].push({name:e,config:t}),null;r=n._config}return on[e]=new M(O(r,t)),un[e]&&un[e].forEach(function(e){cn(e.name,e.config)}),ln(e),on[e]}function hn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nn;if(!i(e)){if(t=fn(e))return t;e=[e]}return function(e){for(var t,n,r,i,s=0;s=t&&x(i,n,!0)>=t-1)break;t--}s++}return nn}(e)}function pn(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[mt]<0||11Mt(n[vt],n[mt])?gt:n[yt]<0||24Wt(n,s,o)?p(e)._overflowWeeks=!0:null!=a?p(e)._overflowWeekday=!0:(u=Ut(n,r,i,s,o),e._a[vt]=u.year,e._dayOfYear=u.dayOfYear)}(e),null!=e._dayOfYear&&(o=dn(e._a[vt],i[vt]),(e._dayOfYear>Tt(o)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=qt(o,0,e._dayOfYear),e._a[mt]=n.getUTCMonth(),e._a[gt]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=u[t]=i[t];for(;t<7;t++)e._a[t]=u[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[yt]&&0===e._a[bt]&&0===e._a[wt]&&0===e._a[Et]&&(e._nextDay=!0,e._a[yt]=0),e._d=(e._useUTC?qt:function(e,t,n,r,i,s,o){var u;return e<100&&0<=e?(u=new Date(e+400,t,n,r,i,s,o),isFinite(u.getFullYear())&&u.setFullYear(e)):u=new Date(e,t,n,r,i,s,o),u}).apply(null,u),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[yt]=24),e._w&&void 0!==e._w.d&&e._w.d!==s&&(p(e).weekdayMismatch=!0)}}function Sn(e){var t,n,r,i,s,o,u=e._i,a=mn.exec(u)||gn.exec(u);if(a){for(p(e).iso=!0,t=0,n=bn.length;t>>0,r=0;rn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},vr.isLocal=function(){return!!this.isValid()&&!this._isUTC},vr.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},vr.isUtc=zn,vr.isUTC=zn,vr.zoneAbbr=function(){return this._isUTC?"UTC":""},vr.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},vr.dates=N("dates accessor is deprecated. Use date instead.",fr),vr.months=N("months accessor is deprecated. Use month instead",Bt),vr.years=N("years accessor is deprecated. Use year instead",kt),vr.zone=N("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),vr.isDSTShifted=N("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=Ln(e))._a){var t=e._isUTC?h(e._a):On(e._a);this._isDSTShifted=this.isValid()&&0n;n++){i=s[n]||{};for(t in i)i.hasOwnProperty(t)&&(e[t]=i[t])}return e},bind:function(e,t){var n=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return e.apply(t,n||arguments)}},stamp:function(){var e=0,t="_leaflet_id";return function(n){return n[t]=n[t]||++e,n[t]}}(),invokeEach:function(e,t,n){var r,i;if("object"==typeof e){i=Array.prototype.slice.call(arguments,3);for(r in e)t.apply(n,[r,e[r]].concat(i));return!0}return!1},limitExecByInterval:function(e,t,n){var r,i;return function s(){var o=arguments;return r?void (i=!0):(r=!0,setTimeout(function(){r=!1,i&&(s.apply(n,o),i=!1)},t),void e.apply(n,o))}},falseFn:function(){return!1},formatNum:function(e,t){var n=Math.pow(10,t||5);return Math.round(e*n)/n},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},splitWords:function(e){return s.Util.trim(e).split(/\s+/)},setOptions:function(e,t){return e.options=s.extend({},e.options,t),e.options},getParamString:function(e,t,n){var r=[];for(var i in e)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(e[i]));return(t&&-1!==t.indexOf("?")?"&":"?")+r.join("&")},template:function(e,t){return e.replace(/\{ *([\w_]+) *\}/g,function(e,n){var i=t[n];if(i===r)throw new Error("No value provided for variable "+e);return"function"==typeof i&&(i=i(t)),i})},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function t(t){var n,r,i=["webkit","moz","o","ms"];for(n=0;ne;e++)r._initHooks[e].call(this)}},t},s.Class.include=function(e){s.extend(this.prototype,e)},s.Class.mergeOptions=function(e){s.extend(this.prototype.options,e)},s.Class.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"==typeof e?e:function(){this[e].apply(this,t)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n)};var o="_leaflet_events";s.Mixin={},s.Mixin.Events={addEventListener:function(e,t,n){if(s.Util.invokeEach(e,this.addEventListener,this,t,n))return this;var r,i,u,a,f,l,c,h=this[o]=this[o]||{},p=n&&n!==this&&s.stamp(n);for(e=s.Util.splitWords(e),r=0,i=e.length;i>r;r++)u={action:t,context:n||this},a=e[r],p?(f=a+"_idx",l=f+"_len",c=h[f]=h[f]||{},c[p]||(c[p]=[],h[l]=(h[l]||0)+1),c[p].push(u)):(h[a]=h[a]||[],h[a].push(u));return this},hasEventListeners:function(e){var t=this[o];return!!t&&(e in t&&t[e].length>0||e+"_idx"in t&&t[e+"_idx_len"]>0)},removeEventListener:function(e,t,n){if(!this[o])return this;if(!e)return this.clearAllEventListeners();if(s.Util.invokeEach(e,this.removeEventListener,this,t,n))return this;var r,i,u,a,f,l,c,h,p,d=this[o],v=n&&n!==this&&s.stamp(n);for(e=s.Util.splitWords(e),r=0,i=e.length;i>r;r++)if(u=e[r],l=u+"_idx",c=l+"_len",h=d[l],t){if(a=v&&h?h[v]:d[u]){for(f=a.length-1;f>=0;f--)a[f].action!==t||n&&a[f].context!==n||(p=a.splice(f,1),p[0].action=s.Util.falseFn);n&&h&&0===a.length&&(delete h[v],d[c]--)}}else delete d[u],delete d[l],delete d[c];return this},clearAllEventListeners:function(){return delete this[o],this},fireEvent:function(e,t){if(!this.hasEventListeners(e))return this;var n,r,i,u,a,f=s.Util.extend({},t,{type:e,target:this}),l=this[o];if(l[e])for(n=l[e].slice(),r=0,i=n.length;i>r;r++)n[r].action.call(n[r].context,f);u=l[e+"_idx"];for(a in u)if(n=u[a].slice())for(r=0,i=n.length;i>r;r++)n[r].action.call(n[r].context,f);return this},addOneTimeEventListener:function(e,t,n){if(s.Util.invokeEach(e,this.addOneTimeEventListener,this,t,n))return this;var r=s.bind(function(){this.removeEventListener(e,t,n).removeEventListener(e,r,n)},this);return this.addEventListener(e,t,n).addEventListener(e,r,n)}},s.Mixin.Events.on=s.Mixin.Events.addEventListener,s.Mixin.Events.off=s.Mixin.Events.removeEventListener,s.Mixin.Events.once=s.Mixin.Events.addOneTimeEventListener,s.Mixin.Events.fire=s.Mixin.Events.fireEvent,function(){var n="ActiveXObject"in e,i=n&&!t.addEventListener,o=navigator.userAgent.toLowerCase(),u=-1!==o.indexOf("webkit"),a=-1!==o.indexOf("chrome"),f=-1!==o.indexOf("phantom"),l=-1!==o.indexOf("android"),c=-1!==o.search("android [23]"),h=-1!==o.indexOf("gecko"),p=typeof orientation!=r+"",d=!e.PointerEvent&&e.MSPointerEvent,v=e.PointerEvent&&e.navigator.pointerEnabled||d,m="devicePixelRatio"in e&&e.devicePixelRatio>1||"matchMedia"in e&&e.matchMedia("(min-resolution:144dpi)")&&e.matchMedia("(min-resolution:144dpi)").matches,g=t.documentElement,y=n&&"transition"in g.style,b="WebKitCSSMatrix"in e&&"m11"in new e.WebKitCSSMatrix&&!c,w="MozPerspective"in g.style,E="OTransition"in g.style,S=!e.L_DISABLE_3D&&(y||b||w||E)&&!f,x=!e.L_NO_TOUCH&&!f&&(v||"ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch);s.Browser={ie:n,ielt9:i,webkit:u,gecko:h&&!u&&!e.opera&&!n,android:l,android23:c,chrome:a,ie3d:y,webkit3d:b,gecko3d:w,opera3d:E,any3d:S,mobile:p,mobileWebkit:p&&u,mobileWebkit3d:p&&b,mobileOpera:p&&e.opera,touch:x,msPointer:d,pointer:v,retina:m}}(),s.Point=function(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t},s.Point.prototype={clone:function(){return new s.Point(this.x,this.y)},add:function(e){return this.clone()._add(s.point(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(s.point(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},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},distanceTo:function(e){e=s.point(e);var t=e.x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return e=s.point(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=s.point(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+s.Util.formatNum(this.x)+", "+s.Util.formatNum(this.y)+")"}},s.point=function(e,t,n){return e instanceof s.Point?e:s.Util.isArray(e)?new s.Point(e[0],e[1]):e===r||null===e?e:new s.Point(e,t,n)},s.Bounds=function(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;i>r;r++)this.extend(n[r])},s.Bounds.prototype={extend:function(e){return e=s.point(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 s.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return new s.Point(this.min.x,this.max.y)},getTopRight:function(){return new s.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,n;return e="number"==typeof e[0]||e instanceof s.Point?s.point(e):s.bounds(e),e instanceof s.Bounds?(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=s.bounds(e);var t=this.min,n=this.max,r=e.min,i=e.max,o=i.x>=t.x&&r.x<=n.x,u=i.y>=t.y&&r.y<=n.y;return o&&u},isValid:function(){return!!this.min&&!!this.max}},s.bounds=function(e,t){return!e||e instanceof s.Bounds?e:new s.Bounds(e,t)},s.Transformation=function(e,t,n,r){this._a=e,this._b=t,this._c=n,this._d=r},s.Transformation.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 s.Point((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}},s.DomUtil={get:function(e){return"string"==typeof e?t.getElementById(e):e},getStyle:function(e,n){var r=e.style[n];if(!r&&e.currentStyle&&(r=e.currentStyle[n]),(!r||"auto"===r)&&t.defaultView){var i=t.defaultView.getComputedStyle(e,null);r=i?i[n]:null}return"auto"===r?null:r},getViewportOffset:function(e){var n,r=0,i=0,o=e,u=t.body,a=t.documentElement;do{if(r+=o.offsetTop||0,i+=o.offsetLeft||0,r+=parseInt(s.DomUtil.getStyle(o,"borderTopWidth"),10)||0,i+=parseInt(s.DomUtil.getStyle(o,"borderLeftWidth"),10)||0,n=s.DomUtil.getStyle(o,"position"),o.offsetParent===u&&"absolute"===n)break;if("fixed"===n){r+=u.scrollTop||a.scrollTop||0,i+=u.scrollLeft||a.scrollLeft||0;break}if("relative"===n&&!o.offsetLeft){var f=s.DomUtil.getStyle(o,"width"),l=s.DomUtil.getStyle(o,"max-width"),c=o.getBoundingClientRect();("none"!==f||"none"!==l)&&(i+=c.left+o.clientLeft),r+=c.top+(u.scrollTop||a.scrollTop||0);break}o=o.offsetParent}while(o);o=e;do{if(o===u)break;r-=o.scrollTop||0,i-=o.scrollLeft||0,o=o.parentNode}while(o);return new s.Point(i,r)},documentIsLtr:function(){return s.DomUtil._docIsLtrCached||(s.DomUtil._docIsLtrCached=!0,s.DomUtil._docIsLtr="ltr"===s.DomUtil.getStyle(t.body,"direction")),s.DomUtil._docIsLtr},create:function(e,n,r){var i=t.createElement(e);return i.className=n,r&&r.appendChild(i),i},hasClass:function(e,t){if(e.classList!==r)return e.classList.contains(t);var n=s.DomUtil._getClass(e);return n.length>0&&(new RegExp("(^|\\s)"+t+"(\\s|$)")).test(n)},addClass:function(e,t){if(e.classList!==r)for(var n=s.Util.splitWords(t),i=0,o=n.length;o>i;i++)e.classList.add(n[i]);else if(!s.DomUtil.hasClass(e,t)){var u=s.DomUtil._getClass(e);s.DomUtil._setClass(e,(u?u+" ":"")+t)}},removeClass:function(e,t){e.classList!==r?e.classList.remove(t):s.DomUtil._setClass(e,s.Util.trim((" "+s.DomUtil._getClass(e)+" ").replace(" "+t+" "," ")))},_setClass:function(e,t){e.className.baseVal===r?e.className=t:e.className.baseVal=t},_getClass:function(e){return e.className.baseVal===r?e.className:e.className.baseVal},setOpacity:function(e,t){if("opacity"in e.style)e.style.opacity=t;else if("filter"in e.style){var n=!1,r="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(r)}catch(i){if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+r+"(opacity="+t+")"}},testProp:function(e){for(var n=t.documentElement.style,r=0;rn||n===t?t:e),new s.LatLng(this.lat,n)}},s.latLng=function(e,t){return e instanceof s.LatLng?e:s.Util.isArray(e)?"number"==typeof e[0]||"string"==typeof e[0]?new s.LatLng(e[0],e[1],e[2]):null:e===r||null===e?e:"object"==typeof e&&"lat"in e?new s.LatLng(e.lat,"lng"in e?e.lng:e.lon):t===r?null:new s.LatLng(e,t)},s.LatLngBounds=function(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;i>r;r++)this.extend(n[r])},s.LatLngBounds.prototype={extend:function(e){if(!e)return this;var t=s.latLng(e);return e=null!==t?t:s.latLngBounds(e),e instanceof s.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(e.lat,this._southWest.lat),this._southWest.lng=Math.min(e.lng,this._southWest.lng),this._northEast.lat=Math.max(e.lat,this._northEast.lat),this._northEast.lng=Math.max(e.lng,this._northEast.lng)):(this._southWest=new s.LatLng(e.lat,e.lng),this._northEast=new s.LatLng(e.lat,e.lng)):e instanceof s.LatLngBounds&&(this.extend(e._southWest),this.extend(e._northEast)),this},pad:function(e){var t=this._southWest,n=this._northEast,r=Math.abs(t.lat-n.lat)*e,i=Math.abs(t.lng-n.lng)*e;return new s.LatLngBounds(new s.LatLng(t.lat-r,t.lng-i),new s.LatLng(n.lat+r,n.lng+i))},getCenter:function(){return new s.LatLng((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 s.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new s.LatLng(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 s.LatLng?s.latLng(e):s.latLngBounds(e);var t,n,r=this._southWest,i=this._northEast;return e instanceof s.LatLngBounds?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=r.lat&&n.lat<=i.lat&&t.lng>=r.lng&&n.lng<=i.lng},intersects:function(e){e=s.latLngBounds(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),i=e.getNorthEast(),o=i.lat>=t.lat&&r.lat<=n.lat,u=i.lng>=t.lng&&r.lng<=n.lng;return o&&u},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e){return e?(e=s.latLngBounds(e),this._southWest.equals(e.getSouthWest())&&this._northEast.equals(e.getNorthEast())):!1},isValid:function(){return!!this._southWest&&!!this._northEast}},s.latLngBounds=function(e,t){return!e||e instanceof s.LatLngBounds?e:new s.LatLngBounds(e,t)},s.Projection={},s.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(e){var t=s.LatLng.DEG_TO_RAD,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,e.lat),-n),i=e.lng*t,o=r*t;return o=Math.log(Math.tan(Math.PI/4+o/2)),new s.Point(i,o)},unproject:function(e){var t=s.LatLng.RAD_TO_DEG,n=e.x*t,r=(2*Math.atan(Math.exp(e.y))-Math.PI/2)*t;return new s.LatLng(r,n)}},s.Projection.LonLat={project:function(e){return new s.Point(e.lng,e.lat)},unproject:function(e){return new s.LatLng(e.y,e.x)}},s.CRS={latLngToPoint:function(e,t){var n=this.projection.project(e),r=this.scale(t);return this.transformation._transform(n,r)},pointToLatLng:function(e,t){var n=this.scale(t),r=this.transformation.untransform(e,n);return this.projection.unproject(r)},project:function(e){return this.projection.project(e)},scale:function(e){return 256*Math.pow(2,e)},getSize:function(e){var t=this.scale(e);return s.point(t,t)}},s.CRS.Simple=s.extend({},s.CRS,{projection:s.Projection.LonLat,transformation:new s.Transformation(1,0,-1,0),scale:function(e){return Math.pow(2,e)}}),s.CRS.EPSG3857=s.extend({},s.CRS,{code:"EPSG:3857",projection:s.Projection.SphericalMercator,transformation:new s.Transformation(.5/Math.PI,.5,-0.5/Math.PI,.5),project:function(e){var t=this.projection.project(e),n=6378137;return t.multiplyBy(n)}}),s.CRS.EPSG900913=s.extend({},s.CRS.EPSG3857,{code:"EPSG:900913"}),s.CRS.EPSG4326=s.extend({},s.CRS,{code:"EPSG:4326",projection:s.Projection.LonLat,transformation:new s.Transformation(1/360,.5,-1/360,.5)}),s.Map=s.Class.extend({includes:s.Mixin.Events,options:{crs:s.CRS.EPSG3857,fadeAnimation:s.DomUtil.TRANSITION&&!s.Browser.android23,trackResize:!0,markerZoomAnimation:s.DomUtil.TRANSITION&&s.Browser.any3d},initialize:function(e,t){t=s.setOptions(this,t),this._initContainer(e),this._initLayout(),this._onResize=s.bind(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.center&&t.zoom!==r&&this.setView(s.latLng(t.center),t.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(t.layers)},setView:function(e,t){return t=t===r?this.getZoom():t,this._resetView(s.latLng(e),this._limitZoom(t)),this},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=this._limitZoom(e),this)},zoomIn:function(e,t){return this.setZoom(this._zoom+(e||1),t)},zoomOut:function(e,t){return this.setZoom(this._zoom-(e||1),t)},setZoomAround:function(e,t,n){var r=this.getZoomScale(t),i=this.getSize().divideBy(2),o=e instanceof s.Point?e:this.latLngToContainerPoint(e),u=o.subtract(i).multiplyBy(1-1/r),a=this.containerPointToLatLng(i.add(u));return this.setView(a,t,{zoom:n})},fitBounds:function(e,t){t=t||{},e=e.getBounds?e.getBounds():s.latLngBounds(e);var n=s.point(t.paddingTopLeft||t.padding||[0,0]),r=s.point(t.paddingBottomRight||t.padding||[0,0]),i=this.getBoundsZoom(e,!1,n.add(r));i=t.maxZoom?Math.min(t.maxZoom,i):i;var o=r.subtract(n).divideBy(2),u=this.project(e.getSouthWest(),i),a=this.project(e.getNorthEast(),i),f=this.unproject(u.add(a).divideBy(2).add(o),i);return this.setView(f,i,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){return this.fire("movestart"),this._rawPanBy(s.point(e)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(e){return e=s.latLngBounds(e),this.options.maxBounds=e,e?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(e,t){var n=this.getCenter(),r=this._limitCenter(n,this._zoom,e);return n.equals(r)?this:this.panTo(r,t)},addLayer:function(e){var t=s.stamp(e);return this._layers[t]?this:(this._layers[t]=e,!e.options||isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[t]=e,this._updateZoomLevels()),this.options.zoomAnimation&&s.TileLayer&&e instanceof s.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,e.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(e),this)},removeLayer:function(e){var t=s.stamp(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&this.fire("layerremove",{layer:e}),this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels()),this.options.zoomAnimation&&s.TileLayer&&e instanceof s.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,e.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(e){return e?s.stamp(e)in this._layers:!1},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},invalidateSize:function(e){if(!this._loaded)return this;e=s.extend({animate:!1,pan:!0},e===!0?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var n=this.getSize(),r=t.divideBy(2).round(),i=n.divideBy(2).round(),o=r.subtract(i);return o.x||o.y?(e.animate&&e.pan?this.panBy(o):(e.pan&&this._rawPanBy(o),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:n})):this},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(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(e){this._container._leaflet=r}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),t=this.unproject(e.getBottomLeft()),n=this.unproject(e.getTopRight());return new s.LatLngBounds(t,n)},getMinZoom:function(){return this.options.minZoom===r?this._layersMinZoom===r?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===r?this._layersMaxZoom===r?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,n){e=s.latLngBounds(e);var r,i=this.getMinZoom()-(t?1:0),o=this.getMaxZoom(),u=this.getSize(),a=e.getNorthWest(),f=e.getSouthEast(),l=!0;n=s.point(n||[0,0]);do i++,r=this.project(f,i).subtract(this.project(a,i)).add(n),l=t?r.x=i);return l&&t?null:t?i:i-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new s.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var e=this._getTopLeftPoint();return new s.Bounds(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e){var t=this.options.crs;return t.scale(e)/t.scale(this._zoom)},getScaleZoom:function(e){return this._zoom+Math.log(e)/Math.LN2},project:function(e,t){return t=t===r?this._zoom:t,this.options.crs.latLngToPoint(s.latLng(e),t)},unproject:function(e,t){return t=t===r?this._zoom:t,this.options.crs.pointToLatLng(s.point(e),t)},layerPointToLatLng:function(e){var t=s.point(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){var t=this.project(s.latLng(e))._round();return t._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(e){return s.point(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return s.point(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(s.point(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(s.latLng(e)))},mouseEventToContainerPoint:function(e){return s.DomEvent.getMousePosition(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=s.DomUtil.get(e);if(!t)throw new Error("Map container not found.");if(t._leaflet)throw new Error("Map container is already initialized.");t._leaflet=!0},_initLayout:function(){var e=this._container;s.DomUtil.addClass(e,"leaflet-container"+(s.Browser.touch?" leaflet-touch":"")+(s.Browser.retina?" leaflet-retina":"")+(s.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var t=s.DomUtil.getStyle(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._mapPane=e.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=e.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),e.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),e.shadowPane=this._createPane("leaflet-shadow-pane"),e.overlayPane=this._createPane("leaflet-overlay-pane"),e.markerPane=this._createPane("leaflet-marker-pane"),e.popupPane=this._createPane("leaflet-popup-pane");var t=" leaflet-zoom-hide";this.options.markerZoomAnimation||(s.DomUtil.addClass(e.markerPane,t),s.DomUtil.addClass(e.shadowPane,t),s.DomUtil.addClass(e.popupPane,t))},_createPane:function(e,t){return s.DomUtil.create("div",e,t||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(e){e=e?s.Util.isArray(e)?e:[e]:[];for(var t=0,n=e.length;n>t;t++)this.addLayer(e[t])},_resetView:function(e,t,n,r){var i=this._zoom!==t;r||(this.fire("movestart"),i&&this.fire("zoomstart")),this._zoom=t,this._initialCenter=e,this._initialTopLeftPoint=this._getNewTopLeftPoint(e),n?this._initialTopLeftPoint._add(this._getMapPanePos()):s.DomUtil.setPosition(this._mapPane,new s.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var o=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!n}),o&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(i||r)&&this.fire("zoomend"),this.fire("moveend",{hard:!n})},_rawPanBy:function(e){s.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var e,t=1/0,n=-1/0,i=this._getZoomSpan();for(e in this._zoomBoundLayers){var s=this._zoomBoundLayers[e];isNaN(s.options.minZoom)||(t=Math.min(t,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}e===r?this._layersMaxZoom=this._layersMinZoom=r:(this._layersMaxZoom=n,this._layersMinZoom=t),i!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){if(s.DomEvent){t=t||"on",s.DomEvent[t](this._container,"click",this._onMouseClick,this);var n,r,i=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(n=0,r=i.length;r>n;n++)s.DomEvent[t](this._container,i[n],this._fireMouseEvent,this);this.options.trackResize&&s.DomEvent[t](e,"resize",this._onResize,this)}},_onResize:function(){s.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=s.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(e){!this._loaded||!e._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||s.DomEvent._skipped(e)||(this.fire("preclick"),this._fireMouseEvent(e))},_fireMouseEvent:function(e){if(this._loaded&&!s.DomEvent._skipped(e)){var t=e.type;if(t="mouseenter"===t?"mouseover":"mouseleave"===t?"mouseout":t,this.hasEventListeners(t)){"contextmenu"===t&&s.DomEvent.preventDefault(e);var n=this.mouseEventToContainerPoint(e),r=this.containerPointToLayerPoint(n),i=this.layerPointToLatLng(r);this.fire(t,{latlng:i,layerPoint:r,containerPoint:n,originalEvent:e})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var e=0,t=this._handlers.length;t>e;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,this):this.on("load",e,t),this},_layerAdd:function(e){e.onAdd(this),this.fire("layeradd",{layer:e})},_getMapPanePos:function(){return s.DomUtil.getPosition(this._mapPane)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._round()},_latLngToNewLayerPoint:function(e,t,n){var r=this._getNewTopLeftPoint(n,t).add(this._getMapPanePos());return this.project(e,t)._subtract(r)},_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 r=this.project(e,t),i=this.getSize().divideBy(2),o=new s.Bounds(r.subtract(i),r.add(i)),u=this._getBoundsOffset(o,n,t);return this.unproject(r.add(u),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),r=new s.Bounds(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(r,t))},_getBoundsOffset:function(e,t,n){var r=this.project(t.getNorthWest(),n).subtract(e.min),i=this.project(t.getSouthEast(),n).subtract(e.max),o=this._rebound(r.x,-i.x),u=this._rebound(r.y,-i.y);return new s.Point(o,u)},_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();return Math.max(t,Math.min(n,e))}}),s.map=function(e,t){return new s.Map(e,t)},s.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(e){var t=s.LatLng.DEG_TO_RAD,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,e.lat),-n),i=this.R_MAJOR,o=this.R_MINOR,u=e.lng*t*i,a=r*t,f=o/i,l=Math.sqrt(1-f*f),c=l*Math.sin(a);c=Math.pow((1-c)/(1+c),.5*l);var h=Math.tan(.5*(.5*Math.PI-a))/c;return a=-i*Math.log(h),new s.Point(u,a)},unproject:function(e){for(var t,n=s.LatLng.RAD_TO_DEG,r=this.R_MAJOR,i=this.R_MINOR,o=e.x*n/r,u=i/r,a=Math.sqrt(1-u*u),f=Math.exp(-e.y/r),l=Math.PI/2-2*Math.atan(f),c=15,h=1e-7,p=c,d=.1;Math.abs(d)>h&&--p>0;)t=a*Math.sin(l),d=Math.PI/2-2*Math.atan(f*Math.pow((1-t)/(1+t),.5*a))-l,l+=d;return new s.LatLng(l*n,o)}},s.CRS.EPSG3395=s.extend({},s.CRS,{code:"EPSG:3395",projection:s.Projection.Mercator,transformation:function(){var e=s.Projection.Mercator,t=e.R_MAJOR,n=.5/(Math.PI*t);return new s.Transformation(n,.5,-n,.5)}()}),s.TileLayer=s.Class.extend({includes:s.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:s.Browser.mobile,updateWhenIdle:s.Browser.mobile},initialize:function(e,t){t=s.setOptions(this,t),t.detectRetina&&s.Browser.retina&&t.maxZoom>0&&(t.tileSize=Math.floor(t.tileSize/2),t.zoomOffset++,t.minZoom>0&&t.minZoom--,this.options.maxZoom--),t.bounds&&(t.bounds=s.latLngBounds(t.bounds)),this._url=e;var n=this.options.subdomains;"string"==typeof n&&(this.options.subdomains=n.split(""))},onAdd:function(e){this._map=e,this._animated=e._zoomAnimated,this._initContainer(),e.on({viewreset:this._reset,moveend:this._update},this),this._animated&&e.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=s.Util.limitExecByInterval(this._update,150,this),e.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){this._container.parentNode.removeChild(this._container),e.off({viewreset:this._reset,moveend:this._update},this),this._animated&&e.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||e.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var e=this._map._panes.tilePane;return this._container&&(e.appendChild(this._container),this._setAutoZIndex(e,Math.max)),this},bringToBack:function(){var e=this._map._panes.tilePane;return this._container&&(e.insertBefore(this._container,e.firstChild),this._setAutoZIndex(e,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},setUrl:function(e,t){return this._url=e,t||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==r&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e,t){var n,r,i,s=e.children,o=-t(1/0,-1/0);for(r=0,i=s.length;i>r;r++)s[r]!==this._container&&(n=parseInt(s[r].style.zIndex,10),isNaN(n)||(o=t(o,n)));this.options.zIndex=this._container.style.zIndex=(isFinite(o)?o:0)+t(1,-1)},_updateOpacity:function(){var e,t=this._tiles;if(s.Browser.ielt9)for(e in t)s.DomUtil.setOpacity(t[e],this.options.opacity);else s.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var e=this._map._panes.tilePane;if(!this._container){if(this._container=s.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var t="leaflet-tile-container";this._bgBuffer=s.DomUtil.create("div",t,this._container),this._tileContainer=s.DomUtil.create("div",t,this._container)}else this._tileContainer=this._container;e.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(e){for(var t in this._tiles)this.fire("tileunload",{tile:this._tiles[t]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&e&&e.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var e=this._map,t=e.getZoom()+this.options.zoomOffset,n=this.options.maxNativeZoom,r=this.options.tileSize;return n&&t>n&&(r=Math.round(e.getZoomScale(t)/e.getZoomScale(n)*r)),r},_update:function(){if(this._map){var e=this._map,t=e.getPixelBounds(),n=e.getZoom(),r=this._getTileSize();if(!(n>this.options.maxZoom||nr;r++)this._addTile(o[r],f);this._tileContainer.appendChild(f)}},_tileShouldBeLoaded:function(e){if(e.x+":"+e.y in this._tiles)return!1;var t=this.options;if(!t.continuousWorld){var n=this._getWrapTileNum();if(t.noWrap&&(e.x<0||e.x>=n.x)||e.y<0||e.y>=n.y)return!1}if(t.bounds){var r=this._getTileSize(),i=e.multiplyBy(r),s=i.add([r,r]),o=this._map.unproject(i),u=this._map.unproject(s);if(t.continuousWorld||t.noWrap||(o=o.wrap(),u=u.wrap()),!t.bounds.intersects([o,u]))return!1}return!0},_removeOtherTiles:function(e){var t,n,r,i;for(i in this._tiles)t=i.split(":"),n=parseInt(t[0],10),r=parseInt(t[1],10),(ne.max.x||re.max.y)&&this._removeTile(i)},_removeTile:function(e){var t=this._tiles[e];this.fire("tileunload",{tile:t,url:t.src}),this.options.reuseTiles?(s.DomUtil.removeClass(t,"leaflet-tile-loaded"),this._unusedTiles.push(t)):t.parentNode===this._tileContainer&&this._tileContainer.removeChild(t),s.Browser.android||(t.onload=null,t.src=s.Util.emptyImageUrl),delete this._tiles[e]},_addTile:function(e,t){var n=this._getTilePos(e),r=this._getTile();s.DomUtil.setPosition(r,n,s.Browser.chrome),this._tiles[e.x+":"+e.y]=r,this._loadTile(r,e),r.parentNode!==this._tileContainer&&t.appendChild(r)},_getZoomForUrl:function(){var e=this.options,t=this._map.getZoom();return e.zoomReverse&&(t=e.maxZoom-t),t+=e.zoomOffset,e.maxNativeZoom?Math.min(t,e.maxNativeZoom):t},_getTilePos:function(e){var t=this._map.getPixelOrigin(),n=this._getTileSize();return e.multiplyBy(n).subtract(t)},getTileUrl:function(e){return s.Util.template(this._url,s.extend({s:this._getSubdomain(e),z:e.z,x:e.x,y:e.y},this.options))},_getWrapTileNum:function(){var e=this._map.options.crs,t=e.getSize(this._map.getZoom());return t.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(e){var t=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(e.x=(e.x%t.x+t.x)%t.x),this.options.tms&&(e.y=t.y-e.y-1),e.z=this._getZoomForUrl()},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var e=this._unusedTiles.pop();return this._resetTile(e),e}return this._createTile()},_resetTile:function(){},_createTile:function(){var e=s.DomUtil.create("img","leaflet-tile");return e.style.width=e.style.height=this._getTileSize()+"px",e.galleryimg="no",e.onselectstart=e.onmousemove=s.Util.falseFn,s.Browser.ielt9&&this.options.opacity!==r&&s.DomUtil.setOpacity(e,this.options.opacity),s.Browser.mobileWebkit3d&&(e.style.WebkitBackfaceVisibility="hidden"),e},_loadTile:function(e,t){e._layer=this,e.onload=this._tileOnLoad,e.onerror=this._tileOnError,this._adjustTilePoint(t),e.src=this.getTileUrl(t),this.fire("tileloadstart",{tile:e,url:e.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&s.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(s.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var e=this._layer;this.src!==s.Util.emptyImageUrl&&(s.DomUtil.addClass(this,"leaflet-tile-loaded"),e.fire("tileload",{tile:this,url:this.src})),e._tileLoaded()},_tileOnError:function(){var e=this._layer;e.fire("tileerror",{tile:this,url:this.src});var t=e.options.errorTileUrl;t&&(this.src=t),e._tileLoaded()}}),s.tileLayer=function(e,t){return new s.TileLayer(e,t)},s.TileLayer.WMS=s.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(e,t){this._url=e;var n=s.extend({},this.defaultWmsParams),r=t.tileSize||this.options.tileSize;t.detectRetina&&s.Browser.retina?n.width=n.height=2*r:n.width=n.height=r;for(var i in t)this.options.hasOwnProperty(i)||"crs"===i||(n[i]=t[i]);this.wmsParams=n,s.setOptions(this,t)},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,s.TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._map,n=this.options.tileSize,r=e.multiplyBy(n),i=r.add([n,n]),o=this._crs.project(t.unproject(r,e.z)),u=this._crs.project(t.unproject(i,e.z)),a=this._wmsVersion>=1.3&&this._crs===s.CRS.EPSG4326?[u.y,o.x,o.y,u.x].join(","):[o.x,u.y,u.x,o.y].join(","),f=s.Util.template(this._url,{s:this._getSubdomain(e)});return f+s.Util.getParamString(this.wmsParams,f,!0)+"&BBOX="+a},setParams:function(e,t){return s.extend(this.wmsParams,e),t||this.redraw(),this}}),s.tileLayer.wms=function(e,t){return new s.TileLayer.WMS(e,t)},s.TileLayer.Canvas=s.TileLayer.extend({options:{async:!1},initialize:function(e){s.setOptions(this,e)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var e in this._tiles)this._redrawTile(this._tiles[e]);return this},_redrawTile:function(e){this.drawTile(e,e._tilePoint,this._map._zoom)},_createTile:function(){var e=s.DomUtil.create("canvas","leaflet-tile");return e.width=e.height=this.options.tileSize,e.onselectstart=e.onmousemove=s.Util.falseFn,e},_loadTile:function(e,t){e._layer=this,e._tilePoint=t,this._redrawTile(e),this.options.async||this.tileDrawn(e)},drawTile:function(){},tileDrawn:function(e){this._tileOnLoad.call(e)}}),s.tileLayer.canvas=function(e){return new s.TileLayer.Canvas(e)},s.ImageOverlay=s.Class.extend({includes:s.Mixin.Events,options:{opacity:1},initialize:function(e,t,n){this._url=e,this._bounds=s.latLngBounds(t),s.setOptions(this,n)},onAdd:function(e){this._map=e,this._image||this._initImage(),e._panes.overlayPane.appendChild(this._image),e.on("viewreset",this._reset,this),e.options.zoomAnimation&&s.Browser.any3d&&e.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(e){e.getPanes().overlayPane.removeChild(this._image),e.off("viewreset",this._reset,this),e.options.zoomAnimation&&e.off("zoomanim",this._animateZoom,this)},addTo:function(e){return e.addLayer(this),this},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var e=this._map._panes.overlayPane;return this._image&&e.insertBefore(this._image,e.firstChild),this},setUrl:function(e){this._url=e,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=s.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&s.Browser.any3d?s.DomUtil.addClass(this._image,"leaflet-zoom-animated"):s.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),s.extend(this._image,{galleryimg:"no",onselectstart:s.Util.falseFn,onmousemove:s.Util.falseFn,onload:s.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(e){var t=this._map,n=this._image,r=t.getZoomScale(e.zoom),i=this._bounds.getNorthWest(),o=this._bounds.getSouthEast(),u=t._latLngToNewLayerPoint(i,e.zoom,e.center),a=t._latLngToNewLayerPoint(o,e.zoom,e.center)._subtract(u),f=u._add(a._multiplyBy(.5*(1-1/r)));n.style[s.DomUtil.TRANSFORM]=s.DomUtil.getTranslateString(f)+" scale("+r+") "},_reset:function(){var e=this._image,t=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),n=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(t);s.DomUtil.setPosition(e,t),e.style.width=n.x+"px",e.style.height=n.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){s.DomUtil.setOpacity(this._image,this.options.opacity)}}),s.imageOverlay=function(e,t,n){return new s.ImageOverlay(e,t,n)},s.Icon=s.Class.extend({options:{className:""},initialize:function(e){s.setOptions(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 r;return r=t&&"IMG"===t.tagName?this._createImg(n,t):this._createImg(n),this._setIconStyles(r,e),r},_setIconStyles:function(e,t){var n,r=this.options,i=s.point(r[t+"Size"]);n="shadow"===t?s.point(r.shadowAnchor||r.iconAnchor):s.point(r.iconAnchor),!n&&i&&(n=i.divideBy(2,!0)),e.className="leaflet-marker-"+t+" "+r.className,n&&(e.style.marginLeft=-n.x+"px",e.style.marginTop=-n.y+"px"),i&&(e.style.width=i.x+"px",e.style.height=i.y+"px")},_createImg:function(e,n){return n=n||t.createElement("img"),n.src=e,n},_getIconUrl:function(e){return s.Browser.retina&&this.options[e+"RetinaUrl"]?this.options[e+"RetinaUrl"]:this.options[e+"Url"]}}),s.icon=function(e){return new s.Icon(e)},s.Icon.Default=s.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(e){var t=e+"Url";if(this.options[t])return this.options[t];s.Browser.retina&&"icon"===e&&(e+="-2x");var n=s.Icon.Default.imagePath;if(!n)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return n+"/marker-"+e+".png"}}),s.Icon.Default.imagePath=function(){var e,n,r,i,s,o=t.getElementsByTagName("script"),u=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(e=0,n=o.length;n>e;e++)if(r=o[e].src,i=r.match(u))return s=r.split(u)[0],(s?s+"/":"")+"images"}(),s.Marker=s.Class.extend({includes:s.Mixin.Events,options:{icon:new s.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(e,t){s.setOptions(this,t),this._latlng=s.latLng(e)},onAdd:function(e){this._map=e,e.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),e.options.zoomAnimation&&e.options.markerZoomAnimation&&e.on("zoomanim",this._animateZoom,this)},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),e.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=s.latLng(e),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update(),this},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){return this._icon&&this._setPos(this._map.latLngToLayerPoint(this._latlng).round()),this},_initIcon:function(){var e=this.options,t=this._map,n=t.options.zoomAnimation&&t.options.markerZoomAnimation,r=n?"leaflet-zoom-animated":"leaflet-zoom-hide",i=e.icon.createIcon(this._icon),o=!1;i!==this._icon&&(this._icon&&this._removeIcon(),o=!0,e.title&&(i.title=e.title),e.alt&&(i.alt=e.alt)),s.DomUtil.addClass(i,r),e.keyboard&&(i.tabIndex="0"),this._icon=i,this._initInteraction(),e.riseOnHover&&s.DomEvent.on(i,"mouseover",this._bringToFront,this).on(i,"mouseout",this._resetZIndex,this);var u=e.icon.createShadow(this._shadow),a=!1;u!==this._shadow&&(this._removeShadow(),a=!0),u&&s.DomUtil.addClass(u,r),this._shadow=u,e.opacity<1&&this._updateOpacity();var f=this._map._panes;o&&f.markerPane.appendChild(this._icon),u&&a&&f.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&s.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(e){s.DomUtil.setPosition(this._icon,e),this._shadow&&s.DomUtil.setPosition(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.clickable){var e=this._icon,t=["dblclick","mousedown","mouseover","mouseout","contextmenu"];s.DomUtil.addClass(e,"leaflet-clickable"),s.DomEvent.on(e,"click",this._onMouseClick,this),s.DomEvent.on(e,"keypress",this._onKeyPress,this);for(var n=0;ni?(t.height=i+"px",s.DomUtil.addClass(e,o)):s.DomUtil.removeClass(e,o),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=this._animated,n=s.point(this.options.offset);t&&s.DomUtil.setPosition(this._container,e),this._containerBottom=-n.y-(t?0:e.y),this._containerLeft=-Math.round(this._containerWidth/2)+n.x+(t?0:e.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);s.DomUtil.setPosition(this._container,t)},_adjustPan:function(){if(this.options.autoPan){var e=this._map,t=this._container.offsetHeight,n=this._containerWidth,r=new s.Point(this._containerLeft,-t-this._containerBottom);this._animated&&r._add(s.DomUtil.getPosition(this._container));var i=e.layerPointToContainerPoint(r),o=s.point(this.options.autoPanPadding),u=s.point(this.options.autoPanPaddingTopLeft||o),a=s.point(this.options.autoPanPaddingBottomRight||o),f=e.getSize(),l=0,c=0;i.x+n+a.x>f.x&&(l=i.x+n-f.x+a.x),i.x-l-u.x<0&&(l=i.x-u.x),i.y+t+a.y>f.y&&(c=i.y+t-f.y+a.y),i.y-c-u.y<0&&(c=i.y-u.y),(l||c)&&e.fire("autopanstart").panBy([l,c])}},_onCloseButtonClick:function(e){this._close(),s.DomEvent.stop(e)}}),s.popup=function(e,t){return new s.Popup(e,t)},s.Map.include({openPopup:function(e,t,n){if(this.closePopup(),!(e instanceof s.Popup)){var r=e;e=(new s.Popup(n)).setLatLng(t).setContent(r)}return e._isOpen=!0,this._popup=e,this.addLayer(e)},closePopup:function(e){return e&&e!==this._popup||(e=this._popup,this._popup=null),e&&(this.removeLayer(e),e._isOpen=!1),this}}),s.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(e,t){var n=s.point(this.options.icon.options.popupAnchor||[0,0]);return n=n.add(s.Popup.prototype.options.offset),t&&t.offset&&(n=n.add(t.offset)),t=s.extend({offset:n},t),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),e instanceof s.Popup?(s.setOptions(e,t),this._popup=e,e._source=this):this._popup=(new s.Popup(t,this)).setContent(e),this},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(e){this._popup.setLatLng(e.latlng)}}),s.LayerGroup=s.Class.extend({initialize:function(e){this._layers={};var t,n;if(e)for(t=0,n=e.length;n>t;t++)this.addLayer(e[t])},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:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(e){var t,n,r=Array.prototype.slice.call(arguments,1);for(t in this._layers)n=this._layers[t],n[e]&&n[e].apply(n,r);return this},onAdd:function(e){this._map=e,this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e),this._map=null},addTo:function(e){return e.addLayer(this),this},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=[];for(var t in this._layers)e.push(this._layers[t]);return e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return s.stamp(e)}}),s.layerGroup=function(e){return new s.LayerGroup(e)},s.FeatureGroup=s.LayerGroup.extend({includes:s.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(e){return this.hasLayer(e)?this:("on"in e&&e.on(s.FeatureGroup.EVENTS,this._propagateEvent,this),s.LayerGroup.prototype.addLayer.call(this,e),this._popupContent&&e.bindPopup&&e.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),"off"in e&&e.off(s.FeatureGroup.EVENTS,this._propagateEvent,this),s.LayerGroup.prototype.removeLayer.call(this,e),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:e})):this},bindPopup:function(e,t){return this._popupContent=e,this._popupOptions=t,this.invoke("bindPopup",e,t)},openPopup:function(e){for(var t in this._layers){this._layers[t].openPopup(e);break}return 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 s.LatLngBounds;return this.eachLayer(function(t){e.extend(t instanceof s.Marker?t.getLatLng():t.getBounds())}),e},_propagateEvent:function(e){e=s.extend({layer:e.target,target:this},e),this.fire(e.type,e)}}),s.featureGroup=function(e){return new s.FeatureGroup(e)},s.Path=s.Class.extend({includes:[s.Mixin.Events],statics:{CLIP_PADDING:function(){var t=s.Browser.mobile?1280:2e3,n=(t/Math.max(e.outerWidth,e.outerHeight)-1)/2;return Math.max(0,Math.min(.5,n))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(e){s.setOptions(this,e)},onAdd:function(e){this._map=e,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),e.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){e._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,s.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),e.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(e){return s.setOptions(this,e),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),s.Map.include({_updatePathViewport:function(){var e=s.Path.CLIP_PADDING,t=this.getSize(),n=s.DomUtil.getPosition(this._mapPane),r=n.multiplyBy(-1)._subtract(t.multiplyBy(e)._round()),i=r.add(t.multiplyBy(1+2*e)._round());this._pathViewport=new s.Bounds(r,i)}}),s.Path.SVG_NS="http://www.w3.org/2000/svg",s.Browser.svg=!!t.createElementNS&&!!t.createElementNS(s.Path.SVG_NS,"svg").createSVGRect,s.Path=s.Path.extend({statics:{SVG:s.Browser.svg},bringToFront:function(){var e=this._map._pathRoot,t=this._container;return t&&e.lastChild!==t&&e.appendChild(t),this},bringToBack:function(){var e=this._map._pathRoot,t=this._container,n=e.firstChild;return t&&n!==t&&e.insertBefore(t,n),this},getPathString:function(){},_createElement:function(e){return t.createElementNS(s.Path.SVG_NS,e)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&s.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var e=this.getPathString();e||(e="M0 0"),this._path.setAttribute("d",e)},_initEvents:function(){if(this.options.clickable){(s.Browser.svg||!s.Browser.vml)&&s.DomUtil.addClass(this._path,"leaflet-clickable"),s.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var e=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],t=0;t';var n=e.firstChild;return n.style.behavior="url(#default#VML)",n&&"object"==typeof n.adj}catch(r){return!1}}(),s.Path=s.Browser.svg||!s.Browser.vml?s.Path:s.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return t.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return t.createElement("')}}catch(e){return function(e){return t.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var e=this._container=this._createElement("shape");s.DomUtil.addClass(e,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&s.DomUtil.addClass(e,"leaflet-clickable"),e.coordsize="1 1",this._path=this._createElement("path"),e.appendChild(this._path),this._map._pathRoot.appendChild(e)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var e=this._stroke,t=this._fill,n=this.options,r=this._container;r.stroked=n.stroke,r.filled=n.fill,n.stroke?(e||(e=this._stroke=this._createElement("stroke"),e.endcap="round",r.appendChild(e)),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=s.Util.isArray(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",n.lineCap&&(e.endcap=n.lineCap.replace("butt","flat")),n.lineJoin&&(e.joinstyle=n.lineJoin)):e&&(r.removeChild(e),this._stroke=null),n.fill?(t||(t=this._fill=this._createElement("fill"),r.appendChild(t)),t.color=n.fillColor||n.color,t.opacity=n.fillOpacity):t&&(r.removeChild(t),this._fill=null)},_updatePath:function(){var e=this._container.style;e.display="none",this._path.v=this.getPathString()+" ",e.display=""}}),s.Map.include(s.Browser.svg||!s.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var e=this._pathRoot=t.createElement("div");e.className="leaflet-vml-container",this._panes.overlayPane.appendChild(e),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),s.Browser.canvas=function(){return!!t.createElement("canvas").getContext}(),s.Path=s.Path.SVG&&!e.L_PREFER_CANVAS||!s.Browser.canvas?s.Path:s.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(e){return s.setOptions(this,e),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(e){e.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!s.Path._updateRequest&&(s.Path._updateRequest=s.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){s.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var e=this.options;e.stroke&&(this._ctx.lineWidth=e.weight,this._ctx.strokeStyle=e.color),e.fill&&(this._ctx.fillStyle=e.fillColor||e.color),e.lineCap&&(this._ctx.lineCap=e.lineCap),e.lineJoin&&(this._ctx.lineJoin=e.lineJoin)},_drawPath:function(){var e,t,n,r,i,o;for(this._ctx.beginPath(),e=0,n=this._parts.length;n>e;e++){for(t=0,r=this._parts[e].length;r>t;t++)i=this._parts[e][t],o=(0===t?"move":"line")+"To",this._ctx[o](i.x,i.y);this instanceof s.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var e=this._ctx,t=this.options;this._drawPath(),e.save(),this._updateStyle(),t.fill&&(e.globalAlpha=t.fillOpacity,e.fill(t.fillRule||"evenodd")),t.stroke&&(e.globalAlpha=t.opacity,e.stroke()),e.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click dblclick contextmenu",this._fireMouseEvent,this))},_fireMouseEvent:function(e){this._containsPoint(e.layerPoint)&&this.fire(e.type,e)},_onMouseMove:function(e){this._map&&!this._map._animatingZoom&&(this._containsPoint(e.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",e)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",e)))}}),s.Map.include(s.Path.SVG&&!e.L_PREFER_CANVAS||!s.Browser.canvas?{}:{_initPathRoot:function(){var e,n=this._pathRoot;n||(n=this._pathRoot=t.createElement("canvas"),n.style.position="absolute",e=this._canvasCtx=n.getContext("2d"),e.lineCap="round",e.lineJoin="round",this._panes.overlayPane.appendChild(n),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var e=this._pathViewport,t=e.min,n=e.max.subtract(t),r=this._pathRoot;s.DomUtil.setPosition(r,t),r.width=n.x,r.height=n.y,r.getContext("2d").translate(-t.x,-t.y)}}}),s.LineUtil={simplify:function(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=this._reducePoints(e,n),e=this._simplifyDP(e,n)},pointToSegmentDistance:function(e,t,n){return Math.sqrt(this._sqClosestPointOnSegment(e,t,n,!0))},closestPointOnSegment:function(e,t,n){return this._sqClosestPointOnSegment(e,t,n)},_simplifyDP:function(e,t){var n=e.length,i=typeof Uint8Array!=r+""?Uint8Array:Array,s=new i(n);s[0]=s[n-1]=1,this._simplifyDPStep(e,s,t,0,n-1);var o,u=[];for(o=0;n>o;o++)s[o]&&u.push(e[o]);return u},_simplifyDPStep:function(e,t,n,r,i){var s,o,u,a=0;for(o=r+1;i-1>=o;o++)u=this._sqClosestPointOnSegment(e[o],e[r],e[i],!0),u>a&&(s=o,a=u);a>n&&(t[s]=1,this._simplifyDPStep(e,t,n,r,s),this._simplifyDPStep(e,t,n,s,i))},_reducePoints:function(e,t){for(var n=[e[0]],r=1,i=0,s=e.length;s>r;r++)this._sqDist(e[r],e[i])>t&&(n.push(e[r]),i=r);return s-1>i&&n.push(e[s-1]),n},clipSegment:function(e,t,n,r){var i,s,o,u=r?this._lastCode:this._getBitCode(e,n),a=this._getBitCode(t,n);for(this._lastCode=a;;){if(!(u|a))return[e,t];if(u&a)return!1;i=u||a,s=this._getEdgeIntersection(e,t,i,n),o=this._getBitCode(s,n),i===u?(e=s,u=o):(t=s,a=o)}},_getEdgeIntersection:function(e,t,n,r){var i=t.x-e.x,o=t.y-e.y,u=r.min,a=r.max;return 8&n?new s.Point(e.x+i*(a.y-e.y)/o,a.y):4&n?new s.Point(e.x+i*(u.y-e.y)/o,u.y):2&n?new s.Point(a.x,e.y+o*(a.x-e.x)/i):1&n?new s.Point(u.x,e.y+o*(u.x-e.x)/i):void 0},_getBitCode:function(e,t){var n=0;return e.xt.max.x&&(n|=2),e.yt.max.y&&(n|=8),n},_sqDist:function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},_sqClosestPointOnSegment:function(e,t,n,r){var i,o=t.x,u=t.y,a=n.x-o,f=n.y-u,l=a*a+f*f;return l>0&&(i=((e.x-o)*a+(e.y-u)*f)/l,i>1?(o=n.x,u=n.y):i>0&&(o+=a*i,u+=f*i)),a=e.x-o,f=e.y-u,r?a*a+f*f:new s.Point(o,u)}},s.Polyline=s.Path.extend({initialize:function(e,t){s.Path.prototype.initialize.call(this,t),this._latlngs=this._convertLatLngs(e)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var e=0,t=this._latlngs.length;t>e;e++)this._originalPoints[e]=this._map.latLngToLayerPoint(this._latlngs[e])},getPathString:function(){for(var e=0,t=this._parts.length,n="";t>e;e++)n+=this._getPathPartStr(this._parts[e]);return n},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._latlngs=this._convertLatLngs(e),this.redraw()},addLatLng:function(e){return this._latlngs.push(s.latLng(e)),this.redraw()},spliceLatLngs:function(){var e=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),e},closestLayerPoint:function(e){for(var t,n,r=1/0,i=this._parts,o=null,u=0,a=i.length;a>u;u++)for(var f=i[u],l=1,c=f.length;c>l;l++){t=f[l-1],n=f[l];var h=s.LineUtil._sqClosestPointOnSegment(e,t,n,!0);r>h&&(r=h,o=s.LineUtil._sqClosestPointOnSegment(e,t,n))}return o&&(o.distance=Math.sqrt(r)),o},getBounds:function(){return new s.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(e,t){var n,r,i=t?e:[];for(n=0,r=e.length;r>n;n++){if(s.Util.isArray(e[n])&&"number"!=typeof e[n][0])return;i[n]=s.latLng(e[n])}return i},_initEvents:function(){s.Path.prototype._initEvents.call(this)},_getPathPartStr:function(e){for(var t,n=s.Path.VML,r=0,i=e.length,o="";i>r;r++)t=e[r],n&&t._round(),o+=(r?"L":"M")+t.x+" "+t.y;return o},_clipPoints:function(){var e,t,n,r=this._originalPoints,i=r.length;if(this.options.noClip)return void (this._parts=[r]);this._parts=[];var o=this._parts,u=this._map._pathViewport,a=s.LineUtil;for(e=0,t=0;i-1>e;e++)n=a.clipSegment(r[e],r[e+1],u,e),n&&(o[t]=o[t]||[],o[t].push(n[0]),(n[1]!==r[e+1]||e===i-2)&&(o[t].push(n[1]),t++))},_simplifyPoints:function(){for(var e=this._parts,t=s.LineUtil,n=0,r=e.length;r>n;n++)e[n]=t.simplify(e[n],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),s.Path.prototype._updatePath.call(this))}}),s.polyline=function(e,t){return new s.Polyline(e,t)},s.PolyUtil={},s.PolyUtil.clipPolygon=function(e,t){var n,r,i,o,u,a,f,l,c,h=[1,4,2,8],p=s.LineUtil;for(r=0,f=e.length;f>r;r++)e[r]._code=p._getBitCode(e[r],t);for(o=0;4>o;o++){for(l=h[o],n=[],r=0,f=e.length,i=f-1;f>r;i=r++)u=e[r],a=e[i],u._code&l?a._code&l||(c=p._getEdgeIntersection(a,u,l,t),c._code=p._getBitCode(c,t),n.push(c)):(a._code&l&&(c=p._getEdgeIntersection(a,u,l,t),c._code=p._getBitCode(c,t),n.push(c)),n.push(u));e=n}return e},s.Polygon=s.Polyline.extend({options:{fill:!0},initialize:function(e,t){s.Polyline.prototype.initialize.call(this,e,t),this._initWithHoles(e)},_initWithHoles:function(e){var t,n,r;if(e&&s.Util.isArray(e[0])&&"number"!=typeof e[0][0])for(this._latlngs=this._convertLatLngs(e[0]),this._holes=e.slice(1),t=0,n=this._holes.length;n>t;t++)r=this._holes[t]=this._convertLatLngs(this._holes[t]),r[0].equals(r[r.length-1])&&r.pop();e=this._latlngs,e.length>=2&&e[0].equals(e[e.length-1])&&e.pop()},projectLatlngs:function(){if(s.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var e,t,n,r;for(e=0,n=this._holes.length;n>e;e++)for(this._holePoints[e]=[],t=0,r=this._holes[e].length;r>t;t++)this._holePoints[e][t]=this._map.latLngToLayerPoint(this._holes[e][t])}},setLatLngs:function(e){return e&&s.Util.isArray(e[0])&&"number"!=typeof e[0][0]?(this._initWithHoles(e),this.redraw()):s.Polyline.prototype.setLatLngs.call(this,e)},_clipPoints:function(){var e=this._originalPoints,t=[];if(this._parts=[e].concat(this._holePoints),!this.options.noClip){for(var n=0,r=this._parts.length;r>n;n++){var i=s.PolyUtil.clipPolygon(this._parts[n],this._map._pathViewport);i.length&&t.push(i)}this._parts=t}},_getPathPartStr:function(e){var t=s.Polyline.prototype._getPathPartStr.call(this,e);return t+(s.Browser.svg?"z":"x")}}),s.polygon=function(e,t){return new s.Polygon(e,t)},function(){function e(e){return s.FeatureGroup.extend({initialize:function(e,t){this._layers={},this._options=t,this.setLatLngs(e)},setLatLngs:function(t){var n=0,r=t.length;for(this.eachLayer(function(e){r>n?e.setLatLngs(t[n++]):this.removeLayer(e)},this);r>n;)this.addLayer(new e(t[n++],this._options));return this},getLatLngs:function(){var e=[];return this.eachLayer(function(t){e.push(t.getLatLngs())}),e}})}s.MultiPolyline=e(s.Polyline),s.MultiPolygon=e(s.Polygon),s.multiPolyline=function(e,t){return new s.MultiPolyline(e,t)},s.multiPolygon=function(e,t){return new s.MultiPolygon(e,t)}}(),s.Rectangle=s.Polygon.extend({initialize:function(e,t){s.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=s.latLngBounds(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}}),s.rectangle=function(e,t){return new s.Rectangle(e,t)},s.Circle=s.Path.extend({initialize:function(e,t,n){s.Path.prototype.initialize.call(this,n),this._latlng=s.latLng(e),this._mRadius=t},options:{fill:!0},setLatLng:function(e){return this._latlng=s.latLng(e),this.redraw()},setRadius:function(e){return this._mRadius=e,this.redraw()},projectLatlngs:function(){var e=this._getLngRadius(),t=this._latlng,n=this._map.latLngToLayerPoint([t.lat,t.lng-e]);this._point=this._map.latLngToLayerPoint(t),this._radius=Math.max(this._point.x-n.x,1)},getBounds:function(){var e=this._getLngRadius(),t=this._mRadius/40075017*360,n=this._latlng;return new s.LatLngBounds([n.lat-t,n.lng-e],[n.lat+t,n.lng+e])},getLatLng:function(){return this._latlng},getPathString:function(){var e=this._point,t=this._radius;return this._checkIfEmpty()?"":s.Browser.svg?"M"+e.x+","+(e.y-t)+"A"+t+","+t+",0,1,1,"+(e.x-.1)+","+(e.y-t)+" z":(e._round(),t=Math.round(t),"AL "+e.x+","+e.y+" "+t+","+t+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(s.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var e=this._map._pathViewport,t=this._radius,n=this._point;return n.x-t>e.max.x||n.y-t>e.max.y||n.x+tn;n++)for(f=this._parts[n],r=0,u=f.length,i=u-1;u>r;i=r++)if((t||0!==r)&&(a=s.LineUtil.pointToSegmentDistance(e,f[i],f[r]),l>=a))return!0;return!1}}:{}),s.Polygon.include(s.Path.CANVAS?{_containsPoint:function(e){var t,n,r,i,o,u,a,f,l=!1;if(s.Polyline.prototype._containsPoint.call(this,e,!0))return!0;for(i=0,a=this._parts.length;a>i;i++)for(t=this._parts[i],o=0,f=t.length,u=f-1;f>o;u=o++)n=t[o],r=t[u],n.y>e.y!=r.y>e.y&&e.x<(r.x-n.x)*(e.y-n.y)/(r.y-n.y)+n.x&&(l=!l);return l}}:{}),s.Circle.include(s.Path.CANVAS?{_drawPath:function(){var e=this._point;this._ctx.beginPath(),this._ctx.arc(e.x,e.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(e){var t=this._point,n=this.options.stroke?this.options.weight/2:0;return e.distanceTo(t)<=this._radius+n}}:{}),s.CircleMarker.include(s.Path.CANVAS?{_updateStyle:function(){s.Path.prototype._updateStyle.call(this)}}:{}),s.GeoJSON=s.FeatureGroup.extend({initialize:function(e,t){s.setOptions(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,r,i=s.Util.isArray(e)?e:e.features;if(i){for(t=0,n=i.length;n>t;t++)r=i[t],(r.geometries||r.geometry||r.features||r.coordinates)&&this.addData(i[t]);return this}var o=this.options;if(!o.filter||o.filter(e)){var u=s.GeoJSON.geometryToLayer(e,o.pointToLayer,o.coordsToLatLng,o);return u.feature=s.GeoJSON.asFeature(e),u.defaultOptions=u.options,this.resetStyle(u),o.onEachFeature&&o.onEachFeature(e,u),this.addLayer(u)}},resetStyle:function(e){var t=this.options.style;t&&(s.Util.extend(e.options,e.defaultOptions),this._setLayerStyle(e,t))},setStyle:function(e){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)}}),s.extend(s.GeoJSON,{geometryToLayer:function(e,t,n,r){var i,o,u,a,f="Feature"===e.type?e.geometry:e,l=f.coordinates,c=[];switch(n=n||this.coordsToLatLng,f.type){case"Point":return i=n(l),t?t(e,i):new s.Marker(i);case"MultiPoint":for(u=0,a=l.length;a>u;u++)i=n(l[u]),c.push(t?t(e,i):new s.Marker(i));return new s.FeatureGroup(c);case"LineString":return o=this.coordsToLatLngs(l,0,n),new s.Polyline(o,r);case"Polygon":if(2===l.length&&!l[1].length)throw new Error("Invalid GeoJSON object.");return o=this.coordsToLatLngs(l,1,n),new s.Polygon(o,r);case"MultiLineString":return o=this.coordsToLatLngs(l,1,n),new s.MultiPolyline(o,r);case"MultiPolygon":return o=this.coordsToLatLngs(l,2,n),new s.MultiPolygon(o,r);case"GeometryCollection":for(u=0,a=f.geometries.length;a>u;u++)c.push(this.geometryToLayer({geometry:f.geometries[u],type:"Feature",properties:e.properties},t,n,r));return new s.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(e){return new s.LatLng(e[1],e[0],e[2])},coordsToLatLngs:function(e,t,n){var r,i,s,o=[];for(i=0,s=e.length;s>i;i++)r=t?this.coordsToLatLngs(e[i],t-1,n):(n||this.coordsToLatLng)(e[i]),o.push(r);return o},latLngToCoords:function(e){var t=[e.lng,e.lat];return e.alt!==r&&t.push(e.alt),t},latLngsToCoords:function(e){for(var t=[],n=0,r=e.length;r>n;n++)t.push(s.GeoJSON.latLngToCoords(e[n]));return t},getFeature:function(e,t){return e.feature?s.extend({},e.feature,{geometry:t}):s.GeoJSON.asFeature(t)},asFeature:function(e){return"Feature"===e.type?e:{type:"Feature",properties:{},geometry:e}}});var u={toGeoJSON:function(){return s.GeoJSON.getFeature(this,{type:"Point",coordinates:s.GeoJSON.latLngToCoords(this.getLatLng())})}};s.Marker.include(u),s.Circle.include(u),s.CircleMarker.include(u),s.Polyline.include({toGeoJSON:function(){return s.GeoJSON.getFeature(this,{type:"LineString",coordinates:s.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),s.Polygon.include({toGeoJSON:function(){var e,t,n,r=[s.GeoJSON.latLngsToCoords(this.getLatLngs())];if(r[0].push(r[0][0]),this._holes)for(e=0,t=this._holes.length;t>e;e++)n=s.GeoJSON.latLngsToCoords(this._holes[e]),n.push(n[0]),r.push(n);return s.GeoJSON.getFeature(this,{type:"Polygon",coordinates:r})}}),function(){function e(e){return function(){var t=[];return this.eachLayer(function(e){t.push(e.toGeoJSON().geometry.coordinates)}),s.GeoJSON.getFeature(this,{type:e,coordinates:t})}}s.MultiPolyline.include({toGeoJSON:e("MultiLineString")}),s.MultiPolygon.include({toGeoJSON:e("MultiPolygon")}),s.LayerGroup.include({toGeoJSON:function(){var t,n=this.feature&&this.feature.geometry,r=[];if(n&&"MultiPoint"===n.type)return e("MultiPoint").call(this);var i=n&&"GeometryCollection"===n.type;return this.eachLayer(function(e){e.toGeoJSON&&(t=e.toGeoJSON(),r.push(i?t.geometry:s.GeoJSON.asFeature(t)))}),i?s.GeoJSON.getFeature(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}})}(),s.geoJson=function(e,t){return new s.GeoJSON(e,t)},s.DomEvent={addListener:function(e,t,n,r){var i,o,u,a=s.stamp(n),f="_leaflet_"+t+a;return e[f]?this:(i=function(t){return n.call(r||e,t||s.DomEvent._getEvent())},s.Browser.pointer&&0===t.indexOf("touch")?this.addPointerListener(e,t,i,a):(s.Browser.touch&&"dblclick"===t&&this.addDoubleTapListener&&this.addDoubleTapListener(e,i,a),"addEventListener"in e?"mousewheel"===t?(e.addEventListener("DOMMouseScroll",i,!1),e.addEventListener(t,i,!1)):"mouseenter"===t||"mouseleave"===t?(o=i,u="mouseenter"===t?"mouseover":"mouseout",i=function(t){return s.DomEvent._checkMouse(e,t)?o(t):void 0},e.addEventListener(u,i,!1)):"click"===t&&s.Browser.android?(o=i,i=function(e){return s.DomEvent._filterClick(e,o)},e.addEventListener(t,i,!1)):e.addEventListener(t,i,!1):"attachEvent"in e&&e.attachEvent("on"+t,i),e[f]=i,this))},removeListener:function(e,t,n){var r=s.stamp(n),i="_leaflet_"+t+r,o=e[i];return o?(s.Browser.pointer&&0===t.indexOf("touch")?this.removePointerListener(e,t,r):s.Browser.touch&&"dblclick"===t&&this.removeDoubleTapListener?this.removeDoubleTapListener(e,r):"removeEventListener"in e?"mousewheel"===t?(e.removeEventListener("DOMMouseScroll",o,!1),e.removeEventListener(t,o,!1)):"mouseenter"===t||"mouseleave"===t?e.removeEventListener("mouseenter"===t?"mouseover":"mouseout",o,!1):e.removeEventListener(t,o,!1):"detachEvent"in e&&e.detachEvent("on"+t,o),e[i]=null,this):this},stopPropagation:function(e){return e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,s.DomEvent._skipped(e),this},disableScrollPropagation:function(e){var t=s.DomEvent.stopPropagation;return s.DomEvent.on(e,"mousewheel",t).on(e,"MozMousePixelScroll",t)},disableClickPropagation:function(e){for(var t=s.DomEvent.stopPropagation,n=s.Draggable.START.length-1;n>=0;n--)s.DomEvent.on(e,s.Draggable.START[n],t);return s.DomEvent.on(e,"click",s.DomEvent._fakeStop).on(e,"dblclick",t)},preventDefault:function(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this},stop:function(e){return s.DomEvent.preventDefault(e).stopPropagation(e)},getMousePosition:function(e,t){if(!t)return new s.Point(e.clientX,e.clientY);var n=t.getBoundingClientRect();return new s.Point(e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop)},getWheelDelta:function(e){var t=0;return e.wheelDelta&&(t=e.wheelDelta/120),e.detail&&(t=-e.detail/3),t},_skipEvents:{},_fakeStop:function(e){s.DomEvent._skipEvents[e.type]=!0},_skipped:function(e){var t=this._skipEvents[e.type];return this._skipEvents[e.type]=!1,t},_checkMouse:function(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(r){return!1}return n!==e},_getEvent:function(){var t=e.event;if(!t)for(var n=arguments.callee.caller;n&&(t=n.arguments[0],!t||e.Event!==t.constructor);)n=n.caller;return t},_filterClick:function(e,t){var n=e.timeStamp||e.originalEvent.timeStamp,r=s.DomEvent._lastClick&&n-s.DomEvent._lastClick;return r&&r>100&&500>r||e.target._simulatedClick&&!e._simulated?void s.DomEvent.stop(e):(s.DomEvent._lastClick=n,t(e))}},s.DomEvent.on=s.DomEvent.addListener,s.DomEvent.off=s.DomEvent.removeListener,s.Draggable=s.Class.extend({includes:s.Mixin.Events,statics:{START:s.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(e,t){this._element=e,this._dragStartTarget=t||e},enable:function(){if(!this._enabled){for(var e=s.Draggable.START.length-1;e>=0;e--)s.DomEvent.on(this._dragStartTarget,s.Draggable.START[e],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var e=s.Draggable.START.length-1;e>=0;e--)s.DomEvent.off(this._dragStartTarget,s.Draggable.START[e],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(e){if(this._moved=!1,!e.shiftKey&&(1===e.which||1===e.button||e.touches)&&(s.DomEvent.stopPropagation(e),!s.Draggable._disabled&&(s.DomUtil.disableImageDrag(),s.DomUtil.disableTextSelection(),!this._moving))){var n=e.touches?e.touches[0]:e;this._startPoint=new s.Point(n.clientX,n.clientY),this._startPos=this._newPos=s.DomUtil.getPosition(this._element),s.DomEvent.on(t,s.Draggable.MOVE[e.type],this._onMove,this).on(t,s.Draggable.END[e.type],this._onUp,this)}},_onMove:function(e){if(e.touches&&e.touches.length>1)return void (this._moved=!0);var n=e.touches&&1===e.touches.length?e.touches[0]:e,r=new s.Point(n.clientX,n.clientY),i=r.subtract(this._startPoint);(i.x||i.y)&&(s.Browser.touch&&Math.abs(i.x)+Math.abs(i.y)<3||(s.DomEvent.preventDefault(e),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=s.DomUtil.getPosition(this._element).subtract(i),s.DomUtil.addClass(t.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,s.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,s.Util.cancelAnimFrame(this._animRequest),this._animRequest=s.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag"),s.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){s.DomUtil.removeClass(t.body,"leaflet-dragging"),this._lastTarget&&(s.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var e in s.Draggable.MOVE)s.DomEvent.off(t,s.Draggable.MOVE[e],this._onMove).off(t,s.Draggable.END[e],this._onUp);s.DomUtil.enableImageDrag(),s.DomUtil.enableTextSelection(),this._moved&&this._moving&&(s.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),s.Handler=s.Class.extend({initialize:function(e){this._map=e},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),s.Map.mergeOptions({dragging:!0,inertia:!s.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:s.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),s.Map.Drag=s.Handler.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new s.Draggable(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),e.on("viewreset",this._onViewReset,this),e.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var e=this._map;e._panAnim&&e._panAnim.stop(),e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var e=this._lastTime=+(new Date),t=this._lastPos=this._draggable._newPos;this._positions.push(t),this._times.push(e),e-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var e=this._map.getSize()._divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-t+n)%e+t-n,s=(r+t+n)%e-t-n,o=Math.abs(i+n)n.inertiaThreshold||!this._positions[0];if(t.fire("dragend",e),i)t.fire("moveend");else{var o=this._lastPos.subtract(this._positions[0]),u=(this._lastTime+r-this._times[0])/1e3,a=n.easeLinearity,f=o.multiplyBy(a/u),l=f.distanceTo([0,0]),c=Math.min(n.inertiaMaxSpeed,l),h=f.multiplyBy(c/l),p=c/(n.inertiaDeceleration*a),d=h.multiplyBy(-p/2).round();d.x&&d.y?(d=t._limitOffset(d,t.options.maxBounds),s.Util.requestAnimFrame(function(){t.panBy(d,{duration:p,easeLinearity:a,noMoveStart:!0})})):t.fire("moveend")}}}),s.Map.addInitHook("addHandler","dragging",s.Map.Drag),s.Map.mergeOptions({doubleClickZoom:!0}),s.Map.DoubleClickZoom=s.Handler.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()+(e.originalEvent.shiftKey?-1:1);"center"===t.options.doubleClickZoom?t.setZoom(n):t.setZoomAround(e.containerPoint,n)}}),s.Map.addInitHook("addHandler","doubleClickZoom",s.Map.DoubleClickZoom),s.Map.mergeOptions({scrollWheelZoom:!0}),s.Map.ScrollWheelZoom=s.Handler.extend({addHooks:function(){s.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),s.DomEvent.on(this._map._container,"MozMousePixelScroll",s.DomEvent.preventDefault),this._delta=0},removeHooks:function(){s.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),s.DomEvent.off(this._map._container,"MozMousePixelScroll",s.DomEvent.preventDefault)},_onWheelScroll:function(e){var t=s.DomEvent.getWheelDelta(e);this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+(new Date));var n=Math.max(40-(+(new Date)-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s.bind(this._performZoom,this),n),s.DomEvent.preventDefault(e),s.DomEvent.stopPropagation(e)},_performZoom:function(){var e=this._map,t=this._delta,n=e.getZoom();t=t>0?Math.ceil(t):Math.floor(t),t=Math.max(Math.min(t,4),-4),t=e._limitZoom(n+t)-n,this._delta=0,this._startTime=null,t&&("center"===e.options.scrollWheelZoom?e.setZoom(n+t):e.setZoomAround(this._lastMousePos,n+t))}}),s.Map.addInitHook("addHandler","scrollWheelZoom",s.Map.ScrollWheelZoom),s.extend(s.DomEvent,{_touchstart:s.Browser.msPointer?"MSPointerDown":s.Browser.pointer?"pointerdown":"touchstart",_touchend:s.Browser.msPointer?"MSPointerUp":s.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(e,n,r){function i(e){var t;if(s.Browser.pointer?(d.push(e.pointerId),t=d.length):t=e.touches.length,!(t>1)){var n=Date.now(),r=n-(u||n);a=e.touches?e.touches[0]:e,f=r>0&&l>=r,u=n}}function o(e){if(s.Browser.pointer){var t=d.indexOf(e.pointerId);if(-1===t)return;d.splice(t,1)}if(f){if(s.Browser.pointer){var r,i={};for(var o in a)r=a[o],"function"==typeof r?i[o]=r.bind(a):i[o]=r;a=i}a.type="dblclick",n(a),u=null}}var u,a,f=!1,l=250,c="_leaflet_",h=this._touchstart,p=this._touchend,d=[];e[c+h+r]=i,e[c+p+r]=o;var v=s.Browser.pointer?t.documentElement:e;return e.addEventListener(h,i,!1),v.addEventListener(p,o,!1),s.Browser.pointer&&v.addEventListener(s.DomEvent.POINTER_CANCEL,o,!1),this},removeDoubleTapListener:function(e,n){var r="_leaflet_";return e.removeEventListener(this._touchstart,e[r+this._touchstart+n],!1),(s.Browser.pointer?t.documentElement:e).removeEventListener(this._touchend,e[r+this._touchend+n],!1),s.Browser.pointer&&t.documentElement.removeEventListener(s.DomEvent.POINTER_CANCEL,e[r+this._touchend+n],!1),this}}),s.extend(s.DomEvent,{POINTER_DOWN:s.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:s.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:s.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:s.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(e,t,n,r){switch(t){case"touchstart":return this.addPointerListenerStart(e,t,n,r);case"touchend":return this.addPointerListenerEnd(e,t,n,r);case"touchmove":return this.addPointerListenerMove(e,t,n,r);default:throw"Unknown touch event type"}},addPointerListenerStart:function(e,n,r,i){var o="_leaflet_",u=this._pointers,a=function(e){"mouse"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE&&s.DomEvent.preventDefault(e);for(var t=!1,n=0;n1))&&(this._moved||(s.DomUtil.addClass(t._mapPane,"leaflet-touching"),t.fire("movestart").fire("zoomstart"),this._moved=!0),s.Util.cancelAnimFrame(this._animRequest),this._animRequest=s.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),s.DomEvent.preventDefault(e))}},_updateOnMove:function(){var e=this._map,t=this._getScaleOrigin(),n=e.layerPointToLatLng(t),r=e.getScaleZoom(this._scale);e._animateZoom(n,r,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void (this._zooming=!1);var e=this._map;this._zooming=!1,s.DomUtil.removeClass(e._mapPane,"leaflet-touching"),s.Util.cancelAnimFrame(this._animRequest),s.DomEvent.off(t,"touchmove",this._onTouchMove).off(t,"touchend",this._onTouchEnd);var n=this._getScaleOrigin(),r=e.layerPointToLatLng(n),i=e.getZoom(),o=e.getScaleZoom(this._scale)-i,u=o>0?Math.ceil(o):Math.floor(o),a=e._limitZoom(i+u),f=e.getZoomScale(a)/this._scale;e._animateZoom(r,a,n,f)},_getScaleOrigin:function(){var e=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(e)}}),s.Map.addInitHook("addHandler","touchZoom",s.Map.TouchZoom),s.Map.mergeOptions({tap:!0,tapTolerance:15}),s.Map.Tap=s.Handler.extend({addHooks:function(){s.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){s.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(e.touches){if(s.DomEvent.preventDefault(e),this._fireClick=!0,e.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var n=e.touches[0],r=n.target;this._startPos=this._newPos=new s.Point(n.clientX,n.clientY),r.tagName&&"a"===r.tagName.toLowerCase()&&s.DomUtil.addClass(r,"leaflet-active"),this._holdTimeout=setTimeout(s.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",n))},this),1e3),s.DomEvent.on(t,"touchmove",this._onMove,this).on(t,"touchend",this._onUp,this)}},_onUp:function(e){if(clearTimeout(this._holdTimeout),s.DomEvent.off(t,"touchmove",this._onMove,this).off(t,"touchend",this._onUp,this),this._fireClick&&e&&e.changedTouches){var n=e.changedTouches[0],r=n.target;r&&r.tagName&&"a"===r.tagName.toLowerCase()&&s.DomUtil.removeClass(r,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",n)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(e){var t=e.touches[0];this._newPos=new s.Point(t.clientX,t.clientY)},_simulateEvent:function(n,r){var i=t.createEvent("MouseEvents");i._simulated=!0,r.target._simulatedClick=!0,i.initMouseEvent(n,!0,!0,e,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),r.target.dispatchEvent(i)}}),s.Browser.touch&&!s.Browser.pointer&&s.Map.addInitHook("addHandler","tap",s.Map.Tap),s.Map.mergeOptions({boxZoom:!0}),s.Map.BoxZoom=s.Handler.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._moved=!1},addHooks:function(){s.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){s.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(e){return this._moved=!1,!e.shiftKey||1!==e.which&&1!==e.button?!1:(s.DomUtil.disableTextSelection(),s.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(e),void s.DomEvent.on(t,"mousemove",this._onMouseMove,this).on(t,"mouseup",this._onMouseUp,this).on(t,"keydown",this._onKeyDown,this))},_onMouseMove:function(e){this._moved||(this._box=s.DomUtil.create("div","leaflet-zoom-box",this._pane),s.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var t=this._startLayerPoint,n=this._box,r=this._map.mouseEventToLayerPoint(e),i=r.subtract(t),o=new s.Point(Math.min(r.x,t.x),Math.min(r.y,t.y));s.DomUtil.setPosition(n,o),this._moved=!0,n.style.width=Math.max(0,Math.abs(i.x)-4)+"px",n.style.height=Math.max(0,Math.abs(i.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),s.DomUtil.enableTextSelection(),s.DomUtil.enableImageDrag(),s.DomEvent.off(t,"mousemove",this._onMouseMove).off(t,"mouseup",this._onMouseUp).off(t,"keydown",this._onKeyDown)},_onMouseUp:function(e){this._finish();var t=this._map,n=t.mouseEventToLayerPoint(e);if(!this._startLayerPoint.equals(n)){var r=new s.LatLngBounds(t.layerPointToLatLng(this._startLayerPoint),t.layerPointToLatLng(n));t.fitBounds(r),t.fire("boxzoomend",{boxZoomBounds:r})}},_onKeyDown:function(e){27===e.keyCode&&this._finish()}}),s.Map.addInitHook("addHandler","boxZoom",s.Map.BoxZoom),s.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),s.Map.Keyboard=s.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(e){this._map=e,this._setPanOffset(e.options.keyboardPanOffset),this._setZoomOffset(e.options.keyboardZoomOffset)},addHooks:function(){var e=this._map._container;-1===e.tabIndex&&(e.tabIndex="0"),s.DomEvent.on(e,"focus",this._onFocus,this).on(e,"blur",this._onBlur,this).on(e,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var e=this._map._container;s.DomEvent.off(e,"focus",this._onFocus,this).off(e,"blur",this._onBlur,this).off(e,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var n=t.body,r=t.documentElement,i=n.scrollTop||r.scrollTop,s=n.scrollLeft||r.scrollLeft;this._map._container.focus(),e.scrollTo(s,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(e){var t,n,r=this._panKeys={},i=this.keyCodes;for(t=0,n=i.left.length;n>t;t++)r[i.left[t]]=[-1*e,0];for(t=0,n=i.right.length;n>t;t++)r[i.right[t]]=[e,0];for(t=0,n=i.down.length;n>t;t++)r[i.down[t]]=[0,e];for(t=0,n=i.up.length;n>t;t++)r[i.up[t]]=[0,-1*e]},_setZoomOffset:function(e){var t,n,r=this._zoomKeys={},i=this.keyCodes;for(t=0,n=i.zoomIn.length;n>t;t++)r[i.zoomIn[t]]=e;for(t=0,n=i.zoomOut.length;n>t;t++)r[i.zoomOut[t]]=-e},_addHooks:function(){s.DomEvent.on(t,"keydown",this._onKeyDown,this)},_removeHooks:function(){s.DomEvent.off(t,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){var t=e.keyCode,n=this._map;if(t in this._panKeys){if(n._panAnim&&n._panAnim._inProgress)return;n.panBy(this._panKeys[t]),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds)}else{if(!(t in this._zoomKeys))return;n.setZoom(n.getZoom()+this._zoomKeys[t])}s.DomEvent.stop(e)}}),s.Map.addInitHook("addHandler","keyboard",s.Map.Keyboard),s.Handler.MarkerDrag=s.Handler.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new s.Draggable(e,e)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),s.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),s.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var e=this._marker,t=e._shadow,n=s.DomUtil.getPosition(e._icon),r=e._map.layerPointToLatLng(n);t&&s.DomUtil.setPosition(t,n),e._latlng=r,e.fire("move",{latlng:r}).fire("drag")},_onDragEnd:function(e){this._marker.fire("moveend").fire("dragend",e)}}),s.Control=s.Class.extend({options:{position:"topright"},initialize:function(e){s.setOptions(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._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),r=e._controlCorners[n];return s.DomUtil.addClass(t,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(t,r.firstChild):r.appendChild(t),this},removeFrom:function(e){var t=this.getPosition(),n=e._controlCorners[t];return n.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(e),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),s.control=function(e){return new s.Control(e)},s.Map.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.removeFrom(this),this},_initControlPos:function(){function e(e,i){var o=n+e+" "+n+i;t[e+i]=s.DomUtil.create("div",o,r)}var t=this._controlCorners={},n="leaflet-",r=this._controlContainer=s.DomUtil.create("div",n+"control-container",this._container);e("top","left"),e("top","right"),e("bottom","left"),e("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),s.Control.Zoom=s.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=s.DomUtil.create("div",t+" leaflet-bar");return this._map=e,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,t+"-in",n,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,t+"-out",n,this._zoomOut,this),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(e){this._map.zoomIn(e.shiftKey?3:1)},_zoomOut:function(e){this._map.zoomOut(e.shiftKey?3:1)},_createButton:function(e,t,n,r,i,o){var u=s.DomUtil.create("a",n,r);u.innerHTML=e,u.href="#",u.title=t;var a=s.DomEvent.stopPropagation;return s.DomEvent.on(u,"click",a).on(u,"mousedown",a).on(u,"dblclick",a).on(u,"click",s.DomEvent.preventDefault).on(u,"click",i,o).on(u,"click",this._refocusOnMap,o),u},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";s.DomUtil.removeClass(this._zoomInButton,t),s.DomUtil.removeClass(this._zoomOutButton,t),e._zoom===e.getMinZoom()&&s.DomUtil.addClass(this._zoomOutButton,t),e._zoom===e.getMaxZoom()&&s.DomUtil.addClass(this._zoomInButton,t)}}),s.Map.mergeOptions({zoomControl:!0}),s.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new s.Control.Zoom,this.addControl(this.zoomControl))}),s.control.zoom=function(e){return new s.Control.Zoom(e)},s.Control.Attribution=s.Control.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(e){s.setOptions(this,e),this._attributions={}},onAdd:function(e){this._container=s.DomUtil.create("div","leaflet-control-attribution"),s.DomEvent.disableClickPropagation(this._container);for(var t in e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return e.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(e){e.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},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):void 0},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):void 0},_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(" | ")}},_onLayerAdd:function(e){e.layer.getAttribution&&this.addAttribution(e.layer.getAttribution())},_onLayerRemove:function(e){e.layer.getAttribution&&this.removeAttribution(e.layer.getAttribution())}}),s.Map.mergeOptions({attributionControl:!0}),s.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new s.Control.Attribution).addTo(this))}),s.control.attribution=function(e){return new s.Control.Attribution(e)},s.Control.Scale=s.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(e){this._map=e;var t="leaflet-control-scale",n=s.DomUtil.create("div",t),r=this.options;return this._addScales(r,t,n),e.on(r.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=s.DomUtil.create("div",t+"-line",n)),e.imperial&&(this._iScale=s.DomUtil.create("div",t+"-line",n))},_update:function(){var e=this._map.getBounds(),t=e.getCenter().lat,n=6378137*Math.PI*Math.cos(t*Math.PI/180),r=n*(e.getNorthEast().lng-e.getSouthWest().lng)/180,i=this._map.getSize(),s=this.options,o=0;i.x>0&&(o=r*(s.maxWidth/i.x)),this._updateScales(s,o)},_updateScales:function(e,t){e.metric&&t&&this._updateMetric(t),e.imperial&&t&&this._updateImperial(t)},_updateMetric:function(e){var t=this._getRoundNum(e);this._mScale.style.width=this._getScaleWidth(t/e)+"px",this._mScale.innerHTML=1e3>t?t+" m":t/1e3+" km"},_updateImperial:function(e){var t,n,r,i=3.2808399*e,s=this._iScale;i>5280?(t=i/5280,n=this._getRoundNum(t),s.style.width=this._getScaleWidth(n/t)+"px",s.innerHTML=n+" mi"):(r=this._getRoundNum(i),s.style.width=this._getScaleWidth(r/i)+"px",s.innerHTML=r+" ft")},_getScaleWidth:function(e){return Math.round(this.options.maxWidth*e)-10},_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}}),s.control.scale=function(e){return new s.Control.Scale(e)},s.Control.Layers=s.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(e,t,n){s.setOptions(this,n),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var r in e)this._addLayer(e[r],r);for(r in t)this._addLayer(t[r],r,!0)},onAdd:function(e){return this._initLayout(),this._update(),e.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(e){e.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._update(),this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._update(),this},removeLayer:function(e){var t=s.stamp(e);return delete this._layers[t],this._update(),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=s.DomUtil.create("div",e);t.setAttribute("aria-haspopup",!0),s.Browser.touch?s.DomEvent.on(t,"click",s.DomEvent.stopPropagation):s.DomEvent.disableClickPropagation(t).disableScrollPropagation(t);var n=this._form=s.DomUtil.create("form",e+"-list");if(this.options.collapsed){s.Browser.android||s.DomEvent.on(t,"mouseover",this._expand,this).on(t,"mouseout",this._collapse,this);var r=this._layersLink=s.DomUtil.create("a",e+"-toggle",t);r.href="#",r.title="Layers",s.Browser.touch?s.DomEvent.on(r,"click",s.DomEvent.stop).on(r,"click",this._expand,this):s.DomEvent.on(r,"focus",this._expand,this),s.DomEvent.on(n,"click",function(){setTimeout(s.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=s.DomUtil.create("div",e+"-base",n),this._separator=s.DomUtil.create("div",e+"-separator",n),this._overlaysList=s.DomUtil.create("div",e+"-overlays",n),t.appendChild(n)},_addLayer:function(e,t,n){var r=s.stamp(e);this._layers[r]={layer:e,name:t,overlay:n},this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var e,t,n=!1,r=!1;for(e in this._layers)t=this._layers[e],this._addItem(t),r=r||t.overlay,n=n||!t.overlay;this._separator.style.display=r&&n?"":"none"}},_onLayerChange:function(e){var t=this._layers[s.stamp(e.layer)];if(t){this._handlingClick||this._update();var n=t.overlay?"layeradd"===e.type?"overlayadd":"overlayremove":"layeradd"===e.type?"baselayerchange":null;n&&this._map.fire(n,t)}},_createRadioElement:function(e,n){var r='e;e++)t=r[e],n=this._layers[t.layerId],t.checked&&!this._map.hasLayer(n.layer)?this._map.addLayer(n.layer):!t.checked&&this._map.hasLayer(n.layer)&&this._map.removeLayer(n.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){s.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),s.control.layers=function(e,t,n){return new s.Control.Layers(e,t,n)},s.PosAnimation=s.Class.extend({includes:s.Mixin.Events,run:function(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._newPos=t,this.fire("start"),e.style[s.DomUtil.TRANSITION]="all "+(n||.25)+"s cubic-bezier(0,0,"+(r||.5)+",1)",s.DomEvent.on(e,s.DomUtil.TRANSITION_END,this._onTransitionEnd,this),s.DomUtil.setPosition(e,t),s.Util.falseFn(e.offsetWidth),this._stepTimer=setInterval(s.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(s.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),s.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var e=this._getPos();return e?(this._el._leaflet_pos=e,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var t,n,r,i=this._el,o=e.getComputedStyle(i);if(s.Browser.any3d){if(r=o[s.DomUtil.TRANSFORM].match(this._transformRe),!r)return;t=parseFloat(r[1]),n=parseFloat(r[2])}else t=parseFloat(o.left),n=parseFloat(o.top);return new s.Point(t,n,!0)},_onTransitionEnd:function(){s.DomEvent.off(this._el,s.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[s.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),s.Map.include({setView:function(e,t,n){if(t=t===r?this._zoom:this._limitZoom(t),e=this._limitCenter(s.latLng(e),t,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==r&&(n.zoom=s.extend({animate:n.animate},n.zoom),n.pan=s.extend({animate:n.animate},n.pan));var i=this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,n.zoom):this._tryAnimatedPan(e,n.pan);if(i)return clearTimeout(this._sizeTimer),this}return this._resetView(e,t),this},panBy:function(e,t){if(e=s.point(e).round(),t=t||{},!e.x&&!e.y)return this;if(this._panAnim||(this._panAnim=new s.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),t.animate!==!1){s.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(e);this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){s.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._floor();return(t&&t.animate)===!0||this.getSize().contains(n)?(this.panBy(n,t),!0):!1}}),s.PosAnimation=s.DomUtil.TRANSITION?s.PosAnimation:s.PosAnimation.extend({run:function(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=s.DomUtil.getPosition(e),this._offset=t.subtract(this._startPos),this._startTime=+(new Date),this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=s.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var e=+(new Date)-this._startTime,t=1e3*this._duration;t>e?this._runFrame(this._easeOut(e/t)):(this._runFrame(1),this._complete())},_runFrame:function(e){var t=this._startPos.add(this._offset.multiplyBy(e));s.DomUtil.setPosition(this._el,t),this.fire("step")},_complete:function(){s.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),s.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),s.DomUtil.TRANSITION&&s.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&s.DomUtil.TRANSITION&&s.Browser.any3d&&!s.Browser.android23&&!s.Browser.mobileOpera,this._zoomAnimated&&s.DomEvent.on(this._mapPane,s.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),s.Map.include(s.DomUtil.TRANSITION?{_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||n.animate===!1||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(t),i=this._getCenterOffset(e)._divideBy(1-1/r),s=this._getCenterLayerPoint()._add(i);return n.animate===!0||this.getSize().contains(i)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(e,t,s,r,null,!0),!0):!1},_animateZoom:function(e,t,n,r,i,o,u){u||(this._animatingZoom=!0),s.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=e,this._animateToZoom=t,s.Draggable&&(s.Draggable._disabled=!0),s.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:e,zoom:t,origin:n,scale:r,delta:i,backwards:o}),setTimeout(s.bind(this._onZoomTransitionEnd,this),250)},this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,s.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),s.Util.requestAnimFrame(function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),s.Draggable&&(s.Draggable._disabled=!1)},this))}}:{}),s.TileLayer.include({_animateZoom:function(e){this._animating||(this._animating=!0,this._prepareBgBuffer());var t=this._bgBuffer,n=s.DomUtil.TRANSFORM,r=e.delta?s.DomUtil.getTranslateString(e.delta):t.style[n],i=s.DomUtil.getScaleString(e.scale,e.origin);t.style[n]=e.backwards?i+" "+r:r+" "+i},_endZoomAnim:function(){var e=this._tileContainer,t=this._bgBuffer;e.style.visibility="",e.parentNode.appendChild(e),s.Util.falseFn(t.offsetWidth);var n=this._map.getZoom();(n>this.options.maxZoom||n.5&&.5>r?(e.style.visibility="hidden",void this._stopLoadingImages(e)):(t.style.visibility="hidden",t.style[s.DomUtil.TRANSFORM]="",this._tileContainer=t,t=this._bgBuffer=e,this._stopLoadingImages(t),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(e){var t,n,r=e.getElementsByTagName("img"),i=0;for(t=0,n=r.length;n>t;t++)r[t].complete&&i++;return i/n},_stopLoadingImages:function(e){var t,n,r,i=Array.prototype.slice.call(e.getElementsByTagName("img"));for(t=0,n=i.length;n>t;t++)r=i[t],r.complete||(r.onload=s.Util.falseFn,r.onerror=s.Util.falseFn,r.src=s.Util.emptyImageUrl,r.parentNode.removeChild(r))}}),s.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(e){if(e=this._locateOptions=s.extend(this._defaultLocateOptions,e),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=s.bind(this._handleGeolocationResponse,this),n=s.bind(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,n,e):navigator.geolocation.getCurrentPosition(t,n,e),this},stopLocate:function(){return navigator.geolocation&&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=e.coords.latitude,n=e.coords.longitude,r=new s.LatLng(t,n),i=180*e.coords.accuracy/40075017,o=i/Math.cos(s.LatLng.DEG_TO_RAD*t),u=s.latLngBounds([t-i,n-o],[t+i,n+o]),a=this._locateOptions;if(a.setView){var f=Math.min(this.getBoundsZoom(u),a.maxZoom);this.setView(r,f)}var l={latlng:r,bounds:u,timestamp:e.timestamp};for(var c in e.coords)"number"==typeof e.coords[c]&&(l[c]=e.coords[c]);this.fire("locationfound",l)}})}(window,document),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof n&&n.amd?n("chroma-js",t):e.chroma=t()}(this,function(){"use strict";for(var e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>16,t>>8&255,255&t,1]}if(e.match(st)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var n=parseInt(e,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+e)},ut=u.type;p.prototype.hex=function(e){return rt(this._rgb,e)},v.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hex"])))},a.format.hex=ot,a.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;0>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},Cn=u.type;p.prototype.num=function(){return xn(this._rgb)},v.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["num"])))},a.format.num=Nn,a.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===Cn(e[0])&&0<=e[0]&&e[0]<=16777215)return"num"}});var kn=u.unpack,Ln=u.type,An=Math.round;p.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(An)},p.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map(function(t,n){return n<3?!1===e?t:An(t):t})},v.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["rgb"])))},a.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=kn(e,"rgba");return void 0===n[3]&&(n[3]=1),n},a.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=kn(e,"rgba"),"array"===Ln(e)&&(3===e.length||4===e.length&&"number"==Ln(e[3])&&0<=e[3]&&e[3]<=1))return"rgb"}});var On=Math.log,Mn=function(e){var t,n,r,i=e/100;return r=i<66?(t=255,n=-155.25485562709179-.44596950469579133*(n=i-2)+104.49216199393888*On(n),i<20?0:.8274096064007395*(r=i-10)-254.76935184120902+115.67994401066147*On(r)):(t=351.97690566805693+.114206453784165*(t=i-55)-40.25366309332127*On(t),n=325.4494125711974+.07943456536662342*(n=i-50)-28.0852963507957*On(n),255),[t,n,r,1]},_n=u.unpack,Dn=Math.round,Pn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,r=_n(e,"rgb"),i=r[0],s=r[2],o=1e3,u=4e4;.4=s/i?u=n:o=n}return Dn(n)};p.prototype.temp=p.prototype.kelvin=p.prototype.temperature=function(){return Pn(this._rgb)},v.temp=v.kelvin=v.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["temp"])))},a.format.temp=a.format.kelvin=a.format.temperature=Mn;var Hn=u.type;p.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===Hn(e)?t?(this._rgb[3]=e,this):new p([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},p.prototype.clipped=function(){return this._rgb._clipped||!1},p.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=Dt*e,(new p(t,"lab")).alpha(this.alpha(),!0)},p.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},p.prototype.darker=p.prototype.darken,p.prototype.brighter=p.prototype.brighten,p.prototype.get=function(e){var t=e.split("."),n=t[0],r=t[1],i=this[n]();if(r){var s=n.indexOf(r);if(-1=u[n];)n++;return n-1}(e)/(u.length-2):c!==l?(e-l)/(c-l):1,f=b(f),r||(f=y(f)),1!==m&&(f=rr(f,m)),f=o[0]+f*(1-o[0]-o[1]),f=Math.min(1,Math.max(0,f));var h=Math.floor(1e4*f);if(d&&p[h])i=p[h];else{if("array"===nr(a))for(var g=0;g=h[t+1];)t++;var n=(e-h[t])/(h[t+1]-h[t]);return f[t]+n*(f[t+1]-f[t])})}}return i=[l,c],S},S.mode=function(e){return arguments.length?(t=e,E(),S):t},S.range=function(e,t){return g(e),S},S.out=function(e){return f=e,S},S.spread=function(e){return arguments.length?(r=e,S):r},S.correctLightness=function(e){return null==e&&(e=!0),h=e,E(),y=h?function(e){for(var t=w(0,!0).lab()[0],n=w(1,!0).lab()[0],r=nn.max&&(n.max=e),n.count+=1)}),n.domain=[n.min,n.max],n.limits=function(e,t){return xr(n,e,t)},n},xr=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==s(e)&&(e=Sr(e));var r=e.min,i=e.max,o=e.values.sort(function(e,t){return e-t});if(1===n)return[r,i];var u=[];if("c"===t.substr(0,1)&&(u.push(r),u.push(i)),"e"===t.substr(0,1)){u.push(r);for(var a=1;a 0");var f=Math.LOG10E*yr(r),l=Math.LOG10E*yr(i);u.push(r);for(var c=1;ci){if(s-i>600){var u=s-i+1,a=r-i+1,f=Math.log(u),l=.5*Math.exp(2*f/3),c=.5*Math.sqrt(f*l*(u-l)/u)*(a-u/2<0?-1:1),h=Math.max(i,Math.floor(r-a*l/u+c)),p=Math.min(s,Math.floor(r+(u-a)*l/u+c));t(e,r,h,p,o)}var d=e[r],v=i,m=s;n(e,i,r),o(e[s],d)>0&&n(e,i,s);while(v0)m--}o(e[i],d)===0?n(e,i,m):(m++,n(e,m,s)),m<=r&&(i=m+1),r<=m&&(s=m-1)}}function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function r(e,t){return et?1:0}function s(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r=e.minX&&t.maxY>=e.minY}function g(e){return{children:e,height:1,leaf:!0,minX:Infinity,minY:Infinity,maxX:-Infinity,maxY:-Infinity}}function y(t,n,r,i,s){var o=[n,r];while(o.length){r=o.pop(),n=o.pop();if(r-n<=i)continue;var u=n+Math.ceil((r-n)/i/2)*i;e(t,u,n,r,s),o.push(n,u,u,r)}}var i=function(t){t===void 0&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var n=this.data,r=[];if(!m(t,n))return r;var i=this.toBBox,s=[];while(n){for(var o=0;o=0){if(!(s[n].children.length>this._maxEntries))break;this._split(s,n),n--}this._adjustParentBBoxes(i,s,n)},i.prototype._split=function(t,n){var r=t[n],i=r.children.length,s=this._minEntries;this._chooseSplitAxis(r,s,i);var u=this._chooseSplitIndex(r,s,i),a=g(r.children.splice(u,r.children.length-u));a.height=r.height,a.leaf=r.leaf,o(r,this.toBBox),o(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(r,a)},i.prototype._splitRoot=function(t,n){this.data=g([t,n]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,n,r){var i,s=Infinity,o=Infinity;for(var a=n;a<=r-n;a++){var f=u(t,0,a,this.toBBox),l=u(t,a,r,this.toBBox),h=d(f,l),p=c(f)+c(l);h=n;d--){var v=t.children[d];a(f,t.leaf?s(v):v),l+=h(f)}return l},i.prototype._adjustParentBBoxes=function(t,n,r){for(var i=r;i>=0;i--)a(n[i],t)},i.prototype._condense=function(t){for(var n=t.length-1,r=void 0;n>=0;n--)t[n].children.length===0?n>0?(r=t[n-1].children,r.splice(r.indexOf(t[n]),1)):this.clear():o(t[n],this.toBBox)},i}),n("map/labelslayer",["leaflet","rbush"],function(e,t){function o(e,t){return s.font=e,s.measureText(t)}function u(e){return{minX:e.position.lat,minY:e.position.lng,maxX:e.position.lat,maxY:e.position.lng,label:e}}function a(t,n,i,s,u){return function(a){var f=n+"px "+r;return{position:e.latLng(a.nodeinfo.location.latitude,a.nodeinfo.location.longitude),label:a.nodeinfo.hostname,offset:i,fillStyle:t,height:n*1.2,font:f,stroke:s,minZoom:u,width:o(f,a.nodeinfo.hostname).width}}}function f(e,t){return[e*Math.cos(t[2]*2*Math.PI),-e*Math.sin(t[2]*2*Math.PI)]}function l(e,t,n,r,i,s,o){var u=1+1.41*(1-(o-i)/(s-i)),a=r.width*u,f=r.height*u,l={left:0,right:-a,center:-a/2},c={top:0,ideographic:-f,middle:-f/2},h=e.x+t[0]+l[n[0]],p=e.y+t[1]+c[n[1]];return{minX:h,minY:p,maxX:h+a,maxY:p+f}}var n=[["left","middle",0],["center","top",.75],["right","middle",.5],["left","top",7/8],["left","ideographic",1/8],["right","top",5/8],["center","ideographic",.25],["right","ideographic",3/8]],r="Roboto",i=4,s=document.createElement("canvas").getContext("2d"),c=e.TileLayer.Canvas.extend({onAdd:function(t){e.TileLayer.Canvas.prototype.onAdd.call(this,t),this.data&&this.prepareLabels()},setData:function(e){this.data=e,this._map&&this.prepareLabels()},prepareLabels:function(){function g(e){return function(t){var n=m.project(t.position,e);return{minX:n.x-i,minY:n.y-i,maxX:n.x+i,maxY:n.y+i}}}var e=this.data,r=e.online.map(a("rgba(0, 0, 0, 0.9)",10,8,!0,13)),s=e.offline.map(a("rgba(212, 62, 42, 0.9)",9,5,!1,16)),o=e.new.map(a("rgba(48, 99, 20, 0.9)",11,8,!0,0)),c=e.lost.map(a("rgba(212, 62, 42, 0.9)",11,8,!0,0)),h=[].concat(o).concat(c).concat(r).concat(s),p=this.options.minZoom,d=this.options.maxZoom,v=[],m=this._map;for(var y=p;y<=d;y++)v[y]=new t(9),v[y].load(h.map(g(y)));h=h.map(function(e){var t=n.map(function(t){var n=f(e.offset,t),r;for(r=d;r>=e.minZoom;r--){var i=m.project(e.position,r),s=l(i,n,t,e,p,d,r),o=v[r].search(s);if(o.length>0)break}return{loc:t,z:r+1}}).filter(function(e){return e.z<=d}).sort(function(e,t){return e.z-t.z})[0];if(t!==undefined){e.offset=f(e.offset,t.loc),e.minZoom=t.z,e.anchor=t.loc;for(var r=d;r>=t.z;r--){var i=m.project(e.position,r),s=l(i,e.offset,t.loc,e,p,d,r);v[r].insert(s)}return e}return undefined}).filter(function(e){return e!==undefined}),this.margin=16,h.length>0&&(this.margin+=h.map(function(e){return e.width}).sort().reverse()[0]),this.labels=new t(9),this.labels.load(h.map(u)),this.redraw()},drawTile:function(e,t,n){function r(e,t,n,r){var i=t.unproject([e.x-r,e.y-r]),s=t.unproject([e.x+r+n,e.y+r+n]);return{minX:s.lat,minY:i.lng,maxX:i.lat,maxY:s.lng}}function u(e){var t=o.project(e.label.position);return t.x-=s.x,t.y-=s.y,{p:t,label:e.label}}function c(e){l.font=e.label.font,l.textAlign=e.label.anchor[0],l.textBaseline=e.label.anchor[1],l.fillStyle=e.label.fillStyle,e.label.stroke&&l.strokeText(e.label.label,e.p.x+e.label.offset[0],e.p.y+e.label.offset[1]),l.fillText(e.label.label,e.p.x+e.label.offset[0],e.p.y+e.label.offset[1])}if(!this.labels)return;var i=this.options.tileSize,s=t.multiplyBy(i),o=this._map,a=r(s,o,i,this.margin),f=this.labels.search(a).map(u),l=e.getContext("2d");l.lineWidth=5,l.strokeStyle="rgba(255, 255, 255, 0.8)",l.miterLimit=2,f.filter(function(e){return n>=e.label.minZoom}).forEach(c)}});return c}),!function(){function e(e){return e&&(e.ownerDocument||e.document||e).documentElement}function t(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}function r(e,t){return t>e?-1:e>t?1:e>=t?0:NaN}function i(e){return null===e?NaN:+e}function s(e){return!isNaN(e)}function o(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var s=r+i>>>1;e(t[s],n)<0?r=s+1:i=s}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var s=r+i>>>1;e(t[s],n)>0?i=s:r=s+1}return r}}}function u(e){return e.length}function a(e){for(var t=1;e*t%1;)t*=10;return t}function f(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function l(){this._=Object.create(null)}function c(e){return(e+="")===Su||e[0]===xu?xu+e:e}function h(e){return(e+="")[0]===xu?e.slice(1):e}function p(e){return c(e)in this._}function d(e){return(e=c(e))in this._&&delete this._[e]}function v(){var e=[];for(var t in this._)e.push(h(t));return e}function m(){var e=0;for(var t in this._)++e;return e}function g(){for(var e in this._)return!1;return!0}function y(){this._=Object.create(null)}function b(e){return e}function w(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function E(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=Tu.length;r>n;++n){var i=Tu[n]+t;if(i in e)return i}}function S(){}function x(){}function T(e){function t(){for(var t,r=n,i=-1,s=r.length;++in;n++)for(var i,s=e[n],o=0,u=s.length;u>o;o++)(i=s[o])&&t(i,o,n);return e}function X(e){return Cu(e,Du),e}function V(e){var t,n;return function(r,i,s){var o,u=e[s].update,a=u.length;for(s!=n&&(n=s,t=0),i>=t&&(t=i+1);!(o=u[t])&&++t0&&(e=e.slice(0,u));var f=Pu.get(e);return f&&(e=f,a=K),u?t?i:r:t?S:s}function J(e,t){return function(n){var r=fu.event;fu.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{fu.event=r}}}function K(e,t){var n=J(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}function Q(n){var r=".dragsuppress-"+ ++Bu,i="click"+r,s=fu.select(t(n)).on("touchmove"+r,N).on("dragstart"+r,N).on("selectstart"+r,N);if(null==Hu&&(Hu="onselectstart"in n?!1:E(n.style,"userSelect")),Hu){var o=e(n).style,u=o[Hu];o[Hu]="none"}return function(e){if(s.on(r,null),Hu&&(o[Hu]=u),e){var t=function(){s.on(i,null)};s.on(i,function(){N(),t()},!0),setTimeout(t,0)}}}function G(e,n){n.changedTouches&&(n=n.changedTouches[0]);var r=e.ownerSVGElement||e;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>ju){var s=t(e);if(s.scrollX||s.scrollY){r=fu.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();ju=!o.f&&!o.e,r.remove()}}return ju?(i.x=n.pageX,i.y=n.pageY):(i.x=n.clientX,i.y=n.clientY),i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}var u=e.getBoundingClientRect();return[n.clientX-u.left-e.clientLeft,n.clientY-u.top-e.clientTop]}function Y(){return fu.event.changedTouches[0].identifier}function Z(e){return e>0?1:0>e?-1:0}function et(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function tt(e){return e>1?0:-1>e?qu:Math.acos(e)}function nt(e){return e>1?zu:-1>e?-zu:Math.asin(e)}function rt(e){return((e=Math.exp(e))-1/e)/2}function it(e){return((e=Math.exp(e))+1/e)/2}function st(e){return((e=Math.exp(2*e))-1)/(e+1)}function ot(e){return(e=Math.sin(e/2))*e}function ut(){}function at(e,t,n){return this instanceof at?(this.h=+e,this.s=+t,void (this.l=+n)):arguments.length<2?e instanceof at?new at(e.h,e.s,e.l):St(""+e,xt,at):new at(e,t,n)}function ft(e,t,n){function r(e){return e>360?e-=360:0>e&&(e+=360),60>e?s+(o-s)*e/60:180>e?o:240>e?s+(o-s)*(240-e)/60:s}function i(e){return Math.round(255*r(e))}var s,o;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:0>t?0:t>1?1:t,n=0>n?0:n>1?1:n,o=.5>=n?n*(1+t):n+t-n*t,s=2*n-o,new yt(i(e+120),i(e),i(e-120))}function lt(e,t,n){return this instanceof lt?(this.h=+e,this.c=+t,void (this.l=+n)):arguments.length<2?e instanceof lt?new lt(e.h,e.c,e.l):e instanceof ht?dt(e.l,e.a,e.b):dt((e=Tt((e=fu.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new lt(e,t,n)}function ct(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new ht(n,Math.cos(e*=Wu)*t,Math.sin(e)*t)}function ht(e,t,n){return this instanceof ht?(this.l=+e,this.a=+t,void (this.b=+n)):arguments.length<2?e instanceof ht?new ht(e.l,e.a,e.b):e instanceof lt?ct(e.h,e.c,e.l):Tt((e=yt(e)).r,e.g,e.b):new ht(e,t,n)}function pt(e,t,n){var r=(e+16)/116,i=r+t/500,s=r-n/200;return i=vt(i)*ta,r=vt(r)*na,s=vt(s)*ra,new yt(gt(3.2404542*i-1.5371385*r-.4985314*s),gt(-0.969266*i+1.8760108*r+.041556*s),gt(.0556434*i-.2040259*r+1.0572252*s))}function dt(e,t,n){return e>0?new lt(Math.atan2(n,t)*Xu,Math.sqrt(t*t+n*n),e):new lt(NaN,NaN,e)}function vt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function mt(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function gt(e){return Math.round(255*(.00304>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function yt(e,t,n){return this instanceof yt?(this.r=~~e,this.g=~~t,void (this.b=~~n)):arguments.length<2?e instanceof yt?new yt(e.r,e.g,e.b):St(""+e,yt,ft):new yt(e,t,n)}function bt(e){return new yt(e>>16,e>>8&255,255&e)}function wt(e){return bt(e)+""}function Et(e){return 16>e?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function St(e,t,n){var r,i,s,o=0,u=0,a=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Ct(i[0]),Ct(i[1]),Ct(i[2]))}return(s=oa.get(e))?t(s.r,s.g,s.b):(null==e||"#"!==e.charAt(0)||isNaN(s=parseInt(e.slice(1),16))||(4===e.length?(o=(3840&s)>>4,o=o>>4|o,u=240&s,u=u>>4|u,a=15&s,a=a<<4|a):7===e.length&&(o=(16711680&s)>>16,u=(65280&s)>>8,a=255&s)),t(o,u,a))}function xt(e,t,n){var r,i,s=Math.min(e/=255,t/=255,n/=255),o=Math.max(e,t,n),u=o-s,a=(o+s)/2;return u?(i=.5>a?u/(o+s):u/(2-o-s),r=e==o?(t-n)/u+(n>t?6:0):t==o?(n-e)/u+2:(e-t)/u+4,r*=60):(r=NaN,i=a>0&&1>a?0:r),new at(r,i,a)}function Tt(e,t,n){e=Nt(e),t=Nt(t),n=Nt(n);var r=mt((.4124564*e+.3575761*t+.1804375*n)/ta),i=mt((.2126729*e+.7151522*t+.072175*n)/na),s=mt((.0193339*e+.119192*t+.9503041*n)/ra);return ht(116*i-16,500*(r-i),200*(i-s))}function Nt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ct(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function kt(e){return"function"==typeof e?e:function(){return e}}function Lt(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),At(t,n,e,r)}}function At(e,t,n,r){function i(){var e,t=a.status;if(!t&&Mt(a)||t>=200&&300>t||304===t){try{e=n.call(s,a)}catch(r){return void o.error.call(s,r)}o.load.call(s,e)}else o.error.call(s,a)}var s={},o=fu.dispatch("beforesend","progress","load","error"),u={},a=new XMLHttpRequest,f=null;return!this.XDomainRequest||"withCredentials"in a||!/^(http(s)?:)?\/\//.test(e)||(a=new XDomainRequest),"onload"in a?a.onload=a.onerror=i:a.onreadystatechange=function(){a.readyState>3&&i()},a.onprogress=function(e){var t=fu.event;fu.event=e;try{o.progress.call(s,a)}finally{fu.event=t}},s.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?u[e]:(null==t?delete u[e]:u[e]=t+"",s)},s.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",s):t},s.responseType=function(e){return arguments.length?(f=e,s):f},s.response=function(e){return n=e,s},["get","post"].forEach(function(e){s[e]=function(){return s.send.apply(s,[e].concat(cu(arguments)))}}),s.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),a.open(n,e,!0),null==t||"accept"in u||(u.accept=t+",*/*"),a.setRequestHeader)for(var l in u)a.setRequestHeader(l,u[l]);return null!=t&&a.overrideMimeType&&a.overrideMimeType(t),null!=f&&(a.responseType=f),null!=i&&s.on("error",i).on("load",function(e){i(null,e)}),o.beforesend.call(s,a),a.send(null==r?null:r),s},s.abort=function(){return a.abort(),s},fu.rebind(s,o,"on"),null==r?s:s.get(Ot(r))}function Ot(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function Mt(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function _t(e,t,n){var r=arguments.length;2>r&&(t=0),3>r&&(n=Date.now());var i=n+t,s={c:e,t:i,n:null};return aa?aa.n=s:ua=s,aa=s,fa||(la=clearTimeout(la),fa=1,ca(Dt)),s}function Dt(){var e=Pt(),t=Ht()-e;t>24?(isFinite(t)&&(clearTimeout(la),la=setTimeout(Dt,t)),fa=0):(fa=1,ca(Dt))}function Pt(){for(var e=Date.now(),t=ua;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Ht(){for(var e,t=ua,n=1/0;t;)t.c?(t.t8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Ft(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,s=r&&n?function(e,t){for(var i=e.length,s=[],o=0,u=r[0],a=0;i>0&&u>0&&(a+u+1>t&&(u=Math.max(1,t-a)),s.push(e.substring(i-=u,i+u)),!((a+=u+1)>t));)u=r[o=(o+1)%r.length];return s.reverse().join(n)}:b;return function(e){var n=pa.exec(e),r=n[1]||" ",o=n[2]||">",u=n[3]||"-",a=n[4]||"",f=n[5],l=+n[6],c=n[7],h=n[8],p=n[9],d=1,v="",m="",g=!1,y=!0;switch(h&&(h=+h.substring(1)),(f||"0"===r&&"="===o)&&(f=r="0",o="="),p){case"n":c=!0,p="g";break;case"%":d=100,m="%",p="f";break;case"p":d=100,m="%",p="r";break;case"b":case"o":case"x":case"X":"#"===a&&(v="0"+p.toLowerCase());case"c":y=!1;case"d":g=!0,h=0;break;case"s":d=-1,p="r"}"$"===a&&(v=i[0],m=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=da.get(p)||It;var b=f&&c;return function(e){var n=m;if(g&&e%1)return"";var i=0>e||0===e&&0>1/e?(e=-e,"-"):"-"===u?"":u;if(0>d){var a=fu.formatPrefix(e,h);e=a.scale(e),n=a.symbol+m}else e*=d;e=p(e,h);var w,E,S=e.lastIndexOf(".");if(0>S){var x=y?e.lastIndexOf("e"):-1;0>x?(w=e,E=""):(w=e.substring(0,x),E=e.substring(x))}else w=e.substring(0,S),E=t+e.substring(S+1);!f&&c&&(w=s(w,1/0));var T=v.length+w.length+E.length+(b?0:i.length),N=l>T?(new Array(T=l-T+1)).join(r):"";return b&&(w=s(N+w,N.length?l-E.length:1/0)),i+=v,e=w+E,("<"===o?i+e+N:">"===o?N+i+e:"^"===o?N.substring(0,T>>=1)+i+e+N.substring(T):i+(b?e:N+e))+n}}}function It(e){return e+""}function qt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Rt(e,t,n){function r(t){var n=e(t),r=s(n,1);return r-t>t-n?n:r}function i(n){return t(n=e(new ma(n-1)),1),n}function s(e,n){return t(e=new ma(+e),n),e}function o(e,r,s){var o=i(e),u=[];if(s>1)for(;r>o;)n(o)%s||u.push(new Date(+o)),t(o,1);else for(;r>o;)u.push(new Date(+o)),t(o,1);return u}function u(e,t,n){try{ma=qt;var r=new qt;return r._=e,o(r,t,n)}finally{ma=Date}}e.floor=e,e.round=r,e.ceil=i,e.offset=s,e.range=o;var a=e.utc=Ut(e);return a.floor=a,a.round=Ut(r),a.ceil=Ut(i),a.offset=Ut(s),a.range=u,e}function Ut(e){return function(t,n){try{ma=qt;var r=new qt;return r._=t,e(r,n)._}finally{ma=Date}}}function zt(e){function t(e){function t(t){for(var n,i,s,o=[],u=-1,a=0;++uu;){if(r>=f)return-1;if(i=t.charCodeAt(u++),37===i){if(o=t.charAt(u++),s=A[o in ya?t.charAt(u++):o],!s||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(e,t,n){S.lastIndex=0;var r=S.exec(t.slice(n));return r?(e.w=x.get(r[0].toLowerCase()),n+r[0].length):-1}function i(e,t,n){w.lastIndex=0;var r=w.exec(t.slice(n));return r?(e.w=E.get(r[0].toLowerCase()),n+r[0].length):-1}function s(e,t,n){C.lastIndex=0;var r=C.exec(t.slice(n));return r?(e.m=k.get(r[0].toLowerCase()),n+r[0].length):-1}function o(e,t,n){T.lastIndex=0;var r=T.exec(t.slice(n));return r?(e.m=N.get(r[0].toLowerCase()),n+r[0].length):-1}function u(e,t,r){return n(e,L.c.toString(),t,r)}function a(e,t,r){return n(e,L.x.toString(),t,r)}function f(e,t,r){return n(e,L.X.toString(),t,r)}function l(e,t,n){var r=b.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)}var c=e.dateTime,h=e.date,p=e.time,d=e.periods,v=e.days,m=e.shortDays,g=e.months,y=e.shortMonths;t.utc=function(e){function n(e){try{ma=qt;var t=new ma;return t._=e,r(t)}finally{ma=Date}}var r=t(e);return n.parse=function(e){try{ma=qt;var t=r.parse(e);return t&&t._}finally{ma=Date}},n.toString=r.toString,n},t.multi=t.utc.multi=ln;var b=fu.map(),w=Xt(v),E=Vt(v),S=Xt(m),x=Vt(m),T=Xt(g),N=Vt(g),C=Xt(y),k=Vt(y);d.forEach(function(e,t){b.set(e.toLowerCase(),t)});var L={a:function(e){return m[e.getDay()]},A:function(e){return v[e.getDay()]},b:function(e){return y[e.getMonth()]},B:function(e){return g[e.getMonth()]},c:t(c),d:function(e,t){return Wt(e.getDate(),t,2)},e:function(e,t){return Wt(e.getDate(),t,2)},H:function(e,t){return Wt(e.getHours(),t,2)},I:function(e,t){return Wt(e.getHours()%12||12,t,2)},j:function(e,t){return Wt(1+va.dayOfYear(e),t,3)},L:function(e,t){return Wt(e.getMilliseconds(),t,3)},m:function(e,t){return Wt(e.getMonth()+1,t,2)},M:function(e,t){return Wt(e.getMinutes(),t,2)},p:function(e){return d[+(e.getHours()>=12)]},S:function(e,t){return Wt(e.getSeconds(),t,2)},U:function(e,t){return Wt(va.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Wt(va.mondayOfYear(e),t,2)},x:t(h),X:t(p),y:function(e,t){return Wt(e.getFullYear()%100,t,2)},Y:function(e,t){return Wt(e.getFullYear()%1e4,t,4)},Z:an,"%":function(){return"%"}},A={a:r,A:i,b:s,B:o,c:u,d:tn,e:tn,H:rn,I:rn,j:nn,L:un,m:en,M:sn,p:l,S:on,U:Jt,w:$t,W:Kt,x:a,X:f,y:Gt,Y:Qt,Z:Yt,"%":fn};return t}function Wt(e,t,n){var r=0>e?"-":"",i=(r?-e:e)+"",s=i.length;return r+(n>s?(new Array(n-s+1)).join(t)+i:i)}function Xt(e){return new RegExp("^(?:"+e.map(fu.requote).join("|")+")","i")}function Vt(e){for(var t=new l,n=-1,r=e.length;++n68?1900:2e3)}function en(e,t,n){ba.lastIndex=0;var r=ba.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function tn(e,t,n){ba.lastIndex=0;var r=ba.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function nn(e,t,n){ba.lastIndex=0;var r=ba.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function rn(e,t,n){ba.lastIndex=0;var r=ba.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function sn(e,t,n){ba.lastIndex=0;var r=ba.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function on(e,t,n){ba.lastIndex=0;var r=ba.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function un(e,t,n){ba.lastIndex=0;var r=ba.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function an(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=Eu(t)/60|0,i=Eu(t)%60;return n+Wt(r,"0",2)+Wt(i,"0",2)}function fn(e,t,n){wa.lastIndex=0;var r=wa.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ln(e){for(var t=e.length,n=-1;++n=0?1:-1,u=o*n,a=Math.cos(t),f=Math.sin(t),l=s*f,c=i*a+l*Math.cos(u),h=l*o*Math.sin(u);Ca.add(Math.atan2(h,c)),r=e,i=a,s=f}var t,n,r,i,s;ka.point=function(o,u){ka.point=e,r=(t=o)*Wu,i=Math.cos(u=(n=u)*Wu/2+qu/4),s=Math.sin(u)},ka.lineEnd=function(){e(t,n)}}function gn(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function yn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function bn(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function wn(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function En(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Sn(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function xn(e){return[Math.atan2(e[1],e[0]),nt(e[2])]}function Tn(e,t){return Eu(e[0]-t[0])u;++u)i.point((n=e[u])[0],n[1]);return void i.lineEnd()}var a=new Pn(n,e,null,!0),f=new Pn(n,null,a,!1);a.o=f,s.push(a),o.push(f),a=new Pn(r,e,null,!1),f=new Pn(r,null,a,!0),a.o=f,s.push(a),o.push(f)}}),o.sort(t),Dn(s),Dn(o),s.length){for(var u=0,a=n,f=o.length;f>u;++u)o[u].e=a=!a;for(var l,c,h=s[0];;){for(var p=h,d=!0;p.v;)if((p=p.n)===h)return;l=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(var u=0,f=l.length;f>u;++u)i.point((c=l[u])[0],c[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(d){l=p.p.z;for(var u=l.length-1;u>=0;--u)i.point((c=l[u])[0],c[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,l=p.z,d=!d}while(!p.v);i.lineEnd()}}}function Dn(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r0){for(E||(s.polygonStart(),E=!0),s.lineStart();++o1&&2&t&&n.push(n.pop().concat(n.shift())),p.push(n.filter(Bn))}var p,d,v,m=t(s),g=i.invert(r[0],r[1]),y={point:o,lineStart:a,lineEnd:f,polygonStart:function(){y.point=l,y.lineStart=c,y.lineEnd=h,p=[],d=[]},polygonEnd:function(){y.point=o,y.lineStart=a,y.lineEnd=f,p=fu.merge(p);var e=Un(g,d);p.length?(E||(s.polygonStart(),E=!0),_n(p,Fn,e,n,s)):e&&(E||(s.polygonStart(),E=!0),s.lineStart(),n(null,null,1,s),s.lineEnd()),E&&(s.polygonEnd(),E=!1),p=d=null},sphere:function(){s.polygonStart(),s.lineStart(),n(null,null,1,s),s.lineEnd(),s.polygonEnd()}},b=jn(),w=t(b),E=!1;return y}}function Bn(e){return e.length>1}function jn(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:S,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Fn(e,t){return((e=e.x)[0]<0?e[1]-zu-Fu:zu-e[1])-((t=t.x)[0]<0?t[1]-zu-Fu:zu-t[1])}function In(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(s,o){var u=s>0?qu:-qu,a=Eu(s-n);Eu(a-qu)0?zu:-zu),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(u,r),e.point(s,r),t=0):i!==u&&a>=qu&&(Eu(n-i)Fu?Math.atan((Math.sin(t)*(s=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*s*o)):(t+r)/2}function Rn(e,t,n,r){var i;if(null==e)i=n*zu,r.point(-qu,i),r.point(0,i),r.point(qu,i),r.point(qu,0),r.point(qu,-i),r.point(0,-i),r.point(-qu,-i),r.point(-qu,0),r.point(-qu,i);else if(Eu(e[0]-t[0])>Fu){var s=e[0]u;++u){var f=t[u],l=f.length;if(l)for(var c=f[0],h=c[0],p=c[1]/2+qu/4,d=Math.sin(p),v=Math.cos(p),m=1;;){m===l&&(m=0),e=f[m];var g=e[0],y=e[1]/2+qu/4,b=Math.sin(y),w=Math.cos(y),E=g-h,S=E>=0?1:-1,x=S*E,T=x>qu,N=d*b;if(Ca.add(Math.atan2(N*S*Math.sin(x),v*w+N*Math.cos(x))),s+=T?E+S*Ru:E,T^h>=n^g>=n){var C=bn(gn(c),gn(e));Sn(C);var k=bn(i,C);Sn(k);var L=(T^E>=0?-1:1)*nt(k[2]);(r>L||r===L&&(C[0]||C[1]))&&(o+=T^E>=0?1:-1)}if(!(m++))break;h=g,d=b,v=w,c=e}}return(-Fu>s||Fu>s&&-Fu>Ca)^1&o}function zn(e){function t(e,t){return Math.cos(e)*Math.cos(t)>s}function n(e){var n,s,a,f,l;return{lineStart:function(){f=a=!1,l=1},point:function(c,h){var p,d=[c,h],v=t(c,h),m=o?v?0:i(c,h):v?i(c+(0>c?qu:-qu),h):0;if(!n&&(f=a=v)&&e.lineStart(),v!==a&&(p=r(n,d),(Tn(n,p)||Tn(d,p))&&(d[0]+=Fu,d[1]+=Fu,v=t(d[0],d[1]))),v!==a)l=0,v?(e.lineStart(),p=r(d,n),e.point(p[0],p[1])):(p=r(n,d),e.point(p[0],p[1]),e.lineEnd()),n=p;else if(u&&n&&o^v){var g;m&s||!(g=r(d,n,!0))||(l=0,o?(e.lineStart(),e.point(g[0][0],g[0][1]),e.point(g[1][0],g[1][1]),e.lineEnd()):(e.point(g[1][0],g[1][1]),e.lineEnd(),e.lineStart(),e.point(g[0][0],g[0][1])))}!v||n&&Tn(n,d)||e.point(d[0],d[1]),n=d,a=v,s=m},lineEnd:function(){a&&e.lineEnd(),n=null},clean:function(){return l|(f&&a)<<1}}}function r(e,t,n){var r=gn(e),i=gn(t),o=[1,0,0],u=bn(r,i),a=yn(u,u),f=u[0],l=a-f*f;if(!l)return!n&&e;var c=s*a/l,h=-s*f/l,p=bn(o,u),d=En(o,c),v=En(u,h);wn(d,v);var m=p,g=yn(d,m),y=yn(m,m),b=g*g-y*(yn(d,d)-1);if(!(0>b)){var w=Math.sqrt(b),E=En(m,(-g-w)/y);if(wn(E,d),E=xn(E),!n)return E;var S,x=e[0],T=t[0],N=e[1],C=t[1];x>T&&(S=x,x=T,T=S);var k=T-x,L=Eu(k-qu)k;if(!L&&N>C&&(S=N,N=C,C=S),A?L?N+C>0^E[1]<(Eu(E[0]-x)qu^(x<=E[0]&&E[0]<=T)){var O=En(m,(-g+w)/y);return wn(O,d),[E,xn(O)]}}}function i(t,n){var r=o?e:qu-e,i=0;return-r>t?i|=1:t>r&&(i|=2),-r>n?i|=4:n>r&&(i|=8),i}var s=Math.cos(e),o=s>0,u=Eu(s)>Fu,a=mr(e,6*Wu);return Hn(t,n,a,o?[0,-e]:[-qu,e-qu])}function Wn(e,t,n,r){return function(i){var s,o=i.a,u=i.b,a=o.x,f=o.y,l=u.x,c=u.y,h=0,p=1,d=l-a,v=c-f;if(s=e-a,d||!(s>0)){if(s/=d,0>d){if(h>s)return;p>s&&(p=s)}else if(d>0){if(s>p)return;s>h&&(h=s)}if(s=n-a,d||!(0>s)){if(s/=d,0>d){if(s>p)return;s>h&&(h=s)}else if(d>0){if(h>s)return;p>s&&(p=s)}if(s=t-f,v||!(s>0)){if(s/=v,0>v){if(h>s)return;p>s&&(p=s)}else if(v>0){if(s>p)return;s>h&&(h=s)}if(s=r-f,v||!(0>s)){if(s/=v,0>v){if(s>p)return;s>h&&(h=s)}else if(v>0){if(h>s)return;p>s&&(p=s)}return h>0&&(i.a={x:a+h*d,y:f+h*v}),1>p&&(i.b={x:a+p*d,y:f+p*v}),i}}}}}}function Xn(e,t,n,r){function i(r,i){return Eu(r[0]-e)0?0:3:Eu(r[0]-n)0?2:1:Eu(r[1]-t)0?1:0:i>0?3:2}function s(e,t){return o(e.x,t.x)}function o(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(u){function a(e){for(var t=0,n=m.length,r=e[1],i=0;n>i;++i)for(var s,o=1,u=m[i],a=u.length,f=u[0];a>o;++o)s=u[o],f[1]<=r?s[1]>r&&et(f,s,e)>0&&++t:s[1]<=r&&et(f,s,e)<0&&--t,f=s;return 0!==t}function f(s,u,a,f){var l=0,c=0;if(null==s||(l=i(s,a))!==(c=i(u,a))||o(s,u)<0^a>0){do f.point(0===l||3===l?e:n,l>1?r:t);while((l=(l+a+4)%4)!==c)}else f.point(u[0],u[1])}function l(i,s){return i>=e&&n>=i&&s>=t&&r>=s}function c(e,t){l(e,t)&&u.point(e,t)}function h(){A.point=d,m&&m.push(g=[]),T=!0,x=!1,E=S=NaN}function p(){v&&(d(y,b),w&&x&&k.rejoin(),v.push(k.buffer())),A.point=c,x&&u.lineEnd()}function d(e,t){e=Math.max(-Ra,Math.min(Ra,e)),t=Math.max(-Ra,Math.min(Ra,t));var n=l(e,t);if(m&&g.push([e,t]),T)y=e,b=t,w=n,T=!1,n&&(u.lineStart(),u.point(e,t));else if(n&&x)u.point(e,t);else{var r={a:{x:E,y:S},b:{x:e,y:t}};L(r)?(x||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),n||u.lineEnd(),N=!1):n&&(u.lineStart(),u.point(e,t),N=!1)}E=e,S=t,x=n}var v,m,g,y,b,w,E,S,x,T,N,C=u,k=jn(),L=Wn(e,t,n,r),A={point:c,lineStart:h,lineEnd:p,polygonStart:function(){u=k,v=[],m=[],N=!0},polygonEnd:function(){u=C,v=fu.merge(v);var t=a([e,r]),n=N&&t,i=v.length;(n||i)&&(u.polygonStart(),n&&(u.lineStart(),f(null,null,1,u),u.lineEnd()),i&&_n(v,s,t,f,u),u.polygonEnd()),v=m=g=null}};return A}}function Vn(e){var t=0,n=qu/3,r=ar(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*qu/180,n=e[1]*qu/180):[t/qu*180,n/qu*180]},i}function $n(e,t){function n(e,t){var n=Math.sqrt(s-2*i*Math.sin(t))/i;return[n*Math.sin(e*=i),o-n*Math.cos(e)]}var r=Math.sin(e),i=(r+Math.sin(t))/2,s=1+r*(2*i-r),o=Math.sqrt(s)/i;return n.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/i,nt((s-(e*e+n*n)*i*i)/(2*i))]},n}function Jn(){function e(e,t){za+=i*e-r*t,r=e,i=t}var t,n,r,i;Ja.point=function(s,o){Ja.point=e,t=r=s,n=i=o},Ja.lineEnd=function(){e(t,n)}}function Kn(e,t){Wa>e&&(Wa=e),e>Va&&(Va=e),Xa>t&&(Xa=t),t>$a&&($a=t)}function Qn(){function e(e,t){o.push("M",e,",",t,s)}function t(e,t){o.push("M",e,",",t),u.point=n}function n(e,t){o.push("L",e,",",t)}function r(){u.point=e}function i(){o.push("Z")}var s=Gn(4.5),o=[],u={point:e,lineStart:function(){u.point=t},lineEnd:r,polygonStart:function(){u.lineEnd=i},polygonEnd:function(){u.lineEnd=r,u.point=e},pointRadius:function(e){return s=Gn(e),u},result:function(){if(o.length){var e=o.join("");return o=[],e}}};return u}function Gn(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+ -2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Yn(e,t){Oa+=e,Ma+=t,++_a}function Zn(){function e(e,r){var i=e-t,s=r-n,o=Math.sqrt(i*i+s*s);Da+=o*(t+e)/2,Pa+=o*(n+r)/2,Ha+=o,Yn(t=e,n=r)}var t,n;Qa.point=function(r,i){Qa.point=e,Yn(t=r,n=i)}}function er(){Qa.point=Yn}function tr(){function e(e,t){var n=e-r,s=t-i,o=Math.sqrt(n*n+s*s);Da+=o*(r+e)/2,Pa+=o*(i+t)/2,Ha+=o,o=i*e-r*t,Ba+=o*(r+e),ja+=o*(i+t),Fa+=3*o,Yn(r=e,i=t)}var t,n,r,i;Qa.point=function(s,o){Qa.point=e,Yn(t=r=s,n=i=o)},Qa.lineEnd=function(){e(t,n)}}function nr(e){function t(t,n){e.moveTo(t+o,n),e.arc(t,n,o,0,Ru)}function n(t,n){e.moveTo(t,n),u.point=r}function r(t,n){e.lineTo(t,n)}function i(){u.point=t}function s(){e.closePath()}var o=4.5,u={point:t,lineStart:function(){u.point=n},lineEnd:i,polygonStart:function(){u.lineEnd=s},polygonEnd:function(){u.lineEnd=i,u.point=t},pointRadius:function(e){return o=e,u},result:S};return u}function rr(e){function t(e){return(u?r:n)(e)}function n(t){return or(t,function(n,r){n=e(n,r),t.point(n[0],n[1])})}function r(t){function n(n,r){n=e(n,r),t.point(n[0],n[1])}function r(){b=NaN,T.point=s,t.lineStart()}function s(n,r){var s=gn([n,r]),o=e(n,r);i(b,w,y,E,S,x,b=o[0],w=o[1],y=n,E=s[0],S=s[1],x=s[2],u,t),t.point(b,w)}function o(){T.point=n,t.lineEnd()}function a(){r(),T.point=f,T.lineEnd=l}function f(e,t){s(c=e,h=t),p=b,d=w,v=E,m=S,g=x,T.point=s}function l(){i(b,w,y,E,S,x,p,d,c,v,m,g,u,t),T.lineEnd=o,o()}var c,h,p,d,v,m,g,y,b,w,E,S,x,T={point:n,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),T.lineStart=a},polygonEnd:function(){t.polygonEnd(),T.lineStart=r}};return T}function i(t,n,r,u,a,f,l,c,h,p,d,v,m,g){var y=l-t,b=c-n,w=y*y+b*b;if(w>4*s&&m--){var E=u+p,S=a+d,x=f+v,T=Math.sqrt(E*E+S*S+x*x),N=Math.asin(x/=T),C=Eu(Eu(x)-1)s||Eu((y*O+b*M)/w-.5)>.3||o>u*p+a*d+f*v)&&(i(t,n,r,u,a,f,L,A,C,E/=T,S/=T,x,m,g),g.point(L,A),i(L,A,C,E,S,x,l,c,h,p,d,v,m,g))}}var s=.5,o=Math.cos(30*Wu),u=16;return t.precision=function(e){return arguments.length?(u=(s=e*e)>0&&16,t):Math.sqrt(s)},t}function ir(e){var t=rr(function(t,n){return e([t*Xu,n*Xu])});return function(e){return fr(t(e))}}function sr(e){this.stream=e}function or(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function ur(e){return ar(function(){return e})()}function ar(e){function t(e){return e=u(e[0]*Wu,e[1]*Wu),[e[0]*h+a,f-e[1]*h]}function n(e){return e=u.invert((e[0]-a)/h,(f-e[1])/h),e&&[e[0]*Xu,e[1]*Xu]}function r(){u=On(o=hr(g,y,w),s);var e=s(v,m);return a=p-e[0]*h,f=d+e[1]*h,i()}function i(){return l&&(l.valid=!1,l=null),t}var s,o,u,a,f,l,c=rr(function(e,t){return e=s(e,t),[e[0]*h+a,f-e[1]*h]}),h=150,p=480,d=250,v=0,m=0,g=0,y=0,w=0,E=qa,S=b,x=null,T=null;return t.stream=function(e){return l&&(l.valid=!1),l=fr(E(o,c(S(e)))),l.valid=!0,l},t.clipAngle=function(e){return arguments.length?(E=null==e?(x=e,qa):zn((x=+e)*Wu),i()):x},t.clipExtent=function(e){return arguments.length?(T=e,S=e?Xn(e[0][0],e[0][1],e[1][0],e[1][1]):b,i()):T},t.scale=function(e){return arguments.length?(h=+e,r()):h},t.translate=function(e){return arguments.length?(p=+e[0],d=+e[1],r()):[p,d]},t.center=function(e){return arguments.length?(v=e[0]%360*Wu,m=e[1]%360*Wu,r()):[v*Xu,m*Xu]},t.rotate=function(e){return arguments.length?(g=e[0]%360*Wu,y=e[1]%360*Wu,w=e.length>2?e[2]%360*Wu:0,r()):[g*Xu,y*Xu,w*Xu]},fu.rebind(t,c,"precision"),function(){return s=e.apply(this,arguments),t.invert=s.invert&&n,r()}}function fr(e){return or(e,function(t,n){e.point(t*Wu,n*Wu)})}function lr(e,t){return[e,t]}function cr(e,t){return[e>qu?e-Ru:-qu>e?e+Ru:e,t]}function hr(e,t,n){return e?t||n?On(dr(e),vr(t,n)):dr(e):t||n?vr(t,n):cr}function pr(e){return function(t,n){return t+=e,[t>qu?t-Ru:-qu>t?t+Ru:t,n]}}function dr(e){var t=pr(e);return t.invert=pr(-e),t}function vr(e,t){function n(e,t){var n=Math.cos(t),u=Math.cos(e)*n,a=Math.sin(e)*n,f=Math.sin(t),l=f*r+u*i;return[Math.atan2(a*s-l*o,u*r-f*i),nt(l*s+a*o)]}var r=Math.cos(e),i=Math.sin(e),s=Math.cos(t),o=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),u=Math.cos(e)*n,a=Math.sin(e)*n,f=Math.sin(t),l=f*s-a*o;return[Math.atan2(a*s+f*o,u*r+l*i),nt(l*r-u*i)]},n}function mr(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,s,o,u){var a=o*t;null!=i?(i=gr(n,i),s=gr(n,s),(o>0?s>i:i>s)&&(i+=o*Ru)):(i=e+o*Ru,s=e-.5*a);for(var f,l=i;o>0?l>s:s>l;l-=a)u.point((f=xn([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],f[1])}}function gr(e,t){var n=gn(t);n[0]-=e,Sn(n);var r=tt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Fu)%(2*Math.PI)}function yr(e,t,n){var r=fu.range(e,t-Fu,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function br(e,t,n){var r=fu.range(e,t-Fu,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function wr(e){return e.source}function Er(e){return e.target}function Sr(e,t,n,r){var i=Math.cos(t),s=Math.sin(t),o=Math.cos(r),u=Math.sin(r),a=i*Math.cos(e),f=i*Math.sin(e),l=o*Math.cos(n),c=o*Math.sin(n),h=2*Math.asin(Math.sqrt(ot(r-t)+i*o*ot(n-e))),p=1/Math.sin(h),d=h?function(e){var t=Math.sin(e*=h)*p,n=Math.sin(h-e)*p,r=n*a+t*l,i=n*f+t*c,o=n*s+t*u;return[Math.atan2(i,r)*Xu,Math.atan2(o,Math.sqrt(r*r+i*i))*Xu]}:function(){return[e*Xu,t*Xu]};return d.distance=h,d}function xr(){function e(e,i){var s=Math.sin(i*=Wu),o=Math.cos(i),u=Eu((e*=Wu)-t),a=Math.cos(u);Ga+=Math.atan2(Math.sqrt((u=o*Math.sin(u))*u+(u=r*s-n*o*a)*u),n*s+r*o*a),t=e,n=s,r=o}var t,n,r;Ya.point=function(i,s){t=i*Wu,n=Math.sin(s*=Wu),r=Math.cos(s),Ya.point=e},Ya.lineEnd=function(){Ya.point=Ya.lineEnd=S}}function Tr(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),s=e(r*i);return[s*i*Math.sin(t),s*Math.sin(n)]}return n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),s=Math.sin(i),o=Math.cos(i);return[Math.atan2(e*s,r*o),Math.asin(r&&n*s/r)]},n}function Nr(e,t){function n(e,t){o>0?-zu+Fu>t&&(t=-zu+Fu):t>zu-Fu&&(t=zu-Fu);var n=o/Math.pow(i(t),s);return[n*Math.sin(s*e),o-n*Math.cos(s*e)]}var r=Math.cos(e),i=function(e){return Math.tan(qu/4+e/2)},s=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(i(t)/i(e)),o=r*Math.pow(i(e),s)/s;return s?(n.invert=function(e,t){var n=o-t,r=Z(s)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/s,2*Math.atan(Math.pow(o/r,1/s))-zu]},n):kr}function Cr(e,t){function n(e,t){var n=s-t;return[n*Math.sin(i*e),s-n*Math.cos(i*e)]}var r=Math.cos(e),i=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),s=r/i+e;return Eu(i)i;i++){for(;r>1&&et(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Dr(e,t){return e[0]-t[0]||e[1]-t[1]}function Pr(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function Hr(e,t,n,r){var i=e[0],s=n[0],o=t[0]-i,u=r[0]-s,a=e[1],f=n[1],l=t[1]-a,c=r[1]-f,h=(u*(a-f)-c*(i-s))/(c*o-u*l);return[i+h*o,a+h*l]}function Br(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function jr(){ii(this),this.edge=this.site=this.circle=null}function Fr(e){var t=cf.pop()||new jr;return t.site=e,t}function Ir(e){Kr(e),af.remove(e),cf.push(e),ii(e)}function qr(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},s=e.P,o=e.N,u=[e];Ir(e);for(var a=s;a.circle&&Eu(n-a.circle.x)l;++l)f=u[l],a=u[l-1],ti(f.edge,a.site,f.site,i);a=u[0],f=u[c-1],f.edge=Zr(a.site,f.site,null,i),Jr(a),Jr(f)}function Rr(e){for(var t,n,r,i,s=e.x,o=e.y,u=af._;u;)if(r=Ur(u,o)-s,r>Fu)u=u.L;else{if(i=s-zr(u,o),!(i>Fu)){r>-Fu?(t=u.P,n=u):i>-Fu?(t=u,n=u.N):t=n=u;break}if(!u.R){t=u;break}u=u.R}var a=Fr(e);if(af.insert(t,a),t||n){if(t===n)return Kr(t),n=Fr(t.site),af.insert(a,n),a.edge=n.edge=Zr(t.site,a.site),Jr(t),void Jr(n);if(!n)return void (a.edge=Zr(t.site,a.site));Kr(t),Kr(n);var f=t.site,l=f.x,c=f.y,h=e.x-l,p=e.y-c,d=n.site,v=d.x-l,m=d.y-c,g=2*(h*m-p*v),y=h*h+p*p,b=v*v+m*m,w={x:(m*y-p*b)/g+l,y:(h*b-v*y)/g+c};ti(n.edge,f,d,w),a.edge=Zr(f,e,null,w),n.edge=Zr(e,d,null,w),Jr(t),Jr(n)}}function Ur(e,t){var n=e.site,r=n.x,i=n.y,s=i-t;if(!s)return r;var o=e.P;if(!o)return-1/0;n=o.site;var u=n.x,a=n.y,f=a-t;if(!f)return u;var l=u-r,c=1/s-1/f,h=l/f;return c?(-h+Math.sqrt(h*h-2*c*(l*l/(-2*f)-a+f/2+i-s/2)))/c+r:(r+u)/2}function zr(e,t){var n=e.N;if(n)return Ur(n,t);var r=e.site;return r.y===t?r.x:1/0}function Wr(e){this.site=e,this.edges=[]}function Xr(e){for(var t,n,r,i,s,o,u,a,f,l,c=e[0][0],h=e[1][0],p=e[0][1],d=e[1][1],v=uf,m=v.length;m--;)if(s=v[m],s&&s.prepare())for(u=s.edges,a=u.length,o=0;a>o;)l=u[o].end(),r=l.x,i=l.y,f=u[++o%a].start(),t=f.x,n=f.y,(Eu(r-t)>Fu||Eu(i-n)>Fu)&&(u.splice(o,0,new ni(ei(s.site,l,Eu(r-c)Fu?{x:c,y:Eu(t-c)Fu?{x:Eu(n-d)Fu?{x:h,y:Eu(t-h)Fu?{x:Eu(n-p)=-Iu)){var p=a*a+f*f,d=l*l+c*c,v=(c*p-f*d)/h,m=(a*d-l*p)/h,c=m+u,g=hf.pop()||new $r;g.arc=e,g.site=i,g.x=v+o,g.y=c+Math.sqrt(v*v+m*m),g.cy=c,e.circle=g;for(var y=null,b=lf._;b;)if(g.ym||m>=u)return;if(h>d){if(s){if(s.y>=f)return}else s={x:m,y:a};n={x:m,y:f}}else{if(s){if(s.yr||r>1)if(h>d){if(s){if(s.y>=f)return}else s={x:(a-i)/r,y:a};n={x:(f-i)/r,y:f}}else{if(s){if(s.yp){if(s){if(s.x>=u)return}else s={x:o,y:r*o+i};n={x:u,y:r*u+i}}else{if(s){if(s.xs||c>o||r>h||i>p)){if(d=e.point){var d,v=t-e.x,m=n-e.y,g=v*v+m*m;if(a>g){var y=Math.sqrt(a=g);r=t-y,i=n-y,s=t+y,o=n+y,u=d}}for(var b=e.nodes,w=.5*(l+h),E=.5*(c+p),S=t>=w,x=n>=E,T=x<<1|S,N=T+4;N>T;++T)if(e=b[3&T])switch(3&T){case 0:f(e,l,c,w,E);break;case 1:f(e,w,c,h,E);break;case 2:f(e,l,E,w,p);break;case 3:f(e,w,E,h,p)}}}(e,r,i,s,o),u}function mi(e,t){e=fu.rgb(e),t=fu.rgb(t);var n=e.r,r=e.g,i=e.b,s=t.r-n,o=t.g-r,u=t.b-i;return function(e){return"#"+Et(Math.round(n+s*e))+Et(Math.round(r+o*e))+Et(Math.round(i+u*e))}}function gi(e,t){var n,r={},i={};for(n in e)n in t?r[n]=wi(e[n],t[n]):i[n]=e[n];for(n in t)n in e||(i[n]=t[n]);return function(e){for(n in r)i[n]=r[n](e);return i}}function yi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function bi(e,t){var n,r,i,s=df.lastIndex=vf.lastIndex=0,o=-1,u=[],a=[];for(e+="",t+="";(n=df.exec(e))&&(r=vf.exec(t));)(i=r.index)>s&&(i=t.slice(s,i),u[o]?u[o]+=i:u[++o]=i),(n=n[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,a.push({i:o,x:yi(n,r)})),s=vf.lastIndex;return sr;++r)u[(n=a[r]).i]=n.x(e);return u.join("")})}function wi(e,t){for(var n,r=fu.interpolators.length;--r>=0&&!(n=fu.interpolators[r](e,t)););return n}function Ei(e,t){var n,r=[],i=[],s=e.length,o=t.length,u=Math.min(e.length,t.length);for(n=0;u>n;++n)r.push(wi(e[n],t[n]));for(;s>n;++n)i[n]=e[n];for(;o>n;++n)i[n]=t[n];return function(e){for(n=0;u>n;++n)i[n]=r[n](e);return i}}function Si(e){return function(t){return 0>=t?0:t>=1?1:e(t)}}function xi(e){return function(t){return 1-e(1-t)}}function Ti(e){return function(t){return.5*(.5>t?e(2*t):2-e(2-2*t))}}function Ni(e){return e*e}function Ci(e){return e*e*e}function ki(e){if(0>=e)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(.5>e?n:3*(e-t)+n-.75)}function Li(e){return function(t){return Math.pow(t,e)}}function Ai(e){return 1-Math.cos(e*zu)}function Oi(e){return Math.pow(2,10*(e-1))}function Mi(e){return 1-Math.sqrt(1-e*e)}function _i(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Ru*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Ru/t)}}function Di(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function Pi(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Hi(e,t){e=fu.hcl(e),t=fu.hcl(t);var n=e.h,r=e.c,i=e.l,s=t.h-n,o=t.c-r,u=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(s)?(s=0,n=isNaN(n)?t.h:n):s>180?s-=360:-180>s&&(s+=360),function(e){return ct(n+s*e,r+o*e,i+u*e)+""}}function Bi(e,t){e=fu.hsl(e),t=fu.hsl(t);var n=e.h,r=e.s,i=e.l,s=t.h-n,o=t.s-r,u=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(s)?(s=0,n=isNaN(n)?t.h:n):s>180?s-=360:-180>s&&(s+=360),function(e){return ft(n+s*e,r+o*e,i+u*e)+""}}function ji(e,t){e=fu.lab(e),t=fu.lab(t);var n=e.l,r=e.a,i=e.b,s=t.l-n,o=t.a-r,u=t.b-i;return function(e){return pt(n+s*e,r+o*e,i+u*e)+""}}function Fi(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Ii(e){var t=[e.a,e.b],n=[e.c,e.d],r=Ri(t),i=qi(t,n),s=Ri(Ui(n,t,-i))||0;t[0]*n[1]180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(zi(n)+"rotate(",null,")")-2,x:yi(e,t)})):t&&n.push(zi(n)+"rotate("+t+")")}function Vi(e,t,n,r){e!==t?r.push({i:n.push(zi(n)+"skewX(",null,")")-2,x:yi(e,t)}):t&&n.push(zi(n)+"skewX("+t+")")}function $i(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(zi(n)+"scale(",null,",",null,")");r.push({i:i-4,x:yi(e[0],t[0])},{i:i-2,x:yi(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(zi(n)+"scale("+t+")")}function Ji(e,t){var n=[],r=[];return e=fu.transform(e),t=fu.transform(t),Wi(e.translate,t.translate,n,r),Xi(e.rotate,t.rotate,n,r),Vi(e.skew,t.skew,n,r),$i(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,i=-1,s=r.length;++i=0;)n.push(i[r])}function us(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(s=e.children)&&(i=s.length))for(var i,s,o=-1;++on;++n)(t=e[n][1])>i&&(r=n,i=t);return r}function ys(e){return e.reduce(bs,0)}function bs(e,t){return e+t[1]}function ws(e,t){return Es(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Es(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,s=[];++n<=t;)s[n]=i*n+r;return s}function Ss(e){return[fu.min(e),fu.max(e)]}function xs(e,t){return e.value-t.value}function Ts(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Ns(e,t){e._pack_next=t,t._pack_prev=e}function Cs(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function ks(e){function t(e){l=Math.min(e.x-e.r,l),c=Math.max(e.x+e.r,c),h=Math.min(e.y-e.r,h),p=Math.max(e.y+e.r,p)}if((n=e.children)&&(f=n.length)){var n,r,i,s,o,u,a,f,l=1/0,c=-1/0,h=1/0,p=-1/0;if(n.forEach(Ls),r=n[0],r.x=-r.r,r.y=0,t(r),f>1&&(i=n[1],i.x=i.r,i.y=0,t(i),f>2))for(s=n[2],Ms(r,i,s),t(s),Ts(r,s),r._pack_prev=s,Ts(s,i),i=r._pack_next,o=3;f>o;o++){Ms(r,i,s=n[o]);var d=0,v=1,m=1;for(u=i._pack_next;u!==i;u=u._pack_next,v++)if(Cs(u,s)){d=1;break}if(1==d)for(a=r._pack_prev;a!==u._pack_prev&&!Cs(a,s);a=a._pack_prev,m++);d?(m>v||v==m&&i.ro;o++)s=n[o],s.x-=g,s.y-=y,b=Math.max(b,s.r+Math.sqrt(s.x*s.x+s.y*s.y));e.r=b,n.forEach(As)}}function Ls(e){e._pack_next=e._pack_prev=e}function As(e){delete e._pack_next,delete e._pack_prev}function Os(e,t,n,r){var i=e.children;if(e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r,i)for(var s=-1,o=i.length;++s=0;)t=i[s],t.z+=n,t.m+=n,n+=t.s+(r+=t.c)}function js(e,t,n){return e.a.parent===t.parent?e.a:n}function Fs(e){return 1+fu.max(e,function(e){return e.y})}function Is(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function qs(e){var t=e.children;return t&&t.length?qs(t[0]):e}function Rs(e){var t,n=e.children;return n&&(t=n.length)?Rs(n[t-1]):e}function Us(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function zs(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],s=e.dy-t[0]-t[2];return 0>i&&(n+=i/2,i=0),0>s&&(r+=s/2,s=0),{x:n,y:r,dx:i,dy:s}}function Ws(e){var t=e[0],n=e[e.length-1];return n>t?[t,n]:[n,t]}function Xs(e){return e.rangeExtent?e.rangeExtent():Ws(e.range())}function Vs(e,t,n,r){var i=n(e[0],e[1]),s=r(t[0],t[1]);return function(e){return s(i(e))}}function $s(e,t){var n,r=0,i=e.length-1,s=e[r],o=e[i];return s>o&&(n=r,r=i,i=n,n=s,s=o,o=n),e[r]=t.floor(s),e[i]=t.ceil(o),e}function Js(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Cf}function Ks(e,t,n,r){var i=[],s=[],o=0,u=Math.min(e.length,t.length)-1;for(e[u]2?Ks:Vs,a=r?Qi:Ki;return o=i(e,t,a,n),u=i(t,e,a,wi),s}function s(e){return o(e)}var o,u;return s.invert=function(e){return u(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},s.range=function(e){return arguments.length?(t=e,i()):t},s.rangeRound=function(e){return s.range(e).interpolate(Fi)},s.clamp=function(e){return arguments.length?(r=e,i()):r},s.interpolate=function(e){return arguments.length?(n=e,i()):n},s.ticks=function(t){return eo(e,t)},s.tickFormat=function(t,n){return to(e,t,n)},s.nice=function(t){return Ys(e,t),i()},s.copy=function(){return Qs(e,t,n,r)},i()}function Gs(e,t){return fu.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Ys(e,t){return $s(e,Js(Zs(e,t)[2])),$s(e,Js(Zs(e,t)[2])),e}function Zs(e,t){null==t&&(t=10);var n=Ws(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),s=t/r*i;return.15>=s?i*=10:.35>=s?i*=5:.75>=s&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function eo(e,t){return fu.range.apply(fu,Zs(e,t))}function to(e,t,n){var r=Zs(e,t);if(n){var i=pa.exec(n);if(i.shift(),"s"===i[8]){var s=fu.formatPrefix(Math.max(Eu(r[0]),Eu(r[1])));return i[7]||(i[7]="."+no(s.scale(r[2]))),i[8]="f",n=fu.format(i.join("")),function(e){return n(s.scale(e))+s.symbol}}i[7]||(i[7]="."+ro(i[8],r)),n=i.join("")}else n=",."+no(r[2])+"f";return fu.format(n)}function no(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function ro(e,t){var n=no(t[2]);return e in kf?Math.abs(n-no(Math.max(Eu(t[0]),Eu(t[1]))))+ +("e"!==e):n-2*("%"===e)}function io(e,t,n,r){function i(e){return(n?Math.log(0>e?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function s(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function o(t){return e(i(t))}return o.invert=function(t){return s(e.invert(t))},o.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),o):r},o.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),o):t},o.nice=function(){var t=$s(r.map(i),n?Math:Af);return e.domain(t),r=t.map(s),o},o.ticks=function(){var e=Ws(r),o=[],u=e[0],a=e[1],f=Math.floor(i(u)),l=Math.ceil(i(a)),c=t%1?2:t;if(isFinite(l-f)){if(n){for(;l>f;f++)for(var h=1;c>h;h++)o.push(s(f)*h);o.push(s(f))}else for(o.push(s(f));f++0;h--)o.push(s(f)*h);for(f=0;o[f]a;l--);o=o.slice(f,l)}return o},o.tickFormat=function(e,n){if(!arguments.length)return Lf;arguments.length<2?n=Lf:"function"!=typeof n&&(n=fu.format(n));var r=Math.max(1,t*e/o.ticks().length);return function(e){var o=e/s(Math.round(i(e)));return t-.5>o*t&&(o*=t),r>=o?n(e):""}},o.copy=function(){return io(e.copy(),t,n,r)},Gs(o,e)}function so(e,t,n){function r(t){return e(i(t))}var i=oo(t),s=oo(1/t);return r.invert=function(t){return s(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(i)),r):n},r.ticks=function(e){return eo(n,e)},r.tickFormat=function(e,t){return to(n,e,t)},r.nice=function(e){return r.domain(Ys(n,e))},r.exponent=function(o){return arguments.length?(i=oo(t=o),s=oo(1/t),e.domain(n.map(i)),r):t},r.copy=function(){return so(e.copy(),t,n)},Gs(r,e)}function oo(e){return function(t){return 0>t?-Math.pow(-t,e):Math.pow(t,e)}}function uo(e,t){function n(n){return s[((i.get(n)||("range"===t.t?i.set(n,e.push(n)):NaN))-1)%s.length]}function r(t,n){return fu.range(e.length).map(function(e){return t+n*e})}var i,s,o;return n.domain=function(r){if(!arguments.length)return e;e=[],i=new l;for(var s,o=-1,u=r.length;++on?[NaN,NaN]:[n>0?u[n-1]:e[0],nt?NaN:t/s+e,[t,t+1/s]},r.copy=function(){return fo(e,t,n)},i()}function lo(e,t){function n(n){return n>=n?t[fu.bisect(e,n)]:void 0}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.invertExtent=function(n){return n=t.indexOf(n),[e[n-1],e[n]]},n.copy=function(){return lo(e,t)},n}function co(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return eo(e,t)},t.tickFormat=function(t,n){return to(e,t,n)},t.copy=function(){return co(e)},t}function ho(){return 0}function po(e){return e.innerRadius}function vo(e){return e.outerRadius}function mo(e){return e.startAngle}function go(e){return e.endAngle}function yo(e){return e&&e.padAngle}function bo(e,t,n,r){return(e-n)*t-(t-r)*e>0?0:1}function wo(e,t,n,r,i){var s=e[0]-t[0],o=e[1]-t[1],u=(i?r:-r)/Math.sqrt(s*s+o*o),a=u*o,f=-u*s,l=e[0]+a,c=e[1]+f,h=t[0]+a,p=t[1]+f,d=(l+h)/2,v=(c+p)/2,m=h-l,g=p-c,y=m*m+g*g,b=n-r,w=l*p-h*c,E=(0>g?-1:1)*Math.sqrt(Math.max(0,b*b*y-w*w)),S=(w*g-m*E)/y,x=(-w*m-g*E)/y,T=(w*g+m*E)/y,N=(-w*m+g*E)/y,C=S-d,k=x-v,L=T-d,A=N-v;return C*C+k*k>L*L+A*A&&(S=T,x=N),[[S-a,x-f],[S*n/b,x*n/b]]}function Eo(e){function t(t){function o(){f.push("M",s(e(l),u))}for(var a,f=[],l=[],c=-1,h=t.length,p=kt(n),d=kt(r);++c1?e.join("L"):e+"Z"}function xo(e){return e.join("L")+"Z"}function To(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t1&&i.push("H",r[0]),i.join("")}function No(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t1){u=t[1],s=e[a],a++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1];for(var f=2;f9&&(i=3*t/Math.sqrt(i),o[u]=i*n,o[u+1]=i*r));for(u=-1;++u<=a;)i=(e[Math.min(a,u+1)][0]-e[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),s.push([i||0,o[u]*i||0]);return s}function Ro(e){return e.length<3?So(e):e[0]+Oo(e,qo(e))}function Uo(e){for(var t,n,r,i=-1,s=e.length;++i=t?o(e-t):void (f.c=o)}function o(n){var i=d.active,s=d[i];s&&(s.timer.c=null,s.timer.t=NaN,--d.count,delete d[i],s.event&&s.event.interrupt.call(e,e.__data__,s.index));for(var o in d)if(r>+o){var l=d[o];l.timer.c=null,l.timer.t=NaN,--d.count,delete d[o]}f.c=u,_t(function(){return f.c&&u(n||1)&&(f.c=null,f.t=NaN),1},0,a),d.active=r,v.event&&v.event.start.call(e,e.__data__,t),p=[],v.tween.forEach(function(n,r){(r=r.call(e,e.__data__,t))&&p.push(r)}),h=v.ease,c=v.duration}function u(i){for(var s=i/c,o=h(s),u=p.length;u>0;)p[--u].call(e,o);return s>=1?(v.event&&v.event.end.call(e,e.__data__,t),--d.count?delete d[r]:delete e[n],1):void 0}var a,f,c,h,p,d=e[n]||(e[n]={active:0,count:0}),v=d[r];v||(a=i.time,f=_t(s,0,a),v=d[r]={tween:new l,time:a,timer:f,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++d.count)}function nu(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"})}function ru(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"})}function iu(e){return e.toISOString()}function su(e,t,n){function r(t){return e(t)}function i(e,n){var r=e[1]-e[0],i=r/n,s=fu.bisect(el,i);return s==el.length?[t.year,Zs(e.map(function(e){return e/31536e6}),n)[2]]:s?t[i/el[s-1]1?{floor:function(t){for(;n(t=e.floor(t));)t=ou(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=ou(+t+1);return t}}:e))},r.ticks=function(e,t){var n=Ws(r.domain()),s=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return s&&(e=s[0],t=s[1]),e.range(n[0],ou(+n[1]+1),1>t?1:t)},r.tickFormat=function(){return n},r.copy=function(){return su(e.copy(),t,n)},Gs(r,e)}function ou(e){return new Date(e)}function uu(e){return JSON.parse(e.responseText)}function au(e){var t=hu.createRange();return t.selectNode(hu.body),t.createContextualFragment(e.responseText)}var fu={version:"3.5.17"},lu=[].slice,cu=function(e){return lu.call(e)},hu=this.document;if(hu)try{cu(hu.documentElement.childNodes)[0].nodeType}catch(pu){cu=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+(new Date)}),hu)try{hu.createElement("DIV").style.setProperty("opacity",0,"")}catch(du){var vu=this.Element.prototype,mu=vu.setAttribute,gu=vu.setAttributeNS,yu=this.CSSStyleDeclaration.prototype,bu=yu.setProperty;vu.setAttribute=function(e,t){mu.call(this,e,t+"")},vu.setAttributeNS=function(e,t,n){gu.call(this,e,t,n+"")},yu.setProperty=function(e,t,n){bu.call(this,e,t+"",n)}}fu.ascending=r,fu.descending=function(e,t){return e>t?-1:t>e?1:t>=e?0:NaN},fu.min=function(e,t){var n,r,i=-1,s=e.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++ir&&(n=r)}else{for(;++i=r){n=r;break}for(;++ir&&(n=r)}return n},fu.max=function(e,t){var n,r,i=-1,s=e.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++in&&(n=r)}else{for(;++i=r){n=r;break}for(;++in&&(n=r)}return n},fu.extent=function(e,t){var n,r,i,s=-1,o=e.length;if(1===arguments.length){for(;++s=r){n=i=r;break}for(;++sr&&(n=r),r>i&&(i=r))}else{for(;++s=r){n=i=r;break}for(;++sr&&(n=r),r>i&&(i=r))}return[n,i]},fu.sum=function(e,t){var n,r=0,i=e.length,o=-1;if(1===arguments.length)for(;++o1?a/(l-1):void 0},fu.deviation=function(){var e=fu.variance.apply(this,arguments);return e?Math.sqrt(e):e};var wu=o(r);fu.bisectLeft=wu.left,fu.bisect=fu.bisectRight=wu.right,fu.bisector=function(e){return o(1===e.length?function(t,n){return r(e(t),n)}:e)},fu.shuffle=function(e,t,n){(s=arguments.length)<3&&(n=e.length,2>s&&(t=0));for(var r,i,s=n-t;s;)i=Math.random()*s--|0,r=e[s+t],e[s+t]=e[i+t],e[i+t]=r;return e},fu.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},fu.pairs=function(e){for(var t,n=0,r=e.length-1,i=e[0],s=new Array(0>r?0:r);r>n;)s[n]=[t=i,i=e[++n]];return s},fu.transpose=function(e){if(!(i=e.length))return[];for(var t=-1,n=fu.min(e,u),r=new Array(n);++t=0;)for(r=e[i],t=r.length;--t>=0;)n[--o]=r[t];return n};var Eu=Math.abs;fu.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw new Error("infinite range");var r,i=[],s=a(Eu(n)),o=-1;if(e*=s,t*=s,n*=s,0>n)for(;(r=e+n*++o)>t;)i.push(r/s);else for(;(r=e+n*++o)=s.length)return r?r.call(i,o):n?o.sort(n):o;for(var a,f,c,h,p=-1,d=o.length,v=s[u++],m=new l;++p=s.length)return e;var r=[],i=o[n++];return e.forEach(function(e,i){r.push({key:e,values:t(i,n)})}),i?r.sort(function(e,t){return i(e.key,t.key)}):r}var n,r,i={},s=[],o=[];return i.map=function(t,n){return e(n,t,0)},i.entries=function(n){return t(e(fu.map,n,0),0)},i.key=function(e){return s.push(e),i},i.sortKeys=function(e){return o[s.length-1]=e,i},i.sortValues=function(e){return n=e,i},i.rollup=function(e){return r=e,i},i},fu.set=function(e){var t=new y;if(e)for(var n=0,r=e.length;r>n;++n)t.add(e[n]);return t},f(y,{has:p,add:function(e){return this._[c(e+="")]=!0,e},remove:d,values:v,size:m,empty:g,forEach:function(e){for(var t in this._)e.call(this,h(t))}}),fu.behavior={},fu.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},fu.event=null,fu.requote=function(e){return e.replace(Nu,"\\$&")};var Nu=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Cu={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},ku=function(e,t){return t.querySelector(e)},Lu=function(e,t){return t.querySelectorAll(e)},Au=function(e,t){var n=e.matches||e[E(e,"matchesSelector")];return(Au=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(ku=function(e,t){return Sizzle(e,t)[0]||null},Lu=Sizzle,Au=Sizzle.matchesSelector),fu.selection=function(){return fu.select(hu.documentElement)};var Ou=fu.selection.prototype=[];Ou.select=function(e){var t,n,r,i,s=[];e=A(e);for(var o=-1,u=this.length;++o=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),_u.hasOwnProperty(n)?{space:_u[n],local:e}:e}},Ou.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=fu.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(M(t,e[t]));return this}return this.each(M(e,t))},Ou.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=P(e)).length,i=-1;if(t=n.classList){for(;++ii){if("string"!=typeof e){2>i&&(n="");for(r in e)this.each(j(r,e[r],n));return this}if(2>i){var s=this.node();return t(s).getComputedStyle(s,null).getPropertyValue(e)}r=""}return this.each(j(e,n,r))},Ou.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(F(t,e[t]));return this}return this.each(F(e,t))},Ou.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},Ou.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},Ou.append=function(e){return e=I(e),this.select(function(){return this.appendChild(e.apply(this,arguments))})},Ou.insert=function(e,t){return e=I(e),t=A(t),this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)})},Ou.remove=function(){return this.each(q)},Ou.data=function(e,t){function n(e,n){var r,i,s,o=e.length,c=n.length,h=Math.min(o,c),p=new Array(c),d=new Array(c),v=new Array(o);if(t){var m,g=new l,y=new Array(o);for(r=-1;++rr;++r)d[r]=R(n[r]);for(;o>r;++r)v[r]=e[r]}d.update=p,d.parentNode=p.parentNode=v.parentNode=e.parentNode,u.push(d),a.push(p),f.push(v)}var r,i,s=-1,o=this.length;if(!arguments.length){for(e=new Array(o=(r=this[0]).length);++ss;s++){i.push(t=[]),t.parentNode=(n=this[s]).parentNode;for(var u=0,a=n.length;a>u;u++)(r=n[u])&&e.call(r,r.__data__,u,s)&&t.push(r)}return L(i)},Ou.order=function(){for(var e=-1,t=this.length;++e=0;)(n=r[i])&&(s&&s!==n.nextSibling&&s.parentNode.insertBefore(n,s),s=n);return this},Ou.sort=function(e){e=z.apply(this,arguments);for(var t=-1,n=this.length;++te;e++)for(var n=this[e],r=0,i=n.length;i>r;r++){var s=n[r];if(s)return s}return null},Ou.size=function(){var e=0;return W(this,function(){++e}),e};var Du=[];fu.selection.enter=X,fu.selection.enter.prototype=Du,Du.append=Ou.append,Du.empty=Ou.empty,Du.node=Ou.node,Du.call=Ou.call,Du.size=Ou.size,Du.select=function(e){for(var t,n,r,i,s,o=[],u=-1,a=this.length;++ur){if("string"!=typeof e){2>r&&(t=!1);for(n in e)this.each($(n,e[n],t));return this}if(2>r)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each($(e,t,n))};var Pu=fu.map({mouseenter:"mouseover",mouseleave:"mouseout"});hu&&Pu.forEach(function(e){"on"+e in hu&&Pu.remove(e)});var Hu,Bu=0;fu.mouse=function(e){return G(e,C())};var ju=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;fu.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=C().changedTouches),t)for(var r,i=0,s=t.length;s>i;++i)if((r=t[i]).identifier===n)return G(e,r)},fu.behavior.drag=function(){function e(){this.on("mousedown.drag",s).on("touchstart.drag",o)}function n(e,t,n,s,o){return function(){function u(){var e,n,r=t(h,v);r&&(e=r[0]-b[0],n=r[1]-b[1],d|=e|n,b=r,p({type:"drag",x:r[0]+f[0],y:r[1]+f[1],dx:e,dy:n}))}function a(){t(h,v)&&(g.on(s+m,null).on(o+m,null),y(d),p({type:"dragend"}))}var f,l=this,c=fu.event.target.correspondingElement||fu.event.target,h=l.parentNode,p=r.of(l,arguments),d=0,v=e(),m=".drag"+(null==v?"":"-"+v),g=fu.select(n(c)).on(s+m,u).on(o+m,a),y=Q(c),b=t(h,v);i?(f=i.apply(l,arguments),f=[f.x-b[0],f.y-b[1]]):f=[0,0],p({type:"dragstart"})}}var r=k(e,"drag","dragstart","dragend"),i=null,s=n(S,fu.mouse,t,"mousemove","mouseup"),o=n(Y,fu.touch,b,"touchmove","touchend");return e.origin=function(t){return arguments.length?(i=t,e):i},fu.rebind(e,r,"on")},fu.touches=function(e,t){return arguments.length<2&&(t=C().touches),t?cu(t).map(function(t){var n=G(e,t);return n.identifier=t.identifier,n}):[]};var Fu=1e-6,Iu=Fu*Fu,qu=Math.PI,Ru=2*qu,Uu=Ru-Fu,zu=qu/2,Wu=qu/180,Xu=180/qu,Vu=Math.SQRT2,$u=2,Ju=4;fu.interpolateZoom=function(e,t){var n,r,i=e[0],s=e[1],o=e[2],u=t[0],a=t[1],f=t[2],l=u-i,c=a-s,h=l*l+c*c;if(Iu>h)r=Math.log(f/o)/Vu,n=function(e){return[i+e*l,s+e*c,o*Math.exp(Vu*e*r)]};else{var p=Math.sqrt(h),d=(f*f-o*o+Ju*h)/(2*o*$u*p),v=(f*f-o*o-Ju*h)/(2*f*$u*p),m=Math.log(Math.sqrt(d*d+1)-d),g=Math.log(Math.sqrt(v*v+1)-v);r=(g-m)/Vu,n=function(e){var t=e*r,n=it(m),u=o/($u*p)*(n*st(Vu*t+m)-rt(m));return[i+u*l,s+u*c,o*n/it(Vu*t+m)]}}return n.duration=1e3*r,n},fu.behavior.zoom=function(){function e(e){e.on(M,c).on(Qu+".zoom",p).on("dblclick.zoom",d).on(P,h)}function n(e){return[(e[0]-T.x)/T.k,(e[1]-T.y)/T.k]}function r(e){return[e[0]*T.k+T.x,e[1]*T.k+T.y]}function i(e){T.k=Math.max(L[0],Math.min(L[1],e))}function s(e,t){t=r(t),T.x+=e[0]-t[0],T.y+=e[1]-t[1]}function o(t,n,r,o){t.__chart__={x:T.x,y:T.y,k:T.k},i(Math.pow(2,o)),s(m=n,r),t=fu.select(t),A>0&&(t=t.transition().duration(A)),t.call(e.event)}function u(){E&&E.domain(w.range().map(function(e){return(e-T.x)/T.k}).map(w.invert)),x&&x.domain(S.range().map(function(e){return(e-T.y)/T.k}).map(S.invert))}function a(e){O++||e({type:"zoomstart"})}function f(e){u(),e({type:"zoom",scale:T.k,translate:[T.x,T.y]})}function l(e){--O||(e({type:"zoomend"}),m=null)}function c(){function e(){u=1,s(fu.mouse(i),h),f(o)}function r(){c.on(_,null).on(D,null),p(u),l(o)}var i=this,o=H.of(i,arguments),u=0,c=fu.select(t(i)).on(_,e).on(D,r),h=n(fu.mouse(i)),p=Q(i);Wf.call(i),a(o)}function h(){function e(){var e=fu.touches(d);return p=T.k,e.forEach(function(e){e.identifier in m&&(m[e.identifier]=n(e))}),e}function t(){var t=fu.event.target;fu.select(t).on(w,r).on(E,u),S.push(t);for(var n=fu.event.changedTouches,i=0,s=n.length;s>i;++i)m[n[i].identifier]=null;var a=e(),f=Date.now();if(1===a.length){if(500>f-b){var l=a[0];o(d,l,m[l.identifier],Math.floor(Math.log(T.k)/Math.LN2)+1),N()}b=f}else if(a.length>1){var l=a[0],c=a[1],h=l[0]-c[0],p=l[1]-c[1];g=h*h+p*p}}function r(){var e,t,n,r,o=fu.touches(d);Wf.call(d);for(var u=0,a=o.length;a>u;++u,r=null)if(n=o[u],r=m[n.identifier]){if(t)break;e=n,t=r}if(r){var l=(l=n[0]-e[0])*l+(l=n[1]-e[1])*l,c=g&&Math.sqrt(l/g);e=[(e[0]+n[0])/2,(e[1]+n[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],i(c*p)}b=null,s(e,t),f(v)}function u(){if(fu.event.touches.length){for(var t=fu.event.changedTouches,n=0,r=t.length;r>n;++n)delete m[t[n].identifier];for(var i in m)return void e()}fu.selectAll(S).on(y,null),x.on(M,c).on(P,h),C(),l(v)}var p,d=this,v=H.of(d,arguments),m={},g=0,y=".zoom-"+fu.event.changedTouches[0].identifier,w="touchmove"+y,E="touchend"+y,S=[],x=fu.select(d),C=Q(d);t(),a(v),x.on(M,null).on(P,t)}function p(){var e=H.of(this,arguments);y?clearTimeout(y):(Wf.call(this),v=n(m=g||fu.mouse(this)),a(e)),y=setTimeout(function(){y=null,l(e)},50),N(),i(Math.pow(2,.002*Ku())*T.k),s(m,v),f(e)}function d(){var e=fu.mouse(this),t=Math.log(T.k)/Math.LN2;o(this,e,n(e),fu.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,m,g,y,b,w,E,S,x,T={x:0,y:0,k:1},C=[960,500],L=Gu,A=250,O=0,M="mousedown.zoom",_="mousemove.zoom",D="mouseup.zoom",P="touchstart.zoom",H=k(e,"zoomstart","zoom","zoomend");return Qu||(Qu="onwheel"in hu?(Ku=function(){return-fu.event.deltaY*(fu.event.deltaMode?120:1)},"wheel"):"onmousewheel"in hu?(Ku=function(){return fu.event.wheelDelta},"mousewheel"):(Ku=function(){return-fu.event.detail},"MozMousePixelScroll")),e.event=function(e){e.each(function(){var e=H.of(this,arguments),t=T;Uf?fu.select(this).transition().each("start.zoom",function(){T=this.__chart__||{x:0,y:0,k:1},a(e)}).tween("zoom:zoom",function(){var n=C[0],r=C[1],i=m?m[0]:n/2,s=m?m[1]:r/2,o=fu.interpolateZoom([(i-T.x)/T.k,(s-T.y)/T.k,n/T.k],[(i-t.x)/t.k,(s-t.y)/t.k,n/t.k]);return function(t){var r=o(t),u=n/r[2];this.__chart__=T={x:i-r[0]*u,y:s-r[1]*u,k:u},f(e)}}).each("interrupt.zoom",function(){l(e)}).each("end.zoom",function(){l(e)}):(this.__chart__=T,a(e),f(e),l(e))})},e.translate=function(t){return arguments.length?(T={x:+t[0],y:+t[1],k:T.k},u(),e):[T.x,T.y]},e.scale=function(t){return arguments.length?(T={x:T.x,y:T.y,k:null},i(+t),u(),e):T.k},e.scaleExtent=function(t){return arguments.length?(L=null==t?Gu:[+t[0],+t[1]],e):L},e.center=function(t){return arguments.length?(g=t&&[+t[0],+t[1]],e):g},e.size=function(t){return arguments.length?(C=t&&[+t[0],+t[1]],e):C},e.duration=function(t){return arguments.length?(A=+t,e):A},e.x=function(t){return arguments.length?(E=t,w=t.copy(),T={x:0,y:0,k:1},e):E},e.y=function(t){return arguments.length?(x=t,S=t.copy(),T={x:0,y:0,k:1},e):x},fu.rebind(e,H,"on")};var Ku,Qu,Gu=[0,1/0];fu.color=ut,ut.prototype.toString=function(){return this.rgb()+""},fu.hsl=at;var Yu=at.prototype=new ut;Yu.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new at(this.h,this.s,this.l/e)},Yu.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new at(this.h,this.s,e*this.l)},Yu.rgb=function(){return ft(this.h,this.s,this.l)},fu.hcl=lt;var Zu=lt.prototype=new ut;Zu.brighter=function(e){return new lt(this.h,this.c,Math.min(100,this.l+ea*(arguments.length?e:1)))},Zu.darker=function(e){return new lt(this.h,this.c,Math.max(0,this.l-ea*(arguments.length?e:1)))},Zu.rgb=function(){return ct(this.h,this.c,this.l).rgb()},fu.lab=ht;var ea=18,ta=.95047,na=1,ra=1.08883,ia=ht.prototype=new ut;ia.brighter=function(e){return new ht(Math.min(100,this.l+ea*(arguments.length?e:1)),this.a,this.b)},ia.darker=function(e){return new ht(Math.max(0,this.l-ea*(arguments.length?e:1)),this.a,this.b)},ia.rgb=function(){return pt(this.l,this.a,this.b)},fu.rgb=yt;var sa=yt.prototype=new ut;sa.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return t||n||r?(t&&i>t&&(t=i),n&&i>n&&(n=i),r&&i>r&&(r=i),new yt(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))):new yt(i,i,i)},sa.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new yt(e*this.r,e*this.g,e*this.b)},sa.hsl=function(){return xt(this.r,this.g,this.b)},sa.toString=function(){return"#"+Et(this.r)+Et(this.g)+Et(this.b)};var oa=fu.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});oa.forEach(function(e,t){oa.set(e,bt(t))}),fu.functor=kt,fu.xhr=Lt(b),fu.dsv=function(e,t){function n(e,n,s){arguments.length<3&&(s=n,n=null);var o=At(e,t,null==n?r:i(n),s);return o.row=function(e){return arguments.length?o.response(null==(n=e)?r:i(e)):n},o}function r(e){return n.parse(e.responseText)}function i(e){return function(t){return n.parse(t.responseText,e)}}function s(t){return t.map(o).join(e)}function o(e){return u.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var u=new RegExp('["'+e+"\n]"),a=e.charCodeAt(0);return n.parse=function(e,t){var r;return n.parseRows(e,function(e,n){if(r)return r(e,n-1);var i=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");r=t?function(e,n){return t(i(e),n)}:i})},n.parseRows=function(e,t){function n(){if(l>=f)return o;if(i)return i=!1,s;var t=l;if(34===e.charCodeAt(t)){for(var n=t;n++l;){var r=e.charCodeAt(l++),u=1;if(10===r)i=!0;else if(13===r)i=!0,10===e.charCodeAt(l)&&(++l,++u);else if(r!==a)continue;return e.slice(t,l-u)}return e.slice(t)}for(var r,i,s={},o={},u=[],f=e.length,l=0,c=0;(r=n())!==o;){for(var h=[];r!==s&&r!==o;)h.push(r),r=n();t&&null==(h=t(h,c++))||u.push(h)}return u},n.format=function(t){if(Array.isArray(t[0]))return n.formatRows(t);var r=new y,i=[];return t.forEach(function(e){for(var t in e)r.has(t)||i.push(r.add(t))}),[i.map(o).join(e)].concat(t.map(function(t){return i.map(function(e){return o(t[e])}).join(e)})).join("\n")},n.formatRows=function(e){return e.map(s).join("\n")},n},fu.csv=fu.dsv(",","text/csv"),fu.tsv=fu.dsv(" ","text/tab-separated-values");var ua,aa,fa,la,ca=this[E(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};fu.timer=function(){_t.apply(this,arguments)},fu.timer.flush=function(){Pt(),Ht()},fu.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var ha=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(jt);fu.formatPrefix=function(e,t){var n=0;return(e=+e)&&(0>e&&(e*=-1),t&&(e=fu.round(e,Bt(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),ha[8+n/3]};var pa=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,da=fu.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=fu.round(e,Bt(e,t))).toFixed(Math.max(0,Math.min(20,Bt(e*(1+1e-15),t))))}}),va=fu.time={},ma=Date;qt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ga.setUTCDate.apply(this._,arguments)},setDay:function(){ga.setUTCDay.apply(this._,arguments)},setFullYear:function(){ga.setUTCFullYear.apply(this._,arguments)},setHours:function(){ga.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ga.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ga.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ga.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ga.setUTCSeconds.apply(this._,arguments)},setTime:function(){ga.setTime.apply(this._,arguments)}};var ga=Date.prototype;va.year=Rt(function(e){return e=va.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),va.years=va.year.range,va.years.utc=va.year.utc.range,va.day=Rt(function(e){var t=new ma(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),va.days=va.day.range,va.days.utc=va.day.utc.range,va.dayOfYear=function(e){var t=va.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=va[e]=Rt(function(e){return(e=va.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=va.year(e).getDay();return Math.floor((va.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});va[e+"s"]=n.range,va[e+"s"].utc=n.utc.range,va[e+"OfYear"]=function(e){var n=va.year(e).getDay();return Math.floor((va.dayOfYear(e)+(n+t)%7)/7)}}),va.week=va.sunday,va.weeks=va.sunday.range,va.weeks.utc=va.sunday.utc.range,va.weekOfYear=va.sundayOfYear;var ya={"-":"",_:" ",0:"0"},ba=/^\s*\d+/,wa=/^%/;fu.locale=function(e){return{numberFormat:Ft(e),timeFormat:zt(e)}};var Ea=fu.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});fu.format=Ea.numberFormat,fu.geo={},cn.prototype={s:0,t:0,add:function(e){hn(e,this.t,Sa),hn(Sa.s,this.s,this),this.s?this.t+=Sa.t:this.s=Sa.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Sa=new cn;fu.geo.stream=function(e,t){e&&xa.hasOwnProperty(e.type)?xa[e.type](e,t):pn(e,t)};var xa={Feature:function(e,t){pn(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++re?4*qu+e:e,ka.lineStart=ka.lineEnd=ka.point=S}};fu.geo.bounds=function(){function e(e,t){b.push(w=[l=e,h=e]),c>t&&(c=t),t>p&&(p=t)}function t(t,n){var r=gn([t*Wu,n*Wu]);if(g){var i=bn(g,r),s=[i[1],-i[0],0],o=bn(s,i);Sn(o),o=xn(o);var a=t-d,f=a>0?1:-1,v=o[0]*Xu*f,m=Eu(a)>180;if(m^(v>f*d&&f*t>v)){var y=o[1]*Xu;y>p&&(p=y)}else if(v=(v+360)%360-180,m^(v>f*d&&f*t>v)){var y=-o[1]*Xu;c>y&&(c=y)}else c>n&&(c=n),n>p&&(p=n);m?d>t?u(l,t)>u(l,h)&&(h=t):u(t,h)>u(l,h)&&(l=t):h>=l?(l>t&&(l=t),t>h&&(h=t)):t>d?u(l,t)>u(l,h)&&(h=t):u(t,h)>u(l,h)&&(l=t)}else e(t,n);g=r,d=t}function n(){E.point=t}function r(){w[0]=l,w[1]=h,E.point=e,g=null}function i(e,n){if(g){var r=e-d;y+=Eu(r)>180?r+(r>0?360:-360):r}else v=e,m=n;ka.point(e,n),t(e,n)}function s(){ka.lineStart()}function o(){i(v,m),ka.lineEnd(),Eu(y)>Fu&&(l=-(h=180)),w[0]=l,w[1]=h,g=null}function u(e,t){return(t-=e)<0?t+360:t}function a(e,t){return e[0]-t[0]}function f(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eCa?(l=-(h=180),c=-(p=90)):y>Fu?p=90:-Fu>y&&(c=-90),w[0]=l,w[1]=h}};return function(e){p=h=-(l=c=1/0),b=[],fu.geo.stream(e,E);var t=b.length;if(t){b.sort(a);for(var n,r=1,i=b[0],s=[i];t>r;++r)n=b[r],f(n[0],i)||f(n[1],i)?(u(i[0],n[1])>u(i[0],i[1])&&(i[1]=n[1]),u(n[0],i[1])>u(i[0],i[1])&&(i[0]=n[0])):s.push(i=n);for(var o,n,d=-1/0,t=s.length-1,r=0,i=s[t];t>=r;i=n,++r)n=s[r],(o=u(i[1],n[0]))>d&&(d=o,l=n[0],h=i[1])}return b=w=null,l===1/0||c===1/0?[[NaN,NaN],[NaN,NaN]]:[[l,c],[h,p]]}}(),fu.geo.centroid=function(e){La=Aa=Oa=Ma=_a=Da=Pa=Ha=Ba=ja=Fa=0,fu.geo.stream(e,Ia);var t=Ba,n=ja,r=Fa,i=t*t+n*n+r*r;return Iu>i&&(t=Da,n=Pa,r=Ha,Fu>Aa&&(t=Oa,n=Ma,r=_a),i=t*t+n*n+r*r,Iu>i)?[NaN,NaN]:[Math.atan2(n,t)*Xu,nt(r/Math.sqrt(i))*Xu]};var La,Aa,Oa,Ma,_a,Da,Pa,Ha,Ba,ja,Fa,Ia={sphere:S,point:Nn,lineStart:kn,lineEnd:Ln,polygonStart:function(){Ia.lineStart=An},polygonEnd:function(){Ia.lineStart=kn}},qa=Hn(Mn,In,Rn,[-qu,-qu/2]),Ra=1e9;fu.geo.clipExtent=function(){var e,t,n,r,i,s,o={stream:function(e){return i&&(i.valid=!1),i=s(e),i.valid=!0,i},extent:function(u){return arguments.length?(s=Xn(e=+u[0][0],t=+u[0][1],n=+u[1][0],r=+u[1][1]),i&&(i.valid=!1,i=null),o):[[e,t],[n,r]]}};return o.extent([[0,0],[960,500]])},(fu.geo.conicEqualArea=function(){return Vn($n)}).raw=$n,fu.geo.albers=function(){return fu.geo.conicEqualArea().rotate([96,0]).center([-0.6,38.7]).parallels([29.5,45.5]).scale(1070)},fu.geo.albersUsa=function(){function e(e){var s=e[0],o=e[1];return t=null,n(s,o),t||(r(s,o),t)||i(s,o),t}var t,n,r,i,s=fu.geo.albers(),o=fu.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=fu.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),a={point:function(e,n){t=[e,n]}};return e.invert=function(e){var t=s.scale(),n=s.translate(),r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return(i>=.12&&.234>i&&r>=-0.425&&-0.214>r?o:i>=.166&&.234>i&&r>=-0.214&&-0.115>r?u:s).invert(e)},e.stream=function(e){var t=s.stream(e),n=o.stream(e),r=u.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},e.precision=function(t){return arguments.length?(s.precision(t),o.precision(t),u.precision(t),e):s.precision()},e.scale=function(t){return arguments.length?(s.scale(t),o.scale(.35*t),u.scale(t),e.translate(s.translate())):s.scale()},e.translate=function(t){if(!arguments.length)return s.translate();var f=s.scale(),l=+t[0],c=+t[1];return n=s.translate(t).clipExtent([[l-.455*f,c-.238*f],[l+.455*f,c+.238*f]]).stream(a).point,r=o.translate([l-.307*f,c+.201*f]).clipExtent([[l-.425*f+Fu,c+.12*f+Fu],[l-.214*f-Fu,c+.234*f-Fu]]).stream(a).point,i=u.translate([l-.205*f,c+.212*f]).clipExtent([[l-.214*f+Fu,c+.166*f+Fu],[l-.115*f-Fu,c+.234*f-Fu]]).stream(a).point,e},e.scale(1070)};var Ua,za,Wa,Xa,Va,$a,Ja={point:S,lineStart:S,lineEnd:S,polygonStart:function(){za=0,Ja.lineStart=Jn},polygonEnd:function(){Ja.lineStart=Ja.lineEnd=Ja.point=S,Ua+=Eu(za/2)}},Ka={point:Kn,lineStart:S,lineEnd:S,polygonStart:S,polygonEnd:S},Qa={point:Yn,lineStart:Zn,lineEnd:er,polygonStart:function(){Qa.lineStart=tr},polygonEnd:function(){Qa.point=Yn,Qa.lineStart=Zn,Qa.lineEnd=er}};fu.geo.path=function(){function e(e){return e&&("function"==typeof u&&s.pointRadius(+u.apply(this,arguments)),o&&o.valid||(o=i(s)),fu.geo.stream(e,o)),s.result()}function t(){return o=null,e}var n,r,i,s,o,u=4.5;return e.area=function(e){return Ua=0,fu.geo.stream(e,i(Ja)),Ua},e.centroid=function(e){return Oa=Ma=_a=Da=Pa=Ha=Ba=ja=Fa=0,fu.geo.stream(e,i(Qa)),Fa?[Ba/Fa,ja/Fa]:Ha?[Da/Ha,Pa/Ha]:_a?[Oa/_a,Ma/_a]:[NaN,NaN]},e.bounds=function(e){return Va=$a=-(Wa=Xa=1/0),fu.geo.stream(e,i(Ka)),[[Wa,Xa],[Va,$a]]},e.projection=function(e){return arguments.length?(i=(n=e)?e.stream||ir(e):b,t()):n},e.context=function(e){return arguments.length?(s=null==(r=e)?new Qn:new nr(e),"function"!=typeof u&&s.pointRadius(u),t()):r},e.pointRadius=function(t){return arguments.length?(u="function"==typeof t?t:(s.pointRadius(+t),+t),e):u},e.projection(fu.geo.albersUsa()).context(null)},fu.geo.transform=function(e){return{stream:function(t){var n=new sr(t);for(var r in e)n[r]=e[r];return n}}},sr.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},fu.geo.projection=ur,fu.geo.projectionMutator=ar,(fu.geo.equirectangular=function(){return ur(lr)}).raw=lr.invert=lr,fu.geo.rotation=function(e){function t(t){return t=e(t[0]*Wu,t[1]*Wu),t[0]*=Xu,t[1]*=Xu,t}return e=hr(e[0]%360*Wu,e[1]*Wu,e.length>2?e[2]*Wu:0),t.invert=function(t){return t=e.invert(t[0]*Wu,t[1]*Wu),t[0]*=Xu,t[1]*=Xu,t},t},cr.invert=lr,fu.geo.circle=function(){function e(){var e="function"==typeof r?r.apply(this,arguments):r,t=hr(-e[0]*Wu,-e[1]*Wu,0).invert,i=[];return n(null,null,1,{point:function(e,n){i.push(e=t(e,n)),e[0]*=Xu,e[1]*=Xu}}),{type:"Polygon",coordinates:[i]}}var t,n,r=[0,0],i=6;return e.origin=function(t){return arguments.length?(r=t,e):r},e.angle=function(r){return arguments.length?(n=mr((t=+r)*Wu,i*Wu),e):t},e.precision=function(r){return arguments.length?(n=mr(t*Wu,(i=+r)*Wu),e):i},e.angle(90)},fu.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Wu,i=e[1]*Wu,s=t[1]*Wu,o=Math.sin(r),u=Math.cos(r),a=Math.sin(i),f=Math.cos(i),l=Math.sin(s),c=Math.cos(s);return Math.atan2(Math.sqrt((n=c*o)*n+(n=f*l-a*c*u)*n),a*l+f*c*u)},fu.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return fu.range(Math.ceil(s/m)*m,i,m).map(h).concat(fu.range(Math.ceil(f/g)*g,a,g).map(p)).concat(fu.range(Math.ceil(r/d)*d,n,d).filter(function(e){return Eu(e%m)>Fu}).map(l)).concat(fu.range(Math.ceil(u/v)*v,o,v).filter(function(e){return Eu(e%g)>Fu}).map(c))}var n,r,i,s,o,u,a,f,l,c,h,p,d=10,v=d,m=90,g=360,y=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[h(s).concat(p(a).slice(1),h(i).reverse().slice(1),p(f).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(s=+t[0][0],i=+t[1][0],f=+t[0][1],a=+t[1][1],s>i&&(t=s,s=i,i=t),f>a&&(t=f,f=a,a=t),e.precision(y)):[[s,f],[i,a]]},e.minorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],u=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),u>o&&(t=u,u=o,o=t),e.precision(y)):[[r,u],[n,o]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(m=+t[0],g=+t[1],e):[m,g]},e.minorStep=function(t){return arguments.length?(d=+t[0],v=+t[1],e):[d,v]},e.precision=function(t){return arguments.length?(y=+t,l=yr(u,o,90),c=br(r,n,y),h=yr(f,a,90),p=br(s,i,y),e):y},e.majorExtent([[-180,-90+Fu],[180,90-Fu]]).minorExtent([[-180,-80-Fu],[180,80+Fu]])},fu.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||i.apply(this,arguments)]}}var t,n,r=wr,i=Er;return e.distance=function(){return fu.geo.distance(t||r.apply(this,arguments),n||i.apply(this,arguments))},e.source=function(n){return arguments.length?(r=n,t="function"==typeof n?null:n,e):r},e.target=function(t){return arguments.length?(i=t,n="function"==typeof t?null:t,e):i},e.precision=function(){return arguments.length?e:0},e},fu.geo.interpolate=function(e,t){return Sr(e[0]*Wu,e[1]*Wu,t[0]*Wu,t[1]*Wu)},fu.geo.length=function(e){return Ga=0,fu.geo.stream(e,Ya),Ga};var Ga,Ya={sphere:S,point:S,lineStart:xr,lineEnd:S,polygonStart:S,polygonEnd:S},Za=Tr(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(fu.geo.azimuthalEqualArea=function(){return ur(Za)}).raw=Za;var ef=Tr(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},b);(fu.geo.azimuthalEquidistant=function(){return ur(ef)}).raw=ef,(fu.geo.conicConformal=function(){return Vn(Nr)}).raw=Nr,(fu.geo.conicEquidistant=function(){return Vn(Cr)}).raw=Cr;var tf=Tr(function(e){return 1/e},Math.atan);(fu.geo.gnomonic=function(){return ur(tf)}).raw=tf,kr.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-zu]},(fu.geo.mercator=function(){return Lr(kr)}).raw=kr;var nf=Tr(function(){return 1},Math.asin);(fu.geo.orthographic=function(){return ur(nf)}).raw=nf;var rf=Tr(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(fu.geo.stereographic=function(){return ur(rf)}).raw=rf,Ar.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-zu]},(fu.geo.transverseMercator=function(){var e=Lr(Ar),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90])}).raw=Ar,fu.geom={},fu.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,i=kt(n),s=kt(r),o=e.length,u=[],a=[];for(t=0;o>t;t++)u.push([+i.call(this,e[t],t),+s.call(this,e[t],t),t]);for(u.sort(Dr),t=0;o>t;t++)a.push([u[t][0],-u[t][1]]);var f=_r(u),l=_r(a),c=l[0]===f[0],h=l[l.length-1]===f[f.length-1],p=[];for(t=f.length-1;t>=0;--t)p.push(e[u[f[t]][2]]);for(t=+c;t=r&&f.x<=s&&f.y>=i&&f.y<=o?[[r,o],[s,o],[s,i],[r,i]]:[];l.point=e[u]}),t}function n(e){return e.map(function(e,t){return{x:Math.round(s(e,t)/Fu)*Fu,y:Math.round(o(e,t)/Fu)*Fu,i:t}})}var r=Or,i=Mr,s=r,o=i,u=pf;return e?t(e):(t.links=function(e){return ai(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},t.triangles=function(e){var t=[];return ai(n(e)).cells.forEach(function(n,r){for(var i,s,o=n.site,u=n.edges.sort(Vr),a=-1,f=u.length,l=u[f-1].edge,c=l.l===o?l.r:l.l;++a=f,h=r>=l,p=h<<1|c;e.leaf=!1,e=e.nodes[p]||(e.nodes[p]=pi()),c?i=f:u=f,h?o=l:a=l,s(e,t,n,r,i,o,u,a)}var l,c,h,p,d,v,m,g,y,b=kt(u),w=kt(a);if(null!=t)v=t,m=n,g=r,y=i;else if(g=y=-(v=m=1/0),c=[],h=[],d=e.length,o)for(p=0;d>p;++p)l=e[p],l.xg&&(g=l.x),l.y>y&&(y=l.y),c.push(l.x),h.push(l.y);else for(p=0;d>p;++p){var E=+b(l=e[p],p),S=+w(l,p);v>E&&(v=E),m>S&&(m=S),E>g&&(g=E),S>y&&(y=S),c.push(E),h.push(S)}var x=g-v,T=y-m;x>T?y=m+x:g=v+T;var N=pi();if(N.add=function(e){s(N,e,+b(e,++p),+w(e,p),v,m,g,y)},N.visit=function(e){di(e,N,v,m,g,y)},N.find=function(e){return vi(N,e[0],e[1],v,m,g,y)},p=-1,null==t){for(;++p=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";return n=gf.get(n)||mf,r=yf.get(r)||b,Si(r(n.apply(null,lu.call(arguments,1))))},fu.interpolateHcl=Hi,fu.interpolateHsl=Bi,fu.interpolateLab=ji,fu.interpolateRound=Fi,fu.transform=function(e){var t=hu.createElementNS(fu.ns.prefix.svg,"g");return(fu.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Ii(n?n.matrix:bf)})(e)},Ii.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var bf={a:1,b:0,c:0,d:1,e:0,f:0};fu.interpolateTransform=Ji,fu.layout={},fu.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++nu*u/g){if(v>a){var f=t.charge/a;e.px-=s*f,e.py-=o*f}return!0}if(t.point&&a&&v>a){var f=t.pointCharge/a;e.px-=s*f,e.py-=o*f}}return!t.charge}}function t(e){e.px=fu.event.x,e.py=fu.event.y,a.resume()}var n,r,i,s,o,u,a={},f=fu.dispatch("start","tick","end"),l=[1,1],c=.9,h=wf,p=Ef,d=-30,v=Sf,m=.1,g=.64,y=[],w=[];return a.tick=function(){if((i*=.99)<.005)return n=null,f.end({type:"end",alpha:i=0}),!0;var t,r,a,h,p,v,g,b,E,S=y.length,x=w.length;for(r=0;x>r;++r)a=w[r],h=a.source,p=a.target,b=p.x-h.x,E=p.y-h.y,(v=b*b+E*E)&&(v=i*o[r]*((v=Math.sqrt(v))-s[r])/v,b*=v,E*=v,p.x-=b*(g=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=E*g,h.x+=b*(g=1-g),h.y+=E*g);if((g=i*m)&&(b=l[0]/2,E=l[1]/2,r=-1,g))for(;++r0?i=e:(n.c=null,n.t=NaN,n=null,f.end({type:"end",alpha:i=0})):e>0&&(f.start({type:"start",alpha:i=e}),n=_t(a.tick)),a):i},a.start=function(){function e(e,r){if(!n){for(n=new Array(i),a=0;i>a;++a)n[a]=[];for(a=0;f>a;++a){var s=w[a];n[s.source.index].push(s.target),n[s.target.index].push(s.source)}}for(var o,u=n[t],a=-1,l=u.length;++at;++t)(r=y[t]).index=t,r.weight=0;for(t=0;f>t;++t)r=w[t],"number"==typeof r.source&&(r.source=y[r.source]),"number"==typeof r.target&&(r.target=y[r.target]),++r.source.weight,++r.target.weight;for(t=0;i>t;++t)r=y[t],isNaN(r.x)&&(r.x=e("x",c)),isNaN(r.y)&&(r.y=e("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(s=[],"function"==typeof h)for(t=0;f>t;++t)s[t]=+h.call(this,w[t],t);else for(t=0;f>t;++t)s[t]=h;if(o=[],"function"==typeof p)for(t=0;f>t;++t)o[t]=+p.call(this,w[t],t);else for(t=0;f>t;++t)o[t]=p;if(u=[],"function"==typeof d)for(t=0;i>t;++t)u[t]=+d.call(this,y[t],t);else for(t=0;i>t;++t)u[t]=d;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return r||(r=fu.behavior.drag().origin(b).on("dragstart.force",es).on("drag.force",t).on("dragend.force",ts)),arguments.length?void this.on("mouseover.force",ns).on("mouseout.force",rs).call(r):r},fu.rebind(a,f,"on")};var wf=20,Ef=1,Sf=1/0;fu.layout.hierarchy=function(){function e(i){var s,o=[i],u=[];for(i.depth=0;null!=(s=o.pop());)if(u.push(s),(f=n.call(e,s,s.depth))&&(a=f.length)){for(var a,f,l;--a>=0;)o.push(l=f[a]),l.parent=s,l.depth=s.depth+1;r&&(s.value=0),s.children=f}else r&&(s.value=+r.call(e,s,s.depth)||0),delete s.children;return us(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)}),u}var t=ls,n=as,r=fs;return e.sort=function(n){return arguments.length?(t=n,e):t},e.children=function(t){return arguments.length?(n=t,e):n},e.value=function(t){return arguments.length?(r=t,e):r},e.revalue=function(t){return r&&(os(t,function(e){e.children&&(e.value=0)}),us(t,function(t){var n;t.children||(t.value=+r.call(e,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)})),t},e},fu.layout.partition=function(){function e(t,n,r,i){var s=t.children;if(t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i,s&&(o=s.length)){var o,u,a,f=-1;for(r=t.value?r/t.value:0;++fc?-1:1),d=fu.sum(f),v=d?(c-a*p)/d:0,m=fu.range(a),g=[];return null!=n&&m.sort(n===xf?function(e,t){return f[t]-f[e]}:function(e,t){return n(o[e],o[t])}),m.forEach(function(e){g[e]={data:o[e],value:u=f[e],startAngle:l,endAngle:l+=u*v+p,padAngle:h}}),g}var t=Number,n=xf,r=0,i=Ru,s=0;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(r=t,e):r},e.endAngle=function(t){return arguments.length?(i=t,e):i},e.padAngle=function(t){return arguments.length?(s=t,e):s},e};var xf={};fu.layout.stack=function(){function e(u,a){if(!(h=u.length))return u;var f=u.map(function(n,r){return t.call(e,n,r)}),l=f.map(function(t){return t.map(function(t,n){return[s.call(e,t,n),o.call(e,t,n)]})}),c=n.call(e,l,a);f=fu.permute(f,c),l=fu.permute(l,c);var h,p,d,v,m=r.call(e,l,a),g=f[0].length;for(d=0;g>d;++d)for(i.call(e,f[0][d],v=m[d],l[0][d][1]),p=1;h>p;++p)i.call(e,f[p][d],v+=l[p-1][d][1],l[p][d][1]);return u}var t=b,n=vs,r=ms,i=ds,s=hs,o=ps;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n="function"==typeof t?t:Tf.get(t)||vs,e):n},e.offset=function(t){return arguments.length?(r="function"==typeof t?t:Nf.get(t)||ms,e):r},e.x=function(t){return arguments.length?(s=t,e):s},e.y=function(t){return arguments.length?(o=t,e):o},e.out=function(t){return arguments.length?(i=t,e):i},e};var Tf=fu.map({"inside-out":function(e){var t,n,r=e.length,i=e.map(gs),s=e.map(ys),o=fu.range(r).sort(function(e,t){return i[e]-i[t]}),u=0,a=0,f=[],l=[];for(t=0;r>t;++t)n=o[t],a>u?(u+=s[n],f.push(n)):(a+=s[n],l.push(n));return l.reverse().concat(f)},reverse:function(e){return fu.range(e.length).reverse()},"default":vs}),Nf=fu.map({silhouette:function(e){var t,n,r,i=e.length,s=e[0].length,o=[],u=0,a=[];for(n=0;s>n;++n){for(t=0,r=0;i>t;t++)r+=e[t][n][1];r>u&&(u=r),o.push(r)}for(n=0;s>n;++n)a[n]=(u-o[n])/2;return a},wiggle:function(e){var t,n,r,i,s,o,u,a,f,l=e.length,c=e[0],h=c.length,p=[];for(p[0]=a=f=0,n=1;h>n;++n){for(t=0,i=0;l>t;++t)i+=e[t][n][1];for(t=0,s=0,u=c[n][0]-c[n-1][0];l>t;++t){for(r=0,o=(e[t][n][1]-e[t][n-1][1])/(2*u);t>r;++r)o+=(e[r][n][1]-e[r][n-1][1])/u;s+=o*e[t][n][1]}p[n]=a-=i?s/i*u:0,f>a&&(f=a)}for(n=0;h>n;++n)p[n]-=f;return p},expand:function(e){var t,n,r,i=e.length,s=e[0].length,o=1/i,u=[];for(n=0;s>n;++n){for(t=0,r=0;i>t;t++)r+=e[t][n][1];if(r)for(t=0;i>t;t++)e[t][n][1]/=r;else for(t=0;i>t;t++)e[t][n][1]=o}for(n=0;s>n;++n)u[n]=0;return u},zero:ms});fu.layout.histogram=function(){function e(e,s){for(var o,u,a=[],f=e.map(n,this),l=r.call(this,f,s),c=i.call(this,l,f,s),s=-1,h=f.length,p=c.length-1,d=t?1:1/h;++s0)for(s=-1;++s=l[0]&&u<=l[1]&&(o=a[fu.bisect(c,u,1,p)-1],o.y+=d,o.push(e[s]));return a}var t=!0,n=Number,r=Ss,i=ws;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=kt(t),e):r},e.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return Es(e,t)}:kt(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},fu.layout.pack=function(){function e(e,s){var o=n.call(this,e,s),u=o[0],a=i[0],f=i[1],l=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(u.x=u.y=0,us(u,function(e){e.r=+l(e.value)}),us(u,ks),r){var c=r*(t?1:Math.max(2*u.r/a,2*u.r/f))/2;us(u,function(e){e.r+=c}),us(u,ks),us(u,function(e){e.r-=c})}return Os(u,a/2,f/2,t?1:1/Math.max(2*u.r/a,2*u.r/f)),o}var t,n=fu.layout.hierarchy().sort(xs),r=0,i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(r=+t,e):r},ss(e,n)},fu.layout.tree=function(){function e(e,i){var l=o.call(this,e,i),c=l[0],h=t(c);if(us(h,n),h.parent.m=-h.z,os(h,r),f)os(c,s);else{var p=c,d=c,v=c;os(c,function(e){e.xd.x&&(d=e),e.depth>v.depth&&(v=e)});var m=u(p,d)/2-p.x,g=a[0]/(d.x+u(d,p)/2+m),y=a[1]/(v.depth||1);os(c,function(e){e.x=(e.x+m)*g,e.y=e.depth*y})}return l}function t(e){for(var t,n={A:null,children:[e]},r=[n];null!=(t=r.pop());)for(var i,s=t.children,o=0,u=s.length;u>o;++o)r.push((s[o]=i={_:s[o],parent:t,children:(i=s[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return n.children[0]}function n(e){var t=e.children,n=e.parent.children,r=e.i?n[e.i-1]:null;if(t.length){Bs(e);var s=(t[0].z+t[t.length-1].z)/2;r?(e.z=r.z+u(e._,r._),e.m=e.z-s):e.z=s}else r&&(e.z=r.z+u(e._,r._));e.parent.A=i(e,r,e.parent.A||n[0])}function r(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function i(e,t,n){if(t){for(var r,i=e,s=e,o=t,a=i.parent.children[0],f=i.m,l=s.m,c=o.m,h=a.m;o=Ps(o),i=Ds(i),o&&i;)a=Ds(a),s=Ps(s),s.a=e,r=o.z+c-i.z-f+u(o._,i._),r>0&&(Hs(js(o,e,n),e,r),f+=r,l+=r),c+=o.m,f+=i.m,h+=a.m,l+=s.m;o&&!Ps(s)&&(s.t=o,s.m+=c-l),i&&!Ds(a)&&(a.t=i,a.m+=f-h,n=e)}return n}function s(e){e.x*=a[0],e.y=e.depth*a[1]}var o=fu.layout.hierarchy().sort(null).value(null),u=_s,a=[1,1],f=null;return e.separation=function(t){return arguments.length?(u=t,e):u},e.size=function(t){return arguments.length?(f=null==(a=t)?s:null,e):f?null:a},e.nodeSize=function(t){return arguments.length?(f=null==(a=t)?null:s,e):f?a:null},ss(e,o)},fu.layout.cluster=function(){function e(e,s){var o,u=t.call(this,e,s),a=u[0],f=0;us(a,function(e){var t=e.children;t&&t.length?(e.x=Is(t),e.y=Fs(t)):(e.x=o?f+=n(e,o):0,e.y=0,o=e)});var l=qs(a),c=Rs(a),h=l.x-n(l,c)/2,p=c.x+n(c,l)/2;return us(a,i?function(e){e.x=(e.x-a.x)*r[0],e.y=(a.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(p-h)*r[0],e.y=(1-(a.y?e.y/a.y:1))*r[1]}),u}var t=fu.layout.hierarchy().sort(null).value(null),n=_s,r=[1,1],i=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(i=null==(r=t),e):i?null:r},e.nodeSize=function(t){return arguments.length?(i=null!=(r=t),e):i?r:null},ss(e,t)},fu.layout.treemap=function(){function e(e,t){for(var n,r,i=-1,s=e.length;++it?0:t),n.area=isNaN(r)||0>=r?0:r}function t(n){var s=n.children;if(s&&s.length){var o,u,a,f=c(n),l=[],h=s.slice(),d=1/0,v="slice"===p?f.dx:"dice"===p?f.dy:"slice-dice"===p?1&n.depth?f.dy:f.dx:Math.min(f.dx,f.dy);for(e(h,f.dx*f.dy/n.value),l.area=0;(a=h.length)>0;)l.push(o=h[a-1]),l.area+=o.area,"squarify"!==p||(u=r(l,v))<=d?(h.pop(),d=u):(l.area-=l.pop().area,i(l,v,f,!1),v=Math.min(f.dx,f.dy),l.length=l.area=0,d=1/0);l.length&&(i(l,v,f,!0),l.length=l.area=0),s.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var s,o=c(t),u=r.slice(),a=[];for(e(u,o.dx*o.dy/t.value),a.area=0;s=u.pop();)a.push(s),a.area+=s.area,null!=s.z&&(i(a,s.z?o.dx:o.dy,o,!u.length),a.length=a.area=0);r.forEach(n)}}function r(e,t){for(var n,r=e.area,i=0,s=1/0,o=-1,u=e.length;++on&&(s=n),n>i&&(i=n));return r*=r,t*=t,r?Math.max(t*i*d/r,r/(t*s*d)):1/0}function i(e,t,n,r){var i,s=-1,o=e.length,u=n.x,f=n.y,l=t?a(e.area/t):0;if(t==n.dx){for((r||l>n.dy)&&(l=n.dy);++sn.dx)&&(l=n.dx);++sn&&(t=1),1>n&&(e=0),function(){var n,r,i;do n=2*Math.random()-1,r=2*Math.random()-1,i=n*n+r*r;while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=fu.random.normal.apply(fu,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=fu.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;e>n;n++)t+=Math.random();return t}}},fu.scale={};var Cf={floor:b,ceil:b};fu.scale.linear=function(){return Qs([0,1],[0,1],wi,!1)};var kf={s:1,g:1,p:1,r:1,e:1};fu.scale.log=function(){return io(fu.scale.linear().domain([0,1]),10,!0,[1,10])};var Lf=fu.format(".0e"),Af={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};fu.scale.pow=function(){return so(fu.scale.linear(),1,[0,1])},fu.scale.sqrt=function(){return fu.scale.pow().exponent(.5)},fu.scale.ordinal=function(){return uo([],{t:"range",a:[[]]})},fu.scale.category10=function(){return fu.scale.ordinal().range(Of)},fu.scale.category20=function(){return fu.scale.ordinal().range(Mf)},fu.scale.category20b=function(){return fu.scale.ordinal().range(_f)},fu.scale.category20c=function(){return fu.scale.ordinal().range(Df)};var Of=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(wt),Mf=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(wt),_f=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(wt),Df=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(wt);fu.scale.quantile=function(){return ao([],[])},fu.scale.quantize=function(){return fo(0,1,[0,1])},fu.scale.threshold=function(){return lo([.5],[0,1])},fu.scale.identity=function(){return co([0,1])},fu.svg={},fu.svg.arc=function(){function e(){var e=Math.max(0,+n.apply(this,arguments)),f=Math.max(0,+r.apply(this,arguments)),l=o.apply(this,arguments)-zu,c=u.apply(this,arguments)-zu,h=Math.abs(c-l),p=l>c?0:1;if(e>f&&(d=f,f=e,e=d),h>=Uu)return t(f,p)+(e?t(e,1-p):"")+"Z";var d,v,m,g,y,b,w,E,S,x,T,N,C=0,k=0,L=[];if((g=(+a.apply(this,arguments)||0)/2)&&(m=s===Pf?Math.sqrt(e*e+f*f):+s.apply(this,arguments),p||(k*=-1),f&&(k=nt(m/f*Math.sin(g))),e&&(C=nt(m/e*Math.sin(g)))),f){y=f*Math.cos(l+k),b=f*Math.sin(l+k),w=f*Math.cos(c-k),E=f*Math.sin(c-k);var A=Math.abs(c-l-2*k)<=qu?0:1;if(k&&bo(y,b,w,E)===p^A){var O=(l+c)/2;y=f*Math.cos(O),b=f*Math.sin(O),w=E=null}}else y=b=0;if(e){S=e*Math.cos(c-C),x=e*Math.sin(c-C),T=e*Math.cos(l+C),N=e*Math.sin(l+C);var M=Math.abs(l-c+2*C)<=qu?0:1;if(C&&bo(S,x,T,N)===1-p^M){var _=(l+c)/2;S=e*Math.cos(_),x=e*Math.sin(_),T=N=null}}else S=x=0;if(h>Fu&&(d=Math.min(Math.abs(f-e)/2,+i.apply(this,arguments)))>.001){v=f>e^p?0:1;var D=d,P=d;if(qu>h){var H=null==T?[S,x]:null==w?[y,b]:Hr([y,b],[T,N],[w,E],[S,x]),B=y-H[0],j=b-H[1],F=w-H[0],I=E-H[1],q=1/Math.sin(Math.acos((B*F+j*I)/(Math.sqrt(B*B+j*j)*Math.sqrt(F*F+I*I)))/2),R=Math.sqrt(H[0]*H[0]+H[1]*H[1]);P=Math.min(d,(e-R)/(q-1)),D=Math.min(d,(f-R)/(q+1))}if(null!=w){var U=wo(null==T?[S,x]:[T,N],[y,b],f,D,p),z=wo([w,E],[S,x],f,D,p);d===D?L.push("M",U[0],"A",D,",",D," 0 0,",v," ",U[1],"A",f,",",f," 0 ",1-p^bo(U[1][0],U[1][1],z[1][0],z[1][1]),",",p," ",z[1],"A",D,",",D," 0 0,",v," ",z[0]):L.push("M",U[0],"A",D,",",D," 0 1,",v," ",z[0])}else L.push("M",y,",",b);if(null!=T){var W=wo([y,b],[T,N],e,-P,p),X=wo([S,x],null==w?[y,b]:[w,E],e,-P,p);d===P?L.push("L",X[0],"A",P,",",P," 0 0,",v," ",X[1],"A",e,",",e," 0 ",p^bo(X[1][0],X[1][1],W[1][0],W[1][1]),",",1-p," ",W[1],"A",P,",",P," 0 0,",v," ",W[0]):L.push("L",X[0],"A",P,",",P," 0 0,",v," ",W[0])}else L.push("L",S,",",x)}else L.push("M",y,",",b),null!=w&&L.push("A",f,",",f," 0 ",A,",",p," ",w,",",E),L.push("L",S,",",x),null!=T&&L.push("A",e,",",e," 0 ",M,",",1-p," ",T,",",N);return L.push("Z"),L.join("")}function t(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+ -e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}var n=po,r=vo,i=ho,s=Pf,o=mo,u=go,a=yo;return e.innerRadius=function(t){return arguments.length?(n=kt(t),e):n},e.outerRadius=function(t){return arguments.length?(r=kt(t),e):r},e.cornerRadius=function(t){return arguments.length?(i=kt(t),e):i},e.padRadius=function(t){return arguments.length?(s=t==Pf?Pf:kt(t),e):s},e.startAngle=function(t){return arguments.length?(o=kt(t),e):o},e.endAngle=function(t){return arguments.length?(u=kt(t),e):u},e.padAngle=function(t){return arguments.length?(a=kt(t),e):a},e.centroid=function(){var e=(+n.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +u.apply(this,arguments))/2-zu;return[Math.cos(t)*e,Math.sin(t)*e]},e};var Pf="auto";fu.svg.line=function(){return Eo(b)};var Hf=fu.map({linear:So,"linear-closed":xo,step:To,"step-before":No,"step-after":Co,basis:_o,"basis-open":Do,"basis-closed":Po,bundle:Ho,cardinal:Ao,"cardinal-open":ko,"cardinal-closed":Lo,monotone:Ro});Hf.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var Bf=[0,2/3,1/3,0],jf=[0,1/3,2/3,0],Ff=[0,1/6,2/3,1/6];fu.svg.line.radial=function(){var e=Eo(Uo);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},No.reverse=Co,Co.reverse=No,fu.svg.area=function(){return zo(b)},fu.svg.area.radial=function(){var e=zo(Uo);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},fu.svg.chord=function(){function e(e,u){var a=t(this,s,e,u),f=t(this,o,e,u);return"M"+a.p0+r(a.r,a.p1,a.a1-a.a0)+(n(a,f)?i(a.r,a.p1,a.r,a.p0):i(a.r,a.p1,f.r,f.p0)+r(f.r,f.p1,f.a1-f.a0)+i(f.r,f.p1,a.r,a.p0))+"Z"}function t(e,t,n,r){var i=t.call(e,n,r),s=u.call(e,i,r),o=a.call(e,i,r)-zu,l=f.call(e,i,r)-zu;return{r:s,a0:o,a1:l,p0:[s*Math.cos(o),s*Math.sin(o)],p1:[s*Math.cos(l),s*Math.sin(l)]}}function n(e,t){return e.a0==t.a0&&e.a1==t.a1}function r(e,t,n){return"A"+e+","+e+" 0 "+ +(n>qu)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var s=wr,o=Er,u=Wo,a=mo,f=go;return e.radius=function(t){return arguments.length?(u=kt(t),e):u},e.source=function(t){return arguments.length?(s=kt(t),e):s},e.target=function(t){return arguments.length?(o=kt(t),e):o},e.startAngle=function(t){return arguments.length?(a=kt(t),e):a},e.endAngle=function(t){return arguments.length?(f=kt(t),e):f},e},fu.svg.diagonal=function(){function e(e,i){var s=t.call(this,e,i),o=n.call(this,e,i),u=(s.y+o.y)/2,a=[s,{x:s.x,y:u},{x:o.x,y:u},o];return a=a.map(r),"M"+a[0]+"C"+a[1]+" "+a[2]+" "+a[3]}var t=wr,n=Er,r=Xo;return e.source=function(n){return arguments.length?(t=kt(n),e):t},e.target=function(t){return arguments.length?(n=kt(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},fu.svg.diagonal.radial=function(){var e=fu.svg.diagonal(),t=Xo,n=e.projection;return e.projection=function(e){return arguments.length?n(Vo(t=e)):t},e},fu.svg.symbol=function(){function e(e,r){return(If.get(t.call(this,e,r))||Ko)(n.call(this,e,r))}var t=Jo,n=$o;return e.type=function(n){return arguments.length?(t=kt(n),e):t},e.size=function(t){return arguments.length?(n=kt(t),e):n},e};var If=fu.map({circle:Ko,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+ -3*t+","+ -t+"H"+ -t+"V"+ -3*t+"H"+t+"V"+ -t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+ -t+"V"+t+"H"+ -3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Rf)),n=t*Rf;return"M0,"+ -t+"L"+n+",0 0,"+t+" "+ -n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+ -t+","+ -t+"L"+t+","+ -t+" "+t+","+t+" "+ -t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/qf),n=t*qf/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/qf),n=t*qf/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}});fu.svg.symbolTypes=If.keys();var qf=Math.sqrt(3),Rf=Math.tan(30*Wu);Ou.transition=function(e){for(var t,n,r=Uf||++Vf,i=eu(e),s=[],o=zf||{time:Date.now(),ease:ki,delay:0,duration:250},u=-1,a=this.length;++us;s++){i.push(t=[]);for(var n=this[s],u=0,a=n.length;a>u;u++)(r=n[u])&&e.call(r,r.__data__,u,s)&&t.push(r)}return Go(i,this.namespace,this.id)},Xf.tween=function(e,t){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(e):W(this,null==t?function(t){t[r][n].tween.remove(e)}:function(i){i[r][n].tween.set(e,t)})},Xf.attr=function(e,t){function n(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}function i(e){return null==e?n:(e+="",function(){var t,n=this.getAttribute(u);return n!==e&&(t=o(n,e),function(e){this.setAttribute(u,t(e))})})}function s(e){return null==e?r:(e+="",function(){var t,n=this.getAttributeNS(u.space,u.local);return n!==e&&(t=o(n,e),function(e){this.setAttributeNS(u.space,u.local,t(e))})})}if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var o="transform"==e?Ji:wi,u=fu.ns.qualify(e);return Yo(this,"attr."+e,t,u.local?s:i)},Xf.attrTween=function(e,t){function n(e,n){var r=t.call(this,e,n,this.getAttribute(i));return r&&function(e){this.setAttribute(i,r(e))}}function r(e,n){var r=t.call(this,e,n,this.getAttributeNS(i.space,i.local));return r&&function(e){this.setAttributeNS(i.space,i.local,r(e))}}var i=fu.ns.qualify(e);return this.tween("attr."+e,i.local?r:n)},Xf.style=function(e,n,r){function i(){this.style.removeProperty(e)}function s(n){return null==n?i:(n+="",function(){var i,s=t(this).getComputedStyle(this,null).getPropertyValue(e);return s!==n&&(i=wi(s,n),function(t){this.style.setProperty(e,i(t),r)})})}var o=arguments.length;if(3>o){if("string"!=typeof e){2>o&&(n="");for(r in e)this.style(r,e[r],n);return this}r=""}return Yo(this,"style."+e,n,s)},Xf.styleTween=function(e,n,r){function i(i,s){var o=n.call(this,i,s,t(this).getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+e,i)},Xf.text=function(e){return Yo(this,"text",e,Zo)},Xf.remove=function(){var e=this.namespace;return this.each("end.transition",function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Xf.ease=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].ease:("function"!=typeof e&&(e=fu.ease.apply(fu,arguments)),W(this,function(r){r[n][t].ease=e}))},Xf.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:W(this,"function"==typeof e?function(r,i,s){r[n][t].delay=+e.call(r,r.__data__,i,s)}:(e=+e,function(r){r[n][t].delay=e}))},Xf.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:W(this,"function"==typeof e?function(r,i,s){r[n][t].duration=Math.max(1,e.call(r,r.__data__,i,s))}:(e=Math.max(1,e),function(r){r[n][t].duration=e}))},Xf.each=function(e,t){var n=this.id,r=this.namespace;if(arguments.length<2){var i=zf,s=Uf;try{Uf=n,W(this,function(t,i,s){zf=t[r][n],e.call(t,t.__data__,i,s)})}finally{zf=i,Uf=s}}else W(this,function(i){var s=i[r][n];(s.event||(s.event=fu.dispatch("start","end","interrupt"))).on(e,t)});return this},Xf.transition=function(){for(var e,t,n,r,i=this.id,s=++Vf,o=this.namespace,u=[],a=0,f=this.length;f>a;a++){u.push(e=[]);for(var t=this[a],l=0,c=t.length;c>l;l++)(n=t[l])&&(r=n[o][i],tu(n,l,o,s,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),e.push(n)}return Go(u,o,s)},fu.svg.axis=function(){function e(e){e.each(function(){var e,f=fu.select(this),l=this.__chart__||n,c=this.__chart__=n.copy(),h=null==a?c.ticks?c.ticks.apply(c,u):c.domain():a,p=null==t?c.tickFormat?c.tickFormat.apply(c,u):b:t,d=f.selectAll(".tick").data(h,c),v=d.enter().insert("g",".domain").attr("class","tick").style("opacity",Fu),m=fu.transition(d.exit()).style("opacity",Fu).remove(),g=fu.transition(d.order()).style("opacity",1),y=Math.max(i,0)+o,w=Xs(c),E=f.selectAll(".domain").data([0]),S=(E.enter().append("path").attr("class","domain"),fu.transition(E));v.append("line"),v.append("text");var x,T,N,C,k=v.select("line"),L=g.select("line"),A=d.select("text").text(p),O=v.select("text"),M=g.select("text"),_="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(e=nu,x="x",N="y",T="x2",C="y2",A.attr("dy",0>_?"0em":".71em").style("text-anchor","middle"),S.attr("d","M"+w[0]+","+_*s+"V0H"+w[1]+"V"+_*s)):(e=ru,x="y",N="x",T="y2",C="x2",A.attr("dy",".32em").style("text-anchor",0>_?"end":"start"),S.attr("d","M"+_*s+","+w[0]+"H0V"+w[1]+"H"+_*s)),k.attr(C,_*i),O.attr(N,_*y),L.attr(T,0).attr(C,_*i),M.attr(x,0).attr(N,_*y),c.rangeBand){var D=c,P=D.rangeBand()/2;l=c=function(e){return D(e)+P}}else l.rangeBand?l=c:m.call(e,c,l);v.call(e,l,c),g.call(e,c,c)})}var t,n=fu.scale.linear(),r=$f,i=6,s=6,o=3,u=[10],a=null;return e.scale=function(t){return arguments.length?(n=t,e):n},e.orient=function(t){return arguments.length?(r=t in Jf?t+"":$f,e):r},e.ticks=function(){return arguments.length?(u=cu(arguments),e):u},e.tickValues=function(t){return arguments.length?(a=t,e):a},e.tickFormat=function(n){return arguments.length?(t=n,e):t},e.tickSize=function(t){var n=arguments.length;return n?(i=+t,s=+arguments[n-1],e):i},e.innerTickSize=function(t){return arguments.length?(i=+t,e):i},e.outerTickSize=function(t){return arguments.length?(s=+t,e):s},e.tickPadding=function(t){return arguments.length?(o=+t,e):o},e.tickSubdivide=function(){return arguments.length&&e},e};var $f="bottom",Jf={top:1,right:1,bottom:1,left:1};fu.svg.brush=function(){function e(t){t.each(function(){var t=fu.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",s).on("touchstart.brush",s),o=t.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var u=t.selectAll(".resize").data(v,b);u.exit().remove(),u.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Kf[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),u.style("display",e.empty()?"none":null);var a,c=fu.transition(t),h=fu.transition(o);f&&(a=Xs(f),h.attr("x",a[0]).attr("width",a[1]-a[0]),r(c)),l&&(a=Xs(l),h.attr("y",a[0]).attr("height",a[1]-a[0]),i(c)),n(c)})}function n(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+c[+/e$/.test(e)]+","+h[+/^s/.test(e)]+")"})}function r(e){e.select(".extent").attr("x",c[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",c[1]-c[0])}function i(e){e.select(".extent").attr("y",h[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function s(){function s(){32==fu.event.keyCode&&(A||(b=null,M[0]-=c[1],M[1]-=h[1],A=2),N())}function v(){32==fu.event.keyCode&&2==A&&(M[0]+=c[1],M[1]+=h[1],A=0,N())}function m(){var e=fu.mouse(E),t=!1;w&&(e[0]+=w[0],e[1]+=w[1]),A||(fu.event.altKey?(b||(b=[(c[0]+c[1])/2,(h[0]+h[1])/2]),M[0]=c[+(e[0]l?(i=r,r=l):i=l),v[0]!=r||v[1]!=i?(n?u=null:o=null,v[0]=r,v[1]=i,!0):void 0}function y(){m(),T.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null),fu.select("body").style("cursor",null),_.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),O(),x({type:"brushend"})}var b,w,E=this,S=fu.select(fu.event.target),x=a.of(E,arguments),T=fu.select(E),C=S.datum(),k=!/^(n|s)$/.test(C)&&f,L=!/^(e|w)$/.test(C)&&l,A=S.classed("extent"),O=Q(E),M=fu.mouse(E),_=fu.select(t(E)).on("keydown.brush",s).on("keyup.brush",v);if(fu.event.changedTouches?_.on("touchmove.brush",m).on("touchend.brush",y):_.on("mousemove.brush",m).on("mouseup.brush",y),T.interrupt().selectAll("*").interrupt(),A)M[0]=c[0]-M[0],M[1]=h[0]-M[1];else if(C){var D=+/w$/.test(C),P=+/^n/.test(C);w=[c[1-D]-M[0],h[1-P]-M[1]],M[0]=c[D],M[1]=h[P]}else fu.event.altKey&&(b=M.slice());T.style("pointer-events","none").selectAll(".resize").style("display",null),fu.select("body").style("cursor",S.style("cursor")),x({type:"brushstart"}),m()}var o,u,a=k(e,"brushstart","brush","brushend"),f=null,l=null,c=[0,0],h=[0,0],p=!0,d=!0,v=Qf[0];return e.event=function(e){e.each(function(){var e=a.of(this,arguments),t={x:c,y:h,i:o,j:u},n=this.__chart__||t;this.__chart__=t,Uf?fu.select(this).transition().each("start.brush",function(){o=n.i,u=n.j,c=n.x,h=n.y,e({type:"brushstart"})}).tween("brush:brush",function(){var n=Ei(c,t.x),r=Ei(h,t.y);return o=u=null,function(i){c=t.x=n(i),h=t.y=r(i),e({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,u=t.j,e({type:"brush",mode:"resize"}),e({type:"brushend"})}):(e({type:"brushstart"}),e({type:"brush",mode:"resize"}),e({type:"brushend"}))})},e.x=function(t){return arguments.length?(f=t,v=Qf[!f<<1|!l],e):f},e.y=function(t){return arguments.length?(l=t,v=Qf[!f<<1|!l],e):l},e.clamp=function(t){return arguments.length?(f&&l?(p=!!t[0],d=!!t[1]):f?p=!!t:l&&(d=!!t),e):f&&l?[p,d]:f?p:l?d:null},e.extent=function(t){var n,r,i,s,a;return arguments.length?(f&&(n=t[0],r=t[1],l&&(n=n[0],r=r[0]),o=[n,r],f.invert&&(n=f(n),r=f(r)),n>r&&(a=n,n=r,r=a),n==c[0]&&r==c[1]||(c=[n,r])),l&&(i=t[0],s=t[1],f&&(i=i[1],s=s[1]),u=[i,s],l.invert&&(i=l(i),s=l(s)),i>s&&(a=i,i=s,s=a),i==h[0]&&s==h[1]||(h=[i,s])),e):(f&&(o?(n=o[0],r=o[1]):(n=c[0],r=c[1],f.invert&&(n=f.invert(n),r=f.invert(r)),n>r&&(a=n,n=r,r=a))),l&&(u?(i=u[0],s=u[1]):(i=h[0],s=h[1],l.invert&&(i=l.invert(i),s=l.invert(s)),i>s&&(a=i,i=s,s=a))),f&&l?[[n,i],[r,s]]:f?[n,r]:l&&[i,s])},e.clear=function(){return e.empty()||(c=[0,0],h=[0,0],o=u=null),e},e.empty=function(){return!!f&&c[0]==c[1]||!!l&&h[0]==h[1]},fu.rebind(e,a,"on")};var Kf={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Qf=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Gf=va.format=Ea.timeFormat,Yf=Gf.utc,Zf=Yf("%Y-%m-%dT%H:%M:%S.%LZ");Gf.iso=Date.prototype.toISOString&&+(new Date("2000-01-01T00:00:00.000Z"))?iu:Zf,iu.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},iu.toString=Zf.toString,va.second=Rt(function(e){return new ma(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))},function(e){return e.getSeconds()}),va.seconds=va.second.range,va.seconds.utc=va.second.utc.range,va.minute=Rt(function(e){return new ma(6e4*Math.floor(e/6e4))},function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))},function(e){return e.getMinutes()}),va.minutes=va.minute.range,va.minutes.utc=va.minute.utc.range,va.hour=Rt(function(e){var t=e.getTimezoneOffset()/60;return new ma(36e5*(Math.floor(e/36e5-t)+t))},function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))},function(e){return e.getHours()}),va.hours=va.hour.range,va.hours.utc=va.hour.utc.range,va.month=Rt(function(e){return e=va.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),va.months=va.month.range,va.months.utc=va.month.utc.range;var el=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],tl=[[va.second,1],[va.second,5],[va.second,15],[va.second,30],[va.minute,1],[va.minute,5],[va.minute,15],[va.minute,30],[va.hour,1],[va.hour,3],[va.hour,6],[va.hour,12],[va.day,1],[va.day,2],[va.week,1],[va.month,1],[va.month,3],[va.year,1]],nl=Gf.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",Mn]]),rl={range:function(e,t,n){return fu.range(Math.ceil(e/n)*n,+t,n).map(ou)},floor:b,ceil:b};tl.year=va.year,va.scale=function(){return su(fu.scale.linear(),tl,nl)};var il=tl.map(function(e){return[e[0].utc,e[1]]}),sl=Yf.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",Mn]]);il.year=va.year.utc,va.scale.utc=function(){return su(fu.scale.linear(),il,sl)},fu.text=Lt(function(e){return e.responseText}),fu.json=function(e,t){return At(e,"application/json",uu,t)},fu.html=function(e,t){return At(e,"text/html",au,t)},fu.xml=Lt(function(e){return e.responseXML}),"function"==typeof n&&n.amd?(this.d3=fu,n("d3",fu)):"object"==typeof module&&module.exports?module.exports=fu:this.d3=fu}(),n("locationmarker",["leaflet"],function(e){return e.CircleMarker.extend({outerCircle:{stroke:!1,color:"#4285F4",opacity:1,fillOpacity:.3,clickable:!1,radius:16},innerCircle:{stroke:!0,color:"#ffffff",fillColor:"#4285F4",weight:1.5,clickable:!1,opacity:1,fillOpacity:1,radius:7},accuracyCircle:{stroke:!0,color:"#4285F4",weight:1,clickable:!1,opacity:.7,fillOpacity:.2},initialize:function(t){this.accuracyCircle=e.circle(t,0,this.accuracyCircle),this.outerCircle=e.circleMarker(t,this.outerCircle),e.CircleMarker.prototype.initialize.call(this,t,this.innerCircle),this.on("remove",function(){this._map.removeLayer(this.accuracyCircle),this._map.removeLayer(this.outerCircle)})},setLatLng:function(t){this.accuracyCircle.setLatLng(t),this.outerCircle.setLatLng(t),e.CircleMarker.prototype.setLatLng.call(this,t)},setAccuracy:function(e){this.accuracyCircle.setRadius(e)},onAdd:function(t){this.accuracyCircle.addTo(t).bringToBack(),this.outerCircle.addTo(t),e.CircleMarker.prototype.onAdd.call(this,t)}})}),!function(e){var t=e.L;t.labelVersion="0.2.2-dev",t.Label=t.Class.extend({includes:t.Mixin.Events,options:{className:"",clickable:!1,direction:"right",noHide:!1,offset:[12,-15],opacity:1,zoomAnimation:!0},initialize:function(e,n){t.setOptions(this,e),this._source=n,this._animated=t.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(e){this._map=e,this._pane=this.options.pane?e._panes[this.options.pane]:this._source instanceof t.Marker?e._panes.markerPane:e._panes.popupPane,this._container||this._initLayout(),this._pane.appendChild(this._container),this._initInteraction(),this._update(),this.setOpacity(this.options.opacity),e.on("moveend",this._onMoveEnd,this).on("viewreset",this._onViewReset,this),this._animated&&e.on("zoomanim",this._zoomAnimation,this),t.Browser.touch&&!this.options.noHide&&(t.DomEvent.on(this._container,"click",this.close,this),e.on("click",this.close,this))},onRemove:function(e){this._pane.removeChild(this._container),e.off({zoomanim:this._zoomAnimation,moveend:this._onMoveEnd,viewreset:this._onViewReset},this),this._removeInteraction(),this._map=null},setLatLng:function(e){return this._latlng=t.latLng(e),this._map&&this._updatePosition(),this},setContent:function(e){return this._previousContent=this._content,this._content=e,this._updateContent(),this},close:function(){var e=this._map;e&&(t.Browser.touch&&!this.options.noHide&&(t.DomEvent.off(this._container,"click",this.close),e.off("click",this.close,this)),e.removeLayer(this))},updateZIndex:function(e){this._zIndex=e,this._container&&this._zIndex&&(this._container.style.zIndex=e)},setOpacity:function(e){this.options.opacity=e,this._container&&t.DomUtil.setOpacity(this._container,e)},_initLayout:function(){this._container=t.DomUtil.create("div","leaflet-label "+this.options.className+" leaflet-zoom-animated"),this.updateZIndex(this._zIndex)},_update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updatePosition(),this._container.style.visibility="")},_updateContent:function(){this._content&&this._map&&this._prevContent!==this._content&&"string"==typeof this._content&&(this._container.innerHTML=this._content,this._prevContent=this._content,this._labelWidth=this._container.offsetWidth)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},_setPosition:function(e){var n=this._map,r=this._container,i=n.latLngToContainerPoint(n.getCenter()),s=n.layerPointToContainerPoint(e),o=this.options.direction,u=this._labelWidth,a=t.point(this.options.offset);"right"===o||"auto"===o&&s.xOpenStreetMap contributors'},variants:{Mapnik:{},DE:{url:"https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png",options:{maxZoom:18}},CH:{url:"https://tile.osm.ch/switzerland/{z}/{x}/{y}.png",options:{maxZoom:18,bounds:[[45,5],[48,11]]}},France:{url:"https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",options:{maxZoom:20,attribution:"© Openstreetmap France | {attribution.OpenStreetMap}"}},HOT:{url:"https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",options:{attribution:'{attribution.OpenStreetMap}, Tiles style by Humanitarian OpenStreetMap Team hosted by OpenStreetMap France'}},BZH:{url:"https://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png",options:{attribution:'{attribution.OpenStreetMap}, Tiles courtesy of Breton OpenStreetMap Team',bounds:[[46.2,-5.5],[50,.7]]}}}},OpenSeaMap:{url:"https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",options:{attribution:'Map data: © OpenSeaMap contributors'}},OpenPtMap:{url:"http://openptmap.org/tiles/{z}/{x}/{y}.png",options:{maxZoom:17,attribution:'Map data: © OpenPtMap contributors'}},OpenTopoMap:{url:"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",options:{maxZoom:17,attribution:'Map data: {attribution.OpenStreetMap}, SRTM | Map style: © OpenTopoMap (CC-BY-SA)'}},OpenRailwayMap:{url:"https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:'Map data: {attribution.OpenStreetMap} | Map style: © OpenRailwayMap (CC-BY-SA)'}},OpenFireMap:{url:"http://openfiremap.org/hytiles/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:'Map data: {attribution.OpenStreetMap} | Map style: © OpenFireMap (CC-BY-SA)'}},SafeCast:{url:"https://s3.amazonaws.com/te512.safecast.org/{z}/{x}/{y}.png",options:{maxZoom:16,attribution:'Map data: {attribution.OpenStreetMap} | Map style: © SafeCast (CC-BY-SA)'}},Thunderforest:{url:"https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}",options:{attribution:'© Thunderforest, {attribution.OpenStreetMap}',variant:"cycle",apikey:"",maxZoom:22},variants:{OpenCycleMap:"cycle",Transport:{options:{variant:"transport"}},TransportDark:{options:{variant:"transport-dark"}},SpinalMap:{options:{variant:"spinal-map"}},Landscape:"landscape",Outdoors:"outdoors",Pioneer:"pioneer",MobileAtlas:"mobile-atlas",Neighbourhood:"neighbourhood"}},CyclOSM:{url:"https://dev.{s}.tile.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png",options:{maxZoom:20,attribution:'CyclOSM | Map data: {attribution.OpenStreetMap}'}},OpenMapSurfer:{url:"https://maps.heigit.org/openmapsurfer/tiles/{variant}/webmercator/{z}/{x}/{y}.png",options:{maxZoom:19,variant:"roads",attribution:'Imagery from GIScience Research Group @ University of Heidelberg | Map data '},variants:{Roads:{options:{variant:"roads",attribution:"{attribution.OpenMapSurfer}{attribution.OpenStreetMap}"}},Hybrid:{options:{variant:"hybrid",attribution:"{attribution.OpenMapSurfer}{attribution.OpenStreetMap}"}},AdminBounds:{options:{variant:"adminb",maxZoom:18,attribution:"{attribution.OpenMapSurfer}{attribution.OpenStreetMap}"}},ContourLines:{options:{variant:"asterc",maxZoom:18,minZoom:13,attribution:'{attribution.OpenMapSurfer} ASTER GDEM'}},Hillshade:{options:{variant:"asterh",maxZoom:18,attribution:'{attribution.OpenMapSurfer} ASTER GDEM, SRTM'}},ElementsAtRisk:{options:{variant:"elements_at_risk",attribution:"{attribution.OpenMapSurfer}{attribution.OpenStreetMap}"}}}},Hydda:{url:"https://{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png",options:{maxZoom:18,variant:"full",attribution:'Tiles courtesy of OpenStreetMap Sweden — Map data {attribution.OpenStreetMap}'},variants:{Full:"full",Base:"base",RoadsAndLabels:"roads_and_labels"}},MapBox:{url:"https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}{r}.png?access_token={accessToken}",options:{attribution:'© Mapbox {attribution.OpenStreetMap} Improve this map',subdomains:"abcd",id:"mapbox.streets",accessToken:""}},Stamen:{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.{ext}",options:{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data {attribution.OpenStreetMap}',subdomains:"abcd",minZoom:0,maxZoom:20,variant:"toner",ext:"png"},variants:{Toner:"toner",TonerBackground:"toner-background",TonerHybrid:"toner-hybrid",TonerLines:"toner-lines",TonerLabels:"toner-labels",TonerLite:"toner-lite",Watercolor:{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}",options:{variant:"watercolor",ext:"jpg",minZoom:1,maxZoom:16}},Terrain:{options:{variant:"terrain",minZoom:0,maxZoom:18}},TerrainBackground:{options:{variant:"terrain-background",minZoom:0,maxZoom:18}},TerrainLabels:{options:{variant:"terrain-labels",minZoom:0,maxZoom:18}},TopOSMRelief:{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}",options:{variant:"toposm-color-relief",ext:"jpg",bounds:[[22,-132],[51,-56]]}},TopOSMFeatures:{options:{variant:"toposm-features",bounds:[[22,-132],[51,-56]],opacity:.9}}}},TomTom:{url:"https://{s}.api.tomtom.com/map/1/tile/{variant}/{style}/{z}/{x}/{y}.{ext}?key={apikey}",options:{variant:"basic",maxZoom:22,attribution:'© 1992 - '+(new Date).getFullYear()+" TomTom. ",subdomains:"abcd",style:"main",ext:"png",apikey:""},variants:{Basic:"basic",Hybrid:"hybrid",Labels:"labels"}},Esri:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}",options:{variant:"World_Street_Map",attribution:"Tiles © Esri"},variants:{WorldStreetMap:{options:{attribution:"{attribution.Esri} — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012"}},DeLorme:{options:{variant:"Specialty/DeLorme_World_Base_Map",minZoom:1,maxZoom:11,attribution:"{attribution.Esri} — Copyright: ©2012 DeLorme"}},WorldTopoMap:{options:{variant:"World_Topo_Map",attribution:"{attribution.Esri} — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community"}},WorldImagery:{options:{variant:"World_Imagery",attribution:"{attribution.Esri} — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"}},WorldTerrain:{options:{variant:"World_Terrain_Base",maxZoom:13,attribution:"{attribution.Esri} — Source: USGS, Esri, TANA, DeLorme, and NPS"}},WorldShadedRelief:{options:{variant:"World_Shaded_Relief",maxZoom:13,attribution:"{attribution.Esri} — Source: Esri"}},WorldPhysical:{options:{variant:"World_Physical_Map",maxZoom:8,attribution:"{attribution.Esri} — Source: US National Park Service"}},OceanBasemap:{options:{variant:"Ocean_Basemap",maxZoom:13,attribution:"{attribution.Esri} — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri"}},NatGeoWorldMap:{options:{variant:"NatGeo_World_Map",maxZoom:16,attribution:"{attribution.Esri} — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC"}},WorldGrayCanvas:{options:{variant:"Canvas/World_Light_Gray_Base",maxZoom:16,attribution:"{attribution.Esri} — Esri, DeLorme, NAVTEQ"}}}},OpenWeatherMap:{url:"http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png?appid={apiKey}",options:{maxZoom:19,attribution:'Map data © OpenWeatherMap',apiKey:"",opacity:.5},variants:{Clouds:"clouds",CloudsClassic:"clouds_cls",Precipitation:"precipitation",PrecipitationClassic:"precipitation_cls",Rain:"rain",RainClassic:"rain_cls",Pressure:"pressure",PressureContour:"pressure_cntr",Wind:"wind",Temperature:"temp",Snow:"snow"}},HERE:{url:"https://{s}.{base}.maps.api.here.com/maptile/2.1/{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?app_id={app_id}&app_code={app_code}&lg={language}",options:{attribution:"Map © 1987-"+(new Date).getFullYear()+' HERE',subdomains:"1234",mapID:"newest",app_id:"",app_code:"",base:"base",variant:"normal.day",maxZoom:20,type:"maptile",language:"eng",format:"png8",size:"256"},variants:{normalDay:"normal.day",normalDayCustom:"normal.day.custom",normalDayGrey:"normal.day.grey",normalDayMobile:"normal.day.mobile",normalDayGreyMobile:"normal.day.grey.mobile",normalDayTransit:"normal.day.transit",normalDayTransitMobile:"normal.day.transit.mobile",normalDayTraffic:{options:{variant:"normal.traffic.day",base:"traffic",type:"traffictile"}},normalNight:"normal.night",normalNightMobile:"normal.night.mobile",normalNightGrey:"normal.night.grey",normalNightGreyMobile:"normal.night.grey.mobile",normalNightTransit:"normal.night.transit",normalNightTransitMobile:"normal.night.transit.mobile",reducedDay:"reduced.day",reducedNight:"reduced.night",basicMap:{options:{type:"basetile"}},mapLabels:{options:{type:"labeltile",format:"png"}},trafficFlow:{options:{base:"traffic",type:"flowtile"}},carnavDayGrey:"carnav.day.grey",hybridDay:{options:{base:"aerial",variant:"hybrid.day"}},hybridDayMobile:{options:{base:"aerial",variant:"hybrid.day.mobile"}},hybridDayTransit:{options:{base:"aerial",variant:"hybrid.day.transit"}},hybridDayGrey:{options:{base:"aerial",variant:"hybrid.grey.day"}},hybridDayTraffic:{options:{variant:"hybrid.traffic.day",base:"traffic",type:"traffictile"}},pedestrianDay:"pedestrian.day",pedestrianNight:"pedestrian.night",satelliteDay:{options:{base:"aerial",variant:"satellite.day"}},terrainDay:{options:{base:"aerial",variant:"terrain.day"}},terrainDayMobile:{options:{base:"aerial",variant:"terrain.day.mobile"}}}},FreeMapSK:{url:"http://t{s}.freemap.sk/T/{z}/{x}/{y}.jpeg",options:{minZoom:8,maxZoom:16,subdomains:"1234",bounds:[[47.204642,15.996093],[49.830896,22.576904]],attribution:'{attribution.OpenStreetMap}, vizualization CC-By-SA 2.0 Freemap.sk'}},MtbMap:{url:"http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png",options:{attribution:"{attribution.OpenStreetMap} & USGS"}},CartoDB:{url:"https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png",options:{attribution:'{attribution.OpenStreetMap} © CARTO',subdomains:"abcd",maxZoom:19,variant:"light_all"},variants:{Positron:"light_all",PositronNoLabels:"light_nolabels",PositronOnlyLabels:"light_only_labels",DarkMatter:"dark_all",DarkMatterNoLabels:"dark_nolabels",DarkMatterOnlyLabels:"dark_only_labels",Voyager:"rastertiles/voyager",VoyagerNoLabels:"rastertiles/voyager_nolabels",VoyagerOnlyLabels:"rastertiles/voyager_only_labels",VoyagerLabelsUnder:"rastertiles/voyager_labels_under"}},HikeBike:{url:"https://tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:"{attribution.OpenStreetMap}",variant:"hikebike"},variants:{HikeBike:{},HillShading:{options:{maxZoom:15,variant:"hillshading"}}}},BasemapAT:{url:"https://maps{s}.wien.gv.at/basemap/{variant}/{type}/google3857/{z}/{y}/{x}.{format}",options:{maxZoom:19,attribution:'Datenquelle: basemap.at',subdomains:["","1","2","3","4"],type:"normal",format:"png",bounds:[[46.35877,8.782379],[49.037872,17.189532]],variant:"geolandbasemap"},variants:{basemap:{options:{maxZoom:20,variant:"geolandbasemap"}},grau:"bmapgrau",overlay:"bmapoverlay",terrain:{options:{variant:"bmapgelaende",type:"grau",format:"jpeg"}},surface:{options:{variant:"bmapoberflaeche",type:"grau",format:"jpeg"}},highdpi:{options:{variant:"bmaphidpi",format:"jpeg"}},orthofoto:{options:{maxZoom:20,variant:"bmaporthofoto30cm",format:"jpeg"}}}},nlmaps:{url:"https://geodata.nationaalgeoregister.nl/tiles/service/wmts/{variant}/EPSG:3857/{z}/{x}/{y}.png",options:{minZoom:6,maxZoom:19,bounds:[[50.5,3.25],[54,7.6]],attribution:'Kaartgegevens © Kadaster'},variants:{standaard:"brtachtergrondkaart",pastel:"brtachtergrondkaartpastel",grijs:"brtachtergrondkaartgrijs",luchtfoto:{url:"https://geodata.nationaalgeoregister.nl/luchtfoto/rgb/wmts/2018_ortho25/EPSG:3857/{z}/{x}/{y}.png"}}},NASAGIBS:{url:"https://map1.vis.earthdata.nasa.gov/wmts-webmerc/{variant}/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}",options:{attribution:'Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ.',bounds:[[-85.0511287776,-179.999999975],[85.0511287776,179.999999975]],minZoom:1,maxZoom:9,format:"jpg",time:"",tilematrixset:"GoogleMapsCompatible_Level"},variants:{ModisTerraTrueColorCR:"MODIS_Terra_CorrectedReflectance_TrueColor",ModisTerraBands367CR:"MODIS_Terra_CorrectedReflectance_Bands367",ViirsEarthAtNight2012:{options:{variant:"VIIRS_CityLights_2012",maxZoom:8}},ModisTerraLSTDay:{options:{variant:"MODIS_Terra_Land_Surface_Temp_Day",format:"png",maxZoom:7,opacity:.75}},ModisTerraSnowCover:{options:{variant:"MODIS_Terra_Snow_Cover",format:"png",maxZoom:8,opacity:.75}},ModisTerraAOD:{options:{variant:"MODIS_Terra_Aerosol",format:"png",maxZoom:6,opacity:.75}},ModisTerraChlorophyll:{options:{variant:"MODIS_Terra_Chlorophyll_A",format:"png",maxZoom:7,opacity:.75}}}},NLS:{url:"https://nls-{s}.tileserver.com/nls/{z}/{x}/{y}.jpg",options:{attribution:'National Library of Scotland Historic Maps',bounds:[[49.6,-12],[61.7,3]],minZoom:1,maxZoom:18,subdomains:"0123"}},JusticeMap:{url:"http://www.justicemap.org/tile/{size}/{variant}/{z}/{x}/{y}.png",options:{attribution:'Justice Map',size:"county",bounds:[[14,-180],[72,-56]]},variants:{income:"income",americanIndian:"indian",asian:"asian",black:"black",hispanic:"hispanic",multi:"multi",nonWhite:"nonwhite",white:"white",plurality:"plural"}},Wikimedia:{url:"https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png",options:{attribution:'Wikimedia',minZoom:1,maxZoom:19}},GeoportailFrance:{url:"https://wxs.ign.fr/{apikey}/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE={style}&TILEMATRIXSET=PM&FORMAT={format}&LAYER={variant}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}",options:{attribution:'Geoportail France',bounds:[[-75,-180],[81,180]],minZoom:2,maxZoom:18,apikey:"choisirgeoportail",format:"image/jpeg",style:"normal",variant:"GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD"},variants:{parcels:{options:{variant:"CADASTRALPARCELS.PARCELS",maxZoom:20,style:"bdparcellaire",format:"image/png"}},ignMaps:"GEOGRAPHICALGRIDSYSTEMS.MAPS",maps:"GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD",orthos:{options:{maxZoom:19,variant:"ORTHOIMAGERY.ORTHOPHOTOS"}}}},OneMapSG:{url:"https://maps-{s}.onemap.sg/v3/{variant}/{z}/{x}/{y}.png",options:{variant:"Default",minZoom:11,maxZoom:18,bounds:[[1.56073,104.11475],[1.16,103.502]],attribution:' New OneMap | Map data © contributors, Singapore Land Authority'},variants:{Default:"Default",Night:"Night",Original:"Original",Grey:"Grey",LandLot:"LandLot"}}},e.tileLayer.provider=function(t,n){return new e.TileLayer.Provider(t,n)},e}),n("map",["map/clientlayer","map/labelslayer","d3","leaflet","moment","locationmarker","rbush","leaflet.label","leaflet.providers"],function(e,t,n,r,i,s,o){function h(e,t,n){return function(i){var s=r.circleMarker([i.nodeinfo.location.latitude,i.nodeinfo.location.longitude],t(i));return s.resetStyle=function(){s.setStyle(t(i))},s.on("click",n.node(i)),s.bindLabel(i.nodeinfo.hostname),e[i.nodeinfo.node_id]=s,s}}function b(e,t,n,i){n=n.filter(function(e){return"distance"in e&&e.type!=="VPN"});var s=n.map(function(n){var s={color:n.type==="Kabel"?"#50B0F0":t(n.tq).hex(),weight:4,opacity:.5,dashArray:"none"},o=r.polyline(n.latlngs,s);return o.resetStyle=function(){o.setStyle(s)},o.bindLabel(n.source.node.nodeinfo.hostname+" – "+n.target.node.nodeinfo.hostname+"
"+g(n)+" / "+y(n)+""),o.on("click",i.link(n)),e[n.id]=o,o});return s}var u={worldCopyJump:!0,zoomControl:!1},a=r.Control.extend({options:{position:"bottomright"},initialize:function(e,t){r.Util.setOptions(this,t),this.f=e},onAdd:function(){var e=r.DomUtil.create("button","add-layer");return e.textContent="",r.DomEvent.addListener(e,"click",this.f,this),this.button=e,e}}),f=r.Control.extend({options:{position:"bottomright"},active:!1,button:undefined,initialize:function(e,t){r.Util.setOptions(this,t),this.f=e},onAdd:function(){var e=r.DomUtil.create("button","locate-user");return e.textContent="",r.DomEvent.disableClickPropagation(e),r.DomEvent.addListener(e,"click",this.onClick,this),this.button=e,e},update:function(){this.button.classList.toggle("active",this.active)},set:function(e){this.active=e,this.update()},onClick:function(){this.f(!this.active)}}),l=r.Control.extend({options:{position:"bottomright"},active:!1,button:undefined,initialize:function(e,t){r.Util.setOptions(this,t),this.f=e},onAdd:function(){var e=r.DomUtil.create("button","coord-picker");return e.textContent="",r.DomEvent.addListener(e,"click",this.onClick,this),this.button=e,e},update:function(){this.button.classList.toggle("active",this.active)},set:function(e){this.active=e,this.update()},onClick:function(e){r.DomEvent.stopPropagation(e),this.f(!this.active)}}),w={color:"#1566A9",fillColor:"#1566A9",radius:6,fillOpacity:.5,opacity:.5,weight:2,className:"stroke-first"},E={color:"#D43E2A",fillColor:"#D43E2A",radius:3,fillOpacity:.5,opacity:.5,weight:1,className:"stroke-first"},S={color:"#D43E2A",fillColor:"#D43E2A",radius:6,fillOpacity:.8,opacity:.8,weight:1,className:"stroke-first"},x={color:"#D43E2A",fillColor:"#D43E2A",radius:6,fillOpacity:.8,opacity:.8,weight:2,className:"stroke-first node-alert"},T={color:"#1566A9",fillColor:"#93E929",radius:6,fillOpacity:1,opacity:.5,weight:2};return function(g,y,N,C,k){function W(e){var t=e.onAdd();z.push(t),k.appendChild(t)}function X(){z.forEach(function(e){k.removeChild(e)})}function $(){B={center:j.getCenter(),zoom:j.getZoom()}}function J(){j.locate({watch:!0,enableHighAccuracy:!0,setView:!0}),U.set(!0)}function K(){j.stopLocate(),et(),U.set(!1)}function Q(){j.getContainer().classList.add("pick-coordinates"),j.on("click",Y),V.set(!0)}function G(){j.getContainer().classList.remove("pick-coordinates"),j.off("click",Y),V.set(!1)}function Y(e){C.gotoLocation(e.latlng),G()}function Z(e){F||(F=(new s(e.latlng)).addTo(j)),F.setLatLng(e.latlng),F.setAccuracy(e.accuracy)}function et(){F&&(j.removeLayer(F),F=null)}function tt(e){if(e in R)return;if(e in q)return;try{var t=r.tileLayer.provider(e);I.addBaseLayer(t,e),q[e]=t,c()&&localStorage.setItem("map/customLayers",JSON.stringify(Object.keys(q)))}catch(n){return}}function nt(e){C.gotoLocation(e.latlng)}function ct(e,t){Object.keys(e).forEach(function(t){e[t].resetStyle()}),Object.keys(t).forEach(function(e){t[e].resetStyle()})}function ht(e){var t=null,n=j.getZoom();"maxGotoZoom"in g&&(t=n===undefined?g.maxGotoZoom:Math.max(g.maxGotoZoom,j.getZoom())),j.fitBounds(e,{paddingTopLeft:[N(),0],maxZoom:t})}function pt(){O&&ht(O.getBounds())}function dt(e){var t;return"getBounds"in e?t=e.getBounds():t=r.latLngBounds([e.getLatLng()]),ht(t),e}function vt(e){ct(at,ft);var t;lt!==undefined&&(lt.type==="node"?(t=at[lt.o.nodeinfo.node_id],t&&t.setStyle({color:"orange",weight:20,fillOpacity:1,opacity:.7,className:"stroke-first"})):lt.type==="link"&&(t=ft[lt.o.id],t&&t.setStyle({weight:7,opacity:1,dashArray:"10, 10"}))),e||(t?dt(t):B?j.setView(B.center,B.zoom):pt())}function mt(e){e=e.map(function(e){return e.nodeinfo.location});if(e.length===0)return undefined;var t=e.map(function(e){return e.latitude}),i=e.map(function(e){return e.longitude}),s=r.latLng(n.median(t),n.median(i)),o=[n.deviation(t),n.deviation(i)];o[0]===undefined&&(o[0]=0),o[1]===undefined&&(o[1]=0);var u=r.latLng(s.lat+o[0],s.lng+o[1]),a=s.distanceTo(u);return r.circle(s,a*g.mapSigmaScale)}function gt(e){return{minX:e.nodeinfo.location.latitude,minY:e.nodeinfo.location.longitude,maxX:e.nodeinfo.location.latitude,maxY:e.nodeinfo.location.longitude,node:e}}var A=this,O,M,_,D,P,H,B,j,F,I,q={},R={},U=new f(function(e){e?J():K()}),z=[],V=new l(function(e){e?Q():G()}),rt=document.createElement("div");rt.classList.add("map"),j=r.map(rt,u);var it=g.mapLayers.map(function(e){return{name:e.name,layer:"url"in e?"layers"in e.config?r.tileLayer.wms(e.url,e.config):r.tileLayer(e.url,e.config):r.tileLayer.provider(e.name)}});it[0].layer.addTo(j),it.forEach(function(e){R[e.name]=e.layer}),j.on("locationfound",Z),j.on("locationerror",et),j.on("dragend",$),j.on("contextmenu",nt),W(U),W(V),W(new a(function(){var e=prompt("Leaflet Provider:");tt(e)})),I=r.control.layers(R,[],{position:"bottomright"}),I.addTo(j);if(c()){var st=JSON.parse(localStorage.getItem("map/customLayers"));st&&st.forEach(tt),st=JSON.parse(localStorage.getItem("map/selectedLayer")),st=st&&st.name in R?R[st.name]:st&&st.name in q?q[st.name]:!1,st&&(j.removeLayer(it[0].layer),j.addLayer(st))}var ot=new e({minZoom:15});ot.addTo(j),ot.setZIndex(5);var ut=new t({});ut.addTo(j),ut.setZIndex(6),j.on("baselayerchange",function(e){j.options.maxZoom=e.layer.options.maxZoom,ot.options.maxZoom=j.options.maxZoom,ut.options.maxZoom=j.options.maxZoom,j.getZoom()>j.options.maxZoom&&j.setZoom(j.options.maxZoom),c()&&localStorage.setItem("map/selectedLayer",JSON.stringify({name:e.name}))});var at={},ft={},lt;return A.setData=function(e){at={},ft={},_&&_.clearLayers(),M&&M.clearLayers(),D&&D.clearLayers(),P&&P.clearLayers(),H&&H.clearLayers();var t=b(ft,y,e.graph.links,C);H=r.featureGroup(t).addTo(j),typeof g.fixedCenter=="undefined"?O=mt(e.nodes.all.filter(v)):O=r.circle(r.latLng(new r.LatLng(g.fixedCenter.lat,g.fixedCenter.lng)),g.fixedCenter.radius*1e3);var n=m(e.nodes.all.filter(d),e.nodes.new),s=m(e.nodes.all.filter(p),e.nodes.lost),u=n.filter(v).map(h(at,function(){return w},C)),a=s.filter(v).map(h(at,function(){return E},C)),f=e.nodes.new.filter(v).map(h(at,function(){return T},C)),l=e.nodes.lost.filter(v).map(h(at,function(t){return t.lastseen.isAfter(i(e.now).subtract(3,"days"))?x:S},C));_=r.featureGroup(a).addTo(j),M=r.featureGroup(u).addTo(j),P=r.featureGroup(l).addTo(j),D=r.featureGroup(f).addTo(j);var c=new o(9);c.load(e.nodes.all.filter(d).filter(v).map(gt)),ot.setData(c),ut.setData({online:n.filter(v),offline:s.filter(v),"new":e.nodes.new.filter(v),lost:e.nodes.lost.filter(v)}),vt(!0)},A.resetView=function(){K(),lt=undefined,vt()},A.gotoNode=function(e){K(),lt={type:"node",o:e},vt()},A.gotoLink=function(e){K(),lt={type:"link",o:e},vt()},A.gotoLocation=function(){},A.destroy=function(){X(),j.remove(),rt.parentNode&&rt.parentNode.removeChild(rt)},A.render=function(e){e.appendChild(rt),j.invalidateSize()},A}}),n("sidebar",[],function(){return function(e){var t=this,n=document.createElement("div");n.classList.add("sidebar"),e.appendChild(n);var r=document.createElement("button");n.appendChild(r),r.classList.add("sidebarhandle"),r.onclick=function(){n.classList.toggle("hidden")};var i=document.createElement("div");return i.classList.add("container"),n.appendChild(i),t.getWidth=function(){if(n.classList.contains("hidden"))return 0;var e=window.matchMedia("(max-width: 630pt)");return e.matches?0:n.offsetWidth},t.add=function(e){e.render(i)},t.ensureVisible=function(){n.classList.remove("hidden")},t.hide=function(){i.classList.add("hidden")},t.reveal=function(){i.classList.remove("hidden")},t.container=n,t}}),n("tabs",[],function(){return function(){function r(e){for(var r=0;r0}).map(function(e){return[e.count,e.label].join(" ")}).join(", ");n.textContent=t+" Knoten "+"("+h+"), "+l+" Client"+(l===1?", ":"s, ")+c+" Gateways",r.textContent="Diese Daten sind von "+e.timestamp.format("LLLL")+"."},t.render=function(t){var i=document.createElement("h2");i.textContent=e.siteName,t.appendChild(i);var s=document.createElement("p");t.appendChild(s),n=document.createTextNode(""),s.appendChild(n),s.appendChild(document.createElement("br")),r=document.createTextNode(""),s.appendChild(r)},t}}),n("legend",[],function(){return function(){var e=this;return e.render=function(e){var t=document.createElement("p");t.setAttribute("class","legend"),e.appendChild(t);var n=document.createElement("span");n.setAttribute("class","legend-new");var r=document.createElement("span");r.setAttribute("class","symbol");var i=document.createTextNode(" Neuer Knoten");n.appendChild(r),n.appendChild(i),t.appendChild(n);var s=document.createElement("span");s.setAttribute("class","legend-online");var o=document.createElement("span");o.setAttribute("class","symbol");var u=document.createTextNode(" Knoten ist online");s.appendChild(o),s.appendChild(u),t.appendChild(s);var a=document.createElement("span");a.setAttribute("class","legend-offline");var f=document.createElement("span");f.setAttribute("class","symbol");var l=document.createTextNode(" Knoten ist offline");a.appendChild(f),a.appendChild(l),t.appendChild(a)},e}}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof n&&n.amd)n("virtual-dom",[],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.virtualDom=e()}}(function(){var e,n,r;return function i(e,n,r){function s(u,a){if(!n[u]){if(!e[u]){var f=typeof t=="function"&&t;if(!a&&f)return f(u,!0);if(o)return o(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[u]={exports:{}};e[u][0].call(c.exports,function(t){var n=e[u][1][t];return s(n?n:t)},c,c.exports,i,e,n,r)}return n[u].exports}var o=typeof t=="function"&&t;for(var u=0;u>>0:s>>>0;while(l=i.exec(e)){c=l.index+l[0].length;if(c>a){o.push(e.slice(a,l.index)),!r&&l.length>1&&l[0].replace(f,function(){for(var e=1;e1&&l.index=s)break}i.lastIndex===l.index&&i.lastIndex++}return a===e.length?(h||!i.test(""))&&o.push(""):o.push(e.slice(a)),o.length>s?o.slice(0,s):o},i}()},{}],6:[function(e,t,n){},{}],7:[function(e,t,n){"use strict";function o(e){var t=e[s];return t||(t=e[s]={}),t}var r=e("individual/one-version"),i="7";r("ev-store",i);var s="__EV_STORE_KEY@"+i;t.exports=o},{"individual/one-version":9}],8:[function(e,t,n){(function(e){"use strict";function r(e,t){return e in n?n[e]:(n[e]=t,t)}var n=typeof window!="undefined"?window:typeof e!="undefined"?e:{};t.exports=r}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],9:[function(e,t,n){"use strict";function i(e,t,n){var i="__INDIVIDUAL_ONE_VERSION_"+e,s=i+"_ENFORCE_SINGLETON",o=r(s,t);if(o!==t)throw new Error("Can only have one copy of "+e+".\n"+"You already have version "+o+" installed.\n"+"This means you cannot install version "+t);return r(i,n)}var r=e("./index.js");t.exports=i},{"./index.js":8}],10:[function(e,t,n){(function(n){var r=typeof n!="undefined"?n:typeof window!="undefined"?window:{},i=e("min-document");if(typeof document!="undefined")t.exports=document;else{var s=r["__GLOBAL_DOCUMENT_CACHE@4"];s||(s=r["__GLOBAL_DOCUMENT_CACHE@4"]=i),t.exports=s}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"min-document":6}],11:[function(e,t,n){"use strict";t.exports=function(t){return typeof t=="object"&&t!==null}},{}],12:[function(e,t,n){function s(e){return i.call(e)==="[object Array]"}var r=Array.isArray,i=Object.prototype.toString;t.exports=r||s},{}],13:[function(e,t,n){var r=e("./vdom/patch.js");t.exports=r},{"./vdom/patch.js":18}],14:[function(e,t,n){function s(e,t,n){for(var s in t){var a=t[s];a===undefined?o(e,s,a,n):i(a)?(o(e,s,a,n),a.hook&&a.hook(e,s,n?n[s]:undefined)):r(a)?u(e,t,n,s,a):e[s]=a}}function o(e,t,n,r){if(r){var s=r[t];if(!i(s))if(t==="attributes")for(var o in s)e.removeAttribute(o);else if(t==="style")for(var u in s)e.style[u]="";else typeof s=="string"?e[t]="":e[t]=null;else s.unhook&&s.unhook(e,t,n)}}function u(e,t,n,i,s){var o=n?n[i]:undefined;if(i==="attributes"){for(var u in s){var f=s[u];f===undefined?e.removeAttribute(u):e.setAttribute(u,f)}return}if(o&&r(o)&&a(o)!==a(s)){e[i]=s;return}r(e[i])||(e[i]={});var l=i==="style"?"":undefined;for(var c in s){var h=s[c];e[i][c]=h===undefined?l:h}}function a(e){if(Object.getPrototypeOf)return Object.getPrototypeOf(e);if(e.__proto__)return e.__proto__;if(e.constructor)return e.constructor.prototype}var r=e("is-object"),i=e("../vnode/is-vhook.js");t.exports=s},{"../vnode/is-vhook.js":26,"is-object":11}],15:[function(e,t,n){function f(e,t){var n=t?t.document||r:r,l=t?t.warn:null;e=a(e).a;if(u(e))return e.init();if(o(e))return n.createTextNode(e.text);if(!s(e))return l&&l("Item is not a valid virtual dom node",e),null;var c=e.namespace===null?n.createElement(e.tagName):n.createElementNS(e.namespace,e.tagName),h=e.properties;i(c,h);var p=e.children;for(var d=0;d>0,o=e[s];if(r===i)return o>=t&&o<=n;if(on))return!0;i=s-1}}return!1}function u(e,t){return e>t?1:-1}var r={};t.exports=i},{}],17:[function(e,t,n){function u(e,t,n){var i=e.type,o=e.vNode,u=e.patch;switch(i){case s.REMOVE:return a(t,o);case s.INSERT:return f(t,u,n);case s.VTEXT:return l(t,o,u,n);case s.WIDGET:return c(t,o,u,n);case s.VNODE:return h(t,o,u,n);case s.ORDER:return d(t,u),t;case s.PROPS:return r(t,u,o.properties),t;case s.THUNK:return v(t,n.patch(t,u,n));default:return t}}function a(e,t){var n=e.parentNode;return n&&n.removeChild(e),p(e,t),null}function f(e,t,n){var r=n.render(t,n);return e&&e.appendChild(r),e}function l(e,t,n,r){var i;if(e.nodeType===3)e.replaceData(0,e.length,n.text),i=e;else{var s=e.parentNode;i=r.render(n,r),s&&i!==e&&s.replaceChild(i,e)}return i}function c(e,t,n,r){var i=o(t,n),s;i?s=n.update(t,e)||e:s=r.render(n,r);var u=e.parentNode;return u&&s!==e&&u.replaceChild(s,e),i||p(e,t),s}function h(e,t,n,r){var i=e.parentNode,s=r.render(n,r);return i&&s!==e&&i.replaceChild(s,e),s}function p(e,t){typeof t.destroy=="function"&&i(t)&&t.destroy(e)}function d(e,t){var n=e.childNodes,r={},i,s,o;for(var u=0;u=a++?null:n[o.to])}function v(e,t){return e&&t&&e!==t&&e.parentNode&&e.parentNode.replaceChild(t,e),t}var r=e("./apply-properties"),i=e("../vnode/is-widget.js"),s=e("../vnode/vpatch.js"),o=e("./update-widget");t.exports=u},{"../vnode/is-widget.js":29,"../vnode/vpatch.js":32,"./apply-properties":14,"./update-widget":19}],18:[function(e,t,n){function a(e,t,n){return n=n||{},n.patch=n.patch&&n.patch!==a?n.patch:f,n.render=n.render||s,n.patch(e,t,n)}function f(e,t,n){var i=c(t);if(i.length===0)return e;var s=o(e,t.a,i),u=e.ownerDocument;!n.document&&u!==r&&(n.document=u);for(var a=0;ac?l:c;for(var d=0;d=i.length?t.length:i[f];for(var m=0;m=v&&a.push(g)}var y=a.slice(),b=0,w=[],x=[],T;for(var N=0;N-1?s(e,t,n):t.indexOf("%")>-1?o(e,t,n):t.indexOf(":")>-1?u(e,t):f(e._value,t,n)}function i(e,t){var n,r,i,s,o,u=t,f=["KB","MB","GB","TB","PB","EB","ZB","YB"],l=!1;if(t.indexOf(":")>-1)e._value=a(t);else if(t===g)e._value=0;else{for("."!==v[m].delimiters.decimal&&(t=t.replace(/\./g,"").replace(v[m].delimiters.decimal,".")),n=new RegExp("[^a-zA-Z]"+v[m].abbreviations.thousand+"(?:\\)|(\\"+v[m].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+v[m].abbreviations.million+"(?:\\)|(\\"+v[m].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+v[m].abbreviations.billion+"(?:\\)|(\\"+v[m].currency.symbol+")?(?:\\))?)?$"),s=new RegExp("[^a-zA-Z]"+v[m].abbreviations.trillion+"(?:\\)|(\\"+v[m].currency.symbol+")?(?:\\))?)?$"),o=0;o<=f.length&&!(l=t.indexOf(f[o])>-1?Math.pow(1024,o+1):!1);o++);e._value=(l?l:1)*(u.match(n)?Math.pow(10,3):1)*(u.match(r)?Math.pow(10,6):1)*(u.match(i)?Math.pow(10,9):1)*(u.match(s)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*Number(t.replace(/[^0-9\.]+/g,"")),e._value=l?Math.ceil(e._value):e._value}return e._value}function s(e,t,n){var r,i,s=t.indexOf("$"),o=t.indexOf("("),u=t.indexOf("-"),a="";return t.indexOf(" $")>-1?(a=" ",t=t.replace(" $","")):t.indexOf("$ ")>-1?(a=" ",t=t.replace("$ ","")):t=t.replace("$",""),i=f(e._value,t,n),1>=s?i.indexOf("(")>-1||i.indexOf("-")>-1?(i=i.split(""),r=1,(o>s||u>s)&&(r=0),i.splice(r,0,v[m].currency.symbol+a),i=i.join("")):i=v[m].currency.symbol+a+i:i.indexOf(")")>-1?(i=i.split(""),i.splice(-1,0,a+v[m].currency.symbol),i=i.join("")):i=i+a+v[m].currency.symbol,i}function o(e,t,n){var r,i="",s=100*e._value;return t.indexOf(" %")>-1?(i=" ",t=t.replace(" %","")):t=t.replace("%",""),r=f(s,t,n),r.indexOf(")")>-1?(r=r.split(""),r.splice(-1,0,i+"%"),r=r.join("")):r=r+i+"%",r}function u(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return t+":"+(10>n?"0"+n:n)+":"+(10>r?"0"+r:r)}function a(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}function f(e,n,r){var i,s,o,u,a,f,l=!1,c=!1,h=!1,p="",d=!1,y=!1,b=!1,w=!1,E=!1,S="",x="",T=Math.abs(e),N=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],C="",k=!1;if(0===e&&null!==g)return g;if(n.indexOf("(")>-1?(l=!0,n=n.slice(1,-1)):n.indexOf("+")>-1&&(c=!0,n=n.replace(/\+/g,"")),n.indexOf("a")>-1&&(d=n.indexOf("aK")>=0,y=n.indexOf("aM")>=0,b=n.indexOf("aB")>=0,w=n.indexOf("aT")>=0,E=d||y||b||w,n.indexOf(" a")>-1?(p=" ",n=n.replace(" a","")):n=n.replace("a",""),T>=Math.pow(10,12)&&!E||w?(p+=v[m].abbreviations.trillion,e/=Math.pow(10,12)):T=Math.pow(10,9)&&!E||b?(p+=v[m].abbreviations.billion,e/=Math.pow(10,9)):T=Math.pow(10,6)&&!E||y?(p+=v[m].abbreviations.million,e/=Math.pow(10,6)):(T=Math.pow(10,3)&&!E||d)&&(p+=v[m].abbreviations.thousand,e/=Math.pow(10,3))),n.indexOf("b")>-1)for(n.indexOf(" b")>-1?(S=" ",n=n.replace(" b","")):n=n.replace("b",""),o=0;o<=N.length;o++)if(i=Math.pow(1024,o),s=Math.pow(1024,o+1),e>=i&&s>e){S+=N[o],i>0&&(e/=i);break}return n.indexOf("o")>-1&&(n.indexOf(" o")>-1?(x=" ",n=n.replace(" o","")):n=n.replace("o",""),x+=v[m].ordinal(e)),n.indexOf("[.]")>-1&&(h=!0,n=n.replace("[.]",".")),u=e.toString().split(".")[0],a=n.split(".")[1],f=n.indexOf(","),a?(a.indexOf("[")>-1?(a=a.replace("]",""),a=a.split("["),C=t(e,a[0].length+a[1].length,r,a[1].length)):C=t(e,a.length,r),u=C.split(".")[0],C=C.split(".")[1].length?v[m].delimiters.decimal+C.split(".")[1]:"",h&&0===Number(C.slice(1))&&(C="")):u=t(e,null,r),u.indexOf("-")>-1&&(u=u.slice(1),k=!0),f>-1&&(u=u.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+v[m].delimiters.thousands)),0===n.indexOf(".")&&(u=""),(l&&k?"(":"")+(!l&&k?"-":"")+(!k&&c?"+":"")+u+C+(x?x:"")+(p?p:"")+(S?S:"")+(l&&k?")":"")}function l(e,t){v[e]=t}function c(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)}function h(){var e=Array.prototype.slice.call(arguments);return e.reduce(function(e,t){var n=c(e),r=c(t);return n>r?n:r},-1/0)}var p,d="1.5.3",v={},m="en",g=null,y="0,0",b="undefined"!=typeof module&&module.exports;p=function(t){return p.isNumeral(t)?t=t.value():0===t||"undefined"==typeof t?t=0:Number(t)||(t=p.fn.unformat(t)),new e(Number(t))},p.version=d,p.isNumeral=function(t){return t instanceof e},p.language=function(e,t){if(!e)return m;if(e&&!t){if(!v[e])throw new Error("Unknown language : "+e);m=e}return(t||!v[e])&&l(e,t),p},p.languageData=function(e){if(!e)return v[m];if(!v[e])throw new Error("Unknown language : "+e);return v[e]},p.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),p.zeroFormat=function(e){g="string"==typeof e?e:null},p.defaultFormat=function(e){y="string"==typeof e?e:"0.0"},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e,t){"use strict";if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var n,r,i=this.length>>>0,s=!1;for(1n;++n)this.hasOwnProperty(n)&&(s?r=e(r,this[n],n,this):(r=this[n],s=!0));if(!s)throw new TypeError("Reduce of empty array with no initial value");return r}),p.fn=e.prototype={clone:function(){return p(this)},format:function(e,t){return r(this,e?e:y,void 0!==t?t:Math.round)},unformat:function(e){return"[object Number]"===Object.prototype.toString.call(e)?e:i(this,e?e:y)},value:function(){return this._value},valueOf:function(){return this._value},set:function(e){return this._value=Number(e),this},add:function(e){function t(e,t,r,i){return e+n*t}var n=h.call(null,this._value,e);return this._value=[this._value,e].reduce(t,0)/n,this},subtract:function(e){function t(e,t,r,i){return e-n*t}var n=h.call(null,this._value,e);return this._value=[e].reduce(t,this._value*n)/n,this},multiply:function(e){function t(e,t,n,r){var i=h(e,t);return e*i*t*i/(i*i)}return this._value=[this._value,e].reduce(t,1),this},divide:function(e){function t(e,t,n,r){var i=h(e,t);return e*i/(t*i)}return this._value=[this._value,e].reduce(t),this},difference:function(e){return Math.abs(p(this._value).subtract(e).value())}},b&&(module.exports=p),"undefined"==typeof ender&&(this.numeral=p),"function"==typeof n&&n.amd&&n("numeral",[],function(){return p})}.call(this),n("nodelist",["sorttable","virtual-dom","numeral"],function(e,t,n){function r(e,t){if(t.flags.online&&"uptime"in t.statistics)return Math.round(t.statistics.uptime);if(!t.flags.online&&"lastseen"in t)return Math.round(-(e.unix()-t.lastseen.unix()))}function i(e){var t="";return e/=3600,e!==undefined&&(Math.abs(e)>=24?t=Math.round(e/24)+"d":t=Math.round(e)+"h"),t}var s=[{name:"Knoten",sort:function(e,t){var n=typeof e.nodeinfo.hostname=="string"?e.nodeinfo.hostname:e.nodeinfo.node_id,r=typeof t.nodeinfo.hostname=="string"?t.nodeinfo.hostname:t.nodeinfo.node_id;return typeof n=="string"&&typeof r=="string"?n.localeCompare(r):typeof n=="string"?1:typeof r=="string"?-1:0},reverse:!1},{name:"Uptime",sort:function(e,t){return e.uptime-t.uptime},reverse:!0},{name:"#Links",sort:function(e,t){return e.meshlinks-t.meshlinks},reverse:!0},{name:"Clients",sort:function(e,t){return("clients"in e.statistics?e.statistics.clients.total:-1)-("clients"in t.statistics?t.statistics.clients.total:-1)},reverse:!0}];return function(o){function u(e){var r=[],s=["hostname",e.flags.online?"online":"offline"];r.push(t.h("a",{className:s.join(" "),onclick:o.node(e),href:"#!n:"+e.nodeinfo.node_id},e.nodeinfo.hostname)),v(e)&&r.push(t.h("span",{className:"icon ion-location"}));var u=t.h("td",r),a=t.h("td",i(e.uptime)),f=t.h("td",e.meshlinks.toString()),l=t.h("td",n("clients"in e.statistics?e.statistics.clients.total:"").format("0,0"));return t.h("tr",[u,a,f,l])}var a=new e(s,0,u);this.render=function(e){var t=document.createElement("div");e.appendChild(t);var n=document.createElement("h2");n.textContent="Alle Knoten",t.appendChild(n),t.appendChild(a.el)},this.setData=function(e){var t=e.nodes.all.map(function(t){var n=Object.create(t);return n.uptime=r(e.now,t)||0,n.meshlinks=t.meshlinks||0,n});a.setData(t)}}}),n("simplenodelist",["moment","virtual-dom"],function(e,t){return function(n,r,i,s){var o=this,u,a;return o.render=function(e){u=document.createElement("div"),e.appendChild(u)},o.setData=function(o){var f=o.nodes[n];if(f.length===0){while(u.firstChild)u.removeChild(u.firstChild);a=null;return}if(!a){var l=document.createElement("h2");l.textContent=s,u.appendChild(l);var c=document.createElement("table");u.appendChild(c),a=document.createElement("tbody"),a.last=t.h("tbody"),c.appendChild(a)}var h=f.map(function(n){var s=e(n[r]).from(o.now),u=[],a=["hostname",n.flags.online?"online":"offline"];u.push(t.h("a",{className:a.join(" "),onclick:i.node(n),href:"#!n:"+n.nodeinfo.node_id},n.nodeinfo.hostname)),v(n)&&u.push(t.h("span",{className:"icon ion-location"}));var f=t.h("td",u),l=t.h("td",s);return t.h("tr",[f,l])}),p=t.h("tbody",h);a=t.patch(a,t.diff(a.last,p)),a.last=p},o}}),n("infobox/link",[],function(){function e(e,t){var n={};return n["{SOURCE}"]=t.source.node_id,n["{SOURCE_NAME}"]=t.source.node.nodeinfo.hostname?t.source.node.nodeinfo.hostname:"unknown",n["{TARGET}"]=t.target.node_id,n["{TARGET_NAME}"]=t.target.node.nodeinfo.hostname?t.target.node.nodeinfo.hostname:"unknown",E(e,n)}return function(t,n,r,i){var s=!i.source.node,o=document.createElement("h2"),u=document.createElement("a");s||(u.href="#",u.onclick=r.node(i.source.node)),u.textContent=s?i.source.id:i.source.node.nodeinfo.hostname,o.appendChild(u),o.appendChild(document.createTextNode(" → "));var a=document.createElement("a");a.href="#",a.onclick=r.node(i.target.node),a.textContent=i.target.node.nodeinfo.hostname,o.appendChild(a),n.appendChild(o);var f=document.createElement("table");f.classList.add("attributes"),b(f,"TQ",y(i)),b(f,"Entfernung",g(i)),b(f,"Typ",i.type);var c=s?null:l(i.source.node.nodeinfo,["hardware","model"]),h=l(i.target.node.nodeinfo,["hardware","model"]);b(f,"Hardware",(c!=null?c:"unbekannt")+" – "+(h!=null?h:"unbekannt")),n.appendChild(f),t.linkInfos&&t.linkInfos.forEach(function(t){var r=document.createElement("h4");r.textContent=t.name,n.appendChild(r),n.appendChild(e(t,i))})}}),!function(){function e(e,t){if(!e||"TABLE"!==e.tagName)throw new Error("Element must be a table");this.init(e,t||{})}var t=[],n=function(e){var t;return window.CustomEvent&&"function"==typeof window.CustomEvent?t=new CustomEvent(e):(t=document.createEvent("CustomEvent"),t.initCustomEvent(e,!1,!1,void 0)),t},r=function(e){return e.getAttribute("data-sort")||e.textContent||e.innerText||""},i=function(e,t){return e=e.toLowerCase(),t=t.toLowerCase(),e===t?0:t>e?1:-1},s=function(e,t){return function(n,r){var i=e(n.td,r.td);return 0===i?t?r.index-n.index:n.index-r.index:i}};e.extend=function(e,n,r){if("function"!=typeof n||"function"!=typeof r)throw new Error("Pattern and sort must be a function");t.push({name:e,pattern:n,sort:r})},e.prototype={init:function(e,t){var n,r,i,s,o=this;if(o.table=e,o.thead=!1,o.options=t,e.rows&&e.rows.length>0&&(e.tHead&&e.tHead.rows.length>0?(n=e.tHead.rows[e.tHead.rows.length-1],o.thead=!0):n=e.rows[0]),n){var u=function(){o.current&&o.current!==this&&(o.current.classList.remove("sort-up"),o.current.classList.remove("sort-down")),o.current=this,o.sortTable(this)};for(i=0;i0&&c.push(l),h++;if(!c)return}for(h=0;hh;h++)g[h]?(l=g[h],b++):l=m[h-b].tr,u.table.tBodies[0].appendChild(l);u.table.dispatchEvent(n("afterSort"))}},refresh:function(){void 0!==this.current&&this.sortTable(this.current,!0)}},"undefined"!=typeof module&&module.exports?module.exports=e:window.Tablesort=e}(),n("tablesort",function(e){return function(){var t,n;return t||e.Tablesort}}(this)),function(){var e=function(e){return e.replace(/[^\-?0-9.]/g,"")},t=function(e,t){return e=parseFloat(e),t=parseFloat(t),e=isNaN(e)?0:e,t=isNaN(t)?0:t,e-t};Tablesort.extend("number",function(e){return e.match(/^-?[£\x24Û¢´€]?\d+\s*([,\.]\d{0,2})/)||e.match(/^-?\d+\s*([,\.]\d{0,2})?[£\x24Û¢´€]/)||e.match(/^-?(\d)*-?([,\.]){0,1}-?(\d)+([E,e][\-+][\d]+)?%?$/)},function(n,r){return n=e(n),r=e(r),t(r,n)})}(),n("tablesort.numeric",["tablesort"],function(){}),n("infobox/node",["moment","numeral","tablesort","tablesort.numeric"],function(e,t,n){function r(e){function n(e){var n=Math.sign(e)>-1?"' N":"' S";e=Math.abs(e);var r=Math.floor(e),i=e*60%60;return r=(r<10?"0":"")+r,r+"° "+t(i).format("0.000")+n}function r(e){var n=Math.sign(e)>-1?"' E":"' W";e=Math.abs(e);var r=Math.floor(e),i=e*60%60;return r=(r<100?"0"+(r<10?"0":""):"")+r,r+"° "+t(i).format("0.000")+n}return v(e)?function(t){var i=e.nodeinfo.location.latitude,s=e.nodeinfo.location.longitude,o=document.createElement("a");o.textContent=n(i)+" "+r(s),o.href="geo:"+i+","+s,t.appendChild(o)}:undefined}function i(e){return function(t){t.classList.add(e.flags.unseen?"unseen":e.flags.online?"online":"offline"),e.flags.online?t.textContent="online, letzte Nachricht "+e.lastseen.fromNow()+" ("+e.lastseen.format("DD.MM.YYYY, H:mm:ss")+")":t.textContent="offline, letzte Nachricht "+e.lastseen.fromNow()+" ("+e.lastseen.format("DD.MM.YYYY, H:mm:ss")+")"}}function s(e){var t=l(e.nodeinfo,["software","firmware","release"]),n=l(e.nodeinfo,["software","firmware","base"]);return t===null||n===null?undefined:t+" / "+n}function o(e,t){var n=l(e.nodeinfo,["system","site_code"]),r=null;return t.siteNames&&(r=n,t.siteNames.forEach(function(e){n===e.site&&(r=e.name)})),r}function u(e,t){var n=l(e.nodeinfo,["system","domain_code"]),r=null;return t.domainNames&&(r=n,t.domainNames.forEach(function(e){n===e.domain&&(r=e.name)})),r}function a(t){return"uptime"in t.statistics?e.duration(t.statistics.uptime,"seconds").humanize():undefined}function f(e){return"firstseen"in e?e.firstseen.fromNow(!0):undefined}function c(e){if(!e.flags.online)return undefined;var t=h(e);p(e);var n=" (",r=" in der lokalen Wolke)";return function(i){const s=e.statistics&&e.statistics.clients&&!Number.isNaN(e.statistics.clients.total)?e.statistics.clients.total:0;i.appendChild(document.createTextNode(s>0?s:"keine")),i.appendChild(document.createTextNode(n)),i.appendChild(document.createTextNode(t>0?t:"keine")),i.appendChild(document.createTextNode(r)),i.appendChild(document.createElement("br"));var o=S(e.statistics);for(var u in o){var a=o[u],f=document.createElement("span");f.classList.add("clients"),f.textContent=" ".repeat(a.count),f.style.color=a.color,i.appendChild(f)}var l=document.createElement("span");l.classList.add("clientsMesh"),l.textContent=" ".repeat(t-s),i.appendChild(l)}}function h(e){var t=0;return e.statistics&&e.statistics.clients&&!isNaN(e.statistics.clients.total)&&(t=e.statistics.clients.total),e?e.parsed?0:(e.parsed=1,e.neighbours.forEach(function(e){!e.link.isVPN&&e.node&&(t+=h(e.node))}),t):0}function p(e){if(!e.parsed)return;e.parsed=0,e.neighbours.forEach(function(e){!e.link.isVPN&&e.node&&p(e.node)});return}function d(e){if(!e.flags.online)return undefined;var t=h(e);return p(e),function(e){e.appendChild(document.createTextNode(t>0?t:"keine")),e.appendChild(document.createElement("br"))}}function m(e){var t=l(e.nodeinfo,["network","addresses"]);return t===null?undefined:(t.sort(),function(e){t.forEach(function(t,n){var r=!t.startsWith("fe80:");n>0&&e.appendChild(document.createElement("br"));if(r){var i=document.createElement("a");t.includes(".")?i.href="http://"+t+"/":i.href="http://["+t+"]/",i.textContent=t,e.appendChild(i)}else e.appendChild(document.createTextNode(t))})})}function w(e,t){var n=document.createElement("span");n.classList.add("bar"),n.classList.add(e);var r=document.createElement("span");r.style.width=t*100+"%",n.appendChild(r);var i=document.createElement("label");return i.textContent=Math.round(t*100)+" %",n.appendChild(i),n}function x(e,t){var n=document.createElement("span");n.classList.add("bar"),n.classList.add(e);var r=document.createElement("span");t>=1?(r.style.width=t*100%100+"%",r.style.background="rgba(255, 50, 50, 0.9)",n.style.background="rgba(255, 50, 50, 0.6)",n.appendChild(r)):(r.style.width=t*100+"%",n.appendChild(r));var i=document.createElement("label");return i.textContent=+(Math.round(t+"e+2")+"e-2"),n.appendChild(i),n}function T(e){return"loadavg"in e.statistics?function(t){t.appendChild(x("load-avg",e.statistics.loadavg))}:undefined}function N(e){return"memory_usage"in e.statistics?function(t){t.appendChild(w("memory-usage",e.statistics.memory_usage))}:undefined}function C(e){e.wait=e.busy-e.rx-e.tx;var t=document.createElement("span");t.classList.add("bar"),t.classList.add("airtime"),t.setAttribute("title","RX:"+Math.round(e.rx*100)+"%, TX:"+Math.round(e.tx*100)+"%, Wait:"+Math.round(e.wait*100)+"%");var n=document.createElement("span");n.style.width=e.rx*100+"%",n.style.background="rgba(85, 128, 32, 0.8)",t.appendChild(n);var r=document.createElement("span");r.style.width=e.tx*100+"%",r.style.background="rgba(233, 85, 32, 1)",t.appendChild(r);var i=document.createElement("span");i.style.width=e.wait*100+"%",i.style.background="rgba(32, 85, 128, 1)",t.appendChild(i),t.style.background="rgba(85, 128, 32, 0.5)";var s=document.createElement("label");return s.textContent=Math.round(e.busy*100)+" %",t.appendChild(s),function(e){e.appendChild(t)}}function k(e,t){if(!e)return document.createTextNode("unknown");var n=!e.node,r=n?e.id?e.id:e:e.node.nodeinfo.hostname;if(!n){var i=document.createElement("a");return i.classList.add("hostname-link"),i.href="#",i.onclick=t.node(e.node),i.textContent=r,i}return document.createTextNode(r)}function L(e,t){var n;l(e.statistics,["nexthop"])&&(n=l(e.statistics,["nexthop"])),l(e.statistics,["gateway_nexthop"])&&(n=l(e.statistics,["gateway_nexthop"]));var r=l(e.statistics,["gateway"]);return r?function(e){var i=0;while(r&&n&&r.id!==n.id&&i<10){i!==0&&e.appendChild(document.createTextNode(" -> ")),e.appendChild(k(n,t)),i++;if(!n.node||!n.node.statistics)break;if(!l(n.node.statistics,["gateway"])||!l(n.node.statistics,["gateway"]).id)break;if(l(n.node.statistics,["gateway"]).id!==r.id)break;if(l(n.node.statistics,["gateway_nexthop"]))n=l(n.node.statistics,["gateway_nexthop"]);else{if(!l(n.node.statistics,["nexthop"]))break;n=l(n.node.statistics,["nexthop"])}}r&&n&&r.id!==n.id&&(i!==0&&e.appendChild(document.createTextNode(" -> ")),i++,e.appendChild(document.createTextNode("..."))),i!==0&&e.appendChild(document.createTextNode(" -> ")),e.appendChild(k(r,t))}:null}function A(e){var t=l(e.nodeinfo,["pages"]);return t===null?undefined:(t.sort(),function(e){t.forEach(function(t,n){n>0&&e.appendChild(document.createElement("br"));var r=document.createElement("span"),i=document.createElement("a");i.href=t;if(t.search(/^https:\/\//i)!==-1){var s=document.createElement("span");s.className="ion-android-lock",r.appendChild(s);var o=document.createTextNode(" ");r.appendChild(o),i.textContent=t.replace(/^https:\/\//i,"")}else i.textContent=t.replace(/^http:\/\//i,"");r.appendChild(i),e.appendChild(r)})})}function O(e){var t=l(e.nodeinfo,["software","autoupdater"]);return t?t.enabled?"aktiviert ("+t.branch+")":"deaktiviert":undefined}function M(e,t){if(!t)return document.createTextNode("Knotenname");var n,r,i=t.split("").reduce(function(e,t){return e=(e<<5)-e+t.charCodeAt(0),e&e},0);n=document.createElement("img"),n.id="routerpicture",n.classList.add("nodeImg"),n.src=e.thumbnail.replace("{MODELHASH}",i),n.onerror=function(){document.getElementById("routerpicdiv").outerHTML="Knotenname"},e.caption&&(r=e.caption.replace("{MODELHASH}",i),n||(n=document.createTextNode(r)));var s=document.createElement("p");return s.appendChild(n),n}function _(e,t){var n={};return n["{NODE_ID}"]=t.nodeinfo.node_id?t.nodeinfo.node_id:"unknown",n["{NODE_NAME}"]=t.nodeinfo.hostname?t.nodeinfo.hostname:"unknown",E(e,n)}return function(e,t,h,p){var w=document.createElement("table");w.classList.add("attributes");if(e.hwImg){var E=document.createElement("div");E.id="routerpicdiv";try{e.hwImg.forEach(function(e){try{E.appendChild(M(e,l(p,["nodeinfo","hardware","model"])))}catch(t){console.log(t.message)}})}catch(S){console.log(S.message)}b(w,E,p.nodeinfo.hostname)}else{var x=document.createElement("h2");x.textContent=p.nodeinfo.hostname,t.appendChild(x)}b(w,"Status",i(p)),b(w,"Gateway",p.flags.gateway?"ja":null),b(w,"Koordinaten",r(p)),e.showContact&&b(w,"Kontakt",l(p.nodeinfo,["owner","contact"])),b(w,"Hardware",l(p.nodeinfo,["hardware","model"])),b(w,"Primäre MAC",l(p.nodeinfo,["network","mac"])),b(w,"Node ID",l(p.nodeinfo,["node_id"])),b(w,"Firmware",s(p)),b(w,"Site",o(p,e)),b(w,"Domain",u(p,e)),b(w,"Uptime",a(p)),b(w,"Teil des Netzes",f(p));if("airtime"in p.statistics){var D=p.statistics.airtime.sort(function(e,t){return e.frequency-t.frequency});for(var P in D){var H=D[P],B=Math.floor(H.frequency/1e3),j;B===2?j="Kanal "+(H.frequency-2407)/5:B===5?j="Kanal "+(H.frequency-5e3)/5:j=H.frequency.toString()+" MHz",b(w,"Airtime "+j,C(H))}}b(w,"Systemlast",T(p)),b(w,"Arbeitsspeicher",N(p)),b(w,"IP Adressen",m(p)),b(w,"Webseite",A(p)),b(w,"Gewähltes Gateway",L(p,h)),b(w,"Autom. Updates",O(p)),b(w,"Clients",c(p),d(p)),t.appendChild(w),e.nodeInfos&&e.nodeInfos.forEach(function(e){var n=document.createElement("h4");n.textContent=e.name,t.appendChild(n),t.appendChild(_(e,p))});if(p.neighbours.length>0){var F=document.createElement("h3");F.textContent="Links ("+p.neighbours.length+")",t.appendChild(F);var I=document.createElement("table"),q=document.createElement("thead"),R=document.createElement("tr"),U=document.createElement("th");U.textContent=" ",R.appendChild(U);var z=document.createElement("th");z.textContent="Knoten",z.classList.add("sort-default"),R.appendChild(z);var W=document.createElement("th");W.textContent="TQ",R.appendChild(W);var X=document.createElement("th");X.textContent="Typ",R.appendChild(X);var V=document.createElement("th");V.textContent="Entfernung",R.appendChild(V),q.appendChild(R),I.appendChild(q);var $=document.createElement("tbody");p.neighbours.forEach(function(e){var t=!e.node,n=document.createElement("tr"),r=document.createElement("td");r.appendChild(document.createTextNode(e.incoming?" ← ":" → ")),n.appendChild(r);var i=document.createElement("td");i.appendChild(k(e,h));if(!t&&v(e.node)){var s=document.createElement("span");s.classList.add("icon"),s.classList.add("ion-location"),i.appendChild(s)}n.appendChild(i);var o=document.createElement("td"),u=document.createElement("a");u.href="#",u.textContent=y(e.link),u.onclick=h.link(e.link),o.appendChild(u),n.appendChild(o);var a=document.createElement("td"),f=document.createElement("a");f.href="#",f.textContent=e.link.type,f.onclick=h.link(e.link),a.appendChild(f),n.appendChild(a);var l=document.createElement("td"),c=document.createElement("a");c.href="#",c.textContent=g(e.link),c.onclick=h.link(e.link),l.appendChild(c),l.setAttribute("data-sort",e.link.distance!==undefined?-e.link.distance:1),n.appendChild(l),$.appendChild(n)}),I.appendChild($),I.className="node-links",new n(I),t.appendChild(I)}}}),n("infobox/location",[],function(){return function(e,t,n,r){function h(e,t,n,r){var i=typeof r!="undefined"?r:!0,s=document.createElement("div"),o=document.createElement("h3");o.textContent=t,s.appendChild(o);var u=document.createElement("button");u.className="ion-ios-copy",u.title="Kopieren",u.onclick=function(){p(n.id)},n.id="location-"+e,n.readOnly=!0;var a=document.createElement("p");return a.appendChild(n),a.appendChild(u),s.appendChild(a),s.id="box-"+e,s.style.display=i?"block":"none",s}function p(e){var t=document.querySelector("#"+e);t.select();try{document.execCommand("copy")}catch(n){console.log(n)}}function d(){document.getElementById("box-uci").style.display="none",document.getElementById("box-lat").style.display="block",document.getElementById("box-lng").style.display="block"}function v(){document.getElementById("box-uci").style.display="block",document.getElementById("box-lat").style.display="none",document.getElementById("box-lng").style.display="none"}var s=document.createElement("h2");s.textContent="Location: "+r.toString(),t.appendChild(s),i("https://nominatim.openstreetmap.org/reverse?format=json&lat="+r.lat+"&lon="+r.lng+"&zoom=18&addressdetails=0").then(function(e){e.display_name&&(s.textContent=e.display_name)});var o=document.createElement("input");o.type="text",o.value=r.lat.toFixed(9),t.appendChild(h("lat","Breitengrad",o));var u=document.createElement("input");u.type="text",u.value=r.lng.toFixed(9),t.appendChild(h("lng","Längengrad",u));var a=document.createElement("textarea");a.value="uci set gluon-node-info.@location[0]='location'; uci set gluon-node-info.@location[0].share_location='1';uci set gluon-node-info.@location[0].latitude='"+r.lat.toFixed(9)+"';"+"uci set gluon-node-info.@location[0].longitude='"+r.lng.toFixed(9)+"';"+"uci commit gluon-node-info",t.appendChild(h("uci","Befehl",a,!1));var f=document.createElement("a");f.textContent="plain",f.onclick=function(){return d(),!1},f.href="#";var l=document.createElement("a");l.textContent="uci",l.onclick=function(){return v(),!1},l.href="#";var c=document.createElement("p");c.appendChild(document.createTextNode("Du kannst zwischen ")),c.appendChild(f),c.appendChild(document.createTextNode(" und ")),c.appendChild(l),c.appendChild(document.createTextNode(" wechseln.")),t.appendChild(c)}}),n("infobox/main",["infobox/link","infobox/node","infobox/location"],function(e,t,n){return function(r,i,s){function a(){u&&u.parentNode&&(u.parentNode.removeChild(u),u=undefined,i.reveal())}function f(){a(),i.ensureVisible(),i.hide(),u=document.createElement("div"),i.container.insertBefore(u,i.container.firstChild),u.scrollIntoView(!1),u.classList.add("infobox"),u.destroy=a;var e=document.createElement("button");e.classList.add("close"),e.onclick=s.reset,u.appendChild(e)}var o=this,u;return o.resetView=a,o.gotoNode=function(e){f(),new t(r,u,s,e)},o.gotoLink=function(t){f(),new e(r,u,s,t)},o.gotoLocation=function(e){f(),new n(r,u,s,e)},o}}),!function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:" mln",billion:" mld",trillion:" bln"},ordinal:function(e){var t=e%100;return 0!==e&&1>=t||8===t||t>=20?"ste":"de"},currency:{symbol:"€ "}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("be-nl",e)}(),function(){var e={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百万",billion:"十亿",trillion:"兆"},ordinal:function(e){return"."},currency:{symbol:"¥"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("chs",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tis.",million:"mil.",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"Kč"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("cs",e)}(),function(){var e={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mio",billion:"mia",trillion:"b"},ordinal:function(e){return"."},currency:{symbol:"DKK"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("da-dk",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){return"."},currency:{symbol:"CHF"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("de-ch",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){return"."},currency:{symbol:"€"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("de",e)}(),function(){var e={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"£"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("en-gb",e)}(),function(){var e={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"£"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("en",e)}(),function(){var e={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mm",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1===t||3===t?"er":2===t?"do":7===t||0===t?"mo":8===t?"vo":9===t?"no":"to"},currency:{symbol:"€"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("es",e)}(),function(){var e={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mm",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1===t||3===t?"er":2===t?"do":7===t||0===t?"mo":8===t?"vo":9===t?"no":"to"},currency:{symbol:"$"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("es",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:" tuh",million:" mln",billion:" mld",trillion:" trl"},ordinal:function(e){return"."},currency:{symbol:"€"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("et",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"M",billion:"G",trillion:"T"},ordinal:function(e){return"."},currency:{symbol:"€"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("fi",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"M",billion:"G",trillion:"T"},ordinal:function(e){return 1===e?"er":"e"},currency:{symbol:"$"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("fr-CA",e)}(),function(){var e={delimiters:{thousands:"'",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){return 1===e?"er":"e"},currency:{symbol:"CHF"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("fr-ch",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){return 1===e?"er":"e"},currency:{symbol:"€"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("fr",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"E",million:"M",billion:"Mrd",trillion:"T"},ordinal:function(e){return"."},currency:{symbol:" Ft"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("hu",e)}(),function(){var e={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mila",million:"mil",billion:"b",trillion:"t"},ordinal:function(e){return"º"},currency:{symbol:"€"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("it",e)}(),function(){var e={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百万",billion:"十億",trillion:"兆"},ordinal:function(e){return"."},currency:{symbol:"¥"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("ja",e)}(),function(){var e={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mln",billion:"mrd",trillion:"bln"},ordinal:function(e){var t=e%100;return 0!==e&&1>=t||8===t||t>=20?"ste":"de"},currency:{symbol:"€ "}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("nl-nl",e)}(),function(){var e={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mln",billion:"mrd",trillion:"bln"},ordinal:function(e){var t=e%100;return 0!==e&&1>=t||8===t||t>=20?"ste":"de"},currency:{symbol:"€ "}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("nl",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tys.",million:"mln",billion:"mld",trillion:"bln"},ordinal:function(e){return"."},currency:{symbol:"PLN"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("pl",e)}(),function(){var e={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mil",million:"milhões",billion:"b",trillion:"t"},ordinal:function(e){return"º"},currency:{symbol:"R$"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("pt-br",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){return"º"},currency:{symbol:"€"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("pt-pt",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тыс.",million:"млн",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"₴"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("ru-UA",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тыс.",million:"млн",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"руб."}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("ru",e)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tis.",million:"mil.",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"€"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("sk",e)}(),function(){var e={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"พัน",million:"ล้าน",billion:"พันล้าน",trillion:"ล้านล้าน"},ordinal:function(e){return"."},currency:{symbol:"฿"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("th",e)}(),function(){var e={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},t={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"bin",million:"milyon",billion:"milyar",trillion:"trilyon"},ordinal:function(t){if(0===t)return"'ıncı";var n=t%10,r=t%100-n,i=t>=100?100:null;return e[n]||e[r]||e[i]},currency:{symbol:"₺"}};"undefined"!=typeof module&&module.exports&&(module.exports=t),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("tr",t)}(),function(){var e={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тис.",million:"млн",billion:"млрд",trillion:"блн"},ordinal:function(){return""},currency:{symbol:"₴"}};"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&this.numeral&&this.numeral.language&&this.numeral.language("uk-UA",e)}(),n("numeral-intl",["numeral"],function(e){return function(){var t,n;return t||e.numeral}}(this)),n("filters/genericnode",[],function(){return function(e,t,n,r){function a(e){var s=l(e,t.slice(0));return r&&(s=r(s)),s===n?!i:i}function f(e){s=e}function c(e){i?e.parentNode.classList.add("not"):e.parentNode.classList.remove("not"),u.textContent=(i?"¬":"")+n}function h(e){e.appendChild(o),c(e),o.onclick=function(){i=!i,c(e),s&&s()}}var i=!1,s,o=document.createElement("label"),u=document.createElement("strong");return o.textContent=e+" ",o.appendChild(u),{run:a,setRefresh:f,render:h}}}),n("vercomp",[],function(){function e(e){return/^\d$/.test(e)?0:/^[a-z]$/i.test(e)?e.charCodeAt(0):e==="~"?-1:e?e.charCodeAt(0)+256:0}function t(t,n){var r=0,i=0;while(ru&&(u=e[1])});var f=o.map(function(s){var o=s[1]/u,f=e.contrast(a(o),"white"),l=e.contrast(a(o),"black"),c=new r(i,s[2],s[0],s[3]),h=t.h("a",{href:"#",onclick:N(c)},s[0]),p=t.h("th",h),d=t.h("td",t.h("span",{style:{width:Math.round(o*100)+"%",backgroundColor:a(o).hex(),color:f>l?"white":"black"}},n(s[1]).format("0,0")));return t.h("tr",[p,d])}),l=t.h("table",f);s=t.patch(s,t.diff(s.last,l)),s.last=l}var u=this,a=e.scale("YlGnBu").mode("lab"),f=document.createElement("table");f.classList.add("proportion");var c=document.createElement("table");c.classList.add("proportion");var h=document.createElement("table");h.classList.add("proportion");var p=document.createElement("table");p.classList.add("proportion");var v=document.createElement("table");v.classList.add("proportion");var m=document.createElement("table");m.classList.add("proportion");var g=document.createElement("table");g.classList.add("proportion");var y=document.createElement("table");y.classList.add("proportion");var b=document.createElement("table");b.classList.add("proportion");var w=document.createElement("table");return w.classList.add("proportion"),u.setData=function(e){var t=e.nodes.all.filter(d),n=t.concat(e.nodes.lost),r={};e.nodes.all.forEach(function(e){r[e.nodeinfo.node_id]=e});var o=x(n,["flags","online"],function(e){return e?"online":"offline"}),u=x(n,["nodeinfo","software","firmware","release"]),a=x(n,["nodeinfo","hardware","model"],function(e){return e&&(e=e.replace(/\(r\)|\(tm\)/gi,"").replace(/AMD |Intel |TP-Link | CPU| Processor/g,""),e.indexOf("@")>0&&(e=e.substring(0,e.indexOf("@")))),e}),l=x(n,["nodeinfo","location"],function(e){return e&&e.longitude&&e.latitude?"ja":"nein"}),E=x(n,["nodeinfo","software","autoupdater"],function(e){return e===null?null:e.enabled?e.branch:"(deaktiviert)"}),S=x(n,["flags","uplink"],function(e){return e?"ja":"nein"}),N=x(t,["statistics","gateway"],function(e){return e===null?null:e.node?e.node.nodeinfo.hostname:e.id?e.id:e}),k=T(t,["statistics","gateway"],function(e){return e===null?null:e.node?e.node.nodeinfo.hostname:e.id?e.id:e}),L=x(n,["nodeinfo","system","site_code"],function(e){var t=e;return s.siteNames&&s.siteNames.forEach(function(n){e===n.site&&(t=n.name)}),t}),A=x(n,["nodeinfo","system","domain_code"],function(e){var t=e;return s.domainNames&&s.domainNames.forEach(function(n){e===n.domain&&(t=n.name)}),t});C("Status",f,o.sort(function(e,t){return t[1]-e[1]})),C("Firmware",c,u.sort(function(e,t){return i(t[0],e[0])})),C("Hardware",h,a.sort(function(e,t){return t[1]-e[1]})),C("Koordinaten",p,l.sort(function(e,t){return t[1]-e[1]})),C("Uplink",m,S.sort(function(e,t){return t[1]-e[1]})),C("Autom. Updates",v,E.sort(function(e,t){return t[1]-e[1]})),C("Gateway",g,N.sort(function(e,t){return t[1]-e[1]})),C("Gateway",y,k.sort(function(e,t){return t[1]-e[1]})),C("Site",b,L.sort(function(e,t){return t[1]-e[1]})),C("Domain",w,A.sort(function(e,t){return t[1]-e[1]}))},u.render=function(e){var t;u.renderSingle(e,"Status",f),u.renderSingle(e,"Nodes an Gateway",g),u.renderSingle(e,"Clients an Gateway",y),u.renderSingle(e,"Firmwareversionen",c),u.renderSingle(e,"Uplink",m),u.renderSingle(e,"Hardwaremodelle",h),u.renderSingle(e,"Auf der Karte sichtbar",p),u.renderSingle(e,"Autoupdater",v),s.siteNames&&u.renderSingle(e,"Site",b),s.domainNames&&u.renderSingle(e,"Domain",w),s.globalInfos&&s.globalInfos.forEach(function(n){t=document.createElement("h2"),t.textContent=n.name,e.appendChild(t),e.appendChild(S(n))})},u.renderSingle=function(e,t,n){var r;r=document.createElement("h2"),r.textContent=t,r.onclick=function(){n.classList.toggle("hidden")},e.appendChild(r),e.appendChild(n)},u}}),n("forcegraph",["d3"],function(e){var t=200,n=15,r=7;return function(i,s,o,u){function D(e){return Math.sqrt(e.length/Math.PI)*_*1.41}function P(){if(!c())return;var e=b.map(function(e){return{id:e.o.id,x:e.x,y:e.y}});localStorage.setItem("graph/nodeposition",JSON.stringify(e))}function H(e){return e.o.node&&e.o.node.nodeinfo?e.o.node.nodeinfo.hostname:e.o.id}function B(){var t=rt(e.mouse(g)),r=b.filter(function(e){return tt(t,e)=a)return!0;var t=u(f(e/a));return v.translate([t.x,t.y]),v.scale(t.scale),U(),!1})}}function R(){O={translate:v.translate(),scale:v.scale()},U()}function U(){var e=v.translate(),t=v.scale();z(e,t)}function z(e,t){h={left:-e[0]/t,top:-e[1]/t,right:(f.width-e[0])/t,bottom:(f.height-e[1])/t},requestAnimationFrame(G)}function W(){var e=o(),t=g.offsetWidth-e,n=g.offsetHeight;return[t,n]}function X(e,t){var n=o(),r=W(),i=Math.max(1,t[0]-e[0]),s=Math.max(1,t[1]-e[1]),u=r[0]/i,a=r[1]/s,f=v.scaleExtent()[1],l=.5*Math.min(f,Math.min(u,a)),c=[(e[0]+t[0])/2,(e[1]+t[1])/2],h=-c[0]*l+r[0]/2,p=-c[1]*l+r[1]/2,d=[h+n,p];q(d,l)}function V(t){S=[],T=[];if(E!==undefined){if(E.type==="node"){var n=p[E.o.nodeinfo.node_id];n&&(S=[n],t||X([n.x,n.y],[n.x,n.y]));return}if(E.type==="link"){var r=d[E.o.id];if(r){T=[r];if(!t){var i=e.extent([r.source,r.target],function(e){return e.x}),s=e.extent([r.source,r.target],function(e){return e.y});X([i[0],s[0]],[i[1],s[1]])}}return}}t||(O?q(O.translate,O.scale):X([0,0],m.size()))}function $(e){var t=e.neighbours.filter(function(e){return!e.link.o.isVPN}),n=t.reduce(function(e,t){return[e[0]+t.node.x,e[1]+t.node.y]},[0,0]),r=n[0]-e.x*t.length,i=n[1]-e.y*t.length,s=Math.PI/2;t.length>0&&(s=Math.PI+Math.atan2(i,r));var o=Math.cos(s),u=Math.sin(s),a=e.labelWidth,f=e.labelHeight,c=e.x+e.labelA*Math.pow(Math.abs(o),.4)*Math.sign(o)-a/2,h=e.y+e.labelB*Math.pow(Math.abs(u),.4)*Math.sign(u)-f/2;l.drawImage(e.label,c,h,a,f)}function J(e){return e.o.isVPN||e.source.x>h.left&&e.source.xh.top&&e.source.yh.left&&e.target.xh.top&&e.target.yh.left&&e.x-th.top&&e.y-t.9&&N.filter(K).forEach(function(e){var t=e.o.node.statistics.clients.total;if(t===0)return;var n=16,r=3,i=1.2,s=Math.PI;for(var o=0,u=0;u.9&&b.filter(K).forEach($,n),l.restore()}function Y(){G()}function Z(){var e=window.devicePixelRatio;f.width=g.offsetWidth*e,f.height=g.offsetHeight*e,f.style.width=g.offsetWidth+"px",f.style.height=g.offsetHeight+"px",l.setTransform(1,0,0,1,0,0),l.scale(e,e),requestAnimationFrame(G)}function et(e,t,n,r){return Math.pow(e-n,2)+Math.pow(t-r,2)}function tt(e,t){return Math.sqrt(et(e.x,e.y,t.x,t.y))}function nt(e,t,n){var r=n.x-(n.x-t.x)/2,i=n.y-(n.y-t.y)/2,s=et(t.x,t.y,r,i);if(s===0)return et(e.x,e.y,t.x,t.y);var o=((e.x-t.x)*(r-t.x)+(e.y-t.y)*(i-t.y))/s;return o<0?et(e.x,e.y,t.x,t.y):o>1?et(e.x,e.y,r,i):Math.sqrt(et(e.x,e.y,t.x+o*(r-t.x),t.y+o*(i-t.y)))}function rt(e){var t=v.translate(),n=v.scale();return{x:(e[0]-t[0])/n,y:(e[1]-t[1])/n}}function it(){if(e.event.defaultPrevented)return;var t=rt(e.mouse(g)),i=b.filter(function(e){return tt(t,e)0){u.node(i[0].o.node)();return}var s=w.filter(function(e){return!e.o.isVPN}).filter(function(e){return nt(t,e.source,e.target)0){u.link(s[0].o)();return}}function st(e,t){var n=W(),r=[n[0]/t,n[1]/t],i=o(),s=[n[0]-r[0],n[1]-r[1]],u=e.translate(),a=[i+(u[0]-i-s[0]/2)*t,(u[1]-s[1]/2)*t];q(a,e.scale()*t)}function ot(t){return function(){var n=e.event;if(n.altKey||n.ctrlKey||n.metaKey)return;n.keyCode===43&&st(t,1.41),n.keyCode===45&&st(t,1/1.41)}}var a=this,f,l,h,p,d,v,m,g,y=!1,b=[],w=[],E,S=[],T=[],N=[],C=[],k=[],L=[],A=[],O,M,_=70,I=e.behavior.drag().on("dragstart",B).on("drag",j).on("dragend",F);return g=document.createElement("div"),g.classList.add("graph"),v=e.behavior.zoom().scaleExtent([1/3,3]).on("zoom",R).translate([o(),0]),f=e.select(g).attr("tabindex",1).on("keypress",ot(v)).call(v).append("canvas").on("click",it).call(I).node(),l=f.getContext("2d"),m=e.layout.force().charge(-250).gravity(.1).linkDistance(function(e){return e.o.isVPN?0:_}).linkStrength(function(e){return e.o.isVPN?0:Math.max(.5,1/e.o.tq)}).on("tick",Y).on("end",P),window.addEventListener("resize",Z),U(),a.setData=function(e){var t={};b.forEach(function(e){t[e.o.id]=e}),b=e.graph.nodes.map(function(e){var n;return e.id in t?n=t[e.id]:n={},n.o=e,n});var n={};b.forEach(function(e){n[e.o.id]=e});var r={};w.forEach(function(e){r[e.o.id]=e}),w=e.graph.links.map(function(e){var t;return e.id in r?t=r[e.id]:t={},t.o=e,t.source=n[e.source.id],t.target=n[e.target.id],e.isVPN?t.color="rgba(255, 255, 255, "+.6/e.tq+")":t.color=s(e.tq).hex(),t}),d={},p={},b.forEach(function(e){e.neighbours={},e.o.node&&(p[e.o.node.nodeinfo.node_id]=e);var t=H(e),n=5,r=3,i=document.createElement("canvas"),s=window.devicePixelRatio,o=i.getContext("2d");o.font="11px Roboto";var u=o.measureText(t).width,a=v.scaleExtent()[1]*s;i.width=(u+2*r)*a,i.height=(16+2*r)*a,o.scale(a,a),o.textBaseline="middle",o.textAlign="center",o.fillStyle="rgba(242, 227, 198, 1.0)",o.shadowColor="rgba(0, 0, 0, 1)",o.shadowBlur=5,o.fillText(t,i.width/(2*a),i.height/(2*a)),e.label=i,e.labelWidth=i.width/a,e.labelHeight=i.height/a,e.labelA=n+i.width/(2*a),e.labelB=n+i.height/(2*a)}),w.forEach(function(e){e.source.neighbours[e.target.o.id]={node:e.target,link:e},e.target.neighbours[e.source.o.id]={node:e.source,link:e},e.o.source&&e.o.target&&(d[e.o.id]=e)}),w.forEach(function(e){if(d[e.target.o.node_id+"-"+e.source.o.node_id])return;var t={source:e.target,target:e.source,o:{isVPN:e.o.isVPN,type:"dead",id:e.target.o.node_id+"-"+e.source.o.node_id,tq:1},color:"rgba(255, 255, 255, 0.6)"};w.push(t),d[e.target.o.node_id+"-"+e.source.o.node_id]=t}),b.forEach(function(e){e.neighbours=Object.keys(e.neighbours).map(function(t){return e.neighbours[t]})}),N=b.filter(function(e){return!e.o.unseen&&e.o.node}),C=N.filter(function(e){return e.o.node.flags.uplink}),k=N.filter(function(e){return!e.o.node.flags.uplink}),L=b.filter(function(e){return e.o.unseen&&e.o.node}),A=b.filter(function(e){return!e.o.node});if(c()){var i=JSON.parse(localStorage.getItem("graph/nodeposition"));if(i){var o={};i.forEach(function(e){o[e.id]=e}),b.forEach(function(e){o[e.o.id]&&(e.x===undefined||e.y===undefined)&&(e.x=o[e.o.id].x,e.y=o[e.o.id].y)})}}var u=D(b);m.nodes(b).links(w).size([u,u]),V(!0),m.start(),Z()},a.resetView=function(){E=undefined,V(),y=!0},a.gotoNode=function(e){E={type:"node",o:e},V(),y=!0},a.gotoLink=function(e){E={type:"link",o:e},V(),y=!0},a.destroy=function(){m.stop(),f.remove(),m=null,g.parentNode&&g.parentNode.removeChild(g)},a.render=function(e){e.appendChild(g),Z(),V()},a}}),n("title",[],function(){return function(e){function t(t){var n=[e.siteName];t!==undefined&&n.push(t),document.title=n.join(": ")}return this.resetView=function(){t()},this.gotoNode=function(e){e&&t(e.nodeinfo.hostname)},this.gotoLink=function(e){e&&t((e.source.node?e.source.node.nodeinfo.hostname:e.source.id)+" – "+e.target.node.nodeinfo.hostname)},this.gotoLocation=function(){},this.destroy=function(){},this}}),n("about",[],function(){return function(){this.render=function(e){var t=document.createElement("div");e.appendChild(t);var n="

Über HopGlass

";n+="

Mit Doppelklick und Shift+Doppelklick kann man in der Karte ",n+="auch zoomen.

",n+="

AGPL 3

",n+="

Copyright (C) Milan Pässler

",n+="

Copyright (C) Nils Schneider

",n+="

This program is free software: you can redistribute it and/or ",n+="modify it under the terms of the GNU Affero General Public ",n+="License as published by the Free Software Foundation, either ",n+="version 3 of the License, or (at your option) any later version.

",n+="

This program is distributed in the hope that it will be useful, ",n+="but WITHOUT ANY WARRANTY; without even the implied warranty of ",n+="MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ",n+="GNU Affero General Public License for more details.

",n+="

You should have received a copy of the GNU Affero General ",n+="Public License along with this program. If not, see ",n+='',n+="https://www.gnu.org/licenses/.

",n+="

The source code is available at ",n+='',n+="https://github.com/hopglass/hopglass.",t.innerHTML=n}}}),n("filters/nodefilter",[],function(){return function(e){return function(t){var n=Object.create(t);n.nodes={};for(var r in t.nodes)n.nodes[r]=t.nodes[r].filter(e);var i=new Set;return n.graph={},n.graph.nodes=t.graph.nodes.filter(function(t){var n;return t.node?n=e(t.node):n=e({}),n&&i.add(t.id),n}),n.graph.links=t.graph.links.filter(function(e){return i.has(e.source.id)&&i.has(e.target.id)}),n}}}),n("datadistributor",["filters/nodefilter"],function(e){return function(){function o(e){t=t.filter(function(t){return e!==t})}function u(e){t.push(e),i!==undefined&&e.setData(i)}function a(e){s=e,f()}function f(){if(s===undefined)return;var n=r.reduce(function(e,t){return function(n){return e(n)&&t.run(n)}},function(){return!0});i=(new e(n))(s),t.forEach(function(e){e.setData(i)})}function l(){n.forEach(function(e){e.filtersChanged(r)})}function c(e){r.push(e),l(),e.setRefresh(f),f()}function h(e){r=r.filter(function(t){return e!==t}),l(),f()}function p(e){return n.push(e),e.filtersChanged(r),function(){n=n.filter(function(t){return e!==t})}}var t=[],n=[],r=[],i,s;return{add:u,remove:o,setData:a,addFilter:c,removeFilter:h,watchFilters:p,refresh:f}}}),n("filters/filtergui",[],function(){return function(e){function r(e){e.appendChild(n)}function i(r){while(t.firstChild)t.removeChild(t.firstChild);r.forEach(function(n){var r=document.createElement("li"),i=document.createElement("div");t.appendChild(r),r.appendChild(i),n.render(i);var s=document.createElement("button");s.textContent="",s.onclick=function(){e.removeFilter(n)},r.appendChild(s)}),t.parentNode===n&&r.length===0?n.removeChild(t):r.length>0&&n.appendChild(t)}var t=document.createElement("ul");t.classList.add("filters");var n=document.createElement("div");return{render:r,filtersChanged:i}}}),n("gui",["chroma-js","map","sidebar","tabs","container","meshstats","legend","linklist","nodelist","simplenodelist","infobox/main","proportions","forcegraph","title","about","datadistributor","filters/filtergui"],function(e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m){return function(g,y){function k(){if(!w)return;y.removeTarget(w),N.remove(w),w.destroy(),w=null}function L(e){k(),w=new e(g,S,x.getWidth,y,T),w.render(E),N.add(w),y.addTarget(w)}function A(e){return function(){L(e)}}var b=this,w,E,S=e.scale(e.bezier(["#04C714","#FF5500","#F02311"])).domain([1,5]),x,T=document.createElement("div");T.classList.add("buttons");var N=new v,C=new v;C.add(N);var O=document.getElementsByClassName("loader")[0];O.classList.add("hide"),E=document.createElement("div"),E.classList.add("content"),document.body.appendChild(E),x=new n(document.body),E.appendChild(T);var M=document.createElement("button");M.textContent="",M.onclick=function(){w.constructor===t?y.view("g"):y.view("m")},T.appendChild(M);var _=new p(g),D=new i("header"),P=new l(g,x,y),H=new r,B=new i,j=new s(g),F=new o,I=new f("new","firstseen",y,"Neue Knoten"),q=new f("lost","lastseen",y,"Verschwundene Knoten"),R=new a(y),U=new u(S,y),z=new c(g,N),W=new d;C.add(j),C.add(I),C.add(q),N.add(R),N.add(U),N.add(z),x.add(D),D.add(j),D.add(F),B.add(I),B.add(q);var X=new m(N);return N.watchFilters(X),D.add(X),x.add(H),H.add("Aktuelles",B),H.add("Knoten",R),H.add("Verbindungen",U),H.add("Statistiken",z),H.add("Über",W),y.addTarget(_),y.addTarget(P),y.addView("m",A(t)),y.addView("g",A(h)),y.view("m"),b.setData=C.setData,b}}),n("main",["moment","router","leaflet","gui","numeral"],function(e,t,n,r,u){return function(a){function f(t){function u(e){e.source+=i.batadv.nodes.length,e.target+=i.batadv.nodes.length}function c(e){var t=r.nodeIds.indexOf(e.nodeinfo.node_id);t===-1?(r.nodes.push(e),r.nodeIds.push(e.nodeinfo.node_id)):e.flags.online===!0&&(r.nodes[t]=e)}var r={};r.nodes=[],r.nodeIds=[];var i={};i.batadv={},i.batadv.nodes=[],i.batadv.links=[];for(var f=0;f + + + + +Created by FontForge 20120731 at Wed Jan 14 22:40:14 2015 + By Adam Bradley +Created by Adam Bradley with FontForge 2.0 (http://fontforge.sf.net) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hopglass-frontend/fonts/ionicons.ttf b/hopglass-frontend/fonts/ionicons.ttf new file mode 100644 index 0000000..180ce51 Binary files /dev/null and b/hopglass-frontend/fonts/ionicons.ttf differ diff --git a/hopglass-frontend/fonts/ionicons.woff b/hopglass-frontend/fonts/ionicons.woff new file mode 100644 index 0000000..5bb6aec Binary files /dev/null and b/hopglass-frontend/fonts/ionicons.woff differ diff --git a/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Bold.woff b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Bold.woff new file mode 100644 index 0000000..6cb6000 Binary files /dev/null and b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Bold.woff differ diff --git a/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Bold.woff2 b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Bold.woff2 new file mode 100644 index 0000000..7059e23 Binary files /dev/null and b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Bold.woff2 differ diff --git a/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Light.woff b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Light.woff new file mode 100644 index 0000000..337d287 Binary files /dev/null and b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Light.woff differ diff --git a/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Light.woff2 b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Light.woff2 new file mode 100644 index 0000000..20398af Binary files /dev/null and b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Light.woff2 differ diff --git a/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Regular.woff b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Regular.woff new file mode 100644 index 0000000..f815f63 Binary files /dev/null and b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Regular.woff differ diff --git a/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Regular.woff2 b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Regular.woff2 new file mode 100644 index 0000000..f2c76e5 Binary files /dev/null and b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Regular.woff2 differ diff --git a/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Thin.woff b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Thin.woff new file mode 100644 index 0000000..6b30ea6 Binary files /dev/null and b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Thin.woff differ diff --git a/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Thin.woff2 b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Thin.woff2 new file mode 100644 index 0000000..328f5bb Binary files /dev/null and b/hopglass-frontend/fonts/roboto-slab/Roboto-Slab-Thin.woff2 differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-Black.woff b/hopglass-frontend/fonts/roboto/Roboto-Black.woff new file mode 100644 index 0000000..b1ddac3 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-Black.woff differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-Black.woff2 b/hopglass-frontend/fonts/roboto/Roboto-Black.woff2 new file mode 100644 index 0000000..41186d0 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-Black.woff2 differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-BlackItalic.woff b/hopglass-frontend/fonts/roboto/Roboto-BlackItalic.woff new file mode 100644 index 0000000..b97efea Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-BlackItalic.woff differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-BlackItalic.woff2 b/hopglass-frontend/fonts/roboto/Roboto-BlackItalic.woff2 new file mode 100644 index 0000000..df3c3f4 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-BlackItalic.woff2 differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-Bold.woff b/hopglass-frontend/fonts/roboto/Roboto-Bold.woff new file mode 100644 index 0000000..6e0f562 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-Bold.woff differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-Bold.woff2 b/hopglass-frontend/fonts/roboto/Roboto-Bold.woff2 new file mode 100644 index 0000000..76817cc Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-Bold.woff2 differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-BoldItalic.woff b/hopglass-frontend/fonts/roboto/Roboto-BoldItalic.woff new file mode 100644 index 0000000..ea90d71 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-BoldItalic.woff differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-BoldItalic.woff2 b/hopglass-frontend/fonts/roboto/Roboto-BoldItalic.woff2 new file mode 100644 index 0000000..45c9ef7 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-BoldItalic.woff2 differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-Light.woff b/hopglass-frontend/fonts/roboto/Roboto-Light.woff new file mode 100644 index 0000000..b9e9918 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-Light.woff differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-Light.woff2 b/hopglass-frontend/fonts/roboto/Roboto-Light.woff2 new file mode 100644 index 0000000..ddbf4a9 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-Light.woff2 differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-LightItalic.woff b/hopglass-frontend/fonts/roboto/Roboto-LightItalic.woff new file mode 100644 index 0000000..329ec9b Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-LightItalic.woff differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-LightItalic.woff2 b/hopglass-frontend/fonts/roboto/Roboto-LightItalic.woff2 new file mode 100644 index 0000000..ba70c2a Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-LightItalic.woff2 differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-Medium.woff b/hopglass-frontend/fonts/roboto/Roboto-Medium.woff new file mode 100644 index 0000000..005e928 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-Medium.woff differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-Medium.woff2 b/hopglass-frontend/fonts/roboto/Roboto-Medium.woff2 new file mode 100644 index 0000000..6a88805 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-Medium.woff2 differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-MediumItalic.woff b/hopglass-frontend/fonts/roboto/Roboto-MediumItalic.woff new file mode 100644 index 0000000..01eba14 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-MediumItalic.woff differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-MediumItalic.woff2 b/hopglass-frontend/fonts/roboto/Roboto-MediumItalic.woff2 new file mode 100644 index 0000000..cf21729 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-MediumItalic.woff2 differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-Regular.woff b/hopglass-frontend/fonts/roboto/Roboto-Regular.woff new file mode 100644 index 0000000..96c1986 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-Regular.woff differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-Regular.woff2 b/hopglass-frontend/fonts/roboto/Roboto-Regular.woff2 new file mode 100644 index 0000000..9a0064e Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-Regular.woff2 differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-RegularItalic.woff b/hopglass-frontend/fonts/roboto/Roboto-RegularItalic.woff new file mode 100644 index 0000000..818233d Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-RegularItalic.woff differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-RegularItalic.woff2 b/hopglass-frontend/fonts/roboto/Roboto-RegularItalic.woff2 new file mode 100644 index 0000000..e7f173b Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-RegularItalic.woff2 differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-Thin.woff b/hopglass-frontend/fonts/roboto/Roboto-Thin.woff new file mode 100644 index 0000000..e1cee8f Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-Thin.woff differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-Thin.woff2 b/hopglass-frontend/fonts/roboto/Roboto-Thin.woff2 new file mode 100644 index 0000000..2fb9b5f Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-Thin.woff2 differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-ThinItalic.woff b/hopglass-frontend/fonts/roboto/Roboto-ThinItalic.woff new file mode 100644 index 0000000..d337378 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-ThinItalic.woff differ diff --git a/hopglass-frontend/fonts/roboto/Roboto-ThinItalic.woff2 b/hopglass-frontend/fonts/roboto/Roboto-ThinItalic.woff2 new file mode 100644 index 0000000..67c4240 Binary files /dev/null and b/hopglass-frontend/fonts/roboto/Roboto-ThinItalic.woff2 differ diff --git a/hopglass-frontend/images/layers-2x.png b/hopglass-frontend/images/layers-2x.png new file mode 100644 index 0000000..a2cf7f9 Binary files /dev/null and b/hopglass-frontend/images/layers-2x.png differ diff --git a/hopglass-frontend/images/layers.png b/hopglass-frontend/images/layers.png new file mode 100644 index 0000000..bca0a0e Binary files /dev/null and b/hopglass-frontend/images/layers.png differ diff --git a/hopglass-frontend/images/marker-icon-2x.png b/hopglass-frontend/images/marker-icon-2x.png new file mode 100644 index 0000000..0015b64 Binary files /dev/null and b/hopglass-frontend/images/marker-icon-2x.png differ diff --git a/hopglass-frontend/images/marker-icon.png b/hopglass-frontend/images/marker-icon.png new file mode 100644 index 0000000..e2e9f75 Binary files /dev/null and b/hopglass-frontend/images/marker-icon.png differ diff --git a/hopglass-frontend/images/marker-shadow.png b/hopglass-frontend/images/marker-shadow.png new file mode 100644 index 0000000..d1e773c Binary files /dev/null and b/hopglass-frontend/images/marker-shadow.png differ diff --git a/hopglass-frontend/index.html b/hopglass-frontend/index.html new file mode 100644 index 0000000..fdc2c09 --- /dev/null +++ b/hopglass-frontend/index.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + +

+

+ Lade
+
+ Karte & Knoten... +

+ +
+ + diff --git a/hopglass-frontend/style.css b/hopglass-frontend/style.css new file mode 100644 index 0000000..89c28ba --- /dev/null +++ b/hopglass-frontend/style.css @@ -0,0 +1,2 @@ +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}h1,h2,h3,h4,h5,h6{font-weight:bold}h1{padding:.67em 0;font-size:2em}h2{padding:.83em 0;font-size:1.5em}h3{padding:1em 0;font-size:1.17em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.67em}.hide{display:none}.leaflet-map-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-pane,.leaflet-tile-container,.leaflet-overlay-pane,.leaflet-shadow-pane,.leaflet-marker-pane,.leaflet-popup-pane,.leaflet-overlay-pane svg,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden;-ms-touch-action:none;touch-action:none}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container img{max-width:none !important}.leaflet-container img.leaflet-image-layer{max-width:15000px !important}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-tile-pane{z-index:2}.leaflet-objects-pane{z-index:3}.leaflet-overlay-pane{z-index:4}.leaflet-shadow-pane{z-index:5}.leaflet-marker-pane{z-index:6}.leaflet-popup-pane{z-index:7}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:7;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-tile,.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-tile-loaded,.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0, 0, 0.25, 1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile,.leaflet-touching .leaflet-zoom-animated{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-clickable{cursor:pointer}.leaflet-container{cursor:-moz-grab}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-container,.leaflet-dragging .leaflet-clickable{cursor:move;cursor:-moz-grabbing}.leaflet-container{background:#ddd;outline:0}.leaflet-container a{color:#0078a8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,.5)}.leaflet-container{font:12px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,.65);border-radius:4px}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px "Lucida Console",Monaco,monospace;text-indent:1px}.leaflet-control-zoom-out{font-size:20px}.leaflet-touch .leaflet-control-zoom-in{font-size:22px}.leaflet-touch .leaflet-control-zoom-out{font-size:24px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255,255,255,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;font-size:11px;white-space:nowrap;overflow:hidden;box-sizing:content-box;background:#fff;background:rgba(255,255,255,.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 19px;line-height:1.4}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{margin:0 auto;width:40px;height:20px;position:relative;overflow:hidden}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;padding:4px 4px 0 0;text-align:center;width:18px;height:14px;font:16px/14px Tahoma,Verdana,sans-serif;color:#c3c3c3;text-decoration:none;font-weight:bold;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-label{background:#ebebeb;background:rgba(235,235,235,.81);background-clip:padding-box;border-color:#777;border-color:rgba(0,0,0,.25);border-radius:4px;border-style:solid;border-width:4px;color:#111;display:block;font:12px/20px "Helvetica Neue",Arial,Helvetica,sans-serif;font-weight:bold;padding:1px 6px;position:absolute;-webkit-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;white-space:nowrap;z-index:6}.leaflet-label.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-label:before,.leaflet-label:after{border-top:6px solid transparent;border-bottom:6px solid transparent;content:none;position:absolute;top:5px}.leaflet-label:before{border-right:6px solid #000;border-right-color:inherit;left:-10px}.leaflet-label:after{border-left:6px solid #000;border-left-color:inherit;right:-10px}.leaflet-label-right:before,.leaflet-label-left:after{content:""}.filters{margin:0;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;font-family:Roboto,sans-serif;font-size:.83em;font-weight:bold;padding:0 6pt 6pt !important}.filters li{border-radius:20pt;display:-ms-flexbox;display:flex;padding:0 0 0 8pt;margin:3pt;-ms-flex-align:center;align-items:center;background:#009ee0;color:rgba(255,255,255,.8)}.filters li label{cursor:pointer}.filters li label strong{color:#fff}.filters li.not{background:#dc0067}.filters li button{box-shadow:none;margin:2pt;padding:0;width:18pt;height:18pt;background:rgba(255,255,255,0);font-size:12pt;vertical-align:middle;color:rgba(255,255,255,.8)}.filters li button:hover{box-shadow:none !important;color:#dc0067;background:rgba(255,255,255,.9)}.filters li button:active{box-shadow:none}.loader{color:#000;font-size:1.8em;line-height:2;margin:30vh auto;text-align:center}.spinner{animation:.6s spinner ease-in-out infinite alternate;border-bottom:2px solid #000;border-radius:50%;display:inline-block;height:64px;margin-top:10px;width:64px}@keyframes spinner{to{transform:rotate(360deg)}}.nodeheader{width:90%;position:relative;z-index:2}.nodeheader img{width:30%;max-height:180px;margin:auto;text-align:center;max-width:128px;display:block;z-index:2}.nodeheader img .none{display:none}.nodeheader span{background-color:silver;background-color:rgba(255,255,255,.5);position:absolute;bottom:0;width:100%;line-height:1.5em;text-align:center;color:#000;font-weight:bold;font-size:large;z-index:2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stroke-first{paint-order:stroke}.pick-coordinates{cursor:crosshair}.map{width:100%;height:100%}.map .node-alert{-webkit-animation:blink 2s linear;-webkit-animation-iteration-count:infinite;animation:blink 2s linear;animation-iteration-count:infinite}.map .leaflet-top button.leaflet-control{margin-top:12pt}.map .leaflet-bottom button.leaflet-control{margin-bottom:12pt}.map .leaflet-left button.leaflet-control{margin-left:12pt}.map .leaflet-right button.leaflet-control{margin-right:12pt}@keyframes blink{0%{opacity:1}80%{opacity:1}90%{opacity:0}}.graph{height:100%;width:100%;background:#2b2b2b}.graph canvas{display:block;position:absolute}.legend .symbol{width:1em;height:1em;border-radius:50%;display:inline-block;vertical-align:-5%}.legend-new .symbol{background-color:#93e929}.legend-online .symbol{background-color:#1566a9}.legend-offline .symbol{background-color:#d43e2a}.legend-online,.legend-offline{margin-left:1em}.content{position:fixed;width:100%;height:100vh}.content .buttons{direction:rtl;unicode-bidi:bidi-override;z-index:100;position:absolute;top:12pt;right:12pt}.content .buttons button{margin-left:12pt}.tabs,header{background:rgba(0,0,0,.02)}.tabs{padding:1em 0 0 !important;margin:0;list-style:none;display:-ms-flexbox;display:flex;font-family:Roboto,sans-serif;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.tabs li{-ms-flex:1 1 auto;flex:1 1 auto;text-transform:uppercase;text-align:center;padding:.5em .5em 1em;cursor:pointer;color:rgba(0,0,0,.5)}.tabs li:hover{color:#dc0067}.tabs .visible{border-bottom:2pt solid #dc0067;color:#dc0067}body{margin:0;padding:0;font-family:"Roboto-Slab",serif;font-size:11pt;color:#333}th.sort-header::selection{background:transparent}th.sort-header{cursor:pointer}table th.sort-header:after{font-family:"ionicons";padding-left:.25em;content:"";visibility:hidden}table th.sort-header:hover:after{visibility:visible}table th.sort-up:after,table th.sort-down:after,table th.sort-down:hover:after{visibility:visible;opacity:.4}table th.sort-up:after{content:""}table.attributes th{text-align:left;font-weight:bold;vertical-align:top;padding-right:1em;white-space:nowrap;line-height:1.41em}table.attributes td{text-align:left !important;width:100%;line-height:1.41em}table.attributes tr.routerpic{max-height:128px;max-width:128px;min-width:128px;min-height:128px}table.attributes tr.routerpic td{font-weight:bold;font-size:large;vertical-align:bottom}table.attributes tr.routerpic th{font-weight:bold;font-size:large;vertical-align:bottom}.nodenamesidebar{position:relative;font-weight:bold;font-size:large;vertical-align:bottom;bottom:0px}.sidebar .infobox,.sidebar .container{box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);background:rgba(255,255,255,.97);border-radius:2px}.sidebar .container.hidden{display:none}.sidebar .container table.hidden{display:none}.sidebar p{line-height:1.67em}.infobox .clients{font-family:"ionicons";color:#1566a9;word-spacing:-0.2em;white-space:normal}.infobox .clientsMesh{font-family:"ionicons";color:#dbdbdb;word-spacing:-0.2em;white-space:normal}.infobox{position:relative;padding:.25em 0;margin-bottom:12pt}.infobox img{max-width:100%}.infobox input[type=text],.infobox textarea{box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);border-radius:5px;border:none;line-height:1.67em;vertical-align:bottom;margin-right:.7em;padding:3px 6px;font-family:monospace;width:70%;max-width:500px;min-height:42px;font-size:1.15em}.infobox textarea{resize:vertical;overflow:auto;max-height:300px}button{-webkit-tap-highlight-color:transparent;font-family:"ionicons";box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);border-radius:.9em;background:rgba(255,255,255,.7);color:#333;border:none;cursor:pointer;height:1.8em;width:1.8em;font-size:20pt;transition:box-shadow .5s,color .5s;outline:none}button.active{color:#dc0067 !important}button:hover{background:#fff;color:#dc0067;box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}button:active{box-shadow:inset 0 5px 20px rgba(0,0,0,.19),inset 0 3px 6px rgba(0,0,0,.23)}button::-moz-focus-inner{border:0}button.close{width:auto;height:auto;font-size:20pt;float:right;margin-right:12pt;margin-top:12pt;box-shadow:none;background:transparent;border-radius:0;color:rgba(0,0,0,.5);font-family:"ionicons";position:absolute;right:0}button.close:hover{color:#dc0067}button.close:after{content:""}.sidebar h2,.sidebar h3{padding-left:12pt;padding-right:12pt}.sidebar p,.sidebar pre,.sidebar ul,.sidebar h4{padding:0 12pt 1em}.sidebar table{padding:0 12pt}.sidebar img{max-width:100%}table{border-spacing:0 .5em}table td,table th{line-height:1.41em}.sidebar table{border-collapse:separate}.sidebar table th{font-weight:bold}.sidebar table:not(.node-links) th:first-child,.sidebar table:not(.node-links) td:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:50%}.sidebar table.node-links th:nth-child(2),.sidebar table.node-links td:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:45%}.sidebar table.node-links th:first-child,.sidebar table.node-links td:first-child{width:1.5em}.sidebarhandle{position:fixed;left:444pt;top:12pt;z-index:10;transition:left .5s,box-shadow .5s,color .5s,transform .5s}.sidebarhandle:after{padding-right:.125em;content:""}.sidebar.hidden .sidebarhandle{transform:scale(-1, 1);left:12pt}.online{color:#558020 !important}.offline{color:#d43e2a !important}.unseen{color:#d89100 !important}.sidebar{z-index:5;width:420pt;box-sizing:border-box;position:absolute;top:12pt;left:12pt;padding-bottom:12pt;transition:left .5s}.sidebar.hidden{left:-432pt}.sidebar .icon{padding:0 .25em}.sidebar table{width:100%;table-layout:fixed}.sidebar table th{text-align:left}.sidebar table:not(.node-links) td:not(:first-child),.sidebar table:not(.node-links) th:not(:first-child){text-align:right}.sidebar table.node-links td:not(:nth-child(-n+2)),.sidebar table.node-links th:not(:nth-child(-n+2)){text-align:right}.sidebar a{color:#1566a9}.bar{display:block;height:1.4em;background:rgba(85,128,32,.5);position:relative}.bar span{display:inline-block;height:1.4em;background:rgba(85,128,32,.8)}.bar label{font-weight:bold;white-space:nowrap;color:#fff;position:absolute;right:.5em;top:.1em}.proportion th{font-weight:normal !important;text-align:right !important;font-size:.95em;padding-right:.71em}.proportion td{text-align:left !important;width:100%}.proportion td,.proportion th{white-space:nowrap}.proportion span{display:inline-block;background:#000;padding:.25em .5em;font-weight:bold;min-width:1.5em;box-sizing:border-box}@media screen and (max-width: 80em){.sidebar{font-size:.8em;top:0;left:0;margin:0;width:320pt;min-height:100vh;box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);background:#fff}.sidebar .sidebarhandle{left:332pt}.sidebar .container,.sidebar .infobox{margin:0;box-shadow:none;border-radius:0}}@media screen and (max-width: 630pt){.sidebarhandle{display:none}.content{position:relative;width:auto;height:60vh}.sidebar{position:static;margin:0 !important;width:auto;height:auto;min-height:0}.sidebar.hidden{width:auto}} +/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/hopglass-frontend/style.css.map b/hopglass-frontend/style.css.map new file mode 100644 index 0000000..0325908 --- /dev/null +++ b/hopglass-frontend/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["style.css","file:///build/source/scss/_reset.scss","file:///build/source/scss/_base.scss","file:///build/source/scss/_leaflet.scss","file:///build/source/scss/_leaflet.label.scss","file:///build/source/scss/_filters.scss","file:///build/source/scss/_loader.scss","file:///build/source/scss/_sidebar.scss","file:///build/source/scss/_map.scss","file:///build/source/scss/main.scss","file:///build/source/scss/_forcegraph.scss","file:///build/source/scss/_legend.scss","file:///build/source/scss/_shadow.scss"],"names":[],"mappings":"AAAA,2ZCIA,SAaE,UACA,SACA,eACA,aACA,uBACA,CAAA,8EAIF,aAEE,CAAA,KAGF,aACE,CAAA,MAGF,eACE,CAAA,aAGF,WACE,CAAA,oDAGF,WAEE,YACA,CAAA,MAGF,yBACE,gBACA,CAAA,kBCnDF,gBACE,CAAA,GAGF,gBACE,aACA,CAAA,GAGF,gBACE,eACA,CAAA,GAGF,cACE,gBACA,CAAA,GAGF,aACE,CAAA,GAGF,eACE,CAAA,GAGF,eACE,CAAA,MAGF,YACE,CAAA,2RC9BF,kBAcC,OACA,KACA,CAAA,mBAED,gBACC,sBACA,iBACA,CAAA,0DAED,yBAGC,AACG,qBACK,AADL,iBACK,sBACR,CAAA,4CAED,aAEC,CAAA,uBAGD,yBACC,CAAA,2CAGD,4BACC,CAAA,cAED,eACC,iBACA,CAAA,qBAED,kBACC,CAAA,kBAED,QACC,QACA,CAAA,0BAGD,qBACC,CAAA,mBAGD,SAAA,CAAA,sBACA,SAAA,CAAA,sBACA,SAAA,CAAA,qBACA,SAAA,CAAA,qBACA,SAAA,CAAA,oBACA,SAAA,CAAA,mBAEA,UACC,UACA,CAAA,MAED,2BACC,qBACA,iBACA,CAAA,iBAMD,kBACC,UACA,mBACA,CAAA,6BAED,kBAEC,aACA,mBACA,CAAA,aAED,KACC,CAAA,eAED,OACC,CAAA,gBAED,QACC,CAAA,cAED,MACC,CAAA,iBAED,WACC,UACA,CAAA,gCAED,WACC,CAAA,8BAED,eACC,CAAA,iCAED,kBACC,CAAA,+BAED,gBACC,CAAA,gCAED,iBACC,CAAA,mEAMD,UAEC,AAGK,6BACG,CAAA,4FAET,SAEC,CAAA,0CAMK,qDACG,CAAA,0GAOH,eACG,CAAA,sCAGT,iBACC,CAAA,mBAMD,cACC,CAAA,mBAGA,gBACA,CAAA,qCAED,WAEC,CAAA,0EAED,YAEC,AACA,oBACA,CAAA,mBAMD,gBACC,SACA,CAAA,qBAED,aACC,CAAA,oCAED,wBACC,CAAA,kBAED,uBACC,+BACA,CAAA,mBAKD,yDACC,CAAA,aAMD,qCACC,iBACA,CAAA,oCAED,sBAEC,6BACA,WACA,YACA,iBACA,cACA,kBACA,qBACA,UACA,CAAA,8CAED,4BAEC,4BACA,aACA,CAAA,qBAED,wBACC,CAAA,2BAED,2BACC,2BACA,CAAA,0BAED,8BACC,+BACA,kBACA,CAAA,gCAED,eACC,yBACA,UACA,CAAA,8BAGD,WACC,YACA,gBACA,CAAA,mDAMD,iDAEC,eACA,CAAA,0BAED,cACC,CAAA,wCAGD,cACC,CAAA,yCAED,cACC,CAAA,wBAMD,oCACC,gBACA,iBACA,CAAA,+BAED,wCACC,WACA,WACA,CAAA,+CAED,2CACC,yBACA,CAAA,8CAED,WACC,WACA,CAAA,qHAED,YAEC,CAAA,8DAED,cACC,iBACA,CAAA,iCAED,yBACC,WACA,eACA,CAAA,iCAED,eACC,kBACA,OACA,CAAA,8BAED,aACC,CAAA,kCAED,SACC,0BACA,yBACA,CAAA,gDAMD,gBACC,gCACA,QACA,CAAA,yDAED,cAEC,UACA,CAAA,+BAED,oBACC,CAAA,qCAED,yBACC,CAAA,0FAED,cAEC,CAAA,qCAED,eACC,CAAA,uCAED,iBACC,CAAA,4BAED,sBACC,gBACA,gBACA,oBACA,eACA,mBACA,gBACA,AACA,uBACK,gBAEL,+BACA,CAAA,8CAED,0BACC,mBACA,eACA,CAAA,+DAED,4BACC,CAAA,+GAGD,eAGC,CAAA,mEAED,gCAEC,2BACA,CAAA,eAMD,kBACC,iBACA,CAAA,+BAED,YACC,gBACA,kBACA,CAAA,uBAED,iBACC,eACA,CAAA,yBAED,aACC,CAAA,6BAED,cACC,WACA,YACA,kBACA,eACA,CAAA,mBAED,WACC,YACA,YACA,oBAEA,AAKK,uBACG,CAAA,kDAET,gBAEC,oCAEA,CAAA,gDAED,kBACC,MACA,QACA,oBACA,kBACA,WACA,YACA,yCACA,cACA,qBACA,iBACA,sBACA,CAAA,sDAED,UACC,CAAA,wBAED,cACC,6BACA,yBACA,CAAA,8CAGD,MACC,CAAA,kCAED,WACC,cACA,uHAEA,gHACA,CAAA,4CAED,eACC,CAAA,4JAGD,qBAIC,CAAA,kBAMD,gBACC,qBACA,CAAA,eC7dD,mBACC,iCACA,4BACA,kBACA,6BACA,kBACA,mBACA,iBACA,WACA,cACA,2DACA,iBACA,gBACA,kBACA,yBACA,AACG,qBACC,iBACI,oBACR,mBACA,SACA,CAAA,iCAGD,eACC,mBACA,CAAA,2CAGD,iCAEC,oCACA,aACA,kBACA,OACA,CAAA,sBAGD,4BACC,2BACA,UACA,CAAA,qBAGD,2BACC,0BACA,WACA,CAAA,sDAGD,UAEC,CAAA,SCpDD,SACE,oBACA,AADA,aACA,mBACA,AADA,eACA,8BACA,gBACA,iBACA,4BACA,CAAA,YAEA,mBACE,oBACA,AADA,aACA,kBACA,WACA,sBACA,AADA,mBACA,mBACA,0BACA,CAAA,kBAEA,cACE,CAAA,yBAEA,UACE,CAAA,gBAIJ,kBACE,CAAA,mBAGF,gBACE,WACA,UACA,WACA,YACA,+BACA,eACA,sBACA,0BACA,CAAA,yBAEA,2BACE,cACA,+BACA,CAAA,0BAGF,eACE,CAAA,QChDR,WACE,gBACA,cACA,iBACA,iBACA,CAAA,SAGF,qDACE,6BACA,kBACA,qBACA,YACA,gBACA,UACA,CAAA,mBAGF,GACE,wBACE,CAAA,CAAA,YCpBJ,UACE,kBACA,SACA,CAAA,gBAGF,UACE,iBACA,YACA,kBACA,gBACA,cACA,SACA,CAAA,sBAGF,YACE,CAAA,iBAGF,wBACE,sCACA,kBACA,SACA,WACA,kBACA,kBACA,WACA,iBACA,gBACA,UACA,mBACA,gBACA,sBACA,CAAA,cClCF,kBACE,CAAA,kBAGF,gBACE,CAAA,KAGF,WACE,WACA,CAAA,iBAEA,kCACE,2CACA,0BACA,kCACA,CAAA,yCAGF,eCRe,CAAA,4CDYf,kBCZe,CAAA,0CDgBf,gBChBe,CAAA,2CDoBf,iBCpBe,CAAA,ADiCb,iBAIJ,GACE,SACE,CAAA,IAEF,SACE,CAAA,IAEF,SACE,CAAA,CAAA,OExDJ,YACE,WACA,kBACA,CAAA,cAEA,cACE,iBACA,CAAA,gBCPJ,UACE,WACA,kBACA,qBACA,kBACA,CAAA,oBAGF,wBACE,CAAA,uBAGF,wBACE,CAAA,wBAGF,wBACE,CAAA,+BAGF,eACE,CAAA,SFHF,eACE,WACA,YACA,CAAA,kBAEA,cACE,2BACA,YAEA,kBACA,SAjBa,UAAA,CAAA,yBAqBb,gBArBa,CAAA,aA2BjB,0BACE,CAAA,MAGF,2BACE,SACA,gBACA,oBACA,AADA,aACA,8BACA,8DG3CE,CAAA,SH+CJ,kBACE,AADF,cACE,yBACA,kBACA,sBACA,eACA,oBACA,CAAA,eAGF,aACE,CAAA,eAGF,gCACE,aACA,CAAA,KAGF,SACE,UACA,gCACA,eACA,UACA,CAAA,0BAGF,sBACE,CAAA,eAGF,cACE,CAAA,2BAGF,uBACE,mBACA,YACA,iBACA,CAAA,iCAGF,kBACE,CAAA,+EAGF,mBACE,UACA,CAAA,uBAGF,WACE,CAAA,oBAGF,gBACE,iBACA,mBACA,kBACA,mBACA,kBACA,CAAA,oBAGF,2BACE,WACA,kBACA,CAAA,8BAGF,iBACE,gBACA,gBACA,gBACA,CAAA,iCAKF,iBACE,gBAEA,qBACA,CAAA,iCAGF,iBACE,gBAEA,qBACA,CAAA,iBAGF,kBACE,iBACA,gBAEA,sBACA,UACA,CAAA,sCAIA,+DGnJE,iCHqJA,iBACA,CAAA,2BAGF,YACE,CAAA,iCAGF,YACE,CAAA,WAGF,kBACE,CAAA,kBAIJ,uBACE,cACA,oBACA,kBACA,CAAA,sBAGF,uBACE,cACA,oBACA,kBACA,CAAA,SAGF,kBACE,gBACA,kBAjLe,CAAA,aAoLf,cACE,CAAA,4CAGF,+DACE,kBACA,YACA,mBACA,sBACA,kBACA,gBACA,sBACA,UACA,gBACA,gBACA,gBACA,CAAA,kBAGF,gBACE,cACA,gBACA,CAAA,OAIJ,wCACE,uBACA,+DGvNE,mBHyNF,gCACA,WACA,YACA,eACA,aACA,YACA,eACA,oCACA,YACA,CAAA,cAGF,wBACE,CAAA,aAGF,gBACE,cACA,8DGzOE,CAAA,cH6OJ,2EACE,CAAA,yBAGF,QACE,CAAA,aAGF,WACE,YACA,eACA,YACA,kBApPe,gBAAA,gBAuPf,uBACA,gBACA,qBACA,uBACA,kBACA,OACA,CAAA,mBAEA,aACE,CAAA,mBAGF,WACE,CAAA,wBAIJ,kBAxQiB,kBAAA,CAAA,gDA8Qf,kBACE,CAAA,eAGF,cACE,CAAA,aAEF,cACE,CAAA,MAIJ,qBACE,CAAA,kBACA,kBACE,CAAA,eAIJ,wBACE,CAAA,kBAGF,gBACE,CAAA,8FAGF,mBAEE,gBACA,uBACA,SACA,CAAA,oFAGF,mBAEE,gBACA,uBACA,SACA,CAAA,kFAGF,WAEE,CAAA,eAGF,eACE,WACA,SAhUe,WAkUf,0DACA,CAAA,qBAGF,qBACE,WACA,CAAA,+BAGF,uBACE,SA5Ue,CAAA,QAgVjB,wBACE,CAAA,SAGF,wBACE,CAAA,QAGF,wBACE,CAAA,SAGF,UACE,YA/Va,sBAiWb,kBACA,SAhWe,UAAA,oBAAA,mBAoWf,CAAA,gBAGF,WACE,CAAA,eAGF,eACE,CAAA,eAGF,WACE,kBACA,CAAA,kBAGF,eACE,CAAA,0GAGF,gBAEE,CAAA,sGAGF,gBAEE,CAAA,WAGF,aACE,CAAA,KAGF,cACE,aACA,8BACA,iBACA,CAAA,UAEA,qBACE,aACA,6BACA,CAAA,WAGF,iBACE,mBACA,WACA,kBACA,WACA,QACA,CAAA,eAIJ,8BACE,4BACA,gBACA,mBACA,CAAA,eAGF,2BACE,UACA,CAAA,8BAGF,kBACE,CAAA,iBAGF,qBACE,gBACA,mBACA,iBACA,gBACA,qBACA,CAAA,oCAGF,SACE,eACE,MACA,OACA,SACA,YA3bgB,iBA6bhB,+DGjcA,eHmcA,CAAA,wBAEA,UACE,CAAA,sCAGF,SACE,gBACA,eACA,CAAA,CAAA,qCAKN,eACE,YACE,CAAA,SAGF,kBACE,WACA,WACA,CAAA,SAGF,gBACE,oBACA,WACA,YACA,YACA,CAAA,gBAGF,UACE,CAAA,CAAA","file":"style.css"} \ No newline at end of file