/*! angular-google-maps 2.4.1 2017-01-05 * AngularJS directives for Google Maps * git: https://github.com/angular-ui/angular-google-maps.git */ !function(a,b,c,d){"use strict";(function(){b.module("uiGmapgoogle-maps.providers",["nemLogging"]),b.module("uiGmapgoogle-maps.wrapped",[]),b.module("uiGmapgoogle-maps.extensions",["uiGmapgoogle-maps.wrapped","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api.utils",["uiGmapgoogle-maps.extensions"]),b.module("uiGmapgoogle-maps.directives.api.managers",[]),b.module("uiGmapgoogle-maps.directives.api.options",["uiGmapgoogle-maps.directives.api.utils"]),b.module("uiGmapgoogle-maps.directives.api.options.builders",[]),b.module("uiGmapgoogle-maps.directives.api.models.child",["uiGmapgoogle-maps.directives.api.utils","uiGmapgoogle-maps.directives.api.options","uiGmapgoogle-maps.directives.api.options.builders"]),b.module("uiGmapgoogle-maps.directives.api.models.parent",["uiGmapgoogle-maps.directives.api.managers","uiGmapgoogle-maps.directives.api.models.child","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api",["uiGmapgoogle-maps.directives.api.models.parent"]),b.module("uiGmapgoogle-maps",["uiGmapgoogle-maps.directives.api","uiGmapgoogle-maps.providers"])}).call(this),function(){b.module("uiGmapgoogle-maps.providers").factory("uiGmapMapScriptLoader",["$q","uiGmapuuid",function(d,e){var f,g,h,i,j;return i=void 0,j=void 0,f=function(a){return a.china?"http://maps.google.cn/maps/api/js?":"auto"===a.transport?"//maps.googleapis.com/maps/api/js?":a.transport+"://maps.googleapis.com/maps/api/js?"},g=function(a){var b,d,g,h;return b=["transport","isGoogleMapsForWork","china","preventLoad"],a.isGoogleMapsForWork&&b.push("key"),d=c.map(c.omit(a,b),function(a,b){return b+"="+a}),i&&(h=document.getElementById(i),h.parentNode.removeChild(h)),d=d.join("&"),g=document.createElement("script"),g.id=i="ui_gmap_map_load_"+e.generate(),g.type="text/javascript",g.src=f(a)+d,document.head.appendChild(g)},h=function(){return b.isDefined(a.google)&&b.isDefined(a.google.maps)},{load:function(b){var c,e;return c=d.defer(),h()?(c.resolve(a.google.maps),c.promise):(e=b.callback="onGoogleMapsReady"+Math.round(1e3*Math.random()),a[e]=function(){a[e]=null,c.resolve(a.google.maps)},a.navigator.connection&&a.Connection&&a.navigator.connection.type===a.Connection.NONE&&!b.preventLoad?document.addEventListener("online",function(){if(!h())return g(b)}):b.preventLoad||g(b),j=b,j.randomizedFunctionName=e,c.promise)},manualLoad:function(){var b;return b=j,h()?a[b.randomizedFunctionName]?a[b.randomizedFunctionName]():void 0:g(b)}}}]).provider("uiGmapGoogleMapApi",function(){return this.options={transport:"https",isGoogleMapsForWork:!1,china:!1,v:"3",libraries:"",language:"en",preventLoad:!1},this.configure=function(a){b.extend(this.options,a)},this.$get=["uiGmapMapScriptLoader",function(a){return function(b){return b.load(a.options)}}(this)],this}).service("uiGmapGoogleMapApiManualLoader",["uiGmapMapScriptLoader",function(a){return{load:function(){a.manualLoad()}}}])}.call(this),function(){var d=function(a,b){return function(){return a.apply(b,arguments)}},e=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},f={}.hasOwnProperty;b.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendGWin",function(){return{init:c.once(function(){var b;if(google||("undefined"!=typeof google&&null!==google?google.maps:void 0)||null!=google.maps.InfoWindow)return google.maps.InfoWindow.prototype._open=google.maps.InfoWindow.prototype.open,google.maps.InfoWindow.prototype._close=google.maps.InfoWindow.prototype.close,google.maps.InfoWindow.prototype._isOpen=!1,google.maps.InfoWindow.prototype.open=function(a,b,c){null==c&&(this._isOpen=!0,this._open(a,b,!0))},google.maps.InfoWindow.prototype.close=function(a){null==a&&(this._isOpen=!1,this._close(!0))},google.maps.InfoWindow.prototype.isOpen=function(a){return null==a&&(a=void 0),null==a?this._isOpen:this._isOpen=a},a.InfoBox&&(a.InfoBox.prototype._open=a.InfoBox.prototype.open,a.InfoBox.prototype._close=a.InfoBox.prototype.close,a.InfoBox.prototype._isOpen=!1,a.InfoBox.prototype.open=function(a,b){this._isOpen=!0,this._open(a,b)},a.InfoBox.prototype.close=function(){this._isOpen=!1,this._close()},a.InfoBox.prototype.isOpen=function(a){return null==a&&(a=void 0),null==a?this._isOpen:this._isOpen=a},b=function(b){function f(b){this.getOrigCloseBoxImg_=d(this.getOrigCloseBoxImg_,this),this.getCloseBoxDiv_=d(this.getCloseBoxDiv_,this);var e;e=new a.InfoBox(b),c.extend(this,e),null!=b.closeBoxDiv&&(this.closeBoxDiv_=b.closeBoxDiv)}return e(f,b),f.prototype.getCloseBoxDiv_=function(){return this.closeBoxDiv_},f.prototype.getCloseBoxImg_=function(){var a,b;return a=this.getCloseBoxDiv_(),b=this.getOrigCloseBoxImg_(),a||b},f.prototype.getOrigCloseBoxImg_=function(){var a;return a="",""!==this.closeBoxURL_&&(a="0&&(f=e[0])):f=c,f},defaultDelay:50,isTrue:function(a){return f(a,!0,["true","TRUE",1,"y","Y","yes","YES"])},isFalse:e,isFalsy:function(a){return f(a,!1,[void 0,null])||e(a)},getCoords:g,validateCoords:j,equalCoords:function(a,b){return h(a)===h(b)&&i(a)===i(b)},validatePath:function(a){var d,e,f,g;if(e=0,b.isUndefined(a.type)){if(!Array.isArray(a)||a.length<2)return!1;for(;ethis.max)return this.max=a[0].length,this.index=b},g),f=a.coordinates[g.index],d=f[0],d.length<4)return!1}else{if("LineString"!==a.type)return!1;if(a.coordinates.length<2)return!1;d=a.coordinates}for(;ethis.max)return this.max=a[0].length,this.index=b},h),d=a.coordinates[h.index][0]):"LineString"===a.type&&(d=a.coordinates);e0&&(d-=1),f.length&&(f.length-=1)}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapLinked",["uiGmapBaseObject",function(b){var c;return c=function(b){function c(a,b,c,d){this.scope=a,this.element=b,this.attrs=c,this.ctrls=d}return a(c,b),c}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapLogger",["nemSimpleLogger",function(a){return a.spawn()}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelKey",["uiGmapBaseObject","uiGmapGmapUtil",function(e,f){return function(e){function g(b,c){this.scope=b,this.interface=null!=c?c:{scopeKeys:[]},this.modelsLength=a(this.modelsLength,this),this.updateChild=a(this.updateChild,this),this.destroy=a(this.destroy,this),this.setChildScope=a(this.setChildScope,this),this.getChanges=a(this.getChanges,this),this.getProp=a(this.getProp,this),this.setIdKey=a(this.setIdKey,this),this.modelKeyComparison=a(this.modelKeyComparison,this),g.__super__.constructor.call(this),this.defaultIdKey="id",this.idKey=void 0}return d(g,e),g.prototype.evalModelHandle=function(a,b){if(null!=a&&null!=b)return"self"===b?a:(c.isFunction(b)&&(b=b()),f.getPath(a,b))},g.prototype.modelKeyComparison=function(a,b){var d,e,g,h,i,j;if(g=this.interface.scopeKeys.indexOf("coords")>=0,(g&&null!=this.scope.coords||!g)&&(i=this.scope),null==i)throw"No scope set!";return g&&(d=this.scopeOrModelVal("coords",i,a),e=this.scopeOrModelVal("coords",i,b),h=f.equalCoords(d,e),!h)?h:(j=c.without(this.interface.scopeKeys,"coords"),h=c.every(j,function(d){return function(e){var f,g;return f=d.scopeOrModelVal(i[e],i,a),g=d.scopeOrModelVal(i[e],i,b),i.deepComparison?c.isEqual(f,g):f===g}}(this)))},g.prototype.setIdKey=function(a){return this.idKey=null!=a.idKey?a.idKey:this.defaultIdKey},g.prototype.setVal=function(a,b,c){return this.modelOrKey(a,b=c),a},g.prototype.modelOrKey=function(a,b){if(null!=b)return"self"!==b?f.getPath(a,b):a},g.prototype.getProp=function(a,b,c){return this.scopeOrModelVal(a,b,c)},g.prototype.getChanges=function(a,b,d){var e,f,g;d&&(b=c.pick(b,d),a=c.pick(a,d)),f={},g={},e={};for(g in a)b&&b[g]===a[g]||(c.isArray(a[g])?f[g]=a[g]:c.isObject(a[g])?(e=this.getChanges(a[g],b?b[g]:null),c.isEmpty(e)||(f[g]=e)):f[g]=a[g]);return f},g.prototype.scopeOrModelVal=function(a,b,d,e){var f,g,h,i;return null==e&&(e=!1),f=function(a,b,c){return null==c&&(c=!1),c?{isScope:a,value:b}:b},i=c.get(b,a),c.isFunction(i)?f(!0,i(d),e):c.isObject(i)?f(!0,i,e):c.isString(i)?(g=i,h=g?"self"===g?d:c.get(d,g):c.get(d,a),c.isFunction(h)?f(!1,h(),e):f(!1,h,e)):f(!0,i,e)},g.prototype.setChildScope=function(a,b,c){var d,e,f,g;for(e in a)f=a[e],d=this.scopeOrModelVal(f,b,c,!0),null!=(null!=d?d.value:void 0)&&(g=d.value,g!==b[f]&&(b[f]=g));return b.model=c},g.prototype.onDestroy=function(a){},g.prototype.destroy=function(a){var b;return null==a&&(a=!1),null==this.scope||(null!=(b=this.scope)?b.$$destroyed:void 0)||!this.needToManualDestroy&&!a?this.clean():this.scope.$destroy()},g.prototype.updateChild=function(a,b){return null==b[this.idKey]?void this.$log.error("Model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):a.updateModel(b)},g.prototype.modelsLength=function(a){var c,d;return null==a&&(a=void 0),c=0,d=a?a:this.scope.models,null==d?c:c=b.isArray(d)||null!=d.length?d.length:Object.keys(d).length},g}(e)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelsWatcher",["uiGmapLogger","uiGmap_async","$q","uiGmapPromise",function(a,b,c,d){return{didQueueInitPromise:function(a,c){return 0===c.models.length&&(b.promiseLock(a,d.promiseTypes.init,null,null,function(){return d.resolve()}),!0)},figureOutState:function(b,c,d,e,f){var g,h,i,j,k;return g=[],i={},j=[],k=[],c.models.forEach(function(f){var h;return null==f[b]?a.error(" id missing for model #{m.toString()},\ncan not use do comparison/insertion"):(i[f[b]]={},null==d.get(f[b])?g.push(f):(h=d.get(f[b]),e(f,h.clonedModel,c)?void 0:k.push({model:f,child:h})))}),h=d.values(),h.forEach(function(c){var d;return null==c?void a.error("child undefined in ModelsWatcher."):null==c.model?void a.error("child.model undefined in ModelsWatcher."):(d=c.model[b],null==i[d]?j.push(c):void 0)}),{adds:g,removals:j,updates:k}}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapPromise",["$q","$timeout","uiGmapLogger",function(a,b,d){var e,f,g,h,i,j,k,l,m,n,o;return m={create:"create",update:"update",delete:"delete",init:"init"},l={IN_PROGRESS:0,RESOLVED:1,REJECTED:2},o=function(){var a;return a={},a[""+l.IN_PROGRESS]="in-progress",a[""+l.RESOLVED]="resolved",a[""+l.REJECTED]="rejected",a}(),h=function(a){return a.$$state?a.$$state.status===l.IN_PROGRESS:!a.hasOwnProperty("$$v")||void 0},i=function(a){return a.$$state?a.$$state.status===l.RESOLVED:!!a.hasOwnProperty("$$v")||void 0},k=function(a){return o[a]||"done w error"},e=function(b){var c,d,e;return c=a.defer(),d=a.all([b,c.promise]),e=a.defer(),b.then(c.resolve,function(){},function(a){return c.notify(a),e.notify(a)}),d.then(function(a){return e.resolve(a[0]||a[1])},function(a){return e.reject(a)}),e.promise.cancel=function(a){return null==a&&(a="canceled"),c.reject(a)},e.promise.notify=function(a){if(null==a&&(a="cancel safe"),e.notify(a),b.hasOwnProperty("notify"))return b.notify(a)},null!=b.promiseType&&(e.promise.promiseType=b.promiseType),e.promise},f=function(a,b){return{promise:a,promiseType:b}},g=function(){return a.defer()},n=function(){var b;return b=a.defer(),b.resolve.apply(void 0,arguments),b.promise},j=function(e){var f;return c.isFunction(e)?(f=a.defer(),b(function(){var a;return a=e(),f.resolve(a)}),f.promise):void d.error("uiGmapPromise.promise() only accepts functions")},{defer:g,promise:j,resolve:n,promiseTypes:m,isInProgress:h,isResolved:i,promiseStatus:k,ExposedPromise:e,SniffedPromise:f}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropMap",function(){var b;return b=function(){function b(){this.removeAll=a(this.removeAll,this),this.slice=a(this.slice,this),this.push=a(this.push,this),this.keys=a(this.keys,this),this.values=a(this.values,this),this.remove=a(this.remove,this),this.put=a(this.put,this),this.stateChanged=a(this.stateChanged,this),this.get=a(this.get,this),this.length=0,this.dict={},this.didValsStateChange=!1,this.didKeysStateChange=!1,this.allVals=[],this.allKeys=[]}return b.prototype.get=function(a){return this.dict[a]},b.prototype.stateChanged=function(){return this.didValsStateChange=!0,this.didKeysStateChange=!0},b.prototype.put=function(a,b){return null==this.get(a)&&this.length++,this.stateChanged(),this.dict[a]=b},b.prototype.remove=function(a,b){var c;if(null==b&&(b=!1),!b||this.get(a))return c=this.dict[a],delete this.dict[a],this.length--,this.stateChanged(),c},b.prototype.valuesOrKeys=function(a){var b,d;return null==a&&(a="Keys"),this["did"+a+"StateChange"]?(d=[],b=[],c.each(this.dict,function(a,c){return d.push(a),b.push(c)}),this.didKeysStateChange=!1,this.didValsStateChange=!1,this.allVals=d,this.allKeys=b,this["all"+a]):this["all"+a]},b.prototype.values=function(){return this.valuesOrKeys("Vals")},b.prototype.keys=function(){return this.valuesOrKeys()},b.prototype.push=function(a,b){return null==b&&(b="key"),this.put(a[b],a)},b.prototype.slice=function(){return this.keys().map(function(a){return function(b){return a.remove(b)}}(this))},b.prototype.removeAll=function(){return this.slice()},b.prototype.each=function(a){return c.each(this.dict,function(b,c){return a(b)})},b.prototype.map=function(a){return c.map(this.dict,function(b,c){return a(b)})},b}()})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropertyAction",["uiGmapLogger",function(a){var b;return b=function(a){return this.setIfChange=function(b){return function(d,e){if(!c.isEqual(e,d))return a(b,d)}},this.sic=this.setIfChange,this}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapClustererMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapEventsHelper",function(c,d,e,f){var g;return g=function(){function g(b,d,f,h){null==d&&(d={}),this.opt_options=null!=f?f:{},this.opt_events=h,this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.destroy=a(this.destroy,this),this.attachEvents=a(this.attachEvents,this),this.clear=a(this.clear,this),this.draw=a(this.draw,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=g.type,this.clusterer=new NgMapMarkerClusterer(b,d,this.opt_options),this.propMapGMarkers=new e,this.attachEvents(this.opt_events,"opt_events"),this.clusterer.setIgnoreHidden(!0),this.noDrawOnSingleAddRemoves=!0,c.info(this)}return g.type="ClustererMarkerManager",g.prototype.checkKey=function(a){var b;if(null==a.key)return b="gMarker.key undefined and it is REQUIRED!!",c.error(b)},g.prototype.add=function(a){return this.checkKey(a),this.clusterer.addMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(a.key,a),this.checkSync()},g.prototype.update=function(a){return this.remove(a),this.add(a)},g.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},g.prototype.remove=function(a){var b;return this.checkKey(a),b=this.propMapGMarkers.get(a.key),b&&(this.clusterer.removeMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(a.key)),this.checkSync()},g.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},g.prototype.draw=function(){return this.clusterer.repaint()},g.prototype.clear=function(){return this.removeMany(this.getGMarkers()),this.clusterer.repaint()},g.prototype.attachEvents=function(a,d){var e,f,g;if(this.listeners=[],b.isDefined(a)&&null!=a&&b.isObject(a)){g=[];for(f in a)e=a[f],a.hasOwnProperty(f)&&b.isFunction(a[f])?(c.info(d+": Attaching event: "+f+" to clusterer"),g.push(this.listeners.push(google.maps.event.addListener(this.clusterer,f,a[f])))):g.push(void 0);return g}},g.prototype.clearEvents=function(){return f.removeEvents(this.listeners),this.listeners=[]},g.prototype.destroy=function(){return this.clearEvents(),this.clear()},g.prototype.fit=function(){return d.fit(this.getGMarkers(),this.clusterer.getMap())},g.prototype.getGMarkers=function(){return this.clusterer.getMarkers().values()},g.prototype.checkSync=function(){},g}()}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.managers").service("uiGmapGoogleMapObjectManager",[function(){var a,c;return a=[],c=[],{createMapInstance:function(d,e){var f;return f=null,0===a.length?(f=new google.maps.Map(d,e),c.push(f)):(f=a.pop(),b.element(d).append(f.getDiv()),f.setOptions(e),c.push(f)),f},recycleMapInstance:function(b){var d;if(d=c.indexOf(b),d<0)throw new Error("Expected map instance to be a previously used instance");return c.splice(d,1),a.push(b)}}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap",function(b,c,d){var e;return e=function(){function e(c,f,g){this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.handleOptDraw=a(this.handleOptDraw,this),this.clear=a(this.clear,this),this.destroy=a(this.destroy,this),this.draw=a(this.draw,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=e.type,this.gMap=c,this.gMarkers=new d,this.$log=b,this.$log.info(this)}return e.type="MarkerManager",e.prototype.add=function(a,c){var d,e;if(null==c&&(c=!0),null==a.key)throw e="gMarker.key undefined and it is REQUIRED!!",b.error(e),e;if(d=this.gMarkers.get(a.key),!d)return this.handleOptDraw(a,c,!0),this.gMarkers.put(a.key,a)},e.prototype.update=function(a,b){return null==b&&(b=!0),this.remove(a,b),this.add(a,b)},e.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},e.prototype.remove=function(a,b){if(null==b&&(b=!0),this.handleOptDraw(a,b,!1),this.gMarkers.get(a.key))return this.gMarkers.remove(a.key)},e.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},e.prototype.draw=function(){var a;return a=[],this.gMarkers.each(function(b){return function(c){if(!c.isDrawn)return c.doAdd?(c.setMap(b.gMap),c.isDrawn=!0):a.push(c)}}(this)),a.forEach(function(a){return function(b){return b.isDrawn=!1,a.remove(b,!0)}}(this))},e.prototype.destroy=function(){return this.clear()},e.prototype.clear=function(){return this.gMarkers.each(function(a){ return a.setMap(null)}),delete this.gMarkers,this.gMarkers=new d},e.prototype.handleOptDraw=function(a,b,c){return b===!0?(c?a.setMap(this.gMap):a.setMap(null),a.isDrawn=!0):(a.isDrawn=!1,a.doAdd=c)},e.prototype.fit=function(){return c.fit(this.getGMarkers(),this.gMap)},e.prototype.getGMarkers=function(){return this.gMarkers.values()},e}()}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapSpiderfierMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapMarkerSpiderfier",function(d,e,f,g){var h;return h=function(){function h(b,c,e,i,j){null==c&&(c={}),this.opt_options=null!=e?e:{},this.opt_events=i,this.scope=j,this.isSpiderfied=a(this.isSpiderfied,this),this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.destroy=a(this.destroy,this),this.attachEvents=a(this.attachEvents,this),this.clear=a(this.clear,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=h.type,this.markerSpiderfier=new g(b,this.opt_options),this.propMapGMarkers=new f,this.attachEvents(this.opt_events,"opt_events"),this.noDrawOnSingleAddRemoves=!0,d.info(this)}return h.type="SpiderfierMarkerManager",h.prototype.checkKey=function(a){var b;if(null==a.key)return b="gMarker.key undefined and it is REQUIRED!!",d.error(b)},h.prototype.add=function(a){return a.setMap(this.markerSpiderfier.map),this.checkKey(a),this.markerSpiderfier.addMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(a.key,a),this.checkSync()},h.prototype.update=function(a){return this.remove(a),this.add(a)},h.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},h.prototype.remove=function(a){var b;return this.checkKey(a),b=this.propMapGMarkers.get(a.key),b&&(a.setMap(null),this.markerSpiderfier.removeMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(a.key)),this.checkSync()},h.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},h.prototype.draw=function(){},h.prototype.clear=function(){return this.removeMany(this.getGMarkers())},h.prototype.attachEvents=function(a,e){if(b.isDefined(a)&&null!=a&&b.isObject(a))return c.each(a,function(c){return function(f,g){if(a.hasOwnProperty(g)&&b.isFunction(a[g]))return d.info(e+": Attaching event: "+g+" to markerSpiderfier"),c.markerSpiderfier.addListener(g,function(){return"spiderfy"===g||"unspiderfy"===g?c.scope.$evalAsync(a[g].apply(a,arguments)):c.scope.$evalAsync(a[g].apply(a,[arguments[0],g,arguments[0].model,arguments]))})}}(this))},h.prototype.clearEvents=function(a,c){var e,f;if(b.isDefined(a)&&null!=a&&b.isObject(a))for(f in a)e=a[f],a.hasOwnProperty(f)&&b.isFunction(a[f])&&(d.info(c+": Clearing event: "+f+" to markerSpiderfier"),this.markerSpiderfier.clearListeners(f))},h.prototype.destroy=function(){return this.clearEvents(this.opt_events,"opt_events"),this.clear()},h.prototype.fit=function(){return e.fit(this.getGMarkers(),this.markerSpiderfier.map)},h.prototype.getGMarkers=function(){return this.markerSpiderfier.getMarkers()},h.prototype.isSpiderfied=function(){return c.find(this.getGMarkers(),function(a){return null!=(null!=a?a._omsData:void 0)})},h.prototype.checkSync=function(){},h}()}])}.call(this),function(){b.module("uiGmapgoogle-maps").factory("uiGmapadd-events",["$timeout",function(a){var c,d;return c=function(b,c,d){return google.maps.event.addListener(b,c,function(){return d.apply(this,arguments),a(function(){},!0)})},d=function(a,d,e){var f;return e?c(a,d,e):(f=[],b.forEach(d,function(b,d){return f.push(c(a,d,b))}),function(){return b.forEach(f,function(a){return google.maps.event.removeListener(a)}),f=null})}}])}.call(this),function(){b.module("uiGmapgoogle-maps").factory("uiGmaparray-sync",["uiGmapadd-events",function(a){return function(c,d,e,f){var g,h,i,j,k,l,m,n,o;return j=!1,n=d.$eval(e),d.static||(k={set_at:function(a){var b;if(!j&&(b=c.getAt(a)))return b.lng&&b.lat?(n[a].latitude=b.lat(),n[a].longitude=b.lng()):n[a]=b},insert_at:function(a){var b;if(!j&&(b=c.getAt(a)))return b.lng&&b.lat?n.splice(a,0,{latitude:b.lat(),longitude:b.lng()}):n.splice(a,0,b)},remove_at:function(a){if(!j)return n.splice(a,1)}},"Polygon"===n.type?g=n.coordinates[0]:"LineString"===n.type&&(g=n.coordinates),h={set_at:function(a){var b;if(!j&&(b=c.getAt(a),b&&b.lng&&b.lat))return g[a][1]=b.lat(),g[a][0]=b.lng()},insert_at:function(a){var b;if(!j&&(b=c.getAt(a),b&&b.lng&&b.lat))return g.splice(a,0,[b.lng(),b.lat()])},remove_at:function(a){if(!j)return g.splice(a,1)}},m=a(c,b.isUndefined(n.type)?k:h)),l=function(a){var b,d,e,g,h,i,k,l;if(j=!0,i=c,b=!1,a){for(d=0,k=i.getLength(),g=a.length,e=Math.min(k,g),h=void 0;d0&&(a.gObject=f(a.buildOpts(a.pathPoints,c))),a.gObject?(g(a.gObject.getPath(),a.scope,"path",function(b){if(a.pathPoints=b,null!=h)return h()}),b.isDefined(a.scope.events)&&b.isObject(a.scope.events)&&(a.listeners=a.model?i.setEvents(a.gObject,a.scope,a.model):i.setEvents(a.gObject,a.scope,a.scope)),a.internalListeners=a.model?i.setEvents(a.gObject,{events:a.internalEvents},a.model):i.setEvents(a.gObject,{events:a.internalEvents},a.scope)):void 0}}(this),e(),this.scope.$watch("path",function(a){return function(b,d){if(!c.isEqual(b,d)||!a.gObject)return e()}}(this),!0),!this.scope.static&&b.isDefined(this.scope.editable)&&this.scope.$watch("editable",function(a){return function(b,c){var d;if(b!==c)return b=!a.isFalse(b),null!=(d=a.gObject)?d.setEditable(b):void 0}}(this),!0),b.isDefined(this.scope.draggable)&&this.scope.$watch("draggable",function(a){return function(b,c){var d;if(b!==c)return b=!a.isFalse(b),null!=(d=a.gObject)?d.setDraggable(b):void 0}}(this),!0),b.isDefined(this.scope.visible)&&this.scope.$watch("visible",function(a){return function(b,c){var d;return b!==c&&(b=!a.isFalse(b)),null!=(d=a.gObject)?d.setVisible(b):void 0}}(this),!0),b.isDefined(this.scope.geodesic)&&this.scope.$watch("geodesic",function(a){return function(b,c){var d;if(b!==c)return b=!a.isFalse(b),null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.weight)&&this.scope.$watch("stroke.weight",function(a){return function(b,c){var d;if(b!==c)return null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.color)&&this.scope.$watch("stroke.color",function(a){return function(b,c){var d;if(b!==c)return null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.opacity)&&this.scope.$watch("stroke.opacity",function(a){return function(b,c){var d;if(b!==c)return null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.icons)&&this.scope.$watch("icons",function(a){return function(b,c){var d;if(b!==c)return null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),this.scope.$on("$destroy",function(a){return function(){return a.clean(),a.scope=null}}(this)),b.isDefined(this.scope.fill)&&b.isDefined(this.scope.fill.color)&&this.scope.$watch("fill.color",function(a){return function(b,c){if(b!==c)return a.gObject.setOptions(a.buildOpts(a.gObject.getPath()))}}(this)),b.isDefined(this.scope.fill)&&b.isDefined(this.scope.fill.opacity)&&this.scope.$watch("fill.opacity",function(a){return function(b,c){if(b!==c)return a.gObject.setOptions(a.buildOpts(a.gObject.getPath()))}}(this)),b.isDefined(this.scope.zIndex)&&this.scope.$watch("zIndex",function(a){return function(b,c){if(b!==c)return a.gObject.setOptions(a.buildOpts(a.gObject.getPath()))}}(this))}return d(j,e),j.include(h),j.prototype.clean=function(){var a;return i.removeEvents(this.listeners),i.removeEvents(this.internalListeners),null!=(a=this.gObject)&&a.setMap(null),this.gObject=null},j}(e)}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapDrawFreeHandChildModel",["uiGmapLogger","$q",function(a,b){var d,e;return d=function(a,b,c){var d,e;e=new google.maps.Polyline({map:a,clickable:!1}),d=google.maps.event.addListener(a,"mousemove",function(a){return e.getPath().push(a.latLng)}),google.maps.event.addListenerOnce(a,"mouseup",function(f){var g;return google.maps.event.removeListener(d),g=e.getPath(),e.setMap(null),b.push(new google.maps.Polygon({map:a,path:g})),e=null,google.maps.event.clearListeners(a.getDiv(),"mousedown"),c()})},e=function(e,f){var g,h;return this.map=e,g=function(b){return function(){var c;return c={draggable:!1,disableDefaultUI:!0,scrollwheel:!1,disableDoubleClickZoom:!1},a.info("disabling map move"),b.map.setOptions(c)}}(this),h=function(a){return function(){var b,d;return b={draggable:!0,disableDefaultUI:!1,scrollwheel:!0,disableDoubleClickZoom:!0},null!=(d=a.deferred)&&d.resolve(),c.defer(function(){return a.map.setOptions(c.extend(b,f.options))})}}(this),this.engage=function(c){return function(e){return c.polys=e,c.deferred=b.defer(),g(),a.info("DrawFreeHandChildModel is engaged (drawing)."),google.maps.event.addDomListener(c.map.getDiv(),"mousedown",function(a){return d(c.map,c.polys,h)}),c.deferred.promise}}(this),this}}])}.call(this),function(){var d=function(a,b){return function(){return a.apply(b,arguments)}},e=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},f={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapMarkerChildModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger","uiGmapEventsHelper","uiGmapPropertyAction","uiGmapMarkerOptions","uiGmapIMarker","uiGmapMarkerManager","uiGmapPromise",function(f,g,h,i,j,k,l,m,n){var o;return o=function(f){function o(a){this.internalEvents=d(this.internalEvents,this),this.setLabelOptions=d(this.setLabelOptions,this),this.setOptions=d(this.setOptions,this),this.setIcon=d(this.setIcon,this),this.setCoords=d(this.setCoords,this),this.isNotValid=d(this.isNotValid,this),this.maybeSetScopeValue=d(this.maybeSetScopeValue,this),this.createMarker=d(this.createMarker,this),this.setMyScope=d(this.setMyScope,this),this.updateModel=d(this.updateModel,this),this.handleModelChanges=d(this.handleModelChanges,this),this.destroy=d(this.destroy,this);var b,e,f,g,i,k,l;l=a.scope,this.model=a.model,this.keys=a.keys,this.gMap=a.gMap,this.defaults=null!=(e=a.defaults)?e:{},this.doClick=a.doClick,this.gManager=a.gManager,this.doDrawSelf=null==(f=a.doDrawSelf)||f,this.trackModel=null==(g=a.trackModel)||g,this.needRedraw=null!=(i=a.needRedraw)&&i,this.isScopeModel=null!=(k=a.isScopeModel)&&k,this.isScopeModel&&(this.clonedModel=c.clone(this.model,!0)),this.deferred=n.defer(),c.each(this.keys,function(a){return function(b,d){var e;if(e=a.keys[d],null!=e&&!c.isFunction(e)&&c.isString(e))return a[d+"Key"]=e}}(this)),this.idKey=this.idKeyKey||"id",null!=this.model[this.idKey]&&(this.id=this.model[this.idKey]),o.__super__.constructor.call(this,l),this.scope.getGMarker=function(a){return function(){return a.gObject}}(this),this.firstTime=!0,this.trackModel?(this.scope.model=this.model,this.scope.$watch("model",function(a){return function(b,c){if(b!==c)return a.handleModelChanges(b,c)}}(this),!0)):(b=new j(function(a){return function(b){if(c.isFunction(b)&&(b="all"),!a.firstTime)return a.setMyScope(b,l)}}(this),!1),c.each(this.keys,function(a,c){return l.$watch(c,b.sic(c),!0)})),this.scope.$on("$destroy",function(a){return function(){return p(a)}}(this)),this.createMarker(this.model),h.info(this)}var p;return e(o,f),o.include(g),o.include(i),o.include(k),p=function(a){if(null!=(null!=a?a.gObject:void 0)&&(a.removeEvents(a.externalListeners),a.removeEvents(a.internalListeners),null!=a?a.gObject:void 0))return a.removeFromManager&&a.gManager.remove(a.gObject),a.gObject.setMap(null),a.gObject=null},o.prototype.destroy=function(a){return null==a&&(a=!0),this.removeFromManager=a,this.scope.$destroy()},o.prototype.handleModelChanges=function(a,b){var d,e,f;if(d=this.getChanges(a,b,l.keys),!this.firstTime)return e=0,f=c.keys(d).length,c.each(d,function(c){return function(d,g){var h;return e+=1,h=f===e,c.setMyScope(g,a,b,!1,!0,h),c.needRedraw=!0}}(this))},o.prototype.updateModel=function(a){return this.isScopeModel&&(this.clonedModel=c.clone(a,!0)),this.setMyScope("all",a,this.model)},o.prototype.renderGMarker=function(b,c){var d,e,f;if(null==b&&(b=!0),d=this.getProp("coords",this.scope,this.model),null!=(null!=(f=this.gManager)?f.isSpiderfied:void 0)&&(e=this.gManager.isSpiderfied()),null!=d){if(!this.validateCoords(d))return void h.debug("MarkerChild does not have coords yet. They may be defined later.");if(null!=c&&c(),b&&this.gObject&&this.gManager.add(this.gObject),e)return this.gManager.markerSpiderfier.spiderListener(this.gObject,a.event)}else if(b&&this.gObject)return this.gManager.remove(this.gObject)},o.prototype.setMyScope=function(a,b,d,e,f){var g;switch(null==d&&(d=void 0),null==e&&(e=!1),null==f&&(f=!0),null==b?b=this.model:this.model=b,this.gObject||(this.setOptions(this.scope,f),g=!0),a){case"all":return c.each(this.keys,function(a){return function(c,g){return a.setMyScope(g,b,d,e,f)}}(this));case"icon":return this.maybeSetScopeValue({gSetter:this.setIcon,doDraw:f});case"coords":return this.maybeSetScopeValue({gSetter:this.setCoords,doDraw:f});case"options":if(!g)return this.createMarker(b,d,e,f)}},o.prototype.createMarker=function(a,b,c,d){return null==b&&(b=void 0),null==c&&(c=!1),null==d&&(d=!0),this.maybeSetScopeValue({gSetter:this.setOptions,doDraw:d}),this.firstTime=!1},o.prototype.maybeSetScopeValue=function(a){var b,c,d;if(c=a.gSetter,b=null==(d=a.doDraw)||d,null!=c&&c(this.scope,b),this.doDrawSelf&&b)return this.gManager.draw()},o.prototype.isNotValid=function(a,b){var c,d;return null==b&&(b=!0),d=!!b&&void 0===this.gObject,c=!this.trackModel&&a.$id!==this.scope.$id,c||d},o.prototype.setCoords=function(a,b){if(null==b&&(b=!0),!this.isNotValid(a)&&null!=this.gObject)return this.renderGMarker(b,function(b){return function(){var c,d,e;if(d=b.getProp("coords",a,b.model),c=b.getCoords(d),e=b.gObject.getPosition(),null==e||null==c||c.lng()!==e.lng()||c.lat()!==e.lat())return b.gObject.setPosition(c),b.gObject.setVisible(b.validateCoords(d))}}(this))},o.prototype.setIcon=function(a,b){if(null==b&&(b=!0),!this.isNotValid(a)&&null!=this.gObject)return this.renderGMarker(b,function(b){return function(){var c,d,e;if(e=b.gObject.getIcon(),d=b.getProp("icon",a,b.model),e!==d)return b.gObject.setIcon(d),c=b.getProp("coords",a,b.model),b.gObject.setPosition(b.getCoords(c)),b.gObject.setVisible(b.validateCoords(c))}}(this))},o.prototype.setOptions=function(a,b){var d;if(null==b&&(b=!0),!this.isNotValid(a,!1)){if(this.renderGMarker(b,function(b){return function(){var d,e,f;if(e=b.getProp("coords",a,b.model),f=b.getProp("icon",a,b.model),d=b.getProp("options",a,b.model),b.opts=b.createOptions(e,f,d),b.isLabel(b.gObject)!==b.isLabel(b.opts)&&null!=b.gObject&&(b.gManager.remove(b.gObject),b.gObject=void 0),null!=b.gObject&&b.gObject.setOptions(b.setLabelOptions(b.opts)),b.gObject||(b.isLabel(b.opts)?b.gObject=new MarkerWithLabel(b.setLabelOptions(b.opts)):b.opts.content?(b.gObject=new RichMarker(b.opts),b.gObject.getIcon=b.gObject.getContent,b.gObject.setIcon=b.gObject.setContent):b.gObject=new google.maps.Marker(b.opts),c.extend(b.gObject,{model:b.model})),b.externalListeners&&b.removeEvents(b.externalListeners),b.internalListeners&&b.removeEvents(b.internalListeners),b.externalListeners=b.setEvents(b.gObject,b.scope,b.model,["dragend"]),b.internalListeners=b.setEvents(b.gObject,{events:b.internalEvents(),$evalAsync:function(){}},b.model),null!=b.id)return b.gObject.key=b.id}}(this)),this.gObject&&(this.gObject.getMap()||this.gManager.type!==m.type))this.deferred.resolve(this.gObject);else{if(!this.gObject)return this.deferred.reject("gObject is null");null!=(d=this.gObject)&&d.getMap()&&this.gManager.type===m.type||(h.debug("gObject has no map yet"),this.deferred.resolve(this.gObject))}return this.model[this.fitKey]?this.gManager.fit():void 0}},o.prototype.setLabelOptions=function(a){return a.labelAnchor&&(a.labelAnchor=this.getLabelPositionPoint(a.labelAnchor)),a},o.prototype.internalEvents=function(){return{dragend:function(a){return function(b,c,d,e){var f,g,h;return g=a.trackModel?a.scope.model:a.model,h=a.setCoordsFromEvent(a.modelOrKey(g,a.coordsKey),a.gObject.getPosition()),g=a.setVal(d,a.coordsKey,h),f=a.scope.events,null!=(null!=f?f.dragend:void 0)&&f.dragend(b,c,g,e),a.scope.$apply()}}(this),click:function(a){return function(c,d,e,f){var g;if(g=a.getProp("click",a.scope,a.model),a.doClick&&b.isFunction(g))return a.scope.$evalAsync(g(c,d,a.model,f))}}(this)}},o}(f)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygonChildModel",["uiGmapBasePolyChildModel","uiGmapPolygonOptionsBuilder",function(b,c){var d,e,f;return f=function(a){return new google.maps.Polygon(a)},e=new b(c,f),d=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c}(e)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylineChildModel",["uiGmapBasePolyChildModel","uiGmapPolylineOptionsBuilder",function(b,c){var d,e,f;return f=function(a){return new google.maps.Polyline(a)},e=b(c,f),d=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c}(e)}])}.call(this),function(){var d=function(a,b){return function(){return a.apply(b,arguments)}},e=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},f={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapWindowChildModel",["uiGmapBaseObject","uiGmapGmapUtil","uiGmapLogger","$compile","$http","$templateCache","uiGmapChromeFixes","uiGmapEventsHelper",function(f,g,h,i,j,k,l,m){var n;return n=function(f){function n(a){this.updateModel=d(this.updateModel,this),this.destroy=d(this.destroy,this),this.remove=d(this.remove,this),this.getLatestPosition=d(this.getLatestPosition,this),this.hideWindow=d(this.hideWindow,this),this.showWindow=d(this.showWindow,this),this.handleClick=d(this.handleClick,this),this.watchOptions=d(this.watchOptions,this),this.watchCoords=d(this.watchCoords,this),this.createGWin=d(this.createGWin,this),this.watchElement=d(this.watchElement,this),this.watchAndDoShow=d(this.watchAndDoShow,this),this.doShow=d(this.doShow,this);var b,e,f,g,i;this.model=null!=(e=a.model)?e:{},this.scope=a.scope,this.opts=a.opts,this.isIconVisibleOnClick=a.isIconVisibleOnClick,this.gMap=a.gMap,this.markerScope=a.markerScope,this.element=a.element,this.needToManualDestroy=null!=(f=a.needToManualDestroy)&&f,this.markerIsVisibleAfterWindowClose=null==(g=a.markerIsVisibleAfterWindowClose)||g,this.isScopeModel=null!=(i=a.isScopeModel)&&i,this.isScopeModel&&(this.clonedModel=c.clone(this.model,!0)),this.getGmarker=function(){var a,b;if(null!=(null!=(a=this.markerScope)?a.getGMarker:void 0))return null!=(b=this.markerScope)?b.getGMarker():void 0},this.listeners=[],this.createGWin(),b=this.getGmarker(),null!=b&&b.setClickable(!0),this.watchElement(),this.watchOptions(),this.watchCoords(),this.watchAndDoShow(),this.scope.$on("$destroy",function(a){return function(){return a.destroy()}}(this)),h.info(this)}return e(n,f),n.include(g),n.include(m),n.prototype.doShow=function(a){return this.scope.show===!0||a?this.showWindow():this.hideWindow()},n.prototype.watchAndDoShow=function(){return null!=this.model.show&&(this.scope.show=this.model.show),this.scope.$watch("show",this.doShow,!0),this.doShow()},n.prototype.watchElement=function(){return this.scope.$watch(function(a){return function(){var b,c;if(a.element||a.html)return a.html!==a.element.html()&&a.gObject?(null!=(b=a.opts)&&(b.content=void 0),c=a.gObject.isOpen(),a.remove(),a.createGWin(c)):void 0}}(this))},n.prototype.createGWin=function(b){var d,e,f,g,h;if(null==b&&(b=!1),f=this.getGmarker(),e={},null!=this.opts&&(this.scope.coords&&(this.opts.position=this.getCoords(this.scope.coords)),e=this.opts),this.element&&(this.html=c.isObject(this.element)?this.element.html():this.element),d=this.scope.options?this.scope.options:e,this.opts=this.createWindowOptions(f,this.markerScope||this.scope,this.html,d),null!=this.opts)return this.gObject||(this.opts.boxClass&&a.InfoBox&&"function"==typeof a.InfoBox?this.gObject=new a.InfoBox(this.opts):this.gObject=new google.maps.InfoWindow(this.opts),this.listeners.push(google.maps.event.addListener(this.gObject,"domready",function(){return l.maybeRepaint(this.content)})),this.listeners.push(google.maps.event.addListener(this.gObject,"closeclick",function(a){return function(){return f&&(f.setAnimation(a.oldMarkerAnimation),a.markerIsVisibleAfterWindowClose&&c.delay(function(){return f.setVisible(!1),f.setVisible(a.markerIsVisibleAfterWindowClose)},250)),a.gObject.close(),a.model.show=!1,null!=a.scope.closeClick?a.scope.$evalAsync(a.scope.closeClick()):a.scope.$evalAsync()}}(this)))),this.gObject.setContent(this.opts.content),this.handleClick((null!=(g=this.scope)&&null!=(h=g.options)?h.forceClick:void 0)||b),this.doShow(this.gObject.isOpen())},n.prototype.watchCoords=function(){var a;return a=null!=this.markerScope?this.markerScope:this.scope,a.$watch("coords",function(a){return function(b,c){var d;if(b!==c){if(null==b)a.hideWindow();else if(!a.validateCoords(b))return void h.error("WindowChildMarker cannot render marker as scope.coords as no position on marker: "+JSON.stringify(a.model));if(d=a.getCoords(b),a.doShow(),a.gObject.setPosition(d),a.opts)return a.opts.position=d}}}(this),!0)},n.prototype.watchOptions=function(){return this.scope.$watch("options",function(a){return function(b,c){if(b!==c&&(a.opts=b,null!=a.gObject)){if(a.gObject.setOptions(a.opts),null!=a.opts.visible&&a.opts.visible)return a.showWindow();if(null!=a.opts.visible)return a.hideWindow()}}}(this),!0)},n.prototype.handleClick=function(a){var b,c;if(null!=this.gObject)return c=this.getGmarker(),b=function(a){return function(){if(null==a.gObject&&a.createGWin(),a.showWindow(),null!=c)return a.initialMarkerVisibility=c.getVisible(),a.oldMarkerAnimation=c.getAnimation(),c.setVisible(a.isIconVisibleOnClick)}}(this),a&&b(),c?this.listeners=this.listeners.concat(this.setEvents(c,{events:{click:b}},this.model)):void 0},n.prototype.showWindow=function(){var a,c,d;if(null!=this.gObject)return d=null,c=function(a){return function(){var b,c,d;if(!a.gObject.isOpen()){if(c=a.getGmarker(),null!=a.gObject&&null!=a.gObject.getPosition&&(d=a.gObject.getPosition()),c&&(d=c.getPosition()),!d)return;if(a.gObject.open(a.gMap,c),b=a.gObject.isOpen(),a.model.show!==b)return a.model.show=b}}}(this),this.scope.templateUrl?j.get(this.scope.templateUrl,{cache:k}).then(function(a){return function(e){var f;return d=a.scope.$new(),b.isDefined(a.scope.templateParameter)&&(d.parameter=a.scope.templateParameter),f=i(e.data)(d),a.gObject.setContent(f[0]),c()}}(this)):this.scope.template?(d=this.scope.$new(),b.isDefined(this.scope.templateParameter)&&(d.parameter=this.scope.templateParameter),a=i(this.scope.template)(d),this.gObject.setContent(a[0]),c()):c(),this.scope.$on("destroy",function(){return d.$destroy()})},n.prototype.hideWindow=function(){if(null!=this.gObject&&this.gObject.isOpen())return this.gObject.close()},n.prototype.getLatestPosition=function(a){var b;return b=this.getGmarker(),null==this.gObject||null==b||a?a?this.gObject.setPosition(a):void 0:this.gObject.setPosition(b.getPosition())},n.prototype.remove=function(){return this.hideWindow(),this.removeEvents(this.listeners),this.listeners.length=0,delete this.gObject,delete this.opts},n.prototype.destroy=function(a){var b;if(null==a&&(a=!1),this.remove(),null!=this.scope&&!(null!=(b=this.scope)?b.$$destroyed:void 0)&&(this.needToManualDestroy||a))return this.scope.$destroy()},n.prototype.updateModel=function(a){return this.isScopeModel&&(this.clonedModel=c.clone(a,!0)),c.extend(this.model,this.clonedModel||a)},n}(f)}])}.call(this), function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapBasePolysParentModel",["$timeout","uiGmapLogger","uiGmapModelKey","uiGmapModelsWatcher","uiGmapPropMap","uiGmap_async","uiGmapPromise","uiGmapFitHelper",function(e,f,g,h,i,j,k,l){return function(e,m,n){var o;return o=function(g){function o(b,d,g,h,j){this.element=d,this.attrs=g,this.gMap=h,this.defaults=j,this.maybeFit=a(this.maybeFit,this),this.createChild=a(this.createChild,this),this.pieceMeal=a(this.pieceMeal,this),this.createAllNew=a(this.createAllNew,this),this.watchIdKey=a(this.watchIdKey,this),this.createChildScopes=a(this.createChildScopes,this),this.watchDestroy=a(this.watchDestroy,this),this.onDestroy=a(this.onDestroy,this),this.rebuildAll=a(this.rebuildAll,this),this.doINeedToWipe=a(this.doINeedToWipe,this),this.watchModels=a(this.watchModels,this),o.__super__.constructor.call(this,b),this.interface=e,this.$log=f,this.plurals=new i,c.each(e.scopeKeys,function(a){return function(b){return a[b+"Key"]=void 0}}(this)),this.models=void 0,this.firstTime=!0,this.$log.info(this),this.createChildScopes()}return d(o,g),o.include(h),o.prototype.watchModels=function(a){return a.$watch("models",function(b){return function(c,d){if(c!==d)return b.doINeedToWipe(c)||a.doRebuildAll?b.rebuildAll(a,!0,!0):b.createChildScopes(!1)}}(this),!0)},o.prototype.doINeedToWipe=function(a){var b;return b=null==a||0===a.length,this.plurals.length>0&&b},o.prototype.rebuildAll=function(a,b,c){return this.onDestroy(c).then(function(a){return function(){if(b)return a.createChildScopes()}}(this))},o.prototype.onDestroy=function(){return o.__super__.onDestroy.call(this,this.scope),j.promiseLock(this,k.promiseTypes.delete,void 0,void 0,function(a){return function(){return j.each(a.plurals.values(),function(a){return a.destroy(!0)},j.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){var b;return null!=(b=a.plurals)?b.removeAll():void 0})}}(this))},o.prototype.watchDestroy=function(a){return a.$on("$destroy",function(b){return function(){return b.rebuildAll(a,!1,!0)}}(this))},o.prototype.createChildScopes=function(a){return null==a&&(a=!0),b.isUndefined(this.scope.models)?void this.$log.error("No models to create "+n+"s from! I Need direct models!"):null!=this.gMap&&null!=this.scope.models?(this.watchIdKey(this.scope),a?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1)):void 0},o.prototype.watchIdKey=function(a){return this.setIdKey(a),a.$watch("idKey",function(b){return function(c,d){if(c!==d&&null==c)return b.idKey=c,b.rebuildAll(a,!0,!0)}}(this))},o.prototype.createAllNew=function(a,b){var c;if(null==b&&(b=!1),this.models=a.models,this.firstTime&&(this.watchModels(a),this.watchDestroy(a)),!this.didQueueInitPromise(this,a))return c=null,j.promiseLock(this,k.promiseTypes.create,"createAllNew",function(a){return c=a},function(b){return function(){return j.map(a.models,function(a){var d;return d=b.createChild(a,b.gMap),c&&(f.debug("createNew should fall through safely"),d.isEnabled=!1),d.pathPoints.getArray()},j.chunkSizeFrom(a.chunk)).then(function(a){return b.maybeFit(a),b.firstTime=!1})}}(this))},o.prototype.pieceMeal=function(a,b){var d,e;if(null==b&&(b=!0),!a.$$destroyed)return d=null,e=null,this.models=a.models,null!=a&&this.modelsLength()&&this.plurals.length?j.promiseLock(this,k.promiseTypes.update,"pieceMeal",function(a){return d=a},function(b){return function(){return k.promise(function(){return b.figureOutState(b.idKey,a,b.plurals,b.modelKeyComparison)}).then(function(f){return e=f,e.updates.length&&j.each(e.updates,function(a){return c.extend(a.child.scope,a.model),a.child.model=a.model}),j.each(e.removals,function(a){if(null!=a)return a.destroy(),b.plurals.remove(a.model[b.idKey]),d},j.chunkSizeFrom(a.chunk))}).then(function(){return j.each(e.adds,function(a){return d&&f.debug("pieceMeal should fall through safely"),b.createChild(a,b.gMap),d},j.chunkSizeFrom(a.chunk)).then(function(){return b.maybeFit()})})}}(this)):(this.inProgress=!1,this.rebuildAll(this.scope,!0,!0))},o.prototype.createChild=function(a,b){var c,d;return d=this.scope.$new(!1),this.setChildScope(e.scopeKeys,d,a),d.$watch("model",function(a){return function(b,c){if(b!==c)return a.setChildScope(e.scopeKeys,d,b)}}(this),!0),d.static=this.scope.static,c=new m({isScopeModel:!0,scope:d,attrs:this.attrs,gMap:b,defaults:this.defaults,model:a,gObjectChangeCb:function(a){return function(){return a.maybeFit()}}(this)}),null==a[this.idKey]?void this.$log.error(n+" model has no id to assign a child to.\nThis is required for performance. Please assign id,\nor redirect id to a different key."):(this.plurals.put(a[this.idKey],c),c)},o.prototype.maybeFit=function(a){if(null==a&&(a=this.plurals.map(function(a){return a.pathPoints})),this.scope.fit)return a=c.flatten(a),l.fit(a,this.gMap)},o}(g)}}])}.call(this),function(){var a=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapCircleParentModel",["uiGmapLogger","$timeout","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapCircleOptionsBuilder",function(d,e,f,g,h){var i,j;return j=function(a,b){return a.settingFromDirective=!0,b(),e(function(){return a.settingFromDirective=!1})},i=function(e){function h(a,e,g,h,i){var k,l,m;this.attrs=g,this.gMap=h,this.DEFAULTS=i,this.scope=a,m=null,k=function(a){return function(){if(m=null,null!=a.listeners)return a.removeEvents(a.listeners),a.listeners=void 0}}(this),l=new google.maps.Circle(this.buildOpts(f.getCoords(a.center),a.radius)),this.setMyOptions=function(b){return function(d,e){if(!a.settingFromDirective)return!c.isEqual(d,e)||d!==e||null!=d&&null!=e&&d.coordinates!==e.coordinates?l.setOptions(b.buildOpts(f.getCoords(a.center),a.radius)):void 0}}(this),this.props=this.props.concat([{prop:"center",isColl:!0},{prop:"fill",isColl:!0},"radius","zIndex"]),this.watchProps(),null!=this.scope.control&&(this.scope.control.getCircle=function(){return l}),k(),this.listeners=this.setEvents(l,a,a,["radius_changed"])||[],this.listeners.push(google.maps.event.addListener(l,"radius_changed",function(){var d,e;if(d=l.getRadius(),d!==m)return m=d,e=function(){return j(a,function(){var b,e;if(d!==a.radius&&(a.radius=d),(null!=(b=a.events)?b.radius_changed:void 0)&&c.isFunction(null!=(e=a.events)?e.radius_changed:void 0))return a.events.radius_changed(l,"radius_changed",a,arguments)})},b.mock?e():a.$evalAsync(function(){return e()})})),this.listeners.push(google.maps.event.addListener(l,"center_changed",function(){return a.$evalAsync(function(){return j(a,function(){return b.isDefined(a.center.type)?(a.center.coordinates[1]=l.getCenter().lat(),a.center.coordinates[0]=l.getCenter().lng()):(a.center.latitude=l.getCenter().lat(),a.center.longitude=l.getCenter().lng())})})})),a.$on("$destroy",function(){return k(),l.setMap(null)}),d.info(this)}return a(h,e),h.include(f),h.include(g),h}(h)}])}.call(this),function(){var a=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapDrawingManagerParentModel",["uiGmapLogger","$timeout","uiGmapBaseObject","uiGmapEventsHelper",function(b,d,e,f){var g;return g=function(b){function d(a,b,d,e){var f,g;this.scope=a,this.attrs=d,this.map=e,f=new google.maps.drawing.DrawingManager(this.scope.options),f.setMap(this.map),g=void 0,null!=this.scope.control&&(this.scope.control.getDrawingManager=function(){return f}),!this.scope.static&&this.scope.options&&this.scope.$watch("options",function(a){return null!=f?f.setOptions(a):void 0},!0),null!=this.scope.events&&(g=this.setEvents(f,this.scope,this.scope),this.scope.$watch("events",function(a){return function(b,d){if(!c.isEqual(b,d))return null!=g&&a.removeEvents(g),g=a.setEvents(f,a.scope,a.scope)}}(this))),this.scope.$on("$destroy",function(a){return function(){return null!=g&&a.removeEvents(g),f.setMap(null),f=null}}(this))}return a(d,b),d.include(f),d}(e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIMarkerParentModel",["uiGmapModelKey","uiGmapLogger",function(e,f){var g;return g=function(e){function g(c,d,e,h){if(this.scope=c,this.element=d,this.attrs=e,this.map=h,this.onWatch=a(this.onWatch,this),this.watch=a(this.watch,this),this.validateScope=a(this.validateScope,this),g.__super__.constructor.call(this,this.scope),this.$log=f,!this.validateScope(this.scope))throw new String("Unable to construct IMarkerParentModel due to invalid scope");this.doClick=b.isDefined(this.attrs.click),null!=this.scope.options&&(this.DEFAULTS=this.scope.options),this.watch("coords",this.scope),this.watch("icon",this.scope),this.watch("options",this.scope),this.scope.$on("$destroy",function(a){return function(){return a.onDestroy(a.scope)}}(this))}return d(g,e),g.prototype.DEFAULTS={},g.prototype.validateScope=function(a){var b;return null==a?(this.$log.error(this.constructor.name+": invalid scope used"),!1):(b=null!=a.coords,b?b:(this.$log.error(this.constructor.name+": no valid coords attribute found"),!1))},g.prototype.watch=function(a,b,d){return null==d&&(d=!0),b.$watch(a,function(d){return function(e,f){if(!c.isEqual(e,f))return d.onWatch(a,b,e,f)}}(this),d)},g.prototype.onWatch=function(a,b,c,d){},g}(e)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIWindowParentModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger",function(b,c,d){var e;return e=function(b){function e(a,b,c,f,g,h,i,j){e.__super__.constructor.call(this,a),this.$log=d,this.$timeout=g,this.$compile=h,this.$http=i,this.$templateCache=j,this.DEFAULTS={},null!=a.options&&(this.DEFAULTS=a.options)}return a(e,b),e.include(c),e.prototype.getItem=function(a,b,c){return"models"===b?a[b][c]:a[b].get(c)},e}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapLayerParentModel",["uiGmapBaseObject","uiGmapLogger","$timeout",function(d,e,f){var g;return g=function(d){function f(c,d,f,g,h,i){return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.onLayerCreated=null!=h?h:void 0,this.$log=null!=i?i:e,this.createGoogleLayer=a(this.createGoogleLayer,this),null==this.attrs.type?void this.$log.info("type attribute for the layer directive is mandatory. Layer creation aborted!!"):(this.createGoogleLayer(),this.doShow=!0,b.isDefined(this.attrs.show)&&(this.doShow=this.scope.show),this.doShow&&null!=this.gMap&&this.gObject.setMap(this.gMap),this.scope.$watch("show",function(a){return function(b,c){if(b!==c)return a.doShow=b,b?a.gObject.setMap(a.gMap):a.gObject.setMap(null)}}(this),!0),this.scope.$watch("options",function(a){return function(b,c){if(b!==c&&a.doShow)return a.gObject.setOptions(b)}}(this),!0),void this.scope.$on("$destroy",function(a){return function(){return a.gObject.setMap(null)}}(this)))}return c(f,d),f.prototype.createGoogleLayer=function(){var a;if(null==this.attrs.options?this.gObject=void 0===this.attrs.namespace?new google.maps[this.attrs.type]:new google.maps[this.attrs.namespace][this.attrs.type]:this.gObject=void 0===this.attrs.namespace?new google.maps[this.attrs.type](this.scope.options):new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options),null!=this.gObject&&this.doShow&&this.gObject.setMap(this.gMap),null!=this.gObject&&null!=this.onLayerCreated)return"function"==typeof(a=this.onLayerCreated(this.scope,this.gObject))?a(this.gObject):void 0},f}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMapTypeParentModel",["uiGmapBaseObject","uiGmapLogger",function(e,f){var g;return g=function(e){function g(d,e,g,h,i,j,k){var l,m,n,o;return this.scope=d,this.element=e,this.attrs=g,this.gMap=h,this.$log=null!=i?i:f,this.childModel=j,this.propMap=k,this.refreshShown=a(this.refreshShown,this),this.hideOverlay=a(this.hideOverlay,this),this.showOverlay=a(this.showOverlay,this),this.refreshMapType=a(this.refreshMapType,this),this.createMapType=a(this.createMapType,this),null==this.scope.options?void this.$log.info("options attribute for the map-type directive is mandatory. Map type creation aborted!!"):(this.id=this.gMap.overlayMapTypesCount=this.gMap.overlayMapTypesCount+1||0,this.doShow=!0,this.createMapType(),this.refreshShown(),this.doShow&&null!=this.gMap&&this.showOverlay(),m=function(a){return function(){return a.childModel[a.attrs.show]}}(this),o=this.childModel?m:"show",this.scope.$watch(o,function(a){return function(b,c){if(b!==c)return a.doShow=b,b?a.showOverlay():a.hideOverlay()}}(this)),l=function(a){return function(){return a.childModel[a.attrs.options]}}(this),n=this.childModel?l:"options",this.scope.$watchCollection(n,function(a){return function(b,d){var e,f;if(!c.isEqual(b,d)&&(f=["tileSize","maxZoom","minZoom","name","alt"],e=c.some(f,function(a){return!d||!b||!c.isEqual(b[a],d[a])})))return a.refreshMapType()}}(this)),b.isDefined(this.attrs.refresh)&&this.scope.$watch("refresh",function(a){return function(b,d){if(!c.isEqual(b,d))return a.refreshMapType()}}(this),!0),void this.scope.$on("$destroy",function(a){return function(){return a.hideOverlay(),a.mapType=null}}(this)))}return d(g,e),g.prototype.createMapType=function(){var a,c,d;if(d=this.childModel?this.attrs.options?this.childModel[this.attrs.options]:this.childModel:this.scope.options,null!=d.getTile)this.mapType=d;else{if(null==d.getTileUrl)return void this.$log.info("options should provide either getTile or getTileUrl methods. Map type creation aborted!!");this.mapType=new google.maps.ImageMapType(d)}if(c=this.attrs.id?this.childModel?this.attrs.id:"id":void 0,a=c?this.childModel?this.childModel[c]:this.scope[c]:void 0,a&&(this.gMap.mapTypes.set(a,this.mapType),b.isDefined(this.attrs.show)||(this.doShow=!1)),this.mapType.layerId=this.id,this.childModel&&b.isDefined(this.scope.index))return this.propMap.put(this.mapType.layerId,this.scope.index)},g.prototype.refreshMapType=function(){if(this.hideOverlay(),this.mapType=null,this.createMapType(),this.doShow&&null!=this.gMap)return this.showOverlay()},g.prototype.showOverlay=function(){var a;return b.isDefined(this.scope.index)?(a=!1,this.gMap.overlayMapTypes.getLength()?(this.gMap.overlayMapTypes.forEach(function(c){return function(d,e){var f;a||(f=c.propMap.get(d.layerId.toString()),(f>c.scope.index||!b.isDefined(f))&&(a=!0,c.gMap.overlayMapTypes.insertAt(e,c.mapType)))}}(this)),a?void 0:this.gMap.overlayMapTypes.push(this.mapType)):this.gMap.overlayMapTypes.push(this.mapType)):this.gMap.overlayMapTypes.push(this.mapType)},g.prototype.hideOverlay=function(){var a;return a=!1,this.gMap.overlayMapTypes.forEach(function(b){return function(c,d){a||c.layerId!==b.id||(a=!0,b.gMap.overlayMapTypes.removeAt(d))}}(this))},g.prototype.refreshShown=function(){return this.doShow=!b.isDefined(this.attrs.show)||(this.childModel?this.childModel[this.attrs.show]:this.scope.show)},g}(e)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMapTypesParentModel",["uiGmapBaseObject","uiGmapLogger","uiGmapMapTypeParentModel","uiGmapPropMap",function(b,c,d,e){var f;return f=function(b){function f(a,b,f,g,h){var i;return this.scope=a,this.element=b,this.attrs=f,this.gMap=g,this.$log=null!=h?h:c,null==this.attrs.mapTypes?void this.$log.info("layers attribute for the map-types directive is mandatory. Map types creation aborted!!"):(i=new e,void this.scope.mapTypes.forEach(function(a){return function(b,c){var e,f;f={options:a.scope.options,show:a.scope.show,refresh:a.scope.refresh},e=a.scope.$new(),e.index=c,new d(e,null,f,a.gMap,a.$log,b,i)}}(this)))}return a(f,b),f}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMarkersParentModel",["uiGmapIMarkerParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapMarkerChildModel","uiGmap_async","uiGmapClustererMarkerManager","uiGmapMarkerManager","$timeout","uiGmapIMarker","uiGmapPromise","uiGmapGmapUtil","uiGmapLogger","uiGmapSpiderfierMarkerManager",function(e,f,g,h,i,j,k,l,m,n,o,p,q){var r,s;return s=function(a,b){return b.plurals=new g,b.scope.plurals=b.plurals,b},r=function(e){function l(b,d,e,f){this.maybeExecMappedEvent=a(this.maybeExecMappedEvent,this),this.onDestroy=a(this.onDestroy,this),this.newChildMarker=a(this.newChildMarker,this),this.pieceMeal=a(this.pieceMeal,this),this.rebuildAll=a(this.rebuildAll,this),this.createAllNew=a(this.createAllNew,this),this.bindToTypeEvents=a(this.bindToTypeEvents,this),this.createChildScopes=a(this.createChildScopes,this),this.validateScope=a(this.validateScope,this),this.onWatch=a(this.onWatch,this),l.__super__.constructor.call(this,b,d,e,f),this.interface=m,s(new g,this),this.scope.pluralsUpdate={updateCtr:0},this.$log.info(this),this.doRebuildAll=null!=this.scope.doRebuildAll&&this.scope.doRebuildAll,this.setIdKey(this.scope),this.scope.$watch("doRebuildAll",function(a){return function(b,c){if(b!==c)return a.doRebuildAll=b}}(this)),this.modelsLength()||(this.modelsRendered=!1),this.scope.$watch("models",function(a){return function(b,d){if(!c.isEqual(b,d)||!a.modelsRendered){if(0===b.length&&0===d.length)return;return a.modelsRendered=!0,a.onWatch("models",a.scope,b,d)}}}(this),!this.isTrue(e.modelsbyref)),this.watch("doCluster",this.scope),this.watch("type",this.scope),this.watch("clusterOptions",this.scope),this.watch("clusterEvents",this.scope),this.watch("typeOptions",this.scope),this.watch("typeEvents",this.scope),this.watch("fit",this.scope),this.watch("idKey",this.scope),this.gManager=void 0,this.createAllNew(this.scope)}return d(l,e),l.include(o),l.include(f),l.prototype.onWatch=function(a,b,c,d){return"idKey"===a&&c!==d&&(this.idKey=c),this.doRebuildAll||"doCluster"===a||"type"===a?this.rebuildAll(b):this.pieceMeal(b)},l.prototype.validateScope=function(a){var c;return c=b.isUndefined(a.models)||void 0===a.models,c&&this.$log.error(this.constructor.name+": no valid models attribute found"),l.__super__.validateScope.call(this,a)||c},l.prototype.createChildScopes=function(a){if(null!=this.gMap&&null!=this.scope.models)return a?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1)},l.prototype.bindToTypeEvents=function(a,d){var e,f;return null==d&&(d=["click","mouseout","mouseover"]),f=this,this.origTypeEvents?b.extend(a,this.origTypeEvents):(this.origTypeEvents={},c.each(d,function(b){return function(c){return b.origTypeEvents[c]=null!=a?a[c]:void 0}}(this))),e={},c.each(d,function(a){return e[a]=function(b){return f.maybeExecMappedEvent(b,a)}}),b.extend(a,e)},l.prototype.createAllNew=function(a){var b,c,d,e;if(null!=this.gManager&&(this.gManager instanceof q&&(b=this.gManager.isSpiderfied()),this.gManager.clear(),delete this.gManager),d=a.typeEvents||a.clusterEvents,e=a.typeOptions||a.clusterOptions,a.doCluster||"cluster"===a.type?(null!=d&&this.bindToTypeEvents(d),this.gManager=new j(this.map,void 0,e,d)):"spider"===a.type?(null!=d&&this.bindToTypeEvents(d,["spiderfy","unspiderfy"]),this.gManager=new q(this.map,void 0,e,d,this.scope),b&&this.gManager.spiderfy()):this.gManager=new k(this.map),!this.didQueueInitPromise(this,a))return c=null,i.promiseLock(this,n.promiseTypes.create,"createAllNew",function(a){return c=a},function(b){return function(){return i.each(a.models,function(d){return b.newChildMarker(d,a),c},i.chunkSizeFrom(a.chunk)).then(function(){return b.modelsRendered=!0,a.fit&&b.gManager.fit(),b.gManager.draw(),b.scope.pluralsUpdate.updateCtr+=1},i.chunkSizeFrom(a.chunk))}}(this))},l.prototype.rebuildAll=function(a){var b;if(a.doRebuild||void 0===a.doRebuild)return(null!=(b=this.scope.plurals)?b.length:void 0)?this.onDestroy(a).then(function(b){return function(){return b.createAllNew(a)}}(this)):this.createAllNew(a)},l.prototype.pieceMeal=function(a){var b,c;if(!a.$$destroyed)return b=null,c=null,this.modelsLength()&&this.scope.plurals.length?i.promiseLock(this,n.promiseTypes.update,"pieceMeal",function(a){return b=a},function(d){return function(){return n.promise(function(){return d.figureOutState(d.idKey,a,d.scope.plurals,d.modelKeyComparison)}).then(function(e){return c=e,i.each(c.removals,function(a){if(null!=a)return null!=a.destroy&&a.destroy(),d.scope.plurals.remove(a.id),b},i.chunkSizeFrom(a.chunk))}).then(function(){return i.each(c.adds,function(c){return d.newChildMarker(c,a),b},i.chunkSizeFrom(a.chunk))}).then(function(){return i.each(c.updates,function(a){return d.updateChild(a.child,a.model),b},i.chunkSizeFrom(a.chunk))}).then(function(){return(c.adds.length>0||c.removals.length>0||c.updates.length>0)&&(a.plurals=d.scope.plurals,a.fit&&d.gManager.fit(),d.gManager.draw()),d.scope.pluralsUpdate.updateCtr+=1})}}(this)):(this.inProgress=!1,this.rebuildAll(a))},l.prototype.newChildMarker=function(a,b){var c,d,e;if(!a)throw"model undefined";return null==a[this.idKey]?void this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):(this.$log.info("child",c,"markers",this.scope.markerModels),d=b.$new(!1),d.events=b.events,e={},m.scopeKeys.forEach(function(a){return e[a]=b[a]}),c=new h({scope:d,model:a,keys:e,gMap:this.map,defaults:this.DEFAULTS,doClick:this.doClick,gManager:this.gManager,doDrawSelf:!1,isScopeModel:!0}),this.scope.plurals.put(a[this.idKey],c),c)},l.prototype.onDestroy=function(a){return l.__super__.onDestroy.call(this,a),i.promiseLock(this,n.promiseTypes.delete,void 0,void 0,function(a){return function(){return i.each(a.scope.plurals.values(),function(a){if(null!=a)return a.destroy(!1)},i.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){return null!=a.gManager&&a.gManager.destroy(),a.plurals.removeAll(),a.plurals!==a.scope.plurals&&console.error("plurals out of sync for MarkersParentModel"),a.scope.pluralsUpdate.updateCtr+=1})}}(this))},l.prototype.maybeExecMappedEvent=function(a,b){var d,e;if(!this.scope.$$destroyed)return e=this.scope.typeEvents||this.scope.clusterEvents,c.isFunction(null!=e?e[b]:void 0)&&(d=this.mapTypeToPlurals(a),this.origTypeEvents[b])?this.origTypeEvents[b](d.group,d.mapped):void 0},l.prototype.mapTypeToPlurals=function(a){var b,d,e;return c.isArray(a)?b=a:c.isFunction(a.getMarkers)&&(b=a.getMarkers()),null==b?void p.error("Unable to map event as we cannot find the array group to map"):(d=(null!=(e=this.scope.plurals.values())?e.length:void 0)?b.map(function(a){return function(b){return a.scope.plurals.get(b.key).model}}(this)):[],{cluster:a,mapped:d,group:a})},l.prototype.getItem=function(a,b,c){return"models"===b?a[b][c]:a[b].get(c)},l}(e)}])}.call(this),function(){["Polygon","Polyline"].forEach(function(a){return b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmap"+a+"sParentModel",["uiGmapBasePolysParentModel","uiGmap"+a+"ChildModel","uiGmapI"+a,function(b,c,d){return b(d,c,a)}])})}.call(this),function(){var a=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapRectangleParentModel",["uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapRectangleOptionsBuilder",function(b,d,e,f){var g;return g=function(f){function g(a,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r;this.scope=a,this.attrs=e,this.gMap=f,this.DEFAULTS=g,h=void 0,k=!1,p=[],o=void 0,l=function(a){return function(){if(a.isTrue(a.attrs.fit))return a.fitMapBounds(a.gMap,h)}}(this),j=function(a){return function(){var c,d,e;return null!=a.scope.bounds&&null!=(null!=(c=a.scope.bounds)?c.sw:void 0)&&null!=(null!=(d=a.scope.bounds)?d.ne:void 0)&&a.validateBoundPoints(a.scope.bounds)?(h=a.convertBoundPoints(a.scope.bounds),b.info("new new bounds created: "+JSON.stringify(h))):null!=a.scope.bounds.getNorthEast&&null!=a.scope.bounds.getSouthWest?h=a.scope.bounds:null!=a.scope.bounds?b.error("Invalid bounds for newValue: "+JSON.stringify(null!=(e=a.scope)?e.bounds:void 0)):void 0}}(this),j(),m=new google.maps.Rectangle(this.buildOpts(h)),b.info("gObject (rectangle) created: "+m),q=!1,r=function(a){return function(){var b,c,d;if(b=m.getBounds(),c=b.getNorthEast(),d=b.getSouthWest(),!q)return a.scope.$evalAsync(function(a){if(null!=a.bounds&&null!=a.bounds.sw&&null!=a.bounds.ne&&(a.bounds.ne={latitude:c.lat(),longitude:c.lng()},a.bounds.sw={latitude:d.lat(),longitude:d.lng()}),null!=a.bounds.getNorthEast&&null!=a.bounds.getSouthWest)return a.bounds=b})}}(this),n=function(a){return function(){return l(),a.removeEvents(p),p.push(google.maps.event.addListener(m,"dragstart",function(){return k=!0})),p.push(google.maps.event.addListener(m,"dragend",function(){return k=!1,r()})),p.push(google.maps.event.addListener(m,"bounds_changed",function(){if(!k)return r()}))}}(this),i=function(a){return function(){return a.removeEvents(p),null!=o&&a.removeEvents(o),m.setMap(null)}}(this),null!=h&&n(),this.scope.$watch("bounds",function(a,b){var d;if(!(c.isEqual(a,b)&&null!=h||k))return q=!0,null==a?void i():(null==h?d=!0:l(),j(),m.setBounds(h),q=!1,d&&null!=h?n():void 0)},!0),this.setMyOptions=function(a){return function(b,d){if(!c.isEqual(b,d)&&null!=h&&null!=b)return m.setOptions(a.buildOpts(h))}}(this),this.props.push("bounds"),this.watchProps(this.props),null!=this.attrs.events&&(o=this.setEvents(m,this.scope,this.scope),this.scope.$watch("events",function(a){return function(b,d){if(!c.isEqual(b,d))return null!=o&&a.removeEvents(o),o=a.setEvents(m,a.scope,a.scope)}}(this))),this.scope.$on("$destroy",function(){return i()}),b.info(this)}return a(g,f),g.include(d),g.include(e),g}(f)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapSearchBoxParentModel",["uiGmapBaseObject","uiGmapLogger","uiGmapEventsHelper",function(d,e,f){var g;return g=function(d){function g(c,d,f,g,h,i,j){var k;return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.ctrlPosition=h,this.template=i,this.$log=null!=j?j:e,this.setVisibility=a(this.setVisibility,this),this.getBounds=a(this.getBounds,this),this.setBounds=a(this.setBounds,this),this.createSearchBox=a(this.createSearchBox,this),this.addToParentDiv=a(this.addToParentDiv,this),this.addAsMapControl=a(this.addAsMapControl,this),this.init=a(this.init,this),null==this.attrs.template?void this.$log.error("template attribute for the search-box directive is mandatory. Places Search Box creation aborted!!"):(b.isUndefined(this.scope.options)&&(this.scope.options={},this.scope.options.visible=!0),b.isUndefined(this.scope.options.visible)&&(this.scope.options.visible=!0),b.isUndefined(this.scope.options.autocomplete)&&(this.scope.options.autocomplete=!1),this.visible=this.scope.options.visible,this.autocomplete=this.scope.options.autocomplete,k=b.element("
"),k.append(this.template),this.input=k.find("input")[0],void this.init())}return c(g,d),g.include(f),g.prototype.init=function(){return this.createSearchBox(),this.scope.$watch("options",function(a){return function(c,d){if(b.isObject(c)&&(null!=c.bounds&&a.setBounds(c.bounds),null!=c.visible&&a.visible!==c.visible))return a.setVisibility(c.visible)}}(this),!0),null!=this.attrs.parentdiv?this.addToParentDiv():this.addAsMapControl(),this.visible||this.setVisibility(this.visible),this.autocomplete?this.listener=google.maps.event.addListener(this.gObject,"place_changed",function(a){return function(){return a.places=a.gObject.getPlace()}}(this)):this.listener=google.maps.event.addListener(this.gObject,"places_changed",function(a){return function(){return a.places=a.gObject.getPlaces()}}(this)),this.listeners=this.setEvents(this.gObject,this.scope,this.scope),this.$log.info(this),this.scope.$on("$stateChangeSuccess",function(a){return function(){if(null!=a.attrs.parentdiv)return a.addToParentDiv()}}(this)),this.scope.$on("$destroy",function(a){return function(){return a.gObject=null}}(this))},g.prototype.addAsMapControl=function(){return this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input)},g.prototype.addToParentDiv=function(){var a;if(this.parentDiv=b.element(document.getElementById(this.scope.parentdiv)),null!=(a=this.parentDiv)?a.length:void 0)return this.parentDiv.append(this.input)},g.prototype.createSearchBox=function(){return this.autocomplete?this.gObject=new google.maps.places.Autocomplete(this.input,this.scope.options):this.gObject=new google.maps.places.SearchBox(this.input,this.scope.options)},g.prototype.setBounds=function(a){if(b.isUndefined(a.isEmpty))this.$log.error("Error: SearchBoxParentModel setBounds. Bounds not an instance of LatLngBounds.");else if(a.isEmpty()===!1&&null!=this.gObject)return this.gObject.setBounds(a)},g.prototype.getBounds=function(){return this.gObject.getBounds()},g.prototype.setVisibility=function(a){return null!=this.attrs.parentdiv?a===!1?this.parentDiv.addClass("ng-hide"):this.parentDiv.removeClass("ng-hide"):a===!1?this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].clear():this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input),this.visible=a},g}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapWindowsParentModel",["uiGmapIWindowParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapWindowChildModel","uiGmapLinked","uiGmap_async","uiGmapLogger","$timeout","$compile","$http","$templateCache","$interpolate","uiGmapPromise","uiGmapIWindow","uiGmapGmapUtil",function(e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){var t;return t=function(e){function t(b,d,e,f,h,j){this.gMap=h,this.markersScope=j,this.modelKeyComparison=a(this.modelKeyComparison,this), this.interpolateContent=a(this.interpolateContent,this),this.setChildScope=a(this.setChildScope,this),this.createWindow=a(this.createWindow,this),this.setContentKeys=a(this.setContentKeys,this),this.pieceMeal=a(this.pieceMeal,this),this.createAllNew=a(this.createAllNew,this),this.watchIdKey=a(this.watchIdKey,this),this.createChildScopes=a(this.createChildScopes,this),this.watchOurScope=a(this.watchOurScope,this),this.watchDestroy=a(this.watchDestroy,this),this.onDestroy=a(this.onDestroy,this),this.rebuildAll=a(this.rebuildAll,this),this.doINeedToWipe=a(this.doINeedToWipe,this),this.watchModels=a(this.watchModels,this),this.go=a(this.go,this),t.__super__.constructor.call(this,b,d,e,f,l,m,n,o),this.interface=r,this.plurals=new g,c.each(r.scopeKeys,function(a){return function(b){return a[b+"Key"]=void 0}}(this)),this.linked=new i(b,d,e,f),this.contentKeys=void 0,this.isIconVisibleOnClick=void 0,this.firstTime=!0,this.firstWatchModels=!0,this.$log.info(self),this.parentScope=void 0,this.go(b)}return d(t,e),t.include(f),t.prototype.go=function(a){return this.watchOurScope(a),this.doRebuildAll=null!=this.scope.doRebuildAll&&this.scope.doRebuildAll,a.$watch("doRebuildAll",function(a){return function(b,c){if(b!==c)return a.doRebuildAll=b}}(this)),this.createChildScopes()},t.prototype.watchModels=function(a){var b;return b=null!=this.markersScope?"pluralsUpdate":"models",a.$watch(b,function(b){return function(d,e){var f;if(!c.isEqual(d,e)||b.firstWatchModels)return b.firstWatchModels=!1,b.doRebuildAll||b.doINeedToWipe(a.models)?b.rebuildAll(a,!0,!0):(f=0===b.plurals.length,null!=b.existingPieces?c.last(b.existingPieces._content).then(function(){return b.createChildScopes(f)}):b.createChildScopes(f))}}(this),!0)},t.prototype.doINeedToWipe=function(a){var b;return b=null==a||0===a.length,this.plurals.length>0&&b},t.prototype.rebuildAll=function(a,b,c){return this.onDestroy(c).then(function(a){return function(){if(b)return a.createChildScopes()}}(this))},t.prototype.onDestroy=function(a){return t.__super__.onDestroy.call(this,this.scope),j.promiseLock(this,q.promiseTypes.delete,void 0,void 0,function(a){return function(){return j.each(a.plurals.values(),function(a){return a.destroy(!0)},j.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){var b;return null!=(b=a.plurals)?b.removeAll():void 0})}}(this))},t.prototype.watchDestroy=function(a){return a.$on("$destroy",function(b){return function(){return b.firstWatchModels=!0,b.firstTime=!0,b.rebuildAll(a,!1,!0)}}(this))},t.prototype.watchOurScope=function(a){return c.each(r.scopeKeys,function(b){return function(c){var d;return d=c+"Key",b[d]="function"==typeof a[c]?a[c]():a[c]}}(this))},t.prototype.createChildScopes=function(a){var c,d,e;return null==a&&(a=!0),this.isIconVisibleOnClick=!0,b.isDefined(this.linked.attrs.isiconvisibleonclick)&&(this.isIconVisibleOnClick=this.linked.scope.isIconVisibleOnClick),c=b.isUndefined(this.linked.scope.models),!c||void 0!==this.markersScope&&void 0!==(null!=(d=this.markersScope)?d.plurals:void 0)&&void 0!==(null!=(e=this.markersScope)?e.models:void 0)?null!=this.gMap?null!=this.linked.scope.models?(this.watchIdKey(this.linked.scope),a?this.createAllNew(this.linked.scope,!1):this.pieceMeal(this.linked.scope,!1)):(this.parentScope=this.markersScope,this.watchIdKey(this.parentScope),a?this.createAllNew(this.markersScope,!0,"plurals",!1):this.pieceMeal(this.markersScope,!0,"plurals",!1)):void 0:void this.$log.error("No models to create windows from! Need direct models or models derived from markers!")},t.prototype.watchIdKey=function(a){return this.setIdKey(a),a.$watch("idKey",function(b){return function(c,d){if(c!==d&&null==c)return b.idKey=c,b.rebuildAll(a,!0,!0)}}(this))},t.prototype.createAllNew=function(a,b,c,d){var e;if(null==c&&(c="models"),null==d&&(d=!1),this.firstTime&&(this.watchModels(a),this.watchDestroy(a)),this.setContentKeys(a.models),!this.didQueueInitPromise(this,a))return e=null,j.promiseLock(this,q.promiseTypes.create,"createAllNew",function(a){return e=a},function(d){return function(){return j.each(a.models,function(f){var g,h;return g=b&&null!=(h=d.getItem(a,c,f[d.idKey]))?h.gObject:void 0,e||(!g&&d.markersScope&&k.error("Unable to get gMarker from markersScope!"),d.createWindow(f,g,d.gMap)),e},j.chunkSizeFrom(a.chunk)).then(function(){return d.firstTime=!1})}}(this))},t.prototype.pieceMeal=function(a,b,c,d){var e,f;if(null==c&&(c="models"),null==d&&(d=!0),!a.$$destroyed)return e=null,f=null,null!=a&&this.modelsLength()&&this.plurals.length?j.promiseLock(this,q.promiseTypes.update,"pieceMeal",function(a){return e=a},function(b){return function(){return q.promise(function(){return b.figureOutState(b.idKey,a,b.plurals,b.modelKeyComparison)}).then(function(c){return f=c,j.each(f.removals,function(a){if(null!=a)return b.plurals.remove(a.id),null!=a.destroy&&a.destroy(!0),e},j.chunkSizeFrom(a.chunk))}).then(function(){return j.each(f.adds,function(d){var f,g;if(f=null!=(g=b.getItem(a,c,d[b.idKey]))?g.gObject:void 0,!f)throw"Gmarker undefined";return b.createWindow(d,f,b.gMap),e})}).then(function(){return j.each(f.updates,function(a){return b.updateChild(a.child,a.model),e},j.chunkSizeFrom(a.chunk))})}}(this)):(k.debug("pieceMeal: rebuildAll"),this.rebuildAll(this.scope,!0,!0))},t.prototype.setContentKeys=function(a){if(this.modelsLength(a))return this.contentKeys=Object.keys(a[0])},t.prototype.createWindow=function(a,b,c){var d,e,f,g,i,j;return e=this.linked.scope.$new(!1),this.setChildScope(e,a),e.$watch("model",function(a){return function(b,c){if(b!==c)return a.setChildScope(e,b)}}(this),!0),f={html:function(b){return function(){return b.interpolateContent(b.linked.element.html(),a)}}(this)},this.DEFAULTS=this.scopeOrModelVal(this.optionsKey,this.scope,a)||{},g=this.createWindowOptions(b,e,f.html(),this.DEFAULTS),d=new h({model:a,scope:e,opts:g,isIconVisibleOnClick:this.isIconVisibleOnClick,gMap:c,markerScope:null!=(i=this.markersScope)&&null!=(j=i.plurals.get(a[this.idKey]))?j.scope:void 0,element:f,needToManualDestroy:!1,markerIsVisibleAfterWindowClose:!0,isScopeModel:!0}),null==a[this.idKey]?void this.$log.error("Window model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):(this.plurals.put(a[this.idKey],d),d)},t.prototype.setChildScope=function(a,b){return c.each(r.scopeKeys,function(c){return function(d){var e,f;if(e=d+"Key",f="self"===c[e]?b:b[c[e]],f!==a[d])return a[d]=f}}(this)),a.model=b},t.prototype.interpolateContent=function(a,b){var c,d,e,f,g,h;if(void 0!==this.contentKeys&&0!==this.contentKeys.length){for(c=p(a),e={},h=this.contentKeys,d=0,g=h.length;d"),o=function(a,b,c){return c&&(b[0].index=c),a.controls[google.maps.ControlPosition[n]].push(b[0])},j?l(function(a){return k.append(a),o(d,k.children(),m)}):e.get(a.template,{cache:f}).then(function(c){var d,e,f;return d=c.data,f=a.$new(),k.append(d),b.isDefined(a.controller)&&(e=h(a.controller,{$scope:f}),k.children().data("$ngControllerController",e)),i=g(k.children())(f)}).catch(function(a){return c.$log.error("mapControl: template could not be found")}).then(function(){return o(d,i,m)})}):void c.$log.error("mapControl: invalid position property")}}(this))},k}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapDragZoom",["uiGmapCtrlHandle","uiGmapPropertyAction",function(a,b){return{restrict:"EMA",transclude:!0,template:'',require:"^uiGmapGoogleMap",scope:{keyboardkey:"=",options:"=",spec:"="},controller:["$scope","$element",function(b,d){return b.ctrlType="uiGmapDragZoom",c.extend(this,a.handle(b,d))}],link:function(c,d,e,f){return a.mapPromise(c,f).then(function(a){var d,e,f;return d=function(b){return a.enableKeyDragZoom(b)},e=new b(function(a,b){return b?d({key:b}):d()}),f=new b(function(a,b){if(b)return d(b)}),c.$watch("keyboardkey",e.sic("keyboardkey")),e.sic(c.keyboardkey),c.$watch("options",f.sic("options")),f.sic(c.options)})}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapDrawingManager",["uiGmapIDrawingManager","uiGmapDrawingManagerParentModel",function(a,b){return c.extend(a,{link:function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return new b(a,c,d,e)})}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapApiFreeDrawPolygons",["uiGmapLogger","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapDrawFreeHandChildModel","uiGmapLodash",function(b,e,f,g,h){var i;return i=function(e){function i(){return this.link=a(this.link,this),i.__super__.constructor.apply(this,arguments)}return d(i,e),i.include(f),i.prototype.restrict="EMA",i.prototype.replace=!0,i.prototype.require="^uiGmapGoogleMap",i.prototype.scope={polygons:"=",draw:"="},i.prototype.link=function(a,d,e,f){return this.mapPromise(a,f).then(function(d){return function(d){var e,i;return a.polygons?c.isArray(a.polygons)?(e=new g(d,f.getScope()),i=void 0,a.draw=function(){return"function"==typeof i&&i(),e.engage(a.polygons).then(function(){var b;return b=!0,i=a.$watchCollection("polygons",function(a,c){var d;return b||a===c?void(b=!1):(d=h.differenceObjects(c,a),d.forEach(function(a){return a.setMap(null)}))})})}):b.error("Free Draw Polygons must be of type Array!"):b.error("No polygons to bind to!")}}(this))},i}(e)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapICircle",[function(){return{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{center:"=center",radius:"=radius",stroke:"=stroke",fill:"=fill",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=icons",visible:"=",events:"=",control:"=",zIndex:"=zindex"}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIControl",["uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d){var e;return e=function(b){function e(){this.restrict="EA",this.replace=!0,this.require="^uiGmapGoogleMap",this.scope={template:"@template",position:"@position",controller:"@controller",index:"@index"},this.$log=c}return a(e,b),e.extend(d),e.prototype.link=function(a,b,c,d){throw new Error("Not implemented!!")},e}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapIDrawingManager",[function(){return{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{static:"@",control:"=",options:"=",events:"="}}}])}.call(this),function(){var a=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIMarker",["uiGmapBaseObject","uiGmapCtrlHandle",function(b,d){var e;return e=function(b){function e(){this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.replace=!0,this.scope=c.extend(this.scope||{},e.scope)}return a(e,b),e.scope={coords:"=coords",icon:"=icon",click:"&click",options:"=options",events:"=events",fit:"=fit",idKey:"=idkey",control:"=control"},e.scopeKeys=c.keys(e.scope),e.keys=e.scopeKeys,e.extend(d),e}(b)}])}.call(this),function(){var a=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolygon",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,d,e,f){var g;return g=function(d){function g(){}return a(g,d),g.scope={path:"=path",stroke:"=stroke",clickable:"=",draggable:"=",editable:"=",geodesic:"=",fill:"=",icons:"=icons",visible:"=",static:"=",events:"=",zIndex:"=zindex",fit:"=",control:"=control"},g.scopeKeys=c.keys(g.scope),g.include(b),g.extend(f),g.prototype.restrict="EMA",g.prototype.replace=!0,g.prototype.require="^uiGmapGoogleMap",g.prototype.scope=g.scope,g.prototype.DEFAULTS={},g.prototype.$log=e,g}(d)}])}.call(this),function(){var a=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolyline",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,d,e,f){var g;return g=function(d){function g(){}return a(g,d),g.scope={path:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=",visible:"=",static:"=",fit:"=",events:"=",zIndex:"=zindex"},g.scopeKeys=c.keys(g.scope),g.include(b),g.extend(f),g.prototype.restrict="EMA",g.prototype.replace=!0,g.prototype.require="^uiGmapGoogleMap",g.prototype.scope=g.scope,g.prototype.DEFAULTS={},g.prototype.$log=e,g}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapIRectangle",[function(){return{restrict:"EMA",require:"^uiGmapGoogleMap",replace:!0,scope:{bounds:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",fill:"=",visible:"=",events:"="}}}])}.call(this),function(){var a=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIWindow",["uiGmapBaseObject","uiGmapChildEvents","uiGmapCtrlHandle",function(b,d,e){var f;return f=function(b){function f(){this.restrict="EMA",this.template=void 0,this.transclude=!0,this.priority=-100,this.require="^uiGmapGoogleMap",this.replace=!0,this.scope=c.extend(this.scope||{},f.scope)}return a(f,b),f.scope={coords:"=coords",template:"=template",templateUrl:"=templateurl",templateParameter:"=templateparameter",isIconVisibleOnClick:"=isiconvisibleonclick",closeClick:"&closeclick",options:"=options",control:"=control",show:"=show"},f.scopeKeys=c.keys(f.scope),f.include(d),f.extend(e),f}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMap",["$timeout","$q","$log","uiGmapGmapUtil","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapIsReady","uiGmapuuid","uiGmapExtendGWin","uiGmapExtendMarkerClusterer","uiGmapGoogleMapsUtilV3","uiGmapGoogleMapApi","uiGmapEventsHelper","uiGmapGoogleMapObjectManager",function(e,f,g,h,i,j,k,l,m,n,o,p,q,r){var s,t,u;return s=void 0,u=[o,m,n],t=function(f){function i(){this.link=a(this.link,this);var b;b=function(a){var b,d;return d=void 0,a.$on("$destroy",function(){return k.decrement()}),b=j.handle(a),a.ctrlType="Map",a.deferred.promise.then(function(){return u.forEach(function(a){return a.init()})}),b.getMap=function(){return a.map},d=c.extend(this,b)},this.controller=["$scope",b]}return d(i,f),i.include(h),i.prototype.restrict="EMA",i.prototype.transclude=!0,i.prototype.replace=!1,i.prototype.template='
\n
',i.prototype.scope={center:"=",zoom:"=",dragging:"=",control:"=",options:"=",events:"=",eventOpts:"=",styles:"=",bounds:"=",update:"="},i.prototype.link=function(a,d,f){var h;return h=[],a.$on("$destroy",function(){if(q.removeEvents(h),"true"===f.recycleMapInstance&&a.map)return r.recycleMapInstance(a.map),a.map=null}),a.idleAndZoomChanged=!1,p.then(function(i){return function(j){var m,n,o,p,t,u,v,w,x,y,z,A,B,C,D,E,F;if(s={mapTypeId:j.MapTypeId.ROADMAP},C=k.spawn(),A=function(){return C.deferred.resolve({instance:C.instance,map:m})},!b.isDefined(a.center)&&!b.isDefined(a.bounds))return void g.error("angular-google-maps: a center or bounds property is required");if(b.isDefined(a.center)||(a.center=new google.maps.LatLngBounds(i.getCoords(a.bounds.southwest),i.getCoords(a.bounds.northeast)).getCenter()),b.isDefined(a.zoom)||(a.zoom=10),t=b.element(d),t.addClass("angular-google-map"),y={options:{}},f.options&&(y.options=a.options),f.styles&&(y.styles=a.styles),f.type&&(D=f.type.toUpperCase(),google.maps.MapTypeId.hasOwnProperty(D)?y.mapTypeId=google.maps.MapTypeId[f.type.toUpperCase()]:g.error("angular-google-maps: invalid map type '"+f.type+"'")),w=b.extend({},s,y,{center:i.getCoords(a.center),zoom:a.zoom,bounds:a.bounds}),m="true"===f.recycleMapInstance?r.createMapInstance(t.find("div")[1],w):new google.maps.Map(t.find("div")[1],w),m.uiGmap_id=l.generate(),p=!1,h.push(google.maps.event.addListenerOnce(m,"idle",function(){return a.deferred.resolve(m),A()})),o=f.events&&null!=(null!=(z=a.events)?z.blacklist:void 0)?a.events.blacklist:[],c.isString(o)&&(o=[o]),x=function(b,d,e){if(!c.includes(o,b))return e&&e(),h.push(google.maps.event.addListener(m,b,function(){var b;if(!(null!=(b=a.update)?b.lazy:void 0))return d()}))},c.includes(o,"all")||(x("dragstart",function(){return p=!0,a.$evalAsync(function(a){if(null!=a.dragging)return a.dragging=p})}),x("dragend",function(){return p=!1,a.$evalAsync(function(a){if(null!=a.dragging)return a.dragging=p})}),E=function(d,e){var f,g;if(null==d&&(d=m.center),null==e&&(e=a),!c.includes(o,"center"))if(f=d.lat(),g=d.lng(),b.isDefined(e.center.type)){if(e.center.coordinates[1]!==f&&(e.center.coordinates[1]=f),e.center.coordinates[0]!==g)return e.center.coordinates[0]=g}else if(e.center.latitude!==f&&(e.center.latitude=f),e.center.longitude!==g)return e.center.longitude=g},B=!1,x("idle",function(){var b,d,e;return b=m.getBounds(),d=b.getNorthEast(),e=b.getSouthWest(),B=!0,a.$evalAsync(function(b){return E(),c.isUndefined(b.bounds)||c.includes(o,"bounds")||(b.bounds.northeast={latitude:d.lat(),longitude:d.lng()},b.bounds.southwest={latitude:e.lat(),longitude:e.lng()}),c.includes(o,"zoom")||(b.zoom=m.zoom,a.idleAndZoomChanged=!a.idleAndZoomChanged),B=!1})})),b.isDefined(a.events)&&null!==a.events&&b.isObject(a.events)){v=function(b){return function(){return a.events[b].apply(a,[m,b,arguments])}},n=[];for(u in a.events)a.events.hasOwnProperty(u)&&b.isFunction(a.events[u])&&n.push(google.maps.event.addListener(m,u,v(u)));h.concat(n)}return m.getOptions=function(){return w},a.map=m,null!=f.control&&null!=a.control&&(a.control.refresh=function(a){var b,c,d;if(null!=m)return null!=("undefined"!=typeof google&&null!==google&&null!=(c=google.maps)&&null!=(d=c.event)?d.trigger:void 0)&&null!=m&&google.maps.event.trigger(m,"resize"),null!=(null!=a?a.latitude:void 0)&&null!=(null!=a?a.longitude:void 0)?(b=i.getCoords(a),i.isTrue(f.pan)?m.panTo(b):m.setCenter(b)):void 0},a.control.getGMap=function(){return m},a.control.getMapOptions=function(){return w},a.control.getCustomEventListeners=function(){return n},a.control.removeEvents=function(a){return q.removeEvents(a)}),a.$watch("center",function(b,c){var d;if(b!==c&&!B&&(d=i.getCoords(a.center),d.lat()!==m.center.lat()||d.lng()!==m.center.lng()))return p?void 0:(i.validateCoords(b)||g.error("Invalid center for newValue: "+JSON.stringify(b)),i.isTrue(f.pan)&&a.zoom===m.zoom?m.panTo(d):m.setCenter(d))},!0),F=null,a.$watch("zoom",function(b,d){var f,g;if(null!=b&&!c.isEqual(b,d)&&(null!=m?m.getZoom():void 0)!==(null!=a?a.zoom:void 0)&&!B)return null!=F&&e.cancel(F),F=e(function(){return m.setZoom(b)},(null!=(f=a.eventOpts)&&null!=(g=f.debounce)?g.zoomMs:void 0)+20,!1)}),a.$watch("bounds",function(a,b){var c,d,e,f,h,i,j;if(a!==b)return null==(null!=a&&null!=(e=a.northeast)?e.latitude:void 0)||null==(null!=a&&null!=(f=a.northeast)?f.longitude:void 0)||null==(null!=a&&null!=(h=a.southwest)?h.latitude:void 0)||null==(null!=a&&null!=(i=a.southwest)?i.longitude:void 0)?void g.error("Invalid map bounds for new value: "+JSON.stringify(a)):(d=new google.maps.LatLng(a.northeast.latitude,a.northeast.longitude),j=new google.maps.LatLng(a.southwest.latitude,a.southwest.longitude),c=new google.maps.LatLngBounds(j,d),m.fitBounds(c))}),["options","styles"].forEach(function(b){return a.$watch(b,function(a,d){if(!c.isEqual(a,d))return"options"===b?y.options=a:y.options[b]=a,null!=m?m.setOptions(y):void 0},!0)})}}(this))},i}(i)}])}.call(this),function(){var a=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarker",["uiGmapIMarker","uiGmapMarkerChildModel","uiGmapMarkerManager","uiGmapLogger",function(b,d,e,f){var g;return g=function(g){function h(){h.__super__.constructor.call(this),this.template='',f.info(this)}return a(h,g),h.prototype.controller=["$scope","$element",function(a,d){return a.ctrlType="Marker",c.extend(this,b.handle(a,d))}],h.prototype.link=function(a,f,g,h){var i;return i=b.mapPromise(a,h),i.then(function(f){var g,h,i;if(g=new e(f),h=c.object(b.keys,b.keys),i=new d({scope:a,model:a,keys:h,gMap:f,doClick:!0,gManager:g,doDrawSelf:!1,trackModel:!1}),i.deferred.promise.then(function(b){return a.deferred.resolve(b)}),null!=a.control)return a.control.getGMarkers=g.getGMarkers}),a.$on("$destroy",function(){var a;return"undefined"!=typeof a&&null!==a&&a.clear(),a=null})},h}(b)}])}.call(this),function(){var a=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarkers",["uiGmapIMarker","uiGmapPlural","uiGmapMarkersParentModel","uiGmap_sync","uiGmapLogger",function(b,d,e,f,g){var h;return h=function(f){function h(){h.__super__.constructor.call(this),this.template='',d.extend(this,{doCluster:"=?docluster",clusterOptions:"=clusteroptions",clusterEvents:"=clusterevents",modelsByRef:"=modelsbyref",type:"=?type",typeOptions:"=?typeoptions",typeEvents:"=?typeevents",deepComparison:"=?deepcomparison"}),g.info(this)}return a(h,f),h.prototype.controller=["$scope","$element",function(a,d){return a.ctrlType="Markers",c.extend(this,b.handle(a,d))}],h.prototype.link=function(a,f,g,h){var i,j;return i=void 0,j=function(){return a.deferred.resolve()},b.mapPromise(a,h).then(function(b){var k;return k=h.getScope(),k.$watch("idleAndZoomChanged",function(){return c.defer(i.gManager.draw)}),i=new e(a,f,g,b),d.link(a,i),null!=a.control&&(a.control.getGMarkers=function(){var a;return null!=(a=i.gManager)?a.getGMarkers():void 0},a.control.getChildMarkers=function(){return i.plurals}),c.last(i.existingPieces._content).then(function(){return j()})})},h}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapPlural",[function(){var a;return a=function(a,b){if(null!=a.control)return a.control.updateModels=function(c){return a.models=c,b.createChildScopes(!1)},a.control.newModels=function(c){return a.models=c,b.rebuildAll(a,!0,!0)},a.control.clean=function(){return b.rebuildAll(a,!1,!0)},a.control.getPlurals=function(){return b.plurals},a.control.getManager=function(){return b.gManager},a.control.hasManager=function(){return null!=b.gManager==!0},a.control.managerDraw=function(){var b;if(a.control.hasManager())return null!=(b=a.control.getManager())?b.draw():void 0}},{extend:function(a,b){return c.extend(a.scope||{},b||{},{idKey:"=idkey",doRebuildAll:"=dorebuildall",models:"=models",chunk:"=chunk",cleanchunk:"=cleanchunk",control:"=control",deepComparison:"=deepcomparison"})},link:function(b,c){return a(b,c)}}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygon",["uiGmapIPolygon","$timeout","uiGmapPolygonChildModel",function(b,d,e){var f;return f=function(d){function f(){return this.link=a(this.link,this),f.__super__.constructor.apply(this,arguments)}return c(f,d),f.prototype.link=function(a,c,d,f){var g,h;return g=[],h=b.mapPromise(a,f),null!=a.control&&(a.control.getInstance=this,a.control.polygons=g,a.control.promise=h),h.then(function(b){return function(c){return g.push(new e({scope:a,attrs:d,gMap:c,defaults:b.DEFAULTS}))}}(this))},f}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygons",["uiGmapIPolygon","$timeout","uiGmapPolygonsParentModel","uiGmapPlural",function(d,e,f,g){var h;return h=function(d){function e(){this.link=a(this.link,this),e.__super__.constructor.call(this),g.extend(this),this.$log.info(this)}return c(e,d),e.prototype.link=function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return function(h){return(b.isUndefined(a.path)||null===a.path)&&e.$log.warn("polygons: no valid path attribute found"),a.models||e.$log.warn("polygons: no models found to create from"),g.link(a,new f(a,c,d,h,e.DEFAULTS))}}(this))},e}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolyline",["uiGmapIPolyline","$timeout","uiGmapPolylineChildModel",function(d,e,f){var g;return g=function(e){function g(){return this.link=a(this.link,this),g.__super__.constructor.apply(this,arguments)}return c(g,e),g.prototype.link=function(a,c,e,g){return d.mapPromise(a,g).then(function(c){return function(d){return!b.isUndefined(a.path)&&null!==a.path&&c.validatePath(a.path)||c.$log.warn("polyline: no valid path attribute found"),new f({scope:a,attrs:e,gMap:d,defaults:c.DEFAULTS})}}(this))},g}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylines",["uiGmapIPolyline","$timeout","uiGmapPolylinesParentModel","uiGmapPlural",function(d,e,f,g){var h;return h=function(d){function e(){this.link=a(this.link,this),e.__super__.constructor.call(this),g.extend(this),this.$log.info(this)}return c(e,d),e.prototype.link=function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return function(h){return(b.isUndefined(a.path)||null===a.path)&&e.$log.warn("polylines: no valid path attribute found"),a.models||e.$log.warn("polylines: no models found to create from"),g.link(a,new f(a,c,d,h,e.DEFAULTS))}}(this))},e}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapRectangle",["uiGmapLogger","uiGmapGmapUtil","uiGmapIRectangle","uiGmapRectangleParentModel",function(a,b,d,e){return c.extend(d,{link:function(a,b,c,d){return d.getScope().deferred.promise.then(function(d){return new e(a,b,c,d)})}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindow",["uiGmapIWindow","uiGmapGmapUtil","uiGmapWindowChildModel","uiGmapLodash","uiGmapLogger",function(d,e,f,g,h){var i;return i=function(i){function j(){this.link=a(this.link,this),j.__super__.constructor.call(this),this.require=["^uiGmapGoogleMap","^?uiGmapMarker"],this.template='',h.debug(this),this.childWindows=[]}return c(j,i),j.include(e),j.prototype.link=function(a,c,e,f){var g,h;return g=f.length>1&&null!=f[1]?f[1]:void 0,h=null!=g?g.getScope():void 0,this.mapPromise=d.mapPromise(a,f[0]),this.mapPromise.then(function(d){return function(f){var i;return i=!0,b.isDefined(e.isiconvisibleonclick)&&(i=a.isIconVisibleOnClick),g?h.deferred.promise.then(function(b){return d.init(a,c,i,f,h)}):void d.init(a,c,i,f)}}(this))},j.prototype.init=function(a,b,c,d,e){var h,i,j,k,l;if(i=null!=a.options?a.options:{},k=null!=a&&this.validateCoords(a.coords),null!=(null!=e?e.getGMarker:void 0)&&(j=e.getGMarker()),l=k?this.createWindowOptions(j,a,b.html(),i):i,null!=d&&(h=new f({scope:a,opts:l,isIconVisibleOnClick:c,gMap:d,markerScope:e,element:b}),this.childWindows.push(h),a.$on("$destroy",function(a){return function(){return a.childWindows=g.withoutObjects(a.childWindows,[h],function(a,b){return a.scope.$id===b.scope.$id}),a.childWindows.length=0}}(this))),null!=a.control&&(a.control.getGWindows=function(a){return function(){return a.childWindows.map(function(a){return a.gObject})}}(this),a.control.getChildWindows=function(a){return function(){return a.childWindows}}(this),a.control.getPlurals=a.control.getChildWindows,a.control.showWindow=function(a){return function(){return a.childWindows.map(function(a){return a.showWindow()})}}(this),a.control.hideWindow=function(a){return function(){return a.childWindows.map(function(a){return a.hideWindow()})}}(this)),null!=this.onChildCreation&&null!=h)return this.onChildCreation(h)},j}(d)}])}.call(this),function(){var a=function(a,b){return function(){ return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindows",["uiGmapIWindow","uiGmapPlural","uiGmapWindowsParentModel","uiGmapPromise","uiGmapLogger",function(b,d,e,f,g){var h;return h=function(b){function h(){this.link=a(this.link,this),h.__super__.constructor.call(this),this.require=["^uiGmapGoogleMap","^?uiGmapMarkers"],this.template='',d.extend(this),g.debug(this)}return c(h,b),h.prototype.link=function(a,b,c,d){var e,g,h;return e=d[0].getScope(),g=d.length>1&&null!=d[1]?d[1]:void 0,h=null!=g?g.getScope():void 0,e.deferred.promise.then(function(e){return function(g){var i,j;return i=(null!=h&&null!=(j=h.deferred)?j.promise:void 0)||f.resolve(),i.then(function(){var f,i;return f=null!=(i=e.parentModel)?i.existingPieces:void 0,f?f.then(function(){return e.init(a,b,c,d,g,h)}):e.init(a,b,c,d,g,h)})}}(this))},h.prototype.init=function(a,b,c,f,g,h){var i;if(i=new e(a,b,c,f,g,h),d.link(a,i),null!=a.control)return a.control.getGWindows=function(){return i.plurals.map(function(a){return a.gObject})},a.control.getChildWindows=function(){return i.plurals}},h}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap",["uiGmapMap",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMarker",["$timeout","uiGmapMarker",function(a,b){return new b(a)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMarkers",["$timeout","uiGmapMarkers",function(a,b){return new b(a)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolygon",["uiGmapPolygon",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapCircle",["uiGmapCircle",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolyline",["uiGmapPolyline",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolylines",["uiGmapPolylines",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapRectangle",["uiGmapLogger","uiGmapRectangle",function(a,b){return b}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapWindow",["$timeout","$compile","$http","$templateCache","uiGmapWindow",function(a,b,c,d,e){return new e(a,b,c,d)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapWindows",["$timeout","$compile","$http","$templateCache","$interpolate","uiGmapWindows",function(a,b,c,d,e,f){return new f(a,b,c,d,e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapLayer",["$timeout","uiGmapLogger","uiGmapLayerParentModel",function(b,c,d){var e;return new(e=function(){function b(){this.link=a(this.link,this),this.$log=c,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template="",this.replace=!0,this.scope={show:"=show",type:"=type",namespace:"=namespace",options:"=options",onCreated:"&oncreated"}}return b.prototype.link=function(a,b,c,e){return e.getScope().deferred.promise.then(function(e){return function(e){return null!=a.onCreated?new d(a,b,c,e,a.onCreated):new d(a,b,c,e)}}(this))},b}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMapControl",["uiGmapControl",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapDragZoom",["uiGmapDragZoom",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapDrawingManager",["uiGmapDrawingManager",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapFreeDrawPolygons",["uiGmapApiFreeDrawPolygons",function(a){return new a}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapMapType",["$timeout","uiGmapLogger","uiGmapMapTypeParentModel",function(b,c,d){var e;return new(e=function(){function b(){this.link=a(this.link,this),this.$log=c,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template='',this.replace=!0,this.scope={show:"=show",options:"=options",refresh:"=refresh",id:"@"}}return b.prototype.link=function(a,b,c,e){return e.getScope().deferred.promise.then(function(e){return function(e){return new d(a,b,c,e)}}(this))},b}())}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapMapTypes",["$timeout","uiGmapLogger","uiGmapMapTypesParentModel",function(b,c,d){var e;return new(e=function(){function b(){this.link=a(this.link,this),this.$log=c,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template='',this.scope={mapTypes:"=mapTypes",show:"=show",options:"=options",refresh:"=refresh",id:"=idKey"}}return b.prototype.link=function(a,b,c,e){return e.getScope().deferred.promise.then(function(e){return function(e){return new d(a,b,c,e)}}(this))},b}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolygons",["uiGmapPolygons",function(a){return new a}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapSearchBox",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapSearchBoxParentModel","$http","$templateCache","$compile",function(c,d,e,f,g,h){var i;return new(i=function(){function i(){this.link=a(this.link,this),this.$log=d,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template="",this.replace=!0,this.scope={template:"=template",events:"=events",position:"=?position",options:"=?options",parentdiv:"=?parentdiv",ngModel:"=?"}}return i.prototype.require="ngModel",i.prototype.link=function(a,d,i,j){return c.then(function(c){return function(k){return null==a.template&&(g.put("uigmap-searchbox-default.tpl.html",''),a.template="uigmap-searchbox-default.tpl.html"),f.get(a.template,{cache:g}).then(function(f){var g;return g=f.data,b.isUndefined(a.events)?void c.$log.error("searchBox: the events property is required"):j.getScope().deferred.promise.then(function(f){var j;return j=b.isDefined(a.position)?a.position.toUpperCase().replace(/-/g,"_"):"TOP_LEFT",k.ControlPosition[j]?new e(a,d,i,f,j,h(g)(a)):void c.$log.error("searchBox: invalid position property")})})}}(this))},i}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapShow",["$animate","uiGmapLogger",function(a,c){return{scope:{uiGmapShow:"=",uiGmapAfterShow:"&",uiGmapAfterHide:"&"},link:function(d,e){var f,g,h;return f=function(b,c){return a[b](e,"ng-hide").then(function(){return c()})},g=function(b,c){return a[b](e,"ng-hide",c)},h=function(a,d){return b.version.major>1?c.error("uiGmapShow is not supported for Angular Major greater than 1.\nYour Major is "+b.version.major+'"'):1===b.version.major&&b.version.minor<3?g(a,d):f(a,d)},d.$watch("uiGmapShow",function(a){if(a&&h("removeClass",d.uiGmapAfterShow),!a)return h("addClass",d.uiGmapAfterHide)})}}}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapStreetViewPanorama",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper",function(a,c,d,e){var f;return f="uiGmapStreetViewPanorama",{restrict:"EMA",template:'
',replace:!0,scope:{focalcoord:"=",radius:"=?",events:"=?",options:"=?",control:"=?",povoptions:"=?",imagestatus:"="},link:function(g,h,i){return a.then(function(a){return function(a){var i,j,k,l,m,n,o,p,q,r;return p=void 0,r=void 0,k=!1,n=void 0,o=null,q=null,i=function(){if(e.removeEvents(n),null!=p&&(p.unbind("position"),p.setVisible(!1)),null!=r)return null!=(null!=r?r.setVisible:void 0)&&r.setVisible(!1),r=void 0},m=function(a,c){var d;return d=google.maps.geometry.spherical.computeHeading(a,c),k=!0,g.radius=g.radius||50,q=b.extend({heading:d,zoom:1,pitch:0},g.povoptions||{}),o=o=b.extend({navigationControl:!1,addressControl:!1,linksControl:!1,position:a,pov:q,visible:!0},g.options||{}),k=!1},j=function(){var a;return g.focalcoord?g.radius?(i(),null==r&&(r=new google.maps.StreetViewService),g.events&&(n=e.setEvents(r,g,g)),a=d.getCoords(g.focalcoord),r.getPanoramaByLocation(a,g.radius,function(b,c){var d,e,f;if(null!=g.imagestatus&&(g.imagestatus=c),null!=(null!=(f=g.events)?f.image_status_changed:void 0)&&g.events.image_status_changed(r,"image_status_changed",g,c),"OK"===c)return e=b.location.latLng,m(e,a),d=h[0],p=new google.maps.StreetViewPanorama(d,o)})):void c.error(f+": needs a radius to set the camera view from its focal target."):void c.error(f+": focalCoord needs to be defined")},null!=g.control&&(g.control.getOptions=function(){return o},g.control.getPovOptions=function(){return q},g.control.getGObject=function(){return r},g.control.getGPano=function(){return p}),g.$watch("options",function(a,b){if(a!==b&&a!==o&&!k)return j()}),l=!0,g.$watch("focalcoord",function(a,b){if((a!==b||l)&&null!=a)return l=!1,j()}),g.$on("$destroy",function(){return i()})}}(this))}}}])}.call(this),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapuuid",function(){function a(){}return a.generate=function(){var b=a._gri,c=a._ha;return c(b(32),8)+"-"+c(b(16),4)+"-"+c(16384|b(12),4)+"-"+c(32768|b(14),4)+"-"+c(b(48),12)},a._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<>>=1,e+=e)1&d&&(c=e+c);return c},a}),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapGoogleMapsUtilV3",function(){return{init:c.once(function(){+function(){function b(a,c){a.getMarkerClusterer().extend(b,google.maps.OverlayView),this.cluster_=a,this.className_=a.getMarkerClusterer().getClusterClass(),this.styles_=c,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(a.getMap())}function c(a){this.markerClusterer_=a,this.map_=a.getMap(),this.gridSize_=a.getGridSize(),this.minClusterSize_=a.getMinimumClusterSize(),this.averageCenter_=a.getAverageCenter(),this.hideLabel_=a.getHideLabel(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new b(this,a.getStyles())}function e(a,b,c){this.extend(e,google.maps.OverlayView),b=b||[],c=c||{},this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=c.gridSize||60,this.minClusterSize_=c.minimumClusterSize||2,this.maxZoom_=c.maxZoom||null,this.styles_=c.styles||[],this.title_=c.title||"",this.zoomOnClick_=!0,void 0!==c.zoomOnClick&&(this.zoomOnClick_=c.zoomOnClick),this.averageCenter_=!1,void 0!==c.averageCenter&&(this.averageCenter_=c.averageCenter),this.ignoreHidden_=!1,void 0!==c.ignoreHidden&&(this.ignoreHidden_=c.ignoreHidden),this.enableRetinaIcons_=!1,void 0!==c.enableRetinaIcons&&(this.enableRetinaIcons_=c.enableRetinaIcons),this.hideLabel_=!1,void 0!==c.hideLabel&&(this.hideLabel_=c.hideLabel),this.imagePath_=c.imagePath||e.IMAGE_PATH,this.imageExtension_=c.imageExtension||e.IMAGE_EXTENSION,this.imageSizes_=c.imageSizes||e.IMAGE_SIZES,this.calculator_=c.calculator||e.CALCULATOR,this.batchSize_=c.batchSize||e.BATCH_SIZE,this.batchSizeIE_=c.batchSizeIE||e.BATCH_SIZE_IE,this.clusterClass_=c.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(b,!0),this.setMap(a)}function f(a){a=a||{},google.maps.OverlayView.apply(this,arguments),this.content_=a.content||"",this.disableAutoPan_=a.disableAutoPan||!1,this.maxWidth_=a.maxWidth||0,this.pixelOffset_=a.pixelOffset||new google.maps.Size(0,0),this.position_=a.position||new google.maps.LatLng(0,0),this.zIndex_=a.zIndex||null,this.boxClass_=a.boxClass||"infoBox",this.boxStyle_=a.boxStyle||{},this.closeBoxMargin_=a.closeBoxMargin||"2px",this.closeBoxURL_=a.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===a.closeBoxURL&&(this.closeBoxURL_=""),this.infoBoxClearance_=a.infoBoxClearance||new google.maps.Size(1,1),"undefined"==typeof a.visible&&("undefined"==typeof a.isHidden?a.visible=!0:a.visible=!a.isHidden),this.isHidden_=!a.visible,this.alignBottom_=a.alignBottom||!1,this.pane_=a.pane||"floatPane",this.enableEventPropagation_=a.enableEventPropagation||!1,this.div_=null,this.closeListener_=null,this.moveListener_=null,this.contextListener_=null,this.eventListeners_=null,this.fixedWidthSet_=null}function g(a,b){function c(){}c.prototype=b.prototype,a.superClass_=b.prototype,a.prototype=new c,a.prototype.constructor=a}function h(a,b,c){this.marker_=a,this.handCursorURL_=a.handCursorURL,this.labelDiv_=document.createElement("div"),this.labelDiv_.style.cssText="position: absolute; overflow: hidden;",this.eventDiv_=document.createElement("div"),this.eventDiv_.style.cssText=this.labelDiv_.style.cssText,this.eventDiv_.setAttribute("onselectstart","return false;"),this.eventDiv_.setAttribute("ondragstart","return false;"),this.crossDiv_=h.getSharedCross(b)}function i(a){a=a||{},a.labelContent=a.labelContent||"",a.labelAnchor=a.labelAnchor||new google.maps.Point(0,0),a.labelClass=a.labelClass||"markerLabels",a.labelStyle=a.labelStyle||{},a.labelInBackground=a.labelInBackground||!1,"undefined"==typeof a.labelVisible&&(a.labelVisible=!0),"undefined"==typeof a.raiseOnDrag&&(a.raiseOnDrag=!0),"undefined"==typeof a.clickable&&(a.clickable=!0),"undefined"==typeof a.draggable&&(a.draggable=!1),"undefined"==typeof a.optimized&&(a.optimized=!1),a.crossImage=a.crossImage||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png",a.handCursor=a.handCursor||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur",a.optimized=!1,this.label=new h(this,a.crossImage,a.handCursor),google.maps.Marker.apply(this,arguments)}function j(a){var b=a||{};this.ready_=!1,this.dragging_=!1,a.visible==d&&(a.visible=!0),a.shadow==d&&(a.shadow="7px -3px 5px rgba(88,88,88,0.7)"),a.anchor==d&&(a.anchor=k.BOTTOM),this.setValues(b)}b.prototype.onAdd=function(){var a,b,c=this;this.div_=document.createElement("div"),this.div_.className=this.className_,this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){b=a}),google.maps.event.addDomListener(this.div_,"mousedown",function(){a=!0,b=!1}),google.maps.event.addDomListener(this.div_,"click",function(d){if(a=!1,!b){var e,f,g=c.cluster_.getMarkerClusterer();google.maps.event.trigger(g,"click",c.cluster_),google.maps.event.trigger(g,"clusterclick",c.cluster_),g.getZoomOnClick()&&(f=g.getMaxZoom(),e=c.cluster_.getBounds(),g.getMap().fitBounds(e),setTimeout(function(){g.getMap().fitBounds(e),null!==f&&g.getMap().getZoom()>f&&g.getMap().setZoom(f+1)},100)),d.cancelBubble=!0,d.stopPropagation&&d.stopPropagation()}}),google.maps.event.addDomListener(this.div_,"mouseover",function(){var a=c.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"mouseover",c.cluster_)}),google.maps.event.addDomListener(this.div_,"mouseout",function(){var a=c.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"mouseout",c.cluster_)})},b.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},b.prototype.draw=function(){if(this.visible_){var a=this.getPosFromLatLng_(this.center_);this.div_.style.top=a.y+"px",this.div_.style.left=a.x+"px"}},b.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},b.prototype.show=function(){if(this.div_){var a="",b=this.backgroundPosition_.split(" "),c=parseInt(b[0].trim(),10),d=parseInt(b[1].trim(),10),e=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(e),a="",this.div_.innerHTML=a+"
"+(this.cluster_.hideLabel_?" ":this.sums_.text)+"
",this.div_.title="undefined"==typeof this.sums_.title||""===this.sums_.title?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title,this.div_.style.display=""}this.visible_=!0},b.prototype.useStyle=function(a){this.sums_=a;var b=Math.max(0,a.index-1);b=Math.min(this.styles_.length-1,b);var c=this.styles_[b];this.url_=c.url,this.height_=c.height,this.width_=c.width,this.anchorText_=c.anchorText||[0,0],this.anchorIcon_=c.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)],this.textColor_=c.textColor||"black",this.textSize_=c.textSize||11,this.textDecoration_=c.textDecoration||"none",this.fontWeight_=c.fontWeight||"bold",this.fontStyle_=c.fontStyle||"normal",this.fontFamily_=c.fontFamily||"Arial,sans-serif",this.backgroundPosition_=c.backgroundPosition||"0 0"},b.prototype.setCenter=function(a){this.center_=a},b.prototype.createCss=function(a){var b=[];return b.push("cursor: pointer;"),b.push("position: absolute; top: "+a.y+"px; left: "+a.x+"px;"),b.push("width: "+this.width_+"px; height: "+this.height_+"px;"),b.join("")},b.prototype.getPosFromLatLng_=function(a){var b=this.getProjection().fromLatLngToDivPixel(a);return b.x-=this.anchorIcon_[1],b.y-=this.anchorIcon_[0],b.x=parseInt(b.x,10),b.y=parseInt(b.y,10),b},c.prototype.getSize=function(){return this.markers_.length},c.prototype.getMarkers=function(){return this.markers_},c.prototype.getCenter=function(){return this.center_},c.prototype.getMap=function(){return this.map_},c.prototype.getMarkerClusterer=function(){return this.markerClusterer_},c.prototype.getBounds=function(){var a,b=new google.maps.LatLngBounds(this.center_,this.center_),c=this.getMarkers();for(a=0;ad)a.getMap()!==this.map_&&a.setMap(this.map_);else if(cb;b++)this.markers_[b].setMap(null);else a.setMap(null);return!0},c.prototype.isMarkerInClusterBounds=function(a){return this.bounds_.contains(a.getPosition())},c.prototype.calculateBounds_=function(){var a=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(a)},c.prototype.updateIcon_=function(){var a=this.markers_.length,b=this.markerClusterer_.getMaxZoom();if(null!==b&&this.map_.getZoom()>b)return void this.clusterIcon_.hide();if(ab;b++)if(a===this.markers_[b])return!0;return!1},e.prototype.onAdd=function(){var a=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){a.resetViewport_(!1),(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")}),google.maps.event.addListener(this.getMap(),"idle",function(){a.redraw_()})]},e.prototype.onRemove=function(){var a;for(a=0;a0))for(a=0;ad&&(g=d,h=e));h&&h.isMarkerInClusterBounds(a)?h.addMarker(a):(e=new c(this),e.addMarker(a),this.clusters_.push(e))},e.prototype.createClusters_=function(a){var b,c,d,e=this;if(this.ready_){0===a&&(google.maps.event.trigger(this,"clusteringbegin",this),"undefined"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),d=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var f=this.getExtendedBounds(d),g=Math.min(a+this.batchSize_,this.markers_.length);for(b=a;g>b;b++)c=this.markers_[b],!c.isAdded&&this.isMarkerInBounds_(c,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&c.getVisible())&&this.addToClosestCluster_(c);if(gthis.maxWidth_?(this.div_.style.width=this.maxWidth_,this.div_.style.overflow="auto",this.fixedWidthSet_=!0):(c=this.getBoxWidths_(),this.div_.style.width=this.div_.offsetWidth-c.left-c.right+"px",this.fixedWidthSet_=!1),this.panBox_(this.disableAutoPan_),!this.enableEventPropagation_){for(this.eventListeners_=[],b=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0;ag&&(d=o.x+k+i+m-g),this.alignBottom_?o.y<-j+n+l?e=o.y+j-n-l:o.y+j+n>h&&(e=o.y+j+n-h):o.y<-j+n?e=o.y+j-n:o.y+l+j+n>h&&(e=o.y+l+j+n-h),0!==d||0!==e){b.getCenter();b.panBy(d,e)}}},f.prototype.setBoxStyle_=function(){var a,b;if(this.div_){this.div_.className=this.boxClass_,this.div_.style.cssText="",b=this.boxStyle_;for(a in b)b.hasOwnProperty(a)&&(this.div_.style[a]=b[a]);this.div_.style.WebkitTransform="translateZ(0)","undefined"!=typeof this.div_.style.opacity&&""!==this.div_.style.opacity&&(this.div_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*this.div_.style.opacity+')"',this.div_.style.filter="alpha(opacity="+100*this.div_.style.opacity+")"),this.div_.style.position="absolute",this.div_.style.visibility="hidden",null!==this.zIndex_&&(this.div_.style.zIndex=this.zIndex_)}},f.prototype.getBoxWidths_=function(){var a,b={top:0,bottom:0,left:0,right:0},c=this.div_;return document.defaultView&&document.defaultView.getComputedStyle?(a=c.ownerDocument.defaultView.getComputedStyle(c,""), a&&(b.top=parseInt(a.borderTopWidth,10)||0,b.bottom=parseInt(a.borderBottomWidth,10)||0,b.left=parseInt(a.borderLeftWidth,10)||0,b.right=parseInt(a.borderRightWidth,10)||0)):document.documentElement.currentStyle&&c.currentStyle&&(b.top=parseInt(c.currentStyle.borderTopWidth,10)||0,b.bottom=parseInt(c.currentStyle.borderBottomWidth,10)||0,b.left=parseInt(c.currentStyle.borderLeftWidth,10)||0,b.right=parseInt(c.currentStyle.borderRightWidth,10)||0),b},f.prototype.onRemove=function(){this.div_&&(this.div_.parentNode.removeChild(this.div_),this.div_=null)},f.prototype.draw=function(){this.createInfoBoxDiv_();var a=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.style.left=a.x+this.pixelOffset_.width+"px",this.alignBottom_?this.div_.style.bottom=-(a.y+this.pixelOffset_.height)+"px":this.div_.style.top=a.y+this.pixelOffset_.height+"px",this.isHidden_?this.div_.style.visibility="hidden":this.div_.style.visibility="visible"},f.prototype.setOptions=function(a){"undefined"!=typeof a.boxClass&&(this.boxClass_=a.boxClass,this.setBoxStyle_()),"undefined"!=typeof a.boxStyle&&(this.boxStyle_=a.boxStyle,this.setBoxStyle_()),"undefined"!=typeof a.content&&this.setContent(a.content),"undefined"!=typeof a.disableAutoPan&&(this.disableAutoPan_=a.disableAutoPan),"undefined"!=typeof a.maxWidth&&(this.maxWidth_=a.maxWidth),"undefined"!=typeof a.pixelOffset&&(this.pixelOffset_=a.pixelOffset),"undefined"!=typeof a.alignBottom&&(this.alignBottom_=a.alignBottom),"undefined"!=typeof a.position&&this.setPosition(a.position),"undefined"!=typeof a.zIndex&&this.setZIndex(a.zIndex),"undefined"!=typeof a.closeBoxMargin&&(this.closeBoxMargin_=a.closeBoxMargin),"undefined"!=typeof a.closeBoxURL&&(this.closeBoxURL_=a.closeBoxURL),"undefined"!=typeof a.infoBoxClearance&&(this.infoBoxClearance_=a.infoBoxClearance),"undefined"!=typeof a.isHidden&&(this.isHidden_=a.isHidden),"undefined"!=typeof a.visible&&(this.isHidden_=!a.visible),"undefined"!=typeof a.enableEventPropagation&&(this.enableEventPropagation_=a.enableEventPropagation),this.div_&&this.draw()},f.prototype.setContent=function(a){this.content_=a,this.div_&&(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.fixedWidthSet_||(this.div_.style.width=""),"undefined"==typeof a.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+a:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(a)),this.fixedWidthSet_||(this.div_.style.width=this.div_.offsetWidth+"px","undefined"==typeof a.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+a:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(a))),this.addClickHandler_()),google.maps.event.trigger(this,"content_changed")},f.prototype.setPosition=function(a){this.position_=a,this.div_&&this.draw(),google.maps.event.trigger(this,"position_changed")},f.prototype.setZIndex=function(a){this.zIndex_=a,this.div_&&(this.div_.style.zIndex=a),google.maps.event.trigger(this,"zindex_changed")},f.prototype.setVisible=function(a){this.isHidden_=!a,this.div_&&(this.div_.style.visibility=this.isHidden_?"hidden":"visible")},f.prototype.getContent=function(){return this.content_},f.prototype.getPosition=function(){return this.position_},f.prototype.getZIndex=function(){return this.zIndex_},f.prototype.getVisible=function(){var a;return a="undefined"!=typeof this.getMap()&&null!==this.getMap()&&!this.isHidden_},f.prototype.show=function(){this.isHidden_=!1,this.div_&&(this.div_.style.visibility="visible")},f.prototype.hide=function(){this.isHidden_=!0,this.div_&&(this.div_.style.visibility="hidden")},f.prototype.open=function(a,b){var c=this;b&&(this.position_=b.getPosition(),this.moveListener_=google.maps.event.addListener(b,"position_changed",function(){c.setPosition(this.getPosition())})),this.setMap(a),this.div_&&this.panBox_()},f.prototype.close=function(){var a;if(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.eventListeners_){for(a=0;ab.left&&a.leftb.top&&a.topg;b=0<=g?++f:--f)if(c[b]===e){h=[c[c.length-1],c[b]],c[b]=h[0],c[c.length-1]=h[1],c.pop();break}return c.concat(d)},a.prototype.forEachNode=function(a){var b,d,e;e=this._nodes;for(b in e)c.call(e,b)&&(d=e[b],a(d,b))},a.prototype.forEachEdge=function(a){var b,d,e,f,g,h;g=this._nodes;for(d in g)if(c.call(g,d)){e=g[d],h=e._outEdges;for(f in h)c.call(h,f)&&(b=h[f],a(b))}},a}(),a.exports=b}).call(this)},function(a,b){(function(){var b,c,d,e;b=function(){function a(a){var b,c,d,e,f,g;for(null==a&&(a=[]),this._data=[void 0],d=0,f=a.length;d1)for(b=e=2,g=this._data.length;2<=g?eg;b=2<=g?++e:--e)this._upHeap(b);this.size=this._data.length-1}return a.prototype.add=function(a){if(null!=a)return this._data.push(a),this._upHeap(this._data.length-1),this.size++,a},a.prototype.removeMin=function(){var a;if(1!==this._data.length)return this.size--,2===this._data.length?this._data.pop():(a=this._data[1],this._data[1]=this._data.pop(),this._downHeap(),a)},a.prototype.peekMin=function(){return this._data[1]},a.prototype._upHeap=function(a){var b,c;for(b=this._data[a];this._data[a]1;)c=[this._data[d(a)],this._data[a]],this._data[a]=c[0],this._data[d(a)]=c[1],a=d(a)},a.prototype._downHeap=function(){var a,b,d;for(a=1;c(a>1},c=function(a){return a<<1},e=function(a){return(a<<1)+1},a.exports=b}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this.head={prev:void 0,value:void 0,next:void 0},this.tail={prev:void 0,value:void 0,next:void 0},this.size=0,c=0,d=a.length;c=this.size)return-1;for(b=Math.max(0,this._adjust(b)),c=this.at(b),d=b;c&&c.value!==a;)c=c.next,d++;return d===this.size?-1:d},a.prototype._adjust=function(a){return a<0?this.size+a:a},a}(),a.exports=b}).call(this)},function(a,b){(function(){var b,c,d,e,f={}.hasOwnProperty;c="_mapId_",b=function(){function a(b){var c,d;this._content={},this._itemId=0,this._id=a._newMapId(),this.size=0;for(c in b)f.call(b,c)&&(d=b[c],this.set(c,d))}return a._mapIdTracker=0,a._newMapId=function(){return this._mapIdTracker++},a.prototype.hash=function(a,b){var f,g;return null==b&&(b=!1),g=d(a),e(a)?(f=c+this._id,b&&!a[f]&&(a[f]=this._itemId++),f+"_"+a[f]):g+"_"+a},a.prototype.set=function(a,b){return this.has(a)||this.size++,this._content[this.hash(a,!0)]=[b,a],b},a.prototype.get=function(a){var b;return null!=(b=this._content[this.hash(a)])?b[0]:void 0},a.prototype.has=function(a){return this.hash(a)in this._content},a.prototype.delete=function(a){var b;return b=this.hash(a),b in this._content&&(delete this._content[b],e(a)&&delete a[c+this._id],this.size--,!0)},a.prototype.forEach=function(a){var b,c,d;d=this._content;for(b in d)f.call(d,b)&&(c=d[b],a(c[1],c[0]))},a}(),e=function(a){var b,c,e,f,g;for(b=["Boolean","Number","String","Undefined","Null","RegExp","Function"],e=d(a),f=0,g=b.length;fthis._content.length&&(this._content=this._content.slice(this._dequeueIndex),this._dequeueIndex=0),a},a.prototype.peek=function(){return this._content[this._dequeueIndex]},a}(),a.exports=b}).call(this)},function(a,b){(function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=0,d=1,e=2,h=3,f=1,b=2,g=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this._root,this.size=0,c=0,d=a.length;c=1)&&!f(g[c][1],1);c=k<=1?++i:--i)delete g[c-1][1][g[c][0]];return f(this._root[g[0][0]],1)||delete this._root[g[0][0]],a}}},a}(),f=function(a,b){var c,d;if(0===b)return!0;d=0;for(c in a)if(g.call(a,c)&&(d++,d>=b))return!0;return!1},a.exports=d}).call(this)}]),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapMarkerSpiderfier",["uiGmapGoogleMapApi",function(b){var c=this;return+function(){var b={}.hasOwnProperty,c=[].slice;this.OverlappingMarkerSpiderfier=function(){function d(a,c){var d,f,g,h,i,j;this.map=a,null==c&&(c={});for(f in c)b.call(c,f)&&(j=c[f],this[f]=j);for(this.projHelper=new this.constructor.ProjHelper(this.map),this.initMarkerArrays(),this.listeners={},i=["click","zoom_changed","maptypeid_changed"],g=0,h=i.length;gj;g=0<=j?++h:--h)c=this.circleStartAngle+g*d,k.push(new f.Point(b.x+i*Math.cos(c),b.y+i*Math.sin(c)));return k},l.generatePtsSpiral=function(a,b){var c,d,e,g,h,i,j;for(g=this.spiralLengthStart,c=0,j=[],d=e=0,i=a;0<=i?ei;d=0<=i?++e:--e)c+=this.spiralFootSeparation/g+5e-4*d,h=new f.Point(b.x+g*Math.cos(c),b.y+g*Math.sin(c)),g+=n*this.spiralLengthFactor/c,j.push(h);return j},l.spiderListener=function(b,c){var d,e,f,g,h,i,j,k,m,n,o,p,q;if(k=null!=b._omsData,k&&this.keepSpiderfied||("mouseover"===this.event?(d=this,e=function(){return d.unspiderfy()},a.clearTimeout(l.timeout),l.timeout=setTimeout(e,3e3)):this.unspiderfy()),k||this.map.getStreetView().getVisible()||"GoogleEarthAPI"===this.map.getMapTypeId())return this.trigger("click",b,c);for(n=[],o=[],m=this.nearbyDistance,p=m*m,j=this.llToPt(b.position),q=this.markers,f=0,g=q.length;f=this.circleSpiralSwitchover?this.generatePtsSpiral(n,c).reverse():this.generatePtsCircle(n,c),o=function(){var b,c,l;for(l=[],b=0,c=h.length;bc?a.getMap()!==this.map_&&a.setMap(this.map_):b3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var f=this.getExtendedBounds(d),g=Math.min(a+this.batchSize_,this.markers_.length),h=this.markers_.values();for(b=a;b",this.div_.innerHTML=a+"
"+this.sums_.text+"
","undefined"==typeof this.sums_.title||""===this.sums_.title?this.div_.title=this.cluster_.getMarkerClusterer().getTitle():this.div_.title=this.sums_.title,this.div_.style.display=""}this.visible_=!0},b}(MarkerClusterer)}).call(this)})}}])}(window,angular,_); //# sourceMappingURL=angular-google-maps-street-view_dev_mapped.min.js.map