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;cparseFloat(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}();var ol={ASSUME_TOUCH:!1};ol.BUFFER_REPLACE_UNUSED_ENTRIES_WITH_NANS=goog.DEBUG;ol.DEFAULT_MAX_ZOOM=42;ol.DEFAULT_TILE_CACHE_HIGH_WATER_MARK=2048;ol.DEFAULT_TILE_SIZE=256;ol.DEFAULT_WMS_VERSION="1.3.0";ol.DRAGROTATEANDZOOM_ANIMATION_DURATION=400;ol.DRAGROTATE_ANIMATION_DURATION=250;ol.DRAGZOOM_ANIMATION_DURATION=200;ol.DRAG_BOX_HYSTERESIS_PIXELS=8;ol.ENABLE_CANVAS=!0;ol.ENABLE_DOM=!0;ol.ENABLE_IMAGE=!0;ol.ENABLE_NAMED_COLORS=!0;ol.ENABLE_PROJ4JS=!0;ol.ENABLE_TILE=!0;ol.ENABLE_VECTOR=!0; ol.ENABLE_WEBGL=!0;ol.LEGACY_IE_SUPPORT=!1;ol.IS_HTTPS="https:"===goog.global.location.protocol;ol.IS_LEGACY_IE=goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9.0")&&""!==goog.userAgent.VERSION;ol.KEYBOARD_PAN_DURATION=100;ol.MOUSEWHEELZOOM_MAXDELTA=1;ol.MOUSEWHEELZOOM_TIMEOUT_DURATION=80;ol.ROTATE_ANIMATION_DURATION=250;ol.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK=1024;ol.ZOOMSLIDER_ANIMATION_DURATION=200;ol.inherits=goog.inherits;goog.debug={};goog.debug.Error=function(a){Error.captureStackTrace?Error.captureStackTrace(this,goog.debug.Error):this.stack=Error().stack||"";a&&(this.message=String(a))};goog.inherits(goog.debug.Error,Error);goog.debug.Error.prototype.name="CustomError";ol.size={};ol.size.equals=function(a,b){return a[0]==b[0]&&a[1]==b[1]};goog.array={};goog.NATIVE_ARRAY_PROTOTYPES=goog.TRUSTED_SITE;goog.array.peek=function(a){return a[a.length-1]};goog.array.ARRAY_PROTOTYPE_=Array.prototype;goog.array.indexOf=goog.NATIVE_ARRAY_PROTOTYPES&&goog.array.ARRAY_PROTOTYPE_.indexOf?function(a,b,c){return goog.array.ARRAY_PROTOTYPE_.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?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};ol.TileCoord.prototype.getZXY=function(a){return goog.isDef(a)?(a[0]=this.z,a[1]=this.x,a[2]=this.y,a):[this.z,this.x,this.y]}; 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;bc*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.math.Coordinate=function(a,b){this.x=goog.isDef(a)?a:0;this.y=goog.isDef(b)?b:0};goog.math.Coordinate.prototype.clone=function(){return new goog.math.Coordinate(this.x,this.y)};goog.DEBUG&&(goog.math.Coordinate.prototype.toString=function(){return"("+this.x+", "+this.y+")"});goog.math.Coordinate.equals=function(a,b){return a==b?!0:a&&b?a.x==b.x&&a.y==b.y:!1};goog.math.Coordinate.distance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}; goog.math.Coordinate.magnitude=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)};goog.math.Coordinate.azimuth=function(a){return goog.math.angle(0,0,a.x,a.y)};goog.math.Coordinate.squaredDistance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d};goog.math.Coordinate.difference=function(a,b){return new goog.math.Coordinate(a.x-b.x,a.y-b.y)};goog.math.Coordinate.sum=function(a,b){return new goog.math.Coordinate(a.x+b.x,a.y+b.y)}; goog.math.Coordinate.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};goog.math.Coordinate.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};goog.math.Coordinate.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};goog.math.Coordinate.prototype.translate=function(a,b){a instanceof goog.math.Coordinate?(this.x+=a.x,this.y+=a.y):(this.x+=a,goog.isNumber(b)&&(this.y+=b));return this}; goog.math.Coordinate.prototype.scale=function(a,b){var c=goog.isNumber(b)?b:a;this.x*=a;this.y*=c;return this};goog.math.Size=function(a,b){this.width=a;this.height=b};goog.math.Size.equals=function(a,b){return a==b?!0:a&&b?a.width==b.width&&a.height==b.height:!1};goog.math.Size.prototype.clone=function(){return new goog.math.Size(this.width,this.height)};goog.DEBUG&&(goog.math.Size.prototype.toString=function(){return"("+this.width+" x "+this.height+")"});goog.math.Size.prototype.getLongest=function(){return Math.max(this.width,this.height)}; goog.math.Size.prototype.getShortest=function(){return Math.min(this.width,this.height)};goog.math.Size.prototype.area=function(){return this.width*this.height};goog.math.Size.prototype.perimeter=function(){return 2*(this.width+this.height)};goog.math.Size.prototype.aspectRatio=function(){return this.width/this.height};goog.math.Size.prototype.isEmpty=function(){return!this.area()};goog.math.Size.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this}; goog.math.Size.prototype.fitsInside=function(a){return this.width<=a.width&&this.height<=a.height};goog.math.Size.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};goog.math.Size.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};goog.math.Size.prototype.scale=function(a,b){var c=goog.isNumber(b)?b:a;this.width*=a;this.height*=c;return this}; goog.math.Size.prototype.scaleToFit=function(a){a=this.aspectRatio()>a.aspectRatio()?a.width/this.width:a.height/this.height;return this.scale(a)};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?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=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(",");1goog.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],p=a[7],r=a[8],q=a[9],t=a[10],s=a[11],u=a[12],v=a[13],A=a[14],w=a[15],z=Math.cos(b),x=Math.sin(b),B=1-z;b=c*c*B+z;var C=c*d*B+e*x,G=c*e*B-d*x,H=c*d*B-e*x,E=d*d*B+z,y=d*e*B+c*x,D=c*e*B+d*x;c=d*e*B-c*x;e=e*e*B+z;return goog.vec.Mat4.setFromValues(a,f*b+l*C+r*G,g*b+m*C+q*G,h*b+n*C+t*G,k*b+p*C+s*G,f*H+l*E+r*y,g*H+m*E+q*y,h*H+n*E+t*y,k*H+p*E+s*y,f*D+l*c+r*e,g*D+m*c+q*e,h*D+n*c+t*e,k*D+p*c+s*e,u,v,A,w)}; 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.dom={};ol.dom.createCanvasContext2D=function(a,b){var c=goog.dom.createElement(goog.dom.TagName.CANVAS);goog.isDef(a)&&(c.width=a);goog.isDef(b)&&(c.height=b);return c.getContext("2d")};ol.dom.BrowserFeature={USE_MS_MATRIX_TRANSFORM:ol.LEGACY_IE_SUPPORT&&ol.IS_LEGACY_IE,USE_MS_ALPHA_FILTER:ol.LEGACY_IE_SUPPORT&&ol.IS_LEGACY_IE}; ol.dom.canUseCssTransform=function(){var a;return function(){if(!goog.isDef(a))if(goog.global.getComputedStyle){var b=goog.dom.createElement(goog.dom.TagName.P),c,d={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};goog.dom.appendChild(document.body,b);for(var e in d)e in b.style&&(b.style[e]="translate(1px,1px)",c=goog.global.getComputedStyle(b).getPropertyValue(d[e]));goog.dom.removeNode(b);a=c&&"none"!== c}else a=!1;return a}}(); ol.dom.canUseCssTransform3D=function(){var a;return function(){if(!goog.isDef(a))if(goog.global.getComputedStyle){var b=goog.dom.createElement(goog.dom.TagName.P),c,d={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};goog.dom.appendChild(document.body,b);for(var e in d)e in b.style&&(b.style[e]="translate3d(1px,1px,1px)",c=goog.global.getComputedStyle(b).getPropertyValue(d[e]));goog.dom.removeNode(b);a=c&& "none"!==c}else a=!1;return a}}();ol.dom.setTransform=function(a,b){var c=a.style;c.WebkitTransform=b;c.MozTransform=b;c.OTransform=b;c.msTransform=b;c.transform=b;goog.userAgent.IE&&!ol.IS_LEGACY_IE&&(a.style.transformOrigin="0 0")}; ol.dom.setOpacity=function(a,b){if(ol.dom.BrowserFeature.USE_MS_ALPHA_FILTER){var c=a.currentStyle.filter,d,e;"8.0"==goog.userAgent.VERSION?(d=/progid:DXImageTransform\.Microsoft\.Alpha\(.*?\)/i,e="progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d"+100*b+")"):(d=/alpha\(.*?\)/i,e="alpha(opacity\x3d"+100*b+")");d=c.replace(d,e);d===c&&(d+=" "+e);a.style.filter=d;"auto"===a.currentStyle.zIndex&&(a.style.zIndex=0)}else goog.style.setOpacity(a,b)}; ol.dom.setIEMatrix_=function(a,b){var c=a.currentStyle.filter,d=c.replace(/progid:DXImageTransform.Microsoft.Matrix\(.*?\)/i,b);d===c&&(d=" "+b);a.style.filter=d;"auto"===a.currentStyle.zIndex&&(a.style.zIndex=0)}; ol.dom.transformElement2D=function(a,b,c,d){if(ol.dom.canUseCssTransform3D()){if(goog.isDef(c)){var e=Array(16);for(d=0;16>d;++d)e[d]=b[d].toFixed(c);c=e.join(",")}else c=b.join(",");ol.dom.setTransform(a,"matrix3d("+c+")")}else if(ol.dom.canUseCssTransform()){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 if(ol.dom.BrowserFeature.USE_MS_MATRIX_TRANSFORM){var e=goog.vec.Mat4.getElement(b,0,0),f=goog.vec.Mat4.getElement(b,0,1),g=goog.vec.Mat4.getElement(b,1,0),h=goog.vec.Mat4.getElement(b,1,1),k=goog.vec.Mat4.getElement(b,0,3);b=goog.vec.Mat4.getElement(b,1,3);var l;l='progid:DXImageTransform.Microsoft.Matrix(sizingMethod\x3d"auto expand",M11\x3d'+e.toFixed(c||20);l+=",M12\x3d"+f.toFixed(c||20);l+=",M21\x3d"+ g.toFixed(c||20);l+=",M22\x3d"+h.toFixed(c||20);l+=")";ol.dom.setIEMatrix_(a,l);b/=h;d.style.left=Math.round(k/e)+"px";d.style.top=Math.round(b)+"px"}else a.style.left=Math.round(goog.vec.Mat4.getElement(b,0,3))+"px",a.style.top=Math.round(goog.vec.Mat4.getElement(b,1,3))+"px"};ol.webgl={};ol.webgl.CONTEXT_IDS_=["experimental-webgl","webgl","webkit-3d","moz-webgl"];ol.webgl.WebGLContextEventType={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"};ol.webgl.getContext=function(a,b){var c,d,e=ol.webgl.CONTEXT_IDS_.length;for(d=0;d=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.events.listeners_={};goog.events.listenerTree_={};goog.events.sources_={};goog.events.onString_="on";goog.events.onStringMap_={};goog.events.keySeparator_="_";goog.events.listen=function(a,b,c,d,e){if(goog.isArray(b)){for(var f=0;fa.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.functions={};goog.functions.constant=function(a){return function(){return a}};goog.functions.FALSE=goog.functions.constant(!1);goog.functions.TRUE=goog.functions.constant(!0);goog.functions.NULL=goog.functions.constant(null);goog.functions.identity=function(a,b){return a};goog.functions.error=function(a){return function(){throw Error(a);}};goog.functions.fail=function(a){return function(){throw a;}}; goog.functions.lock=function(a,b){b=b||0;return function(){return a.apply(this,Array.prototype.slice.call(arguments,0,b))}};goog.functions.withReturnValue=function(a,b){return goog.functions.sequence(a,goog.functions.constant(b))};goog.functions.compose=function(a,b){var c=arguments,d=c.length;return function(){var a;d&&(a=c[d-1].apply(this,arguments));for(var b=d-2;0<=b;b--)a=c[b].call(this,a);return a}}; goog.functions.sequence=function(a){var b=arguments,c=b.length;return function(){for(var a,e=0;e=c||(1<=c?(g=h,e=f):(g+=c*k,e+=c*l));return[g,e]};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.format=function(a,b,c){return goog.isDef(a)?b.replace("{x}",a[0].toFixed(c)).replace("{y}",a[1].toFixed(c)):""};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.sub=function(a,b){a[0]-=b[0];a[1]-=b[1];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.squaredDistanceToSegment=function(a,b){return ol.coordinate.squaredDistance(a,ol.coordinate.closestOnSegment(a,b))}; 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){return ol.coordinate.format(a,"{x}, {y}",b)};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.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));this.dispatchChangeEvent()};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.BrowserFeature.HAS_DEVICE_ORIENTATION){var a=this.getTracking();a&&goog.isNull(this.listenerKey_)?this.listenerKey_=goog.events.listen(goog.global,"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.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.pointer={}; ol.pointer.PointerEvent=function(a,b,c){goog.events.Event.call(this,a);this.browserEvent=b;a=goog.isDef(c)?c:{};this.buttons=this.getButtons_(a);this.pressure=this.getPressure_(a,this.buttons);this.bubbles=goog.object.get(a,"bubbles",!1);this.cancelable=goog.object.get(a,"cancelable",!1);this.view=goog.object.get(a,"view",null);this.detail=goog.object.get(a,"detail",null);this.screenX=goog.object.get(a,"screenX",0);this.screenY=goog.object.get(a,"screenY",0);this.clientX=goog.object.get(a,"clientX", 0);this.clientY=goog.object.get(a,"clientY",0);this.ctrlKey=goog.object.get(a,"ctrlKey",!1);this.altKey=goog.object.get(a,"altKey",!1);this.shiftKey=goog.object.get(a,"shiftKey",!1);this.metaKey=goog.object.get(a,"metaKey",!1);this.button=goog.object.get(a,"button",0);this.relatedTarget=goog.object.get(a,"relatedTarget",null);this.pointerId=goog.object.get(a,"pointerId",0);this.width=goog.object.get(a,"width",0);this.height=goog.object.get(a,"height",0);this.tiltX=goog.object.get(a,"tiltX",0);this.tiltY= goog.object.get(a,"tiltY",0);this.pointerType=goog.object.get(a,"pointerType","");this.hwTimestamp=goog.object.get(a,"hwTimestamp",0);this.isPrimary=goog.object.get(a,"isPrimary",!1);b.preventDefault&&(this.preventDefault=function(){b.preventDefault()})};goog.inherits(ol.pointer.PointerEvent,goog.events.Event); ol.pointer.PointerEvent.prototype.getButtons_=function(a){if(a.buttons||ol.pointer.PointerEvent.HAS_BUTTONS)a=a.buttons;else switch(a.which){case 1:a=1;break;case 2:a=4;break;case 3:a=2;break;default:a=0}return a};ol.pointer.PointerEvent.prototype.getPressure_=function(a,b){var c=0;return c=a.pressure?a.pressure:b?0.5:0};ol.pointer.PointerEvent.createMouseEvent=function(a,b){return new MouseEvent(a,b)};ol.pointer.PointerEvent.HAS_BUTTONS=!1; (function(){try{var a=ol.pointer.PointerEvent.createMouseEvent("click",{buttons:1});ol.pointer.PointerEvent.HAS_BUTTONS=1===a.buttons}catch(b){}})();ol.pointer.EventSource=function(a,b){this.dispatcher=a;this.mapping_=b};ol.pointer.EventSource.prototype.getEvents=function(){return goog.object.getKeys(this.mapping_)};ol.pointer.EventSource.prototype.getMapping=function(){return this.mapping_};ol.pointer.EventSource.prototype.getHandlerForEvent=function(a){return this.mapping_[a]};ol.pointer.MouseSource=function(a){ol.pointer.EventSource.call(this,a,{mousedown:this.mousedown,mousemove:this.mousemove,mouseup:this.mouseup,mouseover:this.mouseover,mouseout:this.mouseout});this.pointerMap=a.pointerMap;this.lastTouches=[]};goog.inherits(ol.pointer.MouseSource,ol.pointer.EventSource);ol.pointer.MouseSource.POINTER_ID=1;ol.pointer.MouseSource.POINTER_TYPE="mouse";ol.pointer.MouseSource.DEDUP_DIST=25; ol.pointer.MouseSource.prototype.isEventSimulatedFromTouch_=function(a){var b=this.lastTouches,c=a.clientX;a=a.clientY;for(var d=0,e=b.length,f;d=b.length){var c=[];goog.object.forEach(this.pointerMap,function(a,e){e==ol.pointer.MouseSource.POINTER_ID||this.findTouch_(b,e-2)||c.push(a.out)},this);goog.array.forEach(c,goog.partial(this.cancelOut_,a),this)}}; ol.pointer.TouchSource.prototype.touchstart=function(a){this.vacuumTouches_(a);this.setPrimaryTouch_(a.getBrowserEvent().changedTouches[0]);this.dedupSynthMouse_(a);this.clickCount_++;this.processTouches_(a,this.overDown_)};ol.pointer.TouchSource.prototype.overDown_=function(a,b){goog.object.set(this.pointerMap,b.pointerId,{target:b.target,out:b,outTarget:b.target});this.dispatcher.over(b,a);this.dispatcher.enter(b,a);this.dispatcher.down(b,a)}; ol.pointer.TouchSource.prototype.touchmove=function(a){a.preventDefault();this.processTouches_(a,this.moveOverOut_)}; ol.pointer.TouchSource.prototype.moveOverOut_=function(a,b){var c=goog.object.get(this.pointerMap,b.pointerId);if(c){var d=c.out,e=c.outTarget;this.dispatcher.move(b,a);d&&e!==b.target&&(d.relatedTarget=b.target,b.relatedTarget=e,d.target=e,b.target?(this.dispatcher.leaveOut(d,a),this.dispatcher.enterOver(b,a)):(b.target=e,b.relatedTarget=null,this.cancelOut_(a,b)));c.out=b;c.outTarget=b.target}}; ol.pointer.TouchSource.prototype.touchend=function(a){this.dedupSynthMouse_(a);this.processTouches_(a,this.upOut_)};ol.pointer.TouchSource.prototype.upOut_=function(a,b){this.dispatcher.up(b,a);this.dispatcher.out(b,a);this.dispatcher.leave(b,a);this.cleanUpPointer_(b)};ol.pointer.TouchSource.prototype.touchcancel=function(a){this.processTouches_(a,this.cancelOut_)}; ol.pointer.TouchSource.prototype.cancelOut_=function(a,b){this.dispatcher.cancel(b,a);this.dispatcher.out(b,a);this.dispatcher.leave(b,a);this.cleanUpPointer_(b)};ol.pointer.TouchSource.prototype.cleanUpPointer_=function(a){goog.object.remove(this.pointerMap,a.pointerId);this.removePrimaryPointer_(a)}; ol.pointer.TouchSource.prototype.dedupSynthMouse_=function(a){var b=this.mouseSource.lastTouches;a=a.getBrowserEvent().changedTouches[0];if(this.isPrimaryTouch_(a)){var c=[a.clientX,a.clientY];b.push(c);goog.global.setTimeout(function(){goog.array.remove(b,c)},ol.pointer.TouchSource.DEDUP_TIMEOUT)}};ol.pointer.PointerEventHandler=function(a){goog.events.EventTarget.call(this);this.element_=a;this.pointerMap={};this.eventMap_={};this.eventSourceList_=[];this.registerSources()};goog.inherits(ol.pointer.PointerEventHandler,goog.events.EventTarget); ol.pointer.PointerEventHandler.prototype.registerSources=function(){if(ol.BrowserFeature.HAS_POINTER)this.registerSource("native",new ol.pointer.NativeSource(this));else if(ol.BrowserFeature.HAS_MSPOINTER)this.registerSource("ms",new ol.pointer.MsSource(this));else{var a=new ol.pointer.MouseSource(this);this.registerSource("mouse",a);ol.BrowserFeature.HAS_TOUCH&&this.registerSource("touch",new ol.pointer.TouchSource(this,a))}this.register_()}; ol.pointer.PointerEventHandler.prototype.registerSource=function(a,b){var c=b.getEvents();c&&(goog.array.forEach(c,function(a){var c=b.getHandlerForEvent(a);c&&(this.eventMap_[a]=goog.bind(c,b))},this),this.eventSourceList_.push(b))};ol.pointer.PointerEventHandler.prototype.register_=function(){for(var a=this.eventSourceList_.length,b,c=0;cc)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.disable=function(a,b){if(goog.isDef(a))return 0};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||goog.math.toRadians(5);return function(a,d){if(goog.isDef(a))return Math.abs(a+d)<=b?0:a+d}};ol.Constraints=function(a,b,c){this.center=a;this.resolution=b;this.rotation=c};ol.IView2D=function(){};ol.IView2D.prototype.getCenter=function(){};ol.IView2D.prototype.getProjection=function(){};ol.IView2D.prototype.getResolution=function(){};ol.IView2D.prototype.getRotation=function(){};ol.IView2D.prototype.getView2DState=function(){};ol.IView2D.prototype.isDef=function(){};ol.IView3D=function(){};ol.IView3D.prototype.isDef=function(){};ol.IView=function(){};ol.IView.prototype.getView2D=function(){};ol.IView.prototype.getView3D=function(){};ol.IView.prototype.isDef=function(){};ol.ViewHint={ANIMATING:0,INTERACTING:1};ol.View=function(){ol.Object.call(this);this.hints_=[0,0]};goog.inherits(ol.View,ol.Object);ol.View.prototype.getHints=function(){return goog.array.clone(this.hints_)};ol.View.prototype.getView2D=function(){return null};ol.View.prototype.getView3D=function(){return null};ol.View.prototype.isDef=function(){return!1};ol.View.prototype.setHint=function(a,b){this.hints_[a]+=b;return this.hints_[a]};ol.extent={};ol.extent.Relationship={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};ol.extent.boundingExtent=function(a){for(var b=ol.extent.createEmpty(),c=0,d=a.length;cd&&(h|=ol.extent.Relationship.RIGHT);ge&&(h|=ol.extent.Relationship.ABOVE);h===ol.extent.Relationship.UNKNOWN&&(h=ol.extent.Relationship.INTERSECTING);return h}; ol.extent.createEmpty=function(){return[Infinity,Infinity,-Infinity,-Infinity]};ol.extent.createOrUpdate=function(a,b,c,d,e){return goog.isDef(e)?(e[0]=a,e[1]=b,e[2]=c,e[3]=d,e):[a,b,c,d]};ol.extent.createOrUpdateEmpty=function(a){return ol.extent.createOrUpdate(Infinity,Infinity,-Infinity,-Infinity,a)};ol.extent.createOrUpdateFromCoordinate=function(a,b){var c=a[0],d=a[1];return ol.extent.createOrUpdate(c,d,c,d,b)}; ol.extent.createOrUpdateFromCoordinates=function(a,b){var c=ol.extent.createOrUpdateEmpty(b);return ol.extent.extendCoordinates(c,a)};ol.extent.createOrUpdateFromFlatCoordinates=function(a,b,c,d,e){e=ol.extent.createOrUpdateEmpty(e);return ol.extent.extendFlatCoordinates(e,a,b,c,d)};ol.extent.createOrUpdateFromRings=function(a,b){var c=ol.extent.createOrUpdateEmpty(b);return ol.extent.extendRings(c,a)};ol.extent.empty=function(a){a[0]=a[1]=Infinity;a[2]=a[3]=-Infinity;return a}; ol.extent.equals=function(a,b){return a[0]==b[0]&&a[2]==b[2]&&a[1]==b[1]&&a[3]==b[3]};ol.extent.extend=function(a,b){b[0]a[2]&&(a[2]=b[2]);b[1]a[3]&&(a[3]=b[3]);return a};ol.extent.extendCoordinate=function(a,b){b[0]a[2]&&(a[2]=b[0]);b[1]a[3]&&(a[3]=b[1])};ol.extent.extendCoordinates=function(a,b){var c,d;c=0;for(d=b.length;cg;++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[1]};ol.extent.getIntersectionArea=function(a,b){var c=Math.max(a[0],b[0]),d=Math.max(a[1],b[1]),e=Math.min(a[2],b[2]),f=Math.min(a[3],b[3]);return Math.max(0,e-c)*Math.max(0,f-d)}; ol.extent.getMargin=function(a){return ol.extent.getWidth(a)+ol.extent.getHeight(a)};ol.extent.getSize=function(a){return[a[2]-a[0],a[3]-a[1]]};ol.extent.getTopLeft=function(a){return[a[0],a[3]]};ol.extent.getTopRight=function(a){return[a[2],a[3]]};ol.extent.getWidth=function(a){return a[2]-a[0]};ol.extent.intersects=function(a,b){return a[0]<=b[2]&&a[2]>=b[0]&&a[1]<=b[3]&&a[3]>=b[1]};ol.extent.isEmpty=function(a){return a[2]=g&&h<=k):f&ol.extent.Relationship.RIGHT&&!(e&ol.extent.Relationship.RIGHT)?(g=c-(l-k)*b,d=g>=h&&g<=a):f&ol.extent.Relationship.BELOW&& !(e&ol.extent.Relationship.BELOW)?(h=l-(c-h)/b,d=h>=g&&h<=k):f&ol.extent.Relationship.LEFT&&!(e&ol.extent.Relationship.LEFT)&&(g=c-(l-g)*b,d=g>=h&&g<=a)}return d};ol.extent.touches=function(a,b){return ol.extent.intersects(a,b)&&(a[0]==b[2]||a[2]==b[0]||a[1]==b[3]||a[3]==b[1])};ol.extent.transform=function(a,b,c){a=[a[0],a[1],a[0],a[3],a[2],a[1],a[2],a[3]];b(a,a,2);return ol.extent.boundingExtentXYs_([a[0],a[2],a[4],a[6]],[a[1],a[3],a[5],a[7]],c)}; ol.extent.transform2D=function(a,b,c){c=goog.isDef(c)?c:[];var d=goog.vec.Mat4.getElement(b,0,0),e=goog.vec.Mat4.getElement(b,1,0),f=goog.vec.Mat4.getElement(b,0,1),g=goog.vec.Mat4.getElement(b,1,1),h=goog.vec.Mat4.getElement(b,0,3);b=goog.vec.Mat4.getElement(b,1,3);var k=[0,2,0,2],l=[1,1,3,3],m=[],n=[],p,r,q;for(p=0;4>p;++p)r=a[k[p]],q=a[l[p]],m[p]=d*r+f*q+h,n[p]=e*r+g*q+b;c[0]=Math.min.apply(null,m);c[1]=Math.min.apply(null,n);c[2]=Math.max.apply(null,m);c[3]=Math.max.apply(null,n);return c};ol.geom={};ol.geom.GeometryType={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"};ol.geom.GeometryLayout={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"}; ol.geom.Geometry=function(){ol.Observable.call(this);this.extent=void 0;this.extentRevision=-1;this.simplifiedGeometryCache={};this.simplifiedGeometryRevision=this.simplifiedGeometryMaxMinSquaredTolerance=0};goog.inherits(ol.geom.Geometry,ol.Observable);ol.geom.Geometry.prototype.getClosestPoint=function(a,b){var c=goog.isDef(b)?b:[NaN,NaN];this.closestPointXY(a[0],a[1],c,Infinity);return c};ol.geom.Geometry.prototype.containsCoordinate=function(a){return this.containsXY(a[0],a[1])}; ol.geom.Geometry.prototype.containsXY=goog.functions.FALSE;ol.geom.flat={};ol.geom.flat.transform={};ol.geom.flat.transform.transform2D=function(a,b,c,d){var e=goog.vec.Mat4.getElement(c,0,0),f=goog.vec.Mat4.getElement(c,1,0),g=goog.vec.Mat4.getElement(c,0,1),h=goog.vec.Mat4.getElement(c,1,1),k=goog.vec.Mat4.getElement(c,0,3);c=goog.vec.Mat4.getElement(c,1,3);var l=goog.isDef(d)?d:[],m=0,n,p;n=0;for(p=a.length;na||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&a<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var b=a.toString();if(this.simplifiedGeometryCache.hasOwnProperty(b))return this.simplifiedGeometryCache[b];var c= this.getSimplifiedGeometryInternal(a);if(c.getFlatCoordinates().lengthe&&(e=f);f=h;g=k}return e}; ol.geom.flat.closest.getsMaxSquaredDelta=function(a,b,c,d,e){var f,g;f=0;for(g=c.length;fh){for(;br&&(l=m,r=v)}r>e&&(k[(l-b)/d]=1,p+de&&(f[g++]=l,f[g++]=m,h=l,k=m);if(l!=h||m!=k)f[g++]=l,f[g++]=m;return g};ol.geom.flat.simplify.snap=function(a,b){return b*Math.round(a/b)}; ol.geom.flat.simplify.quantize=function(a,b,c,d,e,f,g){if(b==c)return g;var h=ol.geom.flat.simplify.snap(a[b],e),k=ol.geom.flat.simplify.snap(a[b+1],e);b+=d;f[g++]=h;f[g++]=k;var l,m;do if(l=ol.geom.flat.simplify.snap(a[b],e),m=ol.geom.flat.simplify.snap(a[b+1],e),b+=d,b==c)return f[g++]=l,f[g++]=m,g;while(l==h&&m==k);for(;br&&tr)&& (0>q&&sq)||(f[g++]=l,f[g++]=m,h=l,k=m);l=n;m=p}}f[g++]=l;f[g++]=m;return g};ol.geom.flat.simplify.quantizes=function(a,b,c,d,e,f,g,h){var k,l;k=0;for(l=c.length;kf!=m>f&&e<(l-h)*(f-k)/(m-k)+h&&(g=!g);h=l;k=m}return g};ol.geom.flat.contains.linearRingsContainsXY=function(a,b,c,d,e,f){if(0===c.length||!ol.geom.flat.contains.linearRingContainsXY(a,b,c[0],d,e,f))return!1;var g;b=1;for(g=c.length;bn&&(l=(l+m)/2,ol.geom.flat.contains.linearRingsContainsXY(a,b,c,d,l,p)&&(q=l,n=t));l=m}isNaN(q)&&(q=e[f]);return goog.isDef(g)?(g.push(q,p),g):[q,p]}; ol.geom.flat.interiorpoint.linearRingss=function(a,b,c,d,e){var f=[],g,h;g=0;for(h=c.length;ga||this.ends_.length<=a)return null;var b=new ol.geom.LinearRing(null);b.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===a?0:this.ends_[a-1],this.ends_[a]));return b};ol.geom.Polygon.prototype.getLinearRings=function(){var a=this.layout,b=this.flatCoordinates,c=this.ends_,d=[],e=0,f,g;f=0;for(g=c.length;fthis.minResolution_)}return a};ol.View2D.prototype.fitExtent=function(a,b){if(!ol.extent.isEmpty(a)){this.setCenter(ol.extent.getCenter(a));var c=this.getResolutionForExtent(a,b),d=this.constrainResolution(c,0,0);da?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.time=ol.DRAG_BOX_HYSTERESIS_PIXELS_SQUARED&&(this.onBoxEnd(a),this.dispatchEvent(new ol.DragBoxEvent(ol.DragBoxEventType.BOXEND,a.coordinate)));return!1}; ol.interaction.DragBox.prototype.handlePointerDown=function(a){return ol.events.condition.mouseOnly(a)&&a.browserEvent.isMouseActionButton()&&this.condition_(a)?(this.startPixel_=a.pixel,this.box_.setMap(a.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new ol.DragBoxEvent(ol.DragBoxEventType.BOXSTART,a.coordinate)),!0):!1};ol.interaction.DragBox.prototype.shouldStopEvent=goog.functions.identity;goog.color={}; goog.color.names={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400", darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc", ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a", lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57", seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};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;da[0]&&0<=a[1]&&256>a[1]&&0<=a[2]&&256>a[2]&&0<=a[3]&&1>=a[3]};ol.color.normalize=function(a,b){var c=goog.isDef(b)?b:[];c[0]=goog.math.clamp(a[0]+0.5|0,0,255);c[1]=goog.math.clamp(a[1]+0.5|0,0,255);c[2]=goog.math.clamp(a[2]+0.5|0,0,255);c[3]=goog.math.clamp(a[3],0,1);return c}; ol.color.returnOrUpdate=function(a,b){return goog.isDef(b)?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b):a};ol.color.toString=function(a){var b=a[0];b!=(b|0)&&(b=b+0.5|0);var c=a[1];c!=(c|0)&&(c=c+0.5|0);var d=a[2];d!=(d|0)&&(d=d+0.5|0);return"rgba("+b+","+c+","+d+","+a[3]+")"};ol.color.transform=function(a,b,c){c=goog.isDef(c)?c:[];c=goog.vec.Mat4.multVec3(b,a,c);c[3]=a[3];return ol.color.normalize(c,c)}; ol.color.stringOrColorEquals=function(a,b){if(a===b||a==b)return!0;goog.isString(a)&&(a=ol.color.fromString(a));goog.isString(b)&&(b=ol.color.fromString(b));return ol.color.equals(a,b)};ol.render.canvas={};ol.render.canvas.defaultFont="10px sans-serif";ol.render.canvas.defaultFillStyle=[0,0,0,1];ol.render.canvas.defaultLineCap="round";ol.render.canvas.defaultLineDash=[];ol.render.canvas.defaultLineJoin="round";ol.render.canvas.defaultMiterLimit=10;ol.render.canvas.defaultStrokeStyle=[0,0,0,1];ol.render.canvas.defaultTextAlign="center";ol.render.canvas.defaultTextBaseline="middle";ol.render.canvas.defaultLineWidth=1;ol.style={};ol.style.Fill=function(a){a=goog.isDef(a)?a:{};this.color_=goog.isDef(a.color)?a.color:null};ol.style.Fill.prototype.getColor=function(){return this.color_};ol.style.ImageState={IDLE:0,LOADING:1,LOADED:2,ERROR:3};ol.style.Image=function(a){this.opacity_=a.opacity;this.rotateWithView_=a.rotateWithView;this.rotation_=a.rotation;this.scale_=a.scale;this.snapToPixel_=a.snapToPixel};ol.style.Image.prototype.getOpacity=function(){return this.opacity_};ol.style.Image.prototype.getRotateWithView=function(){return this.rotateWithView_};ol.style.Image.prototype.getRotation=function(){return this.rotation_};ol.style.Image.prototype.getScale=function(){return this.scale_}; ol.style.Image.prototype.getSnapToPixel=function(){return this.snapToPixel_};ol.style.Stroke=function(a){a=goog.isDef(a)?a:{};this.color_=goog.isDef(a.color)?a.color:null;this.lineCap_=a.lineCap;this.lineDash_=goog.isDef(a.lineDash)?a.lineDash:null;this.lineJoin_=a.lineJoin;this.miterLimit_=a.miterLimit;this.width_=a.width};ol.style.Stroke.prototype.getColor=function(){return this.color_};ol.style.Stroke.prototype.getLineCap=function(){return this.lineCap_};ol.style.Stroke.prototype.getLineDash=function(){return this.lineDash_};ol.style.Stroke.prototype.getLineJoin=function(){return this.lineJoin_}; ol.style.Stroke.prototype.getMiterLimit=function(){return this.miterLimit_};ol.style.Stroke.prototype.getWidth=function(){return this.width_};ol.style.Circle=function(a){a=goog.isDef(a)?a:{};this.canvas_=goog.dom.createElement(goog.dom.TagName.CANVAS);this.hitDetectionCanvas_=null;this.fill_=goog.isDef(a.fill)?a.fill:null;this.radius_=a.radius;this.stroke_=goog.isDef(a.stroke)?a.stroke:null;a=this.render_();this.anchor_=[a/2,a/2];this.size_=[a,a];ol.style.Image.call(this,{opacity:1,rotateWithView:!1,rotation:0,scale:1,snapToPixel:void 0})};goog.inherits(ol.style.Circle,ol.style.Image);ol.style.Circle.prototype.getAnchor=function(){return this.anchor_}; ol.style.Circle.prototype.getFill=function(){return this.fill_};ol.style.Circle.prototype.getHitDetectionImage=function(a){return this.hitDetectionCanvas_};ol.style.Circle.prototype.getImage=function(a){return this.canvas_};ol.style.Circle.prototype.getImageState=function(){return ol.style.ImageState.LOADED};ol.style.Circle.prototype.getRadius=function(){return this.radius_};ol.style.Circle.prototype.getSize=function(){return this.size_};ol.style.Circle.prototype.getStroke=function(){return this.stroke_}; ol.style.Circle.prototype.listenImageChange=goog.nullFunction;ol.style.Circle.prototype.load=goog.nullFunction;ol.style.Circle.prototype.unlistenImageChange=goog.nullFunction; ol.style.Circle.prototype.render_=function(){var a=this.canvas_,b,c;goog.isNull(this.stroke_)?c=0:(b=ol.color.asString(this.stroke_.getColor()),c=this.stroke_.getWidth(),goog.isDef(c)||(c=ol.render.canvas.defaultLineWidth));var d=2*(this.radius_+c)+1;a.height=d;a.width=d;var e=a.getContext("2d");e.arc(d/2,d/2,this.radius_,0,2*Math.PI,!0);goog.isNull(this.fill_)||(e.fillStyle=ol.color.asString(this.fill_.getColor()),e.fill());goog.isNull(this.stroke_)||(e.strokeStyle=b,e.lineWidth=c,e.stroke());goog.isNull(this.fill_)? (a=this.hitDetectionCanvas_=goog.dom.createElement(goog.dom.TagName.CANVAS),a.height=d,a.width=d,e=a.getContext("2d"),e.arc(d/2,d/2,this.radius_,0,2*Math.PI,!0),e.fillStyle=ol.render.canvas.defaultFillStyle,e.fill(),goog.isNull(this.stroke_)||(e.strokeStyle=b,e.lineWidth=c,e.stroke())):this.hitDetectionCanvas_=a;return d};ol.style.Style=function(a){a=goog.isDef(a)?a:{};this.fill_=goog.isDef(a.fill)?a.fill:null;this.image_=goog.isDef(a.image)?a.image:null;this.stroke_=goog.isDef(a.stroke)?a.stroke:null;this.text_=goog.isDef(a.text)?a.text:null;this.zIndex_=a.zIndex};ol.style.Style.prototype.getFill=function(){return this.fill_};ol.style.Style.prototype.getImage=function(){return this.image_};ol.style.Style.prototype.getStroke=function(){return this.stroke_};ol.style.Style.prototype.getText=function(){return this.text_}; ol.style.Style.prototype.getZIndex=function(){return this.zIndex_};ol.feature={};ol.Feature=function(a){ol.Object.call(this);this.id_=void 0;this.geometryName_="geometry";this.style_=null;this.styleFunction_=void 0;this.geometryChangeKey_=null;goog.events.listen(this,ol.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,!1,this);goog.isDefAndNotNull(a)?a instanceof ol.geom.Geometry?this.setGeometry(a):this.setValues(a):this.setGeometry(null)};goog.inherits(ol.Feature,ol.Object);ol.Feature.prototype.getGeometry=function(){return this.get(this.geometryName_)}; goog.exportProperty(ol.Feature.prototype,"getGeometry",ol.Feature.prototype.getGeometry);ol.Feature.prototype.getId=function(){return this.id_};ol.Feature.prototype.getGeometryName=function(){return this.geometryName_};ol.Feature.prototype.getStyle=function(){return this.style_};ol.Feature.prototype.getStyleFunction=function(){return this.styleFunction_};ol.Feature.prototype.handleGeometryChange_=function(){this.dispatchChangeEvent()}; ol.Feature.prototype.handleGeometryChanged_=function(){goog.isNull(this.geometryChangeKey_)||(goog.events.unlistenByKey(this.geometryChangeKey_),this.geometryChangeKey_=null);var a=this.getGeometry();goog.isDefAndNotNull(a)&&(this.geometryChangeKey_=goog.events.listen(a,goog.events.EventType.CHANGE,this.handleGeometryChange_,!1,this),this.dispatchChangeEvent())};ol.Feature.prototype.setGeometry=function(a){this.set(this.geometryName_,a)};goog.exportProperty(ol.Feature.prototype,"setGeometry",ol.Feature.prototype.setGeometry); ol.Feature.prototype.setStyle=function(a){this.style_=a;this.styleFunction_=ol.feature.createFeatureStyleFunction(a);this.dispatchChangeEvent()};ol.Feature.prototype.setId=function(a){this.id_=a};ol.Feature.prototype.setGeometryName=function(a){goog.events.unlisten(this,ol.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,!1,this);this.geometryName_=a;goog.events.listen(this,ol.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,!1,this);this.handleGeometryChanged_()}; ol.feature.defaultFeatureStyleFunction=function(a){a=new ol.style.Fill({color:"rgba(255,255,255,0.4)"});var b=new ol.style.Stroke({color:"#3399CC",width:1.25}),c=[new ol.style.Style({image:new ol.style.Circle({fill:a,stroke:b,radius:5}),fill:a,stroke:b})];ol.feature.defaultFeatureStyleFunction=function(a){return c};return c};ol.feature.defaultStyleFunction=function(a,b){var c=a.getStyleFunction();goog.isDef(c)||(c=ol.feature.defaultFeatureStyleFunction);return c.call(a,b)}; ol.feature.createFeatureStyleFunction=function(a){goog.isFunction(a)||(a=goog.isArray(a)?a:[a],a=goog.functions.constant(a));return a};ol.feature.createStyleFunction=function(a){goog.isFunction(a)||(a=goog.isArray(a)?a:[a],a=goog.functions.constant(a));return a}; ol.feature.createDefaultEditingStyles=function(){var a={},b=[255,255,255,1],c=[0,153,255,1];a[ol.geom.GeometryType.POLYGON]=[new ol.style.Style({fill:new ol.style.Fill({color:[255,255,255,0.5]})})];a[ol.geom.GeometryType.MULTI_POLYGON]=a[ol.geom.GeometryType.POLYGON];a[ol.geom.GeometryType.LINE_STRING]=[new ol.style.Style({stroke:new ol.style.Stroke({color:b,width:5})}),new ol.style.Style({stroke:new ol.style.Stroke({color:c,width:3})})];a[ol.geom.GeometryType.MULTI_LINE_STRING]=a[ol.geom.GeometryType.LINE_STRING]; a[ol.geom.GeometryType.POINT]=[new ol.style.Style({image:new ol.style.Circle({radius:6,fill:new ol.style.Fill({color:c}),stroke:new ol.style.Stroke({color:b,width:1.5})}),zIndex:Infinity})];a[ol.geom.GeometryType.MULTI_POINT]=a[ol.geom.GeometryType.POINT];a[ol.geom.GeometryType.GEOMETRY_COLLECTION]=a[ol.geom.GeometryType.POLYGON].concat(a[ol.geom.GeometryType.POINT]);return a};ol.FeatureOverlay=function(a){a=goog.isDef(a)?a:{};this.style_=this.postComposeListenerKey_=this.map_=this.featureChangeListenerKeys_=this.featuresListenerKeys_=this.features_=null;this.styleFunction_=goog.isDef(a.style)?ol.feature.createStyleFunction(a.style):void 0;goog.isDef(a.features)?goog.isArray(a.features)?this.setFeatures(new ol.Collection(goog.array.clone(a.features))):this.setFeatures(a.features):this.setFeatures(new ol.Collection);goog.isDef(a.map)&&this.setMap(a.map)}; ol.FeatureOverlay.prototype.addFeature=function(a){this.features_.push(a)};ol.FeatureOverlay.prototype.getFeatures=function(){return this.features_};ol.FeatureOverlay.prototype.handleFeatureChange_=function(){this.render_()};ol.FeatureOverlay.prototype.handleFeaturesAdd_=function(a){a=a.element;this.featureChangeListenerKeys_[goog.getUid(a).toString()]=goog.events.listen(a,goog.events.EventType.CHANGE,this.handleFeatureChange_,!1,this);this.render_()}; ol.FeatureOverlay.prototype.handleFeaturesRemove_=function(a){a=goog.getUid(a.element).toString();goog.events.unlistenByKey(this.featureChangeListenerKeys_[a]);delete this.featureChangeListenerKeys_[a];this.render_()}; ol.FeatureOverlay.prototype.handleMapPostCompose_=function(a){if(!goog.isNull(this.features_)){var b=this.styleFunction_;goog.isDef(b)||(b=ol.feature.defaultStyleFunction);var c=a.frameState.view2DState.resolution,d=a.vectorContext,e,f,g;this.features_.forEach(function(a){g=b(a,c);if(goog.isDefAndNotNull(g))for(f=g.length,e=0;e=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;bb)return!1;!(a instanceof goog.structs.Set)&&5=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.events.MouseWheelHandler=function(a,b){goog.events.EventTarget.call(this);this.element_=a;var c=goog.dom.isElement(this.element_)?this.element_:this.element_?this.element_.body:null;this.isRtl_=!!c&&goog.style.isRightToLeft(c);this.listenKey_=goog.events.listen(this.element_,goog.userAgent.GECKO?"DOMMouseScroll":"mousewheel",this,b)};goog.inherits(goog.events.MouseWheelHandler,goog.events.EventTarget);goog.events.MouseWheelHandler.EventType={MOUSEWHEEL:"mousewheel"}; goog.events.MouseWheelHandler.prototype.setMaxDeltaX=function(a){this.maxDeltaX_=a};goog.events.MouseWheelHandler.prototype.setMaxDeltaY=function(a){this.maxDeltaY_=a}; goog.events.MouseWheelHandler.prototype.handleEvent=function(a){var b=0,c=0,d=0;a=a.getBrowserEvent();if("mousewheel"==a.type){c=1;if(goog.userAgent.IE||goog.userAgent.WEBKIT&&(goog.userAgent.WINDOWS||goog.userAgent.isVersionOrHigher("532.0")))c=40;d=goog.events.MouseWheelHandler.smartScale_(-a.wheelDelta,c);goog.isDef(a.wheelDeltaX)?(b=goog.events.MouseWheelHandler.smartScale_(-a.wheelDeltaX,c),c=goog.events.MouseWheelHandler.smartScale_(-a.wheelDeltaY,c)):c=d}else d=a.detail,100d&&(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.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.getTileCoord=function(){return this.tileCoord};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;)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_};ol.interaction.DoubleClickZoom=function(a){a=goog.isDef(a)?a:{};this.delta_=goog.isDef(a.delta)?a.delta:1;ol.interaction.Interaction.call(this);this.duration_=goog.isDef(a.duration)?a.duration:250};goog.inherits(ol.interaction.DoubleClickZoom,ol.interaction.Interaction); ol.interaction.DoubleClickZoom.prototype.handleMapBrowserEvent=function(a){var b=!1,c=a.browserEvent;if(a.type==ol.MapBrowserEvent.EventType.DBLCLICK){var b=a.map,d=a.coordinate,c=c.shiftKey?-this.delta_:this.delta_,e=b.getView().getView2D();ol.interaction.Interaction.zoomByDelta(b,e,c,d,this.duration_);a.preventDefault();b=!0}return!b};ol.interaction.DragPan=function(a){ol.interaction.Pointer.call(this);this.kinetic_=(goog.isDef(a)?a:{}).kinetic;this.lastCentroid=this.kineticPreRenderFn_=null;this.condition_=goog.isDef(a.condition)?a.condition:ol.events.condition.noModifierKeys;this.noKinetic_=!1};goog.inherits(ol.interaction.DragPan,ol.interaction.Pointer); ol.interaction.DragPan.prototype.handlePointerDrag=function(a){var b=ol.interaction.Pointer.centroid(this.targetPointers);if(!goog.isNull(this.lastCentroid)){this.kinetic_&&this.kinetic_.update(b[0],b[1]);var c=this.lastCentroid[0]-b[0],d=b[1]-this.lastCentroid[1];a=a.map;var e=a.getView().getView2D(),f=e.getView2DState(),c=[c,d];ol.coordinate.scale(c,f.resolution);ol.coordinate.rotate(c,f.rotation);ol.coordinate.add(c,f.center);c=e.constrainCenter(c);a.render();e.setCenter(c)}this.lastCentroid=b}; ol.interaction.DragPan.prototype.handlePointerUp=function(a){a=a.map;var b=a.getView().getView2D();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var c=this.kinetic_.getDistance(),d=this.kinetic_.getAngle(),e=b.getCenter();this.kineticPreRenderFn_=this.kinetic_.pan(e);a.beforeRender(this.kineticPreRenderFn_);e=a.getPixelFromCoordinate(e);c=a.getCoordinateFromPixel([e[0]-c*Math.cos(d),e[1]-c*Math.sin(d)]);c=b.constrainCenter(c);b.setCenter(c)}b.setHint(ol.ViewHint.INTERACTING, -1);a.render();return!1}this.lastCentroid=null;return!0}; ol.interaction.DragPan.prototype.handlePointerDown=function(a){if(0this.threshold_&&(this.rotating_=!0));this.lastAngle_=c;a=a.map;c=goog.style.getClientPosition(a.getViewport());d=ol.interaction.Pointer.centroid(this.targetPointers);d[0]-=c.x;d[1]-=c.y;this.anchor_=a.getCoordinateFromPixel(d); this.rotating_&&(c=a.getView().getView2D(),d=c.getView2DState(),a.render(),ol.interaction.Interaction.rotateWithoutConstraints(a,c,d.rotation+b,this.anchor_))};ol.interaction.PinchRotate.prototype.handlePointerUp=function(a){if(2>this.targetPointers.length){a=a.map;var b=a.getView();b.setHint(ol.ViewHint.INTERACTING,-1);if(this.rotating_){var b=b.getView2D(),c=b.getView2DState();ol.interaction.Interaction.rotate(a,b,c.rotation,this.anchor_,ol.ROTATE_ANIMATION_DURATION)}return!1}return!0}; ol.interaction.PinchRotate.prototype.handlePointerDown=function(a){return 2<=this.targetPointers.length?(a=a.map,this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||a.getView().setHint(ol.ViewHint.INTERACTING,1),a.render(),!0):!1};ol.interaction.PinchZoom=function(a){a=goog.isDef(a)?a:{};ol.interaction.Pointer.call(this);this.anchor_=null;this.duration_=goog.isDef(a.duration)?a.duration:400;this.lastDistance_=void 0;this.lastScaleDelta_=1};goog.inherits(ol.interaction.PinchZoom,ol.interaction.Pointer); ol.interaction.PinchZoom.prototype.handlePointerDrag=function(a){var b=1,c=this.targetPointers[0],d=this.targetPointers[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.Pointer.centroid(this.targetPointers);f[0]-=d.x;f[1]-=d.y;this.anchor_=a.getCoordinateFromPixel(f); a.render();ol.interaction.Interaction.zoomWithoutConstraints(a,e,c.resolution*b,this.anchor_)};ol.interaction.PinchZoom.prototype.handlePointerUp=function(a){if(2>this.targetPointers.length){a=a.map;var b=a.getView();b.setHint(ol.ViewHint.INTERACTING,-1);var b=b.getView2D(),c=b.getView2DState();ol.interaction.Interaction.zoom(a,b,c.resolution,this.anchor_,this.duration_,this.lastScaleDelta_-1);return!1}return!0}; ol.interaction.PinchZoom.prototype.handlePointerDown=function(a){return 2<=this.targetPointers.length?(a=a.map,this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||a.getView().setHint(ol.ViewHint.INTERACTING,1),a.render(),!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,duration:a.zoomDuration}));(goog.isDef(a.dragPan)?a.dragPan:1)&&b.push(new ol.interaction.DragPan({kinetic:c}));(goog.isDef(a.pinchRotate)?a.pinchRotate:1)&&b.push(new ol.interaction.PinchRotate); (goog.isDef(a.pinchZoom)?a.pinchZoom:1)&&b.push(new ol.interaction.PinchZoom({duration:a.zoomDuration}));if(goog.isDef(a.keyboard)?a.keyboard:1)b.push(new ol.interaction.KeyboardPan),b.push(new ol.interaction.KeyboardZoom({delta:a.zoomDelta,duration:a.zoomDuration}));(goog.isDef(a.mouseWheelZoom)?a.mouseWheelZoom:1)&&b.push(new ol.interaction.MouseWheelZoom({duration:a.zoomDuration}));(goog.isDef(a.shiftDragZoom)?a.shiftDragZoom:1)&&b.push(new ol.interaction.DragZoom);return b};ol.source={};ol.source.State={LOADING:0,READY:1,ERROR:2};ol.source.Source=function(a){ol.Observable.call(this);this.projection_=ol.proj.get(a.projection);this.extent_=goog.isDef(a.extent)?a.extent:goog.isDef(a.projection)?this.projection_.getExtent():null;this.attributions_=goog.isDef(a.attributions)?a.attributions:null;this.logo_=a.logo;this.state_=goog.isDef(a.state)?a.state:ol.source.State.READY};goog.inherits(ol.source.Source,ol.Observable);ol.source.Source.prototype.forEachFeatureAtPixel=goog.nullFunction; ol.source.Source.prototype.getAttributions=function(){return this.attributions_};ol.source.Source.prototype.getExtent=function(){return this.extent_};ol.source.Source.prototype.getLogo=function(){return this.logo_};ol.source.Source.prototype.getProjection=function(){return this.projection_};ol.source.Source.prototype.getState=function(){return this.state_};ol.source.Source.prototype.setAttributions=function(a){this.attributions_=a};ol.source.Source.prototype.setExtent=function(a){this.extent_=a}; ol.source.Source.prototype.setLogo=function(a){this.logo_=a};ol.source.Source.prototype.setState=function(a){this.state_=a;this.dispatchChangeEvent()};ol.source.Source.prototype.setProjection=function(a){this.projection_=a};ol.layer={};ol.layer.LayerProperty={BRIGHTNESS:"brightness",CONTRAST:"contrast",HUE:"hue",OPACITY:"opacity",SATURATION:"saturation",VISIBLE:"visible",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution"}; ol.layer.Base=function(a){ol.Object.call(this);a=goog.object.clone(a);a.brightness=goog.isDef(a.brightness)?a.brightness:0;a.contrast=goog.isDef(a.contrast)?a.contrast:1;a.hue=goog.isDef(a.hue)?a.hue:0;a.opacity=goog.isDef(a.opacity)?a.opacity:1;a.saturation=goog.isDef(a.saturation)?a.saturation:1;a.visible=goog.isDef(a.visible)?a.visible:!0;a.maxResolution=goog.isDef(a.maxResolution)?a.maxResolution:Infinity;a.minResolution=goog.isDef(a.minResolution)?a.minResolution:0;this.setValues(a)}; goog.inherits(ol.layer.Base,ol.Object);ol.layer.Base.prototype.getBrightness=function(){return this.get(ol.layer.LayerProperty.BRIGHTNESS)};goog.exportProperty(ol.layer.Base.prototype,"getBrightness",ol.layer.Base.prototype.getBrightness);ol.layer.Base.prototype.getContrast=function(){return this.get(ol.layer.LayerProperty.CONTRAST)};goog.exportProperty(ol.layer.Base.prototype,"getContrast",ol.layer.Base.prototype.getContrast);ol.layer.Base.prototype.getHue=function(){return this.get(ol.layer.LayerProperty.HUE)}; goog.exportProperty(ol.layer.Base.prototype,"getHue",ol.layer.Base.prototype.getHue); ol.layer.Base.prototype.getLayerState=function(){var a=this.getBrightness(),b=this.getContrast(),c=this.getHue(),d=this.getOpacity(),e=this.getSaturation(),f=this.getSourceState(),g=this.getVisible(),h=this.getMaxResolution(),k=this.getMinResolution();return{layer:this,brightness:goog.isDef(a)?goog.math.clamp(a,-1,1):0,contrast:goog.isDef(b)?Math.max(b,0):1,hue:goog.isDef(c)?c:0,opacity:goog.isDef(d)?goog.math.clamp(d,0,1):1,saturation:goog.isDef(e)?Math.max(e,0):1,sourceState:f,visible:goog.isDef(g)? !!g:!0,maxResolution:goog.isDef(h)?h:Infinity,minResolution:goog.isDef(k)?Math.max(k,0):0}};ol.layer.Base.prototype.getMaxResolution=function(){return this.get(ol.layer.LayerProperty.MAX_RESOLUTION)};goog.exportProperty(ol.layer.Base.prototype,"getMaxResolution",ol.layer.Base.prototype.getMaxResolution);ol.layer.Base.prototype.getMinResolution=function(){return this.get(ol.layer.LayerProperty.MIN_RESOLUTION)};goog.exportProperty(ol.layer.Base.prototype,"getMinResolution",ol.layer.Base.prototype.getMinResolution); ol.layer.Base.prototype.getOpacity=function(){return this.get(ol.layer.LayerProperty.OPACITY)};goog.exportProperty(ol.layer.Base.prototype,"getOpacity",ol.layer.Base.prototype.getOpacity);ol.layer.Base.prototype.getSaturation=function(){return this.get(ol.layer.LayerProperty.SATURATION)};goog.exportProperty(ol.layer.Base.prototype,"getSaturation",ol.layer.Base.prototype.getSaturation);ol.layer.Base.prototype.getVisible=function(){return this.get(ol.layer.LayerProperty.VISIBLE)}; goog.exportProperty(ol.layer.Base.prototype,"getVisible",ol.layer.Base.prototype.getVisible);ol.layer.Base.prototype.setBrightness=function(a){this.set(ol.layer.LayerProperty.BRIGHTNESS,a)};goog.exportProperty(ol.layer.Base.prototype,"setBrightness",ol.layer.Base.prototype.setBrightness);ol.layer.Base.prototype.setContrast=function(a){this.set(ol.layer.LayerProperty.CONTRAST,a)};goog.exportProperty(ol.layer.Base.prototype,"setContrast",ol.layer.Base.prototype.setContrast); ol.layer.Base.prototype.setHue=function(a){this.set(ol.layer.LayerProperty.HUE,a)};goog.exportProperty(ol.layer.Base.prototype,"setHue",ol.layer.Base.prototype.setHue);ol.layer.Base.prototype.setMaxResolution=function(a){this.set(ol.layer.LayerProperty.MAX_RESOLUTION,a)};goog.exportProperty(ol.layer.Base.prototype,"setMaxResolution",ol.layer.Base.prototype.setMaxResolution);ol.layer.Base.prototype.setMinResolution=function(a){this.set(ol.layer.LayerProperty.MIN_RESOLUTION,a)}; goog.exportProperty(ol.layer.Base.prototype,"setMinResolution",ol.layer.Base.prototype.setMinResolution);ol.layer.Base.prototype.setOpacity=function(a){this.set(ol.layer.LayerProperty.OPACITY,a)};goog.exportProperty(ol.layer.Base.prototype,"setOpacity",ol.layer.Base.prototype.setOpacity);ol.layer.Base.prototype.setSaturation=function(a){this.set(ol.layer.LayerProperty.SATURATION,a)};goog.exportProperty(ol.layer.Base.prototype,"setSaturation",ol.layer.Base.prototype.setSaturation); ol.layer.Base.prototype.setVisible=function(a){this.set(ol.layer.LayerProperty.VISIBLE,a)};goog.exportProperty(ol.layer.Base.prototype,"setVisible",ol.layer.Base.prototype.setVisible);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.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=p;--v)for(q=c.getTileRangeForExtentAndZ(f,v),t=c.getResolution(v),s=q.minX;s<=q.maxX;++s)for(u=q.minY;u<=q.maxY;++u)g-v<=h?(r=b.getTile(v,s,u,d,e),r.getState()==ol.TileState.IDLE&&(n[r.tileCoord.toString()]=!0,a.isKeyQueued(r.getKey())||a.enqueue([r, m,c.getTileCoordCenter(r.tileCoord),t])),goog.isDef(k)&&k.call(l,r)):b.useTile(v,s,u)};ol.style.IconAnchorOrigin={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"};ol.style.IconAnchorUnits={FRACTION:"fraction",PIXELS:"pixels"}; ol.style.Icon=function(a){a=goog.isDef(a)?a:{};this.anchor_=goog.isDef(a.anchor)?a.anchor:[0.5,0.5];this.anchorOrigin_=goog.isDef(a.anchorOrigin)?a.anchorOrigin:ol.style.IconAnchorOrigin.TOP_LEFT;this.anchorXUnits_=goog.isDef(a.anchorXUnits)?a.anchorXUnits:ol.style.IconAnchorUnits.FRACTION;this.anchorYUnits_=goog.isDef(a.anchorYUnits)?a.anchorYUnits:ol.style.IconAnchorUnits.FRACTION;var b=goog.isDef(a.crossOrigin)?a.crossOrigin:null;this.iconImage_=ol.style.IconImage_.get(a.src,b);this.size_=goog.isDef(a.size)? a.size:null;var b=goog.isDef(a.opacity)?a.opacity:1,c=goog.isDef(a.rotateWithView)?a.rotateWithView:!1,d=goog.isDef(a.rotation)?a.rotation:0;a=goog.isDef(a.scale)?a.scale:1;ol.style.Image.call(this,{opacity:b,rotation:d,scale:a,snapToPixel:void 0,rotateWithView:c})};goog.inherits(ol.style.Icon,ol.style.Image); ol.style.Icon.prototype.getAnchor=function(){var a=this.anchor_,b=this.getSize();if(this.anchorXUnits_==ol.style.IconAnchorUnits.FRACTION||this.anchorYUnits_==ol.style.IconAnchorUnits.FRACTION){if(goog.isNull(b))return null;a=this.anchor_.slice();this.anchorXUnits_==ol.style.IconAnchorUnits.FRACTION&&(a[0]*=b[0]);this.anchorYUnits_==ol.style.IconAnchorUnits.FRACTION&&(a[1]*=b[1])}if(this.anchorOrigin_!=ol.style.IconAnchorOrigin.TOP_LEFT){if(goog.isNull(b))return null;a===this.anchor_&&(a=this.anchor_.slice()); if(this.anchorOrigin_==ol.style.IconAnchorOrigin.TOP_RIGHT||this.anchorOrigin_==ol.style.IconAnchorOrigin.BOTTOM_RIGHT)a[0]=-a[0]+b[0];if(this.anchorOrigin_==ol.style.IconAnchorOrigin.BOTTOM_LEFT||this.anchorOrigin_==ol.style.IconAnchorOrigin.BOTTOM_RIGHT)a[1]=-a[1]+b[1]}return a};ol.style.Icon.prototype.getImage=function(a){return this.iconImage_.getImage(a)};ol.style.Icon.prototype.getImageState=function(){return this.iconImage_.getImageState()};ol.style.Icon.prototype.getHitDetectionImage=function(a){return this.iconImage_.getHitDetectionImage(a)}; ol.style.Icon.prototype.getSrc=function(){return this.iconImage_.getSrc()};ol.style.Icon.prototype.getSize=function(){return goog.isNull(this.size_)?this.iconImage_.getSize():this.size_};ol.style.Icon.prototype.listenImageChange=function(a,b){return goog.events.listen(this.iconImage_,goog.events.EventType.CHANGE,a,!1,b)};ol.style.Icon.prototype.load=function(){this.iconImage_.load()}; ol.style.Icon.prototype.unlistenImageChange=function(a,b){goog.events.unlisten(this.iconImage_,goog.events.EventType.CHANGE,a,!1,b)};ol.style.IconImage_=function(a,b){goog.events.EventTarget.call(this);this.hitDetectionImage_=null;this.image_=new Image;goog.isNull(b)||(this.image_.crossOrigin=b);this.imageListenerKeys_=null;this.imageState_=ol.style.ImageState.IDLE;this.size_=null;this.src_=a;this.tainting_=!1};goog.inherits(ol.style.IconImage_,goog.events.EventTarget); ol.style.IconImage_.get=function(a,b){var c=ol.style.IconImageCache.getInstance(),d=c.get(a,b);goog.isNull(d)&&(d=new ol.style.IconImage_(a,b),c.set(a,b,d));return d};ol.style.IconImage_.prototype.determineTainting_=function(){var a=ol.dom.createCanvasContext2D(1,1);a.drawImage(this.image_,0,0);try{a.getImageData(0,0,1,1)}catch(b){this.tainting_=!0}};ol.style.IconImage_.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(goog.events.EventType.CHANGE)}; ol.style.IconImage_.prototype.handleImageError_=function(){this.imageState_=ol.style.ImageState.ERROR;this.unlistenImage_();this.dispatchChangeEvent_()};ol.style.IconImage_.prototype.handleImageLoad_=function(){this.imageState_=ol.style.ImageState.LOADED;this.size_=[this.image_.width,this.image_.height];this.unlistenImage_();this.determineTainting_();this.dispatchChangeEvent_()};ol.style.IconImage_.prototype.getImage=function(a){return this.image_};ol.style.IconImage_.prototype.getImageState=function(){return this.imageState_}; ol.style.IconImage_.prototype.getHitDetectionImage=function(a){if(goog.isNull(this.hitDetectionImage_))if(this.tainting_){a=this.size_[0];var b=this.size_[1],c=ol.dom.createCanvasContext2D(a,b);c.fillRect(0,0,a,b);this.hitDetectionImage_=c.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_};ol.style.IconImage_.prototype.getSize=function(){return this.size_};ol.style.IconImage_.prototype.getSrc=function(){return this.src_}; ol.style.IconImage_.prototype.load=function(){if(this.imageState_==ol.style.ImageState.IDLE){this.imageState_=ol.style.ImageState.LOADING;this.imageListenerKeys_=[goog.events.listenOnce(this.image_,goog.events.EventType.ERROR,this.handleImageError_,!1,this),goog.events.listenOnce(this.image_,goog.events.EventType.LOAD,this.handleImageLoad_,!1,this)];try{this.image_.src=this.src_}catch(a){this.handleImageError_()}}}; ol.style.IconImage_.prototype.unlistenImage_=function(){goog.array.forEach(this.imageListenerKeys_,goog.events.unlistenByKey);this.imageListenerKeys_=null};ol.style.IconImageCache=function(){this.cache_={};this.cacheSize_=0;this.maxCacheSize_=32};goog.addSingletonGetter(ol.style.IconImageCache);ol.style.IconImageCache.getKey=function(a,b){return b+":"+a};ol.style.IconImageCache.prototype.clear=function(){this.cache_={};this.cacheSize_=0}; ol.style.IconImageCache.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){var a=0,b,c;for(b in this.cache_)c=this.cache_[b],0!==(a++&3)||goog.events.hasListener(c)||(delete this.cache_[b],--this.cacheSize_)}};ol.style.IconImageCache.prototype.get=function(a,b){var c=ol.style.IconImageCache.getKey(a,b);return c in this.cache_?this.cache_[c]:null};ol.style.IconImageCache.prototype.set=function(a,b,c){a=ol.style.IconImageCache.getKey(a,b);this.cache_[a]=c;++this.cacheSize_};ol.vec={};ol.vec.Mat4={};ol.vec.Mat4.makeTransform2D=function(a,b,c,d,e,f,g,h){goog.vec.Mat4.makeIdentity(a);0===b&&0===c||goog.vec.Mat4.translate(a,b,c,0);1==d&&1==e||goog.vec.Mat4.scale(a,d,e,1);0!==f&&goog.vec.Mat4.rotateZ(a,f);0===g&&0===h||goog.vec.Mat4.translate(a,g,h,0);return a}; ol.vec.Mat4.equals2D=function(a,b){return goog.vec.Mat4.getElement(a,0,0)==goog.vec.Mat4.getElement(b,0,0)&&goog.vec.Mat4.getElement(a,1,0)==goog.vec.Mat4.getElement(b,1,0)&&goog.vec.Mat4.getElement(a,0,1)==goog.vec.Mat4.getElement(b,0,1)&&goog.vec.Mat4.getElement(a,1,1)==goog.vec.Mat4.getElement(b,1,1)&&goog.vec.Mat4.getElement(a,0,3)==goog.vec.Mat4.getElement(b,0,3)&&goog.vec.Mat4.getElement(a,1,3)==goog.vec.Mat4.getElement(b,1,3)}; ol.vec.Mat4.multVec2=function(a,b,c){var d=goog.vec.Mat4.getElement(a,0,0),e=goog.vec.Mat4.getElement(a,1,0),f=goog.vec.Mat4.getElement(a,0,1),g=goog.vec.Mat4.getElement(a,1,1),h=goog.vec.Mat4.getElement(a,0,3);a=goog.vec.Mat4.getElement(a,1,3);var k=b[0];b=b[1];c[0]=d*k+f*b+h;c[1]=e*k+g*b+a;return c};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;ol.vec.Mat4.makeTransform2D(c,a.size[0]/2,a.size[1]/2,1/b.resolution,-1/b.resolution,-b.rotation,-b.center[0],-b.center[1]);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.forEachFeatureAtPixel=function(a,b,c,d,e,f){var g=this.map_.getLayerGroup().getLayerStatesArray(),h;for(h=g.length-1;0<=h;--h){var k=g[h],l=k.layer;if(k.visible&&e.call(f,l)&&(k=this.getLayerRenderer(l).forEachFeatureAtPixel(a,b,c,d)))return k}};ol.renderer.Map.prototype.getLayerRenderer=function(a){var b=goog.getUid(a).toString();if(b in this.layerRenderers_)return this.layerRenderers_[b];a=this.createLayerRenderer(a);return this.layerRenderers_[b]=a}; ol.renderer.Map.prototype.getLayerRendererByKey=function(a){return this.layerRenderers_[a]};ol.renderer.Map.prototype.getLayerRenderers=function(){return this.layerRenderers_};ol.renderer.Map.prototype.getMap=function(){return this.map_};ol.renderer.Map.prototype.removeLayerRendererByKey_=function(a){var b=this.layerRenderers_[a];delete this.layerRenderers_[a];return b};ol.renderer.Map.prototype.renderFrame=goog.nullFunction; ol.renderer.Map.prototype.removeUnusedLayerRenderers_=function(a,b){for(var c in this.layerRenderers_)!goog.isNull(b)&&c in b.layerStates||goog.dispose(this.removeLayerRendererByKey_(c))};ol.renderer.Map.prototype.scheduleExpireIconCache=function(a){a.postRenderFunctions.push(function(a,c){ol.style.IconImageCache.getInstance().expire()})}; ol.renderer.Map.prototype.scheduleRemoveUnusedLayerRenderers=function(a){for(var b in this.layerRenderers_)if(!(b in a.layerStates)){a.postRenderFunctions.push(goog.bind(this.removeUnusedLayerRenderers_,this));break}};ol.layer.Image=function(a){ol.layer.Layer.call(this,a)};goog.inherits(ol.layer.Image,ol.layer.Layer);ol.layer.TileProperty={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};ol.layer.Tile=function(a){ol.layer.Layer.call(this,a)};goog.inherits(ol.layer.Tile,ol.layer.Layer);ol.layer.Tile.prototype.getPreload=function(){return this.get(ol.layer.TileProperty.PRELOAD)};goog.exportProperty(ol.layer.Tile.prototype,"getPreload",ol.layer.Tile.prototype.getPreload);ol.layer.Tile.prototype.setPreload=function(a){this.set(ol.layer.TileProperty.PRELOAD,a)}; goog.exportProperty(ol.layer.Tile.prototype,"setPreload",ol.layer.Tile.prototype.setPreload);ol.layer.Tile.prototype.getUseInterimTilesOnError=function(){return this.get(ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR)};goog.exportProperty(ol.layer.Tile.prototype,"getUseInterimTilesOnError",ol.layer.Tile.prototype.getUseInterimTilesOnError);ol.layer.Tile.prototype.setUseInterimTilesOnError=function(a){this.set(ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR,a)}; goog.exportProperty(ol.layer.Tile.prototype,"setUseInterimTilesOnError",ol.layer.Tile.prototype.setUseInterimTilesOnError);ol.layer.VectorProperty={RENDER_ORDER:"renderOrder"};ol.layer.Vector=function(a){a=goog.isDef(a)?a:{};var b=goog.object.clone(a);delete b.style;ol.layer.Layer.call(this,b);this.style_=null;this.styleFunction_=void 0;goog.isDef(a.style)&&this.setStyle(a.style)};goog.inherits(ol.layer.Vector,ol.layer.Layer);ol.layer.Vector.prototype.getRenderOrder=function(){return this.get(ol.layer.VectorProperty.RENDER_ORDER)};ol.layer.Vector.prototype.getStyle=function(){return this.style_}; ol.layer.Vector.prototype.getStyleFunction=function(){return this.styleFunction_};ol.layer.Vector.prototype.setRenderOrder=function(a){this.set(ol.layer.VectorProperty.RENDER_ORDER,a)};ol.layer.Vector.prototype.setStyle=function(a){this.style_=a;this.styleFunction_=ol.feature.createStyleFunction(a);this.dispatchChangeEvent()};ol.render.canvas.Immediate=function(a,b,c,d,e){this.callbacksByZIndex_={};this.context_=a;this.pixelRatio_=b;this.extent_=c;this.transform_=d;this.viewRotation_=e;this.image_=this.strokeState_=this.fillState_=this.contextTextState_=this.contextStrokeState_=this.contextFillState_=null;this.imageOpacity_=this.imageHeight_=this.imageAnchorY_=this.imageAnchorX_=0;this.imageRotateWithView_=!1;this.imageScale_=this.imageRotation_=0;this.imageSnapToPixel_=!1;this.imageWidth_=0;this.text_="";this.textScale_= this.textRotation_=this.textOffsetY_=this.textOffsetX_=0;this.textState_=this.textStrokeState_=this.textFillState_=null;this.pixelCoordinates_=[];this.tmpLocalTransform_=goog.vec.Mat4.createNumber()}; ol.render.canvas.Immediate.prototype.drawImages_=function(a,b,c,d){if(!goog.isNull(this.image_)){a=ol.geom.flat.transform.transform2D(a,2,this.transform_,this.pixelCoordinates_);b=this.context_;c=this.tmpLocalTransform_;d=b.globalAlpha;1!=this.imageOpacity_&&(b.globalAlpha=d*this.imageOpacity_);var e=this.imageRotation_;this.imageRotateWithView_&&(e+=this.viewRotation_);var f,g;f=0;for(g=a.length;fs||this.canvasSize_[1]>u)?(v.width=s,v.height=u,this.canvasSize_=[s,u],this.canvasTooBig_=!ol.renderer.canvas.Layer.testCanvasSize(this.canvasSize_), this.renderedCanvasTileRange_=null):(s=this.canvasSize_[0],u=this.canvasSize_[1],l==this.renderedCanvasZ_&&this.renderedCanvasTileRange_.containsTileRange(t)||(this.renderedCanvasTileRange_=null)));var w,z;goog.isNull(this.renderedCanvasTileRange_)?(s/=m,u/=m,w=t.minX-Math.floor((s-t.getWidth())/2),z=t.minY-Math.floor((u-t.getHeight())/2),this.renderedCanvasZ_=l,this.renderedCanvasTileRange_=new ol.TileRange(w,w+s-1,z,z+u-1),this.renderedTiles_=Array(s*u),u=this.renderedCanvasTileRange_):(u=this.renderedCanvasTileRange_, s=u.getWidth());v={};v[l]={};var x=[],B=this.createGetTileIfLoadedFunction(function(a){return!goog.isNull(a)&&a.getState()==ol.TileState.LOADED},g,c,e),C=goog.bind(g.findLoadedTiles,g,v,B),B=f.getUseInterimTilesOnError();goog.isDef(B)||(B=!0);var G=ol.extent.createEmpty(),H=new ol.TileRange(0,0,0,0),E,y,D;for(z=t.minX;z<=t.maxX;++z)for(D=t.minY;D<=t.maxY;++D)y=g.getTile(l,z,D,c,e),w=y.getState(),w==ol.TileState.LOADED||w==ol.TileState.EMPTY||w==ol.TileState.ERROR&&!B?v[l][y.tileCoord.toString()]= y:(E=h.forEachTileCoordParentTileRange(y.tileCoord,C,null,H,G),E||(x.push(y),E=h.getTileCoordChildTileRange(y.tileCoord,H,G),goog.isNull(E)||C(l+1,E)));C=0;for(E=x.length;Ca||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&ac?(e=(e-g[-c-2])/(g[-c-1]-g[-c-2]),b+=(-c-2)*d,g=goog.math.lerp(a[b],a[b+d],e),h=goog.math.lerp(a[b+1],a[b+d+1],e)):(g=a[b+c*d],h=a[b+c*d+1])}return goog.isDefAndNotNull(f)? (f.push(g,h),f):[g,h]};ol.geom.flat.lineStringCoordinateAtM=function(a,b,c,d,e,f){if(c==b)return null;if(e>1,ea||this.ends_.length<=a)return null;var b=new ol.geom.LineString(null);b.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===a?0:this.ends_[a-1],this.ends_[a]));return b}; ol.geom.MultiLineString.prototype.getLineStrings=function(){var a=this.flatCoordinates,b=this.ends_,c=this.layout,d=[],e=0,f,g;f=0;for(g=b.length;fa||b<=a)return null;b=new ol.geom.Point(null);b.setFlatCoordinates(this.layout,this.flatCoordinates.slice(a*this.stride,(a+1)*this.stride));return b}; ol.geom.MultiPoint.prototype.getPoints=function(){var a=this.flatCoordinates,b=this.layout,c=this.stride,d=[],e,f;e=0;for(f=a.length;ea||this.endss_.length<=a)return null;var b;0===a?b=0:(b=this.endss_[a-1],b=b[b.length-1]);a=this.endss_[a].slice();var c=a[a.length-1];if(0!==b){var d,e;d=0;for(e=a.length;d=d;--f)ol.extent.extend(h,c[f].extent),k+=ol.extent.getMargin(h);return k};ol.structs.RBush.prototype.assertValid=function(){this.root_.assertValid(this.maxEntries_)}; ol.structs.RBush.prototype.chooseSplitAxis_=function(a){var b=this.allDistMargin_(a,ol.structs.RBushNode.compareMinX),c=this.allDistMargin_(a,ol.structs.RBushNode.compareMinY);bthis.maxEntries_)this.split_(d,b);else break;for(;0<=b;--b)ol.extent.extend(d[b].extent,a);return c};ol.structs.RBush.prototype.isEmpty=function(){return 0===this.root_.children.length}; ol.structs.RBush.prototype.remove=function(a){if(goog.DEBUG&&this.readers_)throw Error("cannot remove value while reading");var b=this.getKey_(a),c=this.valueExtent_[b];delete this.valueExtent_[b];return this.remove_(c,a)};ol.structs.RBush.prototype.remove_=function(a,b){var c=this.root_,d=[c];(c=c.remove(a,b,d))&&this.condense_(d);return c}; ol.structs.RBush.prototype.split_=function(a,b){var c=a[b];this.chooseSplitAxis_(c);var d=this.chooseSplitIndex_(c),d=c.children.splice(d),d=new ol.structs.RBushNode(ol.extent.createEmpty(),c.height,d,null);c.updateExtent();d.updateExtent();b?a[b-1].children.push(d):this.splitRoot_(c,d)};ol.structs.RBush.prototype.splitRoot_=function(a,b){var c=a.height+1,d=ol.extent.extend(a.extent.slice(),b.extent);this.root_=new ol.structs.RBushNode(d,c,[a,b],null)}; ol.structs.RBush.prototype.update=function(a,b){if(goog.DEBUG&&this.readers_)throw Error("cannot update value while reading");var c=this.getKey_(b),d=this.valueExtent_[c];ol.extent.equals(d,a)||(this.remove_(d,b),this.insert_(a,b,this.root_.height-1),this.valueExtent_[c]=ol.extent.clone(a,d))};ol.source.VectorEventType={ADDFEATURE:"addfeature",REMOVEFEATURE:"removefeature"};ol.source.Vector=function(a){a=goog.isDef(a)?a:{};ol.source.Source.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state});this.rBush_=new ol.structs.RBush;this.nullGeometryFeatures_={};this.featureChangeKeys_={};goog.isDef(a.features)&&this.addFeaturesInternal(a.features)};goog.inherits(ol.source.Vector,ol.source.Source); ol.source.Vector.prototype.addFeature=function(a){this.addFeatureInternal(a);this.dispatchChangeEvent()}; ol.source.Vector.prototype.addFeatureInternal=function(a){var b=goog.getUid(a).toString();this.featureChangeKeys_[b]=[goog.events.listen(a,goog.events.EventType.CHANGE,this.handleFeatureChange_,!1,this),goog.events.listen(a,ol.ObjectEventType.PROPERTYCHANGE,this.handleFeatureChange_,!1,this)];b=a.getGeometry();goog.isNull(b)?this.nullGeometryFeatures_[goog.getUid(a).toString()]=a:(b=b.getExtent(),this.rBush_.insert(b,a));this.dispatchEvent(new ol.source.VectorEvent(ol.source.VectorEventType.ADDFEATURE, a))};ol.source.Vector.prototype.addFeatures=function(a){this.addFeaturesInternal(a);this.dispatchChangeEvent()};ol.source.Vector.prototype.addFeaturesInternal=function(a){var b,c;b=0;for(c=a.length;b=h.maxResolution||dx&&goog.dom.insertChildAt(this.target,s.target,0)}else a.viewHints[ol.ViewHint.ANIMATING]||a.viewHints[ol.ViewHint.INTERACTING]||s.removeTilesOutsideExtent(p,q);else goog.dom.removeNode(s.target),delete this.tileLayerZs_[x];b.opacity!=this.renderedOpacity_&&(ol.dom.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,g,l,m);this.manageTilePyramid(a, g,h,c,e,p,l,f.getPreload());this.scheduleExpireCache(a,g);this.updateLogos(a,g)}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.target.style.width="100%";this.target.style.height="100%";ol.LEGACY_IE_SUPPORT&&ol.IS_LEGACY_IE&&(this.translateTarget_=goog.dom.createElement(goog.dom.TagName.DIV),this.translateTarget_.style.position="absolute",this.translateTarget_.style.width="100%",this.translateTarget_.style.height="100%",goog.dom.appendChild(this.target,this.translateTarget_));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,b){var c=a.tileCoord,d=c.toString();if(!(d in this.tiles_)){var e=this.tileGrid_.getTileSize(c.z),f=a.getImage(this),g=f.style;g.maxWidth="none";var h,k;0a&&(-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.getContext=function(){return this.context_}; ol.renderer.webgl.Map.prototype.getGL=function(){return this.gl_};ol.renderer.webgl.Map.prototype.getTileTextureQueue=function(){return this.tileTextureQueue_};ol.renderer.webgl.Map.prototype.handleWebGLContextLost=function(a){a.preventDefault();this.textureCache_.clear();this.textureCacheFrameMarkerCount_=0;goog.object.forEach(this.getLayerRenderers(),function(a,c,d){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);a.disable(goog.webgl.STENCIL_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.getContext(),c=this.getGL();if(c.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 d=[],e=a.layerStatesArray,f=a.view2DState.resolution,g,h,k;g=0;for(h=e.length;g=k.minResolution)&&d.push(k);g=0;for(h=d.length;gol.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.dispatchComposeEvent_(ol.render.EventType.POSTCOMPOSE, a);this.scheduleRemoveUnusedLayerRenderers(a);this.scheduleExpireIconCache(a)};ol.OL3_URL="http://ol3js.org/";ol.OL3_LOGO_URL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszWWMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvYasvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvXH1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1VkbMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLPVcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqTacrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaarldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+HizeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDnBAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSFhYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJREFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxCBrb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7ahgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCnB3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDgq82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC"; ol.RendererHint={CANVAS:"canvas",DOM:"dom",WEBGL:"webgl"};ol.DEFAULT_RENDERER_HINTS=[ol.RendererHint.CANVAS,ol.RendererHint.WEBGL,ol.RendererHint.DOM];ol.MapProperty={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"}; ol.Map=function(a){ol.Object.call(this);var b=ol.Map.createOptionsInternal(a);this.pixelRatio_=goog.isDef(a.pixelRatio)?a.pixelRatio:ol.BrowserFeature.DEVICE_PIXEL_RATIO;this.ol3Logo_=b.ol3Logo;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.layerGroupPropertyListenerKeys_=this.viewPropertyListenerKey_= this.frameState_=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.dom.appendChild(this.viewport_,this.overlayContainer_);this.overlayContainerStopEvent_= goog.dom.createDom(goog.dom.TagName.DIV,"ol-overlaycontainer-stopevent");goog.events.listen(this.overlayContainerStopEvent_,[goog.events.EventType.CLICK,goog.events.EventType.DBLCLICK,goog.events.EventType.MOUSEDOWN,goog.events.EventType.TOUCHSTART,goog.events.EventType.MSPOINTERDOWN,ol.MapBrowserEvent.EventType.POINTERDOWN,goog.events.MouseWheelHandler.EventType.MOUSEWHEEL],goog.events.Event.stopPropagation);goog.dom.appendChild(this.viewport_,this.overlayContainerStopEvent_);a=new ol.MapBrowserEventHandler(this); goog.events.listen(a,goog.object.getValues(ol.MapBrowserEvent.EventType),this.handleMapBrowserEvent,!1,this);this.registerDisposable(a);this.keyboardEventTarget_=b.keyboardEventTarget;this.keyHandler_=new goog.events.KeyHandler;goog.events.listen(this.keyHandler_,goog.events.KeyHandler.EventType.KEY,this.handleBrowserEvent,!1,this);this.registerDisposable(this.keyHandler_);a=new goog.events.MouseWheelHandler(this.viewport_);goog.events.listen(a,goog.events.MouseWheelHandler.EventType.MOUSEWHEEL,this.handleBrowserEvent, !1,this);this.registerDisposable(a);this.controls_=b.controls;this.deviceOptions_=b.deviceOptions;this.interactions_=b.interactions;this.overlays_=b.overlays;this.renderer_=new b.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.tileQueue_= new ol.TileQueue(goog.bind(this.getTilePriority,this),goog.bind(this.handleTileChange_,this));this.skippedFeatureUids_={};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(b.values);this.controls_.forEach(function(a){a.setMap(this)},this);goog.events.listen(this.controls_,ol.CollectionEventType.ADD,function(a){a.element.setMap(this)},!1,this);goog.events.listen(this.controls_,ol.CollectionEventType.REMOVE,function(a){a.element.setMap(null)},!1,this);this.interactions_.forEach(function(a){a.setMap(this)},this);goog.events.listen(this.interactions_,ol.CollectionEventType.ADD,function(a){a.element.setMap(this)},!1,this); goog.events.listen(this.interactions_,ol.CollectionEventType.REMOVE,function(a){a.element.setMap(null)},!1,this);this.overlays_.forEach(function(a){a.setMap(this)},this);goog.events.listen(this.overlays_,ol.CollectionEventType.ADD,function(a){a.element.setMap(this)},!1,this);goog.events.listen(this.overlays_,ol.CollectionEventType.REMOVE,function(a){a.element.setMap(null)},!1,this)};goog.inherits(ol.Map,ol.Object);ol.Map.prototype.addControl=function(a){this.getControls().push(a)}; ol.Map.prototype.addInteraction=function(a){this.getInteractions().push(a)};ol.Map.prototype.addLayer=function(a){this.getLayerGroup().getLayers().push(a)};ol.Map.prototype.addOverlay=function(a){this.getOverlays().push(a)};ol.Map.prototype.beforeRender=function(a){this.render();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_);ol.Map.superClass_.disposeInternal.call(this)};ol.Map.prototype.forEachFeatureAtPixel=function(a,b,c,d,e){if(!goog.isNull(this.frameState_))return a=this.getCoordinateFromPixel(a),c=goog.isDef(c)?c:null,d=goog.isDef(d)?d:goog.functions.TRUE,e=goog.isDef(e)?e:null,this.renderer_.forEachFeatureAtPixel(a,this.frameState_,b,c,d,e)};ol.Map.prototype.getEventCoordinate=function(a){return this.getCoordinateFromPixel(this.getEventPixel(a))}; ol.Map.prototype.getEventPixel=function(a){if(goog.isDef(a.changedTouches)){a=a.changedTouches.item(0);var b=goog.style.getClientPosition(this.viewport_);return[a.clientX-b.x,a.clientY-b.y]}a=goog.style.getRelativePosition(a,this.viewport_);return[a.x,a.y]};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.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(){var a=this.getLayerGroup();if(goog.isDef(a))return a.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.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_}; 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.coordinate;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,e=0;if(!goog.isNull(a)){var e=a.viewHints,f=this.deviceOptions_;e[ol.ViewHint.ANIMATING]&&(c=!1===f.loadTilesWhileAnimating?0:8,d=2);e[ol.ViewHint.INTERACTING]&&(c=!1===f.loadTilesWhileInteracting?0:8,d=2);e=goog.object.getCount(a.wantedTiles)}c*=e;d*=e;b.getTilesLoading()=a[0]||0>=a[1])return!1;a=this.getView();return goog.isDef(a)&&a.isDef()?!0:!1};ol.Map.prototype.isRendered=function(){return!goog.isNull(this.frameState_)};ol.Map.prototype.renderSync=function(){this.animationDelay_.fire()}; ol.Map.prototype.render=function(){this.animationDelay_.isActive()||this.animationDelay_.start()};ol.Map.prototype.removeControl=function(a){var b=this.getControls();if(goog.isDef(b.remove(a)))return a};ol.Map.prototype.removeInteraction=function(a){var b,c=this.getInteractions();goog.isDef(c.remove(a))&&(b=a);return b};ol.Map.prototype.removeLayer=function(a){return this.getLayerGroup().getLayers().remove(a)};ol.Map.prototype.removeOverlay=function(a){var b=this.getOverlays();if(goog.isDef(b.remove(a)))return a}; ol.Map.prototype.renderFrame_=function(a){var b,c,d,e=this.getSize();b=this.getView();var f=goog.isDef(b)?this.getView().getView2D():void 0,g=null;if(goog.isDef(e)&&0this.minPointsPerRing_,e=[this.sketchRawPolygon_[0][0],this.sketchRawPolygon_[0][this.sketchRawPolygon_[0].length-2]]);if(d)for(var c=a.map,d=0,f=e.length;db?(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=function(a){a=goog.isDef(a)?a:{};this.currentResolution_=void 0;this.direction_=ol.control.ZoomSlider.direction.VERTICAL;this.sliderInitialized_=!1;var b=goog.isDef(a.className)?a.className:"ol-zoomslider";a=goog.dom.createDom(goog.dom.TagName.DIV,[b+"-thumb",ol.css.CLASS_UNSELECTABLE]);b=goog.dom.createDom(goog.dom.TagName.DIV,[b,ol.css.CLASS_UNSELECTABLE],a);this.dragger_=new goog.fx.Dragger(a);this.registerDisposable(this.dragger_);goog.events.listen(this.dragger_,[goog.fx.Dragger.EventType.DRAG, goog.fx.Dragger.EventType.END],this.handleSliderChange_,void 0,this);goog.events.listen(b,goog.events.EventType.CLICK,this.handleContainerClick_,!1,this);goog.events.listen(a,goog.events.EventType.CLICK,goog.events.Event.stopPropagation);ol.control.Control.call(this,{element:b})};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){var b=this.getMap(),c=b.getView().getView2D();a=this.amountDragged_(a.offsetX,a.offsetY);a=this.resolutionForAmount_(a);b.beforeRender(ol.animation.zoom({resolution:a,duration:ol.ZOOMSLIDER_ANIMATION_DURATION,easing:ol.easing.easeOut}));a=c.constrainResolution(a);c.setResolution(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,b){var c=this.dragger_.limits,d=0;return d=this.direction_===ol.control.ZoomSlider.direction.HORIZONTAL?(a-c.left)/c.width:(b-c.top)/c.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.left,a.top),a=this.resolutionForAmount_(a),a!==this.currentResolution_&&(this.currentResolution_=a,c.setResolution(a))):(b.beforeRender(ol.animation.zoom({resolution:this.currentResolution_,duration:ol.ZOOMSLIDER_ANIMATION_DURATION,easing:ol.easing.easeOut})),a=c.constrainResolution(this.currentResolution_),c.setResolution(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",c=goog.isDef(a.tipLabel)?a.tipLabel:"Fit to extent",c=goog.dom.createDom(goog.dom.TagName.SPAN,{role:"tooltip"},c),b=goog.dom.createDom(goog.dom.TagName.DIV,{"class":b+" "+ol.css.CLASS_UNSELECTABLE}),d=goog.dom.createDom(goog.dom.TagName.BUTTON,{"class":"ol-has-tooltip"});goog.dom.appendChild(d,c);goog.dom.appendChild(b,d);c=new ol.pointer.PointerEventHandler(d); this.registerDisposable(c);goog.events.listen(c,ol.pointer.EventType.POINTERUP,this.handleZoomToExtent_,!1,this);goog.events.listen(d,[goog.events.EventType.MOUSEOUT,goog.events.EventType.FOCUSOUT],function(){this.blur()},!1);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.browserEvent.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",CHECKED:"checked"};ol.dom.Input=function(a){ol.Object.call(this);this.target_=a;goog.events.listen(this.target_,[goog.events.EventType.CHANGE,goog.events.EventType.INPUT],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.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.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.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(a){a=this.target_;"checkbox"===a.type||"radio"===a.type?this.setChecked(a.checked):this.setValue(a.value)}; ol.dom.Input.prototype.handleCheckedChanged_=function(a){this.target_.checked=this.getChecked()};ol.dom.Input.prototype.handleValueChanged_=function(a){this.target_.value=this.getValue()};ol.format={};ol.format.Feature=function(){};ol.format.FormatType={BINARY:"binary",JSON:"json",TEXT:"text",XML:"xml"};goog.dom.xml={};goog.dom.xml.MAX_XML_SIZE_KB=2048;goog.dom.xml.MAX_ELEMENT_DEPTH=256; goog.dom.xml.createDocument=function(a,b){if(b&&!a)throw Error("Can't create document with namespace and no root tag");if(document.implementation&&document.implementation.createDocument)return document.implementation.createDocument(b||"",a||"",null);if("undefined"!=typeof ActiveXObject){var c=goog.dom.xml.createMsXmlDocument_();if(c)return a&&c.appendChild(c.createNode(goog.dom.NodeType.ELEMENT,a,b||"")),c}throw Error("Your browser does not support creating new documents");}; goog.dom.xml.loadXml=function(a){if("undefined"!=typeof DOMParser)return(new DOMParser).parseFromString(a,"application/xml");if("undefined"!=typeof ActiveXObject){var b=goog.dom.xml.createMsXmlDocument_();b.loadXML(a);return b}throw Error("Your browser does not support loading xml documents");}; goog.dom.xml.serialize=function(a){if("undefined"!=typeof XMLSerializer)return(new XMLSerializer).serializeToString(a);if(a=a.xml)return a;throw Error("Your browser does not support serializing XML documents");}; goog.dom.xml.selectSingleNode=function(a,b){if("undefined"!=typeof a.selectSingleNode){var c=goog.dom.getOwnerDocument(a);"undefined"!=typeof c.setProperty&&c.setProperty("SelectionLanguage","XPath");return a.selectSingleNode(b)}if(document.implementation.hasFeature("XPath","3.0")){var c=goog.dom.getOwnerDocument(a),d=c.createNSResolver(c.documentElement);return c.evaluate(b,a,d,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}return null}; goog.dom.xml.selectNodes=function(a,b){if("undefined"!=typeof a.selectNodes){var c=goog.dom.getOwnerDocument(a);"undefined"!=typeof c.setProperty&&c.setProperty("SelectionLanguage","XPath");return a.selectNodes(b)}if(document.implementation.hasFeature("XPath","3.0")){for(var c=goog.dom.getOwnerDocument(a),d=c.createNSResolver(c.documentElement),c=c.evaluate(b,a,d,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),d=[],e=c.snapshotLength,f=0;fb?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;e=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.fs={};goog.fs.Error=function(a,b){goog.debug.Error.call(this,goog.string.subs("Error %s: %s",b,goog.fs.Error.getDebugMessage(a)));this.code=a};goog.inherits(goog.fs.Error,goog.debug.Error);goog.fs.Error.ErrorCode={NOT_FOUND:1,SECURITY:2,ABORT:3,NOT_READABLE:4,ENCODING:5,NO_MODIFICATION_ALLOWED:6,INVALID_STATE:7,SYNTAX:8,INVALID_MODIFICATION:9,QUOTA_EXCEEDED:10,TYPE_MISMATCH:11,PATH_EXISTS:12}; goog.fs.Error.getDebugMessage=function(a){switch(a){case goog.fs.Error.ErrorCode.NOT_FOUND:return"File or directory not found";case goog.fs.Error.ErrorCode.SECURITY:return"Insecure or disallowed operation";case goog.fs.Error.ErrorCode.ABORT:return"Operation aborted";case goog.fs.Error.ErrorCode.NOT_READABLE:return"File or directory not readable";case goog.fs.Error.ErrorCode.ENCODING:return"Invalid encoding";case goog.fs.Error.ErrorCode.NO_MODIFICATION_ALLOWED:return"Cannot modify file or directory"; case goog.fs.Error.ErrorCode.INVALID_STATE:return"Invalid state";case goog.fs.Error.ErrorCode.SYNTAX:return"Invalid line-ending specifier";case goog.fs.Error.ErrorCode.INVALID_MODIFICATION:return"Invalid modification";case goog.fs.Error.ErrorCode.QUOTA_EXCEEDED:return"Quota exceeded";case goog.fs.Error.ErrorCode.TYPE_MISMATCH:return"Invalid filetype";case goog.fs.Error.ErrorCode.PATH_EXISTS:return"File or directory already exists at specified path";default:return"Unrecognized error"}};goog.fs.ProgressEvent=function(a,b){goog.events.Event.call(this,a.type,b);this.event_=a};goog.inherits(goog.fs.ProgressEvent,goog.events.Event);goog.fs.ProgressEvent.prototype.isLengthComputable=function(){return this.event_.lengthComputable};goog.fs.ProgressEvent.prototype.getLoaded=function(){return this.event_.loaded};goog.fs.ProgressEvent.prototype.getTotal=function(){return this.event_.total};goog.fs.FileReader=function(){goog.events.EventTarget.call(this);this.reader_=new FileReader;this.reader_.onloadstart=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onprogress=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onload=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onabort=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onerror=goog.bind(this.dispatchProgressEvent_,this);this.reader_.onloadend=goog.bind(this.dispatchProgressEvent_,this)}; goog.inherits(goog.fs.FileReader,goog.events.EventTarget);goog.fs.FileReader.ReadyState={INIT:0,LOADING:1,DONE:2};goog.fs.FileReader.EventType={LOAD_START:"loadstart",PROGRESS:"progress",LOAD:"load",ABORT:"abort",ERROR:"error",LOAD_END:"loadend"};goog.fs.FileReader.prototype.abort=function(){try{this.reader_.abort()}catch(a){throw new goog.fs.Error(a.code,"aborting read");}};goog.fs.FileReader.prototype.getReadyState=function(){return this.reader_.readyState}; goog.fs.FileReader.prototype.getResult=function(){return this.reader_.result};goog.fs.FileReader.prototype.getError=function(){return this.reader_.error&&new goog.fs.Error(this.reader_.error.code,"reading file")};goog.fs.FileReader.prototype.dispatchProgressEvent_=function(a){this.dispatchEvent(new goog.fs.ProgressEvent(a,this))};goog.fs.FileReader.prototype.disposeInternal=function(){goog.fs.FileReader.superClass_.disposeInternal.call(this);delete this.reader_}; goog.fs.FileReader.prototype.readAsBinaryString=function(a){this.reader_.readAsBinaryString(a)};goog.fs.FileReader.readAsBinaryString=function(a){var b=new goog.fs.FileReader,c=goog.fs.FileReader.createDeferred_(b);b.readAsBinaryString(a);return c};goog.fs.FileReader.prototype.readAsArrayBuffer=function(a){this.reader_.readAsArrayBuffer(a)};goog.fs.FileReader.readAsArrayBuffer=function(a){var b=new goog.fs.FileReader,c=goog.fs.FileReader.createDeferred_(b);b.readAsArrayBuffer(a);return c}; goog.fs.FileReader.prototype.readAsText=function(a,b){this.reader_.readAsText(a,b)};goog.fs.FileReader.readAsText=function(a,b){var c=new goog.fs.FileReader,d=goog.fs.FileReader.createDeferred_(c);c.readAsText(a,b);return d};goog.fs.FileReader.prototype.readAsDataUrl=function(a){this.reader_.readAsDataURL(a)};goog.fs.FileReader.readAsDataUrl=function(a){var b=new goog.fs.FileReader,c=goog.fs.FileReader.createDeferred_(b);b.readAsDataUrl(a);return c}; goog.fs.FileReader.createDeferred_=function(a){var b=new goog.async.Deferred;a.addEventListener(goog.fs.FileReader.EventType.LOAD_END,goog.partial(function(a,b,e){e=b.getResult();var f=b.getError();null==e||f?a.errback(f):a.callback(e);b.dispose()},b,a));return b};ol.interaction.DragAndDrop=function(a){a=goog.isDef(a)?a:{};ol.interaction.Interaction.call(this);this.formatConstructors_=goog.isDef(a.formatConstructors)?a.formatConstructors:[];this.reprojectTo_=goog.isDef(a.reprojectTo)?ol.proj.get(a.reprojectTo):null;this.fileDropHandler_=null;this.dropListenKey_=void 0};goog.inherits(ol.interaction.DragAndDrop,ol.interaction.Interaction); ol.interaction.DragAndDrop.prototype.disposeInternal=function(){goog.isDef(this.dropListenKey_)&&goog.events.unlistenByKey(this.dropListenKey_);ol.interaction.DragAndDrop.superClass_.disposeInternal.call(this)};ol.interaction.DragAndDrop.prototype.handleDrop_=function(a){a=a.getBrowserEvent().dataTransfer.files;var b,c,d;b=0;for(c=a.length;bg?d[1]:d[0]);this.createOrUpdateVertexFeature_(f);f={};f[goog.getUid(d)]=!0;k=1;for(h=e.length;kb)&&(e.index+=d)})}; ol.interaction.Modify.getDefaultStyleFunction=function(){var a=ol.feature.createDefaultEditingStyles();return function(b,c){return a[ol.geom.GeometryType.POINT]}};ol.interaction.Select=function(a){ol.interaction.Interaction.call(this);a=goog.isDef(a)?a:{};this.condition_=goog.isDef(a.condition)?a.condition:ol.events.condition.singleClick;this.addCondition_=goog.isDef(a.addCondition)?a.addCondition:ol.events.condition.never;this.removeCondition_=goog.isDef(a.removeCondition)?a.removeCondition:ol.events.condition.never;this.toggleCondition_=goog.isDef(a.toggleCondition)?a.toggleCondition:ol.events.condition.shiftKeyOnly;var b;if(goog.isDef(a.layers))if(goog.isFunction(a.layers))b= a.layers;else{var c=a.layers;b=function(a){return goog.array.contains(c,a)}}else b=goog.functions.TRUE;this.layerFilter_=b;this.featureOverlay_=new ol.FeatureOverlay({style:goog.isDef(a.style)?a.style:ol.interaction.Select.getDefaultStyleFunction()});a=this.featureOverlay_.getFeatures();goog.events.listen(a,ol.CollectionEventType.ADD,this.addFeature_,!1,this);goog.events.listen(a,ol.CollectionEventType.REMOVE,this.removeFeature_,!1,this)};goog.inherits(ol.interaction.Select,ol.interaction.Interaction); ol.interaction.Select.prototype.getFeatures=function(){return this.featureOverlay_.getFeatures()}; ol.interaction.Select.prototype.handleMapBrowserEvent=function(a){if(!this.condition_(a))return!0;var b=this.addCondition_(a),c=this.removeCondition_(a),d=this.toggleCondition_(a),e=!b&&!c&&!d,f=a.map,g=this.featureOverlay_.getFeatures();e?(a=f.forEachFeatureAtPixel(a.pixel,function(a,b){return a},void 0,this.layerFilter_),goog.isDef(a)&&1==g.getLength()&&g.getAt(0)==a||(0!==g.getLength()&&g.clear(),goog.isDef(a)&&g.push(a))):f.forEachFeatureAtPixel(a.pixel,function(a,e){var f=goog.array.indexOf(g.getArray(), a);-1==f?(b||d)&&g.push(a):(c||d)&&g.removeAt(f)},void 0,this.layerFilter_);return!1};ol.interaction.Select.prototype.setMap=function(a){var b=this.getMap(),c=this.featureOverlay_.getFeatures();goog.isNull(b)||c.forEach(b.unskipFeature,b);ol.interaction.Select.superClass_.setMap.call(this,a);this.featureOverlay_.setMap(a);goog.isNull(a)||c.forEach(a.skipFeature,a)}; ol.interaction.Select.getDefaultStyleFunction=function(){var a=ol.feature.createDefaultEditingStyles();goog.array.extend(a[ol.geom.GeometryType.POLYGON],a[ol.geom.GeometryType.LINE_STRING]);goog.array.extend(a[ol.geom.GeometryType.GEOMETRY_COLLECTION],a[ol.geom.GeometryType.LINE_STRING]);return function(b,c){return a[b.getGeometry().getType()]}};ol.interaction.Select.prototype.addFeature_=function(a){a=a.element;var b=this.getMap();goog.isNull(b)||b.skipFeature(a)}; ol.interaction.Select.prototype.removeFeature_=function(a){a=a.element;var b=this.getMap();goog.isNull(b)||b.unskipFeature(a)};ol.layer.HeatmapLayerProperty={GRADIENT:"gradient"}; ol.layer.Heatmap=function(a){a=goog.isDef(a)?a:{};ol.layer.Vector.call(this,a);this.gradient_=null;goog.events.listen(this,ol.Object.getChangeEventType(ol.layer.HeatmapLayerProperty.GRADIENT),this.handleGradientChanged_,!1,this);this.setGradient(goog.isDef(a.gradient)?a.gradient:ol.layer.Heatmap.DEFAULT_GRADIENT);var b=ol.layer.Heatmap.createCircle_(goog.isDef(a.radius)?a.radius:8,goog.isDef(a.blur)?a.blur:15,goog.isDef(a.shadow)?a.shadow:250),c=Array(256),d=goog.isDef(a.weight)?a.weight:"weight", e;e=goog.isString(d)?function(a){return a.get(d)}:d;this.setStyle(function(a,d){var h=e(a),h=goog.isDef(h)?goog.math.clamp(h,0,1):1,k=255*h|0,l=c[k];goog.isDef(l)||(l=[new ol.style.Style({image:new ol.style.Icon({opacity:h,src:b})})],c[k]=l);return l});this.setRenderOrder(null);goog.events.listen(this,ol.render.EventType.RENDER,this.handleRender_,!1,this)};goog.inherits(ol.layer.Heatmap,ol.layer.Vector);ol.layer.Heatmap.DEFAULT_GRADIENT=["#00f","#0ff","#0f0","#ff0","#f00"]; ol.layer.Heatmap.createGradient_=function(a){for(var b=ol.dom.createCanvasContext2D(1,256),c=b.createLinearGradient(0,0,1,256),d=1/(a.length-1),e=0,f=a.length;eMath.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:2this.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.source.TileImage=function(a){ol.source.Tile.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,tileGrid:a.tileGrid});this.tileUrlFunction=goog.isDef(a.tileUrlFunction)?a.tileUrlFunction:ol.TileUrlFunction.nullTileUrlFunction;this.crossOrigin=goog.isDef(a.crossOrigin)?a.crossOrigin:null;this.tileCache=new ol.TileCache;this.tileLoadFunction=goog.isDef(a.tileLoadFunction)?a.tileLoadFunction:ol.source.TileImage.defaultTileLoadFunction;this.tileClass= goog.isDef(a.tileClass)?a.tileClass:ol.ImageTile};goog.inherits(ol.source.TileImage,ol.source.Tile);ol.source.TileImage.defaultTileLoadFunction=function(a,b){a.getImage().src=b};ol.source.TileImage.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()};ol.source.TileImage.prototype.expireCache=function(a){this.tileCache.expireCache(a)}; ol.source.TileImage.prototype.getTile=function(a,b,c,d,e){var f=this.getKeyZXY(a,b,c);if(this.tileCache.containsKey(f))return this.tileCache.get(f);a=new ol.TileCoord(a,b,c);d=this.tileUrlFunction(a,d,e);d=new this.tileClass(a,goog.isDef(d)?ol.TileState.IDLE:ol.TileState.EMPTY,goog.isDef(d)?d:"",this.crossOrigin,this.tileLoadFunction);this.tileCache.set(f,d);return d};ol.source.TileImage.prototype.setTileUrlFunction=function(a){this.tileCache.clear();this.tileUrlFunction=a;this.dispatchChangeEvent()}; ol.source.TileImage.prototype.useTile=function(a,b,c){a=this.getKeyZXY(a,b,c);this.tileCache.containsKey(a)&&this.tileCache.get(a)};ol.tilegrid.XYZ=function(a){var b=Array(a.maxZoom+1),c,d=2*ol.proj.EPSG3857.HALF_SIZE/ol.DEFAULT_TILE_SIZE;for(c=0;c<=a.maxZoom;++c)b[c]=d/Math.pow(2,c);ol.tilegrid.TileGrid.call(this,{minZoom:a.minZoom,origin:[-ol.proj.EPSG3857.HALF_SIZE,ol.proj.EPSG3857.HALF_SIZE],resolutions:b,tileSize:ol.DEFAULT_TILE_SIZE})};goog.inherits(ol.tilegrid.XYZ,ol.tilegrid.TileGrid); ol.tilegrid.XYZ.prototype.createTileCoordTransform=function(a){a=goog.isDef(a)?a:{};var b=this.minZoom,c=this.maxZoom,d=goog.isDef(a.wrapX)?a.wrapX:!0,e=new ol.TileCoord(0,0,0),f=null;if(goog.isDef(a.extent)){var f=Array(c+1),g;for(g=0;g<=c;++g)f[g]=gn||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"),state:ol.source.State.LOADING,tileLoadFunction:a.tileLoadFunction});this.culture_=goog.isDef(a.culture)?a.culture:"en-us";var b=new goog.Uri((ol.IS_HTTPS?"https:":"http:")+"//dev.virtualearth.net/REST/v1/Imagery/Metadata/"+a.imagerySet);(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.TOS_ATTRIBUTION=new ol.Attribution({html:'\x3ca class\x3d"ol-attribution-bing-tos" target\x3d"_blank" href\x3d"http://www.microsoft.com/maps/product/terms.html"\x3eTerms of Use\x3c/a\x3e'}); ol.source.BingMaps.prototype.handleImageryMetadataResponse=function(a){if(200!=a.statusCode||"OK"!=a.statusDescription||"ValidCredentials"!=a.authenticationResultCode||1!=a.resourceSets.length||1!=a.resourceSets[0].resources.length)this.setState(ol.source.State.ERROR);else{var b=a.brandLogoUri,c=a.resourceSets[0].resources[0],d=new ol.tilegrid.XYZ({minZoom:c.zoomMin,maxZoom:c.zoomMax,tileSize:c.imageWidth});this.tileGrid=d;var e=this.culture_;this.getProjection();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,d){return goog.isNull(a)?void 0:b.replace("{quadkey}",a.quadKey())}})));if(c.imageryProviders){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[0],a[3],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})});a.push(ol.source.BingMaps.TOS_ATTRIBUTION);this.setAttributions(a)}this.setLogo(b);this.setState(ol.source.State.READY)}};goog.net.EventType={COMPLETE:"complete",SUCCESS:"success",ERROR:"error",ABORT:"abort",READY:"ready",READY_STATE_CHANGE:"readystatechange",TIMEOUT:"timeout",INCREMENTAL_DATA:"incrementaldata",PROGRESS:"progress"};goog.Timer=function(a,b){goog.events.EventTarget.call(this);this.interval_=a||1;this.timerObject_=b||goog.Timer.defaultTimerObject;this.boundTick_=goog.bind(this.tick_,this);this.last_=goog.now()};goog.inherits(goog.Timer,goog.events.EventTarget);goog.Timer.MAX_TIMEOUT_=2147483647;goog.Timer.prototype.enabled=!1;goog.Timer.defaultTimerObject=goog.global;goog.Timer.intervalScale=0.8;goog.Timer.prototype.timer_=null;goog.Timer.prototype.getInterval=function(){return this.interval_}; goog.Timer.prototype.setInterval=function(a){this.interval_=a;this.timer_&&this.enabled?(this.stop(),this.start()):this.timer_&&this.stop()}; goog.Timer.prototype.tick_=function(){if(this.enabled){var a=goog.now()-this.last_;0goog.Timer.MAX_TIMEOUT_?-1:goog.Timer.defaultTimerObject.setTimeout(a,b||0)};goog.Timer.clear=function(a){goog.Timer.defaultTimerObject.clearTimeout(a)};goog.net.ErrorCode={NO_ERROR:0,ACCESS_DENIED:1,FILE_NOT_FOUND:2,FF_SILENT_ERROR:3,CUSTOM_ERROR:4,EXCEPTION:5,HTTP_ERROR:6,ABORT:7,TIMEOUT:8,OFFLINE:9}; goog.net.ErrorCode.getDebugMessage=function(a){switch(a){case goog.net.ErrorCode.NO_ERROR:return"No Error";case goog.net.ErrorCode.ACCESS_DENIED:return"Access denied to content document";case goog.net.ErrorCode.FILE_NOT_FOUND:return"File not found";case goog.net.ErrorCode.FF_SILENT_ERROR:return"Firefox silently errored";case goog.net.ErrorCode.CUSTOM_ERROR:return"Application custom error";case goog.net.ErrorCode.EXCEPTION:return"An exception occurred";case goog.net.ErrorCode.HTTP_ERROR:return"Http response at 400 or 500 level"; case goog.net.ErrorCode.ABORT:return"Request was aborted";case goog.net.ErrorCode.TIMEOUT:return"Request timed out";case goog.net.ErrorCode.OFFLINE:return"The resource is not available offline";default:return"Unrecognized error code"}};goog.net.HttpStatus={CONTINUE:100,SWITCHING_PROTOCOLS:101,OK:200,CREATED:201,ACCEPTED:202,NON_AUTHORITATIVE_INFORMATION:203,NO_CONTENT:204,RESET_CONTENT:205,PARTIAL_CONTENT:206,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,USE_PROXY:305,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411, PRECONDITION_FAILED:412,REQUEST_ENTITY_TOO_LARGE:413,REQUEST_URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,REQUEST_RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,QUIRK_IE_NO_CONTENT:1223}; goog.net.HttpStatus.isSuccess=function(a){switch(a){case goog.net.HttpStatus.OK:case goog.net.HttpStatus.CREATED:case goog.net.HttpStatus.ACCEPTED:case goog.net.HttpStatus.NO_CONTENT:case goog.net.HttpStatus.PARTIAL_CONTENT:case goog.net.HttpStatus.NOT_MODIFIED:case goog.net.HttpStatus.QUIRK_IE_NO_CONTENT:return!0;default:return!1}};goog.net.XmlHttpFactory=function(){};goog.net.XmlHttpFactory.prototype.cachedOptions_=null;goog.net.XmlHttpFactory.prototype.getOptions=function(){return this.cachedOptions_||(this.cachedOptions_=this.internalGetOptions())};goog.net.WrapperXmlHttpFactory=function(a,b){goog.net.XmlHttpFactory.call(this);this.xhrFactory_=a;this.optionsFactory_=b};goog.inherits(goog.net.WrapperXmlHttpFactory,goog.net.XmlHttpFactory);goog.net.WrapperXmlHttpFactory.prototype.createInstance=function(){return this.xhrFactory_()};goog.net.WrapperXmlHttpFactory.prototype.getOptions=function(){return this.optionsFactory_()};goog.net.XmlHttp=function(){return goog.net.XmlHttp.factory_.createInstance()};goog.net.XmlHttp.ASSUME_NATIVE_XHR=!1;goog.net.XmlHttp.getOptions=function(){return goog.net.XmlHttp.factory_.getOptions()};goog.net.XmlHttp.OptionType={USE_NULL_FUNCTION:0,LOCAL_REQUEST_ERROR:1};goog.net.XmlHttp.ReadyState={UNINITIALIZED:0,LOADING:1,LOADED:2,INTERACTIVE:3,COMPLETE:4};goog.net.XmlHttp.setFactory=function(a,b){goog.net.XmlHttp.setGlobalFactory(new goog.net.WrapperXmlHttpFactory(a,b))}; goog.net.XmlHttp.setGlobalFactory=function(a){goog.net.XmlHttp.factory_=a};goog.net.DefaultXmlHttpFactory=function(){goog.net.XmlHttpFactory.call(this)};goog.inherits(goog.net.DefaultXmlHttpFactory,goog.net.XmlHttpFactory);goog.net.DefaultXmlHttpFactory.prototype.createInstance=function(){var a=this.getProgId_();return a?new ActiveXObject(a):new XMLHttpRequest}; goog.net.DefaultXmlHttpFactory.prototype.internalGetOptions=function(){var a={};this.getProgId_()&&(a[goog.net.XmlHttp.OptionType.USE_NULL_FUNCTION]=!0,a[goog.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]=!0);return a}; goog.net.DefaultXmlHttpFactory.prototype.getProgId_=function(){if(goog.net.XmlHttp.ASSUME_NATIVE_XHR)return"";if(!this.ieProgId_&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var a=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],b=0;bgoog.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.FormatVector=function(a){ol.source.Vector.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection});this.format=a.format};goog.inherits(ol.source.FormatVector,ol.source.Vector); ol.source.FormatVector.prototype.loadFeaturesFromURL=function(a,b,c){var d=new goog.net.XhrIo,e;e=this.format.getType()==ol.format.FormatType.BINARY&&ol.BrowserFeature.HAS_ARRAY_BUFFER?goog.net.XhrIo.ResponseType.ARRAY_BUFFER:goog.net.XhrIo.ResponseType.TEXT;d.setResponseType(e);goog.events.listen(d,goog.net.EventType.COMPLETE,function(a){a=a.target;if(a.isSuccess()){var d=this.format.getType(),e;d==ol.format.FormatType.BINARY&&ol.BrowserFeature.HAS_ARRAY_BUFFER?e=a.getResponse():d==ol.format.FormatType.JSON? e=a.getResponseText():d==ol.format.FormatType.TEXT?e=a.getResponseText():d==ol.format.FormatType.XML&&(goog.userAgent.IE||(e=a.getResponseXml()),goog.isDefAndNotNull(e)||(e=ol.xml.load(a.getResponseText())));goog.isDefAndNotNull(e)?b.call(c,this.readFeatures(e)):this.setState(ol.source.State.ERROR)}else this.setState(ol.source.State.ERROR);goog.dispose(a)},!1,this);d.send(a)}; ol.source.FormatVector.prototype.readFeatures=function(a){var b=this.format,c=b.readFeatures(a);a=b.readProjection(a);b=this.getProjection();if(!goog.isNull(b)&&!goog.isNull(a)&&!ol.proj.equivalent(a,b)){a=ol.proj.getTransform(a,b);var d,b=0;for(d=c.length;bf*a?e*c/(f*d):a*c/(b*d)}; ol.source.MapGuide.prototype.getUrl=function(a,b,c,d,e){e=ol.source.MapGuide.getScale(c,d,this.metersPerUnit_,this.displayDpi_);c=ol.extent.getCenter(c);d={OPERATION:this.useOverlay_?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol.source.MapGuide source",CLIP:"1",SETDISPLAYDPI:this.displayDpi_,SETDISPLAYWIDTH:Math.round(d[0]),SETDISPLAYHEIGHT:Math.round(d[1]),SETVIEWSCALE:e,SETVIEWCENTERX:c[0],SETVIEWCENTERY:c[1]};goog.object.extend(d,b);return goog.uri.utils.appendParamsFromMap(a, d)};ol.source.XYZ=function(a){var b=goog.isDef(a.projection)?a.projection:"EPSG:3857",c=goog.isDef(a.maxZoom)?a.maxZoom:18,c=new ol.tilegrid.XYZ({maxZoom:c});ol.source.TileImage.call(this,{attributions:a.attributions,crossOrigin:a.crossOrigin,extent:a.extent,logo:a.logo,projection:b,tileGrid:c,tileLoadFunction:a.tileLoadFunction,tileUrlFunction:ol.TileUrlFunction.nullTileUrlFunction});this.tileCoordTransform_=c.createTileCoordTransform({extent:a.extent,wrapX:a.wrapX});goog.isDef(a.tileUrlFunction)?this.setTileUrlFunction(a.tileUrlFunction): goog.isDef(a.urls)?this.setUrls(a.urls):goog.isDef(a.url)&&this.setUrl(a.url)};goog.inherits(ol.source.XYZ,ol.source.TileImage);ol.source.XYZ.prototype.setTileUrlFunction=function(a){ol.source.XYZ.superClass_.setTileUrlFunction.call(this,ol.TileUrlFunction.withTileCoordTransform(this.tileCoordTransform_,a))};ol.source.XYZ.prototype.setUrl=function(a){this.setTileUrlFunction(ol.TileUrlFunction.createFromTemplates(ol.TileUrlFunction.expandUrl(a)))};ol.source.XYZ.prototype.setUrls=function(a){this.setTileUrlFunction(ol.TileUrlFunction.createFromTemplates(a))};ol.source.OSM=function(a){a=goog.isDef(a)?a:{};var b;b=goog.isDef(a.attributions)?a.attributions:ol.source.OSM.ATTRIBUTIONS;var c=goog.isDef(a.crossOrigin)?a.crossOrigin:"anonymous",d=ol.IS_HTTPS?"https:":"http:",d=goog.isDef(a.url)?a.url:d+"//{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";ol.source.XYZ.call(this,{attributions:b,crossOrigin:c,opaque:!0,maxZoom:a.maxZoom,tileLoadFunction:a.tileLoadFunction,url:d})};goog.inherits(ol.source.OSM,ol.source.XYZ);ol.source.OSM.DATA_ATTRIBUTION=new ol.Attribution({html:'Data \x26copy; \x3ca href\x3d"http://www.openstreetmap.org/"\x3eOpenStreetMap\x3c/a\x3e contributors, \x3ca href\x3d"http://www.openstreetmap.org/copyright"\x3eODbL\x3c/a\x3e'}); ol.source.OSM.TILE_ATTRIBUTION=new ol.Attribution({html:'Tiles \x26copy; \x3ca href\x3d"http://www.openstreetmap.org/"\x3eOpenStreetMap\x3c/a\x3e contributors, \x3ca href\x3d"http://creativecommons.org/licenses/by-sa/2.0/"\x3eCC BY-SA\x3c/a\x3e'});ol.source.OSM.ATTRIBUTIONS=[ol.source.OSM.TILE_ATTRIBUTION,ol.source.OSM.DATA_ATTRIBUTION];ol.source.MapQuest=function(a){a=goog.isDef(a)?a:{};var b=ol.source.MapQuestConfig[a.layer];ol.source.XYZ.call(this,{attributions:b.attributions,crossOrigin:"anonymous",logo:"//developer.mapquest.com/content/osm/mq_logo.png",maxZoom:b.maxZoom,opaque:!0,tileLoadFunction:a.tileLoadFunction,url:(ol.IS_HTTPS?"https:":"http:")+"//otile{1-4}-s.mqcdn.com/tiles/1.0.0/"+a.layer+"/{z}/{x}/{y}.jpg"})};goog.inherits(ol.source.MapQuest,ol.source.XYZ);ol.source.MapQuest.TILE_ATTRIBUTION=new ol.Attribution({html:'Tiles Courtesy of \x3ca href\x3d"http://www.mapquest.com/" target\x3d"_blank"\x3eMapQuest\x3c/a\x3e'}); ol.source.MapQuestConfig={osm:{maxZoom:28,attributions:[ol.source.MapQuest.TILE_ATTRIBUTION,ol.source.OSM.DATA_ATTRIBUTION]},sat:{maxZoom:18,attributions:[ol.source.MapQuest.TILE_ATTRIBUTION,new ol.Attribution({html:"Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"})]},hyb:{maxZoom:18,attributions:[ol.source.MapQuest.TILE_ATTRIBUTION,ol.source.OSM.DATA_ATTRIBUTION]}};ol.source.OSMXML=function(a){a=goog.isDef(a)?a:{};ol.source.StaticVector.call(this,{attributions:a.attributions,doc:a.doc,extent:a.extent,format:new ol.format.OSMXML,logo:a.logo,node:a.node,projection:a.projection,reprojectTo:a.reprojectTo,text:a.text,url:a.url})};goog.inherits(ol.source.OSMXML,ol.source.StaticVector);ol.source.ServerVector=function(a){ol.source.FormatVector.call(this,{attributions:a.attributions,extent:a.extent,format:a.format,logo:a.logo,projection:a.projection});this.loadedExtents_=new ol.structs.RBush;this.loader_=a.loader;this.strategy_=goog.isDef(a.strategy)?a.strategy:ol.loadingstrategy.bbox;this.loadedFeatures_={}};goog.inherits(ol.source.ServerVector,ol.source.FormatVector); ol.source.ServerVector.prototype.addFeaturesInternal=function(a){var b=[],c,d;c=0;for(d=a.length;cf&&(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.tilegrid.Zoomify=function(a){var b=goog.isDef(a)?a:b;ol.tilegrid.TileGrid.call(this,{origin:[0,0],resolutions:b.resolutions})};goog.inherits(ol.tilegrid.Zoomify,ol.tilegrid.TileGrid); ol.tilegrid.Zoomify.prototype.createTileCoordTransform=function(a){a=goog.isDef(a)?a:{};var b=this.minZoom,c=this.maxZoom,d=new ol.TileCoord(0,0,0),e=null;if(goog.isDef(a.extent)){var e=Array(c+1),f;for(f=0;f<=c;++f)e[f]=fm||l<=m)return null;a=a.y;return a<-l||-1g||e>g;)f.push([Math.ceil(d/g),Math.ceil(e/g)]),g+=g;break;case ol.source.ZoomifyTierSizeCalculation.TRUNCATED:for(c=d;c>g||e>g;)f.push([Math.ceil(c/g),Math.ceil(e/g)]),c>>=1,e>>=1}f.push([1,1]);f.reverse();for(var g=[1],h=[0], e=1,c=f.length;e