storymap-min.js
248 KB
!function(t){t.VCO={VERSION:"0.1",_originalL:t.VCO}}(this),VCO.debug=!0,VCO.Bind=function(t,e){return function(){return t.apply(e,arguments)}},trace=function(t){VCO.debug&&(window.console?console.log(t):"undefined"!=typeof jsTrace&&jsTrace.send(t))},VCO.Util={extend:function(t){for(var e=Array.prototype.slice.call(arguments,1),i=0,n=e.length,o;n>i;i++){o=e[i]||{};for(var s in o)o.hasOwnProperty(s)&&(t[s]=o[s])}return t},setOptions:function(t,e){t.options=VCO.Util.extend({},t.options,e),""===t.options.uniqueid&&(t.options.uniqueid=VCO.Util.unique_ID(6))},findArrayNumberByUniqueID:function(t,e,i){for(var n=0,o=0;o<e.length;o++)e[o].data[i]==t&&(trace(e[o].data[i]),n=o);return n},convertUnixTime:function(t){var e=/^(\d{4})-(\d{2})-(\d{2})[T\s](\d{2}):(\d{2}):(\d{2})/;if(t.match(e))var i=t.match(e).slice(1);for(var n=[],o=0;o<i.length;o++){var s=parseInt(i[o]);1==o&&(s-=1),n.push(s)}return date=new Date(n[0],n[1],n[2],n[3],n[4],n[5]),months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],year=date.getFullYear(),month=months[date.getMonth()],day=date.getDate(),time=month+", "+day+" "+year},setData:function(t,e){t.data=VCO.Util.extend({},t.data,e),""===t.data.uniqueid&&(t.data.uniqueid=VCO.Util.unique_ID(6))},mergeData:function(t,e){var i;for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},stamp:function(){var t=0,e="_vco_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),isArray:function(){if(Array.isArray)return Array.isArray;var t=Object.prototype.toString,e=t.call([]);return function(i){return t.call(i)===e}}(),unique_ID:function(t,e){var i=function(t){return Math.floor(Math.random()*t)},n=function(){var t="abcdefghijklmnopqurstuvwxyz";return t.substr(i(32),1)},o=function(t){for(var e="",i=0;t>i;i++)e+=n();return e};return e?e+"-"+o(t):"vco-"+o(t)},htmlify:function(t){return VCO.Browser.chrome&&(t=VCO.Emoji(t)),t.match(/<p>[\s\S]*?<\/p>/)?t:"<p>"+t+"</p>"},getParamString:function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i+"="+t[i]);return"?"+e.join("&")},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},falseFn:function(){return!1},requestAnimFrame:function(){function t(t){window.setTimeout(t,1e3/60)}var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||t;return function(i,n,o,s){i=n?VCO.Util.bind(i,n):i,o&&e===t?i():e(i,s)}}(),bind:function(t,e){return function(){return t.apply(e,arguments)}},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,i){var n=e[i];if(!e.hasOwnProperty(i))throw new Error("No value provided for variable "+t);return n})},hexToRgb:function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,n){return e+e+i+i+n+n});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},ratio:{square:function(t){var e={w:0,h:0};return t.w>t.h&&t.h>0?(e.h=t.h,e.w=t.h):(e.w=t.w,e.h=t.w),e},r16_9:function(t){return null!==t.w&&""!==t.w?Math.round(t.w/16*9):null!==t.h&&""!==t.h?Math.round(t.h/9*16):0},r4_3:function(t){return null!==t.w&&""!==t.w?Math.round(t.w/4*3):null!==t.h&&""!==t.h?Math.round(t.h/3*4):void 0}},getObjectAttributeByIndex:function(t,e){if("undefined"!=typeof t){var i=0;for(var n in t){if(e===i)return t[n];i++}return""}return""},getUrlVars:function(t){var e,i=[],n,o;e=t.toString(),e.match("&")?e=e.replace("&","&"):e.match("&")?e=e.replace("&","&"):e.match("&")&&(e=e.replace("&","&")),o=e.slice(e.indexOf("?")+1).split("&");for(var s=0;s<o.length;s++)n=o[s].split("="),i.push(n[0]),i[n[0]]=n[1];return i}},function(t){var e=function(){function t(t){return null==t?String(t):H[q.call(t)]||"object"}function e(e){return"function"==t(e)}function i(t){return null!=t&&t==t.window}function n(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function o(e){return"object"==t(e)}function s(t){return o(t)&&!i(t)&&Object.getPrototypeOf(t)==Object.prototype}function a(t){return"number"==typeof t.length}function r(t){return O.call(t,function(t){return null!=t})}function h(t){return t.length>0?$.fn.concat.apply([],t):t}function l(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function c(t){return t in k?k[t]:k[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function u(t,e){return"number"!=typeof e||P[l(t)]?e:e+"px"}function d(t){var e,i;return D[t]||(e=T.createElement(t),T.body.appendChild(e),i=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==i&&(i="block"),D[t]=i),D[t]}function m(t){return"children"in t?M.call(t.children):$.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function p(t,e,i){for(x in e)i&&(s(e[x])||Q(e[x]))?(s(e[x])&&!s(t[x])&&(t[x]={}),Q(e[x])&&!Q(t[x])&&(t[x]=[]),p(t[x],e[x],i)):e[x]!==w&&(t[x]=e[x])}function _(t,e){return null==e?$(t):$(t).filter(e)}function f(t,i,n,o){return e(i)?i.call(t,n,o):i}function g(t,e,i){null==i?t.removeAttribute(e):t.setAttribute(e,i)}function v(t,e){var i=t.className,n=i&&i.baseVal!==w;return e===w?n?i.baseVal:i:void(n?i.baseVal=e:t.className=e)}function y(t){var e;try{return t?"true"==t||("false"==t?!1:"null"==t?null:/^0/.test(t)||isNaN(e=Number(t))?/^[\[\{]/.test(t)?$.parseJSON(t):t:e):t}catch(i){return t}}function L(t,e){e(t);for(var i in t.childNodes)L(t.childNodes[i],e)}var w,x,$,b,C=[],M=C.slice,O=C.filter,T=window.document,D={},k={},P={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},E=/^\s*<(\w+|!)[^>]*>/,S=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,V=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,z=/^(?:body|html)$/i,A=/([A-Z])/g,B=["val","css","html","text","data","width","height","offset"],I=["after","prepend","before","append"],U=T.createElement("table"),N=T.createElement("tr"),Z={tr:T.createElement("tbody"),tbody:U,thead:U,tfoot:U,td:N,th:N,"*":T.createElement("div")},R=/complete|loaded|interactive/,j=/^\.([\w-]+)$/,F=/^#([\w-]*)$/,W=/^[\w-]*$/,H={},q=H.toString,G={},Y,X,J=T.createElement("div"),K={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Q=Array.isArray||function(t){return t instanceof Array};return G.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var i=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(i)return i.call(t,e);var n,o=t.parentNode,s=!o;return s&&(o=J).appendChild(t),n=~G.qsa(o,e).indexOf(t),s&&J.removeChild(t),n},Y=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},X=function(t){return O.call(t,function(e,i){return t.indexOf(e)==i})},G.fragment=function(t,e,i){var n,o,a;return S.test(t)&&(n=$(T.createElement(RegExp.$1))),n||(t.replace&&(t=t.replace(V,"<$1></$2>")),e===w&&(e=E.test(t)&&RegExp.$1),e in Z||(e="*"),a=Z[e],a.innerHTML=""+t,n=$.each(M.call(a.childNodes),function(){a.removeChild(this)})),s(i)&&(o=$(n),$.each(i,function(t,e){B.indexOf(t)>-1?o[t](e):o.attr(t,e)})),n},G.Z=function(t,e){return t=t||[],t.__proto__=$.fn,t.selector=e||"",t},G.isZ=function(t){return t instanceof G.Z},G.init=function(t,i){var n;if(!t)return G.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&E.test(t))n=G.fragment(t,RegExp.$1,i),t=null;else{if(i!==w)return $(i).find(t);n=G.qsa(T,t)}else{if(e(t))return $(T).ready(t);if(G.isZ(t))return t;if(Q(t))n=r(t);else if(o(t))n=[t],t=null;else if(E.test(t))n=G.fragment(t.trim(),RegExp.$1,i),t=null;else{if(i!==w)return $(i).find(t);n=G.qsa(T,t)}}return G.Z(n,t)},$=function(t,e){return G.init(t,e)},$.extend=function(t){var e,i=M.call(arguments,1);return"boolean"==typeof t&&(e=t,t=i.shift()),i.forEach(function(i){p(t,i,e)}),t},G.qsa=function(t,e){var i,o="#"==e[0],s=!o&&"."==e[0],a=o||s?e.slice(1):e,r=W.test(a);return n(t)&&r&&o?(i=t.getElementById(a))?[i]:[]:1!==t.nodeType&&9!==t.nodeType?[]:M.call(r&&!o?s?t.getElementsByClassName(a):t.getElementsByTagName(e):t.querySelectorAll(e))},$.contains=function(t,e){return t!==e&&t.contains(e)},$.type=t,$.isFunction=e,$.isWindow=i,$.isArray=Q,$.isPlainObject=s,$.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},$.inArray=function(t,e,i){return C.indexOf.call(e,t,i)},$.camelCase=Y,$.trim=function(t){return null==t?"":String.prototype.trim.call(t)},$.uuid=0,$.support={},$.expr={},$.map=function(t,e){var i,n=[],o,s;if(a(t))for(o=0;o<t.length;o++)i=e(t[o],o),null!=i&&n.push(i);else for(s in t)i=e(t[s],s),null!=i&&n.push(i);return h(n)},$.each=function(t,e){var i,n;if(a(t)){for(i=0;i<t.length;i++)if(e.call(t[i],i,t[i])===!1)return t}else for(n in t)if(e.call(t[n],n,t[n])===!1)return t;return t},$.grep=function(t,e){return O.call(t,e)},window.JSON&&($.parseJSON=JSON.parse),$.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){H["[object "+e+"]"]=e.toLowerCase()}),$.fn={forEach:C.forEach,reduce:C.reduce,push:C.push,sort:C.sort,indexOf:C.indexOf,concat:C.concat,map:function(t){return $($.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return $(M.apply(this,arguments))},ready:function(t){return R.test(T.readyState)&&T.body?t($):T.addEventListener("DOMContentLoaded",function(){t($)},!1),this},get:function(t){return t===w?M.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return C.every.call(this,function(e,i){return t.call(e,i,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):$(O.call(this,function(e){return G.matches(e,t)}))},add:function(t,e){return $(X(this.concat($(t,e))))},is:function(t){return this.length>0&&G.matches(this[0],t)},not:function(t){var i=[];if(e(t)&&t.call!==w)this.each(function(e){t.call(this,e)||i.push(this)});else{var n="string"==typeof t?this.filter(t):a(t)&&e(t.item)?M.call(t):$(t);this.forEach(function(t){n.indexOf(t)<0&&i.push(t)})}return $(i)},has:function(t){return this.filter(function(){return o(t)?$.contains(this,t):$(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!o(t)?t:$(t)},last:function(){var t=this[this.length-1];return t&&!o(t)?t:$(t)},find:function(t){var e,i=this;return e="object"==typeof t?$(t).filter(function(){var t=this;return C.some.call(i,function(e){return $.contains(e,t)})}):1==this.length?$(G.qsa(this[0],t)):this.map(function(){return G.qsa(this,t)})},closest:function(t,e){var i=this[0],o=!1;for("object"==typeof t&&(o=$(t));i&&!(o?o.indexOf(i)>=0:G.matches(i,t));)i=i!==e&&!n(i)&&i.parentNode;return $(i)},parents:function(t){for(var e=[],i=this;i.length>0;)i=$.map(i,function(t){return(t=t.parentNode)&&!n(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return _(e,t)},parent:function(t){return _(X(this.pluck("parentNode")),t)},children:function(t){return _(this.map(function(){return m(this)}),t)},contents:function(){return this.map(function(){return M.call(this.childNodes)})},siblings:function(t){return _(this.map(function(t,e){return O.call(m(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return $.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=d(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var i=e(t);if(this[0]&&!i)var n=$(t).get(0),o=n.parentNode||this.length>1;return this.each(function(e){$(this).wrapAll(i?t.call(this,e):o?n.cloneNode(!0):n)})},wrapAll:function(t){if(this[0]){$(this[0]).before(t=$(t));for(var e;(e=t.children()).length;)t=e.first();$(t).append(this)}return this},wrapInner:function(t){var i=e(t);return this.each(function(e){var n=$(this),o=n.contents(),s=i?t.call(this,e):t;o.length?o.wrapAll(s):n.append(s)})},unwrap:function(){return this.parent().each(function(){$(this).replaceWith($(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=$(this);(t===w?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return $(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return $(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0===arguments.length?this.length>0?this[0].innerHTML:null:this.each(function(e){var i=this.innerHTML;$(this).empty().append(f(this,t,e,i))})},text:function(t){return 0===arguments.length?this.length>0?this[0].textContent:null:this.each(function(){this.textContent=t===w?"":""+t})},attr:function(t,e){var i;return"string"==typeof t&&e===w?0==this.length||1!==this[0].nodeType?w:"value"==t&&"INPUT"==this[0].nodeName?this.val():!(i=this[0].getAttribute(t))&&t in this[0]?this[0][t]:i:this.each(function(i){if(1===this.nodeType)if(o(t))for(x in t)g(this,x,t[x]);else g(this,t,f(this,e,i,this.getAttribute(t)))})},removeAttr:function(t){return this.each(function(){1===this.nodeType&&g(this,t)})},prop:function(t,e){return t=K[t]||t,e===w?this[0]&&this[0][t]:this.each(function(i){this[t]=f(this,e,i,this[t])})},data:function(t,e){var i=this.attr("data-"+t.replace(A,"-$1").toLowerCase(),e);return null!==i?y(i):w},val:function(t){return 0===arguments.length?this[0]&&(this[0].multiple?$(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value):this.each(function(e){this.value=f(this,t,e,this.value)})},offset:function(t){if(t)return this.each(function(e){var i=$(this),n=f(this,t,e,i.offset()),o=i.offsetParent().offset(),s={top:n.top-o.top,left:n.left-o.left};"static"==i.css("position")&&(s.position="relative"),i.css(s)});if(0==this.length)return null;var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,i){if(arguments.length<2){var n=this[0],o=getComputedStyle(n,"");if(!n)return;if("string"==typeof e)return n.style[Y(e)]||o.getPropertyValue(e);if(Q(e)){var s={};return $.each(Q(e)?e:[e],function(t,e){s[e]=n.style[Y(e)]||o.getPropertyValue(e)}),s}}var a="";if("string"==t(e))i||0===i?a=l(e)+":"+u(e,i):this.each(function(){this.style.removeProperty(l(e))});else for(x in e)e[x]||0===e[x]?a+=l(x)+":"+u(x,e[x])+";":this.each(function(){this.style.removeProperty(l(x))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf($(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?C.some.call(this,function(t){return this.test(v(t))},c(t)):!1},addClass:function(t){return t?this.each(function(e){b=[];var i=v(this),n=f(this,t,e,i);n.split(/\s+/g).forEach(function(t){$(this).hasClass(t)||b.push(t)},this),b.length&&v(this,i+(i?" ":"")+b.join(" "))}):this},removeClass:function(t){return this.each(function(e){return t===w?v(this,""):(b=v(this),f(this,t,e,b).split(/\s+/g).forEach(function(t){b=b.replace(c(t)," ")}),void v(this,b.trim()))})},toggleClass:function(t,e){return t?this.each(function(i){var n=$(this),o=f(this,t,i,v(this));o.split(/\s+/g).forEach(function(t){(e===w?!n.hasClass(t):e)?n.addClass(t):n.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===w?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===w?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),i=this.offset(),n=z.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat($(t).css("margin-top"))||0,i.left-=parseFloat($(t).css("margin-left"))||0,n.top+=parseFloat($(e[0]).css("border-top-width"))||0,n.left+=parseFloat($(e[0]).css("border-left-width"))||0,{top:i.top-n.top,left:i.left-n.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||T.body;t&&!z.test(t.nodeName)&&"static"==$(t).css("position");)t=t.offsetParent;return t})}},$.fn.detach=$.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});$.fn[t]=function(o){var s,a=this[0];return o===w?i(a)?a["inner"+e]:n(a)?a.documentElement["scroll"+e]:(s=this.offset())&&s[t]:this.each(function(e){a=$(this),a.css(t,f(this,o,e,a[t]()))})}}),I.forEach(function(e,i){var n=i%2;$.fn[e]=function(){var e,o=$.map(arguments,function(i){return e=t(i),"object"==e||"array"==e||null==i?i:G.fragment(i)}),s,a=this.length>1;return o.length<1?this:this.each(function(t,e){s=n?e:e.parentNode,e=0==i?e.nextSibling:1==i?e.firstChild:2==i?e:null,o.forEach(function(t){if(a)t=t.cloneNode(!0);else if(!s)return $(t).remove();L(s.insertBefore(t,e),function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},$.fn[n?e+"To":"insert"+(i?"Before":"After")]=function(t){return $(t)[e](this),this}}),G.Z.prototype=$.fn,G.uniq=X,G.deserializeValue=y,$.zepto=G,$}();window.Zepto=e,void 0===window.$&&(window.$=e),function($){function t(t){return t._zid||(t._zid=u++)}function e(e,o,s,a){if(o=i(o),o.ns)var r=n(o.ns);return(f[t(e)]||[]).filter(function(e){return!(!e||o.e&&e.e!=o.e||o.ns&&!r.test(e.ns)||s&&t(e.fn)!==t(s)||a&&e.sel!=a)})}function i(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function n(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!v&&t.e in y||!!e}function s(t){return L[t]||v&&y[t]||t}function a(e,n,a,r,l,c,u){var m=t(e),p=f[m]||(f[m]=[]);n.split(/\s/).forEach(function(t){if("ready"==t)return $(document).ready(a);var n=i(t);n.fn=a,n.sel=l,n.e in L&&(a=function(t){var e=t.relatedTarget;return!e||e!==this&&!$.contains(this,e)?n.fn.apply(this,arguments):void 0}),n.del=c;var m=c||a;n.proxy=function(t){if(t=h(t),!t.isImmediatePropagationStopped()){t.data=r;var i=m.apply(e,t._args==d?[t]:[t].concat(t._args));return i===!1&&(t.preventDefault(),t.stopPropagation()),i}},n.i=p.length,p.push(n),"addEventListener"in e&&e.addEventListener(s(n.e),n.proxy,o(n,u))})}function r(i,n,a,r,h){var l=t(i);(n||"").split(/\s/).forEach(function(t){e(i,t,a,r).forEach(function(t){delete f[l][t.i],"removeEventListener"in i&&i.removeEventListener(s(t.e),t.proxy,o(t,h))})})}function h(t,e){return(e||!t.isDefaultPrevented)&&(e||(e=t),$.each(C,function(i,n){var o=e[i];t[i]=function(){return this[n]=w,o&&o.apply(e,arguments)},t[n]=x}),(e.defaultPrevented!==d?e.defaultPrevented:"returnValue"in e?e.returnValue===!1:e.getPreventDefault&&e.getPreventDefault())&&(t.isDefaultPrevented=w)),t}function l(t){var e,i={originalEvent:t};for(e in t)b.test(e)||t[e]===d||(i[e]=t[e]);return h(i,t)}var c=$.zepto.qsa,u=1,d,m=Array.prototype.slice,p=$.isFunction,_=function(t){return"string"==typeof t},f={},g={},v="onfocusin"in window,y={focus:"focusin",blur:"focusout"},L={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",$.event={add:a,remove:r},$.proxy=function(e,i){if(p(e)){var n=function(){return e.apply(i,arguments)};return n._zid=t(e),n}if(_(i))return $.proxy(e[i],e);throw new TypeError("expected function")},$.fn.bind=function(t,e,i){return this.on(t,e,i)},$.fn.unbind=function(t,e){return this.off(t,e)},$.fn.one=function(t,e,i,n){return this.on(t,e,i,n,1)};var w=function(){return!0},x=function(){return!1},b=/^([A-Z]|returnValue$|layer[XY]$)/,C={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};$.fn.delegate=function(t,e,i){return this.on(e,t,i)},$.fn.undelegate=function(t,e,i){return this.off(e,t,i)},$.fn.live=function(t,e){return $(document.body).delegate(this.selector,t,e),this},$.fn.die=function(t,e){return $(document.body).undelegate(this.selector,t,e),this},$.fn.on=function(t,e,i,n,o){var s,h,c=this;return t&&!_(t)?($.each(t,function(t,n){c.on(t,e,i,n,o)}),c):(_(e)||p(n)||n===!1||(n=i,i=e,e=d),(p(i)||i===!1)&&(n=i,i=d),n===!1&&(n=x),c.each(function(c,u){o&&(s=function(t){return r(u,t.type,n),n.apply(this,arguments)}),e&&(h=function(t){var i,o=$(t.target).closest(e,u).get(0);return o&&o!==u?(i=$.extend(l(t),{currentTarget:o,liveFired:u}),(s||n).apply(o,[i].concat(m.call(arguments,1)))):void 0}),a(u,t,n,i,e,h||s)}))},$.fn.off=function(t,e,i){var n=this;return t&&!_(t)?($.each(t,function(t,i){n.off(t,e,i)}),n):(_(e)||p(i)||i===!1||(i=e,e=d),i===!1&&(i=x),n.each(function(){r(this,t,i,e)}))},$.fn.trigger=function(t,e){return t=_(t)||$.isPlainObject(t)?$.Event(t):h(t),t._args=e,this.each(function(){"dispatchEvent"in this?this.dispatchEvent(t):$(this).triggerHandler(t,e)})},$.fn.triggerHandler=function(t,i){var n,o;return this.each(function(s,a){n=l(_(t)?$.Event(t):t),n._args=i,n.target=a,$.each(e(a,t.type||t),function(t,e){return o=e.proxy(n),n.isImmediatePropagationStopped()?!1:void 0})}),o},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){$.fn[t]=function(e){return e?this.bind(t,e):this.trigger(t)}}),["focus","blur"].forEach(function(t){$.fn[t]=function(e){return e?this.bind(t,e):this.each(function(){try{this[t]()}catch(e){}}),this}}),$.Event=function(t,e){_(t)||(e=t,t=e.type);var i=document.createEvent(g[t]||"Events"),n=!0;if(e)for(var o in e)"bubbles"==o?n=!!e[o]:i[o]=e[o];return i.initEvent(t,n,!0),h(i)}}(e),function($){function t(t,e,i){var n=$.Event(e);return $(t).trigger(n,i),!n.isDefaultPrevented()}function e(e,i,n,o){return e.global?t(i||_,n,o):void 0}function i(t){t.global&&0===$.active++&&e(t,null,"ajaxStart")}function n(t){t.global&&!--$.active&&e(t,null,"ajaxStop")}function o(t,i){var n=i.context;return i.beforeSend.call(n,t,i)===!1||e(i,n,"ajaxBeforeSend",[t,i])===!1?!1:void e(i,n,"ajaxSend",[t,i])}function s(t,i,n,o){var s=n.context,a="success";n.success.call(s,t,a,i),o&&o.resolveWith(s,[t,a,i]),e(n,s,"ajaxSuccess",[i,n,t]),r(a,i,n)}function a(t,i,n,o,s){var a=o.context;o.error.call(a,n,i,t),s&&s.rejectWith(a,[n,i,t]),e(o,a,"ajaxError",[n,o,t||i]),r(i,n,o)}function r(t,i,o){var s=o.context;o.complete.call(s,i,t),e(o,s,"ajaxComplete",[i,o]),n(o)}function h(){}function l(t){return t&&(t=t.split(";",2)[0]),t&&(t==x?"html":t==w?"json":y.test(t)?"script":L.test(t)&&"xml")||"text"}function c(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function u(t){t.processData&&t.data&&"string"!=$.type(t.data)&&(t.data=$.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()||(t.url=c(t.url,t.data),t.data=void 0)}function d(t,e,i,n){var o=!$.isFunction(e);return{url:t,data:o?e:void 0,success:o?$.isFunction(i)?i:void 0:e,dataType:o?n||i:i}}function m(t,e,i,n){var o,s=$.isArray(e),a=$.isPlainObject(e);$.each(e,function(e,r){o=$.type(r),n&&(e=i?n:n+"["+(a||"object"==o||"array"==o?e:"")+"]"),!n&&s?t.add(r.name,r.value):"array"==o||!i&&"object"==o?m(t,r,i,e):t.add(e,r)})}var p=0,_=window.document,f,g,v=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,y=/^(?:text|application)\/javascript/i,L=/^(?:text|application)\/xml/i,w="application/json",x="text/html",b=/^\s*$/;$.active=0,$.ajaxJSONP=function(t,e){if(!("type"in t))return $.ajax(t);var i=t.jsonpCallback,n=($.isFunction(i)?i():i)||"jsonp"+ ++p,r=_.createElement("script"),h=window[n],l,c=function(t){$(r).triggerHandler("error",t||"abort")},u={abort:c},d;return e&&e.promise(u),$(r).on("load error",function(i,o){clearTimeout(d),$(r).off().remove(),"error"!=i.type&&l?s(l[0],u,t,e):a(null,o||"error",u,t,e),window[n]=h,l&&$.isFunction(h)&&h(l[0]),h=l=void 0}),o(u,t)===!1?(c("abort"),u):(window[n]=function(){l=arguments},r.src=t.url.replace(/\?(.+)=\?/,"?$1="+n),_.head.appendChild(r),t.timeout>0&&(d=setTimeout(function(){c("timeout")},t.timeout)),u)},$.ajaxSettings={type:"GET",beforeSend:h,success:h,error:h,complete:h,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:w,xml:"application/xml, text/xml",html:x,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},$.ajax=function(t){var e=$.extend({},t||{}),n=$.Deferred&&$.Deferred();for(f in $.ajaxSettings)void 0===e[f]&&(e[f]=$.ajaxSettings[f]);i(e),e.crossDomain||(e.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(e.url)&&RegExp.$2!=window.location.host),e.url||(e.url=window.location.toString()),u(e),e.cache===!1&&(e.url=c(e.url,"_="+Date.now()));var r=e.dataType,d=/\?.+=\?/.test(e.url);if("jsonp"==r||d)return d||(e.url=c(e.url,e.jsonp?e.jsonp+"=?":e.jsonp===!1?"":"callback=?")),$.ajaxJSONP(e,n);var m=e.accepts[r],p={},_=function(t,e){p[t.toLowerCase()]=[t,e]},v=/^([\w-]+:)\/\//.test(e.url)?RegExp.$1:window.location.protocol,y=e.xhr(),L=y.setRequestHeader,w;if(n&&n.promise(y),e.crossDomain||_("X-Requested-With","XMLHttpRequest"),_("Accept",m||"*/*"),(m=e.mimeType||m)&&(m.indexOf(",")>-1&&(m=m.split(",",2)[0]),y.overrideMimeType&&y.overrideMimeType(m)),(e.contentType||e.contentType!==!1&&e.data&&"GET"!=e.type.toUpperCase())&&_("Content-Type",e.contentType||"application/x-www-form-urlencoded"),e.headers)for(g in e.headers)_(g,e.headers[g]);if(y.setRequestHeader=_,y.onreadystatechange=function(){if(4==y.readyState){y.onreadystatechange=h,clearTimeout(w);var t,i=!1;if(y.status>=200&&y.status<300||304==y.status||0==y.status&&"file:"==v){r=r||l(e.mimeType||y.getResponseHeader("content-type")),t=y.responseText;try{"script"==r?(1,eval)(t):"xml"==r?t=y.responseXML:"json"==r&&(t=b.test(t)?null:$.parseJSON(t))}catch(o){i=o}i?a(i,"parsererror",y,e,n):s(t,y,e,n)}else a(y.statusText||null,y.status?"error":"abort",y,e,n)}},o(y,e)===!1)return y.abort(),a(null,"abort",y,e,n),y;if(e.xhrFields)for(g in e.xhrFields)y[g]=e.xhrFields[g];var x="async"in e?e.async:!0;y.open(e.type,e.url,x,e.username,e.password);for(g in p)L.apply(y,p[g]);return e.timeout>0&&(w=setTimeout(function(){y.onreadystatechange=h,y.abort(),a(null,"timeout",y,e,n)},e.timeout)),y.send(e.data?e.data:null),y},$.get=function(t,e,i,n){return $.ajax(d.apply(null,arguments))},$.post=function(t,e,i,n){var o=d.apply(null,arguments);return o.type="POST",$.ajax(o)},$.getJSON=function(t,e,i){var n=d.apply(null,arguments);return n.dataType="json",$.ajax(n)},$.fn.load=function(t,e,i){if(!this.length)return this;var n=this,o=t.split(/\s/),s,a=d(t,e,i),r=a.success;return o.length>1&&(a.url=o[0],s=o[1]),a.success=function(t){n.html(s?$("<div>").html(t.replace(v,"")).find(s):t),r&&r.apply(n,arguments)},$.ajax(a),this};var C=encodeURIComponent;$.param=function(t,e){var i=[];return i.add=function(t,e){this.push(C(t)+"="+C(e))},m(i,t,e),i.join("&").replace(/%20/g,"+")}}(e),function($){$.fn.serializeArray=function(){var t=[],e;return $([].slice.call(this.get(0).elements)).each(function(){e=$(this);var i=e.attr("type");"fieldset"!=this.nodeName.toLowerCase()&&!this.disabled&&"submit"!=i&&"reset"!=i&&"button"!=i&&("radio"!=i&&"checkbox"!=i||this.checked)&&t.push({name:e.attr("name"),value:e.val()})}),t},$.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},$.fn.submit=function(t){if(t)this.bind("submit",t);else if(this.length){var e=$.Event("submit");this.eq(0).trigger(e),e.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function($){"__proto__"in{}||$.extend($.zepto,{Z:function(t,e){return t=t||[],$.extend(t,$.fn),t.selector=e||"",t.__Z=!0,t},isZ:function(t){return"array"===$.type(t)&&"__Z"in t}});try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t){try{return e(t)}catch(i){return null}}}}(e),t.getJSON=e.getJSON,t.ajax=e.ajax}(VCO),VCO.Class=function(){},VCO.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments)},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=e,e.prototype=n,e.superclass=this.prototype;for(var o in this)this.hasOwnProperty(o)&&"prototype"!==o&&"superclass"!==o&&(e[o]=this[o]);return t.statics&&(VCO.Util.extend(e,t.statics),delete t.statics),t.includes&&(VCO.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=VCO.Util.extend({},n.options,t.options)),VCO.Util.extend(n,t),e.extend=VCO.Class.extend,e.include=function(t){VCO.Util.extend(this.prototype,t)},e},VCO.Events={addEventListener:function(t,e,i){var n=this._vco_events=this._vco_events||{};return n[t]=n[t]||[],n[t].push({action:e,context:i||this}),this},hasEventListeners:function(t){var e="_vco_events";return e in this&&t in this[e]&&this[e][t].length>0},removeEventListener:function(t,e,i){if(!this.hasEventListeners(t))return this;for(var n=0,o=this._vco_events,s=o[t].length;s>n;n++)if(o[t][n].action===e&&(!i||o[t][n].context===i))return o[t].splice(n,1),this;return this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;for(var i=VCO.Util.extend({type:t,target:this},e),n=this._vco_events[t].slice(),o=0,s=n.length;s>o;o++)n[o].action.call(n[o].context||this,i);return this}},VCO.Events.on=VCO.Events.addEventListener,VCO.Events.off=VCO.Events.removeEventListener,VCO.Events.fire=VCO.Events.fireEvent,function(){var t=navigator.userAgent.toLowerCase(),e=document.documentElement,i="ActiveXObject"in window,n=-1!==t.indexOf("webkit"),o=-1!==t.indexOf("phantom"),s=-1!==t.search("android [23]"),a="undefined"!=typeof orientation,r=navigator.msPointerEnabled&&navigator.msMaxTouchPoints&&!window.PointerEvent,h=window.PointerEvent&&navigator.pointerEnabled&&navigator.maxTouchPoints||r,l=i&&"transition"in e.style,c="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!s,u="MozPerspective"in e.style,d="OTransition"in e.style,m=window.opera,p="devicePixelRatio"in window&&window.devicePixelRatio>1;if(!p&&"matchMedia"in window){var _=window.matchMedia("(min-resolution:144dpi)");p=_&&_.matches}var f=!window.L_NO_TOUCH&&!o&&(h||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);VCO.Browser={ie:i,ielt9:i&&!document.addEventListener,webkit:n,firefox:-1!==t.indexOf("gecko")&&!n&&!window.opera&&!i,android:-1!==t.indexOf("android"),android23:s,chrome:-1!==t.indexOf("chrome"),ie3d:l,webkit3d:c,gecko3d:u,opera3d:d,any3d:!window.L_DISABLE_3D&&(l||c||u||d)&&!o,mobile:a,mobileWebkit:a&&n,mobileWebkit3d:a&&c,mobileOpera:a&&window.opera,touch:!!f,msPointer:!!r,pointer:!!h,retina:!!p,orientation:function(){var t=window.innerWidth,e=window.innerHeight,i="portrait";return t>e&&(i="landscape"),90==Math.abs(window.orientation),trace(i),i}}}(),VCO.Load=function(t){function e(t){var e=0,n=!1;for(e=0;e<i.length;e++)i[e]==t&&(n=!0);return n?!0:(i.push(t),!1)}var i=[];return{css:function(t,i,n,o){e(t)?i():VCO.LoadIt.css(t,i,n,o)},js:function(t,i,n,o){e(t)?i():VCO.LoadIt.js(t,i,n,o)}}}(this.document),VCO.LoadIt=function(t){function e(e,i){var n=t.createElement(e),o;for(o in i)i.hasOwnProperty(o)&&n.setAttribute(o,i[o]);return n}function i(t){var e=l[t],i,n;e&&(i=e.callback,n=e.urls,n.shift(),c=0,n.length||(i&&i.call(e.context,e.obj),l[t]=null,u[t].length&&o(t)))}function n(){var e=navigator.userAgent;r={async:t.createElement("script").async===!0},(r.webkit=/AppleWebKit\//.test(e))||(r.ie=/MSIE/.test(e))||(r.opera=/Opera/.test(e))||(r.gecko=/Gecko\//.test(e))||(r.unknown=!0)}function o(o,c,d,m,p){var _=function(){i(o)
},f="css"===o,g=[],v,y,L,w,x,b;if(r||n(),c)if(c="string"==typeof c?[c]:c.concat(),f||r.async||r.gecko||r.opera)u[o].push({urls:c,callback:d,obj:m,context:p});else for(v=0,y=c.length;y>v;++v)u[o].push({urls:[c[v]],callback:v===y-1?d:null,obj:m,context:p});if(!l[o]&&(w=l[o]=u[o].shift())){for(h||(h=t.head||t.getElementsByTagName("head")[0]),x=w.urls,v=0,y=x.length;y>v;++v)b=x[v],f?L=r.gecko?e("style"):e("link",{href:b,rel:"stylesheet"}):(L=e("script",{src:b}),L.async=!1),L.className="lazyload",L.setAttribute("charset","utf-8"),r.ie&&!f?L.onreadystatechange=function(){/loaded|complete/.test(L.readyState)&&(L.onreadystatechange=null,_())}:f&&(r.gecko||r.webkit)?r.webkit?(w.urls[v]=L.href,a()):(L.innerHTML='@import "'+b+'";',s(L)):L.onload=L.onerror=_,g.push(L);for(v=0,y=g.length;y>v;++v)h.appendChild(g[v])}}function s(t){var e;try{e=!!t.sheet.cssRules}catch(n){return c+=1,void(200>c?setTimeout(function(){s(t)},50):e&&i("css"))}i("css")}function a(){var t=l.css,e;if(t){for(e=d.length;--e>=0;)if(d[e].href===t.urls[0]){i("css");break}c+=1,t&&(200>c?setTimeout(a,50):i("css"))}}var r,h,l={},c=0,u={css:[],js:[]},d=t.styleSheets;return{css:function(t,e,i,n){o("css",t,e,i,n)},js:function(t,e,i,n){o("js",t,e,i,n)}}}(this.document),VCO.Language={name:"English",lang:"en",messages:{loading:"Loading",wikipedia:"From Wikipedia, the free encyclopedia",start:"Start Exploring"},buttons:{map_overview:"Map Overview",overview:"Overview",backtostart:"Back To Beginning",collapse_toggle:"Hide Map",uncollapse_toggle:"Show Map"}},VCO.Emoji=function(t){var e={"😄":0,"😃":1,"😀":2,"😊":3,"☺️":4,"😉":5,"😍":6,"😘":7,"😚":8,"😗":9,"😙":10,"😜":11,"😝":12,"😛":13,"😳":14,"😁":15,"😔":16,"😌":17,"😒":18,"😞":19,"😣":20,"😢":21,"😂":22,"😭":23,"😪":24,"😥":25,"😰":26,"😅":27,"😓":28,"😩":29,"😫":30,"😨":31,"😱":32,"😠":33,"😡":34,"😤":35,"😖":36,"😆":37,"😋":38,"😷":39,"😎":40,"😴":41,"😵":42,"😲":43,"😟":44,"😦":45,"😧":46,"😈":47,"👿":48,"😮":49,"😬":50,"😐":51,"😕":52,"😯":53,"😶":54,"😇":55,"😏":56,"😑":57,"👲":58,"👳":59,"👮":60,"👷":61,"💂":62,"👶":63,"👦":64,"👧":65,"👨":66,"👩":67,"👴":68,"👵":69,"👱":70,"👼":71,"👸":72,"😺":73,"😸":74,"😻":75,"😽":76,"😼":77,"🙀":78,"😿":79,"😹":80,"😾":81,"👹":82,"👺":83,"🙈":84,"🙉":85,"🙊":86,"💀":87,"👽":88,"💩":89,"🔥":90,"✨":91,"🌟":92,"💫":93,"💥":94,"💢":95,"💦":96,"💧":97,"💤":98,"💨":99,"👂":100,"👀":101,"👃":102,"👅":103,"👄":104,"👍":105,"👎":106,"👌":107,"👊":108,"✊":109,"✌️":110,"👋":111,"✋":112,"👐":113,"👆":114,"👇":115,"👉":116,"👈":117,"🙌":118,"🙏":119,"☝️":120,"👏":121,"💪":122,"🚶":123,"🏃":124,"💃":125,"👫":126,"👪":127,"👬":128,"👭":129,"💏":130,"💑":131,"👯":132,"🙆":133,"🙅":134,"💁":135,"🙋":136,"💆":137,"💇":138,"💅":139,"👰":140,"🙎":141,"🙍":142,"🙇":143,"🎩":144,"👑":145,"👒":146,"👟":147,"👞":148,"👡":149,"👠":150,"👢":151,"👕":152,"👔":153,"👚":154,"👗":155,"🎽":156,"👖":157,"👘":158,"👙":159,"💼":160,"👜":161,"👝":162,"👛":163,"👓":164,"🎀":165,"🌂":166,"💄":167,"💛":168,"💙":169,"💜":170,"💚":171,"❤️":172,"💔":173,"💗":174,"💓":175,"💕":176,"💖":177,"💞":178,"💘":179,"💌":180,"💋":181,"💍":182,"💎":183,"👤":184,"👥":185,"💬":186,"👣":187,"💭":188,"🐶":189,"🐺":190,"🐱":191,"🐭":192,"🐹":193,"🐰":194,"🐸":195,"🐯":196,"🐨":197,"🐻":198,"🐷":199,"🐽":200,"🐮":201,"🐗":202,"🐵":203,"🐒":204,"🐴":205,"🐑":206,"🐘":207,"🐼":208,"🐧":209,"🐦":210,"🐤":211,"🐥":212,"🐣":213,"🐔":214,"🐍":215,"🐢":216,"🐛":217,"🐝":218,"🐜":219,"🐞":220,"🐌":221,"🐙":222,"🐚":223,"🐠":224,"🐟":225,"🐬":226,"🐳":227,"🐋":228,"🐄":229,"🐏":230,"🐀":231,"🐃":232,"🐅":233,"🐇":234,"🐉":235,"🐎":236,"🐐":237,"🐓":238,"🐕":239,"🐖":240,"🐁":241,"🐂":242,"🐲":243,"🐡":244,"🐊":245,"🐫":246,"🐪":247,"🐆":248,"🐈":249,"🐩":250,"🐾":251,"💐":252,"🌸":253,"🌷":254,"🍀":255,"🌹":256,"🌻":257,"🌺":258,"🍁":259,"🍃":260,"🍂":261,"🌿":262,"🌾":263,"🍄":264,"🌵":265,"🌴":266,"🌲":267,"🌳":268,"🌰":269,"🌱":270,"🌼":271,"🌐":272,"🌞":273,"🌝":274,"🌚":275,"🌑":276,"🌒":277,"🌓":278,"🌔":279,"🌕":280,"🌖":281,"🌗":282,"🌘":283,"🌜":284,"🌛":285,"🌙":286,"🌍":287,"🌎":288,"🌏":289,"🌋":290,"🌌":291,"🌠":292,"⭐️":293,"☀️":294,"⛅️":295,"☁️":296,"⚡️":297,"☔️":298,"❄️":299,"⛄️":300,"🌀":301,"🌁":302,"🌈":303,"🌊":304,"🎍":305,"💝":306,"🎎":307,"🎒":308,"🎓":309,"🎏":310,"🎆":311,"🎇":312,"🎐":313,"🎑":314,"🎃":315,"👻":316,"🎅":317,"🎄":318,"🎁":319,"🎋":320,"🎉":321,"🎊":322,"🎈":323,"🎌":324,"🔮":325,"🎥":326,"📷":327,"📹":328,"📼":329,"💿":330,"📀":331,"💽":332,"💾":333,"💻":334,"📱":335,"☎️":336,"📞":337,"📟":338,"📠":339,"📡":340,"📺":341,"📻":342,"🔊":343,"🔉":344,"🔈":345,"🔇":346,"🔔":347,"🔕":348,"📢":349,"📣":350,"⏳":351,"⌛️":352,"⏰":353,"⌚️":354,"🔓":355,"🔒":356,"🔏":357,"🔐":358,"🔑":359,"🔎":360,"💡":361,"🔦":362,"🔆":363,"🔅":364,"🔌":365,"🔋":366,"🔍":367,"🛁":368,"🛀":369,"🚿":370,"🚽":371,"🔧":372,"🔩":373,"🔨":374,"🚪":375,"🚬":376,"💣":377,"🔫":378,"🔪":379,"💊":380,"💉":381,"💰":382,"💴":383,"💵":384,"💷":385,"💶":386,"💳":387,"💸":388,"📲":389,"📧":390,"📥":391,"📤":392,"✉️":393,"📩":394,"📨":395,"📯":396,"📫":397,"📪":398,"📬":399,"📭":400,"📮":401,"📦":402,"📝":403,"📄":404,"📃":405,"📑":406,"📊":407,"📈":408,"📉":409,"📜":410,"📋":411,"📅":412,"📆":413,"📇":414,"📁":415,"📂":416,"✂️":417,"📌":418,"📎":419,"✒️":420,"✏️":421,"📏":422,"📐":423,"📕":424,"📗":425,"📘":426,"📙":427,"📓":428,"📔":429,"📒":430,"📚":431,"📖":432,"🔖":433,"📛":434,"🔬":435,"🔭":436,"📰":437,"🎨":438,"🎬":439,"🎤":440,"🎧":441,"🎼":442,"🎵":443,"🎶":444,"🎹":445,"🎻":446,"🎺":447,"🎷":448,"🎸":449,"👾":450,"🎮":451,"🃏":452,"🎴":453,"🀄️":454,"🎲":455,"🎯":456,"🏈":457,"🏀":458,"⚽️":459,"⚾️":460,"🎾":461,"🎱":462,"🏉":463,"🎳":464,"⛳️":465,"🚵":466,"🚴":467,"🏁":468,"🏇":469,"🏆":470,"🎿":471,"🏂":472,"🏊":473,"🏄":474,"🎣":475,"☕️":476,"🍵":477,"🍶":478,"🍼":479,"🍺":480,"🍻":481,"🍸":482,"🍹":483,"🍷":484,"🍴":485,"🍕":486,"🍔":487,"🍟":488,"🍗":489,"🍖":490,"🍝":491,"🍛":492,"🍤":493,"🍱":494,"🍣":495,"🍥":496,"🍙":497,"🍘":498,"🍚":499,"🍜":500,"🍲":501,"🍢":502,"🍡":503,"🍳":504,"🍞":505,"🍩":506,"🍮":507,"🍦":508,"🍨":509,"🍧":510,"🎂":511,"🍰":512,"🍪":513,"🍫":514,"🍬":515,"🍭":516,"🍯":517,"🍎":518,"🍏":519,"🍊":520,"🍋":521,"🍒":522,"🍇":523,"🍉":524,"🍓":525,"🍑":526,"🍈":527,"🍌":528,"🍐":529,"🍍":530,"🍠":531,"🍆":532,"🍅":533,"🌽":534,"🏠":535,"🏡":536,"🏫":537,"🏢":538,"🏣":539,"🏥":540,"🏦":541,"🏪":542,"🏩":543,"🏨":544,"💒":545,"⛪️":546,"🏬":547,"🏤":548,"🌇":549,"🌆":550,"🏯":551,"🏰":552,"⛺️":553,"🏭":554,"🗼":555,"🗾":556,"🗻":557,"🌄":558,"🌅":559,"🌃":560,"🗽":561,"🌉":562,"🎠":563,"🎡":564,"⛲️":565,"🎢":566,"🚢":567,"⛵️":568,"🚤":569,"🚣":570,"⚓️":571,"🚀":572,"✈️":573,"💺":574,"🚁":575,"🚂":576,"🚊":577,"🚉":578,"🚞":579,"🚆":580,"🚄":581,"🚅":582,"🚈":583,"🚇":584,"🚝":585,"🚋":586,"🚃":587,"🚎":588,"🚌":589,"🚍":590,"🚙":591,"🚘":592,"🚗":593,"🚕":594,"🚖":595,"🚛":596,"🚚":597,"🚨":598,"🚓":599,"🚔":600,"🚒":601,"🚑":602,"🚐":603,"🚲":604,"🚡":605,"🚟":606,"🚠":607,"🚜":608,"💈":609,"🚏":610,"🎫":611,"🚦":612,"🚥":613,"⚠️":614,"🚧":615,"🔰":616,"⛽️":617,"🏮":618,"🎰":619,"♨️":620,"🗿":621,"🎪":622,"🎭":623,"📍":624,"🚩":625,"🇯🇵":626,"🇰🇷":627,"🇩🇪":628,"🇨🇳":629,"🇺🇸":630,"🇫🇷":631,"🇪🇸":632,"🇮🇹":633,"🇷🇺":634,"🇬🇧":635,"1⃣":636,"2⃣":637,"3⃣":638,"4⃣":639,"5⃣":640,"6⃣":641,"7⃣":642,"8⃣":643,"9⃣":644,"0⃣":645,"🔟":646,"🔢":647,"#⃣":648,"🔣":649,"⬆️":650,"⬇️":651,"⬅️":652,"➡️":653,"🔠":654,"🔡":655,"🔤":656,"↗️":657,"↖️":658,"↘️":659,"↙️":660,"↔️":661,"↕️":662,"🔄":663,"◀️":664,"▶️":665,"🔼":666,"🔽":667,"↩️":668,"↪️":669,"ℹ️":670,"⏪":671,"⏩":672,"⏫":673,"⏬":674,"⤵️":675,"⤴️":676,"🆗":677,"🔀":678,"🔁":679,"🔂":680,"🆕":681,"🆙":682,"🆒":683,"🆓":684,"🆖":685,"📶":686,"🎦":687,"🈁":688,"🈯️":689,"🈳":690,"🈵":691,"🈴":692,"🈲":693,"🉐":694,"🈹":695,"🈺":696,"🈶":697,"🈚️":698,"🚻":699,"🚹":700,"🚺":701,"🚼":702,"🚾":703,"🚰":704,"🚮":705,"🅿️":706,"♿️":707,"🚭":708,"🈷":709,"🈸":710,"🈂":711,"Ⓜ️":712,"🛂":713,"🛄":714,"🛅":715,"🛃":716,"🉑":717,"㊙️":718,"㊗️":719,"🆑":720,"🆘":721,"🆔":722,"🚫":723,"🔞":724,"📵":725,"🚯":726,"🚱":727,"🚳":728,"🚷":729,"🚸":730,"⛔️":731,"✳️":732,"❇️":733,"❎":734,"✅":735,"✴️":736,"💟":737,"🆚":738,"📳":739,"📴":740,"🅰":741,"🅱":742,"🆎":743,"🅾":744,"💠":745,"➿":746,"♻️":747,"♈️":748,"♉️":749,"♊️":750,"♋️":751,"♌️":752,"♍️":753,"♎️":754,"♏️":755,"♐️":756,"♑️":757,"♒️":758,"♓️":759,"⛎":760,"🔯":761,"🏧":762,"💹":763,"💲":764,"💱":765,"©":766,"®":767,"™":768,"❌":769,"‼️":770,"⁉️":771,"❗️":772,"❓":773,"❕":774,"❔":775,"⭕️":776,"🔝":777,"🔚":778,"🔙":779,"🔛":780,"🔜":781,"🔃":782,"🕛":783,"🕧":784,"🕐":785,"🕜":786,"🕑":787,"🕝":788,"🕒":789,"🕞":790,"🕓":791,"🕟":792,"🕔":793,"🕠":794,"🕕":795,"🕖":796,"🕗":797,"🕘":798,"🕙":799,"🕚":800,"🕡":801,"🕢":802,"🕣":803,"🕤":804,"🕥":805,"🕦":806,"✖️":807,"➕":808,"➖":809,"➗":810,"♠️":811,"♥️":812,"♣️":813,"♦️":814,"💮":815,"💯":816,"✔️":817,"☑️":818,"🔘":819,"🔗":820,"➰":821,"〰":822,"〽️":823,"🔱":824,"◼️":825,"◻️":826,"◾️":827,"◽️":828,"▪️":829,"▫️":830,"🔺":831,"🔲":832,"🔳":833,"⚫️":834,"⚪️":835,"🔴":836,"🔵":837,"🔻":838,"⬜️":839,"⬛️":840,"🔶":841,"🔷":842,"🔸":843,"🔹":844,"☺":4,"✌":110,"☝":120,"❤":172,"⭐":293,"☀":294,"⛅":295,"☁":296,"⚡":297,"☔":298,"❄":299,"⛄":300,"☎":336,"⌛":352,"⌚":354,"✉":393,"✂":417,"✒":420,"✏":421,"🀄":454,"⚽":459,"⚾":460,"⛳":465,"☕":476,"⛪":546,"⛺":553,"⛲":565,"⛵":568,"⚓":571,"✈":573,"⚠":614,"⛽":617,"♨":620,"⬆":650,"⬇":651,"⬅":652,"➡":653,"↗":657,"↖":658,"↘":659,"↙":660,"↔":661,"↕":662,"◀":664,"▶":665,"↩":668,"↪":669,"ℹ":670,"⤵":675,"⤴":676,"🈯":689,"🈚":698,"🅿":706,"♿":707,"Ⓜ":712,"㊙":718,"㊗":719,"⛔":731,"✳":732,"❇":733,"✴":736,"♻":747,"♈":748,"♉":749,"♊":750,"♋":751,"♌":752,"♍":753,"♎":754,"♏":755,"♐":756,"♑":757,"♒":758,"♓":759,"‼":770,"⁉":771,"❗":772,"⭕":776,"✖":807,"♠":811,"♥":812,"♣":813,"♦":814,"✔":817,"☑":818,"〽":823,"◼":825,"◻":826,"◾":827,"◽":828,"▪":829,"▫":830,"⚫":834,"⚪":835,"⬜":839,"⬛":840},i=[];for(var n in e)i.push(n);var o=new RegExp("("+i.join("|")+")","g");return i=null,t.replace(o,function(t,i){return'<span class="vco-emoji emj'+e[i]+'"></span>'})},VCO.Easings={ease:[.25,.1,.25,1],linear:[0,0,1,1],easein:[.42,0,1,1],easeout:[0,0,.58,1],easeinout:[.42,0,.58,1]},VCO.Ease={KeySpline:function(t){function e(t,e){return 1-3*e+3*t}function i(t,e){return 3*e-6*t}function n(t){return 3*t}function o(t,o,s){return((e(o,s)*t+i(o,s))*t+n(o))*t}function s(t,o,s){return 3*e(o,s)*t*t+2*i(o,s)*t+n(o)}function a(e){for(var i=e,n=0;4>n;++n){var a=s(i,t[0],t[2]);if(0==a)return i;var r=o(i,t[0],t[2])-e;i-=r/a}return i}this.get=function(e){return t[0]==t[1]&&t[2]==t[3]?e:o(a(e),t[1],t[3])}},easeInSpline:function(t){var e=new VCO.Ease.KeySpline(VCO.Easings.easein);return e.get(t)},easeInOutExpo:function(t){var e=new VCO.Ease.KeySpline(VCO.Easings.easein);return e.get(t)},easeOut:function(t){return Math.sin(t*Math.PI/2)},easeOutStrong:function(t){return 1==t?1:1-Math.pow(2,-10*t)},easeIn:function(t){return t*t},easeInStrong:function(t){return 0==t?0:Math.pow(2,10*(t-1))},easeOutBounce:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},bounce:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bouncePast:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?2-(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},swingTo:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},swingFrom:function(t){var e=1.70158;return t*t*((e+1)*t-e)},elastic:function(t){return-1*Math.pow(4,-8*t)*Math.sin(2*(6*t-1)*Math.PI/2)+1},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)},blink:function(t,e){return Math.round(t*(e||5))%2},pulse:function(t,e){return-Math.cos(t*((e||5)-.5)*2*Math.PI)/2+.5},wobble:function(t){return-Math.cos(t*Math.PI*9*t)/2+.5},sinusoidal:function(t){return-Math.cos(t*Math.PI)/2+.5},flicker:function(t){var t=t+(Math.random()-.5)/5;return easings.sinusoidal(0>t?0:t>1?1:t)},mirror:function(t){return easings.sinusoidal(.5>t?2*t:1-2*(t-.5))},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return.5>t?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return.5>t?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return.5>t?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return.5>t?16*t*t*t*t*t:1+16*--t*t*t*t*t}},VCO.Animate=function(t,e){var i=new vcoanimate(t,e),n;return i},window.vcoanimate=function(){function t(t,e,i){if(Array.prototype.indexOf)return t.indexOf(e);for(i=0;i<t.length;++i)if(t[i]===e)return i}function e(t){var i,n=I.length;for(L&&t>1e12&&(t=w()),b&&(t=w()),i=n;i--;)I[i](t);I.length&&B(e)}function i(t){1===I.push(t)&&B(e)}function n(e){var i,n=t(I,e);n>=0&&(i=I.slice(n+1),I.length=n,I=I.concat(i))}function o(t,e){var i={},n;return(n=t.match(D))&&(i.rotate=_(n[1],e?e.rotate:null)),(n=t.match(k))&&(i.scale=_(n[1],e?e.scale:null)),(n=t.match(P))&&(i.skewx=_(n[1],e?e.skewx:null),i.skewy=_(n[3],e?e.skewy:null)),(n=t.match(E))&&(i.translatex=_(n[1],e?e.translatex:null),i.translatey=_(n[3],e?e.translatey:null)),i}function s(t){var e="";return"rotate"in t&&(e+="rotate("+t.rotate+"deg) "),"scale"in t&&(e+="scale("+t.scale+") "),"translatex"in t&&(e+="translate("+t.translatex+"px,"+t.translatey+"px) "),"skewx"in t&&(e+="skew("+t.skewx+"deg,"+t.skewy+"deg)"),e}function a(t,e,i){return"#"+(1<<24|t<<16|e<<8|i).toString(16).slice(1)}function r(t){var e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);return(e?a(e[1],e[2],e[3]):t).replace(/#(\w)(\w)(\w)$/,"#$1$1$2$2$3$3")}function h(t){return t.replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function l(t){return"function"==typeof t}function c(t){return Math.sin(t*Math.PI/2)}function u(t,e,o,s,a,r){function h(t){var i=t-p;return i>u||_?(r=isFinite(r)?r:1,_?g&&e(r):e(r),n(h),o&&o.apply(d)):void e(isFinite(r)?m*s(i/u)+a:s(i/u))}s=l(s)?s:f.easings[s]||c;var u=t||C,d=this,m=r-a,p=w(),_=0,g=0;return i(h),{stop:function(t){_=1,g=t,t||(o=null)}}}function d(t,e){var i=t.length,n=[],o,s;for(o=0;i>o;++o)n[o]=[t[o][0],t[o][1]];for(s=1;i>s;++s)for(o=0;i-s>o;++o)n[o][0]=(1-e)*n[o][0]+e*n[parseInt(o+1,10)][0],n[o][1]=(1-e)*n[o][1]+e*n[parseInt(o+1,10)][1];return[n[0][0],n[0][1]]}function m(t,e,i){var n=[],o,s,a,r;for(o=0;6>o;o++)a=Math.min(15,parseInt(e.charAt(o),16)),r=Math.min(15,parseInt(i.charAt(o),16)),s=Math.floor((r-a)*t+a),s=s>15?15:0>s?0:s,n[o]=s.toString(16);return"#"+n.join("")}function p(t,e,i,n,o,s,a){if("transform"==o){a={};for(var r in i[s][o])a[r]=r in n[s][o]?Math.round(((n[s][o][r]-i[s][o][r])*t+i[s][o][r])*C)/C:i[s][o][r];return a}return"string"==typeof i[s][o]?m(t,i[s][o],n[s][o]):(a=Math.round(((n[s][o]-i[s][o])*t+i[s][o])*C)/C,o in S||(a+=e[s][o]||"px"),a)}function _(t,e,i,n,o){return(i=O.exec(t))?(o=parseFloat(i[2]))&&e+("+"==i[1]?1:-1)*o:parseFloat(t)}function f(t,e){var i=t?i=isFinite(t.length)?t:[t]:[],n,a=e.complete,c=e.duration,m=e.easing,f=e.bezier,g=[],v=[],y=[],L=[],w,x;for(f&&(w=e.left,x=e.top,delete e.right,delete e.bottom,delete e.left,delete e.top),n=i.length;n--;){if(g[n]={},v[n]={},y[n]={},f){var b=A(i[n],"left"),C=A(i[n],"top"),O=[_(l(w)?w(i[n]):w||0,parseFloat(b)),_(l(x)?x(i[n]):x||0,parseFloat(C))];L[n]=l(f)?f(i[n],O):f,L[n].push(O),L[n].unshift([parseInt(b,10),parseInt(C,10)])}for(var D in e){switch(D){case"complete":case"duration":case"easing":case"bezier":continue}var k=A(i[n],D),P,E=l(e[D])?e[D](i[n]):e[D];"string"!=typeof E||!M.test(E)||M.test(k)?(g[n][D]="transform"==D?o(k):"string"==typeof E&&M.test(E)?r(k).slice(1):parseFloat(k),v[n][D]="transform"==D?o(E,g[n][D]):"string"==typeof E&&"#"==E.charAt(0)?r(E).slice(1):_(E,parseFloat(k)),"string"==typeof E&&(P=E.match(T))&&(y[n][D]=P[1])):delete e[D]}}return u.apply(i,[c,function(t,o,a){for(n=i.length;n--;){f&&(a=d(L[n],t),i[n].style.left=a[0]+"px",i[n].style.top=a[1]+"px");for(var r in e)o=p(t,y,g,v,r,n),"transform"==r?i[n].style[V]=s(o):"opacity"!=r||z?i[n].style[h(r)]=o:i[n].style.filter="alpha(opacity="+100*o+")"}},a,m])}var g=document,v=window,y=v.performance,L=y&&(y.now||y.webkitNow||y.msNow||y.mozNow),w=L?function(){return L.call(y)}:function(){return+new Date},x=g.documentElement,b=!1,C=1e3,M=/^rgb\(|#/,O=/^([+\-])=([\d\.]+)/,T=/^(?:[\+\-]=?)?\d+(?:\.\d+)?(%|in|cm|mm|em|ex|pt|pc|px)$/,D=/rotate\(((?:[+\-]=)?([\-\d\.]+))deg\)/,k=/scale\(((?:[+\-]=)?([\d\.]+))\)/,P=/skew\(((?:[+\-]=)?([\-\d\.]+))deg, ?((?:[+\-]=)?([\-\d\.]+))deg\)/,E=/translate\(((?:[+\-]=)?([\-\d\.]+))px, ?((?:[+\-]=)?([\-\d\.]+))px\)/,S={lineHeight:1,zoom:1,zIndex:1,opacity:1,transform:1},V=function(){var t=g.createElement("a").style,e=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],i;for(i=0;i<e.length;i++)if(e[i]in t)return e[i]}(),z=function(){return"undefined"!=typeof g.createElement("a").style.opacity}(),A=g.defaultView&&g.defaultView.getComputedStyle?function(t,e){e="transform"==e?V:e,e=h(e);var i=null,n=g.defaultView.getComputedStyle(t,"");return n&&(i=n[e]),t.style[e]||i}:x.currentStyle?function(t,e){if(e=h(e),"opacity"==e){var i=100;try{i=t.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(n){try{i=t.filters("alpha").opacity}catch(o){}}return i/100}var s=t.currentStyle?t.currentStyle[e]:null;return t.style[e]||s}:function(t,e){return t.style[h(e)]},B=function(){return v.requestAnimationFrame||v.webkitRequestAnimationFrame||v.mozRequestAnimationFrame||v.msRequestAnimationFrame||v.oRequestAnimationFrame||function(t){v.setTimeout(function(){t(+new Date)},17)}}(),I=[];return B(function(t){b=t>1e12!=w()>1e12}),f.tween=u,f.getStyle=A,f.bezier=d,f.transform=V,f.parseTransform=o,f.formatTransform=s,f.easings={},f}(),VCO.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},VCO.Point.prototype={add:function(t){return this.clone()._add(t)},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(t)},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t,e){return new VCO.Point(this.x/t,this.y/t,e)},multiplyBy:function(t){return new VCO.Point(this.x*t,this.y*t)},distanceTo:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},clone:function(){return new VCO.Point(this.x,this.y)},toString:function(){return"Point("+VCO.Util.formatNum(this.x)+", "+VCO.Util.formatNum(this.y)+")"}},VCO.DomMixins={show:function(t){t||(this._el.container.style.display="block")},hide:function(t){this._el.container.style.display="none"},addTo:function(t){t.appendChild(this._el.container),this.onAdd()},removeFrom:function(t){t.removeChild(this._el.container),this.onRemove()},animatePosition:function(t,e,i){var n={duration:this.options.duration,easing:this.options.ease};for(var o in t)t.hasOwnProperty(o)&&(n[o]=i?t[o]+"%":t[o]+"px");this.animator&&this.animator.stop(),this.animator=VCO.Animate(e,n)},onLoaded:function(){this.fire("loaded",this.data)},onAdd:function(){this.fire("added",this.data)},onRemove:function(){this.fire("removed",this.data)},setPosition:function(t,e){for(var i in t)t.hasOwnProperty(i)&&(e?e.style[i]=t[i]+"px":this._el.container.style[i]=t[i]+"px")},getPosition:function(){return VCO.Dom.getPosition(this._el.container)}},VCO.Dom={get:function(t){return"string"==typeof t?document.getElementById(t):t},getByClass:function(t){return t?document.getElementsByClassName(t):void 0},create:function(t,e,i){var n=document.createElement(t);return n.className=e,i&&i.appendChild(n),n},createText:function(t,e){var i=document.createTextNode(t);return e&&e.appendChild(i),i},getTranslateString:function(t){return VCO.Dom.TRANSLATE_OPEN+t.x+"px,"+t.y+"px"+VCO.Dom.TRANSLATE_CLOSE},setPosition:function(t,e){t._vco_pos=e,VCO.Browser.webkit3d?(t.style[VCO.Dom.TRANSFORM]=VCO.Dom.getTranslateString(e),VCO.Browser.android&&(t.style["-webkit-perspective"]="1000",t.style["-webkit-backface-visibility"]="hidden")):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){for(var e={x:0,y:0};t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)e.x+=t.offsetLeft,e.y+=t.offsetTop,t=t.offsetParent;return e},testProp:function(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}},VCO.Util.extend(VCO.Dom,{TRANSITION:VCO.Dom.testProp(["transition","webkitTransition","OTransition","MozTransition","msTransition"]),TRANSFORM:VCO.Dom.testProp(["transformProperty","WebkitTransform","OTransform","MozTransform","msTransform"]),TRANSLATE_OPEN:"translate"+(VCO.Browser.webkit3d?"3d(":"("),TRANSLATE_CLOSE:VCO.Browser.webkit3d?",0)":")"}),VCO.DomUtil={get:function(t){return"string"==typeof t?document.getElementById(t):t},getStyle:function(t,e){var i=t.style[e];if(!i&&t.currentStyle&&(i=t.currentStyle[e]),!i||"auto"===i){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i},getViewportOffset:function(t){var e=0,i=0,n=t,o=document.body;do{if(e+=n.offsetTop||0,i+=n.offsetLeft||0,n.offsetParent===o&&"absolute"===VCO.DomUtil.getStyle(n,"position"))break;n=n.offsetParent}while(n);n=t;do{if(n===o)break;e-=n.scrollTop||0,i-=n.scrollLeft||0,n=n.parentNode}while(n);return new VCO.Point(i,e)},create:function(t,e,i){var n=document.createElement(t);return n.className=e,i&&i.appendChild(n),n},disableTextSelection:function(){document.selection&&document.selection.empty&&document.selection.empty(),this._onselectstart||(this._onselectstart=document.onselectstart,document.onselectstart=VCO.Util.falseFn)},enableTextSelection:function(){document.onselectstart=this._onselectstart,this._onselectstart=null},hasClass:function(t,e){return t.className.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className)},addClass:function(t,e){VCO.DomUtil.hasClass(t,e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(t,e){t.className=t.className.replace(/(\S+)\s*/g,function(t,i){return i===e?"":t}).replace(/^\s+/,"")},setOpacity:function(t,e){VCO.Browser.ie?t.style.filter="alpha(opacity="+Math.round(100*e)+")":t.style.opacity=e},testProp:function(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1},getTranslateString:function(t){return VCO.DomUtil.TRANSLATE_OPEN+t.x+"px,"+t.y+"px"+VCO.DomUtil.TRANSLATE_CLOSE},getScaleString:function(t,e){var i=VCO.DomUtil.getTranslateString(e),n=" scale("+t+") ",o=VCO.DomUtil.getTranslateString(e.multiplyBy(-1));return i+n+o},setPosition:function(t,e){t._vco_pos=e,VCO.Browser.webkit3d?(t.style[VCO.DomUtil.TRANSFORM]=VCO.DomUtil.getTranslateString(e),VCO.Browser.android&&(t.style["-webkit-perspective"]="1000",t.style["-webkit-backface-visibility"]="hidden")):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._vco_pos}},VCO.DomEvent={addListener:function(t,e,i,n){var o=VCO.Util.stamp(i),s="_vco_"+e+o;if(!t[s]){var a=function(e){return i.call(n||t,e||VCO.DomEvent._getEvent())};if(VCO.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener)this.addDoubleTapListener(t,a,o);else if("addEventListener"in t)if("mousewheel"===e)t.addEventListener("DOMMouseScroll",a,!1),t.addEventListener(e,a,!1);else if("mouseenter"===e||"mouseleave"===e){var r=a,h="mouseenter"===e?"mouseover":"mouseout";a=function(e){return VCO.DomEvent._checkMouse(t,e)?r(e):void 0},t.addEventListener(h,a,!1)}else t.addEventListener(e,a,!1);else"attachEvent"in t&&t.attachEvent("on"+e,a);t[s]=a}},removeListener:function(t,e,i){var n=VCO.Util.stamp(i),o="_vco_"+e+n,s=t[o];s&&(VCO.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",s,!1),t.removeEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",s,!1):t.removeEventListener(e,s,!1):"detachEvent"in t&&t.detachEvent("on"+e,s),t[o]=null)},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var t=window.event;if(!t)for(var e=arguments.callee.caller;e&&(t=e.arguments[0],!t||window.Event!==t.constructor);)e=e.caller;return t},stopPropagation:function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},disableClickPropagation:function(t){VCO.DomEvent.addListener(t,VCO.Draggable.START,VCO.DomEvent.stopPropagation),VCO.DomEvent.addListener(t,"click",VCO.DomEvent.stopPropagation),VCO.DomEvent.addListener(t,"dblclick",VCO.DomEvent.stopPropagation)},preventDefault:function(t){t.preventDefault?t.preventDefault():t.returnValue=!1},stop:function(t){VCO.DomEvent.preventDefault(t),VCO.DomEvent.stopPropagation(t)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e}},VCO.Draggable=VCO.Class.extend({includes:VCO.Events,_el:{},mousedrag:{down:"mousedown",up:"mouseup",leave:"mouseleave",move:"mousemove"},touchdrag:{down:"touchstart",up:"touchend",leave:"mouseleave",move:"touchmove"},initialize:function(t,e,i){this._el={drag:t,move:t},i&&(this._el.move=i),this.options={enable:{x:!0,y:!0},constraint:{top:!1,bottom:!1,left:!1,right:!1},momentum_multiplier:2e3,duration:1e3,ease:VCO.Ease.easeInOutQuint},this.animator=null,this.dragevent=this.mousedrag,VCO.Browser.touch&&(this.dragevent=this.touchdrag),this.data={sliding:!1,direction:"none",pagex:{start:0,end:0},pagey:{start:0,end:0},pos:{start:{x:0,y:0},end:{x:0,y:0}},new_pos:{x:0,y:0},new_pos_parent:{x:0,y:0},time:{start:0,end:0},touch:!1},VCO.Util.mergeData(this.options,e)},enable:function(t){this.data.pos.start=0,this._el.move.style.left=this.data.pos.start.x+"px",this._el.move.style.top=this.data.pos.start.y+"px",this._el.move.style.position="absolute"},disable:function(){VCO.DomEvent.removeListener(this._el.drag,this.dragevent.down,this._onDragStart,this),VCO.DomEvent.removeListener(this._el.drag,this.dragevent.up,this._onDragEnd,this)},stopMomentum:function(){this.animator&&this.animator.stop()},updateConstraint:function(t){this.options.constraint=t},_onDragStart:function(t){VCO.Browser.touch?t.originalEvent?(this.data.pagex.start=t.originalEvent.touches[0].screenX,this.data.pagey.start=t.originalEvent.touches[0].screenY):(this.data.pagex.start=t.targetTouches[0].screenX,this.data.pagey.start=t.targetTouches[0].screenY):(this.data.pagex.start=t.pageX,this.data.pagey.start=t.pageY),this.options.enable.x&&(this._el.move.style.left=this.data.pagex.start-this._el.move.offsetWidth/2+"px"),this.options.enable.y&&(this._el.move.style.top=this.data.pagey.start-this._el.move.offsetHeight/2+"px"),this.data.pos.start=VCO.Dom.getPosition(this._el.drag),this.data.time.start=(new Date).getTime(),this.fire("dragstart",this.data),VCO.DomEvent.addListener(this._el.drag,this.dragevent.move,this._onDragMove,this),VCO.DomEvent.addListener(this._el.drag,this.dragevent.leave,this._onDragEnd,this)},_onDragEnd:function(t){this.data.sliding=!1,VCO.DomEvent.removeListener(this._el.drag,this.dragevent.move,this._onDragMove,this),VCO.DomEvent.removeListener(this._el.drag,this.dragevent.leave,this._onDragEnd,this),this.fire("dragend",this.data),this._momentum()},_onDragMove:function(t){t.preventDefault(),this.data.sliding=!0,VCO.Browser.touch?t.originalEvent?(this.data.pagex.end=t.originalEvent.touches[0].screenX,this.data.pagey.end=t.originalEvent.touches[0].screenY):(this.data.pagex.end=t.targetTouches[0].screenX,this.data.pagey.end=t.targetTouches[0].screenY):(this.data.pagex.end=t.pageX,this.data.pagey.end=t.pageY),this.data.pos.end=VCO.Dom.getPosition(this._el.drag),this.data.new_pos.x=-(this.data.pagex.start-this.data.pagex.end-this.data.pos.start.x),this.data.new_pos.y=-(this.data.pagey.start-this.data.pagey.end-this.data.pos.start.y),this.options.enable.x&&(this._el.move.style.left=this.data.new_pos.x+"px"),this.options.enable.y&&(this._el.move.style.top=this.data.new_pos.y+"px"),this.fire("dragmove",this.data)},_momentum:function(){var t={x:0,y:0,time:0},e={x:0,y:0,time:0},i=!1,n="";VCO.Browser.touch,t.time=10*((new Date).getTime()-this.data.time.start),e.time=10*((new Date).getTime()-this.data.time.start),e.x=this.options.momentum_multiplier*(Math.abs(this.data.pagex.end)-Math.abs(this.data.pagex.start)),e.y=this.options.momentum_multiplier*(Math.abs(this.data.pagey.end)-Math.abs(this.data.pagey.start)),t.x=Math.round(e.x/e.time),t.y=Math.round(e.y/e.time),this.data.new_pos.x=Math.min(this.data.pos.end.x+t.x),this.data.new_pos.y=Math.min(this.data.pos.end.y+t.y),this.options.enable.x?this.data.new_pos.x<0&&(this.data.new_pos.x=0):this.data.new_pos.x=this.data.pos.start.x,this.options.enable.y?this.data.new_pos.y<0&&(this.data.new_pos.y=0):this.data.new_pos.y=this.data.pos.start.y,e.time<3e3&&(i=!0),Math.abs(e.x)>1e4&&(this.data.direction="left",e.x>0&&(this.data.direction="right")),Math.abs(e.y)>1e4&&(this.data.direction="up",e.y>0&&(this.data.direction="down")),this._animateMomentum(),i&&this.fire("swipe_"+this.data.direction,this.data)},_animateMomentum:function(){var t={x:this.data.new_pos.x,y:this.data.new_pos.y},e={duration:this.options.duration,easing:VCO.Ease.easeOutStrong};this.options.enable.y&&((this.options.constraint.top||this.options.constraint.bottom)&&(t.y>this.options.constraint.bottom?t.y=this.options.constraint.bottom:t.y<this.options.constraint.top&&(t.y=this.options.constraint.top)),e.top=Math.floor(t.y)+"px"),this.options.enable.x&&((this.options.constraint.left||this.options.constraint.right)&&(t.x>this.options.constraint.left?t.x=this.options.constraint.left:t.x<this.options.constraint.right&&(t.x=this.options.constraint.right)),e.left=Math.floor(t.x)+"px"),this.animator=VCO.Animate(this._el.move,e),this.fire("momentum",this.data)}}),VCO.Swipable=VCO.Class.extend({includes:VCO.Events,_el:{},mousedrag:{down:"mousedown",up:"mouseup",leave:"mouseleave",move:"mousemove"},touchdrag:{down:"touchstart",up:"touchend",leave:"mouseleave",move:"touchmove"},initialize:function(t,e,i){this._el={drag:t,move:t},e&&(this._el.move=e),this.options={snap:!1,enable:{x:!0,y:!0},constraint:{top:!1,bottom:!1,left:0,right:!1},momentum_multiplier:2e3,duration:1e3,ease:VCO.Ease.easeInOutQuint},this.animator=null,this.dragevent=this.mousedrag,VCO.Browser.touch&&(this.dragevent=this.touchdrag),this.data={sliding:!1,direction:"none",pagex:{start:0,end:0},pagey:{start:0,end:0},pos:{start:{x:0,y:0},end:{x:0,y:0}},new_pos:{x:0,y:0},new_pos_parent:{x:0,y:0},time:{start:0,end:0},touch:!1},VCO.Util.mergeData(this.options,i)},enable:function(t){VCO.DomEvent.addListener(this._el.drag,this.dragevent.down,this._onDragStart,this),VCO.DomEvent.addListener(this._el.drag,this.dragevent.up,this._onDragEnd,this),this.data.pos.start=0,this._el.move.style.left=this.data.pos.start.x+"px",this._el.move.style.top=this.data.pos.start.y+"px",this._el.move.style.position="absolute"},disable:function(){VCO.DomEvent.removeListener(this._el.drag,this.dragevent.down,this._onDragStart,this),VCO.DomEvent.removeListener(this._el.drag,this.dragevent.up,this._onDragEnd,this)},stopMomentum:function(){this.animator&&this.animator.stop()},updateConstraint:function(t){this.options.constraint=t},_onDragStart:function(t){this.animator&&this.animator.stop(),VCO.Browser.touch?t.originalEvent?(this.data.pagex.start=t.originalEvent.touches[0].screenX,this.data.pagey.start=t.originalEvent.touches[0].screenY):(this.data.pagex.start=t.targetTouches[0].screenX,this.data.pagey.start=t.targetTouches[0].screenY):(this.data.pagex.start=t.pageX,this.data.pagey.start=t.pageY),this.options.enable.x,this.options.enable.y,this.data.pos.start={x:this._el.move.offsetLeft,y:this._el.move.offsetTop},this.data.time.start=(new Date).getTime(),this.fire("dragstart",this.data),VCO.DomEvent.addListener(this._el.drag,this.dragevent.move,this._onDragMove,this),VCO.DomEvent.addListener(this._el.drag,this.dragevent.leave,this._onDragEnd,this)
},_onDragEnd:function(t){this.data.sliding=!1,VCO.DomEvent.removeListener(this._el.drag,this.dragevent.move,this._onDragMove,this),VCO.DomEvent.removeListener(this._el.drag,this.dragevent.leave,this._onDragEnd,this),this.fire("dragend",this.data),this._momentum()},_onDragMove:function(t){var e={x:0,y:0};this.data.sliding=!0,VCO.Browser.touch?t.originalEvent?(this.data.pagex.end=t.originalEvent.touches[0].screenX,this.data.pagey.end=t.originalEvent.touches[0].screenY):(this.data.pagex.end=t.targetTouches[0].screenX,this.data.pagey.end=t.targetTouches[0].screenY):(this.data.pagex.end=t.pageX,this.data.pagey.end=t.pageY),e.x=this.data.pagex.start-this.data.pagex.end,e.y=this.data.pagey.start-this.data.pagey.end,this.data.pos.end={x:this._el.drag.offsetLeft,y:this._el.drag.offsetTop},this.data.new_pos.x=-(e.x-this.data.pos.start.x),this.data.new_pos.y=-(e.y-this.data.pos.start.y),this.options.enable.x&&Math.abs(e.x)>Math.abs(e.y)&&(t.preventDefault(),this._el.move.style.left=this.data.new_pos.x+"px"),this.options.enable.y&&Math.abs(e.y)>Math.abs(e.y)&&(t.preventDefault(),this._el.move.style.top=this.data.new_pos.y+"px"),this.fire("dragmove",this.data)},_momentum:function(){var t={x:0,y:0,time:0},e={x:0,y:0,time:0},i={x:!1,y:!1},n=!1,o="";this.data.direction=null,t.time=10*((new Date).getTime()-this.data.time.start),e.time=10*((new Date).getTime()-this.data.time.start),e.x=this.options.momentum_multiplier*(Math.abs(this.data.pagex.end)-Math.abs(this.data.pagex.start)),e.y=this.options.momentum_multiplier*(Math.abs(this.data.pagey.end)-Math.abs(this.data.pagey.start)),t.x=Math.round(e.x/e.time),t.y=Math.round(e.y/e.time),this.data.new_pos.x=Math.min(this.data.pos.end.x+t.x),this.data.new_pos.y=Math.min(this.data.pos.end.y+t.y),this.options.enable.x?this.data.new_pos.x>0&&(this.data.new_pos.x=0):this.data.new_pos.x=this.data.pos.start.x,this.options.enable.y?this.data.new_pos.y<0&&(this.data.new_pos.y=0):this.data.new_pos.y=this.data.pos.start.y,e.time<2e3&&(n=!0),this.options.enable.x&&this.options.enable.y?Math.abs(e.x)>Math.abs(e.y)?i.x=!0:i.y=!0:this.options.enable.x?Math.abs(e.x)>Math.abs(e.y)&&(i.x=!0):Math.abs(e.y)>Math.abs(e.x)&&(i.y=!0),i.x&&(Math.abs(e.x)>this._el.drag.offsetWidth/2&&(n=!0),Math.abs(e.x)>1e4&&(this.data.direction="left",e.x>0&&(this.data.direction="right"))),i.y&&(Math.abs(e.y)>this._el.drag.offsetHeight/2&&(n=!0),Math.abs(e.y)>1e4&&(this.data.direction="up",e.y>0&&(this.data.direction="down"))),this._animateMomentum(),n&&this.data.direction?this.fire("swipe_"+this.data.direction,this.data):this.data.direction?this.fire("swipe_nodirection",this.data):this.options.snap&&(this.animator.stop(),this.animator=VCO.Animate(this._el.move,{top:this.data.pos.start.y,left:this.data.pos.start.x,duration:this.options.duration,easing:VCO.Ease.easeOutStrong}))},_animateMomentum:function(){var t={x:this.data.new_pos.x,y:this.data.new_pos.y},e={duration:this.options.duration,easing:VCO.Ease.easeOutStrong};this.options.enable.y&&((this.options.constraint.top||this.options.constraint.bottom)&&(t.y>this.options.constraint.bottom?t.y=this.options.constraint.bottom:t.y<this.options.constraint.top&&(t.y=this.options.constraint.top)),e.top=Math.floor(t.y)+"px"),this.options.enable.x&&((this.options.constraint.left||this.options.constraint.right)&&(t.x>=this.options.constraint.left?t.x=this.options.constraint.left:t.x<this.options.constraint.right&&(t.x=this.options.constraint.right)),e.left=Math.floor(t.x)+"px"),this.animator=VCO.Animate(this._el.move,e),this.fire("momentum",this.data)}}),VCO.MenuBar=VCO.Class.extend({includes:[VCO.Events,VCO.DomMixins],_el:{},initialize:function(t,e,i){this._el={parent:{},container:{},button_overview:{},button_backtostart:{},button_collapse_toggle:{},arrow:{},line:{},coverbar:{},grip:{}},this.collapsed=!1,this._el.container="object"==typeof t?t:VCO.Dom.get(t),e&&(this._el.parent=e),this.options={width:600,height:600,duration:1e3,ease:VCO.Ease.easeInOutQuint,menubar_default_y:0},this.animator={},VCO.Util.mergeData(this.options,i),this._initLayout(),this._initEvents()},show:function(t){var e=this.options.duration;t&&(e=t)},hide:function(t){},setSticky:function(t){this.options.menubar_default_y=t},setColor:function(t){this._el.container.className=t?"vco-menubar vco-menubar-inverted":"vco-menubar"},updateDisplay:function(t,e,i,n){this._updateDisplay(t,e,i,n)},_onButtonOverview:function(t){this.fire("overview",t)},_onButtonBackToStart:function(t){this.fire("back_to_start",t)},_onButtonCollapseMap:function(t){this.collapsed?(this.collapsed=!1,this.show(),this._el.button_overview.style.display="inline",this.fire("collapse",{y:this.options.menubar_default_y}),this._el.button_collapse_toggle.innerHTML=VCO.Browser.mobile?"<span class='vco-icon-arrow-up'></span>":VCO.Language.buttons.collapse_toggle+"<span class='vco-icon-arrow-up'></span>"):(this.collapsed=!0,this.hide(25),this._el.button_overview.style.display="none",this.fire("collapse",{y:1}),this._el.button_collapse_toggle.innerHTML=VCO.Browser.mobile?"<span class='vco-icon-arrow-down'></span>":VCO.Language.buttons.uncollapse_toggle+"<span class='vco-icon-arrow-down'></span>")},_initLayout:function(){this._el.button_overview=VCO.Dom.create("span","vco-menubar-button",this._el.container),VCO.DomEvent.addListener(this._el.button_overview,"click",this._onButtonOverview,this),this._el.button_backtostart=VCO.Dom.create("span","vco-menubar-button",this._el.container),VCO.DomEvent.addListener(this._el.button_backtostart,"click",this._onButtonBackToStart,this),this._el.button_collapse_toggle=VCO.Dom.create("span","vco-menubar-button",this._el.container),VCO.DomEvent.addListener(this._el.button_collapse_toggle,"click",this._onButtonCollapseMap,this),this._el.button_overview.innerHTML=this.options.map_as_image?VCO.Language.buttons.overview:VCO.Language.buttons.map_overview,VCO.Browser.mobile?(this._el.button_backtostart.innerHTML="<span class='vco-icon-goback'></span>",this._el.button_collapse_toggle.innerHTML="<span class='vco-icon-arrow-up'></span>",this._el.container.setAttribute("ontouchstart"," ")):(this._el.button_backtostart.innerHTML=VCO.Language.buttons.backtostart+" <span class='vco-icon-goback'></span>",this._el.button_collapse_toggle.innerHTML=VCO.Language.buttons.collapse_toggle+"<span class='vco-icon-arrow-up'></span>"),"landscape"==this.options.layout&&(this._el.button_collapse_toggle.style.display="none")},_initEvents:function(){},_updateDisplay:function(t,e,i){t&&(this.options.width=t),e&&(this.options.height=e)}}),VCO.Message=VCO.Class.extend({includes:[VCO.Events,VCO.DomMixins],_el:{},initialize:function(t,e,i){this._el={parent:{},container:{},message_container:{},loading_icon:{},message:{}},this.options={width:600,height:600,message_class:"vco-message",message_icon_class:"vco-loading-icon"},VCO.Util.mergeData(this.data,t),VCO.Util.mergeData(this.options,e),this._el.container=VCO.Dom.create("div",this.options.message_class),i&&(i.appendChild(this._el.container),this._el.parent=i),this.animator={},this._initLayout(),this._initEvents()},updateMessage:function(t){this._updateMessage(t)},updateDisplay:function(t,e){this._updateDisplay(t,e)},_updateMessage:function(t){this._el.message.innerHTML=t?t:VCO.Language?VCO.Language.messages.loading:"Loading"},_onMouseClick:function(){this.fire("clicked",this.options)},_initLayout:function(){this._el.message_container=VCO.Dom.create("div","vco-message-container",this._el.container),this._el.loading_icon=VCO.Dom.create("div",this.options.message_icon_class,this._el.message_container),this._el.message=VCO.Dom.create("div","vco-message-content",this._el.message_container),this._updateMessage()},_initEvents:function(){VCO.DomEvent.addListener(this._el.container,"click",this._onMouseClick,this)},_updateDisplay:function(t,e,i){}}),VCO.MediaType=function(t){for(var e={},i=[{type:"youtube",name:"YouTube",match_str:"(www.)?youtube|youtu.be",cls:VCO.Media.YouTube},{type:"vimeo",name:"Vimeo",match_str:"(player.)?vimeo.com",cls:VCO.Media.Vimeo},{type:"dailymotion",name:"DailyMotion",match_str:"(www.)?dailymotion.com",cls:VCO.Media.DailyMotion},{type:"vine",name:"Vine",match_str:"(www.)?vine.co",cls:VCO.Media.Vine},{type:"soundcloud",name:"SoundCloud",match_str:"(player.)?soundcloud.com",cls:VCO.Media.SoundCloud},{type:"twitter",name:"Twitter",match_str:"(www.)?twitter.com",cls:VCO.Media.Twitter},{type:"googlemaps",name:"Google Map",match_str:"maps.google",cls:VCO.Media.Map},{type:"googleplus",name:"Google+",match_str:"plus.google",cls:VCO.Media.GooglePlus},{type:"flickr",name:"Flickr",match_str:"flickr.com/photos",cls:VCO.Media.Flickr},{type:"instagram",name:"Instagram",match_str:/(instagr.am|instagram.com)\/p\//,cls:VCO.Media.Instagram},{type:"profile",name:"Profile",match_str:/((instagr.am|instagram.com)(\/profiles\/|[-a-zA-Z0-9@:%_\+.~#?&//=]+instagramprofile))|[-a-zA-Z0-9@:%_\+.~#?&//=]+\?profile/,cls:VCO.Media.Profile},{type:"image",name:"Image",match_str:/jpg|jpeg|png|gif/i,cls:VCO.Media.Image},{type:"googledocs",name:"Google Doc",match_str:/\b.(doc|docx|xls|xlsx|ppt|pptx|pdf|pages|ai|psd|tiff|dxf|svg|eps|ps|ttf|xps|zip|tif)\b/,cls:VCO.Media.GoogleDoc},{type:"wikipedia",name:"Wikipedia",match_str:"(www.)?wikipedia.org",cls:VCO.Media.Wikipedia},{type:"iframe",name:"iFrame",match_str:"iframe",cls:VCO.Media.IFrame},{type:"storify",name:"Storify",match_str:"storify",cls:VCO.Media.Storify},{type:"blockquote",name:"Quote",match_str:"blockquote",cls:VCO.Media.Blockquote},{type:"website",name:"Website",match_str:"http://",cls:VCO.Media.Website},{type:"",name:"",match_str:"",cls:VCO.Media}],n=0;n<i.length;n++){if(t instanceof Array)return e={type:"slider",cls:VCO.Media.Slider};if(t.url.match(i[n].match_str)){return e=i[n],e.url=t.url,e;break}}return!1},VCO.Media=VCO.Class.extend({includes:[VCO.Events],_el:{},initialize:function(t,e,i){this._el={container:{},content_container:{},content:{},content_item:{},content_link:{},caption:null,credit:null,parent:{},link:null},this.player=null,this.timer=null,this.load_timer=null,this.message=null,this.media_id=null,this._state={loaded:!1,show_meta:!1,media_loaded:!1},this.data={uniqueid:null,url:null,credit:null,caption:null,link:null,link_target:null},this.options={api_key_flickr:"f2cc870b4d233dd0a5bfe73fd0d64ef0",credit_height:0,caption_height:0},this.animator={},VCO.Util.mergeData(this.options,e),VCO.Util.mergeData(this.data,t),this._el.container=VCO.Dom.create("div","vco-media"),this.data.uniqueid&&(this._el.container.id=this.data.uniqueid),this._initLayout(),i&&(i.appendChild(this._el.container),this._el.parent=i)},loadMedia:function(){var t=this;if(!this._state.loaded)try{this.load_timer=setTimeout(function(){t._loadMedia(),t._state.loaded=!0,t._updateDisplay()},1200)}catch(e){trace("Error loading media for ",this._media),trace(e)}},loadingMessage:function(){this.message.updateMessage(this._("loading")+" "+this.options.media_name)},updateMediaDisplay:function(t){this._state.loaded&&(this._updateMediaDisplay(t),VCO.Browser.mobile||"portrait"==t||(this._el.content_item.style.maxHeight=this.options.height/2+"px"),this._state.media_loaded&&(this._el.credit&&(this._el.credit.style.width="auto"),this._el.caption&&(this._el.caption.style.width="auto")),VCO.Browser.firefox&&(this._el.content_item.offsetWidth>this._el.content_item.offsetHeight&&(this._el.content_item.style.width="100%",this._el.content_item.style.maxWidth="100%"),"portrait"==t&&(this._el.content_item.style.maxHeight="none")),this._state.media_loaded&&(this._el.credit&&(this._el.credit.style.width=this._el.content_item.offsetWidth+"px"),this._el.caption&&(this._el.caption.style.width=this._el.content_item.offsetWidth+"px")))},_loadMedia:function(){},_updateMediaDisplay:function(t){},show:function(){},hide:function(){},addTo:function(t){t.appendChild(this._el.container),this.onAdd()},removeFrom:function(t){t.removeChild(this._el.container),this.onRemove()},updateDisplay:function(t,e,i){this._updateDisplay(t,e,i)},stopMedia:function(){this._stopMedia()},loadErrorDisplay:function(t){this._el.content.removeChild(this._el.content_item),this._el.content_item=VCO.Dom.create("div","vco-media-item vco-media-loaderror",this._el.content),this._el.content_item.innerHTML="<div class='vco-icon-"+this.options.media_type+"'></div><p>"+t+"</p>",this.onLoaded(!0)},onLoaded:function(t){this._state.loaded=!0,this.fire("loaded",this.data),this.message&&this.message.hide(),t||this.showMeta(),this.updateDisplay()},onMediaLoaded:function(t){this._state.media_loaded=!0,this.fire("media_loaded",this.data),this._el.credit&&(this._el.credit.style.width=this._el.content_item.offsetWidth+"px"),this._el.caption&&(this._el.caption.style.width=this._el.content_item.offsetWidth+"px")},showMeta:function(t,e){this._state.show_meta=!0,this.data.credit&&""!=this.data.credit&&!this._el.credit&&(this._el.credit=VCO.Dom.create("div","vco-credit",this._el.content_container),this._el.credit.innerHTML=this.data.credit,this.options.credit_height=this._el.credit.offsetHeight),this.data.caption&&""!=this.data.caption&&!this._el.caption&&(this._el.caption=VCO.Dom.create("div","vco-caption",this._el.content_container),this._el.caption.innerHTML=this.data.caption,this.options.caption_height=this._el.caption.offsetHeight)},onAdd:function(){this.fire("added",this.data)},onRemove:function(){this.fire("removed",this.data)},_initLayout:function(){this.message=new VCO.Message({},this.options),this.message.addTo(this._el.container),this._el.content_container=VCO.Dom.create("div","vco-media-content-container",this._el.container),this.data.link&&""!=this.data.link?(this._el.link=VCO.Dom.create("a","vco-media-link",this._el.content_container),this._el.link.href=this.data.link,this._el.link.target=this.data.link_target&&""!=this.data.link_target?this.data.link_target:"_blank",this._el.content=VCO.Dom.create("div","vco-media-content",this._el.link)):this._el.content=VCO.Dom.create("div","vco-media-content",this._el.content_container)},_updateDisplay:function(t,e,i){t&&(this.options.width=t),e&&(this.options.height=e),i&&(this.options.layout=i),this._el.credit&&(this.options.credit_height=this._el.credit.offsetHeight),this._el.caption&&(this.options.caption_height=this._el.caption.offsetHeight+5),this.updateMediaDisplay(this.options.layout)},_stopMedia:function(){}}),VCO.Media.Blockquote=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("div","vco-media-item vco-media-blockquote",this._el.content),this.media_id=this.data.url,this._el.content_item.innerHTML=this.media_id,this.onLoaded()},updateMediaDisplay:function(){},_updateMediaDisplay:function(){}}),VCO.Media.Flickr=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t,e=this;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("img","vco-media-item vco-media-image vco-media-flickr vco-media-shadow",this._el.content),this._el.content_item.addEventListener("load",function(t){e.onMediaLoaded()}),this.establishMediaID(),t="https://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key="+this.options.api_key_flickr+"&photo_id="+this.media_id+"&format=json&jsoncallback=?",VCO.getJSON(t,function(t){"ok"==t.stat?e.createMedia(t):e.loadErrorDisplay("Photo not found or private.")})},establishMediaID:function(){var t="flickr.com/photos/",e=this.data.url.indexOf(t);if(-1==e)throw"Invalid Flickr URL";var i=e+t.length;this.media_id=this.data.url.substr(i).split("/")[1]},createMedia:function(t){for(var e=this.sizes(this.options.height),i=t.sizes.size[t.sizes.size.length-2].source,n=0;n<t.sizes.size.length;n++)t.sizes.size[n].label==e&&(i=t.sizes.size[n].source);this._el.content_item.src=i,this.onLoaded()},sizes:function(t){var e="";return e=75>=t?0>=t?"Large":"Thumbnail":180>=t?"Small":240>=t?"Small 320":375>=t?"Medium":480>=t?"Medium 640":600>=t?"Large":"Large"}}),VCO.Media.Instagram=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t,e=this;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this.media_id=this.data.url.split("/p/")[1].split("/")[0],this._el.content_link=VCO.Dom.create("a","",this._el.content),this._el.content_link.href=this.data.url,this._el.content_link.target="_blank",this._el.content_item=VCO.Dom.create("img","vco-media-item vco-media-image vco-media-instagram vco-media-shadow",this._el.content_link),this._el.content_item.addEventListener("load",function(t){e.onMediaLoaded()}),this._el.content_item.src="http://instagr.am/p/"+this.media_id+"/media/?size="+this.sizes(this._el.content.offsetWidth),this.onLoaded()},sizes:function(t){var e="";return e=150>=t?"t":306>=t?"m":"l"}}),VCO.Media.Profile=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("img","vco-media-item vco-media-image vco-media-profile vco-media-shadow",this._el.content),this._el.content_item.src=this.data.url,this.onLoaded()},_updateMediaDisplay:function(t){VCO.Browser.firefox&&(this._el.content_item.style.maxWidth=this.options.width/2-40+"px")}}),VCO.Media.GoogleDoc=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t,e=this;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("div","vco-media-item vco-media-iframe",this._el.content),this.media_id=this.data.url,t=this.media_id,this._el.content_item.innerHTML=this.media_id.match(/docs.google.com/i)?"<iframe class='doc' frameborder='0' width='100%' height='100%' src='"+this.media_id+"&embedded=true'></iframe>":"<iframe class='doc' frameborder='0' width='100%' height='100%' src='http://docs.google.com/viewer?url="+this.media_id+"&embedded=true'></iframe>",this.onLoaded()},_updateMediaDisplay:function(){this._el.content_item.style.height=this.options.height+"px"}}),VCO.Media.GooglePlus=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t,e=this;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("div","vco-media-item vco-media-googleplus",this._el.content),this.media_id=this.data.url,t=this.media_id,this._el.content_item.innerHTML="<iframe frameborder='0' width='100%' height='100%' src='"+t+"'></iframe>",this.onLoaded()},_updateMediaDisplay:function(){this._el.content_item.style.height=this.options.height+"px"}}),VCO.Media.IFrame=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t,e=this;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("div","vco-media-item vco-media-iframe",this._el.content),this.media_id=this.data.url,t=this.media_id,this._el.content_item.innerHTML=t,this.onLoaded()},_updateMediaDisplay:function(){this._el.content_item.style.height=this.options.height+"px"}}),VCO.Media.Image=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t=this;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this.data.link?(this._el.content_link=VCO.Dom.create("a","",this._el.content),this._el.content_link.href=this.data.link,this._el.content_link.target="_blank",this._el.content_item=VCO.Dom.create("img","vco-media-item vco-media-image vco-media-shadow",this._el.content_link)):this._el.content_item=VCO.Dom.create("img","vco-media-item vco-media-image vco-media-shadow",this._el.content),this._el.content_item.addEventListener("load",function(e){t.onMediaLoaded()}),this._el.content_item.src=this.data.url,this.onLoaded()},_updateMediaDisplay:function(t){VCO.Browser.firefox&&(this._el.content_item.style.width="auto")}}),VCO.Media.SoundCloud=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t,e=this;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("div","vco-media-item vco-media-iframe vco-media-soundcloud vco-media-shadow",this._el.content),this.media_id=this.data.url,t="http://soundcloud.com/oembed?url="+this.media_id+"&format=js&callback=?",VCO.getJSON(t,function(t){e.createMedia(t)})},createMedia:function(t){this._el.content_item.innerHTML=t.html,this.onLoaded()}}),VCO.Media.Storify=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("div","vco-media-item vco-media-iframe vco-media-storify",this._el.content),this.media_id=this.data.url,t="<iframe frameborder='0' width='100%' height='100%' src='"+this.media_id+"/embed'></iframe>",t+="<script src='"+this.media_id+".js'></script>",this._el.content_item.innerHTML=t,this.onLoaded()},_updateMediaDisplay:function(){this._el.content_item.style.height=this.options.height+"px"}}),VCO.Media.Text=VCO.Class.extend({includes:[VCO.Events],_el:{container:{},content_container:{},content:{},headline:{},date:{},start_btn:{}},data:{uniqueid:"",headline:"headline",text:"text"},options:{title:!1},initialize:function(t,e,i){VCO.Util.setData(this,t),VCO.Util.mergeData(this.options,e),this._el.container=VCO.Dom.create("div","vco-text"),this._el.container.id=this.data.uniqueid,this._initLayout(),i&&i.appendChild(this._el.container)},show:function(){},hide:function(){},addTo:function(t){t.appendChild(this._el.container)},removeFrom:function(t){t.removeChild(this._el.container)},headlineHeight:function(){return this._el.headline.offsetHeight+40},addDateText:function(t){this._el.date.innerHTML=t},onLoaded:function(){this.fire("loaded",this.data)},onAdd:function(){this.fire("added",this.data)},onRemove:function(){this.fire("removed",this.data)},_initLayout:function(){if(this._el.content_container=VCO.Dom.create("div","vco-text-content-container",this._el.container),this._el.date=VCO.Dom.create("h3","vco-headline-date",this._el.content_container),""!=this.data.headline){var t="vco-headline";this.options.title&&(t="vco-headline vco-headline-title"),this._el.headline=VCO.Dom.create("h2",t,this._el.content_container),this._el.headline.innerHTML=this.data.headline}if(""!=this.data.text){var e="";e+=VCO.Util.htmlify(this.data.text),this.data.date&&this.data.date.created_time&&""!=this.data.date.created_time&&this.data.date.created_time.length>10&&(e+="undefined"!=typeof moment?"<div class='vco-text-date'>"+moment(this.data.date.created_time,"YYYY-MM-DD h:mm:ss").fromNow()+"</div>":"<div class='vco-text-date'>"+VCO.Util.convertUnixTime(this.data.date.created_time)+"</div>"),this._el.content=VCO.Dom.create("div","vco-text-content",this._el.content_container),this._el.content.innerHTML=e}this.onLoaded()}}),VCO.Media.Twitter=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t,e=this;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("div","vco-media-twitter",this._el.content),this.media_id=this.data.url.match("status/")?this.data.url.split("status/")[1]:url.match("statuses/")?this.data.url.split("statuses/")[1]:"",t="https://api.twitter.com/1/statuses/oembed.json?id="+this.media_id+"&omit_script=true&include_entities=true&callback=?",VCO.ajax({type:"GET",url:t,dataType:"json",success:function(t){e.createMedia(t)},error:function(t,i){var n="";n+="Unable to load Tweet. <br/>"+e.media_id+"<br/>"+i,e.loadErrorDisplay(n)}})},createMedia:function(t){trace("create_media");var e="",i="",n="",o="",s="",a="";i=t.html.split("</p>—")[0]+"</p></blockquote>",n=t.author_url.split("twitter.com/")[1],o=t.html.split("</p>—")[1].split('<a href="')[1],s=o.split('">')[0],a=o.split('">')[1].split("</a>")[0],e+=i,e+="<div class='vcard'>",e+="<a href='"+s+"' class='twitter-date' target='_blank'>"+a+"</a>",e+="<div class='author'>",e+="<a class='screen-name url' href='"+t.author_url+"' target='_blank'>",e+="<span class='avatar'></span>",e+="<span class='fn'>"+t.author_name+" <span class='vco-icon-twitter'></span></span>",e+="<span class='nickname'>@"+n+"<span class='thumbnail-inline'></span></span>",e+="</a>",e+="</div>",e+="</div>",this._el.content_item.innerHTML=e,this.onLoaded()},updateMediaDisplay:function(){},_updateMediaDisplay:function(){}}),VCO.Media.Vimeo=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t,e=this;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("div","vco-media-item vco-media-iframe vco-media-vimeo vco-media-shadow",this._el.content),this.media_id=this.data.url.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0],t="http://player.vimeo.com/video/"+this.media_id+"?api=1&title=0&byline=0&portrait=0&color=ffffff",this.player=VCO.Dom.create("iframe","",this._el.content_item),this.player.width="100%",this.player.height="100%",this.player.frameBorder="0",this.player.src=t,this.onLoaded()},_updateMediaDisplay:function(){this._el.content_item.style.height=VCO.Util.ratio.r16_9({w:this._el.content_item.offsetWidth})+"px"},_stopMedia:function(){try{this.player.contentWindow.postMessage(JSON.stringify({method:"pause"}),"http://player.vimeo.com")}catch(t){trace(t)}}}),VCO.Media.DailyMotion=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t,e=this;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("div","vco-media-item vco-media-iframe vco-media-dailymotion",this._el.content),this.media_id=this.data.url.match("video")?this.data.url.split("video/")[1].split(/[?&]/)[0]:this.data.url.split("embed/")[1].split(/[?&]/)[0],t="http://www.dailymotion.com/embed/video/"+this.media_id,this._el.content_item.innerHTML="<iframe autostart='false' frameborder='0' width='100%' height='100%' src='"+t+"'></iframe>",this.onLoaded()},_updateMediaDisplay:function(){this._el.content_item.style.height=VCO.Util.ratio.r16_9({w:this._el.content_item.offsetWidth})+"px"}}),VCO.Media.Vine=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t,e=this;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("div","vco-media-item vco-media-iframe vco-media-vine vco-media-shadow",this._el.content),this.media_id=this.data.url.split("vine.co/v/")[1],t="https://vine.co/v/"+this.media_id+"/embed/simple",this._el.content_item.innerHTML="<iframe frameborder='0' width='100%' height='100%' src='"+t+"'></iframe><script async src='http://platform.vine.co/static/scripts/embed.js' charset='utf-8'></script>",this.onLoaded()},_updateMediaDisplay:function(){var t=VCO.Util.ratio.square({w:this._el.content_item.offsetWidth,h:this.options.height});this._el.content_item.style.height=t.h+"px"}}),VCO.Media.Website=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){},createMedia:function(t){this.onLoaded()}}),VCO.Media.Wikipedia=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t,e,i=this;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this._el.content_item=VCO.Dom.create("div","vco-media-item vco-media-wikipedia",this._el.content),this.media_id=this.data.url.split("wiki/")[1].split("#")[0].replace("_"," "),this.media_id=this.media_id.replace(" ","%20"),e=this.data.url.split("//")[1].split(".wikipedia")[0],t="http://"+e+".wikipedia.org/w/api.php?action=query&prop=extracts&redirects=&titles="+this.media_id+"&exintro=1&format=json&callback=?",VCO.ajax({type:"GET",url:t,dataType:"json",success:function(t){i.createMedia(t)},error:function(t,e){var n="";n+="Unable to load Wikipedia entry. <br/>"+i.media_id+"<br/>"+e,i.loadErrorDisplay(n)}})},createMedia:function(t){var e="";if(t.query){var i,e={entry:{},title:"",text:"",extract:"",paragraphs:1,text_array:[]};e.entry=VCO.Util.getObjectAttributeByIndex(t.query.pages,0),e.extract=e.entry.extract,e.title=e.entry.title,e.extract.match("<p>")?e.text_array=e.extract.split("<p>"):e.text_array.push(e.extract);for(var n=0;n<e.text_array.length;n++)n+1<=e.paragraphs&&n+1<e.text_array.length&&(e.text+="<p>"+e.text_array[n+1]);i="<h4><a href='"+this.data.url+"' target='_blank'>"+e.title+"</a></h4>",i+="<span class='wiki-source'>"+VCO.Language.messages.wikipedia+"</span>",i+=e.text,e.extract.match("REDIRECT")||(this._el.content_item.innerHTML=i,this.onLoaded())}},updateMediaDisplay:function(){},_updateMediaDisplay:function(){}}),VCO.Media.YouTube=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){var t=this,e;this.message.updateMessage(VCO.Language.messages.loading+" "+this.options.media_name),this.youtube_loaded=!1,this._el.content_item=VCO.Dom.create("div","vco-media-item vco-media-youtube vco-media-shadow",this._el.content),this._el.content_item.id=VCO.Util.unique_ID(7),e=VCO.Util.getUrlVars(this.data.url),this.media_id={},this.data.url.match("v=")?this.media_id.id=e.v:this.data.url.match("/embed/")?this.media_id.id=this.data.url.split("embed/")[1].split(/[?&]/)[0]:this.data.url.match(/v\/|v=|youtu\.be\//)?this.media_id.id=this.data.url.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0]:trace("YOUTUBE IN URL BUT NOT A VALID VIDEO"),this.media_id.start=e.t,this.media_id.hd=e.hd,VCO.Load.js("https://www.youtube.com/player_api",function(){t.createMedia()})},_updateMediaDisplay:function(){this._el.content_item.style.height=VCO.Util.ratio.r16_9({w:this._el.content_item.offsetWidth})+"px"},_stopMedia:function(){if(this.youtube_loaded)try{this.player.pauseVideo()}catch(t){trace(t)}},createMedia:function(){var t=this;if("undefined"!=typeof this.media_id.start){var e=this.media_id.start.toString(),i=0,n=0;e.match("m")?(i=parseInt(e.split("m")[0],10),n=parseInt(e.split("m")[1].split("s")[0],10),this.media_id.start=60*i+n):this.media_id.start=0}else this.media_id.start=0;this.media_id.hd="undefined"!=typeof this.media_id.hd?!0:!1,this.createPlayer()},createPlayer:function(){var t=this;clearTimeout(this.timer),"undefined"!=typeof YT&&"undefined"!=typeof YT.Player?this.player=new YT.Player(this._el.content_item.id,{playerVars:{enablejsapi:1,color:"white",autohide:1,showinfo:0,theme:"light",start:this.media_id.start,fs:0,rel:0},videoId:this.media_id.id,events:{onReady:function(){t.onPlayerReady()},onStateChange:t.onStateChange}}):this.timer=setTimeout(function(){t.createPlayer()},1e3),this.onLoaded()},onPlayerReady:function(t){this.youtube_loaded=!0,this._el.content_item=document.getElementById(this._el.content_item.id),this.onMediaLoaded(),this.onLoaded()},onStateChange:function(t){}}),VCO.Media.Slider=VCO.Media.extend({includes:[VCO.Events],_loadMedia:function(){this._el.content_item=VCO.Dom.create("img","vco-media-item vco-media-image",this._el.content),this._el.content_item.src=this.data.url,this.onLoaded()}}),VCO.Slide=VCO.Class.extend({includes:[VCO.Events,VCO.DomMixins],_el:{},initialize:function(t,e,i){this._el={container:{},scroll_container:{},background:{},content_container:{},content:{},call_to_action:null},this._media=null,this._mediaclass={},this._text={},this._state={loaded:!1},this.has={headline:!1,text:!1,media:!1,title:!1,background:{image:!1,color:!1,color_value:""}},this.has.title=i,this.title="",this.data={uniqueid:null,background:null,date:null,location:null,text:null,media:null},this.options={duration:1e3,slide_padding_lr:40,ease:VCO.Ease.easeInSpline,width:600,height:600,skinny_size:650,media_name:""},this.active=!1,this.animator={},VCO.Util.mergeData(this.options,e),VCO.Util.mergeData(this.data,t),this._initLayout(),this._initEvents()},show:function(){this.animator=VCO.Animate(this._el.slider_container,{left:-(this._el.container.offsetWidth*n)+"px",duration:this.options.duration,easing:this.options.ease})},hide:function(){},setActive:function(t){this.active=t,this.active?(this.data.background&&this.fire("background_change",this.has.background),this.loadMedia()):this.stopMedia()},addTo:function(t){t.appendChild(this._el.container)
},removeFrom:function(t){t.removeChild(this._el.container)},updateDisplay:function(t,e,i){this._updateDisplay(t,e,i)},loadMedia:function(){this._media&&!this._state.loaded&&(this._media.loadMedia(),this._state.loaded=!0)},stopMedia:function(){this._media&&this._state.loaded&&this._media.stopMedia()},getBackground:function(){return this.has.background},scrollToTop:function(){this._el.container.scrollTop=0},addCallToAction:function(t){this._el.call_to_action=VCO.Dom.create("div","vco-slide-calltoaction",this._el.content_container),this._el.call_to_action.innerHTML="<span class='vco-slide-calltoaction-button-text'>"+t+"</span>",VCO.DomEvent.addListener(this._el.call_to_action,"click",this._onCallToAction,this)},_onCallToAction:function(t){this.fire("call_to_action",t)},_initLayout:function(){this._el.container=VCO.Dom.create("div","vco-slide"),this.data.uniqueid&&(this._el.container.id=this.data.uniqueid),this._el.scroll_container=VCO.Dom.create("div","vco-slide-scrollable-container",this._el.container),this._el.content_container=VCO.Dom.create("div","vco-slide-content-container",this._el.scroll_container),this._el.content=VCO.Dom.create("div","vco-slide-content",this._el.content_container),this._el.background=VCO.Dom.create("div","vco-slide-background",this._el.container),this.data.background&&(this.data.background.url&&(this.has.background.image=!0,this._el.container.className+=" vco-full-image-background",this.has.background.color_value="#000",this._el.background.style.backgroundImage="url('"+this.data.background.url+"')",this._el.background.style.display="block"),this.data.background.color&&(this.has.background.color=!0,this._el.container.className+=" vco-full-color-background",this.has.background.color_value=this.data.background.color),this.data.background.text_background&&(this._el.container.className+=" vco-text-background")),this.data.media&&this.data.media.url&&""!=this.data.media.url&&(this.has.media=!0),this.data.text&&this.data.text.text&&(this.has.text=!0),this.data.text&&this.data.text.headline&&(this.has.headline=!0,this.title=this.data.text.headline),this.has.media&&(this.data.media.mediatype=VCO.MediaType(this.data.media),this.options.media_name=this.data.media.mediatype.name,this.options.media_type=this.data.media.mediatype.type,this._media=new this.data.media.mediatype.cls(this.data.media,this.options)),(this.has.text||this.has.headline)&&(this._text=new VCO.Media.Text(this.data.text,{title:this.has.title})),this.has.text||this.has.headline||!this.has.media?this.has.headline&&this.has.media&&!this.has.text?(this._el.container.className+=" vco-slide-media-only",this._text.addTo(this._el.content),this._media.addTo(this._el.content)):this.has.text&&this.has.media?(this._media.addTo(this._el.content),this._text.addTo(this._el.content)):(this.has.text||this.has.headline)&&(this._el.container.className+=" vco-slide-text-only",this._text.addTo(this._el.content)):(this._el.container.className+=" vco-slide-media-only",this._media.addTo(this._el.content)),this.onLoaded()},_initEvents:function(){},_updateDisplay:function(t,e,i){var n,o,s;this.options.width=t?t:this._el.container.offsetWidth,VCO.Browser.mobile&&this.options.width<=this.options.skinny_size?(n="0px",o="0px",s=this.options.width-0+"px"):"landscape"==i?(n="40px",o="75px",s=this.options.width-115+"px"):this.options.width<=this.options.skinny_size?(n=this.options.slide_padding_lr+"px",o=this.options.slide_padding_lr+"px",s=this.options.width-2*this.options.slide_padding_lr+"px"):(n=this.options.slide_padding_lr+"px",o=this.options.slide_padding_lr+"px",s=this.options.width-2*this.options.slide_padding_lr+"px"),this._el.content.style.paddingLeft=n,this._el.content.style.paddingRight=o,this._el.content.style.width=s,this._el.call_to_action&&(this._el.call_to_action.style.paddingLeft=n,this._el.call_to_action.style.paddingRight=o,this._el.call_to_action.style.width=s),this.options.height=e?e:this._el.container.offsetHeight,this._media&&(!this.has.text&&this.has.headline?this._media.updateDisplay(this.options.width,this.options.height-this._text.headlineHeight(),i):this._media.updateDisplay(this.options.width,this.options.height,i))}}),VCO.SlideNav=VCO.Class.extend({includes:[VCO.Events,VCO.DomMixins],_el:{},initialize:function(t,e,i){this._el={container:{},content_container:{},icon:{},title:{},description:{}},this.mediatype={},this.data={title:"Navigation",description:"Description"},this.options={direction:"previous"},this.animator=null,this.animator_position=null,VCO.Util.mergeData(this.options,e),VCO.Util.mergeData(this.data,t),this._el.container=VCO.Dom.create("div","vco-slidenav-"+this.options.direction),VCO.Browser.mobile&&this._el.container.setAttribute("ontouchstart"," "),this._initLayout(),this._initEvents(),i&&i.appendChild(this._el.container)},update:function(t){this._update(t)},setColor:function(t){this._el.content_container.className=t?"vco-slidenav-content-container vco-slidenav-inverted":"vco-slidenav-content-container"},updatePosition:function(t,e,i,n,o,s){var a=this,r={duration:i,easing:n,complete:function(){a._onUpdatePositionComplete(s)}},h=o;for(var l in t)t.hasOwnProperty(l)&&(r[l]=e?t[l]+"%":t[l]+"px");this.animator_position&&this.animator_position.stop();var c;c=r.right?"right":"left",this._el.container.style[c]=e?h+"%":h+"px",this.animator_position=VCO.Animate(this._el.container,r)},_onUpdatePositionComplete:function(t){t&&(this._el.container.style.left="",this._el.container.style.right="")},_onMouseClick:function(){this.fire("clicked",this.options)},_update:function(t){this.data=VCO.Util.mergeData(this.data,t),""!=this.data.title&&(this._el.title.innerHTML=this.data.title),""!=this.data.date&&(this._el.description.innerHTML=this.data.description)},_initLayout:function(){this._el.content_container=VCO.Dom.create("div","vco-slidenav-content-container",this._el.container),this._el.icon=VCO.Dom.create("div","vco-slidenav-icon",this._el.content_container),this._el.title=VCO.Dom.create("div","vco-slidenav-title",this._el.content_container),this._el.description=VCO.Dom.create("div","vco-slidenav-description",this._el.content_container),this._el.icon.innerHTML=" ",this._update()},_initEvents:function(){VCO.DomEvent.addListener(this._el.container,"click",this._onMouseClick,this)}}),VCO.StorySlider=VCO.Class.extend({includes:VCO.Events,initialize:function(t,e,i,n){this._el={container:{},background:{},slider_container_mask:{},slider_container:{},slider_item_container:{}},this._nav={},this._nav.previous={},this._nav.next={},this.slide_spacing=0,this._slides=[],this._swipable,this.preloadTimer,this._message,this.current_slide=0,this.current_bg_color=null,this.data={},this.options={id:"",layout:"portrait",width:600,height:600,default_bg_color:{r:256,g:256,b:256},slide_padding_lr:40,start_at_slide:1,slide_default_fade:"0%",duration:1e3,ease:VCO.Ease.easeInOutQuint,dragging:!0,trackResize:!0},"object"==typeof t?(this._el.container=t,this.options.id=VCO.Util.unique_ID(6,"vco")):(this.options.id=t,this._el.container=VCO.Dom.get(t)),this._el.container.id||(this._el.container.id=this.options.id),this.animator=null,this.animator_background=null,VCO.Util.mergeData(this.options,i),VCO.Util.mergeData(this.data,e),n&&this.init()},init:function(){this._initLayout(),this._initEvents(),this._initData(),this._updateDisplay(),this.goTo(this.options.start_at_slide),this._onLoaded(),this._introInterface()},updateDisplay:function(t,e,i,n){this._updateDisplay(t,e,i,n)},createSlide:function(t){this._createSlide(t)},createSlides:function(t){this._createSlides(t)},_createSlides:function(t){for(var e=0;e<t.length;e++)""==t[e].uniqueid&&(t[e].uniqueid=VCO.Util.unique_ID(6,"vco-slide")),0==e?this._createSlide(t[e],!0):this._createSlide(t[e],!1)},_createSlide:function(t,e){var i=new VCO.Slide(t,this.options,e);this._addSlide(i),this._slides.push(i)},_destroySlide:function(t){this._removeSlide(t);for(var e=0;e<this._slides.length;e++)this._slides[e]==t&&this._slides.splice(e,1)},_addSlide:function(t){t.addTo(this._el.slider_item_container),t.on("added",this._onSlideAdded,this),t.on("background_change",this._onBackgroundChange,this)},_removeSlide:function(t){t.removeFrom(this._el.slider_item_container),t.off("added",this._onSlideAdded,this),t.off("background_change",this._onBackgroundChange)},goToId:function(t,e,i){_n="string"==typeof t||t instanceof String?VCO.Util.findArrayNumberByUniqueID(t,this._slides,"uniqueid"):t,this.goTo(_n,e,i)},goTo:function(t,e,i){var n=this;this.changeBackground({color_value:"",image:!1}),this.preloadTimer&&clearTimeout(this.preloadTimer);for(var o=0;o<this._slides.length;o++)this._slides[o].setActive(!1);t<this._slides.length&&t>=0&&(this.current_slide=t,this.animator&&this.animator.stop(),this._swipable&&this._swipable.stopMomentum(),e?(this._el.slider_container.style.left=-(this.slide_spacing*t)+"px",this._onSlideChange(i)):this.animator=VCO.Animate(this._el.slider_container,{left:-(this.slide_spacing*t)+"px",duration:this.options.duration,easing:this.options.ease,complete:this._onSlideChange(i)}),this._slides[this.current_slide].setActive(!0),this._slides[this.current_slide+1]?(this.showNav(this._nav.next,!0),this._nav.next.update(this.getNavInfo(this._slides[this.current_slide+1]))):this.showNav(this._nav.next,!1),this._slides[this.current_slide-1]?(this.showNav(this._nav.previous,!0),this._nav.previous.update(this.getNavInfo(this._slides[this.current_slide-1]))):this.showNav(this._nav.previous,!1),this.preloadTimer=setTimeout(function(){n.preloadSlides()},this.options.duration))},preloadSlides:function(){this._slides[this.current_slide+1]&&(this._slides[this.current_slide+1].loadMedia(),this._slides[this.current_slide+1].scrollToTop()),this._slides[this.current_slide+2]&&(this._slides[this.current_slide+2].loadMedia(),this._slides[this.current_slide+2].scrollToTop()),this._slides[this.current_slide-1]&&(this._slides[this.current_slide-1].loadMedia(),this._slides[this.current_slide-1].scrollToTop()),this._slides[this.current_slide-2]&&(this._slides[this.current_slide-2].loadMedia(),this._slides[this.current_slide-2].scrollToTop())},getNavInfo:function(t){var e={title:"",description:""};return t.data.text&&t.data.text.headline&&(e.title=t.data.text.headline),e},next:function(){this.goTo(this.current_slide+1<this._slides.length?this.current_slide+1:this.current_slide)},previous:function(){this.goTo(this.current_slide-1>=0?this.current_slide-1:this.current_slide)},showNav:function(t,e){this.options.width<=500&&VCO.Browser.mobile||(e?t.show():t.hide())},changeBackground:function(t){var e=this,i=!1,n={r:256,g:256,b:256},o,s=this.options.slide_default_fade,a="15%",r="0.87",h="",l=this._el.background.getAttribute("style");n=t.color_value?VCO.Util.hexToRgb(t.color_value):this.options.default_bg_color,this.animator_background&&this.animator_background.stop(),o=n.r+","+n.g+","+n.b,this.current_bg_color&&this.current_bg_color==o||(this.current_bg_color=o,i=!0),i&&("landscape"==this.options.layout?(this._nav.next.setColor(!1),this._nav.previous.setColor(!1),n.r<255&&n.g<255&&n.b<255&&(s="15%"),t.image&&(s="0%"),h+="opacity:0;",h+="background-image: -webkit-linear-gradient(left, color-stop(rgba("+o+",0.0001 ) "+s+"), color-stop(rgba("+o+","+r+") "+a+"));",h+="background-image: linear-gradient(to right, rgba("+o+",0.0001 ) "+s+", rgba("+o+","+r+") "+a+");",h+="background-repeat: repeat-x;",h+="filter: e(%('progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)',argb("+o+", 0.0001),argb("+o+",0.80)));"):(h+=t.color_value?"background-color:"+t.color_value+";":"background-color:#FFF;",n.r<255&&n.g<255&&n.b<255||t.image?(this._nav.next.setColor(!0),this._nav.previous.setColor(!0)):(this._nav.next.setColor(!1),this._nav.previous.setColor(!1))),this.animator_background=VCO.Animate(this._el.background,{opacity:0,duration:this.options.duration/2,easing:this.options.ease,complete:function(){e.fadeInBackground(h)}}))},fadeInBackground:function(t){this.animator_background&&this.animator_background.stop(),t&&this._el.background.setAttribute("style",t),this.animator_background=VCO.Animate(this._el.background,{opacity:1,duration:this.options.duration/2,easing:this.options.ease})},_updateDisplay:function(t,e,i,n){var o,s;s="undefined"==typeof n?this.options.layout:n,this.options.layout=s,this.slide_spacing=2*this.options.width,this.options.width=t?t:this._el.container.offsetWidth,this.options.height=e?e:this._el.container.offsetHeight,o=this.options.height/2,this._nav.next.setPosition({top:o}),this._nav.previous.setPosition({top:o});for(var a=0;a<this._slides.length;a++)this._slides[a].updateDisplay(this.options.width,this.options.height,s),this._slides[a].setPosition({left:this.slide_spacing*a,top:0});this.goTo(this.current_slide,!0,!0)},_introInterface:function(){if(this.options.call_to_action){var t=VCO.Language.messages.start;""!=this.options.call_to_action_text&&(t=this.options.call_to_action_text),this._slides[0].addCallToAction(t),this._slides[0].on("call_to_action",this.next,this)}this.options.width<=this.options.skinny_size||(this._nav.next.updatePosition({right:"130"},!1,3*this.options.duration,this.options.ease,-100,!0),this._nav.previous.updatePosition({left:"-100"},!0,3*this.options.duration,this.options.ease,-200,!0))},_initLayout:function(){this._el.container.className+=" vco-storyslider",this._el.slider_container_mask=VCO.Dom.create("div","vco-slider-container-mask",this._el.container),this._el.background=VCO.Dom.create("div","vco-slider-background",this._el.container),this._el.slider_container=VCO.Dom.create("div","vco-slider-container vcoanimate",this._el.slider_container_mask),this._el.slider_item_container=VCO.Dom.create("div","vco-slider-item-container",this._el.slider_container),this.options.width=this._el.container.offsetWidth,this.options.height=this._el.container.offsetHeight,this._nav.previous=new VCO.SlideNav({title:"Previous",description:"description"},{direction:"previous"}),this._nav.next=new VCO.SlideNav({title:"Next",description:"description"},{direction:"next"}),this._nav.next.addTo(this._el.container),this._nav.previous.addTo(this._el.container),this._el.slider_container.style.left="0px",VCO.Browser.touch&&(this._swipable=new VCO.Swipable(this._el.slider_container_mask,this._el.slider_container,{enable:{x:!0,y:!1},snap:!0}),this._swipable.enable(),this._message=new VCO.Message({},{message_class:"vco-message-full",message_icon_class:"vco-icon-swipe-left"}),this._message.updateMessage("Swipe to Navigate<br><span class='vco-button'>OK</span>"),this._message.addTo(this._el.container))},_initEvents:function(){this._nav.next.on("clicked",this._onNavigation,this),this._nav.previous.on("clicked",this._onNavigation,this),this._message&&this._message.on("clicked",this._onMessageClick,this),this._swipable&&(this._swipable.on("swipe_left",this._onNavigation,this),this._swipable.on("swipe_right",this._onNavigation,this),this._swipable.on("swipe_nodirection",this._onSwipeNoDirection,this))},_initData:function(){this._createSlides(this.data.slides)},_onBackgroundChange:function(t){var e=this._slides[this.current_slide].getBackground();this.changeBackground(t),this.fire("colorchange",e)},_onMessageClick:function(t){this._message.hide()},_onSwipeNoDirection:function(t){this.goTo(this.current_slide)},_onNavigation:function(t){"next"==t.direction||"left"==t.direction?this.next():("previous"==t.direction||"right"==t.direction)&&this.previous(),this.fire("nav_"+t.direction,this.data)},_onSlideAdded:function(t){trace("slideadded"),this.fire("slideAdded",this.data)},_onSlideRemoved:function(t){this.fire("slideAdded",this.data)},_onSlideChange:function(t){t||this.fire("change",{current_slide:this.current_slide,uniqueid:this._slides[this.current_slide].data.uniqueid})},_onMouseClick:function(t){},_fireMouseEvent:function(t){if(this._loaded){var e=t.type;e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)&&("contextmenu"===e&&VCO.DomEvent.preventDefault(t),this.fire(e,{latlng:"something",layerPoint:"something else"}))}},_onLoaded:function(){this.fire("loaded",this.data),this.fire("title",{title:this._slides[0].title})}});var oldL=window.L,L={};L.version="0.7.2","object"==typeof module&&"object"==typeof module.exports?module.exports=L:"function"==typeof define&&define.amd&&define(L),L.noConflict=function(){return window.L=oldL,this},window.L=L,L.Util={extend:function(t){var e=Array.prototype.slice.call(arguments,1),i,n,o,s;for(n=0,o=e.length;o>n;n++){s=e[n]||{};for(i in s)s.hasOwnProperty(i)&&(t[i]=s[i])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?void(o=!0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return L.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=L.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function t(t){var e,i,n=["webkit","moz","o","ms"];for(e=0;e<n.length&&!i;e++)i=window[n[e]+t];return i}function e(t){var e=+new Date,n=Math.max(0,16-(e-i));return i=e+n,window.setTimeout(t,n)}var i=0,n=window.requestAnimationFrame||t("RequestAnimationFrame")||e,o=window.cancelAnimationFrame||t("CancelAnimationFrame")||t("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};L.Util.requestAnimFrame=function(t,i,o,s){return t=L.bind(t,i),o&&n===e?void t():n.call(window,t,s)},L.Util.cancelAnimFrame=function(t){t&&o.call(window,t)}}(),L.extend=L.Util.extend,L.bind=L.Util.bind,L.stamp=L.Util.stamp,L.setOptions=L.Util.setOptions,L.Class=function(){},L.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=e,e.prototype=n;for(var o in this)this.hasOwnProperty(o)&&"prototype"!==o&&(e[o]=this[o]);t.statics&&(L.extend(e,t.statics),delete t.statics),t.includes&&(L.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=L.extend({},n.options,t.options)),L.extend(n,t),n._initHooks=[];var s=this;return e.__super__=s.prototype,n.callInitHooks=function(){if(!this._initHooksCalled){s.prototype.callInitHooks&&s.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;e>t;t++)n._initHooks[t].call(this)}},e},L.Class.include=function(t){L.extend(this.prototype,t)},L.Class.mergeOptions=function(t){L.extend(this.prototype.options,t)},L.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var eventsKey="_leaflet_events";L.Mixin={},L.Mixin.Events={addEventListener:function(t,e,i){if(L.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n=this[eventsKey]=this[eventsKey]||{},o=i&&i!==this&&L.stamp(i),s,a,r,h,l,c,u;for(t=L.Util.splitWords(t),s=0,a=t.length;a>s;s++)r={action:e,context:i||this},h=t[s],o?(l=h+"_idx",c=l+"_len",u=n[l]=n[l]||{},u[o]||(u[o]=[],n[c]=(n[c]||0)+1),u[o].push(r)):(n[h]=n[h]||[],n[h].push(r));return this},hasEventListeners:function(t){var e=this[eventsKey];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[eventsKey])return this;if(!t)return this.clearAllEventListeners();if(L.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n=this[eventsKey],o=i&&i!==this&&L.stamp(i),s,a,r,h,l,c,u,d,m;for(t=L.Util.splitWords(t),s=0,a=t.length;a>s;s++)if(r=t[s],c=r+"_idx",u=c+"_len",d=n[c],e){if(h=o&&d?d[o]:n[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(m=h.splice(l,1),m[0].action=L.Util.falseFn);i&&d&&0===h.length&&(delete d[o],n[u]--)}}else delete n[r],delete n[c],delete n[u];return this},clearAllEventListeners:function(){return delete this[eventsKey],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i=L.Util.extend({},e,{type:t,target:this}),n=this[eventsKey],o,s,a,r,h;if(n[t])for(o=n[t].slice(),s=0,a=o.length;a>s;s++)o[s].action.call(o[s].context,i);r=n[t+"_idx"];for(h in r)if(o=r[h].slice())for(s=0,a=o.length;a>s;s++)o[s].action.call(o[s].context,i);return this},addOneTimeEventListener:function(t,e,i){if(L.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=L.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},L.Mixin.Events.on=L.Mixin.Events.addEventListener,L.Mixin.Events.off=L.Mixin.Events.removeEventListener,L.Mixin.Events.once=L.Mixin.Events.addOneTimeEventListener,L.Mixin.Events.fire=L.Mixin.Events.fireEvent,function(){var t="ActiveXObject"in window,e=t&&!document.addEventListener,i=navigator.userAgent.toLowerCase(),n=-1!==i.indexOf("webkit"),o=-1!==i.indexOf("chrome"),s=-1!==i.indexOf("phantom"),a=-1!==i.indexOf("android"),r=-1!==i.search("android [23]"),h=-1!==i.indexOf("gecko"),l=typeof orientation!=void 0+"",c=window.navigator&&window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints&&!window.PointerEvent,u=window.PointerEvent&&window.navigator.pointerEnabled&&window.navigator.maxTouchPoints||c,d="devicePixelRatio"in window&&window.devicePixelRatio>1||"matchMedia"in window&&window.matchMedia("(min-resolution:144dpi)")&&window.matchMedia("(min-resolution:144dpi)").matches,m=document.documentElement,p=t&&"transition"in m.style,_="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!r,f="MozPerspective"in m.style,g="OTransition"in m.style,v=!window.L_DISABLE_3D&&(p||_||f||g)&&!s,y=!window.L_NO_TOUCH&&!s&&function(){var t="ontouchstart";if(u||t in m)return!0;var e=document.createElement("div"),i=!1;return e.setAttribute?(e.setAttribute(t,"return;"),"function"==typeof e[t]&&(i=!0),e.removeAttribute(t),e=null,i):!1}();L.Browser={ie:t,ielt9:e,webkit:n,gecko:h&&!n&&!window.opera&&!t,android:a,android23:r,chrome:o,ie3d:p,webkit3d:_,gecko3d:f,opera3d:g,any3d:v,mobile:l,mobileWebkit:l&&n,mobileWebkit3d:l&&_,mobileOpera:l&&window.opera,touch:y,msPointer:c,pointer:u,retina:d}}(),L.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},L.Point.prototype={clone:function(){return new L.Point(this.x,this.y)},add:function(t){return this.clone()._add(L.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(L.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,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(t){t=L.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=L.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=L.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+L.Util.formatNum(this.x)+", "+L.Util.formatNum(this.y)+")"}},L.point=function(t,e,i){return t instanceof L.Point?t:L.Util.isArray(t)?new L.Point(t[0],t[1]):void 0===t||null===t?t:new L.Point(t,e,i)},L.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},L.Bounds.prototype={extend:function(t){return t=L.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new L.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new L.Point(this.min.x,this.max.y)},getTopRight:function(){return new L.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof L.Point?L.point(t):L.bounds(t),t instanceof L.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=L.bounds(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,a=o.y>=e.y&&n.y<=i.y;return s&&a},isValid:function(){return!(!this.min||!this.max)}},L.bounds=function(t,e){return!t||t instanceof L.Bounds?t:new L.Bounds(t,e)},L.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},L.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new L.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},L.DomUtil={get:function(t){return"string"==typeof t?document.getElementById(t):t},getStyle:function(t,e){var i=t.style[e];if(!i&&t.currentStyle&&(i=t.currentStyle[e]),(!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i},getViewportOffset:function(t){var e=0,i=0,n=t,o=document.body,s=document.documentElement,a;do{if(e+=n.offsetTop||0,i+=n.offsetLeft||0,e+=parseInt(L.DomUtil.getStyle(n,"borderTopWidth"),10)||0,i+=parseInt(L.DomUtil.getStyle(n,"borderLeftWidth"),10)||0,a=L.DomUtil.getStyle(n,"position"),n.offsetParent===o&&"absolute"===a)break;if("fixed"===a){e+=o.scrollTop||s.scrollTop||0,i+=o.scrollLeft||s.scrollLeft||0;break}if("relative"===a&&!n.offsetLeft){var r=L.DomUtil.getStyle(n,"width"),h=L.DomUtil.getStyle(n,"max-width"),l=n.getBoundingClientRect();("none"!==r||"none"!==h)&&(i+=l.left+n.clientLeft),e+=l.top+(o.scrollTop||s.scrollTop||0);break}n=n.offsetParent}while(n);n=t;do{if(n===o)break;e-=n.scrollTop||0,i-=n.scrollLeft||0,n=n.parentNode}while(n);return new L.Point(i,e)},documentIsLtr:function(){return L.DomUtil._docIsLtrCached||(L.DomUtil._docIsLtrCached=!0,L.DomUtil._docIsLtr="ltr"===L.DomUtil.getStyle(document.body,"direction")),L.DomUtil._docIsLtr},create:function(t,e,i){var n=document.createElement(t);return n.className=e,i&&i.appendChild(n),n},hasClass:function(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=L.DomUtil._getClass(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)},addClass:function(t,e){if(void 0!==t.classList)for(var i=L.Util.splitWords(e),n=0,o=i.length;o>n;n++)t.classList.add(i[n]);else if(!L.DomUtil.hasClass(t,e)){var s=L.DomUtil._getClass(t);L.DomUtil._setClass(t,(s?s+" ":"")+e)}},removeClass:function(t,e){void 0!==t.classList?t.classList.remove(e):L.DomUtil._setClass(t,L.Util.trim((" "+L.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e},_getClass:function(t){return void 0===t.className.baseVal?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1},getTranslateString:function(t){var e=L.Browser.webkit3d,i="translate"+(e?"3d":"")+"(",n=(e?",0":"")+")";return i+t.x+"px,"+t.y+"px"+n},getScaleString:function(t,e){var i=L.DomUtil.getTranslateString(e.add(e.multiplyBy(-1*t))),n=" scale("+t+") ";return i+n},setPosition:function(t,e,i){t._leaflet_pos=e,!i&&L.Browser.any3d?t.style[L.DomUtil.TRANSFORM]=L.DomUtil.getTranslateString(e):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos}},L.DomUtil.TRANSFORM=L.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),L.DomUtil.TRANSITION=L.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),L.DomUtil.TRANSITION_END="webkitTransition"===L.DomUtil.TRANSITION||"OTransition"===L.DomUtil.TRANSITION?L.DomUtil.TRANSITION+"End":"transitionend",function(){if("onselectstart"in document)L.extend(L.DomUtil,{disableTextSelection:function(){L.DomEvent.on(window,"selectstart",L.DomEvent.preventDefault)},enableTextSelection:function(){L.DomEvent.off(window,"selectstart",L.DomEvent.preventDefault)}});else{var t=L.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);L.extend(L.DomUtil,{disableTextSelection:function(){if(t){var e=document.documentElement.style;this._userSelect=e[t],e[t]="none"}},enableTextSelection:function(){t&&(document.documentElement.style[t]=this._userSelect,delete this._userSelect)}})}L.extend(L.DomUtil,{disableImageDrag:function(){L.DomEvent.on(window,"dragstart",L.DomEvent.preventDefault)},enableImageDrag:function(){L.DomEvent.off(window,"dragstart",L.DomEvent.preventDefault)}})}(),L.LatLng=function(t,e,i){if(t=parseFloat(t),e=parseFloat(e),isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=t,this.lng=e,void 0!==i&&(this.alt=parseFloat(i))},L.extend(L.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),L.LatLng.prototype={equals:function(t){if(!t)return!1;t=L.latLng(t);var e=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return e<=L.LatLng.MAX_MARGIN},toString:function(t){return"LatLng("+L.Util.formatNum(this.lat,t)+", "+L.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){t=L.latLng(t);var e=6378137,i=L.LatLng.DEG_TO_RAD,n=(t.lat-this.lat)*i,o=(t.lng-this.lng)*i,s=this.lat*i,a=t.lat*i,r=Math.sin(n/2),h=Math.sin(o/2),l=r*r+h*h*Math.cos(s)*Math.cos(a);return 2*e*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))},wrap:function(t,e){var i=this.lng;return t=t||-180,e=e||180,i=(i+e)%(e-t)+(t>i||i===e?e:t),new L.LatLng(this.lat,i)}},L.latLng=function(t,e){return t instanceof L.LatLng?t:L.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new L.LatLng(t[0],t[1],t[2]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new L.LatLng(t.lat,"lng"in t?t.lng:t.lon):void 0===e?null:new L.LatLng(t,e)},L.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},L.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=L.latLng(t);return t=null!==e?e:L.latLngBounds(t),t instanceof L.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new L.LatLng(t.lat,t.lng),this._northEast=new L.LatLng(t.lat,t.lng)):t instanceof L.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this
},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new L.LatLngBounds(new L.LatLng(e.lat-n,e.lng-o),new L.LatLng(i.lat+n,i.lng+o))},getCenter:function(){return new L.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 L.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new L.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(t){t="number"==typeof t[0]||t instanceof L.LatLng?L.latLng(t):L.latLngBounds(t);var e=this._southWest,i=this._northEast,n,o;return t instanceof L.LatLngBounds?(n=t.getSouthWest(),o=t.getNorthEast()):n=o=t,n.lat>=e.lat&&o.lat<=i.lat&&n.lng>=e.lng&&o.lng<=i.lng},intersects:function(t){t=L.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,a=o.lng>=e.lng&&n.lng<=i.lng;return s&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=L.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},L.latLngBounds=function(t,e){return!t||t instanceof L.LatLngBounds?t:new L.LatLngBounds(t,e)},L.Projection={},L.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=L.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),o=t.lng*e,s=n*e;return s=Math.log(Math.tan(Math.PI/4+s/2)),new L.Point(o,s)},unproject:function(t){var e=L.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new L.LatLng(n,i)}},L.Projection.LonLat={project:function(t){return new L.Point(t.lng,t.lat)},unproject:function(t){return new L.LatLng(t.y,t.x)}},L.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return L.point(e,e)}},L.CRS.Simple=L.extend({},L.CRS,{projection:L.Projection.LonLat,transformation:new L.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),L.CRS.EPSG3857=L.extend({},L.CRS,{code:"EPSG:3857",projection:L.Projection.SphericalMercator,transformation:new L.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),L.CRS.EPSG900913=L.extend({},L.CRS.EPSG3857,{code:"EPSG:900913"}),L.CRS.EPSG4326=L.extend({},L.CRS,{code:"EPSG:4326",projection:L.Projection.LonLat,transformation:new L.Transformation(1/360,.5,-1/360,.5)}),L.Map=L.Class.extend({includes:L.Mixin.Events,options:{crs:L.CRS.EPSG3857,fadeAnimation:L.DomUtil.TRANSITION&&!L.Browser.android23,trackResize:!0,markerZoomAnimation:L.DomUtil.TRANSITION&&L.Browser.any3d},initialize:function(t,e){e=L.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=L.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&void 0!==e.zoom&&this.setView(L.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=void 0===e?this.getZoom():e,this._resetView(L.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),s=t instanceof L.Point?t:this.latLngToContainerPoint(t),a=s.subtract(o).multiplyBy(1-1/n),r=this.containerPointToLatLng(o.add(a));return this.setView(r,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():L.latLngBounds(t);var i=L.point(e.paddingTopLeft||e.padding||[0,0]),n=L.point(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n)),s=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),o),r=this.project(t.getNorthEast(),o),h=this.unproject(a.add(r).divideBy(2).add(s),o);return o=e&&e.maxZoom?Math.min(e.maxZoom,o):o,this.setView(h,o,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(L.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=L.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,t);return i.equals(n)?this:this.panTo(n,e)},addLayer:function(t){var e=L.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&L.TileLayer&&t instanceof L.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=L.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&L.TileLayer&&t instanceof L.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return t?L.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=L.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(L.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=void 0}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 t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new L.LatLngBounds(e,i)},getMinZoom:function(){return void 0===this.options.minZoom?void 0===this._layersMinZoom?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=L.latLngBounds(t);var n=this.getMinZoom()-(e?1:0),o=this.getMaxZoom(),s=this.getSize(),a=t.getNorthWest(),r=t.getSouthEast(),h=!0,l;i=L.point(i||[0,0]);do n++,l=this.project(r,n).subtract(this.project(a,n)).add(i),h=e?l.x<s.x||l.y<s.y:s.contains(l);while(h&&o>=n);return h&&e?null:e?n:n-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new L.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new L.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(L.latLng(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(L.point(t),e)},layerPointToLatLng:function(t){var e=L.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(L.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return L.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return L.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(L.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(L.latLng(t)))},mouseEventToContainerPoint:function(t){return L.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=L.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;L.DomUtil.addClass(t,"leaflet-container"+(L.Browser.touch?" leaflet-touch":"")+(L.Browser.retina?" leaflet-retina":"")+(L.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=L.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(L.DomUtil.addClass(t.markerPane,e),L.DomUtil.addClass(t.shadowPane,e),L.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return L.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?L.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var o=this._zoom!==e;n||(this.fire("movestart"),o&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):L.DomUtil.setPosition(this._mapPane,new L.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var s=!this._loaded;this._loaded=!0,s&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("viewreset",{hard:!i}),this.fire("move"),(o||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){L.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,i=-1/0,n=this._getZoomSpan();for(t in this._zoomBoundLayers){var o=this._zoomBoundLayers[t];isNaN(o.options.minZoom)||(e=Math.min(e,o.options.minZoom)),isNaN(o.options.maxZoom)||(i=Math.max(i,o.options.maxZoom))}void 0===t?this._layersMaxZoom=this._layersMinZoom=void 0:(this._layersMaxZoom=i,this._layersMinZoom=e),n!==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(L.DomEvent){t=t||"on",L.DomEvent[t](this._container,"click",this._onMouseClick,this);var e=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"],i,n;for(i=0,n=e.length;n>i;i++)L.DomEvent[t](this._container,e[i],this._fireMouseEvent,this);this.options.trackResize&&L.DomEvent[t](window,"resize",this._onResize,this)}},_onResize:function(){L.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=L.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||L.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!L.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&L.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),o=this.layerPointToLatLng(n);this.fire(e,{latlng:o,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return L.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),s=new L.Bounds(n.subtract(o),n.add(o)),a=this._getBoundsOffset(s,i,e);return this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new L.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=this.project(e.getNorthWest(),i).subtract(t.min),o=this.project(e.getSouthEast(),i).subtract(t.max),s=this._rebound(n.x,-o.x),a=this._rebound(n.y,-o.y);return new L.Point(s,a)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),L.map=function(t,e){return new L.Map(t,e)},L.DomEvent={addListener:function(t,e,i,n){var o=L.stamp(i),s="_leaflet_"+e+o,a,r,h;return t[s]?this:(a=function(e){return i.call(n||t,e||L.DomEvent._getEvent())},L.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,a,o):(L.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,a,o),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",a,!1),t.addEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?(r=a,h="mouseenter"===e?"mouseover":"mouseout",a=function(e){return L.DomEvent._checkMouse(t,e)?r(e):void 0},t.addEventListener(h,a,!1)):"click"===e&&L.Browser.android?(r=a,a=function(t){return L.DomEvent._filterClick(t,r)},t.addEventListener(e,a,!1)):t.addEventListener(e,a,!1):"attachEvent"in t&&t.attachEvent("on"+e,a),t[s]=a,this))},removeListener:function(t,e,i){var n=L.stamp(i),o="_leaflet_"+e+n,s=t[o];return s?(L.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,n):L.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",s,!1),t.removeEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",s,!1):t.removeEventListener(e,s,!1):"detachEvent"in t&&t.detachEvent("on"+e,s),t[o]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,L.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=L.DomEvent.stopPropagation;return L.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=L.DomEvent.stopPropagation,i=L.Draggable.START.length-1;i>=0;i--)L.DomEvent.on(t,L.Draggable.START[i],e);return L.DomEvent.on(t,"click",L.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return L.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new L.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new L.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){L.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var t=window.event;if(!t)for(var e=arguments.callee.caller;e&&(t=e.arguments[0],!t||window.Event!==t.constructor);)e=e.caller;return t},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=L.DomEvent._lastClick&&i-L.DomEvent._lastClick;return n&&n>100&&1e3>n||t.target._simulatedClick&&!t._simulated?void L.DomEvent.stop(t):(L.DomEvent._lastClick=i,e(t))}},L.DomEvent.on=L.DomEvent.addListener,L.DomEvent.off=L.DomEvent.removeListener,L.Draggable=L.Class.extend({includes:L.Mixin.Events,statics:{START:L.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(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=L.Draggable.START.length-1;t>=0;t--)L.DomEvent.on(this._dragStartTarget,L.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=L.Draggable.START.length-1;t>=0;t--)L.DomEvent.off(this._dragStartTarget,L.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!(t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(L.DomEvent.stopPropagation(t),L.Draggable._disabled||(L.DomUtil.disableImageDrag(),L.DomUtil.disableTextSelection(),this._moving)))){var e=t.touches?t.touches[0]:t;this._startPoint=new L.Point(e.clientX,e.clientY),this._startPos=this._newPos=L.DomUtil.getPosition(this._element),L.DomEvent.on(document,L.Draggable.MOVE[t.type],this._onMove,this).on(document,L.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new L.Point(e.clientX,e.clientY),n=i.subtract(this._startPoint);(n.x||n.y)&&(L.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=L.DomUtil.getPosition(this._element).subtract(n),L.DomUtil.addClass(document.body,"leaflet-dragging"),L.DomUtil.addClass(t.target||t.srcElement,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,L.Util.cancelAnimFrame(this._animRequest),this._animRequest=L.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget))},_updatePosition:function(){this.fire("predrag"),L.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(t){L.DomUtil.removeClass(document.body,"leaflet-dragging"),L.DomUtil.removeClass(t.target||t.srcElement,"leaflet-drag-target");for(var e in L.Draggable.MOVE)L.DomEvent.off(document,L.Draggable.MOVE[e],this._onMove).off(document,L.Draggable.END[e],this._onUp);L.DomUtil.enableImageDrag(),L.DomUtil.enableTextSelection(),this._moved&&this._moving&&(L.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),L.Handler=L.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),L.Control=L.Class.extend({options:{position:"topright"},initialize:function(t){L.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return L.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),L.control=function(t){return new L.Control(t)},L.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,o){var s=i+t+" "+i+o;e[t+o]=L.DomUtil.create("div",s,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=L.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),L.TileLayer=L.Class.extend({includes:L.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:L.Browser.mobile,updateWhenIdle:L.Browser.mobile},initialize:function(t,e){e=L.setOptions(this,e),e.detectRetina&&L.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=L.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=L.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i=t.children,n=-e(1/0,-1/0),o,s,a;for(s=0,a=i.length;a>s;s++)i[s]!==this._container&&(o=parseInt(i[s].style.zIndex,10),isNaN(o)||(n=e(n,o)));this.options.zIndex=this._container.style.zIndex=(isFinite(n)?n:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(L.Browser.ielt9)for(t in e)L.DomUtil.setOpacity(e[t],this.options.opacity);else L.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=L.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=L.DomUtil.create("div",e,this._container),this._tileContainer=L.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(isNaN(t.getZoom())&&(i=this.options.minZoom||1,t.setZoom(i)),!(i>this.options.maxZoom||i<this.options.minZoom)){var o=L.bounds(e.min.divideBy(n)._floor(),e.max.divideBy(n)._floor());this._addTilesFromCenterOut(o),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(o)}}},_addTilesFromCenterOut:function(t){var e=[],i=t.getCenter(),n,o,s;for(n=t.min.y;n<=t.max.y;n++)for(o=t.min.x;o<=t.max.x;o++)s=new L.Point(o,n),!this._tilePointIsCached()&&this._tileShouldBeLoaded(s)&&e.push(s);var a=e.length;if(0!==a){e.sort(function(t,e){return t.distanceTo(i)-e.distanceTo(i)});var r=document.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=a,o=0;a>o;o++)this._addTile(e[o],r);this._tileContainer.appendChild(r)}},_tilePointIsCached:function(t){return"undefined"==typeof t?!1:t.x+":"+t.y in this._tiles},_tileShouldBeLoaded:function(t){var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=e.tileSize,o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(i<t.min.x||i>t.max.x||n<t.min.y||n>t.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(L.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),L.Browser.android||(e.onload=null,e.src=L.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();L.DomUtil.setPosition(n,i,L.Browser.chrome),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return L.Util.template(this._url,L.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){var t=this._map.options.crs,e=t.getSize(this._map.getZoom());return e.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=L.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=L.Util.falseFn,L.Browser.ielt9&&void 0!==this.options.opacity&&L.DomUtil.setOpacity(t,this.options.opacity),L.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&L.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(L.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==L.Util.emptyImageUrl&&(L.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),L.tileLayer=function(t,e){return new L.TileLayer(t,e)},L.TileLayer.Canvas=L.TileLayer.extend({options:{async:!1},initialize:function(t){L.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=L.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=L.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),L.tileLayer.canvas=function(t){return new L.TileLayer.Canvas(t)},L.ImageOverlay=L.Class.extend({includes:L.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=L.latLngBounds(e),L.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&L.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()
},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=L.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&L.Browser.any3d?L.DomUtil.addClass(this._image,"leaflet-zoom-animated"):L.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),L.extend(this._image,{galleryimg:"no",onselectstart:L.Util.falseFn,onmousemove:L.Util.falseFn,onload:L.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),o=this._bounds.getNorthWest(),s=this._bounds.getSouthEast(),a=e._latLngToNewLayerPoint(o,t.zoom,t.center),r=e._latLngToNewLayerPoint(s,t.zoom,t.center)._subtract(a),h=a._add(r._multiplyBy(.5*(1-1/n)));i.style[L.DomUtil.TRANSFORM]=L.DomUtil.getTranslateString(h)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);L.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){L.DomUtil.setOpacity(this._image,this.options.opacity)}}),L.imageOverlay=function(t,e,i){return new L.ImageOverlay(t,e,i)},L.Icon=L.Class.extend({options:{className:""},initialize:function(t){L.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=L.point(i[e+"Size"]),o;o=L.point("shadow"===e?i.shadowAnchor||i.iconAnchor:i.iconAnchor),!o&&n&&(o=n.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+i.className,o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return L.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),L.icon=function(t){return new L.Icon(t)},L.Icon.Default=L.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];L.Browser.retina&&"icon"===t&&(t+="-2x");var i=L.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),L.Icon.Default.imagePath=function(){var t=document.getElementsByTagName("script"),e=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/,i,n,o,s,a;for(i=0,n=t.length;n>i;i++)if(o=t[i].src,s=o.match(e))return a=o.split(e)[0],(a?a+"/":"")+"images"}(),L.Marker=L.Class.extend({includes:L.Mixin.Events,options:{icon:new L.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){L.setOptions(this,e),this._latlng=L.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=L.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",o=t.icon.createIcon(this._icon),s=!1;o!==this._icon&&(this._icon&&this._removeIcon(),s=!0,t.title&&(o.title=t.title),t.alt&&(o.alt=t.alt)),L.DomUtil.addClass(o,n),t.keyboard&&(o.tabIndex="0"),this._icon=o,this._initInteraction(),t.riseOnHover&&L.DomEvent.on(o,"mouseover",this._bringToFront,this).on(o,"mouseout",this._resetZIndex,this);var a=t.icon.createShadow(this._shadow),r=!1;a!==this._shadow&&(this._removeShadow(),r=!0),a&&L.DomUtil.addClass(a,n),this._shadow=a,t.opacity<1&&this._updateOpacity();var h=this._map._panes;s&&h.markerPane.appendChild(this._icon),a&&r&&h.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&L.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(t){L.DomUtil.setPosition(this._icon,t),this._shadow&&L.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)L.DomEvent.on(t,e[i],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(t){var e=this.dragging&&this.dragging.moved();(this.hasEventListeners(t.type)||e)&&L.DomEvent.stopPropagation(t),e||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(t.type,{originalEvent:t,latlng:this._latlng})},_onKeyPress:function(t){13===t.keyCode&&this.fire("click",{originalEvent:t,latlng:this._latlng})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t,latlng:this._latlng}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&L.DomEvent.preventDefault(t),"mousedown"!==t.type?L.DomEvent.stopPropagation(t):L.DomEvent.preventDefault(t)},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){L.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&L.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),L.marker=function(t,e){return new L.Marker(t,e)},L.DivIcon=L.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;return e.innerHTML=i.html!==!1?i.html:"",i.bgPos&&(e.style.backgroundPosition=-i.bgPos.x+"px "+-i.bgPos.y+"px"),this._setIconStyles(e,"icon"),e},createShadow:function(){return null}}),L.divIcon=function(t){return new L.DivIcon(t)},L.LayerGroup=L.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e=Array.prototype.slice.call(arguments,1),i,n;for(i in this._layers)n=this._layers[i],n[t]&&n[t].apply(n,e);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return L.stamp(t)}}),L.layerGroup=function(t){return new L.LayerGroup(t)},L.FeatureGroup=L.LayerGroup.extend({includes:L.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),L.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.off(L.FeatureGroup.EVENTS,this._propagateEvent,this),L.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new L.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof L.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=L.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),L.featureGroup=function(t){return new L.FeatureGroup(t)},L.Path=L.Class.extend({includes:[L.Mixin.Events],statics:{CLIP_PADDING:function(){var t=L.Browser.mobile?1280:2e3,e=(t/Math.max(window.outerWidth,window.outerHeight)-1)/2;return Math.max(0,Math.min(.5,e))}()},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(t){L.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,L.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return L.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),L.Map.include({_updatePathViewport:function(){var t=L.Path.CLIP_PADDING,e=this.getSize(),i=L.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),o=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new L.Bounds(n,o)}}),L.Path.SVG_NS="http://www.w3.org/2000/svg",L.Browser.svg=!(!document.createElementNS||!document.createElementNS(L.Path.SVG_NS,"svg").createSVGRect),L.Path=L.Path.extend({statics:{SVG:L.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return document.createElementNS(L.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&L.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 t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(L.Browser.svg||!L.Browser.vml)&&L.DomUtil.addClass(this._path,"leaflet-clickable"),L.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e<t.length;e++)L.DomEvent.on(this._container,t[e],this._fireMouseEvent,this)}},_onMouseClick:function(t){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(t)},_fireMouseEvent:function(t){if(this.hasEventListeners(t.type)){var e=this._map,i=e.mouseEventToContainerPoint(t),n=e.containerPointToLayerPoint(i),o=e.layerPointToLatLng(n);this.fire(t.type,{latlng:o,layerPoint:n,containerPoint:i,originalEvent:t}),"contextmenu"===t.type&&L.DomEvent.preventDefault(t),"mousemove"!==t.type&&L.DomEvent.stopPropagation(t)}}}),L.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=L.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&L.Browser.any3d?(L.DomUtil.addClass(this._pathRoot,"leaflet-zoom-animated"),this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):L.DomUtil.addClass(this._pathRoot,"leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[L.DomUtil.TRANSFORM]=L.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,n=i.x-e.x,o=i.y-e.y,s=this._pathRoot,a=this._panes.overlayPane;L.Browser.mobileWebkit&&a.removeChild(s),L.DomUtil.setPosition(s,e),s.setAttribute("width",n),s.setAttribute("height",o),s.setAttribute("viewBox",[e.x,e.y,n,o].join(" ")),L.Browser.mobileWebkit&&a.appendChild(s)}}}),L.Browser.canvas=function(){return!!document.createElement("canvas").getContext}(),L.Path=L.Path.SVG&&!window.L_PREFER_CANVAS||!L.Browser.canvas?L.Path:L.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return L.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.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._map=null},_requestUpdate:function(){this._map&&!L.Path._updateRequest&&(L.Path._updateRequest=L.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){L.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color)},_drawPath:function(){var t,e,i,n,o,s;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)o=this._parts[t][e],s=(0===e?"move":"line")+"To",this._ctx[s](o.x,o.y);this instanceof L.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill()),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onClick,this))},_onClick:function(t){this._containsPoint(t.layerPoint)&&this.fire("click",t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),L.Map.include(L.Path.SVG&&!window.L_PREFER_CANVAS||!L.Browser.canvas?{}:{_initPathRoot:function(){var t=this._pathRoot,e;t||(t=this._pathRoot=document.createElement("canvas"),t.style.position="absolute",e=this._canvasCtx=t.getContext("2d"),e.lineCap="round",e.lineJoin="round",this._panes.overlayPane.appendChild(t),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 t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;L.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),L.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var i=t.length,n=typeof Uint8Array!=void 0+""?Uint8Array:Array,o=new n(i);o[0]=o[i-1]=1,this._simplifyDPStep(t,o,e,0,i-1);var s,a=[];for(s=0;i>s;s++)o[s]&&a.push(t[s]);return a},_simplifyDPStep:function(t,e,i,n,o){var s=0,a,r,h;for(r=n+1;o-1>=r;r++)h=this._sqClosestPointOnSegment(t[r],t[n],t[o],!0),h>s&&(a=r,s=h);s>i&&(e[a]=1,this._simplifyDPStep(t,e,i,n,a),this._simplifyDPStep(t,e,i,a,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o=n?this._lastCode:this._getBitCode(t,i),s=this._getBitCode(e,i),a,r,h;for(this._lastCode=s;;){if(!(o|s))return[t,e];if(o&s)return!1;a=o||s,r=this._getEdgeIntersection(t,e,a,i),h=this._getBitCode(r,i),a===o?(t=r,o=h):(e=r,s=h)}},_getEdgeIntersection:function(t,e,i,n){var o=e.x-t.x,s=e.y-t.y,a=n.min,r=n.max;return 8&i?new L.Point(t.x+o*(r.y-t.y)/s,r.y):4&i?new L.Point(t.x+o*(a.y-t.y)/s,a.y):2&i?new L.Point(r.x,t.y+s*(r.x-t.x)/o):1&i?new L.Point(a.x,t.y+s*(a.x-t.x)/o):void 0},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var o=e.x,s=e.y,a=i.x-o,r=i.y-s,h=a*a+r*r,l;return h>0&&(l=((t.x-o)*a+(t.y-s)*r)/h,l>1?(o=i.x,s=i.y):l>0&&(o+=a*l,s+=r*l)),a=t.x-o,r=t.y-s,n?a*a+r*r:new L.Point(o,s)}},L.Polyline=L.Path.extend({initialize:function(t,e){L.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(L.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e=1/0,i=this._parts,n,o,s=null,a=0,r=i.length;r>a;a++)for(var h=i[a],l=1,c=h.length;c>l;l++){n=h[l-1],o=h[l];var u=L.LineUtil._sqClosestPointOnSegment(t,n,o,!0);e>u&&(e=u,s=L.LineUtil._sqClosestPointOnSegment(t,n,o))}return s&&(s.distance=Math.sqrt(e)),s},getBounds:function(){return new L.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,o=e?t:[];for(i=0,n=t.length;n>i;i++){if(L.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;o[i]=L.latLng(t[i])}return o},_initEvents:function(){L.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e=L.Path.VML,i=0,n=t.length,o="",s;n>i;i++)s=t[i],e&&s._round(),o+=(i?"L":"M")+s.x+" "+s.y;return o},_clipPoints:function(){var t=this._originalPoints,e=t.length,i,n,o;if(this.options.noClip)return void(this._parts=[t]);this._parts=[];var s=this._parts,a=this._map._pathViewport,r=L.LineUtil;for(i=0,n=0;e-1>i;i++)o=r.clipSegment(t[i],t[i+1],a,i),o&&(s[n]=s[n]||[],s[n].push(o[0]),(o[1]!==t[i+1]||i===e-2)&&(s[n].push(o[1]),n++))},_simplifyPoints:function(){for(var t=this._parts,e=L.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),L.Path.prototype._updatePath.call(this))}}),L.polyline=function(t,e){return new L.Polyline(t,e)},L.PolyUtil={},L.PolyUtil.clipPolygon=function(t,e){var i,n=[1,4,2,8],o,s,a,r,h,l,c,u,d=L.LineUtil;for(o=0,l=t.length;l>o;o++)t[o]._code=d._getBitCode(t[o],e);for(a=0;4>a;a++){for(c=n[a],i=[],o=0,l=t.length,s=l-1;l>o;s=o++)r=t[o],h=t[s],r._code&c?h._code&c||(u=d._getEdgeIntersection(h,r,c,e),u._code=d._getBitCode(u,e),i.push(u)):(h._code&c&&(u=d._getEdgeIntersection(h,r,c,e),u._code=d._getBitCode(u,e),i.push(u)),i.push(r));t=i}return t},L.Polygon=L.Polyline.extend({options:{fill:!0},initialize:function(t,e){L.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,n;if(t&&L.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)n=this._holes[e]=this._convertLatLngs(this._holes[e]),n[0].equals(n[n.length-1])&&n.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(L.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&L.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):L.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var o=L.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);o.length&&e.push(o)}this._parts=e}},_getPathPartStr:function(t){var e=L.Polyline.prototype._getPathPartStr.call(this,t);return e+(L.Browser.svg?"z":"x")}}),L.polygon=function(t,e){return new L.Polygon(t,e)},function(){function t(t){return L.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}L.MultiPolyline=t(L.Polyline),L.MultiPolygon=t(L.Polygon),L.multiPolyline=function(t,e){return new L.MultiPolyline(t,e)},L.multiPolygon=function(t,e){return new L.MultiPolygon(t,e)}}(),L.Rectangle=L.Polygon.extend({initialize:function(t,e){L.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=L.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),L.rectangle=function(t,e){return new L.Rectangle(t,e)},L.Circle=L.Path.extend({initialize:function(t,e,i){L.Path.prototype.initialize.call(this,i),this._latlng=L.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=L.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new L.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":L.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(L.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+e<t.min.x||i.y+e<t.min.y}}),L.circle=function(t,e,i){return new L.Circle(t,e,i)},L.CircleMarker=L.Circle.extend({options:{radius:10,weight:2},initialize:function(t,e){L.Circle.prototype.initialize.call(this,t,null,e),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){L.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setLatLng:function(t){return L.Circle.prototype.setLatLng.call(this,t),this._popup&&this._popup._isOpen&&this._popup.setLatLng(t),this},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius}}),L.circleMarker=function(t,e){return new L.CircleMarker(t,e)},L.Polyline.include(L.Path.CANVAS?{_containsPoint:function(t,e){var i,n,o,s,a,r,h,l=this.options.weight/2;for(L.Browser.touch&&(l+=10),i=0,s=this._parts.length;s>i;i++)for(h=this._parts[i],n=0,a=h.length,o=a-1;a>n;o=n++)if((e||0!==n)&&(r=L.LineUtil.pointToSegmentDistance(t,h[o],h[n]),l>=r))return!0;return!1}}:{}),L.Map.mergeOptions({dragging:!0,inertia:!L.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:L.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),L.Map.Drag=L.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new L.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=+new Date-this._lastTime,o=!i.inertia||n>i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),o)e.fire("moveend");else{var s=this._lastPos.subtract(this._positions[0]),a=(this._lastTime+n-this._times[0])/1e3,r=i.easeLinearity,h=s.multiplyBy(r/a),l=h.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,l),u=h.multiplyBy(c/l),d=c/(i.inertiaDeceleration*r),m=u.multiplyBy(-d/2).round();m.x&&m.y?(m=e._limitOffset(m,e.options.maxBounds),L.Util.requestAnimFrame(function(){e.panBy(m,{duration:d,easeLinearity:r,noMoveStart:!0})})):e.fire("moveend")}}}),L.Map.addInitHook("addHandler","dragging",L.Map.Drag),L.Map.mergeOptions({doubleClickZoom:!0}),L.Map.DoubleClickZoom=L.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),L.Map.addInitHook("addHandler","doubleClickZoom",L.Map.DoubleClickZoom),L.Map.mergeOptions({scrollWheelZoom:!0}),L.Map.ScrollWheelZoom=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),L.DomEvent.on(this._map._container,"MozMousePixelScroll",L.DomEvent.preventDefault),this._delta=0},removeHooks:function(){L.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),L.DomEvent.off(this._map._container,"MozMousePixelScroll",L.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=L.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(L.bind(this._performZoom,this),i),L.DomEvent.preventDefault(t),L.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();
e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),L.Map.addInitHook("addHandler","scrollWheelZoom",L.Map.ScrollWheelZoom),L.extend(L.DomEvent,{_touchstart:L.Browser.msPointer?"MSPointerDown":L.Browser.pointer?"pointerdown":"touchstart",_touchend:L.Browser.msPointer?"MSPointerUp":L.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,e,i){function n(t){var e;if(L.Browser.pointer?(d.push(t.pointerId),e=d.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(s||i);h=t.touches?t.touches[0]:t,a=n>0&&r>=n,s=i}}function o(t){if(L.Browser.pointer){var i=d.indexOf(t.pointerId);if(-1===i)return;d.splice(i,1)}if(a){if(L.Browser.pointer){var n={},o;for(var r in h)o=h[r],n[r]="function"==typeof o?o.bind(h):o;h=n}h.type="dblclick",e(h),s=null}}var s,a=!1,r=250,h,l="_leaflet_",c=this._touchstart,u=this._touchend,d=[];t[l+c+i]=n,t[l+u+i]=o;var m=L.Browser.pointer?document.documentElement:t;return t.addEventListener(c,n,!1),m.addEventListener(u,o,!1),L.Browser.pointer&&m.addEventListener(L.DomEvent.POINTER_CANCEL,o,!1),this},removeDoubleTapListener:function(t,e){var i="_leaflet_";return t.removeEventListener(this._touchstart,t[i+this._touchstart+e],!1),(L.Browser.pointer?document.documentElement:t).removeEventListener(this._touchend,t[i+this._touchend+e],!1),L.Browser.pointer&&document.documentElement.removeEventListener(L.DomEvent.POINTER_CANCEL,t[i+this._touchend+e],!1),this}}),L.extend(L.DomEvent,{POINTER_DOWN:L.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:L.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:L.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:L.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,n){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,n);case"touchend":return this.addPointerListenerEnd(t,e,i,n);case"touchmove":return this.addPointerListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,e,i,n){var o="_leaflet_",s=this._pointers,a=function(t){L.DomEvent.preventDefault(t);for(var e=!1,n=0;n<s.length;n++)if(s[n].pointerId===t.pointerId){e=!0;break}e||s.push(t),t.touches=s.slice(),t.changedTouches=[t],i(t)};if(t[o+"touchstart"+n]=a,t.addEventListener(this.POINTER_DOWN,a,!1),!this._pointerDocumentListener){var r=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}};document.documentElement.addEventListener(this.POINTER_UP,r,!1),document.documentElement.addEventListener(this.POINTER_CANCEL,r,!1),this._pointerDocumentListener=!0}return this},addPointerListenerMove:function(t,e,i,n){function o(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons){for(var e=0;e<a.length;e++)if(a[e].pointerId===t.pointerId){a[e]=t;break}t.touches=a.slice(),t.changedTouches=[t],i(t)}}var s="_leaflet_",a=this._pointers;return t[s+"touchmove"+n]=o,t.addEventListener(this.POINTER_MOVE,o,!1),this},addPointerListenerEnd:function(t,e,i,n){var o="_leaflet_",s=this._pointers,a=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}t.touches=s.slice(),t.changedTouches=[t],i(t)};return t[o+"touchend"+n]=a,t.addEventListener(this.POINTER_UP,a,!1),t.addEventListener(this.POINTER_CANCEL,a,!1),this},removePointerListener:function(t,e,i){var n="_leaflet_",o=t[n+e+i];switch(e){case"touchstart":t.removeEventListener(this.POINTER_DOWN,o,!1);break;case"touchmove":t.removeEventListener(this.POINTER_MOVE,o,!1);break;case"touchend":t.removeEventListener(this.POINTER_UP,o,!1),t.removeEventListener(this.POINTER_CANCEL,o,!1)}return this}}),L.Map.mergeOptions({touchZoom:L.Browser.touch&&!L.Browser.android23,bounceAtZoomLimits:!0}),L.Map.TouchZoom=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){L.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]),o=e._getCenterLayerPoint();this._startCenter=i.add(n)._divideBy(2),this._startDist=i.distanceTo(n),this._moved=!1,this._zooming=!0,this._centerOffset=o.subtract(this._startCenter),e._panAnim&&e._panAnim.stop(),L.DomEvent.on(document,"touchmove",this._onTouchMove,this).on(document,"touchend",this._onTouchEnd,this),L.DomEvent.preventDefault(t)}},_onTouchMove:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(n)/this._startDist,this._delta=i._add(n)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(e.options.bounceAtZoomLimits||!(e.getZoom()===e.getMinZoom()&&this._scale<1||e.getZoom()===e.getMaxZoom()&&this._scale>1))&&(this._moved||(L.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),L.Util.cancelAnimFrame(this._animRequest),this._animRequest=L.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),L.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,L.DomUtil.removeClass(t._mapPane,"leaflet-touching"),L.Util.cancelAnimFrame(this._animRequest),L.DomEvent.off(document,"touchmove",this._onTouchMove).off(document,"touchend",this._onTouchEnd);var e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getZoom(),o=t.getScaleZoom(this._scale)-n,s=o>0?Math.ceil(o):Math.floor(o),a=t._limitZoom(n+s),r=t.getZoomScale(a)/this._scale;t._animateZoom(i,a,e,r)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),L.Map.addInitHook("addHandler","touchZoom",L.Map.TouchZoom),L.Map.mergeOptions({tap:!0,tapTolerance:15}),L.Map.Tap=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){L.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(L.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],i=e.target;this._startPos=this._newPos=new L.Point(e.clientX,e.clientY),i.tagName&&"a"===i.tagName.toLowerCase()&&L.DomUtil.addClass(i,"leaflet-active"),this._holdTimeout=setTimeout(L.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),L.DomEvent.on(document,"touchmove",this._onMove,this).on(document,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),L.DomEvent.off(document,"touchmove",this._onMove,this).off(document,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&L.DomUtil.removeClass(i,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new L.Point(e.clientX,e.clientY)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}}),L.Browser.touch&&!L.Browser.pointer&&L.Map.addInitHook("addHandler","tap",L.Map.Tap),L.Control.Zoom=L.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=L.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,o,s){var a=L.DomUtil.create("a",i,n);a.innerHTML=t,a.href="#",a.title=e;var r=L.DomEvent.stopPropagation;return L.DomEvent.on(a,"click",r).on(a,"mousedown",r).on(a,"dblclick",r).on(a,"click",L.DomEvent.preventDefault).on(a,"click",o,s).on(a,"click",this._refocusOnMap,s),a},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";L.DomUtil.removeClass(this._zoomInButton,e),L.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&L.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&L.DomUtil.addClass(this._zoomInButton,e)}}),L.Map.mergeOptions({zoomControl:!0}),L.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new L.Control.Zoom,this.addControl(this.zoomControl))}),L.control.zoom=function(t){return new L.Control.Zoom(t)},L.Control.Attribution=L.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){L.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=L.DomUtil.create("div","leaflet-control-attribution"),L.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),L.Map.mergeOptions({attributionControl:!0}),L.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new L.Control.Attribution).addTo(this))}),L.control.attribution=function(t){return new L.Control.Attribution(t)},L.PosAnimation=L.Class.extend({includes:L.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[L.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",L.DomEvent.on(t,L.DomUtil.TRANSITION_END,this._onTransitionEnd,this),L.DomUtil.setPosition(t,e),L.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(L.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(L.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),L.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var t,e,i,n=this._el,o=window.getComputedStyle(n);if(L.Browser.any3d){if(i=o[L.DomUtil.TRANSFORM].match(this._transformRe),!i)return;t=parseFloat(i[1]),e=parseFloat(i[2])}else t=parseFloat(o.left),e=parseFloat(o.top);return new L.Point(t,e,!0)},_onTransitionEnd:function(){L.DomEvent.off(this._el,L.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[L.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),L.Map.include({setView:function(t,e,i){if(e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(L.latLng(t),e,this.options.maxBounds),i=i||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!i.reset&&i!==!0){void 0!==i.animate&&(i.zoom=L.extend({animate:i.animate},i.zoom),i.pan=L.extend({animate:i.animate},i.pan));var n=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan);if(n)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=L.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new L.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){L.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){L.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),L.PosAnimation=L.DomUtil.TRANSITION?L.PosAnimation:L.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=L.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=L.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));L.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){L.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),L.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),L.DomUtil.TRANSITION&&L.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&L.DomUtil.TRANSITION&&L.Browser.any3d&&!L.Browser.android23&&!L.Browser.mobileOpera,this._zoomAnimated&&L.DomEvent.on(this._mapPane,L.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),L.Map.include(L.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return i.animate===!0||this.getSize().contains(o)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,o,s){this._animatingZoom=!0,L.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,L.Draggable&&(L.Draggable._disabled=!0),this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:o,backwards:s})},_onZoomTransitionEnd:function(){this._animatingZoom=!1,L.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),L.Draggable&&(L.Draggable._disabled=!1)}}:{}),L.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=L.DomUtil.TRANSFORM,n=t.delta?L.DomUtil.getTranslateString(t.delta):e.style[i],o=L.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?o+" "+n:n+" "+o},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),L.Util.falseFn(e.offsetWidth),this._animating=!1},_clearBgBuffer:function(){var t=this._map;!t||t._animatingZoom||t.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[L.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,e=this._bgBuffer,i=this._getLoadedTilesPercentage(e),n=this._getLoadedTilesPercentage(t);return e&&i>.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[L.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e=t.getElementsByTagName("img"),i,n,o=0;for(i=0,n=e.length;n>i;i++)e[i].complete&&o++;return o/n},_stopLoadingImages:function(t){var e=Array.prototype.slice.call(t.getElementsByTagName("img")),i,n,o;for(i=0,n=e.length;n>i;i++)o=e[i],o.complete||(o.onload=L.Util.falseFn,o.onerror=L.Util.falseFn,o.src=L.Util.emptyImageUrl,o.parentNode.removeChild(o))}}),L.TileLayer.Zoomify=L.TileLayer.extend({options:{continuousWorld:!0,tolerance:.8},initialize:function(t,e){e=L.setOptions(this,e),this._url=t;var i=L.point(e.width,e.height),n=e.tileSize;for(this._imageSize=[i],this._gridSize=[this._getGridSize(i)];i.x>n||i.y>n;)i=i.divideBy(2).floor(),this._imageSize.push(i),this._gridSize.push(this._getGridSize(i));this._imageSize.reverse(),this._gridSize.reverse(),this.options.maxZoom=this._gridSize.length-1},onAdd:function(t){L.TileLayer.prototype.onAdd.call(this,t);var e=t.getSize(),i=this._getBestFitZoom(e),n=this._imageSize[i],o=t.options.crs.pointToLatLng(L.point(n.x/2,n.y/2),i)},getZoomifyBounds:function(t){var e=this._imageSize[0],i=t.options.crs.pointToLatLng(L.point(0,0),0),n=t.options.crs.pointToLatLng(L.point(e.x,e.y),0),o=L.latLngBounds(i,n);return o},getCenterZoom:function(t){var e=t.getSize(),i=this._getBestFitZoom(e),n=this._imageSize[i],o=t.options.crs.pointToLatLng(L.point(n.x/2,n.y/2),i);return{center:o,lat:o.lat,lon:o.lng,zoom:i}},_getGridSize:function(t){var e=this.options.tileSize;return L.point(Math.ceil(t.x/e),Math.ceil(t.y/e))},_getBestFitZoom:function(t){for(var e=this.options.tolerance,i=this._imageSize.length-1,n,i;i;){if(n=this._imageSize[i],n.x*e<t.x&&n.y*e<t.y)return i;i--}return i},_tileShouldBeLoaded:function(t){var e=this._gridSize[this._map.getZoom()];return e?t.x>=0&&t.x<e.x&&t.y>=0&&t.y<e.y:(console.log("_tileShouldBeLoaded: No gridSize for "+this._map.getZoom()),!1)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile(),o=this._map.getZoom(),s=this._imageSize[o],a=this._gridSize[o],r=this.options.tileSize;t.x===a.x-1&&(n.style.width=s.x-r*(a.x-1)+"px"),t.y===a.y-1&&(n.style.height=s.y-r*(a.y-1)+"px"),L.DomUtil.setPosition(n,i,L.Browser.chrome||L.Browser.android23),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},getTileUrl:function(t){return this._url+"TileGroup"+this._getTileGroup(t)+"/"+this._map.getZoom()+"-"+t.x+"-"+t.y+".jpg"},_getTileGroup:function(t){var e=this._map.getZoom(),i=0,n;for(z=0;e>z;z++)n=this._gridSize[z],i+=n.x*n.y;return i+=t.y*this._gridSize[e].x+t.x,Math.floor(i/256)}}),L.tileLayer.zoomify=function(t,e){return new L.TileLayer.Zoomify(t,e)},L.Control.MiniMap=L.Control.extend({options:{position:"bottomright",toggleDisplay:!1,zoomLevelOffset:-5,zoomLevelFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,show_view:!0,width:150,height:150,aimingRectOptions:{color:"#c34528",weight:1,clickable:!1,stroke:!0},shadowRectOptions:{color:"#000000",weight:1,clickable:!1,opacity:0,fillOpacity:0}},hideText:"Hide MiniMap",showText:"Show MiniMap",initialize:function(t,e){L.Util.setOptions(this,e),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=t},onAdd:function(t){return this._mainMap=t,this._container=L.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",L.DomEvent.disableClickPropagation(this._container),L.DomEvent.on(this._container,"mousewheel",L.DomEvent.stopPropagation),this._miniMap=new L.Map(this._container,{attributionControl:!1,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:!1,scrollWheelZoom:!1,doubleClickZoom:!1,boxZoom:!1,dragging:!1,crs:t.options.crs}),this._miniMap.addLayer(this._layer),this._mainMapMoving=!1,this._miniMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._miniMap.whenReady(L.Util.bind(function(){this._aimingRect=L.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=L.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._locationCircle=L.circleMarker(this._mainMap.getCenter(),{fillColor:"#c34528",color:"#FFFFFF",weight:2,radius:10,fill:!0,fillOpacity:1,stroke:!0,clickable:!1}).addTo(this._miniMap),this._locationCircle.setRadius(5),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this.options.bounds_array&&this._miniMap.fitBounds(this.options.bounds_array,{padding:[15,15]})},this)),this._container},minimize:function(t){this._minimized||this._minimize()},restore:function(){this._minimized&&(this._restore(),this._miniMap.fitBounds(this.options.bounds_array,{padding:[15,15]}))},addTo:function(t){return L.Control.prototype.addTo.call(this,t),this._miniMap.setView(this._mainMap.getCenter(),this._decideZoom(!0)),this._setDisplay(this._decideMinimized()),this},onRemove:function(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._miniMap.off("moveend",this._onMiniMapMoved,this),this._miniMap.removeLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this.hideText,"leaflet-control-minimap-toggle-display",this._container,this._toggleDisplayButtonClicked,this):void 0},_createButton:function(t,e,i,n,o,s){var a=L.DomUtil.create("a",i,n);a.innerHTML=t,a.href="#",a.title=e;var r=L.DomEvent.stopPropagation;return L.DomEvent.on(a,"click",r).on(a,"mousedown",r).on(a,"dblclick",r).on(a,"click",L.DomEvent.preventDefault).on(a,"click",o,s),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?(this._restore(),this._toggleDisplayButton.title=this.hideText):(this._minimize(),this._toggleDisplayButton.title=this.showText)},_setDisplay:function(t){t!=this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize:function(){this._container.style.width="0px",this._container.style.height="0px",this._minimized=!0},_restore:function(){this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._minimized=!1},_onMainMapMoved:function(t){if(this._miniMapMoving)this._miniMapMoving=!1;else{var e=this._decideZoom(!0);this._mainMapMoving=!0,this._setDisplay(this._decideMinimized())}this.options.show_view&&this._aimingRect.setBounds(this._mainMap.getBounds()),this._locationCircle.setLatLng(this._mainMap.getCenter())},_onMainMapMoving:function(t){this.options.show_view&&this._aimingRect.setBounds(this._mainMap.getBounds()),this._locationCircle.setLatLng(this._mainMap.getCenter())},_onMiniMapMoveStarted:function(t){var e=this._aimingRect.getBounds(),i=this._miniMap.latLngToContainerPoint(e.getSouthWest()),n=this._miniMap.latLngToContainerPoint(e.getNorthEast());this._lastAimingRectPosition={sw:i,ne:n}},_onMiniMapMoving:function(t){!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new L.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onMiniMapMoved:function(t){this._mainMapMoving?this._mainMapMoving=!1:(this._miniMapMoving=!0,this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_decideZoom:function(t){if(this.options.zoomLevelFixed||0==this.options.zoomLevelFixed)return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()+this.options.zoomLevelOffset;var e=this._miniMap.getZoom()-this._mainMap.getZoom(),i=this._miniMap.getZoom()-this.options.zoomLevelOffset,n;return e>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset?this._miniMap.getZoom()>this._lastMiniMapZoom?(n=this._mainMap.getZoom()+1,this._miniMap.setZoom(this._miniMap.getZoom()-1)):n=this._mainMap.getZoom():n=i,this._lastMiniMapZoom=this._miniMap.getZoom(),n},_decideMinimized:function(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?this._mainMap.getBounds().contains(this._miniMap.getBounds())?!0:!1:this._minimized}}),L.Map.mergeOptions({miniMapControl:!1}),L.Map.addInitHook(function(){this.options.miniMapControl&&(this.miniMapControl=(new L.Control.MiniMap).addTo(this))}),L.control.minimap=function(t){return new L.Control.MiniMap(t)},function(t){function e(t,e,n){for(var a=i(t),r=0;r<e.length;r++){var h=[t,e[r]].join("-");s[h]=o(h,n||a.type,a.minZoom,a.maxZoom)}}function i(t){if(t in s)return s[t];throw"No such provider ("+t+")"}var n="a b c d".split(" "),o=function(t,e,i,o){return{url:["http://stamen-tiles-{S}.a.ssl.fastly.net/",t,"/{Z}/{X}/{Y}.",e].join(""),type:e,subdomains:n.slice(),minZoom:i,maxZoom:o,attribution:["<a href='http://leafletjs.com' title='A JS library for interactive maps'>Leaflet</a> | ",'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ','under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. ','Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, ','under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.'].join("")}},s={toner:o("toner","png",0,20),terrain:o("terrain","jpg",4,18),watercolor:o("watercolor","jpg",1,16),"trees-cabs-crime":{url:"http://{S}.tiles.mapbox.com/v3/stamen.trees-cabs-crime/{Z}/{X}/{Y}.png",type:"png",subdomains:"a b c d".split(" "),minZoom:11,maxZoom:18,extent:[{lat:37.853,lon:-122.577},{lat:37.684,lon:-122.313}],attribution:['Design by Shawn Allen at <a href="http://stamen.com">Stamen</a>.','Data courtesy of <a href="http://fuf.net">FuF</a>,','<a href="http://www.yellowcabsf.com">Yellow Cab</a>','& <a href="http://sf-police.org">SFPD</a>.'].join(" ")}};if(e("toner",["hybrid","labels","lines","background","lite"]),e("toner",["2010"]),e("toner",["2011","2011-lines","2011-labels","2011-lite"]),e("terrain",["background"]),e("terrain",["labels","lines"],"png"),t.stamen=t.stamen||{},t.stamen.tile=t.stamen.tile||{},t.stamen.tile.providers=s,t.stamen.tile.getProvider=i,"object"==typeof MM){var a="function"==typeof MM.Template?MM.Template:MM.TemplatedMapProvider;MM.StamenTileLayer=function(t){var e=i(t);this._provider=e,MM.Layer.call(this,new a(e.url,e.subdomains)),this.provider.setZoomRange(e.minZoom,e.maxZoom),this.attribution=e.attribution},MM.StamenTileLayer.prototype={setCoordLimits:function(t){var e=this._provider;return e.extent?(t.coordLimits=[t.locationCoordinate(e.extent[0]).zoomTo(e.minZoom),t.locationCoordinate(e.extent[1]).zoomTo(e.maxZoom)],!0):!1}},MM.extend(MM.StamenTileLayer,MM.Layer)}"object"==typeof L&&(L.StamenTileLayer=L.TileLayer.extend({initialize:function(t,e){var n=i(t),o=n.url.replace(/({[A-Z]})/g,function(t){return t.toLowerCase()}),s={minZoom:n.minZoom,maxZoom:n.maxZoom,subdomains:n.subdomains,scheme:"xyz",attribution:n.attribution};e&&VCO.Util.mergeData(s,e),L.TileLayer.prototype.initialize.call(this,o,s)}})),"object"==typeof google&&"object"==typeof google.maps&&(google.maps.StamenMapType=function(t){var e=i(t),n=e.subdomains;return google.maps.ImageMapType.call(this,{getTileUrl:function(t,i){var o=1<<i,s=t.x%o,a=0>s?s+o:s,r=t.y,h=(i+a+r)%n.length;return e.url.replace("{S}",n[h]).replace("{Z}",i).replace("{X}",a).replace("{Y}",r)},tileSize:new google.maps.Size(256,256),name:t,minZoom:e.minZoom,maxZoom:e.maxZoom})},google.maps.StamenMapType.prototype=new google.maps.ImageMapType("_"))}("undefined"==typeof exports?this:exports),VCO.MapMarker=VCO.Class.extend({includes:[VCO.Events],initialize:function(t,e){this._el={container:{},content_container:{},content:{}},this._marker={},this._icon={},this._custom_icon=!1,this._custom_icon_url="",this._custom_image_icon=!1,this.marker_number=0,this.media_icon_class="",this.timer={},this.data={},this.options={duration:1e3,ease:VCO.Ease.easeInSpline,width:600,height:600,map_popup:!1,use_custom_markers:!1},this.animator=null,VCO.Util.mergeData(this.options,e),VCO.Util.mergeData(this.data,t),this._initLayout()},show:function(){},hide:function(){},addTo:function(t){this._addTo(t)},removeFrom:function(t){this._removeFrom(t)},updateDisplay:function(t,e,i){this._updateDisplay(t,e,i)},createMarker:function(t,e){this._createMarker(t,e)},createPopup:function(t,e){this._createPopup(t,e)},active:function(t){this._active(t)},location:function(){return this._location()},_createMarker:function(t,e){},_addTo:function(t){},_removeFrom:function(t){},_createPopup:function(t,e){},_active:function(t){},_location:function(){return{lat:0,lng:0}},_onMarkerClick:function(t){this.fire("markerclick",{marker_number:this.marker_number})},_initLayout:function(){this._createMarker(this.data,this.options)},_updateDisplay:function(t,e,i){}}),VCO.Map=VCO.Class.extend({includes:[VCO.Events,VCO.DomMixins],_el:{},initialize:function(t,e,i){this._el={container:{},map:{},map_mask:{}},this._el.container="object"==typeof t?t:VCO.Dom.get(t),this._loaded={data:!1,map:!1},this._map=null,this._mini_map=null,this._markers=[],this.zoom_min_max={min:null,max:null},this._line=null,this._line_active=null,this.current_marker=0,this.bounds_array=null,this._tile_layer=null,this._tile_layer_mini=null,this._image_layer=null,this.data={uniqueid:"",slides:[{test:"yes"},{test:"yes"},{test:"yes"}]},this.options={map_type:"stamen:toner-lite",map_as_image:!1,map_mini:!1,map_background_color:"#d9d9d9",map_subdomains:"",zoomify:{path:"",width:"",height:"",tolerance:.8,attribution:""},skinny_size:650,less_bounce:!0,path_gfx:"gfx",start_at_slide:0,map_popup:!1,zoom_distance:100,calculate_zoom:!0,line_follows_path:!0,line_color:"#333",line_color_inactive:"#000",line_weight:5,line_opacity:.2,line_dash:"5,5",line_join:"miter",show_lines:!0,show_history_line:!0,use_custom_markers:!1,map_center_offset:null},this.animator=null,this.timer=null,this.touch_scale=1,this.scroll={start_time:null},VCO.Util.mergeData(this.options,i),VCO.Util.mergeData(this.data,e),this._initLayout(),this._initEvents(),this._createMap(),this._initData()},updateDisplay:function(t,e,i,n,o){this._updateDisplay(t,e,i,n,o)},goTo:function(t,e){if(t<this._markers.length&&t>=0){var i=0,n=this.current_marker;this.current_marker=t;var o=this._markers[this.current_marker];if(this.animator&&this.animator.stop(),this._resetMarkersActive(),o.data.type&&"overview"==o.data.type)this._markerOverview(),e||this._onMarkerChange();
else if(o.active(!0),e)o.data.location&&this._viewTo(o.data.location);else{if(o.data.location&&o.data.location.lat)if(i=this._calculateZoomChange(this._getMapCenter(!0),o.location()),this._viewTo(o.data.location,{calculate_zoom:this.options.calculate_zoom,zoom:i}),this.options.line_follows_path){if(this.options.show_history_line&&o.data.real_marker&&this._markers[n].data.real_marker){var s=[],a=n,r;if(a<this.current_marker)for(;a<this.current_marker;)this._markers[a].data.location&&this._markers[a].data.location.lat&&(r={lat:this._markers[a].data.location.lat,lon:this._markers[a].data.location.lon},s.push(r)),a++;else if(a>this.current_marker)for(;a>this.current_marker;)this._markers[a].data.location&&this._markers[a].data.location.lat&&(r={lat:this._markers[a].data.location.lat,lon:this._markers[a].data.location.lon},s.push(r)),a--;s.push({lat:o.data.location.lat,lon:o.data.location.lon}),this._replaceLines(this._line_active,s)}}else this.options.show_history_line&&o.data.real_marker&&this._markers[n].data.real_marker&&this._replaceLines(this._line_active,[{lat:o.data.location.lat,lon:o.data.location.lon},{lat:this._markers[n].data.location.lat,lon:this._markers[n].data.location.lon}]);else this._markerOverview(),e||this._onMarkerChange();this._onMarkerChange()}}},panTo:function(t,e){this._panTo(t,e)},zoomTo:function(t,e){this._zoomTo(t,e)},viewTo:function(t,e){this._viewTo(t,e)},getBoundsZoom:function(t,e,i,n){this.__getBoundsZoom(t,e,i,n)},markerOverview:function(){this._markerOverview()},calculateMarkerZooms:function(){this._calculateMarkerZooms()},createMiniMap:function(){this._createMiniMap()},setMapOffset:function(t,e){this.options.map_center_offset.left=t,this.options.map_center_offset.top=e},calculateMinMaxZoom:function(){for(var t=0;t<this._markers.length;t++)this._markers[t].data.location&&this._markers[t].data.location.zoom&&this.updateMinMaxZoom(this._markers[t].data.location.zoom);trace("MAX ZOOM: "+this.zoom_min_max.max+" MIN ZOOM: "+this.zoom_min_max.min)},updateMinMaxZoom:function(t){this.zoom_min_max.max||(this.zoom_min_max.max=t),this.zoom_min_max.min||(this.zoom_min_max.min=t),this.zoom_min_max.max<t&&(this.zoom_min_max.max=t),this.zoom_min_max.min>t&&(this.zoom_min_max.min=t)},initialMapLocation:function(){this._loaded.data&&this._loaded.map&&(this.goTo(this.options.start_at_slide,!0),this._initialMapLocation())},show:function(){},hide:function(){},addTo:function(t){t.appendChild(this._el.container),this.onAdd()},removeFrom:function(t){t.removeChild(this._el.container),this.onRemove()},createMarkers:function(t){this._createMarkers(t)},createMarker:function(t){this._createMarker(t)},_destroyMarker:function(t){this._removeMarker(t);for(var e=0;e<this._markers.length;e++)this._markers[e]==t&&this._markers.splice(e,1);this.fire("markerRemoved",t)},_createMarkers:function(t){for(var e=0;e<t.length;e++)this._createMarker(t[e]),t[e].location&&t[e].location.lat&&this.options.show_lines&&this._addToLine(this._line,t[e])},_createLines:function(t){},_createMap:function(){},_createMiniMap:function(){},_createMarker:function(t){var e={};e.on("markerclick",this._onMarkerClick),this._addMarker(e),this._markers.push(e),e.marker_number=this._markers.length-1,this.fire("markerAdded",e)},_addMarker:function(t){},_removeMarker:function(t){},_resetMarkersActive:function(){for(var t=0;t<this._markers.length;t++)this._markers[t].active(!1)},_calculateMarkerZooms:function(){},_createLine:function(t){return{data:t}},_addToLine:function(t,e){},_replaceLines:function(t,e){},_addLineToMap:function(t){},_panTo:function(t,e){},_zoomTo:function(t,e){},_viewTo:function(t,e){},_updateMapDisplay:function(t,e){},_refreshMap:function(){},_getMapLocation:function(t){return{x:0,y:0}},_getMapZoom:function(){return 1},_getMapCenter:function(){return{lat:0,lng:0}},_getBoundsZoom:function(t,e,i,n){},_markerOverview:function(){},_initialMapLocation:function(){},_onMarkerChange:function(t){this.fire("change",{current_marker:this.current_marker})},_onMarkerClick:function(t){this.current_marker!=t.marker_number&&this.goTo(t.marker_number)},_onMapLoaded:function(t){this._loaded.map=!0,this.options.calculate_zoom&&this.calculateMarkerZooms(),this.calculateMinMaxZoom(),this.options.map_mini&&!VCO.Browser.touch&&this.createMiniMap(),this.initialMapLocation(),this.fire("loaded",this.data)},_onWheel:function(t){var e=this;if(t.ctrlKey){var i=Math.exp(-t.deltaY/100);this.touch_scale*=i,t.preventDefault(),t.stopPropagation(t)}this.scroll.start_time||(this.scroll.start_time=+new Date);var n=Math.max(40-(+new Date-this.scroll.start_time),0);clearTimeout(this.scroll.timer),this.scroll.timer=setTimeout(function(){e._scollZoom()},n)},_scollZoom:function(t){var e=this,i=this._getMapZoom();this.scroll.start_time=null,clearTimeout(this.scroll.timer),clearTimeout(this.scroll.timer_done),this.scroll.timer_done=setTimeout(function(){e._scollZoomDone()},1e3),this.zoomTo(Math.round(i*this.touch_scale))},_scollZoomDone:function(t){this.touch_scale=1},_calculateZoomChange:function(t,e,i){return this._getBoundsZoom(t,e,i)},_updateDisplay:function(t,e,i,n){this._updateMapDisplay(i,n)},_initLayout:function(){this._el.map_mask=VCO.Dom.create("div","vco-map-mask",this._el.container),this._el.map=this.options.map_as_image?VCO.Dom.create("div","vco-map-display vco-mapimage-display",this._el.map_mask):VCO.Dom.create("div","vco-map-display",this._el.map_mask)},_initData:function(){this.data.slides&&(this._createMarkers(this.data.slides),this._resetMarkersActive(),this._markers[this.current_marker].active(!0),this._loaded.data=!0,this._initialMapLocation())},_initEvents:function(){var t=this;this._el.map.addEventListener("wheel",function(e){t._onWheel(e)})}}),VCO.MapMarker.Leaflet=VCO.MapMarker.extend({_createMarker:function(t,e){var i={};t.location&&t.location.lat&&t.location.lon&&(this.data.real_marker=!0,e.use_custom_markers&&t.location.icon&&""!=t.location.icon?(this._custom_icon=!0,this._custom_icon_url=t.location.icon,this._icon=new L.icon({iconUrl:this._custom_icon_url,iconSize:[48],iconAnchor:[24,48]})):e.use_custom_markers&&t.location.image&&""!=t.location.image?(this._custom_image_icon=!0,this._custom_icon_url=t.location.image,this._icon=new L.icon({iconUrl:this._custom_icon_url,iconSize:[48],iconAnchor:[24,48],shadowSize:[68,95],shadowAnchor:[22,94],className:"vco-mapmarker-image-icon"})):this._icon=new L.divIcon({className:"vco-mapmarker "+this.media_icon_class,iconAnchor:[10,10]}),this._marker=new L.marker([t.location.lat,t.location.lon],{title:t.text.headline,icon:this._icon}),this._marker.on("click",this._onMarkerClick,this),e.map_popup&&this._createPopup(t,e))},_addTo:function(t){this.data.real_marker&&this._marker.addTo(t)},_createPopup:function(t,e){},_active:function(t){var e=this;this.media_icon_class=this.data.media&&this.data.media.mediatype?"vco-mapmarker-icon vco-icon-"+this.data.media.mediatype.type:"vco-mapmarker-icon vco-icon-plaintext",this.data.real_marker&&(t?(this._marker.setZIndexOffset(100),this._icon=this._custom_image_icon?new L.icon({iconUrl:this._custom_icon_url,iconSize:[48],iconAnchor:[24,48],shadowSize:[68,95],shadowAnchor:[22,94],className:"vco-mapmarker-image-icon-active"}):new L.divIcon({className:"vco-mapmarker-active "+this.media_icon_class,iconAnchor:[10,10]}),this._setIcon()):(clearTimeout(this.timer),this._marker.setZIndexOffset(0),this._icon=this._custom_image_icon?new L.icon({iconUrl:this._custom_icon_url,iconSize:[48],iconAnchor:[24,48],shadowSize:[68,95],shadowAnchor:[22,94],className:"vco-mapmarker-image-icon"}):new L.divIcon({className:"vco-mapmarker "+this.media_icon_class,iconAnchor:[10,10]}),this._setIcon()))},_openPopup:function(){this._marker.openPopup()},_setIcon:function(){this._marker.setIcon(this._icon)},_location:function(){return this.data.real_marker?this._marker.getLatLng():{}}}),VCO.Map.Leaflet=VCO.Map.extend({includes:[VCO.Events],_createMap:function(){this._map=new L.map(this._el.map,{scrollWheelZoom:!1,zoomControl:!this.options.map_mini}),this._map.on("load",this._onMapLoaded,this),this._map.on("moveend",this._onMapMoveEnd,this),this._map.attributionControl.setPrefix("<a href='http://storymap.knightlab.com/' target='_blank' class='vco-knightlab-brand'><span>◼</span> StoryMapJS</a>");var t=this.options.map_type.split(":");this._tile_layer=this._createTileLayer(this.options.map_type),this._tile_layer.on("load",this._onTilesLoaded,this),this._map.addLayer(this._tile_layer),this._image_layer&&this._map.addLayer(this._image_layer),this._line=this._createLine(this._line),this._line.setStyle({color:this.options.line_color_inactive}),this._addLineToMap(this._line),this._line_active=this._createLine(this._line_active),this._line_active.setStyle({opacity:1}),this._addLineToMap(this._line_active),this.options.map_as_image&&(this._line_active.setStyle({opacity:0}),this._line.setStyle({opacity:0}))},_createMiniMap:function(){this.options.map_as_image&&(this.zoom_min_max.min=0),this.bounds_array||(this.bounds_array=this._getAllMarkersBounds(this._markers)),this._tile_layer_mini=this._createTileLayer(this.options.map_type),this._mini_map=new L.Control.MiniMap(this._tile_layer_mini,{width:150,height:100,position:"topleft",bounds_array:this.bounds_array,zoomLevelFixed:this.zoom_min_max.min,zoomAnimation:!0,aimingRectOptions:{fillColor:"#FFFFFF",color:"#FFFFFF",opacity:.4,weight:1,stroke:!0}}).addTo(this._map),this._mini_map.getContainer().style.backgroundColor=this.options.map_background_color},_createBackgroundMap:function(t){if(trace("CREATE BACKGROUND MAP"),this._image_layer?this._image_layer.clearLayers():(this._image_layer=new L.layerGroup,this._map.addLayer(this._image_layer)),t)for(x in t){var e=t[x],i={},n={x:0,y:0,url:e.src,height:parseInt(e.style.height.split("px")[0]),width:parseInt(e.style.width.split("px")[0]),pos:{start:0,end:0}};if(e.style.left||e.style.top)e.style.left&&(n.x=parseInt(e.style.left.split("px")[0])),e.style.top&&(n.y=parseInt(e.style.top.split("px")[0]));else if(e.style["-webkit-transform"]||e.style.transform||e.style["-ms-transform"]){var o;e.style["-webkit-transform"]?o=e.style["-webkit-transform"].split("3d(")[1].split(", 0)")[0].split(", "):e.style.transform?o=e.style.transform.split("3d(")[1].split(", 0)")[0].split(", "):e.style["-ms-transform"]&&(o=e.style["-ms-transform"].split("3d(")[1].split(", 0)")[0].split(", ")),n.x=parseInt(o[0].split("px")[0]),n.y=parseInt(o[1].split("px")[0])}n.url.match("toner")&&(n.url=n.url.replace("/toner-hybrid/","/toner-lines/"),n.url=n.url.replace("/toner/","/toner-background/")),n.pos.start=this._map.containerPointToLatLng([n.x,n.y]),n.pos.end=this._map.containerPointToLatLng([n.x+n.width,n.y+n.height]),i=new L.imageOverlay(n.url,[n.pos.start,n.pos.end]),this._image_layer.addLayer(i)}},_createTileLayer:function(t,e){var i=null,n=t.split(":"),o={},s="<a href='http://leafletjs.com' title='A JS library for interactive maps'>Leaflet</a> | ";switch(e&&(o=e),n[0]){case"mapbox":var a=n[1]||"nuknightlab.hif6ioi4";o.subdomains="abcd",o.attribution=s+"<div class='mapbox-maplogo'></div><a href='https://www.mapbox.com/about/maps/' target='_blank'>© Mapbox © OpenStreetMap</a>",i=new L.TileLayer("https://{s}.tiles.mapbox.com/v2/"+a+"/{z}/{x}/{y}.png",o);break;case"stamen":i=new L.StamenTileLayer(n[1]||"toner-lite",o),this._map.getContainer().style.backgroundColor="#FFFFFF";break;case"zoomify":o.width=this.options.zoomify.width,o.height=this.options.zoomify.height,o.tolerance=this.options.zoomify.tolerance,o.attribution=s+this.options.zoomify.attribution,i=new L.tileLayer.zoomify(this.options.zoomify.path,o);break;case"osm":o.subdomains="ab",o.attribution=s+"© <a target='_blank' href='http://www.openstreetmap.org'>OpenStreetMap</a> and contributors, under an <a target='_blank' href='http://www.openstreetmap.org/copyright'>open license</a>",i=new L.TileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",o);break;case"http":case"https":o.subdomains=this.options.map_subdomains,i=new L.TileLayer(this.options.map_type,o);break;default:i=new L.StamenTileLayer("toner",o)}return i},_onMapMoveEnd:function(t){},_onTilesLoaded:function(t){this._createBackgroundMap(t.target._tiles),this._tile_layer.off("load",this._onTilesLoaded,this)},_onMapZoomed:function(t){trace("FIRST ZOOM"),this._map.off("zoomend",this._onMapZoomed,this)},_onMapZoom:function(t){},_createMarker:function(t){var e=new VCO.MapMarker.Leaflet(t,this.options);e.on("markerclick",this._onMarkerClick,this),this._addMarker(e),this._markers.push(e),e.marker_number=this._markers.length-1,this.fire("markerAdded",e)},_addMarker:function(t){t.addTo(this._map)},_removeMarker:function(t){},_markerOverview:function(){var t,e;if(this._line_active.setStyle({opacity:0}),"zoomify"==this.options.map_type&&this.options.map_as_image){var i=this._tile_layer.getCenterZoom(this._map);t=i.center,(this.options.map_center_offset&&0!=this.options.map_center_offset.left||0!=this.options.map_center_offset.top)&&(i.zoom=i.zoom-1,t=this._getMapCenterOffset(t,i.zoom)),this._map.setView(t,i.zoom,{pan:{animate:!0,duration:this.options.duration/1e3,easeLinearity:.1},zoom:{animate:!0,duration:this.options.duration/1e3,easeLinearity:.1}})}else if(this.bounds_array=this._getAllMarkersBounds(this._markers),this.options.map_center_offset&&0!=this.options.map_center_offset.left||0!=this.options.map_center_offset.top){var n=new L.latLngBounds(this.bounds_array);t=n.getCenter(),e=this._map.getBoundsZoom(n),t=this._getMapCenterOffset(t,e-1),this._map.setView(t,e-1,{pan:{animate:!0,duration:this.options.duration/1e3,easeLinearity:.1},zoom:{animate:!0,duration:this.options.duration/1e3,easeLinearity:.1}})}else this._map.fitBounds(this.bounds_array,{padding:[15,15]});this._mini_map&&this._mini_map.minimize()},_getAllMarkersBounds:function(t){for(var e=[],i=0;i<t.length;i++)t[i].data.real_marker&&e.push([t[i].data.location.lat,t[i].data.location.lon]);return e},_calculateMarkerZooms:function(){for(var t=0;t<this._markers.length;t++)if(this._markers[t].data.location){var e=this._markers[t],i,n,o,s,a,r;o=e.data.type&&"overview"==e.data.type?this._getMapCenter(!0):e.location(),i=t>0?this._markers[t-1].location():this._getMapCenter(!0),s=this._calculateZoomChange(i,o),n=t<this._markers.length-1?this._markers[t+1].location():this._getMapCenter(!0),a=this._calculateZoomChange(n,o),r=s&&a>s?s:a?a:s,(this.options.map_center_offset&&0!=this.options.map_center_offset.left||0!=this.options.map_center_offset.top)&&(r-=1),e.data.location.zoom=r}},_createLine:function(t){return new L.Polyline([],{clickable:!1,color:this.options.line_color,weight:this.options.line_weight,opacity:this.options.line_opacity,dashArray:this.options.line_dash,lineJoin:this.options.line_join,className:"vco-map-line"})},_addLineToMap:function(t){this._map.addLayer(t)},_addToLine:function(t,e){t.addLatLng({lon:e.location.lon,lat:e.location.lat})},_replaceLines:function(t,e){t.setLatLngs(e)},_panTo:function(t,e){this._map.panTo({lat:t.lat,lon:t.lon},{animate:!0,duration:this.options.duration/1e3,easeLinearity:.1})},_zoomTo:function(t,e){this._map.setZoom(t)},_viewTo:function(t,e){var i=!0,n=this.options.duration/1e3,o=this._getMapZoom(),s={lat:t.lat,lon:t.lon};this.options.map_as_image||this._line_active.setStyle({opacity:1}),t.zoom&&(o=t.zoom),e&&(e.duration&&(0==e.duration?i=!1:n=duration),e.zoom&&this.options.calculate_zoom&&(o=e.zoom)),this.options.map_center_offset&&(s=this._getMapCenterOffset(s,o)),this._map.setView(s,o,{pan:{animate:i,duration:n,easeLinearity:.1},zoom:{animate:i,duration:n,easeLinearity:.1}}),this._mini_map&&this.options.width>this.options.skinny_size&&(o-1<=this.zoom_min_max.min?this._mini_map.minimize():this._mini_map.restore())},_getMapLocation:function(t){return this._map.latLngToContainerPoint(t)},_getMapZoom:function(){return this._map.getZoom()},_getMapCenter:function(t){return this._map.getCenter()},_getMapCenterOffset:function(t,e){var i,n;return i=this._map.project(t,e).subtract([this.options.map_center_offset.left,this.options.map_center_offset.top]),n=this._map.unproject(i,e)},_getBoundsZoom:function(t,e,i){var n=t,o=[3*Math.abs(this.options.map_center_offset.left),3*Math.abs(this.options.map_center_offset.top)];if(i){var s=n.lat+(n.lat-e.lat)/2,a=n.lng+(n.lng-e.lng)/2;n=new L.LatLng(s,a)}var r=new L.LatLngBounds([n,e]);return this.options.less_bounce?this._map.getBoundsZoom(r,!1,o):this._map.getBoundsZoom(r,!0,o)},_getZoomifyZoom:function(){},_initialMapLocation:function(){this._map.on("zoomend",this._onMapZoomed,this)},_updateMapDisplay:function(t,e){if(t){var i=this.options.duration,n=this;e&&(i=e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){n._refreshMap()},i)}else this.timer||this._refreshMap();this._mini_map&&this._el.container.offsetWidth<this.options.skinny_size?this._mini_map.true_hide=!0:this._mini_map&&(this._mini_map.true_hide=!1)},_refreshMap:function(){this._map&&(this.timer&&(clearTimeout(this.timer),this.timer=null),this._map.invalidateSize(),this._markers[this.current_marker].data.type&&"overview"==this._markers[this.current_marker].data.type?this._markerOverview():this._viewTo(this._markers[this.current_marker].data.location,{zoom:this._getMapZoom()}))}}),L.Map.include({_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return this.panBy(i,e),!0},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;i=i||{};var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0},getBoundsZoom:function(t,e,i){t=L.latLngBounds(t);var n=this.getMinZoom()-(e?1:0),o=this.getMinZoom(),s=this.getMaxZoom(),a=this.getSize(),r=t.getNorthWest(),h=t.getSouthEast(),l=!0,c,u=[],d={x:0,y:0},m={},p=0;i=L.point(i||[0,0]),a=this.getSize();for(var _=0;s>_;_++)n++,c=this.project(h,n).subtract(this.project(r,n)).add(i),u.push({x:Math.abs(a.x-c.x),y:Math.abs(a.y-c.y)});m=u[0];for(var f=0;f<u.length;f++)u[f].y<=m.y&&(m.y=u[f].y,d.y=f),u[f].x<=m.x&&(m.x=u[f].x,d.x=f);return p=Math.round((d.y+d.x)/2)}}),L.TileLayer.include({getTiles:function(){return this._tiles}}),VCO.StoryMap=VCO.Class.extend({includes:VCO.Events,initialize:function(t,e,i,n){for(key in n){var o=n[key];if("function"==typeof o)this.on(key,o);else for(var s in o)this.on(key,o[s])}var a=this;return this.version="0.1.16",this.ready=!1,this._el={container:{},storyslider:{},map:{},menubar:{}},this._el.container="object"==typeof t?t:VCO.Dom.get(t),this._storyslider={},this._map={},this.map={},this._menubar={},this._loaded={storyslider:!1,map:!1},this.data={},this.options={script_path:"",height:this._el.container.offsetHeight,width:this._el.container.offsetWidth,layout:"landscape",base_class:"",default_bg_color:{r:256,g:256,b:256},map_size_sticky:2.5,map_center_offset:null,less_bounce:!1,start_at_slide:0,call_to_action:!1,call_to_action_text:"",menubar_height:0,skinny_size:650,relative_date:!1,duration:1e3,ease:VCO.Ease.easeInOutQuint,dragging:!0,trackResize:!0,map_type:"stamen:toner-lite",map_mini:!0,map_subdomains:"",map_as_image:!1,map_background_color:"#d9d9d9",zoomify:{path:"",width:"",height:"",tolerance:.8,attribution:""},map_height:300,storyslider_height:600,slide_padding_lr:45,slide_default_fade:"0%",menubar_default_y:0,path_gfx:"gfx",map_popup:!1,zoom_distance:100,calculate_zoom:!0,use_custom_markers:!1,line_follows_path:!0,line_color:"#c34528",line_color_inactive:"#CCC",line_join:"miter",line_weight:3,line_opacity:.8,line_dash:"5,5",show_lines:!0,show_history_line:!0,api_key_flickr:"f2cc870b4d233dd0a5bfe73fd0d64ef0",language:"en"},this.current_slide=this.options.start_at_slide,this.animator_map=null,this.animator_storyslider=null,VCO.Util.mergeData(this.options,i),"landscape"==this.options.layout&&(this.options.map_center_offset={left:-200,top:0}),"zoomify"==this.options.map_type&&this.options.map_as_image&&(this.options.map_size_sticky=2),this.options.map_as_image&&(this.options.calculate_zoom=!1),this.options.relative_date?"undefined"!=typeof moment?a._loadLanguage(e):VCO.Load.js(this.options.script_path+"/library/moment.js",function(){a._loadLanguage(e),trace("LOAD MOMENTJS")}):a._loadLanguage(e),VCO.Browser.chrome&&VCO.Load.css(this.options.script_path+"../css/fonts/font.emoji.css",function(){trace("LOADED EMOJI CSS FOR CHROME")}),this},_loadLanguage:function(t){var e=this;"en"==this.options.language?(this.options.language=VCO.Language,this._initData(t)):VCO.Load.js(this.options.script_path+"/locale/"+this.options.language+".js",function(){e._initData(t)})},goTo:function(t){t!=this.current_slide&&(this.current_slide=t,this._storyslider.goTo(this.current_slide),this._map.goTo(this.current_slide))},updateDisplay:function(){this.ready&&this._updateDisplay()},_initData:function(t){var e=this;"string"==typeof t?VCO.getJSON(t,function(t){t&&t.storymap&&VCO.Util.mergeData(e.data,t.storymap),e._onDataLoaded()}):"object"==typeof t?(t.storymap?e.data=t.storymap:trace("data must have a storymap property"),e._onDataLoaded()):e._onDataLoaded()},_initLayout:function(){var t=this;this._el.container.className+=" vco-storymap",this.options.base_class=this._el.container.className,this._el.menubar=VCO.Dom.create("div","vco-menubar",this._el.container),this._el.map=VCO.Dom.create("div","vco-map",this._el.container),this._el.storyslider=VCO.Dom.create("div","vco-storyslider",this._el.container),this.options.width=this._el.container.offsetWidth,this.options.height=this._el.container.offsetHeight,this._el.map.style.height="1px",this._el.storyslider.style.top="1px",this._map=new VCO.Map.Leaflet(this._el.map,this.data,this.options),this.map=this._map._map,this._map.on("loaded",this._onMapLoaded,this),this._el.map.style.backgroundColor=this.options.map_background_color,this._menubar=new VCO.MenuBar(this._el.menubar,this._el.container,this.options),this._storyslider=new VCO.StorySlider(this._el.storyslider,this.data,this.options),this._storyslider.on("loaded",this._onStorySliderLoaded,this),this._storyslider.on("title",this._onTitle,this),this._storyslider.init(),"portrait"==this.options.layout?(this.options.map_height=this.options.height/this.options.map_size_sticky,this.options.storyslider_height=this.options.height-this._el.menubar.offsetHeight-this.options.map_height-1,this._menubar.setSticky(0)):(this.options.menubar_height=this._el.menubar.offsetHeight,this.options.map_height=this.options.height,this.options.storyslider_height=this.options.height-this._el.menubar.offsetHeight-1,this._menubar.setSticky(this.options.menubar_height)),this._updateDisplay(this.options.map_height,!0,2e3),this._menubar.show(2e3)},_initEvents:function(){this._menubar.on("collapse",this._onMenuBarCollapse,this),this._menubar.on("back_to_start",this._onBackToStart,this),this._menubar.on("overview",this._onOverview,this),this._storyslider.on("change",this._onSlideChange,this),this._storyslider.on("colorchange",this._onColorChange,this),this._map.on("change",this._onMapChange,this)},_updateDisplay:function(t,e,i){var n=this.options.duration,o=this.options.base_class,s=this;i&&(n=i),this.options.width=this._el.container.offsetWidth,this.options.height=this._el.container.offsetHeight,this.options.layout=this.options.width<=this.options.skinny_size?"portrait":"landscape",t&&(this.options.map_height=t),VCO.Browser.touch&&(this.options.layout=VCO.Browser.orientation(),o+=" vco-mobile"),"portrait"==this.options.layout?(o+=" vco-skinny",this._map.setMapOffset(0,0),this.options.map_height=this.options.height/this.options.map_size_sticky,this.options.storyslider_height=this.options.height-this.options.map_height-1,this._menubar.setSticky(0),o+=" vco-layout-portrait",e?(this.animator_map&&this.animator_map.stop(),this.animator_map=VCO.Animate(this._el.map,{height:this.options.map_height+"px",duration:n,easing:VCO.Ease.easeOutStrong,complete:function(){s._map.updateDisplay(s.options.width,s.options.map_height,e,i,s.options.menubar_height)}}),this.animator_storyslider&&this.animator_storyslider.stop(),this.animator_storyslider=VCO.Animate(this._el.storyslider,{height:this.options.storyslider_height+"px",duration:n,easing:VCO.Ease.easeOutStrong})):(this._el.map.style.height=Math.ceil(this.options.map_height)+"px",this._el.storyslider.style.height=this.options.storyslider_height+"px"),this._menubar.updateDisplay(this.options.width,this.options.height,e),this._map.updateDisplay(this.options.width,this.options.height,!1),this._storyslider.updateDisplay(this.options.width,this.options.storyslider_height,e,this.options.layout)):(o+=" vco-layout-landscape",this.options.menubar_height=this._el.menubar.offsetHeight,this.options.map_height=this.options.height,this.options.storyslider_height=this.options.height,this._menubar.setSticky(this.options.menubar_height),this._menubar.setSticky(this.options.menubar_height),this._el.map.style.height=this.options.height+"px",this._map.setMapOffset(-(this.options.width/4),0),this._el.storyslider.style.top=0,this._el.storyslider.style.height=this.options.storyslider_height+"px",this._menubar.updateDisplay(this.options.width,this.options.height,e),this._map.updateDisplay(this.options.width,this.options.height,e,i),this._storyslider.updateDisplay(this.options.width/2,this.options.storyslider_height,e,this.options.layout)),this._el.container.className=o},_onDataLoaded:function(t){this.fire("dataloaded"),this._initLayout(),this._initEvents(),this.ready=!0},_onTitle:function(t){this.fire("title",t)},_onColorChange:function(t){this._menubar.setColor(t.color||t.image?!0:!1)},_onSlideChange:function(t){this.current_slide!=t.current_slide&&(this.current_slide=t.current_slide,this._map.goTo(this.current_slide),this.fire("change",{current_slide:this.current_slide},this))},_onMapChange:function(t){this.current_slide!=t.current_marker&&(this.current_slide=t.current_marker,this._storyslider.goTo(this.current_slide),this.fire("change",{current_slide:this.current_slide},this))},_onOverview:function(t){this._map.markerOverview()},_onBackToStart:function(t){this.current_slide=0,this._map.goTo(this.current_slide),this._storyslider.goTo(this.current_slide),this.fire("change",{current_slide:this.current_slide},this)},_onMenuBarCollapse:function(t){this._updateDisplay(t.y,!0)},_onMouseClick:function(t){},_fireMouseEvent:function(t){if(this._loaded){var e=t.type;e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)&&("contextmenu"===e&&VCO.DomEvent.preventDefault(t),this.fire(e,{latlng:"something",layerPoint:"something else"}))}},_onMapLoaded:function(){this._loaded.map=!0,this._onLoaded()},_onStorySliderLoaded:function(){this._loaded.storyslider=!0,this._onLoaded()},_onLoaded:function(){this._loaded.storyslider&&this._loaded.map&&this.fire("loaded",this.data)}});