function maxLengthCheck(n,t){n.value.length>t&&(n.value=n.value.slice(0,t))}function maxMinLengthCheck(n,t){var i=!1;return n.value.length>t?n.value=n.value.slice(0,t):i=n.value.length<t?!1:!0,i}var bmwApp=angular.module("bmwApp",["ngRoute","ngAnimate","ngMaterial","ngMessages","uiGmapgoogle-maps","angular.filter","commonMod"]).config(["uiGmapGoogleMapApiProvider",function(n){n.configure({key:"AIzaSyCw9k_dMHMc6y0dlBRI4vQs5gOBOAoGImY",v:"3.23",libraries:"weather,geometry,visualization"})}]);bmwApp.constant("API_URL","https://api2.prod.ga.aws.bmw.com.au/api/");bmwApp.config(["$compileProvider",function(n){n.aHrefSanitizationWhitelist(/^\s*(https?|file|tel|skype|mailto):/)}]);bmwApp.config(["$httpProvider",function(n){n.defaults.useXDomain=!0}]);bmwApp.run(["$anchorScroll",function(n){n.yOffset=0}]);bmwApp.directive("numbersOnly",function(){return{require:"ngModel",link:function(n,t,i,r){r.$parsers.push(function(n){if(n==undefined)return"";var t=n.replace(/[^0-9]/g,"");return t!=n&&(r.$setViewValue(t),r.$render()),t})}}}),function(){"use strict";function n(n,t){n.when("/",{templateUrl:"/App/DLO/HTML/home/index.html"}).otherwise({redirectTo:"/"});t.html5Mode({enabled:!1})}n.$inject=["$routeProvider","$locationProvider"];bmwApp.config(n);bmwApp.run(["configFactory","$rootScope",function(n,t){n.getConfig().then(function(n){t.config=n},function(){})}])}();Array.prototype.contains=function(n){for(var t=0;t<this.length;t++)if(this[t]===n)return!0;return!1};Array.prototype.unique=function(){for(var t=[],n=0;n<this.length;n++)t.contains(this[n])||t.push(this[n]);return t};!function(n){"use strict";function a(n,t,i){"addEventListener"in window?n.addEventListener(t,i,!1):"attachEvent"in window&&n.attachEvent("on"+t,i)}function dt(n,t,i){"removeEventListener"in window?n.removeEventListener(t,i,!1):"detachEvent"in window&&n.detachEvent("on"+t,i)}function gt(n){return n.charAt(0).toUpperCase()+n.slice(1)}function or(n){var i,r,f,t=null,u=0,e=function(){u=rt();t=null;f=n.apply(i,r);t||(i=r=null)};return function(){var s=rt(),o;return u||(u=s),o=w-(s-u),i=this,r=arguments,o<=0||o>w?(t&&(clearTimeout(t),t=null),u=s,f=n.apply(i,r),t||(i=r=null)):t||(t=setTimeout(e,o)),f}}function ni(n){return nt+"["+tt+"] "+n}function t(n){lt&&"object"==typeof window.console&&console.log(ni(n))}function s(n){"object"==typeof window.console&&console.warn(ni(n))}function sr(){hr();t("Initialising iFrame ("+location.href+")");cr();ar();ut("background",wi);ut("padding",bi);kr();ri();ui();vr();gr();fi();y=dr();h("init","Init message from host page");pt()}function hr(){function i(n){return"true"===n}var t=gi.substr(tr).split(":");tt=t[0];ot=n!==t[1]?Number(t[1]):ot;g=n!==t[2]?i(t[2]):g;lt=n!==t[3]?i(t[3]):lt;c=n!==t[4]?Number(t[4]):c;e=n!==t[6]?i(t[6]):e;d=t[7];r=n!==t[8]?t[8]:r;wi=t[9];bi=t[10];vt=n!==t[11]?Number(t[11]):vt;y.enable=n!==t[12]&&i(t[12]);at=n!==t[13]?t[13]:at;u=n!==t[14]?t[14]:u}function cr(){function i(){var n=window.iFrameResizer;t("Reading data from page: "+JSON.stringify(n));yt="messageCallback"in n?n.messageCallback:yt;pt="readyCallback"in n?n.readyCallback:pt;p="targetOrigin"in n?n.targetOrigin:p;r="heightCalculationMethod"in n?n.heightCalculationMethod:r;u="widthCalculationMethod"in n?n.widthCalculationMethod:u}function n(n,i){return"function"==typeof n&&(t("Setup custom "+i+"CalcMethod"),bt[i]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(i(),r=n(r,"height"),u=n(u,"width"));t("TargetOrigin for parent set to: "+p)}function lr(n,t){return-1!==t.indexOf("-")&&(s("Negative CSS value ignored for "+n),t=""),t}function ut(i,r){n!==r&&""!==r&&"null"!==r&&(document.body.style[i]=r,t("Body "+i+' set to "'+r+'"'))}function ar(){n===d&&(d=ot+"px");ut("margin",lr("margin",d))}function vr(){document.documentElement.style.height="";document.body.style.height="";t('HTML & body height set to "auto"')}function i(n){var i={add:function(t){function i(){h(n.eventName,n.eventType)}kt[t]=i;a(window,t,i)},remove:function(n){var t=kt[n];delete kt[n];dt(window,n,t)}};n.eventNames&&Array.prototype.map?(n.eventName=n.eventNames[0],n.eventNames.map(i[n.method])):i[n.method](n.eventName);t(gt(n.method)+" event listener: "+n.eventType)}function ti(n){i({method:n,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]});i({method:n,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]});i({method:n,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]});i({method:n,eventType:"Input",eventName:"input"});i({method:n,eventType:"Mouse Up",eventName:"mouseup"});i({method:n,eventType:"Mouse Down",eventName:"mousedown"});i({method:n,eventType:"Orientation Change",eventName:"orientationchange"});i({method:n,eventType:"Print",eventName:["afterprint","beforeprint"]});i({method:n,eventType:"Ready State Change",eventName:"readystatechange"});i({method:n,eventType:"Touch Start",eventName:"touchstart"});i({method:n,eventType:"Touch End",eventName:"touchend"});i({method:n,eventType:"Touch Cancel",eventName:"touchcancel"});i({method:n,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]});i({method:n,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]});i({method:n,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]});"child"===at&&i({method:n,eventType:"IFrame Resized",eventName:"resize"})}function ii(n,i,r,u){return i!==n&&(n in r||(s(n+" is not a valid option for "+u+"CalculationMethod."),n=i),t(u+' calculation method set to "'+n+'"')),n}function ri(){r=ii(r,ct,o,"height")}function ui(){u=ii(u,er,l,"width")}function fi(){!0===e?(ti("add"),tu()):t("Auto Resize disabled")}function yr(){t("Disable outgoing messages");rr=!1}function pr(){t("Remove event listener: Message");dt(window,"message",yi)}function wr(){null!==st&&st.disconnect()}function ei(){ti("remove");wr();clearInterval(nr)}function br(){yr();pr();!0===e&&ei()}function kr(){var n=document.createElement("div");n.style.clear="both";n.style.display="block";document.body.appendChild(n)}function dr(){function u(){return{x:window.pageXOffset!==n?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==n?window.pageYOffset:document.documentElement.scrollTop}}function e(n){var t=n.getBoundingClientRect(),i=u();return{x:parseInt(t.left,10)+parseInt(i.x,10),y:parseInt(t.top,10)+parseInt(i.y,10)}}function i(i){function s(n){var i=e(n);t("Moving to in page link (#"+r+") at x: "+i.x+" y: "+i.y);f(i.y,i.x,"scrollToOffset")}var r=i.split("#")[1]||i,u=decodeURIComponent(r),o=document.getElementById(u)||document.getElementsByName(u)[0];n!==o?s(o):(t("In page link (#"+r+") not found in iFrame, so sending to parent"),f(0,0,"inPageLink","#"+r))}function r(){""!==location.hash&&"#"!==location.hash&&i(location.href)}function o(){function n(n){function t(n){n.preventDefault();i(this.getAttribute("href"))}"#"!==n.getAttribute("href")&&a(n,"click",t)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),n)}function h(){a(window,"hashchange",r)}function c(){setTimeout(r,ht)}function l(){Array.prototype.forEach&&document.querySelectorAll?(t("Setting up location.hash handlers"),o(),h(),c()):s("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return y.enable?l():t("In page linking not enabled"),{findTarget:i}}function gr(){t("Enable public methods");fu.parentIFrame={autoResize:function(n){return!0===n&&!1===e?(e=!0,fi()):!1===n&&!0===e&&(e=!1,ei()),e},close:function(){f(0,0,"close");br()},getId:function(){return tt},getPageInfo:function(n){"function"==typeof n?(wt=n,f(0,0,"pageInfo")):(wt=function(){},f(0,0,"pageInfoStop"))},moveToAnchor:function(n){y.findTarget(n)},reset:function(){vi("parentIFrame.reset")},scrollTo:function(n,t){f(t,n,"scrollTo")},scrollToOffset:function(n,t){f(t,n,"scrollToOffset")},sendMessage:function(n,t){f(0,0,"message",JSON.stringify(n),t)},setHeightCalculationMethod:function(n){r=n;ri()},setWidthCalculationMethod:function(n){u=n;ui()},setTargetOrigin:function(n){t("Set targetOrigin: "+n);p=n},size:function(n,t){h("size","parentIFrame.size("+(n||"")+(t?","+t:"")+")",n,t)}}}function oi(){0!==c&&(t("setInterval: "+c+"ms"),nr=setInterval(function(){h("interval","setInterval: "+c)},Math.abs(c)))}function nu(){function s(n){function i(n){!1===n.complete&&(t("Attach listeners to "+n.src),n.addEventListener("load",e,!1),n.addEventListener("error",o,!1),r.push(n))}"attributes"===n.type&&"src"===n.attributeName?i(n.target):"childList"===n.type&&Array.prototype.forEach.call(n.target.querySelectorAll("img"),i)}function c(n){r.splice(r.indexOf(n),1)}function u(n){t("Remove listeners from "+n.src);n.removeEventListener("load",e,!1);n.removeEventListener("error",o,!1);c(n)}function f(t,i,r){u(t.target);h(i,r+": "+t.target.src,n,n)}function e(n){f(n,"imageLoad","Image loaded")}function o(n){f(n,"imageLoadFailed","Image load failed")}function l(n){h("mutationObserver","mutationObserver: "+n[0].target+" "+n[0].type);n.forEach(s)}function a(){var n=document.querySelector("body");return i=new v(l),t("Create body MutationObserver"),i.observe(n,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),i}var r=[],v=window.MutationObserver||window.WebKitMutationObserver,i=a();return{disconnect:function(){"disconnect"in i&&(t("Disconnect body MutationObserver"),i.disconnect(),r.forEach(u))}}}function tu(){var n=0>c;window.MutationObserver||window.WebKitMutationObserver?n?oi():st=nu():(t("MutationObserver not supported in this browser!"),oi())}function ft(n,t){function r(n){if(/^\d+(px)?$/i.test(n))return parseInt(n,pi);var i=t.style.left,r=t.runtimeStyle.left;return t.runtimeStyle.left=t.currentStyle.left,t.style.left=n||0,n=t.style.pixelLeft,t.style.left=i,t.runtimeStyle.left=r,n}var i=0;return t=t||document.body,"defaultView"in document&&"getComputedStyle"in document.defaultView?(i=document.defaultView.getComputedStyle(t,null),i=null!==i?i[n]:0):i=r(t.currentStyle[n]),parseInt(i,pi)}function iu(n){n>w/2&&(w=2*n,t("Event throttle increased to "+w+"ms"))}function et(n,i){for(var e=i.length,o=0,f=0,s=gt(n),r=rt(),u=0;u<e;u++)(o=i[u].getBoundingClientRect()[n]+ft("margin"+s,i[u]))>f&&(f=o);return r=rt()-r,t("Parsed "+e+" HTML elements"),t("Element position calculated in "+r+"ms"),iu(r),f}function k(n){return[n.bodyOffset(),n.bodyScroll(),n.documentElementOffset(),n.documentElementScroll()]}function si(n,t){function r(){return s("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var i=document.querySelectorAll("["+t+"]");return 0===i.length&&r(),et(n,i)}function hi(){return document.querySelectorAll("body *")}function ci(i,e,s,h){function y(){v=c;b=a;f(v,b,i)}function p(){function t(n,t){return!(Math.abs(n-t)<=vt)}return c=n!==s?s:o[r](),a=n!==h?h:l[u](),t(v,c)||g&&t(b,a)}function w(){return!(i in{init:1,interval:1,size:1})}function k(){return r in ir||g&&u in ir}function d(){t("No change in size detected")}function nt(){w()&&k()?vi(e):i in{interval:1}||d()}var c,a;p()||"init"===i?(li(),y()):nt()}function h(n,i,r,u){function f(){n in{reset:1,resetPage:1,init:1}||t("Trigger event: "+i)}function e(){return it&&n in uu}e()?t("Trigger event cancelled: "+n):(f(),"init"===n?ci(n,i,r,u):eu(n,i,r,u))}function li(){it||(it=!0,t("Trigger event lock on"));clearTimeout(fr);fr=setTimeout(function(){it=!1;t("Trigger event lock off");t("--")},ht)}function ai(n){v=o[r]();b=l[u]();f(v,b,n)}function vi(n){var i=r;r=ct;t("Reset trigger event: "+n);li();ai("reset");r=i}function f(i,r,u,f,e){function o(){n===e?e=p:t("Message targetOrigin: "+e)}function s(){var s=i+":"+r,o=tt+":"+s+":"+u+(n!==f?":"+f:"");t("Sending message to host page ("+o+")");ur.postMessage(nt+o,e)}!0===rr&&(o(),s())}function yi(n){function e(){return nt===(""+n.data).substr(0,tr)}function u(){return n.data.split("]")[1].split(":")[0]}function r(){return n.data.substr(n.data.indexOf(":")+1)}function o(){return!("undefined"!=typeof module&&module.exports)&&"iFrameResize"in window}function f(){return n.data.split(":")[2]in{"true":1,"false":1}}function c(){var t=u();t in i?i[t]():o()||f()||s("Unexpected message ("+n.data+")")}function l(){!1===ki?c():f()?i.init():t('Ignored message of type "'+u()+'". Received before initialization.')}var i={init:function(){function r(){gi=n.data;ur=n.source;sr();ki=!1;setTimeout(function(){di=!1},ht)}"interactive"===document.readyState||"complete"===document.readyState?r():(t("Waiting for page ready"),a(window,"readystatechange",i.initFromParent))},reset:function(){di?t("Page reset ignored by init"):(t("Page size reset by host page"),ai("resetPage"))},resize:function(){h("resizeParent","Parent window requested size check")},moveToAnchor:function(){y.findTarget(r())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var n=r();t("PageInfoFromParent called from parent: "+n);wt(JSON.parse(n));t(" --")},message:function(){var n=r();t("MessageCallback called from parent: "+n);yt(JSON.parse(n));t(" --")}};e()&&l()}function ru(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}if("undefined"!=typeof window){var e=!0,pi=10,wi="",ot=0,d="",st=null,bi="",g=!1,uu={resize:1,click:1},ht=128,ki=!0,v=1,ct="bodyOffset",r=ct,di=!0,gi="",y={},c=32,nr=null,lt=!1,nt="[iFrameSizer]",tr=nt.length,tt="",ir={max:1,min:1,bodyScroll:1,documentElementScroll:1},at="child",rr=!0,ur=window.parent,p="*",vt=0,it=!1,fr=null,w=16,b=1,er="scroll",u=er,fu=window,yt=function(){s("MessageCallback function not defined")},pt=function(){},wt=function(){},bt={height:function(){return s("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return s("Custom width calculation function not defined"),document.body.scrollWidth}},kt={},rt=Date.now||function(){return(new Date).getTime()},o={bodyOffset:function(){return document.body.offsetHeight+ft("marginTop")+ft("marginBottom")},offset:function(){return o.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return bt.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,k(o))},min:function(){return Math.min.apply(null,k(o))},grow:function(){return o.max()},lowestElement:function(){return Math.max(o.bodyOffset()||o.documentElementOffset(),et("bottom",hi()))},taggedElement:function(){return si("bottom","data-iframe-height")}},l={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return bt.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(l.bodyScroll(),l.documentElementScroll())},max:function(){return Math.max.apply(null,k(l))},min:function(){return Math.min.apply(null,k(l))},rightMostElement:function(){return et("right",hi())},taggedElement:function(){return si("right","data-iframe-width")}},eu=or(ci);a(window,"message",yi);ru()}}();!function(n,t,i){"use strict";function f(n){return u(n)?n:Object.keys(n).map(function(t){return n[t]})}function ct(n){return null===n}function c(n,t){var r=Object.keys(n);return-1==r.map(function(r){return t[r]!==i&&t[r]==n[r]}).indexOf(!1)}function l(n,t){if(""===t)return n;var i=n.indexOf(t.charAt(0));return-1===i?!1:l(n.substr(i+1),t.substr(1))}function y(n,t,i){var r=0;return n.filter(function(n){var u=et(i)?t>r&&i(n):t>r;return r=u?r+1:r,u})}function h(n,t,i){return i.round(n*i.pow(10,t))/i.pow(10,t)}function p(n,t,i){t=t||[];var f=Object.keys(n);return f.forEach(function(f){var e,o;r(n[f])&&!u(n[f])?(e=i?i+"."+f:i,p(n[f],t,e||f)):(o=i?i+"."+f:f,t.push(o))}),t}function lt(n){return n&&n.$evalAsync&&n.$watch}function w(){return function(n,t){return n>t}}function b(){return function(n,t){return n>=t}}function k(){return function(n,t){return t>n}}function d(){return function(n,t){return t>=n}}function g(){return function(n,t){return n==t}}function nt(){return function(n,t){return n!=t}}function tt(){return function(n,t){return n===t}}function it(){return function(n,t){return n!==t}}function rt(n){return function(t,i){return t=r(t)?f(t):t,!u(t)||e(i)?!1:t.some(function(t){return r(t)||ot(i)?n(i)(t):t===i})}}function v(n,t){return t=t||0,t>=n.length?n:u(n[t])?v(n.slice(0,t).concat(n[t],n.slice(t+1)),t):v(n,t+1)}function ut(n){return function(t,i){function s(n,t){return e(t)?!1:n.some(function(n){return a(n,t)})}if(t=r(t)?f(t):t,!u(t))return t;var o=[],h=n(i);return e(i)?t.filter(function(n,t,i){return i.indexOf(n)===t}):t.filter(function(n){var t=h(n);return s(o,t)?!1:(o.push(t),!0)})}}function ft(n,t,i){return t?n+i+ft(n,--t,i):n}var et=t.isDefined,e=t.isUndefined,ot=t.isFunction,o=t.isString,s=t.isNumber,r=t.isObject,u=t.isArray,st=t.forEach,ht=t.extend,at=t.copy,a=t.equals;String.prototype.contains||(String.prototype.contains=function(){return-1!==String.prototype.indexOf.apply(this,arguments)});t.module("a8m.angular",[]).filter("isUndefined",function(){return function(n){return t.isUndefined(n)}}).filter("isDefined",function(){return function(n){return t.isDefined(n)}}).filter("isFunction",function(){return function(n){return t.isFunction(n)}}).filter("isString",function(){return function(n){return t.isString(n)}}).filter("isNumber",function(){return function(n){return t.isNumber(n)}}).filter("isArray",function(){return function(n){return t.isArray(n)}}).filter("isObject",function(){return function(n){return t.isObject(n)}}).filter("isEqual",function(){return function(n,i){return t.equals(n,i)}});t.module("a8m.conditions",[]).filter({isGreaterThan:w,">":w,isGreaterThanOrEqualTo:b,">=":b,isLessThan:k,"<":k,isLessThanOrEqualTo:d,"<=":d,isEqualTo:g,"==":g,isNotEqualTo:nt,"!=":nt,isIdenticalTo:tt,"===":tt,isNotIdenticalTo:it,"!==":it});t.module("a8m.is-null",[]).filter("isNull",function(){return function(n){return ct(n)}});t.module("a8m.after-where",[]).filter("afterWhere",function(){return function(n,t){if(n=r(n)?f(n):n,!u(n)||e(t))return n;var i=n.map(function(n){return c(t,n)}).indexOf(!0);return n.slice(-1===i?0:i)}});t.module("a8m.after",[]).filter("after",function(){return function(n,t){return n=r(n)?f(n):n,u(n)?n.slice(t):n}});t.module("a8m.before-where",[]).filter("beforeWhere",function(){return function(n,t){if(n=r(n)?f(n):n,!u(n)||e(t))return n;var i=n.map(function(n){return c(t,n)}).indexOf(!0);return n.slice(0,-1===i?n.length:++i)}});t.module("a8m.before",[]).filter("before",function(){return function(n,t){return n=r(n)?f(n):n,u(n)?n.slice(0,t?--t:t):n}});t.module("a8m.chunk-by",[]).filter("chunkBy",[function(){function n(n,t){for(var i=[];n--;)i[n]=t;return i}return function(t,i,r){return u(t)?t.map(function(t,u,f){return u*=i,t=f.slice(u,u+i),!e(r)&&t.length<i?t.concat(n(i-t.length,r)):t}).slice(0,Math.ceil(t.length/i)):t}}]);t.module("a8m.concat",[]).filter("concat",[function(){return function(n,t){if(e(t))return n;if(u(n))return r(t)?n.concat(f(t)):n.concat(t);if(r(n)){var i=f(n);return r(t)?i.concat(f(t)):i.concat(t)}return n}}]);t.module("a8m.contains",[]).filter({contains:["$parse",rt],some:["$parse",rt]});t.module("a8m.count-by",[]).filter("countBy",["$parse",function(n){return function(t,i){var o,s={},h=n(i);return t=r(t)?f(t):t,!u(t)||e(i)?t:(t.forEach(function(n){o=h(n);s[o]||(s[o]=0);s[o]++}),s)}}]);t.module("a8m.defaults",[]).filter("defaults",["$parse",function(n){return function(t,i){if(t=r(t)?f(t):t,!u(t)||!r(i))return t;var o=p(i);return t.forEach(function(t){o.forEach(function(r){var u=n(r),f=u.assign;e(u(t))&&f(t,u(i))})}),t}}]);t.module("a8m.every",[]).filter("every",["$parse",function(n){return function(t,i){return t=r(t)?f(t):t,!u(t)||e(i)?!0:t.every(function(t){return r(t)||ot(i)?n(i)(t):t===i})}}]);t.module("a8m.filter-by",[]).filter("filterBy",["$parse",function(n){return function(t,h,c){var l;return c=o(c)||s(c)?String(c).toLowerCase():i,t=r(t)?f(t):t,!u(t)||e(c)?t:t.filter(function(t){return h.some(function(i){if(~i.indexOf("+")){var r=i.replace(new RegExp("\\s","g"),"").split("+");l=r.reduce(function(i,r,u){return 1===u?n(i)(t)+" "+n(r)(t):i+" "+n(r)(t)})}else l=n(i)(t);return o(l)||s(l)?String(l).toLowerCase().contains(c):!1})})}}]);t.module("a8m.first",[]).filter("first",["$parse",function(n){return function(t){var h,o,e;return t=r(t)?f(t):t,u(t)?(e=Array.prototype.slice.call(arguments,1),h=s(e[0])?e[0]:1,o=s(e[0])?s(e[1])?i:e[1]:e[0],e.length?y(t,h,o?n(o):o):t[0]):t}}]);t.module("a8m.flatten",[]).filter("flatten",function(){return function(n,t){return t=t||!1,n=r(n)?f(n):n,u(n)?t?[].concat.apply([],n):v(n,0):n}});t.module("a8m.fuzzy-by",[]).filter("fuzzyBy",["$parse",function(n){return function(t,i,s,h){var c,a,v=h||!1;return t=r(t)?f(t):t,!u(t)||e(i)||e(s)?t:(a=n(i),t.filter(function(n){return c=a(n),o(c)?(c=v?c:c.toLowerCase(),s=v?s:s.toLowerCase(),l(c,s)!==!1):!1}))}}]);t.module("a8m.fuzzy",[]).filter("fuzzy",function(){return function(n,t,i){function h(n,t){var i,r,u=Object.keys(n);return 0<u.filter(function(u){return i=n[u],r?!0:o(i)?(i=s?i:i.toLowerCase(),r=l(i,t)!==!1):!1}).length}var s=i||!1;return n=r(n)?f(n):n,!u(n)||e(t)?n:(t=s?t:t.toLowerCase(),n.filter(function(n){return o(n)?(n=s?n:n.toLowerCase(),l(n,t)!==!1):r(n)?h(n,t):!1}))}});t.module("a8m.group-by",["a8m.filter-watcher"]).filter("groupBy",["$parse","filterWatcher",function(n,t){return function(i,u){function f(n,t){var i,r={};return st(n,function(n){i=t(n);r[i]||(r[i]=[]);r[i].push(n)}),r}if(!r(i)||e(u))return i;var o=n(u);return t.isMemoized("groupBy",arguments)||t.memoize("groupBy",arguments,this,f(i,o))}}]);t.module("a8m.is-empty",[]).filter("isEmpty",function(){return function(n){return r(n)?!f(n).length:!n.length}});t.module("a8m.join",[]).filter("join",function(){return function(n,t){return e(n)||!u(n)?n:(e(t)&&(t=" "),n.join(t))}});t.module("a8m.last",[]).filter("last",["$parse",function(n){return function(t){var c,h,o,e=at(t);return e=r(e)?f(e):e,u(e)?(o=Array.prototype.slice.call(arguments,1),c=s(o[0])?o[0]:1,h=s(o[0])?s(o[1])?i:o[1]:o[0],o.length?y(e.reverse(),c,h?n(h):h).reverse():e[e.length-1]):e}}]);t.module("a8m.map",[]).filter("map",["$parse",function(n){return function(t,i){return t=r(t)?f(t):t,!u(t)||e(i)?t:t.map(function(t){return n(i)(t)})}}]);t.module("a8m.omit",[]).filter("omit",["$parse",function(n){return function(t,i){return t=r(t)?f(t):t,!u(t)||e(i)?t:t.filter(function(t){return!n(i)(t)})}}]);t.module("a8m.pick",[]).filter("pick",["$parse",function(n){return function(t,i){return t=r(t)?f(t):t,!u(t)||e(i)?t:t.filter(function(t){return n(i)(t)})}}]);t.module("a8m.range",[]).filter("range",function(){return function(n,t){for(var i=0;i<parseInt(t);i++)n.push(i);return n}});t.module("a8m.remove-with",[]).filter("removeWith",function(){return function(n,t){return e(t)?n:(n=r(n)?f(n):n,n.filter(function(n){return!c(t,n)}))}});t.module("a8m.remove",[]).filter("remove",function(){return function(n){n=r(n)?f(n):n;var t=Array.prototype.slice.call(arguments,1);return u(n)?n.filter(function(n){return!t.some(function(t){return a(t,n)})}):n}});t.module("a8m.reverse",[]).filter("reverse",[function(){return function(n){return n=r(n)?f(n):n,o(n)?n.split("").reverse().join(""):u(n)?n.slice().reverse():n}}]);t.module("a8m.search-field",[]).filter("searchField",["$parse",function(n){return function(t){var o,e,i;return t=r(t)?f(t):t,i=Array.prototype.slice.call(arguments,1),u(t)&&i.length?t.map(function(t){return e=i.map(function(i){return(o=n(i))(t)}).join(" "),ht(t,{searchField:e})}):t}}]);t.module("a8m.to-array",[]).filter("toArray",function(){return function(n,t){return r(n)?t?Object.keys(n).map(function(t){return ht(n[t],{$key:t})}):f(n):n}});t.module("a8m.unique",[]).filter({unique:["$parse",ut],uniq:["$parse",ut]});t.module("a8m.where",[]).filter("where",function(){return function(n,t){return e(t)?n:(n=r(n)?f(n):n,n.filter(function(n){return c(t,n)}))}});t.module("a8m.xor",[]).filter("xor",["$parse",function(n){return function(t,i,e){function o(t,i){var r=n(e);return i.some(function(n){return e?a(r(n),r(t)):a(n,t)})}return e=e||!1,t=r(t)?f(t):t,i=r(i)?f(i):i,u(t)&&u(i)?t.concat(i).filter(function(n){return!(o(n,t)&&o(n,i))}):t}}]);t.module("a8m.math.byteFmt",["a8m.math"]).filter("byteFmt",["$math",function(n){return function(t,i){return s(i)&&isFinite(i)&&i%1==0&&i>=0&&s(t)&&isFinite(t)?1024>t?h(t,i,n)+" B":1048576>t?h(t/1024,i,n)+" KB":1073741824>t?h(t/1048576,i,n)+" MB":h(t/1073741824,i,n)+" GB":"NaN"}}]);t.module("a8m.math.degrees",["a8m.math"]).filter("degrees",["$math",function(n){return function(t,i){if(s(i)&&isFinite(i)&&i%1==0&&i>=0&&s(t)&&isFinite(t)){var r=180*t/n.PI;return n.round(r*n.pow(10,i))/n.pow(10,i)}return"NaN"}}]);t.module("a8m.math.kbFmt",["a8m.math"]).filter("kbFmt",["$math",function(n){return function(t,i){return s(i)&&isFinite(i)&&i%1==0&&i>=0&&s(t)&&isFinite(t)?1024>t?h(t,i,n)+" KB":1048576>t?h(t/1024,i,n)+" MB":h(t/1048576,i,n)+" GB":"NaN"}}]);t.module("a8m.math",[]).factory("$math",["$window",function(n){return n.Math}]);t.module("a8m.math.max",["a8m.math"]).filter("max",["$math","$parse",function(n,t){function i(i,r){var u=i.map(function(n){return t(r)(n)});return u.indexOf(n.max.apply(n,u))}return function(t,r){return u(t)?e(r)?n.max.apply(n,t):t[i(t,r)]:t}}]);t.module("a8m.math.min",["a8m.math"]).filter("min",["$math","$parse",function(n,t){function i(i,r){var u=i.map(function(n){return t(r)(n)});return u.indexOf(n.min.apply(n,u))}return function(t,r){return u(t)?e(r)?n.min.apply(n,t):t[i(t,r)]:t}}]);t.module("a8m.math.percent",["a8m.math"]).filter("percent",["$math","$window",function(n,t){return function(i,r,u){var f=o(i)?t.Number(i):i;return r=r||100,u=u||!1,!s(f)||t.isNaN(f)?i:u?n.round(f/r*100):f/r*100}}]);t.module("a8m.math.radians",["a8m.math"]).filter("radians",["$math",function(n){return function(t,i){if(s(i)&&isFinite(i)&&i%1==0&&i>=0&&s(t)&&isFinite(t)){var r=3.14159265359*t/180;return n.round(r*n.pow(10,i))/n.pow(10,i)}return"NaN"}}]);t.module("a8m.math.radix",[]).filter("radix",function(){return function(n,t){return s(n)&&/^[2-9]$|^[1-2]\d$|^3[0-6]$/.test(t)?n.toString(t).toUpperCase():n}});t.module("a8m.math.shortFmt",["a8m.math"]).filter("shortFmt",["$math",function(n){return function(t,i){return s(i)&&isFinite(i)&&i%1==0&&i>=0&&s(t)&&isFinite(t)?1e3>t?t:1e6>t?h(t/1e3,i,n)+" K":1e9>t?h(t/1e6,i,n)+" M":h(t/1e9,i,n)+" B":"NaN"}}]);t.module("a8m.math.sum",[]).filter("sum",function(){return function(n,t){return u(n)?n.reduce(function(n,t){return n+t},t||0):n}});t.module("a8m.ends-with",[]).filter("endsWith",function(){return function(n,t,i){var r,u=i||!1;return!o(n)||e(t)?n:(n=u?n:n.toLowerCase(),r=n.length-t.length,-1!==n.indexOf(u?t:t.toLowerCase(),r))}});t.module("a8m.latinize",[]).filter("latinize",[function(){function f(n){return n.replace(/[^\u0000-\u007E]/g,function(n){return u[n]||n})}for(var r,t,i=[{base:"A",letters:"AⒶＡÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷＢḂḄḆɃƂƁ"},{base:"C",letters:"CⒸＣĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹＤḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"ǱǄ"},{base:"Dz",letters:"ǲǅ"},{base:"E",letters:"EⒺＥÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻＦḞƑꝻ"},{base:"G",letters:"GⒼＧǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽＨĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾＩÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿＪĴɈ"},{base:"K",letters:"KⓀＫḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁＬĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"Ǉ"},{base:"Lj",letters:"ǈ"},{base:"M",letters:"MⓂＭḾṀṂⱮƜ"},{base:"N",letters:"NⓃＮǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"Ǌ"},{base:"Nj",letters:"ǋ"},{base:"O",letters:"OⓄＯÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"Œ"},{base:"oe",letters:"œ"},{base:"P",letters:"PⓅＰṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆＱꝖꝘɊ"},{base:"R",letters:"RⓇＲŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈＳẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉＴṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊＵÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋＶṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌＷẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍＸẊẌ"},{base:"Y",letters:"YⓎＹỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏＺŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐａẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑｂḃḅḇƀƃɓ"},{base:"c",letters:"cⓒｃćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓｄḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"ǳǆ"},{base:"e",letters:"eⓔｅèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕｆḟƒꝼ"},{base:"g",letters:"gⓖｇǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗｈĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘｉìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙｊĵǰɉ"},{base:"k",letters:"kⓚｋḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛｌŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"ǉ"},{base:"m",letters:"mⓜｍḿṁṃɱɯ"},{base:"n",letters:"nⓝｎǹńñṅňṇņṋṉƞɲŉꞑꞥ"},{base:"nj",letters:"ǌ"},{base:"o",letters:"oⓞｏòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟｐṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠｑɋꝗꝙ"},{base:"r",letters:"rⓡｒŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢｓßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣｔṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤｕùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥｖṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦｗẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧｘẋẍ"},{base:"y",letters:"yⓨｙỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩｚźẑżžẓẕƶȥɀⱬꝣ"}],u={},n=0;n<i.length;n++)for(r=i[n].letters.split(""),t=0;t<r.length;t++)u[r[t]]=i[n].base;return function(n){return o(n)?f(n):n}}]);t.module("a8m.ltrim",[]).filter("ltrim",function(){return function(n,t){var i=t||"\\s";return o(n)?n.replace(new RegExp("^"+i+"+"),""):n}});t.module("a8m.match",[]).filter("match",function(){return function(n,t,i){var r=new RegExp(t,i);return o(n)?n.match(r):null}});t.module("a8m.repeat",[]).filter("repeat",[function(){return function(n,t,i){var r=~~t;return o(n)&&r?ft(n,--t,i||""):n}}]);t.module("a8m.rtrim",[]).filter("rtrim",function(){return function(n,t){var i=t||"\\s";return o(n)?n.replace(new RegExp(i+"+$"),""):n}});t.module("a8m.slugify",[]).filter("slugify",[function(){return function(n,t){var i=e(t)?"-":t;return o(n)?n.toLowerCase().replace(/\s+/g,i):n}}]);t.module("a8m.starts-with",[]).filter("startsWith",function(){return function(n,t,i){var r=i||!1;return!o(n)||e(t)?n:(n=r?n:n.toLowerCase(),!n.indexOf(r?t:t.toLowerCase()))}});t.module("a8m.stringular",[]).filter("stringular",function(){return function(n){var t=Array.prototype.slice.call(arguments,1);return n.replace(/{(\d+)}/g,function(n,i){return e(t[i])?n:t[i]})}});t.module("a8m.strip-tags",[]).filter("stripTags",function(){return function(n){return o(n)?n.replace(/<\S[^><]*>/g,""):n}});t.module("a8m.test",[]).filter("test",function(){return function(n,t,i){var r=new RegExp(t,i);return o(n)?r.test(n):n}});t.module("a8m.trim",[]).filter("trim",function(){return function(n,t){var i=t||"\\s";return o(n)?n.replace(new RegExp("^"+i+"+|"+i+"+$","g"),""):n}});t.module("a8m.truncate",[]).filter("truncate",function(){return function(n,t,i,r){return t=e(t)?n.length:t,r=r||!1,i=i||"",!o(n)||n.length<=t?n:n.substring(0,r?-1===n.indexOf(" ",t)?n.length:n.indexOf(" ",t):t)+i}});t.module("a8m.ucfirst",[]).filter("ucfirst",[function(){return function(n){return o(n)?n.split(" ").map(function(n){return n.charAt(0).toUpperCase()+n.substring(1)}).join(" "):n}}]);t.module("a8m.uri-component-encode",[]).filter("uriComponentEncode",["$window",function(n){return function(t){return o(t)?n.encodeURIComponent(t):t}}]);t.module("a8m.uri-encode",[]).filter("uriEncode",["$window",function(n){return function(t){return o(t)?n.encodeURI(t):t}}]);t.module("a8m.wrap",[]).filter("wrap",function(){return function(n,t,i){return o(n)&&et(t)?[t,n,i||t].join(""):n}});t.module("a8m.filter-watcher",[]).provider("filterWatcher",function(){this.$get=["$window","$rootScope",function(n,i){function f(n,i){return[n,t.toJson(i)].join("#").replace(/"/g,"")}function o(n){var t=n.targetScope.$id;st(r[t],function(n){delete u[n]});delete r[t]}function s(){a(function(){i.$$phase||(u={})})}function h(n,t){var i=n.$id;return e(r[i])&&(n.$on("$destroy",o),r[i]=[]),r[i].push(t)}function c(n,t){var i=f(n,t);return u[i]}function l(n,t,i,r){var e=f(n,t);return u[e]=r,lt(i)?h(i,e):s(),r}var u={},r={},a=n.setTimeout;return{isMemoized:c,memoize:l}}]});t.module("angular.filter",["a8m.ucfirst","a8m.uri-encode","a8m.uri-component-encode","a8m.slugify","a8m.latinize","a8m.strip-tags","a8m.stringular","a8m.truncate","a8m.starts-with","a8m.ends-with","a8m.wrap","a8m.trim","a8m.ltrim","a8m.rtrim","a8m.repeat","a8m.test","a8m.match","a8m.to-array","a8m.concat","a8m.contains","a8m.unique","a8m.is-empty","a8m.after","a8m.after-where","a8m.before","a8m.before-where","a8m.defaults","a8m.where","a8m.reverse","a8m.remove","a8m.remove-with","a8m.group-by","a8m.count-by","a8m.chunk-by","a8m.search-field","a8m.fuzzy-by","a8m.fuzzy","a8m.omit","a8m.pick","a8m.every","a8m.filter-by","a8m.xor","a8m.map","a8m.first","a8m.last","a8m.flatten","a8m.join","a8m.range","a8m.math","a8m.math.max","a8m.math.min","a8m.math.percent","a8m.math.radix","a8m.math.sum","a8m.math.degrees","a8m.math.radians","a8m.math.byteFmt","a8m.math.kbFmt","a8m.math.shortFmt","a8m.angular","a8m.conditions","a8m.is-null","a8m.filter-watcher"])}(window,window.angular),function(n,t,i){"use strict";(function(){t.module("uiGmapgoogle-maps.providers",[]);t.module("uiGmapgoogle-maps.wrapped",[]);t.module("uiGmapgoogle-maps.extensions",["uiGmapgoogle-maps.wrapped","uiGmapgoogle-maps.providers"]);t.module("uiGmapgoogle-maps.directives.api.utils",["uiGmapgoogle-maps.extensions"]);t.module("uiGmapgoogle-maps.directives.api.managers",[]);t.module("uiGmapgoogle-maps.directives.api.options",["uiGmapgoogle-maps.directives.api.utils"]);t.module("uiGmapgoogle-maps.directives.api.options.builders",[]);t.module("uiGmapgoogle-maps.directives.api.models.child",["uiGmapgoogle-maps.directives.api.utils","uiGmapgoogle-maps.directives.api.options","uiGmapgoogle-maps.directives.api.options.builders"]);t.module("uiGmapgoogle-maps.directives.api.models.parent",["uiGmapgoogle-maps.directives.api.managers","uiGmapgoogle-maps.directives.api.models.child","uiGmapgoogle-maps.providers"]);t.module("uiGmapgoogle-maps.directives.api",["uiGmapgoogle-maps.directives.api.models.parent"]);t.module("uiGmapgoogle-maps",["uiGmapgoogle-maps.directives.api","uiGmapgoogle-maps.providers"])}).call(this),function(){t.module("uiGmapgoogle-maps.providers").factory("uiGmapMapScriptLoader",["$q","uiGmapuuid",function(i,r){var o,f,e,u;return u=void 0,o=function(n){return n.china?"http://maps.google.cn/maps/api/js?":n.transport==="auto"?"//maps.googleapis.com/maps/api/js?":n.transport+"://maps.googleapis.com/maps/api/js?"},f=function(n){var f,i,t;return f=["transport","isGoogleMapsForWork","china"],n.isGoogleMapsForWork&&f.push("key"),i=_.map(_.omit(n,f),function(n,t){return t+"="+n}),u&&document.getElementById(u).remove(),i=i.join("&"),t=document.createElement("script"),t.id=u="ui_gmap_map_load_"+r.generate(),t.type="text/javascript",t.src=o(n)+i,document.body.appendChild(t)},e=function(){return t.isDefined(n.google)&&t.isDefined(n.google.maps)},{load:function(t){var r,u;return(r=i.defer(),e())?(r.resolve(n.google.maps),r.promise):(u=t.callback="onGoogleMapsReady"+Math.round(Math.random()*1e3),n[u]=function(){n[u]=null;r.resolve(n.google.maps)},n.navigator.connection&&n.Connection&&n.navigator.connection.type===n.Connection.NONE?document.addEventListener("online",function(){if(!e())return f(t)}):f(t),r.promise)}}}]).provider("uiGmapGoogleMapApi",function(){return this.options={transport:"https",isGoogleMapsForWork:!1,china:!1,v:"3",libraries:"",language:"en",sensor:"false"},this.configure=function(n){t.extend(this.options,n)},this.$get=["uiGmapMapScriptLoader",function(n){return function(t){return t.load(n.options)}}(this)],this})}.call(this),function(){var i=function(n,t){return function(){return n.apply(t,arguments)}},r=function(n,t){function r(){this.constructor=n}for(var i in t)u.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n},u={}.hasOwnProperty;t.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendGWin",function(){return{init:_.once(function(){var t;if((google||(typeof google!="undefined"&&google!==null?google.maps:void 0)||google.maps.InfoWindow!=null))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(n,t,i){i==null&&(this._isOpen=!0,this._open(n,t,!0))},google.maps.InfoWindow.prototype.close=function(n){n==null&&(this._isOpen=!1,this._close(!0))},google.maps.InfoWindow.prototype.isOpen=function(n){return n==null&&(n=void 0),n==null?this._isOpen:this._isOpen=n},n.InfoBox&&(n.InfoBox.prototype._open=n.InfoBox.prototype.open,n.InfoBox.prototype._close=n.InfoBox.prototype.close,n.InfoBox.prototype._isOpen=!1,n.InfoBox.prototype.open=function(n,t){this._isOpen=!0;this._open(n,t)},n.InfoBox.prototype.close=function(){this._isOpen=!1;this._close()},n.InfoBox.prototype.isOpen=function(n){return n==null&&(n=void 0),n==null?this._isOpen:this._isOpen=n},t=function(t){function u(t){this.getOrigCloseBoxImg_=i(this.getOrigCloseBoxImg_,this);this.getCloseBoxDiv_=i(this.getCloseBoxDiv_,this);var r;r=new n.InfoBox(t);_.extend(this,r);t.closeBoxDiv!=null&&(this.closeBoxDiv_=t.closeBoxDiv)}return r(u,t),u.prototype.getCloseBoxDiv_=function(){return this.closeBoxDiv_},u.prototype.getCloseBoxImg_=function(){var n,t;return n=this.getCloseBoxDiv_(),t=this.getOrigCloseBoxImg_(),n||t},u.prototype.getOrigCloseBoxImg_=function(){var n;return n="",this.closeBoxURL_!==""&&(n="<img",n+=" src='"+this.closeBoxURL_+"'",n+=" align=right",n+=" style='",n+=" position: relative;",n+=" cursor: pointer;",n+=" margin: "+this.closeBoxMargin_+";",n+="'>"),n},u}(n.InfoBox),n.uiGmapInfoBox=t),n.MarkerLabel_?n.MarkerLabel_.prototype.setContent=function(){var n;(n=this.marker_.get("labelContent"),n&&!_.isEqual(this.oldContent,n))&&(typeof(n!=null?n.nodeType:void 0)=="undefined"?(this.labelDiv_.innerHTML=n,this.eventDiv_.innerHTML=this.labelDiv_.innerHTML,this.oldContent=n):(this.labelDiv_.innerHTML="",this.labelDiv_.appendChild(n),n=n.cloneNode(!0),this.labelDiv_.innerHTML="",this.eventDiv_.appendChild(n),this.oldContent=n))}:void 0})}})}.call(this),function(){t.module("uiGmapgoogle-maps.extensions").service("uiGmapLodash",function(){return this.intersectionObjects=function(n,t,i){var r;return i==null&&(i=void 0),r=_.map(n,function(){return function(n){return _.find(t,function(t){return i!=null?i(n,t):_.isEqual(n,t)})}}(this)),_.filter(r,function(n){return n!=null})},this.containsObject=_.includeObject=function(n,t,i){return(i==null&&(i=void 0),n===null)?!1:_.any(n,function(){return function(n){return i!=null?i(n,t):_.isEqual(n,t)}}(this))},this.differenceObjects=function(n,t,i){return i==null&&(i=void 0),_.filter(n,function(n){return function(r){return!n.containsObject(t,r,i)}}(this))},this.withoutObjects=this.differenceObjects,this.indexOfObject=function(n,t,i,r){var u,f;if(n==null)return-1;if(u=0,f=n.length,r)if(typeof r=="number")u=r<0?Math.max(0,f+r):r;else return u=_.sortedIndex(n,t),n[u]===t?u:-1;while(u<f){if(i!=null){if(i(n[u],t))return u}else if(_.isEqual(n[u],t))return u;u++}return-1},this.isNullOrUndefined=function(n){return _.isNull(n||_.isUndefined(n))},this})}.call(this),function(){t.module("uiGmapgoogle-maps.extensions").factory("uiGmapString",function(){return function(n){return this.contains=function(t,i){return n.indexOf(t,i)!==-1},this}})}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmap_sync",[function(){return{fakePromise:function(){var n;return n=void 0,{then:function(t){return n=t},resolve:function(){return n.apply(void 0,arguments)}}}}}]).service("uiGmap_async",["$timeout","uiGmapPromise","uiGmapLogger","$q","uiGmapDataStructures","uiGmapGmapUtil",function(n,i,r,u,f,e){var b,k,d,h,g,c,l,nt,a,s,v,y,p,w,tt,it,rt,o,ut;return o=i.promiseTypes,v=i.isInProgress,rt=i.promiseStatus,b=i.ExposedPromise,d=i.SniffedPromise,y=function(n,t){var i;return i=n.promise(),i.promiseType=n.promiseType,i.$$state&&r.debug("promiseType: "+i.promiseType+", state: "+rt(i.$$state.status)),i.cancelCb=t,i},nt=function(n,t){return n.promiseType===o.create&&t.promiseType!==o["delete"]&&t.promiseType!==o.init?(r.debug("lastPromise.promiseType "+t.promiseType+", newPromiseType: "+n.promiseType+", SKIPPED MUST COME AFTER DELETE ONLY"),!0):!1},it=function(n,t,i){var u;if(t.promiseType===o["delete"]&&i.promiseType!==o["delete"]&&i.cancelCb!=null&&_.isFunction(i.cancelCb)&&v(i)&&(r.debug("promiseType: "+t.promiseType+", CANCELING LAST PROMISE type: "+i.promiseType),i.cancelCb("cancel safe"),u=n.peek(),u!=null&&v(u)))return u.hasOwnProperty("cancelCb")&&_.isFunction(u.cancelCb)?(r.debug("promiseType: "+u.promiseType+", CANCELING FIRST PROMISE type: "+u.promiseType),u.cancelCb("cancel safe")):r.warn("first promise was not cancelable")},k=function(n,t,i){var r,u;return n.existingPieces?(r=_.last(n.existingPieces._content),nt(t,r))?void 0:(it(n.existingPieces,t,r),u=b(r["finally"](function(){return y(t,i)})),u.cancelCb=i,u.promiseType=t.promiseType,n.existingPieces.enqueue(u),r["finally"](function(){return n.existingPieces.dequeue()})):(n.existingPieces=new f.Queue,n.existingPieces.enqueue(y(t,i)))},w=function(n,t,i,u,f){var e;return i==null&&(i=""),e=function(n){return r.debug(n+": "+n),u!=null&&_.isFunction(u)?u(n):void 0},k(n,d(f,t),e)},c=80,s={value:null},ut=function(n,t,i){var r;try{return n.apply(t,i)}catch(u){return r=u,s.value=r,s}},p=function(n,t,i,u){var f,e;return(e=ut(n,t,u),e===s&&(f="error within chunking iterator: "+s.value,r.error(f),i.reject(f)),e==="cancel safe")?!1:!0},g=function(n,t,i){var u,r;return(u=n===t,r=t[i],u)?r:n[r]},h=function(n,i,r,u){var f;return(t.isArray(n)?f=n:(f=i?i:Object.keys(_.omit(n,["length","forEach","map"])),i=f),u==null&&(u=r),t.isArray(f)&&(f===void 0||(f!=null?f.length:void 0)<=0)&&u!==r)?r():u(f,i)},l=function(i,r,u,f,e,o,s,c){return h(i,c,function(h,c){var w,a,v,y;for(w=r&&r<h.length?r:h.length,a=s,v=!0;v&&w--&&a<(h?h.length:a+1);)y=g(i,h,a),v=t.isFunction(y)?!0:p(f,void 0,o,[y,a]),++a;if(h)if(v&&a<h.length){if(s=a,r)return e!=null&&_.isFunction(e)&&p(e,void 0,o,[]),n(function(){return l(i,r,u,f,e,o,s,c)},u,!1)}else return o.resolve()})},a=function(n,t,u,f,e,o,s){var y,a,v;return(u==null&&(u=c),e==null&&(e=0),o==null&&(o=1),v=void 0,a=i.defer(),v=a.promise,!o)?(y="pause (delay) must be set from _async!",r.error(y),a.reject(y),v):h(n,s,function(){return a.resolve(),v},function(i,r){return l(n,u,o,t,f,a,e,r),v})},tt=function(n,t,r,u,f,e,o){var s;return s=[],h(n,o,function(){return i.resolve(s)},function(i,o){return a(n,function(n){return s.push(t(n))},r,u,f,e,o).then(function(){return s})})},{each:a,map:tt,managePromiseQueue:w,promiseLock:w,defaultChunkSize:c,chunkSizeFrom:function(n,t){return t==null&&(t=void 0),_.isNumber(n)&&(t=n),(e.isFalse(n)||n===!1)&&(t=!1),t}}}])}.call(this),function(){var n=[].indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===n)return t;return-1};t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapBaseObject",function(){var t;return t=["extended","included"],function(){function i(){}return i.extend=function(i){var r,u,f;for(r in i)f=i[r],n.call(t,r)<0&&(this[r]=f);return(u=i.extended)!=null&&u.apply(this),this},i.include=function(i){var r,u,f;for(r in i)f=i[r],n.call(t,r)<0&&(this.prototype[r]=f);return(u=i.included)!=null&&u.apply(this),this},i}()})}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChildEvents",function(){return{onChildCreation:function(){}}})}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapCtrlHandle",["$q",function(n){var t;return t={handle:function(i){return i.$on("$destroy",function(){return t.handle(i)}),i.deferred=n.defer(),{getScope:function(){return i}}},mapPromise:function(n,t){var i;return i=t.getScope(),i.deferred.promise.then(function(t){return n.map=t}),i.deferred.promise}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapEventsHelper",["uiGmapLogger",function(){var i,n;return n=function(n){return t.isDefined(n.events)&&n.events!=null&&t.isObject(n.events)},i=function(t,i){return n(t)?t:n(i)?i:void 0},{setEvents:function(n,r,u,f){var e;return e=i(r,u),e!=null?_.compact(_.map(e.events,function(i,o){var s;return f&&(s=_(f).contains(o)),e.events.hasOwnProperty(o)&&t.isFunction(e.events[o])&&!s?google.maps.event.addListener(n,o,function(){return r.$evalAsync||(r.$evalAsync=function(){}),r.$evalAsync(i.apply(r,[n,o,u,arguments]))}):void 0})):void 0},removeEvents:function(n){if(n)return n.forEach(function(n){if(n)return google.maps.event.removeListener(n)})}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapFitHelper",["uiGmapLogger","uiGmap_async",function(){return{fit:function(n,t){var r,i;if(t&&n&&n.length>0&&(r=new google.maps.LatLngBounds,i=!1,n.forEach(function(){return function(n){if(n)return i||(i=!0),r.extend(n.getPosition())}}(this)),i))return t.fitBounds(r)}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapGmapUtil",["uiGmapLogger","$compile",function(n,i){var u,r,f,e,o,s;return r=function(n,t,i){return n===t||i.indexOf(n)!==-1},u=function(n){return r(n,!1,["false","FALSE",0,"n","N","no","NO"])},e=function(n){return Array.isArray(n)&&n.length===2?n[1]:t.isDefined(n.type)&&n.type==="Point"?n.coordinates[1]:n.latitude},o=function(n){return Array.isArray(n)&&n.length===2?n[0]:t.isDefined(n.type)&&n.type==="Point"?n.coordinates[0]:n.longitude},f=function(n){if(n)return Array.isArray(n)&&n.length===2?new google.maps.LatLng(n[1],n[0]):t.isDefined(n.type)&&n.type==="Point"?new google.maps.LatLng(n.coordinates[1],n.coordinates[0]):new google.maps.LatLng(n.latitude,n.longitude)},s=function(n){if(t.isUndefined(n))return!1;if(_.isArray(n)){if(n.length===2)return!0}else if(n!=null&&(n!=null?n.type:void 0)&&n.type==="Point"&&_.isArray(n.coordinates)&&n.coordinates.length===2)return!0;return n&&t.isDefined((n!=null?n.latitude:void 0)&&t.isDefined(n!=null?n.longitude:void 0))?!0:!1},{setCoordsFromEvent:function(n,i){if(n)return Array.isArray(n)&&n.length===2?(n[1]=i.lat(),n[0]=i.lng()):t.isDefined(n.type)&&n.type==="Point"?(n.coordinates[1]=i.lat(),n.coordinates[0]=i.lng()):(n.latitude=i.lat(),n.longitude=i.lng()),n},getLabelPositionPoint:function(n){var t,i;if(n!==void 0)return n=/^([-\d\.]+)\s([-\d\.]+)$/.exec(n),t=parseFloat(n[1]),i=parseFloat(n[2]),t!=null&&i!=null?new google.maps.Point(t,i):void 0},createWindowOptions:function(r,u,e,o){var s;return e!=null&&o!=null&&i!=null?(s=t.extend({},o,{content:this.buildContent(u,o,e),position:o.position!=null?o.position:t.isObject(r)?r.getPosition():f(u.coords)}),r!=null&&(s!=null?s.pixelOffset:void 0)==null&&(s.boxClass==null||(s.pixelOffset={height:0,width:-2})),s):o?o:(n.error("infoWindow defaults not defined"),!e)?n.error("infoWindow content not defined"):void 0},buildContent:function(n,t,r){var f,u;return t.content!=null?u=t.content:i!=null?(r=r.replace(/^\s+|\s+$/g,""),f=r===""?"":i(r)(n),f.length>0&&(u=f[0])):u=r,u},defaultDelay:50,isTrue:function(n){return r(n,!0,["true","TRUE",1,"y","Y","yes","YES"])},isFalse:u,isFalsy:function(n){return r(n,!1,[void 0,null])||u(n)},getCoords:f,validateCoords:s,equalCoords:function(n,t){return e(n)===e(t)&&o(n)===o(t)},validatePath:function(n){var r,i,f,u;if(i=0,t.isUndefined(n.type)){if(!Array.isArray(n)||n.length<2)return!1;while(i<n.length){if(!(t.isDefined(n[i].latitude)&&t.isDefined(n[i].longitude)||typeof n[i].lat=="function"&&typeof n[i].lng=="function"))return!1;i++}return!0}if(t.isUndefined(n.coordinates))return!1;if(n.type==="Polygon"){if(n.coordinates[0].length<4)return!1;r=n.coordinates[0]}else if(n.type==="MultiPolygon"){if(u={max:0,index:0},_.forEach(n.coordinates,function(n,t){if(n[0].length>this.max)return this.max=n[0].length,this.index=t},u),f=n.coordinates[u.index],r=f[0],r.length<4)return!1}else if(n.type==="LineString"){if(n.coordinates.length<2)return!1;r=n.coordinates}else return!1;while(i<r.length){if(r[i].length!==2)return!1;i++}return!0},convertPathPoints:function(n){var r,i,u,f,e;if(i=0,f=new google.maps.MVCArray,t.isUndefined(n.type))while(i<n.length)u,t.isDefined(n[i].latitude)&&t.isDefined(n[i].longitude)?u=new google.maps.LatLng(n[i].latitude,n[i].longitude):typeof n[i].lat=="function"&&typeof n[i].lng=="function"&&(u=n[i]),f.push(u),i++;else for(r,n.type==="Polygon"?r=n.coordinates[0]:n.type==="MultiPolygon"?(e={max:0,index:0},_.forEach(n.coordinates,function(n,t){if(n[0].length>this.max)return this.max=n[0].length,this.index=t},e),r=n.coordinates[e.index][0]):n.type==="LineString"&&(r=n.coordinates);i<r.length;)f.push(new google.maps.LatLng(r[i][1],r[i][0])),i++;return f},extendMapBounds:function(n,t){for(var r=new google.maps.LatLngBounds,i=0;i<t.length;)r.extend(t.getAt(i)),i++;return n.fitBounds(r)},getPath:function(n,t){var i;return t==null||!_.isString(t)?t:(i=n,_.each(t.split("."),function(n){if(i)return i=i[n]}),i)},validateBoundPoints:function(n){return t.isUndefined(n.sw.latitude)||t.isUndefined(n.sw.longitude)||t.isUndefined(n.ne.latitude)||t.isUndefined(n.ne.longitude)?!1:!0},convertBoundPoints:function(n){return new google.maps.LatLngBounds(new google.maps.LatLng(n.sw.latitude,n.sw.longitude),new google.maps.LatLng(n.ne.latitude,n.ne.longitude))},fitMapBounds:function(n,t){return n.fitBounds(t)}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapIsReady",["$q","$timeout",function(n,t){var u,i,f,r;return i=0,r=[],f=function(){return n.all(r)},u=function(n,r,e){return t(function(){return e<=0&&n.reject("Your maps are not found we have checked the maximum amount of times. :)"),i!==r?u(n,r,e-1):n.resolve(f())},100)},{spawn:function(){var t;return t=n.defer(),r.push(t.promise),i+=1,{instance:i,deferred:t}},promises:f,instances:function(){return i},promise:function(t,i){var r;return t==null&&(t=1),i==null&&(i=50),r=n.defer(),u(r,t,i),r.promise},reset:function(){i=0;r.length=0},decrement:function(){i>0&&(i-=1);r.length&&(r.length-=1)}}}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapLinked",["uiGmapBaseObject",function(t){return function(t){function i(n,t,i,r){this.scope=n;this.element=t;this.attrs=i;this.ctrls=r}return n(i,t),i}(t)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapLogger",["$log",function(n){var t,i,r,u;return t={log:1,info:2,debug:3,warn:4,error:5,none:6},u=function(n,t,i){if(n>=t)return i()},r=function(t,i){return n!=null?n[t](i):console[t](i)},i=function(){function i(){var n;this.doLog=!0;n={};["log","info","debug","warn","error"].forEach(function(i){return function(f){return n[f]=function(n){if(i.doLog)return u(t[f],i.currentLevel,function(){return r(f,n)})}}}(this));this.LEVELS=t;this.currentLevel=t.error;this.log=n.log;this.info=n.info;this.debug=n.debug;this.warn=n.warn;this.error=n.error}return i.prototype.spawn=function(){return new i},i.prototype.setLog=function(t){return n=t},i}(),new i}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelKey",["uiGmapBaseObject","uiGmapGmapUtil","uiGmapPromise","$q","$timeout",function(r,u){return function(r){function f(t){this.scope=t;this.modelsLength=n(this.modelsLength,this);this.updateChild=n(this.updateChild,this);this.destroy=n(this.destroy,this);this.onDestroy=n(this.onDestroy,this);this.setChildScope=n(this.setChildScope,this);this.getChanges=n(this.getChanges,this);this.getProp=n(this.getProp,this);this.setIdKey=n(this.setIdKey,this);this.modelKeyComparison=n(this.modelKeyComparison,this);f.__super__.constructor.call(this);this["interface"]={};this["interface"].scopeKeys=[];this.defaultIdKey="id";this.idKey=void 0}return i(f,r),f.prototype.evalModelHandle=function(n,t){if(n!=null&&t!=null)return t==="self"?n:(_.isFunction(t)&&(t=t()),u.getPath(n,t))},f.prototype.modelKeyComparison=function(n,t){var r,f,i;if(r=_.contains(this["interface"].scopeKeys,"coords"),(r&&this.scope.coords!=null||!r)&&(i=this.scope),i==null)throw"No scope set!";return r&&(f=u.equalCoords(this.scopeOrModelVal("coords",i,n),this.scopeOrModelVal("coords",i,t)),!f)?f:_.every(_.without(this["interface"].scopeKeys,"coords"),function(r){return function(u){return r.scopeOrModelVal(i[u],i,n)===r.scopeOrModelVal(i[u],i,t)}}(this))},f.prototype.setIdKey=function(n){return this.idKey=n.idKey!=null?n.idKey:this.defaultIdKey},f.prototype.setVal=function(n,t,i){var r;return r=this.modelOrKey(n,t),r=i,n},f.prototype.modelOrKey=function(n,t){if(t!=null)return t!=="self"?u.getPath(n,t):n},f.prototype.getProp=function(n,t,i){return this.scopeOrModelVal(n,t,i)},f.prototype.getChanges=function(n,t,i){var f,u,r;i&&(t=_.pick(t,i),n=_.pick(n,i));u={};r={};f={};for(r in n)t&&t[r]===n[r]||(_.isArray(n[r])?u[r]=n[r]:_.isObject(n[r])?(f=this.getChanges(n[r],t?t[r]:null),_.isEmpty(f)||(u[r]=f)):u[r]=n[r]);return u},f.prototype.scopeOrModelVal=function(n,t,i,r){var f,e,o,u;return(r==null&&(r=!1),f=function(n,t,i){return(i==null&&(i=!1),i)?{isScope:n,value:t}:t},u=_.get(t,n),_.isFunction(u))?f(!0,u(i),r):_.isObject(u)?f(!0,u,r):_.isString(u)?(e=u,o=e?e==="self"?i:_.get(i,e):_.get(i,n),_.isFunction(o))?f(!1,o(),r):f(!1,o,r):f(!0,u,r)},f.prototype.setChildScope=function(n,t,i){return _.each(n,function(n){return function(r){var u,f;return u=n.scopeOrModelVal(r,t,i,!0),(u!=null?u.value:void 0)!=null&&(f=u.value,f!==t[r])?t[r]=f:void 0}}(this)),t.model=i},f.prototype.onDestroy=function(){},f.prototype.destroy=function(n){var t;return n==null&&(n=!1),this.scope==null||((t=this.scope)!=null?t.$$destroyed:void 0)||!(this.needToManualDestroy||n)?this.clean():this.scope.$destroy()},f.prototype.updateChild=function(n,t){if(t[this.idKey]==null){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.");return}return n.updateModel(t)},f.prototype.modelsLength=function(n){var r,i;return(n==null&&(n=void 0),r=0,i=n?n:this.scope.models,i==null)?r:t.isArray(i)||i.length!=null?i.length:Object.keys(i).length},f}(r)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelsWatcher",["uiGmapLogger","uiGmap_async","$q","uiGmapPromise",function(n,t,i,r){return{didQueueInitPromise:function(n,i){return i.models.length===0?(t.promiseLock(n,r.promiseTypes.init,null,null,function(){return function(){return r.resolve()}}(this)),!0):!1},figureOutState:function(t,i,r,u){var f,h,e,o,s;return f=[],e={},o=[],s=[],i.models.forEach(function(o){var h;if(o[t]!=null){if(e[o[t]]={},r.get(o[t])==null)return f.push(o);if(h=r.get(o[t]),!u(o,h.clonedModel,i))return s.push({model:o,child:h})}else return n.error(" id missing for model #{m.toString()},\ncan not use do comparison/insertion")}),h=r.values(),h.forEach(function(i){var r;if(i==null){n.error("child undefined in ModelsWatcher.");return}if(i.model==null){n.error("child.model undefined in ModelsWatcher.");return}return r=i.model[t],e[r]==null?o.push(i):void 0}),{adds:f,removals:o,updates:s}}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapPromise",["$q","$timeout","uiGmapLogger",function(n,t,i){var u,f,e,o,s,h,c,r,l,a,v;return l={create:"create",update:"update","delete":"delete",init:"init"},r={IN_PROGRESS:0,RESOLVED:1,REJECTED:2},v=function(){var n;return n={},n[""+r.IN_PROGRESS]="in-progress",n[""+r.RESOLVED]="resolved",n[""+r.REJECTED]="rejected",n}(),o=function(n){return n.$$state?n.$$state.status===r.IN_PROGRESS:n.hasOwnProperty("$$v")?void 0:!0},s=function(n){return n.$$state?n.$$state.status===r.RESOLVED:n.hasOwnProperty("$$v")?!0:void 0},c=function(n){return v[n]||"done w error"},u=function(t){var r,u,i;return r=n.defer(),u=n.all([t,r.promise]),i=n.defer(),t.then(r.resolve,function(){},function(n){return r.notify(n),i.notify(n)}),u.then(function(n){return i.resolve(n[0]||n[1])},function(n){return i.reject(n)}),i.promise.cancel=function(n){return n==null&&(n="canceled"),r.reject(n)},i.promise.notify=function(n){return n==null&&(n="cancel safe"),i.notify(n),t.hasOwnProperty("notify")?t.notify(n):void 0},t.promiseType!=null&&(i.promise.promiseType=t.promiseType),i.promise},f=function(n,t){return{promise:n,promiseType:t}},e=function(){return n.defer()},a=function(){var t;return t=n.defer(),t.resolve.apply(void 0,arguments),t.promise},h=function(r){var u;if(!_.isFunction(r)){i.error("uiGmapPromise.promise() only accepts functions");return}return u=n.defer(),t(function(){var n;return n=r(),u.resolve(n)}),u.promise},{defer:e,promise:h,resolve:a,promiseTypes:l,isInProgress:o,isResolved:s,promiseStatus:c,ExposedPromise:u,SniffedPromise:f}}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropMap",function(){return function(){function t(){this.removeAll=n(this.removeAll,this);this.slice=n(this.slice,this);this.push=n(this.push,this);this.keys=n(this.keys,this);this.values=n(this.values,this);this.remove=n(this.remove,this);this.put=n(this.put,this);this.stateChanged=n(this.stateChanged,this);this.get=n(this.get,this);this.length=0;this.dict={};this.didValsStateChange=!1;this.didKeysStateChange=!1;this.allVals=[];this.allKeys=[]}return t.prototype.get=function(n){return this.dict[n]},t.prototype.stateChanged=function(){return this.didValsStateChange=!0,this.didKeysStateChange=!0},t.prototype.put=function(n,t){return this.get(n)==null&&this.length++,this.stateChanged(),this.dict[n]=t},t.prototype.remove=function(n,t){var i;if(t==null&&(t=!1),!t||this.get(n))return i=this.dict[n],delete this.dict[n],this.length--,this.stateChanged(),i},t.prototype.valuesOrKeys=function(n){var t,i;return(n==null&&(n="Keys"),!this["did"+n+"StateChange"])?this["all"+n]:(i=[],t=[],_.each(this.dict,function(n,r){return i.push(n),t.push(r)}),this.didKeysStateChange=!1,this.didValsStateChange=!1,this.allVals=i,this.allKeys=t,this["all"+n])},t.prototype.values=function(){return this.valuesOrKeys("Vals")},t.prototype.keys=function(){return this.valuesOrKeys()},t.prototype.push=function(n,t){return t==null&&(t="key"),this.put(n[t],n)},t.prototype.slice=function(){return this.keys().map(function(n){return function(t){return n.remove(t)}}(this))},t.prototype.removeAll=function(){return this.slice()},t.prototype.each=function(n){return _.each(this.dict,function(t){return n(t)})},t.prototype.map=function(n){return _.map(this.dict,function(t){return n(t)})},t}()})}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropertyAction",["uiGmapLogger",function(){return function(n){return this.setIfChange=function(t,i){var r;return r=this.exp,_.isEqual(i,t)?void 0:n(r,t)},this.sic=this.setIfChange,this}}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapClustererMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap",function(i,r,u){return function(){function f(t,r,e,o){r==null&&(r={});this.opt_options=e!=null?e:{};this.opt_events=o;this.checkSync=n(this.checkSync,this);this.getGMarkers=n(this.getGMarkers,this);this.fit=n(this.fit,this);this.destroy=n(this.destroy,this);this.clear=n(this.clear,this);this.draw=n(this.draw,this);this.removeMany=n(this.removeMany,this);this.remove=n(this.remove,this);this.addMany=n(this.addMany,this);this.update=n(this.update,this);this.add=n(this.add,this);this.type=f.type;this.clusterer=new NgMapMarkerClusterer(t,r,this.opt_options);this.propMapGMarkers=new u;this.attachEvents(this.opt_events,"opt_events");this.clusterer.setIgnoreHidden(!0);this.noDrawOnSingleAddRemoves=!0;i.info(this)}return f.type="ClustererMarkerManager",f.prototype.checkKey=function(n){var t;if(n.key==null)return t="gMarker.key undefined and it is REQUIRED!!",i.error(t)},f.prototype.add=function(n){return this.checkKey(n),this.clusterer.addMarker(n,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(n.key,n),this.checkSync()},f.prototype.update=function(n){return this.remove(n),this.add(n)},f.prototype.addMany=function(n){return n.forEach(function(n){return function(t){return n.add(t)}}(this))},f.prototype.remove=function(n){var t;return this.checkKey(n),t=this.propMapGMarkers.get(n.key),t&&(this.clusterer.removeMarker(n,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(n.key)),this.checkSync()},f.prototype.removeMany=function(n){return n.forEach(function(n){return function(t){return n.remove(t)}}(this))},f.prototype.draw=function(){return this.clusterer.repaint()},f.prototype.clear=function(){return this.removeMany(this.getGMarkers()),this.clusterer.repaint()},f.prototype.attachEvents=function(n,r){var e,u,f;if(t.isDefined(n)&&n!=null&&t.isObject(n)){f=[];for(u in n)e=n[u],n.hasOwnProperty(u)&&t.isFunction(n[u])?(i.info(r+": Attaching event: "+u+" to clusterer"),f.push(google.maps.event.addListener(this.clusterer,u,n[u]))):f.push(void 0);return f}},f.prototype.clearEvents=function(n,r){var e,u,f;if(t.isDefined(n)&&n!=null&&t.isObject(n)){f=[];for(u in n)e=n[u],n.hasOwnProperty(u)&&t.isFunction(n[u])?(i.info(r+": Clearing event: "+u+" to clusterer"),f.push(google.maps.event.clearListeners(this.clusterer,u))):f.push(void 0);return f}},f.prototype.destroy=function(){return this.clearEvents(this.opt_events,"opt_events"),this.clear()},f.prototype.fit=function(){return r.fit(this.getGMarkers(),this.clusterer.getMap())},f.prototype.getGMarkers=function(){return this.clusterer.getMarkers().values()},f.prototype.checkSync=function(){},f}()}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap",function(t,i,r){return function(){function u(i){this.getGMarkers=n(this.getGMarkers,this);this.fit=n(this.fit,this);this.handleOptDraw=n(this.handleOptDraw,this);this.clear=n(this.clear,this);this.draw=n(this.draw,this);this.removeMany=n(this.removeMany,this);this.remove=n(this.remove,this);this.addMany=n(this.addMany,this);this.update=n(this.update,this);this.add=n(this.add,this);this.type=u.type;this.gMap=i;this.gMarkers=new r;this.$log=t;this.$log.info(this)}return u.type="MarkerManager",u.prototype.add=function(n,i){var u,r;if(i==null&&(i=!0),n.key==null){r="gMarker.key undefined and it is REQUIRED!!";t.error(r);throw r;}return u=this.gMarkers.get(n.key),u?void 0:(this.handleOptDraw(n,i,!0),this.gMarkers.put(n.key,n))},u.prototype.update=function(n,t){return t==null&&(t=!0),this.remove(n,t),this.add(n,t)},u.prototype.addMany=function(n){return n.forEach(function(n){return function(t){return n.add(t)}}(this))},u.prototype.remove=function(n,t){return t==null&&(t=!0),this.handleOptDraw(n,t,!1),this.gMarkers.get(n.key)?this.gMarkers.remove(n.key):void 0},u.prototype.removeMany=function(n){return n.forEach(function(n){return function(t){return n.remove(t)}}(this))},u.prototype.draw=function(){var n;return n=[],this.gMarkers.each(function(t){return function(i){if(!i.isDrawn)return i.doAdd?(i.setMap(t.gMap),i.isDrawn=!0):n.push(i)}}(this)),n.forEach(function(n){return function(t){return t.isDrawn=!1,n.remove(t,!0)}}(this))},u.prototype.clear=function(){return this.gMarkers.each(function(n){return n.setMap(null)}),delete this.gMarkers,this.gMarkers=new r},u.prototype.handleOptDraw=function(n,t,i){return t===!0?(i?n.setMap(this.gMap):n.setMap(null),n.isDrawn=!0):(n.isDrawn=!1,n.doAdd=i)},u.prototype.fit=function(){return i.fit(this.getGMarkers(),this.gMap)},u.prototype.getGMarkers=function(){return this.gMarkers.values()},u}()}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapSpiderfierMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapMarkerSpiderfier",function(i,r,u,f){return function(){function e(t,r,o,s,h){r==null&&(r={});this.opt_options=o!=null?o:{};this.opt_events=s;this.scope=h;this.checkSync=n(this.checkSync,this);this.getGMarkers=n(this.getGMarkers,this);this.fit=n(this.fit,this);this.destroy=n(this.destroy,this);this.attachEvents=n(this.attachEvents,this);this.clear=n(this.clear,this);this.draw=n(this.draw,this);this.removeMany=n(this.removeMany,this);this.remove=n(this.remove,this);this.addMany=n(this.addMany,this);this.update=n(this.update,this);this.add=n(this.add,this);this.type=e.type;this.clusterer=new f(t,this.opt_options);this.propMapGMarkers=new u;this.attachEvents(this.opt_events,"opt_events");this.noDrawOnSingleAddRemoves=!0;i.info(this)}return e.type="SpiderfierMarkerManager",e.prototype.checkKey=function(n){var t;if(n.key==null)return t="gMarker.key undefined and it is REQUIRED!!",i.error(t)},e.prototype.add=function(n){return n.setMap(this.clusterer.map),this.checkKey(n),this.clusterer.addMarker(n,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(n.key,n),this.checkSync()},e.prototype.update=function(n){return this.remove(n),this.add(n)},e.prototype.addMany=function(n){return n.forEach(function(n){return function(t){return n.add(t)}}(this))},e.prototype.remove=function(n){var t;return this.checkKey(n),t=this.propMapGMarkers.get(n.key),t&&(n.setMap(null),this.clusterer.removeMarker(n,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(n.key)),this.checkSync()},e.prototype.removeMany=function(n){return n.forEach(function(n){return function(t){return n.remove(t)}}(this))},e.prototype.draw=function(){},e.prototype.clear=function(){return this.removeMany(this.getGMarkers())},e.prototype.attachEvents=function(n,r){if(t.isDefined(n)&&n!=null&&t.isObject(n))return _.each(n,function(u){return function(f,e){if(n.hasOwnProperty(e)&&t.isFunction(n[e]))return i.info(r+": Attaching event: "+e+" to clusterer"),u.clusterer.addListener(e,function(){return e==="spiderfy"||e==="unspiderfy"?u.scope.$evalAsync(n[e].apply(n,arguments)):u.scope.$evalAsync(n[e].apply(n,[arguments[0],e,arguments[0].model,arguments]))})}}(this))},e.prototype.clearEvents=function(n,r){var e,u,f;if(t.isDefined(n)&&n!=null&&t.isObject(n)){f=[];for(u in n)e=n[u],n.hasOwnProperty(u)&&t.isFunction(n[u])?(i.info(r+": Clearing event: "+u+" to clusterer"),f.push(this.clusterer.clearListeners(u))):f.push(void 0);return f}},e.prototype.destroy=function(){return this.clearEvents(this.opt_events,"opt_events"),this.clear()},e.prototype.fit=function(){return r.fit(this.getGMarkers(),this.clusterer.map)},e.prototype.getGMarkers=function(){return this.clusterer.getMarkers()},e.prototype.checkSync=function(){},e}()}])}.call(this),function(){t.module("uiGmapgoogle-maps").factory("uiGmapadd-events",["$timeout",function(n){var i;return i=function(t,i,r){return google.maps.event.addListener(t,i,function(){return r.apply(this,arguments),n(function(){},!0)})},function(n,r,u){var f;return u?i(n,r,u):(f=[],t.forEach(r,function(t,r){return f.push(i(n,r,t))}),function(){return t.forEach(f,function(n){return google.maps.event.removeListener(n)}),f=null})}}])}.call(this),function(){t.module("uiGmapgoogle-maps").factory("uiGmaparray-sync",["uiGmapadd-events",function(n){return function(i,r,u,f){var s,l,a,o,v,y,c,e,h;return o=!1,e=r.$eval(u),r["static"]||(v={set_at:function(n){var t;if(!o)return(t=i.getAt(n),!t)?void 0:t.lng&&t.lat?(e[n].latitude=t.lat(),e[n].longitude=t.lng()):e[n]=t},insert_at:function(n){var t;if(!o)return(t=i.getAt(n),!t)?void 0:t.lng&&t.lat?e.splice(n,0,{latitude:t.lat(),longitude:t.lng()}):e.splice(n,0,t)},remove_at:function(n){if(!o)return e.splice(n,1)}},s,e.type==="Polygon"?s=e.coordinates[0]:e.type==="LineString"&&(s=e.coordinates),l={set_at:function(n){var t;if(!o)return(t=i.getAt(n),!t)?void 0:!t.lng||!t.lat?void 0:(s[n][1]=t.lat(),s[n][0]=t.lng())},insert_at:function(n){var t;if(!o)return(t=i.getAt(n),!t)?void 0:!t.lng||!t.lat?void 0:s.splice(n,0,[t.lng(),t.lat()])},remove_at:function(n){if(!o)return s.splice(n,1)}},c=n(i,t.isUndefined(e.type)?v:l)),y=function(n){var e,r,l,h,t,u,c,s;if(o=!0,u=i,e=!1,n){for(r=0,c=u.getLength(),h=n.length,l=Math.min(c,h),t=void 0;r<l;)s=u.getAt(r),t=n[r],typeof t.equals=="function"?t.equals(s)||(u.setAt(r,t),e=!0):(s.lat()!==t.latitude||s.lng()!==t.longitude)&&(u.setAt(r,new google.maps.LatLng(t.latitude,t.longitude)),e=!0),r++;while(r<h)t=n[r],typeof t.lat=="function"&&typeof t.lng=="function"?u.push(t):u.push(new google.maps.LatLng(t.latitude,t.longitude)),e=!0,r++;while(r<c)u.pop(),e=!0,r++}return o=!1,e?f(u):void 0},a=function(n){var s,h,t,v,c,r,u,l,a;if(o=!0,u=i,h=!1,n){for(s,e.type==="Polygon"?s=n.coordinates[0]:e.type==="LineString"&&(s=n.coordinates),t=0,l=u.getLength(),c=s.length,v=Math.min(l,c),r=void 0;t<v;)a=u.getAt(t),r=s[t],(a.lat()!==r[1]||a.lng()!==r[0])&&(u.setAt(t,new google.maps.LatLng(r[1],r[0])),h=!0),t++;while(t<c)r=s[t],u.push(new google.maps.LatLng(r[1],r[0])),h=!0,t++;while(t<l)u.pop(),h=!0,t++}return o=!1,h?f(u):void 0},h,r["static"]||(h=t.isUndefined(e.type)?r.$watchCollection(u,y):r.$watch(u,a,!0)),function(){return c&&(c(),c=null),h?(h(),h=null):void 0}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChromeFixes",["$timeout",function(n){return{maybeRepaint:function(t){if(t)return t.style.opacity=.9,n(function(){return t.style.opacity=1})}}}])}.call(this),function(){t.module("uiGmapgoogle-maps").service("uiGmapObjectIterators",function(){var t,n,i,r;return t=["length","forEach","map"],n=[],i=function(n){return n.forEach=function(i){return _.each(_.omit(n,t),function(n){if(!_.isFunction(n))return i(n)})},n},n.push(i),r=function(n){return n.map=function(i){return _.map(_.omit(n,t),function(n){if(!_.isFunction(n))return i(n)})},n},n.push(r),{slapMap:r,slapForEach:i,slapAll:function(t){return n.forEach(function(n){return n(t)}),t}}})}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.options.builders").service("uiGmapCommonOptionsBuilder",["uiGmapBaseObject","uiGmapLogger","uiGmapModelKey",function(r,u,f){return function(r){function f(){return this.watchProps=n(this.watchProps,this),this.buildOpts=n(this.buildOpts,this),f.__super__.constructor.apply(this,arguments)}return i(f,r),f.prototype.props=["clickable","draggable","editable","visible",{prop:"stroke",isColl:!0}],f.prototype.getCorrectModel=function(n){return t.isDefined(n!=null?n.model:void 0)?n.model:n},f.prototype.buildOpts=function(n,i,r){var o,e,f;if(n==null&&(n={}),r==null&&(r={}),!this.scope){u.error("this.scope not defined in CommonOptionsBuilder can not buildOpts");return}if(!this.map){u.error("this.map not defined in CommonOptionsBuilder can not buildOpts");return}return o=this.getCorrectModel(this.scope),f=this.scopeOrModelVal("stroke",this.scope,o),e=t.extend(n,this.DEFAULTS,{map:this.map,strokeColor:f!=null?f.color:void 0,strokeOpacity:f!=null?f.opacity:void 0,strokeWeight:f!=null?f.weight:void 0}),t.forEach(t.extend(r,{clickable:!0,draggable:!1,editable:!1,"static":!1,fit:!1,visible:!0,zIndex:0,icons:[]}),function(n){return function(r,u){var f;return f=i?i[u]:n.scopeOrModelVal(u,n.scope,o),e[u]=t.isUndefined(f)?r:o[u]}}(this)),e["static"]&&(e.editable=!1),e},f.prototype.watchProps=function(n){return n==null&&(n=this.props),n.forEach(function(n){return function(t){if(n.attrs[t]!=null||n.attrs[t!=null?t.prop:void 0]!=null)return(t!=null?t.isColl:void 0)?n.scope.$watchCollection(t.prop,n.setMyOptions):n.scope.$watch(t,n.setMyOptions)}}(this))},f}(f)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.options.builders").factory("uiGmapPolylineOptionsBuilder",["uiGmapCommonOptionsBuilder",function(t){return function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i.prototype.buildOpts=function(n,t){return i.__super__.buildOpts.call(this,{path:n},t,{geodesic:!1})},i}(t)}]).factory("uiGmapShapeOptionsBuilder",["uiGmapCommonOptionsBuilder",function(i){return function(i){function r(){return r.__super__.constructor.apply(this,arguments)}return n(r,i),r.prototype.buildOpts=function(n,i,u){var f,e;return e=this.getCorrectModel(this.scope),f=i?i.fill:this.scopeOrModelVal("fill",this.scope,e),n=t.extend(n,{fillColor:f!=null?f.color:void 0,fillOpacity:f!=null?f.opacity:void 0}),r.__super__.buildOpts.call(this,n,i,u)},r}(i)}]).factory("uiGmapPolygonOptionsBuilder",["uiGmapShapeOptionsBuilder",function(t){return function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i.prototype.buildOpts=function(n,t){return i.__super__.buildOpts.call(this,{path:n},t,{geodesic:!1})},i}(t)}]).factory("uiGmapRectangleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(t){return function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i.prototype.buildOpts=function(n,t){return i.__super__.buildOpts.call(this,{bounds:n},t)},i}(t)}]).factory("uiGmapCircleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(t){return function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i.prototype.buildOpts=function(n,t,r){return i.__super__.buildOpts.call(this,{center:n,radius:t},r)},i}(t)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.options").service("uiGmapMarkerOptions",["uiGmapLogger","uiGmapGmapUtil",function(n,i){return _.extend(i,{createOptions:function(n,r,u,f){var e;return u==null&&(u={}),e=t.extend({},u,{position:u.position!=null?u.position:i.getCoords(n),visible:u.visible!=null?u.visible:i.validateCoords(n)}),(u.icon!=null||r!=null)&&(e=t.extend(e,{icon:u.icon!=null?u.icon:r})),f!=null&&(e.map=f),e},isLabel:function(n){return n==null?!1:n.labelContent!=null||n.labelAnchor!=null||n.labelClass!=null||n.labelStyle!=null||n.labelVisible!=null}})}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapBasePolyChildModel",["uiGmapLogger","$timeout","uiGmaparray-sync","uiGmapGmapUtil","uiGmapEventsHelper",function(r,u,f,e,o){return function(r,u){return function(r){function s(i,r,e,s,h){var c;this.scope=i;this.attrs=r;this.map=e;this.defaults=s;this.model=h;this.clean=n(this.clean,this);this.clonedModel=_.clone(this.model,!0);this.isDragging=!1;this.internalEvents={dragend:function(n){return function(){return _.defer(function(){return n.isDragging=!1})}}(this),dragstart:function(n){return function(){return n.isDragging=!0}}(this)};c=function(n){return function(){var r,i;if(!n.isDragging)return i=n.convertPathPoints(n.scope.path),n.gObject!=null&&n.clean(),n.scope.model!=null&&(r=n.scope),i.length>0&&(n.gObject=u(n.buildOpts(i,r))),n.gObject?(n.scope.fit&&n.extendMapBounds(n.map,i),f(n.gObject.getPath(),n.scope,"path",function(t){if(n.scope.fit)return n.extendMapBounds(n.map,t)}),t.isDefined(n.scope.events)&&t.isObject(n.scope.events)&&(n.listeners=n.model?o.setEvents(n.gObject,n.scope,n.model):o.setEvents(n.gObject,n.scope,n.scope)),n.internalListeners=n.model?o.setEvents(n.gObject,{events:n.internalEvents},n.model):o.setEvents(n.gObject,{events:n.internalEvents},n.scope)):void 0}}(this);c();this.scope.$watch("path",function(n){return function(t,i){if(!_.isEqual(t,i)||!n.gObject)return c()}}(this),!0);!this.scope["static"]&&t.isDefined(this.scope.editable)&&this.scope.$watch("editable",function(n){return function(t,i){var r;if(t!==i)return t=!n.isFalse(t),(r=n.gObject)!=null?r.setEditable(t):void 0}}(this),!0);t.isDefined(this.scope.draggable)&&this.scope.$watch("draggable",function(n){return function(t,i){var r;if(t!==i)return t=!n.isFalse(t),(r=n.gObject)!=null?r.setDraggable(t):void 0}}(this),!0);t.isDefined(this.scope.visible)&&this.scope.$watch("visible",function(n){return function(t,i){var r;return t!==i&&(t=!n.isFalse(t)),(r=n.gObject)!=null?r.setVisible(t):void 0}}(this),!0);t.isDefined(this.scope.geodesic)&&this.scope.$watch("geodesic",function(n){return function(t,i){var r;if(t!==i)return t=!n.isFalse(t),(r=n.gObject)!=null?r.setOptions(n.buildOpts(n.gObject.getPath())):void 0}}(this),!0);t.isDefined(this.scope.stroke)&&t.isDefined(this.scope.stroke.weight)&&this.scope.$watch("stroke.weight",function(n){return function(t,i){var r;if(t!==i)return(r=n.gObject)!=null?r.setOptions(n.buildOpts(n.gObject.getPath())):void 0}}(this),!0);t.isDefined(this.scope.stroke)&&t.isDefined(this.scope.stroke.color)&&this.scope.$watch("stroke.color",function(n){return function(t,i){var r;if(t!==i)return(r=n.gObject)!=null?r.setOptions(n.buildOpts(n.gObject.getPath())):void 0}}(this),!0);t.isDefined(this.scope.stroke)&&t.isDefined(this.scope.stroke.opacity)&&this.scope.$watch("stroke.opacity",function(n){return function(t,i){var r;if(t!==i)return(r=n.gObject)!=null?r.setOptions(n.buildOpts(n.gObject.getPath())):void 0}}(this),!0);t.isDefined(this.scope.icons)&&this.scope.$watch("icons",function(n){return function(t,i){var r;if(t!==i)return(r=n.gObject)!=null?r.setOptions(n.buildOpts(n.gObject.getPath())):void 0}}(this),!0);this.scope.$on("$destroy",function(n){return function(){return n.clean(),n.scope=null}}(this));t.isDefined(this.scope.fill)&&t.isDefined(this.scope.fill.color)&&this.scope.$watch("fill.color",function(n){return function(t,i){if(t!==i)return n.gObject.setOptions(n.buildOpts(n.gObject.getPath()))}}(this));t.isDefined(this.scope.fill)&&t.isDefined(this.scope.fill.opacity)&&this.scope.$watch("fill.opacity",function(n){return function(t,i){if(t!==i)return n.gObject.setOptions(n.buildOpts(n.gObject.getPath()))}}(this));t.isDefined(this.scope.zIndex)&&this.scope.$watch("zIndex",function(n){return function(t,i){if(t!==i)return n.gObject.setOptions(n.buildOpts(n.gObject.getPath()))}}(this))}return i(s,r),s.include(e),s.prototype.clean=function(){var n;return o.removeEvents(this.listeners),o.removeEvents(this.internalListeners),(n=this.gObject)!=null&&n.setMap(null),this.gObject=null},s}(r)}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapDrawFreeHandChildModel",["uiGmapLogger","$q",function(n,t){var i;return i=function(n,t,i){var u,r;return r=new google.maps.Polyline({map:n,clickable:!1}),u=google.maps.event.addListener(n,"mousemove",function(n){return r.getPath().push(n.latLng)}),google.maps.event.addListenerOnce(n,"mouseup",function(){var f;return google.maps.event.removeListener(u),f=r.getPath(),r.setMap(null),t.push(new google.maps.Polygon({map:n,path:f})),r=null,google.maps.event.clearListeners(n.getDiv(),"mousedown"),i()}),void 0},function(r,u){var f,e;return this.map=r,f=function(t){return function(){var i;return i={draggable:!1,disableDefaultUI:!0,scrollwheel:!1,disableDoubleClickZoom:!1},n.info("disabling map move"),t.map.setOptions(i)}}(this),e=function(n){return function(){var t,i;return t={draggable:!0,disableDefaultUI:!1,scrollwheel:!0,disableDoubleClickZoom:!0},(i=n.deferred)!=null&&i.resolve(),_.defer(function(){return n.map.setOptions(_.extend(t,u.options))})}}(this),this.engage=function(r){return function(u){return r.polys=u,r.deferred=t.defer(),f(),n.info("DrawFreeHandChildModel is engaged (drawing)."),google.maps.event.addDomListener(r.map.getDiv(),"mousedown",function(){return i(r.map,r.polys,e)}),r.deferred.promise}}(this),this}}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapMarkerChildModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger","uiGmapEventsHelper","uiGmapPropertyAction","uiGmapMarkerOptions","uiGmapIMarker","uiGmapMarkerManager","uiGmapPromise",function(t,r,u,f,e,o,s,h,c){return function(t){function l(t,i,r,f,o,s,h,v,y,p){var w;this.model=i;this.keys=r;this.gMap=f;this.defaults=o;this.doClick=s;this.gManager=h;this.doDrawSelf=v!=null?v:!0;this.trackModel=y!=null?y:!0;this.needRedraw=p!=null?p:!1;this.internalEvents=n(this.internalEvents,this);this.setLabelOptions=n(this.setLabelOptions,this);this.setOptions=n(this.setOptions,this);this.setIcon=n(this.setIcon,this);this.setCoords=n(this.setCoords,this);this.isNotValid=n(this.isNotValid,this);this.maybeSetScopeValue=n(this.maybeSetScopeValue,this);this.createMarker=n(this.createMarker,this);this.setMyScope=n(this.setMyScope,this);this.updateModel=n(this.updateModel,this);this.handleModelChanges=n(this.handleModelChanges,this);this.destroy=n(this.destroy,this);this.clonedModel=_.clone(this.model,!0);this.deferred=c.defer();_.each(this.keys,function(n){return function(t,i){var r;return r=n.keys[i],r!=null&&!_.isFunction(r)&&_.isString(r)?n[i+"Key"]=r:void 0}}(this));this.idKey=this.idKeyKey||"id";this.model[this.idKey]!=null&&(this.id=this.model[this.idKey]);l.__super__.constructor.call(this,t);this.scope.getGMarker=function(n){return function(){return n.gObject}}(this);this.firstTime=!0;this.trackModel?(this.scope.model=this.model,this.scope.$watch("model",function(n){return function(t,i){if(t!==i)return n.handleModelChanges(t,i)}}(this),!0)):(w=new e(function(n){return function(i){if(!n.firstTime)return n.setMyScope(i,t)}}(this),!1),_.each(this.keys,function(n,i){return t.$watch(i,w.sic,!0)}));this.scope.$on("$destroy",function(n){return function(){return a(n)}}(this));this.createMarker(this.model);u.info(this)}var a;return i(l,t),l.include(r),l.include(f),l.include(o),a=function(n){if((n!=null?n.gObject:void 0)!=null&&(n.removeEvents(n.externalListeners),n.removeEvents(n.internalListeners),n!=null?n.gObject:void 0))return n.removeFromManager&&n.gManager.remove(n.gObject),n.gObject.setMap(null),n.gObject=null},l.prototype.destroy=function(n){return n==null&&(n=!0),this.removeFromManager=n,this.scope.$destroy()},l.prototype.handleModelChanges=function(n,t){var i,r,u;return i=this.getChanges(n,t,s.keys),this.firstTime?void 0:(r=0,u=_.keys(i).length,_.each(i,function(i){return function(f,e){var o;return r+=1,o=u===r,i.setMyScope(e,n,t,!1,!0,o),i.needRedraw=!0}}(this)))},l.prototype.updateModel=function(n){return this.clonedModel=_.clone(n,!0),this.setMyScope("all",n,this.model)},l.prototype.renderGMarker=function(n,t){var i;if(n==null&&(n=!0),i=this.getProp("coords",this.scope,this.model),i!=null){if(!this.validateCoords(i)){u.debug("MarkerChild does not have coords yet. They may be defined later.");return}if(t!=null&&t(),n&&this.gObject)return this.gManager.add(this.gObject)}else if(n&&this.gObject)return this.gManager.remove(this.gObject)},l.prototype.setMyScope=function(n,t,i,r,u){var f;i==null&&(i=void 0);r==null&&(r=!1);u==null&&(u=!0);t==null?t=this.model:this.model=t;this.gObject||(this.setOptions(this.scope,u),f=!0);switch(n){case"all":return _.each(this.keys,function(n){return function(f,e){return n.setMyScope(e,t,i,r,u)}}(this));case"icon":return this.maybeSetScopeValue("icon",t,i,this.iconKey,this.evalModelHandle,r,this.setIcon,u);case"coords":return this.maybeSetScopeValue("coords",t,i,this.coordsKey,this.evalModelHandle,r,this.setCoords,u);case"options":if(!f)return this.createMarker(t,i,r,u)}},l.prototype.createMarker=function(n,t,i,r){return t==null&&(t=void 0),i==null&&(i=!1),r==null&&(r=!0),this.maybeSetScopeValue("options",n,t,this.optionsKey,this.evalModelHandle,i,this.setOptions,r),this.firstTime=!1},l.prototype.maybeSetScopeValue=function(n,t,i,r,u,f,e,o){return e==null&&(e=void 0),o==null&&(o=!0),e!=null?e(this.scope,o):void 0},l.doDrawSelf&&doDraw&&l.gManager.draw(),l.prototype.isNotValid=function(n,t){var i,r;return t==null&&(t=!0),r=t?this.gObject===void 0:!1,i=this.trackModel?!1:n.$id!==this.scope.$id,i||r},l.prototype.setCoords=function(n,t){if(t==null&&(t=!0),!this.isNotValid(n)&&this.gObject!=null)return this.renderGMarker(t,function(t){return function(){var i,u,r;if(u=t.getProp("coords",n,t.model),i=t.getCoords(u),r=t.gObject.getPosition(),r==null||i==null||i.lng()!==r.lng()||i.lat()!==r.lat())return t.gObject.setPosition(i),t.gObject.setVisible(t.validateCoords(u))}}(this))},l.prototype.setIcon=function(n,t){if(t==null&&(t=!0),!this.isNotValid(n)&&this.gObject!=null)return this.renderGMarker(t,function(t){return function(){var i,r,u;if(u=t.gObject.getIcon(),r=t.getProp("icon",n,t.model),u!==r)return t.gObject.setIcon(r),i=t.getProp("coords",n,t.model),t.gObject.setPosition(t.getCoords(i)),t.gObject.setVisible(t.validateCoords(i))}}(this))},l.prototype.setOptions=function(n,t){var i;if(t==null&&(t=!0),!this.isNotValid(n,!1)){if(this.renderGMarker(t,function(t){return function(){var i,r,u;return r=t.getProp("coords",n,t.model),u=t.getProp("icon",n,t.model),i=t.getProp("options",n,t.model),t.opts=t.createOptions(r,u,i),t.isLabel(t.gObject)!==t.isLabel(t.opts)&&t.gObject!=null&&(t.gManager.remove(t.gObject),t.gObject=void 0),t.gObject!=null&&t.gObject.setOptions(t.setLabelOptions(t.opts)),t.gObject||(t.isLabel(t.opts)?t.gObject=new MarkerWithLabel(t.setLabelOptions(t.opts)):t.opts.content?(t.gObject=new RichMarker(t.opts),t.gObject.getIcon=t.gObject.getContent,t.gObject.setIcon=t.gObject.setContent):t.gObject=new google.maps.Marker(t.opts),_.extend(t.gObject,{model:t.model})),t.externalListeners&&t.removeEvents(t.externalListeners),t.internalListeners&&t.removeEvents(t.internalListeners),t.externalListeners=t.setEvents(t.gObject,t.scope,t.model,["dragend"]),t.internalListeners=t.setEvents(t.gObject,{events:t.internalEvents(),$evalAsync:function(){}},t.model),t.id!=null?t.gObject.key=t.id:void 0}}(this)),this.gObject&&(this.gObject.getMap()||this.gManager.type!==h.type))this.deferred.resolve(this.gObject);else{if(!this.gObject)return this.deferred.reject("gObject is null");((i=this.gObject)!=null?i.getMap():void 0)&&this.gManager.type===h.type||(u.debug("gObject has no map yet"),this.deferred.resolve(this.gObject))}if(this.model[this.fitKey])return this.gManager.fit()}},l.prototype.setLabelOptions=function(n){return n.labelAnchor&&(n.labelAnchor=this.getLabelPositionPoint(n.labelAnchor)),n},l.prototype.internalEvents=function(){return{dragend:function(n){return function(t,i,r,u){var f,e,o;return e=n.trackModel?n.scope.model:n.model,o=n.setCoordsFromEvent(n.modelOrKey(e,n.coordsKey),n.gObject.getPosition()),e=n.setVal(r,n.coordsKey,o),f=n.scope.events,(f!=null?f.dragend:void 0)!=null&&f.dragend(t,i,e,u),n.scope.$apply()}}(this),click:function(n){return function(t,i,r,u){var f;return f=n.getProp("click",n.scope,n.model),n.doClick&&f!=null?n.scope.$evalAsync(f(t,i,n.model,u)):void 0}}(this)}},l}(t)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygonChildModel",["uiGmapBasePolyChildModel","uiGmapPolygonOptionsBuilder",function(t,i){var r,u;return u=function(n){return new google.maps.Polygon(n)},r=new t(i,u),function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i}(r)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylineChildModel",["uiGmapBasePolyChildModel","uiGmapPolylineOptionsBuilder",function(t,i){var r,u;return u=function(n){return new google.maps.Polyline(n)},r=t(i,u),function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i}(r)}])}.call(this),function(){var i=function(n,t){return function(){return n.apply(t,arguments)}},r=function(n,t){function r(){this.constructor=n}for(var i in t)u.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n},u={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapWindowChildModel",["uiGmapBaseObject","uiGmapGmapUtil","uiGmapLogger","$compile","$http","$templateCache","uiGmapChromeFixes","uiGmapEventsHelper",function(u,f,e,o,s,h,c,l){return function(u){function a(n,t,r,u,f,o,s,h,c){var l;this.model=n;this.scope=t;this.opts=r;this.isIconVisibleOnClick=u;this.mapCtrl=f;this.markerScope=o;this.element=s;this.needToManualDestroy=h!=null?h:!1;this.markerIsVisibleAfterWindowClose=c!=null?c:!0;this.updateModel=i(this.updateModel,this);this.destroy=i(this.destroy,this);this.remove=i(this.remove,this);this.getLatestPosition=i(this.getLatestPosition,this);this.hideWindow=i(this.hideWindow,this);this.showWindow=i(this.showWindow,this);this.handleClick=i(this.handleClick,this);this.watchOptions=i(this.watchOptions,this);this.watchCoords=i(this.watchCoords,this);this.createGWin=i(this.createGWin,this);this.watchElement=i(this.watchElement,this);this.watchAndDoShow=i(this.watchAndDoShow,this);this.doShow=i(this.doShow,this);this.clonedModel=_.clone(this.model,!0);this.getGmarker=function(){var n,t;if(((n=this.markerScope)!=null?n.getGMarker:void 0)!=null)return(t=this.markerScope)!=null?t.getGMarker():void 0};this.listeners=[];this.createGWin();l=this.getGmarker();l!=null&&l.setClickable(!0);this.watchElement();this.watchOptions();this.watchCoords();this.watchAndDoShow();this.scope.$on("$destroy",function(n){return function(){return n.destroy()}}(this));e.info(this)}return r(a,u),a.include(f),a.include(l),a.prototype.doShow=function(n){return this.scope.show===!0||n?this.showWindow():this.hideWindow()},a.prototype.watchAndDoShow=function(){return this.model.show!=null&&(this.scope.show=this.model.show),this.scope.$watch("show",this.doShow,!0),this.doShow()},a.prototype.watchElement=function(){return this.scope.$watch(function(n){return function(){var t,i;if((n.element||n.html))return n.html!==n.element.html()&&n.gObject?((t=n.opts)!=null&&(t.content=void 0),i=n.gObject.isOpen(),n.remove(),n.createGWin(i)):void 0}}(this))},a.prototype.createGWin=function(t){var u,r,i,f,e;return t==null&&(t=!1),i=this.getGmarker(),r={},this.opts!=null&&(this.scope.coords&&(this.opts.position=this.getCoords(this.scope.coords)),r=this.opts),this.element&&(this.html=_.isObject(this.element)?this.element.html():this.element),u=this.scope.options?this.scope.options:r,this.opts=this.createWindowOptions(i,this.markerScope||this.scope,this.html,u),this.opts!=null?(this.gObject||(this.gObject=this.opts.boxClass&&n.InfoBox&&typeof n.InfoBox=="function"?new n.InfoBox(this.opts):new google.maps.InfoWindow(this.opts),this.listeners.push(google.maps.event.addListener(this.gObject,"domready",function(){return c.maybeRepaint(this.content)})),this.listeners.push(google.maps.event.addListener(this.gObject,"closeclick",function(n){return function(){return i&&(i.setAnimation(n.oldMarkerAnimation),n.markerIsVisibleAfterWindowClose&&_.delay(function(){return i.setVisible(!1),i.setVisible(n.markerIsVisibleAfterWindowClose)},250)),n.gObject.close(),n.model.show=!1,n.scope.closeClick!=null?n.scope.$evalAsync(n.scope.closeClick()):n.scope.$evalAsync()}}(this)))),this.gObject.setContent(this.opts.content),this.handleClick(((f=this.scope)!=null?(e=f.options)!=null?e.forceClick:void 0:void 0)||t),this.doShow(this.gObject.isOpen())):void 0},a.prototype.watchCoords=function(){var n;return n=this.markerScope!=null?this.markerScope:this.scope,n.$watch("coords",function(n){return function(t,i){var r;if(t!==i){if(t==null)n.hideWindow();else if(!n.validateCoords(t)){e.error("WindowChildMarker cannot render marker as scope.coords as no position on marker: "+JSON.stringify(n.model));return}if(r=n.getCoords(t),n.doShow(),n.gObject.setPosition(r),n.opts)return n.opts.position=r}}}(this),!0)},a.prototype.watchOptions=function(){return this.scope.$watch("options",function(n){return function(t,i){if(t!==i&&(n.opts=t,n.gObject!=null)){if(n.gObject.setOptions(n.opts),n.opts.visible!=null&&n.opts.visible)return n.showWindow();if(n.opts.visible!=null)return n.hideWindow()}}}(this),!0)},a.prototype.handleClick=function(n){var i,t;if(this.gObject!=null)return t=this.getGmarker(),i=function(n){return function(){return n.gObject==null&&n.createGWin(),n.showWindow(),t!=null?(n.initialMarkerVisibility=t.getVisible(),n.oldMarkerAnimation=t.getAnimation(),t.setVisible(n.isIconVisibleOnClick)):void 0}}(this),n&&i(),t?this.listeners=this.listeners.concat(this.setEvents(t,{events:{click:i}},this.model)):void 0},a.prototype.showWindow=function(){var r,n,i;if(this.gObject!=null)return n=function(n){return function(){var i,t,r;if(!n.gObject.isOpen()){if(t=n.getGmarker(),n.gObject!=null&&n.gObject.getPosition!=null&&(r=n.gObject.getPosition()),t&&(r=t.getPosition()),!r)return;if(n.gObject.open(n.mapCtrl,t),i=n.gObject.isOpen(),n.model.show!==i)return n.model.show=i}}}(this),this.scope.templateUrl?s.get(this.scope.templateUrl,{cache:h}).then(function(i){return function(r){var f,u;return u=i.scope.$new(),t.isDefined(i.scope.templateParameter)&&(u.parameter=i.scope.templateParameter),f=o(r.data)(u),i.gObject.setContent(f[0]),n()}}(this)):this.scope.template?(i=this.scope.$new(),t.isDefined(this.scope.templateParameter)&&(i.parameter=this.scope.templateParameter),r=o(this.scope.template)(i),this.gObject.setContent(r[0]),n()):n()},a.prototype.hideWindow=function(){if(this.gObject!=null&&this.gObject.isOpen())return this.gObject.close()},a.prototype.getLatestPosition=function(n){var t;if(t=this.getGmarker(),this.gObject==null||t==null||n){if(n)return this.gObject.setPosition(n)}else return this.gObject.setPosition(t.getPosition())},a.prototype.remove=function(){return this.hideWindow(),this.removeEvents(this.listeners),this.listeners.length=0,delete this.gObject,delete this.opts},a.prototype.destroy=function(n){var t;return n==null&&(n=!1),this.remove(),this.scope!=null&&!((t=this.scope)!=null?t.$$destroyed:void 0)&&(this.needToManualDestroy||n)?this.scope.$destroy():void 0},a.prototype.updateModel=function(n){return this.clonedModel=_.clone(n,!0),_.extend(this.model,this.clonedModel)},a}(u)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapBasePolysParentModel",["$timeout","uiGmapLogger","uiGmapModelKey","uiGmapModelsWatcher","uiGmapPropMap","uiGmap_async","uiGmapPromise",function(r,u,f,e,o,s,h){return function(r,c,l){return function(f){function a(t,i,f,e,s){this.element=i;this.attrs=f;this.gMap=e;this.defaults=s;this.createChild=n(this.createChild,this);this.pieceMeal=n(this.pieceMeal,this);this.createAllNew=n(this.createAllNew,this);this.watchIdKey=n(this.watchIdKey,this);this.createChildScopes=n(this.createChildScopes,this);this.watchDestroy=n(this.watchDestroy,this);this.onDestroy=n(this.onDestroy,this);this.rebuildAll=n(this.rebuildAll,this);this.doINeedToWipe=n(this.doINeedToWipe,this);this.watchModels=n(this.watchModels,this);a.__super__.constructor.call(this,t);this["interface"]=r;this.$log=u;this.plurals=new o;_.each(r.scopeKeys,function(n){return function(t){return n[t+"Key"]=void 0}}(this));this.models=void 0;this.firstTime=!0;this.$log.info(this);this.createChildScopes()}return i(a,f),a.include(e),a.prototype.watchModels=function(n){return n.$watchCollection("models",function(t){return function(i,r){if(i!==r)return t.doINeedToWipe(i)||n.doRebuildAll?t.rebuildAll(n,!0,!0):t.createChildScopes(!1)}}(this))},a.prototype.doINeedToWipe=function(n){var t;return t=n!=null?n.length===0:!0,this.plurals.length>0&&t},a.prototype.rebuildAll=function(n,t,i){return this.onDestroy(i).then(function(n){return function(){if(t)return n.createChildScopes()}}(this))},a.prototype.onDestroy=function(){return a.__super__.onDestroy.call(this,this.scope),s.promiseLock(this,h.promiseTypes["delete"],void 0,void 0,function(n){return function(){return s.each(n.plurals.values(),function(n){return n.destroy(!0)},s.chunkSizeFrom(n.scope.cleanchunk,!1)).then(function(){var t;if((t=n.plurals)!=null)return t.removeAll()})}}(this))},a.prototype.watchDestroy=function(n){return n.$on("$destroy",function(t){return function(){return t.rebuildAll(n,!1,!0)}}(this))},a.prototype.createChildScopes=function(n){if(n==null&&(n=!0),t.isUndefined(this.scope.models)){this.$log.error("No models to create "+l+"s from! I Need direct models!");return}if(this.gMap!=null&&this.scope.models!=null)return this.watchIdKey(this.scope),n?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1)},a.prototype.watchIdKey=function(n){return this.setIdKey(n),n.$watch("idKey",function(t){return function(i,r){if(i!==r&&i==null)return t.idKey=i,t.rebuildAll(n,!0,!0)}}(this))},a.prototype.createAllNew=function(n,t){var i;if(t==null&&(t=!1),this.models=n.models,this.firstTime&&(this.watchModels(n),this.watchDestroy(n)),!this.didQueueInitPromise(this,n))return i=null,s.promiseLock(this,h.promiseTypes.create,"createAllNew",function(n){return i=n},function(t){return function(){return s.each(n.models,function(n){var r;return r=t.createChild(n,t.gMap),i&&(u.debug("createNew should fall through safely"),r.isEnabled=!1),i},s.chunkSizeFrom(n.chunk)).then(function(){return t.firstTime=!1})}}(this))},a.prototype.pieceMeal=function(n,t){var r,i;if(t==null&&(t=!0),!n.$$destroyed)return r=null,i=null,this.models=n.models,n!=null&&this.modelsLength()&&this.plurals.length?s.promiseLock(this,h.promiseTypes.update,"pieceMeal",function(n){return r=n},function(t){return function(){return h.promise(function(){return t.figureOutState(t.idKey,n,t.plurals,t.modelKeyComparison)}).then(function(f){return i=f,i.updates.length&&u.info("polygons updates: "+i.updates.length+" will be missed"),s.each(i.removals,function(n){if(n!=null)return n.destroy(),t.plurals.remove(n.model[t.idKey]),r},s.chunkSizeFrom(n.chunk))}).then(function(){return s.each(i.adds,function(n){return r&&u.debug("pieceMeal should fall through safely"),t.createChild(n,t.gMap),r},s.chunkSizeFrom(n.chunk))})}}(this)):(this.inProgress=!1,this.rebuildAll(this.scope,!0,!0))},a.prototype.createChild=function(n,t){var u,i;if(i=this.scope.$new(!1),this.setChildScope(r.scopeKeys,i,n),i.$watch("model",function(n){return function(t,r){if(t!==r)return n.setChildScope(i,t)}}(this),!0),i["static"]=this.scope["static"],u=new c(i,this.attrs,t,this.defaults,n),n[this.idKey]==null){this.$log.error(l+" model has no id to assign a child to.\nThis is required for performance. Please assign id,\nor redirect id to a different key.");return}return this.plurals.put(n[this.idKey],u),u},a}(f)}}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapCircleParentModel",["uiGmapLogger","$timeout","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapCircleOptionsBuilder",function(i,r,u,f,e){return function(r){function e(n,r,f,e,o){var c,s,h;this.attrs=f;this.map=e;this.DEFAULTS=o;this.scope=n;h=null;c=function(n){return function(){return h=null,n.listeners!=null?(n.removeEvents(n.listeners),n.listeners=void 0):void 0}}(this);s=new google.maps.Circle(this.buildOpts(u.getCoords(n.center),n.radius));this.setMyOptions=function(t){return function(i,r){if(!_.isEqual(i,r))return s.setOptions(t.buildOpts(u.getCoords(n.center),n.radius))}}(this);this.props=this.props.concat([{prop:"center",isColl:!0},{prop:"fill",isColl:!0},"radius","zIndex"]);this.watchProps();this.scope.control!=null&&(this.scope.control.getCircle=function(){return s});c();this.listeners=this.setEvents(s,n,n,["radius_changed"]);this.listeners!=null&&this.listeners.push(google.maps.event.addListener(s,"radius_changed",function(){var i,r;if(i=s.getRadius(),i!==h)return h=i,r=function(){var t,r;return i!==n.radius&&(n.radius=i),((t=n.events)!=null?t.radius_changed:void 0)&&_.isFunction((r=n.events)!=null?r.radius_changed:void 0)?n.events.radius_changed(s,"radius_changed",n,arguments):void 0},t.mock?r():n.$evalAsync(function(){return r()})}));this.listeners!=null&&this.listeners.push(google.maps.event.addListener(s,"center_changed",function(){return n.$evalAsync(function(){return t.isDefined(n.center.type)?(n.center.coordinates[1]=s.getCenter().lat(),n.center.coordinates[0]=s.getCenter().lng()):(n.center.latitude=s.getCenter().lat(),n.center.longitude=s.getCenter().lng())})}));n.$on("$destroy",function(){return function(){return c(),s.setMap(null)}}(this));i.info(this)}return n(e,r),e.include(u),e.include(f),e}(e)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapDrawingManagerParentModel",["uiGmapLogger","$timeout","uiGmapBaseObject","uiGmapEventsHelper",function(t,i,r,u){return function(t){function i(n,t,i,r){var u,f;this.scope=n;this.attrs=i;this.map=r;u=new google.maps.drawing.DrawingManager(this.scope.options);u.setMap(this.map);f=void 0;this.scope.control!=null&&(this.scope.control.getDrawingManager=function(){return u});!this.scope["static"]&&this.scope.options&&this.scope.$watch("options",function(n){if(u!=null)return u.setOptions(n)},!0);this.scope.events!=null&&(f=this.setEvents(u,this.scope,this.scope),this.scope.$watch("events",function(n){return function(t,i){if(!_.isEqual(t,i))return f!=null&&n.removeEvents(f),f=n.setEvents(u,n.scope,n.scope)}}(this)));this.scope.$on("$destroy",function(n){return function(){return f!=null&&n.removeEvents(f),u.setMap(null),u=null}}(this))}return n(i,t),i.include(u),i}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIMarkerParentModel",["uiGmapModelKey","uiGmapLogger",function(r,u){return function(r){function f(i,r,e,o){if(this.scope=i,this.element=r,this.attrs=e,this.map=o,this.onWatch=n(this.onWatch,this),this.watch=n(this.watch,this),this.validateScope=n(this.validateScope,this),f.__super__.constructor.call(this,this.scope),this.$log=u,!this.validateScope(this.scope))throw new String("Unable to construct IMarkerParentModel due to invalid scope");this.doClick=t.isDefined(this.attrs.click);this.scope.options!=null&&(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(n){return function(){return n.onDestroy(n.scope)}}(this))}return i(f,r),f.prototype.DEFAULTS={},f.prototype.validateScope=function(n){var t;return n==null?(this.$log.error(this.constructor.name+": invalid scope used"),!1):(t=n.coords!=null,!t)?(this.$log.error(this.constructor.name+": no valid coords attribute found"),!1):t},f.prototype.watch=function(n,t,i){return i==null&&(i=!0),t.$watch(n,function(i){return function(r,u){if(!_.isEqual(r,u))return i.onWatch(n,t,r,u)}}(this),i)},f.prototype.onWatch=function(){},f}(r)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIWindowParentModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger",function(t,i,r){return function(t){function u(n,t,i,f,e,o,s,h){u.__super__.constructor.call(this,n);this.$log=r;this.$timeout=e;this.$compile=o;this.$http=s;this.$templateCache=h;this.DEFAULTS={};n.options!=null&&(this.DEFAULTS=n.options)}return n(u,t),u.include(i),u.prototype.getItem=function(n,t,i){return t==="models"?n[t][i]:n[t].get(i)},u}(t)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapLayerParentModel",["uiGmapBaseObject","uiGmapLogger","$timeout",function(r,u){return function(r){function f(i,r,f,e,o,s){if(this.scope=i,this.element=r,this.attrs=f,this.gMap=e,this.onLayerCreated=o!=null?o:void 0,this.$log=s!=null?s:u,this.createGoogleLayer=n(this.createGoogleLayer,this),this.attrs.type==null){this.$log.info("type attribute for the layer directive is mandatory. Layer creation aborted!!");return}this.createGoogleLayer();this.doShow=!0;t.isDefined(this.attrs.show)&&(this.doShow=this.scope.show);this.doShow&&this.gMap!=null&&this.gObject.setMap(this.gMap);this.scope.$watch("show",function(n){return function(t,i){if(t!==i)return n.doShow=t,t?n.gObject.setMap(n.gMap):n.gObject.setMap(null)}}(this),!0);this.scope.$watch("options",function(n){return function(t,i){if(t!==i)return n.gObject.setMap(null),n.gObject=null,n.createGoogleLayer()}}(this),!0);this.scope.$on("$destroy",function(n){return function(){return n.gObject.setMap(null)}}(this))}return i(f,r),f.prototype.createGoogleLayer=function(){var n;return this.gObject=this.attrs.options==null?this.attrs.namespace===void 0?new google.maps[this.attrs.type]:new google.maps[this.attrs.namespace][this.attrs.type]:this.attrs.namespace===void 0?new google.maps[this.attrs.type](this.scope.options):new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options),this.gObject!=null&&this.onLayerCreated!=null?typeof(n=this.onLayerCreated(this.scope,this.gObject))=="function"?n(this.gObject):void 0:void 0},f}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMapTypeParentModel",["uiGmapBaseObject","uiGmapLogger",function(r,u){return function(r){function f(i,r,f,e,o){if(this.scope=i,this.element=r,this.attrs=f,this.gMap=e,this.$log=o!=null?o:u,this.hideOverlay=n(this.hideOverlay,this),this.showOverlay=n(this.showOverlay,this),this.refreshMapType=n(this.refreshMapType,this),this.createMapType=n(this.createMapType,this),this.attrs.options==null){this.$log.info("options attribute for the map-type directive is mandatory. Map type creation aborted!!");return}this.id=this.gMap.overlayMapTypesCount=this.gMap.overlayMapTypesCount+1||0;this.doShow=!0;this.createMapType();t.isDefined(this.attrs.show)&&(this.doShow=this.scope.show);this.doShow&&this.gMap!=null&&this.showOverlay();this.scope.$watch("show",function(n){return function(t,i){if(t!==i)return n.doShow=t,t?n.showOverlay():n.hideOverlay()}}(this),!0);this.scope.$watch("options",function(n){return function(t,i){if(!_.isEqual(t,i))return n.refreshMapType()}}(this),!0);t.isDefined(this.attrs.refresh)&&this.scope.$watch("refresh",function(n){return function(t,i){if(!_.isEqual(t,i))return n.refreshMapType()}}(this),!0);this.scope.$on("$destroy",function(n){return function(){return n.hideOverlay(),n.mapType=null}}(this))}return i(f,r),f.prototype.createMapType=function(){if(this.scope.options.getTile!=null)this.mapType=this.scope.options;else if(this.scope.options.getTileUrl!=null)this.mapType=new google.maps.ImageMapType(this.scope.options);else{this.$log.info("options should provide either getTile or getTileUrl methods. Map type creation aborted!!");return}return this.attrs.id&&this.scope.id&&(this.gMap.mapTypes.set(this.scope.id,this.mapType),t.isDefined(this.attrs.show)||(this.doShow=!1)),this.mapType.layerId=this.id},f.prototype.refreshMapType=function(){return this.hideOverlay(),this.mapType=null,this.createMapType(),this.doShow&&this.gMap!=null?this.showOverlay():void 0},f.prototype.showOverlay=function(){return this.gMap.overlayMapTypes.push(this.mapType)},f.prototype.hideOverlay=function(){var n;return n=!1,this.gMap.overlayMapTypes.forEach(function(t){return function(i,r){n||i.layerId!==t.id||(n=!0,t.gMap.overlayMapTypes.removeAt(r))}}(this))},f}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMarkersParentModel",["uiGmapIMarkerParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapMarkerChildModel","uiGmap_async","uiGmapClustererMarkerManager","uiGmapMarkerManager","$timeout","uiGmapIMarker","uiGmapPromise","uiGmapGmapUtil","uiGmapLogger","uiGmapSpiderfierMarkerManager",function(r,u,f,e,o,s,h,c,l,a,v,y,p){var w;return w=function(n,t){return t.plurals=new f,t.scope.plurals=t.plurals,t},function(r){function c(t,i,r,u){this.onDestroy=n(this.onDestroy,this);this.newChildMarker=n(this.newChildMarker,this);this.pieceMeal=n(this.pieceMeal,this);this.rebuildAll=n(this.rebuildAll,this);this.createAllNew=n(this.createAllNew,this);this.bindToTypeEvents=n(this.bindToTypeEvents,this);this.createChildScopes=n(this.createChildScopes,this);this.validateScope=n(this.validateScope,this);this.onWatch=n(this.onWatch,this);var e;c.__super__.constructor.call(this,t,i,r,u);this["interface"]=l;e=this;w(new f,this);this.scope.pluralsUpdate={updateCtr:0};this.$log.info(this);this.doRebuildAll=this.scope.doRebuildAll!=null?this.scope.doRebuildAll:!1;this.setIdKey(this.scope);this.scope.$watch("doRebuildAll",function(n){return function(t,i){if(t!==i)return n.doRebuildAll=t}}(this));this.modelsLength()||(this.modelsRendered=!1);this.scope.$watch("models",function(n){return function(t,i){if(!_.isEqual(t,i)||!n.modelsRendered){if(t.length===0&&i.length===0)return;n.modelsRendered=!0;return n.onWatch("models",n.scope,t,i)}}}(this),!this.isTrue(r.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 i(c,r),c.include(v),c.include(u),c.prototype.onWatch=function(n,t,i,r){return n==="idKey"&&i!==r&&(this.idKey=i),this.doRebuildAll||n==="doCluster"||n==="type"?this.rebuildAll(t):this.pieceMeal(t)},c.prototype.validateScope=function(n){var i;return i=t.isUndefined(n.models)||n.models===void 0,i&&this.$log.error(this.constructor.name+": no valid models attribute found"),c.__super__.validateScope.call(this,n)||i},c.prototype.createChildScopes=function(n){if(this.gMap!=null&&this.scope.models!=null)return n?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1)},c.prototype.bindToTypeEvents=function(n,i){var r,u;return i==null&&(i=["click","mouseout","mouseover"]),u=this,this.origTypeEvents?t.extend(n,this.origTypeEvents):(this.origTypeEvents={},_.each(i,function(t){return function(i){return t.origTypeEvents[i]=n!=null?n[i]:void 0}}(this))),r={},_.each(i,function(){return function(n){return r[n]=function(t){return u.maybeExecMappedEvent(t,n)}}}(this)),t.extend(n,r)},c.prototype.createAllNew=function(n){var i,t,r;if(this.gManager!=null&&(this.gManager.clear(),delete this.gManager),t=n.typeEvents||n.clusterEvents,r=n.typeOptions||n.clusterOptions,n.doCluster||n.type==="cluster"?(t!=null&&this.bindToTypeEvents(t),this.gManager=new s(this.map,void 0,r,t)):n.type==="spider"?(t!=null&&this.bindToTypeEvents(t,["spiderfy","unspiderfy"]),this.gManager=new p(this.map,void 0,r,t,this.scope)):this.gManager=new h(this.map),!this.didQueueInitPromise(this,n))return i=null,o.promiseLock(this,a.promiseTypes.create,"createAllNew",function(n){return i=n},function(t){return function(){return o.each(n.models,function(r){return t.newChildMarker(r,n),i},o.chunkSizeFrom(n.chunk)).then(function(){return t.modelsRendered=!0,n.fit&&t.gManager.fit(),t.gManager.draw(),t.scope.pluralsUpdate.updateCtr+=1},o.chunkSizeFrom(n.chunk))}}(this))},c.prototype.rebuildAll=function(n){var t;if(n.doRebuild||n.doRebuild===void 0)return((t=this.scope.plurals)!=null?t.length:void 0)?this.onDestroy(n).then(function(t){return function(){return t.createAllNew(n)}}(this)):this.createAllNew(n)},c.prototype.pieceMeal=function(n){var i,t;if(!n.$$destroyed)return i=null,t=null,this.modelsLength()&&this.scope.plurals.length?o.promiseLock(this,a.promiseTypes.update,"pieceMeal",function(n){return i=n},function(r){return function(){return a.promise(function(){return r.figureOutState(r.idKey,n,r.scope.plurals,r.modelKeyComparison)}).then(function(u){return t=u,o.each(t.removals,function(n){if(n!=null)return n.destroy!=null&&n.destroy(),r.scope.plurals.remove(n.id),i},o.chunkSizeFrom(n.chunk))}).then(function(){return o.each(t.adds,function(t){return r.newChildMarker(t,n),i},o.chunkSizeFrom(n.chunk))}).then(function(){return o.each(t.updates,function(n){return r.updateChild(n.child,n.model),i},o.chunkSizeFrom(n.chunk))}).then(function(){return(t.adds.length>0||t.removals.length>0||t.updates.length>0)&&(n.plurals=r.scope.plurals,n.fit&&r.gManager.fit(),r.gManager.draw()),r.scope.pluralsUpdate.updateCtr+=1})}}(this)):(this.inProgress=!1,this.rebuildAll(n))},c.prototype.newChildMarker=function(n,t){var i,r,f,u;if(n[this.idKey]==null){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.");return}return this.$log.info("child",i,"markers",this.scope.markerModels),r=t.$new(!1),r.events=t.events,u={},l.scopeKeys.forEach(function(n){return u[n]=t[n]}),i=new e(r,n,u,this.map,this.DEFAULTS,this.doClick,this.gManager,f=!1),this.scope.plurals.put(n[this.idKey],i),i},c.prototype.onDestroy=function(n){return c.__super__.onDestroy.call(this,n),o.promiseLock(this,a.promiseTypes["delete"],void 0,void 0,function(n){return function(){return o.each(n.scope.plurals.values(),function(n){if(n!=null)return n.destroy(!1)},o.chunkSizeFrom(n.scope.cleanchunk,!1)).then(function(){return n.gManager!=null&&n.gManager.clear(),n.plurals.removeAll(),n.plurals!==n.scope.plurals&&console.error("plurals out of sync for MarkersParentModel"),n.scope.pluralsUpdate.updateCtr+=1})}}(this))},c.prototype.maybeExecMappedEvent=function(n,t){var i,r;return r=this.scope.typeEvents||this.scope.clusterEvents,_.isFunction(r!=null?r[t]:void 0)&&(i=this.mapTypeToPlurals(n),this.origTypeEvents[t])?this.origTypeEvents[t](i.group,i.mapped):void 0},c.prototype.mapTypeToPlurals=function(n){var t,i;if(_.isArray(n)?t=n:_.isFunction(n.getMarkers)&&(t=n.getMarkers()),t==null){y.error("Unable to map event as we cannot find the array group to map");return}return i=t.map(function(n){return function(t){return n.scope.plurals.get(t.key).model}}(this)),{cluster:n,mapped:i,group:n}},c.prototype.getItem=function(n,t,i){return t==="models"?n[t][i]:n[t].get(i)},c}(r)}])}.call(this),function(){["Polygon","Polyline"].forEach(function(n){return t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmap"+n+"sParentModel",["uiGmapBasePolysParentModel","uiGmap"+n+"ChildModel","uiGmapI"+n,function(t,i,r){return t(r,i,n)}])})}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapRectangleParentModel",["uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapRectangleOptionsBuilder",function(t,i,r,u){return function(u){function f(n,i,r,u,f){var e,a,v,c,y,o,p,s,h,l,w;this.scope=n;this.attrs=r;this.map=u;this.DEFAULTS=f;e=void 0;c=!1;h=[];s=void 0;y=function(n){return function(){if(n.isTrue(n.attrs.fit))return n.fitMapBounds(n.map,e)}}(this);v=function(n){return function(){var i,r,u;return n.scope.bounds!=null&&((i=n.scope.bounds)!=null?i.sw:void 0)!=null&&((r=n.scope.bounds)!=null?r.ne:void 0)!=null&&n.validateBoundPoints(n.scope.bounds)?(e=n.convertBoundPoints(n.scope.bounds),t.info("new new bounds created: "+JSON.stringify(e))):n.scope.bounds.getNorthEast!=null&&n.scope.bounds.getSouthWest!=null?e=n.scope.bounds:n.scope.bounds!=null?t.error("Invalid bounds for newValue: "+JSON.stringify((u=n.scope)!=null?u.bounds:void 0)):void 0}}(this);v();o=new google.maps.Rectangle(this.buildOpts(e));t.info("gObject (rectangle) created: "+o);l=!1;w=function(n){return function(){var t,i,r;if(t=o.getBounds(),i=t.getNorthEast(),r=t.getSouthWest(),!l)return n.scope.$evalAsync(function(n){return n.bounds!=null&&n.bounds.sw!=null&&n.bounds.ne!=null&&(n.bounds.ne={latitude:i.lat(),longitude:i.lng()},n.bounds.sw={latitude:r.lat(),longitude:r.lng()}),n.bounds.getNorthEast!=null&&n.bounds.getSouthWest!=null?n.bounds=t:void 0})}}(this);p=function(n){return function(){return y(),n.removeEvents(h),h.push(google.maps.event.addListener(o,"dragstart",function(){return c=!0})),h.push(google.maps.event.addListener(o,"dragend",function(){return c=!1,w()})),h.push(google.maps.event.addListener(o,"bounds_changed",function(){if(!c)return w()}))}}(this);a=function(n){return function(){return n.removeEvents(h),s!=null&&n.removeEvents(s),o.setMap(null)}}(this);e!=null&&p();this.scope.$watch("bounds",function(n,t){var i;if((!_.isEqual(n,t)||e==null)&&!c){if(l=!0,n==null){a();return}return e==null?i=!0:y(),v(),o.setBounds(e),l=!1,i&&e!=null?p():void 0}},!0);this.setMyOptions=function(n){return function(t,i){if(!_.isEqual(t,i)&&e!=null&&t!=null)return o.setOptions(n.buildOpts(e))}}(this);this.props.push("bounds");this.watchProps(this.props);this.attrs.events!=null&&(s=this.setEvents(o,this.scope,this.scope),this.scope.$watch("events",function(n){return function(t,i){if(!_.isEqual(t,i))return s!=null&&n.removeEvents(s),s=n.setEvents(o,n.scope,n.scope)}}(this)));this.scope.$on("$destroy",function(){return function(){return a()}}(this));t.info(this)}return n(f,u),f.include(i),f.include(r),f}(u)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapSearchBoxParentModel",["uiGmapBaseObject","uiGmapLogger","uiGmapEventsHelper","$timeout","$http","$templateCache",function(r,u,f){return function(r){function e(i,r,f,e,o,s,h){var c;if(this.scope=i,this.element=r,this.attrs=f,this.gMap=e,this.ctrlPosition=o,this.template=s,this.$log=h!=null?h:u,this.setVisibility=n(this.setVisibility,this),this.getBounds=n(this.getBounds,this),this.setBounds=n(this.setBounds,this),this.createSearchBox=n(this.createSearchBox,this),this.addToParentDiv=n(this.addToParentDiv,this),this.addAsMapControl=n(this.addAsMapControl,this),this.init=n(this.init,this),this.attrs.template==null){this.$log.error("template attribute for the search-box directive is mandatory. Places Search Box creation aborted!!");return}t.isUndefined(this.scope.options)&&(this.scope.options={},this.scope.options.visible=!0);t.isUndefined(this.scope.options.visible)&&(this.scope.options.visible=!0);t.isUndefined(this.scope.options.autocomplete)&&(this.scope.options.autocomplete=!1);this.visible=this.scope.options.visible;this.autocomplete=this.scope.options.autocomplete;c=t.element("<div><\/div>");c.append(this.template);this.input=c.find("input")[0];this.init()}return i(e,r),e.include(f),e.prototype.init=function(){return this.createSearchBox(),this.scope.$watch("options",function(n){return function(i){if(t.isObject(i)&&(i.bounds!=null&&n.setBounds(i.bounds),i.visible!=null&&n.visible!==i.visible))return n.setVisibility(i.visible)}}(this),!0),this.attrs.parentdiv!=null?this.addToParentDiv():this.addAsMapControl(),this.listener=this.autocomplete?google.maps.event.addListener(this.gObject,"place_changed",function(n){return function(){return n.places=n.gObject.getPlace()}}(this)):google.maps.event.addListener(this.gObject,"places_changed",function(n){return function(){return n.places=n.gObject.getPlaces()}}(this)),this.listeners=this.setEvents(this.gObject,this.scope,this.scope),this.$log.info(this),this.scope.$on("$destroy",function(n){return function(){return n.gObject=null}}(this))},e.prototype.addAsMapControl=function(){return this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input)},e.prototype.addToParentDiv=function(){return this.parentDiv=t.element(document.getElementById(this.scope.parentdiv)),this.parentDiv.append(this.input)},e.prototype.createSearchBox=function(){return this.gObject=this.autocomplete?new google.maps.places.Autocomplete(this.input,this.scope.options):new google.maps.places.SearchBox(this.input,this.scope.options)},e.prototype.setBounds=function(n){if(t.isUndefined(n.isEmpty))this.$log.error("Error: SearchBoxParentModel setBounds. Bounds not an instance of LatLngBounds.");else if(n.isEmpty()===!1&&this.gObject!=null)return this.gObject.setBounds(n)},e.prototype.getBounds=function(){return this.gObject.getBounds()},e.prototype.setVisibility=function(n){return this.attrs.parentdiv!=null?n===!1?this.parentDiv.addClass("ng-hide"):this.parentDiv.removeClass("ng-hide"):n===!1?this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].clear():this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input),this.visible=n},e}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.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(r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){return function(r){function k(t,i,r,u,e,s){this.gMap=e;this.markersScope=s;this.modelKeyComparison=n(this.modelKeyComparison,this);this.interpolateContent=n(this.interpolateContent,this);this.setChildScope=n(this.setChildScope,this);this.createWindow=n(this.createWindow,this);this.setContentKeys=n(this.setContentKeys,this);this.pieceMeal=n(this.pieceMeal,this);this.createAllNew=n(this.createAllNew,this);this.watchIdKey=n(this.watchIdKey,this);this.createChildScopes=n(this.createChildScopes,this);this.watchOurScope=n(this.watchOurScope,this);this.watchDestroy=n(this.watchDestroy,this);this.onDestroy=n(this.onDestroy,this);this.rebuildAll=n(this.rebuildAll,this);this.doINeedToWipe=n(this.doINeedToWipe,this);this.watchModels=n(this.watchModels,this);this.go=n(this.go,this);k.__super__.constructor.call(this,t,i,r,u,c,l,a,v);this["interface"]=w;this.plurals=new f;_.each(w.scopeKeys,function(n){return function(t){return n[t+"Key"]=void 0}}(this));this.linked=new o(t,i,r,u);this.contentKeys=void 0;this.isIconVisibleOnClick=void 0;this.firstTime=!0;this.firstWatchModels=!0;this.$log.info(self);this.parentScope=void 0;this.go(t)}return i(k,r),k.include(u),k.prototype.go=function(n){return this.watchOurScope(n),this.doRebuildAll=this.scope.doRebuildAll!=null?this.scope.doRebuildAll:!1,n.$watch("doRebuildAll",function(n){return function(t,i){if(t!==i)return n.doRebuildAll=t}}(this)),this.createChildScopes()},k.prototype.watchModels=function(n){var t;return t=this.markersScope!=null?"pluralsUpdate":"models",n.$watch(t,function(t){return function(i,r){var u;if(!_.isEqual(i,r)||t.firstWatchModels)return t.firstWatchModels=!1,t.doRebuildAll||t.doINeedToWipe(n.models)?t.rebuildAll(n,!0,!0):(u=t.plurals.length===0,t.existingPieces!=null?_.last(t.existingPieces._content).then(function(){return t.createChildScopes(u)}):t.createChildScopes(u))}}(this),!0)},k.prototype.doINeedToWipe=function(n){var t;return t=n!=null?n.length===0:!0,this.plurals.length>0&&t},k.prototype.rebuildAll=function(n,t,i){return this.onDestroy(i).then(function(n){return function(){if(t)return n.createChildScopes()}}(this))},k.prototype.onDestroy=function(){return k.__super__.onDestroy.call(this,this.scope),s.promiseLock(this,p.promiseTypes["delete"],void 0,void 0,function(n){return function(){return s.each(n.plurals.values(),function(n){return n.destroy()},s.chunkSizeFrom(n.scope.cleanchunk,!1)).then(function(){var t;if((t=n.plurals)!=null)return t.removeAll()})}}(this))},k.prototype.watchDestroy=function(n){return n.$on("$destroy",function(t){return function(){return t.firstWatchModels=!0,t.firstTime=!0,t.rebuildAll(n,!1,!0)}}(this))},k.prototype.watchOurScope=function(n){return _.each(w.scopeKeys,function(t){return function(i){var r;return r=i+"Key",t[r]=typeof n[i]=="function"?n[i]():n[i]}}(this))},k.prototype.createChildScopes=function(n){var i,r,u;if(n==null&&(n=!0),this.isIconVisibleOnClick=!0,t.isDefined(this.linked.attrs.isiconvisibleonclick)&&(this.isIconVisibleOnClick=this.linked.scope.isIconVisibleOnClick),i=t.isUndefined(this.linked.scope.models),i&&(this.markersScope===void 0||((r=this.markersScope)!=null?r.plurals:void 0)===void 0||((u=this.markersScope)!=null?u.models:void 0)===void 0)){this.$log.error("No models to create windows from! Need direct models or models derived from markers!");return}if(this.gMap!=null)return this.linked.scope.models!=null?(this.watchIdKey(this.linked.scope),n?this.createAllNew(this.linked.scope,!1):this.pieceMeal(this.linked.scope,!1)):(this.parentScope=this.markersScope,this.watchIdKey(this.parentScope),n?this.createAllNew(this.markersScope,!0,"plurals",!1):this.pieceMeal(this.markersScope,!0,"plurals",!1))},k.prototype.watchIdKey=function(n){return this.setIdKey(n),n.$watch("idKey",function(t){return function(i,r){if(i!==r&&i==null)return t.idKey=i,t.rebuildAll(n,!0,!0)}}(this))},k.prototype.createAllNew=function(n,t,i,r){var u;if(i==null&&(i="models"),r==null&&(r=!1),this.firstTime&&(this.watchModels(n),this.watchDestroy(n)),this.setContentKeys(n.models),!this.didQueueInitPromise(this,n))return u=null,s.promiseLock(this,p.promiseTypes.create,"createAllNew",function(n){return u=n},function(r){return function(){return s.each(n.models,function(f){var e,o;return e=t?(o=r.getItem(n,i,f[r.idKey]))!=null?o.gObject:void 0:void 0,u||(!e&&r.markersScope&&h.error("Unable to get gMarker from markersScope!"),r.createWindow(f,e,r.gMap)),u},s.chunkSizeFrom(n.chunk)).then(function(){return r.firstTime=!1})}}(this))},k.prototype.pieceMeal=function(n,t,i,r){var u,f;if(i==null&&(i="models"),r==null&&(r=!0),!n.$$destroyed)return u=null,f=null,n!=null&&this.modelsLength()&&this.plurals.length?s.promiseLock(this,p.promiseTypes.update,"pieceMeal",function(n){return u=n},function(t){return function(){return p.promise(function(){return t.figureOutState(t.idKey,n,t.plurals,t.modelKeyComparison)}).then(function(i){return f=i,s.each(f.removals,function(n){if(n!=null)return t.plurals.remove(n.id),n.destroy!=null&&n.destroy(!0),u},s.chunkSizeFrom(n.chunk))}).then(function(){return s.each(f.adds,function(r){var f,e;if(f=(e=t.getItem(n,i,r[t.idKey]))!=null?e.gObject:void 0,!f)throw"Gmarker undefined";return t.createWindow(r,f,t.gMap),u})}).then(function(){return s.each(f.updates,function(n){return t.updateChild(n.child,n.model),u},s.chunkSizeFrom(n.chunk))})}}(this)):(h.debug("pieceMeal: rebuildAll"),this.rebuildAll(this.scope,!0,!0))},k.prototype.setContentKeys=function(n){if(this.modelsLength(n))return this.contentKeys=Object.keys(n[0])},k.prototype.createWindow=function(n,t,i){var u,r,f,o,s,h;if(r=this.linked.scope.$new(!1),this.setChildScope(r,n),r.$watch("model",function(n){return function(t,i){if(t!==i)return n.setChildScope(r,t)}}(this),!0),f={html:function(t){return function(){return t.interpolateContent(t.linked.element.html(),n)}}(this)},this.DEFAULTS=this.scopeOrModelVal(this.optionsKey,this.scope,n)||{},o=this.createWindowOptions(t,r,f.html(),this.DEFAULTS),u=new e(n,r,o,this.isIconVisibleOnClick,i,(s=this.markersScope)!=null?(h=s.plurals.get(n[this.idKey]))!=null?h.scope:void 0:void 0,f,!1,!0),n[this.idKey]==null){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.");return}return this.plurals.put(n[this.idKey],u),u},k.prototype.setChildScope=function(n,t){return _.each(w.scopeKeys,function(i){return function(r){var u,f;return u=r+"Key",f=i[u]==="self"?t:t[i[u]],f!==n[r]?n[r]=f:void 0}}(this)),n.model=t},k.prototype.interpolateContent=function(n,t){var e,i,r,u,o,f;if(this.contentKeys!==void 0&&this.contentKeys.length!==0){for(e=y(n),r={},f=this.contentKeys,i=0,o=f.length;i<o;i++)u=f[i],r[u]=t[u];return e(r)}},k.prototype.modelKeyComparison=function(n,t){var r,i;if(i=this.scope.coords!=null?this.scope:this.parentScope,i==null)throw"No scope or parentScope set!";return(r=b.equalCoords(this.evalModelHandle(n,i.coords),this.evalModelHandle(t,i.coords)),!r)?r:_.every(_.without(this["interface"].scopeKeys,"coords"),function(r){return function(u){return r.evalModelHandle(n,i[u])===r.evalModelHandle(t,i[u])}}(this))},k}(r)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapCircle",["uiGmapICircle","uiGmapCircleParentModel",function(n,t){return _.extend(n,{link:function(n,i,r,u){return u.getScope().deferred.promise.then(function(){return function(u){return new t(n,i,r,u)}}(this))}})}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapControl",["uiGmapIControl","$http","$templateCache","$compile","$controller","uiGmapGoogleMapApi",function(r,u,f,e,o,s){return function(h){function c(){this.link=n(this.link,this);c.__super__.constructor.call(this)}return i(c,h),c.prototype.link=function(n,i,h,c){return s.then(function(i){return function(s){var h,l;if(t.isUndefined(n.template)){i.$log.error("mapControl: could not find a valid template property");return}if(h=t.isDefined(n.index&&!isNaN(parseInt(n.index)))?parseInt(n.index):void 0,l=t.isDefined(n.position)?n.position.toUpperCase().replace(/-/g,"_"):"TOP_CENTER",!s.ControlPosition[l]){i.$log.error("mapControl: invalid position property");return}return r.mapPromise(n,c).then(function(r){var s,c;return s=void 0,c=t.element("<div><\/div>"),u.get(n.template,{cache:f}).success(function(i){var u,r;return r=n.$new(),c.append(i),t.isDefined(n.controller)&&(u=o(n.controller,{$scope:r}),c.children().data("$ngControllerController",u)),s=e(c.children())(r),h?s[0].index=h:void 0}).error(function(){return i.$log.error("mapControl: template could not be found")}).then(function(){return r.controls[google.maps.ControlPosition[l]].push(s[0])})})}}(this))},c}(r)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").service("uiGmapDragZoom",["uiGmapCtrlHandle","uiGmapPropertyAction",function(n,t){return{restrict:"EMA",transclude:!0,template:'<div class="angular-google-map-dragzoom" ng-transclude style="display: none"><\/div>',require:"^uiGmapGoogleMap",scope:{keyboardkey:"=",options:"=",spec:"="},controller:["$scope","$element",function(t,i){return t.ctrlType="uiGmapDragZoom",_.extend(this,n.handle(t,i))}],link:function(i,r,u,f){return n.mapPromise(i,f).then(function(n){var r,u,f;return r=function(t){return n.enableKeyDragZoom(t),i.spec?i.spec.enableKeyDragZoom(t):void 0},u=new t(function(n,t){return t?r({key:t}):r()}),f=new t(function(n,t){if(t)return r(t)}),i.$watch("keyboardkey",u.sic),u.sic(i.keyboardkey),i.$watch("options",f.sic),f.sic(i.options)})}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapDrawingManager",["uiGmapIDrawingManager","uiGmapDrawingManagerParentModel",function(n,t){return _.extend(n,{link:function(n,i,r,u){return u.getScope().deferred.promise.then(function(u){return new t(n,i,r,u)})}})}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapApiFreeDrawPolygons",["uiGmapLogger","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapDrawFreeHandChildModel","uiGmapLodash",function(t,r,u,f,e){return function(r){function o(){return this.link=n(this.link,this),o.__super__.constructor.apply(this,arguments)}return i(o,r),o.include(u),o.prototype.restrict="EMA",o.prototype.replace=!0,o.prototype.require="^uiGmapGoogleMap",o.prototype.scope={polygons:"=",draw:"="},o.prototype.link=function(n,i,r,u){return this.mapPromise(n,u).then(function(){return function(i){var o,r;return n.polygons?_.isArray(n.polygons)?(o=new f(i,u.getScope()),r=void 0,n.draw=function(){return typeof r=="function"&&r(),o.engage(n.polygons).then(function(){var t;return t=!0,r=n.$watchCollection("polygons",function(n,i){var r;if(t||n===i){t=!1;return}return r=e.differenceObjects(i,n),r.forEach(function(n){return n.setMap(null)})})})}):t.error("Free Draw Polygons must be of type Array!"):t.error("No polygons to bind to!")}}(this))},o}(r)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").service("uiGmapICircle",[function(){var n;return n={},{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 n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIControl",["uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(t,i,r){return function(t){function u(){this.restrict="EA";this.replace=!0;this.require="^uiGmapGoogleMap";this.scope={template:"@template",position:"@position",controller:"@controller",index:"@index"};this.$log=i}return n(u,t),u.extend(r),u.prototype.link=function(){throw new Exception("Not implemented!!");},u}(t)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").service("uiGmapIDrawingManager",[function(){return{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{"static":"@",control:"=",options:"=",events:"="}}}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIMarker",["uiGmapBaseObject","uiGmapCtrlHandle",function(t,i){return function(t){function r(){this.restrict="EMA";this.require="^uiGmapGoogleMap";this.priority=-1;this.transclude=!0;this.replace=!0;this.scope=_.extend(this.scope||{},r.scope)}return n(r,t),r.scope={coords:"=coords",icon:"=icon",click:"&click",options:"=options",events:"=events",fit:"=fit",idKey:"=idkey",control:"=control"},r.scopeKeys=_.keys(r.scope),r.keys=r.scopeKeys,r.extend(i),r}(t)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolygon",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(t,i,r,u){return function(i){function f(){}return n(f,i),f.scope={path:"=path",stroke:"=stroke",clickable:"=",draggable:"=",editable:"=",geodesic:"=",fill:"=",icons:"=icons",visible:"=","static":"=",events:"=",zIndex:"=zindex",fit:"=",control:"=control"},f.scopeKeys=_.keys(f.scope),f.include(t),f.extend(u),f.prototype.restrict="EMA",f.prototype.replace=!0,f.prototype.require="^uiGmapGoogleMap",f.prototype.scope=f.scope,f.prototype.DEFAULTS={},f.prototype.$log=r,f}(i)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolyline",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(t,i,r,u){return function(i){function f(){}return n(f,i),f.scope={path:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=",visible:"=","static":"=",fit:"=",events:"=",zIndex:"=zindex"},f.scopeKeys=_.keys(f.scope),f.include(t),f.extend(u),f.prototype.restrict="EMA",f.prototype.replace=!0,f.prototype.require="^uiGmapGoogleMap",f.prototype.scope=f.scope,f.prototype.DEFAULTS={},f.prototype.$log=r,f}(i)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").service("uiGmapIRectangle",[function(){var n;return n={},{restrict:"EMA",require:"^uiGmapGoogleMap",replace:!0,scope:{bounds:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",fill:"=",visible:"=",events:"="}}}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIWindow",["uiGmapBaseObject","uiGmapChildEvents","uiGmapCtrlHandle",function(t,i,r){return function(t){function u(){this.restrict="EMA";this.template=void 0;this.transclude=!0;this.priority=-100;this.require="^uiGmapGoogleMap";this.replace=!0;this.scope=_.extend(this.scope||{},u.scope)}return n(u,t),u.scope={coords:"=coords",template:"=template",templateUrl:"=templateurl",templateParameter:"=templateparameter",isIconVisibleOnClick:"=isiconvisibleonclick",closeClick:"&closeclick",options:"=options",control:"=control",show:"=show"},u.scopeKeys=_.keys(u.scope),u.include(i),u.extend(r),u}(t)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},r=function(n,t){function r(){this.constructor=n}for(var i in t)u.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n},u={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMap",["$timeout","$q","uiGmapLogger","uiGmapGmapUtil","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapIsReady","uiGmapuuid","uiGmapExtendGWin","uiGmapExtendMarkerClusterer","uiGmapGoogleMapsUtilV3","uiGmapGoogleMapApi","uiGmapEventsHelper",function(u,f,e,o,s,h,c,l,a,v,y,p,w){var b,k;return b=void 0,k=[y,a,v],function(f){function s(){this.link=n(this.link,this);var t,i;t=function(n){var t,i;return i=void 0,n.$on("$destroy",function(){return c.decrement()}),t=h.handle(n),n.ctrlType="Map",n.deferred.promise.then(function(){return k.forEach(function(n){return n.init()})}),t.getMap=function(){return n.map},_.extend(this,t)};this.controller=["$scope",t];i=this}return r(s,f),s.include(o),s.prototype.restrict="EMA",s.prototype.transclude=!0,s.prototype.replace=!1,s.prototype.template='<div class="angular-google-map"><div class="angular-google-map-container"><\/div><div ng-transclude style="display: none"><\/div><\/div>',s.prototype.scope={center:"=",zoom:"=",dragging:"=",control:"=",options:"=",events:"=",eventOpts:"=",styles:"=",bounds:"=",update:"="},s.prototype.link=function(n,r,f){var o,s;if(o=[],n.$on("$destroy",function(){return w.removeEvents(o)}),n.idleAndZoomChanged=!1,n.center==null){s=n.$watch("center",function(t){return function(){if(n.center)return s(),t.link(n,r,f)}}(this));return}return p.then(function(s){return function(h){var a,g,v,p,rt,k,ft,nt,tt,y,et,ot,d,ut,st,ht,it;if(b={mapTypeId:h.MapTypeId.ROADMAP},ut=c.spawn(),ot=function(){return ut.deferred.resolve({instance:ut.instance,map:a})},!s.validateCoords(n.center)){e.error("angular-google-maps: could not find a valid center property");return}if(!t.isDefined(n.zoom)){e.error("angular-google-maps: map zoom property not set");return}if(rt=t.element(r),rt.addClass("angular-google-map"),y={options:{}},f.options&&(y.options=n.options),f.styles&&(y.styles=n.styles),f.type&&(st=f.type.toUpperCase(),google.maps.MapTypeId.hasOwnProperty(st)?y.mapTypeId=google.maps.MapTypeId[f.type.toUpperCase()]:e.error("angular-google-maps: invalid map type '"+f.type+"'")),nt=t.extend({},b,y,{center:s.getCoords(n.center),zoom:n.zoom,bounds:n.bounds}),a=new google.maps.Map(rt.find("div")[1],nt),a.uiGmap_id=l.generate(),p=!1,o.push(google.maps.event.addListenerOnce(a,"idle",function(){return n.deferred.resolve(a),ot()})),v=f.events&&((et=n.events)!=null?et.blacklist:void 0)!=null?n.events.blacklist:[],_.isString(v)&&(v=[v]),tt=function(t,i,r){if(!_.contains(v,t))return r&&r(),o.push(google.maps.event.addListener(a,t,function(){var t;if(!((t=n.update)!=null?t.lazy:void 0))return i()}))},_.contains(v,"all")||(tt("dragstart",function(){return p=!0,n.$evalAsync(function(n){if(n.dragging!=null)return n.dragging=p})}),tt("dragend",function(){return p=!1,n.$evalAsync(function(n){if(n.dragging!=null)return n.dragging=p})}),ht=function(i,r){if(i==null&&(i=a.center),r==null&&(r=n),!_.contains(v,"center"))if(t.isDefined(r.center.type)){if(r.center.coordinates[1]!==i.lat()&&(r.center.coordinates[1]=i.lat()),r.center.coordinates[0]!==i.lng())return r.center.coordinates[0]=i.lng()}else if(r.center.latitude!==i.lat()&&(r.center.latitude=i.lat()),r.center.longitude!==i.lng())return r.center.longitude=i.lng()},d=!1,tt("idle",function(){var t,r,u;return t=a.getBounds(),r=t.getNorthEast(),u=t.getSouthWest(),d=!0,n.$evalAsync(function(t){return ht(),t.bounds===null||t.bounds===i||t.bounds===void 0||_.contains(v,"bounds")||(t.bounds.northeast={latitude:r.lat(),longitude:r.lng()},t.bounds.southwest={latitude:u.lat(),longitude:u.lng()}),_.contains(v,"zoom")||(t.zoom=a.zoom,n.idleAndZoomChanged=!n.idleAndZoomChanged),d=!1})})),t.isDefined(n.events)&&n.events!==null&&t.isObject(n.events)){ft=function(t){return function(){return n.events[t].apply(n,[a,t,arguments])}};g=[];for(k in n.events)n.events.hasOwnProperty(k)&&t.isFunction(n.events[k])&&g.push(google.maps.event.addListener(a,k,ft(k)));o.concat(g)}return a.getOptions=function(){return nt},n.map=a,f.control!=null&&n.control!=null&&(n.control.refresh=function(n){var t,i,r;if(a!=null)return(typeof google!="undefined"&&google!==null?(i=google.maps)!=null?(r=i.event)!=null?r.trigger:void 0:void 0:void 0)!=null&&a!=null&&google.maps.event.trigger(a,"resize"),(n!=null?n.latitude:void 0)!=null&&(n!=null?n.longitude:void 0)!=null?(t=s.getCoords(n),s.isTrue(f.pan)?a.panTo(t):a.setCenter(t)):void 0},n.control.getGMap=function(){return a},n.control.getMapOptions=function(){return nt},n.control.getCustomEventListeners=function(){return g},n.control.removeEvents=function(n){return w.removeEvents(n)}),n.$watch("center",function(t,i){var r,u;if(t!==i&&!d)return(r=s.getCoords(n.center),r.lat()===a.center.lat()&&r.lng()===a.center.lng())?void 0:(u=!0,p||(s.validateCoords(t)||e.error("Invalid center for newValue: "+JSON.stringify(t)),s.isTrue(f.pan)&&n.zoom===a.zoom?a.panTo(r):a.setCenter(r)),!1)},!0),it=null,n.$watch("zoom",function(t,i){var r,f,e;if(t!=null)return _.isEqual(t,i)||(a!=null?a.getZoom():void 0)===(n!=null?n.zoom:void 0)||d?void 0:(e=!0,it!=null&&u.cancel(it),it=u(function(){return a.setZoom(t),e=!1},((r=n.eventOpts)!=null?(f=r.debounce)!=null?f.zoomMs:void 0:void 0)+20,!1))}),n.$watch("bounds",function(n,t){var i,r,u,f,o,s,h;if(n!==t){if((n!=null?(u=n.northeast)!=null?u.latitude:void 0:void 0)==null||(n!=null?(f=n.northeast)!=null?f.longitude:void 0:void 0)==null||(n!=null?(o=n.southwest)!=null?o.latitude:void 0:void 0)==null||(n!=null?(s=n.southwest)!=null?s.longitude:void 0:void 0)==null){e.error("Invalid map bounds for new value: "+JSON.stringify(n));return}return r=new google.maps.LatLng(n.northeast.latitude,n.northeast.longitude),h=new google.maps.LatLng(n.southwest.latitude,n.southwest.longitude),i=new google.maps.LatLngBounds(h,r),a.fitBounds(i)}}),["options","styles"].forEach(function(t){return n.$watch(t,function(n,t){var i;if(i=this.exp,!_.isEqual(n,t))return i==="options"?y.options=n:y.options[i]=n,a!=null?a.setOptions(y):void 0},!0)})}}(this))},s}(s)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarker",["uiGmapIMarker","uiGmapMarkerChildModel","uiGmapMarkerManager","uiGmapLogger",function(t,r,u,f){return function(e){function o(){this.link=n(this.link,this);o.__super__.constructor.call(this);this.template='<span class="angular-google-map-marker" ng-transclude><\/span>';f.info(this)}return i(o,e),o.prototype.controller=["$scope","$element",function(n,i){return n.ctrlType="Marker",_.extend(this,t.handle(n,i))}],o.prototype.link=function(n,i,f,e){var o;return o=t.mapPromise(n,e),o.then(function(){return function(i){var s,h,f,e,o,c;return f=new u(i),e=_.object(t.keys,t.keys),o=new r(n,n,e,i,{},s=!0,f,h=!1,c=!1),o.deferred.promise.then(function(t){return n.deferred.resolve(t)}),n.control!=null?n.control.getGMarkers=f.getGMarkers:void 0}}(this)),n.$on("$destroy",function(){return function(){var n;return typeof n!="undefined"&&n!==null&&n.clear(),null}}(this))},o}(t)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarkers",["uiGmapIMarker","uiGmapPlural","uiGmapMarkersParentModel","uiGmap_sync","uiGmapLogger",function(t,i,r,u,f){return function(u){function e(){e.__super__.constructor.call(this);this.template='<span class="angular-google-map-markers" ng-transclude><\/span>';i.extend(this,{doCluster:"=?docluster",clusterOptions:"=clusteroptions",clusterEvents:"=clusterevents",modelsByRef:"=modelsbyref",type:"=?type",typeOptions:"=?typeoptions",typeEvents:"=?typeevents"});f.info(this)}return n(e,u),e.prototype.controller=["$scope","$element",function(n,i){return n.ctrlType="Markers",_.extend(this,t.handle(n,i))}],e.prototype.link=function(n,u,f,e){var o,s;return o=void 0,s=function(){return n.deferred.resolve()},t.mapPromise(n,e).then(function(t){var h;return h=e.getScope(),h.$watch("idleAndZoomChanged",function(){return _.defer(o.gManager.draw)}),o=new r(n,u,f,t),i.link(n,o),n.control!=null&&(n.control.getGMarkers=function(){var n;if((n=o.gManager)!=null)return n.getGMarkers()},n.control.getChildMarkers=function(){return o.plurals}),_.last(o.existingPieces._content).then(function(){return s()})})},e}(t)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").service("uiGmapPlural",[function(){var n;return n=function(n,t){if(n.control!=null)return n.control.updateModels=function(i){return n.models=i,t.createChildScopes(!1)},n.control.newModels=function(i){return n.models=i,t.rebuildAll(n,!0,!0)},n.control.clean=function(){return t.rebuildAll(n,!1,!0)},n.control.getPlurals=function(){return t.plurals},n.control.getManager=function(){return t.gManager},n.control.hasManager=function(){return t.gManager!=null==!0},n.control.managerDraw=function(){var t;if(n.control.hasManager())return(t=n.control.getManager())!=null?t.draw():void 0}},{extend:function(n,t){return _.extend(n.scope||{},t||{},{idKey:"=idkey",doRebuildAll:"=dorebuildall",models:"=models",chunk:"=chunk",cleanchunk:"=cleanchunk",control:"=control"})},link:function(t,i){return n(t,i)}}}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygon",["uiGmapIPolygon","$timeout","uiGmaparray-sync","uiGmapPolygonChildModel",function(t,r,u,f){return function(r){function u(){return this.link=n(this.link,this),u.__super__.constructor.apply(this,arguments)}return i(u,r),u.prototype.link=function(n,i,r,u){var e,o;return e=[],o=t.mapPromise(n,u),n.control!=null&&(n.control.getInstance=this,n.control.polygons=e,n.control.promise=o),o.then(function(t){return function(i){return e.push(new f(n,r,i,t.DEFAULTS))}}(this))},u}(t)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygons",["uiGmapIPolygon","$timeout","uiGmaparray-sync","uiGmapPolygonsParentModel","uiGmapPlural",function(r,u,f,e,o){return function(r){function u(){this.link=n(this.link,this);u.__super__.constructor.call(this);o.extend(this);this.$log.info(this)}return i(u,r),u.prototype.link=function(n,i,r,u){return u.getScope().deferred.promise.then(function(u){return function(f){return(t.isUndefined(n.path)||n.path===null)&&u.$log.warn("polygons: no valid path attribute found"),n.models||u.$log.warn("polygons: no models found to create from"),o.link(n,new e(n,i,r,f,u.DEFAULTS))}}(this))},u}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolyline",["uiGmapIPolyline","$timeout","uiGmaparray-sync","uiGmapPolylineChildModel",function(r,u,f,e){return function(u){function f(){return this.link=n(this.link,this),f.__super__.constructor.apply(this,arguments)}return i(f,u),f.prototype.link=function(n,i,u,f){return r.mapPromise(n,f).then(function(i){return function(r){return(t.isUndefined(n.path)||n.path===null||!i.validatePath(n.path))&&i.$log.warn("polyline: no valid path attribute found"),new e(n,u,r,i.DEFAULTS)}}(this))},f}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylines",["uiGmapIPolyline","$timeout","uiGmaparray-sync","uiGmapPolylinesParentModel","uiGmapPlural",function(r,u,f,e,o){return function(r){function u(){this.link=n(this.link,this);u.__super__.constructor.call(this);o.extend(this);this.$log.info(this)}return i(u,r),u.prototype.link=function(n,i,r,u){return u.getScope().deferred.promise.then(function(u){return function(f){return(t.isUndefined(n.path)||n.path===null)&&u.$log.warn("polylines: no valid path attribute found"),n.models||u.$log.warn("polylines: no models found to create from"),o.link(n,new e(n,i,r,f,u.DEFAULTS))}}(this))},u}(r)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapRectangle",["uiGmapLogger","uiGmapGmapUtil","uiGmapIRectangle","uiGmapRectangleParentModel",function(n,t,i,r){return _.extend(i,{link:function(n,t,i,u){return u.getScope().deferred.promise.then(function(){return function(u){return new r(n,t,i,u)}}(this))}})}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindow",["uiGmapIWindow","uiGmapGmapUtil","uiGmapWindowChildModel","uiGmapLodash","uiGmapLogger",function(r,u,f,e,o){return function(s){function h(){this.link=n(this.link,this);h.__super__.constructor.call(this);this.require=["^uiGmapGoogleMap","^?uiGmapMarker"];this.template='<span class="angular-google-maps-window" ng-transclude><\/span>';o.debug(this);this.childWindows=[]}return i(h,s),h.include(u),h.prototype.link=function(n,i,u,f){var e,o;return e=f.length>1&&f[1]!=null?f[1]:void 0,o=e!=null?e.getScope():void 0,this.mapPromise=r.mapPromise(n,f[0]),this.mapPromise.then(function(r){return function(f){var s;if(s=!0,t.isDefined(u.isiconvisibleonclick)&&(s=n.isIconVisibleOnClick),!e){r.init(n,i,s,f);return}return o.deferred.promise.then(function(){return r.init(n,i,s,f,o)})}}(this))},h.prototype.init=function(n,t,i,r,u){var o,s,h,c,l;if(s=n.options!=null?n.options:{},c=n!=null&&this.validateCoords(n.coords),(u!=null?u.getGMarker:void 0)!=null&&(h=u.getGMarker()),l=c?this.createWindowOptions(h,n,t.html(),s):s,r!=null&&(o=new f({},n,l,i,r,u,t),this.childWindows.push(o),n.$on("$destroy",function(n){return function(){return n.childWindows=e.withoutObjects(n.childWindows,[o],function(n,t){return n.scope.$id===t.scope.$id}),n.childWindows.length=0}}(this))),n.control!=null&&(n.control.getGWindows=function(n){return function(){return n.childWindows.map(function(n){return n.gObject})}}(this),n.control.getChildWindows=function(n){return function(){return n.childWindows}}(this),n.control.getPlurals=n.control.getChildWindows,n.control.showWindow=function(n){return function(){return n.childWindows.map(function(n){return n.showWindow()})}}(this),n.control.hideWindow=function(n){return function(){return n.childWindows.map(function(n){return n.hideWindow()})}}(this)),this.onChildCreation!=null&&o!=null)return this.onChildCreation(o)},h}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindows",["uiGmapIWindow","uiGmapPlural","uiGmapWindowsParentModel","uiGmapPromise","uiGmapLogger",function(t,r,u,f,e){return function(t){function o(){this.init=n(this.init,this);this.link=n(this.link,this);o.__super__.constructor.call(this);this.require=["^uiGmapGoogleMap","^?uiGmapMarkers"];this.template='<span class="angular-google-maps-windows" ng-transclude><\/span>';r.extend(this);e.debug(this)}return i(o,t),o.prototype.link=function(n,t,i,r){var o,e,u;return o=r[0].getScope(),e=r.length>1&&r[1]!=null?r[1]:void 0,u=e!=null?e.getScope():void 0,o.deferred.promise.then(function(e){return function(o){var s,h;return s=(u!=null?(h=u.deferred)!=null?h.promise:void 0:void 0)||f.resolve(),s.then(function(){var f,s;return f=(s=e.parentModel)!=null?s.existingPieces:void 0,f?f.then(function(){return e.init(n,t,i,r,o,u)}):e.init(n,t,i,r,o,u)})}}(this))},o.prototype.init=function(n,t,i,f,e,o){var s;return s=new u(n,t,i,f,e,o),r.link(n,s),n.control!=null?(n.control.getGWindows=function(){return function(){return s.plurals.map(function(n){return n.gObject})}}(this),n.control.getChildWindows=function(){return function(){return s.plurals}}(this)):void 0},o}(t)}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap",["uiGmapMap",function(n){return new n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapMarker",["$timeout","uiGmapMarker",function(n,t){return new t(n)}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapMarkers",["$timeout","uiGmapMarkers",function(n,t){return new t(n)}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapPolygon",["uiGmapPolygon",function(n){return new n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapCircle",["uiGmapCircle",function(n){return n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapPolyline",["uiGmapPolyline",function(n){return new n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapPolylines",["uiGmapPolylines",function(n){return new n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapRectangle",["uiGmapLogger","uiGmapRectangle",function(n,t){return t}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapWindow",["$timeout","$compile","$http","$templateCache","uiGmapWindow",function(n,t,i,r,u){return new u(n,t,i,r)}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapWindows",["$timeout","$compile","$http","$templateCache","$interpolate","uiGmapWindows",function(n,t,i,r,u,f){return new f(n,t,i,r,u)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps").directive("uiGmapLayer",["$timeout","uiGmapLogger","uiGmapLayerParentModel",function(t,i,r){var u;return u=function(){function t(){this.link=n(this.link,this);this.$log=i;this.restrict="EMA";this.require="^uiGmapGoogleMap";this.priority=-1;this.transclude=!0;this.template="<span class='angular-google-map-layer' ng-transclude><\/span>";this.replace=!0;this.scope={show:"=show",type:"=type",namespace:"=namespace",options:"=options",onCreated:"&oncreated"}}return t.prototype.link=function(n,t,i,u){return u.getScope().deferred.promise.then(function(){return function(u){return n.onCreated!=null?new r(n,t,i,u,n.onCreated):new r(n,t,i,u)}}(this))},t}(),new u}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapMapControl",["uiGmapControl",function(n){return new n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapDragZoom",["uiGmapDragZoom",function(n){return n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapDrawingManager",["uiGmapDrawingManager",function(n){return n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapFreeDrawPolygons",["uiGmapApiFreeDrawPolygons",function(n){return new n}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps").directive("uiGmapMapType",["$timeout","uiGmapLogger","uiGmapMapTypeParentModel",function(t,i,r){var u;return u=function(){function t(){this.link=n(this.link,this);this.$log=i;this.restrict="EMA";this.require="^uiGmapGoogleMap";this.priority=-1;this.transclude=!0;this.template='<span class="angular-google-map-layer" ng-transclude><\/span>';this.replace=!0;this.scope={show:"=show",options:"=options",refresh:"=refresh",id:"@"}}return t.prototype.link=function(n,t,i,u){return u.getScope().deferred.promise.then(function(){return function(u){return new r(n,t,i,u)}}(this))},t}(),new u}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapPolygons",["uiGmapPolygons",function(n){return new n}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps").directive("uiGmapSearchBox",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapSearchBoxParentModel","$http","$templateCache","$compile",function(i,r,u,f,e,o){var s;return s=function(){function s(){this.link=n(this.link,this);this.$log=r;this.restrict="EMA";this.require="^uiGmapGoogleMap";this.priority=-1;this.transclude=!0;this.template="<span class='angular-google-map-search' ng-transclude><\/span>";this.replace=!0;this.scope={template:"=template",events:"=events",position:"=?position",options:"=?options",parentdiv:"=?parentdiv",ngModel:"=?"}}return s.prototype.require="ngModel",s.prototype.link=function(n,r,s,h){return i.then(function(i){return function(c){return n.template==null&&(e.put("uigmap-searchbox-default.tpl.html",'<input type="text">'),n.template="uigmap-searchbox-default.tpl.html"),f.get(n.template,{cache:e}).success(function(f){if(t.isUndefined(n.events)){i.$log.error("searchBox: the events property is required");return}return h.getScope().deferred.promise.then(function(e){var h;if(h=t.isDefined(n.position)?n.position.toUpperCase().replace(/-/g,"_"):"TOP_LEFT",!c.ControlPosition[h]){i.$log.error("searchBox: invalid position property");return}return new u(n,r,s,e,h,o(f)(n))})})}}(this))},s}(),new s}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapShow",["$animate","uiGmapLogger",function(n,i){return{scope:{uiGmapShow:"=",uiGmapAfterShow:"&",uiGmapAfterHide:"&"},link:function(r,u){var e,o,f;return e=function(t,i){return n[t](u,"ng-hide").then(function(){return i()})},o=function(t,i){return n[t](u,"ng-hide",i)},f=function(n,r){return t.version.major>1?i.error("uiGmapShow is not supported for Angular Major greater than 1.\nYour Major is "+t.version.major+'"'):t.version.major===1&&t.version.minor<3?o(n,r):e(n,r)},r.$watch("uiGmapShow",function(n){return n&&f("removeClass",r.uiGmapAfterShow),n?void 0:f("addClass",r.uiGmapAfterHide)})}}}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapStreetViewPanorama",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper",function(n,i,r,u){var f;return f="uiGmapStreetViewPanorama",{restrict:"EMA",template:'<div class="angular-google-map-street-view-panorama"><\/div>',replace:!0,scope:{focalcoord:"=",radius:"=?",events:"=?",options:"=?",control:"=?",povoptions:"=?",imagestatus:"="},link:function(e,o){return n.then(function(){return function(){var a,v,c,y,w,p,s,h,l,n;return h=void 0,n=void 0,c=!1,p=void 0,s=null,l=null,a=function(){return u.removeEvents(p),h!=null&&(h.unbind("position"),h.setVisible(!1)),n!=null?((n!=null?n.setVisible:void 0)!=null&&n.setVisible(!1),n=void 0):void 0},w=function(n,i){var r;return r=google.maps.geometry.spherical.computeHeading(n,i),c=!0,e.radius=e.radius||50,l=t.extend({heading:r,zoom:1,pitch:0},e.povoptions||{}),s=s=t.extend({navigationControl:!1,addressControl:!1,linksControl:!1,position:n,pov:l,visible:!0},e.options||{}),c=!1},v=function(){var t;if(!e.focalcoord){i.error(f+": focalCoord needs to be defined");return}if(!e.radius){i.error(f+": needs a radius to set the camera view from its focal target.");return}return a(),n==null&&(n=new google.maps.StreetViewService),e.events&&(p=u.setEvents(n,e,e)),t=r.getCoords(e.focalcoord),n.getPanoramaByLocation(t,e.radius,function(i,r){var u,f,c;return e.imagestatus!=null&&(e.imagestatus=r),((c=e.events)!=null?c.image_status_changed:void 0)!=null&&e.events.image_status_changed(n,"image_status_changed",e,r),r==="OK"?(f=i.location.latLng,w(f,t),u=o[0],h=new google.maps.StreetViewPanorama(u,s)):void 0})},e.control!=null&&(e.control.getOptions=function(){return s},e.control.getPovOptions=function(){return l},e.control.getGObject=function(){return n},e.control.getGPano=function(){return h}),e.$watch("options",function(n,t){if(n!==t&&n!==s&&!c)return v()}),y=!0,e.$watch("focalcoord",function(n,t){if(n!==t||y)return n==null?void 0:(y=!1,v())}),e.$on("$destroy",function(){return a()})}}(this))}}}])}.call(this);t.module("uiGmapgoogle-maps.wrapped").service("uiGmapuuid",function(){function n(){}return n.generate=function(){var t=n._gri,i=n._ha;return i(t(32),8)+"-"+i(t(16),4)+"-"+i(16384|t(12),4)+"-"+i(32768|t(14),4)+"-"+i(t(48),12)},n._gri=function(n){return 0>n?NaN:30>=n?0|Math.random()*(1<<n):53>=n?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<<n-30)):NaN},n._ha=function(n,t){for(var i=n.toString(16),r=t-i.length,u="0";0<r;r>>>=1,u+=u)r&1&&(i=u+i);return i},n});t.module("uiGmapgoogle-maps.wrapped").service("uiGmapGoogleMapsUtilV3",function(){return{init:_.once(function(){function u(n){n=n||{};google.maps.OverlayView.apply(this,arguments);this.content_=n.content||"";this.disableAutoPan_=n.disableAutoPan||!1;this.maxWidth_=n.maxWidth||0;this.pixelOffset_=n.pixelOffset||new google.maps.Size(0,0);this.position_=n.position||new google.maps.LatLng(0,0);this.zIndex_=n.zIndex||null;this.boxClass_=n.boxClass||"infoBox";this.boxStyle_=n.boxStyle||{};this.closeBoxMargin_=n.closeBoxMargin||"2px";this.closeBoxURL_=n.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif";n.closeBoxURL===""&&(this.closeBoxURL_="");this.infoBoxClearance_=n.infoBoxClearance||new google.maps.Size(1,1);typeof n.visible=="undefined"&&(n.visible=typeof n.isHidden=="undefined"?!0:!n.isHidden);this.isHidden_=!n.visible;this.alignBottom_=n.alignBottom||!1;this.pane_=n.pane||"floatPane";this.enableEventPropagation_=n.enableEventPropagation||!1;this.div_=null;this.closeListener_=null;this.moveListener_=null;this.contextListener_=null;this.eventListeners_=null;this.fixedWidthSet_=null}function o(n,t){n.getMarkerClusterer().extend(o,google.maps.OverlayView);this.cluster_=n;this.className_=n.getMarkerClusterer().getClusterClass();this.styles_=t;this.center_=null;this.div_=null;this.sums_=null;this.visible_=!1;this.setMap(n.getMap())}function e(n){this.markerClusterer_=n;this.map_=n.getMap();this.gridSize_=n.getGridSize();this.minClusterSize_=n.getMinimumClusterSize();this.averageCenter_=n.getAverageCenter();this.markers_=[];this.center_=null;this.bounds_=null;this.clusterIcon_=new o(this,n.getStyles())}function r(n,t,u){this.extend(r,google.maps.OverlayView);t=t||[];u=u||{};this.markers_=[];this.clusters_=[];this.listeners_=[];this.activeMap_=null;this.ready_=!1;this.gridSize_=u.gridSize||60;this.minClusterSize_=u.minimumClusterSize||2;this.maxZoom_=u.maxZoom||null;this.styles_=u.styles||[];this.title_=u.title||"";this.zoomOnClick_=!0;u.zoomOnClick!==i&&(this.zoomOnClick_=u.zoomOnClick);this.averageCenter_=!1;u.averageCenter!==i&&(this.averageCenter_=u.averageCenter);this.ignoreHidden_=!1;u.ignoreHidden!==i&&(this.ignoreHidden_=u.ignoreHidden);this.enableRetinaIcons_=!1;u.enableRetinaIcons!==i&&(this.enableRetinaIcons_=u.enableRetinaIcons);this.imagePath_=u.imagePath||r.IMAGE_PATH;this.imageExtension_=u.imageExtension||r.IMAGE_EXTENSION;this.imageSizes_=u.imageSizes||r.IMAGE_SIZES;this.calculator_=u.calculator||r.CALCULATOR;this.batchSize_=u.batchSize||r.BATCH_SIZE;this.batchSizeIE_=u.batchSizeIE||r.BATCH_SIZE_IE;this.clusterClass_=u.clusterClass||"cluster";navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize_=this.batchSizeIE_);this.setupStyles_();this.addMarkers(t,!0);this.setMap(n)}function c(n,t){function i(){}i.prototype=t.prototype;n.superClass_=t.prototype;n.prototype=new i;n.prototype.constructor=n}function f(n,t){this.marker_=n;this.handCursorURL_=n.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_=f.getSharedCross(t)}function h(n){n=n||{};n.labelContent=n.labelContent||"";n.labelAnchor=n.labelAnchor||new google.maps.Point(0,0);n.labelClass=n.labelClass||"markerLabels";n.labelStyle=n.labelStyle||{};n.labelInBackground=n.labelInBackground||!1;typeof n.labelVisible=="undefined"&&(n.labelVisible=!0);typeof n.raiseOnDrag=="undefined"&&(n.raiseOnDrag=!0);typeof n.clickable=="undefined"&&(n.clickable=!0);typeof n.draggable=="undefined"&&(n.draggable=!1);typeof n.optimized=="undefined"&&(n.optimized=!1);n.crossImage=n.crossImage||"http"+(document.location.protocol==="https:"?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png";n.handCursor=n.handCursor||"http"+(document.location.protocol==="https:"?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur";n.optimized=!1;this.label=new f(this,n.crossImage,n.handCursor);google.maps.Marker.apply(this,arguments)}function t(n){var t=n||{};this.ready_=!1;this.dragging_=!1;n.visible==i&&(n.visible=!0);n.shadow==i&&(n.shadow="7px -3px 5px rgba(88,88,88,0.7)");n.anchor==i&&(n.anchor=s.BOTTOM);this.setValues(t)}u.prototype=new google.maps.OverlayView;u.prototype.createInfoBoxDiv_=function(){var n,t,i,u=this,r=function(n){n.cancelBubble=!0;n.stopPropagation&&n.stopPropagation()},f=function(n){n.returnValue=!1;n.preventDefault&&n.preventDefault();u.enableEventPropagation_||r(n)};if(!this.div_){if(this.div_=document.createElement("div"),this.setBoxStyle_(),typeof this.content_.nodeType=="undefined"?this.div_.innerHTML=this.getCloseBoxImg_()+this.content_:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(this.content_)),this.getPanes()[this.pane_].appendChild(this.div_),this.addClickHandler_(),this.div_.style.width?this.fixedWidthSet_=!0:this.maxWidth_!==0&&this.div_.offsetWidth>this.maxWidth_?(this.div_.style.width=this.maxWidth_,this.div_.style.overflow="auto",this.fixedWidthSet_=!0):(i=this.getBoxWidths_(),this.div_.style.width=this.div_.offsetWidth-i.left-i.right+"px",this.fixedWidthSet_=!1),this.panBox_(this.disableAutoPan_),!this.enableEventPropagation_){for(this.eventListeners_=[],t=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],n=0;n<t.length;n++)this.eventListeners_.push(google.maps.event.addDomListener(this.div_,t[n],r));this.eventListeners_.push(google.maps.event.addDomListener(this.div_,"mouseover",function(){this.style.cursor="default"}))}this.contextListener_=google.maps.event.addDomListener(this.div_,"contextmenu",f);google.maps.event.trigger(this,"domready")}};u.prototype.getCloseBoxImg_=function(){var n="";return this.closeBoxURL_!==""&&(n="<img",n+=" src='"+this.closeBoxURL_+"'",n+=" align=right",n+=" style='",n+=" position: relative;",n+=" cursor: pointer;",n+=" margin: "+this.closeBoxMargin_+";",n+="'>"),n};u.prototype.addClickHandler_=function(){var n;this.closeBoxURL_!==""?(n=this.div_.firstChild,this.closeListener_=google.maps.event.addDomListener(n,"click",this.getCloseClickHandler_())):this.closeListener_=null};u.prototype.getCloseClickHandler_=function(){var n=this;return function(t){t.cancelBubble=!0;t.stopPropagation&&t.stopPropagation();google.maps.event.trigger(n,"closeclick");n.close()}};u.prototype.panBox_=function(n){var i,y,e=0,f=0,p;if(!n&&(i=this.getMap(),i instanceof google.maps.Map)){i.getBounds().contains(this.position_)||i.setCenter(this.position_);y=i.getBounds();var l=i.getDiv(),a=l.offsetWidth,o=l.offsetHeight,s=this.pixelOffset_.width,r=this.pixelOffset_.height,v=this.div_.offsetWidth,h=this.div_.offsetHeight,c=this.infoBoxClearance_.width,u=this.infoBoxClearance_.height,t=this.getProjection().fromLatLngToContainerPixel(this.position_);t.x<-s+c?e=t.x+s-c:t.x+v+s+c>a&&(e=t.x+v+s+c-a);this.alignBottom_?t.y<-r+u+h?f=t.y+r-u-h:t.y+r+u>o&&(f=t.y+r+u-o):t.y<-r+u?f=t.y+r-u:t.y+h+r+u>o&&(f=t.y+h+r+u-o);e===0&&f===0||(p=i.getCenter(),i.panBy(e,f))}};u.prototype.setBoxStyle_=function(){var n,t;if(this.div_){this.div_.className=this.boxClass_;this.div_.style.cssText="";t=this.boxStyle_;for(n in t)t.hasOwnProperty(n)&&(this.div_.style[n]=t[n]);this.div_.style.WebkitTransform="translateZ(0)";typeof this.div_.style.opacity!="undefined"&&this.div_.style.opacity!==""&&(this.div_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+this.div_.style.opacity*100+')"',this.div_.style.filter="alpha(opacity="+this.div_.style.opacity*100+")");this.div_.style.position="absolute";this.div_.style.visibility="hidden";this.zIndex_!==null&&(this.div_.style.zIndex=this.zIndex_)}};u.prototype.getBoxWidths_=function(){var i,n={top:0,bottom:0,left:0,right:0},t=this.div_;return document.defaultView&&document.defaultView.getComputedStyle?(i=t.ownerDocument.defaultView.getComputedStyle(t,""),i&&(n.top=parseInt(i.borderTopWidth,10)||0,n.bottom=parseInt(i.borderBottomWidth,10)||0,n.left=parseInt(i.borderLeftWidth,10)||0,n.right=parseInt(i.borderRightWidth,10)||0)):document.documentElement.currentStyle&&t.currentStyle&&(n.top=parseInt(t.currentStyle.borderTopWidth,10)||0,n.bottom=parseInt(t.currentStyle.borderBottomWidth,10)||0,n.left=parseInt(t.currentStyle.borderLeftWidth,10)||0,n.right=parseInt(t.currentStyle.borderRightWidth,10)||0),n};u.prototype.onRemove=function(){this.div_&&(this.div_.parentNode.removeChild(this.div_),this.div_=null)};u.prototype.draw=function(){this.createInfoBoxDiv_();var n=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.style.left=n.x+this.pixelOffset_.width+"px";this.alignBottom_?this.div_.style.bottom=-(n.y+this.pixelOffset_.height)+"px":this.div_.style.top=n.y+this.pixelOffset_.height+"px";this.div_.style.visibility=this.isHidden_?"hidden":"visible"};u.prototype.setOptions=function(n){typeof n.boxClass!="undefined"&&(this.boxClass_=n.boxClass,this.setBoxStyle_());typeof n.boxStyle!="undefined"&&(this.boxStyle_=n.boxStyle,this.setBoxStyle_());typeof n.content!="undefined"&&this.setContent(n.content);typeof n.disableAutoPan!="undefined"&&(this.disableAutoPan_=n.disableAutoPan);typeof n.maxWidth!="undefined"&&(this.maxWidth_=n.maxWidth);typeof n.pixelOffset!="undefined"&&(this.pixelOffset_=n.pixelOffset);typeof n.alignBottom!="undefined"&&(this.alignBottom_=n.alignBottom);typeof n.position!="undefined"&&this.setPosition(n.position);typeof n.zIndex!="undefined"&&this.setZIndex(n.zIndex);typeof n.closeBoxMargin!="undefined"&&(this.closeBoxMargin_=n.closeBoxMargin);typeof n.closeBoxURL!="undefined"&&(this.closeBoxURL_=n.closeBoxURL);typeof n.infoBoxClearance!="undefined"&&(this.infoBoxClearance_=n.infoBoxClearance);typeof n.isHidden!="undefined"&&(this.isHidden_=n.isHidden);typeof n.visible!="undefined"&&(this.isHidden_=!n.visible);typeof n.enableEventPropagation!="undefined"&&(this.enableEventPropagation_=n.enableEventPropagation);this.div_&&this.draw()};u.prototype.setContent=function(n){this.content_=n;this.div_&&(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.fixedWidthSet_||(this.div_.style.width=""),typeof n.nodeType=="undefined"?this.div_.innerHTML=this.getCloseBoxImg_()+n:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(n)),this.fixedWidthSet_||(this.div_.style.width=this.div_.offsetWidth+"px",typeof n.nodeType=="undefined"?this.div_.innerHTML=this.getCloseBoxImg_()+n:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(n))),this.addClickHandler_());google.maps.event.trigger(this,"content_changed")};u.prototype.setPosition=function(n){this.position_=n;this.div_&&this.draw();google.maps.event.trigger(this,"position_changed")};u.prototype.setZIndex=function(n){this.zIndex_=n;this.div_&&(this.div_.style.zIndex=n);google.maps.event.trigger(this,"zindex_changed")};u.prototype.setVisible=function(n){this.isHidden_=!n;this.div_&&(this.div_.style.visibility=this.isHidden_?"hidden":"visible")};u.prototype.getContent=function(){return this.content_};u.prototype.getPosition=function(){return this.position_};u.prototype.getZIndex=function(){return this.zIndex_};u.prototype.getVisible=function(){return typeof this.getMap()=="undefined"||this.getMap()===null?!1:!this.isHidden_};u.prototype.show=function(){this.isHidden_=!1;this.div_&&(this.div_.style.visibility="visible")};u.prototype.hide=function(){this.isHidden_=!0;this.div_&&(this.div_.style.visibility="hidden")};u.prototype.open=function(n,t){var i=this;t&&(this.position_=t.getPosition(),this.moveListener_=google.maps.event.addListener(t,"position_changed",function(){i.setPosition(this.getPosition())}));this.setMap(n);this.div_&&this.panBox_()};u.prototype.close=function(){var n;if(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.eventListeners_){for(n=0;n<this.eventListeners_.length;n++)google.maps.event.removeListener(this.eventListeners_[n]);this.eventListeners_=null}this.moveListener_&&(google.maps.event.removeListener(this.moveListener_),this.moveListener_=null);this.contextListener_&&(google.maps.event.removeListener(this.contextListener_),this.contextListener_=null);this.setMap(null)},function(){function t(n,t){var r=this,i=new google.maps.OverlayView;i.onAdd=function(){r.init_(n,t)};i.draw=function(){};i.onRemove=function(){};i.setMap(n);this.prjov_=i}var r=function(n){var t;switch(n){case"thin":t="2px";break;case"medium":t="4px";break;case"thick":t="6px";break;default:t=n}return t},o=function(n){var i,t={};if(document.defaultView&&document.defaultView.getComputedStyle){if(i=n.ownerDocument.defaultView.getComputedStyle(n,""),i)return t.top=parseInt(i.borderTopWidth,10)||0,t.bottom=parseInt(i.borderBottomWidth,10)||0,t.left=parseInt(i.borderLeftWidth,10)||0,t.right=parseInt(i.borderRightWidth,10)||0,t}else if(document.documentElement.currentStyle&&n.currentStyle)return t.top=parseInt(r(n.currentStyle.borderTopWidth),10)||0,t.bottom=parseInt(r(n.currentStyle.borderBottomWidth),10)||0,t.left=parseInt(r(n.currentStyle.borderLeftWidth),10)||0,t.right=parseInt(r(n.currentStyle.borderRightWidth),10)||0,t;return t.top=parseInt(n.style["border-top-width"],10)||0,t.bottom=parseInt(n.style["border-bottom-width"],10)||0,t.left=parseInt(n.style["border-left-width"],10)||0,t.right=parseInt(n.style["border-right-width"],10)||0,t},u={x:0,y:0},s=function(){u.x=typeof document.documentElement.scrollLeft!="undefined"?document.documentElement.scrollLeft:document.body.scrollLeft;u.y=typeof document.documentElement.scrollTop!="undefined"?document.documentElement.scrollTop:document.body.scrollTop};s();var h=function(t){var i=0,r=0;return t=t||n.event,typeof t.pageX!="undefined"?(i=t.pageX,r=t.pageY):typeof t.clientX!="undefined"&&(i=t.clientX+u.x,r=t.clientY+u.y),{left:i,top:r}},f=function(t){for(var f=t.offsetLeft,e=t.offsetTop,i=t.offsetParent,u,h;i!==null;){i!==document.body&&i!==document.documentElement&&(f-=i.scrollLeft,e-=i.scrollTop);var r=i,o=r.offsetLeft,s=r.offsetTop;o||s||!n.getComputedStyle||(u=document.defaultView.getComputedStyle(r,null).MozTransform||document.defaultView.getComputedStyle(r,null).WebkitTransform,u&&typeof u=="string"&&(h=u.split(","),o+=parseInt(h[4],10)||0,s+=parseInt(h[5],10)||0));f+=o;e+=s;i=i.offsetParent}return{left:f,top:e}},i=function(n,t){if(n&&t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n},e=function(n,t){typeof t!="undefined"&&(n.style.opacity=t);typeof n.style.opacity!="undefined"&&n.style.opacity!==""&&(n.style.filter="alpha(opacity="+n.style.opacity*100+")")};t.prototype.init_=function(t,r){var u,f=this;for(this.map_=t,r=r||{},this.key_=r.key||"shift",this.key_=this.key_.toLowerCase(),this.borderWidths_=o(this.map_.getDiv()),this.veilDiv_=[],u=0;u<4;u++)this.veilDiv_[u]=document.createElement("div"),this.veilDiv_[u].onselectstart=function(){return!1},i(this.veilDiv_[u].style,{backgroundColor:"gray",opacity:.25,cursor:"crosshair"}),i(this.veilDiv_[u].style,r.paneStyle),i(this.veilDiv_[u].style,r.veilStyle),i(this.veilDiv_[u].style,{position:"absolute",overflow:"hidden",display:"none"}),this.key_==="shift"&&(this.veilDiv_[u].style.MozUserSelect="none"),e(this.veilDiv_[u]),this.veilDiv_[u].style.backgroundColor==="transparent"&&(this.veilDiv_[u].style.backgroundColor="white",e(this.veilDiv_[u],0)),this.map_.getDiv().appendChild(this.veilDiv_[u]);this.noZoom_=r.noZoom||!1;this.visualEnabled_=r.visualEnabled||!1;this.visualClass_=r.visualClass||"";this.visualPosition_=r.visualPosition||google.maps.ControlPosition.LEFT_TOP;this.visualPositionOffset_=r.visualPositionOffset||new google.maps.Size(35,0);this.visualPositionIndex_=r.visualPositionIndex||null;this.visualSprite_=r.visualSprite||"http"+(document.location.protocol==="https:"?"s":"")+"://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png";this.visualSize_=r.visualSize||new google.maps.Size(20,20);this.visualTips_=r.visualTips||{};this.visualTips_.off=this.visualTips_.off||"Turn on drag zoom mode";this.visualTips_.on=this.visualTips_.on||"Turn off drag zoom mode";this.boxDiv_=document.createElement("div");i(this.boxDiv_.style,{border:"4px solid #736AFF"});i(this.boxDiv_.style,r.boxStyle);i(this.boxDiv_.style,{position:"absolute",display:"none"});e(this.boxDiv_);this.map_.getDiv().appendChild(this.boxDiv_);this.boxBorderWidths_=o(this.boxDiv_);this.listeners_=[google.maps.event.addDomListener(document,"keydown",function(n){f.onKeyDown_(n)}),google.maps.event.addDomListener(document,"keyup",function(n){f.onKeyUp_(n)}),google.maps.event.addDomListener(this.veilDiv_[0],"mousedown",function(n){f.onMouseDown_(n)}),google.maps.event.addDomListener(this.veilDiv_[1],"mousedown",function(n){f.onMouseDown_(n)}),google.maps.event.addDomListener(this.veilDiv_[2],"mousedown",function(n){f.onMouseDown_(n)}),google.maps.event.addDomListener(this.veilDiv_[3],"mousedown",function(n){f.onMouseDown_(n)}),google.maps.event.addDomListener(document,"mousedown",function(n){f.onMouseDownDocument_(n)}),google.maps.event.addDomListener(document,"mousemove",function(n){f.onMouseMove_(n)}),google.maps.event.addDomListener(document,"mouseup",function(n){f.onMouseUp_(n)}),google.maps.event.addDomListener(n,"scroll",s)];this.hotKeyDown_=!1;this.mouseDown_=!1;this.dragging_=!1;this.startPt_=null;this.endPt_=null;this.mapWidth_=null;this.mapHeight_=null;this.mousePosn_=null;this.mapPosn_=null;this.visualEnabled_&&(this.buttonDiv_=this.initControl_(this.visualPositionOffset_),this.visualPositionIndex_!==null&&(this.buttonDiv_.index=this.visualPositionIndex_),this.map_.controls[this.visualPosition_].push(this.buttonDiv_),this.controlIndex_=this.map_.controls[this.visualPosition_].length-1)};t.prototype.initControl_=function(n){var r,u,t=this;return r=document.createElement("div"),r.className=this.visualClass_,r.style.position="relative",r.style.overflow="hidden",r.style.height=this.visualSize_.height+"px",r.style.width=this.visualSize_.width+"px",r.title=this.visualTips_.off,u=document.createElement("img"),u.src=this.visualSprite_,u.style.position="absolute",u.style.left=-(this.visualSize_.width*2)+"px",u.style.top="0px",r.appendChild(u),r.onclick=function(n){t.hotKeyDown_=!t.hotKeyDown_;t.hotKeyDown_?(t.buttonDiv_.firstChild.style.left=-(t.visualSize_.width*0)+"px",t.buttonDiv_.title=t.visualTips_.on,t.activatedByControl_=!0,google.maps.event.trigger(t,"activate")):(t.buttonDiv_.firstChild.style.left=-(t.visualSize_.width*2)+"px",t.buttonDiv_.title=t.visualTips_.off,google.maps.event.trigger(t,"deactivate"));t.onMouseMove_(n)},r.onmouseover=function(){t.buttonDiv_.firstChild.style.left=-(t.visualSize_.width*1)+"px"},r.onmouseout=function(){t.hotKeyDown_?(t.buttonDiv_.firstChild.style.left=-(t.visualSize_.width*0)+"px",t.buttonDiv_.title=t.visualTips_.on):(t.buttonDiv_.firstChild.style.left=-(t.visualSize_.width*2)+"px",t.buttonDiv_.title=t.visualTips_.off)},r.ondragstart=function(){return!1},i(r.style,{cursor:"pointer",marginTop:n.height+"px",marginLeft:n.width+"px"}),r};t.prototype.isHotKeyDown_=function(t){var i;if(t=t||n.event,i=t.shiftKey&&this.key_==="shift"||t.altKey&&this.key_==="alt"||t.ctrlKey&&this.key_==="ctrl",!i)switch(t.keyCode){case 16:this.key_==="shift"&&(i=!0);break;case 17:this.key_==="ctrl"&&(i=!0);break;case 18:this.key_==="alt"&&(i=!0)}return i};t.prototype.isMouseOnMap_=function(){var n=this.mousePosn_,t,i;return n?(t=this.mapPosn_,i=this.map_.getDiv(),n.left>t.left&&n.left<t.left+i.offsetWidth&&n.top>t.top&&n.top<t.top+i.offsetHeight):!1};t.prototype.setVeilVisibility_=function(){var n,r;if(this.map_&&this.hotKeyDown_&&this.isMouseOnMap_())if(r=this.map_.getDiv(),this.mapWidth_=r.offsetWidth-(this.borderWidths_.left+this.borderWidths_.right),this.mapHeight_=r.offsetHeight-(this.borderWidths_.top+this.borderWidths_.bottom),this.activatedByControl_){var t=parseInt(this.buttonDiv_.style.left,10)+this.visualPositionOffset_.width,u=parseInt(this.buttonDiv_.style.top,10)+this.visualPositionOffset_.height,i=this.visualSize_.width,f=this.visualSize_.height;for(this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.width=t+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",this.veilDiv_[1].style.top="0px",this.veilDiv_[1].style.left=t+i+"px",this.veilDiv_[1].style.width=this.mapWidth_-(t+i)+"px",this.veilDiv_[1].style.height=this.mapHeight_+"px",this.veilDiv_[2].style.top="0px",this.veilDiv_[2].style.left=t+"px",this.veilDiv_[2].style.width=i+"px",this.veilDiv_[2].style.height=u+"px",this.veilDiv_[3].style.top=u+f+"px",this.veilDiv_[3].style.left=t+"px",this.veilDiv_[3].style.width=i+"px",this.veilDiv_[3].style.height=this.mapHeight_-(u+f)+"px",n=0;n<this.veilDiv_.length;n++)this.veilDiv_[n].style.display="block"}else{for(this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.width=this.mapWidth_+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",n=1;n<this.veilDiv_.length;n++)this.veilDiv_[n].style.width="0px",this.veilDiv_[n].style.height="0px";for(n=0;n<this.veilDiv_.length;n++)this.veilDiv_[n].style.display="block"}else for(n=0;n<this.veilDiv_.length;n++)this.veilDiv_[n].style.display="none"};t.prototype.onKeyDown_=function(n){this.map_&&!this.hotKeyDown_&&this.isHotKeyDown_(n)&&(this.mapPosn_=f(this.map_.getDiv()),this.hotKeyDown_=!0,this.activatedByControl_=!1,this.setVeilVisibility_(),google.maps.event.trigger(this,"activate"))};t.prototype.getMousePoint_=function(n){var i=h(n),t=new google.maps.Point;return t.x=i.left-this.mapPosn_.left-this.borderWidths_.left,t.y=i.top-this.mapPosn_.top-this.borderWidths_.top,t.x=Math.min(t.x,this.mapWidth_),t.y=Math.min(t.y,this.mapHeight_),t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t};t.prototype.onMouseDown_=function(n){if(this.map_&&this.hotKeyDown_){this.mapPosn_=f(this.map_.getDiv());this.dragging_=!0;this.startPt_=this.endPt_=this.getMousePoint_(n);this.boxDiv_.style.width=this.boxDiv_.style.height="0px";var t=this.prjov_.getProjection(),i=t.fromContainerPixelToLatLng(this.startPt_);google.maps.event.trigger(this,"dragstart",i)}};t.prototype.onMouseDownDocument_=function(){this.mouseDown_=!0};t.prototype.onMouseMove_=function(n){if(this.mousePosn_=h(n),this.dragging_){this.endPt_=this.getMousePoint_(n);var t=Math.min(this.startPt_.x,this.endPt_.x),i=Math.min(this.startPt_.y,this.endPt_.y),r=Math.abs(this.startPt_.x-this.endPt_.x),u=Math.abs(this.startPt_.y-this.endPt_.y),e=Math.max(0,r-(this.boxBorderWidths_.left+this.boxBorderWidths_.right)),o=Math.max(0,u-(this.boxBorderWidths_.top+this.boxBorderWidths_.bottom));this.veilDiv_[0].style.top="0px";this.veilDiv_[0].style.left="0px";this.veilDiv_[0].style.width=t+"px";this.veilDiv_[0].style.height=this.mapHeight_+"px";this.veilDiv_[1].style.top="0px";this.veilDiv_[1].style.left=t+r+"px";this.veilDiv_[1].style.width=this.mapWidth_-(t+r)+"px";this.veilDiv_[1].style.height=this.mapHeight_+"px";this.veilDiv_[2].style.top="0px";this.veilDiv_[2].style.left=t+"px";this.veilDiv_[2].style.width=r+"px";this.veilDiv_[2].style.height=i+"px";this.veilDiv_[3].style.top=i+u+"px";this.veilDiv_[3].style.left=t+"px";this.veilDiv_[3].style.width=r+"px";this.veilDiv_[3].style.height=this.mapHeight_-(i+u)+"px";this.boxDiv_.style.top=i+"px";this.boxDiv_.style.left=t+"px";this.boxDiv_.style.width=e+"px";this.boxDiv_.style.height=o+"px";this.boxDiv_.style.display="block";google.maps.event.trigger(this,"drag",new google.maps.Point(t,i+u),new google.maps.Point(t+r,i),this.prjov_.getProjection())}else this.mouseDown_||(this.mapPosn_=f(this.map_.getDiv()),this.setVeilVisibility_())};t.prototype.onMouseUp_=function(n){var u,l=this,t,i;if(this.mouseDown_=!1,this.dragging_){if(this.getMousePoint_(n).x===this.startPt_.x&&this.getMousePoint_(n).y===this.startPt_.y){this.onKeyUp_(n);return}var f=Math.min(this.startPt_.x,this.endPt_.x),e=Math.min(this.startPt_.y,this.endPt_.y),a=Math.abs(this.startPt_.x-this.endPt_.x),v=Math.abs(this.startPt_.y-this.endPt_.y),o=!0;o&&(f+=this.borderWidths_.left,e+=this.borderWidths_.top);var r=this.prjov_.getProjection(),s=r.fromContainerPixelToLatLng(new google.maps.Point(f,e+v)),h=r.fromContainerPixelToLatLng(new google.maps.Point(f+a,e)),c=new google.maps.LatLngBounds(s,h);this.noZoom_?this.boxDiv_.style.display="none":(u=this.map_.getZoom(),this.map_.fitBounds(c),this.map_.getZoom()<u&&this.map_.setZoom(u),t=r.fromLatLngToContainerPixel(s),i=r.fromLatLngToContainerPixel(h),o&&(t.x-=this.borderWidths_.left,t.y-=this.borderWidths_.top,i.x-=this.borderWidths_.left,i.y-=this.borderWidths_.top),this.boxDiv_.style.left=t.x+"px",this.boxDiv_.style.top=i.y+"px",this.boxDiv_.style.width=Math.abs(i.x-t.x)-(this.boxBorderWidths_.left+this.boxBorderWidths_.right)+"px",this.boxDiv_.style.height=Math.abs(i.y-t.y)-(this.boxBorderWidths_.top+this.boxBorderWidths_.bottom)+"px",setTimeout(function(){l.boxDiv_.style.display="none"},1e3));this.dragging_=!1;this.onMouseMove_(n);if(google.maps.event.trigger(this,"dragend",c),!this.isHotKeyDown_(n))this.onKeyUp_(n)}};t.prototype.onKeyUp_=function(){var n,t,i,u,f,r,e,o,s=null;if(this.map_&&this.hotKeyDown_){for(this.hotKeyDown_=!1,this.dragging_&&(this.boxDiv_.style.display="none",this.dragging_=!1,t=Math.min(this.startPt_.x,this.endPt_.x),i=Math.min(this.startPt_.y,this.endPt_.y),u=Math.abs(this.startPt_.x-this.endPt_.x),f=Math.abs(this.startPt_.y-this.endPt_.y),r=this.prjov_.getProjection(),e=r.fromContainerPixelToLatLng(new google.maps.Point(t,i+f)),o=r.fromContainerPixelToLatLng(new google.maps.Point(t+u,i)),s=new google.maps.LatLngBounds(e,o)),n=0;n<this.veilDiv_.length;n++)this.veilDiv_[n].style.display="none";this.visualEnabled_&&(this.buttonDiv_.firstChild.style.left=-(this.visualSize_.width*2)+"px",this.buttonDiv_.title=this.visualTips_.off,this.buttonDiv_.style.display="");google.maps.event.trigger(this,"deactivate",s)}};google.maps.Map.prototype.enableKeyDragZoom=function(n){this.dragZoom_=new t(this,n)};google.maps.Map.prototype.disableKeyDragZoom=function(){var t,n=this.dragZoom_;if(n){for(t=0;t<n.listeners_.length;++t)google.maps.event.removeListener(n.listeners_[t]);for(this.getDiv().removeChild(n.boxDiv_),t=0;t<n.veilDiv_.length;t++)this.getDiv().removeChild(n.veilDiv_[t]);n.visualEnabled_&&this.controls[n.visualPosition_].removeAt(n.controlIndex_);n.prjov_.setMap(null);this.dragZoom_=null}};google.maps.Map.prototype.keyDragZoomEnabled=function(){return this.dragZoom_!==null};google.maps.Map.prototype.getDragZoomObject=function(){return this.dragZoom_}}();o.prototype.onAdd=function(){var n=this,t,i;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(){i=t});google.maps.event.addDomListener(this.div_,"mousedown",function(){t=!0;i=!1});google.maps.event.addDomListener(this.div_,"click",function(r){if(t=!1,!i){var e,f,u=n.cluster_.getMarkerClusterer();google.maps.event.trigger(u,"click",n.cluster_);google.maps.event.trigger(u,"clusterclick",n.cluster_);u.getZoomOnClick()&&(f=u.getMaxZoom(),e=n.cluster_.getBounds(),u.getMap().fitBounds(e),setTimeout(function(){u.getMap().fitBounds(e);f!==null&&u.getMap().getZoom()>f&&u.getMap().setZoom(f+1)},100));r.cancelBubble=!0;r.stopPropagation&&r.stopPropagation()}});google.maps.event.addDomListener(this.div_,"mouseover",function(){var t=n.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseover",n.cluster_)});google.maps.event.addDomListener(this.div_,"mouseout",function(){var t=n.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseout",n.cluster_)})};o.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)};o.prototype.draw=function(){if(this.visible_){var n=this.getPosFromLatLng_(this.center_);this.div_.style.top=n.y+"px";this.div_.style.left=n.x+"px"}};o.prototype.hide=function(){this.div_&&(this.div_.style.display="none");this.visible_=!1};o.prototype.show=function(){if(this.div_){var n="",r=this.backgroundPosition_.split(" "),t=parseInt(r[0].trim(),10),i=parseInt(r[1].trim(),10),u=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(u);n="<img src='"+this.url_+"' style='position: absolute; top: "+i+"px; left: "+t+"px; ";this.cluster_.getMarkerClusterer().enableRetinaIcons_||(n+="clip: rect("+-1*i+"px, "+(-1*t+this.width_)+"px, "+(-1*i+this.height_)+"px, "+-1*t+"px);");n+="'>";this.div_.innerHTML=n+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+this.sums_.text+"<\/div>";this.div_.title=typeof this.sums_.title=="undefined"||this.sums_.title===""?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title;this.div_.style.display=""}this.visible_=!0};o.prototype.useStyle=function(n){var i,t;this.sums_=n;i=Math.max(0,n.index-1);i=Math.min(this.styles_.length-1,i);t=this.styles_[i];this.url_=t.url;this.height_=t.height;this.width_=t.width;this.anchorText_=t.anchorText||[0,0];this.anchorIcon_=t.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)];this.textColor_=t.textColor||"black";this.textSize_=t.textSize||11;this.textDecoration_=t.textDecoration||"none";this.fontWeight_=t.fontWeight||"bold";this.fontStyle_=t.fontStyle||"normal";this.fontFamily_=t.fontFamily||"Arial,sans-serif";this.backgroundPosition_=t.backgroundPosition||"0 0"};o.prototype.setCenter=function(n){this.center_=n};o.prototype.createCss=function(n){var t=[];return t.push("cursor: pointer;"),t.push("position: absolute; top: "+n.y+"px; left: "+n.x+"px;"),t.push("width: "+this.width_+"px; height: "+this.height_+"px;"),t.join("")};o.prototype.getPosFromLatLng_=function(n){var t=this.getProjection().fromLatLngToDivPixel(n);return t.x-=this.anchorIcon_[1],t.y-=this.anchorIcon_[0],t.x=parseInt(t.x,10),t.y=parseInt(t.y,10),t};e.prototype.getSize=function(){return this.markers_.length};e.prototype.getMarkers=function(){return this.markers_};e.prototype.getCenter=function(){return this.center_};e.prototype.getMap=function(){return this.map_};e.prototype.getMarkerClusterer=function(){return this.markerClusterer_};e.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center_,this.center_),i=this.getMarkers(),n=0;n<i.length;n++)t.extend(i[n].getPosition());return t};e.prototype.remove=function(){this.clusterIcon_.setMap(null);this.markers_=[];delete this.markers_};e.prototype.addMarker=function(n){var t,i,u;if(this.isMarkerAlreadyAdded_(n))return!1;if(this.center_){if(this.averageCenter_){var r=this.markers_.length+1,f=(this.center_.lat()*(r-1)+n.getPosition().lat())/r,e=(this.center_.lng()*(r-1)+n.getPosition().lng())/r;this.center_=new google.maps.LatLng(f,e);this.calculateBounds_()}}else this.center_=n.getPosition(),this.calculateBounds_();if(n.isAdded=!0,this.markers_.push(n),i=this.markers_.length,u=this.markerClusterer_.getMaxZoom(),u!==null&&this.map_.getZoom()>u)n.getMap()!==this.map_&&n.setMap(this.map_);else if(i<this.minClusterSize_)n.getMap()!==this.map_&&n.setMap(this.map_);else if(i===this.minClusterSize_)for(t=0;t<i;t++)this.markers_[t].setMap(null);else n.setMap(null);return this.updateIcon_(),!0};e.prototype.isMarkerInClusterBounds=function(n){return this.bounds_.contains(n.getPosition())};e.prototype.calculateBounds_=function(){var n=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(n)};e.prototype.updateIcon_=function(){var r=this.markers_.length,n=this.markerClusterer_.getMaxZoom(),t,i;if(n!==null&&this.map_.getZoom()>n){this.clusterIcon_.hide();return}if(r<this.minClusterSize_){this.clusterIcon_.hide();return}t=this.markerClusterer_.getStyles().length;i=this.markerClusterer_.getCalculator()(this.markers_,t);this.clusterIcon_.setCenter(this.center_);this.clusterIcon_.useStyle(i);this.clusterIcon_.show()};e.prototype.isMarkerAlreadyAdded_=function(n){var t;if(this.markers_.indexOf)return this.markers_.indexOf(n)!==-1;for(t=0;t<this.markers_.length;t++)if(n===this.markers_[t])return!0;return!1};r.prototype.onAdd=function(){var n=this;this.activeMap_=this.getMap();this.ready_=!0;this.repaint();this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){n.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(){n.redraw_()})]};r.prototype.onRemove=function(){for(var n=0;n<this.markers_.length;n++)this.markers_[n].getMap()!==this.activeMap_&&this.markers_[n].setMap(this.activeMap_);for(n=0;n<this.clusters_.length;n++)this.clusters_[n].remove();for(this.clusters_=[],n=0;n<this.listeners_.length;n++)google.maps.event.removeListener(this.listeners_[n]);this.listeners_=[];this.activeMap_=null;this.ready_=!1};r.prototype.draw=function(){};r.prototype.setupStyles_=function(){var n,t;if(!(this.styles_.length>0))for(n=0;n<this.imageSizes_.length;n++)t=this.imageSizes_[n],this.styles_.push({url:this.imagePath_+(n+1)+"."+this.imageExtension_,height:t,width:t})};r.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),i=new google.maps.LatLngBounds,n=0;n<t.length;n++)i.extend(t[n].getPosition());this.getMap().fitBounds(i)};r.prototype.getGridSize=function(){return this.gridSize_};r.prototype.setGridSize=function(n){this.gridSize_=n};r.prototype.getMinimumClusterSize=function(){return this.minClusterSize_};r.prototype.setMinimumClusterSize=function(n){this.minClusterSize_=n};r.prototype.getMaxZoom=function(){return this.maxZoom_};r.prototype.setMaxZoom=function(n){this.maxZoom_=n};r.prototype.getStyles=function(){return this.styles_};r.prototype.setStyles=function(n){this.styles_=n};r.prototype.getTitle=function(){return this.title_};r.prototype.setTitle=function(n){this.title_=n};r.prototype.getZoomOnClick=function(){return this.zoomOnClick_};r.prototype.setZoomOnClick=function(n){this.zoomOnClick_=n};r.prototype.getAverageCenter=function(){return this.averageCenter_};r.prototype.setAverageCenter=function(n){this.averageCenter_=n};r.prototype.getIgnoreHidden=function(){return this.ignoreHidden_};r.prototype.setIgnoreHidden=function(n){this.ignoreHidden_=n};r.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_};r.prototype.setEnableRetinaIcons=function(n){this.enableRetinaIcons_=n};r.prototype.getImageExtension=function(){return this.imageExtension_};r.prototype.setImageExtension=function(n){this.imageExtension_=n};r.prototype.getImagePath=function(){return this.imagePath_};r.prototype.setImagePath=function(n){this.imagePath_=n};r.prototype.getImageSizes=function(){return this.imageSizes_};r.prototype.setImageSizes=function(n){this.imageSizes_=n};r.prototype.getCalculator=function(){return this.calculator_};r.prototype.setCalculator=function(n){this.calculator_=n};r.prototype.getBatchSizeIE=function(){return this.batchSizeIE_};r.prototype.setBatchSizeIE=function(n){this.batchSizeIE_=n};r.prototype.getClusterClass=function(){return this.clusterClass_};r.prototype.setClusterClass=function(n){this.clusterClass_=n};r.prototype.getMarkers=function(){return this.markers_};r.prototype.getTotalMarkers=function(){return this.markers_.length};r.prototype.getClusters=function(){return this.clusters_};r.prototype.getTotalClusters=function(){return this.clusters_.length};r.prototype.addMarker=function(n,t){this.pushMarkerTo_(n);t||this.redraw_()};r.prototype.addMarkers=function(n,t){var i;for(i in n)n.hasOwnProperty(i)&&this.pushMarkerTo_(n[i]);t||this.redraw_()};r.prototype.pushMarkerTo_=function(n){if(n.getDraggable()){var t=this;google.maps.event.addListener(n,"dragend",function(){t.ready_&&(this.isAdded=!1,t.repaint())})}n.isAdded=!1;this.markers_.push(n)};r.prototype.removeMarker=function(n,t){var i=this.removeMarker_(n);return!t&&i&&this.repaint(),i};r.prototype.removeMarkers=function(n,t){for(var u,r=!1,i=0;i<n.length;i++)u=this.removeMarker_(n[i]),r=r||u;return!t&&r&&this.repaint(),r};r.prototype.removeMarker_=function(n){var t,i=-1;if(this.markers_.indexOf)i=this.markers_.indexOf(n);else for(t=0;t<this.markers_.length;t++)if(n===this.markers_[t]){i=t;break}return i===-1?!1:(n.setMap(null),this.markers_.splice(i,1),!0)};r.prototype.clearMarkers=function(){this.resetViewport_(!0);this.markers_=[]};r.prototype.repaint=function(){var n=this.clusters_.slice();this.clusters_=[];this.resetViewport_(!1);this.redraw_();setTimeout(function(){for(var t=0;t<n.length;t++)n[t].remove()},0)};r.prototype.getExtendedBounds=function(n){var t=this.getProjection(),e=new google.maps.LatLng(n.getNorthEast().lat(),n.getNorthEast().lng()),o=new google.maps.LatLng(n.getSouthWest().lat(),n.getSouthWest().lng()),r=t.fromLatLngToDivPixel(e),i,u,f;return r.x+=this.gridSize_,r.y-=this.gridSize_,i=t.fromLatLngToDivPixel(o),i.x-=this.gridSize_,i.y+=this.gridSize_,u=t.fromDivPixelToLatLng(r),f=t.fromDivPixelToLatLng(i),n.extend(u),n.extend(f),n};r.prototype.redraw_=function(){this.createClusters_(0)};r.prototype.resetViewport_=function(n){for(var i,t=0;t<this.clusters_.length;t++)this.clusters_[t].remove();for(this.clusters_=[],t=0;t<this.markers_.length;t++)i=this.markers_[t],i.isAdded=!1,n&&i.setMap(null)};r.prototype.distanceBetweenPoints_=function(n,t){var i=(t.lat()-n.lat())*Math.PI/180,r=(t.lng()-n.lng())*Math.PI/180,u=Math.sin(i/2)*Math.sin(i/2)+Math.cos(n.lat()*Math.PI/180)*Math.cos(t.lat()*Math.PI/180)*Math.sin(r/2)*Math.sin(r/2),f=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u));return 6371*f};r.prototype.isMarkerInBounds_=function(n,t){return t.contains(n.getPosition())};r.prototype.addToClosestCluster_=function(n){for(var u,t,f,o=4e4,r=null,i=0;i<this.clusters_.length;i++)t=this.clusters_[i],f=t.getCenter(),f&&(u=this.distanceBetweenPoints_(f,n.getPosition()),u<o&&(o=u,r=t));r&&r.isMarkerInClusterBounds(n)?r.addMarker(n):(t=new e(this),t.addMarker(n),this.clusters_.push(t))};r.prototype.createClusters_=function(n){var i,t,u,e=this,f,r;if(this.ready_){for(n===0&&(google.maps.event.trigger(this,"clusteringbegin",this),typeof this.timerRefStatic!="undefined"&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),u=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.020707717434718,-178.48388434375),new google.maps.LatLng(-85.081364443845445,178.00048865625)),f=this.getExtendedBounds(u),r=Math.min(n+this.batchSize_,this.markers_.length),i=n;i<r;i++)t=this.markers_[i],!t.isAdded&&this.isMarkerInBounds_(t,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&t.getVisible())&&this.addToClosestCluster_(t);r<this.markers_.length?this.timerRefStatic=setTimeout(function(){e.createClusters_(r)},0):(delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this))}};r.prototype.extend=function(n,t){return function(n){var t;for(t in n.prototype)this.prototype[t]=n.prototype[t];return this}.apply(n,[t])};r.CALCULATOR=function(n,t){for(var i=0,u=n.length.toString(),r=u;r!==0;)r=parseInt(r/10,10),i++;return i=Math.min(i,t),{text:u,index:i,title:""}};r.BATCH_SIZE=2e3;r.BATCH_SIZE_IE=500;r.IMAGE_PATH="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m";r.IMAGE_EXTENSION="png";r.IMAGE_SIZES=[53,56,66,78,90];c(f,google.maps.OverlayView);f.getSharedCross=function(n){var t;return typeof f.getSharedCross.crossDiv=="undefined"&&(t=document.createElement("img"),t.style.cssText="position: absolute; z-index: 1000002; display: none;",t.style.marginLeft="-8px",t.style.marginTop="-9px",t.src=n,f.getSharedCross.crossDiv=t),f.getSharedCross.crossDiv};f.prototype.onAdd=function(){var n=this,r=!1,t=!1,s,h,c,e,i,l,a,u=20,v="url("+this.handCursorURL_+")",o=function(n){n.preventDefault&&n.preventDefault();n.cancelBubble=!0;n.stopPropagation&&n.stopPropagation()},y=function(){n.marker_.setAnimation(null)};this.getPanes().overlayImage.appendChild(this.labelDiv_);this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_);typeof f.getSharedCross.processed=="undefined"&&(this.getPanes().overlayImage.appendChild(this.crossDiv_),f.getSharedCross.processed=!0);this.listeners_=[google.maps.event.addDomListener(this.eventDiv_,"mouseover",function(t){(n.marker_.getDraggable()||n.marker_.getClickable())&&(this.style.cursor="pointer",google.maps.event.trigger(n.marker_,"mouseover",t))}),google.maps.event.addDomListener(this.eventDiv_,"mouseout",function(i){(n.marker_.getDraggable()||n.marker_.getClickable())&&!t&&(this.style.cursor=n.marker_.getCursor(),google.maps.event.trigger(n.marker_,"mouseout",i))}),google.maps.event.addDomListener(this.eventDiv_,"mousedown",function(i){t=!1;n.marker_.getDraggable()&&(r=!0,this.style.cursor=v);(n.marker_.getDraggable()||n.marker_.getClickable())&&(google.maps.event.trigger(n.marker_,"mousedown",i),o(i))}),google.maps.event.addDomListener(document,"mouseup",function(f){var o;if(r&&(r=!1,n.eventDiv_.style.cursor="pointer",google.maps.event.trigger(n.marker_,"mouseup",f)),t){if(i){o=n.getProjection().fromLatLngToDivPixel(n.marker_.getPosition());o.y+=u;n.marker_.setPosition(n.getProjection().fromDivPixelToLatLng(o));try{n.marker_.setAnimation(google.maps.Animation.BOUNCE);setTimeout(y,1406)}catch(h){}}n.crossDiv_.style.display="none";n.marker_.setZIndex(s);e=!0;t=!1;f.latLng=n.marker_.getPosition();google.maps.event.trigger(n.marker_,"dragend",f)}}),google.maps.event.addListener(n.marker_.getMap(),"mousemove",function(f){var e;r&&(t?(f.latLng=new google.maps.LatLng(f.latLng.lat()-h,f.latLng.lng()-c),e=n.getProjection().fromLatLngToDivPixel(f.latLng),i&&(n.crossDiv_.style.left=e.x+"px",n.crossDiv_.style.top=e.y+"px",n.crossDiv_.style.display="",e.y-=u),n.marker_.setPosition(n.getProjection().fromDivPixelToLatLng(e)),i&&(n.eventDiv_.style.top=e.y+u+"px"),google.maps.event.trigger(n.marker_,"drag",f)):(h=f.latLng.lat()-n.marker_.getPosition().lat(),c=f.latLng.lng()-n.marker_.getPosition().lng(),s=n.marker_.getZIndex(),l=n.marker_.getPosition(),a=n.marker_.getMap().getCenter(),i=n.marker_.get("raiseOnDrag"),t=!0,n.marker_.setZIndex(1e6),f.latLng=n.marker_.getPosition(),google.maps.event.trigger(n.marker_,"dragstart",f)))}),google.maps.event.addDomListener(document,"keydown",function(r){t&&r.keyCode===27&&(i=!1,n.marker_.setPosition(l),n.marker_.getMap().setCenter(a),google.maps.event.trigger(document,"mouseup",r))}),google.maps.event.addDomListener(this.eventDiv_,"click",function(t){(n.marker_.getDraggable()||n.marker_.getClickable())&&(e?e=!1:(google.maps.event.trigger(n.marker_,"click",t),o(t)))}),google.maps.event.addDomListener(this.eventDiv_,"dblclick",function(t){(n.marker_.getDraggable()||n.marker_.getClickable())&&(google.maps.event.trigger(n.marker_,"dblclick",t),o(t))}),google.maps.event.addListener(this.marker_,"dragstart",function(){t||(i=this.get("raiseOnDrag"))}),google.maps.event.addListener(this.marker_,"drag",function(){t||i&&(n.setPosition(u),n.labelDiv_.style.zIndex=1e6+(this.get("labelInBackground")?-1:1))}),google.maps.event.addListener(this.marker_,"dragend",function(){t||i&&n.setPosition(0)}),google.maps.event.addListener(this.marker_,"position_changed",function(){n.setPosition()}),google.maps.event.addListener(this.marker_,"zindex_changed",function(){n.setZIndex()}),google.maps.event.addListener(this.marker_,"visible_changed",function(){n.setVisible()}),google.maps.event.addListener(this.marker_,"labelvisible_changed",function(){n.setVisible()}),google.maps.event.addListener(this.marker_,"title_changed",function(){n.setTitle()}),google.maps.event.addListener(this.marker_,"labelcontent_changed",function(){n.setContent()}),google.maps.event.addListener(this.marker_,"labelanchor_changed",function(){n.setAnchor()}),google.maps.event.addListener(this.marker_,"labelclass_changed",function(){n.setStyles()}),google.maps.event.addListener(this.marker_,"labelstyle_changed",function(){n.setStyles()})]};f.prototype.onRemove=function(){var n;for(this.labelDiv_.parentNode.removeChild(this.labelDiv_),this.eventDiv_.parentNode.removeChild(this.eventDiv_),n=0;n<this.listeners_.length;n++)google.maps.event.removeListener(this.listeners_[n])};f.prototype.draw=function(){this.setContent();this.setTitle();this.setStyles()};f.prototype.setContent=function(){var n=this.marker_.get("labelContent");typeof n.nodeType=="undefined"?(this.labelDiv_.innerHTML=n,this.eventDiv_.innerHTML=this.labelDiv_.innerHTML):(this.labelDiv_.innerHTML="",this.labelDiv_.appendChild(n),n=n.cloneNode(!0),this.eventDiv_.innerHTML="",this.eventDiv_.appendChild(n))};f.prototype.setTitle=function(){this.eventDiv_.title=this.marker_.getTitle()||""};f.prototype.setStyles=function(){var n,t;this.labelDiv_.className=this.marker_.get("labelClass");this.eventDiv_.className=this.labelDiv_.className;this.labelDiv_.style.cssText="";this.eventDiv_.style.cssText="";t=this.marker_.get("labelStyle");for(n in t)t.hasOwnProperty(n)&&(this.labelDiv_.style[n]=t[n],this.eventDiv_.style[n]=t[n]);this.setMandatoryStyles()};f.prototype.setMandatoryStyles=function(){this.labelDiv_.style.position="absolute";this.labelDiv_.style.overflow="hidden";typeof this.labelDiv_.style.opacity!="undefined"&&this.labelDiv_.style.opacity!==""&&(this.labelDiv_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(opacity='+this.labelDiv_.style.opacity*100+')"',this.labelDiv_.style.filter="alpha(opacity="+this.labelDiv_.style.opacity*100+")");this.eventDiv_.style.position=this.labelDiv_.style.position;this.eventDiv_.style.overflow=this.labelDiv_.style.overflow;this.eventDiv_.style.opacity=.01;this.eventDiv_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(opacity=1)"';this.eventDiv_.style.filter="alpha(opacity=1)";this.setAnchor();this.setPosition();this.setVisible()};f.prototype.setAnchor=function(){var n=this.marker_.get("labelAnchor");this.labelDiv_.style.marginLeft=-n.x+"px";this.labelDiv_.style.marginTop=-n.y+"px";this.eventDiv_.style.marginLeft=-n.x+"px";this.eventDiv_.style.marginTop=-n.y+"px"};f.prototype.setPosition=function(n){var t=this.getProjection().fromLatLngToDivPixel(this.marker_.getPosition());typeof n=="undefined"&&(n=0);this.labelDiv_.style.left=Math.round(t.x)+"px";this.labelDiv_.style.top=Math.round(t.y-n)+"px";this.eventDiv_.style.left=this.labelDiv_.style.left;this.eventDiv_.style.top=this.labelDiv_.style.top;this.setZIndex()};f.prototype.setZIndex=function(){var n=this.marker_.get("labelInBackground")?-1:1;typeof this.marker_.getZIndex()=="undefined"?(this.labelDiv_.style.zIndex=parseInt(this.labelDiv_.style.top,10)+n,this.eventDiv_.style.zIndex=this.labelDiv_.style.zIndex):(this.labelDiv_.style.zIndex=this.marker_.getZIndex()+n,this.eventDiv_.style.zIndex=this.labelDiv_.style.zIndex)};f.prototype.setVisible=function(){this.labelDiv_.style.display=this.marker_.get("labelVisible")?this.marker_.getVisible()?"block":"none":"none";this.eventDiv_.style.display=this.labelDiv_.style.display};c(h,google.maps.Marker);h.prototype.setMap=function(n){google.maps.Marker.prototype.setMap.apply(this,arguments);this.label.setMap(n)};t.prototype=new google.maps.OverlayView;n.RichMarker=t;t.prototype.getVisible=function(){return this.get("visible")};t.prototype.getVisible=t.prototype.getVisible;t.prototype.setVisible=function(n){this.set("visible",n)};t.prototype.setVisible=t.prototype.setVisible;t.prototype.visible_changed=function(){this.ready_&&(this.markerWrapper_.style.display=this.getVisible()?"":"none",this.draw())};t.prototype.visible_changed=t.prototype.visible_changed;t.prototype.setFlat=function(n){this.set("flat",!!n)};t.prototype.setFlat=t.prototype.setFlat;t.prototype.getFlat=function(){return this.get("flat")};t.prototype.getFlat=t.prototype.getFlat;t.prototype.getWidth=function(){return this.get("width")};t.prototype.getWidth=t.prototype.getWidth;t.prototype.getHeight=function(){return this.get("height")};t.prototype.getHeight=t.prototype.getHeight;t.prototype.setShadow=function(n){this.set("shadow",n);this.flat_changed()};t.prototype.setShadow=t.prototype.setShadow;t.prototype.getShadow=function(){return this.get("shadow")};t.prototype.getShadow=t.prototype.getShadow;t.prototype.flat_changed=function(){this.ready_&&(this.markerWrapper_.style.boxShadow=this.markerWrapper_.style.webkitBoxShadow=this.markerWrapper_.style.MozBoxShadow=this.getFlat()?"":this.getShadow())};t.prototype.flat_changed=t.prototype.flat_changed;t.prototype.setZIndex=function(n){this.set("zIndex",n)};t.prototype.setZIndex=t.prototype.setZIndex;t.prototype.getZIndex=function(){return this.get("zIndex")};t.prototype.getZIndex=t.prototype.getZIndex;t.prototype.zIndex_changed=function(){this.getZIndex()&&this.ready_&&(this.markerWrapper_.style.zIndex=this.getZIndex())};t.prototype.zIndex_changed=t.prototype.zIndex_changed;t.prototype.getDraggable=function(){return this.get("draggable")};t.prototype.getDraggable=t.prototype.getDraggable;t.prototype.setDraggable=function(n){this.set("draggable",!!n)};t.prototype.setDraggable=t.prototype.setDraggable;t.prototype.draggable_changed=function(){this.ready_&&(this.getDraggable()?this.addDragging_(this.markerWrapper_):this.removeDragListeners_())};t.prototype.draggable_changed=t.prototype.draggable_changed;t.prototype.getPosition=function(){return this.get("position")};t.prototype.getPosition=t.prototype.getPosition;t.prototype.setPosition=function(n){this.set("position",n)};t.prototype.setPosition=t.prototype.setPosition;t.prototype.position_changed=function(){this.draw()};t.prototype.position_changed=t.prototype.position_changed;t.prototype.getAnchor=function(){return this.get("anchor")};t.prototype.getAnchor=t.prototype.getAnchor;t.prototype.setAnchor=function(n){this.set("anchor",n)};t.prototype.setAnchor=t.prototype.setAnchor;t.prototype.anchor_changed=function(){this.draw()};t.prototype.anchor_changed=t.prototype.anchor_changed;t.prototype.htmlToDocumentFragment_=function(n){var t=document.createElement("DIV"),i;if(t.innerHTML=n,t.childNodes.length==1)return t.removeChild(t.firstChild);for(i=document.createDocumentFragment();t.firstChild;)i.appendChild(t.firstChild);return i};t.prototype.removeChildren_=function(n){if(n)for(var t;t=n.firstChild;)n.removeChild(t)};t.prototype.setContent=function(n){this.set("content",n)};t.prototype.setContent=t.prototype.setContent;t.prototype.getContent=function(){return this.get("content")};t.prototype.getContent=t.prototype.getContent;t.prototype.content_changed=function(){var n,t,u,i,r;if(this.markerContent_){if(this.removeChildren_(this.markerContent_),n=this.getContent(),n){for(typeof n=="string"&&(n=n.replace(/^\s*([\S\s]*)\b\s*$/,"$1"),n=this.htmlToDocumentFragment_(n)),this.markerContent_.appendChild(n),t=this,u=this.markerContent_.getElementsByTagName("IMG"),i=0;r=u[i];i++)google.maps.event.addDomListener(r,"mousedown",function(n){t.getDraggable()&&(n.preventDefault&&n.preventDefault(),n.returnValue=!1)}),google.maps.event.addDomListener(r,"load",function(){t.draw()});google.maps.event.trigger(this,"domready")}this.ready_&&this.draw()}};t.prototype.content_changed=t.prototype.content_changed;t.prototype.setCursor_=function(n){if(this.ready_){var t="";navigator.userAgent.indexOf("Gecko/")!==-1?(n=="dragging"&&(t="-moz-grabbing"),n=="dragready"&&(t="-moz-grab"),n=="draggable"&&(t="pointer")):((n=="dragging"||n=="dragready")&&(t="move"),n=="draggable"&&(t="pointer"));this.markerWrapper_.style.cursor!=t&&(this.markerWrapper_.style.cursor=t)}};t.prototype.startDrag=function(n){if(this.getDraggable()&&!this.dragging_){this.dragging_=!0;var t=this.getMap();this.mapDraggable_=t.get("draggable");t.set("draggable",!1);this.mouseX_=n.clientX;this.mouseY_=n.clientY;this.setCursor_("dragready");this.markerWrapper_.style.MozUserSelect="none";this.markerWrapper_.style.KhtmlUserSelect="none";this.markerWrapper_.style.WebkitUserSelect="none";this.markerWrapper_.unselectable="on";this.markerWrapper_.onselectstart=function(){return!1};this.addDraggingListeners_();google.maps.event.trigger(this,"dragstart")}};t.prototype.stopDrag=function(){this.getDraggable()&&this.dragging_&&(this.dragging_=!1,this.getMap().set("draggable",this.mapDraggable_),this.mouseX_=this.mouseY_=this.mapDraggable_=null,this.markerWrapper_.style.MozUserSelect="",this.markerWrapper_.style.KhtmlUserSelect="",this.markerWrapper_.style.WebkitUserSelect="",this.markerWrapper_.unselectable="off",this.markerWrapper_.onselectstart=function(){},this.removeDraggingListeners_(),this.setCursor_("draggable"),google.maps.event.trigger(this,"dragend"),this.draw())};t.prototype.drag=function(n){var r,u,t,i;if(!this.getDraggable()||!this.dragging_){this.stopDrag();return}r=this.mouseX_-n.clientX;u=this.mouseY_-n.clientY;this.mouseX_=n.clientX;this.mouseY_=n.clientY;t=parseInt(this.markerWrapper_.style.left,10)-r;i=parseInt(this.markerWrapper_.style.top,10)-u;this.markerWrapper_.style.left=t+"px";this.markerWrapper_.style.top=i+"px";var f=this.getOffset_(),e=new google.maps.Point(t-f.width,i-f.height),o=this.getProjection();this.setPosition(o.fromDivPixelToLatLng(e));this.setCursor_("dragging");google.maps.event.trigger(this,"drag")};t.prototype.removeDragListeners_=function(){this.draggableListener_&&(google.maps.event.removeListener(this.draggableListener_),delete this.draggableListener_);this.setCursor_("")};t.prototype.addDragging_=function(n){if(n){var t=this;this.draggableListener_=google.maps.event.addDomListener(n,"mousedown",function(n){t.startDrag(n)});this.setCursor_("draggable")}};t.prototype.addDraggingListeners_=function(){var t=this;this.markerWrapper_.setCapture?(this.markerWrapper_.setCapture(!0),this.draggingListeners_=[google.maps.event.addDomListener(this.markerWrapper_,"mousemove",function(n){t.drag(n)},!0),google.maps.event.addDomListener(this.markerWrapper_,"mouseup",function(){t.stopDrag();t.markerWrapper_.releaseCapture()},!0)]):this.draggingListeners_=[google.maps.event.addDomListener(n,"mousemove",function(n){t.drag(n)},!0),google.maps.event.addDomListener(n,"mouseup",function(){t.stopDrag()},!0)]};t.prototype.removeDraggingListeners_=function(){if(this.draggingListeners_){for(var n=0,t;t=this.draggingListeners_[n];n++)google.maps.event.removeListener(t);this.draggingListeners_.length=0}};t.prototype.getOffset_=function(){var r=this.getAnchor(),n,t,i;if(typeof r=="object")return r;if(n=new google.maps.Size(0,0),!this.markerContent_)return n;t=this.markerContent_.offsetWidth;i=this.markerContent_.offsetHeight;switch(r){case s.TOP:n.width=-t/2;break;case s.TOP_RIGHT:n.width=-t;break;case s.LEFT:n.height=-i/2;break;case s.MIDDLE:n.width=-t/2;n.height=-i/2;break;case s.RIGHT:n.width=-t;n.height=-i/2;break;case s.BOTTOM_LEFT:n.height=-i;break;case s.BOTTOM:n.width=-t/2;n.height=-i;break;case s.BOTTOM_RIGHT:n.width=-t;n.height=-i}return n};t.prototype.onAdd=function(){var n,t;this.markerWrapper_||(this.markerWrapper_=document.createElement("DIV"),this.markerWrapper_.style.position="absolute");this.getZIndex()&&(this.markerWrapper_.style.zIndex=this.getZIndex());this.markerWrapper_.style.display=this.getVisible()?"":"none";this.markerContent_||(this.markerContent_=document.createElement("DIV"),this.markerWrapper_.appendChild(this.markerContent_),n=this,google.maps.event.addDomListener(this.markerContent_,"click",function(){google.maps.event.trigger(n,"click")}),google.maps.event.addDomListener(this.markerContent_,"mouseover",function(){google.maps.event.trigger(n,"mouseover")}),google.maps.event.addDomListener(this.markerContent_,"mouseout",function(){google.maps.event.trigger(n,"mouseout")}));this.ready_=!0;this.content_changed();this.flat_changed();this.draggable_changed();t=this.getPanes();t&&t.overlayMouseTarget.appendChild(this.markerWrapper_);google.maps.event.trigger(this,"ready")};t.prototype.onAdd=t.prototype.onAdd;t.prototype.draw=function(){var n,t,i;if(this.ready_&&!this.dragging_&&(n=this.getProjection(),n)){var f=this.get("position"),r=n.fromLatLngToDivPixel(f),u=this.getOffset_();this.markerWrapper_.style.top=r.y+u.height+"px";this.markerWrapper_.style.left=r.x+u.width+"px";t=this.markerContent_.offsetHeight;i=this.markerContent_.offsetWidth;i!=this.get("width")&&this.set("width",i);t!=this.get("height")&&this.set("height",t)}};t.prototype.draw=t.prototype.draw;t.prototype.onRemove=function(){this.markerWrapper_&&this.markerWrapper_.parentNode&&this.markerWrapper_.parentNode.removeChild(this.markerWrapper_);this.removeDragListeners_()};t.prototype.onRemove=t.prototype.onRemove;var s={TOP_LEFT:1,TOP:2,TOP_RIGHT:3,LEFT:4,MIDDLE:5,RIGHT:6,BOTTOM_LEFT:7,BOTTOM:8,BOTTOM_RIGHT:9};n.RichMarkerPosition=s;n.InfoBox=u;n.Cluster=e;n.ClusterIcon=o;n.MarkerClusterer=r;n.MarkerLabel_=f;n.MarkerWithLabel=h;n.RichMarker=t})}}),function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(n,i,r){t.module("uiGmapgoogle-maps.wrapped").service("uiGmapDataStructures",function(){return{Graph:r(1).Graph,Queue:r(1).Queue}})},function(n,t,i){(function(){n.exports={Graph:i(2),Heap:i(3),LinkedList:i(4),Map:i(5),Queue:i(6),RedBlackTree:i(7),Trie:i(8)}}).call(this)},function(n){(function(){var i,t={}.hasOwnProperty;i=function(){function n(){this._nodes={};this.nodeSize=0;this.edgeSize=0}return n.prototype.addNode=function(n){if(!this._nodes[n])return this.nodeSize++,this._nodes[n]={_outEdges:{},_inEdges:{}}},n.prototype.getNode=function(n){return this._nodes[n]},n.prototype.removeNode=function(n){var r,i,u,f,e;if(i=this._nodes[n],i){f=i._outEdges;for(u in f)t.call(f,u)&&this.removeEdge(n,u);e=i._inEdges;for(r in e)t.call(e,r)&&this.removeEdge(r,n);this.nodeSize--;delete this._nodes[n]}else return;return i},n.prototype.addEdge=function(n,t,i){var r,u,f;if(i==null&&(i=1),!this.getEdge(n,t))return(u=this._nodes[n],f=this._nodes[t],!u||!f)?void 0:(r={weight:i},u._outEdges[t]=r,f._inEdges[n]=r,this.edgeSize++,r)},n.prototype.getEdge=function(n,t){var i,r;return i=this._nodes[n],r=this._nodes[t],i&&r?i._outEdges[t]:void 0},n.prototype.removeEdge=function(n,t){var i,r,u;if(r=this._nodes[n],u=this._nodes[t],i=this.getEdge(n,t),i)return delete r._outEdges[t],delete u._inEdges[n],this.edgeSize--,i},n.prototype.getInEdgesOf=function(n){var i,r,u,f;u=this._nodes[n];r=[];f=u!=null?u._inEdges:void 0;for(i in f)t.call(f,i)&&r.push(this.getEdge(i,n));return r},n.prototype.getOutEdgesOf=function(n){var i,r,u,f;i=this._nodes[n];r=[];f=i!=null?i._outEdges:void 0;for(u in f)t.call(f,u)&&r.push(this.getEdge(n,u));return r},n.prototype.getAllEdgesOf=function(n){var i,t,f,o,r,u,e;if(t=this.getInEdgesOf(n),f=this.getOutEdgesOf(n),t.length===0)return f;for(o=this.getEdge(n,n),i=r=0,u=t.length;0<=u?r<u:r>u;i=0<=u?++r:--r)if(t[i]===o){e=[t[t.length-1],t[i]];t[i]=e[0];t[t.length-1]=e[1];t.pop();break}return t.concat(f)},n.prototype.forEachNode=function(n){var i,u,r=this._nodes;for(i in r)t.call(r,i)&&(u=r[i],n(u,i))},n.prototype.forEachEdge=function(n){var e,u,o,f,i,r;i=this._nodes;for(u in i)if(t.call(i,u)){o=i[u];r=o._outEdges;for(f in r)t.call(r,f)&&(e=r[f],n(e))}},n}();n.exports=i}).call(this)},function(n){(function(){var u,i,t,r;u=function(){function n(n){var u,f,r,t,e,i;for(n==null&&(n=[]),this._data=[void 0],r=0,e=n.length;r<e;r++)f=n[r],f!=null&&this._data.push(f);if(this._data.length>1)for(u=t=2,i=this._data.length;2<=i?t<i:t>i;u=2<=i?++t:--t)this._upHeap(u);this.size=this._data.length-1}return n.prototype.add=function(n){if(n!=null)return this._data.push(n),this._upHeap(this._data.length-1),this.size++,n},n.prototype.removeMin=function(){var n;if(this._data.length!==1)return(this.size--,this._data.length===2)?this._data.pop():(n=this._data[1],this._data[1]=this._data.pop(),this._downHeap(),n)},n.prototype.peekMin=function(){return this._data[1]},n.prototype._upHeap=function(n){for(var i,r=this._data[n];this._data[n]<this._data[t(n)]&&n>1;)i=[this._data[t(n)],this._data[n]],this._data[n]=i[0],this._data[t(n)]=i[1],n=t(n)},n.prototype._downHeap=function(){for(var t,u,n=1;i(n<this._data.length);)if(t=i(n),t<this._data.length-1&&this._data[r(n)]<this._data[t]&&(t=r(n)),this._data[t]<this._data[n])u=[this._data[n],this._data[t]],this._data[t]=u[0],this._data[n]=u[1],n=t;else break},n}();t=function(n){return n>>1};i=function(n){return n<<1};r=function(n){return(n<<1)+1};n.exports=u}).call(this)},function(n){(function(){var t;t=function(){function n(n){var i,t,r;for(n==null&&(n=[]),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,t=0,r=n.length;t<r;t++)i=n[t],this.add(i)}return n.prototype.at=function(n){var t,i,r,u,f;if(-this.size<=n&&n<this.size){if(n=this._adjust(n),n*2<this.size)for(t=this.head,i=r=1;r<=n;i=r+=1)t=t.next;else for(t=this.tail,i=u=1,f=this.size-n-1;u<=f;i=u+=1)t=t.prev;return t}},n.prototype.add=function(n,t){var r,i,f,u,e;if(t==null&&(t=this.size),-this.size<=t&&t<=this.size)return i={value:n},t=this._adjust(t),this.size===0?this.head=i:t===0?(f=[i,this.head,i],this.head.prev=f[0],i.next=f[1],this.head=f[2]):(r=this.at(t-1),u=[r.next,i,i,r],i.next=u[0],(e=r.next)!=null?e.prev=u[1]:void 0,r.next=u[2],i.prev=u[3]),t===this.size&&(this.tail=i),this.size++,n},n.prototype.removeAt=function(n){var t,i,r;if(n==null&&(n=this.size-1),-this.size<=n&&n<this.size)return this.size===0?void 0:(n=this._adjust(n),this.size===1?(i=this.head.value,this.head.value=this.tail.value=void 0):n===0?(i=this.head.value,this.head=this.head.next,this.head.prev=void 0):(t=this.at(n),i=t.value,t.prev.next=t.next,(r=t.next)!=null&&(r.prev=t.prev),n===this.size-1&&(this.tail=t.prev)),this.size--,i)},n.prototype.remove=function(n){var t;if(n!=null){for(t=this.head;t&&t.value!==n;)t=t.next;if(t)return this.size===1?this.head.value=this.tail.value=void 0:t===this.head?(this.head=this.head.next,this.head.prev=void 0):t===this.tail?(this.tail=this.tail.prev,this.tail.next=void 0):(t.prev.next=t.next,t.next.prev=t.prev),this.size--,n}},n.prototype.indexOf=function(n,t){var i,r;if(t==null&&(t=0),this.head.value==null&&!this.head.next||t>=this.size)return-1;for(t=Math.max(0,this._adjust(t)),i=this.at(t),r=t;i;){if(i.value===n)break;i=i.next;r++}return r===this.size?-1:r},n.prototype._adjust=function(n){return n<0?this.size+n:n},n}();n.exports=t}).call(this)},function(n){(function(){var u,t,i,r,f={}.hasOwnProperty;t="_mapId_";u=function(){function n(t){var i,r;this._content={};this._itemId=0;this._id=n._newMapId();this.size=0;for(i in t)f.call(t,i)&&(r=t[i],this.set(i,r))}return n._mapIdTracker=0,n._newMapId=function(){return this._mapIdTracker++},n.prototype.hash=function(n,u){var f,e;return u==null&&(u=!1),e=i(n),r(n)?(f=t+this._id,u&&!n[f]&&(n[f]=this._itemId++),f+"_"+n[f]):e+"_"+n},n.prototype.set=function(n,t){return this.has(n)||this.size++,this._content[this.hash(n,!0)]=[t,n],t},n.prototype.get=function(n){var t;if((t=this._content[this.hash(n)])!=null)return t[0]},n.prototype.has=function(n){return this.hash(n)in this._content},n.prototype["delete"]=function(n){var i;return(i=this.hash(n),i in this._content)?(delete this._content[i],r(n)&&delete n[t+this._id],this.size--,!0):!1},n.prototype.forEach=function(n){var t,i,r=this._content;for(t in r)f.call(r,t)&&(i=r[t],n(i[1],i[0]))},n}();r=function(n){var r,u,f,t,e;for(r=["Boolean","Number","String","Undefined","Null","RegExp","Function"],f=i(n),t=0,e=r.length;t<e;t++)if(u=r[t],f===u)return!1;return!0};i=function(n){return Object.prototype.toString.apply(n).match(/\[object (.+)\]/)[1]};n.exports=u}).call(this)},function(n){(function(){var t;t=function(){function n(n){n==null&&(n=[]);this._content=n;this._dequeueIndex=0;this.size=this._content.length}return n.prototype.enqueue=function(n){return this.size++,this._content.push(n),n},n.prototype.dequeue=function(){var n;if(this.size!==0)return this.size--,n=this._content[this._dequeueIndex],this._dequeueIndex++,this._dequeueIndex*2>this._content.length&&(this._content=this._content.slice(this._dequeueIndex),this._dequeueIndex=0),n},n.prototype.peek=function(){return this._content[this._dequeueIndex]},n}();n.exports=t}).call(this)},function(n){(function(){var t,f,e,o,i,p,c,s,u,r,h,v,l,a,y;f=0;e=1;o=2;c=3;i=1;t=2;p=function(){function n(n){var i,t,r;for(n==null&&(n=[]),this._root,this.size=0,t=0,r=n.length;t<r;t++)i=n[t],i!=null&&this.add(i)}return n.prototype.add=function(n){var h,a,l,v;if(n!=null){if(this.size++,l={value:n,_color:i},this._root){if(a=s(this._root,function(t){return n===t.value?f:n<t.value?t._left?e:(l._parent=t,t._left=l,c):t._right?o:(l._parent=t,t._right=l,c)}),a!=null)return}else this._root=l;for(h=l;;){if(h===this._root){h._color=t;break}if(h._parent._color===t)break;if(((v=y(h))!=null?v._color:void 0)===i){h._parent._color=t;y(h)._color=t;u(h)._color=i;h=u(h);continue}!r(h)&&r(h._parent)?(this._rotateLeft(h._parent),h=h._left):r(h)&&!r(h._parent)&&(this._rotateRight(h._parent),h=h._right);h._parent._color=t;u(h)._color=i;r(h)?this._rotateRight(u(h)):this._rotateLeft(u(h));break}return n}},n.prototype.has=function(n){var t;return t=s(this._root,function(t){return n===t.value?f:n<t.value?e:o}),t?!0:!1},n.prototype.peekMin=function(){var n;if((n=l(this._root))!=null)return n.value},n.prototype.peekMax=function(){var n;if((n=v(this._root))!=null)return n.value},n.prototype.remove=function(n){var t;if(t=s(this._root,function(t){return n===t.value?f:n<t.value?e:o}),t)return this._removeNode(this._root,t),this.size--,n},n.prototype.removeMin=function(){var n,t;if(n=l(this._root),n)return t=n.value,this._removeNode(this._root,n),t},n.prototype.removeMax=function(){var n,t;if(n=v(this._root),n)return t=n.value,this._removeNode(this._root,n),t},n.prototype._removeNode=function(n,u){var f,e,o,s,c,v,y,p,w,b;if(u._left&&u._right&&(e=l(u._right),u.value=e.value,u=e),e=u._left||u._right,e||(e={color:t,_right:void 0,_left:void 0,isLeaf:!0}),e._parent=u._parent,(o=u._parent)!=null&&(o[h(u)]=e),u._color===t)if(e._color===i)e._color=t,e._parent||(this._root=e);else for(;;){if(!e._parent){this._root=e.isLeaf?void 0:e;break}if(f=a(e),(f!=null?f._color:void 0)===i&&(e._parent._color=i,f._color=t,r(e)?this._rotateLeft(e._parent):this._rotateRight(e._parent)),f=a(e),e._parent._color===t&&(!f||f._color===t&&(!f._left||f._left._color===t)&&(!f._right||f._right._color===t))){f!=null&&(f._color=i);e.isLeaf&&(e._parent[h(e)]=void 0);e=e._parent;continue}if(e._parent._color===i&&(!f||f._color===t&&(!f._left||((s=f._left)!=null?s._color:void 0)===t)&&(!f._right||((c=f._right)!=null?c._color:void 0)===t))){f!=null&&(f._color=i);e._parent._color=t;break}if((f!=null?f._color:void 0)===t){r(e)&&(!f._right||f._right._color===t)&&((v=f._left)!=null?v._color:void 0)===i?(f._color=i,(y=f._left)!=null&&(y._color=t),this._rotateRight(f)):r(e)||f._left&&f._left._color!==t||((p=f._right)!=null?p._color:void 0)!==i||(f._color=i,(w=f._right)!=null&&(w._color=t),this._rotateLeft(f));break}f=a(e);f._color=e._parent._color;r(e)?(f._right._color=t,this._rotateRight(e._parent)):(f._left._color=t,this._rotateLeft(e._parent))}if(e.isLeaf)return(b=e._parent)!=null?b[h(e)]=void 0:void 0},n.prototype._rotateLeft=function(n){var t,i;return(t=n._parent)!=null&&(t[h(n)]=n._right),n._right._parent=n._parent,n._parent=n._right,n._right=n._right._left,n._parent._left=n,(i=n._right)!=null&&(i._parent=n),n._parent._parent==null?this._root=n._parent:void 0},n.prototype._rotateRight=function(n){var t,i;return(t=n._parent)!=null&&(t[h(n)]=n._left),n._left._parent=n._parent,n._parent=n._left,n._left=n._left._right,n._parent._right=n,(i=n._left)!=null&&(i._parent=n),n._parent._parent==null?this._root=n._parent:void 0},n}();r=function(n){return n===n._parent._left};h=function(n){return r(n)?"_left":"_right"};s=function(n,t){for(var r,i=n,u=void 0;i;){if(r=t(i),r===f){u=i;break}if(r===e)i=i._left;else if(r===o)i=i._right;else if(r===c)break}return u};l=function(n){return s(n,function(n){return n._left?e:f})};v=function(n){return s(n,function(n){return n._right?o:f})};u=function(n){var t;if((t=n._parent)!=null)return t._parent};y=function(n){if(u(n))return r(n._parent)?u(n)._right:u(n)._left};a=function(n){return r(n)?n._parent._right:n._parent._left};n.exports=p}).call(this)},function(n,t,i){(function(){var u,f,t,r,e={}.hasOwnProperty;u=i(6);t="end";f=function(){function n(n){var i,t,r;for(n==null&&(n=[]),this._root={},this.size=0,t=0,r=n.length;t<r;t++)i=n[t],this.add(i)}return n.prototype.add=function(n){var i,r,u,f;if(n!=null){for(this.size++,i=this._root,u=0,f=n.length;u<f;u++)r=n[u],i[r]==null&&(i[r]={}),i=i[r];return i[t]=!0,n}},n.prototype.has=function(n){var i,u,r,f;if(n==null)return!1;for(i=this._root,r=0,f=n.length;r<f;r++){if(u=n[r],i[u]==null)return!1;i=i[u]}return i[t]?!0:!1},n.prototype.longestPrefixOf=function(n){var t,i,u,r,f;if(n==null)return"";for(t=this._root,u="",r=0,f=n.length;r<f;r++){if(i=n[r],t[i]==null)break;u+=i;t=t[i]}return u},n.prototype.wordsWithPrefix=function(n){var h,r,i,f,o,a,c,s,v,l;if(n==null)return[];for(n!=null||(n=""),c=[],r=this._root,s=0,v=n.length;s<v;s++)if(i=n[s],r=r[i],r==null)return[];for(o=new u,o.enqueue([r,""]);o.size!==0;){l=o.dequeue();f=l[0];h=l[1];f[t]&&c.push(n+h);for(i in f)e.call(f,i)&&(a=f[i],o.enqueue([a,h+i]))}return c},n.prototype.remove=function(n){var i,f,o,u,s,e,c,h;if(n!=null){for(i=this._root,u=[],s=0,c=n.length;s<c;s++){if(o=n[s],i[o]==null)return;i=i[o];u.push([o,i])}if(i[t]){if(this.size--,delete i[t],r(i,1))return n;for(f=e=h=u.length-1;h<=1?e<=1:e>=1;f=h<=1?++e:--e)if(r(u[f][1],1))break;else delete u[f-1][1][u[f][0]];return r(this._root[u[0][0]],1)||delete this._root[u[0][0]],n}}},n}();r=function(n,t){var r,i;if(t===0)return!0;i=0;for(r in n)if(e.call(n,r)&&(i++,i>=t))return!0;return!1};n.exports=f}).call(this)}]);t.module("uiGmapgoogle-maps.wrapped").service("uiGmapMarkerSpiderfier",["uiGmapGoogleMapApi",function(t){var i=this,r={}.hasOwnProperty,u=[].slice;return this.OverlappingMarkerSpiderfier=function(){function l(n,t){var o,u,f,s,e,h;this.map=n;t==null&&(t={});for(u in t)r.call(t,u)&&(h=t[u],this[u]=h);for(this.projHelper=new this.constructor.ProjHelper(this.map),this.initMarkerArrays(),this.listeners={},e=["click","zoom_changed","maptypeid_changed"],f=0,s=e.length;f<s;f++)o=e[f],i.addListener(this.map,o,function(n){return function(){return n.unspiderfy()}}(this))}var i,e,c,o,s,v,f,t,a,h,y;for(t=l.prototype,a=[l,t],c=0,v=a.length;c<v;c++)y=a[c],y.VERSION="0.3.3";return e=void 0,i=void 0,f=void 0,h=Math.PI*2,t.keepSpiderfied=!1,t.markersWontHide=!1,t.markersWontMove=!1,t.nearbyDistance=20,t.circleSpiralSwitchover=9,t.circleFootSeparation=23,t.circleStartAngle=h/12,t.spiralFootSeparation=26,t.spiralLengthStart=11,t.spiralLengthFactor=4,t.spiderfiedZIndex=1e3,t.usualLegZIndex=10,t.highlightedLegZIndex=20,t.event="click",t.minZoomLevel=!1,t.legWeight=1.5,t.legColors={usual:{},highlighted:{}},s=t.legColors.usual,o=t.legColors.highlighted,l.initializeGoogleMaps=function(n){return e=n.maps,i=e.event,f=e.MapTypeId,s[f.HYBRID]=s[f.SATELLITE]="#fff",o[f.HYBRID]=o[f.SATELLITE]="#f00",s[f.TERRAIN]=s[f.ROADMAP]="#444",o[f.TERRAIN]=o[f.ROADMAP]="#f00",this.ProjHelper=function(n){return this.setMap(n)},this.ProjHelper.prototype=new e.OverlayView,this.ProjHelper.prototype.draw=function(){}},t.initMarkerArrays=function(){return this.markers=[],this.markerListenerRefs=[]},t.addMarker=function(n){var t;return n._oms!=null?this:(n._oms=!0,t=[i.addListener(n,this.event,function(t){return function(i){return t.spiderListener(n,i)}}(this))],this.markersWontHide||t.push(i.addListener(n,"visible_changed",function(t){return function(){return t.markerChangeListener(n,!1)}}(this))),this.markersWontMove||t.push(i.addListener(n,"position_changed",function(t){return function(){return t.markerChangeListener(n,!0)}}(this))),this.markerListenerRefs.push(t),this.markers.push(n),this)},t.markerChangeListener=function(n,t){if(n._omsData!=null&&(t||!n.getVisible())&&!(this.spiderfying!=null||this.unspiderfying!=null))return this.unspiderfy(t?n:null)},t.getMarkers=function(){return this.markers.slice(0)},t.removeMarker=function(n){var t,r,f,e,u;if(n._omsData!=null&&this.unspiderfy(),t=this.arrIndexOf(this.markers,n),t<0)return this;for(u=this.markerListenerRefs.splice(t,1)[0],r=0,f=u.length;r<f;r++)e=u[r],i.removeListener(e);return delete n._oms,this.markers.splice(t,1),this},t.clearMarkers=function(){var n,r,e,o,s,u,h,t,f;for(this.unspiderfy(),f=this.markers,n=r=0,e=f.length;r<e;n=++r){for(h=f[n],u=this.markerListenerRefs[n],t=0,o=u.length;t<o;t++)s=u[t],i.removeListener(s);delete h._oms}return this.initMarkerArrays(),this},t.addListener=function(n,t){var i;return((i=this.listeners)[n]!=null?i[n]:i[n]=[]).push(t),this},t.removeListener=function(n,t){var i;return i=this.arrIndexOf(this.listeners[n],t),i<0||this.listeners[n].splice(i,1),this},t.clearListeners=function(n){return this.listeners[n]=[],this},t.trigger=function(){var r,f,e,n,o,s,t,i;for(f=arguments[0],r=2<=arguments.length?u.call(arguments,1):[],t=(s=this.listeners[f])!=null?s:[],i=[],n=0,o=t.length;n<o;n++)e=t[n],i.push(e.apply(null,r));return i},t.generatePtsCircle=function(n,t){var u,c,l,f,i,o,r,s;for(l=this.circleFootSeparation*(2+n),o=l/h,c=h/n,s=[],f=i=0,r=n;0<=r?i<r:i>r;f=0<=r?++i:--i)u=this.circleStartAngle+f*c,s.push(new e.Point(t.x+o*Math.cos(u),t.y+o*Math.sin(u)));return s},t.generatePtsSpiral=function(n,t){var i,o,r,u,c,f,s;for(u=this.spiralLengthStart,i=0,s=[],o=r=0,f=n;0<=f?r<f:r>f;o=0<=f?++r:--r)i+=this.spiralFootSeparation/u+o*.0005,c=new e.Point(t.x+u*Math.cos(i),t.y+u*Math.sin(i)),u+=h*this.spiralLengthFactor/i,s.push(c);return s},t.spiderListener=function(i,r){var a,v,f,y,u,o,p,s,h,e,c,w,l;if(s=i._omsData!=null,s&&this.keepSpiderfied||(this.event==="mouseover"?(a=this,v=function(){return a.unspiderfy()},n.clearTimeout(t.timeout),t.timeout=setTimeout(v,3e3)):this.unspiderfy()),s||this.map.getStreetView().getVisible()||this.map.getMapTypeId()==="GoogleEarthAPI")return this.trigger("click",i,r);for(e=[],c=[],h=this.nearbyDistance,w=h*h,p=this.llToPt(i.position),l=this.markers,f=0,y=l.length;f<y;f++)(u=l[f],u.map!=null&&u.getVisible())&&(o=this.llToPt(u.position),this.ptDistanceSq(o,p)<w?e.push({marker:u,markerPt:o}):c.push(u));return e.length===1?this.trigger("click",i,r):this.spiderfy(e,c)},t.markersNearMarker=function(n,t){var r,o,i,s,h,u,f,c,e,l,a;if(t==null&&(t=!1),this.projHelper.getProjection()==null)throw"Must wait for 'idle' event on map before calling markersNearMarker";for(f=this.nearbyDistance,c=f*f,h=this.llToPt(n.position),u=[],e=this.markers,r=0,o=e.length;r<o;r++)if((i=e[r],i!==n&&i.map!=null&&i.getVisible())&&(s=this.llToPt((l=(a=i._omsData)!=null?a.usualPosition:void 0)!=null?l:i.position),this.ptDistanceSq(s,h)<c&&(u.push(i),t)))break;return u},t.markersNearAnyOtherMarker=function(){var r,n,t,o,b,k,d,i,s,u,h,f,e,c,l,g,a,v,y,p,w;if(this.projHelper.getProjection()==null)throw"Must wait for 'idle' event on map before calling markersNearAnyOtherMarker";for(l=this.nearbyDistance,g=l*l,e=function(){var n,u,t,f,e,r;for(t=this.markers,r=[],n=0,u=t.length;n<u;n++)i=t[n],r.push({pt:this.llToPt((f=(e=i._omsData)!=null?e.usualPosition:void 0)!=null?f:i.position),willSpiderfy:!1});return r}.call(this),v=this.markers,n=o=0,b=v.length;o<b;n=++o)if((s=v[n],s.map!=null&&s.getVisible())&&(u=e[n],!u.willSpiderfy))for(y=this.markers,t=c=0,k=y.length;c<k;t=++c)if((h=y[t],t!==n)&&h.map!=null&&h.getVisible()&&(f=e[t],!(t<n)||f.willSpiderfy)&&this.ptDistanceSq(u.pt,f.pt)<g){u.willSpiderfy=f.willSpiderfy=!0;break}for(p=this.markers,w=[],r=a=0,d=p.length;a<d;r=++a)i=p[r],e[r].willSpiderfy&&w.push(i);return w},t.makeHighlightListenerFuncs=function(n){return{highlight:function(t){return function(){return n._omsData.leg.setOptions({strokeColor:t.legColors.highlighted[t.map.mapTypeId],zIndex:t.highlightedLegZIndex})}}(this),unhighlight:function(t){return function(){return n._omsData.leg.setOptions({strokeColor:t.legColors.usual[t.map.mapTypeId],zIndex:t.usualLegZIndex})}}(this)}},t.spiderfy=function(n,t){var o,s,u,h,c,l,r,a,v,f,y;return this.minZoomLevel&&this.map.getZoom()<this.minZoomLevel?!1:(this.spiderfying=!0,f=n.length,o=this.ptAverage(function(){var t,r,i;for(i=[],t=0,r=n.length;t<r;t++)a=n[t],i.push(a.markerPt);return i}()),h=f>=this.circleSpiralSwitchover?this.generatePtsSpiral(f,o).reverse():this.generatePtsCircle(f,o),y=function(){var t,o,f;for(f=[],t=0,o=h.length;t<o;t++)u=h[t],s=this.ptToLl(u),v=this.minExtract(n,function(n){return function(t){return n.ptDistanceSq(t.markerPt,u)}}(this)),r=v.marker,l=new e.Polyline({map:this.map,path:[r.position,s],strokeColor:this.legColors.usual[this.map.mapTypeId],strokeWeight:this.legWeight,zIndex:this.usualLegZIndex}),r._omsData={usualPosition:r.position,leg:l},this.legColors.highlighted[this.map.mapTypeId]!==this.legColors.usual[this.map.mapTypeId]&&(c=this.makeHighlightListenerFuncs(r),r._omsData.hightlightListeners={highlight:i.addListener(r,"mouseover",c.highlight),unhighlight:i.addListener(r,"mouseout",c.unhighlight)}),r.setPosition(s),r.setZIndex(Math.round(this.spiderfiedZIndex+u.y)),f.push(r);return f}.call(this),delete this.spiderfying,this.spiderfied=!0,this.trigger("spiderfy",y,t))},t.unspiderfy=function(n){var r,s,u,t,f,e,o;if(n==null&&(n=null),this.spiderfied==null)return this;for(this.unspiderfying=!0,o=[],f=[],e=this.markers,r=0,s=e.length;r<s;r++)t=e[r],t._omsData!=null?(t._omsData.leg.setMap(null),t!==n&&t.setPosition(t._omsData.usualPosition),t.setZIndex(null),u=t._omsData.hightlightListeners,u!=null&&(i.removeListener(u.highlight),i.removeListener(u.unhighlight)),delete t._omsData,o.push(t)):f.push(t);return delete this.unspiderfying,delete this.spiderfied,this.trigger("unspiderfy",o,f),this},t.ptDistanceSq=function(n,t){var i,r;return i=n.x-t.x,r=n.y-t.y,i*i+r*r},t.ptAverage=function(n){var t,o,i,r,u,f;for(u=f=0,t=0,o=n.length;t<o;t++)r=n[t],u+=r.x,f+=r.y;return i=n.length,new e.Point(u/i,f/i)},t.llToPt=function(n){return this.projHelper.getProjection().fromLatLngToDivPixel(n)},t.ptToLl=function(n){return this.projHelper.getProjection().fromDivPixelToLatLng(n)},t.minExtract=function(n,t){for(var i,e,o,u,f,r=u=0,s=n.length;u<s;r=++u)o=n[r],f=t(o),(typeof i=="undefined"||i===null||f<e)&&(e=f,i=r);return n.splice(i,1)[0]},t.arrIndexOf=function(n,t){var i,r,u,f;if(n.indexOf!=null)return n.indexOf(t);for(i=r=0,u=n.length;r<u;i=++r)if(f=n[i],f===t)return i;return-1},l}(),t.then(function(){i.OverlappingMarkerSpiderfier.initializeGoogleMaps(n.google)}),this.OverlappingMarkerSpiderfier}]);t.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendMarkerClusterer",["uiGmapLodash","uiGmapPropMap",function(t,i){return{init:_.once(function(){(function(){var u={}.hasOwnProperty,r=function(n,t){function r(){this.constructor=n}for(var i in t)u.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n};n.NgMapCluster=function(n){function u(n){u.__super__.constructor.call(this,n);this.markers_=new i}return r(u,n),u.prototype.addMarker=function(n){var i,r,u;if(this.isMarkerAlreadyAdded_(n)&&(u=this.markers_.get(n.key),u.getPosition().lat()==n.getPosition().lat()&&u.getPosition().lon()==n.getPosition().lon()))return!1;if(this.center_){if(this.averageCenter_){var t=this.markers_.length+1,f=(this.center_.lat()*(t-1)+n.getPosition().lat())/t,e=(this.center_.lng()*(t-1)+n.getPosition().lng())/t;this.center_=new google.maps.LatLng(f,e);this.calculateBounds_()}}else this.center_=n.getPosition(),this.calculateBounds_();return n.isAdded=!0,this.markers_.push(n),i=this.markers_.length,r=this.markerClusterer_.getMaxZoom(),r!==null&&this.map_.getZoom()>r?n.getMap()!==this.map_&&n.setMap(this.map_):i<this.minClusterSize_?n.getMap()!==this.map_&&n.setMap(this.map_):i===this.minClusterSize_?this.markers_.each(function(n){n.setMap(null)}):n.setMap(null),!0},u.prototype.isMarkerAlreadyAdded_=function(n){return t.isNullOrUndefined(this.markers_.get(n.key))},u.prototype.getBounds=function(){var n=new google.maps.LatLngBounds(this.center_,this.center_);return this.getMarkers().each(function(t){n.extend(t.getPosition())}),n},u.prototype.remove=function(){this.clusterIcon_.setMap(null);this.markers_=new i;delete this.markers_},u}(Cluster);n.NgMapMarkerClusterer=function(n){function t(n,r,u){t.__super__.constructor.call(this,n,r,u);this.markers_=new i}return r(t,n),t.prototype.clearMarkers=function(){this.resetViewport_(!0);this.markers_=new i},t.prototype.removeMarker_=function(n){return this.markers_.get(n.key)?(n.setMap(null),this.markers_.remove(n.key),!0):!1},t.prototype.createClusters_=function(n){var t,i,u,f=this;if(this.ready_){n===0&&(google.maps.event.trigger(this,"clusteringbegin",this),typeof this.timerRefStatic!="undefined"&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic));u=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.020707717434718,-178.48388434375),new google.maps.LatLng(-85.081364443845445,178.00048865625));var e=this.getExtendedBounds(u),r=Math.min(n+this.batchSize_,this.markers_.length),o=this.markers_.values();for(t=n;t<r;t++)i=o[t],!i.isAdded&&this.isMarkerInBounds_(i,e)&&(!this.ignoreHidden_||this.ignoreHidden_&&i.getVisible())&&this.addToClosestCluster_(i);if(r<this.markers_.length)this.timerRefStatic=setTimeout(function(){f.createClusters_(r)},0);else{for(t=0;t<this.clusters_.length;t++)this.clusters_[t].updateIcon_();delete this.timerRefStatic;google.maps.event.trigger(this,"clusteringend",this)}}},t.prototype.addToClosestCluster_=function(n){for(var u,t,f,e=4e4,r=null,i=0;i<this.clusters_.length;i++)t=this.clusters_[i],f=t.getCenter(),f&&(u=this.distanceBetweenPoints_(f,n.getPosition()),u<e&&(e=u,r=t));r&&r.isMarkerInClusterBounds(n)?r.addMarker(n):(t=new NgMapCluster(this),t.addMarker(n),this.clusters_.push(t))},t.prototype.redraw_=function(){this.createClusters_(0)},t.prototype.resetViewport_=function(n){for(var t=0;t<this.clusters_.length;t++)this.clusters_[t].remove();this.clusters_=[];this.markers_.each(function(t){t.isAdded=!1;n&&t.setMap(null)})},t.prototype.extend=function(n,t){return function(n){var t;for(t in n.prototype)t!=="constructor"&&(this.prototype[t]=n.prototype[t]);return this}.apply(n,[t])},ClusterIcon.prototype.show=function(){if(this.div_){var n="",r=this.backgroundPosition_.split(" "),t=parseInt(r[0].trim(),10),i=parseInt(r[1].trim(),10),u=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(u);n="<img src='"+this.url_+"' style='position: absolute; top: "+i+"px; left: "+t+"px; ";n+=this.cluster_.getMarkerClusterer().enableRetinaIcons_?"width: "+this.width_+"px;height: "+this.height_+"px;":"clip: rect("+-1*i+"px, "+(-1*t+this.width_)+"px, "+(-1*i+this.height_)+"px, "+-1*t+"px);";n+="'>";this.div_.innerHTML=n+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+this.sums_.text+"<\/div>";this.div_.title=typeof this.sums_.title=="undefined"||this.sums_.title===""?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title;this.div_.style.display=""}this.visible_=!0},t}(MarkerClusterer)}).call(this)})}}])}(window,angular),function(){function lt(t,i){if(t!==i){var f=null===t,e=t===n,r=t===t,o=null===i,s=i===n,u=i===i;if(t>i&&!o||!r||f&&!s&&u||e&&u)return 1;if(t<i&&!f||!u||o&&!e&&r||s&&r)return-1}return 0}function ii(n,t,i){for(var u=n.length,r=i?u:-1;i?r--:++r<u;)if(t(n[r],r,n))return r;return-1}function a(n,t,i){if(t!==t)return fi(n,i);i-=1;for(var r=n.length;++i<r;)if(n[i]===t)return i;return-1}function gi(n){return typeof n=="function"||!1}function r(n){return null==n?"":n+""}function ri(n,t){for(var i=-1,r=n.length;++i<r&&-1<t.indexOf(n.charAt(i)););return i}function ui(n,t){for(var i=n.length;i--&&-1<t.indexOf(n.charAt(i)););return i}function nr(n,t){return lt(n.a,t.a)||n.b-t.b}function tr(n){return au[n]}function ir(n){return vu[n]}function rr(n,t,i){return t?n=pu[n]:i&&(n=ki[n]),"\\"+n}function ur(n){return"\\"+ki[n]}function fi(n,t,i){var u=n.length,r;for(t+=i?0:-1;i?t--:++t<u;)if(r=n[t],r!==r)return t;return-1}function u(n){return!!n&&typeof n=="object"}function ei(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n)}function v(n,t){for(var i=-1,u=n.length,f=-1,r=[];++i<u;)n[i]===t&&(n[i]=at,r[++f]=i);return r}function oi(n){for(var t=-1,i=n.length;++t<i&&ei(n.charCodeAt(t)););return t}function si(n){for(var t=n.length;t--&&ei(n.charCodeAt(t)););return t}function fr(n){return yu[n]}function hi(rt){function ut(n){if(u(n)&&!(ct(n)||n instanceof ki)){if(n instanceof ef)return n;if(pu.call(n,"__chain__")&&pu.call(n,"__wrapped__"))return kl(n)}return new ef(n)}function de(){}function ef(n,t,i){this.__wrapped__=n;this.__actions__=i||[];this.__chain__=!!t}function ki(n){this.__wrapped__=n;this.__actions__=[];this.__dir__=1;this.__filtered__=!1;this.__iteratees__=[];this.__takeCount__=bo;this.__views__=[]}function he(){this.__data__={}}function ge(n){var t=n?n.length:0;for(this.data={hash:wo(null),set:new vo};t--;)this.push(n[t])}function no(n,t){var i=n.data;return(typeof t=="string"||vu(t)?i.set.has(t):i.hash[t])?0:-1}function du(n,t){var i=-1,r=n.length;for(t||(t=yu(r));++i<r;)t[i]=n[i];return t}function of(n,t){for(var i=-1,r=n.length;++i<r&&!1!==t(n[i],i,n););return n}function ph(n,t){for(var i=-1,r=n.length;++i<r;)if(!t(n[i],i,n))return!1;return!0}function ns(n,t){for(var r,i=-1,f=n.length,e=-1,u=[];++i<f;)r=n[i],t(r,i,n)&&(u[++e]=r);return u}function ue(n,t){for(var i=-1,r=n.length,u=yu(r);++i<r;)u[i]=t(n[i],i,n);return u}function ce(n,t){for(var i=-1,r=t.length,u=n.length;++i<r;)n[u+i]=t[i];return n}function wh(n,t,i,r){var u=-1,f=n.length;for(r&&f&&(i=n[++u]);++u<f;)i=t(i,n[u],u,n);return i}function bh(n,t){for(var i=-1,r=n.length;++i<r;)if(t(n[i],i,n))return!0;return!1}function kh(t,i,r,u){return t!==n&&pu.call(u,r)?t:i}function ts(t,i,r){for(var o=-1,s=ku(i),h=s.length;++o<h;){var u=s[o],f=t[u],e=r(f,i[u],u,t,i);(e===e?e===f:f!==f)&&(f!==n||u in t)||(t[u]=e)}return t}function le(n,t){return null==t?n:gh(t,ku(t),n)}function dh(t,i){for(var r,u=-1,f=null==t,e=!f&&wu(t),h=e?t.length:0,o=i.length,s=yu(o);++u<o;)r=i[u],s[u]=e?yf(r,h)?t[r]:n:f?n:t[r];return s}function gh(n,t,i){var r,f,u;for(i||(i={}),r=-1,f=t.length;++r<f;)u=t[r],i[u]=n[u];return i}function to(t,i,r){var u=typeof t;return"function"==u?i===n?t:tf(t,i,r):null==t?ne:"object"==u?ve(t):i===n?ao(t):fc(t,i)}function bf(i,r,u,f,e,o,h){var c,l,a;if(u&&(c=e?u(i,f,e):u(i)),c!==n)return c;if(!vu(i))return i;if(f=ct(i)){if(c=py(i),!r)return du(i,c)}else{if(l=rf.call(i),a=l==st,l!=s&&l!=b&&(!a||e))return t[l]?by(i,l,r):e?i:{};if(c=wy(a?{}:i),!r)return le(c,i)}for(o||(o=[]),h||(h=[]),e=o.length;e--;)if(o[e]==i)return h[e];return o.push(i),h.push(c),(f?of:lf)(i,function(n,t){c[t]=bf(n,r,u,t,i,o,h)}),c}function nc(t,i,r){if(typeof t!="function")throw new ff(f);return yo(function(){t.apply(n,r)},i)}function ae(n,t){var o=n?n.length:0,r=[],e;if(!o)return r;var s=-1,u=fe(),f=u===a,i=f&&t.length>=et&&wo&&vo?new ge(t):null,h=t.length;i&&(u=no,f=!1,t=i);n:for(;++s<o;)if(i=n[s],f&&i===i){for(e=h;e--;)if(t[e]===i)continue n;r.push(i)}else 0>u(t,i,0)&&r.push(i);return r}function uy(n,t){var i=!0;return hf(n,function(n,r,u){return i=!!t(n,r,u)}),i}function fy(n,t,i,r){var u=r,f=u;return hf(n,function(n,e,o){e=+t(n,e,o);(i(e,u)||e===r&&e===f)&&(u=e,f=n)}),f}function tc(n,t){var i=[];return hf(n,function(n,r,u){t(n,r,u)&&i.push(n)}),i}function ic(n,t,i,r){var u;return i(n,function(n,i,f){if(t(n,i,f))return(u=r?i:n,!1)}),u}function gu(n,t,i,r){var e,o,f;for(r||(r=[]),e=-1,o=n.length;++e<o;)f=n[e],u(f)&&wu(f)&&(i||ct(f)||af(f))?t?gu(f,t,i,r):ce(r,f):i||(r[r.length]=f);return r}function rc(n,t){sh(n,t,wf)}function lf(n,t){return sh(n,t,ku)}function is(n,t){return wv(n,t,ku)}function rs(n,t){for(var i,r=-1,f=t.length,e=-1,u=[];++r<f;)i=t[r],gf(n[i])&&(u[++e]=i);return u}function kf(t,i,r){if(null!=t){r!==n&&r in sf(t)&&(i=[r]);r=0;for(var u=i.length;null!=t&&r<u;)t=t[i[r++]];return r&&r==u?t:n}}function io(n,t,i,r,f,e){if(n===t)n=!0;else if(null!=n&&null!=t&&(vu(n)||u(t)))n:{var a=io,l=ct(n),c=ct(t),o=k,h=k;l||(o=rf.call(n),o==b?o=s:o!=s&&(l=oe(n)));c||(h=rf.call(t),h==b?h=s:h!=s&&oe(t));var v=o==s,c=h==s,h=o==h;if(!h||l||v){if(!r&&(o=v&&pu.call(n,"__wrapped__"),c=c&&pu.call(t,"__wrapped__"),o||c)){n=a(o?n.value():n,c?t.value():t,i,r,f,e);break n}if(h){for(f||(f=[]),e||(e=[]),o=f.length;o--;)if(f[o]==n){n=e[o]==t;break n}f.push(n);e.push(t);n=(l?ay:yy)(n,t,a,i,r,f,e);f.pop();e.pop()}else n=!1}else n=vy(n,t,o)}else n=n!==n&&t!==t;return n}function uc(t,i,r){var f=i.length,s=f,h=!r,u;if(null==t)return!s;for(t=sf(t);f--;)if(u=i[f],h&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1;for(;++f<s;){var u=i[f],e=u[0],o=t[e],c=u[1];if(h&&u[2]){if(o===n&&!(e in t))return!1}else if(u=r?r(o,c,e):n,u===n?!io(c,o,r,!0):!u)return!1}return!0}function us(n,t){var r=-1,i=wu(n)?yu(n.length):[];return hf(n,function(n,u,f){i[++r]=t(n,u,f)}),i}function ve(t){var i=vl(t),r,u;return 1==i.length&&i[0][2]?(r=i[0][0],u=i[0][1],function(t){return null==t?!1:t[r]===u&&(u!==n||r in sf(t))}):function(n){return uc(n,i)}}function fc(t,i){var r=ct(t),u=df(t)&&i===i&&!vu(i),f=t+"";return t=pf(t),function(e){if(null==e)return!1;var o=f;if(e=sf(e),!(!r&&u||o in e)){if(e=1==t.length?e:kf(e,uf(t,0,-1)),null==e)return!1;o=ye(t);e=sf(e)}return e[o]===i?i!==n||o in e:io(i,e[o],n,!0)}}function ec(t,i,r,f,e){if(!vu(t))return t;var o=wu(i)&&(ct(i)||oe(i)),s=o?n:ku(i);return of(s||i,function(h,c){if(s&&(c=h,h=i[c]),u(h)){f||(f=[]);e||(e=[]);n:{for(var v=c,a=f,w=e,l=a.length,y=i[v];l--;)if(a[l]==y){t[v]=w[l];break n}var l=t[v],p=r?r(l,y,v,t,i):n,b=p===n;b&&(p=y,wu(y)&&(ct(y)||oe(y))?p=ct(l)?l:wu(l)?du(l):[]:ho(y)||af(y)?p=af(l)?ba(l):ho(l)?l:{}:b=!1);a.push(y);w.push(p);b?t[v]=ec(p,y,r,a,w):(p===p?p!==l:l===l)&&(t[v]=p)}}else v=t[c],a=r?r(v,h,c,t,i):n,(w=a===n)&&(a=h),a===n&&(!o||c in t)||!w&&(a===a?a===v:v!==v)||(t[c]=a)}),t}function fs(t){return function(i){return null==i?n:i[t]}}function ey(n){var t=n+"";return n=pf(n),function(i){return kf(i,n,t)}}function oc(n,t){for(var i,u,r=n?t.length:0;r--;)i=t[r],i!=u&&yf(i)&&(u=i,cv.call(n,i,1))}function es(n,t){return n+re(yv()*(t-n+1))}function oy(n,t,i,r,u){return u(n,function(n,u,f){i=r?(r=!1,n):t(i,n,u,f)}),i}function uf(t,i,r){var f=-1,u=t.length;for(i=null==i?0:+i||0,0>i&&(i=-i>u?0:u+i),r=r===n||r>u?u:+r||0,0>r&&(r+=u),u=i>r?0:r-i>>>0,i>>>=0,r=yu(u);++f<u;)r[f]=t[f+i];return r}function sy(n,t){var i;return hf(n,function(n,r,u){return i=t(n,r,u),!i}),!!i}function sc(n,t){var i=n.length;for(n.sort(t);i--;)n[i]=n[i].c;return n}function hc(n,t,i){var r=au(),u=-1;return t=ue(t,function(n){return r(n)}),n=us(n,function(n){return{a:ue(t,function(t){return t(n)}),b:++u,c:n}}),sc(n,function(n,t){var u;n:{for(var r=-1,f=n.a,e=t.a,o=f.length,s=i.length;++r<o;)if(u=lt(f[r],e[r])){if(r>=s)break n;r=i[r];u*="asc"===r||!0===r?1:-1;break n}u=n.b-t.b}return u})}function hy(n,t){var i=0;return hf(n,function(n,r,u){i+=+t(n,r,u)||0}),i}function os(n,t){var e=-1,o=fe(),l=n.length,s=o===a,h=s&&l>=et,i=h&&wo&&vo?new ge(void 0):null,f=[],r,u,c;i?(o=no,s=!1):(h=!1,i=t?[]:f);n:for(;++e<l;)if(r=n[e],u=t?t(r,e,n):r,s&&r===r){for(c=i.length;c--;)if(i[c]===u)continue n;t&&i.push(u);f.push(r)}else 0>o(i,u,0)&&((t||h)&&i.push(u),f.push(r));return f}function ss(n,t){for(var i=-1,r=t.length,u=yu(r);++i<r;)u[i]=n[t[i]];return u}function ro(n,t,i,r){for(var f=n.length,u=r?f:-1;(r?u--:++u<f)&&t(n[u],u,n););return i?uf(n,r?0:u,r?u+1:f):uf(n,r?u+1:0,r?f:u)}function cc(n,t){var i=n,u,f,r;for(i instanceof ki&&(i=i.value()),u=-1,f=t.length;++u<f;)r=t[u],i=r.func.apply(r.thisArg,ce([i],r.args));return i}function hs(n,t,i){var u=0,r=n?n.length:u,f,e;if(typeof t=="number"&&t===t&&r<=lp){for(;u<r;)f=u+r>>>1,e=n[f],(i?e<=t:e<t)&&null!==e?u=f+1:r=f;return r}return lc(n,t,ne,i)}function lc(t,i,r,u){i=r(i);for(var o=0,e=t?t.length:0,l=i!==i,a=null===i,v=i===n;o<e;){var s=re((o+e)/2),f=r(t[s]),c=f!==n,h=f===f;(l?h||u:a?h&&c&&(u||null!=f):v?h&&(u||c):null==f?0:u?f<=i:f<i)?o=s+1:e=s}return nf(e,cp)}function tf(t,i,r){if(typeof t!="function")return ne;if(i===n)return t;switch(r){case 1:return function(n){return t.call(i,n)};case 3:return function(n,r,u){return t.call(i,n,r,u)};case 4:return function(n,r,u,f){return t.call(i,n,r,u,f)};case 5:return function(n,r,u,f,e){return t.call(i,n,r,u,f,e)}}return function(){return t.apply(i,arguments)}}function ac(n){var t=new ip(n.byteLength);return new lv(t).set(new lv(n)),t}function vc(n,t,i){for(var e=i.length,r=-1,o=bu(n.length-e,0),u=-1,s=t.length,f=yu(s+o);++u<s;)f[u]=t[u];for(;++r<e;)f[i[r]]=n[r];for(;o--;)f[u++]=n[r++];return f}function yc(n,t,i){for(var o=-1,s=i.length,r=-1,u=bu(n.length-s,0),e=-1,h=t.length,f=yu(u+h);++r<u;)f[r]=n[r];for(u=r;++e<h;)f[u+e]=t[e];for(;++o<s;)f[u+i[o]]=n[r++];return f}function uo(n,t){return function(i,r,u){var f=t?t():{},o,e;if(r=au(r,u,3),ct(i))for(u=-1,o=i.length;++u<o;)e=i[u],n(f,e,r(e,u,i),i);else hf(i,function(t,i,u){n(f,t,r(t,i,u),u)});return f}}function pc(t){return di(function(i,r){var s=-1,u=null==i?0:r.length,f=2<u?r[u-2]:n,e=2<u?r[2]:n,o=1<u?r[u-1]:n;for(typeof f=="function"?(f=tf(f,o,5),u-=2):(f=typeof o=="function"?o:n,u-=f?1:0),e&&ei(r[0],r[1],e)&&(f=3>u?n:f,u=1);++s<u;)(e=r[s])&&t(i,e,f);return i})}function wc(n,t){return function(i,r){var f=i?be(i):0,u,e;if(!cf(f))return n(i,r);for(u=t?f:-1,e=sf(i);(t?u--:++u<f)&&!1!==r(e[u],u,e););return i}}function bc(n){return function(t,i,r){var o=sf(t),f,u,e;for(r=r(t),f=r.length,u=n?f:-1;n?u--:++u<f;)if(e=r[u],!1===i(o[e],e,o))break;return t}}function cy(n,t){function i(){return(this&&this!==h&&this instanceof i?r:n).apply(t,arguments)}var r=eo(n);return i}function fo(n){return function(t){var r=-1,u,i;for(t=tv(da(t)),u=t.length,i="";++r<u;)i=n(i,t[r],r);return i}}function eo(n){return function(){var t=arguments,i;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}return i=we(n.prototype),t=n.apply(i,t),vu(t)?t:i}}function kc(t){function i(r,u,f){return f&&ei(r,u,f)&&(u=n),r=vf(r,t,n,n,n,n,n,u),r.placeholder=i.placeholder,r}return i}function dc(t,i){return di(function(r){var u=r[0];return null==u?u:(r.push(i),t.apply(n,r))})}function gc(t,i){return function(r,u,f){var o,s;if(f&&ei(r,u,f)&&(u=n),u=au(u,f,3),1==u.length){f=r=ct(r)?r:ys(r);for(var l=u,h=-1,a=f.length,e=i,c=e;++h<a;)o=f[h],s=+l(o),t(s,e)&&(e=s,c=o);if(f=c,!r.length||f!==i)return f}return fy(r,u,t,i)}}function nl(t,i){return function(r,u,f){return u=au(u,f,3),ct(r)?(u=ii(r,u,i),-1<u?r[u]:n):ic(r,u,t)}}function tl(n){return function(t,i,r){return t&&t.length?(i=au(i,r,3),ii(t,i,n)):-1}}function il(n){return function(t,i,r){return i=au(i,r,3),ic(t,i,n,!0)}}function rl(t){return function(){for(var r,i,u=arguments.length,s=t?u:-1,h=0,l=yu(u);t?s--:++s<u;){if(r=l[h++]=arguments[s],typeof r!="function")throw new ff(f);!i&&ef.prototype.thru&&"wrapper"==oo(r)&&(i=new ef([],!0))}for(s=i?-1:u;++s<u;){var r=l[s],h=oo(r),e="wrapper"==h?hh(r):n;i=e&&vs(e[0])&&e[1]==(c|p|o|ft)&&!e[4].length&&1==e[9]?i[oo(e[0])].apply(i,e[3]):1==r.length&&vs(r)?i[h]():i.thru(r)}return function(){var n=arguments,t=n[0],r;if(i&&1==n.length&&ct(t)&&t.length>=et)return i.plant(t).value();for(r=0,n=u?l[r].apply(this,n):t;++r<u;)n=l[r].call(this,n);return n}}}function ul(t,i){return function(r,u,f){return typeof u=="function"&&f===n&&ct(r)?t(r,u):i(r,tf(u,f,3))}}function fl(t){return function(i,r,u){return(typeof r!="function"||u!==n)&&(r=tf(r,u,3)),t(i,r,wf)}}function el(t){return function(i,r,u){return(typeof r!="function"||u!==n)&&(r=tf(r,u,3)),t(i,r)}}function ol(n){return function(t,i,r){var u={};return i=au(i,r,3),lf(t,function(t,r,f){f=i(t,r,f);r=n?f:r;t=n?t:f;u[r]=t}),u}}function sl(n){return function(t,i,u){return t=r(t),(n?t:"")+ll(t,i,u)+(n?"":t)}}function hl(t){var i=di(function(r,u){var f=v(u,i.placeholder);return vf(r,t,n,u,f)});return i}function cl(t,i){return function(r,u,f,e){var o=3>arguments.length;return typeof u=="function"&&e===n&&ct(r)?t(r,u,f,o):oy(r,au(u,e,4),f,o,i)}}function cs(t,i,r,u,f,s,l,a,b,k){function g(){for(var p=arguments.length,et=p,c=yu(p);et--;)c[et]=arguments[et];if(u&&(c=vc(c,u,f)),s&&(c=yc(c,s,l)),d||ut){var et=g.placeholder,st=v(c,et),p=p-st.length;if(p<k){var ot=a?du(a):n,p=bu(k-p,0),ht=d?st:n,st=d?n:st,ct=d?c:n,c=d?n:c;return i|=d?o:w,i&=~(d?w:o),rt||(i&=~(e|y)),c=[t,i,r,ct,ht,c,st,ot,b,p],ot=cs.apply(n,c),vs(t)&&kv(ot,c),ot.placeholder=et,ot}}if(et=it?r:this,ot=nt?et[t]:t,a)for(p=c.length,ht=nf(a.length,p),st=du(c);ht--;)ct=a[ht],c[ht]=yf(ct,p)?st[ct]:n;return tt&&b<c.length&&(c.length=b),this&&this!==h&&this instanceof g&&(ot=ft||eo(t)),ot.apply(et,c)}var tt=i&c,it=i&e,nt=i&y,d=i&p,rt=i&ci,ut=i&li,ft=nt?n:eo(t);return g}function ll(n,t,i){return n=n.length,t=+t,n<t&&se(t)?(t-=n,i=null==i?" ":i+"",ga(i,po(t/i.length)).slice(0,t)):""}function ly(n,t,i,r){function u(){for(var l=-1,s=arguments.length,t=-1,c=r.length,e=yu(c+s);++t<c;)e[t]=r[t];for(;s--;)e[t++]=arguments[++l];return(this&&this!==h&&this instanceof u?o:n).apply(f?i:this,e)}var f=t&e,o=eo(n);return u}function ls(t){var i=te[t];return function(t,r){return(r=r===n?0:+r||0)?(r=up(10,r),i(t*r)/r):i(t)}}function al(n){return function(t,i,r,u){var f=au(r);return null==r&&f===to?hs(t,i,n):lc(t,i,f(r,u,1),n)}}function vf(t,i,r,u,s,h,l,a){var d=i&y,k,g,nt,b;if(!d&&typeof t!="function")throw new ff(f);return k=u?u.length:0,(k||(i&=~(o|w),u=s=n),k-=s?s.length:0,i&w)&&(g=u,nt=s,u=s=n),b=d?n:hh(t),r=[t,i,r,u,s,g,nt,h,l,a],b&&(u=r[1],i=b[1],a=u|i,s=i==c&&u==p||i==c&&u==ft&&r[7].length<=b[8]||i==(c|ft)&&u==p,(a<c||s)&&(i&e&&(r[2]=b[2],a|=u&e?0:ci),(u=b[3])&&(s=r[3],r[3]=s?vc(s,u,b[4]):du(u),r[4]=s?v(r[3],at):du(b[4])),(u=b[5])&&(s=r[5],r[5]=s?yc(s,u,b[6]):du(u),r[6]=s?v(r[5],at):du(b[6])),(u=b[7])&&(r[7]=du(u)),i&c&&(r[8]=null==r[8]?b[8]:nf(r[8],b[8])),null==r[9]&&(r[9]=b[9]),r[0]=b[0],r[1]=a),i=r[1],a=r[9]),r[9]=null==a?d?0:t.length:bu(a-k,0)||0,(b?bv:kv)(i==e?cy(r[0],r[2]):i!=o&&i!=(e|o)||r[4].length?cs.apply(n,r):ly.apply(n,r),r)}function ay(t,i,r,u,f,e,o){var c=-1,l=t.length,s=i.length;if(l!=s&&(!f||s<=l))return!1;for(;++c<l;){var h=t[c],s=i[c],a=u?u(f?s:h,f?h:s,c):n;if(a!==n){if(a)continue;return!1}if(f){if(!bh(i,function(n){return h===n||r(h,n,u,f,e,o)}))return!1}else if(h!==s&&!r(h,s,u,f,e,o))return!1}return!0}function vy(n,t,i){switch(i){case d:case g:return+n==+t;case ot:return n.name==t.name&&n.message==t.message;case nt:return n!=+n?t!=+t:n==+t;case tt:case it:return n==t+""}return!1}function yy(t,i,r,u,f,e,o){var l=ku(t),a=l.length,h=ku(i).length,s,c;if(a!=h&&!f)return!1;for(h=a;h--;)if(s=l[h],!(f?s in i:pu.call(i,s)))return!1;for(c=f;++h<a;){var s=l[h],v=t[s],y=i[s],p=u?u(f?y:v,f?v:y,s):n;if(p===n?!r(v,y,u,f,e,o):!p)return!1;c||(c="constructor"==s)}return c||(r=t.constructor,u=i.constructor,!(r!=u&&"constructor"in t&&"constructor"in i)||typeof r=="function"&&r instanceof r&&typeof u=="function"&&u instanceof u)?!0:!1}function au(n,t,i){var r=ut.callback||lo,r=r===lo?to:r;return i?r(n,t,i):r}function oo(n){for(var i,r,u=n.name+"",t=go[u],f=t?t.length:0;f--;)if(i=t[f],r=i.func,null==r||r==n)return i.name;return u}function fe(n,t,i){var r=ut.indexOf||ps,r=r===ps?a:r;return n?r(n,t,i):r}function vl(n){var t,i;for(n=ka(n),t=n.length;t--;)i=n[t][1],n[t][2]=i===i&&!vu(i);return n}function ee(t,i){var r=null==t?n:t[i];return aa(r)?r:n}function py(n){var i=n.length,t=new n.constructor(i);return i&&"string"==typeof n[0]&&pu.call(n,"index")&&(t.index=n.index,t.input=n.input),t}function wy(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=ie),new n}function by(n,t,i){var r=n.constructor,u;switch(t){case vt:return ac(n);case d:case g:return new r(+n);case yt:case pt:case wt:case bt:case kt:case dt:case gt:case ni:case ti:return t=n.buffer,new r(i?ac(t):t,n.byteOffset,n.length);case nt:case it:return new r(n);case tt:u=new r(n.source,bi.exec(n));u.lastIndex=n.lastIndex}return u}function as(t,i,r){return null==t||df(i,t)||(i=pf(i),t=1==i.length?t:kf(t,uf(i,0,-1)),i=ye(i)),i=null==t?t:t[i],null==i?n:i.apply(t,r)}function wu(n){return null!=n&&cf(be(n))}function yf(n,t){return n=typeof n=="number"||ou.test(n)?+n:-1,t=null==t?pv:t,-1<n&&0==n%1&&n<t}function ei(n,t,i){if(!vu(i))return!1;var r=typeof t;return("number"==r?wu(i)&&yf(t,i.length):"string"==r&&t in i)?(t=i[t],n===n?n===t:t!==t):!1}function df(n,t){var i=typeof n;return"string"==i&&gr.test(n)||"number"==i?!0:ct(n)?!1:!dr.test(n)||null!=t&&n in sf(t)}function vs(n){var t=oo(n),i=ut[t];return typeof i=="function"&&t in ki.prototype?n===i?!0:(t=hh(i),!!t&&n===t[0]):!1}function cf(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=pv}function yl(t,i){return t===n?i:vh(t,i,yl)}function pl(n,t){var i;n=sf(n);for(var r=-1,f=t.length,u={};++r<f;)i=t[r],i in n&&(u[i]=n[i]);return u}function wl(n,t){var i={};return rc(n,function(n,r,u){t(n,r,u)&&(i[r]=n)}),i}function bl(n){for(var t,r=wf(n),u=r.length,i=u&&n.length,o=!!i&&cf(i)&&(ct(n)||af(n)),f=-1,e=[];++f<u;)t=r[f],(o&&yf(t,i)||pu.call(n,t))&&e.push(t);return e}function ys(n){return null==n?[]:wu(n)?vu(n)?n:ie(n):co(n)}function sf(n){return vu(n)?n:ie(n)}function pf(n){if(ct(n))return n;var t=[];return r(n).replace(nu,function(n,i,r,u){t.push(r?u.replace(ru,"$1"):i||n)}),t}function kl(n){return n instanceof ki?n.clone():new ef(n.__wrapped__,n.__chain__,du(n.__actions__))}function dl(n,t,i){return n&&n.length?((i?ei(n,t,i):null==t)&&(t=1),uf(n,0>t?0:t)):[]}function gl(n,t,i){var r=n?n.length:0;return r?((i?ei(n,t,i):null==t)&&(t=1),t=r-(+t||0),uf(n,0,0>t?0:t)):[]}function na(t){return t?t[0]:n}function ps(n,t,i){var r=n?n.length:0;if(!r)return-1;if(typeof i=="number")i=0>i?bu(r+i,0):i;else if(i)return i=hs(n,t),i<r&&(t===t?t===n[i]:n[i]!==n[i])?i:-1;return a(n,t,i||0)}function ye(t){var i=t?t.length:0;return i?t[i-1]:n}function ta(n){return dl(n,1)}function ia(t,i,r,u){var h,f,o,e,s;if(!t||!t.length)return[];if(null!=i&&typeof i!="boolean"&&(u=r,r=ei(t,i,u)?n:i,i=!1),f=au(),(null!=r||f!==to)&&(r=f(r,u,3)),i&&fe()===a){for(i=r,r=-1,u=t.length,f=-1,o=[];++r<u;)e=t[r],s=i?i(e,r,t):e,r&&h===s||(h=s,o[++f]=e);t=o}else t=os(t,r);return t}function ws(n){var i,t,r;if(!n||!n.length)return[];for(i=-1,t=0,n=ns(n,function(n){if(wu(n))return(t=bu(n.length,t),!0)}),r=yu(t);++i<t;)r[i]=ue(n,fs(i));return r}function ra(t,i,r){return t&&t.length?(t=ws(t),null==i?t:(i=tf(i,r,4),ue(t,function(t){return wh(t,i,n,!0)}))):[]}function ua(n,t){var r=-1,f=n?n.length:0,u={},i;for(!f||t||ct(n[0])||(t=[]);++r<f;)i=n[r],t?u[i]=t[r]:i&&(u[i[0]]=i[1]);return u}function fa(n){return n=ut(n),n.__chain__=!0,n}function bs(n,t,i){return t.call(i,n)}function ea(t,i,r){var u=ct(t)?ph:uy;return r&&ei(t,i,r)&&(i=n),(typeof i!="function"||r!==n)&&(i=au(i,r,3)),u(t,i)}function ks(n,t,i){var r=ct(n)?ns:tc;return t=au(t,i,3),r(n,t)}function ds(n,t,i,r){var u=n?be(n):0;return cf(u)||(n=co(n),u=n.length),i=typeof i!="number"||r&&ei(t,i,r)?0:0>i?bu(u+i,0):i||0,typeof n=="string"||!ct(n)&&ih(n)?i<=u&&-1<n.indexOf(t,i):!!u&&-1<fe(n,t,i)}function gs(n,t,i){var r=ct(n)?ue:us;return t=au(t,i,3),r(n,t)}function so(t,i,r){var f,u,e;if(r?ei(t,i,r):null==i)return t=ys(t),u=t.length,0<u?t[es(0,u-1)]:n;for(r=-1,t=wa(t),u=t.length,f=u-1,i=nf(0>i?0:+i||0,u);++r<i;)u=es(r,f),e=t[u],t[u]=t[r],t[r]=e;return t.length=i,t}function oa(t,i,r){var u=ct(t)?bh:sy;return r&&ei(t,i,r)&&(i=n),(typeof i!="function"||r!==n)&&(i=au(i,r,3)),u(t,i)}function sa(t,i){var r,u;if(typeof i!="function"){if(typeof t!="function")throw new ff(f);u=t;t=i;i=u}return function(){return 0<--t&&(r=i.apply(this,arguments)),1>=t&&(i=n),r}}function ha(t,i,r){function w(i,r){r&&pe(r);e=u=p=n;i&&(l=ke(),y=t.apply(s,o),u||e||(o=s=n))}function b(){var n=i-(ke()-c);0>=n||n>i?w(p,e):u=yo(b,n)}function d(){w(h,u)}function k(){var w,f,r;return(o=arguments,c=ke(),s=this,p=h&&(u||!v),!1===a)?w=v&&!u:(e||v||(l=c),f=a-(c-l),r=0>=f||f>a,r?(e&&(e=pe(e)),l=c,y=t.apply(s,o)):e||(e=yo(d,f))),r&&u?u=pe(u):u||i===a||(u=yo(b,i)),w&&(r=!0,y=t.apply(s,o)),!r||u||e||(o=s=n),y}var o,e,y,c,s,u,p,l=0,a=!1,h=!0,v;if(typeof t!="function")throw new ff(f);return(i=0>i?0:+i||0,!0===r)?(v=!0,h=!1):vu(r)&&(v=!!r.leading,a="maxWait"in r&&bu(+r.maxWait||0,i),h="trailing"in r?!!r.trailing:h),k.cancel=function(){u&&pe(u);e&&pe(e);l=0;e=u=p=n},k}function nh(n,t){function i(){var r=arguments,u=t?t.apply(this,r):r[0],f=i.cache;return f.has(u)?f.get(u):(r=n.apply(this,r),i.cache=f.set(u,r),r)}if(typeof n!="function"||t&&typeof t!="function")throw new ff(f);return i.cache=new nh.Cache,i}function di(t,i){if(typeof t!="function")throw new ff(f);return i=bu(i===n?t.length-1:+i||0,0),function(){for(var r=arguments,n=-1,u=bu(r.length-i,0),f=yu(u);++n<u;)f[n]=r[i+n];switch(i){case 0:return t.call(this,f);case 1:return t.call(this,r[0],f);case 2:return t.call(this,r[0],r[1],f)}for(u=yu(i+1),n=-1;++n<i;)u[n]=r[n];return u[i]=f,t.apply(this,u)}}function ca(n,t){return n>t}function af(n){return u(n)&&wu(n)&&pu.call(n,"callee")&&!fp.call(n,"callee")}function la(t,i,r,u){return u=(r=typeof r=="function"?tf(r,u,3):n)?r(t,i):n,u===n?io(t,i,r):!!u}function th(n){return u(n)&&typeof n.message=="string"&&rf.call(n)==ot}function gf(n){return vu(n)&&rf.call(n)==st}function vu(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function aa(n){return null==n?!1:gf(n)?tp.test(hv.call(n)):u(n)&&eu.test(n)}function va(n){return typeof n=="number"||u(n)&&rf.call(n)==nt}function ho(t){var i,r;return!u(t)||rf.call(t)!=s||af(t)||!(pu.call(t,"constructor")||(i=t.constructor,typeof i!="function"||i instanceof i))?!1:(rc(t,function(n,t){r=t}),r===n||pu.call(t,r))}function ya(n){return vu(n)&&rf.call(n)==tt}function ih(n){return typeof n=="string"||u(n)&&rf.call(n)==it}function oe(n){return u(n)&&cf(n.length)&&!!i[rf.call(n)]}function pa(n,t){return n<t}function wa(n){var t=n?be(n):0;return cf(t)?t?du(n):[]:co(n)}function ba(n){return gh(n,wf(n))}function rh(n){return rs(n,wf(n))}function wf(n){var i;if(null==n)return[];vu(n)||(n=ie(n));for(var t=n.length,t=t&&cf(t)&&(ct(n)||af(n))&&t||0,r=n.constructor,u=-1,r=typeof r=="function"&&r.prototype===n,f=yu(t),e=0<t;++u<t;)f[u]=u+"";for(i in n)e&&yf(i,t)||"constructor"==i&&(r||!pu.call(n,i))||f.push(i);return f}function ka(n){var i;n=sf(n);for(var t=-1,r=ku(n),u=r.length,f=yu(u);++t<u;)i=r[t],f[t]=[i,n[i]];return f}function co(n){return ss(n,ku(n))}function da(n){return(n=r(n))&&n.replace(su,tr).replace(iu,"")}function ga(n,t){var i="";if(n=r(n),t=+t,1>t||!n||!se(t))return i;do t%2&&(i+=n),t=re(t/2),n+=n;while(t);return i}function nv(n,t,i){var u=n;return(n=r(n))?(i?ei(u,t,i):null==t)?n.slice(oi(n),si(n)+1):(t+="",n.slice(ri(n,t),ui(n,t)+1)):n}function tv(t,i,u){return u&&ei(t,i,u)&&(i=n),t=r(t),t.match(i||cu)||[]}function lo(t,i,r){return r&&ei(t,i,r)&&(i=n),u(t)?iv(t):to(t,i)}function ne(n){return n}function iv(n){return ve(bf(n,!0))}function uh(t,i,r){var f,u,o;null==r&&(f=vu(i),u=f?ku(i):n,((u=u&&u.length?rs(i,u):n)?u.length:f)||(u=!1,r=i,i=t,t=this));u||(u=rs(i,ku(i)));var e=!0,f=-1,s=gf(t),h=u.length;for(!1===r?e=!1:vu(r)&&("chain"in r)&&(e=r.chain);++f<h;)r=u[f],o=i[r],t[r]=o,s&&(t.prototype[r]=function(n){return function(){var r=this.__chain__,i;return e||r?(i=t(this.__wrapped__),(i.__actions__=du(this.__actions__)).push({func:n,args:arguments,thisArg:t}),i.__chain__=r,i):n.apply(t,ce([this.value()],arguments))}}(o));return t}function rv(){}function ao(n){return df(n)?fs(n):ey(n)}rt=rt?l.defaults(h.Object(),rt,l.pick(h,lu)):h;var yu=rt.Array,uv=rt.Date,ky=rt.Error,fv=rt.Function,te=rt.Math,ev=rt.Number,ie=rt.Object,fh=rt.RegExp,ov=rt.String,ff=rt.TypeError,sv=yu.prototype,eh=ie.prototype,dy=ov.prototype,hv=fv.prototype.toString,pu=eh.hasOwnProperty,gy=0,rf=eh.toString,np=h._,tp=fh("^"+hv.call(pu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ip=rt.ArrayBuffer,pe=rt.clearTimeout,rp=rt.parseFloat,up=te.pow,fp=eh.propertyIsEnumerable,vo=ee(rt,"Set"),yo=rt.setTimeout,cv=sv.splice,lv=rt.Uint8Array,av=ee(rt,"WeakMap"),po=te.ceil,wo=ee(ie,"create"),re=te.floor,ep=ee(yu,"isArray"),se=rt.isFinite,vv=ee(ie,"keys"),bu=te.max,nf=te.min,op=ee(uv,"now"),sp=rt.parseInt,yv=te.random,hp=ev.NEGATIVE_INFINITY,bo=ev.POSITIVE_INFINITY,cp=4294967294,lp=2147483647,pv=9007199254740991,ko=av&&new av,go={};ut.support={};ut.templateSettings={escape:br,evaluate:kr,interpolate:pi,variable:"",imports:{_:ut}};var we=function(){function t(){}return function(i){if(vu(i)){t.prototype=i;var r=new t;t.prototype=n}return r||{}}}(),hf=wc(lf),oh=wc(is,!0),sh=bc(),wv=bc(!0),bv=ko?function(n,t){return ko.set(n,t),n}:ne,hh=ko?function(n){return ko.get(n)}:rv,be=fs("length"),kv=function(){var n=0,t=0;return function(i,r){var u=ke(),f=cr-(u-t);if(t=u,0<f){if(++n>=hr)return i}else n=0;return bv(i,r)}}(),ap=di(function(n,t){return u(n)&&wu(n)?ae(n,gu(t,!1,!0)):[]}),vp=tl(),yp=tl(!0),pp=di(function(n){for(var t,s,h=n.length,i=h,f=yu(l),e=fe(),r=e===a,o=[];i--;)t=n[i]=wu(t=n[i])?t:[],f[i]=r&&120<=t.length&&wo&&vo?new ge(i&&t):null;var r=n[0],c=-1,l=r?r.length:0,u=f[0];n:for(;++c<l;)if(t=r[c],0>(u?no(u,t):e(o,t,0))){for(i=h;--i;)if(s=f[i],0>(s?no(s,t):e(n[i],t,0)))continue n;u&&u.push(t);o.push(t)}return o}),wp=di(function(n,t){t=gu(t);var i=dh(n,t);return oc(n,t.sort(lt)),i}),bp=al(),kp=al(!0),dp=di(function(n){return os(gu(n,!1,!0))}),gp=di(function(n,t){return wu(n)?ae(n,t):[]}),nw=di(ws),tw=di(function(t){var i=t.length,u=2<i?t[i-2]:n,r=1<i?t[i-1]:n;return 2<i&&typeof u=="function"?i-=2:(u=1<i&&typeof r=="function"?(--i,r):n,r=n),t.length=i,ra(t,u,r)}),iw=di(function(n){return n=gu(n),this.thru(function(t){t=ct(t)?t:[sf(t)];for(var u=n,i=-1,f=t.length,e=-1,o=u.length,r=yu(f+o);++i<f;)r[i]=t[i];for(;++e<o;)r[i++]=u[e];return r})}),rw=di(function(n,t){return dh(n,gu(t))}),uw=uo(function(n,t,i){pu.call(n,i)?++n[i]:n[i]=1}),ch=nl(hf),fw=nl(oh,!0),dv=ul(of,hf),gv=ul(function(n,t){for(var i=n.length;i--&&!1!==t(n[i],i,n););return n},oh),ew=uo(function(n,t,i){pu.call(n,i)?n[i].push(t):n[i]=[t]}),ow=uo(function(n,t,i){n[i]=t}),sw=di(function(t,i,r){var f=-1,e=typeof i=="function",o=df(i),u=wu(t)?yu(t.length):[];return hf(t,function(t){var s=e?i:o&&null!=t?t[i]:n;u[++f]=s?s.apply(t,r):as(t,i,r)}),u}),hw=uo(function(n,t,i){n[i?0:1].push(t)},function(){return[[],[]]}),lh=cl(wh,hf),ny=cl(function(n,t,i,r){var u=n.length;for(r&&u&&(i=n[--u]);u--;)i=t(i,n[u],u,n);return i},oh),cw=di(function(n,t){if(null==n)return[];var i=t[2];return i&&ei(t[0],t[1],i)&&(t.length=1),hc(n,gu(t),[])}),ke=op||function(){return(new uv).getTime()},ty=di(function(n,t,i){var r=e,u;return i.length&&(u=v(i,ty.placeholder),r=r|o),vf(n,r,t,i,u)}),lw=di(function(n,t){var i,u,r;for(t=t.length?gu(t):rh(n),i=-1,u=t.length;++i<u;)r=t[i],n[r]=vf(n[r],e,n);return n}),iy=di(function(n,t,i){var r=e|y,u;return i.length&&(u=v(i,iy.placeholder),r=r|o),vf(t,r,n,i,u)}),aw=kc(p),vw=kc(li),yw=di(function(n,t){return nc(n,1,t)}),pw=di(function(n,t,i){return nc(n,t,i)}),ww=rl(),ah=rl(!0),bw=di(function(n,t){if(t=gu(t),typeof n!="function"||!ph(t,gi))throw new ff(f);var i=t.length;return di(function(r){for(var u=nf(r.length,i);u--;)r[u]=t[u](r[u]);return n.apply(this,r)})}),kw=hl(o),dw=hl(w),gw=di(function(t,i){return vf(t,ft,n,n,n,gu(i))}),ct=ep||function(n){return u(n)&&cf(n.length)&&rf.call(n)==k},vh=pc(ec),yh=pc(function(n,t,i){return i?ts(n,t,i):le(n,t)}),nb=dc(yh,function(t,i){return t===n?i:t}),tb=dc(vh,yl),ib=il(lf),rb=il(is),ub=fl(sh),fb=fl(wv),eb=el(lf),ob=el(is),ku=vv?function(t){var i=null==t?n:t.constructor;return typeof i=="function"&&i.prototype===t||typeof t!="function"&&wu(t)?bl(t):vu(t)?vv(t):[]}:bl,sb=ol(!0),hb=ol(),cb=di(function(n,t){if(null==n)return{};if("function"!=typeof t[0])return t=ue(gu(t),ov),pl(n,ae(wf(n),t));var i=tf(t[0],t[1],3);return wl(n,function(n,t,r){return!i(n,t,r)})}),lb=di(function(n,t){return null==n?{}:"function"==typeof t[0]?wl(n,tf(t[0],t[1],3)):pl(n,gu(t))}),ab=fo(function(n,t,i){return t=t.toLowerCase(),n+(i?t.charAt(0).toUpperCase()+t.slice(1):t)}),vb=fo(function(n,t,i){return n+(i?"-":"")+t.toLowerCase()}),yb=sl(),pb=sl(!0),wb=fo(function(n,t,i){return n+(i?"_":"")+t.toLowerCase()}),bb=fo(function(n,t,i){return n+(i?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),ry=di(function(t,i){try{return t.apply(n,i)}catch(r){return th(r)?r:new ky(r)}}),kb=di(function(n,t){return function(i){return as(i,n,t)}}),db=di(function(n,t){return function(i){return as(n,i,t)}}),gb=ls("ceil"),nk=ls("floor"),tk=gc(ca,hp),ik=gc(pa,bo),rk=ls("round");return ut.prototype=de.prototype,ef.prototype=we(de.prototype),ef.prototype.constructor=ef,ki.prototype=we(de.prototype),ki.prototype.constructor=ki,he.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n]},he.prototype.get=function(t){return"__proto__"==t?n:this.__data__[t]},he.prototype.has=function(n){return"__proto__"!=n&&pu.call(this.__data__,n)},he.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},ge.prototype.push=function(n){var t=this.data;typeof n=="string"||vu(n)?t.set.add(n):t.hash[n]=!0},nh.Cache=he,ut.after=function(n,t){if(typeof t!="function"){if(typeof n!="function")throw new ff(f);var i=n;n=t;t=i}return n=se(n=+n)?n:0,function(){if(1>--n)return t.apply(this,arguments)}},ut.ary=function(t,i,r){return r&&ei(t,i,r)&&(i=n),i=t&&null==i?t.length:bu(+i||0,0),vf(t,c,n,n,n,n,i)},ut.assign=yh,ut.at=rw,ut.before=sa,ut.bind=ty,ut.bindAll=lw,ut.bindKey=iy,ut.callback=lo,ut.chain=fa,ut.chunk=function(n,t,i){t=(i?ei(n,t,i):null==t)?1:bu(re(t)||1,1);i=0;for(var r=n?n.length:0,f=-1,u=yu(po(r/t));i<r;)u[++f]=uf(n,i,i+=t);return u},ut.compact=function(n){for(var t,i=-1,u=n?n.length:0,f=-1,r=[];++i<u;)t=n[i],t&&(r[++f]=t);return r},ut.constant=function(n){return function(){return n}},ut.countBy=uw,ut.create=function(t,i,r){var u=we(t);return r&&ei(t,i,r)&&(i=n),i?le(u,i):u},ut.curry=aw,ut.curryRight=vw,ut.debounce=ha,ut.defaults=nb,ut.defaultsDeep=tb,ut.defer=yw,ut.delay=pw,ut.difference=ap,ut.drop=dl,ut.dropRight=gl,ut.dropRightWhile=function(n,t,i){return n&&n.length?ro(n,au(t,i,3),!0,!0):[]},ut.dropWhile=function(n,t,i){return n&&n.length?ro(n,au(t,i,3),!0):[]},ut.fill=function(t,i,r,u){var f=t?t.length:0;if(!f)return[];for(r&&typeof r!="number"&&ei(t,i,r)&&(r=0,u=f),f=t.length,r=null==r?0:+r||0,0>r&&(r=-r>f?0:f+r),u=u===n||u>f?f:+u||0,0>u&&(u+=f),f=r>u?0:u>>>0,r>>>=0;r<f;)t[r++]=i;return t},ut.filter=ks,ut.flatten=function(n,t,i){var r=n?n.length:0;return i&&ei(n,t,i)&&(t=!1),r?gu(n,t):[]},ut.flattenDeep=function(n){return n&&n.length?gu(n,!0):[]},ut.flow=ww,ut.flowRight=ah,ut.forEach=dv,ut.forEachRight=gv,ut.forIn=ub,ut.forInRight=fb,ut.forOwn=eb,ut.forOwnRight=ob,ut.functions=rh,ut.groupBy=ew,ut.indexBy=ow,ut.initial=function(n){return gl(n,1)},ut.intersection=pp,ut.invert=function(t,i,r){var f,e;r&&ei(t,i,r)&&(i=n);r=-1;for(var o=ku(t),s=o.length,u={};++r<s;)f=o[r],e=t[f],i?pu.call(u,e)?u[e].push(f):u[e]=[f]:u[e]=f;return u},ut.invoke=sw,ut.keys=ku,ut.keysIn=wf,ut.map=gs,ut.mapKeys=sb,ut.mapValues=hb,ut.matches=iv,ut.matchesProperty=function(n,t){return fc(n,bf(t,!0))},ut.memoize=nh,ut.merge=vh,ut.method=kb,ut.methodOf=db,ut.mixin=uh,ut.modArgs=bw,ut.negate=function(n){if(typeof n!="function")throw new ff(f);return function(){return!n.apply(this,arguments)}},ut.omit=cb,ut.once=function(n){return sa(2,n)},ut.pairs=ka,ut.partial=kw,ut.partialRight=dw,ut.partition=hw,ut.pick=lb,ut.pluck=function(n,t){return gs(n,ao(t))},ut.property=ao,ut.propertyOf=function(n){return function(t){return kf(n,pf(t),t+"")}},ut.pull=function(){var i=arguments,n=i[0],t,u;if(!n||!n.length)return n;for(var r=0,f=fe(),e=i.length;++r<e;)for(t=0,u=i[r];-1<(t=f(n,u,t));)cv.call(n,t,1);return n},ut.pullAt=wp,ut.range=function(t,i,r){var u,f;for(r&&ei(t,i,r)&&(i=r=n),t=+t||0,r=null==r?1:+r||0,null==i?(i=t,t=0):i=+i||0,u=-1,i=bu(po((i-t)/(r||1)),0),f=yu(i);++u<i;)f[u]=t,t+=r;return f},ut.rearg=gw,ut.reject=function(n,t,i){var r=ct(n)?ns:tc;return t=au(t,i,3),r(n,function(n,i,r){return!t(n,i,r)})},ut.remove=function(n,t,i){var u=[];if(!n||!n.length)return u;var r=-1,f=[],e=n.length;for(t=au(t,i,3);++r<e;)i=n[r],t(i,r,n)&&(u.push(i),f.push(r));return oc(n,f),u},ut.rest=ta,ut.restParam=di,ut.set=function(n,t,i){var r,f;if(null==n)return n;r=t+"";t=null!=n[r]||df(t,n)?[r]:pf(t);for(var r=-1,e=t.length,o=e-1,u=n;null!=u&&++r<e;)f=t[r],vu(u)&&(r==o?u[f]=i:null==u[f]&&(u[f]=yf(t[r+1])?[]:{})),u=u[f];return n},ut.shuffle=function(n){return so(n,bo)},ut.slice=function(n,t,i){var r=n?n.length:0;return r?(i&&typeof i!="number"&&ei(n,t,i)&&(t=0,i=r),uf(n,t,i)):[]},ut.sortBy=function(t,i,r){if(null==t)return[];r&&ei(t,i,r)&&(i=n);var u=-1;return i=au(i,r,3),t=us(t,function(n,t,r){return{a:i(n,t,r),b:++u,c:n}}),sc(t,nr)},ut.sortByAll=cw,ut.sortByOrder=function(t,i,r,u){return null==t?[]:(u&&ei(i,r,u)&&(r=n),ct(i)||(i=null==i?[]:[i]),ct(r)||(r=null==r?[]:[r]),hc(t,i,r))},ut.spread=function(n){if(typeof n!="function")throw new ff(f);return function(t){return n.apply(this,t)}},ut.take=function(n,t,i){return n&&n.length?((i?ei(n,t,i):null==t)&&(t=1),uf(n,0,0>t?0:t)):[]},ut.takeRight=function(n,t,i){var r=n?n.length:0;return r?((i?ei(n,t,i):null==t)&&(t=1),t=r-(+t||0),uf(n,0>t?0:t)):[]},ut.takeRightWhile=function(n,t,i){return n&&n.length?ro(n,au(t,i,3),!1,!0):[]},ut.takeWhile=function(n,t,i){return n&&n.length?ro(n,au(t,i,3)):[]},ut.tap=function(n,t,i){return t.call(i,n),n},ut.throttle=function(n,t,i){var r=!0,u=!0;if(typeof n!="function")throw new ff(f);return!1===i?r=!1:vu(i)&&(r="leading"in i?!!i.leading:r,u="trailing"in i?!!i.trailing:u),ha(n,t,{leading:r,maxWait:+t,trailing:u})},ut.thru=bs,ut.times=function(n,t,i){if(n=re(n),1>n||!se(n))return[];var r=-1,u=yu(nf(n,4294967295));for(t=tf(t,i,1);++r<n;)4294967295>r?u[r]=t(r):t(r);return u},ut.toArray=wa,ut.toPlainObject=ba,ut.transform=function(t,i,r,u){var f=ct(t)||oe(t);return i=au(i,u,4),null==r&&(f||vu(t)?(u=t.constructor,r=f?ct(t)?new u:[]:we(gf(u)?u.prototype:n)):r={}),(f?of:lf)(t,function(n,t,u){return i(r,n,t,u)}),r},ut.union=dp,ut.uniq=ia,ut.unzip=ws,ut.unzipWith=ra,ut.values=co,ut.valuesIn=function(n){return ss(n,wf(n))},ut.where=function(n,t){return ks(n,ve(t))},ut.without=gp,ut.wrap=function(t,i){return i=null==i?ne:i,vf(i,o,n,[t],[])},ut.xor=function(){for(var t,n,i=-1,r=arguments.length;++i<r;)t=arguments[i],wu(t)&&(n=n?ce(ae(n,t),ae(t,n)):t);return n?os(n):[]},ut.zip=nw,ut.zipObject=ua,ut.zipWith=tw,ut.backflow=ah,ut.collect=gs,ut.compose=ah,ut.each=dv,ut.eachRight=gv,ut.extend=yh,ut.iteratee=lo,ut.methods=rh,ut.object=ua,ut.select=ks,ut.tail=ta,ut.unique=ia,uh(ut,ut),ut.add=function(n,t){return(+n||0)+(+t||0)},ut.attempt=ry,ut.camelCase=ab,ut.capitalize=function(n){return(n=r(n))&&n.charAt(0).toUpperCase()+n.slice(1)},ut.ceil=gb,ut.clone=function(n,t,i,r){return t&&typeof t!="boolean"&&ei(n,t,i)?t=!1:typeof t=="function"&&(r=i,i=t,t=!1),typeof i=="function"?bf(n,t,tf(i,r,3)):bf(n,t)},ut.cloneDeep=function(n,t,i){return typeof t=="function"?bf(n,!0,tf(t,i,3)):bf(n,!0)},ut.deburr=da,ut.endsWith=function(t,i,u){t=r(t);i+="";var f=t.length;return u=u===n?f:nf(0>u?0:+u||0,f),u-=i.length,0<=u&&t.indexOf(i,u)==u},ut.escape=function(n){return(n=r(n))&&wr.test(n)?n.replace(yi,ir):n},ut.escapeRegExp=function(n){return(n=r(n))&&tu.test(n)?n.replace(wi,rr):n||"(?:)"},ut.every=ea,ut.find=ch,ut.findIndex=vp,ut.findKey=ib,ut.findLast=fw,ut.findLastIndex=yp,ut.findLastKey=rb,ut.findWhere=function(n,t){return ch(n,ve(t))},ut.first=na,ut.floor=nk,ut.get=function(t,i,r){return t=null==t?n:kf(t,pf(i),i+""),t===n?r:t},ut.gt=ca,ut.gte=function(n,t){return n>=t},ut.has=function(n,t){if(null==n)return!1;var i=pu.call(n,t);if(!i&&!df(t)){if(t=pf(t),n=1==t.length?n:kf(n,uf(t,0,-1)),null==n)return!1;t=ye(t);i=pu.call(n,t)}return i||cf(n.length)&&yf(t,n.length)&&(ct(n)||af(n))},ut.identity=ne,ut.includes=ds,ut.indexOf=ps,ut.inRange=function(t,i,r){return i=+i||0,r===n?(r=i,i=0):r=+r||0,t>=nf(i,r)&&t<bu(i,r)},ut.isArguments=af,ut.isArray=ct,ut.isBoolean=function(n){return!0===n||!1===n||u(n)&&rf.call(n)==d},ut.isDate=function(n){return u(n)&&rf.call(n)==g},ut.isElement=function(n){return!!n&&1===n.nodeType&&u(n)&&!ho(n)},ut.isEmpty=function(n){return null==n?!0:wu(n)&&(ct(n)||ih(n)||af(n)||u(n)&&gf(n.splice))?!n.length:!ku(n).length},ut.isEqual=la,ut.isError=th,ut.isFinite=function(n){return typeof n=="number"&&se(n)},ut.isFunction=gf,ut.isMatch=function(t,i,r,u){return r=typeof r=="function"?tf(r,u,3):n,uc(t,vl(i),r)},ut.isNaN=function(n){return va(n)&&n!=+n},ut.isNative=aa,ut.isNull=function(n){return null===n},ut.isNumber=va,ut.isObject=vu,ut.isPlainObject=ho,ut.isRegExp=ya,ut.isString=ih,ut.isTypedArray=oe,ut.isUndefined=function(t){return t===n},ut.kebabCase=vb,ut.last=ye,ut.lastIndexOf=function(n,t,i){var u=n?n.length:0,r;if(!u)return-1;if(r=u,typeof i=="number")r=(0>i?bu(u+i,0):nf(i||0,u-1))+1;else if(i)return r=hs(n,t,!0)-1,n=n[r],(t===t?t===n:n!==n)?r:-1;if(t!==t)return fi(n,r,!0);for(;r--;)if(n[r]===t)return r;return-1},ut.lt=pa,ut.lte=function(n,t){return n<=t},ut.max=tk,ut.min=ik,ut.noConflict=function(){return h._=np,this},ut.noop=rv,ut.now=ke,ut.pad=function(n,t,i){n=r(n);t=+t;var u=n.length;return u<t&&se(t)?(u=(t-u)/2,t=re(u),u=po(u),i=ll("",u,i),i.slice(0,t)+n+i):n},ut.padLeft=yb,ut.padRight=pb,ut.parseInt=function(n,t,i){return(i?ei(n,t,i):null==t)?t=0:t&&(t=+t),n=nv(n),sp(n,t||(fu.test(n)?16:10))},ut.random=function(t,i,r){r&&ei(t,i,r)&&(i=r=n);var f=null==t,u=null==i;return null==r&&(u&&typeof t=="boolean"?(r=t,t=1):typeof i=="boolean"&&(r=i,u=!0)),f&&u&&(i=1,u=!1),t=+t||0,u?(i=t,t=0):i=+i||0,r||t%1||i%1?(r=yv(),nf(t+r*(i-t+rp("1e-"+((r+"").length-1))),i)):es(t,i)},ut.reduce=lh,ut.reduceRight=ny,ut.repeat=ga,ut.result=function(t,i,r){var u=null==t?n:t[i];return u===n&&(null==t||df(i,t)||(i=pf(i),t=1==i.length?t:kf(t,uf(i,0,-1)),u=null==t?n:t[ye(i)]),u=u===n?r:u),gf(u)?u.call(t):u},ut.round=rk,ut.runInContext=hi,ut.size=function(n){var t=n?be(n):0;return cf(t)?t:ku(n).length},ut.snakeCase=wb,ut.some=oa,ut.sortedIndex=bp,ut.sortedLastIndex=kp,ut.startCase=bb,ut.startsWith=function(n,t,i){return n=r(n),i=null==i?0:nf(0>i?0:+i||0,n.length),n.lastIndexOf(t,i)==i},ut.sum=function(t,i,r){if(r&&ei(t,i,r)&&(i=n),i=au(i,r,3),1==i.length){t=ct(t)?t:ys(t);r=t.length;for(var u=0;r--;)u+=+i(t[r])||0;t=u}else t=hy(t,i);return t},ut.template=function(t,i,u){var o=ut.templateSettings,f,l;u&&ei(t,i,u)&&(i=u=n);t=r(t);i=ts(le({},u||i),o,kh);u=ts(le({},i.imports),o.imports,kh);var s,e,h=ku(u),a=ss(u,h),c=0;if(u=i.interpolate||ht,f="__p+='",u=fh((i.escape||ht).source+"|"+u.source+"|"+(u===pi?uu:ht).source+"|"+(i.evaluate||ht).source+"|$","g"),l="sourceURL"in i?"//# sourceURL="+i.sourceURL+"\n":"",t.replace(u,function(n,i,r,u,o,h){return r||(r=u),f+=t.slice(c,h).replace(hu,ur),i&&(s=!0,f+="'+__e("+i+")+'"),o&&(e=!0,f+="';"+o+";\n__p+='"),r&&(f+="'+((__t=("+r+"))==null?'':__t)+'"),c=h+n.length,n}),f+="';",(i=i.variable)||(f="with(obj){"+f+"}"),f=(e?f.replace(ar,""):f).replace(vr,"$1").replace(yr,"$1;"),f="function("+(i||"obj")+"){"+(i?"":"obj||(obj={});")+"var __t,__p=''"+(s?",__e=_.escape":"")+(e?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}",i=ry(function(){return fv(h,l+"return "+f).apply(n,a)}),i.source=f,th(i))throw i;return i},ut.trim=nv,ut.trimLeft=function(n,t,i){var u=n;return(n=r(n))?n.slice((i?ei(u,t,i):null==t)?oi(n):ri(n,t+"")):n},ut.trimRight=function(n,t,i){var u=n;return(n=r(n))?(i?ei(u,t,i):null==t)?n.slice(0,si(n)+1):n.slice(0,ui(n,t+"")+1):n},ut.trunc=function(t,i,u){var f,e,o,s;if(u&&ei(t,i,u)&&(i=n),e=or,(u=sr,null!=i)&&(vu(i)?(f="separator"in i?i.separator:f,e="length"in i?+i.length||0:e,u="omission"in i?r(i.omission):u):e=+i||0),t=r(t),e>=t.length)return t;if(e-=u.length,1>e)return u;if(i=t.slice(0,e),null==f)return i+u;if(ya(f)){if(t.slice(e).search(f)){for(s=t.slice(0,e),f.global||(f=fh(f.source,(bi.exec(f)||"")+"g")),f.lastIndex=0;t=f.exec(s);)o=t.index;i=i.slice(0,null==o?e:o)}}else t.indexOf(f,e)!=e&&(f=i.lastIndexOf(f),-1<f&&(i=i.slice(0,f)));return i+u},ut.unescape=function(n){return(n=r(n))&&pr.test(n)?n.replace(vi,fr):n},ut.uniqueId=function(n){var t=++gy;return r(n)+t},ut.words=tv,ut.all=ea,ut.any=oa,ut.contains=ds,ut.eq=la,ut.detect=ch,ut.foldl=lh,ut.foldr=ny,ut.head=na,ut.include=ds,ut.inject=lh,uh(ut,function(){var n={};return lf(ut,function(t,i){ut.prototype[i]||(n[i]=t)}),n}(),!1),ut.sample=so,ut.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return so(t,n)}):so(this.value())},ut.VERSION=er,of("bind bindKey curry curryRight partial partialRight".split(" "),function(n){ut[n].placeholder=ut}),of(["drop","take"],function(n,t){ki.prototype[n]=function(i){var u=this.__filtered__,r;return u&&!t?new ki(this):(i=null==i?1:bu(re(i)||0,0),r=this.clone(),u?r.__takeCount__=nf(r.__takeCount__,i):r.__views__.push({size:i,type:n+(0>r.__dir__?"Right":"")}),r)};ki.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),of(["filter","map","takeWhile"],function(n,t){var i=t+1,r=i!=ai;ki.prototype[n]=function(n,t){var u=this.clone();return u.__iteratees__.push({iteratee:au(n,t,1),type:i}),u.__filtered__=u.__filtered__||r,u}}),of(["first","last"],function(n,t){var i="take"+(t?"Right":"");ki.prototype[n]=function(){return this[i](1).value()[0]}}),of(["initial","rest"],function(n,t){var i="drop"+(t?"":"Right");ki.prototype[n]=function(){return this.__filtered__?new ki(this):this[i](1)}}),of(["pluck","where"],function(n,t){var i=t?"filter":"map",r=t?ve:ao;ki.prototype[n]=function(n){return this[i](r(n))}}),ki.prototype.compact=function(){return this.filter(ne)},ki.prototype.reject=function(n,t){return n=au(n,t,1),this.filter(function(t){return!n(t)})},ki.prototype.slice=function(t,i){t=null==t?0:+t||0;var r=this;return r.__filtered__&&(0<t||0>i)?new ki(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),i!==n&&(i=+i||0,r=0>i?r.dropRight(-i):r.take(i-t)),r)},ki.prototype.takeRightWhile=function(n,t){return this.reverse().takeWhile(n,t).reverse()},ki.prototype.toArray=function(){return this.take(bo)},lf(ki.prototype,function(t,i){var f=/^(?:filter|map|reject)|While$/.test(i),r=/^(?:first|last)$/.test(i),u=ut[r?"take"+("last"==i?"Right":""):i];u&&(ut.prototype[i]=function(){function a(t){return r&&h?u(t,1)[0]:u.apply(n,ce([t],s))}var s=r?[1]:arguments,h=this.__chain__,i=this.__wrapped__,o=!!this.__actions__.length,c=i instanceof ki,e=s[0],l=c||ct(i);return l&&f&&typeof e=="function"&&1!=e.length&&(c=l=!1),e={func:bs,args:[a],thisArg:n},o=c&&!o,r&&!h?o?(i=i.clone(),i.__actions__.push(e),t.call(i)):u.call(n,this.value())[0]:!r&&l?(i=o?i:new ki(this),i=t.apply(i,s),i.__actions__.push(e),new ef(i,h)):this.thru(a)})}),of("join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?dy:sv)[n],i=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:join|pop|replace|shift)$/.test(n);ut.prototype[n]=function(){var n=arguments;return r&&!this.__chain__?t.apply(this.value(),n):this[i](function(i){return t.apply(i,n)})}}),lf(ki.prototype,function(n,t){var i=ut[t],r;i&&(r=i.name+"",(go[r]||(go[r]=[])).push({name:t,func:i}))}),go[cs(n,y).name]=[{name:"wrapper",func:n}],ki.prototype.clone=function(){var n=new ki(this.__wrapped__);return n.__actions__=du(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=du(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=du(this.__views__),n},ki.prototype.reverse=function(){if(this.__filtered__){var n=new ki(this);n.__dir__=-1;n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n},ki.prototype.value=function(){var n,h=this.__wrapped__.value(),a=this.__dir__,e=ct(h),c=0>a,f=e?h.length:0,u,r;n=f;for(var i=this.__views__,t=0,o=-1,l=i.length;++o<l;){u=i[o];r=u.size;switch(u.type){case"drop":t+=r;break;case"dropRight":n-=r;break;case"take":n=nf(n,t+r);break;case"takeRight":t=bu(t,n-r)}}if(n={start:t,end:n},i=n.start,t=n.end,n=t-i,c=c?t:i-1,i=this.__iteratees__,t=i.length,o=0,l=nf(n,this.__takeCount__),!e||f<et||f==n&&l==n)return cc(h,this.__actions__);e=[];n:for(;n--&&o<l;){for(c+=a,f=-1,u=h[c];++f<t;){var s=i[f],r=s.type,s=s.iteratee(u);if(r==ai)u=s;else if(!s){if(r==lr)continue n;break n}}e[o++]=u}return e},ut.prototype.chain=function(){return fa(this)},ut.prototype.commit=function(){return new ef(this.value(),this.__chain__)},ut.prototype.concat=iw,ut.prototype.plant=function(n){for(var r,i,u,t=this;t instanceof de;)i=kl(t),r?u.__wrapped__=i:r=i,u=i,t=t.__wrapped__;return u.__wrapped__=n,r},ut.prototype.reverse=function(){function i(n){return n.reverse()}var t=this.__wrapped__;return t instanceof ki?(this.__actions__.length&&(t=new ki(this)),t=t.reverse(),t.__actions__.push({func:bs,args:[i],thisArg:n}),new ef(t,this.__chain__)):this.thru(i)},ut.prototype.toString=function(){return this.value()+""},ut.prototype.run=ut.prototype.toJSON=ut.prototype.valueOf=ut.prototype.value=function(){return cc(this.__wrapped__,this.__actions__)},ut.prototype.collect=ut.prototype.map,ut.prototype.head=ut.prototype.first,ut.prototype.select=ut.prototype.filter,ut.prototype.tail=ut.prototype.rest,ut}var n,er="3.10.1",e=1,y=2,ci=4,p=8,li=16,o=32,w=64,c=128,ft=256,or=30,sr="...",hr=150,cr=16,et=200,lr=1,ai=2,f="Expected a function",at="__lodash_placeholder__",b="[object Arguments]",k="[object Array]",d="[object Boolean]",g="[object Date]",ot="[object Error]",st="[object Function]",nt="[object Number]",s="[object Object]",tt="[object RegExp]",it="[object String]",vt="[object ArrayBuffer]",yt="[object Float32Array]",pt="[object Float64Array]",wt="[object Int8Array]",bt="[object Int16Array]",kt="[object Int32Array]",dt="[object Uint8Array]",gt="[object Uint8ClampedArray]",ni="[object Uint16Array]",ti="[object Uint32Array]",ar=/\b__p\+='';/g,vr=/\b(__p\+=)''\+/g,yr=/(__e\(.*?\)|\b__t\))\+'';/g,vi=/&(?:amp|lt|gt|quot|#39|#96);/g,yi=/[&<>"'`]/g,pr=RegExp(vi.source),wr=RegExp(yi.source),br=/<%-([\s\S]+?)%>/g,kr=/<%([\s\S]+?)%>/g,pi=/<%=([\s\S]+?)%>/g,dr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,gr=/^\w*$/,nu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,wi=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,tu=RegExp(wi.source),iu=/[\u0300-\u036f\ufe20-\ufe23]/g,ru=/\\(\\)?/g,uu=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,bi=/\w*$/,fu=/^0[xX]/,eu=/^\[object .+?Constructor\]$/,ou=/^\d+$/,su=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,ht=/($^)/,hu=/['\n\r\u2028\u2029\\]/g,cu=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),lu="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout isFinite parseFloat parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap".split(" "),i={},t;i[yt]=i[pt]=i[wt]=i[bt]=i[kt]=i[dt]=i[gt]=i[ni]=i[ti]=!0;i[b]=i[k]=i[vt]=i[d]=i[g]=i[ot]=i[st]=i["[object Map]"]=i[nt]=i[s]=i[tt]=i["[object Set]"]=i[it]=i["[object WeakMap]"]=!1;t={};t[b]=t[k]=t[vt]=t[d]=t[g]=t[yt]=t[pt]=t[wt]=t[bt]=t[kt]=t[nt]=t[s]=t[tt]=t[it]=t[dt]=t[gt]=t[ni]=t[ti]=!0;t[ot]=t[st]=t["[object Map]"]=t["[object Set]"]=t["[object WeakMap]"]=!1;var au={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},vu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},yu={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},ct={"function":!0,object:!0},pu={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},ki={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rt=ct[typeof exports]&&exports&&!exports.nodeType&&exports,ut=ct[typeof module]&&module&&!module.nodeType&&module,wu=ct[typeof self]&&self&&self.Object&&self,di=ct[typeof window]&&window&&window.Object&&window,bu=ut&&ut.exports===rt&&rt,h=rt&&ut&&typeof global=="object"&&global&&global.Object&&global||di!==(this&&this.window)&&di||wu||this,l=hi();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(h._=l,define(function(){return l})):rt&&ut?bu?(ut.exports=l)._=l:rt._=l:h._=l}.call(this);bmwApp.factory("DLOFactory",["$http","$q","API_URL",function(n,t,i){var l=[],a=[],r=[],v=[],w=[],y=[],p=[],b=t.defer(),u=t.defer(),f=t.defer(),e=t.defer(),o=t.defer(),s=t.defer(),h=t.defer(),c=t.defer();return{getDealerByPostcode:function(t,i){return n.get("/Websites/GetDealerByPostcode?pmaType="+t+"&postcode="+i).then(function(n){return n.data},function(n){return b.reject(n),b.promise})},getStates:function(){return n.get("/App/json/states.json").then(function(n){return u.resolve(n.data),l.push(n.data),u.promise},function(n){return u.reject(n),u.promise})},getStateList:function(){return l},setStateList:function(n){l=n},getDealers:function(){return n.get(i+"brandCompanies/1/jsonCache/5").then(function(n){var t=JSON.parse(n.data.json);return f.resolve(t),a.push(t),f.promise},function(n){return f.reject(n),f.promise})},getDealerList:function(){return a},setDealerList:function(n){a=n},getAddressTypes:function(){return n.get(i+"brandCompanies/1/jsonCache/9").then(function(n){var t=JSON.parse(n.data.json);return e.resolve(t),r.push(t),e.promise},function(n){return e.reject(n),e.promise})},getAddressTypeList:function(){return r},setAddressTypeList:function(n){r=n},getAddressTypeDealers:function(){return n.get(i+"brandCompanies/1/jsonCache/10").then(function(n){var t=JSON.parse(n.data.json);return o.resolve(t),v.push(t),o.promise},function(n){return o.reject(n),o.promise})},getAddressTypeDealerList:function(){return v},setAddressTypeDealerList:function(n){v=n},getEmailAddresses:function(){return n.get(i+"brandCompanies/1/jsonCache/11").then(function(n){var t=JSON.parse(n.data.json);return s.resolve(t),r.push(t),s.promise},function(n){return s.reject(n),s.promise})},getEmailAddressList:function(){return w},setEmailAddressList:function(n){w=n},getPhoneNumbers:function(){return n.get(i+"brandCompanies/1/jsonCache/6").then(function(n){var t=JSON.parse(n.data.json);return h.resolve(t),y.push(t),h.promise},function(n){return h.reject(n),h.promise})},getPhoneList:function(){return y},setPhoneList:function(n){y=n},getOpenHours:function(){return n.get(i+"brandCompanies/1/jsonCache/7").then(function(n){var t=JSON.parse(n.data.json);return c.resolve(t),p.push(t),c.promise},function(n){return c.reject(n),c.promise})},getOpenHoursList:function(){return p},setOpenHoursList:function(n){p=n},getSuburbOrDealerByText:function(i){var r=t.defer();return n.get("/Websites/GetSuburbByText?txt="+i).then(function(n){return r.resolve(n.data),r.promise},function(n){return r.reject(n),r.promise})}}}]);bmwApp.controller("DLOController",["$anchorScroll","$location","$scope","$q","$routeParams","$timeout","uiGmapGoogleMapApi","uiGmapIsReady","DLOFactory","distanceService",function(n,t,r,u,f,e,o,s,h,c){function w(){h.getStates().then(function(n){r.states=n},function(){})}function b(){h.getDealers().then(function(n){r.dealers=n;p(r.dealers);angular.forEach(n,function(n){var t=!1,i;angular.forEach(r.dealerNames,function(i){t==!1&&i.display==n.website_trading_name&&n.category_type_id==r.categoryType&&(t=!0)});t==!1&&n.category_type_id==r.categoryType&&(i={value:n.website_trading_name.toLowerCase(),display:n.website_trading_name},r.dealerNames.push(i))})},function(){})}function k(n){var t=angular.lowercase(n);return function(n){return n.value.indexOf(t)>-1}}function a(n,t){h.getDealerByPostcode(n,t).then(function(n){r.postcodeDealerIdsBMW=[];r.postcodeDealerIdsBMW=n;n.length==0&&(r.map={center:{latitude:-26.863281,longitude:134.34082},zoom:5,control:{}})},function(){})}function v(n,t){h.getDealerByPostcode(n,t).then(function(n){r.postcodeDealerIdsBMWi=[];r.postcodeDealerIdsBMWi=n;n.length==0&&(r.map={center:{latitude:-26.863281,longitude:134.34082},zoom:5,control:{}})},function(){})}function d(){h.getAddressTypes().then(function(n){r.addressTypes=n},function(){})}function g(){h.getAddressTypeDealers().then(function(n){r.addressTypeDealers=n},function(){})}function nt(){h.getEmailAddresses().then(function(n){r.emailAddresses=n},function(){})}function tt(){h.getPhoneNumbers().then(function(n){r.phoneNumbers=n},function(){})}function it(){h.getOpenHours().then(function(n){r.openHours=n},function(){})}function l(n){var t=!1;return angular.forEach(r.addressTypesSelected,function(i){t==!1&&angular.forEach(r.addressTypeDealers,function(r){t==!1&&r.contact_address_id==n.contact_address_id&&i.id==r.contact_address_type_id&&(t=!0)})}),t}function rt(i){angular.forEach(r.markers,function(n){n.icon=n.id==i?"/img/dealerlocator/pin_icon_selected.png":"/img/dealerlocator/pin_icon.png"});var u="anchor_"+i;t.hash()!==u?(t.hash("anchor_"+i),y(i),n()):(y(i),n())}function y(n){angular.forEach(r.dealers,function(t){var i=t.site_owner_id+"_"+t.site_locationseq;t.expand=n==i?!0:!1})}function p(n){angular.forEach(n,function(n){if(n.category_type_id==r.categoryType){var t={id:n.site_owner_id+"_"+n.site_locationseq,icon:"/img/dealerlocator/pin_icon.png",events:{click:function(n){rt(n.key)}},latitude:n.site_address_map_latitude,longitude:n.site_address_map_longitude,showWindow:!1};r.markers.push(t)}})}function ut(){r.pageData.selSuburbDetail!=null&&(a("BMW",r.pageData.selSuburbDetail.Postcode),v("BMW i",r.pageData.selSuburbDetail.Postcode),r.calculateClosestDealer(r.pageData.selSuburbDetail.Latitude,r.pageData.selSuburbDetail.Longitude))}r.categoryType=f.category_type;r.$on("$locationChangeStart",function(n){n.preventDefault()});r.init=function(){r.bmwiDealer=0;(typeof r.categoryType=="undefined"||r.categoryType<2&&r.categoryType>4)&&(r.categoryType=1);r.searchType=[{id:0,name:"All Dealers"},{id:1,name:"Search by Postcode"},{id:2,name:"Search by State"},{id:3,name:"Search by Dealer"}];r.selectedSearchType=0;r.selectedState={};r.postcode="";r.postcodeDealerIdsBMW=[];r.postcodeDealerIdsBMWi=[];r.dealerName="";r.states=[];r.dealers=[];r.dealerNames=[];r.filteredDealers=[];r.addressTypes=[];r.addressTypeDealers=[];r.addressTypesSelected=[];r.addressTypesSelectedBMW=[];r.addressTypesSelectedBMWi=[];r.addressTypesSelection={ids:{},objects:[]};r.emailAddresses=[];r.phoneNumbers=[];r.openHours=[];r.selectedDealer=null;r.dealerSearchText=null;w();b();d();g();nt();tt();it();r.markers=[];r.map={center:{latitude:-34.397,longitude:150.644},zoom:5,control:{}};r.mapRef;r.dealerMapURL="https://maps.googleapis.com/maps/api/staticmap?autoscale=2&size=600x200&maptype=roadmap&format=png&visual_refresh=true&markers=size:small%7Ccolor:0x0000e8%7Clabel:0%7C-34.9245,138.588";r.directionsRequest={};r.directionsAddress="";r.drivingDirectionsFailText="";r.planRoute=!1;r.geoPosition=null;r.showDrivingDirections=!1;s.promise().then(function(){r.mapRef=r.map.control.getGMap();o.then(function(n){r.directionsDisplay=new n.DirectionsRenderer})});navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(n){r.$apply(function(){r.geoPosition=n})})};r.getDirections=function(i,u,f,e){o.then(function(o){var h=new o.DirectionsService,s;(f==""||e=="geo")&&(f=r.geoPosition.coords.latitude+", "+r.geoPosition.coords.longitude);s={origin:f,destination:i+", "+u,travelMode:o.TravelMode.DRIVING,optimizeWaypoints:!0};h.route(s,function(i,u){u===google.maps.DirectionsStatus.OK?(r.directionsDisplay.setMap(null),r.directionsDisplay.setMap(r.mapRef),r.directionsDisplay.setPanel(document.getElementById("directionsPanel")),r.directionsDisplay.setDirections(i),r.showDrivingDirections=!0,t.hash("BMW"),n(),r.drivingDirectionsFailText=""):u===google.maps.DirectionsStatus.ZERO_RESULTS?(r.showDrivingDirections=!1,r.drivingDirectionsFailText="Address not found."):(r.showDrivingDirections=!1,r.drivingDirectionsFailText="Unable to retrieve driving directions at this time. Please try again later.");r.$apply()})})};r.closeDrivingDirections=function(){r.showDrivingDirections=!1;r.directionsDisplay.setMap(null)};r.togglePlanRoute=function(){r.planRoute=r.planRoute?!1:!0};r.cancelRoute=function(){r.planRoute=!1;r.directionsAddress="";r.drivingDirectionsFailText=""};r.dealerNameSearch=function(n){return n?r.dealerNames.filter(k(n)):[]};r.$watch("postcode",function(){var n=r.postcode;typeof n!="undefined"&&n!=null&&(a("BMW",r.postcode),v("BMW i",r.postcode))});r.toggle=function(n,t){var i=t.indexOf(n);i>-1?t.splice(i,1):t.push(n)};r.exists=function(n,t){return t.indexOf(n)>-1};r.$watchCollection("filteredDealers",function(){r.selectedSearchType==0?r.map={center:{latitude:-26.863281,longitude:134.34082},zoom:5,control:{}}:r.selectedSearchType==1||(r.selectedSearchType==2?r.map=r.selectedState.state=="ACT"?{center:{latitude:-35.284864,longitude:149.127731},zoom:12,control:{}}:r.selectedState.state=="NSW"?{center:{latitude:-32.953368,longitude:148.98584},zoom:7,control:{}}:r.selectedState.state=="NT"?{center:{latitude:-12.425177,longitude:130.890427},zoom:12,control:{}}:r.selectedState.state=="QLD"?{center:{latitude:-21.350781,longitude:149.370117},zoom:6,control:{}}:r.selectedState.state=="SA"?{center:{latitude:-34.816058,longitude:138.669434},zoom:9,control:{}}:r.selectedState.state=="TAS"?{center:{latitude:-41.983994,longitude:147.236023},zoom:9,control:{}}:r.selectedState.state=="VIC"?{center:{latitude:-36.102987,longitude:143.99586},zoom:7,control:{}}:r.selectedState.state=="WA"?{center:{latitude:-31.949832,longitude:115.855637},zoom:10,control:{}}:{center:{latitude:-26.863281,longitude:134.34082},zoom:5,control:{}}:r.selectedSearchType==3&&(r.map={center:{latitude:-26.863281,longitude:134.34082},zoom:5,control:{}},typeof r.selectedDealer!="undefined"&&r.selectedDealer!=null&&r.filteredDealers.length>0&&(r.map={center:{latitude:r.filteredDealers[0].site_address_map_latitude,longitude:r.filteredDealers[0].site_address_map_longitude},zoom:r.filteredDealers[0].site_address_map_zoom,control:{}})));r.markers=[];p(r.filteredDealers);typeof r.filteredDealers!="undefined"&&r.filteredDealers!=null&&r.filteredDealers.length==1&&(r.map.zoom=14)});r.filterDealers=function(n){var t=!0;if(r.selectedSearchType==0)n.category_type_id==r.categoryType?r.addressTypesSelected.length>0&&(t=l(n)):t=!1;else if(r.selectedSearchType==1)if(r.addressTypesSelected=[],r.addressTypesSelectedBMW=[],r.addressTypesSelectedBMWi=[],r.bmwiDealer==1)if(r.postcodeDealerIdsBMWi.length>0)if(t=!1,n.category_type_id==r.categoryType)for(i=0;i<r.postcodeDealerIdsBMWi.length;i++)t==!1&&(t=n.dealerID==r.postcodeDealerIdsBMWi[i]?!0:!1);else t=!1;else t=!1;else if(r.postcodeDealerIdsBMW.length>0)if(t=!1,n.category_type_id==r.categoryType)for(i=0;i<r.postcodeDealerIdsBMW.length;i++)t==!1&&(t=n.dealerID==r.postcodeDealerIdsBMW[i]?!0:!1);else t=!1;else t=!1;else r.selectedSearchType==2?r.selectedState!=null&&(t=n.site_address_state==r.selectedState.state?r.addressTypesSelected.length>0?l(n):n.category_type_id==r.categoryType?!0:!1:!1):r.selectedSearchType==3&&(r.addressTypesSelected=[],r.addressTypesSelectedBMW=[],r.addressTypesSelectedBMWi=[],r.selectedDealer!=null&&(t=n.website_trading_name==r.selectedDealer.display?r.addressTypesSelected.length>0?l(n):n.category_type_id==r.categoryType?!0:!1:!1));return t==!0?r.bmwiDealer==1?n.bmw_i_dealer>0?!0:!1:!0:!1};r.filterAddressTypeByBrand=function(n){return r.bmwiDealer==0?n.id<6||n.id>7?!0:!1:n.id>=6&&n.id<=7?!0:!1};r.expand=function(n){n.expand?(n.expand=!1,r.planRoute=!1,r.map={center:{latitude:-26.863281,longitude:134.34082},zoom:5,control:{}}):(angular.forEach(r.dealers,function(n){n.expand=!1}),n.expand=!0,r.map={center:{latitude:n.site_address_map_latitude,longitude:n.site_address_map_longitude},zoom:n.site_address_map_zoom,control:{}},r.dealerMapURL="https://maps.googleapis.com/maps/api/staticmap?scale=4&size=340x340&maptype=roadmap&format=png&visual_refresh=true&markers=size:small%7Ccolor:0x3f51b5%7C%7C"+n.site_address_map_latitude+","+n.site_address_map_longitude)};r.setBrand=function(n){r.bmwiDealer=n;r.showDrivingDirections=!1;r.bmwiDealer==0?(r.addressTypesSelectedBMWi=[],r.addressTypesSelectedBMWi=r.addressTypesSelected,r.addressTypesSelected=[],r.addressTypesSelected=r.addressTypesSelectedBMW):(r.addressTypesSelectedBMW=[],r.addressTypesSelectedBMW=r.addressTypesSelected,r.addressTypesSelected=[],r.addressTypesSelected=r.addressTypesSelectedBMWi);r.filterDealers(r.dealers)};r.phone=!1;r.togglePhone=function(){r.phone=r.phone===!1?!0:!1};r.email=!1;r.toggleEmail=function(){r.email=r.email===!1?!0:!1};r.hours=!1;r.toggleHours=function(){r.hours=r.hours===!1?!0:!1};r.pageData={};r.pageData.selSuburbDetail={};r.pageData.searchText="";r.$watch("pageData.selSuburbDetail",ut,!0);r.calculateClosestDealer=function(n,t){var i=null;angular.forEach(r.filteredDealers,function(r){r.distance=parseFloat(c.calDistance(r.site_address_map_longitude,t,r.site_address_map_latitude,n));i==null?i=r:i.distance>r.distance&&(i=r)});r.expand(i)};r.pageData.selSuburbDetail=null;r.searchSuburb=function(n){if(n.length>=4){var t=u.defer();return h.getSuburbOrDealerByText(n).then(function(n){return t.resolve(n),t.promise},function(n){return t.reject(n),t.promise})}};r.findClosestDealer=function(){r.pageData.searchText="";r.calculateClosestDealer(r.geoPosition.coords.latitude,r.geoPosition.coords.longitude)}}]);bmwApp.filter("filterAddressTypeByDealer",function(){return function(n,t,i){for(var u=[],r=0;r<n.length;r++)n[r].id==t&&(i==0?(n[r].id<6||n[r].id>7)&&u.push(n[r]):n[r].id>=6&&n[r].id<=7&&u.push(n[r]));return u}});bmwApp.controller("MasterController",["$scope",function(n){n.id=1}]);bmwApp.service("distanceService",function(){Number.prototype.toRad=function(){return this*(Math.PI/180)};this.calDistance=function(n,t,i,r){var u=(r-i).toRad(),f=(t-n).toRad(),i=Number(i).toRad(),r=Number(r).toRad(),e=Math.sin(u/2)*Math.sin(u/2)+Math.sin(f/2)*Math.sin(f/2)*Math.cos(i)*Math.cos(r),o=2*Math.atan2(Math.sqrt(e),Math.sqrt(1-e)),s=6371*o;return s.toFixed(2)}})