var COMPILED=!0,goog=goog||{};goog.global=this;goog.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]?c[d]:c[d]={}:c[d]=b};goog.define=function(a,b){var c=b;COMPILED||goog.global.CLOSURE_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES,a)&&(c=goog.global.CLOSURE_DEFINES[a]);goog.exportPath_(a,c)};goog.DEBUG=!1;goog.LOCALE="en";goog.TRUSTED_SITE=!0; goog.provide=function(a){if(!COMPILED){if(goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');delete goog.implicitNamespaces_[a];for(var b=a;(b=b.substring(0,b.lastIndexOf(".")))&&!goog.getObjectByName(b);)goog.implicitNamespaces_[b]=!0}goog.exportPath_(a)};goog.setTestOnly=function(a){if(COMPILED&&!goog.DEBUG)throw a=a||"",Error("Importing test-only code into non-debug environment"+a?": "+a:".");}; COMPILED||(goog.isProvided_=function(a){return!goog.implicitNamespaces_[a]&&!!goog.getObjectByName(a)},goog.implicitNamespaces_={});goog.getObjectByName=function(a,b){for(var c=a.split("."),d=b||goog.global,e;e=c.shift();)if(goog.isDefAndNotNull(d[e]))d=d[e];else return null;return d};goog.globalize=function(a,b){var c=b||goog.global,d;for(d in a)c[d]=a[d]}; goog.addDependency=function(a,b,c){if(goog.DEPENDENCIES_ENABLED){var d;a=a.replace(/\\/g,"/");for(var e=goog.dependencies_,f=0;d=b[f];f++)e.nameToPath[d]=a,a in e.pathToNames||(e.pathToNames[a]={}),e.pathToNames[a][d]=!0;for(d=0;b=c[d];d++)a in e.requires||(e.requires[a]={}),e.requires[a][b]=!0}};goog.ENABLE_DEBUG_LOADER=!0; goog.require=function(a){if(!COMPILED&&!goog.isProvided_(a)){if(goog.ENABLE_DEBUG_LOADER){var b=goog.getPathFromDeps_(a);if(b){goog.included_[b]=!0;goog.writeScripts_();return}}a="goog.require could not find: "+a;goog.global.console&&goog.global.console.error(a);throw Error(a);}};goog.basePath="";goog.nullFunction=function(){};goog.identityFunction=function(a,b){return a};goog.abstractMethod=function(){throw Error("unimplemented abstract method");}; goog.addSingletonGetter=function(a){a.getInstance=function(){if(a.instance_)return a.instance_;goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=a);return a.instance_=new a}};goog.instantiatedSingletons_=[];goog.DEPENDENCIES_ENABLED=!COMPILED&&goog.ENABLE_DEBUG_LOADER; goog.DEPENDENCIES_ENABLED&&(goog.included_={},goog.dependencies_={pathToNames:{},nameToPath:{},requires:{},visited:{},written:{}},goog.inHtmlDocument_=function(){var a=goog.global.document;return"undefined"!=typeof a&&"write"in a},goog.findBasePath_=function(){if(goog.global.CLOSURE_BASE_PATH)goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var a=goog.global.document.getElementsByTagName("script"),b=a.length-1;0<=b;--b){var c=a[b].src,d=c.lastIndexOf("?"),d=-1==d?c.length: d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}},goog.importScript_=function(a){var b=goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_;!goog.dependencies_.written[a]&&b(a)&&(goog.dependencies_.written[a]=!0)},goog.writeScriptTag_=function(a){if(goog.inHtmlDocument_()){var b=goog.global.document;if("complete"==b.readyState){if(/\bdeps.js$/.test(a))return!1;throw Error('Cannot write "'+a+'" after document load');}b.write('\x3cscript type\x3d"text/javascript" src\x3d"'+ a+'"\x3e\x3c/script\x3e');return!0}return!1},goog.writeScripts_=function(){function a(e){if(!(e in d.written)){if(!(e in d.visited)&&(d.visited[e]=!0,e in d.requires))for(var g in d.requires[e])if(!goog.isProvided_(g))if(g in d.nameToPath)a(d.nameToPath[g]);else throw Error("Undefined nameToPath for "+g);e in c||(c[e]=!0,b.push(e))}}var b=[],c={},d=goog.dependencies_,e;for(e in goog.included_)d.written[e]||a(e);for(e=0;e>>0);goog.uidCounter_=0;goog.getHashCode=goog.getUid;goog.removeHashCode=goog.removeUid;goog.cloneObject=function(a){var b=goog.typeOf(a);if("object"==b||"array"==b){if(a.clone)return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=goog.cloneObject(a[c]);return b}return a};goog.bindNative_=function(a,b,c){return a.call.apply(a.bind,arguments)}; goog.bindJs_=function(a,b,c){if(!a)throw Error();if(2=a||"\u0080"<=a&&"\ufffd">=a};goog.string.stripNewlines=function(a){return a.replace(/(\r\n|\r|\n)+/g," ")}; goog.string.canonicalizeNewlines=function(a){return a.replace(/(\r\n|\r|\n)/g,"\n")};goog.string.normalizeWhitespace=function(a){return a.replace(/\xa0|\s/g," ")};goog.string.normalizeSpaces=function(a){return a.replace(/\xa0|[ \t]+/g," ")};goog.string.collapseBreakingSpaces=function(a){return a.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")};goog.string.trim=function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}; goog.string.trimLeft=function(a){return a.replace(/^[\s\xa0]+/,"")};goog.string.trimRight=function(a){return a.replace(/[\s\xa0]+$/,"")};goog.string.caseInsensitiveCompare=function(a,b){var c=String(a).toLowerCase(),d=String(b).toLowerCase();return c/g;goog.string.quotRe_=/\"/g;goog.string.allRe_=/[&<>\"]/;goog.string.unescapeEntities=function(a){return goog.string.contains(a,"\x26")?"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(a):goog.string.unescapePureXmlEntities_(a):a}; goog.string.unescapeEntitiesUsingDom_=function(a){var b={"\x26amp;":"\x26","\x26lt;":"\x3c","\x26gt;":"\x3e","\x26quot;":'"'},c=document.createElement("div");return a.replace(goog.string.HTML_ENTITY_PATTERN_,function(a,e){var f=b[a];if(f)return f;if("#"==e.charAt(0)){var g=Number("0"+e.substr(1));isNaN(g)||(f=String.fromCharCode(g))}f||(c.innerHTML=a+" ",f=c.firstChild.nodeValue.slice(0,-1));return b[a]=f})}; goog.string.unescapePureXmlEntities_=function(a){return a.replace(/&([^;]+);/g,function(a,c){switch(c){case "amp":return"\x26";case "lt":return"\x3c";case "gt":return"\x3e";case "quot":return'"';default:if("#"==c.charAt(0)){var d=Number("0"+c.substr(1));if(!isNaN(d))return String.fromCharCode(d)}return a}})};goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g;goog.string.whitespaceEscape=function(a,b){return goog.string.newLineToBr(a.replace(/ /g," \x26#160;"),b)}; goog.string.stripQuotes=function(a,b){for(var c=b.length,d=0;db&&(a=a.substring(0,b-3)+"...");c&&(a=goog.string.htmlEscape(a));return a}; goog.string.truncateMiddle=function(a,b,c,d){c&&(a=goog.string.unescapeEntities(a));if(d&&a.length>b){d>b&&(d=b);var e=a.length-d;a=a.substring(0,b-d)+"..."+a.substring(e)}else a.length>b&&(d=Math.floor(b/2),e=a.length-d,a=a.substring(0,d+b%2)+"..."+a.substring(e));c&&(a=goog.string.htmlEscape(a));return a};goog.string.specialEscapeChars_={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\"};goog.string.jsEscapeCache_={"'":"\\'"}; goog.string.quote=function(a){a=String(a);if(a.quote)return a.quote();for(var b=['"'],c=0;ce?d:goog.string.escapeChar(d))}b.push('"');return b.join("")};goog.string.escapeString=function(a){for(var b=[],c=0;cc)b=a;else{if(256>c){if(b="\\x",16>c||256c&&(b+="0");b+=c.toString(16).toUpperCase()}return goog.string.jsEscapeCache_[a]=b};goog.string.toMap=function(a){for(var b={},c=0;cb?1:0};goog.string.HASHCODE_MAX_=4294967296;goog.string.hashCode=function(a){for(var b=0,c=0;cc?Math.max(0,a.length+c):c;if(goog.isString(a))return goog.isString(b)&&1==b.length?a.indexOf(b,c):-1;for(;cc&&(c=Math.max(0,a.length+c));if(goog.isString(a))return goog.isString(b)&&1==b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1}; goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&goog.array.ARRAY_PROTOTYPE_.forEach?function(a,b,c){goog.array.ARRAY_PROTOTYPE_.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=goog.isString(a)?a.split(""):a,f=0;fb?null:goog.isString(a)?a.charAt(b):a[b]};goog.array.findIndex=function(a,b,c){for(var d=a.length,e=goog.isString(a)?a.split(""):a,f=0;fb?null:goog.isString(a)?a.charAt(b):a[b]}; goog.array.findIndexRight=function(a,b,c){for(var d=a.length,e=goog.isString(a)?a.split(""):a,d=d-1;0<=d;d--)if(d in e&&b.call(c,e[d],d,a))return d;return-1};goog.array.contains=function(a,b){return 0<=goog.array.indexOf(a,b)};goog.array.isEmpty=function(a){return 0==a.length};goog.array.clear=function(a){if(!goog.isArray(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0};goog.array.insert=function(a,b){goog.array.contains(a,b)||a.push(b)}; goog.array.insertAt=function(a,b,c){goog.array.splice(a,c,0,b)};goog.array.insertArrayAt=function(a,b,c){goog.partial(goog.array.splice,a,c,0).apply(null,b)};goog.array.insertBefore=function(a,b,c){var d;2==arguments.length||0>(d=goog.array.indexOf(a,c))?a.push(b):goog.array.insertAt(a,b,d)};goog.array.remove=function(a,b){var c=goog.array.indexOf(a,b),d;(d=0<=c)&&goog.array.removeAt(a,c);return d};goog.array.removeAt=function(a,b){return 1==goog.array.ARRAY_PROTOTYPE_.splice.call(a,b,1).length}; goog.array.removeIf=function(a,b,c){b=goog.array.findIndex(a,b,c);return 0<=b?(goog.array.removeAt(a,b),!0):!1};goog.array.concat=function(a){return goog.array.ARRAY_PROTOTYPE_.concat.apply(goog.array.ARRAY_PROTOTYPE_,arguments)};goog.array.toArray=function(a){var b=a.length;if(0=arguments.length?goog.array.ARRAY_PROTOTYPE_.slice.call(a,b):goog.array.ARRAY_PROTOTYPE_.slice.call(a,b,c)};goog.array.removeDuplicates=function(a,b){for(var c=b||a,d={},e=0,f=0;f>1,l;l=c?b.call(e,a[k],k,a):b(d,a[k]);0b?1:ac?(goog.array.insertAt(a,b,-(c+1)),!0):!1}; goog.array.binaryRemove=function(a,b,c){b=goog.array.binarySearch(a,b,c);return 0<=b?goog.array.removeAt(a,b):!1};goog.array.bucket=function(a,b,c){for(var d={},e=0;ec*(f-e))return[];if(0f;a+=c)d.push(a);return d};goog.array.repeat=function(a,b){for(var c=[],d=0;db&&goog.array.ARRAY_PROTOTYPE_.push.apply(a,a.splice(0,-b)));return a};goog.array.moveItem=function(a,b,c){b=goog.array.ARRAY_PROTOTYPE_.splice.call(a,b,1);goog.array.ARRAY_PROTOTYPE_.splice.call(a,c,0,b[0])};goog.array.zip=function(a){if(!arguments.length)return[];for(var b=[],c=0;;c++){for(var d=[],e=0;e=f.length)return b;d.push(f[c])}b.push(d)}}; goog.array.shuffle=function(a,b){for(var c=b||Math.random,d=a.length-1;0>=1}return new ol.TileCoord(b,c,d)}; ol.TileCoord.createFromString=function(a){a=a.split("/");a=goog.array.map(a,function(a,c,d){return parseInt(a,10)});return new ol.TileCoord(a[0],a[1],a[2])};ol.TileCoord.createOrUpdate=function(a,b,c,d){return goog.isDef(d)?(d.z=a,d.x=b,d.y=c,d):new ol.TileCoord(a,b,c)};ol.TileCoord.getKeyZXY=function(a,b,c){return[a,b,c].join("/")};ol.TileCoord.prototype.hash=function(){return(this.x<>=1;return a.join("")};ol.TileCoord.prototype.toString=function(){return ol.TileCoord.getKeyZXY(this.z,this.x,this.y)};ol.TileRange=function(a,b,c,d){this.minX=a;this.maxX=b;this.minY=c;this.maxY=d};ol.TileRange.boundingTileRange=function(a){var b=arguments[0],b=new ol.TileRange(b.x,b.x,b.y,b.y),c,d,e;c=1;for(d=arguments.length;cthis.maxX&&(this.maxX=a.maxX);a.minYthis.maxY&&(this.maxY=a.maxY)};ol.TileRange.prototype.getHeight=function(){return this.maxY-this.minY+1};ol.TileRange.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]};ol.TileRange.prototype.getWidth=function(){return this.maxX-this.minX+1}; ol.TileRange.prototype.intersects=function(a){return this.minX<=a.maxX&&this.maxX>=a.minX&&this.minY<=a.maxY&&this.maxY>=a.minY};ol.Attribution=function(a){this.html_=a.html;this.tileRanges_=goog.isDef(a.tileRanges)?a.tileRanges:null};ol.Attribution.prototype.getHTML=function(){return this.html_};ol.Attribution.prototype.intersectsAnyTileRange=function(a){if(goog.isNull(this.tileRanges_))return!0;var b,c,d,e;for(e in a)if(e in this.tileRanges_)for(d=a[e],b=0,c=this.tileRanges_[e].length;bparseFloat(a))?String(b):a}; goog.userAgent.getDocumentMode_=function(){var a=goog.global.document;return a?a.documentMode:void 0};goog.userAgent.VERSION=goog.userAgent.determineVersion_();goog.userAgent.compare=function(a,b){return goog.string.compareVersions(a,b)};goog.userAgent.isVersionOrHigherCache_={}; goog.userAgent.isVersionOrHigher=function(a){return goog.userAgent.ASSUME_ANY_VERSION||goog.userAgent.isVersionOrHigherCache_[a]||(goog.userAgent.isVersionOrHigherCache_[a]=0<=goog.string.compareVersions(goog.userAgent.VERSION,a))};goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher;goog.userAgent.isDocumentModeOrHigher=function(a){return goog.userAgent.IE&&goog.userAgent.DOCUMENT_MODE>=a};goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher; goog.userAgent.DOCUMENT_MODE=function(){var a=goog.global.document;return a&&goog.userAgent.IE?goog.userAgent.getDocumentMode_()||("CSS1Compat"==a.compatMode?parseInt(goog.userAgent.VERSION,10):5):void 0}();goog.events.BrowserFeature={HAS_W3C_BUTTON:!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9),HAS_W3C_EVENT_SUPPORT:!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9),SET_KEY_CODE_TO_PREVENT_DEFAULT:goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9"),HAS_NAVIGATOR_ONLINE_PROPERTY:!goog.userAgent.WEBKIT||goog.userAgent.isVersionOrHigher("528"),HAS_HTML5_NETWORK_EVENT_SUPPORT:goog.userAgent.GECKO&&goog.userAgent.isVersionOrHigher("1.9b")||goog.userAgent.IE&&goog.userAgent.isVersionOrHigher("8")|| goog.userAgent.OPERA&&goog.userAgent.isVersionOrHigher("9.5")||goog.userAgent.WEBKIT&&goog.userAgent.isVersionOrHigher("528"),HTML5_NETWORK_EVENTS_FIRE_ON_BODY:goog.userAgent.GECKO&&!goog.userAgent.isVersionOrHigher("8")||goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9"),TOUCH_ENABLED:"ontouchstart"in goog.global||!!(goog.global.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!goog.global.navigator||!goog.global.navigator.msMaxTouchPoints)};goog.events.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",SELECTSTART:"selectstart",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",BLUR:"blur",FOCUS:"focus",DEACTIVATE:"deactivate",FOCUSIN:goog.userAgent.IE?"focusin":"DOMFocusIn",FOCUSOUT:goog.userAgent.IE?"focusout":"DOMFocusOut",CHANGE:"change",SELECT:"select",SUBMIT:"submit",INPUT:"input",PROPERTYCHANGE:"propertychange",DRAGSTART:"dragstart", DRAG:"drag",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",DRAGEND:"dragend",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",TOUCHCANCEL:"touchcancel",BEFOREUNLOAD:"beforeunload",CONSOLEMESSAGE:"consolemessage",CONTEXTMENU:"contextmenu",DOMCONTENTLOADED:"DOMContentLoaded",ERROR:"error",HELP:"help",LOAD:"load",LOSECAPTURE:"losecapture",READYSTATECHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",UNLOAD:"unload",HASHCHANGE:"hashchange",PAGEHIDE:"pagehide", PAGESHOW:"pageshow",POPSTATE:"popstate",COPY:"copy",PASTE:"paste",CUT:"cut",BEFORECOPY:"beforecopy",BEFORECUT:"beforecut",BEFOREPASTE:"beforepaste",ONLINE:"online",OFFLINE:"offline",MESSAGE:"message",CONNECT:"connect",TRANSITIONEND:goog.userAgent.WEBKIT?"webkitTransitionEnd":goog.userAgent.OPERA?"oTransitionEnd":"transitionend",MSGESTURECHANGE:"MSGestureChange",MSGESTUREEND:"MSGestureEnd",MSGESTUREHOLD:"MSGestureHold",MSGESTURESTART:"MSGestureStart",MSGESTURETAP:"MSGestureTap",MSGOTPOINTERCAPTURE:"MSGotPointerCapture", MSINERTIASTART:"MSInertiaStart",MSLOSTPOINTERCAPTURE:"MSLostPointerCapture",MSPOINTERCANCEL:"MSPointerCancel",MSPOINTERDOWN:"MSPointerDown",MSPOINTERMOVE:"MSPointerMove",MSPOINTEROVER:"MSPointerOver",MSPOINTEROUT:"MSPointerOut",MSPOINTERUP:"MSPointerUp",TEXTINPUT:"textinput",COMPOSITIONSTART:"compositionstart",COMPOSITIONUPDATE:"compositionupdate",COMPOSITIONEND:"compositionend",EXIT:"exit",LOADABORT:"loadabort",LOADCOMMIT:"loadcommit",LOADREDIRECT:"loadredirect",LOADSTART:"loadstart",LOADSTOP:"loadstop", RESPONSIVE:"responsive",SIZECHANGED:"sizechanged",UNRESPONSIVE:"unresponsive"};goog.reflect={};goog.reflect.object=function(a,b){return b};goog.reflect.sinkValue=function(a){goog.reflect.sinkValue[" "](a);return a};goog.reflect.sinkValue[" "]=goog.nullFunction;goog.reflect.canAccessProperty=function(a,b){try{return goog.reflect.sinkValue(a[b]),!0}catch(c){}return!1};goog.events.BrowserEvent=function(a,b){a&&this.init(a,b)};goog.inherits(goog.events.BrowserEvent,goog.events.Event);goog.events.BrowserEvent.MouseButton={LEFT:0,MIDDLE:1,RIGHT:2};goog.events.BrowserEvent.IEButtonMap=[1,4,2];goog.events.BrowserEvent.prototype.target=null;goog.events.BrowserEvent.prototype.relatedTarget=null;goog.events.BrowserEvent.prototype.offsetX=0;goog.events.BrowserEvent.prototype.offsetY=0;goog.events.BrowserEvent.prototype.clientX=0; goog.events.BrowserEvent.prototype.clientY=0;goog.events.BrowserEvent.prototype.screenX=0;goog.events.BrowserEvent.prototype.screenY=0;goog.events.BrowserEvent.prototype.button=0;goog.events.BrowserEvent.prototype.keyCode=0;goog.events.BrowserEvent.prototype.charCode=0;goog.events.BrowserEvent.prototype.ctrlKey=!1;goog.events.BrowserEvent.prototype.altKey=!1;goog.events.BrowserEvent.prototype.shiftKey=!1;goog.events.BrowserEvent.prototype.metaKey=!1; goog.events.BrowserEvent.prototype.platformModifierKey=!1;goog.events.BrowserEvent.prototype.event_=null; goog.events.BrowserEvent.prototype.init=function(a,b){var c=this.type=a.type;goog.events.Event.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;d?goog.userAgent.GECKO&&(goog.reflect.canAccessProperty(d,"nodeName")||(d=null)):c==goog.events.EventType.MOUSEOVER?d=a.fromElement:c==goog.events.EventType.MOUSEOUT&&(d=a.toElement);this.relatedTarget=d;this.offsetX=goog.userAgent.WEBKIT||void 0!==a.offsetX?a.offsetX:a.layerX;this.offsetY=goog.userAgent.WEBKIT||void 0!== a.offsetY?a.offsetY:a.layerY;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:a.pageY;this.screenX=a.screenX||0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.platformModifierKey=goog.userAgent.MAC?a.metaKey:a.ctrlKey;this.state=a.state;this.event_=a;a.defaultPrevented&&this.preventDefault(); delete this.propagationStopped_};goog.events.BrowserEvent.prototype.isButton=function(a){return goog.events.BrowserFeature.HAS_W3C_BUTTON?this.event_.button==a:"click"==this.type?a==goog.events.BrowserEvent.MouseButton.LEFT:!!(this.event_.button&goog.events.BrowserEvent.IEButtonMap[a])};goog.events.BrowserEvent.prototype.isMouseActionButton=function(){return this.isButton(goog.events.BrowserEvent.MouseButton.LEFT)&&!(goog.userAgent.WEBKIT&&goog.userAgent.MAC&&this.ctrlKey)}; goog.events.BrowserEvent.prototype.stopPropagation=function(){goog.events.BrowserEvent.superClass_.stopPropagation.call(this);this.event_.stopPropagation?this.event_.stopPropagation():this.event_.cancelBubble=!0}; goog.events.BrowserEvent.prototype.preventDefault=function(){goog.events.BrowserEvent.superClass_.preventDefault.call(this);var a=this.event_;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,goog.events.BrowserFeature.SET_KEY_CODE_TO_PREVENT_DEFAULT)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};goog.events.BrowserEvent.prototype.getBrowserEvent=function(){return this.event_};goog.events.BrowserEvent.prototype.disposeInternal=function(){};goog.events.Listenable=function(){};goog.events.Listenable.IMPLEMENTED_BY_PROP="closure_listenable_"+(1E6*Math.random()|0);goog.events.Listenable.addImplementation=function(a){a.prototype[goog.events.Listenable.IMPLEMENTED_BY_PROP]=!0};goog.events.Listenable.isImplementedBy=function(a){return!(!a||!a[goog.events.Listenable.IMPLEMENTED_BY_PROP])};goog.events.ListenableKey=function(){};goog.events.ListenableKey.counter_=0;goog.events.ListenableKey.reserveKey=function(){return++goog.events.ListenableKey.counter_};goog.events.Listener=function(a,b,c,d,e,f){goog.events.Listener.ENABLE_MONITORING&&(this.creationStack=Error().stack);this.listener=a;this.proxy=b;this.src=c;this.type=d;this.capture=!!e;this.handler=f;this.key=goog.events.ListenableKey.reserveKey();this.removed=this.callOnce=!1};goog.events.Listener.ENABLE_MONITORING=!1;goog.events.Listener.prototype.markAsRemoved=function(){this.removed=!0;this.handler=this.src=this.proxy=this.listener=null};goog.object={};goog.object.forEach=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};goog.object.filter=function(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d};goog.object.map=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d};goog.object.some=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return!0;return!1};goog.object.every=function(a,b,c){for(var d in a)if(!b.call(c,a[d],d,a))return!1;return!0}; goog.object.getCount=function(a){var b=0,c;for(c in a)b++;return b};goog.object.getAnyKey=function(a){for(var b in a)return b};goog.object.getAnyValue=function(a){for(var b in a)return a[b]};goog.object.contains=function(a,b){return goog.object.containsValue(a,b)};goog.object.getValues=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b};goog.object.getKeys=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}; goog.object.getValueByKeys=function(a,b){for(var c=goog.isArrayLike(b),d=c?b:arguments,c=c?0:1;ca.keyCode||void 0!=a.returnValue};goog.events.uniqueIdCounter_=0;goog.events.getUniqueId=function(a){return a+"_"+goog.events.uniqueIdCounter_++};goog.events.LISTENER_WRAPPER_PROP_="__closure_events_fn_"+(1E9*Math.random()>>>0);goog.events.wrapListener_=function(a){return goog.isFunction(a)?a:a[goog.events.LISTENER_WRAPPER_PROP_]||(a[goog.events.LISTENER_WRAPPER_PROP_]=function(b){return a.handleEvent(b)})};goog.events.ListenerMap=function(a){this.src=a;this.listeners={};this.typeCount_=0};goog.events.ListenerMap.prototype.getTypeCount=function(){return this.typeCount_};goog.events.ListenerMap.prototype.getListenerCount=function(){var a=0,b;for(b in this.listeners)a+=this.listeners[b].length;return a}; goog.events.ListenerMap.prototype.add=function(a,b,c,d,e){var f=this.listeners[a];f||(f=this.listeners[a]=[],this.typeCount_++);var g=goog.events.ListenerMap.findListenerIndex_(f,b,d,e);-1c*b?c+b:c};goog.math.lerp=function(a,b,c){return a+c*(b-a)};goog.math.nearlyEquals=function(a,b,c){return Math.abs(a-b)<=(c||1E-6)};goog.math.standardAngle=function(a){return goog.math.modulo(a,360)}; goog.math.toRadians=function(a){return a*Math.PI/180};goog.math.toDegrees=function(a){return 180*a/Math.PI};goog.math.angleDx=function(a,b){return b*Math.cos(goog.math.toRadians(a))};goog.math.angleDy=function(a,b){return b*Math.sin(goog.math.toRadians(a))};goog.math.angle=function(a,b,c,d){return goog.math.standardAngle(goog.math.toDegrees(Math.atan2(d-b,c-a)))};goog.math.angleDifference=function(a,b){var c=goog.math.standardAngle(b)-goog.math.standardAngle(a);180=c&&(c=360+c);return c}; goog.math.sign=function(a){return 0==a?0:0>a?-1:1};goog.math.longestCommonSubsequence=function(a,b,c,d){c=c||function(a,b){return a==b};d=d||function(b,c){return a[b]};for(var e=a.length,f=b.length,g=[],h=0;hg[h][k-1]?h--:k--;return l}; goog.math.sum=function(a){return goog.array.reduce(arguments,function(a,c){return a+c},0)};goog.math.average=function(a){return goog.math.sum.apply(null,arguments)/arguments.length};goog.math.standardDeviation=function(a){var b=arguments.length;if(2>b)return 0;var c=goog.math.average.apply(null,arguments),b=goog.math.sum.apply(null,goog.array.map(arguments,function(a){return Math.pow(a-c,2)}))/(b-1);return Math.sqrt(b)};goog.math.isInt=function(a){return isFinite(a)&&0==a%1}; goog.math.isFiniteNumber=function(a){return isFinite(a)&&!isNaN(a)};goog.math.safeFloor=function(a,b){return Math.floor(a+(b||2E-15))};goog.math.safeCeil=function(a,b){return Math.ceil(a-(b||2E-15))};goog.color.parse=function(a){var b={};a=String(a);var c=goog.color.prependHashIfNecessaryHelper(a);if(goog.color.isValidHexColor_(c))return b.hex=goog.color.normalizeHex(c),b.type="hex",b;c=goog.color.isValidRgbColor_(a);if(c.length)return b.hex=goog.color.rgbArrayToHex(c),b.type="rgb",b;if(goog.color.names&&(c=goog.color.names[a.toLowerCase()]))return b.hex=c,b.type="named",b;throw Error(a+" is not a valid color string");}; goog.color.isValidColor=function(a){var b=goog.color.prependHashIfNecessaryHelper(a);return!!(goog.color.isValidHexColor_(b)||goog.color.isValidRgbColor_(a).length||goog.color.names&&goog.color.names[a.toLowerCase()])};goog.color.parseRgb=function(a){var b=goog.color.isValidRgbColor_(a);if(!b.length)throw Error(a+" is not a valid RGB color");return b};goog.color.hexToRgbStyle=function(a){return goog.color.rgbStyle_(goog.color.hexToRgb(a))};goog.color.hexTripletRe_=/#(.)(.)(.)/; goog.color.normalizeHex=function(a){if(!goog.color.isValidHexColor_(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(goog.color.hexTripletRe_,"#$1$1$2$2$3$3"));return a.toLowerCase()};goog.color.hexToRgb=function(a){a=goog.color.normalizeHex(a);var b=parseInt(a.substr(1,2),16),c=parseInt(a.substr(3,2),16);a=parseInt(a.substr(5,2),16);return[b,c,a]}; goog.color.rgbToHex=function(a,b,c){a=Number(a);b=Number(b);c=Number(c);if(isNaN(a)||0>a||255b||255c||255=h?(d-e)/(2*h):(d-e)/(2-2*h));return[Math.round(f+360)%360,g,h]};goog.color.rgbArrayToHsl=function(a){return goog.color.rgbToHsl(a[0],a[1],a[2])};goog.color.hueToRgb_=function(a,b,c){0>c?c+=1:16*c?a+6*(b-a)*c:1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}; goog.color.hslToRgb=function(a,b,c){var d=0,e=0,f=0;a/=360;if(0==b)d=e=f=255*c;else var g=f=0,g=0.5>c?c*(1+b):c+b-b*c,f=2*c-g,d=255*goog.color.hueToRgb_(f,g,a+1/3),e=255*goog.color.hueToRgb_(f,g,a),f=255*goog.color.hueToRgb_(f,g,a-1/3);return[Math.round(d),Math.round(e),Math.round(f)]};goog.color.hslArrayToRgb=function(a){return goog.color.hslToRgb(a[0],a[1],a[2])};goog.color.validHexColorRe_=/^#(?:[0-9a-f]{3}){1,2}$/i;goog.color.isValidHexColor_=function(a){return goog.color.validHexColorRe_.test(a)}; goog.color.normalizedHexColorRe_=/^#[0-9a-f]{6}$/;goog.color.isNormalizedHexColor_=function(a){return goog.color.normalizedHexColorRe_.test(a)};goog.color.rgbColorRe_=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;goog.color.isValidRgbColor_=function(a){var b=a.match(goog.color.rgbColorRe_);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]}; goog.color.prependZeroIfNecessaryHelper=function(a){return 1==a.length?"0"+a:a};goog.color.prependHashIfNecessaryHelper=function(a){return"#"==a.charAt(0)?a:"#"+a};goog.color.rgbStyle_=function(a){return"rgb("+a.join(",")+")"}; goog.color.hsvToRgb=function(a,b,c){var d=0,e=0,f=0;if(0==b)f=e=d=c;else{var g=Math.floor(a/60),h=a/60-g;a=c*(1-b);var k=c*(1-b*h);b=c*(1-b*(1-h));switch(g){case 1:d=k;e=c;f=a;break;case 2:d=a;e=c;f=b;break;case 3:d=a;e=k;f=c;break;case 4:d=b;e=a;f=c;break;case 5:d=c;e=a;f=k;break;case 6:case 0:d=c,e=b,f=a}}return[Math.floor(d),Math.floor(e),Math.floor(f)]}; goog.color.rgbToHsv=function(a,b,c){var d=Math.max(Math.max(a,b),c),e=Math.min(Math.min(a,b),c);if(e==d)e=a=0;else{var f=d-e,e=f/d;a=60*(a==d?(b-c)/f:b==d?2+(c-a)/f:4+(a-b)/f);0>a&&(a+=360);360=a[2]?a[1]*a[2]:a[1]*(1-a[2]);d=0.5>=b[2]?b[1]*b[2]:b[1]*(1-b[2]);return(a[2]-b[2])*(a[2]-b[2])+c*c+d*d-2*c*d*Math.cos(2*(a[0]/360-b[0]/360)*Math.PI)};goog.color.blend=function(a,b,c){c=goog.math.clamp(c,0,1);return[Math.round(c*a[0]+(1-c)*b[0]),Math.round(c*a[1]+(1-c)*b[1]),Math.round(c*a[2]+(1-c)*b[2])]};goog.color.darken=function(a,b){return goog.color.blend([0,0,0],a,b)}; goog.color.lighten=function(a,b){return goog.color.blend([255,255,255],a,b)};goog.color.highContrast=function(a,b){for(var c=[],d=0;dc)for(c=1;cf?1:0.5,d=Math.floor(Math.log(b/d)/Math.log(a)+f),e=Math.max(d+e,0),goog.isDef(c)&&(e=Math.min(e,c)),b/Math.pow(a,e)}};ol.RotationConstraint={};ol.RotationConstraint.none=function(a,b){if(goog.isDef(a))return a+b};ol.RotationConstraint.createSnapToN=function(a){var b=2*Math.PI/a;return function(a,d){if(goog.isDef(a))return a=Math.floor((a+d)/b+0.5)*b}};ol.RotationConstraint.createSnapToZero=function(a){var b=a||0.1;return function(a,d){if(goog.isDef(a))return Math.abs(a+d)<=b?0:a+d}};ol.Constraints=function(a,b){this.resolution=a;this.rotation=b};ol.coordinate={};ol.coordinate.add=function(a,b){a[0]+=b[0];a[1]+=b[1];return a};ol.coordinate.createStringXY=function(a){return function(b){return ol.coordinate.toStringXY(b,a)}};ol.coordinate.degreesToStringHDMS_=function(a,b){var c=goog.math.modulo(a+180,360)-180,d=Math.abs(Math.round(3600*c));return Math.floor(d/3600)+"\u00b0 "+Math.floor(d/60%60)+"\u2032 "+Math.floor(d%60)+"\u2033 "+b.charAt(0>c?1:0)};ol.coordinate.equals=function(a,b){for(var c=!0,d=a.length-1;0<=d;--d)if(a[d]!=b[d]){c=!1;break}return c}; ol.coordinate.rotate=function(a,b){var c=Math.cos(b),d=Math.sin(b),e=a[1]*c+a[0]*d;a[0]=a[0]*c-a[1]*d;a[1]=e;return a};ol.coordinate.scale=function(a,b){a[0]*=b;a[1]*=b;return a};ol.coordinate.squaredDistance=function(a,b){var c=a[0]-b[0],d=a[1]-b[1];return c*c+d*d};ol.coordinate.closestOnSegment=function(a,b){var c=a[0],d=a[1],e=b[0],f=b[1],g=e[0],e=e[1],h=f[0],k=f[1],l=h-g,m=k-e,f=0==l&&0==m?0:(l*(c-g)+m*(d-e))/(l*l+m*m||0);0>=f||(1<=f?(g=h,e=k):(g+=f*l,e+=f*m));c=g-c;d=e-d;return[g,e,c*c+d*d,f]}; ol.coordinate.toStringHDMS=function(a){return goog.isDef(a)?ol.coordinate.degreesToStringHDMS_(a[1],"NS")+" "+ol.coordinate.degreesToStringHDMS_(a[0],"EW"):""};ol.coordinate.toStringXY=function(a,b){if(goog.isDef(a)){var c=b||0;return a[0].toFixed(c)+", "+a[1].toFixed(c)}return""};ol.coordinate.fromProjectedArray=function(a,b){var c=b.charAt(0);return"n"===c||"s"===c?[a[1],a[0]]:a};ol.DeviceOrientationProperty={ALPHA:"alpha",BETA:"beta",GAMMA:"gamma",HEADING:"heading",TRACKING:"tracking"};ol.DeviceOrientation=function(a){ol.Object.call(this);a=goog.isDef(a)?a:{};this.listenerKey_=null;goog.events.listen(this,ol.Object.getChangeEventType(ol.DeviceOrientationProperty.TRACKING),this.handleTrackingChanged_,!1,this);this.setTracking(goog.isDef(a.tracking)?a.tracking:!1)};goog.inherits(ol.DeviceOrientation,ol.Object); ol.DeviceOrientation.prototype.disposeInternal=function(){this.setTracking(!1);ol.DeviceOrientation.superClass_.disposeInternal.call(this)};ol.DeviceOrientation.SUPPORTED="DeviceOrientationEvent"in window; ol.DeviceOrientation.prototype.orientationChange_=function(a){a=a.getBrowserEvent();if(goog.isDefAndNotNull(a.alpha)){var b=goog.math.toRadians(a.alpha);this.set(ol.DeviceOrientationProperty.ALPHA,b);goog.isBoolean(a.absolute)&&a.absolute?this.set(ol.DeviceOrientationProperty.HEADING,b):goog.isDefAndNotNull(a.webkitCompassHeading)&&(goog.isDefAndNotNull(a.webkitCompassAccuracy)&&-1!=a.webkitCompassAccuracy)&&(b=goog.math.toRadians(a.webkitCompassHeading),this.set(ol.DeviceOrientationProperty.HEADING, b))}goog.isDefAndNotNull(a.beta)&&this.set(ol.DeviceOrientationProperty.BETA,goog.math.toRadians(a.beta));goog.isDefAndNotNull(a.gamma)&&this.set(ol.DeviceOrientationProperty.GAMMA,goog.math.toRadians(a.gamma))};ol.DeviceOrientation.prototype.getAlpha=function(){return this.get(ol.DeviceOrientationProperty.ALPHA)};goog.exportProperty(ol.DeviceOrientation.prototype,"getAlpha",ol.DeviceOrientation.prototype.getAlpha);ol.DeviceOrientation.prototype.getBeta=function(){return this.get(ol.DeviceOrientationProperty.BETA)}; goog.exportProperty(ol.DeviceOrientation.prototype,"getBeta",ol.DeviceOrientation.prototype.getBeta);ol.DeviceOrientation.prototype.getGamma=function(){return this.get(ol.DeviceOrientationProperty.GAMMA)};goog.exportProperty(ol.DeviceOrientation.prototype,"getGamma",ol.DeviceOrientation.prototype.getGamma);ol.DeviceOrientation.prototype.getHeading=function(){return this.get(ol.DeviceOrientationProperty.HEADING)};goog.exportProperty(ol.DeviceOrientation.prototype,"getHeading",ol.DeviceOrientation.prototype.getHeading); ol.DeviceOrientation.prototype.getTracking=function(){return this.get(ol.DeviceOrientationProperty.TRACKING)};goog.exportProperty(ol.DeviceOrientation.prototype,"getTracking",ol.DeviceOrientation.prototype.getTracking); ol.DeviceOrientation.prototype.handleTrackingChanged_=function(){if(ol.DeviceOrientation.SUPPORTED){var a=this.getTracking();a&&goog.isNull(this.listenerKey_)?this.listenerKey_=goog.events.listen(window,"deviceorientation",this.orientationChange_,!1,this):a||goog.isNull(this.listenerKey_)||(goog.events.unlistenByKey(this.listenerKey_),this.listenerKey_=null)}};ol.DeviceOrientation.prototype.setTracking=function(a){this.set(ol.DeviceOrientationProperty.TRACKING,a)}; goog.exportProperty(ol.DeviceOrientation.prototype,"setTracking",ol.DeviceOrientation.prototype.setTracking);ol.Ellipsoid=function(a,b){this.a=a;this.flattening=b;this.b=this.a*(1-this.flattening);this.eSquared=2*b-b*b;this.e=Math.sqrt(this.eSquared)}; ol.Ellipsoid.prototype.vincenty=function(a,b,c,d){c=goog.isDef(c)?c:1E-12;var e=goog.isDef(d)?d:100,f=this.flattening,g=goog.math.toRadians(a[1]);d=goog.math.toRadians(b[1]);var h=goog.math.toRadians(b[0]-a[0]);b=Math.atan((1-f)*Math.tan(g));a=Math.cos(b);b=Math.sin(b);g=Math.atan((1-f)*Math.tan(d));d=Math.cos(g);var g=Math.sin(g),k=h,l,m,n;m=Infinity;for(var q,r,p;0a[1]&&(a[1]=b[1]);b[2]a[3]&&(a[3]=b[3])};ol.extent.extendCoordinate=function(a,b){b[0]a[1]&&(a[1]=b[0]);b[1]a[3]&&(a[3]=b[1])};ol.extent.getBottomLeft=function(a){return[a[0],a[2]]};ol.extent.getBottomRight=function(a){return[a[1],a[2]]};ol.extent.getCenter=function(a){return[(a[0]+a[1])/2,(a[2]+a[3])/2]}; ol.extent.getForView2DAndSize=function(a,b,c,d,e){var f=b*d[0]/2;d=b*d[1]/2;b=Math.cos(c);c=Math.sin(c);f=[-f,-f,f,f];d=[-d,d,-d,d];var g,h,k;for(g=0;4>g;++g)h=f[g],k=d[g],f[g]=a[0]+h*b-k*c,d[g]=a[1]+h*c+k*b;return ol.extent.boundingExtentXYs_(f,d,e)};ol.extent.getHeight=function(a){return a[3]-a[2]};ol.extent.getSize=function(a){return[a[1]-a[0],a[3]-a[2]]};ol.extent.getTopLeft=function(a){return[a[0],a[3]]};ol.extent.getTopRight=function(a){return[a[1],a[3]]}; ol.extent.getWidth=function(a){return a[1]-a[0]};ol.extent.intersects=function(a,b){return a[0]<=b[1]&&a[1]>=b[0]&&a[2]<=b[3]&&a[3]>=b[2]};ol.extent.isEmpty=function(a){return a[1]goog.vec.EPSILON?(b[2]=Math.atan2(a[2]*c,a[6]*c),b[1]=Math.atan2(d*c,a[10]),b[0]=Math.atan2(a[8]*c,-a[9]*c)):(b[0]=0,b[1]=Math.atan2(d*c,a[10]),b[2]=Math.atan2(a[1],a[0]));b[0]=(b[0]+2*Math.PI)%(2*Math.PI);b[2]=(b[2]+2*Math.PI)%(2*Math.PI);b[1]=(b[1]*c+2*Math.PI)%(2*Math.PI)*c;return b}; goog.vec.Mat4.translate=function(a,b,c,d){return goog.vec.Mat4.setColumnValues(a,3,a[0]*b+a[4]*c+a[8]*d+a[12],a[1]*b+a[5]*c+a[9]*d+a[13],a[2]*b+a[6]*c+a[10]*d+a[14],a[3]*b+a[7]*c+a[11]*d+a[15])};goog.vec.Mat4.scale=function(a,b,c,d){return goog.vec.Mat4.setFromValues(a,a[0]*b,a[1]*b,a[2]*b,a[3]*b,a[4]*c,a[5]*c,a[6]*c,a[7]*c,a[8]*d,a[9]*d,a[10]*d,a[11]*d,a[12],a[13],a[14],a[15])}; goog.vec.Mat4.rotate=function(a,b,c,d,e){var f=a[0],g=a[1],h=a[2],k=a[3],l=a[4],m=a[5],n=a[6],q=a[7],r=a[8],p=a[9],s=a[10],t=a[11],u=a[12],w=a[13],v=a[14],B=a[15],z=Math.cos(b),F=Math.sin(b),A=1-z;b=c*c*A+z;var x=c*d*A+e*F,y=c*e*A-d*F,C=c*d*A-e*F,D=d*d*A+z,G=d*e*A+c*F,E=c*e*A+d*F;c=d*e*A-c*F;e=e*e*A+z;return goog.vec.Mat4.setFromValues(a,f*b+l*x+r*y,g*b+m*x+p*y,h*b+n*x+s*y,k*b+q*x+t*y,f*C+l*D+r*G,g*C+m*D+p*G,h*C+n*D+s*G,k*C+q*D+t*G,f*E+l*c+r*e,g*E+m*c+p*e,h*E+n*c+s*e,k*E+q*c+t*e,u,w,v,B)}; goog.vec.Mat4.rotateX=function(a,b){var c=a[4],d=a[5],e=a[6],f=a[7],g=a[8],h=a[9],k=a[10],l=a[11],m=Math.cos(b),n=Math.sin(b);a[4]=c*m+g*n;a[5]=d*m+h*n;a[6]=e*m+k*n;a[7]=f*m+l*n;a[8]=c*-n+g*m;a[9]=d*-n+h*m;a[10]=e*-n+k*m;a[11]=f*-n+l*m;return a};goog.vec.Mat4.rotateY=function(a,b){var c=a[0],d=a[1],e=a[2],f=a[3],g=a[8],h=a[9],k=a[10],l=a[11],m=Math.cos(b),n=Math.sin(b);a[0]=c*m+g*-n;a[1]=d*m+h*-n;a[2]=e*m+k*-n;a[3]=f*m+l*-n;a[8]=c*n+g*m;a[9]=d*n+h*m;a[10]=e*n+k*m;a[11]=f*n+l*m;return a}; goog.vec.Mat4.rotateZ=function(a,b){var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5],k=a[6],l=a[7],m=Math.cos(b),n=Math.sin(b);a[0]=c*m+g*n;a[1]=d*m+h*n;a[2]=e*m+k*n;a[3]=f*m+l*n;a[4]=c*-n+g*m;a[5]=d*-n+h*m;a[6]=e*-n+k*m;a[7]=f*-n+l*m;return a};goog.vec.Mat4.getTranslation=function(a,b){b[0]=a[12];b[1]=a[13];b[2]=a[14];return b};goog.vec.Mat4.tmpVec3_=[goog.vec.Vec3.createFloat64(),goog.vec.Vec3.createFloat64()];goog.vec.Mat4.tmpVec4_=[goog.vec.Vec4.createFloat64(),goog.vec.Vec4.createFloat64(),goog.vec.Vec4.createFloat64()]; goog.vec.Mat4.tmpMat4_=[goog.vec.Mat4.createFloat64()];ol.TileState={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};ol.Tile=function(a,b){goog.events.EventTarget.call(this);this.tileCoord=a;this.state=b};goog.inherits(ol.Tile,goog.events.EventTarget);ol.Tile.prototype.dispatchChangeEvent=function(){this.dispatchEvent(goog.events.EventType.CHANGE)};ol.Tile.prototype.getKey=function(){return goog.getUid(this).toString()};ol.Tile.prototype.getState=function(){return this.state};ol.structs={};ol.structs.PriorityQueue=function(a,b){this.priorityFunction_=a;this.keyFunction_=b;this.elements_=[];this.priorities_=[];this.queuedElements_={}};ol.structs.PriorityQueue.DROP=Infinity;ol.structs.PriorityQueue.prototype.assertValid=function(){var a=this.elements_.length,b;for(b=0;b<(a>>1)-1;++b);};ol.structs.PriorityQueue.prototype.clear=function(){this.elements_.length=0;this.priorities_.length=0;goog.object.clear(this.queuedElements_)}; ol.structs.PriorityQueue.prototype.dequeue=function(){var a=this.elements_,b=this.priorities_,c=a[0];1==a.length?(a.length=0,b.length=0):(a[0]=a.pop(),b[0]=b.pop(),this.siftUp_(0));a=this.keyFunction_(c);delete this.queuedElements_[a];return c};ol.structs.PriorityQueue.prototype.enqueue=function(a){var b=this.priorityFunction_(a);b!=ol.structs.PriorityQueue.DROP&&(this.elements_.push(a),this.priorities_.push(b),this.queuedElements_[this.keyFunction_(a)]=!0,this.siftDown_(0,this.elements_.length-1))}; ol.structs.PriorityQueue.prototype.getCount=function(){return this.elements_.length};ol.structs.PriorityQueue.prototype.getLeftChildIndex_=function(a){return 2*a+1};ol.structs.PriorityQueue.prototype.getRightChildIndex_=function(a){return 2*a+2};ol.structs.PriorityQueue.prototype.getParentIndex_=function(a){return a-1>>1};ol.structs.PriorityQueue.prototype.heapify_=function(){var a;for(a=(this.elements_.length>>1)-1;0<=a;a--)this.siftUp_(a)}; ol.structs.PriorityQueue.prototype.isEmpty=function(){return 0===this.elements_.length};ol.structs.PriorityQueue.prototype.isKeyQueued=function(a){return a in this.queuedElements_};ol.structs.PriorityQueue.prototype.isQueued=function(a){return this.isKeyQueued(this.keyFunction_(a))}; ol.structs.PriorityQueue.prototype.siftUp_=function(a){for(var b=this.elements_,c=this.priorities_,d=b.length,e=b[a],f=c[a],g=a;a>1;){var h=this.getLeftChildIndex_(a),k=this.getRightChildIndex_(a),h=ka;){var g=this.getParentIndex_(b);if(d[g]>f)c[b]=c[g],d[b]=d[g],b=g;else break}c[b]=e;d[b]=f}; ol.structs.PriorityQueue.prototype.reprioritize=function(){var a=this.priorityFunction_,b=this.elements_,c=this.priorities_,d=0,e=b.length,f,g,h;for(g=0;ga?ol.easing.inAndOut(2*a):1-ol.easing.inAndOut(2*(a-0.5))};ol.animation={};ol.animation.bounce=function(a){var b=a.resolution,c=goog.isDef(a.start)?a.start:goog.now(),d=goog.isDef(a.duration)?a.duration:1E3,e=goog.isDef(a.easing)?a.easing:ol.easing.upAndDown;return function(a,g){if(g.timea;)c-=3;if(0<=c){var a=this.points_[b+2]-this.points_[c+2],d=this.points_[b]-this.points_[c],b=this.points_[b+1]-this.points_[c+1];this.angle_=Math.atan2(b,d);this.initialVelocity_=Math.sqrt(d*d+b*b)/a;return this.initialVelocity_>this.minVelocity_}return!1}; ol.Kinetic.prototype.pan=function(a){var b=this.decay_,c=this.initialVelocity_,d=this.minVelocity_,e=this.getDuration_();return ol.animation.pan({source:a,duration:e,easing:function(a){return c*(Math.exp(b*a*e)-1)/(d-c)}})};ol.Kinetic.prototype.getDuration_=function(){return Math.log(this.minVelocity_/this.initialVelocity_)/this.decay_};ol.Kinetic.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_};ol.Kinetic.prototype.getAngle=function(){return this.angle_};goog.structs={};goog.structs.getCount=function(a){return"function"==typeof a.getCount?a.getCount():goog.isArrayLike(a)||goog.isString(a)?a.length:goog.object.getCount(a)};goog.structs.getValues=function(a){if("function"==typeof a.getValues)return a.getValues();if(goog.isString(a))return a.split("");if(goog.isArrayLike(a)){for(var b=[],c=a.length,d=0;d=a.length)throw goog.iter.StopIteration;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}; goog.iter.forEach=function(a,b,c){if(goog.isArrayLike(a))try{goog.array.forEach(a,b,c)}catch(d){if(d!==goog.iter.StopIteration)throw d;}else{a=goog.iter.toIterator(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(e){if(e!==goog.iter.StopIteration)throw e;}}};goog.iter.filter=function(a,b,c){var d=goog.iter.toIterator(a);a=new goog.iter.Iterator;a.next=function(){for(;;){var a=d.next();if(b.call(c,a,void 0,d))return a}};return a}; goog.iter.range=function(a,b,c){var d=0,e=a,f=c||1;1=e||0>f&&d<=e)throw goog.iter.StopIteration;var a=d;d+=f;return a};return g};goog.iter.join=function(a,b){return goog.iter.toArray(a).join(b)};goog.iter.map=function(a,b,c){var d=goog.iter.toIterator(a);a=new goog.iter.Iterator;a.next=function(){for(;;){var a=d.next();return b.call(c,a,void 0,d)}};return a}; goog.iter.reduce=function(a,b,c,d){var e=c;goog.iter.forEach(a,function(a){e=b.call(d,e,a)});return e};goog.iter.some=function(a,b,c){a=goog.iter.toIterator(a);try{for(;;)if(b.call(c,a.next(),void 0,a))return!0}catch(d){if(d!==goog.iter.StopIteration)throw d;}return!1};goog.iter.every=function(a,b,c){a=goog.iter.toIterator(a);try{for(;;)if(!b.call(c,a.next(),void 0,a))return!1}catch(d){if(d!==goog.iter.StopIteration)throw d;}return!0}; goog.iter.chain=function(a){var b=arguments,c=b.length,d=0,e=new goog.iter.Iterator;e.next=function(){try{if(d>=c)throw goog.iter.StopIteration;return goog.iter.toIterator(b[d]).next()}catch(a){if(a!==goog.iter.StopIteration||d>=c)throw a;d++;return this.next()}};return e};goog.iter.dropWhile=function(a,b,c){var d=goog.iter.toIterator(a);a=new goog.iter.Iterator;var e=!0;a.next=function(){for(;;){var a=d.next();if(!e||!b.call(c,a,void 0,d))return e=!1,a}};return a}; goog.iter.takeWhile=function(a,b,c){var d=goog.iter.toIterator(a);a=new goog.iter.Iterator;var e=!0;a.next=function(){for(;;)if(e){var a=d.next();if(b.call(c,a,void 0,d))return a;e=!1}else throw goog.iter.StopIteration;};return a};goog.iter.toArray=function(a){if(goog.isArrayLike(a))return goog.array.toArray(a);a=goog.iter.toIterator(a);var b=[];goog.iter.forEach(a,function(a){b.push(a)});return b}; goog.iter.equals=function(a,b){a=goog.iter.toIterator(a);b=goog.iter.toIterator(b);var c,d;try{for(;;){c=d=!1;var e=a.next();c=!0;var f=b.next();d=!0;if(e!=f)break}}catch(g){if(g!==goog.iter.StopIteration)throw g;if(c&&!d)return!1;if(!d)try{b.next()}catch(h){if(h!==goog.iter.StopIteration)throw h;return!0}}return!1};goog.iter.nextOrValue=function(a,b){try{return goog.iter.toIterator(a).next()}catch(c){if(c!=goog.iter.StopIteration)throw c;return b}}; goog.iter.product=function(a){if(goog.array.some(arguments,function(a){return!a.length})||!arguments.length)return new goog.iter.Iterator;var b=new goog.iter.Iterator,c=arguments,d=goog.array.repeat(0,c.length);b.next=function(){if(d){for(var a=goog.array.map(d,function(a,b){return c[b][a]}),b=d.length-1;0<=b;b--){if(d[b]2*this.count_&&this.cleanupKeysArray_(),!0):!1}; goog.structs.Map.prototype.cleanupKeysArray_=function(){if(this.count_!=this.keys_.length){for(var a=0,b=0;a=c.length)throw goog.iter.StopIteration;var g=c[b++];return a?g:d[g]}};return g}; goog.structs.Map.hasKey_=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};goog.uri={};goog.uri.utils={};goog.uri.utils.CharCode_={AMPERSAND:38,EQUAL:61,HASH:35,QUESTION:63};goog.uri.utils.buildFromEncodedParts=function(a,b,c,d,e,f,g){var h="";a&&(h+=a+":");c&&(h+="//",b&&(h+=b+"@"),h+=c,d&&(h+=":"+d));e&&(h+=e);f&&(h+="?"+f);g&&(h+="#"+g);return h};goog.uri.utils.splitRe_=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?\x3d[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"); goog.uri.utils.ComponentIndex={SCHEME:1,USER_INFO:2,DOMAIN:3,PORT:4,PATH:5,QUERY_DATA:6,FRAGMENT:7};goog.uri.utils.split=function(a){goog.uri.utils.phishingProtection_();return a.match(goog.uri.utils.splitRe_)};goog.uri.utils.needsPhishingProtection_=goog.userAgent.WEBKIT; goog.uri.utils.phishingProtection_=function(){if(goog.uri.utils.needsPhishingProtection_){goog.uri.utils.needsPhishingProtection_=!1;var a=goog.global.location;if(a){var b=a.href;if(b&&(b=goog.uri.utils.getDomain(b))&&b!=a.hostname)throw goog.uri.utils.needsPhishingProtection_=!0,Error();}}};goog.uri.utils.decodeIfPossible_=function(a){return a&&decodeURIComponent(a)};goog.uri.utils.getComponentByIndex_=function(a,b){return goog.uri.utils.split(b)[a]||null}; goog.uri.utils.getScheme=function(a){return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.SCHEME,a)};goog.uri.utils.getEffectiveScheme=function(a){a=goog.uri.utils.getScheme(a);!a&&self.location&&(a=self.location.protocol,a=a.substr(0,a.length-1));return a?a.toLowerCase():""};goog.uri.utils.getUserInfoEncoded=function(a){return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.USER_INFO,a)};goog.uri.utils.getUserInfo=function(a){return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getUserInfoEncoded(a))}; goog.uri.utils.getDomainEncoded=function(a){return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.DOMAIN,a)};goog.uri.utils.getDomain=function(a){return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getDomainEncoded(a))};goog.uri.utils.getPort=function(a){return Number(goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.PORT,a))||null};goog.uri.utils.getPathEncoded=function(a){return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.PATH,a)}; goog.uri.utils.getPath=function(a){return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getPathEncoded(a))};goog.uri.utils.getQueryData=function(a){return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.QUERY_DATA,a)};goog.uri.utils.getFragmentEncoded=function(a){var b=a.indexOf("#");return 0>b?null:a.substr(b+1)};goog.uri.utils.setFragmentEncoded=function(a,b){return goog.uri.utils.removeFragment(a)+(b?"#"+b:"")};goog.uri.utils.getFragment=function(a){return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getFragmentEncoded(a))}; goog.uri.utils.getHost=function(a){a=goog.uri.utils.split(a);return goog.uri.utils.buildFromEncodedParts(a[goog.uri.utils.ComponentIndex.SCHEME],a[goog.uri.utils.ComponentIndex.USER_INFO],a[goog.uri.utils.ComponentIndex.DOMAIN],a[goog.uri.utils.ComponentIndex.PORT])};goog.uri.utils.getPathAndAfter=function(a){a=goog.uri.utils.split(a);return goog.uri.utils.buildFromEncodedParts(null,null,null,null,a[goog.uri.utils.ComponentIndex.PATH],a[goog.uri.utils.ComponentIndex.QUERY_DATA],a[goog.uri.utils.ComponentIndex.FRAGMENT])}; goog.uri.utils.removeFragment=function(a){var b=a.indexOf("#");return 0>b?a:a.substr(0,b)};goog.uri.utils.haveSameDomain=function(a,b){var c=goog.uri.utils.split(a),d=goog.uri.utils.split(b);return c[goog.uri.utils.ComponentIndex.DOMAIN]==d[goog.uri.utils.ComponentIndex.DOMAIN]&&c[goog.uri.utils.ComponentIndex.SCHEME]==d[goog.uri.utils.ComponentIndex.SCHEME]&&c[goog.uri.utils.ComponentIndex.PORT]==d[goog.uri.utils.ComponentIndex.PORT]}; goog.uri.utils.assertNoFragmentsOrQueries_=function(a){if(goog.DEBUG&&(0<=a.indexOf("#")||0<=a.indexOf("?")))throw Error("goog.uri.utils: Fragment or query identifiers are not supported: ["+a+"]");};goog.uri.utils.appendQueryData_=function(a){if(a[1]){var b=a[0],c=b.indexOf("#");0<=c&&(a.push(b.substr(c)),a[0]=b=b.substr(0,c));c=b.indexOf("?");0>c?a[1]="?":c==b.length-1&&(a[1]=void 0)}return a.join("")}; goog.uri.utils.appendKeyValuePairs_=function(a,b,c){if(goog.isArray(b))for(var d=0;dd)return null;var e=a.indexOf("\x26",d);if(0>e||e>c)e=c;d+=b.length+1;return goog.string.urlDecode(a.substr(d,e-d))};goog.uri.utils.getParamValues=function(a,b){for(var c=a.search(goog.uri.utils.hashOrEndRe_),d=0,e,f=[];0<=(e=goog.uri.utils.findParam_(a,d,b,c));){d=a.indexOf("\x26",e);if(0>d||d>c)d=c;e+=b.length+1;f.push(goog.string.urlDecode(a.substr(e,d-e)))}return f}; goog.uri.utils.trailingQueryPunctuationRe_=/[?&]($|#)/;goog.uri.utils.removeParam=function(a,b){for(var c=a.search(goog.uri.utils.hashOrEndRe_),d=0,e,f=[];0<=(e=goog.uri.utils.findParam_(a,d,b,c));)f.push(a.substring(d,e)),d=Math.min(a.indexOf("\x26",e)+1||c,c);f.push(a.substr(d));return f.join("").replace(goog.uri.utils.trailingQueryPunctuationRe_,"$1")};goog.uri.utils.setParam=function(a,b,c){return goog.uri.utils.appendParam(goog.uri.utils.removeParam(a,b),b,c)}; goog.uri.utils.appendPath=function(a,b){goog.uri.utils.assertNoFragmentsOrQueries_(a);goog.string.endsWith(a,"/")&&(a=a.substr(0,a.length-1));goog.string.startsWith(b,"/")&&(b=b.substr(1));return goog.string.buildString(a,"/",b)};goog.uri.utils.StandardQueryParam={RANDOM:"zx"};goog.uri.utils.makeUnique=function(a){return goog.uri.utils.setParam(a,goog.uri.utils.StandardQueryParam.RANDOM,goog.string.getRandomString())};goog.Uri=function(a,b){var c;a instanceof goog.Uri?(this.ignoreCase_=goog.isDef(b)?b:a.getIgnoreCase(),this.setScheme(a.getScheme()),this.setUserInfo(a.getUserInfo()),this.setDomain(a.getDomain()),this.setPort(a.getPort()),this.setPath(a.getPath()),this.setQueryData(a.getQueryData().clone()),this.setFragment(a.getFragment())):a&&(c=goog.uri.utils.split(String(a)))?(this.ignoreCase_=!!b,this.setScheme(c[goog.uri.utils.ComponentIndex.SCHEME]||"",!0),this.setUserInfo(c[goog.uri.utils.ComponentIndex.USER_INFO]|| "",!0),this.setDomain(c[goog.uri.utils.ComponentIndex.DOMAIN]||"",!0),this.setPort(c[goog.uri.utils.ComponentIndex.PORT]),this.setPath(c[goog.uri.utils.ComponentIndex.PATH]||"",!0),this.setQueryData(c[goog.uri.utils.ComponentIndex.QUERY_DATA]||"",!0),this.setFragment(c[goog.uri.utils.ComponentIndex.FRAGMENT]||"",!0)):(this.ignoreCase_=!!b,this.queryData_=new goog.Uri.QueryData(null,null,this.ignoreCase_))};goog.Uri.preserveParameterTypesCompatibilityFlag=!1;goog.Uri.RANDOM_PARAM=goog.uri.utils.StandardQueryParam.RANDOM; goog.Uri.prototype.scheme_="";goog.Uri.prototype.userInfo_="";goog.Uri.prototype.domain_="";goog.Uri.prototype.port_=null;goog.Uri.prototype.path_="";goog.Uri.prototype.fragment_="";goog.Uri.prototype.isReadOnly_=!1;goog.Uri.prototype.ignoreCase_=!1; goog.Uri.prototype.toString=function(){var a=[],b=this.getScheme();b&&a.push(goog.Uri.encodeSpecialChars_(b,goog.Uri.reDisallowedInSchemeOrUserInfo_),":");if(b=this.getDomain()){a.push("//");var c=this.getUserInfo();c&&a.push(goog.Uri.encodeSpecialChars_(c,goog.Uri.reDisallowedInSchemeOrUserInfo_),"@");a.push(goog.string.urlEncode(b));b=this.getPort();null!=b&&a.push(":",String(b))}if(b=this.getPath())this.hasDomain()&&"/"!=b.charAt(0)&&a.push("/"),a.push(goog.Uri.encodeSpecialChars_(b,"/"==b.charAt(0)? goog.Uri.reDisallowedInAbsolutePath_:goog.Uri.reDisallowedInRelativePath_));(b=this.getEncodedQuery())&&a.push("?",b);(b=this.getFragment())&&a.push("#",goog.Uri.encodeSpecialChars_(b,goog.Uri.reDisallowedInFragment_));return a.join("")}; goog.Uri.prototype.resolve=function(a){var b=this.clone(),c=a.hasScheme();c?b.setScheme(a.getScheme()):c=a.hasUserInfo();c?b.setUserInfo(a.getUserInfo()):c=a.hasDomain();c?b.setDomain(a.getDomain()):c=a.hasPort();var d=a.getPath();if(c)b.setPort(a.getPort());else if(c=a.hasPath()){if("/"!=d.charAt(0))if(this.hasDomain()&&!this.hasPath())d="/"+d;else{var e=b.getPath().lastIndexOf("/");-1!=e&&(d=b.getPath().substr(0,e+1)+d)}d=goog.Uri.removeDotSegments(d)}c?b.setPath(d):c=a.hasQuery();c?b.setQueryData(a.getDecodedQuery()): c=a.hasFragment();c&&b.setFragment(a.getFragment());return b};goog.Uri.prototype.clone=function(){return new goog.Uri(this)};goog.Uri.prototype.getScheme=function(){return this.scheme_};goog.Uri.prototype.setScheme=function(a,b){this.enforceReadOnly();if(this.scheme_=b?goog.Uri.decodeOrEmpty_(a):a)this.scheme_=this.scheme_.replace(/:$/,"");return this};goog.Uri.prototype.hasScheme=function(){return!!this.scheme_};goog.Uri.prototype.getUserInfo=function(){return this.userInfo_}; goog.Uri.prototype.setUserInfo=function(a,b){this.enforceReadOnly();this.userInfo_=b?goog.Uri.decodeOrEmpty_(a):a;return this};goog.Uri.prototype.hasUserInfo=function(){return!!this.userInfo_};goog.Uri.prototype.getDomain=function(){return this.domain_};goog.Uri.prototype.setDomain=function(a,b){this.enforceReadOnly();this.domain_=b?goog.Uri.decodeOrEmpty_(a):a;return this};goog.Uri.prototype.hasDomain=function(){return!!this.domain_};goog.Uri.prototype.getPort=function(){return this.port_}; goog.Uri.prototype.setPort=function(a){this.enforceReadOnly();if(a){a=Number(a);if(isNaN(a)||0>a)throw Error("Bad port number "+a);this.port_=a}else this.port_=null;return this};goog.Uri.prototype.hasPort=function(){return null!=this.port_};goog.Uri.prototype.getPath=function(){return this.path_};goog.Uri.prototype.setPath=function(a,b){this.enforceReadOnly();this.path_=b?goog.Uri.decodeOrEmpty_(a):a;return this};goog.Uri.prototype.hasPath=function(){return!!this.path_}; goog.Uri.prototype.hasQuery=function(){return""!==this.queryData_.toString()};goog.Uri.prototype.setQueryData=function(a,b){this.enforceReadOnly();a instanceof goog.Uri.QueryData?(this.queryData_=a,this.queryData_.setIgnoreCase(this.ignoreCase_)):(b||(a=goog.Uri.encodeSpecialChars_(a,goog.Uri.reDisallowedInQuery_)),this.queryData_=new goog.Uri.QueryData(a,null,this.ignoreCase_));return this};goog.Uri.prototype.setQuery=function(a,b){return this.setQueryData(a,b)}; goog.Uri.prototype.getEncodedQuery=function(){return this.queryData_.toString()};goog.Uri.prototype.getDecodedQuery=function(){return this.queryData_.toDecodedString()};goog.Uri.prototype.getQueryData=function(){return this.queryData_};goog.Uri.prototype.getQuery=function(){return this.getEncodedQuery()};goog.Uri.prototype.setParameterValue=function(a,b){this.enforceReadOnly();this.queryData_.set(a,b);return this}; goog.Uri.prototype.setParameterValues=function(a,b){this.enforceReadOnly();goog.isArray(b)||(b=[String(b)]);this.queryData_.setValues(a,b);return this};goog.Uri.prototype.getParameterValues=function(a){return this.queryData_.getValues(a)};goog.Uri.prototype.getParameterValue=function(a){return this.queryData_.get(a)};goog.Uri.prototype.getFragment=function(){return this.fragment_};goog.Uri.prototype.setFragment=function(a,b){this.enforceReadOnly();this.fragment_=b?goog.Uri.decodeOrEmpty_(a):a;return this}; goog.Uri.prototype.hasFragment=function(){return!!this.fragment_};goog.Uri.prototype.hasSameDomainAs=function(a){return(!this.hasDomain()&&!a.hasDomain()||this.getDomain()==a.getDomain())&&(!this.hasPort()&&!a.hasPort()||this.getPort()==a.getPort())};goog.Uri.prototype.makeUnique=function(){this.enforceReadOnly();this.setParameterValue(goog.Uri.RANDOM_PARAM,goog.string.getRandomString());return this};goog.Uri.prototype.removeParameter=function(a){this.enforceReadOnly();this.queryData_.remove(a);return this}; goog.Uri.prototype.setReadOnly=function(a){this.isReadOnly_=a;return this};goog.Uri.prototype.isReadOnly=function(){return this.isReadOnly_};goog.Uri.prototype.enforceReadOnly=function(){if(this.isReadOnly_)throw Error("Tried to modify a read-only Uri");};goog.Uri.prototype.setIgnoreCase=function(a){this.ignoreCase_=a;this.queryData_&&this.queryData_.setIgnoreCase(a);return this};goog.Uri.prototype.getIgnoreCase=function(){return this.ignoreCase_}; goog.Uri.parse=function(a,b){return a instanceof goog.Uri?a.clone():new goog.Uri(a,b)};goog.Uri.create=function(a,b,c,d,e,f,g,h){h=new goog.Uri(null,h);a&&h.setScheme(a);b&&h.setUserInfo(b);c&&h.setDomain(c);d&&h.setPort(d);e&&h.setPath(e);f&&h.setQueryData(f);g&&h.setFragment(g);return h};goog.Uri.resolve=function(a,b){a instanceof goog.Uri||(a=goog.Uri.parse(a));b instanceof goog.Uri||(b=goog.Uri.parse(b));return a.resolve(b)}; goog.Uri.removeDotSegments=function(a){if(".."==a||"."==a)return"";if(goog.string.contains(a,"./")||goog.string.contains(a,"/.")){var b=goog.string.startsWith(a,"/");a=a.split("/");for(var c=[],d=0;d>4&15).toString(16)+(a&15).toString(16)};goog.Uri.reDisallowedInSchemeOrUserInfo_=/[#\/\?@]/g;goog.Uri.reDisallowedInRelativePath_=/[\#\?:]/g;goog.Uri.reDisallowedInAbsolutePath_=/[\#\?]/g;goog.Uri.reDisallowedInQuery_=/[\#\?@]/g;goog.Uri.reDisallowedInFragment_=/#/g; goog.Uri.haveSameDomain=function(a,b){var c=goog.uri.utils.split(a),d=goog.uri.utils.split(b);return c[goog.uri.utils.ComponentIndex.DOMAIN]==d[goog.uri.utils.ComponentIndex.DOMAIN]&&c[goog.uri.utils.ComponentIndex.PORT]==d[goog.uri.utils.ComponentIndex.PORT]};goog.Uri.QueryData=function(a,b,c){this.encodedQuery_=a||null;this.ignoreCase_=!!c}; goog.Uri.QueryData.prototype.ensureKeyMapInitialized_=function(){if(!this.keyMap_&&(this.keyMap_=new goog.structs.Map,this.count_=0,this.encodedQuery_))for(var a=this.encodedQuery_.split("\x26"),b=0;bgoog.Timer.MAX_TIMEOUT_?-1:goog.Timer.defaultTimerObject.setTimeout(a,b||0)};goog.Timer.clear=function(a){goog.Timer.defaultTimerObject.clearTimeout(a)};goog.async.Delay=function(a,b,c){goog.Disposable.call(this);this.listener_=a;this.interval_=b||0;this.handler_=c;this.callback_=goog.bind(this.doAction_,this)};goog.inherits(goog.async.Delay,goog.Disposable);goog.Delay=goog.async.Delay;goog.async.Delay.prototype.id_=0;goog.async.Delay.prototype.disposeInternal=function(){goog.async.Delay.superClass_.disposeInternal.call(this);this.stop();delete this.listener_;delete this.handler_}; goog.async.Delay.prototype.start=function(a){this.stop();this.id_=goog.Timer.callOnce(this.callback_,goog.isDef(a)?a:this.interval_)};goog.async.Delay.prototype.stop=function(){this.isActive()&&goog.Timer.clear(this.id_);this.id_=0};goog.async.Delay.prototype.fire=function(){this.stop();this.doAction_()};goog.async.Delay.prototype.fireIfActive=function(){this.isActive()&&this.fire()};goog.async.Delay.prototype.isActive=function(){return 0!=this.id_}; goog.async.Delay.prototype.doAction_=function(){this.id_=0;this.listener_&&this.listener_.call(this.handler_)};goog.structs.Collection=function(){};goog.structs.Set=function(a){this.map_=new goog.structs.Map;a&&this.addAll(a)};goog.structs.Set.getKey_=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+goog.getUid(a):b.substr(0,1)+a};goog.structs.Set.prototype.getCount=function(){return this.map_.getCount()};goog.structs.Set.prototype.add=function(a){this.map_.set(goog.structs.Set.getKey_(a),a)};goog.structs.Set.prototype.addAll=function(a){a=goog.structs.getValues(a);for(var b=a.length,c=0;cb)return!1;!(a instanceof goog.structs.Set)&&5a.aspectRatio()?a.width/this.width:a.height/this.height;return this.scale(a)};goog.dom.ASSUME_QUIRKS_MODE=!1;goog.dom.ASSUME_STANDARDS_MODE=!0;goog.dom.COMPAT_MODE_KNOWN_=goog.dom.ASSUME_QUIRKS_MODE||goog.dom.ASSUME_STANDARDS_MODE;goog.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};goog.dom.getDomHelper=function(a){return a?new goog.dom.DomHelper(goog.dom.getOwnerDocument(a)):goog.dom.defaultDomHelper_||(goog.dom.defaultDomHelper_=new goog.dom.DomHelper)}; goog.dom.getDocument=function(){return document};goog.dom.getElement=function(a){return goog.isString(a)?document.getElementById(a):a};goog.dom.$=goog.dom.getElement;goog.dom.getElementsByTagNameAndClass=function(a,b,c){return goog.dom.getElementsByTagNameAndClass_(document,a,b,c)}; goog.dom.getElementsByClass=function(a,b){var c=b||document;return goog.dom.canUseQuerySelector_(c)?c.querySelectorAll("."+a):c.getElementsByClassName?c.getElementsByClassName(a):goog.dom.getElementsByTagNameAndClass_(document,"*",a,b)};goog.dom.getElementByClass=function(a,b){var c=b||document,d=null;return(d=goog.dom.canUseQuerySelector_(c)?c.querySelector("."+a):goog.dom.getElementsByClass(a,b)[0])||null};goog.dom.canUseQuerySelector_=function(a){return!(!a.querySelectorAll||!a.querySelector)}; goog.dom.getElementsByTagNameAndClass_=function(a,b,c,d){a=d||a;b=b&&"*"!=b?b.toUpperCase():"";if(goog.dom.canUseQuerySelector_(a)&&(b||c))return a.querySelectorAll(b+(c?"."+c:""));if(c&&a.getElementsByClassName){a=a.getElementsByClassName(c);if(b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;return d}return a}a=a.getElementsByTagName(b||"*");if(c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&goog.array.contains(b.split(/\s+/),c)&&(d[e++]=g);d.length= e;return d}return a};goog.dom.$$=goog.dom.getElementsByTagNameAndClass;goog.dom.setProperties=function(a,b){goog.object.forEach(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in goog.dom.DIRECT_ATTRIBUTE_MAP_?a.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[d],b):goog.string.startsWith(d,"aria-")||goog.string.startsWith(d,"data-")?a.setAttribute(d,b):a[d]=b})}; goog.dom.DIRECT_ATTRIBUTE_MAP_={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};goog.dom.getViewportSize=function(a){return goog.dom.getViewportSize_(a||window)};goog.dom.getViewportSize_=function(a){a=a.document;a=goog.dom.isCss1CompatMode_(a)?a.documentElement:a.body;return new goog.math.Size(a.clientWidth,a.clientHeight)}; goog.dom.getDocumentHeight=function(){return goog.dom.getDocumentHeight_(window)};goog.dom.getDocumentHeight_=function(a){var b=a.document,c=0;if(b){a=goog.dom.getViewportSize_(a).height;var c=b.body,d=b.documentElement;if(goog.dom.isCss1CompatMode_(b)&&d.scrollHeight)c=d.scrollHeight!=a?d.scrollHeight:d.offsetHeight;else{var b=d.scrollHeight,e=d.offsetHeight;d.clientHeight!=e&&(b=c.scrollHeight,e=c.offsetHeight);c=b>a?b>e?b:e:ba):!1};goog.dom.setFocusableTabIndex=function(a,b){b?a.tabIndex=0:(a.tabIndex=-1,a.removeAttribute("tabIndex"))}; goog.dom.getTextContent=function(a){if(goog.dom.BrowserFeature.CAN_USE_INNER_TEXT&&"innerText"in a)a=goog.string.canonicalizeNewlines(a.innerText);else{var b=[];goog.dom.getTextContent_(a,b,!0);a=b.join("")}a=a.replace(/ \xAD /g," ").replace(/\xAD/g,"");a=a.replace(/\u200B/g,"");goog.dom.BrowserFeature.CAN_USE_INNER_TEXT||(a=a.replace(/ +/g," "));" "!=a&&(a=a.replace(/^\s*/,""));return a};goog.dom.getRawTextContent=function(a){var b=[];goog.dom.getTextContent_(a,b,!1);return b.join("")}; goog.dom.getTextContent_=function(a,b,c){if(!(a.nodeName in goog.dom.TAGS_TO_IGNORE_))if(a.nodeType==goog.dom.NodeType.TEXT)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in goog.dom.PREDEFINED_TAG_VALUES_)b.push(goog.dom.PREDEFINED_TAG_VALUES_[a.nodeName]);else for(a=a.firstChild;a;)goog.dom.getTextContent_(a,b,c),a=a.nextSibling};goog.dom.getNodeTextLength=function(a){return goog.dom.getTextContent(a).length}; goog.dom.getNodeTextOffset=function(a,b){for(var c=b||goog.dom.getOwnerDocument(a).body,d=[];a&&a!=c;){for(var e=a;e=e.previousSibling;)d.unshift(goog.dom.getTextContent(e));a=a.parentNode}return goog.string.trimLeft(d.join("")).replace(/ +/g," ").length}; goog.dom.getNodeAtOffset=function(a,b,c){a=[a];for(var d=0,e=null;0=goog.events.KeyCodes.F1&&a.keyCode<=goog.events.KeyCodes.F12)return!1;switch(a.keyCode){case goog.events.KeyCodes.ALT:case goog.events.KeyCodes.CAPS_LOCK:case goog.events.KeyCodes.CONTEXT_MENU:case goog.events.KeyCodes.CTRL:case goog.events.KeyCodes.DOWN:case goog.events.KeyCodes.END:case goog.events.KeyCodes.ESC:case goog.events.KeyCodes.HOME:case goog.events.KeyCodes.INSERT:case goog.events.KeyCodes.LEFT:case goog.events.KeyCodes.MAC_FF_META:case goog.events.KeyCodes.META:case goog.events.KeyCodes.NUMLOCK:case goog.events.KeyCodes.NUM_CENTER:case goog.events.KeyCodes.PAGE_DOWN:case goog.events.KeyCodes.PAGE_UP:case goog.events.KeyCodes.PAUSE:case goog.events.KeyCodes.PHANTOM:case goog.events.KeyCodes.PRINT_SCREEN:case goog.events.KeyCodes.RIGHT:case goog.events.KeyCodes.SCROLL_LOCK:case goog.events.KeyCodes.SHIFT:case goog.events.KeyCodes.UP:case goog.events.KeyCodes.WIN_KEY:case goog.events.KeyCodes.WIN_KEY_RIGHT:return!1;case goog.events.KeyCodes.WIN_KEY_FF_LINUX:return!goog.userAgent.GECKO; default:return a.keyCodegoog.events.KeyCodes.LAST_MEDIA_KEY}}; goog.events.KeyCodes.firesKeyPressEvent=function(a,b,c,d,e){if(!(goog.userAgent.IE||goog.userAgent.WEBKIT&&goog.userAgent.isVersionOrHigher("525")))return!0;if(goog.userAgent.MAC&&e)return goog.events.KeyCodes.isCharacterKey(a);if(e&&!d||!c&&(b==goog.events.KeyCodes.CTRL||b==goog.events.KeyCodes.ALT||goog.userAgent.MAC&&b==goog.events.KeyCodes.META))return!1;if(goog.userAgent.WEBKIT&&d&&c)switch(a){case goog.events.KeyCodes.BACKSLASH:case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:case goog.events.KeyCodes.CLOSE_SQUARE_BRACKET:case goog.events.KeyCodes.TILDE:case goog.events.KeyCodes.SEMICOLON:case goog.events.KeyCodes.DASH:case goog.events.KeyCodes.EQUALS:case goog.events.KeyCodes.COMMA:case goog.events.KeyCodes.PERIOD:case goog.events.KeyCodes.SLASH:case goog.events.KeyCodes.APOSTROPHE:case goog.events.KeyCodes.SINGLE_QUOTE:return!1}if(goog.userAgent.IE&& d&&b==a)return!1;switch(a){case goog.events.KeyCodes.ENTER:return!(goog.userAgent.IE&&goog.userAgent.isDocumentModeOrHigher(9));case goog.events.KeyCodes.ESC:return!goog.userAgent.WEBKIT}return goog.events.KeyCodes.isCharacterKey(a)}; goog.events.KeyCodes.isCharacterKey=function(a){if(a>=goog.events.KeyCodes.ZERO&&a<=goog.events.KeyCodes.NINE||a>=goog.events.KeyCodes.NUM_ZERO&&a<=goog.events.KeyCodes.NUM_MULTIPLY||a>=goog.events.KeyCodes.A&&a<=goog.events.KeyCodes.Z||goog.userAgent.WEBKIT&&0==a)return!0;switch(a){case goog.events.KeyCodes.SPACE:case goog.events.KeyCodes.QUESTION_MARK:case goog.events.KeyCodes.NUM_PLUS:case goog.events.KeyCodes.NUM_MINUS:case goog.events.KeyCodes.NUM_PERIOD:case goog.events.KeyCodes.NUM_DIVISION:case goog.events.KeyCodes.SEMICOLON:case goog.events.KeyCodes.FF_SEMICOLON:case goog.events.KeyCodes.DASH:case goog.events.KeyCodes.EQUALS:case goog.events.KeyCodes.FF_EQUALS:case goog.events.KeyCodes.COMMA:case goog.events.KeyCodes.PERIOD:case goog.events.KeyCodes.SLASH:case goog.events.KeyCodes.APOSTROPHE:case goog.events.KeyCodes.SINGLE_QUOTE:case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:case goog.events.KeyCodes.BACKSLASH:case goog.events.KeyCodes.CLOSE_SQUARE_BRACKET:return!0; default:return!1}};goog.events.KeyCodes.normalizeGeckoKeyCode=function(a){switch(a){case goog.events.KeyCodes.FF_EQUALS:return goog.events.KeyCodes.EQUALS;case goog.events.KeyCodes.FF_SEMICOLON:return goog.events.KeyCodes.SEMICOLON;case goog.events.KeyCodes.MAC_FF_META:return goog.events.KeyCodes.META;case goog.events.KeyCodes.WIN_KEY_FF_LINUX:return goog.events.KeyCodes.WIN_KEY;default:return a}};goog.events.KeyHandler=function(a,b){goog.events.EventTarget.call(this);a&&this.attach(a,b)};goog.inherits(goog.events.KeyHandler,goog.events.EventTarget);goog.events.KeyHandler.prototype.element_=null;goog.events.KeyHandler.prototype.keyPressKey_=null;goog.events.KeyHandler.prototype.keyDownKey_=null;goog.events.KeyHandler.prototype.keyUpKey_=null;goog.events.KeyHandler.prototype.lastKey_=-1;goog.events.KeyHandler.prototype.keyCode_=-1;goog.events.KeyHandler.prototype.altKey_=!1; goog.events.KeyHandler.EventType={KEY:"key"}; goog.events.KeyHandler.safariKey_={3:goog.events.KeyCodes.ENTER,12:goog.events.KeyCodes.NUMLOCK,63232:goog.events.KeyCodes.UP,63233:goog.events.KeyCodes.DOWN,63234:goog.events.KeyCodes.LEFT,63235:goog.events.KeyCodes.RIGHT,63236:goog.events.KeyCodes.F1,63237:goog.events.KeyCodes.F2,63238:goog.events.KeyCodes.F3,63239:goog.events.KeyCodes.F4,63240:goog.events.KeyCodes.F5,63241:goog.events.KeyCodes.F6,63242:goog.events.KeyCodes.F7,63243:goog.events.KeyCodes.F8,63244:goog.events.KeyCodes.F9,63245:goog.events.KeyCodes.F10, 63246:goog.events.KeyCodes.F11,63247:goog.events.KeyCodes.F12,63248:goog.events.KeyCodes.PRINT_SCREEN,63272:goog.events.KeyCodes.DELETE,63273:goog.events.KeyCodes.HOME,63275:goog.events.KeyCodes.END,63276:goog.events.KeyCodes.PAGE_UP,63277:goog.events.KeyCodes.PAGE_DOWN,63289:goog.events.KeyCodes.NUMLOCK,63302:goog.events.KeyCodes.INSERT}; goog.events.KeyHandler.keyIdentifier_={Up:goog.events.KeyCodes.UP,Down:goog.events.KeyCodes.DOWN,Left:goog.events.KeyCodes.LEFT,Right:goog.events.KeyCodes.RIGHT,Enter:goog.events.KeyCodes.ENTER,F1:goog.events.KeyCodes.F1,F2:goog.events.KeyCodes.F2,F3:goog.events.KeyCodes.F3,F4:goog.events.KeyCodes.F4,F5:goog.events.KeyCodes.F5,F6:goog.events.KeyCodes.F6,F7:goog.events.KeyCodes.F7,F8:goog.events.KeyCodes.F8,F9:goog.events.KeyCodes.F9,F10:goog.events.KeyCodes.F10,F11:goog.events.KeyCodes.F11,F12:goog.events.KeyCodes.F12, "U+007F":goog.events.KeyCodes.DELETE,Home:goog.events.KeyCodes.HOME,End:goog.events.KeyCodes.END,PageUp:goog.events.KeyCodes.PAGE_UP,PageDown:goog.events.KeyCodes.PAGE_DOWN,Insert:goog.events.KeyCodes.INSERT};goog.events.KeyHandler.USES_KEYDOWN_=goog.userAgent.IE||goog.userAgent.WEBKIT&&goog.userAgent.isVersionOrHigher("525");goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_=goog.userAgent.MAC&&goog.userAgent.GECKO; goog.events.KeyHandler.prototype.handleKeyDown_=function(a){goog.userAgent.WEBKIT&&(this.lastKey_==goog.events.KeyCodes.CTRL&&!a.ctrlKey||this.lastKey_==goog.events.KeyCodes.ALT&&!a.altKey||goog.userAgent.MAC&&this.lastKey_==goog.events.KeyCodes.META&&!a.metaKey)&&(this.keyCode_=this.lastKey_=-1);-1==this.lastKey_&&(a.ctrlKey&&a.keyCode!=goog.events.KeyCodes.CTRL?this.lastKey_=goog.events.KeyCodes.CTRL:a.altKey&&a.keyCode!=goog.events.KeyCodes.ALT?this.lastKey_=goog.events.KeyCodes.ALT:a.metaKey&& a.keyCode!=goog.events.KeyCodes.META&&(this.lastKey_=goog.events.KeyCodes.META));goog.events.KeyHandler.USES_KEYDOWN_&&!goog.events.KeyCodes.firesKeyPressEvent(a.keyCode,this.lastKey_,a.shiftKey,a.ctrlKey,a.altKey)?this.handleEvent(a):(this.keyCode_=goog.userAgent.GECKO?goog.events.KeyCodes.normalizeGeckoKeyCode(a.keyCode):a.keyCode,goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_&&(this.altKey_=a.altKey))};goog.events.KeyHandler.prototype.resetState=function(){this.keyCode_=this.lastKey_=-1}; goog.events.KeyHandler.prototype.handleKeyup_=function(a){this.resetState();this.altKey_=a.altKey}; goog.events.KeyHandler.prototype.handleEvent=function(a){var b=a.getBrowserEvent(),c,d,e=b.altKey;goog.userAgent.IE&&a.type==goog.events.EventType.KEYPRESS?(c=this.keyCode_,d=c!=goog.events.KeyCodes.ENTER&&c!=goog.events.KeyCodes.ESC?b.keyCode:0):goog.userAgent.WEBKIT&&a.type==goog.events.EventType.KEYPRESS?(c=this.keyCode_,d=0<=b.charCode&&63232>b.charCode&&goog.events.KeyCodes.isCharacterKey(c)?b.charCode:0):goog.userAgent.OPERA?(c=this.keyCode_,d=goog.events.KeyCodes.isCharacterKey(c)?b.keyCode: 0):(c=b.keyCode||this.keyCode_,d=b.charCode||0,goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_&&(e=this.altKey_),goog.userAgent.MAC&&(d==goog.events.KeyCodes.QUESTION_MARK&&c==goog.events.KeyCodes.WIN_KEY)&&(c=goog.events.KeyCodes.SLASH));var f=c,g=b.keyIdentifier;c?63232<=c&&c in goog.events.KeyHandler.safariKey_?f=goog.events.KeyHandler.safariKey_[c]:25==c&&a.shiftKey&&(f=9):g&&g in goog.events.KeyHandler.keyIdentifier_&&(f=goog.events.KeyHandler.keyIdentifier_[g]);a=f==this.lastKey_;this.lastKey_= f;b=new goog.events.KeyEvent(f,d,a,b);b.altKey=e;this.dispatchEvent(b)};goog.events.KeyHandler.prototype.getElement=function(){return this.element_}; goog.events.KeyHandler.prototype.attach=function(a,b){this.keyUpKey_&&this.detach();this.element_=a;this.keyPressKey_=goog.events.listen(this.element_,goog.events.EventType.KEYPRESS,this,b);this.keyDownKey_=goog.events.listen(this.element_,goog.events.EventType.KEYDOWN,this.handleKeyDown_,b,this);this.keyUpKey_=goog.events.listen(this.element_,goog.events.EventType.KEYUP,this.handleKeyup_,b,this)}; goog.events.KeyHandler.prototype.detach=function(){this.keyPressKey_&&(goog.events.unlistenByKey(this.keyPressKey_),goog.events.unlistenByKey(this.keyDownKey_),goog.events.unlistenByKey(this.keyUpKey_),this.keyUpKey_=this.keyDownKey_=this.keyPressKey_=null);this.element_=null;this.keyCode_=this.lastKey_=-1};goog.events.KeyHandler.prototype.disposeInternal=function(){goog.events.KeyHandler.superClass_.disposeInternal.call(this);this.detach()}; goog.events.KeyEvent=function(a,b,c,d){goog.events.BrowserEvent.call(this,d);this.type=goog.events.KeyHandler.EventType.KEY;this.keyCode=a;this.charCode=b;this.repeat=c};goog.inherits(goog.events.KeyEvent,goog.events.BrowserEvent);goog.dom.vendor={};goog.dom.vendor.getVendorJsPrefix=function(){return goog.userAgent.WEBKIT?"Webkit":goog.userAgent.GECKO?"Moz":goog.userAgent.IE?"ms":goog.userAgent.OPERA?"O":null};goog.dom.vendor.getVendorPrefix=function(){return goog.userAgent.WEBKIT?"-webkit":goog.userAgent.GECKO?"-moz":goog.userAgent.IE?"-ms":goog.userAgent.OPERA?"-o":null};goog.math.Box=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d};goog.math.Box.boundingBox=function(a){for(var b=new goog.math.Box(arguments[0].y,arguments[0].x,arguments[0].y,arguments[0].x),c=1;c=a.left&&b.right<=a.right&&b.top>=a.top&&b.bottom<=a.bottom:b.x>=a.left&&b.x<=a.right&&b.y>=a.top&&b.y<=a.bottom:!1};goog.math.Box.relativePositionX=function(a,b){return b.xa.right?b.x-a.right:0};goog.math.Box.relativePositionY=function(a,b){return b.ya.bottom?b.y-a.bottom:0}; goog.math.Box.distance=function(a,b){var c=goog.math.Box.relativePositionX(a,b),d=goog.math.Box.relativePositionY(a,b);return Math.sqrt(c*c+d*d)};goog.math.Box.intersects=function(a,b){return a.left<=b.right&&b.left<=a.right&&a.top<=b.bottom&&b.top<=a.bottom};goog.math.Box.intersectsWithPadding=function(a,b,c){return a.left<=b.right+c&&b.left<=a.right+c&&a.top<=b.bottom+c&&b.top<=a.bottom+c}; goog.math.Box.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};goog.math.Box.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; goog.math.Box.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};goog.math.Box.prototype.translate=function(a,b){a instanceof goog.math.Coordinate?(this.left+=a.x,this.right+=a.x,this.top+=a.y,this.bottom+=a.y):(this.left+=a,this.right+=a,goog.isNumber(b)&&(this.top+=b,this.bottom+=b));return this}; goog.math.Box.prototype.scale=function(a,b){var c=goog.isNumber(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};goog.math.Rect=function(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d};goog.math.Rect.prototype.clone=function(){return new goog.math.Rect(this.left,this.top,this.width,this.height)};goog.math.Rect.prototype.toBox=function(){return new goog.math.Box(this.top,this.left+this.width,this.top+this.height,this.left)};goog.math.Rect.createFromBox=function(a){return new goog.math.Rect(a.left,a.top,a.right-a.left,a.bottom-a.top)}; goog.DEBUG&&(goog.math.Rect.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"});goog.math.Rect.equals=function(a,b){return a==b?!0:a&&b?a.left==b.left&&a.width==b.width&&a.top==b.top&&a.height==b.height:!1}; goog.math.Rect.prototype.intersection=function(a){var b=Math.max(this.left,a.left),c=Math.min(this.left+this.width,a.left+a.width);if(b<=c){var d=Math.max(this.top,a.top);a=Math.min(this.top+this.height,a.top+a.height);if(d<=a)return this.left=b,this.top=d,this.width=c-b,this.height=a-d,!0}return!1}; goog.math.Rect.intersection=function(a,b){var c=Math.max(a.left,b.left),d=Math.min(a.left+a.width,b.left+b.width);if(c<=d){var e=Math.max(a.top,b.top),f=Math.min(a.top+a.height,b.top+b.height);if(e<=f)return new goog.math.Rect(c,e,d-c,f-e)}return null};goog.math.Rect.intersects=function(a,b){return a.left<=b.left+b.width&&b.left<=a.left+a.width&&a.top<=b.top+b.height&&b.top<=a.top+a.height};goog.math.Rect.prototype.intersects=function(a){return goog.math.Rect.intersects(this,a)}; goog.math.Rect.difference=function(a,b){var c=goog.math.Rect.intersection(a,b);if(!c||!c.height||!c.width)return[a.clone()];var c=[],d=a.top,e=a.height,f=a.left+a.width,g=a.top+a.height,h=b.left+b.width,k=b.top+b.height;b.top>a.top&&(c.push(new goog.math.Rect(a.left,a.top,a.width,b.top-a.top)),d=b.top,e-=b.top-a.top);ka.left&&c.push(new goog.math.Rect(a.left,d,b.left-a.left,e));h=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};goog.math.Rect.prototype.squaredDistance=function(a){var b=a.xa.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null}; goog.style.getVisibleRectForElement=function(a){for(var b=new goog.math.Box(0,Infinity,Infinity,0),c=goog.dom.getDomHelper(a),d=c.getDocument().body,e=c.getDocument().documentElement,f=c.getDocumentScrollElement();a=goog.style.getOffsetParent(a);)if(!(goog.userAgent.IE&&0==a.clientWidth||goog.userAgent.WEBKIT&&0==a.clientHeight&&a==d||a==d||a==e||"visible"==goog.style.getStyle_(a,"overflow"))){var g=goog.style.getPageOffset(a),h=goog.style.getClientLeftTop(a);g.x+=h.x;g.y+=h.y;b.top=Math.max(b.top, g.y);b.right=Math.min(b.right,g.x+a.clientWidth);b.bottom=Math.min(b.bottom,g.y+a.clientHeight);b.left=Math.max(b.left,g.x)}d=f.scrollLeft;f=f.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,f);c=c.getViewportSize();b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,f+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null}; goog.style.getContainerOffsetToScrollInto=function(a,b,c){var d=goog.style.getPageOffset(a),e=goog.style.getPageOffset(b),f=goog.style.getBorderBox(b),g=d.x-e.x-f.left,d=d.y-e.y-f.top,e=b.clientWidth-a.offsetWidth;a=b.clientHeight-a.offsetHeight;f=b.scrollLeft;b=b.scrollTop;c?(f+=g-e/2,b+=d-a/2):(f+=Math.min(g,Math.max(g-e,0)),b+=Math.min(d,Math.max(d-a,0)));return new goog.math.Coordinate(f,b)}; goog.style.scrollIntoContainerView=function(a,b,c){a=goog.style.getContainerOffsetToScrollInto(a,b,c);b.scrollLeft=a.x;b.scrollTop=a.y}; goog.style.getClientLeftTop=function(a){if(goog.userAgent.GECKO&&!goog.userAgent.isVersionOrHigher("1.9")){var b=parseFloat(goog.style.getComputedStyle(a,"borderLeftWidth"));if(goog.style.isRightToLeft(a))var c=a.offsetWidth-a.clientWidth-b-parseFloat(goog.style.getComputedStyle(a,"borderRightWidth")),b=b+c;return new goog.math.Coordinate(b,parseFloat(goog.style.getComputedStyle(a,"borderTopWidth")))}return new goog.math.Coordinate(a.clientLeft,a.clientTop)}; goog.style.getPageOffset=function(a){var b,c=goog.dom.getOwnerDocument(a),d=goog.style.getStyle_(a,"position"),e=!goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS&&goog.userAgent.GECKO&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new goog.math.Coordinate(0,0),g=goog.style.getClientViewportElement(c);if(a==g)return f;if(goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS||a.getBoundingClientRect)b=goog.style.getBoundingClientRect_(a), a=goog.dom.getDomHelper(c).getDocumentScroll(),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop||0);if(goog.userAgent.WEBKIT&&"fixed"==goog.style.getComputedPosition(b)){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(goog.userAgent.OPERA||goog.userAgent.WEBKIT&&"absolute"== d)f.y-=c.body.offsetTop;for(b=a;(b=goog.style.getOffsetParent(b))&&b!=c.body&&b!=g;)f.x-=b.scrollLeft,goog.userAgent.OPERA&&"TR"==b.tagName||(f.y-=b.scrollTop)}return f};goog.style.getPageOffsetLeft=function(a){return goog.style.getPageOffset(a).x};goog.style.getPageOffsetTop=function(a){return goog.style.getPageOffset(a).y}; goog.style.getFramedPageOffset=function(a,b){var c=new goog.math.Coordinate(0,0),d=goog.dom.getWindow(goog.dom.getOwnerDocument(a)),e=a;do{var f=d==b?goog.style.getPageOffset(e):goog.style.getClientPositionForElement_(null);c.x+=f.x;c.y+=f.y}while(d&&d!=b&&(e=d.frameElement)&&(d=d.parent));return c}; goog.style.translateRectForAnotherFrame=function(a,b,c){if(b.getDocument()!=c.getDocument()){var d=b.getDocument().body;c=goog.style.getFramedPageOffset(d,c.getWindow());c=goog.math.Coordinate.difference(c,goog.style.getPageOffset(d));goog.userAgent.IE&&!b.isCss1CompatMode()&&(c=goog.math.Coordinate.difference(c,b.getDocumentScroll()));a.left+=c.x;a.top+=c.y}}; goog.style.getRelativePosition=function(a,b){var c=goog.style.getClientPosition(a),d=goog.style.getClientPosition(b);return new goog.math.Coordinate(c.x-d.x,c.y-d.y)}; goog.style.getClientPositionForElement_=function(a){var b;if(goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS||a.getBoundingClientRect)b=goog.style.getBoundingClientRect_(a),b=new goog.math.Coordinate(b.left,b.top);else{b=goog.dom.getDomHelper(a).getDocumentScroll();var c=goog.style.getPageOffset(a);b=new goog.math.Coordinate(c.x-b.x,c.y-b.y)}return goog.userAgent.GECKO&&!goog.userAgent.isVersionOrHigher(12)?goog.math.Coordinate.sum(b,goog.style.getCssTranslation(a)):b}; goog.style.getClientPosition=function(a){if(a.nodeType==goog.dom.NodeType.ELEMENT)return goog.style.getClientPositionForElement_(a);var b=goog.isFunction(a.getBrowserEvent),c=a;a.targetTouches?c=a.targetTouches[0]:b&&a.getBrowserEvent().targetTouches&&(c=a.getBrowserEvent().targetTouches[0]);return new goog.math.Coordinate(c.clientX,c.clientY)}; goog.style.setPageOffset=function(a,b,c){var d=goog.style.getPageOffset(a);b instanceof goog.math.Coordinate&&(c=b.y,b=b.x);goog.style.setPosition(a,a.offsetLeft+(b-d.x),a.offsetTop+(c-d.y))};goog.style.setSize=function(a,b,c){if(b instanceof goog.math.Size)c=b.height,b=b.width;else if(void 0==c)throw Error("missing height argument");goog.style.setWidth(a,b);goog.style.setHeight(a,c)};goog.style.getPixelStyleValue_=function(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}; goog.style.setHeight=function(a,b){a.style.height=goog.style.getPixelStyleValue_(b,!0)};goog.style.setWidth=function(a,b){a.style.width=goog.style.getPixelStyleValue_(b,!0)};goog.style.getSize=function(a){return goog.style.evaluateWithTemporaryDisplay_(goog.style.getSizeWithDisplay_,a)}; goog.style.evaluateWithTemporaryDisplay_=function(a,b){if("none"!=goog.style.getStyle_(b,"display"))return a(b);var c=b.style,d=c.display,e=c.visibility,f=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";var g=a(b);c.display=d;c.position=f;c.visibility=e;return g}; goog.style.getSizeWithDisplay_=function(a){var b=a.offsetWidth,c=a.offsetHeight,d=goog.userAgent.WEBKIT&&!b&&!c;return goog.isDef(b)&&!d||!a.getBoundingClientRect?new goog.math.Size(b,c):(a=goog.style.getBoundingClientRect_(a),new goog.math.Size(a.right-a.left,a.bottom-a.top))};goog.style.getTransformedSize=function(a){if(!a.getBoundingClientRect)return null;a=goog.style.evaluateWithTemporaryDisplay_(goog.style.getBoundingClientRect_,a);return new goog.math.Size(a.right-a.left,a.bottom-a.top)}; goog.style.getBounds=function(a){var b=goog.style.getPageOffset(a);a=goog.style.getSize(a);return new goog.math.Rect(b.x,b.y,a.width,a.height)};goog.style.toCamelCase=function(a){return goog.string.toCamelCase(String(a))};goog.style.toSelectorCase=function(a){return goog.string.toSelectorCase(a)}; goog.style.getOpacity=function(a){var b=a.style;a="";"opacity"in b?a=b.opacity:"MozOpacity"in b?a=b.MozOpacity:"filter"in b&&(b=b.filter.match(/alpha\(opacity=([\d.]+)\)/))&&(a=String(b[1]/100));return""==a?a:Number(a)};goog.style.setOpacity=function(a,b){var c=a.style;"opacity"in c?c.opacity=b:"MozOpacity"in c?c.MozOpacity=b:"filter"in c&&(c.filter=""===b?"":"alpha(opacity\x3d"+100*b+")")}; goog.style.setTransparentBackgroundImage=function(a,b){var c=a.style;goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("8")?c.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src\x3d"'+b+'", sizingMethod\x3d"crop")':(c.backgroundImage="url("+b+")",c.backgroundPosition="top left",c.backgroundRepeat="no-repeat")};goog.style.clearTransparentBackgroundImage=function(a){a=a.style;"filter"in a?a.filter="":a.backgroundImage="none"}; goog.style.showElement=function(a,b){goog.style.setElementShown(a,b)};goog.style.setElementShown=function(a,b){a.style.display=b?"":"none"};goog.style.isElementShown=function(a){return"none"!=a.style.display}; goog.style.installStyles=function(a,b){var c=goog.dom.getDomHelper(b),d=null;if(goog.userAgent.IE)d=c.getDocument().createStyleSheet(),goog.style.setStyles(d,a);else{var e=c.getElementsByTagNameAndClass("head")[0];e||(d=c.getElementsByTagNameAndClass("body")[0],e=c.createDom("head"),d.parentNode.insertBefore(e,d));d=c.createDom("style");goog.style.setStyles(d,a);c.appendChild(e,d)}return d};goog.style.uninstallStyles=function(a){goog.dom.removeNode(a.ownerNode||a.owningElement||a)}; goog.style.setStyles=function(a,b){goog.userAgent.IE?a.cssText=b:a.innerHTML=b};goog.style.setPreWrap=function(a){a=a.style;goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("8")?(a.whiteSpace="pre",a.wordWrap="break-word"):a.whiteSpace=goog.userAgent.GECKO?"-moz-pre-wrap":"pre-wrap"}; goog.style.setInlineBlock=function(a){a=a.style;a.position="relative";goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("8")?(a.zoom="1",a.display="inline"):a.display=goog.userAgent.GECKO?goog.userAgent.isVersionOrHigher("1.9a")?"inline-block":"-moz-inline-box":"inline-block"};goog.style.isRightToLeft=function(a){return"rtl"==goog.style.getStyle_(a,"direction")};goog.style.unselectableStyle_=goog.userAgent.GECKO?"MozUserSelect":goog.userAgent.WEBKIT?"WebkitUserSelect":null; goog.style.isUnselectable=function(a){return goog.style.unselectableStyle_?"none"==a.style[goog.style.unselectableStyle_].toLowerCase():goog.userAgent.IE||goog.userAgent.OPERA?"on"==a.getAttribute("unselectable"):!1}; goog.style.setUnselectable=function(a,b,c){c=c?null:a.getElementsByTagName("*");var d=goog.style.unselectableStyle_;if(d){if(b=b?"none":"",a.style[d]=b,c){a=0;for(var e;e=c[a];a++)e.style[d]=b}}else if(goog.userAgent.IE||goog.userAgent.OPERA)if(b=b?"on":"",a.setAttribute("unselectable",b),c)for(a=0;e=c[a];a++)e.setAttribute("unselectable",b)};goog.style.getBorderBoxSize=function(a){return new goog.math.Size(a.offsetWidth,a.offsetHeight)}; goog.style.setBorderBoxSize=function(a,b){var c=goog.dom.getOwnerDocument(a),d=goog.dom.getDomHelper(c).isCss1CompatMode();if(!goog.userAgent.IE||d&&goog.userAgent.isVersionOrHigher("8"))goog.style.setBoxSizingSize_(a,b,"border-box");else if(c=a.style,d){var d=goog.style.getPaddingBox(a),e=goog.style.getBorderBox(a);c.pixelWidth=b.width-e.left-d.left-d.right-e.right;c.pixelHeight=b.height-e.top-d.top-d.bottom-e.bottom}else c.pixelWidth=b.width,c.pixelHeight=b.height}; goog.style.getContentBoxSize=function(a){var b=goog.dom.getOwnerDocument(a),c=goog.userAgent.IE&&a.currentStyle;if(c&&goog.dom.getDomHelper(b).isCss1CompatMode()&&"auto"!=c.width&&"auto"!=c.height&&!c.boxSizing)return b=goog.style.getIePixelValue_(a,c.width,"width","pixelWidth"),a=goog.style.getIePixelValue_(a,c.height,"height","pixelHeight"),new goog.math.Size(b,a);c=goog.style.getBorderBoxSize(a);b=goog.style.getPaddingBox(a);a=goog.style.getBorderBox(a);return new goog.math.Size(c.width-a.left- b.left-b.right-a.right,c.height-a.top-b.top-b.bottom-a.bottom)}; goog.style.setContentBoxSize=function(a,b){var c=goog.dom.getOwnerDocument(a),d=goog.dom.getDomHelper(c).isCss1CompatMode();if(!goog.userAgent.IE||d&&goog.userAgent.isVersionOrHigher("8"))goog.style.setBoxSizingSize_(a,b,"content-box");else if(c=a.style,d)c.pixelWidth=b.width,c.pixelHeight=b.height;else{var d=goog.style.getPaddingBox(a),e=goog.style.getBorderBox(a);c.pixelWidth=b.width+e.left+d.left+d.right+e.right;c.pixelHeight=b.height+e.top+d.top+d.bottom+e.bottom}}; goog.style.setBoxSizingSize_=function(a,b,c){a=a.style;goog.userAgent.GECKO?a.MozBoxSizing=c:goog.userAgent.WEBKIT?a.WebkitBoxSizing=c:a.boxSizing=c;a.width=Math.max(b.width,0)+"px";a.height=Math.max(b.height,0)+"px"};goog.style.getIePixelValue_=function(a,b,c,d){if(/^\d+px?$/.test(b))return parseInt(b,10);var e=a.style[c],f=a.runtimeStyle[c];a.runtimeStyle[c]=a.currentStyle[c];a.style[c]=b;b=a.style[d];a.style[c]=e;a.runtimeStyle[c]=f;return b}; goog.style.getIePixelDistance_=function(a,b){var c=goog.style.getCascadedStyle(a,b);return c?goog.style.getIePixelValue_(a,c,"left","pixelLeft"):0}; goog.style.getBox_=function(a,b){if(goog.userAgent.IE){var c=goog.style.getIePixelDistance_(a,b+"Left"),d=goog.style.getIePixelDistance_(a,b+"Right"),e=goog.style.getIePixelDistance_(a,b+"Top"),f=goog.style.getIePixelDistance_(a,b+"Bottom");return new goog.math.Box(e,d,f,c)}c=goog.style.getComputedStyle(a,b+"Left");d=goog.style.getComputedStyle(a,b+"Right");e=goog.style.getComputedStyle(a,b+"Top");f=goog.style.getComputedStyle(a,b+"Bottom");return new goog.math.Box(parseFloat(e),parseFloat(d),parseFloat(f), parseFloat(c))};goog.style.getPaddingBox=function(a){return goog.style.getBox_(a,"padding")};goog.style.getMarginBox=function(a){return goog.style.getBox_(a,"margin")};goog.style.ieBorderWidthKeywords_={thin:2,medium:4,thick:6}; goog.style.getIePixelBorder_=function(a,b){if("none"==goog.style.getCascadedStyle(a,b+"Style"))return 0;var c=goog.style.getCascadedStyle(a,b+"Width");return c in goog.style.ieBorderWidthKeywords_?goog.style.ieBorderWidthKeywords_[c]:goog.style.getIePixelValue_(a,c,"left","pixelLeft")}; goog.style.getBorderBox=function(a){if(goog.userAgent.IE){var b=goog.style.getIePixelBorder_(a,"borderLeft"),c=goog.style.getIePixelBorder_(a,"borderRight"),d=goog.style.getIePixelBorder_(a,"borderTop");a=goog.style.getIePixelBorder_(a,"borderBottom");return new goog.math.Box(d,c,a,b)}b=goog.style.getComputedStyle(a,"borderLeftWidth");c=goog.style.getComputedStyle(a,"borderRightWidth");d=goog.style.getComputedStyle(a,"borderTopWidth");a=goog.style.getComputedStyle(a,"borderBottomWidth");return new goog.math.Box(parseFloat(d), parseFloat(c),parseFloat(a),parseFloat(b))};goog.style.getFontFamily=function(a){var b=goog.dom.getOwnerDocument(a),c="";if(b.body.createTextRange){b=b.body.createTextRange();b.moveToElementText(a);try{c=b.queryCommandValue("FontName")}catch(d){c=""}}c||(c=goog.style.getStyle_(a,"fontFamily"));a=c.split(",");1d&&(d= -3),goog.isDef(a.axis)&&a.axis===a.HORIZONTAL_AXIS?b=d:c=d;goog.isNumber(this.maxDeltaX_)&&(b=goog.math.clamp(b,-this.maxDeltaX_,this.maxDeltaX_));goog.isNumber(this.maxDeltaY_)&&(c=goog.math.clamp(c,-this.maxDeltaY_,this.maxDeltaY_));this.isRtl_&&(b=-b);b=new goog.events.MouseWheelEvent(d,a,b,c);this.dispatchEvent(b)};goog.events.MouseWheelHandler.smartScale_=function(a,b){return goog.userAgent.WEBKIT&&(goog.userAgent.MAC||goog.userAgent.LINUX)&&0!=a%b?a:a/b}; goog.events.MouseWheelHandler.prototype.disposeInternal=function(){goog.events.MouseWheelHandler.superClass_.disposeInternal.call(this);goog.events.unlistenByKey(this.listenKey_);this.listenKey_=null};goog.events.MouseWheelEvent=function(a,b,c,d){goog.events.BrowserEvent.call(this,b);this.type=goog.events.MouseWheelHandler.EventType.MOUSEWHEEL;this.detail=a;this.deltaX=c;this.deltaY=d};goog.inherits(goog.events.MouseWheelEvent,goog.events.BrowserEvent);ol.MapEventType={POSTRENDER:"postrender",MOVEEND:"moveend"};ol.MapEvent=function(a,b,c){goog.events.Event.call(this,a);this.map=b;this.frameState=goog.isDef(c)?c:null};goog.inherits(ol.MapEvent,goog.events.Event);ol.MapBrowserEvent=function(a,b,c,d){ol.MapEvent.call(this,a,b,d);this.browserEvent=c;this.pixel_=this.coordinate_=null};goog.inherits(ol.MapBrowserEvent,ol.MapEvent);ol.MapBrowserEvent.prototype.getCoordinate=function(){goog.isNull(this.coordinate_)&&(this.coordinate_=this.map.getCoordinateFromPixel(this.getPixel()));return this.coordinate_}; ol.MapBrowserEvent.prototype.getPixel=function(){if(goog.isNull(this.pixel_)){var a=goog.style.getRelativePosition(this.browserEvent,this.map.getViewport());this.pixel_=[a.x,a.y]}return this.pixel_};ol.MapBrowserEvent.prototype.isMouseActionButton=function(){return ol.BrowserFeature.HAS_TOUCH||this.browserEvent.isMouseActionButton()};ol.MapBrowserEvent.prototype.preventDefault=function(){ol.MapBrowserEvent.superClass_.preventDefault.call(this);this.browserEvent.preventDefault()}; ol.MapBrowserEvent.prototype.stopPropagation=function(){ol.MapBrowserEvent.superClass_.stopPropagation.call(this);this.browserEvent.stopPropagation()}; ol.MapBrowserEventHandler=function(a){goog.events.EventTarget.call(this);this.map_=a;this.dragged_=!1;this.down_=this.touchListenerKeys_=this.dragListenerKeys_=this.listenerKeys_=this.timestamp_=null;a=this.map_.getViewport();this.listenerKeys_=[goog.events.listen(a,[goog.events.EventType.CLICK,goog.events.EventType.DBLCLICK],this.click_,!1,this),goog.events.listen(a,goog.events.EventType.MOUSEDOWN,this.handleMouseDown_,!1,this),goog.events.listen(a,goog.events.EventType.MOUSEMOVE,this.relayEvent_, !1,this),goog.events.listen(a,goog.events.EventType.MOUSEOUT,this.relayEvent_,!1,this),goog.events.listen(a,goog.events.EventType.CONTEXTMENU,this.relayEvent_,!1,this)];this.touchListenerKeys_=[goog.events.listen(a,[goog.events.EventType.TOUCHSTART,goog.events.EventType.MSPOINTERDOWN],this.handleTouchStart_,!1,this),goog.events.listen(goog.global.document,[goog.events.EventType.TOUCHMOVE,goog.events.EventType.MSPOINTERMOVE],this.handleTouchMove_,!1,this),goog.events.listen(goog.global.document,[goog.events.EventType.TOUCHEND, goog.events.EventType.MSPOINTERUP],this.handleTouchEnd_,!1,this)]};goog.inherits(ol.MapBrowserEventHandler,goog.events.EventTarget);ol.MapBrowserEventHandler.prototype.click_=function(a){if(!this.dragged_){var b=a.type;a=0===this.timestamp_||b==goog.events.EventType.DBLCLICK?new ol.MapBrowserEvent(ol.MapBrowserEvent.EventType.DBLCLICK,this.map_,a):new ol.MapBrowserEvent(ol.MapBrowserEvent.EventType.CLICK,this.map_,a);this.dispatchEvent(a)}}; ol.MapBrowserEventHandler.prototype.handleMouseUp_=function(a){this.down_&&(this.down_=null,goog.array.forEach(this.dragListenerKeys_,goog.events.unlistenByKey),this.dragListenerKeys_=null,this.dragged_&&(a=new ol.MapBrowserEvent(ol.MapBrowserEvent.EventType.DRAGEND,this.map_,a),this.dispatchEvent(a)))}; ol.MapBrowserEventHandler.prototype.handleMouseDown_=function(a){var b=new ol.MapBrowserEvent(ol.MapBrowserEvent.EventType.DOWN,this.map_,a);this.dispatchEvent(b);this.down_||(this.down_=a,this.dragged_=!1,this.dragListenerKeys_=[goog.events.listen(goog.global.document,goog.events.EventType.MOUSEMOVE,this.handleMouseMove_,!1,this),goog.events.listen(goog.global.document,goog.events.EventType.MOUSEUP,this.handleMouseUp_,!1,this)],a.preventDefault())}; ol.MapBrowserEventHandler.prototype.handleMouseMove_=function(a){var b;this.dragged_||(this.dragged_=!0,b=new ol.MapBrowserEvent(ol.MapBrowserEvent.EventType.DRAGSTART,this.map_,this.down_),this.dispatchEvent(b));b=new ol.MapBrowserEvent(ol.MapBrowserEvent.EventType.DRAG,this.map_,a);this.dispatchEvent(b)};ol.MapBrowserEventHandler.prototype.relayEvent_=function(a){this.dispatchEvent(new ol.MapBrowserEvent(a.type,this.map_,a))}; ol.MapBrowserEventHandler.prototype.handleTouchStart_=function(a){a.preventDefault();this.down_=a;this.dragged_=!1;a=new ol.MapBrowserEvent(ol.MapBrowserEvent.EventType.TOUCHSTART,this.map_,a);this.dispatchEvent(a)};ol.MapBrowserEventHandler.prototype.handleTouchMove_=function(a){this.down_&&(this.dragged_=!0,a=new ol.MapBrowserEvent(ol.MapBrowserEvent.EventType.TOUCHMOVE,this.map_,a),this.dispatchEvent(a))}; ol.MapBrowserEventHandler.prototype.handleTouchEnd_=function(a){a=new ol.MapBrowserEvent(ol.MapBrowserEvent.EventType.TOUCHEND,this.map_,a);this.dispatchEvent(a);this.dragged_||(a=goog.now(),this.timestamp_=!this.timestamp_||250this.minResolution_)}return a}; ol.View2D.prototype.fitExtent=function(a,b){this.setCenter(ol.extent.getCenter(a));var c=this.getResolutionForExtent(a,b),c=this.constrainResolution(c,0,0);this.setResolution(c)};ol.View2D.prototype.isDef=function(){return goog.isDefAndNotNull(this.getCenter())&&goog.isDef(this.getResolution())};ol.View2D.prototype.setCenter=function(a){this.set(ol.View2DProperty.CENTER,a)};goog.exportProperty(ol.View2D.prototype,"setCenter",ol.View2D.prototype.setCenter); ol.View2D.prototype.setProjection=function(a){this.set(ol.View2DProperty.PROJECTION,a)};goog.exportProperty(ol.View2D.prototype,"setProjection",ol.View2D.prototype.setProjection);ol.View2D.prototype.setResolution=function(a){this.set(ol.View2DProperty.RESOLUTION,a)};goog.exportProperty(ol.View2D.prototype,"setResolution",ol.View2D.prototype.setResolution);ol.View2D.prototype.setRotation=function(a){this.set(ol.View2DProperty.ROTATION,a)};goog.exportProperty(ol.View2D.prototype,"setRotation",ol.View2D.prototype.setRotation); ol.View2D.prototype.setZoom=function(a){a=this.constrainResolution(this.maxResolution_,a,0);this.setResolution(a)}; ol.View2D.createResolutionConstraint_=function(a){var b,c;if(goog.isDef(a.resolutions))b=a.resolutions,c=b[0],a=b[b.length-1],b=ol.ResolutionConstraint.createSnapToResolutions(b);else{c=a.maxResolution;goog.isDef(c)||(c=a.projection,b=ol.proj.createProjection(c,"EPSG:3857").getExtent(),c=(goog.isNull(b)?360*ol.METERS_PER_UNIT[ol.ProjectionUnits.DEGREES]/ol.METERS_PER_UNIT[c.getUnits()]:Math.max(b[1]-b[0],b[3]-b[2]))/ol.DEFAULT_TILE_SIZE);b=a.maxZoom;goog.isDef(b)||(b=28);var d=a.zoomFactor;goog.isDef(d)|| (d=2);a=c/Math.pow(d,b);b=ol.ResolutionConstraint.createSnapToPower(d,c,b)}return{constraint:b,maxResolution:c,minResolution:a}};ol.View2D.createRotationConstraint_=function(a){return ol.RotationConstraint.createSnapToZero()};ol.control={};ol.control.Control=function(a){ol.Object.call(this);this.element=goog.isDef(a.element)?a.element:null;this.target_=a.target;this.map_=null;this.listenerKeys=[]};goog.inherits(ol.control.Control,ol.Object);ol.control.Control.prototype.disposeInternal=function(){goog.dom.removeNode(this.element);ol.control.Control.superClass_.disposeInternal.call(this)};ol.control.Control.prototype.getMap=function(){return this.map_};ol.control.Control.prototype.handleMapPostrender=goog.nullFunction; ol.control.Control.prototype.setMap=function(a){goog.isNull(this.map_)||goog.dom.removeNode(this.element);goog.array.isEmpty(this.listenerKeys)||(goog.array.forEach(this.listenerKeys,goog.events.unlistenByKey),this.listenerKeys.length=0);this.map_=a;if(!goog.isNull(this.map_)){var b=goog.isDef(this.target_)?this.target_:a.getOverlayContainer();goog.dom.appendChild(b,this.element);this.handleMapPostrender!==goog.nullFunction&&this.listenerKeys.push(goog.events.listen(a,ol.MapEventType.POSTRENDER,this.handleMapPostrender, !1,this))}};ol.css={};ol.css.CLASS_UNSELECTABLE="ol-unselectable";ol.css.CLASS_UNSUPPORTED="ol-unsupported";ol.control.Attribution=function(a){a=goog.isDef(a)?a:{};this.ulElement_=goog.dom.createElement(goog.dom.TagName.UL);var b=goog.isDef(a.className)?a.className:"ol-attribution",b=goog.dom.createDom(goog.dom.TagName.DIV,{"class":b+" "+ol.css.CLASS_UNSELECTABLE},this.ulElement_);ol.control.Control.call(this,{element:b,target:a.target});this.renderedVisible_=!0;this.attributionElements_={};this.attributionElementRenderedVisible_={}};goog.inherits(ol.control.Attribution,ol.control.Control); ol.control.Attribution.prototype.getSourceAttributions=function(a){var b,c,d,e,f,g,h,k,l,m=a.layersArray,n=goog.object.clone(a.attributions),q={};b=0;for(c=m.length;b=ol.SHIFT_DRAG_ZOOM_HYSTERESIS_PIXELS_SQUARED){var b=a.map,c=ol.extent.boundingExtent([this.startCoordinate,a.getCoordinate()]);b.withFrozenRendering(function(){var a=b.getView(),e=b.getSize();a.fitExtent(c,e);a.setRotation(0)})}}; ol.interaction.DragZoom.prototype.handleDragStart=function(a){return a.browserEvent.isMouseActionButton()&&this.condition_(a)?(this.dragBox_=new ol.control.DragBox({startCoordinate:this.startCoordinate}),this.dragBox_.setMap(a.map),!0):!1};ol.interaction.KEYBOARD_PAN_DURATION=100;ol.interaction.KeyboardPan=function(a){ol.interaction.Interaction.call(this);a=goog.isDef(a)?a:{};this.condition_=goog.isDef(a.condition)?a.condition:goog.functions.and(ol.interaction.condition.noModifierKeys,ol.interaction.condition.targetNotEditable);this.delta_=goog.isDef(a.delta)?a.delta:128};goog.inherits(ol.interaction.KeyboardPan,ol.interaction.Interaction); ol.interaction.KeyboardPan.prototype.handleMapBrowserEvent=function(a){var b=!1;if(a.type==goog.events.KeyHandler.EventType.KEY){var c=a.browserEvent.keyCode;if(this.condition_(a)&&(c==goog.events.KeyCodes.DOWN||c==goog.events.KeyCodes.LEFT||c==goog.events.KeyCodes.RIGHT||c==goog.events.KeyCodes.UP)){var b=a.map,d=b.getView(),e=d.getView2DState(),f=e.resolution*this.delta_,g=0,h=0;c==goog.events.KeyCodes.DOWN?h=-f:c==goog.events.KeyCodes.LEFT?g=-f:c==goog.events.KeyCodes.RIGHT?g=f:h=f;c=[g,h];ol.coordinate.rotate(c, e.rotation);ol.interaction.Interaction.pan(b,d,c,ol.interaction.KEYBOARD_PAN_DURATION);a.preventDefault();b=!0}}return!b};ol.interaction.KEYBOARD_ZOOM_DURATION=100;ol.interaction.KeyboardZoom=function(a){ol.interaction.Interaction.call(this);a=goog.isDef(a)?a:{};this.condition_=goog.isDef(a.condition)?a.condition:goog.functions.and(ol.interaction.condition.noModifierKeys,ol.interaction.condition.targetNotEditable);this.delta_=goog.isDef(a.delta)?a.delta:1};goog.inherits(ol.interaction.KeyboardZoom,ol.interaction.Interaction); ol.interaction.KeyboardZoom.prototype.handleMapBrowserEvent=function(a){var b=!1;if(a.type==goog.events.KeyHandler.EventType.KEY){var c=a.browserEvent.charCode;if(this.condition_(a)&&(43==c||45==c)){b=a.map;c=43==c?this.delta_:-this.delta_;b.requestRenderFrame();var d=b.getView().getView2D();ol.interaction.Interaction.zoomByDelta(b,d,c,void 0,ol.interaction.KEYBOARD_ZOOM_DURATION);a.preventDefault();b=!0}}return!b};ol.interaction.MOUSEWHEELZOOM_ANIMATION_DURATION=250;ol.interaction.MOUSEWHEELZOOM_MAXDELTA=1;ol.interaction.MOUSEWHEELZOOM_TIMEOUT_DURATION=80;ol.interaction.MouseWheelZoom=function(){ol.interaction.Interaction.call(this);this.delta_=0;this.lastAnchor_=null;this.timeoutId_=this.startTime_=void 0};goog.inherits(ol.interaction.MouseWheelZoom,ol.interaction.Interaction); ol.interaction.MouseWheelZoom.prototype.handleMapBrowserEvent=function(a){var b=!1;if(a.type==goog.events.MouseWheelHandler.EventType.MOUSEWHEEL){var b=a.map,c=a.browserEvent;this.lastAnchor_=a.getCoordinate();this.delta_+=c.deltaY/3;goog.isDef(this.startTime_)||(this.startTime_=goog.now());c=Math.max(ol.interaction.MOUSEWHEELZOOM_TIMEOUT_DURATION-(goog.now()-this.startTime_),0);goog.global.clearTimeout(this.timeoutId_);this.timeoutId_=goog.global.setTimeout(goog.bind(this.doZoom_,this,b),c);a.preventDefault(); b=!0}return!b};ol.interaction.MouseWheelZoom.prototype.doZoom_=function(a){var b=ol.interaction.MOUSEWHEELZOOM_MAXDELTA,b=goog.math.clamp(this.delta_,-b,b),c=a.getView().getView2D();a.requestRenderFrame();ol.interaction.Interaction.zoomByDelta(a,c,-b,this.lastAnchor_,ol.interaction.MOUSEWHEELZOOM_ANIMATION_DURATION);this.delta_=0;this.lastAnchor_=null;this.timeoutId_=this.startTime_=void 0};ol.interaction.Touch=function(){ol.interaction.Interaction.call(this);this.handled_=!1;this.trackedTouches_={};this.targetTouches=[]};goog.inherits(ol.interaction.Touch,ol.interaction.Interaction);ol.interaction.Touch.centroid=function(a){for(var b=a.length,c=0,d=0,e=0;ethis.threshold_&&(this.rotating_=!0));this.lastAngle_=c;a=a.map;c=goog.style.getClientPosition(a.getViewport());d=ol.interaction.Touch.centroid(this.targetTouches);d[0]-=c.x;d[1]-=c.y;this.anchor_=a.getCoordinateFromPixel(d); this.rotating_&&(c=a.getView().getView2D(),d=c.getView2DState(),a.requestRenderFrame(),ol.interaction.Interaction.rotateWithoutConstraints(a,c,d.rotation+b,this.anchor_))};ol.interaction.TouchRotate.prototype.handleTouchEnd=function(a){if(2>this.targetTouches.length){a=a.map;var b=a.getView().getView2D(),c=b.getView2DState();this.rotating_&&ol.interaction.Interaction.rotate(a,b,c.rotation,this.anchor_,ol.interaction.TOUCHROTATE_ANIMATION_DURATION);return!1}return!0}; ol.interaction.TouchRotate.prototype.handleTouchStart=function(a){return 2<=this.targetTouches.length?(a=a.map,this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,a.requestRenderFrame(),!0):!1};ol.interaction.TOUCHZOOM_ANIMATION_DURATION=400;ol.interaction.TouchZoom=function(){ol.interaction.Touch.call(this);this.anchor_=null;this.lastDistance_=void 0;this.lastScaleDelta_=1};goog.inherits(ol.interaction.TouchZoom,ol.interaction.Touch); ol.interaction.TouchZoom.prototype.handleTouchMove=function(a){var b=1,c=this.targetTouches[0],d=this.targetTouches[1],e=c.clientX-d.clientX,c=c.clientY-d.clientY,e=Math.sqrt(e*e+c*c);goog.isDef(this.lastDistance_)&&(b=this.lastDistance_/e);this.lastDistance_=e;1!=b&&(this.lastScaleDelta_=b);a=a.map;var e=a.getView().getView2D(),c=e.getView2DState(),d=goog.style.getClientPosition(a.getViewport()),f=ol.interaction.Touch.centroid(this.targetTouches);f[0]-=d.x;f[1]-=d.y;this.anchor_=a.getCoordinateFromPixel(f); a.requestRenderFrame();ol.interaction.Interaction.zoomWithoutConstraints(a,e,c.resolution*b,this.anchor_)};ol.interaction.TouchZoom.prototype.handleTouchEnd=function(a){if(2>this.targetTouches.length){a=a.map;var b=a.getView().getView2D(),c=b.getView2DState();ol.interaction.Interaction.zoom(a,b,c.resolution,this.anchor_,ol.interaction.TOUCHZOOM_ANIMATION_DURATION,this.lastScaleDelta_-1);return!1}return!0}; ol.interaction.TouchZoom.prototype.handleTouchStart=function(a){return 2<=this.targetTouches.length?(a=a.map,this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,a.requestRenderFrame(),!0):!1};ol.interaction.defaults=function(a){a=goog.isDef(a)?a:{};var b=new ol.Collection,c=new ol.Kinetic(-0.005,0.05,100);(goog.isDef(a.altShiftDragRotate)?a.altShiftDragRotate:1)&&b.push(new ol.interaction.DragRotate);(goog.isDef(a.doubleClickZoom)?a.doubleClickZoom:1)&&b.push(new ol.interaction.DoubleClickZoom({delta:a.zoomDelta}));(goog.isDef(a.touchPan)?a.touchPan:1)&&b.push(new ol.interaction.TouchPan({kinetic:c}));(goog.isDef(a.touchRotate)?a.touchRotate:1)&&b.push(new ol.interaction.TouchRotate); (goog.isDef(a.touchZoom)?a.touchZoom:1)&&b.push(new ol.interaction.TouchZoom);(goog.isDef(a.dragPan)?a.dragPan:1)&&b.push(new ol.interaction.DragPan({kinetic:c}));if(goog.isDef(a.keyboard)?a.keyboard:1)b.push(new ol.interaction.KeyboardPan),b.push(new ol.interaction.KeyboardZoom({delta:a.zoomDelta}));(goog.isDef(a.mouseWheelZoom)?a.mouseWheelZoom:1)&&b.push(new ol.interaction.MouseWheelZoom);(goog.isDef(a.shiftDragZoom)?a.shiftDragZoom:1)&&b.push(new ol.interaction.DragZoom);return b};ol.layer.GroupProperty={LAYERS:"layers"};ol.layer.Group=function(a){var b=goog.isDef(a)?a:{};a=goog.object.clone(b);delete a.layers;b=b.layers;ol.layer.Base.call(this,a);this.listenerKeys_=null;goog.events.listen(this,ol.Object.getChangeEventType(ol.layer.GroupProperty.LAYERS),this.handleLayersChanged_,!1,this);goog.isDef(b)?goog.isArray(b)&&(b=new ol.Collection(goog.array.clone(b))):b=new ol.Collection;this.setLayers(b)};goog.inherits(ol.layer.Group,ol.layer.Base); ol.layer.Group.prototype.handleLayerChange=function(){this.getVisible()&&this.dispatchChangeEvent()};ol.layer.Group.prototype.handleLayerVisibleChange=function(){this.dispatchChangeEvent()}; ol.layer.Group.prototype.handleLayersChanged_=function(a){goog.isNull(this.listenerKeys_)||(goog.array.forEach(goog.object.getValues(this.listenerKeys_),goog.events.unlistenByKey),this.listenerKeys_=null);a=this.getLayers();if(goog.isDefAndNotNull(a)){this.listenerKeys_={add:goog.events.listen(a,ol.CollectionEventType.ADD,this.handleLayersAdd_,!1,this),remove:goog.events.listen(a,ol.CollectionEventType.REMOVE,this.handleLayersRemove_,!1,this)};a=a.getArray();var b,c,d;b=0;for(c=a.length;b=this.minZoom;){if(b.call(c,a,this.getTileRangeForExtentAndZ(e,a,d)))return!0;--a}return!1};ol.tilegrid.TileGrid.prototype.getMaxZoom=function(){return this.maxZoom};ol.tilegrid.TileGrid.prototype.getMinZoom=function(){return this.minZoom}; ol.tilegrid.TileGrid.prototype.getOrigin=function(a){return goog.isNull(this.origin_)?this.origins_[a]:this.origin_};ol.tilegrid.TileGrid.prototype.getResolution=function(a){return this.resolutions_[a]};ol.tilegrid.TileGrid.prototype.getResolutions=function(){return this.resolutions_};ol.tilegrid.TileGrid.prototype.getTileCoordChildTileRange=function(a,b,c){return a.z=n;--u)for(r=c.getTileRangeForExtentAndZ(e,u),p=c.getResolution(u),s=r.minX;s<=r.maxX;++s)for(t=r.minY;t<=r.maxY;++t)f-u<=g?(q=b.getTile(u,s,t,d),q.getState()==ol.TileState.IDLE&&(m[q.tileCoord.toString()]=!0,a.isKeyQueued(q.getKey())||a.enqueue([q,l,c.getTileCoordCenter(q.tileCoord), p])),goog.isDef(h)&&h.call(k,q)):b.useTile(u,s,t)};ol.renderer.Map=function(a,b){goog.Disposable.call(this);this.map_=b;this.layerRenderers_={}};goog.inherits(ol.renderer.Map,goog.Disposable); ol.renderer.Map.prototype.calculateMatrices2D=function(a){var b=a.view2DState,c=a.coordinateToPixelMatrix;goog.vec.Mat4.makeIdentity(c);goog.vec.Mat4.translate(c,a.size[0]/2,a.size[1]/2,0);goog.vec.Mat4.scale(c,1/b.resolution,-1/b.resolution,1);goog.vec.Mat4.rotateZ(c,-b.rotation);goog.vec.Mat4.translate(c,-b.center[0],-b.center[1],0);goog.vec.Mat4.invert(c,a.pixelToCoordinateMatrix)};ol.renderer.Map.prototype.createLayerRenderer=function(a){return new ol.renderer.Layer(this,a)}; ol.renderer.Map.prototype.disposeInternal=function(){goog.object.forEach(this.layerRenderers_,function(a){goog.dispose(a)});ol.renderer.Map.superClass_.disposeInternal.call(this)};ol.renderer.Map.prototype.getCanvas=goog.functions.NULL; ol.renderer.Map.prototype.getFeatureInfoForPixel=function(a,b,c,d){for(var e=b.length,f=Array(e),g=function(a,d){f[goog.array.indexOf(b,d)]=a;--e;e||c(f)},h,k=0;kd;else if(b===ol.expr.ComparisonOp.LT)d=a=d;else if(b===ol.expr.ComparisonOp.LTE)d=a<=d;else throw Error("Unsupported comparison operator: "+ this.operator_);return d};ol.expr.Comparison.prototype.getOperator=function(){return this.operator_};ol.expr.Comparison.prototype.getLeft=function(){return this.left_};ol.expr.Comparison.prototype.getRight=function(){return this.right_};ol.expr.Identifier=function(a){this.name_=a};goog.inherits(ol.expr.Identifier,ol.expr.Expression);ol.expr.Identifier.prototype.evaluate=function(a){if(!goog.isDefAndNotNull(a))throw Error("Attempt to evaluate identifier with no scope");return a[this.name_]}; ol.expr.Identifier.prototype.getName=function(){return this.name_};ol.expr.Literal=function(a){this.value_=a};goog.inherits(ol.expr.Literal,ol.expr.Expression);ol.expr.Literal.prototype.evaluate=function(){return this.value_};ol.expr.Literal.prototype.getValue=function(){return this.value_};ol.expr.LogicalOp={AND:"\x26\x26",OR:"||"};ol.expr.Logical=function(a,b,c){this.operator_=a;this.left_=b;this.right_=c};goog.inherits(ol.expr.Logical,ol.expr.Expression); ol.expr.Logical.isValidOp=function(){var a={},b;for(b in ol.expr.LogicalOp)a[ol.expr.LogicalOp[b]]=!0;return function(b){return!!a[b]}}();ol.expr.Logical.prototype.evaluate=function(a,b,c){var d;d=this.right_.evaluate(a,b,c);a=this.left_.evaluate(a,b,c);if(this.operator_===ol.expr.LogicalOp.AND)d=a&&d;else if(this.operator_===ol.expr.LogicalOp.OR)d=a||d;else throw Error("Unsupported logical operator: "+this.operator_);return d};ol.expr.Logical.prototype.getOperator=function(){return this.operator_}; ol.expr.Logical.prototype.getLeft=function(){return this.left_};ol.expr.Logical.prototype.getRight=function(){return this.right_};ol.expr.MathOp={ADD:"+",SUBTRACT:"-",MULTIPLY:"*",DIVIDE:"/",MOD:"%"};ol.expr.Math=function(a,b,c){this.operator_=a;this.left_=b;this.right_=c};goog.inherits(ol.expr.Math,ol.expr.Expression);ol.expr.Math.isValidOp=function(){var a={},b;for(b in ol.expr.MathOp)a[ol.expr.MathOp[b]]=!0;return function(b){return!!a[b]}}(); ol.expr.Math.prototype.evaluate=function(a,b,c){var d;d=this.right_.evaluate(a,b,c);a=this.left_.evaluate(a,b,c);b=this.operator_;if(b===ol.expr.MathOp.ADD)d=a+d;else if(b===ol.expr.MathOp.SUBTRACT)d=Number(a)-Number(d);else if(b===ol.expr.MathOp.MULTIPLY)d=Number(a)*Number(d);else if(b===ol.expr.MathOp.DIVIDE)d=Number(a)/Number(d);else if(b===ol.expr.MathOp.MOD)d=Number(a)%Number(d);else throw Error("Unsupported math operator: "+this.operator_);return d};ol.expr.Math.prototype.getOperator=function(){return this.operator_}; ol.expr.Math.prototype.getLeft=function(){return this.left_};ol.expr.Math.prototype.getRight=function(){return this.right_};ol.expr.Member=function(a,b){this.object_=a;this.property_=b};goog.inherits(ol.expr.Member,ol.expr.Expression);ol.expr.Member.prototype.evaluate=function(a,b,c){a=this.object_.evaluate(a,b,c);if(!goog.isObject(a))throw Error("Expected member expression to evaluate to an object but got "+a);return this.property_.evaluate(a)};ol.expr.Member.prototype.getObject=function(){return this.object_}; ol.expr.Member.prototype.getProperty=function(){return this.property_};ol.expr.Not=function(a){this.argument_=a};goog.inherits(ol.expr.Not,ol.expr.Expression);ol.expr.Not.prototype.evaluate=function(a,b,c){return!this.argument_.evaluate(a,b,c)};ol.expr.Not.prototype.getArgument=function(){return this.argument_};ol.expr.Char={AMPERSAND:38,BACKSLASH:92,BANG:33,CARRIAGE_RETURN:13,COMMA:44,DIGIT_0:48,DIGIT_7:55,DIGIT_9:57,DOLLAR:36,DOUBLE_QUOTE:34,DOT:46,EQUAL:61,FORM_FEED:12,GREATER:62,LEFT_PAREN:40,LESS:60,LINE_FEED:10,LINE_SEPARATOR:8232,LOWER_A:97,LOWER_E:101,LOWER_F:102,LOWER_X:120,LOWER_Z:122,MINUS:45,NONBREAKING_SPACE:160,PARAGRAPH_SEPARATOR:8233,PERCENT:37,PIPE:124,PLUS:43,RIGHT_PAREN:41,SINGLE_QUOTE:39,SLASH:47,SPACE:32,STAR:42,TAB:9,TILDE:126,UNDERSCORE:95,UPPER_A:65,UPPER_E:69,UPPER_F:70,UPPER_X:88, UPPER_Z:90,VERTICAL_TAB:11};ol.expr.TokenType={BOOLEAN_LITERAL:"Boolean",EOF:"\x3cend\x3e",IDENTIFIER:"Identifier",KEYWORD:"Keyword",NULL_LITERAL:"Null",NUMERIC_LITERAL:"Numeric",PUNCTUATOR:"Punctuator",STRING_LITERAL:"String",UNKNOWN:"Unknown"};ol.expr.Lexer=function(a){this.source_=a;this.length_=a.length;this.nextIndex_=this.index_=0}; ol.expr.Lexer.prototype.expect=function(a){if(!this.match(a))throw new ol.expr.UnexpectedToken({type:ol.expr.TokenType.UNKNOWN,value:this.getCurrentChar_(),index:this.index_});this.skip()};ol.expr.Lexer.prototype.increment_=function(a){this.index_+=a};ol.expr.Lexer.prototype.isDecimalDigit_=function(a){return a>=ol.expr.Char.DIGIT_0&&a<=ol.expr.Char.DIGIT_9}; ol.expr.Lexer.prototype.isFutureReservedWord_=function(a){return"class"===a||"enum"===a||"export"===a||"extends"===a||"import"===a||"super"===a};ol.expr.Lexer.prototype.isHexDigit_=function(a){return this.isDecimalDigit_(a)||a>=ol.expr.Char.LOWER_A&&a<=ol.expr.Char.LOWER_F||a>=ol.expr.Char.UPPER_A&&a<=ol.expr.Char.UPPER_F};ol.expr.Lexer.prototype.isIdentifierPart_=function(a){return this.isIdentifierStart_(a)||a>=ol.expr.Char.DIGIT_0&&a<=ol.expr.Char.DIGIT_9}; ol.expr.Lexer.prototype.isIdentifierStart_=function(a){return a===ol.expr.Char.DOLLAR||a===ol.expr.Char.UNDERSCORE||a>=ol.expr.Char.UPPER_A&&a<=ol.expr.Char.UPPER_Z||a>=ol.expr.Char.LOWER_A&&a<=ol.expr.Char.LOWER_Z}; ol.expr.Lexer.prototype.isKeyword_=function(a){return"break"===a||"case"===a||"catch"===a||"continue"===a||"debugger"===a||"default"===a||"delete"===a||"do"===a||"else"===a||"finally"===a||"for"===a||"function"===a||"if"===a||"in"===a||"instanceof"===a||"new"===a||"return"===a||"switch"===a||"this"===a||"throw"===a||"try"===a||"typeof"===a||"var"===a||"void"===a||"while"===a||"with"===a}; ol.expr.Lexer.prototype.isLineTerminator_=function(a){return a===ol.expr.Char.LINE_FEED||a===ol.expr.Char.CARRIAGE_RETURN||a===ol.expr.Char.LINE_SEPARATOR||a===ol.expr.Char.PARAGRAPH_SEPARATOR};ol.expr.Lexer.prototype.isOctalDigit_=function(a){return a>=ol.expr.Char.DIGIT_0&&a<=ol.expr.Char.DIGIT_7}; ol.expr.Lexer.prototype.isWhitespace_=function(a){return a===ol.expr.Char.SPACE||a===ol.expr.Char.TAB||a===ol.expr.Char.VERTICAL_TAB||a===ol.expr.Char.FORM_FEED||a===ol.expr.Char.NONBREAKING_SPACE||5760<=a&&0<"\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005"+"\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeff".indexOf(String.fromCharCode(a))};ol.expr.Lexer.prototype.getCharCode_=function(a){return this.source_.charCodeAt(this.index_+a)};ol.expr.Lexer.prototype.getCurrentChar_=function(){return this.source_[this.index_]}; ol.expr.Lexer.prototype.getCurrentCharCode_=function(){return this.getCharCode_(0)};ol.expr.Lexer.prototype.match=function(a){var b=this.peek();return b.type===ol.expr.TokenType.PUNCTUATOR&&b.value===a}; ol.expr.Lexer.prototype.next=function(){var a=this.skipWhitespace_();return this.index_>=this.length_?{type:ol.expr.TokenType.EOF,value:null,index:this.index_}:a===ol.expr.Char.LEFT_PAREN||a===ol.expr.Char.RIGHT_PAREN?this.scanPunctuator_(a):a===ol.expr.Char.SINGLE_QUOTE||a===ol.expr.Char.DOUBLE_QUOTE?this.scanStringLiteral_(a):this.isIdentifierStart_(a)?this.scanIdentifier_(a):a===ol.expr.Char.DOT?this.isDecimalDigit_(this.getCharCode_(1))?this.scanNumericLiteral_(a):this.scanPunctuator_(a):this.isDecimalDigit_(a)? this.scanNumericLiteral_(a):this.scanPunctuator_(a)};ol.expr.Lexer.prototype.peek=function(){var a=this.index_,b=this.next();this.nextIndex_=this.index_;this.index_=a;return b}; ol.expr.Lexer.prototype.scanHexLiteral_=function(a){for(var b="",c=this.index_-2;this.index_b?e+="000":256>b?e+="00":4096>b&&(e+="0");return goog.json.Serializer.charToJsonCharCache_[a]=e+b.toString(16)}),'"')};goog.json.Serializer.prototype.serializeNumber_=function(a,b){b.push(isFinite(a)&&!isNaN(a)?a:"null")}; goog.json.Serializer.prototype.serializeArray=function(a,b){var c=a.length;b.push("[");for(var d="",e=0;egoog.net.XmlHttp.ReadyState.LOADED?this.xhr_.status:-1}catch(a){return-1}};goog.net.XhrIo.prototype.getStatusText=function(){try{return this.getReadyState()>goog.net.XmlHttp.ReadyState.LOADED?this.xhr_.statusText:""}catch(a){return""}};goog.net.XhrIo.prototype.getLastUri=function(){return String(this.lastUri_)};goog.net.XhrIo.prototype.getResponseText=function(){try{return this.xhr_?this.xhr_.responseText:""}catch(a){return""}}; goog.net.XhrIo.prototype.getResponseBody=function(){try{if(this.xhr_&&"responseBody"in this.xhr_)return this.xhr_.responseBody}catch(a){}return null};goog.net.XhrIo.prototype.getResponseXml=function(){try{return this.xhr_?this.xhr_.responseXML:null}catch(a){return null}};goog.net.XhrIo.prototype.getResponseJson=function(a){if(this.xhr_){var b=this.xhr_.responseText;a&&0==b.indexOf(a)&&(b=b.substring(a.length));return goog.json.parse(b)}}; goog.net.XhrIo.prototype.getResponse=function(){try{if(!this.xhr_)return null;if("response"in this.xhr_)return this.xhr_.response;switch(this.responseType_){case goog.net.XhrIo.ResponseType.DEFAULT:case goog.net.XhrIo.ResponseType.TEXT:return this.xhr_.responseText;case goog.net.XhrIo.ResponseType.ARRAY_BUFFER:if("mozResponseArrayBuffer"in this.xhr_)return this.xhr_.mozResponseArrayBuffer}return null}catch(a){return null}}; goog.net.XhrIo.prototype.getResponseHeader=function(a){return this.xhr_&&this.isComplete()?this.xhr_.getResponseHeader(a):void 0};goog.net.XhrIo.prototype.getAllResponseHeaders=function(){return this.xhr_&&this.isComplete()?this.xhr_.getAllResponseHeaders():""};goog.net.XhrIo.prototype.getLastErrorCode=function(){return this.lastErrorCode_};goog.net.XhrIo.prototype.getLastError=function(){return goog.isString(this.lastError_)?this.lastError_:String(this.lastError_)}; goog.net.XhrIo.prototype.formatMsg_=function(a){return a+" ["+this.lastMethod_+" "+this.lastUri_+" "+this.getStatus()+"]"};ol.source.VectorLoadState={IDLE:0,LOADING:1,LOADED:2,ERROR:3};ol.source.Vector=function(a){this.data_=goog.isDef(a.data)?a.data:null;this.loadState_=ol.source.VectorLoadState.IDLE;this.parser_=goog.isDef(a.parser)?a.parser:null;this.url_=a.url;ol.source.Source.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection})};goog.inherits(ol.source.Vector,ol.source.Source); ol.source.Vector.prototype.prepareFeatures=function(a,b,c,d){goog.isDef(this.url_)&&this.loadState_==ol.source.VectorLoadState.IDLE?(this.loadState_=ol.source.VectorLoadState.LOADING,goog.net.XhrIo.send(this.url_,goog.bind(function(b){b=b.target;b.isSuccess()?(a.parseFeatures(b.getResponseText(),this.parser_,c),this.loadState_=ol.source.VectorLoadState.LOADED,goog.isDef(d)&&d()):this.loadState_=ol.source.VectorLoadState.ERROR},this))):goog.isNull(this.data_)||(a.parseFeatures(this.data_,this.parser_, c),this.data_=null,this.loadState_=ol.source.VectorLoadState.LOADED);return this.loadState_};ol.structs.RTree=function(a){this.maxWidth_=goog.isDef(a)?a:6;this.minWidth_=Math.floor(this.maxWidth_/2);this.rootTree_={extent:ol.extent.createEmpty(),nodes:[]}};ol.structs.RTree.recalculateExtent_=function(a){var b=a.nodes.length,c=a.extent;if(0===b)ol.extent.empty(c);else{var d=a.nodes[0].extent;c[0]=d[0];c[1]=d[1];c[2]=d[2];c[3]=d[3];for(d=1;da.extent[1]?h.extent[1]:a.extent[1])-(h.extent[0]a.extent[3]?h.extent[3]:a.extent[3])- (h.extent[2]c||Math.abs(h-k)d.length&&(c.nodes.push(f[0]),d.push(c),e=f[1]))}else ol.extent.extend(c.extent,e.extent),e={extent:c.extent.concat()}}while(0a[c].extent[0]?c=f:g.extent[1]a[e].extent[2]?e=f:g.extent[3]g?b>c?(b=a.splice(b,1)[0],c=a.splice(c,1)[0]):(c=a.splice(c,1)[0],b=a.splice(b,1)[0]):d>e?(b=a.splice(d,1)[0],c=a.splice(e,1)[0]):(c=a.splice(e,1)[0],b=a.splice(d, 1)[0]);return[{extent:b.extent.concat(),nodes:[b]},{extent:c.extent.concat(),nodes:[c]}]}; ol.structs.RTree.prototype.pickNext_=function(a,b,c){for(var d=ol.structs.RTree.squarifiedRatio_(b.extent[1]-b.extent[0],b.extent[3]-b.extent[2],b.nodes.length+1),e=ol.structs.RTree.squarifiedRatio_(c.extent[1]-c.extent[0],c.extent[3]-c.extent[2],c.nodes.length+1),f,g,h,k=a.length-1;0<=k;--k){var l=a[k],m=[b.extent[0]l.extent[1]?b.extent[1]:l.extent[1],b.extent[2]l.extent[3]?b.extent[3]:l.extent[3]], m=Math.abs(ol.structs.RTree.squarifiedRatio_(m[1]-m[0],m[3]-m[2],b.nodes.length+2)-d),l=[c.extent[0]l.extent[1]?c.extent[1]:l.extent[1],c.extent[2]l.extent[3]?c.extent[3]:l.extent[3]],l=Math.abs(ol.structs.RTree.squarifiedRatio_(l[1]-l[0],l[3]-l[2],c.nodes.length+2)-e),n=Math.abs(l-m);if(!g||!f||n=c.nodes.length?(g=this.searchSubtree_(c,!0,g,c),c.nodes.length=0,d.push(c),e.push(1)):0f;++f)e[f]=c[f].evaluate();b=this.rTree_.searchReturningObject(e)}else if(a instanceof ol.expr.Logical&&a.getOperator()===ol.expr.LogicalOp.AND){for(var g=[a.getLeft(),a.getRight()],h,f=0;1>=f;++f)if(h=g[f],c=ol.expr.isLibCall(h), c===ol.expr.functions.GEOMETRY_TYPE)c=h.getArgs(),d=c[0].evaluate();else if(c===ol.expr.functions.EXTENT)for(c=h.getArgs(),e=[],h=0;4>h;++h)e[h]=c[h].evaluate();d&&e&&(b=this.getFeaturesObjectForExtent(e,d))}if(!goog.isDef(b))for(f in d=this.idLookup_,b={},d)e=d[f],ol.expr.evaluateFeature(a,e)&&(b[f]=e)}else b=this.idLookup_;return b}; ol.layer.FeatureCache.prototype.getFeaturesObjectForExtent=function(a,b){return goog.isDef(b)&&goog.object.isEmpty(this.geometryTypeIndex_[b])?{}:this.rTree_.searchReturningObject(a,b)};ol.layer.FeatureCache.prototype.getFeaturesByIds_=function(a){var b=a.length,c=Array(b),d;for(d=0;dthis.highWaterMark_};ol.TileCache.prototype.expireCache=function(a){for(var b,c;this.canExpireCache()&&!(b=this.peekLast(),c=b.tileCoord.z.toString(),c in a&&a[c].contains(b.tileCoord));)this.pop()}; ol.TileCache.prototype.pruneTileRange=function(a){for(var b=this.getCount(),c;b--;)c=this.peekLastKey(),a.contains(ol.TileCoord.createFromString(c))?this.pop():this.get(c)};ol.geom.AbstractCollection=function(){ol.geom.Geometry.call(this);this.bounds=this.components=null};goog.inherits(ol.geom.AbstractCollection,ol.geom.Geometry);ol.geom.AbstractCollection.prototype.getBounds=function(){if(goog.isNull(this.bounds)){var a,b=a=Infinity,c,d=c=-Infinity,e=this.components,f=e.length,g,h;for(h=0;hf&&(f=e),kh&&(h=k);this.bounds_=[c,f,g,h]}return this.bounds_};ol.geom.LineString.prototype.getType=function(){return ol.geom.GeometryType.LINESTRING};ol.geom.LineString.prototype.getSharedId=function(){return this.sharedId_}; ol.geom.LineString.prototype.distanceFromCoordinate=function(a){for(var b=this.getCoordinates(),c=Infinity,d=0,e=1,f=b.length;e=a&&(this.bounds_[2*a]=b,this.bounds_[2*a+1]=b);this.vertices.set(this.sharedId_,0,a,b)};ol.geom.MultiPoint=function(a,b){ol.geom.AbstractCollection.call(this);var c=b;goog.isDef(c)||(c=a[0].length,c=new ol.geom.SharedVertices({dimension:c}));this.vertices=c;var d=a.length;this.components=Array(d);for(var e=0;ea!=h>a&&b<(g-e)*(a-f)/(h-f)+e)&&(d=!d);return d};ol.geom.Polygon=function(a,b){ol.geom.Geometry.call(this);var c=b;goog.isDef(c)||(c=a[0][0].length,c=new ol.geom.SharedVertices({dimension:c}));this.labelPoint_=null;this.vertices=c;var d=a.length;this.rings=Array(d);for(var e,f=0;f=a&&g[1]<=a||f[1]<=a&&g[1]>=a)f=(a-f[1])/(g[1]-f[1])*(g[0]-f[0])+f[0],c.push(f);c.sort();for(e=c.length-1;1<=e;--e)b=Math.abs(c[e]-c[e-1]),b>d&&(f=(c[e]+c[e-1])/2,this.containsCoordinate([f,a])&&(d=b,h=f));this.labelPoint_=[h,a]}return this.labelPoint_}; ol.geom.Polygon.prototype.invalidateBounds=function(){this.rings[0].invalidateBounds()};ol.geom.MultiPolygon=function(a,b){ol.geom.AbstractCollection.call(this);var c=b;goog.isDef(c)||(c=a[0][0][0].length,c=new ol.geom.SharedVertices({dimension:c}));var d=a.length;this.components=Array(d);for(var e=0;ed;++d)e[d]=b[d].toFixed(c);c=e.join(",")}else c=b.join(",");ol.dom.setTransform(a,"matrix3d("+c+")")}else if(ol.dom.BrowserFeature.CAN_USE_CSS_TRANSFORM){b=[goog.vec.Mat4.getElement(b,0,0),goog.vec.Mat4.getElement(b,1,0),goog.vec.Mat4.getElement(b,0,1),goog.vec.Mat4.getElement(b,1,1),goog.vec.Mat4.getElement(b,0,3),goog.vec.Mat4.getElement(b,1,3)];if(goog.isDef(c)){e= Array(6);for(d=0;6>d;++d)e[d]=b[d].toFixed(c);c=e.join(",")}else c=b.join(",");ol.dom.setTransform(a,"matrix("+c+")")}else a=a.style,a.left=Math.round(goog.vec.Mat4.getElement(b,0,3))+"px",a.top=Math.round(goog.vec.Mat4.getElement(b,1,3))+"px"};ol.renderer.dom={};ol.renderer.dom.Layer=function(a,b,c){ol.renderer.Layer.call(this,a,b);this.target=c};goog.inherits(ol.renderer.dom.Layer,ol.renderer.Layer);ol.renderer.dom.Layer.prototype.getTarget=function(){return this.target};ol.renderer.dom.ImageLayer=function(a,b){var c=goog.dom.createElement(goog.dom.TagName.DIV);c.style.position="absolute";ol.renderer.dom.Layer.call(this,a,b,c);this.image_=null;this.transform_=goog.vec.Mat4.createNumberIdentity()};goog.inherits(ol.renderer.dom.ImageLayer,ol.renderer.dom.Layer);ol.renderer.dom.ImageLayer.prototype.getImageLayer=function(){return this.getLayer()}; ol.renderer.dom.ImageLayer.prototype.renderFrame=function(a,b){var c=a.view2DState,d=c.center,e=c.resolution,f=c.rotation,g=this.image_,h=this.getImageLayer().getImageSource(),k=a.viewHints;k[ol.ViewHint.ANIMATING]||k[ol.ViewHint.INTERACTING]||(c=h.getImage(a.extent,e,c.projection),goog.isNull(c)||(k=c.getState(),k==ol.ImageState.IDLE?(goog.events.listenOnce(c,goog.events.EventType.CHANGE,this.handleImageChange,!1,this),c.load()):k==ol.ImageState.LOADED&&(g=c)));if(!goog.isNull(g)){var k=g.getExtent(), l=g.getResolution(),c=goog.vec.Mat4.createNumber();goog.vec.Mat4.makeIdentity(c);goog.vec.Mat4.translate(c,a.size[0]/2,a.size[1]/2,0);goog.vec.Mat4.rotateZ(c,f);goog.vec.Mat4.scale(c,l/e,l/e,1);goog.vec.Mat4.translate(c,(k[0]-d[0])/l,(d[1]-k[3])/l,0);g!=this.image_&&(d=g.getImageElement(this),d.style.maxWidth="none",d.style.position="absolute",goog.dom.removeChildren(this.target),goog.dom.appendChild(this.target,d),this.image_=g);this.setTransform_(c);this.updateAttributions(a.attributions,g.getAttributions()); this.updateLogos(a,h)}};ol.renderer.dom.ImageLayer.prototype.setTransform_=function(a){goog.vec.Mat4.equals(a,this.transform_)||(ol.dom.transformElement2D(this.target,a,6),goog.vec.Mat4.setFromArray(this.transform_,a))};ol.renderer.dom.TileLayer=function(a,b){var c=goog.dom.createElement(goog.dom.TagName.DIV);c.style.position="absolute";ol.renderer.dom.Layer.call(this,a,b,c);this.renderedVisible_=!0;this.renderedOpacity_=1;this.renderedRevision_=0;this.tileLayerZs_={}};goog.inherits(ol.renderer.dom.TileLayer,ol.renderer.dom.Layer);ol.renderer.dom.TileLayer.prototype.getTileLayer=function(){return this.getLayer()}; ol.renderer.dom.TileLayer.prototype.renderFrame=function(a,b){if(b.visible){var c=a.view2DState,d=c.projection,e=this.getTileLayer(),f=e.getTileSource(),g=f.getTileGrid();goog.isNull(g)&&(g=ol.tilegrid.getForProjection(d));var h=g.getZForResolution(c.resolution),k=g.getResolution(h),l=c.center,m;k==c.resolution?(l=this.snapCenterToPixel(l,k,a.size),m=ol.extent.getForView2DAndSize(l,k,c.rotation,a.size)):m=a.extent;var k=g.getTileRangeForExtentAndResolution(m,k),n={};n[h]={};var q=this.createGetTileIfLoadedFunction(function(a){return!goog.isNull(a)&& a.getState()==ol.TileState.LOADED},f,d),r=goog.bind(f.findLoadedTiles,f,n,q),p=ol.extent.createEmpty(),q=new ol.TileRange(0,0,0,0),s,t,u,w;for(u=k.minX;u<=k.maxX;++u)for(w=k.minY;w<=k.maxY;++w)s=f.getTile(h,u,w,d),t=s.getState(),t==ol.TileState.LOADED?n[h][s.tileCoord.toString()]=s:t!=ol.TileState.ERROR&&t!=ol.TileState.EMPTY&&(t=g.forEachTileCoordParentTileRange(s.tileCoord,r,null,q,p),t||(s=g.getTileCoordChildTileRange(s.tileCoord,q,p),goog.isNull(s)||r(h+1,s)));var v;if(this.renderedRevision_!= f.getRevision()){for(v in this.tileLayerZs_)p=this.tileLayerZs_[+v],goog.dom.removeNode(p.target);this.tileLayerZs_={};this.renderedRevision_=f.getRevision()}u=goog.array.map(goog.object.getKeys(n),Number);goog.array.sort(u);var r={},B;w=0;for(s=u.length;wv&&goog.dom.insertChildAt(this.target,p.target,0)}else a.viewHints[ol.ViewHint.ANIMATING]||a.viewHints[ol.ViewHint.INTERACTING]||p.removeTilesOutsideExtent(m,q);else goog.dom.removeNode(p.target),delete this.tileLayerZs_[v];b.opacity!=this.renderedOpacity_&&(goog.style.setOpacity(this.target,b.opacity),this.renderedOpacity_=b.opacity);b.visible&&!this.renderedVisible_&&(goog.style.setElementShown(this.target,!0),this.renderedVisible_=!0);this.updateUsedTiles(a.usedTiles, f,h,k);this.manageTilePyramid(a,f,g,d,m,h,e.getPreload());this.scheduleExpireCache(a,f);this.updateLogos(a,f)}else this.renderedVisible_&&(goog.style.setElementShown(this.target,!1),this.renderedVisible_=!1)}; ol.renderer.dom.TileLayerZ_=function(a,b){this.target=goog.dom.createElement(goog.dom.TagName.DIV);this.target.style.position="absolute";this.tileGrid_=a;this.tileCoordOrigin_=b;this.origin_=ol.extent.getTopLeft(a.getTileCoordExtent(b));this.resolution_=a.getResolution(b.z);this.tiles_={};this.documentFragment_=null;this.transform_=goog.vec.Mat4.createNumberIdentity()}; ol.renderer.dom.TileLayerZ_.prototype.addTile=function(a){var b=a.tileCoord,c=b.toString();if(!(c in this.tiles_)){var d=this.tileGrid_.getTileSize(b.z),e=a.getImage(this),f=e.style;f.maxWidth="none";f.position="absolute";f.left=(b.x-this.tileCoordOrigin_.x)*d[0]+"px";f.top=(this.tileCoordOrigin_.y-b.y)*d[1]+"px";goog.isNull(this.documentFragment_)&&(this.documentFragment_=document.createDocumentFragment());goog.dom.appendChild(this.documentFragment_,e);this.tiles_[c]=a}}; ol.renderer.dom.TileLayerZ_.prototype.finalizeAddTiles=function(){goog.isNull(this.documentFragment_)||(goog.dom.appendChild(this.target,this.documentFragment_),this.documentFragment_=null)};ol.renderer.dom.TileLayerZ_.prototype.getOrigin=function(){return this.origin_};ol.renderer.dom.TileLayerZ_.prototype.getResolution=function(){return this.resolution_}; ol.renderer.dom.TileLayerZ_.prototype.removeTilesOutsideExtent=function(a,b){var c=this.tileGrid_.getTileRangeForExtentAndZ(a,this.tileCoordOrigin_.z,b),d=[],e,f;for(f in this.tiles_)e=this.tiles_[f],c.contains(e.tileCoord)||d.push(e);var g,c=0;for(g=d.length;ca&&(-1==d||gb)break;if(ak?(f=65536*Math.floor(-k/65536),c[h]=-f,c[h+1]=k+f):(f=65536*Math.floor(k/65536),c[h]=f,c[h+1]=k-f)});this.split32DirtySet_.clear(); return this.split32_};ol.structs.Buffer.prototype.getUsage=function(){return this.usage_};ol.structs.Buffer.prototype.markDirty=function(a,b){var c,d;c=0;for(d=this.dirtySets_.length;col.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK;){d=this.textureCache_.peekLast();if(goog.isNull(d))if(+this.textureCache_.peekLastKey()==b.index)break;else--this.textureCacheFrameMarkerCount_;else c.deleteTexture(d.texture);this.textureCache_.pop()}};ol.renderer.webgl.Map.prototype.getCanvas=function(){return this.canvas_}; ol.renderer.webgl.Map.prototype.getGL=function(){return this.gl_};ol.renderer.webgl.Map.prototype.getProgram=function(a,b){var c=goog.getUid(a)+"/"+goog.getUid(b);if(c in this.programCache_)return this.programCache_[c];var d=this.getGL(),e=d.createProgram();d.attachShader(e,this.getShader(a));d.attachShader(e,this.getShader(b));d.linkProgram(e);goog.DEBUG&&(d.getProgramParameter(e,goog.webgl.LINK_STATUS)||d.isContextLost());return this.programCache_[c]=e}; ol.renderer.webgl.Map.prototype.getShader=function(a){var b=goog.getUid(a);if(b in this.shaderCache_)return this.shaderCache_[b];var c=this.getGL(),d=c.createShader(a.getType());c.shaderSource(d,a.getSource());c.compileShader(d);goog.DEBUG&&(c.getShaderParameter(d,goog.webgl.COMPILE_STATUS)||c.isContextLost());return this.shaderCache_[b]=d};ol.renderer.webgl.Map.prototype.getTileTextureQueue=function(){return this.tileTextureQueue_}; ol.renderer.webgl.Map.prototype.handleWebGLContextLost=function(a){a.preventDefault();this.defaultLocations_=this.colorLocations_=null;this.bufferCache_={};this.shaderCache_={};this.programCache_={};this.textureCache_.clear();this.textureCacheFrameMarkerCount_=0;goog.object.forEach(this.getLayerRenderers(),function(a){a.handleWebGLContextLost()})};ol.renderer.webgl.Map.prototype.handleWebGLContextRestored=function(){this.initializeGL_();this.getMap().render()}; ol.renderer.webgl.Map.prototype.initializeGL_=function(){var a=this.gl_;a.activeTexture(goog.webgl.TEXTURE0);a.blendFuncSeparate(goog.webgl.SRC_ALPHA,goog.webgl.ONE_MINUS_SRC_ALPHA,goog.webgl.ONE,goog.webgl.ONE_MINUS_SRC_ALPHA);a.disable(goog.webgl.CULL_FACE);a.disable(goog.webgl.DEPTH_TEST);a.disable(goog.webgl.SCISSOR_TEST)};ol.renderer.webgl.Map.prototype.isTileTextureLoaded=function(a){return this.textureCache_.containsKey(a.getKey())}; ol.renderer.webgl.Map.prototype.renderFrame=function(a){var b=this.getGL();if(b.isContextLost())return!1;if(goog.isNull(a))return this.renderedVisible_&&(goog.style.setElementShown(this.canvas_,!1),this.renderedVisible_=!1),!1;this.focus_=a.focus;this.textureCache_.set((-a.index).toString(),null);++this.textureCacheFrameMarkerCount_;var c=a.layersArray,d,e,f,g,h;d=0;for(e=c.length;dol.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK&&a.postRenderFunctions.push(goog.bind(this.expireCache_,this));this.tileTextureQueue_.isEmpty()||(a.postRenderFunctions.push(this.loadNextTileTexture_),a.animate=!0);this.scheduleRemoveUnusedLayerRenderers(a)};ol.renderer.webgl.SUPPORTED=ol.webgl.SUPPORTED;ol.RendererHints={};ol.ENABLE_CANVAS=!0;ol.ENABLE_DOM=!0;ol.ENABLE_WEBGL=!0;ol.RendererHint={CANVAS:"canvas",DOM:"dom",WEBGL:"webgl"};ol.DEFAULT_RENDERER_HINTS=[ol.RendererHint.WEBGL,ol.RendererHint.CANVAS,ol.RendererHint.DOM];ol.MapProperty={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"}; ol.Map=function(a){ol.Object.call(this);a=ol.Map.createOptionsInternal(a);this.animationDelay_=new goog.async.AnimationDelay(this.renderFrame_,void 0,this);this.registerDisposable(this.animationDelay_);this.coordinateToPixelMatrix_=goog.vec.Mat4.createNumber();this.pixelToCoordinateMatrix_=goog.vec.Mat4.createNumber();this.frameIndex_=0;this.frameState_=null;this.freezeRenderingCount_=0;this.dirty_=!1;this.layerGroupPropertyListenerKey_=this.viewPropertyListenerKey_=null;this.viewport_=goog.dom.createDom(goog.dom.TagName.DIV, "ol-viewport");this.viewport_.style.position="relative";this.viewport_.style.overflow="hidden";this.viewport_.style.width="100%";this.viewport_.style.height="100%";this.viewport_.style.msTouchAction="none";ol.BrowserFeature.HAS_TOUCH&&(this.viewport_.className="ol-touch");this.overlayContainer_=goog.dom.createDom(goog.dom.TagName.DIV,"ol-overlaycontainer");goog.events.listen(this.overlayContainer_,[goog.events.EventType.CLICK,goog.events.EventType.DBLCLICK,ol.BrowserFeature.HAS_TOUCH?goog.events.EventType.TOUCHSTART: goog.events.EventType.MOUSEDOWN],goog.events.Event.stopPropagation);goog.dom.appendChild(this.viewport_,this.overlayContainer_);var b=new ol.MapBrowserEventHandler(this);goog.events.listen(b,goog.object.getValues(ol.MapBrowserEvent.EventType),this.handleMapBrowserEvent,!1,this);this.registerDisposable(b);b=new goog.events.KeyHandler(goog.global.document);goog.events.listen(b,goog.events.KeyHandler.EventType.KEY,this.handleBrowserEvent,!1,this);this.registerDisposable(b);b=new goog.events.MouseWheelHandler(this.viewport_); goog.events.listen(b,goog.events.MouseWheelHandler.EventType.MOUSEWHEEL,this.handleBrowserEvent,!1,this);this.registerDisposable(b);this.controls_=a.controls;this.interactions_=a.interactions;this.overlays_=a.overlays;this.renderer_=new a.rendererConstructor(this.viewport_,this);this.registerDisposable(this.renderer_);this.viewportSizeMonitor_=new goog.dom.ViewportSizeMonitor;goog.events.listen(this.viewportSizeMonitor_,goog.events.EventType.RESIZE,this.updateSize,!1,this);this.focus_=null;this.preRenderFunctions_= [];this.postRenderFunctions_=[];this.postRenderDelay_=new goog.async.Delay(this.handlePostRender,0,this);this.tileQueue_=new ol.TileQueue(goog.bind(this.getTilePriority,this),goog.bind(this.handleTileChange_,this));goog.events.listen(this,ol.Object.getChangeEventType(ol.MapProperty.LAYERGROUP),this.handleLayerGroupChanged_,!1,this);goog.events.listen(this,ol.Object.getChangeEventType(ol.MapProperty.VIEW),this.handleViewChanged_,!1,this);goog.events.listen(this,ol.Object.getChangeEventType(ol.MapProperty.SIZE), this.handleSizeChanged_,!1,this);goog.events.listen(this,ol.Object.getChangeEventType(ol.MapProperty.TARGET),this.handleTargetChanged_,!1,this);this.setValues(a.values);this.controls_.forEach(function(a){a.setMap(this)},this);this.overlays_.forEach(function(a){a.setMap(this)},this)};goog.inherits(ol.Map,ol.Object);ol.Map.prototype.addControl=function(a){this.getControls().push(a);a.setMap(this)};ol.Map.prototype.addLayer=function(a){this.getLayerGroup().getLayers().push(a)}; ol.Map.prototype.addOverlay=function(a){this.getOverlays().push(a);a.setMap(this)};ol.Map.prototype.beforeRender=function(a){this.requestRenderFrame();Array.prototype.push.apply(this.preRenderFunctions_,arguments)};ol.Map.prototype.removePreRenderFunction=function(a){return goog.array.remove(this.preRenderFunctions_,a)};ol.Map.prototype.disposeInternal=function(){goog.dom.removeNode(this.viewport_);goog.dispose(this.postRenderDelay_);ol.Map.superClass_.disposeInternal.call(this)}; ol.Map.prototype.freezeRendering=function(){++this.freezeRenderingCount_};ol.Map.prototype.getRenderer=function(){return this.renderer_};ol.Map.prototype.getTarget=function(){return this.get(ol.MapProperty.TARGET)};goog.exportProperty(ol.Map.prototype,"getTarget",ol.Map.prototype.getTarget);ol.Map.prototype.getCoordinateFromPixel=function(a){var b=this.frameState_;if(goog.isNull(b))return null;a=a.slice();return ol.vec.Mat4.multVec2(b.pixelToCoordinateMatrix,a,a)};ol.Map.prototype.getControls=function(){return this.controls_}; ol.Map.prototype.getOverlays=function(){return this.overlays_};ol.Map.prototype.getFeatureInfo=function(a){var b=goog.isDefAndNotNull(a.layers)?a.layers:this.getLayerGroup().getLayersArray();this.getRenderer().getFeatureInfoForPixel(a.pixel,b,a.success,a.error)};ol.Map.prototype.getFeatures=function(a){var b=goog.isDefAndNotNull(a.layers)?a.layers:this.getLayerGroup().getLayersArray();this.getRenderer().getFeaturesForPixel(a.pixel,b,a.success,a.error)};ol.Map.prototype.getInteractions=function(){return this.interactions_}; ol.Map.prototype.getLayerGroup=function(){return this.get(ol.MapProperty.LAYERGROUP)};goog.exportProperty(ol.Map.prototype,"getLayerGroup",ol.Map.prototype.getLayerGroup);ol.Map.prototype.getLayers=function(){return this.getLayerGroup().getLayers()};ol.Map.prototype.getPixelFromCoordinate=function(a){var b=this.frameState_;if(goog.isNull(b))return null;a=a.slice(0,2);return ol.vec.Mat4.multVec2(b.coordinateToPixelMatrix,a,a)};ol.Map.prototype.getSize=function(){return this.get(ol.MapProperty.SIZE)}; goog.exportProperty(ol.Map.prototype,"getSize",ol.Map.prototype.getSize);ol.Map.prototype.getView=function(){return this.get(ol.MapProperty.VIEW)};goog.exportProperty(ol.Map.prototype,"getView",ol.Map.prototype.getView);ol.Map.prototype.getViewport=function(){return this.viewport_};ol.Map.prototype.getOverlayContainer=function(){return this.overlayContainer_}; ol.Map.prototype.getTilePriority=function(a,b,c,d){var e=this.frameState_;if(goog.isNull(e)||!(b in e.wantedTiles)||!e.wantedTiles[b][a.tileCoord.toString()])return ol.structs.PriorityQueue.DROP;a=c[0]-e.focus[0];c=c[1]-e.focus[1];return 65536*Math.log(d)+Math.sqrt(a*a+c*c)/d};ol.Map.prototype.handleBrowserEvent=function(a,b){var c=new ol.MapBrowserEvent(b||a.type,this,a);this.handleMapBrowserEvent(c)}; ol.Map.prototype.handleMapBrowserEvent=function(a){if(!goog.isNull(this.frameState_)){this.focus_=a.type==goog.events.EventType.MOUSEOUT||a.type==goog.events.EventType.TOUCHEND?null:a.getCoordinate();a.frameState=this.frameState_;var b=this.getInteractions().getArray(),c;if(!1!==this.dispatchEvent(a))for(c=b.length-1;0<=c&&b[c].handleMapBrowserEvent(a);c--);}}; ol.Map.prototype.handlePostRender=function(){var a=this.frameState_,b=this.tileQueue_;if(!b.isEmpty()){var c=16,d=c;if(!goog.isNull(a)){var e=a.viewHints;if(e[ol.ViewHint.ANIMATING]||e[ol.ViewHint.INTERACTING])c=8,d=2}e=goog.object.getCount(a.wantedTiles);c*=e;d*=e;b.getTilesLoading()b?(d="\u2032",a*=60):d="\u00b0": e==ol.control.ScaleLineUnits.IMPERIAL?0.9144>b?(d="in",a/=0.0254):1609.344>b?(d="ft",a/=0.3048):(d="mi",a/=1609.344):e==ol.control.ScaleLineUnits.NAUTICAL?(a/=1852,d="nm"):e==ol.control.ScaleLineUnits.METRIC?1>b?(d="mm",a*=1E3):1E3>b?d="m":(d="km",a/=1E3):e==ol.control.ScaleLineUnits.US&&(0.9144>b?(d="in",a*=39.37):1609.344>b?(d="ft",a/=0.30480061):(d="mi",a/=1609.3472));for(var e=3*Math.floor(Math.log(this.minWidth_*a)/Math.log(10)),f,g;;){f=ol.control.ScaleLine.LEADING_DIGITS[e%3]*Math.pow(10,Math.floor(e/ 3));g=Math.round(f/a);if(g>=this.minWidth_)break;++e}f+=d;this.renderedHTML_!=f&&(this.renderedHTML_=this.innerElement_.innerHTML=f);this.renderedWidth_!=g&&(this.innerElement_.style.width=g+"px",this.renderedWidth_=g);this.renderedVisible_||(goog.style.setElementShown(this.element_,!0),this.renderedVisible_=!0)}};goog.events.EventHandler=function(a){goog.Disposable.call(this);this.handler_=a;this.keys_={}};goog.inherits(goog.events.EventHandler,goog.Disposable);goog.events.EventHandler.typeArray_=[];goog.events.EventHandler.prototype.listen=function(a,b,c,d,e){goog.isArray(b)||(goog.events.EventHandler.typeArray_[0]=b,b=goog.events.EventHandler.typeArray_);for(var f=0;fthis.hysteresisDistanceSquared_)if(this.fireDragStart_(a))this.dragging_=!0;else{this.isDisposed()||this.endDrag(a); return}}c=this.calculatePosition_(b,c);b=c.x;c=c.y;this.dragging_&&this.dispatchEvent(new goog.fx.DragEvent(goog.fx.Dragger.EventType.BEFOREDRAG,this,a.clientX,a.clientY,a,b,c))&&(this.doDrag(a,b,c,!1),a.preventDefault())}}; goog.fx.Dragger.prototype.calculatePosition_=function(a,b){var c=goog.dom.getDomHelper(this.document_).getDocumentScroll();a+=c.x-this.pageScroll.x;b+=c.y-this.pageScroll.y;this.pageScroll=c;this.deltaX+=a;this.deltaY+=b;var c=this.limitX(this.deltaX),d=this.limitY(this.deltaY);return new goog.math.Coordinate(c,d)};goog.fx.Dragger.prototype.onScroll_=function(a){var b=this.calculatePosition_(0,0);a.clientX=this.clientX;a.clientY=this.clientY;this.doDrag(a,b.x,b.y,!0)}; goog.fx.Dragger.prototype.doDrag=function(a,b,c,d){this.defaultAction(b,c);this.dispatchEvent(new goog.fx.DragEvent(goog.fx.Dragger.EventType.DRAG,this,a.clientX,a.clientY,a,b,c))};goog.fx.Dragger.prototype.limitX=function(a){var b=this.limits,c=isNaN(b.left)?null:b.left,b=isNaN(b.width)?0:b.width;return Math.min(null!=c?c+b:Infinity,Math.max(null!=c?c:-Infinity,a))}; goog.fx.Dragger.prototype.limitY=function(a){var b=this.limits,c=isNaN(b.top)?null:b.top,b=isNaN(b.height)?0:b.height;return Math.min(null!=c?c+b:Infinity,Math.max(null!=c?c:-Infinity,a))};goog.fx.Dragger.prototype.defaultAction=function(a,b){this.useRightPositioningForRtl_&&this.isRightToLeft_()?this.target.style.right=a+"px":this.target.style.left=a+"px";this.target.style.top=b+"px"};goog.fx.Dragger.prototype.isDragging=function(){return this.dragging_}; goog.fx.DragEvent=function(a,b,c,d,e,f,g,h){goog.events.Event.call(this,a);this.clientX=c;this.clientY=d;this.browserEvent=e;this.left=goog.isDef(f)?f:b.deltaX;this.top=goog.isDef(g)?g:b.deltaY;this.dragger=b;this.dragCanceled=!!h};goog.inherits(goog.fx.DragEvent,goog.events.Event);ol.control.ZOOMSLIDER_ANIMATION_DURATION=200; ol.control.ZoomSlider=function(a){a=goog.isDef(a)?a:{};this.currentResolution_=void 0;this.direction_=ol.control.ZoomSlider.direction.VERTICAL;this.sliderInitialized_=!1;this.draggerListenerKeys_=null;a=goog.isDef(a.className)?a.className:"ol-zoomslider";a=goog.dom.createDom(goog.dom.TagName.DIV,a+" "+ol.css.CLASS_UNSELECTABLE,goog.dom.createDom(goog.dom.TagName.DIV,a+"-thumb "+ol.css.CLASS_UNSELECTABLE));this.dragger_=this.createDraggable_(a);goog.events.listen(a,[goog.events.EventType.TOUCHEND, goog.events.EventType.CLICK],this.handleContainerClick_,!1,this);ol.control.Control.call(this,{element:a})};goog.inherits(ol.control.ZoomSlider,ol.control.Control);ol.control.ZoomSlider.direction={VERTICAL:0,HORIZONTAL:1};ol.control.ZoomSlider.prototype.setMap=function(a){ol.control.ZoomSlider.superClass_.setMap.call(this,a);goog.isNull(a)||a.render()}; ol.control.ZoomSlider.prototype.initSlider_=function(){var a=this.element,b=goog.dom.getFirstElementChild(a),a=goog.style.getContentBoxSize(a),c=goog.style.getBounds(b),d=goog.style.getMarginBox(b),e=goog.style.getBorderBox(b),b=a.width-d.left-d.right-e.left-e.right-c.width,c=a.height-d.top-d.bottom-e.top-e.bottom-c.height;a.width>a.height?(this.direction_=ol.control.ZoomSlider.direction.HORIZONTAL,a=new goog.math.Rect(0,0,b,0)):(this.direction_=ol.control.ZoomSlider.direction.VERTICAL,a=new goog.math.Rect(0, 0,0,c));this.dragger_.setLimits(a);this.sliderInitialized_=!0};ol.control.ZoomSlider.prototype.handleMapPostrender=function(a){goog.isNull(a.frameState)||(this.sliderInitialized_||this.initSlider_(),a=a.frameState.view2DState.resolution,a!==this.currentResolution_&&(this.currentResolution_=a,this.positionThumbForResolution_(a)))};ol.control.ZoomSlider.prototype.handleContainerClick_=function(a){}; ol.control.ZoomSlider.prototype.positionThumbForResolution_=function(a){a=this.amountForResolution_(a);var b=this.dragger_,c=goog.dom.getFirstElementChild(this.element);this.direction_==ol.control.ZoomSlider.direction.HORIZONTAL?goog.style.setPosition(c,b.limits.left+b.limits.width*a):goog.style.setPosition(c,b.limits.left,b.limits.top+b.limits.height*a)}; ol.control.ZoomSlider.prototype.amountDragged_=function(a){var b=this.dragger_.limits,c=0;return c=this.direction_===ol.control.ZoomSlider.direction.HORIZONTAL?(a.left-b.left)/b.width:(a.top-b.top)/b.height};ol.control.ZoomSlider.prototype.resolutionForAmount_=function(a){a=-1*(goog.math.clamp(a,0,1)-1);return this.getMap().getView().getView2D().getResolutionForValueFunction()(a)}; ol.control.ZoomSlider.prototype.amountForResolution_=function(a){return-1*(this.getMap().getView().getView2D().getValueForResolutionFunction()(a)-1)}; ol.control.ZoomSlider.prototype.handleSliderChange_=function(a){var b=this.getMap(),c=b.getView().getView2D();a.type===goog.fx.Dragger.EventType.DRAG?(a=this.amountDragged_(a),a=this.resolutionForAmount_(a),a!==this.currentResolution_&&(this.currentResolution_=a,c.setResolution(a))):(b.beforeRender(ol.animation.zoom({resolution:this.currentResolution_,duration:ol.control.ZOOMSLIDER_ANIMATION_DURATION,easing:ol.easing.easeOut})),a=c.constrainResolution(this.currentResolution_),c.setResolution(a))}; ol.control.ZoomSlider.prototype.createDraggable_=function(a){goog.isNull(this.draggerListenerKeys_)||(goog.array.forEach(this.draggerListenerKeys_,goog.events.unlistenByKey),this.draggerListenerKeys_=null);a=new goog.fx.Dragger(a.childNodes[0]);this.draggerListenerKeys_=[goog.events.listen(a,[goog.fx.Dragger.EventType.DRAG,goog.fx.Dragger.EventType.END],this.handleSliderChange_,void 0,this)];return a};ol.control.ZoomToExtent=function(a){a=goog.isDef(a)?a:{};this.extent_=goog.isDef(a.extent)?a.extent:null;var b=goog.isDef(a.className)?a.className:"ol-zoom-extent",b=goog.dom.createDom(goog.dom.TagName.DIV,{"class":b+" "+ol.css.CLASS_UNSELECTABLE}),c=goog.dom.createDom(goog.dom.TagName.A,{href:"#zoomExtent"});goog.dom.appendChild(b,c);goog.events.listen(b,[goog.events.EventType.TOUCHEND,goog.events.EventType.CLICK],this.handleZoomToExtent_,!1,this);ol.control.Control.call(this,{element:b,target:a.target})}; goog.inherits(ol.control.ZoomToExtent,ol.control.Control);ol.control.ZoomToExtent.prototype.handleZoomToExtent_=function(a){a.preventDefault();a=this.getMap();var b=a.getView().getView2D(),c=goog.isNull(this.extent_)?b.getProjection().getExtent():this.extent_;b.fitExtent(c,a.getSize())};ol.dom.InputProperty={VALUE:"value",VALUE_AS_NUMBER:"valueAsNumber",CHECKED:"checked"}; ol.dom.Input=function(a){ol.Object.call(this);this.target_=a;goog.events.listen(this.target_,goog.events.EventType.CHANGE,this.handleInputChanged_,!1,this);goog.events.listen(this,ol.Object.getChangeEventType(ol.dom.InputProperty.VALUE),this.handleValueChanged_,!1,this);goog.events.listen(this,ol.Object.getChangeEventType(ol.dom.InputProperty.VALUE_AS_NUMBER),this.handleValueAsNumberChanged_,!1,this);goog.events.listen(this,ol.Object.getChangeEventType(ol.dom.InputProperty.CHECKED),this.handleCheckedChanged_, !1,this)};goog.inherits(ol.dom.Input,ol.Object);ol.dom.Input.prototype.getChecked=function(){return this.get(ol.dom.InputProperty.CHECKED)};goog.exportProperty(ol.dom.Input.prototype,"getChecked",ol.dom.Input.prototype.getChecked);ol.dom.Input.prototype.getValue=function(){return this.get(ol.dom.InputProperty.VALUE)};goog.exportProperty(ol.dom.Input.prototype,"getValue",ol.dom.Input.prototype.getValue);ol.dom.Input.prototype.getValueAsNumber=function(){return this.get(ol.dom.InputProperty.VALUE_AS_NUMBER)}; goog.exportProperty(ol.dom.Input.prototype,"getValueAsNumber",ol.dom.Input.prototype.getValueAsNumber);ol.dom.Input.prototype.setValue=function(a){this.set(ol.dom.InputProperty.VALUE,a)};goog.exportProperty(ol.dom.Input.prototype,"setValue",ol.dom.Input.prototype.setValue);ol.dom.Input.prototype.setValueAsNumber=function(a){this.set(ol.dom.InputProperty.VALUE_AS_NUMBER,a)};goog.exportProperty(ol.dom.Input.prototype,"setValueAsNumber",ol.dom.Input.prototype.setValueAsNumber); ol.dom.Input.prototype.setChecked=function(a){this.set(ol.dom.InputProperty.CHECKED,a)};goog.exportProperty(ol.dom.Input.prototype,"setChecked",ol.dom.Input.prototype.setChecked);ol.dom.Input.prototype.handleInputChanged_=function(){"checkbox"===this.target_.type||"radio"===this.target_.type?this.setChecked(this.target_.checked):(this.setValue(this.target_.value),this.setValueAsNumber(this.target_.valueAsNumber))}; ol.dom.Input.prototype.handleCheckedChanged_=function(){this.target_.checked=this.getChecked()?"checked":void 0};ol.dom.Input.prototype.handleValueChanged_=function(){this.target_.value=this.getValue()};ol.dom.Input.prototype.handleValueAsNumberChanged_=function(){this.target_.value=this.getValueAsNumber()};ol.ellipsoid={};ol.ellipsoid.BESSEL1841=new ol.Ellipsoid(6377397.155,1/299.15281285);ol.ellipsoid.WGS84=new ol.Ellipsoid(6378137,1/298.257223563);ol.geom.GeometryCollection=function(a){ol.geom.AbstractCollection.call(this);this.components=a;for(var b=0,c=0,d=a.length;c=p&&(n=q>r?k[1]:k[0],l=ol.layer.VectorLayerRenderIntent.TEMPORARY);m.set(0,n[0]);m.set(1,n[1]);h.updateFeatures([g]);this.modifiable_=!0}g.renderIntent!=l&&h.setRenderIntent(l,[g])}}}; ol.interaction.Modify.prototype.ignoreTemporaryLayersFilter_=function(a){return!(a instanceof ol.layer.Vector&&a.getTemporary())}; ol.interaction.Modify.prototype.insertVertex_=function(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=f.getCoordinates();h.splice(g+1,0,c);var k=f,f=new f.constructor(h),l;4g&&++r[3])}k=[d[0],c];m=[k,e,f,g];goog.isDef(l)&&m.push(l);h.insert(ol.extent.boundingExtent(k), m,b);this.dragVertices_.push([a,m,1]);k=[c,d[1]];m=[k,e,f,g+1];goog.isDef(l)&&m.push(l);h.insert(ol.extent.boundingExtent(k),m,b);this.dragVertices_.push([a,m,0])};ol.interaction.Modify.prototype.removeIndex=function(a){var b=a.target.getEditData().rTree;a=a.features;for(var c=0,d=a.length;c=this.branches_&&this.cancel()}; goog.async.Deferred.prototype.continue_=function(a,b){this.blocked_=!1;this.updateResult_(a,b)};goog.async.Deferred.prototype.updateResult_=function(a,b){this.fired_=!0;this.result_=b;this.hadError_=!a;this.fire_()};goog.async.Deferred.prototype.check_=function(){if(this.hasFired()){if(!this.silentlyCanceled_)throw new goog.async.Deferred.AlreadyCalledError(this);this.silentlyCanceled_=!1}}; goog.async.Deferred.prototype.callback=function(a){this.check_();this.assertNotDeferred_(a);this.updateResult_(!0,a)};goog.async.Deferred.prototype.errback=function(a){this.check_();this.assertNotDeferred_(a);this.makeStackTraceLong_(a);this.updateResult_(!1,a)};goog.async.Deferred.prototype.makeStackTraceLong_=function(a){goog.async.Deferred.LONG_STACK_TRACES&&(this.constructorStack_&&goog.isObject(a)&&a.stack&&/^[^\n]+(\n [^\n]+)+/.test(a.stack))&&(a.stack=a.stack+"\nDEFERRED OPERATION:\n"+this.constructorStack_)}; goog.async.Deferred.prototype.assertNotDeferred_=function(a){};goog.async.Deferred.prototype.addCallback=function(a,b){return this.addCallbacks(a,null,b)};goog.async.Deferred.prototype.addErrback=function(a,b){return this.addCallbacks(null,a,b)};goog.async.Deferred.prototype.addBoth=function(a,b){return this.addCallbacks(a,a,b)};goog.async.Deferred.prototype.addCallbacks=function(a,b,c){this.sequence_.push([a,b,c]);this.hasFired()&&this.fire_();return this}; goog.async.Deferred.prototype.chainDeferred=function(a){this.addCallbacks(a.callback,a.errback,a);return this};goog.async.Deferred.prototype.awaitDeferred=function(a){return this.addCallback(goog.bind(a.branch,a))};goog.async.Deferred.prototype.branch=function(a){var b=new goog.async.Deferred;this.chainDeferred(b);a&&(b.parent_=this,this.branches_++);return b};goog.async.Deferred.prototype.hasFired=function(){return this.fired_}; goog.async.Deferred.prototype.isError=function(a){return a instanceof Error};goog.async.Deferred.prototype.hasErrback_=function(){return goog.array.some(this.sequence_,function(a){return goog.isFunction(a[1])})}; goog.async.Deferred.prototype.fire_=function(){this.unhandledExceptionTimeoutId_&&(this.hasFired()&&this.hasErrback_())&&(goog.global.clearTimeout(this.unhandledExceptionTimeoutId_),delete this.unhandledExceptionTimeoutId_);this.parent_&&(this.parent_.branches_--,delete this.parent_);for(var a=this.result_,b=!1,c=!1;this.sequence_.length&&!this.blocked_;){var d=this.sequence_.shift(),e=d[0],f=d[1],d=d[2];if(e=this.hadError_?f:e)try{var g=e.call(d||this.defaultScope_,a);goog.isDef(g)&&(this.hadError_= this.hadError_&&(g==a||this.isError(g)),this.result_=a=g);a instanceof goog.async.Deferred&&(this.blocked_=c=!0)}catch(h){a=h,this.hadError_=!0,this.makeStackTraceLong_(a),this.hasErrback_()||(b=!0)}}this.result_=a;c?(a.addCallbacks(goog.bind(this.continue_,this,!0),goog.bind(this.continue_,this,!1)),a.blocking_=!0):!goog.async.Deferred.STRICT_ERRORS||(!this.isError(a)||a instanceof goog.async.Deferred.CanceledError)||(b=this.hadError_=!0);b&&(this.unhandledExceptionTimeoutId_=goog.global.setTimeout(goog.functions.fail(a), 0))};goog.async.Deferred.succeed=function(a){var b=new goog.async.Deferred;b.callback(a);return b};goog.async.Deferred.fail=function(a){var b=new goog.async.Deferred;b.errback(a);return b};goog.async.Deferred.canceled=function(){var a=new goog.async.Deferred;a.cancel();return a};goog.async.Deferred.when=function(a,b,c){return a instanceof goog.async.Deferred?a.branch(!0).addCallback(b,c):goog.async.Deferred.succeed(a).addCallback(b,c)}; goog.async.Deferred.AlreadyCalledError=function(a){goog.debug.Error.call(this);this.deferred=a};goog.inherits(goog.async.Deferred.AlreadyCalledError,goog.debug.Error);goog.async.Deferred.AlreadyCalledError.prototype.message="Deferred has already fired";goog.async.Deferred.AlreadyCalledError.prototype.name="AlreadyCalledError";goog.async.Deferred.CanceledError=function(a){goog.debug.Error.call(this);this.deferred=a};goog.inherits(goog.async.Deferred.CanceledError,goog.debug.Error); goog.async.Deferred.CanceledError.prototype.message="Deferred was canceled";goog.async.Deferred.CanceledError.prototype.name="CanceledError";goog.async.DeferredList=function(a,b,c,d,e,f){goog.async.Deferred.call(this,e,f);this.list_=a;this.deferredResults_=[];this.fireOnOneCallback_=!!b;this.fireOnOneErrback_=!!c;this.consumeErrors_=!!d;for(b=this.numFinished_=0;bb%28}; goog.date.getNumberOfDaysInMonth=function(a,b){switch(b){case goog.date.month.FEB:return goog.date.isLeapYear(a)?29:28;case goog.date.month.JUN:case goog.date.month.SEP:case goog.date.month.NOV:case goog.date.month.APR:return 30}return 31};goog.date.isSameDay=function(a,b){var c=b||new Date(goog.now());return a.getDate()==c.getDate()&&goog.date.isSameMonth(a,c)};goog.date.isSameMonth=function(a,b){var c=b||new Date(goog.now());return a.getMonth()==c.getMonth()&&goog.date.isSameYear(a,c)}; goog.date.isSameYear=function(a,b){var c=b||new Date(goog.now());return a.getFullYear()==c.getFullYear()};goog.date.getWeekNumber=function(a,b,c,d,e){a=new Date(a,b,c);d=d||goog.date.weekDay.THU;e=e||goog.date.weekDay.MON;b=((a.getDay()+6)%7-e+7)%7;e=a.valueOf()+864E5*((d-e+7)%7-b);d=(new Date((new Date(e)).getFullYear(),0,1)).valueOf();return Math.floor(Math.round((e-d)/864E5)/7)+1};goog.date.min=function(a,b){return ab?a:b}; goog.date.fromIsoString=function(a){var b=new goog.date.DateTime(2E3);return goog.date.setIso8601DateTime(b,a)?b:null};goog.date.setIso8601DateTime=function(a,b){b=goog.string.trim(b);var c=-1==b.indexOf("T")?" ":"T",c=b.split(c);return goog.date.setIso8601DateOnly_(a,c[0])&&(2>c.length||goog.date.setIso8601TimeOnly_(a,c[1]))}; goog.date.setIso8601DateOnly_=function(a,b){var c=b.match(goog.date.splitDateStringRegex_);if(!c)return!1;var d=Number(c[2]),e=Number(c[3]),f=Number(c[4]),g=Number(c[5]),h=Number(c[6])||1;a.setFullYear(Number(c[1]));f?(a.setDate(1),a.setMonth(0),a.add(new goog.date.Interval(goog.date.Interval.DAYS,f-1))):g?goog.date.setDateFromIso8601Week_(a,g,h):(d&&(a.setDate(1),a.setMonth(d-1)),e&&a.setDate(e));return!0}; goog.date.setDateFromIso8601Week_=function(a,b,c){a.setMonth(0);a.setDate(1);var d=a.getDay()||7;b=new goog.date.Interval(goog.date.Interval.DAYS,(4>=d?1-d:8-d)+(Number(c)+7*(Number(b)-1))-1);a.add(b)}; goog.date.setIso8601TimeOnly_=function(a,b){var c=b.match(goog.date.splitTimezoneStringRegex_),d=0;c&&("Z"!=c[0]&&(d=60*c[2]+Number(c[3]),d*="-"==c[1]?1:-1),d-=a.getTimezoneOffset(),b=b.substr(0,b.length-c[0].length));c=b.match(goog.date.splitTimeStringRegex_);if(!c)return!1;a.setHours(Number(c[1]));a.setMinutes(Number(c[2])||0);a.setSeconds(Number(c[3])||0);a.setMilliseconds(c[4]?1E3*c[4]:0);0!=d&&a.setTime(a.getTime()+6E4*d);return!0}; goog.date.Interval=function(a,b,c,d,e,f){goog.isString(a)?(this.years=a==goog.date.Interval.YEARS?b:0,this.months=a==goog.date.Interval.MONTHS?b:0,this.days=a==goog.date.Interval.DAYS?b:0,this.hours=a==goog.date.Interval.HOURS?b:0,this.minutes=a==goog.date.Interval.MINUTES?b:0,this.seconds=a==goog.date.Interval.SECONDS?b:0):(this.years=a||0,this.months=b||0,this.days=c||0,this.hours=d||0,this.minutes=e||0,this.seconds=f||0)}; goog.date.Interval.fromIsoString=function(a){a=a.match(goog.date.splitDurationRegex_);if(!a)return null;var b=!(a[6]||a[7]||a[8]);if(b&&!(a[2]||a[3]||a[4])||b&&a[5])return null;var b=a[1],c=parseInt(a[2],10)||0,d=parseInt(a[3],10)||0,e=parseInt(a[4],10)||0,f=parseInt(a[6],10)||0,g=parseInt(a[7],10)||0;a=parseFloat(a[8])||0;return b?new goog.date.Interval(-c,-d,-e,-f,-g,-a):new goog.date.Interval(c,d,e,f,g,a)}; goog.date.Interval.prototype.toIsoString=function(a){var b=Math.min(this.years,this.months,this.days,this.hours,this.minutes,this.seconds),c=Math.max(this.years,this.months,this.days,this.hours,this.minutes,this.seconds);if(0>b&&0b&&c.push("-");c.push("P");(this.years||a)&&c.push(Math.abs(this.years)+"Y");(this.months||a)&&c.push(Math.abs(this.months)+"M");(this.days||a)&&c.push(Math.abs(this.days)+"D");if(this.hours||this.minutes||this.seconds|| a)c.push("T"),(this.hours||a)&&c.push(Math.abs(this.hours)+"H"),(this.minutes||a)&&c.push(Math.abs(this.minutes)+"M"),(this.seconds||a)&&c.push(Math.abs(this.seconds)+"S");return c.join("")};goog.date.Interval.prototype.equals=function(a){return a.years==this.years&&a.months==this.months&&a.days==this.days&&a.hours==this.hours&&a.minutes==this.minutes&&a.seconds==this.seconds}; goog.date.Interval.prototype.clone=function(){return new goog.date.Interval(this.years,this.months,this.days,this.hours,this.minutes,this.seconds)};goog.date.Interval.YEARS="y";goog.date.Interval.MONTHS="m";goog.date.Interval.DAYS="d";goog.date.Interval.HOURS="h";goog.date.Interval.MINUTES="n";goog.date.Interval.SECONDS="s";goog.date.Interval.prototype.isZero=function(){return 0==this.years&&0==this.months&&0==this.days&&0==this.hours&&0==this.minutes&&0==this.seconds}; goog.date.Interval.prototype.getInverse=function(){return this.times(-1)};goog.date.Interval.prototype.times=function(a){return new goog.date.Interval(this.years*a,this.months*a,this.days*a,this.hours*a,this.minutes*a,this.seconds*a)};goog.date.Interval.prototype.getTotalSeconds=function(){return 60*(60*(24*this.days+this.hours)+this.minutes)+this.seconds}; goog.date.Interval.prototype.add=function(a){this.years+=a.years;this.months+=a.months;this.days+=a.days;this.hours+=a.hours;this.minutes+=a.minutes;this.seconds+=a.seconds};goog.date.Date=function(a,b,c){goog.isNumber(a)?(this.date_=new Date(a,b||0,c||1),this.maybeFixDst_(c||1)):goog.isObject(a)?(this.date_=new Date(a.getFullYear(),a.getMonth(),a.getDate()),this.maybeFixDst_(a.getDate())):(this.date_=new Date(goog.now()),this.date_.setHours(0),this.date_.setMinutes(0),this.date_.setSeconds(0),this.date_.setMilliseconds(0))}; goog.date.Date.prototype.firstDayOfWeek_=goog.i18n.DateTimeSymbols.FIRSTDAYOFWEEK;goog.date.Date.prototype.firstWeekCutOffDay_=goog.i18n.DateTimeSymbols.FIRSTWEEKCUTOFFDAY;goog.date.Date.prototype.clone=function(){var a=new goog.date.Date(this.date_);a.firstDayOfWeek_=this.firstDayOfWeek_;a.firstWeekCutOffDay_=this.firstWeekCutOffDay_;return a};goog.date.Date.prototype.getFullYear=function(){return this.date_.getFullYear()};goog.date.Date.prototype.getYear=function(){return this.getFullYear()}; goog.date.Date.prototype.getMonth=function(){return this.date_.getMonth()};goog.date.Date.prototype.getDate=function(){return this.date_.getDate()};goog.date.Date.prototype.getTime=function(){return this.date_.getTime()};goog.date.Date.prototype.getDay=function(){return this.date_.getDay()};goog.date.Date.prototype.getIsoWeekday=function(){return(this.getDay()+6)%7};goog.date.Date.prototype.getWeekday=function(){return(this.getIsoWeekday()-this.firstDayOfWeek_+7)%7}; goog.date.Date.prototype.getUTCFullYear=function(){return this.date_.getUTCFullYear()};goog.date.Date.prototype.getUTCMonth=function(){return this.date_.getUTCMonth()};goog.date.Date.prototype.getUTCDate=function(){return this.date_.getUTCDate()};goog.date.Date.prototype.getUTCDay=function(){return this.date_.getDay()};goog.date.Date.prototype.getUTCHours=function(){return this.date_.getUTCHours()};goog.date.Date.prototype.getUTCMinutes=function(){return this.date_.getUTCMinutes()}; goog.date.Date.prototype.getUTCIsoWeekday=function(){return(this.date_.getUTCDay()+6)%7};goog.date.Date.prototype.getUTCWeekday=function(){return(this.getUTCIsoWeekday()-this.firstDayOfWeek_+7)%7};goog.date.Date.prototype.getFirstDayOfWeek=function(){return this.firstDayOfWeek_};goog.date.Date.prototype.getFirstWeekCutOffDay=function(){return this.firstWeekCutOffDay_};goog.date.Date.prototype.getNumberOfDaysInMonth=function(){return goog.date.getNumberOfDaysInMonth(this.getFullYear(),this.getMonth())}; goog.date.Date.prototype.getWeekNumber=function(){return goog.date.getWeekNumber(this.getFullYear(),this.getMonth(),this.getDate(),this.firstWeekCutOffDay_,this.firstDayOfWeek_)};goog.date.Date.prototype.getDayOfYear=function(){for(var a=this.getDate(),b=this.getFullYear(),c=this.getMonth()-1;0<=c;c--)a+=goog.date.getNumberOfDaysInMonth(b,c);return a};goog.date.Date.prototype.getTimezoneOffset=function(){return this.date_.getTimezoneOffset()}; goog.date.Date.prototype.getTimezoneOffsetString=function(){var a;a=this.getTimezoneOffset();if(0==a)a="Z";else{var b=Math.abs(a)/60,c=Math.floor(b),b=60*(b-c);a=(0b&&(b+=12);var d=goog.date.getNumberOfDaysInMonth(c,b),d=Math.min(d,this.getDate());this.setDate(1);this.setFullYear(c);this.setMonth(b);this.setDate(d)}a.days&&(b=new Date(this.getYear(),this.getMonth(),this.getDate(),12),a=new Date(b.getTime()+864E5*a.days),this.setDate(1),this.setFullYear(a.getFullYear()),this.setMonth(a.getMonth()),this.setDate(a.getDate()), this.maybeFixDst_(a.getDate()))};goog.date.Date.prototype.toIsoString=function(a,b){return[this.getFullYear(),goog.string.padNumber(this.getMonth()+1,2),goog.string.padNumber(this.getDate(),2)].join(a?"-":"")+(b?this.getTimezoneOffsetString():"")};goog.date.Date.prototype.toUTCIsoString=function(a,b){return[this.getUTCFullYear(),goog.string.padNumber(this.getUTCMonth()+1,2),goog.string.padNumber(this.getUTCDate(),2)].join(a?"-":"")+(b?"Z":"")}; goog.date.Date.prototype.equals=function(a){return!(!a||this.getYear()!=a.getYear()||this.getMonth()!=a.getMonth()||this.getDate()!=a.getDate())};goog.date.Date.prototype.toString=function(){return this.toIsoString()};goog.date.Date.prototype.maybeFixDst_=function(a){this.getDate()!=a&&(a=this.getDate()a;++a){var f=c[a].getRight();c[a].getOperator()===ol.expr.ComparisonOp.GTE?d=f:c[a].getOperator()===ol.expr.ComparisonOp.LTE&&(e=f)}this.writeNode("LowerBoundary",d,null,b);this.writeNode("UpperBoundary", e,null,b);return b},PropertyName:function(a){var b=this.createElementNS("ogc:PropertyName");b.appendChild(this.createTextNode(a.getName()));return b},Literal:function(a){var b=this.createElementNS("ogc:Literal");b.appendChild(this.createTextNode(a.getValue()));return b},LowerBoundary:function(a){var b=this.createElementNS("ogc:LowerBoundary");this.writeOgcExpression(a,b);return b},UpperBoundary:function(a){var b=this.createElementNS("ogc:UpperBoundary");this.writeOgcExpression(a,b);return b},INTERSECTS:function(a){return this.writeSpatial_(a, "Intersects")},WITHIN:function(a){return this.writeSpatial_(a,"Within")},CONTAINS:function(a){return this.writeSpatial_(a,"Contains")},DWITHIN:function(a){var b=this.writeSpatial_(a,"DWithin");this.writeNode("Distance",a,null,b);return b},Distance:function(a){var b=this.createElementNS("ogc:Distance");a=a.getArgs();b.setAttribute("units",a[2].getValue());b.appendChild(this.createTextNode(a[1].getValue()));return b},Function:function(a){var b=this.createElementNS("ogc:Function");b.setAttribute("name", a.getCallee().getName());a=a.getArgs();for(var c=0,d=a.length;ce;++e)d[e]instanceof ol.expr.Logical&&d[e].getOperator()===c?this.getSubfiltersForLogical_(d[e],b):b.push(d[e])}; ol.parser.ogc.Filter_v1.prototype.aggregateLogical_=function(a,b){var c=[],d=[];if(2d&&(e=~e);a[c]=e}return ol.parser.polyline.encodeUnsignedIntegers(a)};ol.parser.polyline.decodeSignedIntegers=function(a){a=ol.parser.polyline.decodeUnsignedIntegers(a);for(var b=a.length,c=0;c>1):d>>1}return a}; ol.parser.polyline.encodeUnsignedIntegers=function(a){for(var b="",c=a.length,d=0;dg?(b.push(c),d=c=0):d+=5}return b};ol.parser.polyline.encodeFloat=function(a,b){a=Math.round(a*(b||1E5));return ol.parser.polyline.encodeSignedInteger(a)}; ol.parser.polyline.decodeFloat=function(a,b){return ol.parser.polyline.decodeSignedInteger(a)/(b||1E5)};ol.parser.polyline.encodeSignedInteger=function(a){var b=a<<1;0>a&&(b=~b);return ol.parser.polyline.encodeUnsignedInteger(b)};ol.parser.polyline.decodeSignedInteger=function(a){a=ol.parser.polyline.decodeUnsignedInteger(a);return a&1?~(a>>1):a>>1}; ol.parser.polyline.encodeUnsignedInteger=function(a){for(var b,c="";32<=a;)b=(32|a&31)+63,c+=String.fromCharCode(b),a>>=5;return c+=String.fromCharCode(a+63)};ol.parser.polyline.decodeUnsignedInteger=function(a){for(var b=0,c=0,d=a.length,e=0;ef)break;c+=5}return b};ol.proj.CH=function(a){ol.Projection.call(this,{code:a.code,extent:a.extent,global:!1,units:ol.ProjectionUnits.METERS})};goog.inherits(ol.proj.CH,ol.Projection);ol.proj.CH.PHI0=goog.math.toRadians(169028.66/3600);ol.proj.CH.LAMBDA0=goog.math.toRadians(26782.5/3600);ol.proj.CH.ELLIPSOID=ol.ellipsoid.BESSEL1841;ol.proj.CH.COS_PHI0=Math.cos(ol.proj.CH.PHI0);ol.proj.CH.SIN_PHI0=Math.sin(ol.proj.CH.PHI0); ol.proj.CH.R=ol.proj.CH.ELLIPSOID.a*Math.sqrt(1-ol.proj.CH.ELLIPSOID.eSquared)/(1-ol.proj.CH.ELLIPSOID.eSquared*ol.proj.CH.SIN_PHI0*ol.proj.CH.SIN_PHI0);ol.proj.CH.ALPHA=Math.sqrt(1+ol.proj.CH.ELLIPSOID.eSquared*Math.pow(ol.proj.CH.COS_PHI0,4)/(1-ol.proj.CH.ELLIPSOID.eSquared));ol.proj.CH.SIN_B0=ol.proj.CH.SIN_PHI0/ol.proj.CH.ALPHA;ol.proj.CH.B0=Math.asin(ol.proj.CH.SIN_B0);ol.proj.CH.COS_B0=Math.cos(ol.proj.CH.B0); ol.proj.CH.K=Math.log(Math.tan(Math.PI/4+ol.proj.CH.B0/2))-ol.proj.CH.ALPHA*Math.log(Math.tan(Math.PI/4+ol.proj.CH.PHI0/2))+ol.proj.CH.ALPHA*ol.proj.CH.ELLIPSOID.e*Math.log((1+ol.proj.CH.ELLIPSOID.e*ol.proj.CH.SIN_PHI0)/(1-ol.proj.CH.ELLIPSOID.e*ol.proj.CH.SIN_PHI0))/2; ol.proj.CH.add=function(){ol.proj.EPSG2056.add();ol.proj.EPSG21781.add();var a=ol.proj.get("EPSG:2056"),b=ol.proj.get("EPSG:21781");ol.proj.addTransform(a,b,goog.partial(ol.proj.CH.translate_,-2E6,-1E6));ol.proj.addTransform(b,a,goog.partial(ol.proj.CH.translate_,2E6,1E6))}; ol.proj.CH.fromEPSG4326Approximate_=function(a,b,c,d,e){var f=c.length;e=goog.isDef(e)?e:2;d=goog.isDef(d)?d:2Math.abs(n-m))break;m=n}d[k]=goog.math.toDegrees(h);d[k+1]=goog.math.toDegrees(n)}return d};ol.proj.CH.translate_=function(a,b,c,d,e){var f=c.length;e=goog.isDef(e)?e:2;d=goog.isDef(d)?d:2n||m<=n)return null;a=a.y;return a<-m||-1=this.minZoom;--a)if(d.minX=d.maxX>>=1,d.minY=d.maxY>>=1,b.call(c,a,d))return!0;return!1};ol.source.BingMaps=function(a){ol.source.TileImage.call(this,{crossOrigin:"anonymous",opaque:!0,projection:ol.proj.get("EPSG:3857")});this.culture_=goog.isDef(a.culture)?a.culture:"en-us";this.ready_=!1;var b=new goog.Uri("//dev.virtualearth.net/REST/v1/Imagery/Metadata/"+a.style);(new goog.net.Jsonp(b,"jsonp")).send({include:"ImageryProviders",key:a.key},goog.bind(this.handleImageryMetadataResponse,this))};goog.inherits(ol.source.BingMaps,ol.source.TileImage); ol.source.BingMaps.prototype.handleImageryMetadataResponse=function(a){var b=a.brandLogoUri,c=a.resourceSets[0].resources[0],d=new ol.tilegrid.XYZ({minZoom:c.zoomMin,maxZoom:c.zoomMax,tileSize:[c.imageWidth,c.imageHeight]});this.tileGrid=d;var e=this.culture_;this.tileUrlFunction=ol.TileUrlFunction.withTileCoordTransform(d.createTileCoordTransform(),ol.TileUrlFunction.createFromTileUrlFunctions(goog.array.map(c.imageUrlSubdomains,function(a){var b=c.imageUrl.replace("{subdomain}",a).replace("{culture}", e);return function(a,c){return goog.isNull(a)?void 0:b.replace("{quadkey}",a.quadKey())}})));var f=ol.proj.getTransformFromProjections(ol.proj.get("EPSG:4326"),this.getProjection());a=goog.array.map(c.imageryProviders,function(a){var b=a.attribution,c={};goog.array.forEach(a.coverageAreas,function(a){var b=a.zoomMin,e=a.zoomMax;a=a.bbox;a=ol.extent.transform([a[1],a[3],a[0],a[2]],f);var g,h;for(g=b;g<=e;++g)h=g.toString(),b=d.getTileRangeForExtentAndZ(a,g),h in c?c[h].push(b):c[h]=[b]});return new ol.Attribution({html:b, tileRanges:c})});this.setAttributions(a);this.setLogo(b);this.ready_=!0;this.dispatchLoadEvent()};ol.source.BingMaps.prototype.isReady=function(){return this.ready_};ol.source.FeatureInfoSource=function(){};ol.source.ImageStatic=function(a){var b=ol.source.ImageStatic.createImageFunction(a.url),c=a.imageExtent,d=a.imageSize,e=(c[3]-c[2])/d[1],f=ol.proj.get(a.projection);ol.source.Image.call(this,{attributions:a.attributions,crossOrigin:a.crossOrigin,extent:a.extent,projection:a.projection,imageUrlFunction:b,resolutions:[e]});this.image_=this.createImage(c,e,d,f)};goog.inherits(ol.source.ImageStatic,ol.source.Image); ol.source.ImageStatic.prototype.getImage=function(a,b,c){return ol.extent.intersects(a,this.image_.getExtent())?this.image_:null};ol.source.ImageStatic.createImageFunction=function(a){return function(b,c,d){return a}};ol.source.wms={};ol.source.WMSGetFeatureInfoMethod={IFRAME:"iframe",XHR_GET:"xhr_get"}; ol.source.wms.getUrl=function(a,b,c,d,e){d={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0,WIDTH:Math.round(d[0]),HEIGHT:Math.round(d[1])};goog.object.extend(d,b);d.STYLES=b.STYLES||new String("");b="1.3"f&&(f=0);var f=c.styles[f].identifier,g={};goog.array.forEach(c.dimensions,function(a,b,c){b=a.identifier;c=a["default"];goog.isDef(c)||(c=a.values[0]);g[b]=c});var h=a.contents.tileMatrixSets[d],k=ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet(h), h=ol.proj.get(h.supportedCRS),l=a.operationsMetadata.GetTile.dcp.http.get,m,n;switch(goog.object.getKeys(l[0].constraints.GetEncoding.allowedValues)[0]){case "REST":case "RESTful":n=ol.source.WMTSRequestEncoding.REST;m=c.resourceUrls.tile[e];break;case "KVP":n=ol.source.WMTSRequestEncoding.KVP,m=[],goog.array.forEach(l,function(a,b,c){a.constraints.GetEncoding.allowedValues.hasOwnProperty(ol.source.WMTSRequestEncoding.KVP)&&m.push(a.url)})}return{urls:m,layer:b,matrixSet:d,format:e,projection:h,requestEncoding:n, tileGrid:k,style:f,dimensions:g}};ol.sphere.WGS84=new ol.Sphere(6378137);ol.style.Text=function(a){this.color_=goog.isDef(a.color)?a.color instanceof ol.expr.Expression?a.color:new ol.expr.Literal(a.color):new ol.expr.Literal(ol.style.TextDefaults.color);this.fontFamily_=goog.isDef(a.fontFamily)?a.fontFamily instanceof ol.expr.Expression?a.fontFamily:new ol.expr.Literal(a.fontFamily):new ol.expr.Literal(ol.style.TextDefaults.fontFamily);this.fontSize_=goog.isDef(a.fontSize)?a.fontSize instanceof ol.expr.Expression?a.fontSize:new ol.expr.Literal(a.fontSize):new ol.expr.Literal(ol.style.TextDefaults.fontSize); this.text_=a.text instanceof ol.expr.Expression?a.text:new ol.expr.Literal(a.text);this.opacity_=goog.isDef(a.opacity)?a.opacity instanceof ol.expr.Expression?a.opacity:new ol.expr.Literal(a.opacity):new ol.expr.Literal(ol.style.TextDefaults.opacity)};goog.inherits(ol.style.Text,ol.style.Symbolizer); ol.style.Text.prototype.createLiteral=function(a){var b;a instanceof ol.Feature&&(b=a,(a=b.getGeometry())&&a.getType());a=ol.expr.evaluateFeature(this.color_,b);var c=ol.expr.evaluateFeature(this.fontFamily_,b),d=Number(ol.expr.evaluateFeature(this.fontSize_,b)),e=ol.expr.evaluateFeature(this.text_,b);b=Number(ol.expr.evaluateFeature(this.opacity_,b));return new ol.style.TextLiteral({color:a,fontFamily:c,fontSize:d,text:e,opacity:b})};ol.style.Text.prototype.getColor=function(){return this.color_}; ol.style.Text.prototype.getFontFamily=function(){return this.fontFamily_};ol.style.Text.prototype.getFontSize=function(){return this.fontSize_};ol.style.Text.prototype.getOpacity=function(){return this.opacity_};ol.style.Text.prototype.getText=function(){return this.text_};ol.style.Text.prototype.setColor=function(a){this.color_=a};ol.style.Text.prototype.setFontFamily=function(a){this.fontFamily_=a};ol.style.Text.prototype.setFontSize=function(a){this.fontSize_=a}; ol.style.Text.prototype.setOpacity=function(a){this.opacity_=a};ol.style.Text.prototype.setText=function(a){this.text_=a};ol.style.TextDefaults={color:"#000",fontFamily:"sans-serif",fontSize:10,opacity:1};