From 517d61657dcb51ed13f9855abc2e8f115019022b Mon Sep 17 00:00:00 2001 From: Justin Kimbrell Date: Fri, 12 Sep 2014 12:33:19 -0400 Subject: [PATCH] - (Bug Fix) Wrapped the select element with a new div to make the select box appear consistent with the all the other drop downs in Craft. Thanks @pixelandtonic for the suggestion! --- resources/js/app.compiled.js | 2 +- resources/js/app.min.js | 2 +- resources/js/app/templates/circle-form.handlebars | 3 +++ resources/js/templates.js | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/js/app.compiled.js b/resources/js/app.compiled.js index bd81fb0..473404e 100644 --- a/resources/js/app.compiled.js +++ b/resources/js/app.compiled.js @@ -9837,7 +9837,7 @@ function program5(depth0,data,depth1) { + escapeExpression(((stack1 = (depth1 && depth1.lng)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) + "\n

\n \n
\n \n \n
\n
\n
\n \n
\n \n "; + + "\" class=\"text fullwidth\" />\n \n
\n
\n\n
\n \n
\n
\n \n "; return buffer; } diff --git a/resources/js/app.min.js b/resources/js/app.min.js index 6fe9c3b..c146768 100644 --- a/resources/js/app.min.js +++ b/resources/js/app.min.js @@ -4,7 +4,7 @@ if(options.parse)models=this.parse(models,options);var singular=!_.isArray(model var args=Array.prototype.slice.call(arguments,1);return messageSystem[method].apply(messageSystem,args)}};return new Radio}(Wreqr);return Backbone.Wreqr})(Backbone,_);var previousMarionette=root.Marionette;var Marionette=Backbone.Marionette={};Marionette.VERSION="2.0.2";Marionette.noConflict=function(){root.Marionette=previousMarionette;return this};Backbone.Marionette=Marionette;Marionette.Deferred=Backbone.$.Deferred;var slice=Array.prototype.slice;function throwError(message,name){var error=new Error(message);error.name=name||"Error";throw error}Marionette.extend=Backbone.Model.extend;Marionette.getOption=function(target,optionName){if(!target||!optionName){return}var value;if(target.options&&target.options[optionName]!==undefined){value=target.options[optionName]}else{value=target[optionName]}return value};Marionette.proxyGetOption=function(optionName){return Marionette.getOption(this,optionName)};Marionette.normalizeMethods=function(hash){var normalizedHash={},method;_.each(hash,function(fn,name){method=fn;if(!_.isFunction(method)){method=this[method]}if(!method){return}normalizedHash[name]=method},this);return normalizedHash};Marionette.normalizeUIKeys=function(hash,ui){if(typeof hash==="undefined"){return}_.each(_.keys(hash),function(v){var pattern=/@ui.[a-zA-Z_$0-9]*/g;if(v.match(pattern)){hash[v.replace(pattern,function(r){return ui[r.slice(4)]})]=hash[v];delete hash[v]}});return hash};Marionette.actAsCollection=function(object,listProperty){var methods=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck"];_.each(methods,function(method){object[method]=function(){var list=_.values(_.result(this,listProperty));var args=[list].concat(_.toArray(arguments));return _[method].apply(_,args)}})};Marionette.triggerMethod=function(){var splitter=/(^|:)(\w)/gi;function getEventName(match,prefix,eventName){return eventName.toUpperCase()}var triggerMethod=function(event){var methodName="on"+event.replace(splitter,getEventName);var method=this[methodName];var result;if(_.isFunction(method)){result=method.apply(this,_.tail(arguments))}if(_.isFunction(this.trigger)){this.trigger.apply(this,arguments)}return result};return triggerMethod}();Marionette.MonitorDOMRefresh=function(documentElement){function handleShow(view){view._isShown=true;triggerDOMRefresh(view)}function handleRender(view){view._isRendered=true;triggerDOMRefresh(view)}function triggerDOMRefresh(view){if(view._isShown&&view._isRendered&&isInDOM(view)){if(_.isFunction(view.triggerMethod)){view.triggerMethod("dom:refresh")}}}function isInDOM(view){return documentElement.contains(view.el)}return function(view){view.listenTo(view,"show",function(){handleShow(view)});view.listenTo(view,"render",function(){handleRender(view)})}}(document.documentElement);(function(Marionette){"use strict";function bindFromStrings(target,entity,evt,methods){var methodNames=methods.split(/\s+/);_.each(methodNames,function(methodName){var method=target[methodName];if(!method){throwError('Method "'+methodName+'" was configured as an event handler, but does not exist.')}target.listenTo(entity,evt,method)})}function bindToFunction(target,entity,evt,method){target.listenTo(entity,evt,method)}function unbindFromStrings(target,entity,evt,methods){var methodNames=methods.split(/\s+/);_.each(methodNames,function(methodName){var method=target[methodName];target.stopListening(entity,evt,method)})}function unbindToFunction(target,entity,evt,method){target.stopListening(entity,evt,method)}function iterateEvents(target,entity,bindings,functionCallback,stringCallback){if(!entity||!bindings){return}if(_.isFunction(bindings)){bindings=bindings.call(target)}_.each(bindings,function(methods,evt){if(_.isFunction(methods)){functionCallback(target,entity,evt,methods)}else{stringCallback(target,entity,evt,methods)}})}Marionette.bindEntityEvents=function(target,entity,bindings){iterateEvents(target,entity,bindings,bindToFunction,bindFromStrings)};Marionette.unbindEntityEvents=function(target,entity,bindings){iterateEvents(target,entity,bindings,unbindToFunction,unbindFromStrings)};Marionette.proxyBindEntityEvents=function(entity,bindings){return Marionette.bindEntityEvents(this,entity,bindings)};Marionette.proxyUnbindEntityEvents=function(entity,bindings){return Marionette.unbindEntityEvents(this,entity,bindings)}})(Marionette);Marionette.Callbacks=function(){this._deferred=Marionette.Deferred();this._callbacks=[]};_.extend(Marionette.Callbacks.prototype,{add:function(callback,contextOverride){var promise=_.result(this._deferred,"promise");this._callbacks.push({cb:callback,ctx:contextOverride});promise.then(function(args){if(contextOverride){args.context=contextOverride}callback.call(args.context,args.options)})},run:function(options,context){this._deferred.resolve({options:options,context:context})},reset:function(){var callbacks=this._callbacks;this._deferred=Marionette.Deferred();this._callbacks=[];_.each(callbacks,function(cb){this.add(cb.cb,cb.ctx)},this)}});Marionette.Controller=function(options){this.options=options||{};if(_.isFunction(this.initialize)){this.initialize(this.options)}};Marionette.Controller.extend=Marionette.extend;_.extend(Marionette.Controller.prototype,Backbone.Events,{destroy:function(){var args=Array.prototype.slice.call(arguments);this.triggerMethod.apply(this,["before:destroy"].concat(args));this.triggerMethod.apply(this,["destroy"].concat(args));this.stopListening();this.off()},triggerMethod:Marionette.triggerMethod,getOption:Marionette.proxyGetOption});Marionette.Region=function(options){this.options=options||{};this.el=this.getOption("el");this.el=this.el instanceof Backbone.$?this.el[0]:this.el;if(!this.el){throwError('An "el" must be specified for a region.',"NoElError")}this.$el=this.getEl(this.el);if(this.initialize){var args=Array.prototype.slice.apply(arguments);this.initialize.apply(this,args)}};_.extend(Marionette.Region,{buildRegion:function(regionConfig,defaultRegionClass){var regionIsString=_.isString(regionConfig);var regionSelectorIsString=_.isString(regionConfig.selector);var regionClassIsUndefined=_.isUndefined(regionConfig.regionClass);var regionIsClass=_.isFunction(regionConfig);if(!regionIsClass&&!regionIsString&&!regionSelectorIsString){throwError("Region must be specified as a Region class,"+"a selector string or an object with selector property")}var selector,RegionClass;if(regionIsString){selector=regionConfig}if(regionConfig.selector){selector=regionConfig.selector;delete regionConfig.selector}if(regionIsClass){RegionClass=regionConfig}if(!regionIsClass&®ionClassIsUndefined){RegionClass=defaultRegionClass}if(regionConfig.regionClass){RegionClass=regionConfig.regionClass;delete regionConfig.regionClass}if(regionIsString||regionIsClass){regionConfig={}}regionConfig.el=selector;var region=new RegionClass(regionConfig);if(regionConfig.parentEl){region.getEl=function(el){if(_.isObject(el)){return Backbone.$(el)}var parentEl=regionConfig.parentEl;if(_.isFunction(parentEl)){parentEl=parentEl()}return parentEl.find(el)}}return region}});_.extend(Marionette.Region.prototype,Backbone.Events,{show:function(view,options){this._ensureElement();var showOptions=options||{};var isDifferentView=view!==this.currentView;var preventDestroy=!!showOptions.preventDestroy;var forceShow=!!showOptions.forceShow;var isChangingView=!!this.currentView;var _shouldDestroyView=!preventDestroy&&isDifferentView;if(_shouldDestroyView){this.empty()}var _shouldShowView=isDifferentView||forceShow;if(_shouldShowView){view.render();if(isChangingView){this.triggerMethod("before:swap",view)}this.triggerMethod("before:show",view);this.triggerMethod.call(view,"before:show");this.attachHtml(view);this.currentView=view;if(isChangingView){this.triggerMethod("swap",view)}this.triggerMethod("show",view);if(_.isFunction(view.triggerMethod)){view.triggerMethod("show")}else{this.triggerMethod.call(view,"show")}return this}return this},_ensureElement:function(){if(!_.isObject(this.el)){this.$el=this.getEl(this.el);this.el=this.$el[0]}if(!this.$el||this.$el.length===0){throwError('An "el" '+this.$el.selector+" must exist in DOM")}},getEl:function(el){return Backbone.$(el)},attachHtml:function(view){this.el.innerHTML="";this.el.appendChild(view.el)},empty:function(){var view=this.currentView;if(!view||view.isDestroyed){return}this.triggerMethod("before:empty",view);if(view.destroy){view.destroy()}else if(view.remove){view.remove()}this.triggerMethod("empty",view);delete this.currentView},attachView:function(view){this.currentView=view},reset:function(){this.empty();if(this.$el){this.el=this.$el.selector}delete this.$el},getOption:Marionette.proxyGetOption,triggerMethod:Marionette.triggerMethod});Marionette.Region.extend=Marionette.extend;Marionette.RegionManager=function(Marionette){var RegionManager=Marionette.Controller.extend({constructor:function(options){this._regions={};Marionette.Controller.call(this,options)},addRegions:function(regionDefinitions,defaults){var regions={};_.each(regionDefinitions,function(definition,name){if(_.isString(definition)){definition={selector:definition}}if(definition.selector){definition=_.defaults({},definition,defaults)}var region=this.addRegion(name,definition);regions[name]=region},this);return regions},addRegion:function(name,definition){var region;var isObject=_.isObject(definition);var isString=_.isString(definition);var hasSelector=!!definition.selector;if(isString||isObject&&hasSelector){region=Marionette.Region.buildRegion(definition,Marionette.Region)}else if(_.isFunction(definition)){region=Marionette.Region.buildRegion(definition,Marionette.Region)}else{region=definition}this.triggerMethod("before:add:region",name,region);this._store(name,region);this.triggerMethod("add:region",name,region);return region},get:function(name){return this._regions[name]},getRegions:function(){return _.clone(this._regions)},removeRegion:function(name){var region=this._regions[name];this._remove(name,region)},removeRegions:function(){_.each(this._regions,function(region,name){this._remove(name,region)},this)},emptyRegions:function(){_.each(this._regions,function(region){region.empty()},this)},destroy:function(){this.removeRegions();Marionette.Controller.prototype.destroy.apply(this,arguments)},_store:function(name,region){this._regions[name]=region;this._setLength()},_remove:function(name,region){this.triggerMethod("before:remove:region",name,region);region.empty();region.stopListening();delete this._regions[name];this._setLength();this.triggerMethod("remove:region",name,region)},_setLength:function(){this.length=_.size(this._regions)}});Marionette.actAsCollection(RegionManager.prototype,"_regions");return RegionManager}(Marionette);Marionette.TemplateCache=function(templateId){this.templateId=templateId};_.extend(Marionette.TemplateCache,{templateCaches:{},get:function(templateId){var cachedTemplate=this.templateCaches[templateId];if(!cachedTemplate){cachedTemplate=new Marionette.TemplateCache(templateId);this.templateCaches[templateId]=cachedTemplate}return cachedTemplate.load()},clear:function(){var i;var args=slice.call(arguments);var length=args.length;if(length>0){for(i=0;i=view._index){laterView._index++}})}else{this.children.each(function(laterView){if(laterView._index>=view._index){laterView._index--}})}},_addChildView:function(view,index){this.proxyChildEvents(view);this.triggerMethod("before:add:child",view);this.children.add(view);this.renderChildView(view,index);if(this._isShown&&!this.isBuffering){if(_.isFunction(view.triggerMethod)){view.triggerMethod("show")}else{Marionette.triggerMethod.call(view,"show")}}this.triggerMethod("add:child",view)},renderChildView:function(view,index){view.render();this.attachHtml(this,view,index)},buildChildView:function(child,ChildViewClass,childViewOptions){var options=_.extend({model:child},childViewOptions);return new ChildViewClass(options)},removeChildView:function(view){if(view){this.triggerMethod("before:remove:child",view);if(view.destroy){view.destroy()}else if(view.remove){view.remove()}this.stopListening(view);this.children.remove(view);this.triggerMethod("remove:child",view);this._updateIndices(view,false)}},isEmpty:function(collection){return!this.collection||this.collection.length===0},checkEmpty:function(){if(this.isEmpty(this.collection)){this.showEmptyView()}},attachBuffer:function(collectionView,buffer){collectionView.$el.append(buffer)},attachHtml:function(collectionView,childView,index){if(collectionView.isBuffering){collectionView.elBuffer.appendChild(childView.el);collectionView._bufferedChildren.push(childView)}else{if(!collectionView._insertBefore(childView,index)){collectionView._insertAfter(childView)}}},_insertBefore:function(childView,index){var currentView;var findPosition=this.sort&&index":">",'"':""","'":"'","`":"`"};var badChars=/[&<>"'`]/g;var possible=/[&<>"'`]/;function escapeChar(chr){return escape[chr]||"&"}function extend(obj,value){for(var key in value){if(Object.prototype.hasOwnProperty.call(value,key)){obj[key]=value[key]}}}__exports__.extend=extend;var toString=Object.prototype.toString;__exports__.toString=toString;var isFunction=function(value){return typeof value==="function"};if(isFunction(/x/)){isFunction=function(value){return typeof value==="function"&&toString.call(value)==="[object Function]"}}var isFunction;__exports__.isFunction=isFunction;var isArray=Array.isArray||function(value){return value&&typeof value==="object"?toString.call(value)==="[object Array]":false};__exports__.isArray=isArray;function escapeExpression(string){if(string instanceof SafeString){return string.toString()}else if(!string&&string!==0){return""}string=""+string;if(!possible.test(string)){return string}return string.replace(badChars,escapeChar)}__exports__.escapeExpression=escapeExpression;function isEmpty(value){if(!value&&value!==0){return true}else if(isArray(value)&&value.length===0){return true}else{return false}}__exports__.isEmpty=isEmpty;return __exports__}(__module4__);var __module5__=function(){"use strict";var __exports__;var errorProps=["description","fileName","lineNumber","message","name","number","stack"];function Exception(message,node){var line;if(node&&node.firstLine){line=node.firstLine;message+=" - "+line+":"+node.firstColumn}var tmp=Error.prototype.constructor.call(this,message);for(var idx=0;idx= 1.0.0"};__exports__.REVISION_CHANGES=REVISION_CHANGES;var isArray=Utils.isArray,isFunction=Utils.isFunction,toString=Utils.toString,objectType="[object Object]";function HandlebarsEnvironment(helpers,partials){this.helpers=helpers||{};this.partials=partials||{};registerDefaultHelpers(this)}__exports__.HandlebarsEnvironment=HandlebarsEnvironment;HandlebarsEnvironment.prototype={constructor:HandlebarsEnvironment,logger:logger,log:log,registerHelper:function(name,fn,inverse){if(toString.call(name)===objectType){if(inverse||fn){throw new Exception("Arg not supported with multiple helpers")}Utils.extend(this.helpers,name)}else{if(inverse){fn.not=inverse}this.helpers[name]=fn}},registerPartial:function(name,str){if(toString.call(name)===objectType){Utils.extend(this.partials,name)}else{this.partials[name]=str}}};function registerDefaultHelpers(instance){instance.registerHelper("helperMissing",function(arg){if(arguments.length===2){return undefined}else{throw new Exception("Missing helper: '"+arg+"'")}});instance.registerHelper("blockHelperMissing",function(context,options){var inverse=options.inverse||function(){},fn=options.fn;if(isFunction(context)){context=context.call(this)}if(context===true){return fn(this)}else if(context===false||context==null){return inverse(this)}else if(isArray(context)){if(context.length>0){return instance.helpers.each(context,options)}else{return inverse(this)}}else{return fn(context)}});instance.registerHelper("each",function(context,options){var fn=options.fn,inverse=options.inverse;var i=0,ret="",data;if(isFunction(context)){context=context.call(this)}if(options.data){data=createFrame(options.data)}if(context&&typeof context==="object"){if(isArray(context)){for(var j=context.length;i0){throw new Exception("Invalid path: "+original,this)}else if(part===".."){depth++}else{this.isScoped=true}}else{dig.push(part)}}this.original=original;this.parts=dig;this.string=dig.join(".");this.depth=depth;this.isSimple=parts.length===1&&!this.isScoped&&depth===0;this.stringModeValue=this.string},PartialNameNode:function(name,locInfo){LocationInfo.call(this,locInfo);this.type="PARTIAL_NAME";this.name=name.original},DataNode:function(id,locInfo){LocationInfo.call(this,locInfo);this.type="DATA";this.id=id},StringNode:function(string,locInfo){LocationInfo.call(this,locInfo);this.type="STRING";this.original=this.string=this.stringModeValue=string},IntegerNode:function(integer,locInfo){LocationInfo.call(this,locInfo);this.type="INTEGER";this.original=this.integer=integer;this.stringModeValue=Number(integer)},BooleanNode:function(bool,locInfo){LocationInfo.call(this,locInfo);this.type="BOOLEAN";this.bool=bool;this.stringModeValue=bool==="true"},CommentNode:function(comment,locInfo){LocationInfo.call(this,locInfo);this.type="comment";this.comment=comment}};__exports__=AST;return __exports__}(__module5__);var __module9__=function(){"use strict";var __exports__;var handlebars=function(){var parser={trace:function trace(){},yy:{},symbols_:{error:2,root:3,statements:4,EOF:5,program:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,sexpr:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,CLOSE_UNESCAPED:24,OPEN_PARTIAL:25,partialName:26,partial_option0:27,sexpr_repetition0:28,sexpr_option0:29,dataName:30,param:31,STRING:32,INTEGER:33,BOOLEAN:34,OPEN_SEXPR:35,CLOSE_SEXPR:36,hash:37,hash_repetition_plus0:38,hashSegment:39,ID:40,EQUALS:41,DATA:42,pathSegments:43,SEP:44,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},productions_:[0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,3],[37,1],[39,3],[26,1],[26,1],[26,1],[30,2],[21,1],[43,3],[43,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[38,1],[38,2]],performAction:function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return new yy.ProgramNode($$[$0-1],this._$);break;case 2:return new yy.ProgramNode([],this._$);break;case 3:this.$=new yy.ProgramNode([],$$[$0-1],$$[$0],this._$);break;case 4:this.$=new yy.ProgramNode($$[$0-2],$$[$0-1],$$[$0],this._$);break;case 5:this.$=new yy.ProgramNode($$[$0-1],$$[$0],[],this._$);break;case 6:this.$=new yy.ProgramNode($$[$0],this._$);break;case 7:this.$=new yy.ProgramNode([],this._$);break;case 8:this.$=new yy.ProgramNode([],this._$);break;case 9:this.$=[$$[$0]];break;case 10:$$[$0-1].push($$[$0]);this.$=$$[$0-1];break;case 11:this.$=new yy.BlockNode($$[$0-2],$$[$0-1].inverse,$$[$0-1],$$[$0],this._$);break;case 12:this.$=new yy.BlockNode($$[$0-2],$$[$0-1],$$[$0-1].inverse,$$[$0],this._$);break;case 13:this.$=$$[$0];break;case 14:this.$=$$[$0];break;case 15:this.$=new yy.ContentNode($$[$0],this._$);break;case 16:this.$=new yy.CommentNode($$[$0],this._$);break;case 17:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],stripFlags($$[$0-2],$$[$0]),this._$);break;case 18:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],stripFlags($$[$0-2],$$[$0]),this._$);break;case 19:this.$={path:$$[$0-1],strip:stripFlags($$[$0-2],$$[$0])};break;case 20:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],stripFlags($$[$0-2],$$[$0]),this._$);break;case 21:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],stripFlags($$[$0-2],$$[$0]),this._$);break;case 22:this.$=new yy.PartialNode($$[$0-2],$$[$0-1],stripFlags($$[$0-3],$$[$0]),this._$);break;case 23:this.$=stripFlags($$[$0-1],$$[$0]);break;case 24:this.$=new yy.SexprNode([$$[$0-2]].concat($$[$0-1]),$$[$0],this._$);break;case 25:this.$=new yy.SexprNode([$$[$0]],null,this._$);break;case 26:this.$=$$[$0];break;case 27:this.$=new yy.StringNode($$[$0],this._$);break;case 28:this.$=new yy.IntegerNode($$[$0],this._$);break;case 29:this.$=new yy.BooleanNode($$[$0],this._$);break;case 30:this.$=$$[$0];break;case 31:$$[$0-1].isHelper=true;this.$=$$[$0-1];break;case 32:this.$=new yy.HashNode($$[$0],this._$);break;case 33:this.$=[$$[$0-2],$$[$0]];break;case 34:this.$=new yy.PartialNameNode($$[$0],this._$);break;case 35:this.$=new yy.PartialNameNode(new yy.StringNode($$[$0],this._$),this._$);break;case 36:this.$=new yy.PartialNameNode(new yy.IntegerNode($$[$0],this._$));break;case 37:this.$=new yy.DataNode($$[$0],this._$);break;case 38:this.$=new yy.IdNode($$[$0],this._$);break;case 39:$$[$0-2].push({part:$$[$0],separator:$$[$0-1]});this.$=$$[$0-2];break;case 40:this.$=[{part:$$[$0]}];break;case 43:this.$=[];break;case 44:$$[$0-1].push($$[$0]);break;case 47:this.$=[$$[$0]];break;case 48:$$[$0-1].push($$[$0]);break}},table:[{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:29,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:30,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:31,21:24,30:25,40:[1,28],42:[1,27],43:26},{21:33,26:32,32:[1,34],33:[1,35],40:[1,28],43:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,40:[1,28],42:[1,27],43:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,43],24:[2,43],28:43,32:[2,43],33:[2,43],34:[2,43],35:[2,43],36:[2,43],40:[2,43],42:[2,43]},{18:[2,25],24:[2,25],36:[2,25]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],35:[2,38],36:[2,38],40:[2,38],42:[2,38],44:[1,44]},{21:45,40:[1,28],43:26},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],42:[2,40],44:[2,40]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,41],21:50,27:49,40:[1,28],43:26},{18:[2,34],40:[2,34]},{18:[2,35],40:[2,35]},{18:[2,36],40:[2,36]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,40:[1,28],43:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,45],21:56,24:[2,45],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:[1,61],36:[2,45],37:55,38:62,39:63,40:[1,64],42:[1,27],43:26},{40:[1,65]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],35:[2,37],36:[2,37],40:[2,37],42:[2,37]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,66]},{18:[2,42]},{18:[1,67]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24],36:[2,24]},{18:[2,44],24:[2,44],32:[2,44],33:[2,44],34:[2,44],35:[2,44],36:[2,44],40:[2,44],42:[2,44]},{18:[2,46],24:[2,46],36:[2,46]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],35:[2,26],36:[2,26],40:[2,26],42:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],35:[2,27],36:[2,27],40:[2,27],42:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],35:[2,28],36:[2,28],40:[2,28],42:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],35:[2,29],36:[2,29],40:[2,29],42:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],35:[2,30],36:[2,30],40:[2,30],42:[2,30]},{17:68,21:24,30:25,40:[1,28],42:[1,27],43:26},{18:[2,32],24:[2,32],36:[2,32],39:69,40:[1,70]},{18:[2,47],24:[2,47],36:[2,47],40:[2,47]},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],41:[1,71],42:[2,40],44:[2,40]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],35:[2,39],36:[2,39],40:[2,39],42:[2,39],44:[2,39]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{36:[1,72]},{18:[2,48],24:[2,48],36:[2,48],40:[2,48]},{41:[1,71]},{21:56,30:60,31:73,32:[1,57],33:[1,58],34:[1,59],35:[1,61],40:[1,28],42:[1,27],43:26},{18:[2,31],24:[2,31],32:[2,31],33:[2,31],34:[2,31],35:[2,31],36:[2,31],40:[2,31],42:[2,31]},{18:[2,33],24:[2,33],36:[2,33],40:[2,33]}],defaultActions:{3:[2,2],16:[2,1],50:[2,42]},parseError:function parseError(str,hash){throw new Error(str)},parse:function parse(input){var self=this,stack=[0],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,recovering=0,TERROR=2,EOF=1;this.lexer.setInput(input);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;this.yy.parser=this;if(typeof this.lexer.yylloc=="undefined")this.lexer.yylloc={};var yyloc=this.lexer.yylloc;lstack.push(yyloc);var ranges=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function popStack(n){stack.length=stack.length-2*n;vstack.length=vstack.length-n;lstack.length=lstack.length-n}function lex(){var token;token=self.lexer.lex()||1;if(typeof token!=="number"){token=self.symbols_[token]||token}return token}var symbol,preErrorSymbol,state,action,a,r,yyval={},p,len,newState,expected;while(true){state=stack[stack.length-1];if(this.defaultActions[state]){action=this.defaultActions[state]}else{if(symbol===null||typeof symbol=="undefined"){symbol=lex()}action=table[state]&&table[state][symbol]}if(typeof action==="undefined"||!action.length||!action[0]){var errStr="";if(!recovering){expected=[];for(p in table[state])if(this.terminals_[p]&&p>2){expected.push("'"+this.terminals_[p]+"'")}if(this.lexer.showPosition){errStr="Parse error on line "+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'"}else{errStr="Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==1?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'")}this.parseError(errStr,{text:this.lexer.match,token:this.terminals_[symbol]||symbol,line:this.lexer.yylineno,loc:yyloc,expected:expected})}}if(action[0]instanceof Array&&action.length>1){throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol)}switch(action[0]){case 1:stack.push(symbol); vstack.push(this.lexer.yytext);lstack.push(this.lexer.yylloc);stack.push(action[1]);symbol=null;if(!preErrorSymbol){yyleng=this.lexer.yyleng;yytext=this.lexer.yytext;yylineno=this.lexer.yylineno;yyloc=this.lexer.yylloc;if(recovering>0)recovering--}else{symbol=preErrorSymbol;preErrorSymbol=null}break;case 2:len=this.productions_[action[1]][1];yyval.$=vstack[vstack.length-len];yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column};if(ranges){yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]}r=this.performAction.call(yyval,yytext,yyleng,yylineno,this.yy,action[1],vstack,lstack);if(typeof r!=="undefined"){return r}if(len){stack=stack.slice(0,-1*len*2);vstack=vstack.slice(0,-1*len);lstack=lstack.slice(0,-1*len)}stack.push(this.productions_[action[1]][0]);vstack.push(yyval.$);lstack.push(yyval._$);newState=table[stack[stack.length-2]][stack[stack.length-1]];stack.push(newState);break;case 3:return true}}return true}};function stripFlags(open,close){return{left:open.charAt(2)==="~",right:close.charAt(0)==="~"||close.charAt(1)==="~"}}var lexer=function(){var lexer={EOF:1,parseError:function parseError(str,hash){if(this.yy.parser){this.yy.parser.parseError(str,hash)}else{throw new Error(str)}},setInput:function(input){this._input=input;this._more=this._less=this.done=false;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match="";this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};if(this.options.ranges)this.yylloc.range=[0,0];this.offset=0;return this},input:function(){var ch=this._input[0];this.yytext+=ch;this.yyleng++;this.offset++;this.match+=ch;this.matched+=ch;var lines=ch.match(/(?:\r\n?|\n).*/g);if(lines){this.yylineno++;this.yylloc.last_line++}else{this.yylloc.last_column++}if(this.options.ranges)this.yylloc.range[1]++;this._input=this._input.slice(1);return ch},unput:function(ch){var len=ch.length;var lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-len-1);this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1);this.matched=this.matched.substr(0,this.matched.length-1);if(lines.length-1)this.yylineno-=lines.length-1;var r=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len};if(this.options.ranges){this.yylloc.range=[r[0],r[0]+this.yyleng-len]}return this},more:function(){this._more=true;return this},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var next=this.match;if(next.length<20){next+=this._input.substr(0,20-next.length)}return(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var pre=this.pastInput();var c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},next:function(){if(this.done){return this.EOF}if(!this._input)this.done=true;var token,match,tempMatch,index,col,lines;if(!this._more){this.yytext="";this.match=""}var rules=this._currentRules();for(var i=0;imatch[0].length)){match=tempMatch;index=i;if(!this.options.flex)break}}if(match){lines=match[0].match(/(?:\r\n?|\n).*/g);if(lines)this.yylineno+=lines.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length};this.yytext+=match[0];this.match+=match[0];this.matches=match;this.yyleng=this.yytext.length;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]}this._more=false;this._input=this._input.slice(match[0].length);this.matched+=match[0];token=this.performAction.call(this,this.yy,this,rules[index],this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input)this.done=false;if(token)return token;else return}if(this._input===""){return this.EOF}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}},lex:function lex(){var r=this.next();if(typeof r!=="undefined"){return r}else{return this.lex()}},begin:function begin(condition){this.conditionStack.push(condition)},popState:function popState(){return this.conditionStack.pop()},_currentRules:function _currentRules(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function begin(condition){this.begin(condition)}};lexer.options={};lexer.performAction=function anonymous(yy,yy_,$avoiding_name_collisions,YY_START){function strip(start,end){return yy_.yytext=yy_.yytext.substr(start,yy_.yyleng-end)}var YYSTATE=YY_START;switch($avoiding_name_collisions){case 0:if(yy_.yytext.slice(-2)==="\\\\"){strip(0,1);this.begin("mu")}else if(yy_.yytext.slice(-1)==="\\"){strip(0,1);this.begin("emu")}else{this.begin("mu")}if(yy_.yytext)return 14;break;case 1:return 14;break;case 2:this.popState();return 14;break;case 3:strip(0,4);this.popState();return 15;break;case 4:return 35;break;case 5:return 36;break;case 6:return 25;break;case 7:return 16;break;case 8:return 20;break;case 9:return 19;break;case 10:return 19;break;case 11:return 23;break;case 12:return 22;break;case 13:this.popState();this.begin("com");break;case 14:strip(3,5);this.popState();return 15;break;case 15:return 22;break;case 16:return 41;break;case 17:return 40;break;case 18:return 40;break;case 19:return 44;break;case 20:break;case 21:this.popState();return 24;break;case 22:this.popState();return 18;break;case 23:yy_.yytext=strip(1,2).replace(/\\"/g,'"');return 32;break;case 24:yy_.yytext=strip(1,2).replace(/\\'/g,"'");return 32;break;case 25:return 42;break;case 26:return 34;break;case 27:return 34;break;case 28:return 33;break;case 29:return 40;break;case 30:yy_.yytext=strip(1,2);return 40;break;case 31:return"INVALID";break;case 32:return 5;break}};lexer.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/];lexer.conditions={mu:{rules:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],inclusive:false},emu:{rules:[2],inclusive:false},com:{rules:[3],inclusive:false},INITIAL:{rules:[0,1,32],inclusive:true}};return lexer}();parser.lexer=lexer;function Parser(){this.yy={}}Parser.prototype=parser;parser.Parser=Parser;return new Parser}();__exports__=handlebars;return __exports__}();var __module8__=function(__dependency1__,__dependency2__){"use strict";var __exports__={};var parser=__dependency1__;var AST=__dependency2__;__exports__.parser=parser;function parse(input){if(input.constructor===AST.ProgramNode){return input}parser.yy=AST;return parser.parse(input)}__exports__.parse=parse;return __exports__}(__module9__,__module7__);var __module10__=function(__dependency1__){"use strict";var __exports__={};var Exception=__dependency1__;function Compiler(){}__exports__.Compiler=Compiler;Compiler.prototype={compiler:Compiler,disassemble:function(){var opcodes=this.opcodes,opcode,out=[],params,param;for(var i=0,l=opcodes.length;i0){this.source[1]=this.source[1]+", "+locals.join(", ")}if(!this.isChild){for(var alias in this.context.aliases){if(this.context.aliases.hasOwnProperty(alias)){this.source[1]=this.source[1]+", "+alias+"="+this.context.aliases[alias]}}}if(this.source[1]){this.source[1]="var "+this.source[1].substring(2)+";"}if(!this.isChild){this.source[1]+="\n"+this.context.programs.join("\n")+"\n"}if(!this.environment.isSimple){this.pushSource("return buffer;")}var params=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var i=0,l=this.environment.depths.list.length;ithis.stackVars.length){this.stackVars.push("stack"+this.stackSlot)}return this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var inlineStack=this.inlineStack;if(inlineStack.length){this.inlineStack=[];for(var i=0,len=inlineStack.length;i');txt.wrap('
');txt.parent().append($color);var colorsMarkup="";var prefix=txt.attr("id").replace(/-/g,"")+"_";for(var i=0;i0&&breakLine&&$.browser&&$.browser.msie&&$.browser.version<=7){breakLine="";colorsMarkup+='
  • '}colorsMarkup+='
  • '}var box=$('
      '+colorsMarkup+'
    ');var isDown=false;box.insertAfter(txt);box.hide();box.find("li.color-box").on("mouseup",function(){isDown=false;$(this).click()});box.find("li.color-box").on("mousedown",function(){isDown=true});box.find("li.color-box").click(function(){if(txt.is("input")){txt.val(opts.colors[this.id.substr(this.id.indexOf("-")+1)]);txt.blur()}if($.isFunction(defaults.onChangeColor)){defaults.onChangeColor.call(txt,opts.colors[this.id.substr(this.id.indexOf("-")+1)])}hideBox(box)});$("body").on("click",function(){hideBox(box)});$color.click(function(){setTimeout(function(){showBox(box)},10)});txt.on("blur",function(){setTimeout(function(){if(!isDown){hideBox(box)}},100)});box.click(function(event){event.stopPropagation()});var positionAndShowBox=function(box){showBox(box)};txt.click(function(event){event.stopPropagation();if(!txt.is("input")){positionAndShowBox(box)}});txt.focus(function(){positionAndShowBox(box)});function hideBox(box){if(opts.hideEffect=="fade")box.fadeOut();else if(opts.hideEffect=="slide")box.slideUp();else box.hide();updateColor()}function updateColor(){$color.css("background-color",txt.val())}function showBox(box){if(opts.showEffect=="fade")box.fadeIn();else if(opts.showEffect=="slide")box.slideDown();else box.show()}updateColor()})};(function(c){function m(a,c,d){if((a[c]||a[d])&&a[c]===a[d])throw Error("(Link) '"+c+"' can't match '"+d+"'.'")}function r(a){void 0===a&&(a={});if("object"!==typeof a)throw Error("(Format) 'format' option must be an object.");var h={};c(u).each(function(c,n){if(void 0===a[n])h[n]=A[c];else if(typeof a[n]===typeof A[c]){if("decimals"===n&&(0>a[n]||7a&&(n=this.a("negative"),k=this.a("negativeBefore"));a=Math.abs(a).toFixed(d).toString();a=a.split(".");this.a("thousand")?(m=c(a[0]).match(/.{1,3}/g),m=c(m.join(c(this.a("thousand"))))):m=a[0];this.a("mark")&&1")[0]};k.prototype.H=function(a){this.method="val";this.j=document.createElement("input");this.j.name=a;this.j.type="hidden"};k.prototype.G=function(a){function h(a,c){return[c?null:a,c?a:null]}var d=this;this.method="val";this.target=a.on("change",function(a){d.B.val(h(c(a.target).val(),d.t),{link:d,set:!0})})};k.prototype.p=function(a,h,d,k){this.g=d;this.update=!k;if("string"===typeof a&&0===a.indexOf("-tooltip-"))this.K(a,h);else if("string"===typeof a&&0!==a.indexOf("-"))this.H(a);else if("function"===typeof a)this.target=!1,this.method=a;else{if(a instanceof c||c.zepto&&c.zepto.isZ(a)){if(!h){if(a.is("input, select, textarea")){this.G(a);return}h="html"}if("function"===typeof h||"string"===typeof h&&a[h]){this.method=h;this.target=a;return}}throw new RangeError("(Link) Invalid Link.")}};k.prototype.write=function(a,c,d,k){if(!this.update||!1!==k)if(this.u=a,this.F=a=this.format(a),"function"===typeof this.method)this.method.call(this.target[0]||d[0],a,c,d);else this.target[this.method](a,c,d)};k.prototype.q=function(a){this.g=new r(c.extend({},a,this.g instanceof r?this.g.r:this.g))};k.prototype.J=function(a){this.B=a};k.prototype.I=function(a){this.t=a};k.prototype.format=function(a){return this.g.L(a)};k.prototype.A=function(a){return this.g.w(a)};k.prototype.p.prototype=k.prototype;c.Link=k})(window.jQuery||window.Zepto);(function(c){function m(e){return"number"===typeof e&&!isNaN(e)&&isFinite(e)}function r(e){return c.isArray(e)?e:[e]}function k(e,b){e.addClass(b);setTimeout(function(){e.removeClass(b)},300)}function u(e,b){return 100*b/(e[1]-e[0])}function A(e,b){if(b>=e.d.slice(-1)[0])return 100;for(var a=1,c,f,d;b>=e.d[a];)a++;c=e.d[a-1];f=e.d[a];d=e.c[a-1];c=[c,f];return d+u(c,0>c[0]?b+Math.abs(c[0]):b-c[0])/(100/(e.c[a]-d))}function a(e,b){if(100<=b)return e.d.slice(-1)[0];for(var a=1,c,f,d;b>=e.c[a];)a++;c=e.d[a-1];f=e.d[a];d=e.c[a-1];c=[c,f];return 100/(e.c[a]-d)*(b-d)*(c[1]-c[0])/100+c[0]}function h(a,b){for(var c=1,g;(a.dir?100-b:b)>=a.c[c];)c++;if(a.m)return g=a.c[c-1],c=a.c[c],b-g>(c-g)/2?c:g;a.h[c-1]?(g=a.h[c-1],c=a.c[c-1]+Math.round((b-a.c[c-1])/g)*g):c=b;return c}function d(a,b){if(!m(b))throw Error("noUiSlider: 'step' is not numeric.");a.h[0]=b}function n(a,b){if("object"!==typeof b||c.isArray(b))throw Error("noUiSlider: 'range' is not an object.");if(void 0===b.min||void 0===b.max)throw Error("noUiSlider: Missing 'min' or 'max' in 'range'.");c.each(b,function(b,g){var d;"number"===typeof g&&(g=[g]);if(!c.isArray(g))throw Error("noUiSlider: 'range' contains invalid value.");d="min"===b?0:"max"===b?100:parseFloat(b);if(!m(d)||!m(g[0]))throw Error("noUiSlider: 'range' value isn't numeric.");a.c.push(d);a.d.push(g[0]);d?a.h.push(isNaN(g[1])?!1:g[1]):isNaN(g[1])||(a.h[0]=g[1])});c.each(a.h,function(b,c){if(!c)return!0;a.h[b]=u([a.d[b],a.d[b+1]],c)/(100/(a.c[b+1]-a.c[b]))})}function E(a,b){"number"===typeof b&&(b=[b]);if(!c.isArray(b)||!b.length||2
    ").addClass(f[2]),g=["-lower","-upper"];a.dir&&g.reverse();d.children().addClass(f[3]+" "+f[3]+g[b]);return d}function Q(a,b){b.j&&(b=new c.Link({target:c(b.j).clone().appendTo(a),method:b.method,format:b.g},!0));return b}function R(a,b){var d,f=[];for(d=0;d").appendTo(b).addClass(f[1])}function V(d,b,m){function g(){return t[["width","height"][b.k]]()}function n(a){var b,c=[q.val()];for(b=0;bp&&(p=h(b,p));p=Math.max(Math.min(parseFloat(p.toFixed(7)),100),0);if(p===x[g])return 1===l.length?!1:p===H||p===k?0:!1;d.css(b.style,p+"%");d.is(":first-child")&&d.toggleClass(f[17],50d&&(e+=Math.abs(d)),100= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,options,functionType="function",escapeExpression=this.escapeExpression,self=this,blockHelperMissing=helpers.blockHelperMissing;function program1(depth0,data){var buffer="",stack1;buffer+="\n
  • ';stack1=helpers["if"].call(depth0,depth0&&depth0.icon,{hash:{},inverse:self.noop,fn:self.programWithDepth(4,program4,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=helpers["if"].call(depth0,depth0&&depth0.label,{hash:{},inverse:self.noop,fn:self.programWithDepth(6,program6,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+="
  • \n";return buffer}function program2(depth0,data,depth1){var buffer="",stack1;buffer+='href="'+escapeExpression((stack1=depth1&&depth1.url,typeof stack1===functionType?stack1.apply(depth0):stack1))+'"';return buffer}function program4(depth0,data,depth1){var buffer="",stack1;buffer+='';return buffer}function program6(depth0,data,depth1){var buffer="",stack1;buffer+=" "+escapeExpression((stack1=depth1&&depth1.label,typeof stack1===functionType?stack1.apply(depth0):stack1));return buffer}buffer+="
      \n";options={hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data};if(helper=helpers.buttons){stack1=helper.call(depth0,options)}else{helper=depth0&&depth0.buttons;stack1=typeof helper===functionType?helper.call(depth0,options):helper}if(!helpers.buttons){stack1=blockHelperMissing.call(depth0,stack1,{hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data})}if(stack1||stack1===0){buffer+=stack1}buffer+="\n
    ";return buffer});templates["circle-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,options,functionType="function",escapeExpression=this.escapeExpression,self=this,helperMissing=helpers.helperMissing;function program1(depth0,data){return"\n

    Add Circle

    \n"}function program3(depth0,data){return"\n

    Edit Circle

    \n"}function program5(depth0,data,depth1){var buffer="",stack1;buffer+='\n
    \n
    \n

    \n Address
    '+escapeExpression((stack1=depth1&&depth1.address,typeof stack1===functionType?stack1.apply(depth0):stack1))+' Change Location\n

    \n

    \n Latitude
    '+escapeExpression((stack1=depth1&&depth1.lat,typeof stack1===functionType?stack1.apply(depth0):stack1))+'
    \n

    \n Longitude
    '+escapeExpression((stack1=depth1&&depth1.lng,typeof stack1===functionType?stack1.apply(depth0):stack1))+'\n

    \n
    \n
    \n \n \n
    \n
    \n
    \n \n
    \n
    \n ';return buffer}function program7(depth0,data){return'\n + Set Location\n '}function program9(depth0,data){return'\n \n '}function program11(depth0,data){return'\n \n '}buffer+='
    \n
    \n\n';stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data},helper?helper.call(depth0,depth0&&depth0.isSavedToMap,options):helperMissing.call(depth0,"not",depth0&&depth0.isSavedToMap,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n";stack1=helpers["if"].call(depth0,depth0&&depth0.isSavedToMap,{hash:{},inverse:self.noop,fn:self.program(3,program3,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n\n\n
    \n \n ';stack1=helpers["if"].call(depth0,depth0&&depth0.lat,{hash:{},inverse:self.noop,fn:self.programWithDepth(5,program5,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n ";stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(7,program7,data),data:data},helper?helper.call(depth0,depth0&&depth0.lat,options):helperMissing.call(depth0,"not",depth0&&depth0.lat,options));if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n
    \n\n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n ';stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(9,program9,data),data:data},helper?helper.call(depth0,depth0&&depth0.isSavedToMap,options):helperMissing.call(depth0,"not",depth0&&depth0.isSavedToMap,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n ";stack1=helpers["if"].call(depth0,depth0&&depth0.isSavedToMap,{hash:{},inverse:self.noop,fn:self.program(11,program11,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n \n Cancel\n
    \n\n
    \n\n
    ';return buffer});templates["delete-circle-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};return'

    Delete Circle?

    \n\n

    Are you sure you want to delete this circle?

    \n\n'});templates["delete-marker-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};return'

    Delete Marker?

    \n\n

    Are you sure you want to delete this marker?

    \n\n'});templates["delete-polygon-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};return'

    Delete Polygon?

    \n\n

    Are you sure you want to delete this polygon?

    \n\n'});templates["delete-polyline-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};return'

    Delete Polyline?

    \n\n

    Are you sure you want to delete this polyline?

    \n\n'});templates["delete-route-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};return'

    Delete Route?

    \n\n

    Are you sure you want to delete this route?

    \n\n'});templates["edit-marker-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,functionType="function",escapeExpression=this.escapeExpression;buffer+='

    Edit Marker

    \n\n

    \n\n\n

    \n\n\n';return buffer});templates["geocoder"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,functionType="function",escapeExpression=this.escapeExpression,self=this;function program1(depth0,data,depth1){var buffer="",stack1;buffer+='\n

    Locations Found

    \n\n
      \n';stack1=helpers.each.call(depth0,depth1&&depth1.locations,{hash:{},inverse:self.noop,fn:self.program(2,program2,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+="\n
    \n";return buffer}function program2(depth0,data){var buffer="",stack1;buffer+='\n
  • '+escapeExpression((stack1=depth0&&depth0.formatted_address,typeof stack1===functionType?stack1.apply(depth0):stack1))+"
  • \n";return buffer}buffer+='

    Find a Location

    \n\n\n\n';stack1=helpers["if"].call(depth0,depth0&&depth0.locations,{hash:{},inverse:self.noop,fn:self.programWithDepth(1,program1,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n';return buffer});templates["map-list"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,options,self=this,functionType="function",escapeExpression=this.escapeExpression,helperMissing=helpers.helperMissing;function program1(depth0,data){return"\n

    There are no markers on the map.

    \n"}function program3(depth0,data){var buffer="",stack1,helper,options;buffer+="\n
  • ";stack1=helpers["if"].call(depth0,depth0&&depth0.deleted,{hash:{},inverse:self.noop,fn:self.program(4,program4,data),data:data}); +var opts=$.extend(defaults,options);return this.each(function(){var txt=$(this),$color=$('
    ');txt.wrap('
    ');txt.parent().append($color);var colorsMarkup="";var prefix=txt.attr("id").replace(/-/g,"")+"_";for(var i=0;i0&&breakLine&&$.browser&&$.browser.msie&&$.browser.version<=7){breakLine="";colorsMarkup+='
  • '}colorsMarkup+='
  • '}var box=$('
      '+colorsMarkup+'
    ');var isDown=false;box.insertAfter(txt);box.hide();box.find("li.color-box").on("mouseup",function(){isDown=false;$(this).click()});box.find("li.color-box").on("mousedown",function(){isDown=true});box.find("li.color-box").click(function(){if(txt.is("input")){txt.val(opts.colors[this.id.substr(this.id.indexOf("-")+1)]);txt.blur()}if($.isFunction(defaults.onChangeColor)){defaults.onChangeColor.call(txt,opts.colors[this.id.substr(this.id.indexOf("-")+1)])}hideBox(box)});$("body").on("click",function(){hideBox(box)});$color.click(function(){setTimeout(function(){showBox(box)},10)});txt.on("blur",function(){setTimeout(function(){if(!isDown){hideBox(box)}},100)});box.click(function(event){event.stopPropagation()});var positionAndShowBox=function(box){showBox(box)};txt.click(function(event){event.stopPropagation();if(!txt.is("input")){positionAndShowBox(box)}});txt.focus(function(){positionAndShowBox(box)});function hideBox(box){if(opts.hideEffect=="fade")box.fadeOut();else if(opts.hideEffect=="slide")box.slideUp();else box.hide();updateColor()}function updateColor(){$color.css("background-color",txt.val())}function showBox(box){if(opts.showEffect=="fade")box.fadeIn();else if(opts.showEffect=="slide")box.slideDown();else box.show()}updateColor()})};(function(c){function m(a,c,d){if((a[c]||a[d])&&a[c]===a[d])throw Error("(Link) '"+c+"' can't match '"+d+"'.'")}function r(a){void 0===a&&(a={});if("object"!==typeof a)throw Error("(Format) 'format' option must be an object.");var h={};c(u).each(function(c,n){if(void 0===a[n])h[n]=A[c];else if(typeof a[n]===typeof A[c]){if("decimals"===n&&(0>a[n]||7a&&(n=this.a("negative"),k=this.a("negativeBefore"));a=Math.abs(a).toFixed(d).toString();a=a.split(".");this.a("thousand")?(m=c(a[0]).match(/.{1,3}/g),m=c(m.join(c(this.a("thousand"))))):m=a[0];this.a("mark")&&1")[0]};k.prototype.H=function(a){this.method="val";this.j=document.createElement("input");this.j.name=a;this.j.type="hidden"};k.prototype.G=function(a){function h(a,c){return[c?null:a,c?a:null]}var d=this;this.method="val";this.target=a.on("change",function(a){d.B.val(h(c(a.target).val(),d.t),{link:d,set:!0})})};k.prototype.p=function(a,h,d,k){this.g=d;this.update=!k;if("string"===typeof a&&0===a.indexOf("-tooltip-"))this.K(a,h);else if("string"===typeof a&&0!==a.indexOf("-"))this.H(a);else if("function"===typeof a)this.target=!1,this.method=a;else{if(a instanceof c||c.zepto&&c.zepto.isZ(a)){if(!h){if(a.is("input, select, textarea")){this.G(a);return}h="html"}if("function"===typeof h||"string"===typeof h&&a[h]){this.method=h;this.target=a;return}}throw new RangeError("(Link) Invalid Link.")}};k.prototype.write=function(a,c,d,k){if(!this.update||!1!==k)if(this.u=a,this.F=a=this.format(a),"function"===typeof this.method)this.method.call(this.target[0]||d[0],a,c,d);else this.target[this.method](a,c,d)};k.prototype.q=function(a){this.g=new r(c.extend({},a,this.g instanceof r?this.g.r:this.g))};k.prototype.J=function(a){this.B=a};k.prototype.I=function(a){this.t=a};k.prototype.format=function(a){return this.g.L(a)};k.prototype.A=function(a){return this.g.w(a)};k.prototype.p.prototype=k.prototype;c.Link=k})(window.jQuery||window.Zepto);(function(c){function m(e){return"number"===typeof e&&!isNaN(e)&&isFinite(e)}function r(e){return c.isArray(e)?e:[e]}function k(e,b){e.addClass(b);setTimeout(function(){e.removeClass(b)},300)}function u(e,b){return 100*b/(e[1]-e[0])}function A(e,b){if(b>=e.d.slice(-1)[0])return 100;for(var a=1,c,f,d;b>=e.d[a];)a++;c=e.d[a-1];f=e.d[a];d=e.c[a-1];c=[c,f];return d+u(c,0>c[0]?b+Math.abs(c[0]):b-c[0])/(100/(e.c[a]-d))}function a(e,b){if(100<=b)return e.d.slice(-1)[0];for(var a=1,c,f,d;b>=e.c[a];)a++;c=e.d[a-1];f=e.d[a];d=e.c[a-1];c=[c,f];return 100/(e.c[a]-d)*(b-d)*(c[1]-c[0])/100+c[0]}function h(a,b){for(var c=1,g;(a.dir?100-b:b)>=a.c[c];)c++;if(a.m)return g=a.c[c-1],c=a.c[c],b-g>(c-g)/2?c:g;a.h[c-1]?(g=a.h[c-1],c=a.c[c-1]+Math.round((b-a.c[c-1])/g)*g):c=b;return c}function d(a,b){if(!m(b))throw Error("noUiSlider: 'step' is not numeric.");a.h[0]=b}function n(a,b){if("object"!==typeof b||c.isArray(b))throw Error("noUiSlider: 'range' is not an object.");if(void 0===b.min||void 0===b.max)throw Error("noUiSlider: Missing 'min' or 'max' in 'range'.");c.each(b,function(b,g){var d;"number"===typeof g&&(g=[g]);if(!c.isArray(g))throw Error("noUiSlider: 'range' contains invalid value.");d="min"===b?0:"max"===b?100:parseFloat(b);if(!m(d)||!m(g[0]))throw Error("noUiSlider: 'range' value isn't numeric.");a.c.push(d);a.d.push(g[0]);d?a.h.push(isNaN(g[1])?!1:g[1]):isNaN(g[1])||(a.h[0]=g[1])});c.each(a.h,function(b,c){if(!c)return!0;a.h[b]=u([a.d[b],a.d[b+1]],c)/(100/(a.c[b+1]-a.c[b]))})}function E(a,b){"number"===typeof b&&(b=[b]);if(!c.isArray(b)||!b.length||2
    ").addClass(f[2]),g=["-lower","-upper"];a.dir&&g.reverse();d.children().addClass(f[3]+" "+f[3]+g[b]);return d}function Q(a,b){b.j&&(b=new c.Link({target:c(b.j).clone().appendTo(a),method:b.method,format:b.g},!0));return b}function R(a,b){var d,f=[];for(d=0;d").appendTo(b).addClass(f[1])}function V(d,b,m){function g(){return t[["width","height"][b.k]]()}function n(a){var b,c=[q.val()];for(b=0;bp&&(p=h(b,p));p=Math.max(Math.min(parseFloat(p.toFixed(7)),100),0);if(p===x[g])return 1===l.length?!1:p===H||p===k?0:!1;d.css(b.style,p+"%");d.is(":first-child")&&d.toggleClass(f[17],50d&&(e+=Math.abs(d)),100= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,options,functionType="function",escapeExpression=this.escapeExpression,self=this,blockHelperMissing=helpers.blockHelperMissing;function program1(depth0,data){var buffer="",stack1;buffer+="\n
  • ';stack1=helpers["if"].call(depth0,depth0&&depth0.icon,{hash:{},inverse:self.noop,fn:self.programWithDepth(4,program4,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=helpers["if"].call(depth0,depth0&&depth0.label,{hash:{},inverse:self.noop,fn:self.programWithDepth(6,program6,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+="
  • \n";return buffer}function program2(depth0,data,depth1){var buffer="",stack1;buffer+='href="'+escapeExpression((stack1=depth1&&depth1.url,typeof stack1===functionType?stack1.apply(depth0):stack1))+'"';return buffer}function program4(depth0,data,depth1){var buffer="",stack1;buffer+='';return buffer}function program6(depth0,data,depth1){var buffer="",stack1;buffer+=" "+escapeExpression((stack1=depth1&&depth1.label,typeof stack1===functionType?stack1.apply(depth0):stack1));return buffer}buffer+="
      \n";options={hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data};if(helper=helpers.buttons){stack1=helper.call(depth0,options)}else{helper=depth0&&depth0.buttons;stack1=typeof helper===functionType?helper.call(depth0,options):helper}if(!helpers.buttons){stack1=blockHelperMissing.call(depth0,stack1,{hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data})}if(stack1||stack1===0){buffer+=stack1}buffer+="\n
    ";return buffer});templates["circle-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,options,functionType="function",escapeExpression=this.escapeExpression,self=this,helperMissing=helpers.helperMissing;function program1(depth0,data){return"\n

    Add Circle

    \n"}function program3(depth0,data){return"\n

    Edit Circle

    \n"}function program5(depth0,data,depth1){var buffer="",stack1;buffer+='\n
    \n
    \n

    \n Address
    '+escapeExpression((stack1=depth1&&depth1.address,typeof stack1===functionType?stack1.apply(depth0):stack1))+' Change Location\n

    \n

    \n Latitude
    '+escapeExpression((stack1=depth1&&depth1.lat,typeof stack1===functionType?stack1.apply(depth0):stack1))+'
    \n

    \n Longitude
    '+escapeExpression((stack1=depth1&&depth1.lng,typeof stack1===functionType?stack1.apply(depth0):stack1))+'\n

    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n \n
    \n
    \n
    \n ';return buffer}function program7(depth0,data){return'\n + Set Location\n '}function program9(depth0,data){return'\n \n '}function program11(depth0,data){return'\n \n '}buffer+='
    \n
    \n\n';stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data},helper?helper.call(depth0,depth0&&depth0.isSavedToMap,options):helperMissing.call(depth0,"not",depth0&&depth0.isSavedToMap,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n";stack1=helpers["if"].call(depth0,depth0&&depth0.isSavedToMap,{hash:{},inverse:self.noop,fn:self.program(3,program3,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n\n\n
    \n \n ';stack1=helpers["if"].call(depth0,depth0&&depth0.lat,{hash:{},inverse:self.noop,fn:self.programWithDepth(5,program5,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n ";stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(7,program7,data),data:data},helper?helper.call(depth0,depth0&&depth0.lat,options):helperMissing.call(depth0,"not",depth0&&depth0.lat,options));if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n
    \n\n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n ';stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(9,program9,data),data:data},helper?helper.call(depth0,depth0&&depth0.isSavedToMap,options):helperMissing.call(depth0,"not",depth0&&depth0.isSavedToMap,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n ";stack1=helpers["if"].call(depth0,depth0&&depth0.isSavedToMap,{hash:{},inverse:self.noop,fn:self.program(11,program11,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n \n Cancel\n
    \n\n
    \n\n
    ';return buffer});templates["delete-circle-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};return'

    Delete Circle?

    \n\n

    Are you sure you want to delete this circle?

    \n\n'});templates["delete-marker-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};return'

    Delete Marker?

    \n\n

    Are you sure you want to delete this marker?

    \n\n'});templates["delete-polygon-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};return'

    Delete Polygon?

    \n\n

    Are you sure you want to delete this polygon?

    \n\n'});templates["delete-polyline-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};return'

    Delete Polyline?

    \n\n

    Are you sure you want to delete this polyline?

    \n\n'});templates["delete-route-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};return'

    Delete Route?

    \n\n

    Are you sure you want to delete this route?

    \n\n'});templates["edit-marker-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,functionType="function",escapeExpression=this.escapeExpression;buffer+='

    Edit Marker

    \n\n

    \n\n\n

    \n\n\n';return buffer});templates["geocoder"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,functionType="function",escapeExpression=this.escapeExpression,self=this;function program1(depth0,data,depth1){var buffer="",stack1;buffer+='\n

    Locations Found

    \n\n
      \n';stack1=helpers.each.call(depth0,depth1&&depth1.locations,{hash:{},inverse:self.noop,fn:self.program(2,program2,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+="\n
    \n";return buffer}function program2(depth0,data){var buffer="",stack1;buffer+='\n
  • '+escapeExpression((stack1=depth0&&depth0.formatted_address,typeof stack1===functionType?stack1.apply(depth0):stack1))+"
  • \n";return buffer}buffer+='

    Find a Location

    \n\n\n\n';stack1=helpers["if"].call(depth0,depth0&&depth0.locations,{hash:{},inverse:self.noop,fn:self.programWithDepth(1,program1,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n';return buffer});templates["map-list"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,options,self=this,functionType="function",escapeExpression=this.escapeExpression,helperMissing=helpers.helperMissing;function program1(depth0,data){return"\n

    There are no markers on the map.

    \n"}function program3(depth0,data){var buffer="",stack1,helper,options;buffer+="\n
  • ";stack1=helpers["if"].call(depth0,depth0&&depth0.deleted,{hash:{},inverse:self.noop,fn:self.program(4,program4,data),data:data}); if(stack1||stack1===0){buffer+=stack1}buffer+=''+escapeExpression((stack1=depth0&&depth0.address,typeof stack1===functionType?stack1.apply(depth0):stack1))+"";stack1=helpers["if"].call(depth0,depth0&&depth0.deleted,{hash:{},inverse:self.noop,fn:self.program(6,program6,data),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(8,program8,data),data:data},helper?helper.call(depth0,depth0&&depth0.deleted,options):helperMissing.call(depth0,"not",depth0&&depth0.deleted,options));if(stack1||stack1===0){buffer+=stack1}buffer+="
  • \n";return buffer}function program4(depth0,data){return''}function program6(depth0,data){return' Undo Delete'}function program8(depth0,data){return' '}function program10(depth0,data){return"\n

    There are no routes on the map.

    \n"}function program12(depth0,data){var buffer="",stack1,helper,options;buffer+="\n
  • ";stack1=helpers["if"].call(depth0,depth0&&depth0.deleted,{hash:{},inverse:self.noop,fn:self.program(4,program4,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='';stack1=helpers["if"].call(depth0,depth0&&depth0.title,{hash:{},inverse:self.noop,fn:self.programWithDepth(13,program13,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.programWithDepth(15,program15,data,depth0),data:data},helper?helper.call(depth0,depth0&&depth0.title,options):helperMissing.call(depth0,"not",depth0&&depth0.title,options));if(stack1||stack1===0){buffer+=stack1}buffer+="";stack1=helpers["if"].call(depth0,depth0&&depth0.deleted,{hash:{},inverse:self.noop,fn:self.program(17,program17,data),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(19,program19,data),data:data},helper?helper.call(depth0,depth0&&depth0.deleted,options):helperMissing.call(depth0,"not",depth0&&depth0.deleted,options));if(stack1||stack1===0){buffer+=stack1}buffer+="
  • \n";return buffer}function program13(depth0,data,depth1){var stack1;return escapeExpression((stack1=depth1&&depth1.title,typeof stack1===functionType?stack1.apply(depth0):stack1))}function program15(depth0,data,depth1){var buffer="",stack1;buffer+="Route "+escapeExpression((stack1=depth1&&depth1.count,typeof stack1===functionType?stack1.apply(depth0):stack1));return buffer}function program17(depth0,data){return' Undo Delete'}function program19(depth0,data){return' '}function program21(depth0,data){return"\n

    There are no polygons on the map.

    \n"}function program23(depth0,data){var buffer="",stack1,helper,options;buffer+="\n
  • ";stack1=helpers["if"].call(depth0,depth0&&depth0.deleted,{hash:{},inverse:self.noop,fn:self.program(4,program4,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='';stack1=helpers["if"].call(depth0,depth0&&depth0.title,{hash:{},inverse:self.noop,fn:self.programWithDepth(13,program13,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.programWithDepth(24,program24,data,depth0),data:data},helper?helper.call(depth0,depth0&&depth0.title,options):helperMissing.call(depth0,"not",depth0&&depth0.title,options));if(stack1||stack1===0){buffer+=stack1}buffer+="";stack1=helpers["if"].call(depth0,depth0&&depth0.deleted,{hash:{},inverse:self.noop,fn:self.program(26,program26,data),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(28,program28,data),data:data},helper?helper.call(depth0,depth0&&depth0.deleted,options):helperMissing.call(depth0,"not",depth0&&depth0.deleted,options));if(stack1||stack1===0){buffer+=stack1}buffer+="
  • \n";return buffer}function program24(depth0,data,depth1){var buffer="",stack1;buffer+="Polygon "+escapeExpression((stack1=depth1&&depth1.count,typeof stack1===functionType?stack1.apply(depth0):stack1));return buffer}function program26(depth0,data){return' Undo Delete'}function program28(depth0,data){return' '}function program30(depth0,data){return"\n

    There are no polylines on the map.

    \n"}function program32(depth0,data){var buffer="",stack1,helper,options;buffer+="\n
  • ";stack1=helpers["if"].call(depth0,depth0&&depth0.deleted,{hash:{},inverse:self.noop,fn:self.program(4,program4,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='';stack1=helpers["if"].call(depth0,depth0&&depth0.title,{hash:{},inverse:self.noop,fn:self.programWithDepth(13,program13,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.programWithDepth(33,program33,data,depth0),data:data},helper?helper.call(depth0,depth0&&depth0.title,options):helperMissing.call(depth0,"not",depth0&&depth0.title,options));if(stack1||stack1===0){buffer+=stack1}buffer+="";stack1=helpers["if"].call(depth0,depth0&&depth0.deleted,{hash:{},inverse:self.noop,fn:self.program(35,program35,data),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(37,program37,data),data:data},helper?helper.call(depth0,depth0&&depth0.deleted,options):helperMissing.call(depth0,"not",depth0&&depth0.deleted,options));if(stack1||stack1===0){buffer+=stack1}buffer+="
  • \n";return buffer}function program33(depth0,data,depth1){var buffer="",stack1;buffer+="Polyline "+escapeExpression((stack1=depth1&&depth1.count,typeof stack1===functionType?stack1.apply(depth0):stack1));return buffer}function program35(depth0,data){return' Undo Delete'}function program37(depth0,data){return' '}function program39(depth0,data){return"\n

    There are no circles on the map.

    \n"}function program41(depth0,data){var buffer="",stack1,helper,options;buffer+="\n
  • ";stack1=helpers["if"].call(depth0,depth0&&depth0.deleted,{hash:{},inverse:self.noop,fn:self.program(4,program4,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='';stack1=helpers["if"].call(depth0,depth0&&depth0.title,{hash:{},inverse:self.noop,fn:self.programWithDepth(13,program13,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.programWithDepth(42,program42,data,depth0),data:data},helper?helper.call(depth0,depth0&&depth0.title,options):helperMissing.call(depth0,"not",depth0&&depth0.title,options));if(stack1||stack1===0){buffer+=stack1}buffer+="";stack1=helpers["if"].call(depth0,depth0&&depth0.deleted,{hash:{},inverse:self.noop,fn:self.program(44,program44,data),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(46,program46,data),data:data},helper?helper.call(depth0,depth0&&depth0.deleted,options):helperMissing.call(depth0,"not",depth0&&depth0.deleted,options));if(stack1||stack1===0){buffer+=stack1}buffer+="
  • \n";return buffer}function program42(depth0,data,depth1){var buffer="",stack1;buffer+="Circle "+escapeExpression((stack1=depth1&&depth1.count,typeof stack1===functionType?stack1.apply(depth0):stack1));return buffer}function program44(depth0,data){return' Undo Delete'}function program46(depth0,data){return' '}buffer+='

    Markers

    \n\n× close\n\n';stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data},helper?helper.call(depth0,(stack1=depth0&&depth0.markers,stack1==null||stack1===false?stack1:stack1.length),options):helperMissing.call(depth0,"not",(stack1=depth0&&depth0.markers,stack1==null||stack1===false?stack1:stack1.length),options));if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n
      \n';stack1=helpers.each.call(depth0,depth0&&depth0.markers,{hash:{},inverse:self.noop,fn:self.program(3,program3,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n
    \n\n

    Routes

    \n\n× close\n\n';stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(10,program10,data),data:data},helper?helper.call(depth0,(stack1=depth0&&depth0.routes,stack1==null||stack1===false?stack1:stack1.length),options):helperMissing.call(depth0,"not",(stack1=depth0&&depth0.routes,stack1==null||stack1===false?stack1:stack1.length),options));if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n
      \n';stack1=(helper=helpers.forEach||depth0&&depth0.forEach,options={hash:{},inverse:self.noop,fn:self.program(12,program12,data),data:data},helper?helper.call(depth0,depth0&&depth0.routes,options):helperMissing.call(depth0,"forEach",depth0&&depth0.routes,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n
    \n\n

    Polygons

    \n\n";stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(21,program21,data),data:data},helper?helper.call(depth0,(stack1=depth0&&depth0.polygons,stack1==null||stack1===false?stack1:stack1.length),options):helperMissing.call(depth0,"not",(stack1=depth0&&depth0.polygons,stack1==null||stack1===false?stack1:stack1.length),options));if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n
      \n';stack1=(helper=helpers.forEach||depth0&&depth0.forEach,options={hash:{},inverse:self.noop,fn:self.program(23,program23,data),data:data},helper?helper.call(depth0,depth0&&depth0.polygons,options):helperMissing.call(depth0,"forEach",depth0&&depth0.polygons,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n
    \n\n

    Polylines

    \n\n";stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(30,program30,data),data:data},helper?helper.call(depth0,(stack1=depth0&&depth0.polylines,stack1==null||stack1===false?stack1:stack1.length),options):helperMissing.call(depth0,"not",(stack1=depth0&&depth0.polylines,stack1==null||stack1===false?stack1:stack1.length),options));if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n
      \n';stack1=(helper=helpers.forEach||depth0&&depth0.forEach,options={hash:{},inverse:self.noop,fn:self.program(32,program32,data),data:data},helper?helper.call(depth0,depth0&&depth0.polylines,options):helperMissing.call(depth0,"forEach",depth0&&depth0.polylines,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n
    \n\n

    Circles

    \n\n";stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(39,program39,data),data:data},helper?helper.call(depth0,(stack1=depth0&&depth0.circles,stack1==null||stack1===false?stack1:stack1.length),options):helperMissing.call(depth0,"not",(stack1=depth0&&depth0.circles,stack1==null||stack1===false?stack1:stack1.length),options));if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n
      \n';stack1=(helper=helpers.forEach||depth0&&depth0.forEach,options={hash:{},inverse:self.noop,fn:self.program(41,program41,data),data:data},helper?helper.call(depth0,depth0&&depth0.circles,options):helperMissing.call(depth0,"forEach",depth0&&depth0.circles,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n
    ";return buffer});templates["map"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,functionType="function",escapeExpression=this.escapeExpression;buffer+='
    \n\n
    \n\n
    \n +\n \n \n
    \n\n
    \n\n';return buffer});templates["marker-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,options,functionType="function",escapeExpression=this.escapeExpression,self=this,helperMissing=helpers.helperMissing;function program1(depth0,data){return"\n

    Add Marker

    \n"}function program3(depth0,data){return"\n

    Edit Marker

    \n"}function program5(depth0,data,depth1){var stack1;return escapeExpression((stack1=depth1&&depth1.icon,typeof stack1===functionType?stack1.apply(depth0):stack1))}function program7(depth0,data){return"http://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-poi.png&scale=2"}function program9(depth0,data){return'\n \n '}function program11(depth0,data){return'\n \n '}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data},helper?helper.call(depth0,depth0&&depth0.isSavedToMap,options):helperMissing.call(depth0,"not",depth0&&depth0.isSavedToMap,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n";stack1=helpers["if"].call(depth0,depth0&&depth0.isSavedToMap,{hash:{},inverse:self.noop,fn:self.program(3,program3,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n\n\n
    \n\n
    \n
    \n

    Address: ';if(helper=helpers.address){stack1=helper.call(depth0,{hash:{},data:data})}else{helper=depth0&&depth0.address;stack1=typeof helper===functionType?helper.call(depth0,{hash:{},data:data}):helper}buffer+=escapeExpression(stack1)+'

    \n

    Latitude: ';if(helper=helpers.lat){stack1=helper.call(depth0,{hash:{},data:data})}else{helper=depth0&&depth0.lat;stack1=typeof helper===functionType?helper.call(depth0,{hash:{},data:data}):helper}buffer+=escapeExpression(stack1)+'

    \n

    Longitude: ';if(helper=helpers.lng){stack1=helper.call(depth0,{hash:{},data:data})}else{helper=depth0&&depth0.lng;stack1=typeof helper===functionType?helper.call(depth0,{hash:{},data:data}):helper}buffer+=escapeExpression(stack1)+'

    \n\n Change Location\n
    \n
    \n
    \n \n \n Change Icon\n
    \n
    \n
    \n\n
    \n\n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n ';stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(9,program9,data),data:data},helper?helper.call(depth0,depth0&&depth0.isSavedToMap,options):helperMissing.call(depth0,"not",depth0&&depth0.isSavedToMap,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n ";stack1=helpers["if"].call(depth0,depth0&&depth0.isSavedToMap,{hash:{},inverse:self.noop,fn:self.program(11,program11,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n \n Cancel\n
    ';return buffer});templates["polygon-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,options,functionType="function",escapeExpression=this.escapeExpression,self=this,helperMissing=helpers.helperMissing;function program1(depth0,data){return"\n

    Add Polygon

    \n"}function program3(depth0,data){return"\n

    Edit Polygon

    \n"}function program5(depth0,data){return"Show Details"}function program7(depth0,data){return"Hide Details"}function program9(depth0,data){return'style="display:none"'}function program11(depth0,data){var buffer="",stack1,helper;buffer+='\n
    \n Point ';if(helper=helpers.count){stack1=helper.call(depth0,{hash:{},data:data})}else{helper=depth0&&depth0.count;stack1=typeof helper===functionType?helper.call(depth0,{hash:{},data:data}):helper}buffer+=escapeExpression(stack1)+'\n ×\n
    \n ';return buffer}function program13(depth0,data){return'\n \n '}function program15(depth0,data){return'\n \n '}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data},helper?helper.call(depth0,depth0&&depth0.isSavedToMap,options):helperMissing.call(depth0,"not",depth0&&depth0.isSavedToMap,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n";stack1=helpers["if"].call(depth0,depth0&&depth0.isSavedToMap,{hash:{},inverse:self.noop,fn:self.program(3,program3,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n\n\n
    \n

    ';stack1=helpers["if"].call(depth0,depth0&&depth0.hideDetails,{hash:{},inverse:self.noop,fn:self.program(5,program5,data),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(7,program7,data),data:data},helper?helper.call(depth0,depth0&&depth0.hideDetails,options):helperMissing.call(depth0,"not",depth0&&depth0.hideDetails,options));if(stack1||stack1===0){buffer+=stack1}buffer+='

    \n\n
    \n

    To add points to the polygon, you can either double click the map or add enter coordinates or addresses manually.

    \n\n
    \n ';stack1=(helper=helpers.forEach||depth0&&depth0.forEach,options={hash:{},inverse:self.noop,fn:self.program(11,program11,data),data:data},helper?helper.call(depth0,depth0&&depth0.points,options):helperMissing.call(depth0,"forEach",depth0&&depth0.points,options));if(stack1||stack1===0){buffer+=stack1}buffer+='\n
    \n
    \n\n \n\n
    \n\n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n ';stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(13,program13,data),data:data},helper?helper.call(depth0,depth0&&depth0.isSavedToMap,options):helperMissing.call(depth0,"not",depth0&&depth0.isSavedToMap,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n ";stack1=helpers["if"].call(depth0,depth0&&depth0.isSavedToMap,{hash:{},inverse:self.noop,fn:self.program(15,program15,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n \n Cancel\n
    ';return buffer});templates["polyline-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,options,functionType="function",escapeExpression=this.escapeExpression,self=this,helperMissing=helpers.helperMissing;function program1(depth0,data){return"\n

    Add Polyline

    \n"}function program3(depth0,data){return"\n

    Edit Polyline

    \n"}function program5(depth0,data){return"Show Details"}function program7(depth0,data){return"Hide Details"}function program9(depth0,data){return'style="display:none"'}function program11(depth0,data){var buffer="",stack1,helper;buffer+='\n
    \n Point ';if(helper=helpers.count){stack1=helper.call(depth0,{hash:{},data:data})}else{helper=depth0&&depth0.count;stack1=typeof helper===functionType?helper.call(depth0,{hash:{},data:data}):helper}buffer+=escapeExpression(stack1)+'\n ×\n
    \n ';return buffer}function program13(depth0,data){return'\n \n '}function program15(depth0,data){return'\n \n '}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data},helper?helper.call(depth0,depth0&&depth0.isSavedToMap,options):helperMissing.call(depth0,"not",depth0&&depth0.isSavedToMap,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n";stack1=helpers["if"].call(depth0,depth0&&depth0.isSavedToMap,{hash:{},inverse:self.noop,fn:self.program(3,program3,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n\n\n
    \n

    ';stack1=helpers["if"].call(depth0,depth0&&depth0.hideDetails,{hash:{},inverse:self.noop,fn:self.program(5,program5,data),data:data});if(stack1||stack1===0){buffer+=stack1}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(7,program7,data),data:data},helper?helper.call(depth0,depth0&&depth0.hideDetails,options):helperMissing.call(depth0,"not",depth0&&depth0.hideDetails,options));if(stack1||stack1===0){buffer+=stack1}buffer+='

    \n\n
    \n

    To add points to the polygon, you can either double click the map or add enter coordinates or addresses manually.

    \n\n
    \n ';stack1=(helper=helpers.forEach||depth0&&depth0.forEach,options={hash:{},inverse:self.noop,fn:self.program(11,program11,data),data:data},helper?helper.call(depth0,depth0&&depth0.points,options):helperMissing.call(depth0,"forEach",depth0&&depth0.points,options));if(stack1||stack1===0){buffer+=stack1}buffer+='\n
    \n
    \n\n \n\n
    \n\n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n\n
    \n\n
    \n ';stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(13,program13,data),data:data},helper?helper.call(depth0,depth0&&depth0.isSavedToMap,options):helperMissing.call(depth0,"not",depth0&&depth0.isSavedToMap,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n ";stack1=helpers["if"].call(depth0,depth0&&depth0.isSavedToMap,{hash:{},inverse:self.noop,fn:self.program(15,program15,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n \n Cancel\n
    ';return buffer});templates["route-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,options,functionType="function",escapeExpression=this.escapeExpression,self=this,helperMissing=helpers.helperMissing;function program1(depth0,data){return"\n

    Add Route

    \n"}function program3(depth0,data){return"\n

    Edit Route

    \n"}function program5(depth0,data){return"Show Details"}function program7(depth0,data){return"Hide Details"}function program9(depth0,data,depth1){var buffer="",stack1,helper,options;buffer+='\n
      \n ';stack1=(helper=helpers.forEach||depth1&&depth1.forEach,options={hash:{},inverse:self.noop,fn:self.program(10,program10,data),data:data},helper?helper.call(depth0,depth1&&depth1.locations,options):helperMissing.call(depth0,"forEach",depth1&&depth1.locations,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n
    \n ";return buffer}function program10(depth0,data){var buffer="",stack1,helper;buffer+='\n
  • \n Marker Icon \n \n ';if(helper=helpers.address){stack1=helper.call(depth0,{hash:{},data:data})}else{helper=depth0&&depth0.address;stack1=typeof helper===functionType?helper.call(depth0,{hash:{},data:data}):helper}buffer+=escapeExpression(stack1)+' \n \n \n \n
  • \n ';return buffer}function program12(depth0,data){return'\n \n '}function program14(depth0,data){return'style="display:none"'}function program16(depth0,data){return'checked="checked"'}function program18(depth0,data){return"on"}function program20(depth0,data){return'\n \n '}function program22(depth0,data){return'\n \n '}stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data},helper?helper.call(depth0,depth0&&depth0.isSavedToMap,options):helperMissing.call(depth0,"not",depth0&&depth0.isSavedToMap,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n";stack1=helpers["if"].call(depth0,depth0&&depth0.isSavedToMap,{hash:{},inverse:self.noop,fn:self.program(3,program3,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n\n\n
    \n \n \n\n ";stack1=helpers["if"].call(depth0,depth0&&depth0.locations,{hash:{},inverse:self.noop,fn:self.programWithDepth(9,program9,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n ";stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(12,program12,data),data:data},helper?helper.call(depth0,(stack1=depth0&&depth0.locations,stack1==null||stack1===false?stack1:stack1.length),options):helperMissing.call(depth0,"not",(stack1=depth0&&depth0.locations,stack1==null||stack1===false?stack1:stack1.length),options));if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n \n\n + Add Location\n\n
    \n\n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n \n \n \n
    \n\n
      \n
    • \n

      Avoid Ferries

      \n\n
      \n
      \n
      \n
      \n
      \n
      \n \n
      \n
    • \n
    • \n

      Avoid Highways

      \n\n
      \n
      \n
      \n
      \n
      \n
      \n \n
      \n
    • \n
    • \n

      Avoid Tolls

      \n\n
      \n
      \n
      \n
      \n
      \n
      \n \n
      \n
    • \n
    • \n

      Calculate Duration with Traffic

      \n\n
      \n
      \n
      \n
      \n
      \n
      \n \n
      \n
    • \n
    • \n

      Optimize Waypoints

      \n\n
      \n
      \n
      \n
      \n
      \n
      \n \n
      \n
    • \n
    • \n

      Provide Route Alternatives

      \n\n
      \n
      \n
      \n
      \n
      \n
      \n \n
      \n
    • \n
    \n\n
    \n\n
    \n ';stack1=(helper=helpers.not||depth0&&depth0.not,options={hash:{},inverse:self.noop,fn:self.program(20,program20,data),data:data},helper?helper.call(depth0,depth0&&depth0.isSavedToMap,options):helperMissing.call(depth0,"not",depth0&&depth0.isSavedToMap,options));if(stack1||stack1===0){buffer+=stack1}buffer+="\n\n ";stack1=helpers["if"].call(depth0,depth0&&depth0.isSavedToMap,{hash:{},inverse:self.noop,fn:self.program(22,program22,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n \n Cancel\n
    ';return buffer});templates["route-location-form"]=template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"];helpers=this.merge(helpers,Handlebars.helpers);data=data||{};var buffer="",stack1,helper,functionType="function",escapeExpression=this.escapeExpression,self=this;function program1(depth0,data,depth1){var buffer="",stack1;buffer+='\n

    Locations Found

    \n\n
      \n';stack1=helpers.each.call(depth0,depth1&&depth1.locations,{hash:{},inverse:self.noop,fn:self.program(2,program2,data),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+="\n
    \n";return buffer}function program2(depth0,data){var buffer="",stack1;buffer+='\n
  • '+escapeExpression((stack1=depth0&&depth0.formatted_address,typeof stack1===functionType?stack1.apply(depth0):stack1))+"
  • \n";return buffer}buffer+='

    Add Location

    \n\n\n\n';stack1=helpers["if"].call(depth0,depth0&&depth0.locations,{hash:{},inverse:self.noop,fn:self.programWithDepth(1,program1,data,depth0),data:data});if(stack1||stack1===0){buffer+=stack1}buffer+='\n\n';return buffer})})();var GoogleMaps={Views:{},Models:{}};(function(){"use strict";Backbone.Marionette.TemplateCache.prototype.compileTemplate=function(rawTemplate){return Handlebars.compile(rawTemplate)};GoogleMaps.Template=function(name){var template;if(Handlebars.templates[name]){return Handlebars.templates[name]}else{return false}};GoogleMaps.addScript=function(url,callback){if(typeof google==="undefined"){var script=document.createElement("script");if(callback)script.onload=callback;script.type="text/javascript";script.src=url;document.body.appendChild(script)}else{GoogleMaps.googleApiCallback()}};GoogleMaps.Fieldtype=function($el,options){var App=new Backbone.Marionette.Application;App.options=options;App.addRegions({content:$el});var coord=options.center.split(",");App.addInitializer(function(){var map=new GoogleMaps.Views.Map({fieldname:options.fieldname,savedData:options.savedData,width:options.width,height:options.height,mapOptions:{center:new google.maps.LatLng(parseFloat(coord[0]),parseFloat(coord[1])),zoom:options.zoom},showButtons:options.showButtons,addressFields:options.addressFields});setTimeout(function(){map.redraw();map.updateHiddenField()},100);App.content.show(map)});App.start()}})();(function(){"use strict";GoogleMaps.Models.Base=Backbone.Model.extend({initialize:function(options){var t=this;_.each(options,function(option,i){if(_.isFunction(option)){t[i]=option}});this.set(options)},toJSON:function(){var json=Backbone.Model.prototype.toJSON.call(this);delete json.api;delete json.map;delete json.infowindow;return json},isCoordinate:function(coord){return coord.match(/^([-\d.]+),(\s+)?([-\d.]+)$/)}})})();(function(){"use strict";GoogleMaps.Models.BaseMapObject=GoogleMaps.Models.Base.extend({initializeApi:function(){},edit:function(showMapList){},"delete":function(showMapList){},bindEvents:function(){},reset:function(){},buildInfoWindowContent:function(){var content=this.get("content");var _return=["
    ",_.isArray(content)?content.join(""):content];var t=this,latLng=this.getPosition();_return.push(['
    ','Edit | ','Delete',"
    ","
    "].join(""));var $content=$(_return.join(""));$content.find(".edit").click(function(e){t.edit();e.preventDefault()});$content.find(".delete").click(function(e){t.delete();e.preventDefault()});return $content.get(0)},remove:function(){this.get("infowindow").close();this.set("deleted",true);this.setMap(null)},onDragend:function(e,callback){var t=this;t.set({lat:e.latLng.lat(),lng:e.latLng.lng()});this.get("map").geocoder.geocode({location:e.latLng},function(results,status){if(status=="OK"){t.set("address",results[0].formatted_address);t.set("addressComponents",results[0].address_components)}else{t.set("address",null);t.set("addressComponents",null)}if(!t.get("customContent")){if(!t.isCoordinate(t.get("address"))){t.set("content",t.get("address").split(",").join("
    "))}else{t.set("content",t.get("address"))}t.get("infowindow").setContent(t.buildInfoWindowContent())}t.get("map").updateHiddenField();if(_.isFunction(callback)){callback(e)}})}})})();(function(){"use strict";GoogleMaps.Models.Circle=GoogleMaps.Models.BaseMapObject.extend({strokeColor:"#000000",strokeWeight:3,strokeOpacity:.6,fillColor:"#666666",fillOpacity:.6,initialize:function(options){if(!options.strokeColor){options.strokeColor=this.strokeColor}if(!options.strokeOpacity){options.strokeOpacity=this.strokeOpacity}if(!options.strokeWeight){options.strokeWeight=this.strokeWeight}if(!options.fillColor){options.fillColor=this.fillColor}if(!options.fillOpacity){options.fillOpacity=this.fillOpacity}GoogleMaps.Models.Base.prototype.initialize.call(this,options);if(!this.get("radius")){this.set("radius",100)}if(!this.get("api")){this.initializeApi(options)}else{this.get("api").setMap(this.get("map").api)}if(!this.get("infowindow")){this.set("infowindow",new google.maps.InfoWindow({maxWidth:300,content:this.buildInfoWindowContent()}))}this.bindEvents()},convertRadiusToMeters:function(radius,metric){if(!radius){radius=this.get("radius")}if(!metric){metric=this.get("metric")}radius=parseFloat(radius);if(metric=="miles"){radius*=1609.34}else if(metric=="feet"){radius*=.3048}else if(metric=="kilometers"){radius*=1e3}return radius},convertRadiusFromMeters:function(radius,metric){if(!radius){radius=this.get("radius")}if(!metric){metric=this.get("metric")}radius=parseFloat(radius);if(metric=="miles"){radius*=621371e-9}else if(metric=="feet"){radius*=3.28084}else if(metric=="kilometers"){radius*=.001}return radius},hasLocation:function(){return!_.isUndefined(this.get("lat"))&&!_.isUndefined(this.get("lng"))},initializeApi:function(options){if(!_.isObject(options)){options={}}this.set("api",new google.maps.Circle(_.extend({},options,{map:this.hasLocation()?this.get("map").api:null,center:this.hasLocation()?new google.maps.LatLng(this.get("lat"),this.get("lng")):new google.maps.LatLng(0,0),radius:this.convertRadiusToMeters(),draggable:this.get("draggable")?true:false})))},edit:function(showMapList){var t=this,view=new GoogleMaps.Views.CircleForm({model:this,map:this.get("map"),cancel:function(){GoogleMaps.Views.CircleForm.prototype.cancel.call(view);if(showMapList){t.get("map").showMapList()}}});this.get("map").showModal(view)},"delete":function(showMapList){var t=this;var view=new GoogleMaps.Views.BaseForm({template:GoogleMaps.Template("delete-circle-form"),submit:function(){t.get("api").setMap(null);t.set("deleted",true);t.get("map").updateHiddenField();if(showMapList){t.get("map").showMapList()}else{t.get("map").hideModal()}t.get("map").closeInfoWindows()},cancel:function(){if(showMapList){t.get("map").showMapList()}else{t.get("map").hideModal()}}});this.get("map").showModal(view)},getBounds:function(){return this.get("api").getBounds()},getCenter:function(){return this.get("api").getCenter()},getPosition:function(){return this.get("api").getCenter()},getDraggable:function(){return this.get("api").getDraggable()},getEditable:function(){return this.get("api").getEditable()},getMap:function(){return this.get("api").getMap()},getRadius:function(){return this.get("api").getRadius()},getVisible:function(){return this.get("api").getVisible()},setAnimation:function(value){this.get("api").setAnimation(value)},setClickable:function(value){this.get("api").setClickable(value)},setCenter:function(value){this.get("api").setCenter(value)},setDraggable:function(value){this.get("api").setDraggable(value)},setEditable:function(value){this.get("api").setEditable(value)},setMap:function(value){this.get("api").setMap(value)},setOptions:function(value){this.get("api").setOptions(value)},setRadius:function(value){this.get("api").setRadius(this.convertRadiusToMeters(value))},setVisible:function(value){this.get("api").setVisible(value)},bindEvents:function(){var t=this;google.maps.event.addListener(this.get("api"),"center_changed",function(){t.onCenterChanged.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"click",function(){t.onClick.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"dblclick",function(){t.onDblclick.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"drag",function(){t.onDrag.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"dragend",function(){t.onDragend.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"dragstart",function(){t.onDragstart.apply(t,arguments) });google.maps.event.addListener(this.get("api"),"mousedown",function(){t.onMousedown.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mousemove",function(){t.onMousemove.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mouseout",function(){t.onMouseout.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mouseover",function(){t.onMouseover.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mouseup",function(){t.onMouseup.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"radius_changed",function(){t.onRadiusChanged.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"rightclick",function(){t.onRightclick.apply(t,arguments)})},onCenterChanged:function(){var center=this.get("api").getCenter();this.set({lat:center.lat(),lng:center.lng()})},onClick:function(e){this.get("map").closeInfoWindows();this.get("infowindow").open(this.get("map").api);this.get("infowindow").setPosition(e.latLng)},onDblclick:function(){},onDrag:function(){},onDragend:function(){GoogleMaps.Models.BaseMapObject.prototype.onDragend.apply(this,arguments)},onDragstart:function(){},onMousedown:function(){},onMousemove:function(){},onMouseover:function(){},onMouseout:function(){},onMouseup:function(){},onRadiusChanged:function(){this.set("radius",Math.round(this.convertRadiusFromMeters(this.get("api").getRadius())*100)/100)},onRightclick:function(){}})})();(function(){"use strict";GoogleMaps.Models.Marker=GoogleMaps.Models.Base.extend({initialize:function(options){GoogleMaps.Models.Base.prototype.initialize.call(this,options);if(!this.get("api")){this.initializeApi(options)}else{this.get("api").setMap(this.get("map").api)}if(this.get("icon")){this.setIcon(this.get("icon"))}if(!this.get("infowindow")){this.set("infowindow",new google.maps.InfoWindow({maxWidth:300,content:this.buildInfoWindowContent()}))}this.bindEvents()},initializeApi:function(options){if(!_.isObject(options)){options={}}this.set("api",new google.maps.Marker(_.extend({},options,{map:this.get("map").api,position:new google.maps.LatLng(this.get("lat"),this.get("lng")),draggable:this.get("draggable")===false?false:true})))},isCoordinate:function(coord){return coord.match(/^([-\d.]+),(\s+)?([-\d.]+)$/)},edit:function(showMapList){var t=this,view=new GoogleMaps.Views.MarkerForm({model:this,map:this.get("map"),cancel:function(){GoogleMaps.Views.MarkerForm.prototype.cancel.call(view);if(showMapList){t.get("map").showMapList()}}});this.get("map").showModal(view)},"delete":function(showMapList){var t=this;var view=new GoogleMaps.Views.BaseForm({template:GoogleMaps.Template("delete-marker-form"),submit:function(){t.get("api").setMap(null);t.set("deleted",true);t.get("map").updateHiddenField();if(showMapList){t.get("map").showMapList()}else{t.get("map").hideModal()}},cancel:function(){if(showMapList){t.get("map").showMapList()}else{t.get("map").hideModal()}}});this.get("map").showModal(view)},buildInfoWindowContent:function(){var content=this.get("content");var _return=["
    ",_.isArray(content)?content.join(""):content];var t=this,latLng=this.get("api").getPosition();_return.push(['
    ','Edit | ','Delete',"
    ","
    "].join(""));var $content=$(_return.join(""));$content.find(".edit").click(function(e){t.edit();e.preventDefault()});$content.find(".delete").click(function(e){t.delete();e.preventDefault()});return $content.get(0)},remove:function(){this.get("infowindow").close();this.set("deleted",true);this.setMap(null)},getAnimation:function(){return this.get("api").getAnimation()},getClickable:function(){return this.get("api").getClickable()},getCursor:function(){return this.get("api").getCursor()},getDraggable:function(){return this.get("api").getDraggable()},getIcon:function(){return this.get("api").getIcon()},getMap:function(){return this.get("api").getMap()},getOpacity:function(){return this.get("api").getOpacity()},getPosition:function(){return this.get("api").getPosition()},getShape:function(){return this.get("api").getShape()},getTitle:function(){return this.get("api").getTitle()},getVisible:function(){return this.get("api").getVisible()},getZIndex:function(){return this.get("api").getZIndex()},setAnimation:function(value){this.get("api").setAnimation(value)},setClickable:function(value){this.get("api").setClickable(value)},setCursor:function(value){this.get("api").setCursor(value)},setDraggable:function(value){this.get("api").setDraggable(value)},setIcon:function(value){if(value){var width=this.get("scaledWidth")?this.get("scaledWidth"):32;var height=this.get("scaledHeight")?this.get("scaledHeight"):32;var icon={scaledSize:new google.maps.Size(width,height),url:value};if(this.get("scaleIcons")===false){this.get("api").setIcon(value)}else{this.get("api").setIcon(icon)}}else{this.get("api").setIcon(null)}},setMap:function(value){this.get("api").setMap(value)},setOpacity:function(value){this.get("api").setOpacity(value)},setOptions:function(value){this.get("api").setOptions(value)},setPosition:function(value){this.get("api").setPosition(value)},setShape:function(value){this.get("api").setShape(value)},setTitle:function(value){this.get("api").setTitle(value)},setVisible:function(value){this.get("api").setVisible(value)},setZIndex:function(value){this.get("api").setZIndex(value)},bindEvents:function(){var t=this;google.maps.event.addListener(this.get("api"),"animation_changed",function(){t.onAnimationChanged.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"click",function(){t.onClick.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"cursor_changed",function(){t.onCursorChanged.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"dblclick",function(){t.onDblclick.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"drag",function(){t.onDrag.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"dragend",function(){t.onDragend.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"draggable_changed",function(){t.onDraggableChanged.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"dragstart",function(){t.onDragstart.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"flat_changed",function(){t.onFlatChanged.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"icon_changed",function(){t.onIconChanged.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mousemove",function(){t.onMousemove.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mouseout",function(){t.onMouseout.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mouseover",function(){t.onMouseover.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mouseup",function(){t.onMouseup.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"position_changed",function(){t.onPositionChanged.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"rightclick",function(){t.onRightclick.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"shape_changed",function(){t.onShapeChanged.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"tilt_changed",function(){t.onTiltChanged.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"visible_changed",function(){t.onVisibleChanged.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"zindex_changed",function(){t.onZindexChanged.apply(t,arguments)})},onAnimationChanged:function(){},onClick:function(){this.get("map").closeInfoWindows();this.get("infowindow").open(this.get("map").api,this.get("api"))},onCursorChanged:function(){},onDblclick:function(){},onDrag:function(){},onDragend:function(e,callback){var t=this;t.set({lat:e.latLng.lat(),lng:e.latLng.lng()});this.get("map").geocoder.geocode({location:e.latLng},function(results,status){if(status=="OK"){t.set("address",results[0].formatted_address);t.set("addressComponents",results[0].address_components)}else{t.set("address",null);t.set("addressComponents",null)}if(!t.get("customContent")){if(!t.isCoordinate(t.get("address"))){t.set("content",t.get("address").split(",").join("
    "))}else{t.set("content",t.get("address"))}t.get("infowindow").setContent(t.buildInfoWindowContent())}t.get("map").updateHiddenField();if(_.isFunction(callback)){callback(e)}})},onDraggableChanged:function(){},onDragstart:function(){},onFlatChanged:function(){},onIconChanged:function(){},onMousemove:function(){},onMouseout:function(){},onMouseover:function(){},onMouseup:function(){},onPositionChanged:function(){},onRightclick:function(){},onShapeChanged:function(){},onTiltChanged:function(){},onVisibleChanged:function(){},onZindexChanged:function(){}})})();(function(){"use strict";GoogleMaps.Models.Polygon=GoogleMaps.Models.Base.extend({api:false,map:false,infowindow:false,editable:false,draggable:false,title:null,content:null,points:[],strokeColor:"#000000",strokeWeight:3,strokeOpacity:.6,fillColor:"#666666",fillOpacity:.6,initialize:function(options){if(!options.strokeColor){options.strokeColor=this.strokeColor}if(!options.strokeOpacity){options.strokeOpacity=this.strokeOpacity}if(!options.strokeWeight){options.strokeWeight=this.strokeWeight}if(!options.fillColor){options.fillColor=this.fillColor}if(!options.fillOpacity){options.fillOpacity=this.fillOpacity}GoogleMaps.Models.Base.prototype.initialize.call(this,options);var points=[];_.each(this.get("points"),function(point){points.push(new google.maps.LatLng(point.lat,point.lng))});if(!this.get("api")){this.initializeApi(points,options)}if(!this.get("infowindow")){this.set("infowindow",new google.maps.InfoWindow({maxWidth:300,content:this.buildInfoWindowContent()}))}this.bindEvents()},initializeApi:function(points,options){options.strokeColor=this.get("strokeColor");options.strokeWeight=this.get("strokeWeight");options.strokeOpacity=this.get("strokeOpacity");options.fillColor=this.get("fillColor");options.fillOpacity=this.get("fillOpacity");options.paths=points;options.map=this.get("map").api;options.zIndex=this.get("map").polygons.length;if(!this.get("api")){this.set("api",new google.maps.Polygon(options))}},edit:function(showMapList){var t=this,view=new GoogleMaps.Views.PolygonForm({api:this.get("api"),map:this.get("map"),model:this,cancel:function(){GoogleMaps.Views.PolygonForm.prototype.cancel.call(view);if(showMapList){t.get("map").showMapList()}}});this.get("map").showModal(view)},"delete":function(showMapList){var t=this;var view=new GoogleMaps.Views.BaseForm({template:GoogleMaps.Template("delete-polygon-form"),submit:function(){t.get("api").setMap(null);t.get("infowindow").close();t.set("deleted",true);t.get("map").updateHiddenField();if(showMapList){t.get("map").showMapList()}else{t.get("map").hideModal()}},cancel:function(){if(showMapList){t.get("map").showMapList()}else{t.get("map").hideModal()}}});t.get("map").showModal(view)},remove:function(){this.set("deleted",true);this.setMap(null)},buildInfoWindowContent:function(){var content=this.get("content");var _return=["
    ",_.isArray(content)?content.join(""):content];var t=this;_return.push(['
    ','Edit | ','Delete',"
    ","
    "].join(""));var $content=$(_return.join(""));$content.find(".edit").click(function(e){t.edit();e.preventDefault()});$content.find(".delete").click(function(e){t.delete();e.preventDefault()});return $content.get(0)},getDraggable:function(){return this.get("api").getDraggable()},getEditable:function(){return this.get("api").getEditable()},getMap:function(){return this.get("api").getMap()},getPath:function(){return this.get("api").getPath()},getPaths:function(){return this.get("api").getPaths()},getVisible:function(){return this.get("api").getVisible()},setDraggable:function(value){this.get("api").setDraggable(value)},setEditable:function(value){this.get("api").setEditable(value)},setMap:function(value){this.get("api").setMap(value)},setOptions:function(value){this.get("api").setOptions(value)},setPath:function(value){this.get("api").setPath(value)},setPaths:function(value){this.get("api").setPaths(value)},setPoints:function(value){var points=[];_.each(value,function(point){points.push(new google.maps.LatLng(point.lat,point.lng))});this.setPath(points)},setVisible:function(value){this.get("api").setVisible(value)},toJSON:function(){var json=GoogleMaps.Models.Base.prototype.toJSON.call(this);var points=[];if(this.get("api").getPath()){_.each(this.get("api").getPath().getArray(),function(latLng){points.push({lat:latLng.lat(),lng:latLng.lng()})})}json.points=points;return json},bindEvents:function(){var t=this;google.maps.event.addListener(this.get("api"),"click",function(){t.onClick.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"dblclick",function(){t.onDblclick.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"drag",function(){t.onDrag.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"dragend",function(){t.onDragend.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"dragstart",function(){t.onDragstart.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mousedown",function(){t.onMousedown.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mousemove",function(){t.onMousemove.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mouseout",function(){t.onMouseout.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mouseover",function(){t.onMouseover.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"mouseup",function(){t.onMouseup.apply(t,arguments)});google.maps.event.addListener(this.get("api"),"rightclick",function(){t.onRightclick.apply(t,arguments)})},onClick:function(e){if(!this.get("api").getEditable()){this.get("map").closeInfoWindows();this.get("infowindow").open(this.get("map").api);this.get("infowindow").setPosition(e.latLng)}},onDblclick:function(){},onDrag:function(){},onDragend:function(e){},onDragstart:function(){},onMousedown:function(){},onMousemove:function(){},onMouseout:function(){},onMouseover:function(){},onMouseup:function(){},onRightclick:function(){}})})();(function(){"use strict";GoogleMaps.Models.Polyline=GoogleMaps.Models.Polygon.extend({initializeApi:function(points,options){options.strokeColor=this.get("strokeColor");options.strokeWeight=this.get("strokeWeight");options.strokeOpacity=this.get("strokeOpacity");options.path=points;options.map=this.get("map").api;options.zIndex=this.get("map").polygons.length;this.set("api",new google.maps.Polyline(options))},getPaths:function(){return},edit:function(showMapList){var t=this,view=new GoogleMaps.Views.PolylineForm({api:this.get("api"),map:this.get("map"),model:this,cancel:function(){GoogleMaps.Views.PolylineForm.prototype.cancel.call(view);if(showMapList){t.get("map").showMapList()}}});this.get("map").showModal(view)},"delete":function(showMapList){var t=this;var view=new GoogleMaps.Views.BaseForm({template:GoogleMaps.Template("delete-polyline-form"),submit:function(){t.get("api").setMap(null);t.get("infowindow").close();t.set("deleted",true);t.get("map").updateHiddenField();if(showMapList){t.get("map").showMapList()}else{t.get("map").hideModal()}},cancel:function(){if(showMapList){t.get("map").showMapList()}else{t.get("map").hideModal()}}});this.get("map").showModal(view)}})})();(function(){"use strict";GoogleMaps.Models.Route=GoogleMaps.Models.Base.extend({initialize:function(options){var t=this;GoogleMaps.Models.Base.prototype.initialize.call(this,options);if(!this.get("api")){this.set("api",new google.maps.DirectionsRenderer(_.extend({},options,{draggable:false,map:this.get("map").api,suppressInfoWindows:true,suppressMarkers:true,preserveViewport:true,infoWindow:new google.maps.InfoWindow({content:"test"})})))}else{this.get("api").setMap(this.get("map").api)}if(this.get("markers")){var markers=[];_.each(this.get("markers"),function(marker,i){markers.push(new GoogleMaps.Models.RouteMarker(_.extend({},marker,{location:t.getLocations()[i],route:t,map:t.get("map"),onDragend:function(e){GoogleMaps.Models.RouteMarker.prototype.onDragend.call(this,e,function(){t.onDragend.call(t,e)})}})))});this.set("markers",markers)}if(this.getLocations().length){t.render(t.getDirectionsRequestObject())}},remove:function(){this.get("api").setMap(null);this.set("deleted",true);_.each(this.getMarkers(),function(marker){marker.remove()})},getDirectionsRequestObject:function(){return{origin:this.getOrigin(),destination:this.getDestination(),waypoints:this.getWaypoints(),avoidFerries:this.get("avoidFerries"),avoidHighways:this.get("avoidHighways"),avoidTolls:this.get("avoidTolls"),durationInTraffic:this.get("durationInTraffic"),optimizeWaypoints:this.get("optimizeWaypoints"),provideRouteAlternatives:this.get("provideRouteAlternatives"),transitOptions:this.get("transitOptions"),unitSystem:this.get("unitSystem")}},setDraggable:function(value){this.get("api").setOptions({draggable:value})},getOrigin:function(){var locations=this.getLocations();var location=locations[0];if(location){return new google.maps.LatLng(location.lat,location.lng)}return null},getDestination:function(){var locations=this.getLocations();if(locations.length<2){return null}var location=locations[locations.length-1];if(location){return new google.maps.LatLng(location.lat,location.lng)}return null},render:function(request,callback){var t=this;if(!_.isObject(request)){request=this.getDirectionsRequestObject()}this.directionsRequest(request,function(result,status){if(status=="OK"){t.setDirections(result);t.setMap(t.get("map").api)}})},getWaypoints:function(){var waypoints=[],locations=this.getLocations();if(locations.length<3){return[]}_.each(locations,function(location,i){if(i>0&&i",_.isArray(content)?content.join(""):content];var t=this;_return.push(['
    ','Edit | ','Delete',"
    ",""].join(""));var $content=$(_return.join(""));$content.find(".edit").click(function(e){t.edit();e.preventDefault()});$content.find(".delete").click(function(e){t.delete();e.preventDefault()});return $content.get(0)},edit:function(showMapList){var t=this,view=new GoogleMaps.Views.RouteForm({model:this,map:this.get("map"),cancel:function(){GoogleMaps.Views.RouteForm.prototype.cancel.call(view);if(showMapList){t.get("map").showMapList()}}});this.get("map").showModal(view)},"delete":function(showMapList){var t=this;var view=new GoogleMaps.Views.DeleteRouteForm({model:this,submit:function(){t.remove();t.get("map").updateHiddenField();if(showMapList){t.get("map").showMapList()}else{t.get("map").hideModal()}},cancel:function(){if(showMapList){t.get("map").showMapList()}else{t.get("map").hideModal()}}});this.get("map").showModal(view)},getDirections:function(){return this.get("api").getDirections()},addLocation:function(location){var t=this;var locations=this.getLocations();var i=locations.length;if(!locations){locations=[]}locations.push(location);this.set("locations",locations);var marker=new GoogleMaps.Models.RouteMarker({scaledWidth:22,scaledHeight:40,route:this,map:this.get("map"),lat:location.lat,lng:location.lng,address:location.address,draggable:true,content:location.address.split(",").join("
    "),location:location,onDragend:function(e){GoogleMaps.Models.RouteMarker.prototype.onDragend.call(this,e,function(){t.onDragend.call(t,e)})}});this.addMarker(marker)},removeLocation:function(index){var locations=this.getLocations();if(locations[index]){locations.splice(index,1)}this.set("locations",locations);this.removeMarker(index)},addMarker:function(marker){var markers=this.getMarkers();if(!markers){markers=[]}markers.push(marker);this.updateMarkerIcons();this.set("markers",markers)},removeMarker:function(index){var markers=this.getMarkers();if(markers[index]){markers[index].setMap(null);markers.splice(index,1)}this.updateMarkerIcons();this.set("markers",markers)},onDragend:function(e){},updateMarkerIcons:function(){var t=this;_.each(this.getMarkers(),function(marker,i){if(i=0){buttons.push(button)}})}this.model.set("buttons",buttons)},onRender:function(){var t=this;if(this.options.buttons){_.each(this.options.buttons,function(button,i){if(button.click){t.$el.find("a").eq(i).click(function(e){button.click.call(this,e)})}})}}})})();(function(){"use strict";GoogleMaps.Views.CircleForm=GoogleMaps.Views.BaseForm.extend({geocoder:false,template:GoogleMaps.Template("circle-form"),map:false,api:false,originalCircle:{},initialize:function(options){var t=this;this.model=false;this.geocoder=new google.maps.Geocoder;GoogleMaps.Views.BaseForm.prototype.initialize.call(this,options);this.initializeApi();this.model.get("infowindow").close();this.model.get("api").setDraggable(true);this.model.get("api").setEditable(true);this.api=this.model.get("api")},initializeApi:function(){if(!this.model){this.model=new GoogleMaps.Models.Circle({map:this.map,hideDetails:true,isNew:true,isSavedToMap:false,metric:"miles",radius:100})}this.originalCircle=this.model.toJSON()},onRender:function(){var t=this;GoogleMaps.Views.BaseForm.prototype.onRender.call(this);this.model.onRadiusChanged=function(){GoogleMaps.Models.Circle.prototype.onRadiusChanged.call(this);if(!t.isDestroyed){t.render()}};this.model.onCenterChanged=function(){GoogleMaps.Models.Circle.prototype.onCenterChanged.call(this);if(!t.isDestroyed){t.render()}};this.model.onDragend=function(e){GoogleMaps.Models.Circle.prototype.onDragend.call(this,e,function(){if(!t.isDestroyed){t.render()}})};this.$el.find(".toggle-details").click(function(e){var $panel=t.$el.find(".details");if($panel.css("display")=="none"){$panel.show();t.model.set("hideDetails",false);$(this).html("Hide Details")}else{$panel.hide();t.model.set("hideDetails",true);$(this).html("Show Details")}t.$el.find("input").focus();e.preventDefault()});this.$el.find("input").keypress(function(e){if(e.keyCode==13){t.$el.find(".add-point").click();e.preventDefault()}}).focus();this.$el.find(".set-location").click(function(e){var view=new GoogleMaps.Views.Geocoder({map:t.map,responseHandler:function(response){t.model.set({address:response.formatted_address,addressComponents:response.address_components,lat:response.geometry.location.lat(),lng:response.geometry.location.lng(),isSavedToMap:false});t.model.setCenter(response.geometry.location);t.isDestroyed=false;t.map.showModal(t)},cancel:function(){t.isDestroyed=false;t.map.showModal(t)}});t.map.showModal(view);t.model.setMap(t.map.api);e.preventDefault()});this.$el.find('[name="radius"]').blur(function(){if(t.model.get("radius")!=parseFloat($(this).val())){t.model.setRadius($(this).val())}});this.$el.find('[name="metric"]').change(function(){t.model.set("metric",$(this).val());t.model.setRadius(t.model.get("radius"))});this.$el.find('[name="metric"]').val(this.model.get("metric"));this.$el.find(".oh-google-map-tag a").click(function(e){var index=$(this).parent().index();t.removePoint(index);e.preventDefault()});this.$el.find(".simple-color-picker").simpleColorPicker().blur(function(){t.updatePolygonOptions()}).blur();this.$el.find(".slider").each(function(){var value=$(this).data("value");var start=$(this).data("start");var step=$(this).data("step");var min=$(this).data("min");var max=$(this).data("max");$(this).noUiSlider({start:parseFloat(value?value:start),step:parseFloat(step),range:{min:parseFloat(min),max:parseFloat(max)}}).change(function(e,value){$(this).next().val(value);t.updatePolygonOptions()});$(this).next().val($(this).val())});t.updatePolygonOptions()},updatePolygonOptions:function(){var options={strokeColor:this.$el.find('[name="strokeColor"]').val(),strokeOpacity:this.$el.find('[name="strokeOpacity"]').val(),strokeWeight:this.$el.find('[name="strokeWeight"]').val(),fillColor:this.$el.find('[name="fillColor"]').val(),fillOpacity:this.$el.find('[name="fillOpacity"]').val(),title:this.$el.find('[name="title"]').val(),content:this.$el.find('[name="content"]').val()};this.model.set(options);this.api.setOptions(options)},onShow:function(){var t=this;this.map.closeInfoWindows();this.map.api.setOptions({disableDoubleClickZoom:true});setTimeout(function(){t.$el.find("input").focus()},250)},onDestroy:function(){if(!this.model.get("isSavedToMap")&&this.model.get("isNew")){this.api.setMap(null)}this.map.api.setOptions({disableDoubleClickZoom:false})},isCoordinate:function(coord){return coord.match(/^([-\d.]+),(\s+)?([-\d.]+)$/)},saveToMap:function(){if(!this.model.get("isSavedToMap")){this.map.circles.push(this.model);this.model.set("isSavedToMap",true)}},submit:function(){this.api.setDraggable(false);this.api.setEditable(false);this.model.set({title:this.$el.find('[name="title"]').val(),content:this.$el.find('[name="content"]').val()});this.saveToMap();this.updatePolygonOptions();if(this.model.get("infowindow")){this.model.get("infowindow").setOptions({content:this.model.buildInfoWindowContent()})}this.map.hideModal();this.map.updateHiddenField()},reset:function(){this.model.setRadius(this.originalCircle.radius);this.model.setCenter(new google.maps.LatLng(this.originalCircle.lat,this.originalCircle.lng));this.model.set(this.originalCircle);this.model.setOptions({strokeOpacity:this.originalCircle.strokeOpacity,strokeColor:this.originalCircle.strokeColor,strokeWeight:this.originalCircle.strokeWeight,fillOpacity:this.originalCircle.fillOpacity,fillColor:this.originalCircle.fillColor})},cancel:function(){this.reset();this.model.setDraggable(false);this.model.setEditable(false);this.map.hideModal()}})})();(function(){"use strict";GoogleMaps.Views.DeleteRouteForm=GoogleMaps.Views.BaseForm.extend({template:GoogleMaps.Template("delete-route-form")})})();(function(){"use strict";GoogleMaps.Views.Geocoder=GoogleMaps.Views.BaseForm.extend({className:"oh-google-map-form oh-google-map-geocoder",template:GoogleMaps.Template("geocoder"),api:false,lastResponse:false,dblclickEvent:false,initialize:function(options){GoogleMaps.Views.BaseForm.prototype.initialize.call(this,options);if(!this.model){this.model=new Backbone.Model}this.api=new google.maps.Geocoder},onShow:function(){var t=this;setTimeout(function(){t.$el.find("input").focus()},250);this.map.api.setOptions({disableDoubleClickZoom:true});this.dblclickEvent=google.maps.event.addListener(this.map.api,"dblclick",function(e){t.geocode({location:e.latLng},function(results,status){t.responseHandler(results[0]); diff --git a/resources/js/app/templates/circle-form.handlebars b/resources/js/app/templates/circle-form.handlebars index 64cf9fe..88ea2bd 100644 --- a/resources/js/app/templates/circle-form.handlebars +++ b/resources/js/app/templates/circle-form.handlebars @@ -37,12 +37,15 @@

    + +
    +
    {{/if}} diff --git a/resources/js/templates.js b/resources/js/templates.js index c928c57..79af2d8 100644 --- a/resources/js/templates.js +++ b/resources/js/templates.js @@ -83,7 +83,7 @@ function program5(depth0,data,depth1) { + escapeExpression(((stack1 = (depth1 && depth1.lng)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) + "\n

    \n \n
    \n \n \n
    \n
    \n
    \n \n
    \n \n "; + + "\" class=\"text fullwidth\" />\n \n
    \n
    \n\n
    \n \n
    \n
    \n \n "; return buffer; }