Comparing version 4.1.6 to 4.1.7
## Changelog | ||
## 4.1.7 | ||
* Fixing click handler regex in Firefox due to absurd implementation bug | ||
## 4.1.6 | ||
* Fixing click handlers in IE | ||
## 4.1.5 | ||
@@ -4,0 +12,0 @@ |
@@ -25,3 +25,4 @@ // GridManager | ||
if (!url) return; | ||
var xyz = /(\d+)\/(\d+)\/(\d+)\.[\w\._]+/g.exec(url); | ||
var rx = new RegExp('/(\\d+)\\/(\\d+)\\/(\\d+)\\.[\\w\\._]+'); | ||
var xyz = rx.exec(url); | ||
if (!xyz) return; | ||
@@ -28,0 +29,0 @@ return template[parseInt(xyz[2], 10) % template.length] |
@@ -1,2 +0,2 @@ | ||
/* wax - 4.1.6 - 1.0.4-482-g8a293d4 *//*! | ||
/* wax - 4.1.7 - 1.0.4-483-gbb64c65 *//*! | ||
* Reqwest! A general purpose XHR connection manager | ||
@@ -6,3 +6,3 @@ * copyright Dustin Diaz 2011 | ||
* license MIT | ||
*/!function(context,win){function serial(a){var b=a.name;if(a.disabled||!b)return"";b=enc(b);switch(a.tagName.toLowerCase()){case"input":switch(a.type){case"reset":case"button":case"image":case"file":return"";case"checkbox":case"radio":return a.checked?b+"="+(a.value?enc(a.value):!0)+"&":"";default:return b+"="+(a.value?enc(a.value):"")+"&"}break;case"textarea":return b+"="+enc(a.value)+"&";case"select":return b+"="+enc(a.options[a.selectedIndex].value)+"&"}return""}function enc(a){return encodeURIComponent(a)}function reqwest(a,b){return new Reqwest(a,b)}function init(o,fn){function error(a){o.error&&o.error(a),complete(a)}function success(resp){o.timeout&&clearTimeout(self.timeout)&&(self.timeout=null);var r=resp.responseText;if(r)switch(type){case"json":resp=win.JSON?win.JSON.parse(r):eval("("+r+")");break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function complete(a){o.complete&&o.complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort(),error()},o.timeout)),this.request=getRequest(o,success,error)}function setType(a){return/\.json$/.test(a)?"json":/\.jsonp$/.test(a)?"jsonp":/\.js$/.test(a)?"js":/\.html?$/.test(a)?"html":/\.xml$/.test(a)?"xml":"js"}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function getRequest(a,b,c){if(a.type!="jsonp"){var d=xhr();return d.open(a.method||"GET",typeof a=="string"?a:a.url,!0),setHeaders(d,a),d.onreadystatechange=handleReadyState(d,b,c),a.before&&a.before(d),d.send(a.data||null),d}var e=doc.createElement("script"),f=0;win[getCallbackName(a)]=generalCallback,e.type="text/javascript",e.src=a.url,e.async=!0,e.onload=e.onreadystatechange=function(){if(e[readyState]&&e[readyState]!=="complete"&&e[readyState]!=="loaded"||f)return!1;e.onload=e.onreadystatechange=null,a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(e),f=1},head.appendChild(e)}function generalCallback(a){lastValue=a}function getCallbackName(a){var b=a.jsonpCallback||"callback";if(a.url.slice(-(b.length+2))==b+"=?"){var c="reqwest_"+uniqid++;return a.url=a.url.substr(0,a.url.length-1)+c,c}var d=new RegExp(b+"=([\\w]+)");return a.url.match(d)[1]}function setHeaders(a,b){var c=b.headers||{};c.Accept=c.Accept||"text/javascript, text/html, application/xml, text/xml, */*",b.crossOrigin||(c["X-Requested-With"]=c["X-Requested-With"]||"XMLHttpRequest"),c[contentType]=c[contentType]||"application/x-www-form-urlencoded";for(var d in c)c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d],!1)}function handleReadyState(a,b,c){return function(){a&&a[readyState]==4&&(twoHundo.test(a.status)?b(a):c(a))}}var twoHundo=/^20\d$/,doc=document,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",head=doc[byTag]("head")[0],uniqid=0,lastValue,xhr="XMLHttpRequest"in win?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serialize=function(a){var b=[a[byTag]("input"),a[byTag]("select"),a[byTag]("textarea")],c=[],d,e;for(d=0,l=b.length;d<l;++d)for(e=0,l2=b[d].length;e<l2;++e)c.push(serial(b[d][e]));return c.join("").replace(/&$/,"")},reqwest.serializeArray=function(a){for(var b=this.serialize(a).split("&"),c=0,d=b.length,e=[],f;c<d;c++)b[c]&&(f=b[c].split("="))&&e.push({name:f[0],value:f[1]});return e};var old=context.reqwest;reqwest.noConflict=function(){return context.reqwest=old,this},typeof module!="undefined"?module.exports=reqwest:context.reqwest=reqwest}(this,window);var html4={};html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10},html4.ATTRIBS={"*::class":9,"*::dir":0,"*::id":4,"*::lang":0,"*::onclick":2,"*::ondblclick":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::style":3,"*::title":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::rel":0,"a::rev":0,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"del::cite":1,"del::datetime":0,"dir::compact":0,"div::align":0,"dl::compact":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::ismap":0,"input::maxlength":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::readonly":0,"input::size":0,"input::src":1,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"ol::compact":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"p::align":0,"pre::width":0,"q::cite":1,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::size":0,"select::tabindex":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::cols":0,"textarea::disabled":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::readonly":0,"textarea::rows":0,"textarea::tabindex":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"ul::compact":0,"ul::type":0},html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128},html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:16,area:2,b:0,base:18,basefont:18,bdo:0,big:0,blockquote:0,body:49,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,dd:1,del:0,dfn:0,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,font:0,form:0,frame:18,frameset:16,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:49,hr:2,html:49,i:0,iframe:4,img:2,input:2,ins:0,isindex:18,kbd:0,label:0,legend:0,li:1,link:18,map:0,menu:0,meta:18,nobr:0,noembed:4,noframes:20,noscript:20,object:16,ol:0,optgroup:0,option:1,p:1,param:18,pre:0,q:0,s:0,samp:0,script:84,select:0,small:0,span:0,strike:0,strong:0,style:148,sub:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,title:24,tr:1,tt:0,u:0,ul:0,"var":0},html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2},html4.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"body::background":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0},html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0},html4.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"body::background":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2};var html=function(a){function g(a){a=b(a);if(c.hasOwnProperty(a))return c[a];var d=a.match(e);return d?String.fromCharCode(parseInt(d[1],10)):(d=a.match(f))?String.fromCharCode(parseInt(d[1],16)):""}function h(a,b){return g(b)}function j(a){return a.replace(i,"")}function l(a){return a.replace(k,h)}function s(a){return a.replace(m,"&").replace(o,"<").replace(p,">").replace(q,""").replace(r,"=")}function t(a){return a.replace(n,"&$1").replace(o,"<").replace(p,">")}function w(c){return function d(d,e){d=String(d);var f=null,g=!1,h=[],i=void 0,k=void 0,m=void 0;c.startDoc&&c.startDoc(e);while(d){var n=d.match(g?u:v);d=d.substring(n[0].length);if(g){if(n[1]){var o=b(n[1]),p;if(n[2]){var q=n[3];switch(q.charCodeAt(0)){case 34:case 39:q=q.substring(1,q.length-1)}p=l(j(q))}else p=o;h.push(o,p)}else if(n[4]){k!==void 0&&(m?c.startTag&&c.startTag(i,h,e):c.endTag&&c.endTag(i,e));if(m&&k&(a.eflags.CDATA|a.eflags.RCDATA)){f===null?f=b(d):f=f.substring(f.length-d.length);var r=f.indexOf("</"+i);r<0&&(r=d.length),r&&(k&a.eflags.CDATA?c.cdata&&c.cdata(d.substring(0,r),e):c.rcdata&&c.rcdata(t(d.substring(0,r)),e),d=d.substring(r))}i=k=m=void 0,h.length=0,g=!1}}else if(n[1])c.pcdata&&c.pcdata(n[0],e);else if(n[3])m=!n[2],g=!0,i=b(n[3]),k=a.ELEMENTS.hasOwnProperty(i)?a.ELEMENTS[i]:void 0;else if(n[4])c.pcdata&&c.pcdata(n[4],e);else if(n[5]&&c.pcdata){var s=n[5];c.pcdata(s==="<"?"<":s===">"?">":"&",e)}}c.endDoc&&c.endDoc(e)}}function x(b){var c,d;return w({startDoc:function(a){c=[],d=!1},startTag:function(e,f,g){if(d)return;if(!a.ELEMENTS.hasOwnProperty(e))return;var h=a.ELEMENTS[e];if(h&a.eflags.FOLDABLE)return;if(h&a.eflags.UNSAFE){d=!(h&a.eflags.EMPTY);return}f=b(e,f);if(f){h&a.eflags.EMPTY||c.push(e),g.push("<",e);for(var i=0,j=f.length;i<j;i+=2){var k=f[i],l=f[i+1];l!==null&&l!==void 0&&g.push(" ",k,'="',s(l),'"')}g.push(">")}},endTag:function(b,e){if(d){d=!1;return}if(!a.ELEMENTS.hasOwnProperty(b))return;var f=a.ELEMENTS[b];if(!(f&(a.eflags.UNSAFE|a.eflags.EMPTY|a.eflags.FOLDABLE))){var g;if(f&a.eflags.OPTIONAL_ENDTAG)for(g=c.length;--g>=0;){var h=c[g];if(h===b)break;if(!(a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG))return}else for(g=c.length;--g>=0;)if(c[g]===b)break;if(g<0)return;for(var i=c.length;--i>g;){var h=c[i];a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG||e.push("</",h,">")}c.length=g,e.push("</",b,">")}},pcdata:function(a,b){d||b.push(a)},rcdata:function(a,b){d||b.push(a)},cdata:function(a,b){d||b.push(a)},endDoc:function(a){for(var b=c.length;--b>=0;)a.push("</",c[b],">");c.length=0}})}function z(b,c,e){var f=[];return x(function g(b,f){for(var g=0;g<f.length;g+=2){var h=f[g],i=f[g+1],j=null,k;if((k=b+"::"+h,a.ATTRIBS.hasOwnProperty(k))||(k="*::"+h,a.ATTRIBS.hasOwnProperty(k)))j=a.ATTRIBS[k];if(j!==null)switch(j){case a.atype.NONE:break;case a.atype.SCRIPT:case a.atype.STYLE:i=null;break;case a.atype.ID:case a.atype.IDREF:case a.atype.IDREFS:case a.atype.GLOBAL_NAME:case a.atype.LOCAL_NAME:case a.atype.CLASSES:i=e?e(i):i;break;case a.atype.URI:var l=(""+i).match(y);l?!l[1]||d.test(l[1])?i=c&&c(i):i=null:i=null;break;case a.atype.URI_FRAGMENT:i&&"#"===i.charAt(0)?(i=e?e(i):i,i&&(i="#"+i)):i=null;break;default:i=null}else i=null;f[g+1]=i}return f})(b,f),f.join("")}var b;"script"==="SCRIPT".toLowerCase()?b=function(a){return a.toLowerCase()}:b=function(a){return a.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)|32)})};var c={lt:"<",gt:">",amp:"&",nbsp:" ",quot:'"',apos:"'"},d=/^(?:https?|mailto|data)$/i,e=/^#(\d+)$/,f=/^#x([0-9A-Fa-f]+)$/,i=/\0/g,k=/&(#\d+|#x[0-9A-Fa-f]+|\w+);/g,m=/&/g,n=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,o=/</g,p=/>/g,q=/\"/g,r=/\=/g,u=new RegExp("^\\s*(?:(?:([a-z][a-z-]*)(\\s*=\\s*(\"[^\"]*\"|'[^']*'|(?=[a-z][a-z-]*\\s*=)|[^>\"'\\s]*))?)|(/?>)|[\\s\\S][^a-z\\s>]*)","i"),v=new RegExp("^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);|<!--[\\s\\S]*?-->|<!\\w[^>]*>|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))","i"),y=new RegExp("^(?:([^:/?#]+):)?");return{escapeAttrib:s,makeHtmlSanitizer:x,makeSaxParser:w,normalizeRCData:t,sanitize:z,unescapeEntities:l}}(html4),html_sanitize=html.sanitize;typeof window!="undefined"&&(window.html=html,window.html_sanitize=html_sanitize),html4.ATTRIBS["*::style"]=0,html4.ELEMENTS.style=0;var Mustache=function(){var a={},b=function(){};return b.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(a,b,c,d){d||(this.context=b,this.buffer=[]);if(!this.includes("",a)){if(d)return a;this.send(a);return}a=this.render_pragmas(a);var e=this.render_section(a,b,c);e===!1&&(e=this.render_tags(a,b,c,d));if(d)return e;this.sendLines(e)},send:function(a){a!==""&&this.buffer.push(a)},sendLines:function(a){if(a){var b=a.split("\n");for(var c=0;c<b.length;c++)this.send(b[c])}},render_pragmas:function(a){if(!this.includes("%",a))return a;var b=this,c=this.getCachedRegex("render_pragmas",function(a,b){return new RegExp(a+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+b,"g")});return a.replace(c,function(a,c,d){if(!b.pragmas_implemented[c])throw{message:"This implementation of mustache doesn't understand the '"+c+"' pragma"};b.pragmas[c]={};if(d){var e=d.split("=");b.pragmas[c][e[0]]=e[1]}return""})},render_partial:function(a,b,c){a=this.trim(a);if(!c||c[a]===undefined)throw{message:"unknown_partial '"+a+"'"};return typeof b[a]!="object"?this.render(c[a],b,c,!0):this.render(c[a],b[a],c,!0)},render_section:function(a,b,c){if(!this.includes("#",a)&&!this.includes("^",a))return!1;var d=this,e=this.getCachedRegex("render_section",function(a,b){return new RegExp("^([\\s\\S]*?)"+a+"(\\^|\\#)\\s*(.+)\\s*"+b+"\n*([\\s\\S]*?)"+a+"\\/\\s*\\3\\s*"+b+"\\s*([\\s\\S]*)$","g")});return a.replace(e,function(a,e,f,g,h,i){var j=e?d.render_tags(e,b,c,!0):"",k=i?d.render(i,b,c,!0):"",l,m=d.find(g,b);return f==="^"?!m||d.is_array(m)&&m.length===0?l=d.render(h,b,c,!0):l="":f==="#"&&(d.is_array(m)?l=d.map(m,function(a){return d.render(h,d.create_context(a),c,!0)}).join(""):d.is_object(m)?l=d.render(h,d.create_context(m),c,!0):typeof m=="function"?l=m.call(b,h,function(a){return d.render(a,b,c,!0)}):m?l=d.render(h,b,c,!0):l=""),j+l+k})},render_tags:function(a,b,c,d){var e=this,f=function(){return e.getCachedRegex("render_tags",function(a,b){return new RegExp(a+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+b+"+","g")})},g=f(),h=function(a,d,h){switch(d){case"!":return"";case"=":return e.set_delimiters(h),g=f(),"";case">":return e.render_partial(h,b,c);case"{":return e.find(h,b);default:return e.escape(e.find(h,b))}},i=a.split("\n");for(var j=0;j<i.length;j++)i[j]=i[j].replace(g,h,this),d||this.send(i[j]);if(d)return i.join("\n")},set_delimiters:function(a){var b=a.split(" ");this.otag=this.escape_regex(b[0]),this.ctag=this.escape_regex(b[1])},escape_regex:function(a){if(!arguments.callee.sRE){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+b.join("|\\")+")","g")}return a.replace(arguments.callee.sRE,"\\$1")},find:function(a,b){function c(a){return a===!1||a===0||a}a=this.trim(a);var d;return c(b[a])?d=b[a]:c(this.context[a])&&(d=this.context[a]),typeof d=="function"?d.apply(b):d!==undefined?d:""},includes:function(a,b){return b.indexOf(this.otag+a)!=-1},escape:function(a){return a=String(a===null?"":a),a.replace(/&(?!\w+;)|["'<>\\]/g,function(a){switch(a){case"&":return"&";case'"':return""";case"'":return"'";case"<":return"<";case">":return">";default:return a}})},create_context:function(a){if(this.is_object(a))return a;var b=".";this.pragmas["IMPLICIT-ITERATOR"]&&(b=this.pragmas["IMPLICIT-ITERATOR"].iterator);var c={};return c[b]=a,c},is_object:function(a){return a&&typeof a=="object"},is_array:function(a){return Object.prototype.toString.call(a)==="[object Array]"},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},map:function(a,b){if(typeof a.map=="function")return a.map(b);var c=[],d=a.length;for(var e=0;e<d;e++)c.push(b(a[e]));return c},getCachedRegex:function(b,c){var d=a[this.otag];d||(d=a[this.otag]={});var e=d[this.ctag];e||(e=d[this.ctag]={});var f=e[b];return f||(f=e[b]=c(this.otag,this.ctag)),f}},{name:"mustache.js",version:"0.4.0-dev",to_html:function(a,c,d,e){var f=new b;e&&(f.send=e),f.render(a,c||{},d);if(!e)return f.buffer.join("\n")}}}();wax=wax||{},wax.attribution=function(){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var a,b={};return b.set=function(b){if(typeof b=="undefined")return;return a.innerHTML=html_sanitize(b,c,d),this},b.element=function(){return a},b.init=function(){return a=document.createElement("div"),a.className="wax-attribution",this},b.init()},wax=wax||{},wax.bwdetect=function(a,b){function h(){wax.bw=-1;var a=new Image;a.src=e;var b=!0,f=setTimeout(function(){b&&wax.bw==-1&&(c.bw(0),b=!1)},d);a.onload=function(){b&&wax.bw==-1&&(clearTimeout(f),c.bw(1),b=!1)}}var c={},d=a.threshold||400,e="http://a.tiles.mapbox.com/mapbox/1.0.0/blue-marble-topo-bathy-jul/0/0/0.png?preventcache="+ +(new Date),f=1,g=a.auto===undefined?!0:a.auto;return c.bw=function(a){if(!arguments.length)return f;var c=f;wax.bwlisteners&&wax.bwlisteners.length&&function(){listeners=wax.bwlisteners,wax.bwlisteners=[];for(i=0;i<listeners;i++)listeners[i](a)}(),wax.bw=a,f!=(f=a)&&b(a)},c.add=function(){return g&&h(),this},wax.bw==-1?(wax.bwlisteners=wax.bwlisteners||[],wax.bwlisteners.push(c.bw)):wax.bw!==undefined?c.bw(wax.bw):c.add(),c},wax.formatter=function(x){function urlX(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function idX(a){return a}var formatter={},f;if(x&&typeof x=="string")try{eval("f = "+x)}catch(e){console&&console.log(e)}else x&&typeof x=="function"?f=x:f=function(){};return formatter.format=function(a,b){try{return html_sanitize(f(a,b),urlX,idX)}catch(c){console&&console.log(c)}},formatter},wax.GridInstance=function(a,b,c){function g(a){return a>=93&&a--,a>=35&&a--,a-=32,a}c=c||{};var d={},e=c.resolution||4,f=c.tileSize||256;return d.grid_tile=function(){return a},d.getKey=function(b,c){if(!a||!a.grid)return;if(c<0||b<0)return;if(Math.floor(c)>=f||Math.floor(b)>=f)return;return g(a.grid[Math.floor(c/e)].charCodeAt(Math.floor(b/e)))},d.gridFeature=function(b,c){var d=this.getKey(b,c),e=a.keys;if(e&&e[d]&&a.data[e[d]])return a.data[e[d]]},d.tileFeature=function(c,d,e,f){if(!a)return;var g=wax.util.offset(e);feature=this.gridFeature(c-g.left,d-g.top);if(feature)return b.format(f,feature)},d},wax.GridManager=function(a){function h(a){return typeof a=="string"&&(a=[a]),function b(b){if(!b)return;var c=/(\d+)\/(\d+)\/(\d+)\.[\w\._]+/g.exec(b);if(!c)return;return a[parseInt(c[2],10)%a.length].replace("{z}",c[1]).replace("{x}",c[2]).replace("{y}",c[3])}}a=a||{};var b=a.resolution||4,c=a.version||"1.1",d={},e={},f,g=function(a){return a.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json")};return e.formatter=function(a){return arguments.length?(f=wax.formatter(a),e):f},e.template=function(a){return arguments.length?(f=wax.template(a),e):f},e.gridUrl=function(a){return arguments.length?(g=typeof a=="function"?a:h(a),e):g},e.getGrid=function(a,c){var d=g(a);return!f||!d?c(null,null):(wax.request.get(d,function(a,d){if(a)return c(a,null);c(null,wax.GridInstance(d,f,{resolution:b||4}))}),e)},e.add=function(a){return a.template?e.template(a.template):a.formatter&&e.formatter(a.formatter),a.grids&&e.gridUrl(a.grids),this},e.add(a)},wax=wax||{},wax.hash=function(a){function b(){return location.hash.substring(1)}function c(a){location.hash="#"+a}function g(b){var c=b.split("/");for(var d=0;d<c.length;d++){c[d]=Number(c[d]);if(isNaN(c[d]))return!0}if(c.length<3)return!0;c.length==3&&a.setCenterZoom(c)}function h(){var b=a.getCenterZoom();d!==b&&(d=b,c(d))}function i(a){if(a===d)return;g(d=a)&&h()}a=a||{};var d,e={},f=90-1e-8,j=wax.util.throttle(h,500);return e.add=function(){return i(b()),a.bindChange(j),this},e.remove=function(){return a.unbindChange(j),this},e.add()};var wax=wax||{};wax.legend=function(){function d(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function e(a){return a}var a,b={},c;return b.element=function(){return c},b.content=function(b){return arguments.length?(b?(a.innerHTML=html_sanitize(b,d,e),a.style.display="block"):(a.innerHTML="",a.style.display="none"),this):a.innerHTML},b.add=function(){return c=document.createElement("div"),c.className="wax-legends",a=document.createElement("div"),a.className="wax-legend",a.style.display="none",c.appendChild(a),this},b.add()};var w=function(a){return a.melt=function(b,c){return b.apply(c,[a,c])},a},wax=wax||{};wax.movetip={},wax.movetip=function(a){function g(a){return a&&a.className.indexOf("wax-popup")!==-1}function h(a,b){var c=document.createElement("div");return c.className="wax-movetip",c.style.cssText="position:absolute;",c.innerHTML=a,b.appendChild(c),d=b,_tooltipOffset=wax.util.offset(c),_contextOffset=wax.util.offset(d),c}function i(a){if(!c)return;var b=wax.util.eventoffset(a);c.className="wax-movetip",_tooltipOffset.height+b.y>_contextOffset.top+_contextOffset.height&&_contextOffset.height>_tooltipOffset.height&&(b.y-=_tooltipOffset.height,c.className+=" flip-y"),_tooltipOffset.width+b.x>_contextOffset.left+_contextOffset.width&&(b.x-=_tooltipOffset.width,c.className+=" flip-x"),c.style.left=b.x+"px",c.style.top=b.y+"px"}function j(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&e?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&e&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+e):a.parentNode&&a.parentNode.removeChild(a)}function k(a,b){c&&(j(c),c=undefined);var d=h(a,b);d.className+=" wax-popup",d.innerHTML=a;var e=document.createElement("a");e.href="#close",e.className="close",e.innerHTML="Close",d.appendChild(e);var f=function(a){return j(d),c=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1};e.addEventListener?e.addEventListener("click",f,!1):e.attachEvent&&e.attachEvent("onclick",f),c=d}a=a||{};var b={},c=undefined,d=undefined,e=a.animationOut,f=a.animationIn;return b.over=function(a,b,d){if(!a)return;b.style.cursor="pointer";if(g(c))return;c=h(a,b),i(d),b.addEventListener&&b.addEventListener("mousemove",i)},b.out=function(a){a.style.cursor="default";if(g(c))return;c&&(j(c),a.removeEventListener&&a.removeEventListener("mousemove",i),c=undefined)},b};var wax=wax||{};wax.request={cache:{},locks:{},promises:{},get:function(a,b){if(this.cache[a])return b(this.cache[a][0],this.cache[a][1]);this.promises[a]=this.promises[a]||[],this.promises[a].push(b);if(this.locks[a])return;var c=this;this.locks[a]=!0,reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(b){c.locks[a]=!1,c.cache[a]=[null,b];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])},error:function(b){c.locks[a]=!1,c.cache[a]=[b,null];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])}})}},wax.template=function(a){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var b={};return b.format=function(b,e){var f={};for(var g in e)f[g]=e[g];return b.format&&(f["__"+b.format+"__"]=!0),html_sanitize(Mustache.to_html(a,f),c,d)},b};if(!wax)var wax={};wax.tilejson=function(a,b){reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:b,error:b})};var wax=wax||{};wax.tooltip={},wax.tooltip=function(a){this._currentTooltip=undefined,a=a||{},a.animationOut&&(this.animationOut=a.animationOut),a.animationIn&&(this.animationIn=a.animationIn)},wax.tooltip.prototype.isPopup=function(a){return a&&a.className.indexOf("wax-popup")!==-1},wax.tooltip.prototype.getTooltip=function(a,b){var c=document.createElement("div");return c.className="wax-tooltip wax-tooltip-0",c.innerHTML=a,b.appendChild(c),c},wax.tooltip.prototype.hideTooltip=function(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&this.animationOut?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&this.animationOut&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+this.animationOut):a.parentNode&&a.parentNode.removeChild(a)},wax.tooltip.prototype.click=function(a,b){this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined);var c=this.getTooltip(a,b);c.className+=" wax-popup",c.innerHTML=a;var d=document.createElement("a");d.href="#close",d.className="close",d.innerHTML="Close",c.appendChild(d);var e=wax.util.bind(function(a){return this.hideTooltip(c),this._currentTooltip=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1},this);d.addEventListener?(d.addEventListener("click",e,!1),d.addEventListener("touchend",e,!1)):d.attachEvent&&d.attachEvent("onclick",e),this._currentTooltip=c},wax.tooltip.prototype.over=function(a,b){if(!a)return;b.style.cursor="pointer";if(this.isPopup(this._currentTooltip))return;this._currentTooltip=this.getTooltip(a,b)},wax.tooltip.prototype.out=function(a){a.style.cursor="default";if(this.isPopup(this._currentTooltip))return;this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined)};var wax=wax||{};wax.util=wax.util||{},wax.util={offset:function(a){var b=a.offsetWidth||parseInt(a.style.width,10),c=a.offsetHeight||parseInt(a.style.height,10),d=document.body,e=0,f=0,g=function(a){if(a===d||a===document.documentElement)return;e+=a.offsetTop,f+=a.offsetLeft;var b=a.style.transform||a.style.WebkitTransform||a.style.OTransform||a.style.MozTransform||a.style.msTransform;if(b)if(match=b.match(/translate\((.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/translate3d\((.+)px, (.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/matrix3d\(([\-\d,\s]+)\)/)){var c=match[1].split(",");e+=parseInt(c[13],10),f+=parseInt(c[12],10)}else if(match=b.match(/matrix\(.+, .+, .+, .+, (.+), (.+)\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10)};g(a);try{while(a=a.offsetParent)g(a)}catch(h){}e+=d.offsetTop,f+=d.offsetLeft,e+=d.parentNode.offsetTop,f+=d.parentNode.offsetLeft;var i=document.defaultView?window.getComputedStyle(d.parentNode,null):d.parentNode.currentStyle;return d.parentNode.offsetTop!==parseInt(i.marginTop,10)&&!isNaN(parseInt(i.marginTop,10))&&(e+=parseInt(i.marginTop,10),f+=parseInt(i.marginLeft,10)),{top:e,left:f,height:c,width:b}},$:function(a){return typeof a=="string"?document.getElementById(a):a},bind:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,c.concat(Array.prototype.slice.call(arguments)))}},isString:function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)},indexOf:function(a,b){var c=Array.prototype.indexOf;if(a===null)return-1;var d,e;if(c&&a.indexOf===c)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(a[d]===b)return d;return-1},isArray:Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},keys:Object.keys||function(a){var b=Object.prototype.hasOwnProperty;if(a!==Object(a))throw new TypeError("Invalid object");var c=[];for(var d in a)b.call(a,d)&&(c[c.length]=d);return c},eventoffset:function(a){var b=0,c=0;if(!a)var a=window.event;if(a.pageX||a.pageY)return{x:a.pageX,y:a.pageY};if(a.clientX||a.clientY){var d=document.documentElement,e=document.body,f=document.body.parentNode.currentStyle,g=parseInt(f.marginTop,10)||0,h=parseInt(f.marginLeft,10)||0;return{x:a.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0)+h,y:a.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)+g}}if(a.touches&&a.touches.length===1)return{x:a.touches[0].pageX,y:a.touches[0].pageY}},limit:function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d);if(c||!d)d=setTimeout(g,b)}},throttle:function(a,b){return this.limit(a,b,!1)}},wax=wax||{},wax.g=wax.g||{},wax.g.attribution=function(a,b){b=b||{};var c,d={};return d.element=function(){return c.element()},d.appendTo=function(a){return wax.util.$(a).appendChild(c.element()),this},d.init=function(){return c=wax.attribution(),c.set(b.attribution),c.element().className="wax-attribution wax-g",this},d.init()},wax=wax||{},wax.g=wax.g||{},wax.g.bwdetect=function(a,b){b=b||{};var c=b.png||".png128",d=b.jpg||".jpg70";if(!a.mapTypes["mb-low"]){var e=a.mapTypes.mb,f={tiles:[],scheme:e.options.scheme,blankImage:e.options.blankImage,minzoom:e.minZoom,maxzoom:e.maxZoom,name:e.name,description:e.description};for(var g=0;g<e.options.tiles.length;g++)f.tiles.push(e.options.tiles[g].replace(".png",c).replace(".jpg",d));m.mapTypes.set("mb-low",new wax.g.connector(f))}return wax.bwdetect(b,function(b){a.setMapTypeId(b?"mb":"mb-low")})},wax=wax||{},wax.g=wax.g||{},wax.g.hash=function(a){return wax.hash({getCenterZoom:function(){var b=a.getCenter(),c=a.getZoom(),d=Math.max(0,Math.ceil(Math.log(c)/Math.LN2));return[c.toFixed(2),b.lat().toFixed(d),b.lng().toFixed(d)].join("/")},setCenterZoom:function b(b){a.setCenter(new google.maps.LatLng(b[1],b[2])),a.setZoom(b[0])},bindChange:function(b){google.maps.event.addListener(a,"idle",b)},unbindChange:function(b){google.maps.event.removeListener(a,"idle",b)}})},wax=wax||{},wax.g=wax.g||{},wax.g.interaction=function(a,b,c){b=b||{},c=c||{};var d={waxGM:new wax.GridManager(b),callbacks:c.callbacks||new wax.tooltip,clickAction:c.clickAction||"full",eventHandlers:{},add:function(){return this.eventHandlers.tileloaded=google.maps.event.addListener(a,"tileloaded",wax.util.bind(this.clearTileGrid,this)),this.eventHandlers.idle=google.maps.event.addListener(a,"idle",wax.util.bind(this.clearTileGrid,this)),this.eventHandlers.mousemove=google.maps.event.addListener(a,"mousemove",this.onMove()),this.eventHandlers.click=google.maps.event.addListener(a,"click",this.click()),this},remove:function(){return google.maps.event.removeListener(this.eventHandlers.tileloaded),google.maps.event.removeListener(this.eventHandlers.idle),google.maps.event.removeListener(this.eventHandlers.mousemove),google.maps.event.removeListener(this.eventHandlers.click),this},getTileGrid:function(){if(!this._getTileGrid){this._getTileGrid=[];var b=a.getZoom(),c=wax.util.offset(a.getDiv()),d=wax.util.bind(function(a){if(!a.interactive)return;for(var d in a.cache){if(d.split("/")[0]!=b)continue;var e=wax.util.offset(a.cache[d]);this._getTileGrid.push([e.top-c.top,e.left-c.left,a.cache[d]])}},this);for(var e in a.mapTypes)d(a.mapTypes[e]);a.overlayMapTypes.forEach(d)}return this._getTileGrid},clearTileGrid:function(a,b){this._getTileGrid=null},getTile:function(a){var b,c=this.getTileGrid();for(var d=0;d<c.length;d++)if(c[d][0]<a.pixel.y&&c[d][0]+256>a.pixel.y&&c[d][1]<a.pixel.x&&c[d][1]+256>a.pixel.x){b=c[d][2];break}return b||!1},onMove:function(b){return this._onMove||(this._onMove=wax.util.bind(function(b){var c=this.getTile(b);c&&this.waxGM.getGrid(c.src,wax.util.bind(function(d,e){if(d||!e)return;var f=e.tileFeature(b.pixel.x+wax.util.offset(a.getDiv()).left,b.pixel.y+wax.util.offset(a.getDiv()).top,c,{format:"teaser"});f&&this.feature!==f?(this.feature=f,this.callbacks.out(a.getDiv()),this.callbacks.over(f,a.getDiv(),0,b)):f||(this.feature=null,this.callbacks.out(a.getDiv()))},this))},this)),this._onMove},click:function( | ||
b){return this._onClick||(this._onClick=wax.util.bind(function(b){var c=this.getTile(b);c&&this.waxGM.getGrid(c.src,wax.util.bind(function(d,e){if(d||!e)return;var f=e.tileFeature(b.pixel.x+wax.util.offset(a.getDiv()).left,b.pixel.y+wax.util.offset(a.getDiv()).top,c,{format:this.clickAction});if(f)switch(this.clickAction){case"full":this.callbacks.click(f,a.getDiv(),0,b);break;case"location":window.location=f}},this))},this)),this._onClick}};return d.add(a)},wax=wax||{},wax.g=wax.g||{},wax.g.legend=function(a,b){b=b||{};var c,d={};return d.add=function(){return c=wax.legend().content(b.legend||""),this},d.element=function(){return c.element()},d.appendTo=function(a){return wax.util.$(a).appendChild(c.element()),this},d.add()};var wax=wax||{};wax.g=wax.g||{},wax.g.connector=function(a){a=a||{},this.options={tiles:a.tiles,scheme:a.scheme||"xyz",blankImage:a.blankImage},this.minZoom=a.minzoom||0,this.maxZoom=a.maxzoom||22,this.name=a.name||"",this.description=a.description||"",this.interactive=!0,this.tileSize=new google.maps.Size(256,256),this.cache={}},wax.g.connector.prototype.getTile=function(a,b,c){var d=b+"/"+a.x+"/"+a.y;if(!this.cache[d]){var e=this.cache[d]=new Image(256,256);this.cache[d].src=this.getTileUrl(a,b),this.cache[d].setAttribute("gTileKey",d),this.cache[d].onerror=function(){e.style.display="none"}}return this.cache[d]},wax.g.connector.prototype.releaseTile=function(a){var b=a.getAttribute("gTileKey");this.cache[b]&&delete this.cache[b],a.parentNode&&a.parentNode.removeChild(a)},wax.g.connector.prototype.getTileUrl=function(a,b){var c=Math.pow(2,b),d=this.options.scheme==="tms"?c-1-a.y:a.y,e=a.x%c;return e=e<0?a.x%c+c:e,d<0?this.options.blankImage:this.options.tiles[parseInt(e+d,10)%this.options.tiles.length].replace("{z}",b).replace("{x}",e).replace("{y}",d)} | ||
*/!function(context,win){function serial(a){var b=a.name;if(a.disabled||!b)return"";b=enc(b);switch(a.tagName.toLowerCase()){case"input":switch(a.type){case"reset":case"button":case"image":case"file":return"";case"checkbox":case"radio":return a.checked?b+"="+(a.value?enc(a.value):!0)+"&":"";default:return b+"="+(a.value?enc(a.value):"")+"&"}break;case"textarea":return b+"="+enc(a.value)+"&";case"select":return b+"="+enc(a.options[a.selectedIndex].value)+"&"}return""}function enc(a){return encodeURIComponent(a)}function reqwest(a,b){return new Reqwest(a,b)}function init(o,fn){function error(a){o.error&&o.error(a),complete(a)}function success(resp){o.timeout&&clearTimeout(self.timeout)&&(self.timeout=null);var r=resp.responseText;if(r)switch(type){case"json":resp=win.JSON?win.JSON.parse(r):eval("("+r+")");break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function complete(a){o.complete&&o.complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort(),error()},o.timeout)),this.request=getRequest(o,success,error)}function setType(a){return/\.json$/.test(a)?"json":/\.jsonp$/.test(a)?"jsonp":/\.js$/.test(a)?"js":/\.html?$/.test(a)?"html":/\.xml$/.test(a)?"xml":"js"}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function getRequest(a,b,c){if(a.type!="jsonp"){var d=xhr();return d.open(a.method||"GET",typeof a=="string"?a:a.url,!0),setHeaders(d,a),d.onreadystatechange=handleReadyState(d,b,c),a.before&&a.before(d),d.send(a.data||null),d}var e=doc.createElement("script"),f=0;win[getCallbackName(a)]=generalCallback,e.type="text/javascript",e.src=a.url,e.async=!0,e.onload=e.onreadystatechange=function(){if(e[readyState]&&e[readyState]!=="complete"&&e[readyState]!=="loaded"||f)return!1;e.onload=e.onreadystatechange=null,a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(e),f=1},head.appendChild(e)}function generalCallback(a){lastValue=a}function getCallbackName(a){var b=a.jsonpCallback||"callback";if(a.url.slice(-(b.length+2))==b+"=?"){var c="reqwest_"+uniqid++;return a.url=a.url.substr(0,a.url.length-1)+c,c}var d=new RegExp(b+"=([\\w]+)");return a.url.match(d)[1]}function setHeaders(a,b){var c=b.headers||{};c.Accept=c.Accept||"text/javascript, text/html, application/xml, text/xml, */*",b.crossOrigin||(c["X-Requested-With"]=c["X-Requested-With"]||"XMLHttpRequest"),c[contentType]=c[contentType]||"application/x-www-form-urlencoded";for(var d in c)c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d],!1)}function handleReadyState(a,b,c){return function(){a&&a[readyState]==4&&(twoHundo.test(a.status)?b(a):c(a))}}var twoHundo=/^20\d$/,doc=document,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",head=doc[byTag]("head")[0],uniqid=0,lastValue,xhr="XMLHttpRequest"in win?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serialize=function(a){var b=[a[byTag]("input"),a[byTag]("select"),a[byTag]("textarea")],c=[],d,e;for(d=0,l=b.length;d<l;++d)for(e=0,l2=b[d].length;e<l2;++e)c.push(serial(b[d][e]));return c.join("").replace(/&$/,"")},reqwest.serializeArray=function(a){for(var b=this.serialize(a).split("&"),c=0,d=b.length,e=[],f;c<d;c++)b[c]&&(f=b[c].split("="))&&e.push({name:f[0],value:f[1]});return e};var old=context.reqwest;reqwest.noConflict=function(){return context.reqwest=old,this},typeof module!="undefined"?module.exports=reqwest:context.reqwest=reqwest}(this,window);var html4={};html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10},html4.ATTRIBS={"*::class":9,"*::dir":0,"*::id":4,"*::lang":0,"*::onclick":2,"*::ondblclick":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::style":3,"*::title":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::rel":0,"a::rev":0,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"del::cite":1,"del::datetime":0,"dir::compact":0,"div::align":0,"dl::compact":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::ismap":0,"input::maxlength":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::readonly":0,"input::size":0,"input::src":1,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"ol::compact":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"p::align":0,"pre::width":0,"q::cite":1,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::size":0,"select::tabindex":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::cols":0,"textarea::disabled":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::readonly":0,"textarea::rows":0,"textarea::tabindex":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"ul::compact":0,"ul::type":0},html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128},html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:16,area:2,b:0,base:18,basefont:18,bdo:0,big:0,blockquote:0,body:49,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,dd:1,del:0,dfn:0,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,font:0,form:0,frame:18,frameset:16,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:49,hr:2,html:49,i:0,iframe:4,img:2,input:2,ins:0,isindex:18,kbd:0,label:0,legend:0,li:1,link:18,map:0,menu:0,meta:18,nobr:0,noembed:4,noframes:20,noscript:20,object:16,ol:0,optgroup:0,option:1,p:1,param:18,pre:0,q:0,s:0,samp:0,script:84,select:0,small:0,span:0,strike:0,strong:0,style:148,sub:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,title:24,tr:1,tt:0,u:0,ul:0,"var":0},html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2},html4.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"body::background":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0},html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0},html4.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"body::background":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2};var html=function(a){function g(a){a=b(a);if(c.hasOwnProperty(a))return c[a];var d=a.match(e);return d?String.fromCharCode(parseInt(d[1],10)):(d=a.match(f))?String.fromCharCode(parseInt(d[1],16)):""}function h(a,b){return g(b)}function j(a){return a.replace(i,"")}function l(a){return a.replace(k,h)}function s(a){return a.replace(m,"&").replace(o,"<").replace(p,">").replace(q,""").replace(r,"=")}function t(a){return a.replace(n,"&$1").replace(o,"<").replace(p,">")}function w(c){return function d(d,e){d=String(d);var f=null,g=!1,h=[],i=void 0,k=void 0,m=void 0;c.startDoc&&c.startDoc(e);while(d){var n=d.match(g?u:v);d=d.substring(n[0].length);if(g){if(n[1]){var o=b(n[1]),p;if(n[2]){var q=n[3];switch(q.charCodeAt(0)){case 34:case 39:q=q.substring(1,q.length-1)}p=l(j(q))}else p=o;h.push(o,p)}else if(n[4]){k!==void 0&&(m?c.startTag&&c.startTag(i,h,e):c.endTag&&c.endTag(i,e));if(m&&k&(a.eflags.CDATA|a.eflags.RCDATA)){f===null?f=b(d):f=f.substring(f.length-d.length);var r=f.indexOf("</"+i);r<0&&(r=d.length),r&&(k&a.eflags.CDATA?c.cdata&&c.cdata(d.substring(0,r),e):c.rcdata&&c.rcdata(t(d.substring(0,r)),e),d=d.substring(r))}i=k=m=void 0,h.length=0,g=!1}}else if(n[1])c.pcdata&&c.pcdata(n[0],e);else if(n[3])m=!n[2],g=!0,i=b(n[3]),k=a.ELEMENTS.hasOwnProperty(i)?a.ELEMENTS[i]:void 0;else if(n[4])c.pcdata&&c.pcdata(n[4],e);else if(n[5]&&c.pcdata){var s=n[5];c.pcdata(s==="<"?"<":s===">"?">":"&",e)}}c.endDoc&&c.endDoc(e)}}function x(b){var c,d;return w({startDoc:function(a){c=[],d=!1},startTag:function(e,f,g){if(d)return;if(!a.ELEMENTS.hasOwnProperty(e))return;var h=a.ELEMENTS[e];if(h&a.eflags.FOLDABLE)return;if(h&a.eflags.UNSAFE){d=!(h&a.eflags.EMPTY);return}f=b(e,f);if(f){h&a.eflags.EMPTY||c.push(e),g.push("<",e);for(var i=0,j=f.length;i<j;i+=2){var k=f[i],l=f[i+1];l!==null&&l!==void 0&&g.push(" ",k,'="',s(l),'"')}g.push(">")}},endTag:function(b,e){if(d){d=!1;return}if(!a.ELEMENTS.hasOwnProperty(b))return;var f=a.ELEMENTS[b];if(!(f&(a.eflags.UNSAFE|a.eflags.EMPTY|a.eflags.FOLDABLE))){var g;if(f&a.eflags.OPTIONAL_ENDTAG)for(g=c.length;--g>=0;){var h=c[g];if(h===b)break;if(!(a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG))return}else for(g=c.length;--g>=0;)if(c[g]===b)break;if(g<0)return;for(var i=c.length;--i>g;){var h=c[i];a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG||e.push("</",h,">")}c.length=g,e.push("</",b,">")}},pcdata:function(a,b){d||b.push(a)},rcdata:function(a,b){d||b.push(a)},cdata:function(a,b){d||b.push(a)},endDoc:function(a){for(var b=c.length;--b>=0;)a.push("</",c[b],">");c.length=0}})}function z(b,c,e){var f=[];return x(function g(b,f){for(var g=0;g<f.length;g+=2){var h=f[g],i=f[g+1],j=null,k;if((k=b+"::"+h,a.ATTRIBS.hasOwnProperty(k))||(k="*::"+h,a.ATTRIBS.hasOwnProperty(k)))j=a.ATTRIBS[k];if(j!==null)switch(j){case a.atype.NONE:break;case a.atype.SCRIPT:case a.atype.STYLE:i=null;break;case a.atype.ID:case a.atype.IDREF:case a.atype.IDREFS:case a.atype.GLOBAL_NAME:case a.atype.LOCAL_NAME:case a.atype.CLASSES:i=e?e(i):i;break;case a.atype.URI:var l=(""+i).match(y);l?!l[1]||d.test(l[1])?i=c&&c(i):i=null:i=null;break;case a.atype.URI_FRAGMENT:i&&"#"===i.charAt(0)?(i=e?e(i):i,i&&(i="#"+i)):i=null;break;default:i=null}else i=null;f[g+1]=i}return f})(b,f),f.join("")}var b;"script"==="SCRIPT".toLowerCase()?b=function(a){return a.toLowerCase()}:b=function(a){return a.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)|32)})};var c={lt:"<",gt:">",amp:"&",nbsp:" ",quot:'"',apos:"'"},d=/^(?:https?|mailto|data)$/i,e=/^#(\d+)$/,f=/^#x([0-9A-Fa-f]+)$/,i=/\0/g,k=/&(#\d+|#x[0-9A-Fa-f]+|\w+);/g,m=/&/g,n=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,o=/</g,p=/>/g,q=/\"/g,r=/\=/g,u=new RegExp("^\\s*(?:(?:([a-z][a-z-]*)(\\s*=\\s*(\"[^\"]*\"|'[^']*'|(?=[a-z][a-z-]*\\s*=)|[^>\"'\\s]*))?)|(/?>)|[\\s\\S][^a-z\\s>]*)","i"),v=new RegExp("^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);|<!--[\\s\\S]*?-->|<!\\w[^>]*>|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))","i"),y=new RegExp("^(?:([^:/?#]+):)?");return{escapeAttrib:s,makeHtmlSanitizer:x,makeSaxParser:w,normalizeRCData:t,sanitize:z,unescapeEntities:l}}(html4),html_sanitize=html.sanitize;typeof window!="undefined"&&(window.html=html,window.html_sanitize=html_sanitize),html4.ATTRIBS["*::style"]=0,html4.ELEMENTS.style=0;var Mustache=function(){var a={},b=function(){};return b.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(a,b,c,d){d||(this.context=b,this.buffer=[]);if(!this.includes("",a)){if(d)return a;this.send(a);return}a=this.render_pragmas(a);var e=this.render_section(a,b,c);e===!1&&(e=this.render_tags(a,b,c,d));if(d)return e;this.sendLines(e)},send:function(a){a!==""&&this.buffer.push(a)},sendLines:function(a){if(a){var b=a.split("\n");for(var c=0;c<b.length;c++)this.send(b[c])}},render_pragmas:function(a){if(!this.includes("%",a))return a;var b=this,c=this.getCachedRegex("render_pragmas",function(a,b){return new RegExp(a+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+b,"g")});return a.replace(c,function(a,c,d){if(!b.pragmas_implemented[c])throw{message:"This implementation of mustache doesn't understand the '"+c+"' pragma"};b.pragmas[c]={};if(d){var e=d.split("=");b.pragmas[c][e[0]]=e[1]}return""})},render_partial:function(a,b,c){a=this.trim(a);if(!c||c[a]===undefined)throw{message:"unknown_partial '"+a+"'"};return typeof b[a]!="object"?this.render(c[a],b,c,!0):this.render(c[a],b[a],c,!0)},render_section:function(a,b,c){if(!this.includes("#",a)&&!this.includes("^",a))return!1;var d=this,e=this.getCachedRegex("render_section",function(a,b){return new RegExp("^([\\s\\S]*?)"+a+"(\\^|\\#)\\s*(.+)\\s*"+b+"\n*([\\s\\S]*?)"+a+"\\/\\s*\\3\\s*"+b+"\\s*([\\s\\S]*)$","g")});return a.replace(e,function(a,e,f,g,h,i){var j=e?d.render_tags(e,b,c,!0):"",k=i?d.render(i,b,c,!0):"",l,m=d.find(g,b);return f==="^"?!m||d.is_array(m)&&m.length===0?l=d.render(h,b,c,!0):l="":f==="#"&&(d.is_array(m)?l=d.map(m,function(a){return d.render(h,d.create_context(a),c,!0)}).join(""):d.is_object(m)?l=d.render(h,d.create_context(m),c,!0):typeof m=="function"?l=m.call(b,h,function(a){return d.render(a,b,c,!0)}):m?l=d.render(h,b,c,!0):l=""),j+l+k})},render_tags:function(a,b,c,d){var e=this,f=function(){return e.getCachedRegex("render_tags",function(a,b){return new RegExp(a+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+b+"+","g")})},g=f(),h=function(a,d,h){switch(d){case"!":return"";case"=":return e.set_delimiters(h),g=f(),"";case">":return e.render_partial(h,b,c);case"{":return e.find(h,b);default:return e.escape(e.find(h,b))}},i=a.split("\n");for(var j=0;j<i.length;j++)i[j]=i[j].replace(g,h,this),d||this.send(i[j]);if(d)return i.join("\n")},set_delimiters:function(a){var b=a.split(" ");this.otag=this.escape_regex(b[0]),this.ctag=this.escape_regex(b[1])},escape_regex:function(a){if(!arguments.callee.sRE){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+b.join("|\\")+")","g")}return a.replace(arguments.callee.sRE,"\\$1")},find:function(a,b){function c(a){return a===!1||a===0||a}a=this.trim(a);var d;return c(b[a])?d=b[a]:c(this.context[a])&&(d=this.context[a]),typeof d=="function"?d.apply(b):d!==undefined?d:""},includes:function(a,b){return b.indexOf(this.otag+a)!=-1},escape:function(a){return a=String(a===null?"":a),a.replace(/&(?!\w+;)|["'<>\\]/g,function(a){switch(a){case"&":return"&";case'"':return""";case"'":return"'";case"<":return"<";case">":return">";default:return a}})},create_context:function(a){if(this.is_object(a))return a;var b=".";this.pragmas["IMPLICIT-ITERATOR"]&&(b=this.pragmas["IMPLICIT-ITERATOR"].iterator);var c={};return c[b]=a,c},is_object:function(a){return a&&typeof a=="object"},is_array:function(a){return Object.prototype.toString.call(a)==="[object Array]"},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},map:function(a,b){if(typeof a.map=="function")return a.map(b);var c=[],d=a.length;for(var e=0;e<d;e++)c.push(b(a[e]));return c},getCachedRegex:function(b,c){var d=a[this.otag];d||(d=a[this.otag]={});var e=d[this.ctag];e||(e=d[this.ctag]={});var f=e[b];return f||(f=e[b]=c(this.otag,this.ctag)),f}},{name:"mustache.js",version:"0.4.0-dev",to_html:function(a,c,d,e){var f=new b;e&&(f.send=e),f.render(a,c||{},d);if(!e)return f.buffer.join("\n")}}}();wax=wax||{},wax.attribution=function(){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var a,b={};return b.set=function(b){if(typeof b=="undefined")return;return a.innerHTML=html_sanitize(b,c,d),this},b.element=function(){return a},b.init=function(){return a=document.createElement("div"),a.className="wax-attribution",this},b.init()},wax=wax||{},wax.bwdetect=function(a,b){function h(){wax.bw=-1;var a=new Image;a.src=e;var b=!0,f=setTimeout(function(){b&&wax.bw==-1&&(c.bw(0),b=!1)},d);a.onload=function(){b&&wax.bw==-1&&(clearTimeout(f),c.bw(1),b=!1)}}var c={},d=a.threshold||400,e="http://a.tiles.mapbox.com/mapbox/1.0.0/blue-marble-topo-bathy-jul/0/0/0.png?preventcache="+ +(new Date),f=1,g=a.auto===undefined?!0:a.auto;return c.bw=function(a){if(!arguments.length)return f;var c=f;wax.bwlisteners&&wax.bwlisteners.length&&function(){listeners=wax.bwlisteners,wax.bwlisteners=[];for(i=0;i<listeners;i++)listeners[i](a)}(),wax.bw=a,f!=(f=a)&&b(a)},c.add=function(){return g&&h(),this},wax.bw==-1?(wax.bwlisteners=wax.bwlisteners||[],wax.bwlisteners.push(c.bw)):wax.bw!==undefined?c.bw(wax.bw):c.add(),c},wax.formatter=function(x){function urlX(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function idX(a){return a}var formatter={},f;if(x&&typeof x=="string")try{eval("f = "+x)}catch(e){console&&console.log(e)}else x&&typeof x=="function"?f=x:f=function(){};return formatter.format=function(a,b){try{return html_sanitize(f(a,b),urlX,idX)}catch(c){console&&console.log(c)}},formatter},wax.GridInstance=function(a,b,c){function g(a){return a>=93&&a--,a>=35&&a--,a-=32,a}c=c||{};var d={},e=c.resolution||4,f=c.tileSize||256;return d.grid_tile=function(){return a},d.getKey=function(b,c){if(!a||!a.grid)return;if(c<0||b<0)return;if(Math.floor(c)>=f||Math.floor(b)>=f)return;return g(a.grid[Math.floor(c/e)].charCodeAt(Math.floor(b/e)))},d.gridFeature=function(b,c){var d=this.getKey(b,c),e=a.keys;if(e&&e[d]&&a.data[e[d]])return a.data[e[d]]},d.tileFeature=function(c,d,e,f){if(!a)return;var g=wax.util.offset(e);feature=this.gridFeature(c-g.left,d-g.top);if(feature)return b.format(f,feature)},d},wax.GridManager=function(a){function h(a){return typeof a=="string"&&(a=[a]),function b(b){if(!b)return;var c=new RegExp("/(\\d+)\\/(\\d+)\\/(\\d+)\\.[\\w\\._]+"),d=c.exec(b);if(!d)return;return a[parseInt(d[2],10)%a.length].replace("{z}",d[1]).replace("{x}",d[2]).replace("{y}",d[3])}}a=a||{};var b=a.resolution||4,c=a.version||"1.1",d={},e={},f,g=function(a){return a.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json")};return e.formatter=function(a){return arguments.length?(f=wax.formatter(a),e):f},e.template=function(a){return arguments.length?(f=wax.template(a),e):f},e.gridUrl=function(a){return arguments.length?(g=typeof a=="function"?a:h(a),e):g},e.getGrid=function(a,c){var d=g(a);return!f||!d?c(null,null):(wax.request.get(d,function(a,d){if(a)return c(a,null);c(null,wax.GridInstance(d,f,{resolution:b||4}))}),e)},e.add=function(a){return a.template?e.template(a.template):a.formatter&&e.formatter(a.formatter),a.grids&&e.gridUrl(a.grids),this},e.add(a)},wax=wax||{},wax.hash=function(a){function b(){return location.hash.substring(1)}function c(a){location.hash="#"+a}function g(b){var c=b.split("/");for(var d=0;d<c.length;d++){c[d]=Number(c[d]);if(isNaN(c[d]))return!0}if(c.length<3)return!0;c.length==3&&a.setCenterZoom(c)}function h(){var b=a.getCenterZoom();d!==b&&(d=b,c(d))}function i(a){if(a===d)return;g(d=a)&&h()}a=a||{};var d,e={},f=90-1e-8,j=wax.util.throttle(h,500);return e.add=function(){return i(b()),a.bindChange(j),this},e.remove=function(){return a.unbindChange(j),this},e.add()};var wax=wax||{};wax.legend=function(){function d(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function e(a){return a}var a,b={},c;return b.element=function(){return c},b.content=function(b){return arguments.length?(b?(a.innerHTML=html_sanitize(b,d,e),a.style.display="block"):(a.innerHTML="",a.style.display="none"),this):a.innerHTML},b.add=function(){return c=document.createElement("div"),c.className="wax-legends",a=document.createElement("div"),a.className="wax-legend",a.style.display="none",c.appendChild(a),this},b.add()};var w=function(a){return a.melt=function(b,c){return b.apply(c,[a,c])},a},wax=wax||{};wax.movetip={},wax.movetip=function(a){function g(a){return a&&a.className.indexOf("wax-popup")!==-1}function h(a,b){var c=document.createElement("div");return c.className="wax-movetip",c.style.cssText="position:absolute;",c.innerHTML=a,b.appendChild(c),d=b,_tooltipOffset=wax.util.offset(c),_contextOffset=wax.util.offset(d),c}function i(a){if(!c)return;var b=wax.util.eventoffset(a);c.className="wax-movetip",_tooltipOffset.height+b.y>_contextOffset.top+_contextOffset.height&&_contextOffset.height>_tooltipOffset.height&&(b.y-=_tooltipOffset.height,c.className+=" flip-y"),_tooltipOffset.width+b.x>_contextOffset.left+_contextOffset.width&&(b.x-=_tooltipOffset.width,c.className+=" flip-x"),c.style.left=b.x+"px",c.style.top=b.y+"px"}function j(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&e?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&e&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+e):a.parentNode&&a.parentNode.removeChild(a)}function k(a,b){c&&(j(c),c=undefined);var d=h(a,b);d.className+=" wax-popup",d.innerHTML=a;var e=document.createElement("a");e.href="#close",e.className="close",e.innerHTML="Close",d.appendChild(e);var f=function(a){return j(d),c=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1};e.addEventListener?e.addEventListener("click",f,!1):e.attachEvent&&e.attachEvent("onclick",f),c=d}a=a||{};var b={},c=undefined,d=undefined,e=a.animationOut,f=a.animationIn;return b.over=function(a,b,d){if(!a)return;b.style.cursor="pointer";if(g(c))return;c=h(a,b),i(d),b.addEventListener&&b.addEventListener("mousemove",i)},b.out=function(a){a.style.cursor="default";if(g(c))return;c&&(j(c),a.removeEventListener&&a.removeEventListener("mousemove",i),c=undefined)},b};var wax=wax||{};wax.request={cache:{},locks:{},promises:{},get:function(a,b){if(this.cache[a])return b(this.cache[a][0],this.cache[a][1]);this.promises[a]=this.promises[a]||[],this.promises[a].push(b);if(this.locks[a])return;var c=this;this.locks[a]=!0,reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(b){c.locks[a]=!1,c.cache[a]=[null,b];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])},error:function(b){c.locks[a]=!1,c.cache[a]=[b,null];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])}})}},wax.template=function(a){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var b={};return b.format=function(b,e){var f={};for(var g in e)f[g]=e[g];return b.format&&(f["__"+b.format+"__"]=!0),html_sanitize(Mustache.to_html(a,f),c,d)},b};if(!wax)var wax={};wax.tilejson=function(a,b){reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:b,error:b})};var wax=wax||{};wax.tooltip={},wax.tooltip=function(a){this._currentTooltip=undefined,a=a||{},a.animationOut&&(this.animationOut=a.animationOut),a.animationIn&&(this.animationIn=a.animationIn)},wax.tooltip.prototype.isPopup=function(a){return a&&a.className.indexOf("wax-popup")!==-1},wax.tooltip.prototype.getTooltip=function(a,b){var c=document.createElement("div");return c.className="wax-tooltip wax-tooltip-0",c.innerHTML=a,b.appendChild(c),c},wax.tooltip.prototype.hideTooltip=function(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&this.animationOut?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&this.animationOut&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+this.animationOut):a.parentNode&&a.parentNode.removeChild(a)},wax.tooltip.prototype.click=function(a,b){this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined);var c=this.getTooltip(a,b);c.className+=" wax-popup",c.innerHTML=a;var d=document.createElement("a");d.href="#close",d.className="close",d.innerHTML="Close",c.appendChild(d);var e=wax.util.bind(function(a){return this.hideTooltip(c),this._currentTooltip=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1},this);d.addEventListener?(d.addEventListener("click",e,!1),d.addEventListener("touchend",e,!1)):d.attachEvent&&d.attachEvent("onclick",e),this._currentTooltip=c},wax.tooltip.prototype.over=function(a,b){if(!a)return;b.style.cursor="pointer";if(this.isPopup(this._currentTooltip))return;this._currentTooltip=this.getTooltip(a,b)},wax.tooltip.prototype.out=function(a){a.style.cursor="default";if(this.isPopup(this._currentTooltip))return;this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined)};var wax=wax||{};wax.util=wax.util||{},wax.util={offset:function(a){var b=a.offsetWidth||parseInt(a.style.width,10),c=a.offsetHeight||parseInt(a.style.height,10),d=document.body,e=0,f=0,g=function(a){if(a===d||a===document.documentElement)return;e+=a.offsetTop,f+=a.offsetLeft;var b=a.style.transform||a.style.WebkitTransform||a.style.OTransform||a.style.MozTransform||a.style.msTransform;if(b)if(match=b.match(/translate\((.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/translate3d\((.+)px, (.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/matrix3d\(([\-\d,\s]+)\)/)){var c=match[1].split(",");e+=parseInt(c[13],10),f+=parseInt(c[12],10)}else if(match=b.match(/matrix\(.+, .+, .+, .+, (.+), (.+)\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10)};g(a);try{while(a=a.offsetParent)g(a)}catch(h){}e+=d.offsetTop,f+=d.offsetLeft,e+=d.parentNode.offsetTop,f+=d.parentNode.offsetLeft;var i=document.defaultView?window.getComputedStyle(d.parentNode,null):d.parentNode.currentStyle;return d.parentNode.offsetTop!==parseInt(i.marginTop,10)&&!isNaN(parseInt(i.marginTop,10))&&(e+=parseInt(i.marginTop,10),f+=parseInt(i.marginLeft,10)),{top:e,left:f,height:c,width:b}},$:function(a){return typeof a=="string"?document.getElementById(a):a},bind:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,c.concat(Array.prototype.slice.call(arguments)))}},isString:function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)},indexOf:function(a,b){var c=Array.prototype.indexOf;if(a===null)return-1;var d,e;if(c&&a.indexOf===c)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(a[d]===b)return d;return-1},isArray:Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},keys:Object.keys||function(a){var b=Object.prototype.hasOwnProperty;if(a!==Object(a))throw new TypeError("Invalid object");var c=[];for(var d in a)b.call(a,d)&&(c[c.length]=d);return c},eventoffset:function(a){var b=0,c=0;if(!a)var a=window.event;if(a.pageX||a.pageY)return{x:a.pageX,y:a.pageY};if(a.clientX||a.clientY){var d=document.documentElement,e=document.body,f=document.body.parentNode.currentStyle,g=parseInt(f.marginTop,10)||0,h=parseInt(f.marginLeft,10)||0;return{x:a.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0)+h,y:a.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)+g}}if(a.touches&&a.touches.length===1)return{x:a.touches[0].pageX,y:a.touches[0].pageY}},limit:function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d);if(c||!d)d=setTimeout(g,b)}},throttle:function(a,b){return this.limit(a,b,!1)}},wax=wax||{},wax.g=wax.g||{},wax.g.attribution=function(a,b){b=b||{};var c,d={};return d.element=function(){return c.element()},d.appendTo=function(a){return wax.util.$(a).appendChild(c.element()),this},d.init=function(){return c=wax.attribution(),c.set(b.attribution),c.element().className="wax-attribution wax-g",this},d.init()},wax=wax||{},wax.g=wax.g||{},wax.g.bwdetect=function(a,b){b=b||{};var c=b.png||".png128",d=b.jpg||".jpg70";if(!a.mapTypes["mb-low"]){var e=a.mapTypes.mb,f={tiles:[],scheme:e.options.scheme,blankImage:e.options.blankImage,minzoom:e.minZoom,maxzoom:e.maxZoom,name:e.name,description:e.description};for(var g=0;g<e.options.tiles.length;g++)f.tiles.push(e.options.tiles[g].replace(".png",c).replace(".jpg",d));m.mapTypes.set("mb-low",new wax.g.connector(f))}return wax.bwdetect(b,function(b){a.setMapTypeId(b?"mb":"mb-low")})},wax=wax||{},wax.g=wax.g||{},wax.g.hash=function(a){return wax.hash({getCenterZoom:function(){var b=a.getCenter(),c=a.getZoom(),d=Math.max(0,Math.ceil(Math.log(c)/Math.LN2));return[c.toFixed(2),b.lat().toFixed(d),b.lng().toFixed(d)].join("/")},setCenterZoom:function b(b){a.setCenter(new google.maps.LatLng(b[1],b[2])),a.setZoom(b[0])},bindChange:function(b){google.maps.event.addListener(a,"idle",b)},unbindChange:function(b){google.maps.event.removeListener(a,"idle",b)}})},wax=wax||{},wax.g=wax.g||{},wax.g.interaction=function(a,b,c){b=b||{},c=c||{};var d={waxGM:new wax.GridManager(b),callbacks:c.callbacks||new wax.tooltip,clickAction:c.clickAction||"full",eventHandlers:{},add:function(){return this.eventHandlers.tileloaded=google.maps.event.addListener(a,"tileloaded",wax.util.bind(this.clearTileGrid,this)),this.eventHandlers.idle=google.maps.event.addListener(a,"idle",wax.util.bind(this.clearTileGrid,this)),this.eventHandlers.mousemove=google.maps.event.addListener(a,"mousemove",this.onMove()),this.eventHandlers.click=google.maps.event.addListener(a,"click",this.click()),this},remove:function(){return google.maps.event.removeListener(this.eventHandlers.tileloaded),google.maps.event.removeListener(this.eventHandlers.idle),google.maps.event.removeListener(this.eventHandlers.mousemove),google.maps.event.removeListener(this.eventHandlers.click),this},getTileGrid:function(){if(!this._getTileGrid){this._getTileGrid=[];var b=a.getZoom(),c=wax.util.offset(a.getDiv()),d=wax.util.bind(function(a){if(!a.interactive)return;for(var d in a.cache){if(d.split("/")[0]!=b)continue;var e=wax.util.offset(a.cache[d]);this._getTileGrid.push([e.top-c.top,e.left-c.left,a.cache[d]])}},this);for(var e in a.mapTypes)d(a.mapTypes[e]);a.overlayMapTypes.forEach(d)}return this._getTileGrid},clearTileGrid:function(a,b){this._getTileGrid=null},getTile:function(a){var b,c=this.getTileGrid();for(var d=0;d<c.length;d++)if(c[d][0]<a.pixel.y&&c[d][0]+256>a.pixel.y&&c[d][1]<a.pixel.x&&c[d][1]+256>a.pixel.x){b=c[d][2];break}return b||!1},onMove:function(b){return this._onMove||(this._onMove=wax.util.bind(function(b){var c=this.getTile(b);c&&this.waxGM.getGrid(c.src,wax.util.bind(function(d,e){if(d||!e)return;var f=e.tileFeature(b.pixel.x+wax.util.offset(a.getDiv()).left,b.pixel.y+wax.util.offset(a.getDiv()).top,c,{format:"teaser"});f&&this.feature!==f?(this.feature=f,this.callbacks.out(a.getDiv()),this.callbacks.over(f,a.getDiv(),0,b)):f||(this.feature=null,this.callbacks.out(a.getDiv()))},this))},this)), | ||
this._onMove},click:function(b){return this._onClick||(this._onClick=wax.util.bind(function(b){var c=this.getTile(b);c&&this.waxGM.getGrid(c.src,wax.util.bind(function(d,e){if(d||!e)return;var f=e.tileFeature(b.pixel.x+wax.util.offset(a.getDiv()).left,b.pixel.y+wax.util.offset(a.getDiv()).top,c,{format:this.clickAction});if(f)switch(this.clickAction){case"full":this.callbacks.click(f,a.getDiv(),0,b);break;case"location":window.location=f}},this))},this)),this._onClick}};return d.add(a)},wax=wax||{},wax.g=wax.g||{},wax.g.legend=function(a,b){b=b||{};var c,d={};return d.add=function(){return c=wax.legend().content(b.legend||""),this},d.element=function(){return c.element()},d.appendTo=function(a){return wax.util.$(a).appendChild(c.element()),this},d.add()};var wax=wax||{};wax.g=wax.g||{},wax.g.connector=function(a){a=a||{},this.options={tiles:a.tiles,scheme:a.scheme||"xyz",blankImage:a.blankImage},this.minZoom=a.minzoom||0,this.maxZoom=a.maxzoom||22,this.name=a.name||"",this.description=a.description||"",this.interactive=!0,this.tileSize=new google.maps.Size(256,256),this.cache={}},wax.g.connector.prototype.getTile=function(a,b,c){var d=b+"/"+a.x+"/"+a.y;if(!this.cache[d]){var e=this.cache[d]=new Image(256,256);this.cache[d].src=this.getTileUrl(a,b),this.cache[d].setAttribute("gTileKey",d),this.cache[d].onerror=function(){e.style.display="none"}}return this.cache[d]},wax.g.connector.prototype.releaseTile=function(a){var b=a.getAttribute("gTileKey");this.cache[b]&&delete this.cache[b],a.parentNode&&a.parentNode.removeChild(a)},wax.g.connector.prototype.getTileUrl=function(a,b){var c=Math.pow(2,b),d=this.options.scheme==="tms"?c-1-a.y:a.y,e=a.x%c;return e=e<0?a.x%c+c:e,d<0?this.options.blankImage:this.options.tiles[parseInt(e+d,10)%this.options.tiles.length].replace("{z}",b).replace("{x}",e).replace("{y}",d)} |
@@ -1,2 +0,2 @@ | ||
/* wax - 4.1.6 - 1.0.4-482-g8a293d4 *//*! | ||
/* wax - 4.1.7 - 1.0.4-483-gbb64c65 *//*! | ||
* Reqwest! A general purpose XHR connection manager | ||
@@ -6,2 +6,2 @@ * copyright Dustin Diaz 2011 | ||
* license MIT | ||
*/!function(context,win){function serial(a){var b=a.name;if(a.disabled||!b)return"";b=enc(b);switch(a.tagName.toLowerCase()){case"input":switch(a.type){case"reset":case"button":case"image":case"file":return"";case"checkbox":case"radio":return a.checked?b+"="+(a.value?enc(a.value):!0)+"&":"";default:return b+"="+(a.value?enc(a.value):"")+"&"}break;case"textarea":return b+"="+enc(a.value)+"&";case"select":return b+"="+enc(a.options[a.selectedIndex].value)+"&"}return""}function enc(a){return encodeURIComponent(a)}function reqwest(a,b){return new Reqwest(a,b)}function init(o,fn){function error(a){o.error&&o.error(a),complete(a)}function success(resp){o.timeout&&clearTimeout(self.timeout)&&(self.timeout=null);var r=resp.responseText;if(r)switch(type){case"json":resp=win.JSON?win.JSON.parse(r):eval("("+r+")");break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function complete(a){o.complete&&o.complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort(),error()},o.timeout)),this.request=getRequest(o,success,error)}function setType(a){return/\.json$/.test(a)?"json":/\.jsonp$/.test(a)?"jsonp":/\.js$/.test(a)?"js":/\.html?$/.test(a)?"html":/\.xml$/.test(a)?"xml":"js"}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function getRequest(a,b,c){if(a.type!="jsonp"){var d=xhr();return d.open(a.method||"GET",typeof a=="string"?a:a.url,!0),setHeaders(d,a),d.onreadystatechange=handleReadyState(d,b,c),a.before&&a.before(d),d.send(a.data||null),d}var e=doc.createElement("script"),f=0;win[getCallbackName(a)]=generalCallback,e.type="text/javascript",e.src=a.url,e.async=!0,e.onload=e.onreadystatechange=function(){if(e[readyState]&&e[readyState]!=="complete"&&e[readyState]!=="loaded"||f)return!1;e.onload=e.onreadystatechange=null,a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(e),f=1},head.appendChild(e)}function generalCallback(a){lastValue=a}function getCallbackName(a){var b=a.jsonpCallback||"callback";if(a.url.slice(-(b.length+2))==b+"=?"){var c="reqwest_"+uniqid++;return a.url=a.url.substr(0,a.url.length-1)+c,c}var d=new RegExp(b+"=([\\w]+)");return a.url.match(d)[1]}function setHeaders(a,b){var c=b.headers||{};c.Accept=c.Accept||"text/javascript, text/html, application/xml, text/xml, */*",b.crossOrigin||(c["X-Requested-With"]=c["X-Requested-With"]||"XMLHttpRequest"),c[contentType]=c[contentType]||"application/x-www-form-urlencoded";for(var d in c)c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d],!1)}function handleReadyState(a,b,c){return function(){a&&a[readyState]==4&&(twoHundo.test(a.status)?b(a):c(a))}}var twoHundo=/^20\d$/,doc=document,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",head=doc[byTag]("head")[0],uniqid=0,lastValue,xhr="XMLHttpRequest"in win?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serialize=function(a){var b=[a[byTag]("input"),a[byTag]("select"),a[byTag]("textarea")],c=[],d,e;for(d=0,l=b.length;d<l;++d)for(e=0,l2=b[d].length;e<l2;++e)c.push(serial(b[d][e]));return c.join("").replace(/&$/,"")},reqwest.serializeArray=function(a){for(var b=this.serialize(a).split("&"),c=0,d=b.length,e=[],f;c<d;c++)b[c]&&(f=b[c].split("="))&&e.push({name:f[0],value:f[1]});return e};var old=context.reqwest;reqwest.noConflict=function(){return context.reqwest=old,this},typeof module!="undefined"?module.exports=reqwest:context.reqwest=reqwest}(this,window);var html4={};html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10},html4.ATTRIBS={"*::class":9,"*::dir":0,"*::id":4,"*::lang":0,"*::onclick":2,"*::ondblclick":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::style":3,"*::title":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::rel":0,"a::rev":0,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"del::cite":1,"del::datetime":0,"dir::compact":0,"div::align":0,"dl::compact":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::ismap":0,"input::maxlength":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::readonly":0,"input::size":0,"input::src":1,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"ol::compact":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"p::align":0,"pre::width":0,"q::cite":1,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::size":0,"select::tabindex":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::cols":0,"textarea::disabled":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::readonly":0,"textarea::rows":0,"textarea::tabindex":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"ul::compact":0,"ul::type":0},html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128},html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:16,area:2,b:0,base:18,basefont:18,bdo:0,big:0,blockquote:0,body:49,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,dd:1,del:0,dfn:0,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,font:0,form:0,frame:18,frameset:16,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:49,hr:2,html:49,i:0,iframe:4,img:2,input:2,ins:0,isindex:18,kbd:0,label:0,legend:0,li:1,link:18,map:0,menu:0,meta:18,nobr:0,noembed:4,noframes:20,noscript:20,object:16,ol:0,optgroup:0,option:1,p:1,param:18,pre:0,q:0,s:0,samp:0,script:84,select:0,small:0,span:0,strike:0,strong:0,style:148,sub:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,title:24,tr:1,tt:0,u:0,ul:0,"var":0},html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2},html4.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"body::background":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0},html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0},html4.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"body::background":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2};var html=function(a){function g(a){a=b(a);if(c.hasOwnProperty(a))return c[a];var d=a.match(e);return d?String.fromCharCode(parseInt(d[1],10)):(d=a.match(f))?String.fromCharCode(parseInt(d[1],16)):""}function h(a,b){return g(b)}function j(a){return a.replace(i,"")}function l(a){return a.replace(k,h)}function s(a){return a.replace(m,"&").replace(o,"<").replace(p,">").replace(q,""").replace(r,"=")}function t(a){return a.replace(n,"&$1").replace(o,"<").replace(p,">")}function w(c){return function d(d,e){d=String(d);var f=null,g=!1,h=[],i=void 0,k=void 0,m=void 0;c.startDoc&&c.startDoc(e);while(d){var n=d.match(g?u:v);d=d.substring(n[0].length);if(g){if(n[1]){var o=b(n[1]),p;if(n[2]){var q=n[3];switch(q.charCodeAt(0)){case 34:case 39:q=q.substring(1,q.length-1)}p=l(j(q))}else p=o;h.push(o,p)}else if(n[4]){k!==void 0&&(m?c.startTag&&c.startTag(i,h,e):c.endTag&&c.endTag(i,e));if(m&&k&(a.eflags.CDATA|a.eflags.RCDATA)){f===null?f=b(d):f=f.substring(f.length-d.length);var r=f.indexOf("</"+i);r<0&&(r=d.length),r&&(k&a.eflags.CDATA?c.cdata&&c.cdata(d.substring(0,r),e):c.rcdata&&c.rcdata(t(d.substring(0,r)),e),d=d.substring(r))}i=k=m=void 0,h.length=0,g=!1}}else if(n[1])c.pcdata&&c.pcdata(n[0],e);else if(n[3])m=!n[2],g=!0,i=b(n[3]),k=a.ELEMENTS.hasOwnProperty(i)?a.ELEMENTS[i]:void 0;else if(n[4])c.pcdata&&c.pcdata(n[4],e);else if(n[5]&&c.pcdata){var s=n[5];c.pcdata(s==="<"?"<":s===">"?">":"&",e)}}c.endDoc&&c.endDoc(e)}}function x(b){var c,d;return w({startDoc:function(a){c=[],d=!1},startTag:function(e,f,g){if(d)return;if(!a.ELEMENTS.hasOwnProperty(e))return;var h=a.ELEMENTS[e];if(h&a.eflags.FOLDABLE)return;if(h&a.eflags.UNSAFE){d=!(h&a.eflags.EMPTY);return}f=b(e,f);if(f){h&a.eflags.EMPTY||c.push(e),g.push("<",e);for(var i=0,j=f.length;i<j;i+=2){var k=f[i],l=f[i+1];l!==null&&l!==void 0&&g.push(" ",k,'="',s(l),'"')}g.push(">")}},endTag:function(b,e){if(d){d=!1;return}if(!a.ELEMENTS.hasOwnProperty(b))return;var f=a.ELEMENTS[b];if(!(f&(a.eflags.UNSAFE|a.eflags.EMPTY|a.eflags.FOLDABLE))){var g;if(f&a.eflags.OPTIONAL_ENDTAG)for(g=c.length;--g>=0;){var h=c[g];if(h===b)break;if(!(a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG))return}else for(g=c.length;--g>=0;)if(c[g]===b)break;if(g<0)return;for(var i=c.length;--i>g;){var h=c[i];a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG||e.push("</",h,">")}c.length=g,e.push("</",b,">")}},pcdata:function(a,b){d||b.push(a)},rcdata:function(a,b){d||b.push(a)},cdata:function(a,b){d||b.push(a)},endDoc:function(a){for(var b=c.length;--b>=0;)a.push("</",c[b],">");c.length=0}})}function z(b,c,e){var f=[];return x(function g(b,f){for(var g=0;g<f.length;g+=2){var h=f[g],i=f[g+1],j=null,k;if((k=b+"::"+h,a.ATTRIBS.hasOwnProperty(k))||(k="*::"+h,a.ATTRIBS.hasOwnProperty(k)))j=a.ATTRIBS[k];if(j!==null)switch(j){case a.atype.NONE:break;case a.atype.SCRIPT:case a.atype.STYLE:i=null;break;case a.atype.ID:case a.atype.IDREF:case a.atype.IDREFS:case a.atype.GLOBAL_NAME:case a.atype.LOCAL_NAME:case a.atype.CLASSES:i=e?e(i):i;break;case a.atype.URI:var l=(""+i).match(y);l?!l[1]||d.test(l[1])?i=c&&c(i):i=null:i=null;break;case a.atype.URI_FRAGMENT:i&&"#"===i.charAt(0)?(i=e?e(i):i,i&&(i="#"+i)):i=null;break;default:i=null}else i=null;f[g+1]=i}return f})(b,f),f.join("")}var b;"script"==="SCRIPT".toLowerCase()?b=function(a){return a.toLowerCase()}:b=function(a){return a.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)|32)})};var c={lt:"<",gt:">",amp:"&",nbsp:" ",quot:'"',apos:"'"},d=/^(?:https?|mailto|data)$/i,e=/^#(\d+)$/,f=/^#x([0-9A-Fa-f]+)$/,i=/\0/g,k=/&(#\d+|#x[0-9A-Fa-f]+|\w+);/g,m=/&/g,n=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,o=/</g,p=/>/g,q=/\"/g,r=/\=/g,u=new RegExp("^\\s*(?:(?:([a-z][a-z-]*)(\\s*=\\s*(\"[^\"]*\"|'[^']*'|(?=[a-z][a-z-]*\\s*=)|[^>\"'\\s]*))?)|(/?>)|[\\s\\S][^a-z\\s>]*)","i"),v=new RegExp("^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);|<!--[\\s\\S]*?-->|<!\\w[^>]*>|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))","i"),y=new RegExp("^(?:([^:/?#]+):)?");return{escapeAttrib:s,makeHtmlSanitizer:x,makeSaxParser:w,normalizeRCData:t,sanitize:z,unescapeEntities:l}}(html4),html_sanitize=html.sanitize;typeof window!="undefined"&&(window.html=html,window.html_sanitize=html_sanitize),html4.ATTRIBS["*::style"]=0,html4.ELEMENTS.style=0;var Mustache=function(){var a={},b=function(){};return b.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(a,b,c,d){d||(this.context=b,this.buffer=[]);if(!this.includes("",a)){if(d)return a;this.send(a);return}a=this.render_pragmas(a);var e=this.render_section(a,b,c);e===!1&&(e=this.render_tags(a,b,c,d));if(d)return e;this.sendLines(e)},send:function(a){a!==""&&this.buffer.push(a)},sendLines:function(a){if(a){var b=a.split("\n");for(var c=0;c<b.length;c++)this.send(b[c])}},render_pragmas:function(a){if(!this.includes("%",a))return a;var b=this,c=this.getCachedRegex("render_pragmas",function(a,b){return new RegExp(a+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+b,"g")});return a.replace(c,function(a,c,d){if(!b.pragmas_implemented[c])throw{message:"This implementation of mustache doesn't understand the '"+c+"' pragma"};b.pragmas[c]={};if(d){var e=d.split("=");b.pragmas[c][e[0]]=e[1]}return""})},render_partial:function(a,b,c){a=this.trim(a);if(!c||c[a]===undefined)throw{message:"unknown_partial '"+a+"'"};return typeof b[a]!="object"?this.render(c[a],b,c,!0):this.render(c[a],b[a],c,!0)},render_section:function(a,b,c){if(!this.includes("#",a)&&!this.includes("^",a))return!1;var d=this,e=this.getCachedRegex("render_section",function(a,b){return new RegExp("^([\\s\\S]*?)"+a+"(\\^|\\#)\\s*(.+)\\s*"+b+"\n*([\\s\\S]*?)"+a+"\\/\\s*\\3\\s*"+b+"\\s*([\\s\\S]*)$","g")});return a.replace(e,function(a,e,f,g,h,i){var j=e?d.render_tags(e,b,c,!0):"",k=i?d.render(i,b,c,!0):"",l,m=d.find(g,b);return f==="^"?!m||d.is_array(m)&&m.length===0?l=d.render(h,b,c,!0):l="":f==="#"&&(d.is_array(m)?l=d.map(m,function(a){return d.render(h,d.create_context(a),c,!0)}).join(""):d.is_object(m)?l=d.render(h,d.create_context(m),c,!0):typeof m=="function"?l=m.call(b,h,function(a){return d.render(a,b,c,!0)}):m?l=d.render(h,b,c,!0):l=""),j+l+k})},render_tags:function(a,b,c,d){var e=this,f=function(){return e.getCachedRegex("render_tags",function(a,b){return new RegExp(a+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+b+"+","g")})},g=f(),h=function(a,d,h){switch(d){case"!":return"";case"=":return e.set_delimiters(h),g=f(),"";case">":return e.render_partial(h,b,c);case"{":return e.find(h,b);default:return e.escape(e.find(h,b))}},i=a.split("\n");for(var j=0;j<i.length;j++)i[j]=i[j].replace(g,h,this),d||this.send(i[j]);if(d)return i.join("\n")},set_delimiters:function(a){var b=a.split(" ");this.otag=this.escape_regex(b[0]),this.ctag=this.escape_regex(b[1])},escape_regex:function(a){if(!arguments.callee.sRE){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+b.join("|\\")+")","g")}return a.replace(arguments.callee.sRE,"\\$1")},find:function(a,b){function c(a){return a===!1||a===0||a}a=this.trim(a);var d;return c(b[a])?d=b[a]:c(this.context[a])&&(d=this.context[a]),typeof d=="function"?d.apply(b):d!==undefined?d:""},includes:function(a,b){return b.indexOf(this.otag+a)!=-1},escape:function(a){return a=String(a===null?"":a),a.replace(/&(?!\w+;)|["'<>\\]/g,function(a){switch(a){case"&":return"&";case'"':return""";case"'":return"'";case"<":return"<";case">":return">";default:return a}})},create_context:function(a){if(this.is_object(a))return a;var b=".";this.pragmas["IMPLICIT-ITERATOR"]&&(b=this.pragmas["IMPLICIT-ITERATOR"].iterator);var c={};return c[b]=a,c},is_object:function(a){return a&&typeof a=="object"},is_array:function(a){return Object.prototype.toString.call(a)==="[object Array]"},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},map:function(a,b){if(typeof a.map=="function")return a.map(b);var c=[],d=a.length;for(var e=0;e<d;e++)c.push(b(a[e]));return c},getCachedRegex:function(b,c){var d=a[this.otag];d||(d=a[this.otag]={});var e=d[this.ctag];e||(e=d[this.ctag]={});var f=e[b];return f||(f=e[b]=c(this.otag,this.ctag)),f}},{name:"mustache.js",version:"0.4.0-dev",to_html:function(a,c,d,e){var f=new b;e&&(f.send=e),f.render(a,c||{},d);if(!e)return f.buffer.join("\n")}}}();wax=wax||{},wax.attribution=function(){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var a,b={};return b.set=function(b){if(typeof b=="undefined")return;return a.innerHTML=html_sanitize(b,c,d),this},b.element=function(){return a},b.init=function(){return a=document.createElement("div"),a.className="wax-attribution",this},b.init()},wax=wax||{},wax.bwdetect=function(a,b){function h(){wax.bw=-1;var a=new Image;a.src=e;var b=!0,f=setTimeout(function(){b&&wax.bw==-1&&(c.bw(0),b=!1)},d);a.onload=function(){b&&wax.bw==-1&&(clearTimeout(f),c.bw(1),b=!1)}}var c={},d=a.threshold||400,e="http://a.tiles.mapbox.com/mapbox/1.0.0/blue-marble-topo-bathy-jul/0/0/0.png?preventcache="+ +(new Date),f=1,g=a.auto===undefined?!0:a.auto;return c.bw=function(a){if(!arguments.length)return f;var c=f;wax.bwlisteners&&wax.bwlisteners.length&&function(){listeners=wax.bwlisteners,wax.bwlisteners=[];for(i=0;i<listeners;i++)listeners[i](a)}(),wax.bw=a,f!=(f=a)&&b(a)},c.add=function(){return g&&h(),this},wax.bw==-1?(wax.bwlisteners=wax.bwlisteners||[],wax.bwlisteners.push(c.bw)):wax.bw!==undefined?c.bw(wax.bw):c.add(),c},wax.formatter=function(x){function urlX(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function idX(a){return a}var formatter={},f;if(x&&typeof x=="string")try{eval("f = "+x)}catch(e){console&&console.log(e)}else x&&typeof x=="function"?f=x:f=function(){};return formatter.format=function(a,b){try{return html_sanitize(f(a,b),urlX,idX)}catch(c){console&&console.log(c)}},formatter},wax.GridInstance=function(a,b,c){function g(a){return a>=93&&a--,a>=35&&a--,a-=32,a}c=c||{};var d={},e=c.resolution||4,f=c.tileSize||256;return d.grid_tile=function(){return a},d.getKey=function(b,c){if(!a||!a.grid)return;if(c<0||b<0)return;if(Math.floor(c)>=f||Math.floor(b)>=f)return;return g(a.grid[Math.floor(c/e)].charCodeAt(Math.floor(b/e)))},d.gridFeature=function(b,c){var d=this.getKey(b,c),e=a.keys;if(e&&e[d]&&a.data[e[d]])return a.data[e[d]]},d.tileFeature=function(c,d,e,f){if(!a)return;var g=wax.util.offset(e);feature=this.gridFeature(c-g.left,d-g.top);if(feature)return b.format(f,feature)},d},wax.GridManager=function(a){function h(a){return typeof a=="string"&&(a=[a]),function b(b){if(!b)return;var c=/(\d+)\/(\d+)\/(\d+)\.[\w\._]+/g.exec(b);if(!c)return;return a[parseInt(c[2],10)%a.length].replace("{z}",c[1]).replace("{x}",c[2]).replace("{y}",c[3])}}a=a||{};var b=a.resolution||4,c=a.version||"1.1",d={},e={},f,g=function(a){return a.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json")};return e.formatter=function(a){return arguments.length?(f=wax.formatter(a),e):f},e.template=function(a){return arguments.length?(f=wax.template(a),e):f},e.gridUrl=function(a){return arguments.length?(g=typeof a=="function"?a:h(a),e):g},e.getGrid=function(a,c){var d=g(a);return!f||!d?c(null,null):(wax.request.get(d,function(a,d){if(a)return c(a,null);c(null,wax.GridInstance(d,f,{resolution:b||4}))}),e)},e.add=function(a){return a.template?e.template(a.template):a.formatter&&e.formatter(a.formatter),a.grids&&e.gridUrl(a.grids),this},e.add(a)},wax=wax||{},wax.hash=function(a){function b(){return location.hash.substring(1)}function c(a){location.hash="#"+a}function g(b){var c=b.split("/");for(var d=0;d<c.length;d++){c[d]=Number(c[d]);if(isNaN(c[d]))return!0}if(c.length<3)return!0;c.length==3&&a.setCenterZoom(c)}function h(){var b=a.getCenterZoom();d!==b&&(d=b,c(d))}function i(a){if(a===d)return;g(d=a)&&h()}a=a||{};var d,e={},f=90-1e-8,j=wax.util.throttle(h,500);return e.add=function(){return i(b()),a.bindChange(j),this},e.remove=function(){return a.unbindChange(j),this},e.add()};var wax=wax||{};wax.legend=function(){function d(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function e(a){return a}var a,b={},c;return b.element=function(){return c},b.content=function(b){return arguments.length?(b?(a.innerHTML=html_sanitize(b,d,e),a.style.display="block"):(a.innerHTML="",a.style.display="none"),this):a.innerHTML},b.add=function(){return c=document.createElement("div"),c.className="wax-legends",a=document.createElement("div"),a.className="wax-legend",a.style.display="none",c.appendChild(a),this},b.add()};var w=function(a){return a.melt=function(b,c){return b.apply(c,[a,c])},a},wax=wax||{};wax.movetip={},wax.movetip=function(a){function g(a){return a&&a.className.indexOf("wax-popup")!==-1}function h(a,b){var c=document.createElement("div");return c.className="wax-movetip",c.style.cssText="position:absolute;",c.innerHTML=a,b.appendChild(c),d=b,_tooltipOffset=wax.util.offset(c),_contextOffset=wax.util.offset(d),c}function i(a){if(!c)return;var b=wax.util.eventoffset(a);c.className="wax-movetip",_tooltipOffset.height+b.y>_contextOffset.top+_contextOffset.height&&_contextOffset.height>_tooltipOffset.height&&(b.y-=_tooltipOffset.height,c.className+=" flip-y"),_tooltipOffset.width+b.x>_contextOffset.left+_contextOffset.width&&(b.x-=_tooltipOffset.width,c.className+=" flip-x"),c.style.left=b.x+"px",c.style.top=b.y+"px"}function j(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&e?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&e&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+e):a.parentNode&&a.parentNode.removeChild(a)}function k(a,b){c&&(j(c),c=undefined);var d=h(a,b);d.className+=" wax-popup",d.innerHTML=a;var e=document.createElement("a");e.href="#close",e.className="close",e.innerHTML="Close",d.appendChild(e);var f=function(a){return j(d),c=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1};e.addEventListener?e.addEventListener("click",f,!1):e.attachEvent&&e.attachEvent("onclick",f),c=d}a=a||{};var b={},c=undefined,d=undefined,e=a.animationOut,f=a.animationIn;return b.over=function(a,b,d){if(!a)return;b.style.cursor="pointer";if(g(c))return;c=h(a,b),i(d),b.addEventListener&&b.addEventListener("mousemove",i)},b.out=function(a){a.style.cursor="default";if(g(c))return;c&&(j(c),a.removeEventListener&&a.removeEventListener("mousemove",i),c=undefined)},b};var wax=wax||{};wax.request={cache:{},locks:{},promises:{},get:function(a,b){if(this.cache[a])return b(this.cache[a][0],this.cache[a][1]);this.promises[a]=this.promises[a]||[],this.promises[a].push(b);if(this.locks[a])return;var c=this;this.locks[a]=!0,reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(b){c.locks[a]=!1,c.cache[a]=[null,b];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])},error:function(b){c.locks[a]=!1,c.cache[a]=[b,null];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])}})}},wax.template=function(a){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var b={};return b.format=function(b,e){var f={};for(var g in e)f[g]=e[g];return b.format&&(f["__"+b.format+"__"]=!0),html_sanitize(Mustache.to_html(a,f),c,d)},b};if(!wax)var wax={};wax.tilejson=function(a,b){reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:b,error:b})};var wax=wax||{};wax.tooltip={},wax.tooltip=function(a){this._currentTooltip=undefined,a=a||{},a.animationOut&&(this.animationOut=a.animationOut),a.animationIn&&(this.animationIn=a.animationIn)},wax.tooltip.prototype.isPopup=function(a){return a&&a.className.indexOf("wax-popup")!==-1},wax.tooltip.prototype.getTooltip=function(a,b){var c=document.createElement("div");return c.className="wax-tooltip wax-tooltip-0",c.innerHTML=a,b.appendChild(c),c},wax.tooltip.prototype.hideTooltip=function(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&this.animationOut?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&this.animationOut&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+this.animationOut):a.parentNode&&a.parentNode.removeChild(a)},wax.tooltip.prototype.click=function(a,b){this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined);var c=this.getTooltip(a,b);c.className+=" wax-popup",c.innerHTML=a;var d=document.createElement("a");d.href="#close",d.className="close",d.innerHTML="Close",c.appendChild(d);var e=wax.util.bind(function(a){return this.hideTooltip(c),this._currentTooltip=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1},this);d.addEventListener?(d.addEventListener("click",e,!1),d.addEventListener("touchend",e,!1)):d.attachEvent&&d.attachEvent("onclick",e),this._currentTooltip=c},wax.tooltip.prototype.over=function(a,b){if(!a)return;b.style.cursor="pointer";if(this.isPopup(this._currentTooltip))return;this._currentTooltip=this.getTooltip(a,b)},wax.tooltip.prototype.out=function(a){a.style.cursor="default";if(this.isPopup(this._currentTooltip))return;this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined)};var wax=wax||{};wax.util=wax.util||{},wax.util={offset:function(a){var b=a.offsetWidth||parseInt(a.style.width,10),c=a.offsetHeight||parseInt(a.style.height,10),d=document.body,e=0,f=0,g=function(a){if(a===d||a===document.documentElement)return;e+=a.offsetTop,f+=a.offsetLeft;var b=a.style.transform||a.style.WebkitTransform||a.style.OTransform||a.style.MozTransform||a.style.msTransform;if(b)if(match=b.match(/translate\((.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/translate3d\((.+)px, (.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/matrix3d\(([\-\d,\s]+)\)/)){var c=match[1].split(",");e+=parseInt(c[13],10),f+=parseInt(c[12],10)}else if(match=b.match(/matrix\(.+, .+, .+, .+, (.+), (.+)\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10)};g(a);try{while(a=a.offsetParent)g(a)}catch(h){}e+=d.offsetTop,f+=d.offsetLeft,e+=d.parentNode.offsetTop,f+=d.parentNode.offsetLeft;var i=document.defaultView?window.getComputedStyle(d.parentNode,null):d.parentNode.currentStyle;return d.parentNode.offsetTop!==parseInt(i.marginTop,10)&&!isNaN(parseInt(i.marginTop,10))&&(e+=parseInt(i.marginTop,10),f+=parseInt(i.marginLeft,10)),{top:e,left:f,height:c,width:b}},$:function(a){return typeof a=="string"?document.getElementById(a):a},bind:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,c.concat(Array.prototype.slice.call(arguments)))}},isString:function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)},indexOf:function(a,b){var c=Array.prototype.indexOf;if(a===null)return-1;var d,e;if(c&&a.indexOf===c)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(a[d]===b)return d;return-1},isArray:Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},keys:Object.keys||function(a){var b=Object.prototype.hasOwnProperty;if(a!==Object(a))throw new TypeError("Invalid object");var c=[];for(var d in a)b.call(a,d)&&(c[c.length]=d);return c},eventoffset:function(a){var b=0,c=0;if(!a)var a=window.event;if(a.pageX||a.pageY)return{x:a.pageX,y:a.pageY};if(a.clientX||a.clientY){var d=document.documentElement,e=document.body,f=document.body.parentNode.currentStyle,g=parseInt(f.marginTop,10)||0,h=parseInt(f.marginLeft,10)||0;return{x:a.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0)+h,y:a.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)+g}}if(a.touches&&a.touches.length===1)return{x:a.touches[0].pageX,y:a.touches[0].pageY}},limit:function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d);if(c||!d)d=setTimeout(g,b)}},throttle:function(a,b){return this.limit(a,b,!1)}},wax=wax||{},wax.leaf=wax.leaf||{},wax.leaf.interaction=function(a,b,c){function s(){return r||(r=function(a){var b=[];for(var c in a)if(a[c]._tiles)for(var d in a[c]._tiles){var e=wax.util.offset(a[c]._tiles[d]);b.push([e.top,e.left,a[c]._tiles[d]])}return b}(a._layers))}function t(a,b){r=null}function u(a){for(var b=0,c=s();b<c.length;b++)if(c[b][0]<a.y&&c[b][0]+256>a.y&&c[b][1]<a.x&&c[b][1]+256>a.x)return c[b][2];return!1}function v(){return l?(window.clearTimeout(l),l=null,!0):!1}function w(a){if(k)return;var b=wax.util.eventoffset(a),c=u(b),f;c&&d.getGrid(c.src,function(a,d){if(a||!d)return;f=d.tileFeature(b.x,b.y,c,{format:"teaser"}),f?f&&o!==f?(o=f,e.out(m),e.over(f,m)):f||(o=null,e.out(m)):(o=null,e.out(m))})}function x(a){if(v())return;k=!0,p=wax.util.eventoffset(a),a.type==="mousedown"?g(m,"mouseup",z,this):a.type==="touchstart"&&a.touches.length===1&&(f=["full","teaser"],e._currentTooltip&&e.hideTooltip(e._currentTooltip),g(m,"touchend",z,this),g(m,"touchmove",y,this))}function y(){h(m,"touchend",z),h(m,"touchmove",z),k=!1}function z(a){var b=wax.util.eventoffset(a);return k=!1,h(m,"mouseup",z),m.ontouchend&&(h(m,"touchend",z),h(m,"touchmove",_touchCancel)),a.type==="touchend"?A(a,p):Math.round(b.y/q)===Math.round(p.y/q)&&Math.round(b.x/q)===Math.round(p.x/q)&&(l=window.setTimeout(function(){l=null,A(a,b)},300)),z}function A(a,b){var c=u(b),g;c&&d.getGrid(c.src,function(d,h){for(var j=0;h&&j<f.length;j++){g=h.tileFeature(b.x,b.y,c,{format:f[j]});if(g)switch(f[j]){case"full":case"teaser":return e.click(g,m,0,a);case"location":return i(g)}}})}b=b||{},c=c||{};var d=wax.GridManager(b),e=c.callbacks||new wax.tooltip(c),f=c.clickAction||["full","location"],g=L.DomEvent.addListener,h=L.DomEvent.removeListener,i=c.clickHandler||function(a){window.location=a},j={},k=!1,l=!1,m=a._container,n="ontouchstart"in document.documentElement,o,p,q=4,r;return j.add=function(){var b=["moveend","layerswitched"];for(var c=0;c<b.length;c++)a.on(b[c],t);return g(m,"mousemove",w),g(m,"mousedown",x),n&&g(m,"touchstart",x),this},j.remove=function(){var b=["moveend","layerswitched"];for(var c=0;c<b.length;c++)a.off(b[c],t);return h(m,"mousemove",w),h(m,"mousedown",x),n&&h(m,"touchstart",x),e._currentTooltip&&e.hideTooltip(e._currentTooltip),this},j.add(a)},wax=wax||{},wax.leaf=wax.leaf||{},wax.leaf.connector=L.TileLayer.extend({initialize:function(a){a=a||{},a.minZoom=a.minzoom||0,a.maxZoom=a.maxzoom||22,L.TileLayer.prototype.initialize.call(this,a.tiles[0],a)}}) | ||
*/!function(context,win){function serial(a){var b=a.name;if(a.disabled||!b)return"";b=enc(b);switch(a.tagName.toLowerCase()){case"input":switch(a.type){case"reset":case"button":case"image":case"file":return"";case"checkbox":case"radio":return a.checked?b+"="+(a.value?enc(a.value):!0)+"&":"";default:return b+"="+(a.value?enc(a.value):"")+"&"}break;case"textarea":return b+"="+enc(a.value)+"&";case"select":return b+"="+enc(a.options[a.selectedIndex].value)+"&"}return""}function enc(a){return encodeURIComponent(a)}function reqwest(a,b){return new Reqwest(a,b)}function init(o,fn){function error(a){o.error&&o.error(a),complete(a)}function success(resp){o.timeout&&clearTimeout(self.timeout)&&(self.timeout=null);var r=resp.responseText;if(r)switch(type){case"json":resp=win.JSON?win.JSON.parse(r):eval("("+r+")");break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function complete(a){o.complete&&o.complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort(),error()},o.timeout)),this.request=getRequest(o,success,error)}function setType(a){return/\.json$/.test(a)?"json":/\.jsonp$/.test(a)?"jsonp":/\.js$/.test(a)?"js":/\.html?$/.test(a)?"html":/\.xml$/.test(a)?"xml":"js"}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function getRequest(a,b,c){if(a.type!="jsonp"){var d=xhr();return d.open(a.method||"GET",typeof a=="string"?a:a.url,!0),setHeaders(d,a),d.onreadystatechange=handleReadyState(d,b,c),a.before&&a.before(d),d.send(a.data||null),d}var e=doc.createElement("script"),f=0;win[getCallbackName(a)]=generalCallback,e.type="text/javascript",e.src=a.url,e.async=!0,e.onload=e.onreadystatechange=function(){if(e[readyState]&&e[readyState]!=="complete"&&e[readyState]!=="loaded"||f)return!1;e.onload=e.onreadystatechange=null,a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(e),f=1},head.appendChild(e)}function generalCallback(a){lastValue=a}function getCallbackName(a){var b=a.jsonpCallback||"callback";if(a.url.slice(-(b.length+2))==b+"=?"){var c="reqwest_"+uniqid++;return a.url=a.url.substr(0,a.url.length-1)+c,c}var d=new RegExp(b+"=([\\w]+)");return a.url.match(d)[1]}function setHeaders(a,b){var c=b.headers||{};c.Accept=c.Accept||"text/javascript, text/html, application/xml, text/xml, */*",b.crossOrigin||(c["X-Requested-With"]=c["X-Requested-With"]||"XMLHttpRequest"),c[contentType]=c[contentType]||"application/x-www-form-urlencoded";for(var d in c)c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d],!1)}function handleReadyState(a,b,c){return function(){a&&a[readyState]==4&&(twoHundo.test(a.status)?b(a):c(a))}}var twoHundo=/^20\d$/,doc=document,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",head=doc[byTag]("head")[0],uniqid=0,lastValue,xhr="XMLHttpRequest"in win?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serialize=function(a){var b=[a[byTag]("input"),a[byTag]("select"),a[byTag]("textarea")],c=[],d,e;for(d=0,l=b.length;d<l;++d)for(e=0,l2=b[d].length;e<l2;++e)c.push(serial(b[d][e]));return c.join("").replace(/&$/,"")},reqwest.serializeArray=function(a){for(var b=this.serialize(a).split("&"),c=0,d=b.length,e=[],f;c<d;c++)b[c]&&(f=b[c].split("="))&&e.push({name:f[0],value:f[1]});return e};var old=context.reqwest;reqwest.noConflict=function(){return context.reqwest=old,this},typeof module!="undefined"?module.exports=reqwest:context.reqwest=reqwest}(this,window);var html4={};html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10},html4.ATTRIBS={"*::class":9,"*::dir":0,"*::id":4,"*::lang":0,"*::onclick":2,"*::ondblclick":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::style":3,"*::title":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::rel":0,"a::rev":0,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"del::cite":1,"del::datetime":0,"dir::compact":0,"div::align":0,"dl::compact":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::ismap":0,"input::maxlength":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::readonly":0,"input::size":0,"input::src":1,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"ol::compact":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"p::align":0,"pre::width":0,"q::cite":1,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::size":0,"select::tabindex":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::cols":0,"textarea::disabled":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::readonly":0,"textarea::rows":0,"textarea::tabindex":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"ul::compact":0,"ul::type":0},html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128},html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:16,area:2,b:0,base:18,basefont:18,bdo:0,big:0,blockquote:0,body:49,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,dd:1,del:0,dfn:0,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,font:0,form:0,frame:18,frameset:16,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:49,hr:2,html:49,i:0,iframe:4,img:2,input:2,ins:0,isindex:18,kbd:0,label:0,legend:0,li:1,link:18,map:0,menu:0,meta:18,nobr:0,noembed:4,noframes:20,noscript:20,object:16,ol:0,optgroup:0,option:1,p:1,param:18,pre:0,q:0,s:0,samp:0,script:84,select:0,small:0,span:0,strike:0,strong:0,style:148,sub:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,title:24,tr:1,tt:0,u:0,ul:0,"var":0},html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2},html4.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"body::background":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0},html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0},html4.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"body::background":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2};var html=function(a){function g(a){a=b(a);if(c.hasOwnProperty(a))return c[a];var d=a.match(e);return d?String.fromCharCode(parseInt(d[1],10)):(d=a.match(f))?String.fromCharCode(parseInt(d[1],16)):""}function h(a,b){return g(b)}function j(a){return a.replace(i,"")}function l(a){return a.replace(k,h)}function s(a){return a.replace(m,"&").replace(o,"<").replace(p,">").replace(q,""").replace(r,"=")}function t(a){return a.replace(n,"&$1").replace(o,"<").replace(p,">")}function w(c){return function d(d,e){d=String(d);var f=null,g=!1,h=[],i=void 0,k=void 0,m=void 0;c.startDoc&&c.startDoc(e);while(d){var n=d.match(g?u:v);d=d.substring(n[0].length);if(g){if(n[1]){var o=b(n[1]),p;if(n[2]){var q=n[3];switch(q.charCodeAt(0)){case 34:case 39:q=q.substring(1,q.length-1)}p=l(j(q))}else p=o;h.push(o,p)}else if(n[4]){k!==void 0&&(m?c.startTag&&c.startTag(i,h,e):c.endTag&&c.endTag(i,e));if(m&&k&(a.eflags.CDATA|a.eflags.RCDATA)){f===null?f=b(d):f=f.substring(f.length-d.length);var r=f.indexOf("</"+i);r<0&&(r=d.length),r&&(k&a.eflags.CDATA?c.cdata&&c.cdata(d.substring(0,r),e):c.rcdata&&c.rcdata(t(d.substring(0,r)),e),d=d.substring(r))}i=k=m=void 0,h.length=0,g=!1}}else if(n[1])c.pcdata&&c.pcdata(n[0],e);else if(n[3])m=!n[2],g=!0,i=b(n[3]),k=a.ELEMENTS.hasOwnProperty(i)?a.ELEMENTS[i]:void 0;else if(n[4])c.pcdata&&c.pcdata(n[4],e);else if(n[5]&&c.pcdata){var s=n[5];c.pcdata(s==="<"?"<":s===">"?">":"&",e)}}c.endDoc&&c.endDoc(e)}}function x(b){var c,d;return w({startDoc:function(a){c=[],d=!1},startTag:function(e,f,g){if(d)return;if(!a.ELEMENTS.hasOwnProperty(e))return;var h=a.ELEMENTS[e];if(h&a.eflags.FOLDABLE)return;if(h&a.eflags.UNSAFE){d=!(h&a.eflags.EMPTY);return}f=b(e,f);if(f){h&a.eflags.EMPTY||c.push(e),g.push("<",e);for(var i=0,j=f.length;i<j;i+=2){var k=f[i],l=f[i+1];l!==null&&l!==void 0&&g.push(" ",k,'="',s(l),'"')}g.push(">")}},endTag:function(b,e){if(d){d=!1;return}if(!a.ELEMENTS.hasOwnProperty(b))return;var f=a.ELEMENTS[b];if(!(f&(a.eflags.UNSAFE|a.eflags.EMPTY|a.eflags.FOLDABLE))){var g;if(f&a.eflags.OPTIONAL_ENDTAG)for(g=c.length;--g>=0;){var h=c[g];if(h===b)break;if(!(a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG))return}else for(g=c.length;--g>=0;)if(c[g]===b)break;if(g<0)return;for(var i=c.length;--i>g;){var h=c[i];a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG||e.push("</",h,">")}c.length=g,e.push("</",b,">")}},pcdata:function(a,b){d||b.push(a)},rcdata:function(a,b){d||b.push(a)},cdata:function(a,b){d||b.push(a)},endDoc:function(a){for(var b=c.length;--b>=0;)a.push("</",c[b],">");c.length=0}})}function z(b,c,e){var f=[];return x(function g(b,f){for(var g=0;g<f.length;g+=2){var h=f[g],i=f[g+1],j=null,k;if((k=b+"::"+h,a.ATTRIBS.hasOwnProperty(k))||(k="*::"+h,a.ATTRIBS.hasOwnProperty(k)))j=a.ATTRIBS[k];if(j!==null)switch(j){case a.atype.NONE:break;case a.atype.SCRIPT:case a.atype.STYLE:i=null;break;case a.atype.ID:case a.atype.IDREF:case a.atype.IDREFS:case a.atype.GLOBAL_NAME:case a.atype.LOCAL_NAME:case a.atype.CLASSES:i=e?e(i):i;break;case a.atype.URI:var l=(""+i).match(y);l?!l[1]||d.test(l[1])?i=c&&c(i):i=null:i=null;break;case a.atype.URI_FRAGMENT:i&&"#"===i.charAt(0)?(i=e?e(i):i,i&&(i="#"+i)):i=null;break;default:i=null}else i=null;f[g+1]=i}return f})(b,f),f.join("")}var b;"script"==="SCRIPT".toLowerCase()?b=function(a){return a.toLowerCase()}:b=function(a){return a.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)|32)})};var c={lt:"<",gt:">",amp:"&",nbsp:" ",quot:'"',apos:"'"},d=/^(?:https?|mailto|data)$/i,e=/^#(\d+)$/,f=/^#x([0-9A-Fa-f]+)$/,i=/\0/g,k=/&(#\d+|#x[0-9A-Fa-f]+|\w+);/g,m=/&/g,n=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,o=/</g,p=/>/g,q=/\"/g,r=/\=/g,u=new RegExp("^\\s*(?:(?:([a-z][a-z-]*)(\\s*=\\s*(\"[^\"]*\"|'[^']*'|(?=[a-z][a-z-]*\\s*=)|[^>\"'\\s]*))?)|(/?>)|[\\s\\S][^a-z\\s>]*)","i"),v=new RegExp("^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);|<!--[\\s\\S]*?-->|<!\\w[^>]*>|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))","i"),y=new RegExp("^(?:([^:/?#]+):)?");return{escapeAttrib:s,makeHtmlSanitizer:x,makeSaxParser:w,normalizeRCData:t,sanitize:z,unescapeEntities:l}}(html4),html_sanitize=html.sanitize;typeof window!="undefined"&&(window.html=html,window.html_sanitize=html_sanitize),html4.ATTRIBS["*::style"]=0,html4.ELEMENTS.style=0;var Mustache=function(){var a={},b=function(){};return b.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(a,b,c,d){d||(this.context=b,this.buffer=[]);if(!this.includes("",a)){if(d)return a;this.send(a);return}a=this.render_pragmas(a);var e=this.render_section(a,b,c);e===!1&&(e=this.render_tags(a,b,c,d));if(d)return e;this.sendLines(e)},send:function(a){a!==""&&this.buffer.push(a)},sendLines:function(a){if(a){var b=a.split("\n");for(var c=0;c<b.length;c++)this.send(b[c])}},render_pragmas:function(a){if(!this.includes("%",a))return a;var b=this,c=this.getCachedRegex("render_pragmas",function(a,b){return new RegExp(a+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+b,"g")});return a.replace(c,function(a,c,d){if(!b.pragmas_implemented[c])throw{message:"This implementation of mustache doesn't understand the '"+c+"' pragma"};b.pragmas[c]={};if(d){var e=d.split("=");b.pragmas[c][e[0]]=e[1]}return""})},render_partial:function(a,b,c){a=this.trim(a);if(!c||c[a]===undefined)throw{message:"unknown_partial '"+a+"'"};return typeof b[a]!="object"?this.render(c[a],b,c,!0):this.render(c[a],b[a],c,!0)},render_section:function(a,b,c){if(!this.includes("#",a)&&!this.includes("^",a))return!1;var d=this,e=this.getCachedRegex("render_section",function(a,b){return new RegExp("^([\\s\\S]*?)"+a+"(\\^|\\#)\\s*(.+)\\s*"+b+"\n*([\\s\\S]*?)"+a+"\\/\\s*\\3\\s*"+b+"\\s*([\\s\\S]*)$","g")});return a.replace(e,function(a,e,f,g,h,i){var j=e?d.render_tags(e,b,c,!0):"",k=i?d.render(i,b,c,!0):"",l,m=d.find(g,b);return f==="^"?!m||d.is_array(m)&&m.length===0?l=d.render(h,b,c,!0):l="":f==="#"&&(d.is_array(m)?l=d.map(m,function(a){return d.render(h,d.create_context(a),c,!0)}).join(""):d.is_object(m)?l=d.render(h,d.create_context(m),c,!0):typeof m=="function"?l=m.call(b,h,function(a){return d.render(a,b,c,!0)}):m?l=d.render(h,b,c,!0):l=""),j+l+k})},render_tags:function(a,b,c,d){var e=this,f=function(){return e.getCachedRegex("render_tags",function(a,b){return new RegExp(a+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+b+"+","g")})},g=f(),h=function(a,d,h){switch(d){case"!":return"";case"=":return e.set_delimiters(h),g=f(),"";case">":return e.render_partial(h,b,c);case"{":return e.find(h,b);default:return e.escape(e.find(h,b))}},i=a.split("\n");for(var j=0;j<i.length;j++)i[j]=i[j].replace(g,h,this),d||this.send(i[j]);if(d)return i.join("\n")},set_delimiters:function(a){var b=a.split(" ");this.otag=this.escape_regex(b[0]),this.ctag=this.escape_regex(b[1])},escape_regex:function(a){if(!arguments.callee.sRE){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+b.join("|\\")+")","g")}return a.replace(arguments.callee.sRE,"\\$1")},find:function(a,b){function c(a){return a===!1||a===0||a}a=this.trim(a);var d;return c(b[a])?d=b[a]:c(this.context[a])&&(d=this.context[a]),typeof d=="function"?d.apply(b):d!==undefined?d:""},includes:function(a,b){return b.indexOf(this.otag+a)!=-1},escape:function(a){return a=String(a===null?"":a),a.replace(/&(?!\w+;)|["'<>\\]/g,function(a){switch(a){case"&":return"&";case'"':return""";case"'":return"'";case"<":return"<";case">":return">";default:return a}})},create_context:function(a){if(this.is_object(a))return a;var b=".";this.pragmas["IMPLICIT-ITERATOR"]&&(b=this.pragmas["IMPLICIT-ITERATOR"].iterator);var c={};return c[b]=a,c},is_object:function(a){return a&&typeof a=="object"},is_array:function(a){return Object.prototype.toString.call(a)==="[object Array]"},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},map:function(a,b){if(typeof a.map=="function")return a.map(b);var c=[],d=a.length;for(var e=0;e<d;e++)c.push(b(a[e]));return c},getCachedRegex:function(b,c){var d=a[this.otag];d||(d=a[this.otag]={});var e=d[this.ctag];e||(e=d[this.ctag]={});var f=e[b];return f||(f=e[b]=c(this.otag,this.ctag)),f}},{name:"mustache.js",version:"0.4.0-dev",to_html:function(a,c,d,e){var f=new b;e&&(f.send=e),f.render(a,c||{},d);if(!e)return f.buffer.join("\n")}}}();wax=wax||{},wax.attribution=function(){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var a,b={};return b.set=function(b){if(typeof b=="undefined")return;return a.innerHTML=html_sanitize(b,c,d),this},b.element=function(){return a},b.init=function(){return a=document.createElement("div"),a.className="wax-attribution",this},b.init()},wax=wax||{},wax.bwdetect=function(a,b){function h(){wax.bw=-1;var a=new Image;a.src=e;var b=!0,f=setTimeout(function(){b&&wax.bw==-1&&(c.bw(0),b=!1)},d);a.onload=function(){b&&wax.bw==-1&&(clearTimeout(f),c.bw(1),b=!1)}}var c={},d=a.threshold||400,e="http://a.tiles.mapbox.com/mapbox/1.0.0/blue-marble-topo-bathy-jul/0/0/0.png?preventcache="+ +(new Date),f=1,g=a.auto===undefined?!0:a.auto;return c.bw=function(a){if(!arguments.length)return f;var c=f;wax.bwlisteners&&wax.bwlisteners.length&&function(){listeners=wax.bwlisteners,wax.bwlisteners=[];for(i=0;i<listeners;i++)listeners[i](a)}(),wax.bw=a,f!=(f=a)&&b(a)},c.add=function(){return g&&h(),this},wax.bw==-1?(wax.bwlisteners=wax.bwlisteners||[],wax.bwlisteners.push(c.bw)):wax.bw!==undefined?c.bw(wax.bw):c.add(),c},wax.formatter=function(x){function urlX(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function idX(a){return a}var formatter={},f;if(x&&typeof x=="string")try{eval("f = "+x)}catch(e){console&&console.log(e)}else x&&typeof x=="function"?f=x:f=function(){};return formatter.format=function(a,b){try{return html_sanitize(f(a,b),urlX,idX)}catch(c){console&&console.log(c)}},formatter},wax.GridInstance=function(a,b,c){function g(a){return a>=93&&a--,a>=35&&a--,a-=32,a}c=c||{};var d={},e=c.resolution||4,f=c.tileSize||256;return d.grid_tile=function(){return a},d.getKey=function(b,c){if(!a||!a.grid)return;if(c<0||b<0)return;if(Math.floor(c)>=f||Math.floor(b)>=f)return;return g(a.grid[Math.floor(c/e)].charCodeAt(Math.floor(b/e)))},d.gridFeature=function(b,c){var d=this.getKey(b,c),e=a.keys;if(e&&e[d]&&a.data[e[d]])return a.data[e[d]]},d.tileFeature=function(c,d,e,f){if(!a)return;var g=wax.util.offset(e);feature=this.gridFeature(c-g.left,d-g.top);if(feature)return b.format(f,feature)},d},wax.GridManager=function(a){function h(a){return typeof a=="string"&&(a=[a]),function b(b){if(!b)return;var c=new RegExp("/(\\d+)\\/(\\d+)\\/(\\d+)\\.[\\w\\._]+"),d=c.exec(b);if(!d)return;return a[parseInt(d[2],10)%a.length].replace("{z}",d[1]).replace("{x}",d[2]).replace("{y}",d[3])}}a=a||{};var b=a.resolution||4,c=a.version||"1.1",d={},e={},f,g=function(a){return a.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json")};return e.formatter=function(a){return arguments.length?(f=wax.formatter(a),e):f},e.template=function(a){return arguments.length?(f=wax.template(a),e):f},e.gridUrl=function(a){return arguments.length?(g=typeof a=="function"?a:h(a),e):g},e.getGrid=function(a,c){var d=g(a);return!f||!d?c(null,null):(wax.request.get(d,function(a,d){if(a)return c(a,null);c(null,wax.GridInstance(d,f,{resolution:b||4}))}),e)},e.add=function(a){return a.template?e.template(a.template):a.formatter&&e.formatter(a.formatter),a.grids&&e.gridUrl(a.grids),this},e.add(a)},wax=wax||{},wax.hash=function(a){function b(){return location.hash.substring(1)}function c(a){location.hash="#"+a}function g(b){var c=b.split("/");for(var d=0;d<c.length;d++){c[d]=Number(c[d]);if(isNaN(c[d]))return!0}if(c.length<3)return!0;c.length==3&&a.setCenterZoom(c)}function h(){var b=a.getCenterZoom();d!==b&&(d=b,c(d))}function i(a){if(a===d)return;g(d=a)&&h()}a=a||{};var d,e={},f=90-1e-8,j=wax.util.throttle(h,500);return e.add=function(){return i(b()),a.bindChange(j),this},e.remove=function(){return a.unbindChange(j),this},e.add()};var wax=wax||{};wax.legend=function(){function d(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function e(a){return a}var a,b={},c;return b.element=function(){return c},b.content=function(b){return arguments.length?(b?(a.innerHTML=html_sanitize(b,d,e),a.style.display="block"):(a.innerHTML="",a.style.display="none"),this):a.innerHTML},b.add=function(){return c=document.createElement("div"),c.className="wax-legends",a=document.createElement("div"),a.className="wax-legend",a.style.display="none",c.appendChild(a),this},b.add()};var w=function(a){return a.melt=function(b,c){return b.apply(c,[a,c])},a},wax=wax||{};wax.movetip={},wax.movetip=function(a){function g(a){return a&&a.className.indexOf("wax-popup")!==-1}function h(a,b){var c=document.createElement("div");return c.className="wax-movetip",c.style.cssText="position:absolute;",c.innerHTML=a,b.appendChild(c),d=b,_tooltipOffset=wax.util.offset(c),_contextOffset=wax.util.offset(d),c}function i(a){if(!c)return;var b=wax.util.eventoffset(a);c.className="wax-movetip",_tooltipOffset.height+b.y>_contextOffset.top+_contextOffset.height&&_contextOffset.height>_tooltipOffset.height&&(b.y-=_tooltipOffset.height,c.className+=" flip-y"),_tooltipOffset.width+b.x>_contextOffset.left+_contextOffset.width&&(b.x-=_tooltipOffset.width,c.className+=" flip-x"),c.style.left=b.x+"px",c.style.top=b.y+"px"}function j(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&e?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&e&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+e):a.parentNode&&a.parentNode.removeChild(a)}function k(a,b){c&&(j(c),c=undefined);var d=h(a,b);d.className+=" wax-popup",d.innerHTML=a;var e=document.createElement("a");e.href="#close",e.className="close",e.innerHTML="Close",d.appendChild(e);var f=function(a){return j(d),c=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1};e.addEventListener?e.addEventListener("click",f,!1):e.attachEvent&&e.attachEvent("onclick",f),c=d}a=a||{};var b={},c=undefined,d=undefined,e=a.animationOut,f=a.animationIn;return b.over=function(a,b,d){if(!a)return;b.style.cursor="pointer";if(g(c))return;c=h(a,b),i(d),b.addEventListener&&b.addEventListener("mousemove",i)},b.out=function(a){a.style.cursor="default";if(g(c))return;c&&(j(c),a.removeEventListener&&a.removeEventListener("mousemove",i),c=undefined)},b};var wax=wax||{};wax.request={cache:{},locks:{},promises:{},get:function(a,b){if(this.cache[a])return b(this.cache[a][0],this.cache[a][1]);this.promises[a]=this.promises[a]||[],this.promises[a].push(b);if(this.locks[a])return;var c=this;this.locks[a]=!0,reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(b){c.locks[a]=!1,c.cache[a]=[null,b];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])},error:function(b){c.locks[a]=!1,c.cache[a]=[b,null];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])}})}},wax.template=function(a){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var b={};return b.format=function(b,e){var f={};for(var g in e)f[g]=e[g];return b.format&&(f["__"+b.format+"__"]=!0),html_sanitize(Mustache.to_html(a,f),c,d)},b};if(!wax)var wax={};wax.tilejson=function(a,b){reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:b,error:b})};var wax=wax||{};wax.tooltip={},wax.tooltip=function(a){this._currentTooltip=undefined,a=a||{},a.animationOut&&(this.animationOut=a.animationOut),a.animationIn&&(this.animationIn=a.animationIn)},wax.tooltip.prototype.isPopup=function(a){return a&&a.className.indexOf("wax-popup")!==-1},wax.tooltip.prototype.getTooltip=function(a,b){var c=document.createElement("div");return c.className="wax-tooltip wax-tooltip-0",c.innerHTML=a,b.appendChild(c),c},wax.tooltip.prototype.hideTooltip=function(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&this.animationOut?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&this.animationOut&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+this.animationOut):a.parentNode&&a.parentNode.removeChild(a)},wax.tooltip.prototype.click=function(a,b){this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined);var c=this.getTooltip(a,b);c.className+=" wax-popup",c.innerHTML=a;var d=document.createElement("a");d.href="#close",d.className="close",d.innerHTML="Close",c.appendChild(d);var e=wax.util.bind(function(a){return this.hideTooltip(c),this._currentTooltip=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1},this);d.addEventListener?(d.addEventListener("click",e,!1),d.addEventListener("touchend",e,!1)):d.attachEvent&&d.attachEvent("onclick",e),this._currentTooltip=c},wax.tooltip.prototype.over=function(a,b){if(!a)return;b.style.cursor="pointer";if(this.isPopup(this._currentTooltip))return;this._currentTooltip=this.getTooltip(a,b)},wax.tooltip.prototype.out=function(a){a.style.cursor="default";if(this.isPopup(this._currentTooltip))return;this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined)};var wax=wax||{};wax.util=wax.util||{},wax.util={offset:function(a){var b=a.offsetWidth||parseInt(a.style.width,10),c=a.offsetHeight||parseInt(a.style.height,10),d=document.body,e=0,f=0,g=function(a){if(a===d||a===document.documentElement)return;e+=a.offsetTop,f+=a.offsetLeft;var b=a.style.transform||a.style.WebkitTransform||a.style.OTransform||a.style.MozTransform||a.style.msTransform;if(b)if(match=b.match(/translate\((.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/translate3d\((.+)px, (.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/matrix3d\(([\-\d,\s]+)\)/)){var c=match[1].split(",");e+=parseInt(c[13],10),f+=parseInt(c[12],10)}else if(match=b.match(/matrix\(.+, .+, .+, .+, (.+), (.+)\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10)};g(a);try{while(a=a.offsetParent)g(a)}catch(h){}e+=d.offsetTop,f+=d.offsetLeft,e+=d.parentNode.offsetTop,f+=d.parentNode.offsetLeft;var i=document.defaultView?window.getComputedStyle(d.parentNode,null):d.parentNode.currentStyle;return d.parentNode.offsetTop!==parseInt(i.marginTop,10)&&!isNaN(parseInt(i.marginTop,10))&&(e+=parseInt(i.marginTop,10),f+=parseInt(i.marginLeft,10)),{top:e,left:f,height:c,width:b}},$:function(a){return typeof a=="string"?document.getElementById(a):a},bind:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,c.concat(Array.prototype.slice.call(arguments)))}},isString:function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)},indexOf:function(a,b){var c=Array.prototype.indexOf;if(a===null)return-1;var d,e;if(c&&a.indexOf===c)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(a[d]===b)return d;return-1},isArray:Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},keys:Object.keys||function(a){var b=Object.prototype.hasOwnProperty;if(a!==Object(a))throw new TypeError("Invalid object");var c=[];for(var d in a)b.call(a,d)&&(c[c.length]=d);return c},eventoffset:function(a){var b=0,c=0;if(!a)var a=window.event;if(a.pageX||a.pageY)return{x:a.pageX,y:a.pageY};if(a.clientX||a.clientY){var d=document.documentElement,e=document.body,f=document.body.parentNode.currentStyle,g=parseInt(f.marginTop,10)||0,h=parseInt(f.marginLeft,10)||0;return{x:a.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0)+h,y:a.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)+g}}if(a.touches&&a.touches.length===1)return{x:a.touches[0].pageX,y:a.touches[0].pageY}},limit:function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d);if(c||!d)d=setTimeout(g,b)}},throttle:function(a,b){return this.limit(a,b,!1)}},wax=wax||{},wax.leaf=wax.leaf||{},wax.leaf.interaction=function(a,b,c){function s(){return r||(r=function(a){var b=[];for(var c in a)if(a[c]._tiles)for(var d in a[c]._tiles){var e=wax.util.offset(a[c]._tiles[d]);b.push([e.top,e.left,a[c]._tiles[d]])}return b}(a._layers))}function t(a,b){r=null}function u(a){for(var b=0,c=s();b<c.length;b++)if(c[b][0]<a.y&&c[b][0]+256>a.y&&c[b][1]<a.x&&c[b][1]+256>a.x)return c[b][2];return!1}function v(){return l?(window.clearTimeout(l),l=null,!0):!1}function w(a){if(k)return;var b=wax.util.eventoffset(a),c=u(b),f;c&&d.getGrid(c.src,function(a,d){if(a||!d)return;f=d.tileFeature(b.x,b.y,c,{format:"teaser"}),f?f&&o!==f?(o=f,e.out(m),e.over(f,m)):f||(o=null,e.out(m)):(o=null,e.out(m))})}function x(a){if(v())return;k=!0,p=wax.util.eventoffset(a),a.type==="mousedown"?g(m,"mouseup",z,this):a.type==="touchstart"&&a.touches.length===1&&(f=["full","teaser"],e._currentTooltip&&e.hideTooltip(e._currentTooltip),g(m,"touchend",z,this),g(m,"touchmove",y,this))}function y(){h(m,"touchend",z),h(m,"touchmove",z),k=!1}function z(a){var b=wax.util.eventoffset(a);return k=!1,h(m,"mouseup",z),m.ontouchend&&(h(m,"touchend",z),h(m,"touchmove",_touchCancel)),a.type==="touchend"?A(a,p):Math.round(b.y/q)===Math.round(p.y/q)&&Math.round(b.x/q)===Math.round(p.x/q)&&(l=window.setTimeout(function(){l=null,A(a,b)},300)),z}function A(a,b){var c=u(b),g;c&&d.getGrid(c.src,function(d,h){for(var j=0;h&&j<f.length;j++){g=h.tileFeature(b.x,b.y,c,{format:f[j]});if(g)switch(f[j]){case"full":case"teaser":return e.click(g,m,0,a);case"location":return i(g)}}})}b=b||{},c=c||{};var d=wax.GridManager(b),e=c.callbacks||new wax.tooltip(c),f=c.clickAction||["full","location"],g=L.DomEvent.addListener,h=L.DomEvent.removeListener,i=c.clickHandler||function(a){window.location=a},j={},k=!1,l=!1,m=a._container,n="ontouchstart"in document.documentElement,o,p,q=4,r;return j.add=function(){var b=["moveend","layerswitched"];for(var c=0;c<b.length;c++)a.on(b[c],t);return g(m,"mousemove",w),g(m,"mousedown",x),n&&g(m,"touchstart",x),this},j.remove=function(){var b=["moveend","layerswitched"];for(var c=0;c<b.length;c++)a.off(b[c],t);return h(m,"mousemove",w),h(m,"mousedown",x),n&&h(m,"touchstart",x),e._currentTooltip&&e.hideTooltip(e._currentTooltip),this},j.add(a)},wax=wax||{},wax.leaf=wax.leaf||{},wax.leaf.connector=L.TileLayer.extend({initialize:function(a){a=a||{},a.minZoom=a.minzoom||0,a.maxZoom=a.maxzoom||22,L.TileLayer.prototype.initialize.call(this,a.tiles[0],a)}}) |
@@ -1,2 +0,2 @@ | ||
/* wax - 4.1.6 - 1.0.4-482-g8a293d4 *//*! | ||
/* wax - 4.1.7 - 1.0.4-483-gbb64c65 *//*! | ||
* Reqwest! A general purpose XHR connection manager | ||
@@ -6,3 +6,3 @@ * copyright Dustin Diaz 2011 | ||
* license MIT | ||
*/!function(context,win){function serial(a){var b=a.name;if(a.disabled||!b)return"";b=enc(b);switch(a.tagName.toLowerCase()){case"input":switch(a.type){case"reset":case"button":case"image":case"file":return"";case"checkbox":case"radio":return a.checked?b+"="+(a.value?enc(a.value):!0)+"&":"";default:return b+"="+(a.value?enc(a.value):"")+"&"}break;case"textarea":return b+"="+enc(a.value)+"&";case"select":return b+"="+enc(a.options[a.selectedIndex].value)+"&"}return""}function enc(a){return encodeURIComponent(a)}function reqwest(a,b){return new Reqwest(a,b)}function init(o,fn){function error(a){o.error&&o.error(a),complete(a)}function success(resp){o.timeout&&clearTimeout(self.timeout)&&(self.timeout=null);var r=resp.responseText;if(r)switch(type){case"json":resp=win.JSON?win.JSON.parse(r):eval("("+r+")");break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function complete(a){o.complete&&o.complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort(),error()},o.timeout)),this.request=getRequest(o,success,error)}function setType(a){return/\.json$/.test(a)?"json":/\.jsonp$/.test(a)?"jsonp":/\.js$/.test(a)?"js":/\.html?$/.test(a)?"html":/\.xml$/.test(a)?"xml":"js"}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function getRequest(a,b,c){if(a.type!="jsonp"){var d=xhr();return d.open(a.method||"GET",typeof a=="string"?a:a.url,!0),setHeaders(d,a),d.onreadystatechange=handleReadyState(d,b,c),a.before&&a.before(d),d.send(a.data||null),d}var e=doc.createElement("script"),f=0;win[getCallbackName(a)]=generalCallback,e.type="text/javascript",e.src=a.url,e.async=!0,e.onload=e.onreadystatechange=function(){if(e[readyState]&&e[readyState]!=="complete"&&e[readyState]!=="loaded"||f)return!1;e.onload=e.onreadystatechange=null,a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(e),f=1},head.appendChild(e)}function generalCallback(a){lastValue=a}function getCallbackName(a){var b=a.jsonpCallback||"callback";if(a.url.slice(-(b.length+2))==b+"=?"){var c="reqwest_"+uniqid++;return a.url=a.url.substr(0,a.url.length-1)+c,c}var d=new RegExp(b+"=([\\w]+)");return a.url.match(d)[1]}function setHeaders(a,b){var c=b.headers||{};c.Accept=c.Accept||"text/javascript, text/html, application/xml, text/xml, */*",b.crossOrigin||(c["X-Requested-With"]=c["X-Requested-With"]||"XMLHttpRequest"),c[contentType]=c[contentType]||"application/x-www-form-urlencoded";for(var d in c)c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d],!1)}function handleReadyState(a,b,c){return function(){a&&a[readyState]==4&&(twoHundo.test(a.status)?b(a):c(a))}}var twoHundo=/^20\d$/,doc=document,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",head=doc[byTag]("head")[0],uniqid=0,lastValue,xhr="XMLHttpRequest"in win?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serialize=function(a){var b=[a[byTag]("input"),a[byTag]("select"),a[byTag]("textarea")],c=[],d,e;for(d=0,l=b.length;d<l;++d)for(e=0,l2=b[d].length;e<l2;++e)c.push(serial(b[d][e]));return c.join("").replace(/&$/,"")},reqwest.serializeArray=function(a){for(var b=this.serialize(a).split("&"),c=0,d=b.length,e=[],f;c<d;c++)b[c]&&(f=b[c].split("="))&&e.push({name:f[0],value:f[1]});return e};var old=context.reqwest;reqwest.noConflict=function(){return context.reqwest=old,this},typeof module!="undefined"?module.exports=reqwest:context.reqwest=reqwest}(this,window);var html4={};html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10},html4.ATTRIBS={"*::class":9,"*::dir":0,"*::id":4,"*::lang":0,"*::onclick":2,"*::ondblclick":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::style":3,"*::title":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::rel":0,"a::rev":0,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"del::cite":1,"del::datetime":0,"dir::compact":0,"div::align":0,"dl::compact":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::ismap":0,"input::maxlength":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::readonly":0,"input::size":0,"input::src":1,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"ol::compact":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"p::align":0,"pre::width":0,"q::cite":1,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::size":0,"select::tabindex":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::cols":0,"textarea::disabled":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::readonly":0,"textarea::rows":0,"textarea::tabindex":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"ul::compact":0,"ul::type":0},html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128},html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:16,area:2,b:0,base:18,basefont:18,bdo:0,big:0,blockquote:0,body:49,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,dd:1,del:0,dfn:0,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,font:0,form:0,frame:18,frameset:16,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:49,hr:2,html:49,i:0,iframe:4,img:2,input:2,ins:0,isindex:18,kbd:0,label:0,legend:0,li:1,link:18,map:0,menu:0,meta:18,nobr:0,noembed:4,noframes:20,noscript:20,object:16,ol:0,optgroup:0,option:1,p:1,param:18,pre:0,q:0,s:0,samp:0,script:84,select:0,small:0,span:0,strike:0,strong:0,style:148,sub:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,title:24,tr:1,tt:0,u:0,ul:0,"var":0},html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2},html4.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"body::background":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0},html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0},html4.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"body::background":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2};var html=function(a){function g(a){a=b(a);if(c.hasOwnProperty(a))return c[a];var d=a.match(e);return d?String.fromCharCode(parseInt(d[1],10)):(d=a.match(f))?String.fromCharCode(parseInt(d[1],16)):""}function h(a,b){return g(b)}function j(a){return a.replace(i,"")}function l(a){return a.replace(k,h)}function s(a){return a.replace(m,"&").replace(o,"<").replace(p,">").replace(q,""").replace(r,"=")}function t(a){return a.replace(n,"&$1").replace(o,"<").replace(p,">")}function w(c){return function d(d,e){d=String(d);var f=null,g=!1,h=[],i=void 0,k=void 0,m=void 0;c.startDoc&&c.startDoc(e);while(d){var n=d.match(g?u:v);d=d.substring(n[0].length);if(g){if(n[1]){var o=b(n[1]),p;if(n[2]){var q=n[3];switch(q.charCodeAt(0)){case 34:case 39:q=q.substring(1,q.length-1)}p=l(j(q))}else p=o;h.push(o,p)}else if(n[4]){k!==void 0&&(m?c.startTag&&c.startTag(i,h,e):c.endTag&&c.endTag(i,e));if(m&&k&(a.eflags.CDATA|a.eflags.RCDATA)){f===null?f=b(d):f=f.substring(f.length-d.length);var r=f.indexOf("</"+i);r<0&&(r=d.length),r&&(k&a.eflags.CDATA?c.cdata&&c.cdata(d.substring(0,r),e):c.rcdata&&c.rcdata(t(d.substring(0,r)),e),d=d.substring(r))}i=k=m=void 0,h.length=0,g=!1}}else if(n[1])c.pcdata&&c.pcdata(n[0],e);else if(n[3])m=!n[2],g=!0,i=b(n[3]),k=a.ELEMENTS.hasOwnProperty(i)?a.ELEMENTS[i]:void 0;else if(n[4])c.pcdata&&c.pcdata(n[4],e);else if(n[5]&&c.pcdata){var s=n[5];c.pcdata(s==="<"?"<":s===">"?">":"&",e)}}c.endDoc&&c.endDoc(e)}}function x(b){var c,d;return w({startDoc:function(a){c=[],d=!1},startTag:function(e,f,g){if(d)return;if(!a.ELEMENTS.hasOwnProperty(e))return;var h=a.ELEMENTS[e];if(h&a.eflags.FOLDABLE)return;if(h&a.eflags.UNSAFE){d=!(h&a.eflags.EMPTY);return}f=b(e,f);if(f){h&a.eflags.EMPTY||c.push(e),g.push("<",e);for(var i=0,j=f.length;i<j;i+=2){var k=f[i],l=f[i+1];l!==null&&l!==void 0&&g.push(" ",k,'="',s(l),'"')}g.push(">")}},endTag:function(b,e){if(d){d=!1;return}if(!a.ELEMENTS.hasOwnProperty(b))return;var f=a.ELEMENTS[b];if(!(f&(a.eflags.UNSAFE|a.eflags.EMPTY|a.eflags.FOLDABLE))){var g;if(f&a.eflags.OPTIONAL_ENDTAG)for(g=c.length;--g>=0;){var h=c[g];if(h===b)break;if(!(a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG))return}else for(g=c.length;--g>=0;)if(c[g]===b)break;if(g<0)return;for(var i=c.length;--i>g;){var h=c[i];a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG||e.push("</",h,">")}c.length=g,e.push("</",b,">")}},pcdata:function(a,b){d||b.push(a)},rcdata:function(a,b){d||b.push(a)},cdata:function(a,b){d||b.push(a)},endDoc:function(a){for(var b=c.length;--b>=0;)a.push("</",c[b],">");c.length=0}})}function z(b,c,e){var f=[];return x(function g(b,f){for(var g=0;g<f.length;g+=2){var h=f[g],i=f[g+1],j=null,k;if((k=b+"::"+h,a.ATTRIBS.hasOwnProperty(k))||(k="*::"+h,a.ATTRIBS.hasOwnProperty(k)))j=a.ATTRIBS[k];if(j!==null)switch(j){case a.atype.NONE:break;case a.atype.SCRIPT:case a.atype.STYLE:i=null;break;case a.atype.ID:case a.atype.IDREF:case a.atype.IDREFS:case a.atype.GLOBAL_NAME:case a.atype.LOCAL_NAME:case a.atype.CLASSES:i=e?e(i):i;break;case a.atype.URI:var l=(""+i).match(y);l?!l[1]||d.test(l[1])?i=c&&c(i):i=null:i=null;break;case a.atype.URI_FRAGMENT:i&&"#"===i.charAt(0)?(i=e?e(i):i,i&&(i="#"+i)):i=null;break;default:i=null}else i=null;f[g+1]=i}return f})(b,f),f.join("")}var b;"script"==="SCRIPT".toLowerCase()?b=function(a){return a.toLowerCase()}:b=function(a){return a.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)|32)})};var c={lt:"<",gt:">",amp:"&",nbsp:" ",quot:'"',apos:"'"},d=/^(?:https?|mailto|data)$/i,e=/^#(\d+)$/,f=/^#x([0-9A-Fa-f]+)$/,i=/\0/g,k=/&(#\d+|#x[0-9A-Fa-f]+|\w+);/g,m=/&/g,n=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,o=/</g,p=/>/g,q=/\"/g,r=/\=/g,u=new RegExp("^\\s*(?:(?:([a-z][a-z-]*)(\\s*=\\s*(\"[^\"]*\"|'[^']*'|(?=[a-z][a-z-]*\\s*=)|[^>\"'\\s]*))?)|(/?>)|[\\s\\S][^a-z\\s>]*)","i"),v=new RegExp("^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);|<!--[\\s\\S]*?-->|<!\\w[^>]*>|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))","i"),y=new RegExp("^(?:([^:/?#]+):)?");return{escapeAttrib:s,makeHtmlSanitizer:x,makeSaxParser:w,normalizeRCData:t,sanitize:z,unescapeEntities:l}}(html4),html_sanitize=html.sanitize;typeof window!="undefined"&&(window.html=html,window.html_sanitize=html_sanitize),html4.ATTRIBS["*::style"]=0,html4.ELEMENTS.style=0;var Mustache=function(){var a={},b=function(){};return b.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(a,b,c,d){d||(this.context=b,this.buffer=[]);if(!this.includes("",a)){if(d)return a;this.send(a);return}a=this.render_pragmas(a);var e=this.render_section(a,b,c);e===!1&&(e=this.render_tags(a,b,c,d));if(d)return e;this.sendLines(e)},send:function(a){a!==""&&this.buffer.push(a)},sendLines:function(a){if(a){var b=a.split("\n");for(var c=0;c<b.length;c++)this.send(b[c])}},render_pragmas:function(a){if(!this.includes("%",a))return a;var b=this,c=this.getCachedRegex("render_pragmas",function(a,b){return new RegExp(a+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+b,"g")});return a.replace(c,function(a,c,d){if(!b.pragmas_implemented[c])throw{message:"This implementation of mustache doesn't understand the '"+c+"' pragma"};b.pragmas[c]={};if(d){var e=d.split("=");b.pragmas[c][e[0]]=e[1]}return""})},render_partial:function(a,b,c){a=this.trim(a);if(!c||c[a]===undefined)throw{message:"unknown_partial '"+a+"'"};return typeof b[a]!="object"?this.render(c[a],b,c,!0):this.render(c[a],b[a],c,!0)},render_section:function(a,b,c){if(!this.includes("#",a)&&!this.includes("^",a))return!1;var d=this,e=this.getCachedRegex("render_section",function(a,b){return new RegExp("^([\\s\\S]*?)"+a+"(\\^|\\#)\\s*(.+)\\s*"+b+"\n*([\\s\\S]*?)"+a+"\\/\\s*\\3\\s*"+b+"\\s*([\\s\\S]*)$","g")});return a.replace(e,function(a,e,f,g,h,i){var j=e?d.render_tags(e,b,c,!0):"",k=i?d.render(i,b,c,!0):"",l,m=d.find(g,b);return f==="^"?!m||d.is_array(m)&&m.length===0?l=d.render(h,b,c,!0):l="":f==="#"&&(d.is_array(m)?l=d.map(m,function(a){return d.render(h,d.create_context(a),c,!0)}).join(""):d.is_object(m)?l=d.render(h,d.create_context(m),c,!0):typeof m=="function"?l=m.call(b,h,function(a){return d.render(a,b,c,!0)}):m?l=d.render(h,b,c,!0):l=""),j+l+k})},render_tags:function(a,b,c,d){var e=this,f=function(){return e.getCachedRegex("render_tags",function(a,b){return new RegExp(a+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+b+"+","g")})},g=f(),h=function(a,d,h){switch(d){case"!":return"";case"=":return e.set_delimiters(h),g=f(),"";case">":return e.render_partial(h,b,c);case"{":return e.find(h,b);default:return e.escape(e.find(h,b))}},i=a.split("\n");for(var j=0;j<i.length;j++)i[j]=i[j].replace(g,h,this),d||this.send(i[j]);if(d)return i.join("\n")},set_delimiters:function(a){var b=a.split(" ");this.otag=this.escape_regex(b[0]),this.ctag=this.escape_regex(b[1])},escape_regex:function(a){if(!arguments.callee.sRE){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+b.join("|\\")+")","g")}return a.replace(arguments.callee.sRE,"\\$1")},find:function(a,b){function c(a){return a===!1||a===0||a}a=this.trim(a);var d;return c(b[a])?d=b[a]:c(this.context[a])&&(d=this.context[a]),typeof d=="function"?d.apply(b):d!==undefined?d:""},includes:function(a,b){return b.indexOf(this.otag+a)!=-1},escape:function(a){return a=String(a===null?"":a),a.replace(/&(?!\w+;)|["'<>\\]/g,function(a){switch(a){case"&":return"&";case'"':return""";case"'":return"'";case"<":return"<";case">":return">";default:return a}})},create_context:function(a){if(this.is_object(a))return a;var b=".";this.pragmas["IMPLICIT-ITERATOR"]&&(b=this.pragmas["IMPLICIT-ITERATOR"].iterator);var c={};return c[b]=a,c},is_object:function(a){return a&&typeof a=="object"},is_array:function(a){return Object.prototype.toString.call(a)==="[object Array]"},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},map:function(a,b){if(typeof a.map=="function")return a.map(b);var c=[],d=a.length;for(var e=0;e<d;e++)c.push(b(a[e]));return c},getCachedRegex:function(b,c){var d=a[this.otag];d||(d=a[this.otag]={});var e=d[this.ctag];e||(e=d[this.ctag]={});var f=e[b];return f||(f=e[b]=c(this.otag,this.ctag)),f}},{name:"mustache.js",version:"0.4.0-dev",to_html:function(a,c,d,e){var f=new b;e&&(f.send=e),f.render(a,c||{},d);if(!e)return f.buffer.join("\n")}}}();wax=wax||{},wax.attribution=function(){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var a,b={};return b.set=function(b){if(typeof b=="undefined")return;return a.innerHTML=html_sanitize(b,c,d),this},b.element=function(){return a},b.init=function(){return a=document.createElement("div"),a.className="wax-attribution",this},b.init()},wax=wax||{},wax.bwdetect=function(a,b){function h(){wax.bw=-1;var a=new Image;a.src=e;var b=!0,f=setTimeout(function(){b&&wax.bw==-1&&(c.bw(0),b=!1)},d);a.onload=function(){b&&wax.bw==-1&&(clearTimeout(f),c.bw(1),b=!1)}}var c={},d=a.threshold||400,e="http://a.tiles.mapbox.com/mapbox/1.0.0/blue-marble-topo-bathy-jul/0/0/0.png?preventcache="+ +(new Date),f=1,g=a.auto===undefined?!0:a.auto;return c.bw=function(a){if(!arguments.length)return f;var c=f;wax.bwlisteners&&wax.bwlisteners.length&&function(){listeners=wax.bwlisteners,wax.bwlisteners=[];for(i=0;i<listeners;i++)listeners[i](a)}(),wax.bw=a,f!=(f=a)&&b(a)},c.add=function(){return g&&h(),this},wax.bw==-1?(wax.bwlisteners=wax.bwlisteners||[],wax.bwlisteners.push(c.bw)):wax.bw!==undefined?c.bw(wax.bw):c.add(),c},wax.formatter=function(x){function urlX(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function idX(a){return a}var formatter={},f;if(x&&typeof x=="string")try{eval("f = "+x)}catch(e){console&&console.log(e)}else x&&typeof x=="function"?f=x:f=function(){};return formatter.format=function(a,b){try{return html_sanitize(f(a,b),urlX,idX)}catch(c){console&&console.log(c)}},formatter},wax.GridInstance=function(a,b,c){function g(a){return a>=93&&a--,a>=35&&a--,a-=32,a}c=c||{};var d={},e=c.resolution||4,f=c.tileSize||256;return d.grid_tile=function(){return a},d.getKey=function(b,c){if(!a||!a.grid)return;if(c<0||b<0)return;if(Math.floor(c)>=f||Math.floor(b)>=f)return;return g(a.grid[Math.floor(c/e)].charCodeAt(Math.floor(b/e)))},d.gridFeature=function(b,c){var d=this.getKey(b,c),e=a.keys;if(e&&e[d]&&a.data[e[d]])return a.data[e[d]]},d.tileFeature=function(c,d,e,f){if(!a)return;var g=wax.util.offset(e);feature=this.gridFeature(c-g.left,d-g.top);if(feature)return b.format(f,feature)},d},wax.GridManager=function(a){function h(a){return typeof a=="string"&&(a=[a]),function b(b){if(!b)return;var c=/(\d+)\/(\d+)\/(\d+)\.[\w\._]+/g.exec(b);if(!c)return;return a[parseInt(c[2],10)%a.length].replace("{z}",c[1]).replace("{x}",c[2]).replace("{y}",c[3])}}a=a||{};var b=a.resolution||4,c=a.version||"1.1",d={},e={},f,g=function(a){return a.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json")};return e.formatter=function(a){return arguments.length?(f=wax.formatter(a),e):f},e.template=function(a){return arguments.length?(f=wax.template(a),e):f},e.gridUrl=function(a){return arguments.length?(g=typeof a=="function"?a:h(a),e):g},e.getGrid=function(a,c){var d=g(a);return!f||!d?c(null,null):(wax.request.get(d,function(a,d){if(a)return c(a,null);c(null,wax.GridInstance(d,f,{resolution:b||4}))}),e)},e.add=function(a){return a.template?e.template(a.template):a.formatter&&e.formatter(a.formatter),a.grids&&e.gridUrl(a.grids),this},e.add(a)},wax=wax||{},wax.hash=function(a){function b(){return location.hash.substring(1)}function c(a){location.hash="#"+a}function g(b){var c=b.split("/");for(var d=0;d<c.length;d++){c[d]=Number(c[d]);if(isNaN(c[d]))return!0}if(c.length<3)return!0;c.length==3&&a.setCenterZoom(c)}function h(){var b=a.getCenterZoom();d!==b&&(d=b,c(d))}function i(a){if(a===d)return;g(d=a)&&h()}a=a||{};var d,e={},f=90-1e-8,j=wax.util.throttle(h,500);return e.add=function(){return i(b()),a.bindChange(j),this},e.remove=function(){return a.unbindChange(j),this},e.add()};var wax=wax||{};wax.legend=function(){function d(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function e(a){return a}var a,b={},c;return b.element=function(){return c},b.content=function(b){return arguments.length?(b?(a.innerHTML=html_sanitize(b,d,e),a.style.display="block"):(a.innerHTML="",a.style.display="none"),this):a.innerHTML},b.add=function(){return c=document.createElement("div"),c.className="wax-legends",a=document.createElement("div"),a.className="wax-legend",a.style.display="none",c.appendChild(a),this},b.add()};var w=function(a){return a.melt=function(b,c){return b.apply(c,[a,c])},a},wax=wax||{};wax.movetip={},wax.movetip=function(a){function g(a){return a&&a.className.indexOf("wax-popup")!==-1}function h(a,b){var c=document.createElement("div");return c.className="wax-movetip",c.style.cssText="position:absolute;",c.innerHTML=a,b.appendChild(c),d=b,_tooltipOffset=wax.util.offset(c),_contextOffset=wax.util.offset(d),c}function i(a){if(!c)return;var b=wax.util.eventoffset(a);c.className="wax-movetip",_tooltipOffset.height+b.y>_contextOffset.top+_contextOffset.height&&_contextOffset.height>_tooltipOffset.height&&(b.y-=_tooltipOffset.height,c.className+=" flip-y"),_tooltipOffset.width+b.x>_contextOffset.left+_contextOffset.width&&(b.x-=_tooltipOffset.width,c.className+=" flip-x"),c.style.left=b.x+"px",c.style.top=b.y+"px"}function j(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&e?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&e&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+e):a.parentNode&&a.parentNode.removeChild(a)}function k(a,b){c&&(j(c),c=undefined);var d=h(a,b);d.className+=" wax-popup",d.innerHTML=a;var e=document.createElement("a");e.href="#close",e.className="close",e.innerHTML="Close",d.appendChild(e);var f=function(a){return j(d),c=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1};e.addEventListener?e.addEventListener("click",f,!1):e.attachEvent&&e.attachEvent("onclick",f),c=d}a=a||{};var b={},c=undefined,d=undefined,e=a.animationOut,f=a.animationIn;return b.over=function(a,b,d){if(!a)return;b.style.cursor="pointer";if(g(c))return;c=h(a,b),i(d),b.addEventListener&&b.addEventListener("mousemove",i)},b.out=function(a){a.style.cursor="default";if(g(c))return;c&&(j(c),a.removeEventListener&&a.removeEventListener("mousemove",i),c=undefined)},b};var wax=wax||{};wax.request={cache:{},locks:{},promises:{},get:function(a,b){if(this.cache[a])return b(this.cache[a][0],this.cache[a][1]);this.promises[a]=this.promises[a]||[],this.promises[a].push(b);if(this.locks[a])return;var c=this;this.locks[a]=!0,reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(b){c.locks[a]=!1,c.cache[a]=[null,b];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])},error:function(b){c.locks[a]=!1,c.cache[a]=[b,null];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])}})}},wax.template=function(a){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var b={};return b.format=function(b,e){var f={};for(var g in e)f[g]=e[g];return b.format&&(f["__"+b.format+"__"]=!0),html_sanitize(Mustache.to_html(a,f),c,d)},b};if(!wax)var wax={};wax.tilejson=function(a,b){reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:b,error:b})};var wax=wax||{};wax.tooltip={},wax.tooltip=function(a){this._currentTooltip=undefined,a=a||{},a.animationOut&&(this.animationOut=a.animationOut),a.animationIn&&(this.animationIn=a.animationIn)},wax.tooltip.prototype.isPopup=function(a){return a&&a.className.indexOf("wax-popup")!==-1},wax.tooltip.prototype.getTooltip=function(a,b){var c=document.createElement("div");return c.className="wax-tooltip wax-tooltip-0",c.innerHTML=a,b.appendChild(c),c},wax.tooltip.prototype.hideTooltip=function(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&this.animationOut?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&this.animationOut&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+this.animationOut):a.parentNode&&a.parentNode.removeChild(a)},wax.tooltip.prototype.click=function(a,b){this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined);var c=this.getTooltip(a,b);c.className+=" wax-popup",c.innerHTML=a;var d=document.createElement("a");d.href="#close",d.className="close",d.innerHTML="Close",c.appendChild(d);var e=wax.util.bind(function(a){return this.hideTooltip(c),this._currentTooltip=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1},this);d.addEventListener?(d.addEventListener("click",e,!1),d.addEventListener("touchend",e,!1)):d.attachEvent&&d.attachEvent("onclick",e),this._currentTooltip=c},wax.tooltip.prototype.over=function(a,b){if(!a)return;b.style.cursor="pointer";if(this.isPopup(this._currentTooltip))return;this._currentTooltip=this.getTooltip(a,b)},wax.tooltip.prototype.out=function(a){a.style.cursor="default";if(this.isPopup(this._currentTooltip))return;this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined)};var wax=wax||{};wax.util=wax.util||{},wax.util={offset:function(a){var b=a.offsetWidth||parseInt(a.style.width,10),c=a.offsetHeight||parseInt(a.style.height,10),d=document.body,e=0,f=0,g=function(a){if(a===d||a===document.documentElement)return;e+=a.offsetTop,f+=a.offsetLeft;var b=a.style.transform||a.style.WebkitTransform||a.style.OTransform||a.style.MozTransform||a.style.msTransform;if(b)if(match=b.match(/translate\((.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/translate3d\((.+)px, (.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/matrix3d\(([\-\d,\s]+)\)/)){var c=match[1].split(",");e+=parseInt(c[13],10),f+=parseInt(c[12],10)}else if(match=b.match(/matrix\(.+, .+, .+, .+, (.+), (.+)\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10)};g(a);try{while(a=a.offsetParent)g(a)}catch(h){}e+=d.offsetTop,f+=d.offsetLeft,e+=d.parentNode.offsetTop,f+=d.parentNode.offsetLeft;var i=document.defaultView?window.getComputedStyle(d.parentNode,null):d.parentNode.currentStyle;return d.parentNode.offsetTop!==parseInt(i.marginTop,10)&&!isNaN(parseInt(i.marginTop,10))&&(e+=parseInt(i.marginTop,10),f+=parseInt(i.marginLeft,10)),{top:e,left:f,height:c,width:b}},$:function(a){return typeof a=="string"?document.getElementById(a):a},bind:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,c.concat(Array.prototype.slice.call(arguments)))}},isString:function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)},indexOf:function(a,b){var c=Array.prototype.indexOf;if(a===null)return-1;var d,e;if(c&&a.indexOf===c)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(a[d]===b)return d;return-1},isArray:Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},keys:Object.keys||function(a){var b=Object.prototype.hasOwnProperty;if(a!==Object(a))throw new TypeError("Invalid object");var c=[];for(var d in a)b.call(a,d)&&(c[c.length]=d);return c},eventoffset:function(a){var b=0,c=0;if(!a)var a=window.event;if(a.pageX||a.pageY)return{x:a.pageX,y:a.pageY};if(a.clientX||a.clientY){var d=document.documentElement,e=document.body,f=document.body.parentNode.currentStyle,g=parseInt(f.marginTop,10)||0,h=parseInt(f.marginLeft,10)||0;return{x:a.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0)+h,y:a.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)+g}}if(a.touches&&a.touches.length===1)return{x:a.touches[0].pageX,y:a.touches[0].pageY}},limit:function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d);if(c||!d)d=setTimeout(g,b)}},throttle:function(a,b){return this.limit(a,b,!1)}},wax=wax||{},wax.mm=wax.mm||{},wax.mm.attribution=function(a,b){b=b||{};var c,d={};return d.element=function(){return c.element()},d.appendTo=function(a){return wax.util.$(a).appendChild(c.element()),this},d.init=function(){return c=wax.attribution(),c.set(b.attribution),c.element().className="wax-attribution wax-mm",this},d.init()},wax=wax||{},wax.mm=wax.mm||{},wax.mm.boxselector=function(a,b,c){function l(b){var c=new e.Point(b.clientX,b.clientY);c.x+=document.body.scrollLeft+document.documentElement.scrollLeft,c.y+=document.body.scrollTop+document.documentElement.scrollTop;for(var d=a.parent;d;d=d.offsetParent)c.x-=d.offsetLeft,c.y-=d.offsetTop;return c}function m(b){if(!b.shiftKey)return;return d=l(b),g.style.left=d.x+"px",g.style.top=d.y+"px",h(a.parent,"mousemove",n),h(a.parent,"mouseup",o),a.parent.style.cursor="crosshair",e.cancelEvent(b)}function n(a){var b=l(a),c=g.style;return c.display="block",b.x<d.x?c.left=b.x+"px":c.left=d.x+"px",b.y<d.y?c.top=b.y+"px":c.top=d.y+"px",c.width=Math.abs(b.x-d.x)+"px",c.height=Math.abs(b.y-d.y)+"px",e.cancelEvent(a)}function o(b){var c=l(b),f=a.pointLocation(c),g=a.pointLocation(d);k.extent([new e.Location(Math.max(f.lat,g.lat),Math.min(f.lon,g.lon)),new e.Location(Math.min(f.lat,g.lat),Math.max(f.lon,g.lon))]),i(a.parent,"mousemove",n),i(a.parent,"mouseup",o),a.parent.style.cursor="auto"}function p(a,b){if(!g||!j)return;var c=a.locationPoint(j[1]),d=a.locationPoint(j[0]),e=g.style;e.display="block",e.height="auto",e.width="auto",e.left=Math.max(0,d.x)+"px",e.top=Math.max(0,d.y)+"px",e.right=Math.max(0,a.dimensions.x-c.x)+"px",e.bottom=Math.max(0,a.dimensions.y-c.y)+"px"}var d=null,e=com.modestmaps,f=typeof c=="function"?c:c.callback,g,h=e.addEvent,i=e.removeEvent,j,k={};return k.extent=function(b,c){if(!b)return j;j=[new e.Location(Math.max(b[0].lat,b[1].lat),Math.min(b[0].lon,b[1].lon)),new e.Location(Math.min(b[0].lat,b[1].lat),Math.max(b[0].lon,b[1].lon))],p(a),c||f(j)},k.add=function(a){return g=g||document.createElement("div"),g.id=a.parent.id+"-boxselector-box",g.className="boxselector-box",a.parent.appendChild(g),h(a.parent,"mousedown",m),a.addCallback("drawn",p),this},k.remove=function(){a.parent.removeChild(g),i(a.parent,"mousedown",m),a.removeCallback("drawn",p)},k.add(a)},wax=wax||{},wax.mm=wax.mm||{},wax.mm.bwdetect=function(a,b){function g(b){(!b.options||!b.options.scheme)&&e.Map.prototype.setProvider.call(a,b);var g=[[".png",".jpg"],[c,d]];f&&g.reverse();for(var h=0;h<b.options.tiles.length;h++)b.options.tiles[h]=b.options.tiles[h].replace(g[0][0],g[1][0]).replace(g[0][1],g[1][1]);e.Map.prototype.setProvider.call(a,b)}b=b||{};var c=b.png||".png128",d=b.jpg||".jpg70",e=com.modestmaps,f=1;return a.setProvider=g,wax.bwdetect(b,function(b){f=b,g(a.provider)})},wax=wax||{},wax.mm=wax.mm||{},wax.mm.fullscreen=function(a){function g(a){a&&com.modestmaps.cancelEvent(a),b?c.original():c.full()}var b=!1,c={},d,e=document.body,f;return c.add=function(a){return d=document.createElement("a"),d.className="wax-fullscreen",d.href="#fullscreen",d.innerHTML="fullscreen",com.modestmaps.addEvent(d,"click",g),this},c.full=function(){if(b)return;b=!0,f=[a.parent.offsetWidth,a.parent.offsetHeight],a.parent.className+=" wax-fullscreen-map",e.className+=" wax-fullscreen-view",a.setSize(a.parent.offsetWidth,a.parent.offsetHeight)},c.original=function(){if(!b)return;b=!1,a.parent.className= | ||
a.parent.className.replace(" wax-fullscreen-map",""),e.className=e.className.replace(" wax-fullscreen-view",""),a.setSize(f[0],f[1])},c.appendTo=function(a){return wax.util.$(a).appendChild(d),this},c.add(a)},wax=wax||{},wax.mm=wax.mm||{},wax.mm.hash=function(a){return wax.hash({getCenterZoom:function(){var b=a.getCenter(),c=a.getZoom(),d=Math.max(0,Math.ceil(Math.log(c)/Math.LN2));return[c.toFixed(2),b.lat.toFixed(d),b.lon.toFixed(d)].join("/")},setCenterZoom:function b(b){a.setCenterZoom(new com.modestmaps.Location(b[1],b[2]),b[0])},bindChange:function(b){a.addCallback("drawn",b)},unbindChange:function(b){a.removeCallback("drawn",b)}})},wax=wax||{},wax.mm=wax.mm||{},wax.mm.interaction=function(a,b,c){function u(){var b=a.createOrGetLayer(Math.round(a.getZoom()));return s||(s=function(a){var c=[];for(var d in a)if(a[d].parentNode===b){var e=wax.util.offset(a[d]);c.push([e.top,e.left,a[d]])}return c}(a.tiles))}function v(a,b){s=null}function w(a){for(var b=0,c=u();b<c.length;b++)if(c[b][0]<a.y&&c[b][0]+256>a.y&&c[b][1]<a.x&&c[b][1]+256>a.x)return c[b][2];return!1}function x(){return n?(window.clearTimeout(n),n=null,!0):!1}function y(b){if(m)return;var c=b.target||b.srcElement;if(c.className!=="map-tile-loaded")return;var d=i(b),g=w(d),h;g&&e.getGrid(g.src,function(c,e){if(c||!e)return;h=e.tileFeature(d.x,d.y,g,{format:"teaser"}),h?h&&p!==h?(p=h,f.out(a.parent),f.over(h,a.parent,b)):h||(p=null,f.out(a.parent)):(p=null,f.out(a.parent))})}function z(b){var c=b.target||b.srcElement;if(c.className!=="map-tile-loaded")return;if(x())return;m=!0,q=i(b),b.type==="mousedown"?j(document.body,"mouseup",B):b.type==="touchstart"&&b.touches.length===1&&(g=["full","teaser"],f._currentTooltip&&f.hideTooltip(f._currentTooltip),j(a.parent,"touchend",B),j(a.parent,"touchmove",A),j(a.parent,"touchcancel",A))}function A(){k(a.parent,"touchend",B),k(a.parent,"touchmove",B),k(a.parent,"touchcancel",A),m=!1}function B(b){var c={},d=i(b);m=!1;for(var e in b)c[e]=b[e];return k(document.body,"mouseup",B),o&&(k(a.parent,"touchend",B),k(a.parent,"touchmove",A),k(a.parent,"touchcancel",A)),b.type==="touchend"?C(b,q):Math.round(d.y/r)===Math.round(q.y/r)&&Math.round(d.x/r)===Math.round(q.x/r)&&(n=window.setTimeout(function(){n=null,C(c,d)},300)),B}function C(b,c){var d=w(c),i;d&&e.getGrid(d.src,function(e,j){for(var k=0;j&&k<g.length;k++){i=j.tileFeature(c.x,c.y,d,{format:g[k]});if(i)switch(g[k]){case"full":case"teaser":return f.click(i,a.parent,b);case"location":return h(i)}}})}c=c||{},b=b||{};var d=com.modestmaps,e=wax.GridManager(b),f=c.callbacks||new wax.tooltip(c),g=c.clickAction||["full","location"],h=c.clickHandler||function(a){window.top.location=a},i=wax.util.eventoffset,j=d.addEvent,k=d.removeEvent,l={},m=!1,n=!1,o="ontouchstart"in document.documentElement,p,q,r=4,s,t=["zoomed","panned","centered","extentset","resized","drawn"];return l.add=function(){for(var b=0;b<t.length;b++)a.addCallback(t[b],v);return j(a.parent,"mousemove",y),j(a.parent,"mousedown",z),o&&j(a.parent,"touchstart",z),this},l.remove=function(){for(var b=0;b<t.length;b++)a.removeCallback(t[b],v);return k(a.parent,"mousemove",y),k(a.parent,"mousedown",z),o&&k(a.parent,"touchstart",z),f._currentTooltip&&f.hideTooltip(f._currentTooltip),this},l.add(a)},wax=wax||{},wax.mm=wax.mm||{},wax.mm.latlngtooltip=function(a){function f(c){var d=new b.Point(c.clientX,c.clientY);d.x+=document.body.scrollLeft+document.documentElement.scrollLeft,d.y+=document.body.scrollTop+document.documentElement.scrollTop;for(var e=a.parent;e;e=e.offsetParent)d.x-=e.offsetLeft,d.y-=e.offsetTop;return d}function g(a){console.log("here"),d=!0}function h(a){d=!1}function i(e){if(!e.shiftKey||d){c.parentNode===a.parent&&a.parent.removeChild(c);return}var g=f(e),h=a.pointLocation(g),i=h.lat.toFixed(2)+", "+h.lon.toFixed(2);c.innerHTML=i,g.scale=g.width=g.height=1,g.x+=10,b.moveElement(c,g),a.parent.appendChild(c)}var b=com.modestmaps,c,d=!1,e={};return e.add=function(){return b.addEvent(a.parent,"mousemove",i),b.addEvent(a.parent,"mousedown",g),b.addEvent(a.parent,"mouseup",h),c=document.createElement("div"),c.className="wax-latlngtooltip",this},e.remove=function(){return b.removeEvent(a.parent,"mousemove",i),b.removeEvent(a.parent,"mousedown",g),b.removeEvent(a.parent,"mouseup",h),this},e.add()},wax=wax||{},wax.mm=wax.mm||{},wax.mm.legend=function(a,b){b=b||{};var c,d={};return d.add=function(){return c=wax.legend().content(b.legend||""),this},d.content=function(a){a&&c.content(a.legend||"")},d.element=function(){return c.element()},d.appendTo=function(a){return wax.util.$(a).appendChild(c.element()),this},d.add()},wax=wax||{},wax.mm=wax.mm||{},wax.mm.mobile=function(a,b,c){function j(){return(Math.abs(window.orientation)==90?Math.max(480,screen.height):screen.width)/window.innerWidth}c=c||{};var d=com.modestmaps,e=navigator.userAgent.toLowerCase(),f=e.indexOf("webkit")!=-1,g=e.indexOf("mobile")!=-1,h=g&&f,i=function(a){var b=document.createElement("canvas"),c=parseInt(a.style.width,10),d=parseInt(a.style.height,10),e=c/2,f=d/2,g=Math.min(c,d)/4,h=b.getContext("2d");b.setAttribute("width",c),b.setAttribute("height",d),h.globalAlpha=.7;var i=h.createLinearGradient(0,0,300,225);i.addColorStop(0,"black"),i.addColorStop(1,"rgb(144, 144, 144)"),h.fillStyle=i,h.fillRect(0,0,c,d),h.beginPath(),h.arc(e-g*.3,f,g*1.3,g*1.3,Math.PI*2,!0),h.closePath(),h.fillStyle="rgb(100, 100, 100)",h.fill(),h.fillStyle="rgb(255, 255, 255)",h.lineWidth=5,h.beginPath(),h.moveTo(e-g*.8,f-g),h.lineTo(e-g*.8,f+g),h.lineTo(e+g*.8,f),h.fill(),a.appendChild(b)},k=function(a){a.style.position="absolute",a.style.height="50px",a.style.left=a.style.right="0";var b=document.createElement("canvas");b.setAttribute("width",a.offsetWidth),b.setAttribute("height",a.offsetHeight);var c=b.getContext("2d");c.globalAlpha=1,c.fillStyle="rgba(255, 255, 255, 0.5)",c.fillRect(0,0,a.offsetWidth,a.offsetHeight),c.fillStyle="rgb(0, 0, 0)",c.font="bold 20px sans-serif",c.fillText("back",20,30),a.appendChild(b)},l=function(a){a.style.position="absolute",a.style.width=a.style.height="auto",a.style.top=window.pageYOffset+"px",a.style.left=a.style.right="0px"},m=function(a){a.style.position="relative",a.style.width=a.style.height=a.style.top=a.style.left=a.style.right="auto"},n,o,p,q,r,s=c.overlayDraw||i,t=c.backDraw||k;bodyDraw=c.bodyDraw||function(){};var u={add:function(a){return h&&(q=document.createElement("meta"),q.id="wax-touch",q.setAttribute("name","viewport"),n=document.createElement("div"),n.id=a.parent.id+"-mobileoverlay",n.className="wax-mobileoverlay",n.style.position="absolute",n.style.width=a.dimensions.x+"px",n.style.height=a.dimensions.y+"px",a.parent.appendChild(n),s(n),p=document.createElement("div"),backDiv=document.createElement("div"),o=document.body,newBody=document.createElement("body"),newBody.className="wax-mobile-body",newBody.appendChild(backDiv),d.addEvent(n,"touchstart",this.toTouch),d.addEvent(backDiv,"touchstart",this.toPage)),this},toTouch:function(){a.parent.parentNode.replaceChild(p,a.parent),newBody.insertBefore(a.parent,backDiv),document.body=newBody,r=j(),document.head.appendChild(q),bodyDraw(newBody),t(backDiv),q.setAttribute("content","initial-scale=1.0,minimum-scale=0, maximum-scale=10"),a._smallSize=[a.parent.clientWidth,a.parent.clientHeight],l(a.parent),a.setSize(a.parent.offsetWidth,window.innerHeight),backDiv.style.display="block",n.style.display="none"},toPage:function(){document.body=o,q.setAttribute("content","user-scalable=yes, width=device-width,initial-scale="+r),p.parentNode.replaceChild(a.parent,p),m(a.parent),a.setSize(a._smallSize[0],a._smallSize[1]),backDiv.style.display="none",n.style.display="block"}};return u.add(a)},wax=wax||{},wax.mm=wax.mm||{},wax.mm.pointselector=function(a,b,c){function l(b){var c=wax.util.eventoffset(b),d=new h.Point(c.x,c.y),e={x:parseFloat(h.getStyle(document.documentElement,"margin-left")),y:parseFloat(h.getStyle(document.documentElement,"margin-top"))};isNaN(e.x)||(d.x-=e.x),isNaN(e.y)||(d.y-=e.y);for(var f=a.parent;f;f=f.offsetParent)d.x-=f.offsetLeft,d.y-=f.offsetTop;return d}function m(a){var b=[];for(var c=0;c<a.length;c++)b.push(new h.Location(a[c].lat,a[c].lon));return b}function n(){var b=new h.Point(0,0);for(var c=0;c<j.length;c++){var d=a.locationPoint(j[c]);j[c].pointDiv||(j[c].pointDiv=document.createElement("div"),j[c].pointDiv.className="wax-point-div",j[c].pointDiv.style.position="absolute",j[c].pointDiv.style.display="block",j[c].pointDiv.location=j[c],h.addEvent(j[c].pointDiv,"mouseup",function(b){var d=j[c];return function(b){h.removeEvent(a.parent,"mouseup",p),i.deleteLocation(d,b)}}()),a.parent.appendChild(j[c].pointDiv)),j[c].pointDiv.style.left=d.x+"px",j[c].pointDiv.style.top=d.y+"px"}}function o(b){d=l(b),h.addEvent(a.parent,"mouseup",p)}function p(b){if(!d)return;e=l(b),h.Point.distance(d,e)<f&&(i.addLocation(a.pointLocation(d)),k(m(j))),d=null}var d=null,e=null,f=5,g,h=com.modestmaps,i={},j=[],k=typeof c=="function"?c:c.callback;return i.addLocation=function(a){j.push(a),n(),k(m(j))},i.locations=function(a){return j},i.add=function(a){return h.addEvent(a.parent,"mousedown",o),a.addCallback("drawn",n),this},i.remove=function(a){h.removeEvent(a.parent,"mousedown",o),a.removeCallback("drawn",n);for(var b=j.length-1;b>-1;b--)i.deleteLocation(j[b]);return this},i.deleteLocation=function(a,b){if(!b||confirm("Delete this point?"))a.pointDiv.parentNode.removeChild(a.pointDiv),j.splice(wax.util.indexOf(j,a),1),k(m(j))},i.add(a)},wax=wax||{},wax.mm=wax.mm||{},wax.mm.zoombox=function(a){function g(b){var d=new c.Point(b.clientX,b.clientY);d.x+=document.body.scrollLeft+document.documentElement.scrollLeft,d.y+=document.body.scrollTop+document.documentElement.scrollTop;for(var e=a.parent;e;e=e.offsetParent)d.x-=e.offsetLeft,d.y-=e.offsetTop;return d}function h(b){if(!d)return;d=!1;var i=g(b),k=a.pointLocation(i),l=a.pointLocation(f);a.setExtent([k,l]),e.style.display="none",c.removeEvent(a.parent,"mousemove",j),c.removeEvent(a.parent,"mouseup",h),a.parent.style.cursor="auto"}function i(b){if(!b.shiftKey||!!this.drawing)return;return d=!0,f=g(b),e.style.left=f.x+"px",e.style.top=f.y+"px",c.addEvent(a.parent,"mousemove",j),c.addEvent(a.parent,"mouseup",h),a.parent.style.cursor="crosshair",c.cancelEvent(b)}function j(a){if(!d)return;var b=g(a);return e.style.display="block",b.x<f.x?e.style.left=b.x+"px":e.style.left=f.x+"px",e.style.width=Math.abs(b.x-f.x)+"px",b.y<f.y?e.style.top=b.y+"px":e.style.top=f.y+"px",e.style.height=Math.abs(b.y-f.y)+"px",c.cancelEvent(a)}var b={},c=com.modestmaps,d=!1,e,f=null;return b.add=function(a){return e=e||document.createElement("div"),e.id=a.parent.id+"-zoombox-box",e.className="zoombox-box",a.parent.appendChild(e),c.addEvent(a.parent,"mousedown",i),this},b.remove=function(){a.parent.removeChild(e),c.removeEvent(a.parent,"mousedown",i)},b.add(a)},wax=wax||{},wax.mm=wax.mm||{},wax.mm.zoomer=function(a){var b=com.modestmaps,c=document.createElement("a");c.innerHTML="+",c.href="#",c.className="zoomer zoomin",b.addEvent(c,"mousedown",function(a){b.cancelEvent(a)}),b.addEvent(c,"dblclick",function(a){b.cancelEvent(a)}),b.addEvent(c,"click",function(c){b.cancelEvent(c),a.zoomIn()},!1);var d=document.createElement("a");d.innerHTML="-",d.href="#",d.className="zoomer zoomout",b.addEvent(d,"mousedown",function(a){b.cancelEvent(a)}),b.addEvent(d,"dblclick",function(a){b.cancelEvent(a)}),b.addEvent(d,"click",function(c){b.cancelEvent(c),a.zoomOut()},!1);var e={add:function(a){return a.addCallback("drawn",function(a,b){a.coordinate.zoom===a.provider.outerLimits()[0].zoom?d.className="zoomer zoomout zoomdisabled":a.coordinate.zoom===a.provider.outerLimits()[1].zoom?c.className="zoomer zoomin zoomdisabled":(c.className="zoomer zoomin",d.className="zoomer zoomout")}),this},appendTo:function(a){return wax.util.$(a).appendChild(c),wax.util.$(a).appendChild(d),this}};return e.add(a)};var wax=wax||{};wax.mm=wax.mm||{},wax.mm.connector=function(a){this.options={tiles:a.tiles,scheme:a.scheme||"xyz",minzoom:a.minzoom||0,maxzoom:a.maxzoom||22,bounds:a.bounds||[-180,-90,180,90]}},wax.mm.connector.prototype={outerLimits:function(){return[this.locationCoordinate(new com.modestmaps.Location(this.options.bounds[0],this.options.bounds[1])).zoomTo(this.options.minzoom),this.locationCoordinate(new com.modestmaps.Location(this.options.bounds[2],this.options.bounds[3])).zoomTo(this.options.maxzoom)]},getTileUrl:function(a){return(coord=this.sourceCoordinate(a))?(coord.row=this.options.scheme==="tms"?Math.pow(2,coord.zoom)-coord.row-1:coord.row,this.options.tiles[parseInt(Math.pow(2,coord.zoom)*coord.row+coord.column,10)%this.options.tiles.length].replace("{z}",coord.zoom.toFixed(0)).replace("{x}",coord.column.toFixed(0)).replace("{y}",coord.row.toFixed(0))):null}},com&&com.modestmaps&&com.modestmaps.extend(wax.mm.connector,com.modestmaps.MapProvider) | ||
*/!function(context,win){function serial(a){var b=a.name;if(a.disabled||!b)return"";b=enc(b);switch(a.tagName.toLowerCase()){case"input":switch(a.type){case"reset":case"button":case"image":case"file":return"";case"checkbox":case"radio":return a.checked?b+"="+(a.value?enc(a.value):!0)+"&":"";default:return b+"="+(a.value?enc(a.value):"")+"&"}break;case"textarea":return b+"="+enc(a.value)+"&";case"select":return b+"="+enc(a.options[a.selectedIndex].value)+"&"}return""}function enc(a){return encodeURIComponent(a)}function reqwest(a,b){return new Reqwest(a,b)}function init(o,fn){function error(a){o.error&&o.error(a),complete(a)}function success(resp){o.timeout&&clearTimeout(self.timeout)&&(self.timeout=null);var r=resp.responseText;if(r)switch(type){case"json":resp=win.JSON?win.JSON.parse(r):eval("("+r+")");break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function complete(a){o.complete&&o.complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort(),error()},o.timeout)),this.request=getRequest(o,success,error)}function setType(a){return/\.json$/.test(a)?"json":/\.jsonp$/.test(a)?"jsonp":/\.js$/.test(a)?"js":/\.html?$/.test(a)?"html":/\.xml$/.test(a)?"xml":"js"}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function getRequest(a,b,c){if(a.type!="jsonp"){var d=xhr();return d.open(a.method||"GET",typeof a=="string"?a:a.url,!0),setHeaders(d,a),d.onreadystatechange=handleReadyState(d,b,c),a.before&&a.before(d),d.send(a.data||null),d}var e=doc.createElement("script"),f=0;win[getCallbackName(a)]=generalCallback,e.type="text/javascript",e.src=a.url,e.async=!0,e.onload=e.onreadystatechange=function(){if(e[readyState]&&e[readyState]!=="complete"&&e[readyState]!=="loaded"||f)return!1;e.onload=e.onreadystatechange=null,a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(e),f=1},head.appendChild(e)}function generalCallback(a){lastValue=a}function getCallbackName(a){var b=a.jsonpCallback||"callback";if(a.url.slice(-(b.length+2))==b+"=?"){var c="reqwest_"+uniqid++;return a.url=a.url.substr(0,a.url.length-1)+c,c}var d=new RegExp(b+"=([\\w]+)");return a.url.match(d)[1]}function setHeaders(a,b){var c=b.headers||{};c.Accept=c.Accept||"text/javascript, text/html, application/xml, text/xml, */*",b.crossOrigin||(c["X-Requested-With"]=c["X-Requested-With"]||"XMLHttpRequest"),c[contentType]=c[contentType]||"application/x-www-form-urlencoded";for(var d in c)c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d],!1)}function handleReadyState(a,b,c){return function(){a&&a[readyState]==4&&(twoHundo.test(a.status)?b(a):c(a))}}var twoHundo=/^20\d$/,doc=document,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",head=doc[byTag]("head")[0],uniqid=0,lastValue,xhr="XMLHttpRequest"in win?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serialize=function(a){var b=[a[byTag]("input"),a[byTag]("select"),a[byTag]("textarea")],c=[],d,e;for(d=0,l=b.length;d<l;++d)for(e=0,l2=b[d].length;e<l2;++e)c.push(serial(b[d][e]));return c.join("").replace(/&$/,"")},reqwest.serializeArray=function(a){for(var b=this.serialize(a).split("&"),c=0,d=b.length,e=[],f;c<d;c++)b[c]&&(f=b[c].split("="))&&e.push({name:f[0],value:f[1]});return e};var old=context.reqwest;reqwest.noConflict=function(){return context.reqwest=old,this},typeof module!="undefined"?module.exports=reqwest:context.reqwest=reqwest}(this,window);var html4={};html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10},html4.ATTRIBS={"*::class":9,"*::dir":0,"*::id":4,"*::lang":0,"*::onclick":2,"*::ondblclick":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::style":3,"*::title":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::rel":0,"a::rev":0,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"del::cite":1,"del::datetime":0,"dir::compact":0,"div::align":0,"dl::compact":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::ismap":0,"input::maxlength":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::readonly":0,"input::size":0,"input::src":1,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"ol::compact":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"p::align":0,"pre::width":0,"q::cite":1,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::size":0,"select::tabindex":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::cols":0,"textarea::disabled":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::readonly":0,"textarea::rows":0,"textarea::tabindex":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"ul::compact":0,"ul::type":0},html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128},html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:16,area:2,b:0,base:18,basefont:18,bdo:0,big:0,blockquote:0,body:49,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,dd:1,del:0,dfn:0,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,font:0,form:0,frame:18,frameset:16,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:49,hr:2,html:49,i:0,iframe:4,img:2,input:2,ins:0,isindex:18,kbd:0,label:0,legend:0,li:1,link:18,map:0,menu:0,meta:18,nobr:0,noembed:4,noframes:20,noscript:20,object:16,ol:0,optgroup:0,option:1,p:1,param:18,pre:0,q:0,s:0,samp:0,script:84,select:0,small:0,span:0,strike:0,strong:0,style:148,sub:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,title:24,tr:1,tt:0,u:0,ul:0,"var":0},html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2},html4.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"body::background":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0},html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0},html4.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"body::background":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2};var html=function(a){function g(a){a=b(a);if(c.hasOwnProperty(a))return c[a];var d=a.match(e);return d?String.fromCharCode(parseInt(d[1],10)):(d=a.match(f))?String.fromCharCode(parseInt(d[1],16)):""}function h(a,b){return g(b)}function j(a){return a.replace(i,"")}function l(a){return a.replace(k,h)}function s(a){return a.replace(m,"&").replace(o,"<").replace(p,">").replace(q,""").replace(r,"=")}function t(a){return a.replace(n,"&$1").replace(o,"<").replace(p,">")}function w(c){return function d(d,e){d=String(d);var f=null,g=!1,h=[],i=void 0,k=void 0,m=void 0;c.startDoc&&c.startDoc(e);while(d){var n=d.match(g?u:v);d=d.substring(n[0].length);if(g){if(n[1]){var o=b(n[1]),p;if(n[2]){var q=n[3];switch(q.charCodeAt(0)){case 34:case 39:q=q.substring(1,q.length-1)}p=l(j(q))}else p=o;h.push(o,p)}else if(n[4]){k!==void 0&&(m?c.startTag&&c.startTag(i,h,e):c.endTag&&c.endTag(i,e));if(m&&k&(a.eflags.CDATA|a.eflags.RCDATA)){f===null?f=b(d):f=f.substring(f.length-d.length);var r=f.indexOf("</"+i);r<0&&(r=d.length),r&&(k&a.eflags.CDATA?c.cdata&&c.cdata(d.substring(0,r),e):c.rcdata&&c.rcdata(t(d.substring(0,r)),e),d=d.substring(r))}i=k=m=void 0,h.length=0,g=!1}}else if(n[1])c.pcdata&&c.pcdata(n[0],e);else if(n[3])m=!n[2],g=!0,i=b(n[3]),k=a.ELEMENTS.hasOwnProperty(i)?a.ELEMENTS[i]:void 0;else if(n[4])c.pcdata&&c.pcdata(n[4],e);else if(n[5]&&c.pcdata){var s=n[5];c.pcdata(s==="<"?"<":s===">"?">":"&",e)}}c.endDoc&&c.endDoc(e)}}function x(b){var c,d;return w({startDoc:function(a){c=[],d=!1},startTag:function(e,f,g){if(d)return;if(!a.ELEMENTS.hasOwnProperty(e))return;var h=a.ELEMENTS[e];if(h&a.eflags.FOLDABLE)return;if(h&a.eflags.UNSAFE){d=!(h&a.eflags.EMPTY);return}f=b(e,f);if(f){h&a.eflags.EMPTY||c.push(e),g.push("<",e);for(var i=0,j=f.length;i<j;i+=2){var k=f[i],l=f[i+1];l!==null&&l!==void 0&&g.push(" ",k,'="',s(l),'"')}g.push(">")}},endTag:function(b,e){if(d){d=!1;return}if(!a.ELEMENTS.hasOwnProperty(b))return;var f=a.ELEMENTS[b];if(!(f&(a.eflags.UNSAFE|a.eflags.EMPTY|a.eflags.FOLDABLE))){var g;if(f&a.eflags.OPTIONAL_ENDTAG)for(g=c.length;--g>=0;){var h=c[g];if(h===b)break;if(!(a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG))return}else for(g=c.length;--g>=0;)if(c[g]===b)break;if(g<0)return;for(var i=c.length;--i>g;){var h=c[i];a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG||e.push("</",h,">")}c.length=g,e.push("</",b,">")}},pcdata:function(a,b){d||b.push(a)},rcdata:function(a,b){d||b.push(a)},cdata:function(a,b){d||b.push(a)},endDoc:function(a){for(var b=c.length;--b>=0;)a.push("</",c[b],">");c.length=0}})}function z(b,c,e){var f=[];return x(function g(b,f){for(var g=0;g<f.length;g+=2){var h=f[g],i=f[g+1],j=null,k;if((k=b+"::"+h,a.ATTRIBS.hasOwnProperty(k))||(k="*::"+h,a.ATTRIBS.hasOwnProperty(k)))j=a.ATTRIBS[k];if(j!==null)switch(j){case a.atype.NONE:break;case a.atype.SCRIPT:case a.atype.STYLE:i=null;break;case a.atype.ID:case a.atype.IDREF:case a.atype.IDREFS:case a.atype.GLOBAL_NAME:case a.atype.LOCAL_NAME:case a.atype.CLASSES:i=e?e(i):i;break;case a.atype.URI:var l=(""+i).match(y);l?!l[1]||d.test(l[1])?i=c&&c(i):i=null:i=null;break;case a.atype.URI_FRAGMENT:i&&"#"===i.charAt(0)?(i=e?e(i):i,i&&(i="#"+i)):i=null;break;default:i=null}else i=null;f[g+1]=i}return f})(b,f),f.join("")}var b;"script"==="SCRIPT".toLowerCase()?b=function(a){return a.toLowerCase()}:b=function(a){return a.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)|32)})};var c={lt:"<",gt:">",amp:"&",nbsp:" ",quot:'"',apos:"'"},d=/^(?:https?|mailto|data)$/i,e=/^#(\d+)$/,f=/^#x([0-9A-Fa-f]+)$/,i=/\0/g,k=/&(#\d+|#x[0-9A-Fa-f]+|\w+);/g,m=/&/g,n=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,o=/</g,p=/>/g,q=/\"/g,r=/\=/g,u=new RegExp("^\\s*(?:(?:([a-z][a-z-]*)(\\s*=\\s*(\"[^\"]*\"|'[^']*'|(?=[a-z][a-z-]*\\s*=)|[^>\"'\\s]*))?)|(/?>)|[\\s\\S][^a-z\\s>]*)","i"),v=new RegExp("^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);|<!--[\\s\\S]*?-->|<!\\w[^>]*>|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))","i"),y=new RegExp("^(?:([^:/?#]+):)?");return{escapeAttrib:s,makeHtmlSanitizer:x,makeSaxParser:w,normalizeRCData:t,sanitize:z,unescapeEntities:l}}(html4),html_sanitize=html.sanitize;typeof window!="undefined"&&(window.html=html,window.html_sanitize=html_sanitize),html4.ATTRIBS["*::style"]=0,html4.ELEMENTS.style=0;var Mustache=function(){var a={},b=function(){};return b.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(a,b,c,d){d||(this.context=b,this.buffer=[]);if(!this.includes("",a)){if(d)return a;this.send(a);return}a=this.render_pragmas(a);var e=this.render_section(a,b,c);e===!1&&(e=this.render_tags(a,b,c,d));if(d)return e;this.sendLines(e)},send:function(a){a!==""&&this.buffer.push(a)},sendLines:function(a){if(a){var b=a.split("\n");for(var c=0;c<b.length;c++)this.send(b[c])}},render_pragmas:function(a){if(!this.includes("%",a))return a;var b=this,c=this.getCachedRegex("render_pragmas",function(a,b){return new RegExp(a+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+b,"g")});return a.replace(c,function(a,c,d){if(!b.pragmas_implemented[c])throw{message:"This implementation of mustache doesn't understand the '"+c+"' pragma"};b.pragmas[c]={};if(d){var e=d.split("=");b.pragmas[c][e[0]]=e[1]}return""})},render_partial:function(a,b,c){a=this.trim(a);if(!c||c[a]===undefined)throw{message:"unknown_partial '"+a+"'"};return typeof b[a]!="object"?this.render(c[a],b,c,!0):this.render(c[a],b[a],c,!0)},render_section:function(a,b,c){if(!this.includes("#",a)&&!this.includes("^",a))return!1;var d=this,e=this.getCachedRegex("render_section",function(a,b){return new RegExp("^([\\s\\S]*?)"+a+"(\\^|\\#)\\s*(.+)\\s*"+b+"\n*([\\s\\S]*?)"+a+"\\/\\s*\\3\\s*"+b+"\\s*([\\s\\S]*)$","g")});return a.replace(e,function(a,e,f,g,h,i){var j=e?d.render_tags(e,b,c,!0):"",k=i?d.render(i,b,c,!0):"",l,m=d.find(g,b);return f==="^"?!m||d.is_array(m)&&m.length===0?l=d.render(h,b,c,!0):l="":f==="#"&&(d.is_array(m)?l=d.map(m,function(a){return d.render(h,d.create_context(a),c,!0)}).join(""):d.is_object(m)?l=d.render(h,d.create_context(m),c,!0):typeof m=="function"?l=m.call(b,h,function(a){return d.render(a,b,c,!0)}):m?l=d.render(h,b,c,!0):l=""),j+l+k})},render_tags:function(a,b,c,d){var e=this,f=function(){return e.getCachedRegex("render_tags",function(a,b){return new RegExp(a+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+b+"+","g")})},g=f(),h=function(a,d,h){switch(d){case"!":return"";case"=":return e.set_delimiters(h),g=f(),"";case">":return e.render_partial(h,b,c);case"{":return e.find(h,b);default:return e.escape(e.find(h,b))}},i=a.split("\n");for(var j=0;j<i.length;j++)i[j]=i[j].replace(g,h,this),d||this.send(i[j]);if(d)return i.join("\n")},set_delimiters:function(a){var b=a.split(" ");this.otag=this.escape_regex(b[0]),this.ctag=this.escape_regex(b[1])},escape_regex:function(a){if(!arguments.callee.sRE){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+b.join("|\\")+")","g")}return a.replace(arguments.callee.sRE,"\\$1")},find:function(a,b){function c(a){return a===!1||a===0||a}a=this.trim(a);var d;return c(b[a])?d=b[a]:c(this.context[a])&&(d=this.context[a]),typeof d=="function"?d.apply(b):d!==undefined?d:""},includes:function(a,b){return b.indexOf(this.otag+a)!=-1},escape:function(a){return a=String(a===null?"":a),a.replace(/&(?!\w+;)|["'<>\\]/g,function(a){switch(a){case"&":return"&";case'"':return""";case"'":return"'";case"<":return"<";case">":return">";default:return a}})},create_context:function(a){if(this.is_object(a))return a;var b=".";this.pragmas["IMPLICIT-ITERATOR"]&&(b=this.pragmas["IMPLICIT-ITERATOR"].iterator);var c={};return c[b]=a,c},is_object:function(a){return a&&typeof a=="object"},is_array:function(a){return Object.prototype.toString.call(a)==="[object Array]"},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},map:function(a,b){if(typeof a.map=="function")return a.map(b);var c=[],d=a.length;for(var e=0;e<d;e++)c.push(b(a[e]));return c},getCachedRegex:function(b,c){var d=a[this.otag];d||(d=a[this.otag]={});var e=d[this.ctag];e||(e=d[this.ctag]={});var f=e[b];return f||(f=e[b]=c(this.otag,this.ctag)),f}},{name:"mustache.js",version:"0.4.0-dev",to_html:function(a,c,d,e){var f=new b;e&&(f.send=e),f.render(a,c||{},d);if(!e)return f.buffer.join("\n")}}}();wax=wax||{},wax.attribution=function(){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var a,b={};return b.set=function(b){if(typeof b=="undefined")return;return a.innerHTML=html_sanitize(b,c,d),this},b.element=function(){return a},b.init=function(){return a=document.createElement("div"),a.className="wax-attribution",this},b.init()},wax=wax||{},wax.bwdetect=function(a,b){function h(){wax.bw=-1;var a=new Image;a.src=e;var b=!0,f=setTimeout(function(){b&&wax.bw==-1&&(c.bw(0),b=!1)},d);a.onload=function(){b&&wax.bw==-1&&(clearTimeout(f),c.bw(1),b=!1)}}var c={},d=a.threshold||400,e="http://a.tiles.mapbox.com/mapbox/1.0.0/blue-marble-topo-bathy-jul/0/0/0.png?preventcache="+ +(new Date),f=1,g=a.auto===undefined?!0:a.auto;return c.bw=function(a){if(!arguments.length)return f;var c=f;wax.bwlisteners&&wax.bwlisteners.length&&function(){listeners=wax.bwlisteners,wax.bwlisteners=[];for(i=0;i<listeners;i++)listeners[i](a)}(),wax.bw=a,f!=(f=a)&&b(a)},c.add=function(){return g&&h(),this},wax.bw==-1?(wax.bwlisteners=wax.bwlisteners||[],wax.bwlisteners.push(c.bw)):wax.bw!==undefined?c.bw(wax.bw):c.add(),c},wax.formatter=function(x){function urlX(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function idX(a){return a}var formatter={},f;if(x&&typeof x=="string")try{eval("f = "+x)}catch(e){console&&console.log(e)}else x&&typeof x=="function"?f=x:f=function(){};return formatter.format=function(a,b){try{return html_sanitize(f(a,b),urlX,idX)}catch(c){console&&console.log(c)}},formatter},wax.GridInstance=function(a,b,c){function g(a){return a>=93&&a--,a>=35&&a--,a-=32,a}c=c||{};var d={},e=c.resolution||4,f=c.tileSize||256;return d.grid_tile=function(){return a},d.getKey=function(b,c){if(!a||!a.grid)return;if(c<0||b<0)return;if(Math.floor(c)>=f||Math.floor(b)>=f)return;return g(a.grid[Math.floor(c/e)].charCodeAt(Math.floor(b/e)))},d.gridFeature=function(b,c){var d=this.getKey(b,c),e=a.keys;if(e&&e[d]&&a.data[e[d]])return a.data[e[d]]},d.tileFeature=function(c,d,e,f){if(!a)return;var g=wax.util.offset(e);feature=this.gridFeature(c-g.left,d-g.top);if(feature)return b.format(f,feature)},d},wax.GridManager=function(a){function h(a){return typeof a=="string"&&(a=[a]),function b(b){if(!b)return;var c=new RegExp("/(\\d+)\\/(\\d+)\\/(\\d+)\\.[\\w\\._]+"),d=c.exec(b);if(!d)return;return a[parseInt(d[2],10)%a.length].replace("{z}",d[1]).replace("{x}",d[2]).replace("{y}",d[3])}}a=a||{};var b=a.resolution||4,c=a.version||"1.1",d={},e={},f,g=function(a){return a.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json")};return e.formatter=function(a){return arguments.length?(f=wax.formatter(a),e):f},e.template=function(a){return arguments.length?(f=wax.template(a),e):f},e.gridUrl=function(a){return arguments.length?(g=typeof a=="function"?a:h(a),e):g},e.getGrid=function(a,c){var d=g(a);return!f||!d?c(null,null):(wax.request.get(d,function(a,d){if(a)return c(a,null);c(null,wax.GridInstance(d,f,{resolution:b||4}))}),e)},e.add=function(a){return a.template?e.template(a.template):a.formatter&&e.formatter(a.formatter),a.grids&&e.gridUrl(a.grids),this},e.add(a)},wax=wax||{},wax.hash=function(a){function b(){return location.hash.substring(1)}function c(a){location.hash="#"+a}function g(b){var c=b.split("/");for(var d=0;d<c.length;d++){c[d]=Number(c[d]);if(isNaN(c[d]))return!0}if(c.length<3)return!0;c.length==3&&a.setCenterZoom(c)}function h(){var b=a.getCenterZoom();d!==b&&(d=b,c(d))}function i(a){if(a===d)return;g(d=a)&&h()}a=a||{};var d,e={},f=90-1e-8,j=wax.util.throttle(h,500);return e.add=function(){return i(b()),a.bindChange(j),this},e.remove=function(){return a.unbindChange(j),this},e.add()};var wax=wax||{};wax.legend=function(){function d(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function e(a){return a}var a,b={},c;return b.element=function(){return c},b.content=function(b){return arguments.length?(b?(a.innerHTML=html_sanitize(b,d,e),a.style.display="block"):(a.innerHTML="",a.style.display="none"),this):a.innerHTML},b.add=function(){return c=document.createElement("div"),c.className="wax-legends",a=document.createElement("div"),a.className="wax-legend",a.style.display="none",c.appendChild(a),this},b.add()};var w=function(a){return a.melt=function(b,c){return b.apply(c,[a,c])},a},wax=wax||{};wax.movetip={},wax.movetip=function(a){function g(a){return a&&a.className.indexOf("wax-popup")!==-1}function h(a,b){var c=document.createElement("div");return c.className="wax-movetip",c.style.cssText="position:absolute;",c.innerHTML=a,b.appendChild(c),d=b,_tooltipOffset=wax.util.offset(c),_contextOffset=wax.util.offset(d),c}function i(a){if(!c)return;var b=wax.util.eventoffset(a);c.className="wax-movetip",_tooltipOffset.height+b.y>_contextOffset.top+_contextOffset.height&&_contextOffset.height>_tooltipOffset.height&&(b.y-=_tooltipOffset.height,c.className+=" flip-y"),_tooltipOffset.width+b.x>_contextOffset.left+_contextOffset.width&&(b.x-=_tooltipOffset.width,c.className+=" flip-x"),c.style.left=b.x+"px",c.style.top=b.y+"px"}function j(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&e?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&e&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+e):a.parentNode&&a.parentNode.removeChild(a)}function k(a,b){c&&(j(c),c=undefined);var d=h(a,b);d.className+=" wax-popup",d.innerHTML=a;var e=document.createElement("a");e.href="#close",e.className="close",e.innerHTML="Close",d.appendChild(e);var f=function(a){return j(d),c=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1};e.addEventListener?e.addEventListener("click",f,!1):e.attachEvent&&e.attachEvent("onclick",f),c=d}a=a||{};var b={},c=undefined,d=undefined,e=a.animationOut,f=a.animationIn;return b.over=function(a,b,d){if(!a)return;b.style.cursor="pointer";if(g(c))return;c=h(a,b),i(d),b.addEventListener&&b.addEventListener("mousemove",i)},b.out=function(a){a.style.cursor="default";if(g(c))return;c&&(j(c),a.removeEventListener&&a.removeEventListener("mousemove",i),c=undefined)},b};var wax=wax||{};wax.request={cache:{},locks:{},promises:{},get:function(a,b){if(this.cache[a])return b(this.cache[a][0],this.cache[a][1]);this.promises[a]=this.promises[a]||[],this.promises[a].push(b);if(this.locks[a])return;var c=this;this.locks[a]=!0,reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(b){c.locks[a]=!1,c.cache[a]=[null,b];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])},error:function(b){c.locks[a]=!1,c.cache[a]=[b,null];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])}})}},wax.template=function(a){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var b={};return b.format=function(b,e){var f={};for(var g in e)f[g]=e[g];return b.format&&(f["__"+b.format+"__"]=!0),html_sanitize(Mustache.to_html(a,f),c,d)},b};if(!wax)var wax={};wax.tilejson=function(a,b){reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:b,error:b})};var wax=wax||{};wax.tooltip={},wax.tooltip=function(a){this._currentTooltip=undefined,a=a||{},a.animationOut&&(this.animationOut=a.animationOut),a.animationIn&&(this.animationIn=a.animationIn)},wax.tooltip.prototype.isPopup=function(a){return a&&a.className.indexOf("wax-popup")!==-1},wax.tooltip.prototype.getTooltip=function(a,b){var c=document.createElement("div");return c.className="wax-tooltip wax-tooltip-0",c.innerHTML=a,b.appendChild(c),c},wax.tooltip.prototype.hideTooltip=function(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&this.animationOut?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&this.animationOut&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+this.animationOut):a.parentNode&&a.parentNode.removeChild(a)},wax.tooltip.prototype.click=function(a,b){this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined);var c=this.getTooltip(a,b);c.className+=" wax-popup",c.innerHTML=a;var d=document.createElement("a");d.href="#close",d.className="close",d.innerHTML="Close",c.appendChild(d);var e=wax.util.bind(function(a){return this.hideTooltip(c),this._currentTooltip=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1},this);d.addEventListener?(d.addEventListener("click",e,!1),d.addEventListener("touchend",e,!1)):d.attachEvent&&d.attachEvent("onclick",e),this._currentTooltip=c},wax.tooltip.prototype.over=function(a,b){if(!a)return;b.style.cursor="pointer";if(this.isPopup(this._currentTooltip))return;this._currentTooltip=this.getTooltip(a,b)},wax.tooltip.prototype.out=function(a){a.style.cursor="default";if(this.isPopup(this._currentTooltip))return;this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined)};var wax=wax||{};wax.util=wax.util||{},wax.util={offset:function(a){var b=a.offsetWidth||parseInt(a.style.width,10),c=a.offsetHeight||parseInt(a.style.height,10),d=document.body,e=0,f=0,g=function(a){if(a===d||a===document.documentElement)return;e+=a.offsetTop,f+=a.offsetLeft;var b=a.style.transform||a.style.WebkitTransform||a.style.OTransform||a.style.MozTransform||a.style.msTransform;if(b)if(match=b.match(/translate\((.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/translate3d\((.+)px, (.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/matrix3d\(([\-\d,\s]+)\)/)){var c=match[1].split(",");e+=parseInt(c[13],10),f+=parseInt(c[12],10)}else if(match=b.match(/matrix\(.+, .+, .+, .+, (.+), (.+)\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10)};g(a);try{while(a=a.offsetParent)g(a)}catch(h){}e+=d.offsetTop,f+=d.offsetLeft,e+=d.parentNode.offsetTop,f+=d.parentNode.offsetLeft;var i=document.defaultView?window.getComputedStyle(d.parentNode,null):d.parentNode.currentStyle;return d.parentNode.offsetTop!==parseInt(i.marginTop,10)&&!isNaN(parseInt(i.marginTop,10))&&(e+=parseInt(i.marginTop,10),f+=parseInt(i.marginLeft,10)),{top:e,left:f,height:c,width:b}},$:function(a){return typeof a=="string"?document.getElementById(a):a},bind:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,c.concat(Array.prototype.slice.call(arguments)))}},isString:function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)},indexOf:function(a,b){var c=Array.prototype.indexOf;if(a===null)return-1;var d,e;if(c&&a.indexOf===c)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(a[d]===b)return d;return-1},isArray:Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},keys:Object.keys||function(a){var b=Object.prototype.hasOwnProperty;if(a!==Object(a))throw new TypeError("Invalid object");var c=[];for(var d in a)b.call(a,d)&&(c[c.length]=d);return c},eventoffset:function(a){var b=0,c=0;if(!a)var a=window.event;if(a.pageX||a.pageY)return{x:a.pageX,y:a.pageY};if(a.clientX||a.clientY){var d=document.documentElement,e=document.body,f=document.body.parentNode.currentStyle,g=parseInt(f.marginTop,10)||0,h=parseInt(f.marginLeft,10)||0;return{x:a.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0)+h,y:a.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)+g}}if(a.touches&&a.touches.length===1)return{x:a.touches[0].pageX,y:a.touches[0].pageY}},limit:function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d);if(c||!d)d=setTimeout(g,b)}},throttle:function(a,b){return this.limit(a,b,!1)}},wax=wax||{},wax.mm=wax.mm||{},wax.mm.attribution=function(a,b){b=b||{};var c,d={};return d.element=function(){return c.element()},d.appendTo=function(a){return wax.util.$(a).appendChild(c.element()),this},d.init=function(){return c=wax.attribution(),c.set(b.attribution),c.element().className="wax-attribution wax-mm",this},d.init()},wax=wax||{},wax.mm=wax.mm||{},wax.mm.boxselector=function(a,b,c){function l(b){var c=new e.Point(b.clientX,b.clientY);c.x+=document.body.scrollLeft+document.documentElement.scrollLeft,c.y+=document.body.scrollTop+document.documentElement.scrollTop;for(var d=a.parent;d;d=d.offsetParent)c.x-=d.offsetLeft,c.y-=d.offsetTop;return c}function m(b){if(!b.shiftKey)return;return d=l(b),g.style.left=d.x+"px",g.style.top=d.y+"px",h(a.parent,"mousemove",n),h(a.parent,"mouseup",o),a.parent.style.cursor="crosshair",e.cancelEvent(b)}function n(a){var b=l(a),c=g.style;return c.display="block",b.x<d.x?c.left=b.x+"px":c.left=d.x+"px",b.y<d.y?c.top=b.y+"px":c.top=d.y+"px",c.width=Math.abs(b.x-d.x)+"px",c.height=Math.abs(b.y-d.y)+"px",e.cancelEvent(a)}function o(b){var c=l(b),f=a.pointLocation(c),g=a.pointLocation(d);k.extent([new e.Location(Math.max(f.lat,g.lat),Math.min(f.lon,g.lon)),new e.Location(Math.min(f.lat,g.lat),Math.max(f.lon,g.lon))]),i(a.parent,"mousemove",n),i(a.parent,"mouseup",o),a.parent.style.cursor="auto"}function p(a,b){if(!g||!j)return;var c=a.locationPoint(j[1]),d=a.locationPoint(j[0]),e=g.style;e.display="block",e.height="auto",e.width="auto",e.left=Math.max(0,d.x)+"px",e.top=Math.max(0,d.y)+"px",e.right=Math.max(0,a.dimensions.x-c.x)+"px",e.bottom=Math.max(0,a.dimensions.y-c.y)+"px"}var d=null,e=com.modestmaps,f=typeof c=="function"?c:c.callback,g,h=e.addEvent,i=e.removeEvent,j,k={};return k.extent=function(b,c){if(!b)return j;j=[new e.Location(Math.max(b[0].lat,b[1].lat),Math.min(b[0].lon,b[1].lon)),new e.Location(Math.min(b[0].lat,b[1].lat),Math.max(b[0].lon,b[1].lon))],p(a),c||f(j)},k.add=function(a){return g=g||document.createElement("div"),g.id=a.parent.id+"-boxselector-box",g.className="boxselector-box",a.parent.appendChild(g),h(a.parent,"mousedown",m),a.addCallback("drawn",p),this},k.remove=function(){a.parent.removeChild(g),i(a.parent,"mousedown",m),a.removeCallback("drawn",p)},k.add(a)},wax=wax||{},wax.mm=wax.mm||{},wax.mm.bwdetect=function(a,b){function g(b){(!b.options||!b.options.scheme)&&e.Map.prototype.setProvider.call(a,b);var g=[[".png",".jpg"],[c,d]];f&&g.reverse();for(var h=0;h<b.options.tiles.length;h++)b.options.tiles[h]=b.options.tiles[h].replace(g[0][0],g[1][0]).replace(g[0][1],g[1][1]);e.Map.prototype.setProvider.call(a,b)}b=b||{};var c=b.png||".png128",d=b.jpg||".jpg70",e=com.modestmaps,f=1;return a.setProvider=g,wax.bwdetect(b,function(b){f=b,g(a.provider)})},wax=wax||{},wax.mm=wax.mm||{},wax.mm.fullscreen=function(a){function g(a){a&&com.modestmaps.cancelEvent(a),b?c.original():c.full()}var b=!1,c={},d,e=document.body,f;return c.add=function(a){return d=document.createElement("a"),d.className="wax-fullscreen",d.href="#fullscreen",d.innerHTML="fullscreen",com.modestmaps.addEvent(d,"click",g),this},c.full=function(){if(b)return;b=!0,f=[a.parent.offsetWidth,a.parent.offsetHeight],a.parent.className+=" wax-fullscreen-map",e.className+=" wax-fullscreen-view",a.setSize(a.parent.offsetWidth,a.parent.offsetHeight)},c.original=function(){if(!b)return; | ||
b=!1,a.parent.className=a.parent.className.replace(" wax-fullscreen-map",""),e.className=e.className.replace(" wax-fullscreen-view",""),a.setSize(f[0],f[1])},c.appendTo=function(a){return wax.util.$(a).appendChild(d),this},c.add(a)},wax=wax||{},wax.mm=wax.mm||{},wax.mm.hash=function(a){return wax.hash({getCenterZoom:function(){var b=a.getCenter(),c=a.getZoom(),d=Math.max(0,Math.ceil(Math.log(c)/Math.LN2));return[c.toFixed(2),b.lat.toFixed(d),b.lon.toFixed(d)].join("/")},setCenterZoom:function b(b){a.setCenterZoom(new com.modestmaps.Location(b[1],b[2]),b[0])},bindChange:function(b){a.addCallback("drawn",b)},unbindChange:function(b){a.removeCallback("drawn",b)}})},wax=wax||{},wax.mm=wax.mm||{},wax.mm.interaction=function(a,b,c){function u(){var b=a.createOrGetLayer(Math.round(a.getZoom()));return s||(s=function(a){var c=[];for(var d in a)if(a[d].parentNode===b){var e=wax.util.offset(a[d]);c.push([e.top,e.left,a[d]])}return c}(a.tiles))}function v(a,b){s=null}function w(a){for(var b=0,c=u();b<c.length;b++)if(c[b][0]<a.y&&c[b][0]+256>a.y&&c[b][1]<a.x&&c[b][1]+256>a.x)return c[b][2];return!1}function x(){return n?(window.clearTimeout(n),n=null,!0):!1}function y(b){if(m)return;var c=b.target||b.srcElement;if(c.className!=="map-tile-loaded")return;var d=i(b),g=w(d),h;g&&e.getGrid(g.src,function(c,e){if(c||!e)return;h=e.tileFeature(d.x,d.y,g,{format:"teaser"}),h?h&&p!==h?(p=h,f.out(a.parent),f.over(h,a.parent,b)):h||(p=null,f.out(a.parent)):(p=null,f.out(a.parent))})}function z(b){var c=b.target||b.srcElement;if(c.className!=="map-tile-loaded")return;if(x())return;m=!0,q=i(b),b.type==="mousedown"?j(document.body,"mouseup",B):b.type==="touchstart"&&b.touches.length===1&&(g=["full","teaser"],f._currentTooltip&&f.hideTooltip(f._currentTooltip),j(a.parent,"touchend",B),j(a.parent,"touchmove",A),j(a.parent,"touchcancel",A))}function A(){k(a.parent,"touchend",B),k(a.parent,"touchmove",B),k(a.parent,"touchcancel",A),m=!1}function B(b){var c={},d=i(b);m=!1;for(var e in b)c[e]=b[e];return k(document.body,"mouseup",B),o&&(k(a.parent,"touchend",B),k(a.parent,"touchmove",A),k(a.parent,"touchcancel",A)),b.type==="touchend"?C(b,q):Math.round(d.y/r)===Math.round(q.y/r)&&Math.round(d.x/r)===Math.round(q.x/r)&&(n=window.setTimeout(function(){n=null,C(c,d)},300)),B}function C(b,c){var d=w(c),i;d&&e.getGrid(d.src,function(e,j){for(var k=0;j&&k<g.length;k++){i=j.tileFeature(c.x,c.y,d,{format:g[k]});if(i)switch(g[k]){case"full":case"teaser":return f.click(i,a.parent,b);case"location":return h(i)}}})}c=c||{},b=b||{};var d=com.modestmaps,e=wax.GridManager(b),f=c.callbacks||new wax.tooltip(c),g=c.clickAction||["full","location"],h=c.clickHandler||function(a){window.top.location=a},i=wax.util.eventoffset,j=d.addEvent,k=d.removeEvent,l={},m=!1,n=!1,o="ontouchstart"in document.documentElement,p,q,r=4,s,t=["zoomed","panned","centered","extentset","resized","drawn"];return l.add=function(){for(var b=0;b<t.length;b++)a.addCallback(t[b],v);return j(a.parent,"mousemove",y),j(a.parent,"mousedown",z),o&&j(a.parent,"touchstart",z),this},l.remove=function(){for(var b=0;b<t.length;b++)a.removeCallback(t[b],v);return k(a.parent,"mousemove",y),k(a.parent,"mousedown",z),o&&k(a.parent,"touchstart",z),f._currentTooltip&&f.hideTooltip(f._currentTooltip),this},l.add(a)},wax=wax||{},wax.mm=wax.mm||{},wax.mm.latlngtooltip=function(a){function f(c){var d=new b.Point(c.clientX,c.clientY);d.x+=document.body.scrollLeft+document.documentElement.scrollLeft,d.y+=document.body.scrollTop+document.documentElement.scrollTop;for(var e=a.parent;e;e=e.offsetParent)d.x-=e.offsetLeft,d.y-=e.offsetTop;return d}function g(a){console.log("here"),d=!0}function h(a){d=!1}function i(e){if(!e.shiftKey||d){c.parentNode===a.parent&&a.parent.removeChild(c);return}var g=f(e),h=a.pointLocation(g),i=h.lat.toFixed(2)+", "+h.lon.toFixed(2);c.innerHTML=i,g.scale=g.width=g.height=1,g.x+=10,b.moveElement(c,g),a.parent.appendChild(c)}var b=com.modestmaps,c,d=!1,e={};return e.add=function(){return b.addEvent(a.parent,"mousemove",i),b.addEvent(a.parent,"mousedown",g),b.addEvent(a.parent,"mouseup",h),c=document.createElement("div"),c.className="wax-latlngtooltip",this},e.remove=function(){return b.removeEvent(a.parent,"mousemove",i),b.removeEvent(a.parent,"mousedown",g),b.removeEvent(a.parent,"mouseup",h),this},e.add()},wax=wax||{},wax.mm=wax.mm||{},wax.mm.legend=function(a,b){b=b||{};var c,d={};return d.add=function(){return c=wax.legend().content(b.legend||""),this},d.content=function(a){a&&c.content(a.legend||"")},d.element=function(){return c.element()},d.appendTo=function(a){return wax.util.$(a).appendChild(c.element()),this},d.add()},wax=wax||{},wax.mm=wax.mm||{},wax.mm.mobile=function(a,b,c){function j(){return(Math.abs(window.orientation)==90?Math.max(480,screen.height):screen.width)/window.innerWidth}c=c||{};var d=com.modestmaps,e=navigator.userAgent.toLowerCase(),f=e.indexOf("webkit")!=-1,g=e.indexOf("mobile")!=-1,h=g&&f,i=function(a){var b=document.createElement("canvas"),c=parseInt(a.style.width,10),d=parseInt(a.style.height,10),e=c/2,f=d/2,g=Math.min(c,d)/4,h=b.getContext("2d");b.setAttribute("width",c),b.setAttribute("height",d),h.globalAlpha=.7;var i=h.createLinearGradient(0,0,300,225);i.addColorStop(0,"black"),i.addColorStop(1,"rgb(144, 144, 144)"),h.fillStyle=i,h.fillRect(0,0,c,d),h.beginPath(),h.arc(e-g*.3,f,g*1.3,g*1.3,Math.PI*2,!0),h.closePath(),h.fillStyle="rgb(100, 100, 100)",h.fill(),h.fillStyle="rgb(255, 255, 255)",h.lineWidth=5,h.beginPath(),h.moveTo(e-g*.8,f-g),h.lineTo(e-g*.8,f+g),h.lineTo(e+g*.8,f),h.fill(),a.appendChild(b)},k=function(a){a.style.position="absolute",a.style.height="50px",a.style.left=a.style.right="0";var b=document.createElement("canvas");b.setAttribute("width",a.offsetWidth),b.setAttribute("height",a.offsetHeight);var c=b.getContext("2d");c.globalAlpha=1,c.fillStyle="rgba(255, 255, 255, 0.5)",c.fillRect(0,0,a.offsetWidth,a.offsetHeight),c.fillStyle="rgb(0, 0, 0)",c.font="bold 20px sans-serif",c.fillText("back",20,30),a.appendChild(b)},l=function(a){a.style.position="absolute",a.style.width=a.style.height="auto",a.style.top=window.pageYOffset+"px",a.style.left=a.style.right="0px"},m=function(a){a.style.position="relative",a.style.width=a.style.height=a.style.top=a.style.left=a.style.right="auto"},n,o,p,q,r,s=c.overlayDraw||i,t=c.backDraw||k;bodyDraw=c.bodyDraw||function(){};var u={add:function(a){return h&&(q=document.createElement("meta"),q.id="wax-touch",q.setAttribute("name","viewport"),n=document.createElement("div"),n.id=a.parent.id+"-mobileoverlay",n.className="wax-mobileoverlay",n.style.position="absolute",n.style.width=a.dimensions.x+"px",n.style.height=a.dimensions.y+"px",a.parent.appendChild(n),s(n),p=document.createElement("div"),backDiv=document.createElement("div"),o=document.body,newBody=document.createElement("body"),newBody.className="wax-mobile-body",newBody.appendChild(backDiv),d.addEvent(n,"touchstart",this.toTouch),d.addEvent(backDiv,"touchstart",this.toPage)),this},toTouch:function(){a.parent.parentNode.replaceChild(p,a.parent),newBody.insertBefore(a.parent,backDiv),document.body=newBody,r=j(),document.head.appendChild(q),bodyDraw(newBody),t(backDiv),q.setAttribute("content","initial-scale=1.0,minimum-scale=0, maximum-scale=10"),a._smallSize=[a.parent.clientWidth,a.parent.clientHeight],l(a.parent),a.setSize(a.parent.offsetWidth,window.innerHeight),backDiv.style.display="block",n.style.display="none"},toPage:function(){document.body=o,q.setAttribute("content","user-scalable=yes, width=device-width,initial-scale="+r),p.parentNode.replaceChild(a.parent,p),m(a.parent),a.setSize(a._smallSize[0],a._smallSize[1]),backDiv.style.display="none",n.style.display="block"}};return u.add(a)},wax=wax||{},wax.mm=wax.mm||{},wax.mm.pointselector=function(a,b,c){function l(b){var c=wax.util.eventoffset(b),d=new h.Point(c.x,c.y),e={x:parseFloat(h.getStyle(document.documentElement,"margin-left")),y:parseFloat(h.getStyle(document.documentElement,"margin-top"))};isNaN(e.x)||(d.x-=e.x),isNaN(e.y)||(d.y-=e.y);for(var f=a.parent;f;f=f.offsetParent)d.x-=f.offsetLeft,d.y-=f.offsetTop;return d}function m(a){var b=[];for(var c=0;c<a.length;c++)b.push(new h.Location(a[c].lat,a[c].lon));return b}function n(){var b=new h.Point(0,0);for(var c=0;c<j.length;c++){var d=a.locationPoint(j[c]);j[c].pointDiv||(j[c].pointDiv=document.createElement("div"),j[c].pointDiv.className="wax-point-div",j[c].pointDiv.style.position="absolute",j[c].pointDiv.style.display="block",j[c].pointDiv.location=j[c],h.addEvent(j[c].pointDiv,"mouseup",function(b){var d=j[c];return function(b){h.removeEvent(a.parent,"mouseup",p),i.deleteLocation(d,b)}}()),a.parent.appendChild(j[c].pointDiv)),j[c].pointDiv.style.left=d.x+"px",j[c].pointDiv.style.top=d.y+"px"}}function o(b){d=l(b),h.addEvent(a.parent,"mouseup",p)}function p(b){if(!d)return;e=l(b),h.Point.distance(d,e)<f&&(i.addLocation(a.pointLocation(d)),k(m(j))),d=null}var d=null,e=null,f=5,g,h=com.modestmaps,i={},j=[],k=typeof c=="function"?c:c.callback;return i.addLocation=function(a){j.push(a),n(),k(m(j))},i.locations=function(a){return j},i.add=function(a){return h.addEvent(a.parent,"mousedown",o),a.addCallback("drawn",n),this},i.remove=function(a){h.removeEvent(a.parent,"mousedown",o),a.removeCallback("drawn",n);for(var b=j.length-1;b>-1;b--)i.deleteLocation(j[b]);return this},i.deleteLocation=function(a,b){if(!b||confirm("Delete this point?"))a.pointDiv.parentNode.removeChild(a.pointDiv),j.splice(wax.util.indexOf(j,a),1),k(m(j))},i.add(a)},wax=wax||{},wax.mm=wax.mm||{},wax.mm.zoombox=function(a){function g(b){var d=new c.Point(b.clientX,b.clientY);d.x+=document.body.scrollLeft+document.documentElement.scrollLeft,d.y+=document.body.scrollTop+document.documentElement.scrollTop;for(var e=a.parent;e;e=e.offsetParent)d.x-=e.offsetLeft,d.y-=e.offsetTop;return d}function h(b){if(!d)return;d=!1;var i=g(b),k=a.pointLocation(i),l=a.pointLocation(f);a.setExtent([k,l]),e.style.display="none",c.removeEvent(a.parent,"mousemove",j),c.removeEvent(a.parent,"mouseup",h),a.parent.style.cursor="auto"}function i(b){if(!b.shiftKey||!!this.drawing)return;return d=!0,f=g(b),e.style.left=f.x+"px",e.style.top=f.y+"px",c.addEvent(a.parent,"mousemove",j),c.addEvent(a.parent,"mouseup",h),a.parent.style.cursor="crosshair",c.cancelEvent(b)}function j(a){if(!d)return;var b=g(a);return e.style.display="block",b.x<f.x?e.style.left=b.x+"px":e.style.left=f.x+"px",e.style.width=Math.abs(b.x-f.x)+"px",b.y<f.y?e.style.top=b.y+"px":e.style.top=f.y+"px",e.style.height=Math.abs(b.y-f.y)+"px",c.cancelEvent(a)}var b={},c=com.modestmaps,d=!1,e,f=null;return b.add=function(a){return e=e||document.createElement("div"),e.id=a.parent.id+"-zoombox-box",e.className="zoombox-box",a.parent.appendChild(e),c.addEvent(a.parent,"mousedown",i),this},b.remove=function(){a.parent.removeChild(e),c.removeEvent(a.parent,"mousedown",i)},b.add(a)},wax=wax||{},wax.mm=wax.mm||{},wax.mm.zoomer=function(a){var b=com.modestmaps,c=document.createElement("a");c.innerHTML="+",c.href="#",c.className="zoomer zoomin",b.addEvent(c,"mousedown",function(a){b.cancelEvent(a)}),b.addEvent(c,"dblclick",function(a){b.cancelEvent(a)}),b.addEvent(c,"click",function(c){b.cancelEvent(c),a.zoomIn()},!1);var d=document.createElement("a");d.innerHTML="-",d.href="#",d.className="zoomer zoomout",b.addEvent(d,"mousedown",function(a){b.cancelEvent(a)}),b.addEvent(d,"dblclick",function(a){b.cancelEvent(a)}),b.addEvent(d,"click",function(c){b.cancelEvent(c),a.zoomOut()},!1);var e={add:function(a){return a.addCallback("drawn",function(a,b){a.coordinate.zoom===a.provider.outerLimits()[0].zoom?d.className="zoomer zoomout zoomdisabled":a.coordinate.zoom===a.provider.outerLimits()[1].zoom?c.className="zoomer zoomin zoomdisabled":(c.className="zoomer zoomin",d.className="zoomer zoomout")}),this},appendTo:function(a){return wax.util.$(a).appendChild(c),wax.util.$(a).appendChild(d),this}};return e.add(a)};var wax=wax||{};wax.mm=wax.mm||{},wax.mm.connector=function(a){this.options={tiles:a.tiles,scheme:a.scheme||"xyz",minzoom:a.minzoom||0,maxzoom:a.maxzoom||22,bounds:a.bounds||[-180,-90,180,90]}},wax.mm.connector.prototype={outerLimits:function(){return[this.locationCoordinate(new com.modestmaps.Location(this.options.bounds[0],this.options.bounds[1])).zoomTo(this.options.minzoom),this.locationCoordinate(new com.modestmaps.Location(this.options.bounds[2],this.options.bounds[3])).zoomTo(this.options.maxzoom)]},getTileUrl:function(a){return(coord=this.sourceCoordinate(a))?(coord.row=this.options.scheme==="tms"?Math.pow(2,coord.zoom)-coord.row-1:coord.row,this.options.tiles[parseInt(Math.pow(2,coord.zoom)*coord.row+coord.column,10)%this.options.tiles.length].replace("{z}",coord.zoom.toFixed(0)).replace("{x}",coord.column.toFixed(0)).replace("{y}",coord.row.toFixed(0))):null}},com&&com.modestmaps&&com.modestmaps.extend(wax.mm.connector,com.modestmaps.MapProvider) |
@@ -1,2 +0,2 @@ | ||
/* wax - 4.1.6 - 1.0.4-482-g8a293d4 *//*! | ||
/* wax - 4.1.7 - 1.0.4-483-gbb64c65 *//*! | ||
* Reqwest! A general purpose XHR connection manager | ||
@@ -6,3 +6,3 @@ * copyright Dustin Diaz 2011 | ||
* license MIT | ||
*/!function(context,win){function serial(a){var b=a.name;if(a.disabled||!b)return"";b=enc(b);switch(a.tagName.toLowerCase()){case"input":switch(a.type){case"reset":case"button":case"image":case"file":return"";case"checkbox":case"radio":return a.checked?b+"="+(a.value?enc(a.value):!0)+"&":"";default:return b+"="+(a.value?enc(a.value):"")+"&"}break;case"textarea":return b+"="+enc(a.value)+"&";case"select":return b+"="+enc(a.options[a.selectedIndex].value)+"&"}return""}function enc(a){return encodeURIComponent(a)}function reqwest(a,b){return new Reqwest(a,b)}function init(o,fn){function error(a){o.error&&o.error(a),complete(a)}function success(resp){o.timeout&&clearTimeout(self.timeout)&&(self.timeout=null);var r=resp.responseText;if(r)switch(type){case"json":resp=win.JSON?win.JSON.parse(r):eval("("+r+")");break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function complete(a){o.complete&&o.complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort(),error()},o.timeout)),this.request=getRequest(o,success,error)}function setType(a){return/\.json$/.test(a)?"json":/\.jsonp$/.test(a)?"jsonp":/\.js$/.test(a)?"js":/\.html?$/.test(a)?"html":/\.xml$/.test(a)?"xml":"js"}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function getRequest(a,b,c){if(a.type!="jsonp"){var d=xhr();return d.open(a.method||"GET",typeof a=="string"?a:a.url,!0),setHeaders(d,a),d.onreadystatechange=handleReadyState(d,b,c),a.before&&a.before(d),d.send(a.data||null),d}var e=doc.createElement("script"),f=0;win[getCallbackName(a)]=generalCallback,e.type="text/javascript",e.src=a.url,e.async=!0,e.onload=e.onreadystatechange=function(){if(e[readyState]&&e[readyState]!=="complete"&&e[readyState]!=="loaded"||f)return!1;e.onload=e.onreadystatechange=null,a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(e),f=1},head.appendChild(e)}function generalCallback(a){lastValue=a}function getCallbackName(a){var b=a.jsonpCallback||"callback";if(a.url.slice(-(b.length+2))==b+"=?"){var c="reqwest_"+uniqid++;return a.url=a.url.substr(0,a.url.length-1)+c,c}var d=new RegExp(b+"=([\\w]+)");return a.url.match(d)[1]}function setHeaders(a,b){var c=b.headers||{};c.Accept=c.Accept||"text/javascript, text/html, application/xml, text/xml, */*",b.crossOrigin||(c["X-Requested-With"]=c["X-Requested-With"]||"XMLHttpRequest"),c[contentType]=c[contentType]||"application/x-www-form-urlencoded";for(var d in c)c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d],!1)}function handleReadyState(a,b,c){return function(){a&&a[readyState]==4&&(twoHundo.test(a.status)?b(a):c(a))}}var twoHundo=/^20\d$/,doc=document,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",head=doc[byTag]("head")[0],uniqid=0,lastValue,xhr="XMLHttpRequest"in win?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serialize=function(a){var b=[a[byTag]("input"),a[byTag]("select"),a[byTag]("textarea")],c=[],d,e;for(d=0,l=b.length;d<l;++d)for(e=0,l2=b[d].length;e<l2;++e)c.push(serial(b[d][e]));return c.join("").replace(/&$/,"")},reqwest.serializeArray=function(a){for(var b=this.serialize(a).split("&"),c=0,d=b.length,e=[],f;c<d;c++)b[c]&&(f=b[c].split("="))&&e.push({name:f[0],value:f[1]});return e};var old=context.reqwest;reqwest.noConflict=function(){return context.reqwest=old,this},typeof module!="undefined"?module.exports=reqwest:context.reqwest=reqwest}(this,window);var html4={};html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10},html4.ATTRIBS={"*::class":9,"*::dir":0,"*::id":4,"*::lang":0,"*::onclick":2,"*::ondblclick":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::style":3,"*::title":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::rel":0,"a::rev":0,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"del::cite":1,"del::datetime":0,"dir::compact":0,"div::align":0,"dl::compact":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::ismap":0,"input::maxlength":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::readonly":0,"input::size":0,"input::src":1,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"ol::compact":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"p::align":0,"pre::width":0,"q::cite":1,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::size":0,"select::tabindex":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::cols":0,"textarea::disabled":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::readonly":0,"textarea::rows":0,"textarea::tabindex":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"ul::compact":0,"ul::type":0},html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128},html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:16,area:2,b:0,base:18,basefont:18,bdo:0,big:0,blockquote:0,body:49,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,dd:1,del:0,dfn:0,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,font:0,form:0,frame:18,frameset:16,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:49,hr:2,html:49,i:0,iframe:4,img:2,input:2,ins:0,isindex:18,kbd:0,label:0,legend:0,li:1,link:18,map:0,menu:0,meta:18,nobr:0,noembed:4,noframes:20,noscript:20,object:16,ol:0,optgroup:0,option:1,p:1,param:18,pre:0,q:0,s:0,samp:0,script:84,select:0,small:0,span:0,strike:0,strong:0,style:148,sub:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,title:24,tr:1,tt:0,u:0,ul:0,"var":0},html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2},html4.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"body::background":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0},html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0},html4.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"body::background":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2};var html=function(a){function g(a){a=b(a);if(c.hasOwnProperty(a))return c[a];var d=a.match(e);return d?String.fromCharCode(parseInt(d[1],10)):(d=a.match(f))?String.fromCharCode(parseInt(d[1],16)):""}function h(a,b){return g(b)}function j(a){return a.replace(i,"")}function l(a){return a.replace(k,h)}function s(a){return a.replace(m,"&").replace(o,"<").replace(p,">").replace(q,""").replace(r,"=")}function t(a){return a.replace(n,"&$1").replace(o,"<").replace(p,">")}function w(c){return function d(d,e){d=String(d);var f=null,g=!1,h=[],i=void 0,k=void 0,m=void 0;c.startDoc&&c.startDoc(e);while(d){var n=d.match(g?u:v);d=d.substring(n[0].length);if(g){if(n[1]){var o=b(n[1]),p;if(n[2]){var q=n[3];switch(q.charCodeAt(0)){case 34:case 39:q=q.substring(1,q.length-1)}p=l(j(q))}else p=o;h.push(o,p)}else if(n[4]){k!==void 0&&(m?c.startTag&&c.startTag(i,h,e):c.endTag&&c.endTag(i,e));if(m&&k&(a.eflags.CDATA|a.eflags.RCDATA)){f===null?f=b(d):f=f.substring(f.length-d.length);var r=f.indexOf("</"+i);r<0&&(r=d.length),r&&(k&a.eflags.CDATA?c.cdata&&c.cdata(d.substring(0,r),e):c.rcdata&&c.rcdata(t(d.substring(0,r)),e),d=d.substring(r))}i=k=m=void 0,h.length=0,g=!1}}else if(n[1])c.pcdata&&c.pcdata(n[0],e);else if(n[3])m=!n[2],g=!0,i=b(n[3]),k=a.ELEMENTS.hasOwnProperty(i)?a.ELEMENTS[i]:void 0;else if(n[4])c.pcdata&&c.pcdata(n[4],e);else if(n[5]&&c.pcdata){var s=n[5];c.pcdata(s==="<"?"<":s===">"?">":"&",e)}}c.endDoc&&c.endDoc(e)}}function x(b){var c,d;return w({startDoc:function(a){c=[],d=!1},startTag:function(e,f,g){if(d)return;if(!a.ELEMENTS.hasOwnProperty(e))return;var h=a.ELEMENTS[e];if(h&a.eflags.FOLDABLE)return;if(h&a.eflags.UNSAFE){d=!(h&a.eflags.EMPTY);return}f=b(e,f);if(f){h&a.eflags.EMPTY||c.push(e),g.push("<",e);for(var i=0,j=f.length;i<j;i+=2){var k=f[i],l=f[i+1];l!==null&&l!==void 0&&g.push(" ",k,'="',s(l),'"')}g.push(">")}},endTag:function(b,e){if(d){d=!1;return}if(!a.ELEMENTS.hasOwnProperty(b))return;var f=a.ELEMENTS[b];if(!(f&(a.eflags.UNSAFE|a.eflags.EMPTY|a.eflags.FOLDABLE))){var g;if(f&a.eflags.OPTIONAL_ENDTAG)for(g=c.length;--g>=0;){var h=c[g];if(h===b)break;if(!(a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG))return}else for(g=c.length;--g>=0;)if(c[g]===b)break;if(g<0)return;for(var i=c.length;--i>g;){var h=c[i];a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG||e.push("</",h,">")}c.length=g,e.push("</",b,">")}},pcdata:function(a,b){d||b.push(a)},rcdata:function(a,b){d||b.push(a)},cdata:function(a,b){d||b.push(a)},endDoc:function(a){for(var b=c.length;--b>=0;)a.push("</",c[b],">");c.length=0}})}function z(b,c,e){var f=[];return x(function g(b,f){for(var g=0;g<f.length;g+=2){var h=f[g],i=f[g+1],j=null,k;if((k=b+"::"+h,a.ATTRIBS.hasOwnProperty(k))||(k="*::"+h,a.ATTRIBS.hasOwnProperty(k)))j=a.ATTRIBS[k];if(j!==null)switch(j){case a.atype.NONE:break;case a.atype.SCRIPT:case a.atype.STYLE:i=null;break;case a.atype.ID:case a.atype.IDREF:case a.atype.IDREFS:case a.atype.GLOBAL_NAME:case a.atype.LOCAL_NAME:case a.atype.CLASSES:i=e?e(i):i;break;case a.atype.URI:var l=(""+i).match(y);l?!l[1]||d.test(l[1])?i=c&&c(i):i=null:i=null;break;case a.atype.URI_FRAGMENT:i&&"#"===i.charAt(0)?(i=e?e(i):i,i&&(i="#"+i)):i=null;break;default:i=null}else i=null;f[g+1]=i}return f})(b,f),f.join("")}var b;"script"==="SCRIPT".toLowerCase()?b=function(a){return a.toLowerCase()}:b=function(a){return a.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)|32)})};var c={lt:"<",gt:">",amp:"&",nbsp:" ",quot:'"',apos:"'"},d=/^(?:https?|mailto|data)$/i,e=/^#(\d+)$/,f=/^#x([0-9A-Fa-f]+)$/,i=/\0/g,k=/&(#\d+|#x[0-9A-Fa-f]+|\w+);/g,m=/&/g,n=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,o=/</g,p=/>/g,q=/\"/g,r=/\=/g,u=new RegExp("^\\s*(?:(?:([a-z][a-z-]*)(\\s*=\\s*(\"[^\"]*\"|'[^']*'|(?=[a-z][a-z-]*\\s*=)|[^>\"'\\s]*))?)|(/?>)|[\\s\\S][^a-z\\s>]*)","i"),v=new RegExp("^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);|<!--[\\s\\S]*?-->|<!\\w[^>]*>|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))","i"),y=new RegExp("^(?:([^:/?#]+):)?");return{escapeAttrib:s,makeHtmlSanitizer:x,makeSaxParser:w,normalizeRCData:t,sanitize:z,unescapeEntities:l}}(html4),html_sanitize=html.sanitize;typeof window!="undefined"&&(window.html=html,window.html_sanitize=html_sanitize),html4.ATTRIBS["*::style"]=0,html4.ELEMENTS.style=0;var Mustache=function(){var a={},b=function(){};return b.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(a,b,c,d){d||(this.context=b,this.buffer=[]);if(!this.includes("",a)){if(d)return a;this.send(a);return}a=this.render_pragmas(a);var e=this.render_section(a,b,c);e===!1&&(e=this.render_tags(a,b,c,d));if(d)return e;this.sendLines(e)},send:function(a){a!==""&&this.buffer.push(a)},sendLines:function(a){if(a){var b=a.split("\n");for(var c=0;c<b.length;c++)this.send(b[c])}},render_pragmas:function(a){if(!this.includes("%",a))return a;var b=this,c=this.getCachedRegex("render_pragmas",function(a,b){return new RegExp(a+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+b,"g")});return a.replace(c,function(a,c,d){if(!b.pragmas_implemented[c])throw{message:"This implementation of mustache doesn't understand the '"+c+"' pragma"};b.pragmas[c]={};if(d){var e=d.split("=");b.pragmas[c][e[0]]=e[1]}return""})},render_partial:function(a,b,c){a=this.trim(a);if(!c||c[a]===undefined)throw{message:"unknown_partial '"+a+"'"};return typeof b[a]!="object"?this.render(c[a],b,c,!0):this.render(c[a],b[a],c,!0)},render_section:function(a,b,c){if(!this.includes("#",a)&&!this.includes("^",a))return!1;var d=this,e=this.getCachedRegex("render_section",function(a,b){return new RegExp("^([\\s\\S]*?)"+a+"(\\^|\\#)\\s*(.+)\\s*"+b+"\n*([\\s\\S]*?)"+a+"\\/\\s*\\3\\s*"+b+"\\s*([\\s\\S]*)$","g")});return a.replace(e,function(a,e,f,g,h,i){var j=e?d.render_tags(e,b,c,!0):"",k=i?d.render(i,b,c,!0):"",l,m=d.find(g,b);return f==="^"?!m||d.is_array(m)&&m.length===0?l=d.render(h,b,c,!0):l="":f==="#"&&(d.is_array(m)?l=d.map(m,function(a){return d.render(h,d.create_context(a),c,!0)}).join(""):d.is_object(m)?l=d.render(h,d.create_context(m),c,!0):typeof m=="function"?l=m.call(b,h,function(a){return d.render(a,b,c,!0)}):m?l=d.render(h,b,c,!0):l=""),j+l+k})},render_tags:function(a,b,c,d){var e=this,f=function(){return e.getCachedRegex("render_tags",function(a,b){return new RegExp(a+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+b+"+","g")})},g=f(),h=function(a,d,h){switch(d){case"!":return"";case"=":return e.set_delimiters(h),g=f(),"";case">":return e.render_partial(h,b,c);case"{":return e.find(h,b);default:return e.escape(e.find(h,b))}},i=a.split("\n");for(var j=0;j<i.length;j++)i[j]=i[j].replace(g,h,this),d||this.send(i[j]);if(d)return i.join("\n")},set_delimiters:function(a){var b=a.split(" ");this.otag=this.escape_regex(b[0]),this.ctag=this.escape_regex(b[1])},escape_regex:function(a){if(!arguments.callee.sRE){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+b.join("|\\")+")","g")}return a.replace(arguments.callee.sRE,"\\$1")},find:function(a,b){function c(a){return a===!1||a===0||a}a=this.trim(a);var d;return c(b[a])?d=b[a]:c(this.context[a])&&(d=this.context[a]),typeof d=="function"?d.apply(b):d!==undefined?d:""},includes:function(a,b){return b.indexOf(this.otag+a)!=-1},escape:function(a){return a=String(a===null?"":a),a.replace(/&(?!\w+;)|["'<>\\]/g,function(a){switch(a){case"&":return"&";case'"':return""";case"'":return"'";case"<":return"<";case">":return">";default:return a}})},create_context:function(a){if(this.is_object(a))return a;var b=".";this.pragmas["IMPLICIT-ITERATOR"]&&(b=this.pragmas["IMPLICIT-ITERATOR"].iterator);var c={};return c[b]=a,c},is_object:function(a){return a&&typeof a=="object"},is_array:function(a){return Object.prototype.toString.call(a)==="[object Array]"},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},map:function(a,b){if(typeof a.map=="function")return a.map(b);var c=[],d=a.length;for(var e=0;e<d;e++)c.push(b(a[e]));return c},getCachedRegex:function(b,c){var d=a[this.otag];d||(d=a[this.otag]={});var e=d[this.ctag];e||(e=d[this.ctag]={});var f=e[b];return f||(f=e[b]=c(this.otag,this.ctag)),f}},{name:"mustache.js",version:"0.4.0-dev",to_html:function(a,c,d,e){var f=new b;e&&(f.send=e),f.render(a,c||{},d);if(!e)return f.buffer.join("\n")}}}(),wax=wax||{};wax.ol=wax.ol||{},wax.ol.connector=function(a){for(var b=0;b<a.tiles.length;b++)a.tiles[b]=a.tiles[b].replace("{z}","${z}").replace("{x}","${x}").replace("{y}","${y}");return new OpenLayers.Layer.XYZ(a.name,a.tiles,{sphericalMercator:!0,zoomOffset:a.minzoom,numZoomLevels:a.maxzoom-a.minzoom})},wax=wax||{},wax.attribution=function(){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var a,b={};return b.set=function(b){if(typeof b=="undefined")return;return a.innerHTML=html_sanitize(b,c,d),this},b.element=function(){return a},b.init=function(){return a=document.createElement("div"),a.className="wax-attribution",this},b.init()},wax=wax||{},wax.bwdetect=function(a,b){function h(){wax.bw=-1;var a=new Image;a.src=e;var b=!0,f=setTimeout(function(){b&&wax.bw==-1&&(c.bw(0),b=!1)},d);a.onload=function(){b&&wax.bw==-1&&(clearTimeout(f),c.bw(1),b=!1)}}var c={},d=a.threshold||400,e="http://a.tiles.mapbox.com/mapbox/1.0.0/blue-marble-topo-bathy-jul/0/0/0.png?preventcache="+ +(new Date),f=1,g=a.auto===undefined?!0:a.auto;return c.bw=function(a){if(!arguments.length)return f;var c=f;wax.bwlisteners&&wax.bwlisteners.length&&function(){listeners=wax.bwlisteners,wax.bwlisteners=[];for(i=0;i<listeners;i++)listeners[i](a)}(),wax.bw=a,f!=(f=a)&&b(a)},c.add=function(){return g&&h(),this},wax.bw==-1?(wax.bwlisteners=wax.bwlisteners||[],wax.bwlisteners.push(c.bw)):wax.bw!==undefined?c.bw(wax.bw):c.add(),c},wax.formatter=function(x){function urlX(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function idX(a){return a}var formatter={},f;if(x&&typeof x=="string")try{eval("f = "+x)}catch(e){console&&console.log(e)}else x&&typeof x=="function"?f=x:f=function(){};return formatter.format=function(a,b){try{return html_sanitize(f(a,b),urlX,idX)}catch(c){console&&console.log(c)}},formatter},wax.GridInstance=function(a,b,c){function g(a){return a>=93&&a--,a>=35&&a--,a-=32,a}c=c||{};var d={},e=c.resolution||4,f=c.tileSize||256;return d.grid_tile=function(){return a},d.getKey=function(b,c){if(!a||!a.grid)return;if(c<0||b<0)return;if(Math.floor(c)>=f||Math.floor(b)>=f)return;return g(a.grid[Math.floor(c/e)].charCodeAt(Math.floor(b/e)))},d.gridFeature=function(b,c){var d=this.getKey(b,c),e=a.keys;if(e&&e[d]&&a.data[e[d]])return a.data[e[d]]},d.tileFeature=function(c,d,e,f){if(!a)return;var g=wax.util.offset(e);feature=this.gridFeature(c-g.left,d-g.top);if(feature)return b.format(f,feature)},d},wax.GridManager=function(a){function h(a){return typeof a=="string"&&(a=[a]),function b(b){if(!b)return;var c=/(\d+)\/(\d+)\/(\d+)\.[\w\._]+/g.exec(b);if(!c)return;return a[parseInt(c[2],10)%a.length].replace("{z}",c[1]).replace("{x}",c[2]).replace("{y}",c[3])}}a=a||{};var b=a.resolution||4,c=a.version||"1.1",d={},e={},f,g=function(a){return a.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json")};return e.formatter=function(a){return arguments.length?(f=wax.formatter(a),e):f},e.template=function(a){return arguments.length?(f=wax.template(a),e):f},e.gridUrl=function(a){return arguments.length?(g=typeof a=="function"?a:h(a),e):g},e.getGrid=function(a,c){var d=g(a);return!f||!d?c(null,null):(wax.request.get(d,function(a,d){if(a)return c(a,null);c(null,wax.GridInstance(d,f,{resolution:b||4}))}),e)},e.add=function(a){return a.template?e.template(a.template):a.formatter&&e.formatter(a.formatter),a.grids&&e.gridUrl(a.grids),this},e.add(a)},wax=wax||{},wax.hash=function(a){function b(){return location.hash.substring(1)}function c(a){location.hash="#"+a}function g(b){var c=b.split("/");for(var d=0;d<c.length;d++){c[d]=Number(c[d]);if(isNaN(c[d]))return!0}if(c.length<3)return!0;c.length==3&&a.setCenterZoom(c)}function h(){var b=a.getCenterZoom();d!==b&&(d=b,c(d))}function i(a){if(a===d)return;g(d=a)&&h()}a=a||{};var d,e={},f=90-1e-8,j=wax.util.throttle(h,500);return e.add=function(){return i(b()),a.bindChange(j),this},e.remove=function(){return a.unbindChange(j),this},e.add()};var wax=wax||{};wax.legend=function(){function d(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function e(a){return a}var a,b={},c;return b.element=function(){return c},b.content=function(b){return arguments.length?(b?(a.innerHTML=html_sanitize(b,d,e),a.style.display="block"):(a.innerHTML="",a.style.display="none"),this):a.innerHTML},b.add=function(){return c=document.createElement("div"),c.className="wax-legends",a=document.createElement("div"),a.className="wax-legend",a.style.display="none",c.appendChild(a),this},b.add()};var w=function(a){return a.melt=function(b,c){return b.apply(c,[a,c])},a},wax=wax||{};wax.movetip={},wax.movetip=function(a){function g(a){return a&&a.className.indexOf("wax-popup")!==-1}function h(a,b){var c=document.createElement("div");return c.className="wax-movetip",c.style.cssText="position:absolute;",c.innerHTML=a,b.appendChild(c),d=b,_tooltipOffset=wax.util.offset(c),_contextOffset=wax.util.offset(d),c}function i(a){if(!c)return;var b=wax.util.eventoffset(a);c.className="wax-movetip",_tooltipOffset.height+b.y>_contextOffset.top+_contextOffset.height&&_contextOffset.height>_tooltipOffset.height&&(b.y-=_tooltipOffset.height,c.className+=" flip-y"),_tooltipOffset.width+b.x>_contextOffset.left+_contextOffset.width&&(b.x-=_tooltipOffset.width,c.className+=" flip-x"),c.style.left=b.x+"px",c.style.top=b.y+"px"}function j(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&e?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&e&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+e):a.parentNode&&a.parentNode.removeChild(a)}function k(a,b){c&&(j(c),c=undefined);var d=h(a,b);d.className+=" wax-popup",d.innerHTML=a;var e=document.createElement("a");e.href="#close",e.className="close",e.innerHTML="Close",d.appendChild(e);var f=function(a){return j(d),c=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1};e.addEventListener?e.addEventListener("click",f,!1):e.attachEvent&&e.attachEvent("onclick",f),c=d}a=a||{};var b={},c=undefined,d=undefined,e=a.animationOut,f=a.animationIn;return b.over=function(a,b,d){if(!a)return;b.style.cursor="pointer";if(g(c))return;c=h(a,b),i(d),b.addEventListener&&b.addEventListener("mousemove",i)},b.out=function(a){a.style.cursor="default";if(g(c))return;c&&(j(c),a.removeEventListener&&a.removeEventListener("mousemove",i),c=undefined)},b};var wax=wax||{};wax.request={cache:{},locks:{},promises:{},get:function(a,b){if(this.cache[a])return b(this.cache[a][0],this.cache[a][1]);this.promises[a]=this.promises[a]||[],this.promises[a].push(b);if(this.locks[a])return;var c=this;this.locks[a]=!0,reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(b){c.locks[a]=!1,c.cache[a]=[null,b];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])},error:function(b){c.locks[a]=!1,c.cache[a]=[b,null];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])}})}},wax.template=function(a){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var b={};return b.format=function(b,e){var f={};for(var g in e)f[g]=e[g];return b.format&&(f["__"+b.format+"__"]=!0),html_sanitize(Mustache.to_html(a,f),c,d)},b};if(!wax)var wax={};wax.tilejson=function(a,b){reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:b,error:b})};var wax=wax||{};wax.tooltip={},wax.tooltip=function(a){this._currentTooltip=undefined,a=a||{},a.animationOut&&(this.animationOut=a.animationOut),a.animationIn&&(this.animationIn=a.animationIn)},wax.tooltip.prototype.isPopup=function(a){return a&&a.className.indexOf("wax-popup")!==-1},wax.tooltip.prototype.getTooltip=function(a,b){var c=document.createElement("div");return c.className="wax-tooltip wax-tooltip-0",c.innerHTML=a,b.appendChild(c),c},wax.tooltip.prototype.hideTooltip=function(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&this.animationOut?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&this.animationOut&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+this.animationOut):a.parentNode&&a.parentNode.removeChild(a)},wax.tooltip.prototype.click=function(a,b){this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined);var c=this.getTooltip(a,b);c.className+=" wax-popup",c.innerHTML=a;var d=document.createElement("a");d.href="#close",d.className="close",d.innerHTML="Close",c.appendChild(d);var e=wax.util.bind(function(a){return this.hideTooltip(c),this._currentTooltip=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1},this);d.addEventListener?(d.addEventListener("click",e,!1),d.addEventListener("touchend",e,!1)):d.attachEvent&&d.attachEvent("onclick",e),this._currentTooltip=c},wax.tooltip.prototype.over=function(a,b){if(!a)return;b.style.cursor="pointer";if(this.isPopup(this._currentTooltip))return;this._currentTooltip=this.getTooltip(a,b)},wax.tooltip.prototype.out=function(a){a.style.cursor="default";if(this.isPopup(this._currentTooltip))return;this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined)};var wax=wax||{};wax.util=wax.util||{},wax.util={offset:function(a){var b=a.offsetWidth||parseInt(a.style.width,10),c=a.offsetHeight||parseInt(a.style.height,10),d=document.body,e=0,f=0,g=function(a){if(a===d||a===document.documentElement)return;e+=a.offsetTop,f+=a.offsetLeft;var b=a.style.transform||a.style.WebkitTransform||a.style.OTransform||a.style.MozTransform||a.style.msTransform;if(b)if(match=b.match(/translate\((.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/translate3d\((.+)px, (.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/matrix3d\(([\-\d,\s]+)\)/)){var c=match[1].split(",");e+=parseInt(c[13],10),f+=parseInt(c[12],10)}else if(match=b.match(/matrix\(.+, .+, .+, .+, (.+), (.+)\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10)};g(a);try{while(a=a.offsetParent)g(a)}catch(h){}e+=d.offsetTop,f+=d.offsetLeft,e+=d.parentNode.offsetTop,f+=d.parentNode.offsetLeft;var i=document.defaultView?window.getComputedStyle(d.parentNode,null):d.parentNode.currentStyle;return d.parentNode.offsetTop!==parseInt(i.marginTop,10)&&!isNaN(parseInt(i.marginTop,10))&&(e+=parseInt(i.marginTop,10),f+=parseInt(i.marginLeft,10)),{top:e,left:f,height:c,width:b}},$:function(a){return typeof a=="string"?document.getElementById(a):a},bind:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,c.concat(Array.prototype.slice.call(arguments)))}},isString:function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)},indexOf:function(a,b){var c=Array.prototype.indexOf;if(a===null)return-1;var d,e;if(c&&a.indexOf===c)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(a[d]===b)return d;return-1},isArray:Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},keys:Object.keys||function(a){var b=Object.prototype.hasOwnProperty;if(a!==Object(a))throw new TypeError("Invalid object");var c=[];for(var d in a)b.call(a,d)&&(c[c.length]=d);return c},eventoffset:function(a){var b=0,c=0;if(!a)var a=window.event;if(a.pageX||a.pageY)return{x:a.pageX,y:a.pageY};if(a.clientX||a.clientY){var d=document.documentElement,e=document.body,f=document.body.parentNode.currentStyle,g=parseInt(f.marginTop,10)||0,h=parseInt(f.marginLeft,10)||0;return{x:a.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0)+h,y:a.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)+g}}if(a.touches&&a.touches.length===1)return{x:a.touches[0].pageX,y:a.touches[0].pageY}},limit:function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d);if(c||!d)d=setTimeout(g,b)}},throttle:function(a,b){return this.limit(a,b,!1)}};var wax=wax||{};wax.ol=wax.ol||{};var addEv=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)};wax.ol.Interaction=OpenLayers.Class(OpenLayers.Control,{feature:{},handlerOptions:null,handlers:null,gm:new wax.GridManager,initialize:function(a,b){this.options=b||{},this.clickAction=this.options.clickAction||"full",this.gm=new wax.GridManager(a),OpenLayers.Control.prototype.initialize.apply(this,[this.options||{}]),this.callbacks=this.options.callbacks||new wax.tooltip},setMap:function(a){addEv(a.viewPortDiv,"mousemove",wax.util.bind(this.getInfoForHover,this)),addEv(a.viewPortDiv,"mouseout",wax.util.bind(this.resetLayers,this)),this.clickHandler=new OpenLayers.Handler.Click(this,{click:this.getInfoForClick}),this.clickHandler.setMap(a),this.clickHandler.activate(),a.events.on({addlayer:this.resetLayers,changelayer:this.resetLayers,removelayer:this.resetLayers,changebaselayer:this.resetLayers,scope:this}),OpenLayers.Control.prototype.setMap.apply(this,arguments)},getTileStack:function(a,b){if(!a||!b)return[];var c=[];d:for(var e=0;e<a.length;e++)for(var f=0;f<a[e].grid.length;f++)for(var g=0;g<a[e].grid[f].length;g++){var h;a[e].grid[f][g].imgDiv?h=wax.util.offset(a[e].grid[f][g].imgDiv):h=wax.util.offset(a[e].grid[f][g].frame);if(h&&h.top<b.y&&h.top+256>b.y&&h.left<b.x&&h.left+256>b.x){c.push(a[e].grid[f][g]);continue d}}return c},viableLayers:function(){if(this._viableLayers)return this._viableLayers;this._viableLayers=[];for(var a in this.map.layers)this.map.layers[a].visibility===!0&&this.map.layers[a].CLASS_NAME==="OpenLayers.Layer.TMS"&&this._viableLayers.push(this.map.layers[a]);return this._viableLayers},resetLayers:function(a){this._viableLayers=null;var b=a.relatedTarget||a.toElement;b&&b.className!=="olTileImage"&&this.callbacks.out(this.map.viewPortDiv)},getInfoForClick:function(a){if(!a)return;var b=this.viableLayers(),c=wax.util.eventoffset(a),d=this.getTileStack(this.viableLayers(),c),e=null,f=null,g=this;for(var h=0;h<d.length;h++){if(!d[h].url)continue;this.gm.getGrid(d[h].url,function(a,b){if(!b)return;var e=b.tileFeature(c.x,c.y,d[h].frame||d[h].imgDiv,{format:g.clickAction});if(e)switch(g.clickAction){case"full":g.callbacks.click(e,d[h].layer.map.viewPortDiv,h);break;case"location":window.location=e}})}},getInfoForHover:function(a){if(!a)return;var b={format:"teaser"},c=this.viableLayers(),d=wax.util.eventoffset(a),e=this.getTileStack(this.viableLayers(),d),f=null,g=null,h=this;for(var i=0;i<e.length;i++){if(!e[i].url)continue;this.gm.getGrid(e[i].url,function(c,f){if(f&&e[i]){var g=f.tileFeature(d.x,d.y,e[i].frame||e[i].imgDiv,b);if(g){if(!e[i])return;g&&h.feature[i]!==g?(h.feature[i]=g,h.callbacks.out(e[i].layer.map.div),h.callbacks.over(g,e[i].layer.map.div,a)):g||(h.feature[i]=null,h.callbacks.out(e[i].layer.map.div))}else h.feature[i]&&h.callbacks.out(e[i].layer.map.div),h.feature[i]=null}})}},CLASS_NAME:"wax.ol.Interaction"});var wax=wax||{};wax.ol=wax.ol||{},wax.ol.Legend=OpenLayers.Class(OpenLayers.Control,{CLASS_NAME:"wax.ol.Legend",legend:null,options | ||
:null,initialize:function(a){this.options=a||{},OpenLayers.Control.prototype.initialize.apply(this,[a||{}])},activate:function(){return this.legend=new wax.Legend(this.map.viewPortDiv,this.options.container),OpenLayers.Control.prototype.activate.apply(this,arguments)},setMap:function(a){OpenLayers.Control.prototype.setMap.apply(this,arguments),this.activate(),this.map.events.on({addlayer:this.setLegend,changelayer:this.setLegend,removelayer:this.setLegend,changebaselayer:this.setLegend,scope:this})},setLegend:function(){var a=[];for(var b=0;b<this.map.layers.length;b++){var c=this.map.layers[b];c&&c.getURL&&c.visibility&&a.push(c.getURL(new OpenLayers.Bounds))}this.legend.render(a)}}) | ||
*/!function(context,win){function serial(a){var b=a.name;if(a.disabled||!b)return"";b=enc(b);switch(a.tagName.toLowerCase()){case"input":switch(a.type){case"reset":case"button":case"image":case"file":return"";case"checkbox":case"radio":return a.checked?b+"="+(a.value?enc(a.value):!0)+"&":"";default:return b+"="+(a.value?enc(a.value):"")+"&"}break;case"textarea":return b+"="+enc(a.value)+"&";case"select":return b+"="+enc(a.options[a.selectedIndex].value)+"&"}return""}function enc(a){return encodeURIComponent(a)}function reqwest(a,b){return new Reqwest(a,b)}function init(o,fn){function error(a){o.error&&o.error(a),complete(a)}function success(resp){o.timeout&&clearTimeout(self.timeout)&&(self.timeout=null);var r=resp.responseText;if(r)switch(type){case"json":resp=win.JSON?win.JSON.parse(r):eval("("+r+")");break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function complete(a){o.complete&&o.complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort(),error()},o.timeout)),this.request=getRequest(o,success,error)}function setType(a){return/\.json$/.test(a)?"json":/\.jsonp$/.test(a)?"jsonp":/\.js$/.test(a)?"js":/\.html?$/.test(a)?"html":/\.xml$/.test(a)?"xml":"js"}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function getRequest(a,b,c){if(a.type!="jsonp"){var d=xhr();return d.open(a.method||"GET",typeof a=="string"?a:a.url,!0),setHeaders(d,a),d.onreadystatechange=handleReadyState(d,b,c),a.before&&a.before(d),d.send(a.data||null),d}var e=doc.createElement("script"),f=0;win[getCallbackName(a)]=generalCallback,e.type="text/javascript",e.src=a.url,e.async=!0,e.onload=e.onreadystatechange=function(){if(e[readyState]&&e[readyState]!=="complete"&&e[readyState]!=="loaded"||f)return!1;e.onload=e.onreadystatechange=null,a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(e),f=1},head.appendChild(e)}function generalCallback(a){lastValue=a}function getCallbackName(a){var b=a.jsonpCallback||"callback";if(a.url.slice(-(b.length+2))==b+"=?"){var c="reqwest_"+uniqid++;return a.url=a.url.substr(0,a.url.length-1)+c,c}var d=new RegExp(b+"=([\\w]+)");return a.url.match(d)[1]}function setHeaders(a,b){var c=b.headers||{};c.Accept=c.Accept||"text/javascript, text/html, application/xml, text/xml, */*",b.crossOrigin||(c["X-Requested-With"]=c["X-Requested-With"]||"XMLHttpRequest"),c[contentType]=c[contentType]||"application/x-www-form-urlencoded";for(var d in c)c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d],!1)}function handleReadyState(a,b,c){return function(){a&&a[readyState]==4&&(twoHundo.test(a.status)?b(a):c(a))}}var twoHundo=/^20\d$/,doc=document,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",head=doc[byTag]("head")[0],uniqid=0,lastValue,xhr="XMLHttpRequest"in win?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serialize=function(a){var b=[a[byTag]("input"),a[byTag]("select"),a[byTag]("textarea")],c=[],d,e;for(d=0,l=b.length;d<l;++d)for(e=0,l2=b[d].length;e<l2;++e)c.push(serial(b[d][e]));return c.join("").replace(/&$/,"")},reqwest.serializeArray=function(a){for(var b=this.serialize(a).split("&"),c=0,d=b.length,e=[],f;c<d;c++)b[c]&&(f=b[c].split("="))&&e.push({name:f[0],value:f[1]});return e};var old=context.reqwest;reqwest.noConflict=function(){return context.reqwest=old,this},typeof module!="undefined"?module.exports=reqwest:context.reqwest=reqwest}(this,window);var html4={};html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10},html4.ATTRIBS={"*::class":9,"*::dir":0,"*::id":4,"*::lang":0,"*::onclick":2,"*::ondblclick":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::style":3,"*::title":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::rel":0,"a::rev":0,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"del::cite":1,"del::datetime":0,"dir::compact":0,"div::align":0,"dl::compact":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::ismap":0,"input::maxlength":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::readonly":0,"input::size":0,"input::src":1,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"ol::compact":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"p::align":0,"pre::width":0,"q::cite":1,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::size":0,"select::tabindex":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::cols":0,"textarea::disabled":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::readonly":0,"textarea::rows":0,"textarea::tabindex":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"ul::compact":0,"ul::type":0},html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128},html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:16,area:2,b:0,base:18,basefont:18,bdo:0,big:0,blockquote:0,body:49,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,dd:1,del:0,dfn:0,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,font:0,form:0,frame:18,frameset:16,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:49,hr:2,html:49,i:0,iframe:4,img:2,input:2,ins:0,isindex:18,kbd:0,label:0,legend:0,li:1,link:18,map:0,menu:0,meta:18,nobr:0,noembed:4,noframes:20,noscript:20,object:16,ol:0,optgroup:0,option:1,p:1,param:18,pre:0,q:0,s:0,samp:0,script:84,select:0,small:0,span:0,strike:0,strong:0,style:148,sub:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,title:24,tr:1,tt:0,u:0,ul:0,"var":0},html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2},html4.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"body::background":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0},html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0},html4.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"body::background":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2};var html=function(a){function g(a){a=b(a);if(c.hasOwnProperty(a))return c[a];var d=a.match(e);return d?String.fromCharCode(parseInt(d[1],10)):(d=a.match(f))?String.fromCharCode(parseInt(d[1],16)):""}function h(a,b){return g(b)}function j(a){return a.replace(i,"")}function l(a){return a.replace(k,h)}function s(a){return a.replace(m,"&").replace(o,"<").replace(p,">").replace(q,""").replace(r,"=")}function t(a){return a.replace(n,"&$1").replace(o,"<").replace(p,">")}function w(c){return function d(d,e){d=String(d);var f=null,g=!1,h=[],i=void 0,k=void 0,m=void 0;c.startDoc&&c.startDoc(e);while(d){var n=d.match(g?u:v);d=d.substring(n[0].length);if(g){if(n[1]){var o=b(n[1]),p;if(n[2]){var q=n[3];switch(q.charCodeAt(0)){case 34:case 39:q=q.substring(1,q.length-1)}p=l(j(q))}else p=o;h.push(o,p)}else if(n[4]){k!==void 0&&(m?c.startTag&&c.startTag(i,h,e):c.endTag&&c.endTag(i,e));if(m&&k&(a.eflags.CDATA|a.eflags.RCDATA)){f===null?f=b(d):f=f.substring(f.length-d.length);var r=f.indexOf("</"+i);r<0&&(r=d.length),r&&(k&a.eflags.CDATA?c.cdata&&c.cdata(d.substring(0,r),e):c.rcdata&&c.rcdata(t(d.substring(0,r)),e),d=d.substring(r))}i=k=m=void 0,h.length=0,g=!1}}else if(n[1])c.pcdata&&c.pcdata(n[0],e);else if(n[3])m=!n[2],g=!0,i=b(n[3]),k=a.ELEMENTS.hasOwnProperty(i)?a.ELEMENTS[i]:void 0;else if(n[4])c.pcdata&&c.pcdata(n[4],e);else if(n[5]&&c.pcdata){var s=n[5];c.pcdata(s==="<"?"<":s===">"?">":"&",e)}}c.endDoc&&c.endDoc(e)}}function x(b){var c,d;return w({startDoc:function(a){c=[],d=!1},startTag:function(e,f,g){if(d)return;if(!a.ELEMENTS.hasOwnProperty(e))return;var h=a.ELEMENTS[e];if(h&a.eflags.FOLDABLE)return;if(h&a.eflags.UNSAFE){d=!(h&a.eflags.EMPTY);return}f=b(e,f);if(f){h&a.eflags.EMPTY||c.push(e),g.push("<",e);for(var i=0,j=f.length;i<j;i+=2){var k=f[i],l=f[i+1];l!==null&&l!==void 0&&g.push(" ",k,'="',s(l),'"')}g.push(">")}},endTag:function(b,e){if(d){d=!1;return}if(!a.ELEMENTS.hasOwnProperty(b))return;var f=a.ELEMENTS[b];if(!(f&(a.eflags.UNSAFE|a.eflags.EMPTY|a.eflags.FOLDABLE))){var g;if(f&a.eflags.OPTIONAL_ENDTAG)for(g=c.length;--g>=0;){var h=c[g];if(h===b)break;if(!(a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG))return}else for(g=c.length;--g>=0;)if(c[g]===b)break;if(g<0)return;for(var i=c.length;--i>g;){var h=c[i];a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG||e.push("</",h,">")}c.length=g,e.push("</",b,">")}},pcdata:function(a,b){d||b.push(a)},rcdata:function(a,b){d||b.push(a)},cdata:function(a,b){d||b.push(a)},endDoc:function(a){for(var b=c.length;--b>=0;)a.push("</",c[b],">");c.length=0}})}function z(b,c,e){var f=[];return x(function g(b,f){for(var g=0;g<f.length;g+=2){var h=f[g],i=f[g+1],j=null,k;if((k=b+"::"+h,a.ATTRIBS.hasOwnProperty(k))||(k="*::"+h,a.ATTRIBS.hasOwnProperty(k)))j=a.ATTRIBS[k];if(j!==null)switch(j){case a.atype.NONE:break;case a.atype.SCRIPT:case a.atype.STYLE:i=null;break;case a.atype.ID:case a.atype.IDREF:case a.atype.IDREFS:case a.atype.GLOBAL_NAME:case a.atype.LOCAL_NAME:case a.atype.CLASSES:i=e?e(i):i;break;case a.atype.URI:var l=(""+i).match(y);l?!l[1]||d.test(l[1])?i=c&&c(i):i=null:i=null;break;case a.atype.URI_FRAGMENT:i&&"#"===i.charAt(0)?(i=e?e(i):i,i&&(i="#"+i)):i=null;break;default:i=null}else i=null;f[g+1]=i}return f})(b,f),f.join("")}var b;"script"==="SCRIPT".toLowerCase()?b=function(a){return a.toLowerCase()}:b=function(a){return a.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)|32)})};var c={lt:"<",gt:">",amp:"&",nbsp:" ",quot:'"',apos:"'"},d=/^(?:https?|mailto|data)$/i,e=/^#(\d+)$/,f=/^#x([0-9A-Fa-f]+)$/,i=/\0/g,k=/&(#\d+|#x[0-9A-Fa-f]+|\w+);/g,m=/&/g,n=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,o=/</g,p=/>/g,q=/\"/g,r=/\=/g,u=new RegExp("^\\s*(?:(?:([a-z][a-z-]*)(\\s*=\\s*(\"[^\"]*\"|'[^']*'|(?=[a-z][a-z-]*\\s*=)|[^>\"'\\s]*))?)|(/?>)|[\\s\\S][^a-z\\s>]*)","i"),v=new RegExp("^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);|<!--[\\s\\S]*?-->|<!\\w[^>]*>|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))","i"),y=new RegExp("^(?:([^:/?#]+):)?");return{escapeAttrib:s,makeHtmlSanitizer:x,makeSaxParser:w,normalizeRCData:t,sanitize:z,unescapeEntities:l}}(html4),html_sanitize=html.sanitize;typeof window!="undefined"&&(window.html=html,window.html_sanitize=html_sanitize),html4.ATTRIBS["*::style"]=0,html4.ELEMENTS.style=0;var Mustache=function(){var a={},b=function(){};return b.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(a,b,c,d){d||(this.context=b,this.buffer=[]);if(!this.includes("",a)){if(d)return a;this.send(a);return}a=this.render_pragmas(a);var e=this.render_section(a,b,c);e===!1&&(e=this.render_tags(a,b,c,d));if(d)return e;this.sendLines(e)},send:function(a){a!==""&&this.buffer.push(a)},sendLines:function(a){if(a){var b=a.split("\n");for(var c=0;c<b.length;c++)this.send(b[c])}},render_pragmas:function(a){if(!this.includes("%",a))return a;var b=this,c=this.getCachedRegex("render_pragmas",function(a,b){return new RegExp(a+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+b,"g")});return a.replace(c,function(a,c,d){if(!b.pragmas_implemented[c])throw{message:"This implementation of mustache doesn't understand the '"+c+"' pragma"};b.pragmas[c]={};if(d){var e=d.split("=");b.pragmas[c][e[0]]=e[1]}return""})},render_partial:function(a,b,c){a=this.trim(a);if(!c||c[a]===undefined)throw{message:"unknown_partial '"+a+"'"};return typeof b[a]!="object"?this.render(c[a],b,c,!0):this.render(c[a],b[a],c,!0)},render_section:function(a,b,c){if(!this.includes("#",a)&&!this.includes("^",a))return!1;var d=this,e=this.getCachedRegex("render_section",function(a,b){return new RegExp("^([\\s\\S]*?)"+a+"(\\^|\\#)\\s*(.+)\\s*"+b+"\n*([\\s\\S]*?)"+a+"\\/\\s*\\3\\s*"+b+"\\s*([\\s\\S]*)$","g")});return a.replace(e,function(a,e,f,g,h,i){var j=e?d.render_tags(e,b,c,!0):"",k=i?d.render(i,b,c,!0):"",l,m=d.find(g,b);return f==="^"?!m||d.is_array(m)&&m.length===0?l=d.render(h,b,c,!0):l="":f==="#"&&(d.is_array(m)?l=d.map(m,function(a){return d.render(h,d.create_context(a),c,!0)}).join(""):d.is_object(m)?l=d.render(h,d.create_context(m),c,!0):typeof m=="function"?l=m.call(b,h,function(a){return d.render(a,b,c,!0)}):m?l=d.render(h,b,c,!0):l=""),j+l+k})},render_tags:function(a,b,c,d){var e=this,f=function(){return e.getCachedRegex("render_tags",function(a,b){return new RegExp(a+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+b+"+","g")})},g=f(),h=function(a,d,h){switch(d){case"!":return"";case"=":return e.set_delimiters(h),g=f(),"";case">":return e.render_partial(h,b,c);case"{":return e.find(h,b);default:return e.escape(e.find(h,b))}},i=a.split("\n");for(var j=0;j<i.length;j++)i[j]=i[j].replace(g,h,this),d||this.send(i[j]);if(d)return i.join("\n")},set_delimiters:function(a){var b=a.split(" ");this.otag=this.escape_regex(b[0]),this.ctag=this.escape_regex(b[1])},escape_regex:function(a){if(!arguments.callee.sRE){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+b.join("|\\")+")","g")}return a.replace(arguments.callee.sRE,"\\$1")},find:function(a,b){function c(a){return a===!1||a===0||a}a=this.trim(a);var d;return c(b[a])?d=b[a]:c(this.context[a])&&(d=this.context[a]),typeof d=="function"?d.apply(b):d!==undefined?d:""},includes:function(a,b){return b.indexOf(this.otag+a)!=-1},escape:function(a){return a=String(a===null?"":a),a.replace(/&(?!\w+;)|["'<>\\]/g,function(a){switch(a){case"&":return"&";case'"':return""";case"'":return"'";case"<":return"<";case">":return">";default:return a}})},create_context:function(a){if(this.is_object(a))return a;var b=".";this.pragmas["IMPLICIT-ITERATOR"]&&(b=this.pragmas["IMPLICIT-ITERATOR"].iterator);var c={};return c[b]=a,c},is_object:function(a){return a&&typeof a=="object"},is_array:function(a){return Object.prototype.toString.call(a)==="[object Array]"},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},map:function(a,b){if(typeof a.map=="function")return a.map(b);var c=[],d=a.length;for(var e=0;e<d;e++)c.push(b(a[e]));return c},getCachedRegex:function(b,c){var d=a[this.otag];d||(d=a[this.otag]={});var e=d[this.ctag];e||(e=d[this.ctag]={});var f=e[b];return f||(f=e[b]=c(this.otag,this.ctag)),f}},{name:"mustache.js",version:"0.4.0-dev",to_html:function(a,c,d,e){var f=new b;e&&(f.send=e),f.render(a,c||{},d);if(!e)return f.buffer.join("\n")}}}(),wax=wax||{};wax.ol=wax.ol||{},wax.ol.connector=function(a){for(var b=0;b<a.tiles.length;b++)a.tiles[b]=a.tiles[b].replace("{z}","${z}").replace("{x}","${x}").replace("{y}","${y}");return new OpenLayers.Layer.XYZ(a.name,a.tiles,{sphericalMercator:!0,zoomOffset:a.minzoom,numZoomLevels:a.maxzoom-a.minzoom})},wax=wax||{},wax.attribution=function(){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var a,b={};return b.set=function(b){if(typeof b=="undefined")return;return a.innerHTML=html_sanitize(b,c,d),this},b.element=function(){return a},b.init=function(){return a=document.createElement("div"),a.className="wax-attribution",this},b.init()},wax=wax||{},wax.bwdetect=function(a,b){function h(){wax.bw=-1;var a=new Image;a.src=e;var b=!0,f=setTimeout(function(){b&&wax.bw==-1&&(c.bw(0),b=!1)},d);a.onload=function(){b&&wax.bw==-1&&(clearTimeout(f),c.bw(1),b=!1)}}var c={},d=a.threshold||400,e="http://a.tiles.mapbox.com/mapbox/1.0.0/blue-marble-topo-bathy-jul/0/0/0.png?preventcache="+ +(new Date),f=1,g=a.auto===undefined?!0:a.auto;return c.bw=function(a){if(!arguments.length)return f;var c=f;wax.bwlisteners&&wax.bwlisteners.length&&function(){listeners=wax.bwlisteners,wax.bwlisteners=[];for(i=0;i<listeners;i++)listeners[i](a)}(),wax.bw=a,f!=(f=a)&&b(a)},c.add=function(){return g&&h(),this},wax.bw==-1?(wax.bwlisteners=wax.bwlisteners||[],wax.bwlisteners.push(c.bw)):wax.bw!==undefined?c.bw(wax.bw):c.add(),c},wax.formatter=function(x){function urlX(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function idX(a){return a}var formatter={},f;if(x&&typeof x=="string")try{eval("f = "+x)}catch(e){console&&console.log(e)}else x&&typeof x=="function"?f=x:f=function(){};return formatter.format=function(a,b){try{return html_sanitize(f(a,b),urlX,idX)}catch(c){console&&console.log(c)}},formatter},wax.GridInstance=function(a,b,c){function g(a){return a>=93&&a--,a>=35&&a--,a-=32,a}c=c||{};var d={},e=c.resolution||4,f=c.tileSize||256;return d.grid_tile=function(){return a},d.getKey=function(b,c){if(!a||!a.grid)return;if(c<0||b<0)return;if(Math.floor(c)>=f||Math.floor(b)>=f)return;return g(a.grid[Math.floor(c/e)].charCodeAt(Math.floor(b/e)))},d.gridFeature=function(b,c){var d=this.getKey(b,c),e=a.keys;if(e&&e[d]&&a.data[e[d]])return a.data[e[d]]},d.tileFeature=function(c,d,e,f){if(!a)return;var g=wax.util.offset(e);feature=this.gridFeature(c-g.left,d-g.top);if(feature)return b.format(f,feature)},d},wax.GridManager=function(a){function h(a){return typeof a=="string"&&(a=[a]),function b(b){if(!b)return;var c=new RegExp("/(\\d+)\\/(\\d+)\\/(\\d+)\\.[\\w\\._]+"),d=c.exec(b);if(!d)return;return a[parseInt(d[2],10)%a.length].replace("{z}",d[1]).replace("{x}",d[2]).replace("{y}",d[3])}}a=a||{};var b=a.resolution||4,c=a.version||"1.1",d={},e={},f,g=function(a){return a.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json")};return e.formatter=function(a){return arguments.length?(f=wax.formatter(a),e):f},e.template=function(a){return arguments.length?(f=wax.template(a),e):f},e.gridUrl=function(a){return arguments.length?(g=typeof a=="function"?a:h(a),e):g},e.getGrid=function(a,c){var d=g(a);return!f||!d?c(null,null):(wax.request.get(d,function(a,d){if(a)return c(a,null);c(null,wax.GridInstance(d,f,{resolution:b||4}))}),e)},e.add=function(a){return a.template?e.template(a.template):a.formatter&&e.formatter(a.formatter),a.grids&&e.gridUrl(a.grids),this},e.add(a)},wax=wax||{},wax.hash=function(a){function b(){return location.hash.substring(1)}function c(a){location.hash="#"+a}function g(b){var c=b.split("/");for(var d=0;d<c.length;d++){c[d]=Number(c[d]);if(isNaN(c[d]))return!0}if(c.length<3)return!0;c.length==3&&a.setCenterZoom(c)}function h(){var b=a.getCenterZoom();d!==b&&(d=b,c(d))}function i(a){if(a===d)return;g(d=a)&&h()}a=a||{};var d,e={},f=90-1e-8,j=wax.util.throttle(h,500);return e.add=function(){return i(b()),a.bindChange(j),this},e.remove=function(){return a.unbindChange(j),this},e.add()};var wax=wax||{};wax.legend=function(){function d(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function e(a){return a}var a,b={},c;return b.element=function(){return c},b.content=function(b){return arguments.length?(b?(a.innerHTML=html_sanitize(b,d,e),a.style.display="block"):(a.innerHTML="",a.style.display="none"),this):a.innerHTML},b.add=function(){return c=document.createElement("div"),c.className="wax-legends",a=document.createElement("div"),a.className="wax-legend",a.style.display="none",c.appendChild(a),this},b.add()};var w=function(a){return a.melt=function(b,c){return b.apply(c,[a,c])},a},wax=wax||{};wax.movetip={},wax.movetip=function(a){function g(a){return a&&a.className.indexOf("wax-popup")!==-1}function h(a,b){var c=document.createElement("div");return c.className="wax-movetip",c.style.cssText="position:absolute;",c.innerHTML=a,b.appendChild(c),d=b,_tooltipOffset=wax.util.offset(c),_contextOffset=wax.util.offset(d),c}function i(a){if(!c)return;var b=wax.util.eventoffset(a);c.className="wax-movetip",_tooltipOffset.height+b.y>_contextOffset.top+_contextOffset.height&&_contextOffset.height>_tooltipOffset.height&&(b.y-=_tooltipOffset.height,c.className+=" flip-y"),_tooltipOffset.width+b.x>_contextOffset.left+_contextOffset.width&&(b.x-=_tooltipOffset.width,c.className+=" flip-x"),c.style.left=b.x+"px",c.style.top=b.y+"px"}function j(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&e?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&e&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+e):a.parentNode&&a.parentNode.removeChild(a)}function k(a,b){c&&(j(c),c=undefined);var d=h(a,b);d.className+=" wax-popup",d.innerHTML=a;var e=document.createElement("a");e.href="#close",e.className="close",e.innerHTML="Close",d.appendChild(e);var f=function(a){return j(d),c=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1};e.addEventListener?e.addEventListener("click",f,!1):e.attachEvent&&e.attachEvent("onclick",f),c=d}a=a||{};var b={},c=undefined,d=undefined,e=a.animationOut,f=a.animationIn;return b.over=function(a,b,d){if(!a)return;b.style.cursor="pointer";if(g(c))return;c=h(a,b),i(d),b.addEventListener&&b.addEventListener("mousemove",i)},b.out=function(a){a.style.cursor="default";if(g(c))return;c&&(j(c),a.removeEventListener&&a.removeEventListener("mousemove",i),c=undefined)},b};var wax=wax||{};wax.request={cache:{},locks:{},promises:{},get:function(a,b){if(this.cache[a])return b(this.cache[a][0],this.cache[a][1]);this.promises[a]=this.promises[a]||[],this.promises[a].push(b);if(this.locks[a])return;var c=this;this.locks[a]=!0,reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(b){c.locks[a]=!1,c.cache[a]=[null,b];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])},error:function(b){c.locks[a]=!1,c.cache[a]=[b,null];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])}})}},wax.template=function(a){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var b={};return b.format=function(b,e){var f={};for(var g in e)f[g]=e[g];return b.format&&(f["__"+b.format+"__"]=!0),html_sanitize(Mustache.to_html(a,f),c,d)},b};if(!wax)var wax={};wax.tilejson=function(a,b){reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:b,error:b})};var wax=wax||{};wax.tooltip={},wax.tooltip=function(a){this._currentTooltip=undefined,a=a||{},a.animationOut&&(this.animationOut=a.animationOut),a.animationIn&&(this.animationIn=a.animationIn)},wax.tooltip.prototype.isPopup=function(a){return a&&a.className.indexOf("wax-popup")!==-1},wax.tooltip.prototype.getTooltip=function(a,b){var c=document.createElement("div");return c.className="wax-tooltip wax-tooltip-0",c.innerHTML=a,b.appendChild(c),c},wax.tooltip.prototype.hideTooltip=function(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&this.animationOut?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&this.animationOut&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+this.animationOut):a.parentNode&&a.parentNode.removeChild(a)},wax.tooltip.prototype.click=function(a,b){this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined);var c=this.getTooltip(a,b);c.className+=" wax-popup",c.innerHTML=a;var d=document.createElement("a");d.href="#close",d.className="close",d.innerHTML="Close",c.appendChild(d);var e=wax.util.bind(function(a){return this.hideTooltip(c),this._currentTooltip=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1},this);d.addEventListener?(d.addEventListener("click",e,!1),d.addEventListener("touchend",e,!1)):d.attachEvent&&d.attachEvent("onclick",e),this._currentTooltip=c},wax.tooltip.prototype.over=function(a,b){if(!a)return;b.style.cursor="pointer";if(this.isPopup(this._currentTooltip))return;this._currentTooltip=this.getTooltip(a,b)},wax.tooltip.prototype.out=function(a){a.style.cursor="default";if(this.isPopup(this._currentTooltip))return;this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined)};var wax=wax||{};wax.util=wax.util||{},wax.util={offset:function(a){var b=a.offsetWidth||parseInt(a.style.width,10),c=a.offsetHeight||parseInt(a.style.height,10),d=document.body,e=0,f=0,g=function(a){if(a===d||a===document.documentElement)return;e+=a.offsetTop,f+=a.offsetLeft;var b=a.style.transform||a.style.WebkitTransform||a.style.OTransform||a.style.MozTransform||a.style.msTransform;if(b)if(match=b.match(/translate\((.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/translate3d\((.+)px, (.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/matrix3d\(([\-\d,\s]+)\)/)){var c=match[1].split(",");e+=parseInt(c[13],10),f+=parseInt(c[12],10)}else if(match=b.match(/matrix\(.+, .+, .+, .+, (.+), (.+)\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10)};g(a);try{while(a=a.offsetParent)g(a)}catch(h){}e+=d.offsetTop,f+=d.offsetLeft,e+=d.parentNode.offsetTop,f+=d.parentNode.offsetLeft;var i=document.defaultView?window.getComputedStyle(d.parentNode,null):d.parentNode.currentStyle;return d.parentNode.offsetTop!==parseInt(i.marginTop,10)&&!isNaN(parseInt(i.marginTop,10))&&(e+=parseInt(i.marginTop,10),f+=parseInt(i.marginLeft,10)),{top:e,left:f,height:c,width:b}},$:function(a){return typeof a=="string"?document.getElementById(a):a},bind:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,c.concat(Array.prototype.slice.call(arguments)))}},isString:function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)},indexOf:function(a,b){var c=Array.prototype.indexOf;if(a===null)return-1;var d,e;if(c&&a.indexOf===c)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(a[d]===b)return d;return-1},isArray:Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},keys:Object.keys||function(a){var b=Object.prototype.hasOwnProperty;if(a!==Object(a))throw new TypeError("Invalid object");var c=[];for(var d in a)b.call(a,d)&&(c[c.length]=d);return c},eventoffset:function(a){var b=0,c=0;if(!a)var a=window.event;if(a.pageX||a.pageY)return{x:a.pageX,y:a.pageY};if(a.clientX||a.clientY){var d=document.documentElement,e=document.body,f=document.body.parentNode.currentStyle,g=parseInt(f.marginTop,10)||0,h=parseInt(f.marginLeft,10)||0;return{x:a.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0)+h,y:a.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)+g}}if(a.touches&&a.touches.length===1)return{x:a.touches[0].pageX,y:a.touches[0].pageY}},limit:function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d);if(c||!d)d=setTimeout(g,b)}},throttle:function(a,b){return this.limit(a,b,!1)}};var wax=wax||{};wax.ol=wax.ol||{};var addEv=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)};wax.ol.Interaction=OpenLayers.Class(OpenLayers.Control,{feature:{},handlerOptions:null,handlers:null,gm:new wax.GridManager,initialize:function(a,b){this.options=b||{},this.clickAction=this.options.clickAction||"full",this.gm=new wax.GridManager(a),OpenLayers.Control.prototype.initialize.apply(this,[this.options||{}]),this.callbacks=this.options.callbacks||new wax.tooltip},setMap:function(a){addEv(a.viewPortDiv,"mousemove",wax.util.bind(this.getInfoForHover,this)),addEv(a.viewPortDiv,"mouseout",wax.util.bind(this.resetLayers,this)),this.clickHandler=new OpenLayers.Handler.Click(this,{click:this.getInfoForClick}),this.clickHandler.setMap(a),this.clickHandler.activate(),a.events.on({addlayer:this.resetLayers,changelayer:this.resetLayers,removelayer:this.resetLayers,changebaselayer:this.resetLayers,scope:this}),OpenLayers.Control.prototype.setMap.apply(this,arguments)},getTileStack:function(a,b){if(!a||!b)return[];var c=[];d:for(var e=0;e<a.length;e++)for(var f=0;f<a[e].grid.length;f++)for(var g=0;g<a[e].grid[f].length;g++){var h;a[e].grid[f][g].imgDiv?h=wax.util.offset(a[e].grid[f][g].imgDiv):h=wax.util.offset(a[e].grid[f][g].frame);if(h&&h.top<b.y&&h.top+256>b.y&&h.left<b.x&&h.left+256>b.x){c.push(a[e].grid[f][g]);continue d}}return c},viableLayers:function(){if(this._viableLayers)return this._viableLayers;this._viableLayers=[];for(var a in this.map.layers)this.map.layers[a].visibility===!0&&this.map.layers[a].CLASS_NAME==="OpenLayers.Layer.TMS"&&this._viableLayers.push(this.map.layers[a]);return this._viableLayers},resetLayers:function(a){this._viableLayers=null;var b=a.relatedTarget||a.toElement;b&&b.className!=="olTileImage"&&this.callbacks.out(this.map.viewPortDiv)},getInfoForClick:function(a){if(!a)return;var b=this.viableLayers(),c=wax.util.eventoffset(a),d=this.getTileStack(this.viableLayers(),c),e=null,f=null,g=this;for(var h=0;h<d.length;h++){if(!d[h].url)continue;this.gm.getGrid(d[h].url,function(a,b){if(!b)return;var e=b.tileFeature(c.x,c.y,d[h].frame||d[h].imgDiv,{format:g.clickAction});if(e)switch(g.clickAction){case"full":g.callbacks.click(e,d[h].layer.map.viewPortDiv,h);break;case"location":window.location=e}})}},getInfoForHover:function(a){if(!a)return;var b={format:"teaser"},c=this.viableLayers(),d=wax.util.eventoffset(a),e=this.getTileStack(this.viableLayers(),d),f=null,g=null,h=this;for(var i=0;i<e.length;i++){if(!e[i].url)continue;this.gm.getGrid(e[i].url,function(c,f){if(f&&e[i]){var g=f.tileFeature(d.x,d.y,e[i].frame||e[i].imgDiv,b);if(g){if(!e[i])return;g&&h.feature[i]!==g?(h.feature[i]=g,h.callbacks.out(e[i].layer.map.div),h.callbacks.over(g,e[i].layer.map.div,a)):g||(h.feature[i]=null,h.callbacks.out(e[i].layer.map.div))}else h.feature[i]&&h.callbacks.out(e[i].layer.map.div),h.feature[i]=null}})}},CLASS_NAME:"wax.ol.Interaction"});var wax=wax||{};wax.ol=wax.ol||{},wax.ol.Legend=OpenLayers.Class(OpenLayers.Control,{CLASS_NAME:"wax.ol.Legend" | ||
,legend:null,options:null,initialize:function(a){this.options=a||{},OpenLayers.Control.prototype.initialize.apply(this,[a||{}])},activate:function(){return this.legend=new wax.Legend(this.map.viewPortDiv,this.options.container),OpenLayers.Control.prototype.activate.apply(this,arguments)},setMap:function(a){OpenLayers.Control.prototype.setMap.apply(this,arguments),this.activate(),this.map.events.on({addlayer:this.setLegend,changelayer:this.setLegend,removelayer:this.setLegend,changebaselayer:this.setLegend,scope:this})},setLegend:function(){var a=[];for(var b=0;b<this.map.layers.length;b++){var c=this.map.layers[b];c&&c.getURL&&c.visibility&&a.push(c.getURL(new OpenLayers.Bounds))}this.legend.render(a)}}) |
@@ -1,2 +0,2 @@ | ||
/* wax - 4.1.6 - 1.0.4-482-g8a293d4 */ | ||
/* wax - 4.1.7 - 1.0.4-483-gbb64c65 */ | ||
@@ -261,3 +261,4 @@ | ||
if (!url) return; | ||
var xyz = /(\d+)\/(\d+)\/(\d+)\.[\w\._]+/g.exec(url); | ||
var rx = new RegExp('/(\\d+)\\/(\\d+)\\/(\\d+)\\.[\\w\\._]+'); | ||
var xyz = rx.exec(url); | ||
if (!xyz) return; | ||
@@ -264,0 +265,0 @@ return template[parseInt(xyz[2], 10) % template.length] |
@@ -1,2 +0,2 @@ | ||
/* wax - 4.1.6 - 1.0.4-482-g8a293d4 *//*! | ||
/* wax - 4.1.7 - 1.0.4-483-gbb64c65 *//*! | ||
* Reqwest! A general purpose XHR connection manager | ||
@@ -6,2 +6,2 @@ * copyright Dustin Diaz 2011 | ||
* license MIT | ||
*/!function(context,win){function serial(a){var b=a.name;if(a.disabled||!b)return"";b=enc(b);switch(a.tagName.toLowerCase()){case"input":switch(a.type){case"reset":case"button":case"image":case"file":return"";case"checkbox":case"radio":return a.checked?b+"="+(a.value?enc(a.value):!0)+"&":"";default:return b+"="+(a.value?enc(a.value):"")+"&"}break;case"textarea":return b+"="+enc(a.value)+"&";case"select":return b+"="+enc(a.options[a.selectedIndex].value)+"&"}return""}function enc(a){return encodeURIComponent(a)}function reqwest(a,b){return new Reqwest(a,b)}function init(o,fn){function error(a){o.error&&o.error(a),complete(a)}function success(resp){o.timeout&&clearTimeout(self.timeout)&&(self.timeout=null);var r=resp.responseText;if(r)switch(type){case"json":resp=win.JSON?win.JSON.parse(r):eval("("+r+")");break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function complete(a){o.complete&&o.complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort(),error()},o.timeout)),this.request=getRequest(o,success,error)}function setType(a){return/\.json$/.test(a)?"json":/\.jsonp$/.test(a)?"jsonp":/\.js$/.test(a)?"js":/\.html?$/.test(a)?"html":/\.xml$/.test(a)?"xml":"js"}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function getRequest(a,b,c){if(a.type!="jsonp"){var d=xhr();return d.open(a.method||"GET",typeof a=="string"?a:a.url,!0),setHeaders(d,a),d.onreadystatechange=handleReadyState(d,b,c),a.before&&a.before(d),d.send(a.data||null),d}var e=doc.createElement("script"),f=0;win[getCallbackName(a)]=generalCallback,e.type="text/javascript",e.src=a.url,e.async=!0,e.onload=e.onreadystatechange=function(){if(e[readyState]&&e[readyState]!=="complete"&&e[readyState]!=="loaded"||f)return!1;e.onload=e.onreadystatechange=null,a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(e),f=1},head.appendChild(e)}function generalCallback(a){lastValue=a}function getCallbackName(a){var b=a.jsonpCallback||"callback";if(a.url.slice(-(b.length+2))==b+"=?"){var c="reqwest_"+uniqid++;return a.url=a.url.substr(0,a.url.length-1)+c,c}var d=new RegExp(b+"=([\\w]+)");return a.url.match(d)[1]}function setHeaders(a,b){var c=b.headers||{};c.Accept=c.Accept||"text/javascript, text/html, application/xml, text/xml, */*",b.crossOrigin||(c["X-Requested-With"]=c["X-Requested-With"]||"XMLHttpRequest"),c[contentType]=c[contentType]||"application/x-www-form-urlencoded";for(var d in c)c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d],!1)}function handleReadyState(a,b,c){return function(){a&&a[readyState]==4&&(twoHundo.test(a.status)?b(a):c(a))}}var twoHundo=/^20\d$/,doc=document,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",head=doc[byTag]("head")[0],uniqid=0,lastValue,xhr="XMLHttpRequest"in win?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serialize=function(a){var b=[a[byTag]("input"),a[byTag]("select"),a[byTag]("textarea")],c=[],d,e;for(d=0,l=b.length;d<l;++d)for(e=0,l2=b[d].length;e<l2;++e)c.push(serial(b[d][e]));return c.join("").replace(/&$/,"")},reqwest.serializeArray=function(a){for(var b=this.serialize(a).split("&"),c=0,d=b.length,e=[],f;c<d;c++)b[c]&&(f=b[c].split("="))&&e.push({name:f[0],value:f[1]});return e};var old=context.reqwest;reqwest.noConflict=function(){return context.reqwest=old,this},typeof module!="undefined"?module.exports=reqwest:context.reqwest=reqwest}(this,window),wax=wax||{},wax.attribution=function(){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var a,b={};return b.set=function(b){if(typeof b=="undefined")return;return a.innerHTML=html_sanitize(b,c,d),this},b.element=function(){return a},b.init=function(){return a=document.createElement("div"),a.className="wax-attribution",this},b.init()},wax=wax||{},wax.bwdetect=function(a,b){function h(){wax.bw=-1;var a=new Image;a.src=e;var b=!0,f=setTimeout(function(){b&&wax.bw==-1&&(c.bw(0),b=!1)},d);a.onload=function(){b&&wax.bw==-1&&(clearTimeout(f),c.bw(1),b=!1)}}var c={},d=a.threshold||400,e="http://a.tiles.mapbox.com/mapbox/1.0.0/blue-marble-topo-bathy-jul/0/0/0.png?preventcache="+ +(new Date),f=1,g=a.auto===undefined?!0:a.auto;return c.bw=function(a){if(!arguments.length)return f;var c=f;wax.bwlisteners&&wax.bwlisteners.length&&function(){listeners=wax.bwlisteners,wax.bwlisteners=[];for(i=0;i<listeners;i++)listeners[i](a)}(),wax.bw=a,f!=(f=a)&&b(a)},c.add=function(){return g&&h(),this},wax.bw==-1?(wax.bwlisteners=wax.bwlisteners||[],wax.bwlisteners.push(c.bw)):wax.bw!==undefined?c.bw(wax.bw):c.add(),c},wax.formatter=function(x){function urlX(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function idX(a){return a}var formatter={},f;if(x&&typeof x=="string")try{eval("f = "+x)}catch(e){console&&console.log(e)}else x&&typeof x=="function"?f=x:f=function(){};return formatter.format=function(a,b){try{return html_sanitize(f(a,b),urlX,idX)}catch(c){console&&console.log(c)}},formatter},wax.GridInstance=function(a,b,c){function g(a){return a>=93&&a--,a>=35&&a--,a-=32,a}c=c||{};var d={},e=c.resolution||4,f=c.tileSize||256;return d.grid_tile=function(){return a},d.getKey=function(b,c){if(!a||!a.grid)return;if(c<0||b<0)return;if(Math.floor(c)>=f||Math.floor(b)>=f)return;return g(a.grid[Math.floor(c/e)].charCodeAt(Math.floor(b/e)))},d.gridFeature=function(b,c){var d=this.getKey(b,c),e=a.keys;if(e&&e[d]&&a.data[e[d]])return a.data[e[d]]},d.tileFeature=function(c,d,e,f){if(!a)return;var g=wax.util.offset(e);feature=this.gridFeature(c-g.left,d-g.top);if(feature)return b.format(f,feature)},d},wax.GridManager=function(a){function h(a){return typeof a=="string"&&(a=[a]),function b(b){if(!b)return;var c=/(\d+)\/(\d+)\/(\d+)\.[\w\._]+/g.exec(b);if(!c)return;return a[parseInt(c[2],10)%a.length].replace("{z}",c[1]).replace("{x}",c[2]).replace("{y}",c[3])}}a=a||{};var b=a.resolution||4,c=a.version||"1.1",d={},e={},f,g=function(a){return a.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json")};return e.formatter=function(a){return arguments.length?(f=wax.formatter(a),e):f},e.template=function(a){return arguments.length?(f=wax.template(a),e):f},e.gridUrl=function(a){return arguments.length?(g=typeof a=="function"?a:h(a),e):g},e.getGrid=function(a,c){var d=g(a);return!f||!d?c(null,null):(wax.request.get(d,function(a,d){if(a)return c(a,null);c(null,wax.GridInstance(d,f,{resolution:b||4}))}),e)},e.add=function(a){return a.template?e.template(a.template):a.formatter&&e.formatter(a.formatter),a.grids&&e.gridUrl(a.grids),this},e.add(a)},wax=wax||{},wax.hash=function(a){function b(){return location.hash.substring(1)}function c(a){location.hash="#"+a}function g(b){var c=b.split("/");for(var d=0;d<c.length;d++){c[d]=Number(c[d]);if(isNaN(c[d]))return!0}if(c.length<3)return!0;c.length==3&&a.setCenterZoom(c)}function h(){var b=a.getCenterZoom();d!==b&&(d=b,c(d))}function i(a){if(a===d)return;g(d=a)&&h()}a=a||{};var d,e={},f=90-1e-8,j=wax.util.throttle(h,500);return e.add=function(){return i(b()),a.bindChange(j),this},e.remove=function(){return a.unbindChange(j),this},e.add()};var wax=wax||{};wax.legend=function(){function d(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function e(a){return a}var a,b={},c;return b.element=function(){return c},b.content=function(b){return arguments.length?(b?(a.innerHTML=html_sanitize(b,d,e),a.style.display="block"):(a.innerHTML="",a.style.display="none"),this):a.innerHTML},b.add=function(){return c=document.createElement("div"),c.className="wax-legends",a=document.createElement("div"),a.className="wax-legend",a.style.display="none",c.appendChild(a),this},b.add()};var w=function(a){return a.melt=function(b,c){return b.apply(c,[a,c])},a},wax=wax||{};wax.movetip={},wax.movetip=function(a){function g(a){return a&&a.className.indexOf("wax-popup")!==-1}function h(a,b){var c=document.createElement("div");return c.className="wax-movetip",c.style.cssText="position:absolute;",c.innerHTML=a,b.appendChild(c),d=b,_tooltipOffset=wax.util.offset(c),_contextOffset=wax.util.offset(d),c}function i(a){if(!c)return;var b=wax.util.eventoffset(a);c.className="wax-movetip",_tooltipOffset.height+b.y>_contextOffset.top+_contextOffset.height&&_contextOffset.height>_tooltipOffset.height&&(b.y-=_tooltipOffset.height,c.className+=" flip-y"),_tooltipOffset.width+b.x>_contextOffset.left+_contextOffset.width&&(b.x-=_tooltipOffset.width,c.className+=" flip-x"),c.style.left=b.x+"px",c.style.top=b.y+"px"}function j(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&e?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&e&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+e):a.parentNode&&a.parentNode.removeChild(a)}function k(a,b){c&&(j(c),c=undefined);var d=h(a,b);d.className+=" wax-popup",d.innerHTML=a;var e=document.createElement("a");e.href="#close",e.className="close",e.innerHTML="Close",d.appendChild(e);var f=function(a){return j(d),c=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1};e.addEventListener?e.addEventListener("click",f,!1):e.attachEvent&&e.attachEvent("onclick",f),c=d}a=a||{};var b={},c=undefined,d=undefined,e=a.animationOut,f=a.animationIn;return b.over=function(a,b,d){if(!a)return;b.style.cursor="pointer";if(g(c))return;c=h(a,b),i(d),b.addEventListener&&b.addEventListener("mousemove",i)},b.out=function(a){a.style.cursor="default";if(g(c))return;c&&(j(c),a.removeEventListener&&a.removeEventListener("mousemove",i),c=undefined)},b};var wax=wax||{};wax.request={cache:{},locks:{},promises:{},get:function(a,b){if(this.cache[a])return b(this.cache[a][0],this.cache[a][1]);this.promises[a]=this.promises[a]||[],this.promises[a].push(b);if(this.locks[a])return;var c=this;this.locks[a]=!0,reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(b){c.locks[a]=!1,c.cache[a]=[null,b];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])},error:function(b){c.locks[a]=!1,c.cache[a]=[b,null];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])}})}},wax.template=function(a){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var b={};return b.format=function(b,e){var f={};for(var g in e)f[g]=e[g];return b.format&&(f["__"+b.format+"__"]=!0),html_sanitize(Mustache.to_html(a,f),c,d)},b};if(!wax)var wax={};wax.tilejson=function(a,b){reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:b,error:b})};var wax=wax||{};wax.tooltip={},wax.tooltip=function(a){this._currentTooltip=undefined,a=a||{},a.animationOut&&(this.animationOut=a.animationOut),a.animationIn&&(this.animationIn=a.animationIn)},wax.tooltip.prototype.isPopup=function(a){return a&&a.className.indexOf("wax-popup")!==-1},wax.tooltip.prototype.getTooltip=function(a,b){var c=document.createElement("div");return c.className="wax-tooltip wax-tooltip-0",c.innerHTML=a,b.appendChild(c),c},wax.tooltip.prototype.hideTooltip=function(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&this.animationOut?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&this.animationOut&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+this.animationOut):a.parentNode&&a.parentNode.removeChild(a)},wax.tooltip.prototype.click=function(a,b){this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined);var c=this.getTooltip(a,b);c.className+=" wax-popup",c.innerHTML=a;var d=document.createElement("a");d.href="#close",d.className="close",d.innerHTML="Close",c.appendChild(d);var e=wax.util.bind(function(a){return this.hideTooltip(c),this._currentTooltip=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1},this);d.addEventListener?(d.addEventListener("click",e,!1),d.addEventListener("touchend",e,!1)):d.attachEvent&&d.attachEvent("onclick",e),this._currentTooltip=c},wax.tooltip.prototype.over=function(a,b){if(!a)return;b.style.cursor="pointer";if(this.isPopup(this._currentTooltip))return;this._currentTooltip=this.getTooltip(a,b)},wax.tooltip.prototype.out=function(a){a.style.cursor="default";if(this.isPopup(this._currentTooltip))return;this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined)};var wax=wax||{};wax.util=wax.util||{},wax.util={offset:function(a){var b=a.offsetWidth||parseInt(a.style.width,10),c=a.offsetHeight||parseInt(a.style.height,10),d=document.body,e=0,f=0,g=function(a){if(a===d||a===document.documentElement)return;e+=a.offsetTop,f+=a.offsetLeft;var b=a.style.transform||a.style.WebkitTransform||a.style.OTransform||a.style.MozTransform||a.style.msTransform;if(b)if(match=b.match(/translate\((.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/translate3d\((.+)px, (.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/matrix3d\(([\-\d,\s]+)\)/)){var c=match[1].split(",");e+=parseInt(c[13],10),f+=parseInt(c[12],10)}else if(match=b.match(/matrix\(.+, .+, .+, .+, (.+), (.+)\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10)};g(a);try{while(a=a.offsetParent)g(a)}catch(h){}e+=d.offsetTop,f+=d.offsetLeft,e+=d.parentNode.offsetTop,f+=d.parentNode.offsetLeft;var i=document.defaultView?window.getComputedStyle(d.parentNode,null):d.parentNode.currentStyle;return d.parentNode.offsetTop!==parseInt(i.marginTop,10)&&!isNaN(parseInt(i.marginTop,10))&&(e+=parseInt(i.marginTop,10),f+=parseInt(i.marginLeft,10)),{top:e,left:f,height:c,width:b}},$:function(a){return typeof a=="string"?document.getElementById(a):a},bind:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,c.concat(Array.prototype.slice.call(arguments)))}},isString:function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)},indexOf:function(a,b){var c=Array.prototype.indexOf;if(a===null)return-1;var d,e;if(c&&a.indexOf===c)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(a[d]===b)return d;return-1},isArray:Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},keys:Object.keys||function(a){var b=Object.prototype.hasOwnProperty;if(a!==Object(a))throw new TypeError("Invalid object");var c=[];for(var d in a)b.call(a,d)&&(c[c.length]=d);return c},eventoffset:function(a){var b=0,c=0;if(!a)var a=window.event;if(a.pageX||a.pageY)return{x:a.pageX,y:a.pageY};if(a.clientX||a.clientY){var d=document.documentElement,e=document.body,f=document.body.parentNode.currentStyle,g=parseInt(f.marginTop,10)||0,h=parseInt(f.marginLeft,10)||0;return{x:a.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0)+h,y:a.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)+g}}if(a.touches&&a.touches.length===1)return{x:a.touches[0].pageX,y:a.touches[0].pageY}},limit:function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d);if(c||!d)d=setTimeout(g,b)}},throttle:function(a,b){return this.limit(a,b,!1)}};var wax=wax||{};wax.p=wax.p||{},wax.p.connector=function(a){var b=org.polymaps;if(a.scheme==="tms")throw new Error("Wax only supports XYZ TileJSON urls.");return b.image().url(a.tiles[0].replace(/\{\w\}/g,function(a){return a.toUpperCase()}))} | ||
*/!function(context,win){function serial(a){var b=a.name;if(a.disabled||!b)return"";b=enc(b);switch(a.tagName.toLowerCase()){case"input":switch(a.type){case"reset":case"button":case"image":case"file":return"";case"checkbox":case"radio":return a.checked?b+"="+(a.value?enc(a.value):!0)+"&":"";default:return b+"="+(a.value?enc(a.value):"")+"&"}break;case"textarea":return b+"="+enc(a.value)+"&";case"select":return b+"="+enc(a.options[a.selectedIndex].value)+"&"}return""}function enc(a){return encodeURIComponent(a)}function reqwest(a,b){return new Reqwest(a,b)}function init(o,fn){function error(a){o.error&&o.error(a),complete(a)}function success(resp){o.timeout&&clearTimeout(self.timeout)&&(self.timeout=null);var r=resp.responseText;if(r)switch(type){case"json":resp=win.JSON?win.JSON.parse(r):eval("("+r+")");break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function complete(a){o.complete&&o.complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort(),error()},o.timeout)),this.request=getRequest(o,success,error)}function setType(a){return/\.json$/.test(a)?"json":/\.jsonp$/.test(a)?"jsonp":/\.js$/.test(a)?"js":/\.html?$/.test(a)?"html":/\.xml$/.test(a)?"xml":"js"}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function getRequest(a,b,c){if(a.type!="jsonp"){var d=xhr();return d.open(a.method||"GET",typeof a=="string"?a:a.url,!0),setHeaders(d,a),d.onreadystatechange=handleReadyState(d,b,c),a.before&&a.before(d),d.send(a.data||null),d}var e=doc.createElement("script"),f=0;win[getCallbackName(a)]=generalCallback,e.type="text/javascript",e.src=a.url,e.async=!0,e.onload=e.onreadystatechange=function(){if(e[readyState]&&e[readyState]!=="complete"&&e[readyState]!=="loaded"||f)return!1;e.onload=e.onreadystatechange=null,a.success&&a.success(lastValue),lastValue=undefined,head.removeChild(e),f=1},head.appendChild(e)}function generalCallback(a){lastValue=a}function getCallbackName(a){var b=a.jsonpCallback||"callback";if(a.url.slice(-(b.length+2))==b+"=?"){var c="reqwest_"+uniqid++;return a.url=a.url.substr(0,a.url.length-1)+c,c}var d=new RegExp(b+"=([\\w]+)");return a.url.match(d)[1]}function setHeaders(a,b){var c=b.headers||{};c.Accept=c.Accept||"text/javascript, text/html, application/xml, text/xml, */*",b.crossOrigin||(c["X-Requested-With"]=c["X-Requested-With"]||"XMLHttpRequest"),c[contentType]=c[contentType]||"application/x-www-form-urlencoded";for(var d in c)c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d],!1)}function handleReadyState(a,b,c){return function(){a&&a[readyState]==4&&(twoHundo.test(a.status)?b(a):c(a))}}var twoHundo=/^20\d$/,doc=document,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",head=doc[byTag]("head")[0],uniqid=0,lastValue,xhr="XMLHttpRequest"in win?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}},reqwest.serialize=function(a){var b=[a[byTag]("input"),a[byTag]("select"),a[byTag]("textarea")],c=[],d,e;for(d=0,l=b.length;d<l;++d)for(e=0,l2=b[d].length;e<l2;++e)c.push(serial(b[d][e]));return c.join("").replace(/&$/,"")},reqwest.serializeArray=function(a){for(var b=this.serialize(a).split("&"),c=0,d=b.length,e=[],f;c<d;c++)b[c]&&(f=b[c].split("="))&&e.push({name:f[0],value:f[1]});return e};var old=context.reqwest;reqwest.noConflict=function(){return context.reqwest=old,this},typeof module!="undefined"?module.exports=reqwest:context.reqwest=reqwest}(this,window),wax=wax||{},wax.attribution=function(){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var a,b={};return b.set=function(b){if(typeof b=="undefined")return;return a.innerHTML=html_sanitize(b,c,d),this},b.element=function(){return a},b.init=function(){return a=document.createElement("div"),a.className="wax-attribution",this},b.init()},wax=wax||{},wax.bwdetect=function(a,b){function h(){wax.bw=-1;var a=new Image;a.src=e;var b=!0,f=setTimeout(function(){b&&wax.bw==-1&&(c.bw(0),b=!1)},d);a.onload=function(){b&&wax.bw==-1&&(clearTimeout(f),c.bw(1),b=!1)}}var c={},d=a.threshold||400,e="http://a.tiles.mapbox.com/mapbox/1.0.0/blue-marble-topo-bathy-jul/0/0/0.png?preventcache="+ +(new Date),f=1,g=a.auto===undefined?!0:a.auto;return c.bw=function(a){if(!arguments.length)return f;var c=f;wax.bwlisteners&&wax.bwlisteners.length&&function(){listeners=wax.bwlisteners,wax.bwlisteners=[];for(i=0;i<listeners;i++)listeners[i](a)}(),wax.bw=a,f!=(f=a)&&b(a)},c.add=function(){return g&&h(),this},wax.bw==-1?(wax.bwlisteners=wax.bwlisteners||[],wax.bwlisteners.push(c.bw)):wax.bw!==undefined?c.bw(wax.bw):c.add(),c},wax.formatter=function(x){function urlX(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function idX(a){return a}var formatter={},f;if(x&&typeof x=="string")try{eval("f = "+x)}catch(e){console&&console.log(e)}else x&&typeof x=="function"?f=x:f=function(){};return formatter.format=function(a,b){try{return html_sanitize(f(a,b),urlX,idX)}catch(c){console&&console.log(c)}},formatter},wax.GridInstance=function(a,b,c){function g(a){return a>=93&&a--,a>=35&&a--,a-=32,a}c=c||{};var d={},e=c.resolution||4,f=c.tileSize||256;return d.grid_tile=function(){return a},d.getKey=function(b,c){if(!a||!a.grid)return;if(c<0||b<0)return;if(Math.floor(c)>=f||Math.floor(b)>=f)return;return g(a.grid[Math.floor(c/e)].charCodeAt(Math.floor(b/e)))},d.gridFeature=function(b,c){var d=this.getKey(b,c),e=a.keys;if(e&&e[d]&&a.data[e[d]])return a.data[e[d]]},d.tileFeature=function(c,d,e,f){if(!a)return;var g=wax.util.offset(e);feature=this.gridFeature(c-g.left,d-g.top);if(feature)return b.format(f,feature)},d},wax.GridManager=function(a){function h(a){return typeof a=="string"&&(a=[a]),function b(b){if(!b)return;var c=new RegExp("/(\\d+)\\/(\\d+)\\/(\\d+)\\.[\\w\\._]+"),d=c.exec(b);if(!d)return;return a[parseInt(d[2],10)%a.length].replace("{z}",d[1]).replace("{x}",d[2]).replace("{y}",d[3])}}a=a||{};var b=a.resolution||4,c=a.version||"1.1",d={},e={},f,g=function(a){return a.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json")};return e.formatter=function(a){return arguments.length?(f=wax.formatter(a),e):f},e.template=function(a){return arguments.length?(f=wax.template(a),e):f},e.gridUrl=function(a){return arguments.length?(g=typeof a=="function"?a:h(a),e):g},e.getGrid=function(a,c){var d=g(a);return!f||!d?c(null,null):(wax.request.get(d,function(a,d){if(a)return c(a,null);c(null,wax.GridInstance(d,f,{resolution:b||4}))}),e)},e.add=function(a){return a.template?e.template(a.template):a.formatter&&e.formatter(a.formatter),a.grids&&e.gridUrl(a.grids),this},e.add(a)},wax=wax||{},wax.hash=function(a){function b(){return location.hash.substring(1)}function c(a){location.hash="#"+a}function g(b){var c=b.split("/");for(var d=0;d<c.length;d++){c[d]=Number(c[d]);if(isNaN(c[d]))return!0}if(c.length<3)return!0;c.length==3&&a.setCenterZoom(c)}function h(){var b=a.getCenterZoom();d!==b&&(d=b,c(d))}function i(a){if(a===d)return;g(d=a)&&h()}a=a||{};var d,e={},f=90-1e-8,j=wax.util.throttle(h,500);return e.add=function(){return i(b()),a.bindChange(j),this},e.remove=function(){return a.unbindChange(j),this},e.add()};var wax=wax||{};wax.legend=function(){function d(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function e(a){return a}var a,b={},c;return b.element=function(){return c},b.content=function(b){return arguments.length?(b?(a.innerHTML=html_sanitize(b,d,e),a.style.display="block"):(a.innerHTML="",a.style.display="none"),this):a.innerHTML},b.add=function(){return c=document.createElement("div"),c.className="wax-legends",a=document.createElement("div"),a.className="wax-legend",a.style.display="none",c.appendChild(a),this},b.add()};var w=function(a){return a.melt=function(b,c){return b.apply(c,[a,c])},a},wax=wax||{};wax.movetip={},wax.movetip=function(a){function g(a){return a&&a.className.indexOf("wax-popup")!==-1}function h(a,b){var c=document.createElement("div");return c.className="wax-movetip",c.style.cssText="position:absolute;",c.innerHTML=a,b.appendChild(c),d=b,_tooltipOffset=wax.util.offset(c),_contextOffset=wax.util.offset(d),c}function i(a){if(!c)return;var b=wax.util.eventoffset(a);c.className="wax-movetip",_tooltipOffset.height+b.y>_contextOffset.top+_contextOffset.height&&_contextOffset.height>_tooltipOffset.height&&(b.y-=_tooltipOffset.height,c.className+=" flip-y"),_tooltipOffset.width+b.x>_contextOffset.left+_contextOffset.width&&(b.x-=_tooltipOffset.width,c.className+=" flip-x"),c.style.left=b.x+"px",c.style.top=b.y+"px"}function j(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&e?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&e&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+e):a.parentNode&&a.parentNode.removeChild(a)}function k(a,b){c&&(j(c),c=undefined);var d=h(a,b);d.className+=" wax-popup",d.innerHTML=a;var e=document.createElement("a");e.href="#close",e.className="close",e.innerHTML="Close",d.appendChild(e);var f=function(a){return j(d),c=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1};e.addEventListener?e.addEventListener("click",f,!1):e.attachEvent&&e.attachEvent("onclick",f),c=d}a=a||{};var b={},c=undefined,d=undefined,e=a.animationOut,f=a.animationIn;return b.over=function(a,b,d){if(!a)return;b.style.cursor="pointer";if(g(c))return;c=h(a,b),i(d),b.addEventListener&&b.addEventListener("mousemove",i)},b.out=function(a){a.style.cursor="default";if(g(c))return;c&&(j(c),a.removeEventListener&&a.removeEventListener("mousemove",i),c=undefined)},b};var wax=wax||{};wax.request={cache:{},locks:{},promises:{},get:function(a,b){if(this.cache[a])return b(this.cache[a][0],this.cache[a][1]);this.promises[a]=this.promises[a]||[],this.promises[a].push(b);if(this.locks[a])return;var c=this;this.locks[a]=!0,reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(b){c.locks[a]=!1,c.cache[a]=[null,b];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])},error:function(b){c.locks[a]=!1,c.cache[a]=[b,null];for(var d=0;d<c.promises[a].length;d++)c.promises[a][d](c.cache[a][0],c.cache[a][1])}})}},wax.template=function(a){function c(a){if(/^(https?:\/\/|data:image)/.test(a))return a}function d(a){return a}var b={};return b.format=function(b,e){var f={};for(var g in e)f[g]=e[g];return b.format&&(f["__"+b.format+"__"]=!0),html_sanitize(Mustache.to_html(a,f),c,d)},b};if(!wax)var wax={};wax.tilejson=function(a,b){reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:b,error:b})};var wax=wax||{};wax.tooltip={},wax.tooltip=function(a){this._currentTooltip=undefined,a=a||{},a.animationOut&&(this.animationOut=a.animationOut),a.animationIn&&(this.animationIn=a.animationIn)},wax.tooltip.prototype.isPopup=function(a){return a&&a.className.indexOf("wax-popup")!==-1},wax.tooltip.prototype.getTooltip=function(a,b){var c=document.createElement("div");return c.className="wax-tooltip wax-tooltip-0",c.innerHTML=a,b.appendChild(c),c},wax.tooltip.prototype.hideTooltip=function(a){if(!a)return;var b,c=function(){this.parentNode&&this.parentNode.removeChild(this)};a.style["-webkit-transition"]!==undefined&&this.animationOut?b="webkitTransitionEnd":a.style.MozTransition!==undefined&&this.animationOut&&(b="transitionend"),b?(a.addEventListener(b,c,!1),a.addEventListener("transitionend",c,!1),a.className+=" "+this.animationOut):a.parentNode&&a.parentNode.removeChild(a)},wax.tooltip.prototype.click=function(a,b){this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined);var c=this.getTooltip(a,b);c.className+=" wax-popup",c.innerHTML=a;var d=document.createElement("a");d.href="#close",d.className="close",d.innerHTML="Close",c.appendChild(d);var e=wax.util.bind(function(a){return this.hideTooltip(c),this._currentTooltip=undefined,a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1},this);d.addEventListener?(d.addEventListener("click",e,!1),d.addEventListener("touchend",e,!1)):d.attachEvent&&d.attachEvent("onclick",e),this._currentTooltip=c},wax.tooltip.prototype.over=function(a,b){if(!a)return;b.style.cursor="pointer";if(this.isPopup(this._currentTooltip))return;this._currentTooltip=this.getTooltip(a,b)},wax.tooltip.prototype.out=function(a){a.style.cursor="default";if(this.isPopup(this._currentTooltip))return;this._currentTooltip&&(this.hideTooltip(this._currentTooltip),this._currentTooltip=undefined)};var wax=wax||{};wax.util=wax.util||{},wax.util={offset:function(a){var b=a.offsetWidth||parseInt(a.style.width,10),c=a.offsetHeight||parseInt(a.style.height,10),d=document.body,e=0,f=0,g=function(a){if(a===d||a===document.documentElement)return;e+=a.offsetTop,f+=a.offsetLeft;var b=a.style.transform||a.style.WebkitTransform||a.style.OTransform||a.style.MozTransform||a.style.msTransform;if(b)if(match=b.match(/translate\((.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/translate3d\((.+)px, (.+)px, (.+)px\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10);else if(match=b.match(/matrix3d\(([\-\d,\s]+)\)/)){var c=match[1].split(",");e+=parseInt(c[13],10),f+=parseInt(c[12],10)}else if(match=b.match(/matrix\(.+, .+, .+, .+, (.+), (.+)\)/))e+=parseInt(match[2],10),f+=parseInt(match[1],10)};g(a);try{while(a=a.offsetParent)g(a)}catch(h){}e+=d.offsetTop,f+=d.offsetLeft,e+=d.parentNode.offsetTop,f+=d.parentNode.offsetLeft;var i=document.defaultView?window.getComputedStyle(d.parentNode,null):d.parentNode.currentStyle;return d.parentNode.offsetTop!==parseInt(i.marginTop,10)&&!isNaN(parseInt(i.marginTop,10))&&(e+=parseInt(i.marginTop,10),f+=parseInt(i.marginLeft,10)),{top:e,left:f,height:c,width:b}},$:function(a){return typeof a=="string"?document.getElementById(a):a},bind:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,c.concat(Array.prototype.slice.call(arguments)))}},isString:function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)},indexOf:function(a,b){var c=Array.prototype.indexOf;if(a===null)return-1;var d,e;if(c&&a.indexOf===c)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(a[d]===b)return d;return-1},isArray:Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},keys:Object.keys||function(a){var b=Object.prototype.hasOwnProperty;if(a!==Object(a))throw new TypeError("Invalid object");var c=[];for(var d in a)b.call(a,d)&&(c[c.length]=d);return c},eventoffset:function(a){var b=0,c=0;if(!a)var a=window.event;if(a.pageX||a.pageY)return{x:a.pageX,y:a.pageY};if(a.clientX||a.clientY){var d=document.documentElement,e=document.body,f=document.body.parentNode.currentStyle,g=parseInt(f.marginTop,10)||0,h=parseInt(f.marginLeft,10)||0;return{x:a.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0)+h,y:a.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)+g}}if(a.touches&&a.touches.length===1)return{x:a.touches[0].pageX,y:a.touches[0].pageY}},limit:function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d);if(c||!d)d=setTimeout(g,b)}},throttle:function(a,b){return this.limit(a,b,!1)}};var wax=wax||{};wax.p=wax.p||{},wax.p.connector=function(a){var b=org.polymaps;if(a.scheme==="tms")throw new Error("Wax only supports XYZ TileJSON urls.");return b.image().url(a.tiles[0].replace(/\{\w\}/g,function(a){return a.toUpperCase()}))} |
{ | ||
"name": "wax", | ||
"version": "4.1.6", | ||
"version": "4.1.7", | ||
"description": "Tools for improving web maps.", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3737072
161
39093