PageSourceSearch

https://xitebio.ca/wp-content/plugins/mapsvg/dist/mapsvg-front.min.js?ver=5.16.1

js xitebio.ca collected 2026-10-04 10:35:15 UTC 443,456 bytes, 8 lines download raw bytes

1var MapSVG=function(){};!function(t){MapSVG.templatesLoaded={},"undefined"!=typeof mapsvg_paths?MapSVG.urls=mapsvg_paths:MapSVG.urls={},MapSVG.instances=[],MapSVG.userAgent=navigator.userAgent.toLowerCase(),MapSVG.touchDevice="ontouchstart"in window||0<navigator.MaxTouchPoints||0<navigator.msMaxTouchPoints,MapSVG.ios=-1<MapSVG.userAgent.indexOf("ipad")||-1<MapSVG.userAgent.indexOf("iphone")||-1<MapSVG.userAgent.indexOf("ipod"),MapSVG.android=MapSVG.userAgent.indexOf("android"),MapSVG.isPhone=window.matchMedia("only screen and (max-width: 812px)").matches,MapSVG.browser={},MapSVG.browser.ie=(-1<MapSVG.userAgent.indexOf("msie")||-1<MapSVG.userAgent.indexOf("trident")||-1<MapSVG.userAgent.indexOf("edge"))&&{},MapSVG.browser.firefox=-1<MapSVG.userAgent.indexOf("firefox");var e=window.navigator.userAgent;MapSVG.device={},MapSVG.device.ios=!!e.match(/iPad/i)||!!e.match(/iPhone/i),MapSVG.device.android=!!e.match(/Android/i),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),MapSVG.mouseCoords=function(e){return e.clientX?{x:e.clientX+t(document).scrollLeft(),y:e.clientY+t(document).scrollTop()}:e.pageX?{x:e.pageX,y:e.pageY}:MapSVG.touchDevice?(e=e.originalEvent||e).touches&&e.touches[0]?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:void 0},MapSVG.addInstance=function(e){MapSVG.instances.push(e)},MapSVG.get=function(e){return MapSVG.instances[e]},MapSVG.getById=function(t){var e=MapSVG.instances.filter(function(e){return e.id==t});if(0<e.length)return e[0]},MapSVG.getByContainerId=function(t){var e=MapSVG.instances.filter(function(e){return e.$map.attr("id")==t});if(0<e.length)return e[0]},MapSVG.extend=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},MapSVG.ucfirst=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},MapSVG.parseBoolean=function(e){switch(String(e).toLowerCase()){case"on":case"true":case"1":case"yes":case"y":return!0;case"off":case"false":case"0":case"no":case"n":return!1;default:return}},MapSVG.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},MapSVG.safeURL=function(e){return 0!=e.indexOf("http://")&&0!=e.indexOf("https://")||(e="//"+e.split("://").pop()),e.replace(/^.*\/\/[^\/]+/,"")},MapSVG.convertToText=function(e){var t=[];if(null===e)return null;if(void 0===e)return'""';if("object"==typeof e&&null==e.join){var o;for(o in e)if(e.hasOwnProperty(o)){var i='"'+o.replace(/\"/g,'\\"')+'"';t.push(i+": "+MapSVG.convertToText(e[o]))}return"{"+t.join(",")+"}"}if("object"!=typeof e||null==e.join)return"function"==typeof e?e.toString().replace("function anonymous","function"):JSON.stringify(e);for(o in e)t.push(MapSVG.convertToText(e[o]));return"["+t.join(",")+"]"},"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),Math.hypot=Math.hypot||function(){for(var e=0,t=arguments.length,o=0;o<t;o++){if(arguments[o]===1/0||arguments[o]===-1/0)return 1/0;e+=arguments[o]*arguments[o]}return Math.sqrt(e)},SVGElement.prototype.getTransformToElement=SVGElement.prototype.getTransformToElement||function(e){return e.getScreenCTM().inverse().multiply(this.getScreenCTM())},Object.values||(Object.values=function(t){return Object.keys(t).map(function(e){return t[e]})})}(jQuery),function(t){MapSVG.Controller=function(e){if(this.container=e.container,this.mapsvg=e.mapsvg,this.template=e.template,this.scrollable=void 0===e.scrollable||e.scrollable,this.withToolbar=void 0===e.withToolbar||e.withToolbar,this.autoresize=MapSVG.parseBoolean(e.autoresize),this.templates={toolbar:Handlebars.compile(this.getToolbarTemplate()),main:this.getMainTemplate()},this.data=e.data,this.width=e.width,this.color=e.color,this.events={},e.events)for(var t in e.events)"function"==typeof e.events[t]&&(this.events[t]=e.events[t]);this._init()},MapSVG.Controller.prototype.viewDidLoad=function(){this.updateScroll(),this.autoresize&&(this.adjustHeight(),this.resizeSensor.setScroll())},MapSVG.Controller.prototype.viewDidAppear=function(){},MapSVG.Controller.prototype._viewDidLoad=function(){this.updateScroll()},MapSVG.Controller.prototype.viewDidDisappear=function(){},MapSVG.Controller.prototype.updateScroll=function(){if(this.scrollable){var e=this;this.contentWrap.nanoScroller({preventPageScrolling:!0,iOSNativeScrolling:!0}),setTimeout(function(){e.contentWrap.nanoScroller({preventPageScrolling:!0,iOSNativeScrolling:!0})},300)}},MapSVG.Controller.prototype.adjustHeight=function(){var e=this;e.container.height(e.container.find(".mapsvg-auto-height").outerHeight()+(e.toolbarView?e.toolbarView.outerHeight():0))},MapSVG.Controller.prototype._init=function(){this.render(),this.init()},MapSVG.Controller.prototype.init=function(){},MapSVG.Controller.prototype.getToolbarTemplate=function(){return""},MapSVG.Controller.prototype.getMainTemplate=function(){return this.template},MapSVG.Controller.prototype.render=function(){var e=this;this.view=t("<div />").attr("id","mapsvg-controller-"+this.name).addClass("mapsvg-controller-view"),this.contentWrap=t("<div />").addClass("mapsvg-controller-view-wrap"),this.contentWrap2=t("<div />"),this.contentSizer=t("<div />").addClass("mapsvg-auto-height"),this.contentView=t("<div />").addClass("mapsvg-controller-view-content"),this.contentSizer.append(this.contentView),this.scrollable&&(this.contentWrap.addClass("nano"),this.contentWrap2.addClass("nano-content")),this.contentWrap.append(this.contentWrap2),this.contentWrap2.append(this.contentSizer),this.withToolbar&&this.templates.toolbar&&(this.toolbarView=t("<div />").addClass("mapsvg-controller-view-toolbar"),this.view.append(this.toolbarView)),this.view.append(this.contentWrap),this.container.append(this.view),this.container.data("controller",this),this.width&&this.view.css({width:this.width}),this.color&&this.view.css({"background-color":this.color}),e.viewReadyToFill(),this.redraw(),setTimeout(function(){e._viewDidLoad(),e.viewDidLoad(),e.setEventHandlersCommon(),e.setEventHandlers()},1)},MapSVG.Controller.prototype.viewReadyToFill=function(){var e=this;e.autoresize&&(e.resizeSensor=new MapSVG.ResizeSensor(this.contentSizer[0],function(){e.adjustHeight(),e.updateScroll(),e.events.resize&&e.events.resize.call(e,e.mapsvg)}))},MapSVG.Controller.prototype.redraw=function(e){void 0!==e&&(this.data=e);try{this.contentView.html(this.templates.main(this.data))}catch(e){console.error(e),this.contentView.html("")}this.withToolbar&&this.templates.toolbar&&this.toolbarView.html(this.templates.toolbar(this.data)),this.updateTopShift(),this.noPadding&&this.contentView.css({padding:0}),this.updateScroll()},MapSVG.Controller.prototype.updateTopShift=function(){var e=this;this.withToolbar&&(e.contentWrap.css({top:e.toolbarView.outerHeight(!0)+"px"}),setTimeout(function(){e.contentWrap.css({top:e.toolbarView.outerHeight(!0)+"px"})},100),setTimeout(function(){e.contentWrap.css({top:e.toolbarView.outerHeight(!0)+"px"})},200),setTimeout(function(){e.contentWrap.css({top:e.toolbarView.outerHeight(!0)+"px"}),e.updateScroll()},500))},MapSVG.Controller.prototype.setEventHandlersCommon=function(){},MapSVG.Controller.prototype.setEventHandlers=function(){},MapSVG.Controller.prototype.destroy=function(){delete this.resizeSensor,this.view.empty().remove()}}(jQuery),function(c){MapSVG.DatabaseService=function(e,t){var o=this;this.mapsvg=t,this.map_id=e.map_id,this.table=e.table,this.perpage=parseInt(e.perpage)||0,this.sortBy=e.sortBy||null,this.sortDir=e.sortDir||null,this.type=e.type||"mysql",this.loaded=!1,"local"==this.type&&(this.dbObject=e.dbObject),this.server="mysql"==this.type?new MapSVG.ServerMySQL({map_id:this.map_id,table:this.table,perpage:this.perpage,mapsvg:this.mapsvg}):new MapSVG.ServerLocal({storage:this.dbObject}),this.lastChangeTime=Date.now(),this.cols=[],this.schemaDict={},this.index={},this.page=1,this.query=new MapSVG.DatabaseQuery,this.query.set({sort:[{field:this.sortBy,order:this.sortDir}],perpage:this.perpage}),this.events={create:[],update:[],change:[],schemaChange:[],dataLoaded:[],beforeLoad:[]},this.schema=new MapSVG.DatabaseSchema(e,t),this.schema.on("change",function(){o.getAll(),o.trigger("schemaChange")})},MapSVG.DatabaseService.setQuery=function(e){},MapSVG.DatabaseService.prototype.setPerpage=function(e){this.server.perpage=e},MapSVG.DatabaseService.prototype.lastChangeTime=function(){return this.lastChangeTime},MapSVG.DatabaseService.prototype.onFirstPage=function(){return 1===this.query.page},MapSVG.DatabaseService.prototype.onLastPage=function(){return!1===this.server.hasMoreRecords},MapSVG.DatabaseService.prototype.import=function(e,t){var o=this,i=o.getSchemaFieldByType("location"),s="en";return i&&i.language&&(s=i.language),e=this.formatCSV(e),this.server.import(e,s,t).done(function(){o.getAll()})},MapSVG.DatabaseService.prototype.create=function(e){var t=this;return this.server.create(e).done(function(){t.trigger("create",e),t.trigger("change",e)})},MapSVG.DatabaseService.prototype.update=function(e){var t=this;return this.server.update(e).done(function(){t.trigger("update",e),t.trigger("change",e)})},MapSVG.DatabaseService.prototype.delete=function(e){var t=this;return this.server.delete(e).done(function(){t.trigger("delete",e),t.trigger("change",e)})},MapSVG.DatabaseService.prototype.clear=function(e){var t=this;return this.server.clear().done(function(){t.getAll(),t.trigger("delete"),t.trigger("change")})},MapSVG.DatabaseService.prototype.getLoadedObject=function(e){return this.server.getLoadedObject(e)},MapSVG.DatabaseService.prototype.getAll=function(e){var t=this;
1if(t.trigger("beforeLoad",e),this.mapsvg.options.database.noFiltersNoLoad&&0===Object.keys(t.query.filters).length){defer=c.Deferred();var o=this.rows;return defer.promise(),defer.resolve(o),t.server.fill({objects:[]}),t.trigger("dataLoaded"),defer}"object"==typeof e&&Object.keys(e).length&&!e.page&&(t.query.page=1),t.query.set(e),this.page=e&&e.page?parseInt(e.page):this.page;var i=t.query.get();return this.schema.loaded()||(i.with_schema=!0),this.mapsvg.editMode&&void 0!==i.filterout&&delete i.filterout,this.server.get(i).done(function(e){!t.schema.loaded()&&e.schema&&t.schema.set(e.schema),t.loaded=!0,t.trigger("dataLoaded")})},MapSVG.DatabaseService.prototype.fill=function(e){this.server.fill(e),!this.schema.loaded()&&e.schema&&this.schema.set(e.schema),this.loaded=!0,this.trigger("dataLoaded")},MapSVG.DatabaseService.prototype.getLoaded=function(){return this.server.rows},MapSVG.DatabaseService.prototype.formatData=function(e){return e},MapSVG.DatabaseService.prototype.formatCSV=function(r){var l=this;return r.forEach(function(e,t){var o={};for(var i in e){var s=l.schema.getField(i);if("post"===i&&(s={type:"post"}),void 0!==s)switch(s.type){case"region":o[i]=e[i].split(",").map(function(e){return e.trim()}).filter(function(t){return void 0!==l.mapsvg.getRegion(t)||void 0!==l.mapsvg.regions.find(function(e){return e.title===t})}).map(function(t){var e=l.mapsvg.getRegion(t);return void 0===e&&(e=l.mapsvg.regions.find(function(e){return e.title===t})),{id:e.id,title:e.title}});break;case"location":if(e[i].match(/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/g)){var a=e[i].split(",").map(function(e){return parseFloat(e)});2==a.length&&-90<a[0]&&a[0]<90&&-180<a[1]&&a[1]<180?o[i]={lat:a[0],lng:a[1]}:o[i]=""}else e[i]&&(o[i]={address:e[i]});"object"==typeof o[i]&&(o[i].img=l.mapsvg.getData().options.defaultMarkerImage);break;case"select":if((s=l.schema.getField(i)).multiselect){var n=l.schema.getField(i).options.map(function(e){return e.label});o[i]=e[i].split(",").map(function(e){return e.trim()}).filter(function(e){return-1!==n.indexOf(e)}).map(function(t){return l.schema.getField(i).options.filter(function(e){return e.label==t})[0]})}else o[i]=e[i];break;case"radio":case"text":case"textarea":case"status":default:o[i]=e[i]}}r[t]=o}),r},MapSVG.DatabaseService.prototype.on=function(e,t){this.lastChangeTime=Date.now(),this.events[e]||(this.events[e]=[]),this.events[e].push(t)},MapSVG.DatabaseService.prototype.trigger=function(e,t){this.events[e]&&this.events[e].length&&this.events[e].forEach(function(e){e&&e(t)})},MapSVG.DatabaseService.prototype.onSchemaChange=function(e){this.onSchemaChangeCallbacks.push(e)},MapSVG.DatabaseService.prototype.getSchema=function(e){return this.schema.get(e)},MapSVG.DatabaseService.prototype.getSchemaField=function(e){return this.schema.getField(e)},MapSVG.DatabaseService.prototype.getSchemaFieldByType=function(e){return this.schema.getFieldByType(e)},MapSVG.DatabaseService.prototype.setSchema=function(e){return this.schema.set(e)},MapSVG.DatabaseService.prototype.loadSchema=function(e){return this.schema.load(e)},MapSVG.DatabaseService.prototype.saveSchema=function(e){return this.schema.save(e)},MapSVG.DatabaseService.prototype.getColumns=function(e){return this.schema.getColumns(e)},MapSVG.DatabaseSchema=function(e,t){this.mapsvg=t,this.map_id=e.map_id,this.table=e.table,this.lastChangeTime=Date.now(),this.cols=[],this.schema=[],this.schemaDict={},this.events={create:[],update:[],change:[]}},MapSVG.DatabaseSchema.prototype.loaded=function(e){return 0!==this.schema.length},MapSVG.DatabaseSchema.prototype.set=function(e){var o=this;e&&(o.schema=e.map(function(t){return t.visible=MapSVG.parseBoolean(t.visible),"region"==t.type&&(t.options=[],t.optionsDict={},o.mapsvg.regions.forEach(function(e){t.options.push({id:e.id,title:e.title}),t.optionsDict[e.id]=e.title?e.title:e.id})),o.schemaDict[t.name]=t}))},MapSVG.DatabaseSchema.prototype.save=function(e){var t=this;for(var o in this.set(e),this.schema)this.schema[o]||this.schema.splice(o,1);return e=(e=(e=(e=(e=JSON.stringify(e)).replace(/select/g,"!mapsvg-encoded-slct")).replace(/table/g,"!mapsvg-encoded-tbl")).replace(/database/g,"!mapsvg-encoded-db")).replace(/varchar/g,"!mapsvg-encoded-vc"),c.post(ajaxurl,{action:"mapsvg_save_schema",schema:e,map_id:this.map_id,table:this.table,_wpnonce:MapSVG.nonce}).done(function(){t.trigger("change")})},MapSVG.DatabaseSchema.prototype.get=function(e){return this.schema},MapSVG.DatabaseSchema.prototype.getField=function(e){return"id"==e?{name:"id",visible:!0,type:"id"}:this.schemaDict[e]},MapSVG.DatabaseSchema.prototype.getFieldByType=function(t){var o=null;return this.schema.forEach(function(e){e.type===t&&(o=e)}),o},MapSVG.DatabaseSchema.prototype.load=function(e){var t=this;return c.get(ajaxurl,{action:"mapsvg_get_schema",map_id:this.map_id,table:this.table},null,"json").done(function(e){t.set(e)})},MapSVG.DatabaseSchema.prototype.getColumns=function(o){o=o||{};var e=this.get().slice(0);
1"regions"==this.table&&e.unshift({name:"title",visible:!0,type:"title"});var t=!0;e.forEach(function(e){"id"==e.name&&(t=!1)}),t&&e.unshift({name:"id",visible:!0,type:"id"});var i,s=0!==Object.keys(o).length,a=[];s?e.forEach(function(e){for(var t in i=!0,o)i=e[t]==o[t];i&&a.push(e)}):a=e;return a},MapSVG.DatabaseSchema.prototype.on=function(e,t){this.lastChangeTime=Date.now(),this.events[e]||(this.events={}),this.events[e].push(t)},MapSVG.DatabaseSchema.prototype.trigger=function(e){this.events[e]&&this.events[e].length&&this.events[e].forEach(function(e){e&&e()})},MapSVG.Server=function(e){this.index={},this.hasMoreRecords=!1},MapSVG.Server.prototype.reindex=function(){var o=this;this.index={},this.rows&&this.rows.forEach(function(e,t){o.index[e.id]=t})},MapSVG.Server.prototype.getLoadedObject=function(e){var t=this.index[e];return null!=t?this.rows[t]:null},MapSVG.ServerMySQL=function(e){this.map_id=e.map_id,this.table=e.table,this.perpage=e.perpage,this.rows=[],MapSVG.Server.call(this)},MapSVG.extend(MapSVG.ServerMySQL,MapSVG.Server),MapSVG.ServerMySQL.prototype.formatData=function(e){var t={};for(var o in e)!e[o]||"object"!=typeof e[o]&&"function"!=typeof e[o]||null==e[o].getOptions?null===e[o]||void 0===e[o]||"object"==typeof e[o]&&0===e[o].length?t[o]="":t[o]=e[o]:t[o]=e[o].getOptions();return JSON.stringify(t)},MapSVG.ServerMySQL.prototype.actionData=function(e,t){return t.action=e,t.map_id=this.map_id,t.table=this.table,t.perpage=this.perpage,t._wpnonce=MapSVG.nonce,t},MapSVG.ServerMySQL.prototype.fill=function(e){var t=this;e.objects&&e.objects.length?(t.hasMoreRecords=!!(this.perpage&&e.objects.length>this.perpage),t.hasMoreRecords&&e.objects.pop(),t.rows=e.objects):(t.hasMoreRecords=!1,t.rows=[]),t.reindex()},MapSVG.ServerMySQL.prototype.get=function(e){var t=this;return void 0!==e.perpage&&(this.perpage=e.perpage),c.getJSON(ajaxurl,this.actionData("mapsvg_data_get_all",e)).done(function(e){t.fill(e)})},MapSVG.ServerMySQL.prototype.import=function(e,o,i){var t,s,a,n=this,r=[];for(t=0,s=e.length;t<s;t+=50)a=e.slice(t,t+50),r.push(a);if(0<r.length){var l=0,p=r[0][0]&&r[0][0].location?1e3:0;defer=c.Deferred(),defer.promise(),n.completeChunks=0,r.forEach(function(t){setTimeout(function(){var e=JSON.stringify(t);c.post(ajaxurl,n.actionData("mapsvg_data_import",{data:e,language:o,convertLatlngToAddress:i}),null,"json").done(function(e){n.completeChunk(r,defer)})},l+=p)})}return defer},MapSVG.ServerMySQL.prototype.completeChunk=function(e,t){this.completeChunks++,this.completeChunks===e.length&&t.resolve()},MapSVG.ServerMySQL.prototype.create=function(t){var o=this;this.rows.push(t);var e=c.extend({},t);e.post&&delete e.post;var i=this.formatData(e);return c.post(ajaxurl,this.actionData("mapsvg_data_create",{data:i}),null,"json").done(function(e){}).then(function(e){return t.id=e.id,o.reindex(),t})},MapSVG.ServerMySQL.prototype.update=function(e){var t=this.index[e.id];if(void 0!==t){c.extend(this.rows[t],e);var o=c.extend({},e);o.post&&delete o.post;var i=this.formatData(o);return c.post(ajaxurl,this.actionData("mapsvg_data_update",{data:i}),null,"json")}},MapSVG.ServerMySQL.prototype.delete=function(e){var t=this,o=this.index[e];return this.rows.splice(o,1),c.post(ajaxurl,this.actionData("mapsvg_data_delete",{data:{id:e}}),null,"json").done(function(){t.reindex()})},MapSVG.ServerMySQL.prototype.clear=function(e){var t=this;return c.post(ajaxurl,this.actionData("mapsvg_data_clear",{data:{}}),null,"json").done(function(){this.rows=[],t.reindex()})},MapSVG.ServerLocal=function(e){this.rows=e.storage,MapSVG.Server.call(this,e),this.reindex()},MapSVG.extend(MapSVG.ServerLocal,MapSVG.Server),MapSVG.ServerLocal.prototype.get=function(e){defer=c.Deferred();var t=this.rows;return defer.promise(),defer.resolve(t),defer},MapSVG.ServerLocal.prototype.create=function(e){if(e.id){var t=this.index[e.id];if(this.rows[t])return this.update(e)}else e.id=this.getId();return this.rows.push(e),this.reindex(),defer=c.Deferred(),defer.promise(),defer.resolve(e),defer},MapSVG.ServerLocal.prototype.update=function(e){defer=c.Deferred();var t=this.index[e.id];if(this.rows[t]){for(var o in e)this.rows[t][o]=e[o];this.rows[t]=e}else this.rows.push(e);return this.reindex(),defer.promise(),defer.resolve(e),defer},MapSVG.ServerLocal.prototype.delete=function(e){var t=this.index[e];return this.rows.splice(t,1),this.reindex(),defer=c.Deferred(),defer.promise(),defer.resolve(this.storage),defer},MapSVG.ServerLocal.prototype.getId=function(){var e=this.rows.map(function(e){return e.id});return e.length||(e=[0]),e?Math.max.apply(null,e)+1:1},MapSVG.Filters=function(e){this.schema={},this.schemaDict={},this.fields={},this.events={change:[]},this.setSchema(e)},MapSVG.Filters.prototype.set=function(e){this.fields=e},MapSVG.Filters.prototype.save=function(e){this.fields=e},MapSVG.Filters.prototype.reset=function(e){this.fields={}},MapSVG.Filters.prototype.get=function(e){return this.fields},MapSVG.Filters.prototype.getField=function(e){return this.schemaDict[e]},MapSVG.Filters.prototype.getSchema=function(e){return this.schema},MapSVG.Filters.prototype.setSchema=function(e){var o=this;return e&&e.forEach(function(e){var t=e.parameterName.split(".")[1];o.schemaDict[t]=e}),this.schema=e,this.schema},MapSVG.Filters.prototype.on=function(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)},MapSVG.Filters.prototype.trigger=function(e){var t=this;this.events[e]&&this.events[e].length&&this.events[e].forEach(function(e){e&&e(t)}
1)},MapSVG.DatabaseQuery=function(e){e=e||{},this.sort=e.sort||{},this.sortBy=e.sortBy||null,this.sortDir=e.sortDir||null,this.page=e.page||1,this.perpage=e.perpage||0,this.search=e.search,this.searchField=e.searchField,this.filters=e.filters||{},this.filterout=e.filterout||{}},MapSVG.DatabaseQuery.prototype.set=function(e){for(var t in e)"filters"==t?this.setFilters(e[t]):this[t]=e[t]},MapSVG.DatabaseQuery.prototype.get=function(){return{search:this.search,searchField:this.searchField,searchFallback:this.searchFallback,filters:this.filters,filterout:this.filterout,page:this.page,sort:this.sort,perpage:this.perpage}},MapSVG.DatabaseQuery.prototype.setFilters=function(e){for(var t in e)null===e[t]||""===e[t]||void 0===e[t]?this.filters[t]&&delete this.filters[t]:this.filters[t]=e[t]},MapSVG.DatabaseQuery.prototype.setFilterOut=function(e){for(var t in e)this.filterout[t]=e[t]},MapSVG.DatabaseQuery.prototype.resetFilters=function(e){this.filters={}},MapSVG.DatabaseQuery.prototype.setFilterField=function(e,t){this.filters[e]=t}}(jQuery),function(e){MapSVG.DetailsController=function(e){MapSVG.Controller.call(this,e),this.modal=e.modal},MapSVG.extend(MapSVG.DetailsController,MapSVG.Controller),MapSVG.DetailsController.prototype.getToolbarTemplate=function(){return this.withToolbar?'<div class="mapsvg-popover-close mapsvg-details-close"></div>':""},MapSVG.DetailsController.prototype.viewDidLoad=function(){this.events&&this.events.shown&&this.events.shown.call(this,this.mapsvg),this.modal&&MapSVG.isPhone&&this.mapsvg.getData().options.detailsView.mobileFullscreen&&!this.mobileCloseBtn&&(this.mobileCloseBtn=e('<button class="mapsvg-mobile-modal-close mapsvg-btn">'+this.mapsvg.getData().options.mobileView.labelClose+"</button>"),this.view.append(this.mobileCloseBtn))},MapSVG.DetailsController.prototype.setEventHandlers=function(){var t=this;this.view.on("click",".mapsvg-popover-close, .mapsvg-mobile-modal-close",function(e){e.stopPropagation(),t.destroy(),t.events&&t.events.closed&&t.events.closed.call(t,t.mapsvg)})}}(jQuery),function($){MapSVG.DirectoryController=function(e){this.database=e.database,this.noPadding=!0,this.position=e.position,this.search=e.search,this.filters=e.filters,MapSVG.Controller.call(this,e)},MapSVG.extend(MapSVG.DirectoryController,MapSVG.Controller),MapSVG.DirectoryController.prototype.getToolbarTemplate=function(){return'<div class="mapsvg-directory-filter-wrap filter-wrap"></div>',"</div>","</div>",'<div class="mapsvg-directory-search-wrap"><div class="mapsvg-directory-filter-wrap filter-wrap"></div></div></div>'},MapSVG.DirectoryController.prototype.viewDidLoad=function(){this.menuBtn=$('<div class="mapsvg-button-menu"><i class="mapsvg-icon-menu"></i> '+this.mapsvg.getData().options.mobileView.labelList+"</div>"),this.mapBtn=$('<div class="mapsvg-button-map"><i class="mapsvg-icon-map"></i> '+this.mapsvg.getData().options.mobileView.labelMap+"</div>"),MapSVG.isPhone&&this.mapsvg.options.menu.hideOnMobile&&("map"==this.mapsvg.getData().options.menu.showFirst?this.toggle(!1):this.toggle(!0)),this.mobileButtons=$('<div class="mapsvg-mobile-buttons"></div>'),this.mobileButtons.append(this.menuBtn,this.mapBtn),!1!==this.mapsvg.getData().options.menu.on&&this.mobileButtons.appendTo(this.mapsvg.getData().$wrapAll),this.events&&this.events.shown&&this.events.shown.call(this.view)},MapSVG.DirectoryController.prototype.setEventHandlers=function(){var _this=this,_data=_this.mapsvg.getData();$(window).on("resize",function(){_this.updateTopShift()}),this.menuBtn.on("click",function(){_this.toggle(!0)}),this.mapBtn.on("click",function(){_this.toggle(!1),_this.mapsvg.redraw()}),this.view.on("click.menu.mapsvg",".mapsvg-directory-item",function(e){e.preventDefault();var objID=$(this).data("object-id"),regions,marker,detailsViewObject,eventObject,skipPopover;if(_this.deselectItems(),_this.selectItems(objID),MapSVG.isPhone&&_this.mapsvg.getData().options.menu.showMapOnClick&&_this.toggle(!1),"regions"==_this.mapsvg.getData().options.menu.source?(regions=[_this.mapsvg.getRegion(objID)],eventObject=regions[0],detailsViewObject=regions[0]):(detailsViewObject=_this.database.getLoadedObject(objID),eventObject=detailsViewObject,detailsViewObject.regions&&(regions=detail
1sViewObject.regions.map(function(e){return _this.mapsvg.getRegion(e.id)}).filter(function(e){return void 0!==e}))),detailsViewObject.location&&detailsViewObject.location.marker&&(marker=detailsViewObject.location.marker),_this.mapsvg.getData().options.actions.directoryItem.click.showDetails&&_this.mapsvg.loadDetailsView(detailsViewObject),regions&&0<regions.length&&(_this.mapsvg.getData().options.actions.directoryItem.click.zoom&&_this.mapsvg.zoomTo(regions,_this.mapsvg.getData().options.actions.directoryItem.click.zoomToLevel),1<regions.length&&_this.mapsvg.setMultiSelect(!0),regions.forEach(function(t){var o=t.getCenter();if(e.clientX=o[0],e.clientY=o[1],_this.mapsvg.getData().options.actions.directoryItem.click.selectRegion&&_this.mapsvg.selectRegion(t,!0),_this.mapsvg.getData().options.actions.directoryItem.click.showRegionPopover&&(_this.mapsvg.getData().options.actions.directoryItem.click.zoom?setTimeout(function(){_this.mapsvg.showPopover(t)},500):_this.mapsvg.showPopover(t)),_this.mapsvg.getData().options.actions.directoryItem.click.fireRegionOnClick){var i=_this.mapsvg.getData().events;i&&i["click.region"]&&i&&i["click.region"].call(t,e,_this.mapsvg)}}),1<regions.length&&_this.mapsvg.setMultiSelect(!1,!1)),marker){if(_this.mapsvg.getData().options.actions.directoryItem.click.zoomToMarker&&_this.mapsvg.zoomTo(marker,_this.mapsvg.getData().options.actions.directoryItem.click.zoomToMarkerLevel),_this.mapsvg.getData().options.actions.directoryItem.click.showMarkerPopover&&(_this.mapsvg.getData().options.actions.directoryItem.click.zoomToMarker?setTimeout(function(){_this.mapsvg.showPopover(detailsViewObject)},500):_this.mapsvg.showPopover(detailsViewObject)),_this.mapsvg.getData().options.actions.directoryItem.click.fireMarkerOnClick){var events=_this.mapsvg.getData().events;events&&events["click.marker"]&&events&&events["click.marker"].call(marker,e,_this.mapsvg)}_this.mapsvg.selectMarker(marker)}_this.events.click&&_this.events.click.call($(this),e,eventObject,_this.mapsvg);var actions=_this.mapsvg.getData().options.actions;if(actions.directoryItem.click.goToLink){var linkParts=actions.directoryItem.click.linkField.split("."),url;if(1<linkParts.length){var obj=linkParts.shift(),attr="."+linkParts.join(".");if("Region"==obj?regions[0]&&regions[0].data&&(url=eval("regions[0].data"+attr)):detailsViewObject&&(url=eval("detailsViewObject"+attr)),url)if(actions.directoryItem.click.newTab){var win=window.open(url,"_blank");win.focus()}else window.location.href=url}}if(actions.directoryItem.click.showAnotherMap){if(_data.editMode)return alert('"Show another map" action is disabled in the preview'),!0;var linkParts=actions.directoryItem.click.showAnotherMapField.split("."),url;if(1<linkParts.length){var obj=linkParts.shift(),attr="."+linkParts.join("."),map_id;if("Region"==obj?regions[0]&&regions[0].data&&(map_id=eval("regions[0].data"+attr)):detailsViewObject&&(map_id=eval("detailsViewObject"+attr)),map_id){var container=actions.directoryItem.click.showAnotherMapContainerId?$("#"+actions.directoryItem.click.showAnotherMapContainerId):_data.$map;jQuery.get(ajaxurl,{action:"mapsvg_get",id:map_id},function(data){container.find("svg").length&&container.mapSvg().destroy(),eval("var options = "+data),container.mapSvg(options)})}}}}).on("mouseover.menu.mapsvg",".mapsvg-directory-item",function(t){var e,o,i,s,a=$(this).data("object-id");"regions"==_this.mapsvg.getData().options.menu.source?(i=(e=[_this.mapsvg.getRegion(a)])[0],o=e[0]):((i=o=_this.database.getLoadedObject(a)).regions&&(e=o.regions.map(function(e){return _this.mapsvg.getRegion(e.id)})),o.location&&(s=o.location.marker)),e&&e.length&&(_this.mapsvg.highlightRegions(e),e.forEach(function(e){e&&!e.disabled&&_this.mapsvg.getData().options.mouseOver&&_this.mapsvg.getData().options.mouseOver.call(e,t,_this)})),s&&(_this.mapsvg.highlightMarker(s),_this.mapsvg.options.actions.directoryItem.hover.centerOnMarker&&_this.mapsvg.centerOn(s)),_this.events.mouseover&&_this.events.mouseover.call($(this),t,i,_this.mapsvg)}).on("mouseout.menu.mapsvg",".mapsvg-directory-item",function(t){var e,o,i,s,a=$(this).data("object-id");"regions"==_this.mapsvg.getData().options.menu.source?(i=(e=[_this.mapsvg.getRegion(a)])[0],o=e[0]):((i=o=_this.database.getLoadedObject(a)).regions&&(e=o.regions.map(function(e){return _this.mapsvg.getRegion(e.id)}
1)),o.location&&(s=o.location.marker)),e&&e.length&&(_this.mapsvg.unhighlightRegions(e),e.forEach(function(e){e&&!e.disabled&&_this.mapsvg.getData().options.mouseOut&&_this.mapsvg.getData().options.mouseOut.call(e,t,_this)})),s&&_this.mapsvg.unhighlightMarker(s),_this.events.mouseout&&_this.events.mouseout.call($(this),t,i,_this.mapsvg)}),this.contentView.on("click",".mapsvg-category-item",function(){var e=$(this).next(".mapsvg-category-block");e[0].style.maxHeight||e.hasClass("active")?e[0].style.maxHeight=null:e[0].style.maxHeight=e[0].scrollHeight+"px",$(this).hasClass("active")?($(this).toggleClass("active",!1),$(this).next(".mapsvg-category-block").addClass("collapsed").removeClass("active")):(_this.mapsvg.options.menu.categories.collapseOther&&($(this).parent().find(".mapsvg-category-item.active").removeClass("active"),$(this).parent().find(".mapsvg-category-block.active").removeClass("active").addClass("collapsed")),$(this).toggleClass("active",!0),$(this).next(".mapsvg-category-block").removeClass("collapsed").addClass("active")),$(".mapsvg-category-block.collapsed").each(function(e,t){t.style.maxHeight=null})})},MapSVG.DirectoryController.prototype.highlightItems=function(e){var t=this;"object"!=typeof e&&(e=[e]),e.forEach(function(e){t.view.find("#mapsvg-directory-item-"+e).addClass("hover")})},MapSVG.DirectoryController.prototype.unhighlightItems=function(){this.view.find(".mapsvg-directory-item").removeClass("hover")},MapSVG.DirectoryController.prototype.selectItems=function(e){var t=this;"object"!=typeof e&&(e=[e]),e.forEach(function(e){t.view.find("#mapsvg-directory-item-"+e).addClass("selected")}),t.scrollable&&t.contentWrap.nanoScroller({scrollTo:t.view.find("#mapsvg-directory-item-"+e[0])})},MapSVG.DirectoryController.prototype.deselectItems=function(){this.view.find(".mapsvg-directory-item").removeClass("selected")},MapSVG.DirectoryController.prototype.removeItems=function(e){this.view.find("#mapsvg-directory-item-"+e).remove()},MapSVG.DirectoryController.prototype.addFilter=function(e){},MapSVG.DirectoryController.prototype.filterOut=function(e){var i=this;if("regions"==this.database.table){var s={};i.mapsvg.getData().options.menu.filterout.field&&(s.field=i.mapsvg.getData().options.menu.filterout.field,s.val=i.mapsvg.getData().options.menu.filterout.val),e=e.filter(function(e){var t=!0,o=i.mapsvg.getData().options.regionStatuses;return o[e.status]&&(t=!o[e.status].disabled),t&&s.field&&(t=e[s.field]!=s.val),t})}return e},MapSVG.DirectoryController.prototype.loadItemsToDirectory=function(){var e,i=this;if(!i.database.loaded)return!1;if(i.mapsvg.options.menu.categories&&i.mapsvg.options.menu.categories.on&&i.mapsvg.options.menu.categories.groupBy){var s=i.mapsvg.options.menu.categories.groupBy;if(void 0===i.database.getSchemaField(s)||void 0===i.database.getSchemaField(s).options)return!1;e=i.database.getSchemaField(s).options.map(function(t){var e=i.database.getLoaded(),o=(e=i.filterOut(e)).filter(function(e){return"regions"!==s?e[s]==t.value:-1!==(void 0!==e[s]&&e[s].length?e[s]:[]).map(function(e){return e.id}).indexOf(t.id)});return t.counter=o.length,"regions"===s&&(t.label=t.title,t.value=t.id),{category:t,items:o}}),i.mapsvg.options.menu.categories.hideEmpty&&(e=e.filter(function(e){return 0<e.category.counter}))}else e=this.database.getLoaded();try{this.contentView.html(this.templates.main({items:e}))}catch(e){console.error('MapSVG: Error in the "Directory item" template'),console.error(e)}if(0==e.length&&this.contentView.html('<div class="mapsvg-no-results">'+this.mapsvg.getData().options.menu.noResultsText+"</div>"),i.mapsvg.options.menu.categories.on)if(i.mapsvg.options.menu.categories.collapse&&1<e.length)this.contentView.find(".mapsvg-category-block").addClass("collapsed");else if(i.mapsvg.options.menu.categories.collapse&&1===e.length){this.contentView.find(".mapsvg-category-item").addClass("active"),this.contentView.find(".mapsvg-category-block").addClass("active");var t=this.contentView.find(".mapsvg-category-block");0<t.length&&(t[0].style.maxHeight=t.scrollHeight+"px")}else if(!i.mapsvg.options.menu.categories.collapse){this.contentView.find(".mapsvg-category-item").addClass("active"),this.contentView.find(".mapsvg-category-block").addClass("active"),this.contentView.find(".mapsvg-category-block").each(function(e,t){t.style.maxHeight=t.scrollHeight+"px"})}this.setFilters(),this.updateScroll()},MapSVG.DirectoryController.prototype.getRegion=function(e){var t;if("regions"==this.mapsvg.getData().options.menu.source)t=this.mapsvg.getRegion(e);else{var o=this.database.getLoadedObject(e);o.region_id&&(t=this.mapsvg.getRegion(o.region_id))}return t},MapSVG.DirectoryController.prototype.setFilters=function(){this.updateTopShift()},MapSVG.DirectoryController.prototype.toggle=function(e){var t=this;e?(this.container.parent().show(),t.mapsvg.getData().$mapContainer.hide(),this.menuBtn.addClass("active"),this.mapBtn.removeClass("active")):(this.container.parent().hide(),t.mapsvg.getData().$mapContainer.show(),this.menuBtn.removeClass("active"),this.mapBtn.addClass("active")),this.container.parent().is(":visible")?MapSVG.isPhone&&this.container.height()<parseInt(this.mapsvg.getData().options.menu.minHeight)&&(t.mapsvg.getData().$wrap.css("height",parseInt(this.mapsvg.getData().options.menu.minHeight)+"px"),t.updateScroll()):MapSVG.isPhone&&(t.mapsvg.getData().$wrap.css("height","auto"),t.updateScroll()),this.updateTopShift()},MapSVG.DirectoryController.prototype.addPagination=function(e){this.contentView.append('<div class="mapsvg-pagination-container"></div>'),this.contentView.find(".mapsvg-pagination-container").html(e)}}(jQuery),jQuery,MapSVG.FiltersController=function(e){MapSVG.DetailsController.call(this,e)},MapSVG.extend(MapSVG.FiltersController,MapSVG.DetailsController),jQuery,MapSVG.Location=function(e,t){this.img=e.img,this.setImage(this.img),this.lat=void 0!==e.lat?parseFloat(e.lat):void 0,this.lng=void 0!==e.lng?parseFloat(e.lng):void 0,this.x=void 0!==e.x?parseFloat(e.x):void 0,this.y=void 0!==e.y?parseFloat(e.y):void 0,this.address=new MapSVG.LocationAddress(e.address)},MapSVG.Location.prototype.setImage=function(e){var t=e.split("/").pop();-1!==e.indexOf("uploads")&&(t="uploads/"+t),this.img=t},MapSVG.Location.prototype.setLatLng=function(e){this.lat=e.lat,this.lng=e.lng},MapSVG.Location.prototype.__defineGetter__("markerImageUrl",function(){return this.img&&0===this.img.indexOf("uploads/")?MapSVG.urls.uploads+"markers/"+this.img.replace("uploads/",""):MapSVG.urls.root+"markers/"+(this.img||"_pin_default.png")}),MapSVG.Location.prototype.toJSON=function(){return{img:this.img,lat:this.lat,lng:this.lng,x:this.x,y:this.y,address:this.address}},jQuery,MapSVG.LocationAddress=function(e){for(var t in e)this[t]=e[t]},MapSVG.LocationAddress.prototype.__defineGetter__("state",function(){return"US"===this.country_short?this.administrative_area_level_1:null}),MapSVG.LocationAddress.prototype.__defineGetter__("state_short",function(){return"US"===this.country_short?this.administrative_area_level_1_short:null}),MapSVG.LocationAddress.prototype.__defineGetter__("county",function(){return"US"===this.country_short?this.administrative_area_level_2:null}),MapSVG.LocationAddress.prototype.__defineGetter__("zip",function(){return this.postal_code}),function($){MapSVG.Map=function(e,t){var o='<div>\n  <p>This is the demo content of the <strong>Region %templateType%</strong>.</p>\n  <p>Click on the following link to edit the content of this window: <a href="#" class="mapsvg-template-link" data-template="%templateTypeSnake%Region">Menu > Templates > Region %templateType%</a>.</p>\n  <p>More information about templates: <a href="https://mapsvg.com/docs/map-editor/templates" target="_blank">mapsvg.com/docs/map-editor/templates</a></p>\n</div>\n<hr />\n\n\x3c!-- Region fields are available in this template --\x3e\n<h5>{{#if title}} {{title}} {{else}} {{id}} {{/if}}</h5>\n<p>Status: {{status_text}}</p>\n\n\x3c!-- Show all linked Database Objects: --\x3e\n{{#each objects}}\n\n  \x3c!-- DB Object are available inside of this block --\x3e\n\n  <h5>{{title}}</h5>\n  \x3c!-- When you need to render a field as HTML, use 3 curly braces instead of 2:--\x3e\n  <p>{{{description}}}</p>\n  <p><em>{{location.address.formatted}}</em></p>\n\n  \x3c!-- Show all images: --\x3e\n  {{#each images}}\n    \x3c!-- Image fields "thumbnail", "medium", "full" --\x3e\n    \x3c!-- are available in this block                --\x3e\n    <img src="{{thumbnail}}" />\n  {{/each}}\n\n{{/each}}',i='<div>\n  <p>This is the demo content of the <strong>DB Object %templateType%</strong>.</p>\n  <p>Click on the following link to edit the content of this window: <a href="#" class="mapsvg-template-link" data-template="%templateTypeSnake%Region">Menu > Templates > Region %templateType%</a>.</p>\n  <p>More information about templates: <a href="https://mapsvg.com/docs/map-editor/templates" target="_blank">mapsvg.com/docs/map-editor/templates</a></p>\n</div>\n<hr />\n\n\x3c!-- DB Object fields are available in this template. --\x3e\n<h5>{{title}}</h5>\n\x3c!-- When you need to render a fields as HTML, use 3 curly braces instead of 2:--\x3e\n<p>{{{description}}}</p>\n<p><em>{{location.address.formatted}}</em></p>\n\n\x3c!-- Show all images: --\x3e\n{{#each images}}\n  \x3c!-- Image fields "thumbnail", "medium", "full" --\x3e\n  \x3c!-- are available in this block                --\x3e\n  <img src="{{thumbnail}}" />\n{{/each}}\n\n\x3c!-- Show all linked Regions, comma-separated: --\x3e\n<p> Regions: \n  {{#each regions}}\n    \x3c!-- Region fields are available in this block --\x3e\n    {{#
1if title}}\n      {{title}}\n    {{else}}\n      {{id}}\n    {{/if}}{{#unless @last}}, {{/unless}}\n  {{/each}}\n</p>';this.defaults={markerLastID:0,regionLastID:0,dataLastID:1,disableAll:!1,width:null,height:null,lockAspectRatio:!1,padding:{top:0,left:0,right:0,bottom:0},maxWidth:null,maxHeight:null,minWidth:null,minHeight:null,loadingText:"Loading map...",colorsIgnore:!1,colors:{baseDefault:"#000000",background:"#eeeeee",selected:40,hover:20,directory:"#fafafa",detailsView:"",status:{},clusters:"",clustersBorders:"",clustersText:"",clustersHover:"",clustersHoverBorders:"",clustersHoverText:"",markers:{base:{opacity:100,saturation:100},hovered:{opacity:100,saturation:100},unhovered:{opacity:40,saturation:100},active:{opacity:100,saturation:100},inactive:{opacity:40,saturation:100}}},regions:{},clustering:{on:!1},viewBox:[],cursor:"default",manualRegions:!1,onClick:null,mouseOver:null,mouseOut:null,menuOnClick:null,beforeLoad:null,afterLoad:null,zoom:{on:!0,limit:[0,10],delta:2,buttons:{on:!0,location:"right"},mousewheel:!0,fingers:!0},scroll:{on:!0,limit:!1,background:!1,spacebar:!1},responsive:!0,tooltips:{on:!1,position:"bottom-right",template:"",maxWidth:"",minWidth:100},popovers:{on:!1,position:"top",template:"",centerOn:!0,width:300,maxWidth:50,maxHeight:50},multiSelect:!1,regionStatuses:{1:{label:"Enabled",value:"1",color:"",disabled:!1},0:{label:"Disabled",value:"0",color:"",disabled:!0}},events:{afterLoad:"function(){\n  // var mapsvg = this;\n  // var regions = mapsvg.regions;\n  // var dbObjects = mapsvg.database.getLoaded();\n}",beforeLoad:"function(){\n  // var mapsvg = this;\n  // var settings = mapsvg.options;\n  // console.log(settings);\n}",databaseLoaded:"function (){\n  // var mapsvg = this;\n  // var dbObjects = mapsvg.database.getLoaded();\n}","click.region":"function (e, mapsvg){\n  // var region = this;\n  // console.log(region);\n}","mouseover.region":"function (e, mapsvg){\n  // var region = this;\n  // console.log(region);\n}","mouseout.region":"function (e, mapsvg){\n  // var region = this;\n  // console.log(region);\n}","click.marker":"function (e, mapsvg){\n  // var marker = this;\n  // console.log(marker);\n}","mouseover.marker":"function (e, mapsvg){\n  // var marker = this;\n  // console.log(marker);\n}","mouseout.marker":"function (e, mapsvg){\n  // var marker = this;\n  // console.log(marker);\n}","click.directoryItem":"function (e, regionOrObject, mapsvg){\n  // var itemjQueryObject = this;\n}","mouseover.directoryItem":"function (e, regionOrObject, mapsvg){\n  // var itemjQueryObject = this;\n}","mouseout.directoryItem":"function (e, regionOrObject, mapsvg){\n  // var itemjQueryObject = this;\n}","shown.popover":"function (mapsvg){\n  // var popoverjQueryObject = this;\n}","closed.popover":"function (mapsvg){\n  // var popoverjQueryObject = this;\n}","closed.detailsView":"function (mapsvg){\n  // var detailsjQueryObject = this;\n}","shown.detailsView":"function (mapsvg){\n  // var detailsjQueryObject = this;\n}"},css:"#mapsvg-map-%id% .mapsvg-tooltip {\n\n}\n#mapsvg-map-%id% .mapsvg-popover {\n\n}\n#mapsvg-map-%id% .mapsvg-details-container {\n\n}\n#mapsvg-map-%id% .mapsvg-directory-item {\n\n}\n#mapsvg-map-%id% .mapsvg-region-label {\n  /* background-color: rgba(255,255,255,.6); */\n  font-size: 11px;\n  padding: 3px 5px;\n  border-radius: 4px;\n}\n#mapsvg-map-%id% .mapsvg-marker-label {\n  padding: 3px 5px;\n  /*\n  border-radius: 4px;\n  background-color: white;\n  margin-top: -4px;\n  */\n}\n#mapsvg-map-%id% .mapsvg-filters-wrap {\n\n}\n\n\n\n\n\n\n",templates:{popoverRegion:o.replace(/%templateType%/g,"Popover").replace(/%templateTypeSnake%/g,"popover"),popoverMarker:i.replace(/%templateType%/g,"Popover").replace(/%templateTypeSnake%/g,"popover"),tooltipRegion:"\x3c!-- Region fields are available in this template --\x3e\n{{id}} - {{title}}",tooltipMarker:"\x3c!-- DB Object fields are available in this template --\x3e\n{{title}}",directoryItem:"\x3c!-- If Directory Source = Database: DB Object fields are available in this template --\x3e\n\x3c!-- If Directory Source = Regions: Region fields are available in this template --\x3e\n{{title}}",directoryCategoryItem:'\x3c!-- Available fields: "label", "value", "counter" --\x3e\n<span class="mapsvg-category-label">{{label}}</span>\n<span class="mapsvg-category-counter">{{counter}}</span>\n<span class="mapsvg-chevron"></span>',detailsView:i.replace(/%templateType%/g,"Details View").replace(/%templateTypeSnake%/g,"detailsView"),detailsViewRegion:o.replace(/%templateType%/g,"Details View").replace(/%templateTypeSnake%/g,"detailsView"),labelMarker:"\x3c!-- DB Object fields are available in this template --\x3e\n{{title}}",labelRegion:"\x3c!-- Region fields are available in this template --\x3e\n{{title}}",labelLocation:"You are here!"},gauge:{on:!1,labels:{low:"low",high:"high"},colors:{lowRGB:null,highRGB:null,low:"#550000",high:"#ee0000"},min:0,max:0},filters:{on:!0,source:"database",location:"header",modalLocation:"mapContainer",width:"100%",hide:!1,buttonText:"Filters",clearButtonText:"Clear all",clearButton:!1,padding:""},menu:{on:!1,hideOnMobile:!0,location:"leftSidebar",locationMobile:"leftSidebar",search:!1,containerId:"",searchPlaceholder:"Search...",searchFallback:!1,source:"database",showFirst:"map",showMapOnClick:!0,minHeight:"400",sortBy:"id",sortDirection:"desc",categories:{on:!1,groupBy:"",hideEmpty:!0,collapse:!0,collapseOther:!0},clickActions:{region:"default",marker:"default",directoryItem:{triggerClick:!0,showPopover:!1,showDetail
1s:!0}},detailsViewLocation:"overDirectory",noResultsText:"No results found",filterout:{field:"",cond:"=",val:""}},database:{pagination:{on:!0,perpage:30,next:"Next",prev:"Prev.",showIn:"directory"},loadOnStart:!0,table:""},actions:{map:{afterLoad:{selectRegion:!1}},region:{click:{addIdToUrl:!1,showDetails:!0,showDetailsFor:"region",filterDirectory:!1,loadObjects:!1,showPopover:!1,showPopoverFor:"region",goToLink:!1,linkField:"Region.link"},touch:{showPopover:!1}},marker:{click:{showDetails:!0,showPopover:!1,goToLink:!1,linkField:"Object.link"},touch:{showPopover:!1}},directoryItem:{click:{showDetails:!0,showPopover:!1,goToLink:!1,selectRegion:!0,fireRegionOnClick:!0,linkField:"Object.link"},hover:{centerOnMarker:!1}}},detailsView:{location:"mapContainer",containerId:"",width:"100%",mobileFullscreen:!0},mobileView:{labelMap:"Map",labelList:"List",labelClose:"Close"},googleMaps:{on:!1,apiKey:"",loaded:!1,center:"auto",type:"roadmap",minZoom:1,style:"default",styleJSON:[]},groups:[],floors:[],layersControl:{on:!1,position:"top-left",label:"Show on map",expanded:!0,maxHeight:"100%"},floorsControl:{on:!1,position:"top-left",label:"Floors",expanded:!1,maxHeight:"100%"},containers:{leftSidebar:{on:!1,width:"250px"},rightSidebar:{on:!1,width:"250px"},header:{on:!0,height:"auto"},footer:{on:!1,height:"auto"}},labelsMarkers:{on:!1},labelsRegions:{on:!1},svgFileVersion:1,fitMarkers:!1,fitMarkersOnStart:!1,controls:{location:"right",zoom:!0,zoomReset:!1,userLocation:!1}},this.markerOptions={src:MapSVG.urls.root+"markers/pin1_red.png"},this.init(t,$("#"+e))},MapSVG.Map.prototype={setMarkersClickAsLink:function(){var t=this;this.database.loadSchema().done(function(e){e&&e.forEach(function(e){"marker"==e.type&&(t.markerIsLink=MapSVG.parseBoolean(e.isLink),t.markerUrlField=e.urlField)})})},setGroups:function(){var o=this;o.groups=o.options.groups,o.groups.forEach(function(t){t.objects&&t.objects.length&&t.objects.forEach(function(e){o.$svg.find("#"+e.value).toggle(t.visible)})})},setLayersControl:function(e){var o=this;e&&$.extend(!0,o.options.layersControl,e),o.options.layersControl.on?(o.$layersControl||(o.$layersControl=$('<div class="mapsvg-layers-control"></div>'),o.$layersControlLabel=$('<div class="mapsvg-layers-label"></div>').appendTo(o.$layersControl),o.$layersControlListWrap=$('<div class="mapsvg-layers-list-wrap"></div>').appendTo(o.$layersControl),o.$layersControlListNano=$('<div class="nano"></div>').appendTo(o.$layersControlListWrap),o.$layersControlList=$('<div class="mapsvg-layers-list nano-content"></div>').appendTo(o.$layersControlListNano),o.$layersControl.appendTo(o.$mapContainer)),o.$layersControl.show(),o.$layersControlLabel.html(o.options.layersControl.label),o.$layersControlList.empty(),o.$layersControl.removeClass("mapsvg-top-left mapsvg-top-right mapsvg-bottom-left mapsvg-bottom-right"),o.$layersControl.addClass("mapsvg-"+o.options.layersControl.position),o.options.menu.on&&!o.options.menu.customContainer&&-1!==o.options.layersControl.position.indexOf("left")&&o.$layersControl.css("left",o.options.menu.width),o.$layersControl.css({"max-height":o.options.layersControl.maxHeight}),o.options.groups.forEach(function(e){$('<div class="mapsvg-layers-item" data-group-id="'+e.id+'"><input type="checkbox" class="ios8-switch ios8-switch-sm" '+(e.visible?"checked":"")+" /><label>"+e.title+"</label> </div>").appendTo(o.$layersControlList)}),o.$layersControlListNano.nanoScroller({preventPageScrolling:!0,iOSNativeScrolling:!0}),o.$layersControl.off(),o.$layersControl.on("click",".mapsvg-layers-item",function(){var t=$(this).data("group-id"),e=$(this).find("input");e.prop("checked",!e.prop("checked")),o.options.groups.forEach(function(e){e.id===t&&(e.visible=!e.visible)}),o.setGroups()}),o.$layersControlLabel.on("click",function(){o.$layersControl.toggleClass("closed")}),o.$layersControl.toggleClass("closed",!o.options.layersControl.expanded)):o.$layersControl&&o.$layersControl.hide()},setFloorsControl:function(e){var t=this;e&&$.extend(!0,t.options.floorsControl,e),t.options.floorsControl.on?(t.$floorsControl||(t.$floorsControl=$('<div class="mapsvg-floors-control"></div>
1'),t.$floorsControlLabel=$('<div class="mapsvg-floors-label"></div>').appendTo(t.$floorsControl),t.$floorsControlListWrap=$('<div class="mapsvg-floors-list-wrap"></div>').appendTo(t.$floorsControl),t.$floorsControlListNano=$('<div class="nano"></div>').appendTo(t.$floorsControlListWrap),t.$floorsControlList=$('<div class="mapsvg-floors-list nano-content"></div>').appendTo(t.$floorsControlListNano),t.$floorsControl.appendTo(t.$map)),t.$floorsControlLabel.html(t.options.floorsControl.label),t.$floorsControlList.empty(),t.$floorsControl.removeClass("mapsvg-top-left mapsvg-top-right mapsvg-bottom-left mapsvg-bottom-right"),t.$floorsControl.addClass("mapsvg-"+t.options.floorsControl.position),t.$floorsControl.css({"max-height":t.options.floorsControl.maxHeight}),t.options.floors.forEach(function(e){$('<div class="mapsvg-floors-item" data-floor-id="'+e.object_id+'"><label>'+e.title+"</label> </div>").appendTo(t.$floorsControlList)}),t.$floorsControlListNano.nanoScroller({preventPageScrolling:!0,iOSNativeScrolling:!0}),t.$floorsControl.off(),t.$floorsControl.on("click",".mapsvg-floors-item",function(){var e=$
1(this).data("floor-id");t.setFloor(e)}),t.$floorsControlLabel.on("click",function(){t.$floorsControl.toggleClass("closed")}),t.$floorsControl.toggleClass("closed",!t.options.floorsControl.expanded)):t.$floorsControl&&t.$floorsControl.hide()},setFloor:function(e){var t=this;t.$floorsControl.find(".mapsvg-floors-item").toggleClass("active",!1),t.$floorsControl.find('[data-floor-id="'+e+'"]').toggleClass("active",!0),t.options.floors.forEach(function(e){t.$svg.find("#"+e.object_id).hide()});var o=t.$svg.find("#"+e);o.show();var i=(o=new MapObject(o,t)).getBBox();t._viewBox=i,t.setViewBox(t._viewBox),t.zoomLevels=null,t.zoomLevel=1,t.setZoom(),o=null},getGroupSelectOptions:function(){var t,e=[],o=[],i=[];return this.$svg.find("g").each(function(e){(t=$(this)[0].getAttribute("id"))&&o.push({label:t,value:t})}),e.push({title:"SVG Layers / Groups",options:o}),this.$svg.find("path,ellipse,circle,polyline,polygon,rectangle,img,text").each(function(e){(t=$(this)[0].getAttribute("id"))&&i.push({label:t,value:t})}),e.push({title:"Other SVG objects",options:i}),e},loadDataObjects:function(e){return this.database.getAll(e)},loadDirectory:function(){var e=this;if("database"===e.options.menu.source&&!e.database.loaded)return!1;e.options.menu.on&&e.controllers.directory.loadItemsToDirectory(),e.setPagination()},setPagination:function(){var e=this;e.$pagerMap&&e.$pagerMap.empty().remove(),e.$pagerDir&&e.$pagerDir.empty().remove(),e.options.database.pagination.on&&0!==e.options.database.pagination.perpage&&(e.$directory.toggleClass("mapsvg-with-pagination",-1!==["directory","both"].indexOf(e.options.database.pagination.showIn)),e.$map.toggleClass("mapsvg-with-pagination",-1!==["map","both"].indexOf(e.options.database.pagination.showIn)),e.options.menu.on&&(e.$pagerDir=e.getPagination(),e.controllers.directory.addPagination(e.$pagerDir)),e.$pagerMap=e.getPagination(),e.$map.append(e.$pagerMap))},getPagination:function(t){var o=this,e=$('<nav class="mapsvg-pagination"><ul class="pager">\x3c!--<li class="mapsvg-first"><a href="#">First</a></li>--\x3e<li class="mapsvg-prev"><a href="#">&larr; '+o.options.database.pagination.prev+" "+o.options.database.pagination.perpage+'</a></li><li class="mapsvg-next"><a href="#">'+o.options.database.pagination.next+" "+o.options.database.pagination.perpage+' &rarr;</a></li>\x3c!--<li class="mapsvg-last"><a href="#">Last</a></li>--\x3e</ul></nav>');return o.database.onFirstPage()&&o.database.onLastPage()?e.hide():(e.find(".mapsvg-prev").removeClass("disabled"),e.find(".mapsvg-first").removeClass("disabled"),e.find(".mapsvg-last").removeClass("disabled"),e.find(".mapsvg-next").removeClass("disabled"),o.database.onLastPage()&&e.find(".mapsvg-next").addClass("disabled")&&e.find(".mapsvg-last").addClass("disabled"),o.database.onFirstPage()&&e.find(".mapsvg-prev").addClass("disabled")&&e.find(".mapsvg-first").addClass("disabled")),e.on("click",".mapsvg-next:not(.disabled)",function(e){e.preventDefault(),o.database.onLastPage()||o.database.getAll({page:o.database.query.page+1}).done(function(){t&&t()})}).on("click",".mapsvg-prev:not(.disabled)",function(e){e.preventDefault(),o.database.onFirstPage()||o.database.getAll({page:o.database.query.page-1}).done(function(){t&&t()})}).on("click",".mapsvg-first:not(.disabled)",function(e){e.preventDefault(),o.database.onFirstPage()||o.database.getAll({page:1}).done(function(){t&&t()})}).on("click",".mapsvg-last:not(.disabled)",function(e){e.preventDefault(),o.database.onLastPage()||o.database.getAll({lastpage:!0}).done(function(){t&&t()})}),e},deleteMarkers:function(){for(;this.markers.length;)this.markers[0].delete&&this.markers[0].delete()},deleteClusters:function(){var e=this;if(e.markersClusters)for(;e.markersClusters.length;)e.markersClusters[0].destroy&&e.markersClusters[0].destroy(),e.markersClusters.splice(0,1);e.clusters={},e.markersClusters=[],e.markersClustersDict={}},addLocations:function(){var t=this;t.firstDataLoad=void 0===t.firstDataLoad;var e=this.database.getLoaded(),o=this.database.getSchemaFieldByType("location");if(!o)return!1;(o=o.name)&&(t.firstDataLoad&&t.setMarkerImagesDependency(),t.deleteMarkers(),t.deleteCluster
1s(),t.clusters={},t.clustersByZoom=[],t.markersClusters=[],t.markersClustersDict={},e&&0<e.length&&(e.forEach(function(e){if(e[o]&&!(e[o]instanceof Location)&&(e[o].lat&&e[o].lng||e[o].x&&e[o].y)&&(e[o].img=t.getMarkerImage(e,e[o]),e[o]=new MapSVG.Location(e[o]),e[o].lat&&e[o].lng||e[o].x&&e[o].y))new MapSVG.Marker({location:e[o],object:e,mapsvg:t})}),t.options.clustering.on?t.startClusterizer():(e.forEach(function(e){e.location&&e.location.marker&&t.markerAdd(e.location.marker)}),t.mayBeFitMarkers())))},addClustersFromWorker:function(e,t){var o=this;for(var i in o.clustersByZoom[e]=[],t){var s=t[i].markers.map(function(e){return o.database.getLoadedObject(e.id).location.marker});o.clustersByZoom[e].push(new MapSVG.MarkersCluster({mapsvg:o,markers:s,x:t[i].x,y:t[i].y,cellX:t[i].cellX,cellY:t[i].cellY}))}o.zoomLevel===e&&o.clusterizeMarkers()},startClusterizer:function(){var t=this;if(t.database&&0!==t.database.getLoaded().length){if(!t.database.getSchemaFieldByType("location"))return!1;t.clusterizerWorker||(t.clusterizerWorker=new Worker(MapSVG.urls.root+"js/clustering.js"),t.clusterizerWorker.onmessage=function(e){e.data.clusters&&t.addClustersFromWorker(e.data.zoomLevel,e.data.clusters)}),t.clusterizerWorker.postMessage({objects:t.database.getLoaded().filter(function(e){return e.location&&e.location.marker}).map(function(e){return{id:e.id,x:e.location.marker.x,y:e.location.marker.y}}),cellSize:50,mapWidth:t.$map.width(),zoomLevels:t.zoomLevels,zoomLevel:t.zoomLevel,zoomDelta:t.zoomDelta,svgViewBox:t.svgDefault.viewBox}),t.on("zoom",function(){t.clusterizerWorker.postMessage({message:"zoom",zoomLevel:t.zoomLevel})})}},clusterizeMarkers:function(e){var t=this;t.layers.markers.children().each(function(e,t){$(t).detach()}),t.markers=[],t.markersDict={},t.markersClusters=[],t.markersClustersDict={},t.clustersByZoom&&t.clustersByZoom[t.zoomLevel]&&t.clustersByZoom[t.zoomLevel].forEach(function(e){t.options.googleMaps.on&&t.googleMaps.map&&17<=t.googleMaps.map.getZoom()?t.markerAdd(e.markers[0]):1<e.markers.length?t.markersClusterAdd(e):t.markerAdd(e.markers[0])}),t.editingMarker&&t.markerAdd(t.editingMarker),e||t.mayBeFitMarkers(),t.options.labelsMarkers.on&&t.setLabelsMarkers()},getCssUrl:function(){return MapSVG.urls.root+"css/mapsvg.css"},isGeo:function(){return this.mapIsGeo},functionFromString:function(e){var t,o=!1,i=e.trim();if(-1==i.indexOf("{")||0!==i.indexOf("function")||-1==i.indexOf("("))return{error:"MapSVG user function error: no function body."};var s=i.substring(i.indexOf("{")+1,i.lastIndexOf("}")),a=i.substring(i.indexOf("(")+1,i.indexOf(")"));try{t=new Function(a,s)}catch(e){o=e}return o||t},getOptions:function(e,t,o){var i=this,s=$.extend(!0,{},i.options);return $.extend(!0,s,o),s.viewBox=i._viewBox,s.filtersSchema=i.filtersSchema.getSchema(),s.filtersSchema&&(0===s.filtersSchema.length?s.filtersSchema=null:s.filtersSchema.forEach(function(e){"distance"==e.type&&(e.value="")})),delete s.markers,e&&(s.svgFilename=s.source.split("/").pop(),s.svgFiles=MapSVG.svgFiles),t&&$.each(s,function(e,t){JSON.stringify(t)==JSON.stringify(i.defaults[e])&&delete s[e]}),delete s.backend,s},on:function(e,t){this.lastChangeTime=Date.now(),this.events[e]||(this.events[e]=[]),this.events[e].push(t)},off:function(e){for(var t in this.events)this.events[t]&&0<this.events[t].length&&0===t.indexOf(e)&&e.length<=t&&(this.events[t]=[])},trigger:function(e){var t=this;for(var o in t.events){if(t.events[o]&&0<t.events[o].length)0===o.split(".")[0].indexOf(e)&&t.events[o].forEach(function(e){try{e&&e.call(t)}catch(e){console.log(e)}})}$(window).trigger(e,t)},setEvents:function(e){var t=this;for(var o in t.events=t.events||{},e){if("string"==typeof e[o]){var i=""!=e[o]?this.functionFromString(e[o]):null;!i||i.error||i instanceof TypeError||i instanceof SyntaxError?t.events[o]=null:t.events[o]=i}else"function"==typeof e[o]&&(t.events[o]=e[o]);if(-1!==o.indexOf("directory")){var s=o.split(".")[0];t.controllers&&t.controllers.directory&&(t.controllers.directory.events[s]=t.events[o])}}$.extend(!0,t.options.events,e)},setActions:function(e){$.extend(!0,this.options.actions,e)},setDetailsView:function(e){var t=this;if(e=e||t.options.detailsView,$.extend(!0,t.options.detailsView,e),"top"===t.options.detailsView.location&&"left"===t.options.menu.position?t.options.detailsView.location="leftSidebar":"top"===t.options.detailsView.location&&"right"===t.options.menu.position&&(t.options.detailsView.location="rightSidebar"),"near"===t.options.detailsView.location&&(t.options.detailsView.location="map"),t.$details||(t.$details=$('<div class="mapsvg-details-container"></div>')),t.$details.toggleClass("mapsvg-details-container-relative",!(MapSVG.isPhone&&t.options.detailsView.mobileFullscreen||t.shouldBeScrollable(t.options.detailsView.location))),"custom"===t.options.detailsView.location)$("#"+t.options.detailsView.containerId).append(t.$details);else{if(MapSVG.isPhone&&t.options.detailsView.mobileFullscreen)$("body").append(t.$details),t.$details.addClass("mapsvg-container-fullscreen");else t["$"+t.options.detailsView.location].append(t.$details);t.options.detailsView.margin&&t.$details.css("margin",t.options.detailsView.margin),t.$details.css("width",t.options.detailsView.width)}},setMobileView:function(e){$.extend(!0,this.options.mobileView,e)}
1,attachDataToRegions:function(e){var i=this;i.regions.forEach(function(e){e.objects=[]}),i.database.getLoaded().forEach(function(o,e){o.regions&&o.regions.length&&"object"==typeof o.regions&&o.regions.forEach(function(e){var t=i.getRegion(e.id);t&&t.objects.push(o)})})},setTemplates:function(e){var t=this;for(var o in t.templates=t.templates||{},e)if(null!=o){t.options.templates[o]=e[o];var i=t.options.templates[o];if("directoryItem"==o||"directoryCategoryItem"==o){if(i='{{#each items}}<div id="mapsvg-directory-item-{{id}}" class="mapsvg-directory-item" data-object-id="{{id}}">'+t.options.templates.directoryItem+"</div>{{/each}}",t.options.menu.categories&&t.options.menu.categories.on&&t.options.menu.categories.groupBy)i='{{#each items}}{{#with category}}<div id="mapsvg-category-item-{{value}}" class="mapsvg-category-item" data-category-value="{{value}}">'+t.options.templates.directoryCategoryItem+'</div><div class="mapsvg-category-block" data-category-id="{{value}}">{{/with}}'+i+"</div>{{/each}}";o="directory"}try{t.templates[o]=Handlebars.compile(i,{strict:!1})}catch(e){console.error(e),t.templates[o]=Handlebars.compile("",{strict:!1})}t.editMode&&("directory"==o||"directoryCategoryItem"==o)&&t.controllers&&t.controllers.directory&&(t.controllers.directory.templates.main=t.templates[o],t.loadDirectory())}},setRegionStatus:function(e,t){(t=this.regionsDatabase.getSchemaField("status").optionsDict[t]).disabled?e.setDisabled(!0):e.setDisabled(!1),t.color?e.setFill(t.color):e.setFill()},update:function(e){var i=this;for(var t in e)if("regions"==t)$.each(e.regions,function(e,t){var o=i.getRegion(e);o&&o.update(t),null!=t.gaugeValue&&(i.updateGaugeMinMax(),i.regionsRedrawColors()),null!=t.disabled&&(i.deselectRegion(o),i.options.regions[e]=i.options.regions[e]||{},i.options.regions[e].disabled=o.disabled)});else if("markers"==t)$.each(e.markers,function(e,t){var o=i.getMarker(e);o&&o.update(t)});else{var o="set"+MapSVG.ucfirst(t);"function"==typeof i[o]?this[o](e[t]):i.options[t]=e[t]}},setTitle:function(e){e&&(this.options.title=e)},setExtension:function(e){e?this.options.extension=e:delete this.options.extension},setDisableLinks:function(e){(e=MapSVG.parseBoolean(e))?this.$map.on("click.a.mapsvg","a",function(e){e.preventDefault()}):this.$map.off("click.a.mapsvg"),this.disableLinks=e},setLoadingText:function(e){this.options.loadingText=e},setLockAspectRatio:function(e){this.options.lockAspectRatio=MapSVG.parseBoolean(e)},setOnClick:function(e){this.options.onClick=e||void 0},setMouseOver:function(e){this.options.mouseOver=e||void 0},setMouseOut:function(e){this.options.mouseOut=e||void 0},setBeforeLoad:function(e){this.options.beforeLoad=e||void 0},setAfterLoad:function(e){this.options.afterLoad=e||void 0},setPopoverShown:function(e){this.options.popoverShown=e||void 0},setMarkerEditHandler:function(e){this.markerEditHandler=e},setRegionChoroplethField:function(e){this.options.regionChoroplethField=e,this.redrawGauge()},setRegionEditHandler:function(e){this.regionEditHandler=e},setDisableAll:function(e){e=MapSVG.parseBoolean(e),$.extend(!0,this.options,{disableAll:e}),this.$map.toggleClass("mapsvg-disabled-regions",e)},setRegionStatuses:function(e){var t=this;t.options.regionStatuses=e;var o={};for(var i in t.options.regionStatuses)o[i]=t.options.regionStatuses[i].color.length?t.options.regionStatuses[i].color:void 0;t.setColors({status:o})},setColorsIgnore:function(e){this.options.colorsIgnore=MapSVG.parseBoolean(e),this.regionsRedrawColors()},fixColorHash:function(e){var t=new RegExp(/^([0-9a-f]{3}|[0-9a-f]{6})$/i);return e&&null!==e.match(t)&&(e="#"+e),e},setColors:function(e){var o=this;for(var t in e)if("status"===t)for(var i in e[t])o.fixColorHash(e[t][i]);else"string"==typeof e[t]&&o.fixColorHash(e[t]);if($.extend(!0,o.options,{colors:e}),e&&e.status&&(o.options.colors.status=e.status),o.options.colors.markers)for(var s in o.options.colors.markers)for(var a in o.options.colors.markers[s])o.options.colors.markers[s][a]=parseInt(o.options.colors.markers[s][a]);o.options.colors.background&&o.$map.css({background:o.options.colors.background}),o.options.colors.hover&&(o.options.colors.hover=o.options.colors.hover==""+parseInt(o.options.colors.hover)?parseInt(o.options.colors.hover):o.options.colors.hover),o.options.colors.selected&&(o.options.colors.selected=o.options.colors.selected==""+parseInt(o.options.colors.selected)?parseInt(o.options.colors.selected):o.options.colors.selected),o.$leftSidebar.css({"background-color":o.options.colors.leftSidebar}),o.$rightSidebar.css({"background-color":o.options.colors.rightSidebar}),o.$header.css({"background-color":o.options.colors.header}),o.$footer.css({"background-color":o.options.colors.footer}),o.$details&&void 0!==o.options.colors.detailsView&&o.$details.css({"background-color":o.options.colors.detailsView}),o.$directory&&void 0!==o.options.colors.directory&&o.$directory.css({"background-color":o.options.colors.directory}),o.$filtersModal&&void 0!==o.options.colors.modalFilters&&o.$filtersModal.css({"background-color":o.options.colors.modalFilters}),o.$filters&&o.options.colors.directorySearch?o.$filters.css({"background-color":o.options.colors.directorySearch}):o.$filters&&o.$filters.css({"background-color":""}),o.clusterCSS=o.clusterCSS||$("<style></style>").appendTo("body");var n="";
1o.options.colors.clusters&&(n+="background-color: "+o.options.colors.clusters+";"),o.options.colors.clustersBorders&&(n+="border-color: "+o.options.colors.clustersBorders+";"),o.options.colors.clustersText&&(n+="color: "+o.options.colors.clustersText+";"),o.clusterCSS.html(".mapsvg-marker-cluster {"+n+"}"),o.clusterHoverCSS=o.clusterHoverCSS||$("<style></style>").appendTo("head");var r="";o.options.colors.clustersHover&&(r+="background-color: "+o.options.colors.clustersHover+";"),o.options.colors.clustersHoverBorders&&(r+="border-color: "+o.options.colors.clustersHoverBorders+";"),o.options.colors.clustersHoverText&&(r+="color: "+o.options.colors.clustersHoverText+";"),o.clusterHoverCSS.html(".mapsvg-marker-cluster:hover {"+r+"}"),o.markersCSS=o.markersCSS||$("<style></style>").appendTo("head");var l=".mapsvg-with-marker-active .mapsvg-marker {\n  opacity: "+o.options.colors.markers.inactive.opacity/100+";\n  -webkit-filter: grayscale("+(100-o.options.colors.markers.inactive.saturation)+"%);\n  filter: grayscale("+(100-o.options.colors.markers.inactive.saturation)+"%);\n}\n.mapsvg-with-marker-active .mapsvg-marker-active {\n  opacity: "+o.options.colors.markers.active.opacity/100+";\n  -webkit-filter: grayscale("+(100-o.options.colors.markers.active.saturation)+"%);\n  filter: grayscale("+(100-o.options.colors.markers.active.saturation)+"%);\n}\n.mapsvg-with-marker-hover .mapsvg-marker {\n  opacity: "+o.options.colors.markers.unhovered.opacity/100+";\n  -webkit-filter: grayscale("+(100-o.options.colors.markers.unhovered.saturation)+"%);\n  filter: grayscale("+(100-o.options.colors.markers.unhovered.saturation)+"%);\n}\n.mapsvg-with-marker-hover .mapsvg-marker-hover {\n  opacity: "+o.options.colors.markers.hovered.opacity/100+";\n  -webkit-filter: grayscale("+(100-o.options.colors.markers.hovered.saturation)+"%);\n  filter: grayscale("+(100-o.options.colors.markers.hovered.saturation)+"%);\n}\n";o.markersCSS.html(l),$.each(o.options.colors,function(e,t){null!==t&&""!=t||delete o.options.colors[e]}),o.regionsRedrawColors()},setTooltips:function(e){var n=this;void 0!==e.on&&(e.on=MapSVG.parseBoolean(e.on)),$.extend(!0,n.options,{tooltips:e}),n.tooltip=n.tooltip||{posOriginal:{},posShifted:{},posShiftedPrev:{},mirror:{}},n.tooltip.posOriginal={},n.tooltip.posShifted={},n.tooltip.posShiftedPrev={},n.tooltip.mirror={},n.tooltip.container?n.tooltip.container[0].className=n.tooltip.container[0].className.replace(/(^|\s)mapsvg-tt-\S+/g,""):(n.tooltip.container=$("<div />").addClass("mapsvg-tooltip"),n.$map.append(n.tooltip.container));var t=n.options.tooltips.position.split("-");-1==t[0].indexOf("top")&&-1==t[0].indexOf("bottom")||(n.tooltip.posOriginal.topbottom=t[0]),-1==t[0].indexOf("left")&&-1==t[0].indexOf("right")||(n.tooltip.posOriginal.leftright=t[0]),t[1]&&(n.tooltip.posOriginal.leftright=t[1]);var o="mousemove.tooltip.mapsvg-"+n.$map.attr("id");n.tooltip.container.addClass("mapsvg-tt-"+n.options.tooltips.position),n.tooltip.container.css({"min-width":n.options.tooltips.minWidth+"px","max-width":n.options.tooltips.maxWidth+"px"}),$("body").off(o).on(o,function(e){MapSVG.mouse=MapSVG.mouseCoords(e),n.tooltip.container[0].style.left=e.clientX+$(window).scrollLeft()-n.$map.offset().left+"px",n.tooltip.container[0].style.top=e.clientY+$(window).scrollTop()-n.$map.offset().top+"px";var t={x:e.clientX+$(window).scrollLeft(),y:e.clientY+$(window).scrollTop()},o=n.tooltip.container[0].getBoundingClientRect(),i=n.$wrap[0].getBoundingClientRect();if(o={top:o.top+$(window).scrollTop(),bottom:o.bottom+$(window).scrollTop(),left:o.left+$(window).scrollLeft(),right:o.right+$(window).scrollLeft(),width:o.width,height:o.height},i={top:i.top+$(window).scrollTop(),bottom:i.bottom+$(window).scrollTop(),left:i.left+$(window).scrollLeft(),right:i.right+$(window).scrollLeft(),width:i.width,height:i.height},!(t.x>i.right||t.y>i.bottom||t.x<i.left||t.y<i.top)){n.tooltip.mirror.top||n.tooltip.mirror.bottom?n.tooltip.mirror.top&&t.y>n.tooltip.mirror.top?(n.tooltip.mirror.top=!1,delete n.tooltip.posShifted.topbottom):n.tooltip.mirror.bottom&&t.y<n.tooltip.mirror.bottom&&(n.tooltip.mirror.bottom=!1,delete n.tooltip.posShifted.topbottom):o.bottom<i.top+o.height?(n.tooltip.posShifted.topbottom="bottom",n.tooltip.mirror.top=t.y):o.top>i.bottom-o.height&&(n.tooltip.posShifted.topbottom="top",n.tooltip.mirror.bottom=t.y),n.tooltip.mirror.right||n.tooltip.mirror.left?n.tooltip.mirror.left&&t.x>n.tooltip.mirror.left?(n.tooltip.mirror.left=!1,delete n.tooltip.posShifted.leftright):n.tooltip.mirror.right&&t.x<n.tooltip.mirror.right&&(n.tooltip.mirror.right=!1,delete n.tooltip.posShifted.leftright):o.right<i.left+o.width?(n.tooltip.posShifted.leftright="right",n.tooltip.mirror.left=t.x):o.left>i.right-o.width&&(n.tooltip.posShifted.leftright="left",n.tooltip.mirror.right=t.x);var s=$.extend({},n.tooltip.posOriginal,n.tooltip.posShifted),a=[];s.topbottom&&a.push(s.topbottom),s.leftright&&a.push(s.leftright),s=a.join("-"),n.tooltip.posShifted.topbottom==n.tooltip.posOriginal.topbottom&&n.tooltip.posShifted.leftright==n.tooltip.posOriginal.leftright||(n.tooltip.container[0].className=n.tooltip.container[0].className.replace(/(^|\s)mapsvg-tt-\S+/g,""),n.tooltip.container.addClass("mapsvg-tt-"+s),n.tooltip.posShiftedPrev=s)}})},setPopovers:function(e){var t=this;void 0!==e.on&&(e.on=MapSVG.parseBoolean(e.on)),$.extend(t.options.popovers,e),t.$popover||(t.$popover=$("<div />").addClass("mapsvg-popover"),t.layers.popovers.append(t.$popover)),t.$popover.css({width:t.options.popovers.width+("auto"==t.o
1ptions.popovers.width?"":"px"),"max-width":t.options.popovers.maxWidth+"%","max-height":t.options.popovers.maxHeight*t.$wrap.outerHeight()/100+"px"}),t.options.popovers.mobileFullscreen&&MapSVG.isPhone&&($("body").toggleClass("mapsvg-fullscreen-popovers",!0),t.$popover.appendTo("body"))},setRegionPrefix:function(e){this.options.regionPrefix=e},setInitialViewBox:function(e){var t=this;"string"==typeof e&&(e=e.trim().split(" ")),t._viewBox=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])],t.options.googleMaps.on&&(t.options.googleMaps.center=t.googleMaps.map.getCenter().toJSON(),t.options.googleMaps.zoom=t.googleMaps.map.getZoom()),t.zoomLevel=0},setViewBoxOnStart:function(){var e=this;e.viewBoxFull=e.svgDefault.viewBox,e.viewBoxFake=e.viewBox,e.whRatioFull=e.viewBoxFull[2]/e.viewBox[2],e.$svg[0].setAttribute("viewBox",e.viewBoxFull.join(" ")),(MapSVG.device.ios||MapSVG.device.android)&&1500<e.svgDefault.viewBox[2]?(e.iosDownscaleFactor=9999<e.svgDefault.viewBox[2]?100:10,e.$svg.css({width:e.svgDefault.viewBox[2]/e.iosDownscaleFactor})):e.$svg.css({width:e.svgDefault.viewBox[2]}),e.vbstart=1},setViewBox:function(e,t){var o=this;"string"==typeof e&&(e=e.trim().split(" "));var i=e&&4==e.length?e:o.svgDefault.viewBox,s=parseFloat(i[2])!=o.viewBox[2]||parseFloat(i[3])!=o.viewBox[3];o.viewBox=[parseFloat(i[0]),parseFloat(i[1]),parseFloat(i[2]),parseFloat(i[3])],o.whRatio=o.viewBox[2]/o.viewBox[3],!o.vbstart&&o.setViewBoxOnStart(),e||(o._viewBox=o.viewBox,o._scale=1);var a=o.options.padding;a.top&&(o.viewBox[1]-=a.top,o.viewBox[3]+=a.top),a.right&&(o.viewB
1ox[2]+=a.right),a.bottom&&(o.viewBox[3]+=a.bottom),a.left&&(o.viewBox[0]-=a.left,o.viewBox[2]+=a.left),o.scale=o.getScale(),o.superScale=o.whRatioFull*o.svgDefault.viewBox[2]/o.viewBox[2];var n=o.svgDefault.viewBox[2]/o.$map.width();return o.superScale=o.superScale/n,(MapSVG.device.ios||MapSVG.device.android)&&1500<o.svgDefault.viewBox[2]&&(o.superScale*=o.iosDownscaleFactor),o.scroll=o.scroll||{},o.scroll.tx=Math.round((o.svgDefault.viewBox[0]-o.viewBox[0])*o.scale),o.scroll.ty=Math.round((o.svgDefault.viewBox[1]-o.viewBox[1])*o.scale),s&&(o.options.googleMaps.on||o.enableMarkersAnimation()),o.$scrollpane.css({transform:"translate("+o.scroll.tx+"px,"+o.scroll.ty+"px)"}),o.$svg.css({transform:"scale("+o.superScale+")"}),s&&!t&&o.updateSize(),s&&(o.options.googleMaps.on||setTimeout(function(){o.disableMarkersAnimation()},400),o.options.clustering.on?o.throttle(o.clusterizeOnZoom,400,o):o.trigger("zoom")),!0},enableMarkersAnimation:function(){this.$map.removeClass("no-transitions-markers")},disableMarkersAnimation:function(){this.$map.addClass("no-transitions-markers")},clusterizeOnZoom:function(){this.options.googleMaps.on&&this.googleMaps.map&&this.zoomDelta&&(this.zoomLevel=this.googleMaps.map.getZoom()-this.zoomDelta),this.trigger("zoom"),this.clusterizeMarkers(!0)},throttle:function(e,t,o,i){clearTimeout(e._tId),e._tId=setTimeout(function(){e.call(o,i)},t)},setViewBoxReal:function(e){var t=this;t.viewBoxFull=e,t.viewBoxFake=e,t.whRatioFull=t.viewBoxFull[2]/t.viewBox[2],t.viewBox=e,t.svgDefault.viewBox=t.viewBox,t.viewBoxFull=e,t.viewBoxFake=t.viewBox,t.whRatioFull=t.viewBoxFull[2]/t.viewBox[2],t.$svg[0].setAttribute("viewBox",t.viewBoxFull.join(" ")),t.scale=t.getScale();var o=-e[0]*t.scale,i=-e[1]*t.scale;t.$layers.css({transform:"translate("+o+"px,"+i+"px)"}),t.zoomLevel=0,t.setViewBox(e)},setViewBoxByGoogleMapBounds:function(){var e=this,t=e.googleMaps.map.getBounds();if(t){var o=t.toJSON();if(-180==o.west&&180==o.east)e.googleMaps.map.getCenter().toJSON();var i=[t.getNorthEast().lat(),t.getNorthEast().lng()],s=[t.getSouthWest
1().lat(),t.getSouthWest().lng()],a=e.convertGeoToSVG(i),n=e.convertGeoToSVG(s);if(a[0]<n[0]){var r=e.svgDefault.viewBox[2]/e.mapLonDelta*360;n[0]=-(r-n[0])}var l=a[0]-n[0],p=n[1]-a[1];e.setViewBox([n[0],a[1],l,p])}},redraw:function(){var e=this;MapSVG.browser.ie&&e.$svg.css({height:e.svgDefault.viewBox[3]}),e.options.googleMaps.on&&e.googleMaps.map?google.maps.event.trigger(e.googleMaps.map,"resize"):e.setViewBox(e.viewBox),e.$popover&&e.$popover.css({"max-height":e.options.popovers.maxHeight*e.$wrap.outerHeight()/100+"px"}),this.controllers&&this.controllers.directory&&(this.controllers.directory.updateTopShift(),this.controllers.directory.updateScroll()),e.updateSize()},setPadding:function(e){for(var t in e=e||this.options.padding)e[t]=e[t]?parseInt(e[t]):0;$.extend(this.options.padding,e),this.setViewBox(),this.trigger("sizeChange")},setSize:function(e,t,o){var i=this;return i.options.width=parseFloat(e),i.options.height=parseFloat(t),i.options.responsive=null!=o&&null!=o?MapSVG.parseBoolean(o):i.options.responsive,i.options.width||i.options.height?!i.options.width&&i.options.height?i.options.width=parseInt(i.options.height*i.svgDefault.width/i.svgDefault.height):i.options.width&&!i.options.height&&(i.options.height=parseInt(i.options.width*i.svgDefault.height/i.svgDefault.width)):(i.options.width=i.svgDefault.width,i.options.height=i.svgDefault.height),i.whRatio=i.options.width/i.options.height,i.scale=i.getScale(),i.setResponsive(o),i.markers&&i.markersAdjustPosition(),i.options.labelsRegions.on&&i.labelsRegionsAdjustPosition(),[i.options.width,i.options.height]},setResponsive:function(e){var t=this;e=null!=e?MapSVG.parseBoolean(e):t.options.responsive,t.$map.css({width:"100%",height:"0","padding-bottom":100*t.viewBox[3]/t.viewBox[2]+"%"}),e?t.$wrap.css({width:"100%",height:"auto"}):t.$wrap.css({width:t.options.width+"px",height:t.options.height+"px"}),$.extend(!0,t.options,{responsive:e}),t.resizeSensor||(t.resizeSensor=new MapSVG.ResizeSensor(t.$map[0],function(){t.redraw()})),t.redraw()},setScroll:function(e,t){null!=e.on&&(e.on=MapSVG.parseBoolean(e.on)),null!=e.limit&&(e.limit=MapSVG.parseBoolean(e.limit)),$.extend(!0,this.options,{scroll:e}),!t&&this.setEventHandlers()},setZoom:function(e){var r=this;null!=(e=e||{}).on&&(e.on=MapSVG.parseBoolean(e.on)),null!=e.fingers&&(e.fingers=MapSVG.parseBoolean(e.fingers)),null!=e.mousewheel&&(e.mousewheel=MapSVG.parseBoolean(e.mousewheel)),e.delta=2,e.limit&&("string"==typeof e.limit&&(e.limit=e.limit.split(";")),e.limit=[parseInt(e.limit[0]),parseInt(e.limit[1])]),r.zoomLevels||r.setZoomLevels(),$.extend(!0,r.options,{zoom:e}),r.$map.off("mousewheel.mapsvg"),r.options.zoom.mousewheel&&(MapSVG.browser.firefox&&(r.firefoxScroll={insideIframe:!1},r.$map.on("mouseenter",function(){r.firefoxScroll.insideIframe=!0,r.firefoxScroll.scrollX=window.scrollX,r.firefoxScroll.scrollY=window.scrollY}).on("mouseleave",function(){r.firefoxScroll.insideIframe=!1}),$(document).scroll(function(){r.firefoxScroll.insideIframe&&window.scrollTo(r.firefoxScroll.scrollX,r.firefoxScroll.scrollY)})),r.$map.on("mousewheel.mapsvg",function(e,t,o,i){if(!$(e.target).hasClass("mapsvg-popover")&&!$(e.target).closest(".mapsvg-popover").length){e.preventDefault();var s=0<t?1:-1,a=MapSVG.mouseCoords(e);a.x=a.x-r.$svg.offset().left,a.y=a.y-r.$svg.offset().top;var n=r.convertPixelToSVG([a.x,a.y]);return 0<s?r.zoomIn(n):r.zoomOut(n),!1}})),r.canZoom=!0},setControls:function(e){var t=this;e=e||{},$.extend(!0,t.options,{controls:e}),t.options.controls.zoom=MapSVG.parseBoolean(t.options.controls.zoom),t.options.controls.zoomReset=MapSVG.parseBoolean(t.options.controls.zoomReset),t.options.controls.userLocation=MapSVG.parseBoolean(t.options.controls.userLocation);var o=t.options.controls.location||"right";if(!t.$controls){var i=$("<div />").addClass("mapsvg-buttons"),s=$("<div />").addClass("mapsvg-btn-group").appendTo(i),a=$("<div />").addClass("mapsvg-btn-map mapsvg-in");a.on("touchend click",function(e){e.cancelable&&e.preventDefault(),e.stopPropagation(),t.zoomIn()});var n=$("<div />").addClass("mapsvg-btn-map mapsvg-out");n.on("touchend click",function(e){e.cancelable&&e.preventDefault(),e.stopPropagation(),t.zoomOut()}),s.append(a).append(n);var r=$("<div />").addClass("mapsvg-btn-map mapsvg-btn-location");r.on("touchend click",function(e){e.cancelable&&e.preventDefault(),e.stopPropagation(),t.showUserLocation(function(e){t.options.scroll.on&&t.centerOn(e.marker)})});r.html('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 447.342 447.342" style="enable-background:new 0 0 447.342 447.342;" xml:space="preserve"><path d="M443.537,3.805c-3.84-3.84-9.686-4.893-14.625-2.613L7.553,195.239c-4.827,2.215-7.807,7.153-7.535,12.459 c0.254,5.305,3.727,9.908,8.762,11.63l129.476,44.289c21.349,7.314,38.125,24.089,45.438,45.438l44.321,129.509 c1.72,5.018,6.325,8.491,11.63,8.762c5.306,0.271,10.244-2.725,12.458-7.535L446.15,18.429 C448.428,13.491,447.377,7.644,443.537,3.805z"/></svg>');var l=$("<div />").addClass("mapsvg-btn-group").appendTo(i);l.append(r);var p=$("<div />").html('<svg height="14px" version="1.1" viewBox="0 0 14 14" width="14px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill="none" fill-rule="evenodd" id="Page-1" stroke="none" stroke-width="1"><g fill="#000000" transform="translate(-215.000000, -257.000000)"><g id="fullscreen" transform="translate(215.000000, 257.000000)"><path d="M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z" /></g></g></g></svg>').addClass("mapsvg-btn-map mapsvg-btn-zoom-reset");p.on("touchend click",function(e){e.cancelable&&e.preventDefault(),e.stopPropagation(),t.viewBoxReset(!0)});var c=$("<div />").addClass("mapsvg-btn-group").appendTo(i);c.append(p),t.$controls=i,t.controls={zoom:s,userLocation:l,zoomReset:c},t.$map.append(t.$controls)}t.controls.zoom.toggle(t.options.controls.zoom),t.controls.userLocation.toggle(t.options.controls.userLocation),t.controls.zoomReset.toggle(t.options.controls.zoomReset),t.$controls.removeClass("left"),t.$controls.removeClass("right"),"right"==o&&t.$controls.addClass("right")||"left"==o&&t.$controls.addClass("left")},setZoomLevels:function(){var e=this;e.zoomLevels={};for(var t=1,o=0;o<=20;o++)e.zoomLevels[o+""]={_scale:t,viewBox:[0,0,e._viewBox[2]/t,e._viewBox[3]/t]},t*=e.options.zoom.delta;t=1;for(o=0;-20<=o;o--)e.zoomLevels[o+""]={_scale:t,viewBox:[0,0,e._viewBox[2]/t,e._viewBox[3]/t]},t/=e.options.zoom.delta},setZoomButtons:function(){var t=this,e=t.options.zoom.buttons.location||"hide";
1if(!t.zoomButtons){var o=$("<div />").addClass("mapsvg-buttons"),i=$("<div />").addClass("mapsvg-btn-group").appendTo(o);o.zoomIn=$("<div />").addClass("mapsvg-btn-map mapsvg-in"),o.zoomIn.on("touchend click",function(e){e.stopPropagation(),t.zoomIn()}),o.zoomOut=$("<div />").addClass("mapsvg-btn-map mapsvg-out"),o.zoomOut.on("touchend click",function(e){e.stopPropagation(),t.zoomOut()}),i.append(o.zoomIn).append(o.zoomOut),o.location=$("<div />").addClass("mapsvg-btn-map mapsvg-btn-location"),o.location.on("touchend click",function(e){e.stopPropagation(),t.showUserLocation(function(){t.options.scroll.on&&t.centerOn(location.marker)})}),o.append(o.location);o.location.html('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 447.342 447.342" style="enable-background:new 0 0 447.342 447.342;" xml:space="preserve"><path d="M443.537,3.805c-3.84-3.84-9.686-4.893-14.625-2.613L7.553,195.239c-4.827,2.215-7.807,7.153-7.535,12.459 c0.254,5.305,3.727,9.908,8.762,11.63l129.476,44.289c21.349,7.314,38.125,24.089,45.438,45.438l44.321,129.509 c1.72,5.018,6.325,8.491,11.63,8.762c5.306,0.271,10.244-2.725,12.458-7.535L446.15,18.429 C448.428,13.491,447.377,7.644,443.537,3.805z"/></svg>'),t.zoomButtons=o,t.$map.append(t.zoomButtons)}t.zoomButtons.removeClass("left"),t.zoomButtons.removeClass("right"),"right"==e&&t.zoomButtons.addClass("right")||"left"==e&&t.zoomButtons.addClass("left"),t.options.zoom.on&&"hide"!=e?t.zoomButtons.show():t.zoomButtons.hide()},setManualRegions:function(e){this.options.manualRegions=MapSVG.parseBoolean(e)},setCursor:function(e){e="pointer"==e?"pointer":"default","pointer"==(this.options.cursor=e)?this.$map.addClass("mapsvg-cursor-pointer"):this.$map.removeClass("mapsvg-cursor-pointer")},setMultiSelect:function(e,t){this.options.multiSelect=MapSVG.parseBoolean(e),!1!==t&&this.deselectAllRegions()},setGauge:function(e){var t=this;null!=(e=e||t.options.gauge).on&&(e.on=MapSVG.parseBoolean(e.on)),$.extend(!0,t.options,{gauge:e});var o=!1;if(!t.$gauge){t.$gauge={},t.$gauge.gradient=$("<td>&nbsp;</td>").addClass("mapsvg-gauge-gradient"),t.setGaugeGradientCSS(),t.$gauge.container=$("<div />").addClass("mapsvg-gauge").hide(),t.$gauge.table=$("<table />");var i=$("<tr />");t.$gauge.labelLow=$("<td>"+t.options.gauge.labels.low+"</td>"),t.$gauge.labelHigh=$("<td>"+t.options.gauge.labels.high+"</td>"),i.append(t.$gauge.labelLow),i.append(t.$gauge.gradient),i.append(t.$gauge.labelHigh),t.$gauge.table.append(i),t.$gauge.container.append(t.$gauge.table),t.$map.append(t.$gauge.container)}!t.options.gauge.on&&t.$gauge.container.is(":visible")?(t.$gauge.container.hide(),o=!0):t.options.gauge.on&&!t.$gauge.container.is(":visible")&&(t.$gauge.container.show(),o=!0,t.regionsDatabase.on("change",function(){t.redrawGauge()})),e.colors&&(t.options.gauge.colors.lowRGB=MapSVG.tinycolor(t.options.gauge.colors.low).toRgb(),t.options.gauge.colors.highRGB=MapSVG.tinycolor(t.options.gauge.colors.high).toRgb(),t.options.gauge.colors.diffRGB={r:t.options.gauge.colors.highRGB.r-t.options.gauge.colors.lowRGB.r,g:t.options.gauge.colors.highRGB.g-t.options.gauge.colors.lowRGB.g,b:t.options.gauge.colors.highRGB.b-t.options.gauge.colors.lowRGB.b,a:t.options.gauge.colors.highRGB.a-t.options.gauge.colors.lowRGB.a},o=!0,t.$gauge&&t.setGaugeGradientCSS()),e.labels&&(t.$gauge.labelLow.html(t.options.gauge.labels.low),t.$gauge.labelHigh.html(t.options.gauge.labels.high)),o&&t.redrawGauge()},redrawGauge:function(){this.updateGaugeMinMax(),this.regionsRedrawColors()},updateGaugeMinMax:function(){var o=this;o.options.gauge.min=0,o.options.gauge.max=!1;var i=[];o.regions.forEach(function(e){var t=e.data&&e.data[o.options.regionChoroplethField];null!=t&&parseFloat(i.push(t))}),0<i.length&&(o.options.gauge.min=1==i.length?0:Math.min.apply(null,i),o.options.gauge.max=Math.max.apply(null,i),o.options.gauge.maxAdjusted=o.options.gauge.max-o.options.gauge.min)},setGaugeGradientCSS:function(){var e=this;e.$gauge.gradient.css({background:e.options.gauge.colors.low,background:"-moz-linear-gradient(left, "+e.options.gauge.colors.low+" 1%,"+e.options.gauge.colors.high+" 100%)",background:"-webkit-gradient(linear, left top, right top, color-stop(1%,"+e.options.gauge.colors.low+"), color-stop(100%,"+e.options.gauge.colors.high+"))",background:"-webkit-linear-gradient(left, "+e.options.gauge.colors.low+" 1%,"+e.options.gauge.colors.high+" 100%)",background:"-o-linear-gradient(left, "+e.options.gauge.colors.low+" 1%,"+e.options.gauge.colors.high+" 100% 100%)",background:"-ms-linear-gradient(left,  "+e.options.gauge.colors.low+" 1%,"+e.options.gauge.colors.high+" 100% 100%)",background:"linear-gradient(to right,"+e.options.gauge.colors.low+" 1%,"+e.options.gauge.colors.high+" 100%)",filter:'progid:DXImageTransform.Microsoft.gradient( startColorstr="'+e.options.gauge.colors.low+'", endColorstr="'+e.options.gauge.colors.high+'",GradientType=1 )'})},setCss:function(e){var t=this;t.options.css=e||t.options.css.replace(/%id%/g,this.id),t.liveCSS=t.liveCSS||$("<style></style>").appendTo("head"),t.liveCSS.html(t.options.css)},setFilters:function(e){var t=this;null!=(e=e||t.options.filters).on&&(e.on=MapSVG.parseBoolean(e.on)),null!=e.hide&&(e.hide=MapSVG.parseBoolean(e.hide)),$.extend(!0,t.options,{filters:e});if(-1===["leftSidebar","rightSidebar","header","footer","custom","mapContainer"].indexOf(t.options.filters.location)&&(t.options.filters.location="leftSidebar"),t.options.filters.on){if(t.formBuilder&&t.formBuilder.destroy(),t.$filters||(t.$filters=$('<div class="mapsvg-filters-wrap"></div>')),t.$filters.empty(),t.$filters.show(),t.$filters.css({"background-color":t.options.colors.directorySearch}),t.$filtersModal&&t.$filtersModal.css({width:t.options.filters.width}),"custom"===t.options.filters.location)t.$filters.removeClass("mapsvg-filter-container-custom").addClass("mapsvg-filter-container-custom"),$("#"+t.options.filters.containerId).length?$("#"+t.options.filters.containerId).append(t.$filters):(t.$filters.hide(),console.error("MapSVG: filter container #"+t.options.filters.containerId+" does not exists"));else if(MapSVG.isPhone)t.$header.append(t.$filters),t.setContainers({header:{on:!0}});else{var o="$"+(MapSVG.isPhone?"header":t.options.filters.location);t.options.menu.on&&t.controllers.directory&&t.options.menu.location===t.options.filters.location?(t.controllers.directory.view.find(".mapsvg-directory-filter-wrap").append(t.$filters),t.controllers.directory.updateTopShift()):(t[o].append(t.$filters),t.controllers.directory&&t.controllers.directory.updateTopShift())}t.loadFiltersController(t.$filters,!1),t.updateFiltersState()}else t.$filters&&(t.$filters.empty(),t.$filters.hide());t.options.menu.on&&t.controllers.directory&&t.options.menu.location===t.options.filters.location&&t.controllers.directory.updateTopShift()},updateFiltersState:function(){var o=this;if(o.$filterTags&&o.$filterTags.empty(),o.options.filters&&o.options.filters.on||o.database.query.filters&&0<Object.keys(o.database.query.filters).length)for(var e in o.database.query.filters){var t=o.database.query.filters[e],i=e,s=o.filtersSchema.getField(i);o.options.filters.on&&s?o.$filters.find('select[data-parameter-name="'+i+'"],radio[data-parameter-name="\'+_f
1ield_name+\'"]').data("ignoreSelect2Change",!0).val(t).trigger("change"):("regions"==e?(i="",t=o.getRegion(t).title||t):i=s&&s.label,"distance"!==e&&(o.$filterTags||(o.$filterTags=$('<div class="mapsvg-filter-tags"></div>'),o.$filters||(o.options.menu.on&&o.controllers.directory?(o.controllers.directory.toolbarView.append(o.$filterTags),o.controllers.directory.updateTopShift()):(o.$map.append(o.$filterTags),o.options.zoom.buttons.on&&(o.options.layersControl.on?"top-left"==o.options.layersControl.position?o.$filterTags.css({right:0,bottom:0}):o.$filterTags.css({bottom:0}):"left"==o.options.zoom.buttons.location&&o.$filterTags.css({right:0})))),o.$filterTags.on("click",".mapsvg-filter-delete",function(e){var t=$(this).data("filter");$(this).parent().remove(),o.database.query.filters[t]=null,delete o.database.query.filters[t],o.deselectAllRegions(),o.loadDataObjects()})),o.$filterTags.append('<div class="mapsvg-filter-tag">'+(i?i+": ":"")+t+' <span class="mapsvg-filter-delete" data-filter="'+e+'">×</span></div>')))}},setContainers:function(e){var t=this;for(var o in t.containersCreated||(t.$wrapAll=$('<div class="mapsvg-wrap-all"></div>').attr("id","mapsvg-map-"+this.id).attr("data-map-id",this.id),t.$wrap=$('<div class="mapsvg-wrap"></div>'),t.$containers={},t.$mapContainer=$('<div class="mapsvg-map-container"></div>'),t.$leftSidebar=$('<div class="mapsvg-sidebar mapsvg-top-container mapsvg-sidebar-left"></div>'),t.$rightSidebar=$('<div class="mapsvg-sidebar mapsvg-top-container mapsvg-sidebar-right"></div>'),t.$header=$('<div class="mapsvg-header mapsvg-top-container"></div>'),t.$footer=$('<div class="mapsvg-footer mapsvg-top-container"></div>'),t.$wrapAll.insertBefore(t.$map),t.$wrapAll.append(t.$header),t.$wrapAll.append(t.$wrap),t.$wrapAll.append(t.$footer),t.$mapContainer.append(t.$map),t.$wrap.append(t.$leftSidebar),t.$wrap.append(t.$mapContainer),t.$wrap.append(t.$rightSidebar),t.containersCreated=!0),e=e||t.options){void 0!==e[o].on&&(e[o].on=MapSVG.parseBoolean(e[o].on)),$contName="$"+o,e[o].width&&(("string"!=typeof e[o].width||-1===e[o].width.indexOf("px")&&-1===e[o].width.indexOf("%")&&"auto"!==e[o].width)&&(e[o].width=e[o].width+"px"),t[$contName].css({"flex-basis":e[o].width})),e[o].height&&(("string"!=typeof e[o].height||-1===e[o].height.indexOf("px")&&-1===e[o].height.indexOf("%")&&"auto"!==e[o].height)&&(e[o].height=e[o].height+"px"),t[$contName].css({"flex-basis":e[o].height,height:e[o].height})),$.extend(!0,t.options,{containers:e});var i=t.options.containers[o].on;MapSVG.isPhone&&t.options.menu.hideOnMobile&&t.options.menu.location===o&&-1!==["leftSidebar","rightSidebar"].indexOf(o)?i=!1:MapSVG.isPhone&&"custom"===t.options.menu.location&&-1!==["leftSidebar","rightSidebar"].indexOf(o)?(i=!1,t.$wrapAll.addClass("mapsvg-hide-map-list-buttons")):MapSVG.isPhone&&!t.options.menu.hideOnMobile&&t.options.menu.location===o&&-1!==["leftSidebar","rightSidebar"].indexOf(o)&&(t.$wrapAll.addClass("mapsvg-hide-map-list-buttons"),t.$wrapAll.addClass("mapsvg-directory-visible")),t[$contName].toggle(i)}t.setDetailsView()},shouldBeScrollable:function(e){switch(e){case"mapContainer":case"leftSidebar":case"rightSidebar":return!0;case"custom":return!1;case"header":case"footer":return!(!this.options.containers[e].height||"auto"===this.options.containers[e].height||"100%"===this.options.containers[e].height);default:return!1}},setDirectory:function(e){return this.setMenu(e)},setMenu:function(e){var t=this;if(null!=(e=e||t.options.menu).on&&(e.on=MapSVG.parseBoolean(e.on)),null!=e.search&&(e.search=MapSVG.parseBoolean(e.search)),null!=e.showMapOnClick&&(e.showMapOnClick=MapSVG.parseBoolean(e.showMapOnClick)),null!=e.searchFallback&&(e.searchFallback=MapSVG.parseBoolean(e.searchFallback)),null!=e.customContainer&&(e.customContainer=MapSVG.parseBoolean(e.customContainer)),$.extend(!0,t.options,{menu:e}),t.controllers=t.controllers||{},t.$directory||(t.$directory=$('<div class="mapsvg-directory"></div>')),t.$directory.toggleClass("flex",t.shouldBeScrollable(t.options.menu.location)),t.options.menu.on){if(t.controllers.directory){if(t.controllers.directory.database="regions"===t.options.menu.source?t.regionsDatabase:t.database,t.controllers.directory.database.query.set({sort:[{field:t.options.menu.sortBy,order:t.options.menu.sortDirection}]}),t.controllers.directory.scrollable=t.shouldBeScrollable(t.options.menu.location),e.filterout){var o={};o[t.options.menu.filterout.field]=t.options.menu.filterout.val,t.controllers.directory.database.query.setFilterOut(o)}}else t.controllers.directory=new MapSVG.DirectoryController({container:t.$directory,data:t.getData(),template:t.templates.directory,mapsvg:t,filters:t.filters,database:"regions"===t.options.menu.source?t.regionsDatabase:t.database,scrollable:t.shouldBeScrollable(t.options.menu.location),events:{click:t.events["click.directoryItem"],mou
1seover:t.events["mouseover.directoryItem"],mouseout:t.events["mouseout.directoryItem"]}});(MapSVG.isPhone&&t.options.menu.hideOnMobile?t.$leftSidebar:"custom"!==t.options.menu.location?t["$"+t.options.menu.location]:$("#"+t.options.menu.containerId)).append(t.$directory),t.options.colors.directory&&t.$directory.css({"background-color":t.options.colors.directory}),t.setFilters(),t.setTemplates({directoryItem:t.options.templates.directoryItem}),("regions"===t.options.menu.source&&t.regionsDatabase.loaded||"database"===t.options.menu.source&&t.database.loaded)&&(t.editMode&&(e.sortBy||e.sortDirection||e.filterout)&&t.controllers.directory.database.getAll(),t.loadDirectory())}else t.controllers.directory&&t.controllers.directory.destroy(),t.controllers.directory=null},setDatabase:function(e){var t=this;if((e=e||t.options.database).pagination&&(null!=e.pagination.on&&(e.pagination.on=MapSVG.parseBoolean(e.pagination.on)),null!=e.pagination.perpage&&(e.pagination.perpage=parseInt(e.pagination.perpage))),$.extend(!0,t.options,{database:e}),e.pagination)if(void 0!==e.pagination.on||e.pagination.perpage){var o={perpage:t.options.database.pagination.on?t.options.database.pagination.perpage:0};t.database.getAll(o)}else t.setPagination()},setGoogleMaps:function(e){var p=this;if(null!=(e=e||p.options.googleMaps).on&&(e.on=MapSVG.parseBoolean(e.on)),p.googleMaps||(p.googleMaps={loaded:!1,initialized:!1,map:null}),$.extend(!0,p.options,{googleMaps:e}),p.options.googleMaps.on)if(p.$map.toggleClass("mapsvg-with-google-map",!0),MapSVG.googleMapsApiLoaded)if(p.googleMaps.map)p.$map.toggleClass("mapsvg-with-google-map",!0),p.$googleMaps&&p.$googleMaps.show(),e.type&&p.googleMaps.map.setMapTypeId(e.type);else{function t(e,t){this.bounds_=e,this.map_=t,this.setMap(t),this.prevCoords={sw:{x:0,y:0},sw2:{x:0,y:0},ne:{x:0,y:0},ne2:{x:0,y:0}}}p.$googleMaps=$('<div class="mapsvg-layer mapsvg-layer-gm" id="mapsvg-google-maps-'+p.id+'"></div>').prependTo(p.$map),p.$googleMaps.css({position:"absolute",top:0,left:0,bottom:0,right:0,"z-index":"0"}),p.googleMaps.map=new google.maps.Map(p.$googleMaps[0],{mapTypeId:e.type,fullscreenControl:!1,keyboardShortcuts:!1,mapTypeControl:!1,scaleControl:!1,scrollwheel:!1,streetViewControl:!1,zoomControl:!1,styles:e.styleJSON}),(t.prototype=new google.maps.OverlayView).onAdd=function(){var e=document.createElement("div");e.style.borderStyle="none",e.style.borderWidth="0px",e.style.position="absolute",this.div_=e,this.getPanes().overlayLayer.appendChild(e)},t.prototype.draw=function(e){if(!p.isScrolling){var t=this.getProjection();
1if(t){var o=this.bounds_.getSouthWest(),i=this.bounds_.getNorthEast(),s={};s.sw=t.fromLatLngToDivPixel(o),s.ne=t.fromLatLngToDivPixel(i),s.sw2=t.fromLatLngToContainerPixel(o),s.ne2=t.fromLatLngToContainerPixel(i);var a=t.getWorldWidth();for(var n in this.prevCoords.sw&&s.ne.x<s.sw.x&&(Math.abs(this.prevCoords.sw.x-s.sw.x)>Math.abs(this.prevCoords.ne.x-s.ne.x)?s.sw.x=s.sw.x-a:s.ne.x=s.ne.x+a,Math.abs(this.prevCoords.sw2.x-s.sw2.x)>Math.abs(this.prevCoords.ne2.x-s.ne2.x)?s.sw2.x=s.sw2.x-a:s.ne2.x=s.ne2.x+a),this.prevCoords);var r=((this.prevCoords=s).ne2.x-s.sw2.x)/p.svgDefault.viewBox[2],l=[p.svgDefault.viewBox[0]-s.sw2.x/r,p.svgDefault.viewBox[1]-s.ne2.y/r,p.$map.width()/r,p.$map.outerHeight()/r];p.setViewBox(l)}}};var o=new google.maps.LatLng(p.geoViewBox.bottomLat,p.geoViewBox.leftLon),i=new google.maps.LatLng(p.geoViewBox.topLat,p.geoViewBox.rightLon),s=new google.maps.LatLngBounds(o,i);if(p.googleMaps.overlay=new t(s,p.googleMaps.map),p.options.googleMaps.center&&p.options.googleMaps.zoom)p.googleMaps.map.setZoom(p.options.googleMaps.zoom),p.options.googleMaps.center.lat=parseFloat(p.options.googleMaps.center.lat),p.options.googleMaps.center.lng=parseFloat(p.options.googleMaps.center.lng),p.googleMaps.map.setCenter(p.options.googleMaps.center);else{o=new google.maps.LatLng(p.geoViewBox.bottomLat,p.geoViewBox.leftLon),i=new google.maps.LatLng(p.geoViewBox.topLat,p.geoViewBox.rightLon),s=new google.maps.LatLngBounds(o,i);p.googleMaps.map.fitBounds(s,0)}p.options.googleMaps.initialized=!0,p.googleMaps.map.addListener("idle",function(){p.isZooming=!1}),google.maps.event.addListenerOnce(p.googleMaps.map,"idle",function(){setTimeout(function(){p.$map.addClass("mapsvg-fade-in"),setTimeout(function(){p.$map.removeClass("mapsvg-google-map-loading"),p.$map.removeClass("mapsvg-fade-in"),p.options.googleMaps.center&&p.options.googleMaps.zoom||(p.options.googleMaps.center=p.googleMaps.map.getCenter().toJSON(),p.options.googleMaps.zoom=p.googleMaps.map.getZoom()),p.zoomDelta=p.options.googleMaps.zoom-p.zoomLevel,p.trigger("googleMapsLoaded")},300)},1)})}else p.loadGoogleMapsAPI(function(){p.setGoogleMaps()},function(){p.setGoogleMaps({on:!1})});else p.$map.toggleClass("mapsvg-with-google-map",!1),p.$googleMaps&&p.$googleMaps.hide(),p.googleMaps.initialized=!1},loadGoogleMapsAPI:function(t,e){var o=this;if(void 0!==window.google&&google.maps&&(MapSVG.googleMapsApiLoaded=!0),MapSVG.googleMapsApiLoaded)"function"==typeof t&&t();else if(MapSVG.googleMapsLoadCallbacks=MapSVG.googleMapsLoadCallbacks||[],"function"==typeof t&&MapSVG.googleMapsLoadCallbacks.push(t),!MapSVG.googleMapsApiIsLoading){MapSVG.googleMapsApiIsLoading=!0,window.gm_authFailure=function(){MapSVG.GoogleMapBadApiKey?MapSVG.GoogleMapBadApiKey():o.editMode?alert("Google maps API key is incorrect."):console.error("MapSVG: Google maps API key is incorrect.")},o.googleMapsScript=document.createElement("script"),o.googleMapsScript.onload=function(){MapSVG.googleMapsApiLoaded=!0,MapSVG.googleMapsLoadCallbacks.forEach(function(e){"function"==typeof t&&e()})};var i=[];o.options.googleMaps.drawingTools&&i.push("drawing"),o.options.googleMaps.geometry&&i.push("geometry");var s="";0<i.length&&(s="&libraries="+i.join(",")),o.googleMapsScript.src="https://maps.googleapis.com/maps/api/js?language=en&key="+o.options.googleMaps.apiKey+s,document.head.appendChild(o.googleMapsScript)}},loadDetailsView:function(e){var t=this;t.popover&&t.popover.close(),t.detailsController&&t.detailsController.destroy(),t.detailsController=new MapSVG.DetailsController({autoresize:(!MapSVG.isPhone||!t.options.detailsView.mobileFullscreen||"custom"===t.options.detailsView.location)&&t.options.detailsView.autoresize,container:t.$details,template:e instanceof MapSVG.Region?t.templates.detailsViewRegion:t.templates.detailsView,mapsvg:t,data:e instanceof MapSVG.Region?e.forTemplate():e,modal:MapSVG.isPhone&&t.options.detailsView.mobileFullscreen&&"custom"!==t.options.detailsView.location,scrollable:MapSVG.isPhone&&t.options.detailsView.mobileFullscreen&&"custom"!==t.options.detailsView.location||t.shouldBeScrollable(t.options.detailsView.location),withToolbar:!(MapSVG.isPhone&&t.options.detailsView.mobileFullscreen&&"custom"!==t.options.detailsView.location)&&t.shouldBeScrollable(t.options.detailsView.location),events:{shown:function(e){if(t.events["shown.detailsView"])try{t.events["shown.detailsView"].call(this,t)}catch(e){console.log(e)}t.trigger("detailsShown")},closed:function(e){if(t.deselectAllRegions(),t.deselectAllMarkers(),t.controllers&&t.controllers.directory&&t.controllers.directory.deselectItems(),t.events["closed.detailsView"])try{t.events["closed.detailsView"].call(this,t)}catch(e){console.log(e)}t.trigger("detailsClosed")}}})},loadFiltersModal:function(){var e=this;"custom"!=e.options.filters.modalLocation?(e.$filtersModal=e.$filtersModal||$('<div class="mapsvg-details-container mapsvg-filters-wrap"></div>'),e.setColors(),e.$filtersModal.css({width:e.options.filters.width}
1),MapSVG.isPhone?($("body").append(e.$filtersModal),e.$filtersModal.css({width:""})):e["$"+e.options.filters.modalLocation].append(e.$filtersModal)):(e.$filtersModal=$("#"+e.options.filters.containerId),e.$filtersModal.css({width:""}));e.loadFiltersController(e.$filtersModal,!0)},loadFiltersController:function(e,t){var s=this;if(s.filtersSchema.getSchema()){var o,n,r="regions"===s.options.filters.source?s.regionsDatabase:s.database;t=void 0!==t&&t,n=MapSVG.isPhone?(o=!0,s.options.filters.hideOnMobile):(o=s.options.menu.on&&s.controllers.directory&&s.options.menu.location===s.options.filters.location,s.options.filters.hide);var i=t||!o&&-1!==["leftSidebar","rightSidebar"].indexOf(s.options.filters.location);new MapSVG.FiltersController({container:e,template:Handlebars.compile('<div class="mapsvg-filters-container"></div>'),mapsvg:s,data:{},scrollable:i,modal:t,withToolbar:!MapSVG.isPhone&&!0===t,width:e.hasClass("mapsvg-map-container")?s.options.filters.width:"100%",events:{shown:function(e){var i=this,a=new MapSVG.FormBuilder({container:this.contentView,filtersMode:!0,schema:s.filtersSchema.getSchema(),modal:t,filtersHide:n,editMode:!1,mapsvg:s,data:r.query.filters,admin:!1,events:{load:function(t){if(t.container.find(".mapsvg-form-builder").css({padding:s.options.filters.padding}),i.updateScroll(),n){var e=function(){var e=Object.keys(r.query.filters).length;e=0<e?e:"",r.query.filters.search&&0<r.query.filters.search.length&&e--,e=0===e?"":e,t&&t.showFiltersButton&&t.showFiltersButton.views.result.find("button").html(s.getData().options.filters.showButtonText+" <b>"+e+"</b>")};e(),r.on("dataLoaded",function(){e()})}if(s.options.filters.clearButton){var o=$('<div class="form-group mapsvg-filters-reset-container"><button class="btn btn-default mapsvg-filters-reset">'+s.options.filters.clearButtonText+"</button></div>");t.container.find(".mapsvg-data-form-view").append(o),o.on("click",function(){t.container.find("input").not(":button, :submit, :reset, :hidden, :checkbox, :radio").val("").prop("selected",!1),t.container.find('input[type="radio"]').prop("checked",!1),t.container.find('input[type="checkbox"]').prop("checked",!1),r.query.filters={},s.deselectAllRegions(),t.container.find("select").val("").trigger("change.select2"),r.getAll()})}s.controllers.directory&&s.controllers.directory.updateTopShift()}}});a.view.on("click",".mapsvg-btn-show-filters",function(){s.loadFiltersModal()}),a.view.on("paste keyup",'input[data-parameter-name="search"]',function(){s.throttle(s.textSearch,600,s,$(this))}),a.view.on("change paste keyup",'select,input[type="radio"],input',function(){if($(this).data("ignoreSelect2Change"))$(this).data("ignoreSelect2Change",!1);else{var o={},i=$(this).data("parameter-name");if("search"!=$(this).attr("data-parameter-name")&&"distanceAddress"!==$(this).attr("name")&&"search"!=i){if("distanceLatLng"===$(this).attr("name")||"distanceLength"===$(this).attr("name")){var e={units:a.view.find('[name="distanceUnits"]').val(),latlng:a.view.find('[name="distanceLatLng"]').val(),length:a.view.find('[name="distanceLength"]').val(),address:a.view.find('[name="distanceAddress"]').val()};if((i=a.mapsvg.filtersSchema.schema.find(function(e){return"distance"===e.type})).country&&(e.country=i.country),e.units&&e.length&&e.latlng){var t=(o.distance=e).latlng.split(",");t={lat:parseFloat(t[0]),lng:parseFloat(t[1])},MapSVG.distanceSearch={latlng:t,units:i.distanceUnits,unitsLabel:i.distanceUnitsLabel}}else o.distance=null,MapSVG.distanceSearch=null}else 0<$(this).closest(".mapsvg-checkbox-group").length?(o[i]=[],$(this).closest(".mapsvg-checkbox-group").find('input[type="checkbox"]:checked').each(function(e,t){o[i].push($(t).val())})):o[i]=$(this).val();r.query.setFilters(o);var s={filters:o};r.getAll(s)}}})},closed:function(e){}}})}},textSearch:function(e){var t={search:e.val()},o="regions"===this.getData().options.filters.source?this.regionsDatabase:this.database;o.query.setFilters(t);var i={filters:t};i.searchFallback=MapSVG.parseBoolean(e.attr("data-fallback")),o.getAll(i)},getRegion:function(e){return this.regions[this.regionsDict[e]]},getRegions:function(e){return _this.regions},getMarker:function(e){return this.markers[this.markersDict[e]]},checkId:function(e){return this.getRegion(e)?{error:"This ID is already being used by a Region"}:!this.getMarker(e)||{error:"This ID is already being used by another Marker"}},regionsRedrawColors:function(){this.regions.forEach(function(e){e.setFill()})},destroy:function(){var e=this;return e.controllers&&e.controllers.directory&&e.controllers.directory.mobileButtons.remove(),e.$map.empty().insertBefore(e.$wrapAll).attr("style","").removeClass("mapsvg mapsvg-responsive"),e.popover&&e.popover.close(),e.detailsController&&e.detailsController.destroy(),e.$wrapAll.remove(),e},getData:function(){return this},mayBeFitMarkers:function(){var e=this;this.lastTimeFitWas||(this.lastTimeFitWas=Date.now()-99999),this.fitDelta=Date.now()-this.lastTimeFitWas,1e3<this.fitDelta&&!e.firstDataLoad&&!e.fitOnDataLoadDone&&e.options.fitMarkers&&(e.fitMarkers(),e.fitOnDataLoadDone=!0),e.firstDataLoad&&e.options.fitMarkersOnStart&&(e.firstDataLoad=!1,e.options.googleMaps.on&&!e.options.googleMaps.map?e.on("googleMapsLoaded",function(){e.fitMarkers()}):e.fitMarkers()),this.lastTimeFitWas=Date.now()},fitMarkers:function(){var e=this,t=e.database.getLoaded();if(t&&0!==t.length){if(!e.options.googleMaps.on||"undefined"==typeof google)return e.getOptions().clustering.on?e.zoomTo(e.markersClusters.concat(e.markers)):e.zoomTo(e.markers);var o=[],i=[];if(1<t.length){t.forEach(function(e){e.location&&e.location.lat&&e.location.lng&&(o.push(e.location.lat),i.push(e.location.lng))});var s=Math.min.apply(null,o),a=Math.max.apply(null,o),n=Math.min.apply(null,i),r=Math.max.apply(null,i),l=new google.maps.LatLngBounds({lat:s,lng:n},{lat:a,lng:r});e.googleMaps.map.fitBounds(l,0)}else if(t[0].location&&t[0].location.lat&&t[0].location.lng){var p={lat:t[0].location.lat,lng:t[0].location.lng};if(e.googleMaps.map){e.googleMaps.map.setCenter(p);var c=e.googleMaps.zoomLimit?17:20;e.googleMaps.map.setZoom(c)}}}},showUserLocation:function(t){var o=this;this.getUserLocation(function(e){o.userLocation=null,o.userLocation=new MapSVG.Location({lat:e.lat,lng:e.lng,img:mapsvg_paths.root+"/markers/user-location.svg"}),o.userLocationMarker&&o.userLocationMarker.delete(),o.userLocationMarker=new MapSVG.Marker({location:o.userLocation,mapsvg:o,width:15,height:15}),o.userLocationMarker.node.addClass("mapsvg-user-location"),o.userLocationMarker.centered=!0,o.$scrollpane.append(o.userLocationMarker.node),o.userLocationMarker.adjustPosition(),t&&t(o.userLocation)})}
1,getUserLocation:function(o){if(!navigator.geolocation)return!1;navigator.geolocation.getCurrentPosition(function(e){var t={lat:e.coords.latitude,lng:e.coords.longitude};o&&o(t)})},getScale:function(){return this.$map.width()/this.viewBox[2]||1},updateSize:function(){var e=this;e.scale=e.getScale(),e.popover&&e.popover.adjustPosition(),e.markersAdjustPosition(),e.options.labelsRegions.on&&e.labelsRegionsAdjustPosition(),e.mapAdjustStrokes(),e.directoryWrap&&e.directoryWrap.height(e.$wrap.outerHeight())},getViewBox:function(){return this.viewBox},viewBoxSetBySize:function(e,t){var o=this;return e=parseFloat(e),t=parseFloat(t),o.setSize(e,t),o._viewBox=o.viewBoxGetBySize(e,t),o.setViewBox(o._viewBox),$(window).trigger("resize"),o.setSize(e,t),o.setZoomLevels(),o.viewBox},viewBoxGetBySize:function(e,t){var o=this,i=e/t,s=o.svgDefault.viewBox[2]/o.svgDefault.viewBox[3],a=$.extend([],o.svgDefault.viewBox);return i!=s&&(s<i?(a[2]=o.svgDefault.viewBox[3]*i,a[0]=o.svgDefault.viewBox[0]-(a[2]-o.svgDefault.viewBox[2])/2):(a[3]=o.svgDefault.viewBox[2]/i,a[1]=o.svgDefault.viewBox[1]-(a[3]-o.svgDefault.viewBox[3])/2)),a},viewBoxReset:function(e){var t=this;if(t.options.googleMaps.on&&t.googleMaps.map)if(e||(t.options.googleMaps.center=null,t.options.googleMaps.zoom=null),t.options.googleMaps.center&&t.options.googleMaps.zoom)t.googleMaps.map.setZoom(t.options.googleMaps.zoom),t.googleMaps.map.setCenter(t.options.googleMaps.center);else{var o=new google.maps.LatLng(t.geoViewBox.bottomLat,t.geoViewBox.leftLon),i=new google.maps.LatLng(t.geoViewBox.topLat,t.geoViewBox.rightLon),s=new google.maps.LatLngBounds(o,i);t.googleMaps.map.fitBounds(s,0),t.options.googleMaps.center=t.googleMaps.map.getCenter().toJSON(),t.options.googleMaps.zoom=t.googleMaps.map.getZoom()}else if(e){var a=t._viewBox||t.svgDefault.viewBox;t.zoomLevel=0,t._scale=1,t.setViewBox(a)}else t.setViewBox();return this.viewBox},getGeoViewBox:function(){var e=this,t=e.viewBox,o=e.convertSVGToGeo(t[0],t[1])[1],i=e.convertSVGToGeo(t[0]+t[2],t[1])[1];return[o,e.convertSVGToGeo(t[0],t[1])[0],i,e.convertSVGToGeo(t[0],t[1]+t[3])[0]]},mapAdjustStrokes:function(){var t=this;t.$svg.find("path, polygon, circle, ellipse, rect").each(function(e){$(this).data("stroke-width")&&$(this).css("stroke-width",$(this).data("stroke-width")/t.scale)})},zoomIn:function(e){var t=this;if(t.googleMaps.map){if(!t.isZooming){var o=t.zoomLevel>=t.options.zoom.limit[0]&&t.zoomLevel<=t.options.zoom.limit[1],i=t.googleMaps.map.getZoom(),s=t.googleMaps.zoomLimit?17:20,a=s<i+1?s:i+1,n=a-t.zoomDelta,r=n>=t.options.zoom.limit[0]&&n<=t.options.zoom.limit[1];if(o&&!r)return!1;t.isZooming=!0,t.googleMaps.map.setZoom(a),e&&(e=t.convertSVGToGeo(e[0],e[1]),t.googleMaps.map.setCenter({lat:e[0],lng:e[1]})),t.zoomLevel=n}}else t.canZoom&&(t.canZoom=!1,setTimeout(function(){t.canZoom=!0},700),t.zoom(1,e))},zoomOut:function(e){var t=this;if(t.googleMaps.map){if(!t.isZooming&&t.googleMaps.map.getZoom()-1>=t.options.googleMaps.minZoom){var o=t.zoomLevel>=t.options.zoom.limit[0]&&t.zoomLevel<=t.options.zoom.limit[1],i=t.googleMaps.map.getZoom(),s=i-1<1?1:i-1,a=s-t.zoomDelta,n=a>=t.options.zoom.limit[0]&&a<=t.options.zoom.limit[1];if(o&&!n)return!1;t.isZooming=!0,t.googleMaps.map.setZoom(s),t.zoomLevel=a}}else t.canZoom&&(t.canZoom=!1,setTimeout(function(){t.canZoom=!0},700),t.zoom(-1,e))},_touchZoomStart:function(e){var t=this;t._scale;t.scale=t.scale*zoom_k;t._scale;t._scale=t._scale*zoom_k;var o=t.viewBox[2],i=t.viewBox[3],s=[];s[2]=t._viewBox[2]/t._scale,s[3]=t._viewBox[3]/t._scale,s[0]=t.viewBox[0]+(o-s[2])/2,s[1]=viewBox[1]+(i-s[3])/2,t.setViewBox(s)},touchZoomMove:function(){},touchZoomEnd:function(){},zoomTo:function(e,i){var s=this;if(i=null!=i&&parseInt(i),"string"==typeof e&&(e=s.getRegion(e)),s.googleMaps.map)if(e instanceof MapSVG.Marker){var t=s.convertSVGToGeo(e.x,e.y);s.googleMaps.map.setZoom(i||1),s.googleMaps.map.setCenter({lat:t[0],lng:t[1]}),this.zoomLevel=this.googleMaps.map.getZoom()-this.zoomDelta}else{if(e&&void 0!==e.length)for(var o=e[0].getGeoBounds(),a=new google.maps.LatLng(o.sw[0],o.sw[1]),n=new google.maps.LatLng(o.ne[0],o.ne[1]),r=new google.maps.LatLngBounds(a,n),l=1;l<e.length-1;l++){var p=e[l].getGeoBounds(),c=new google.maps.LatLng(p.sw[0],p.sw[1]),g=new google.maps.LatLng(p.ne[0],p.ne[1]);r.extend(c),r.extend(g)}else r=e.getGeoBounds(),a=new google.maps.LatLng(r.sw[0],r.sw[1]),n=new google.maps.LatLng(r.ne[0],r.ne[1]),r=new google.maps.LatLngBounds(a,n);s.googleMaps.map.fitBounds(r,0),s.googleMaps.zoomLimit&&17<s.googleMaps.map.getZoom()&&s.googleMaps.map.setZoom(17),this.zoomLevel=this.googleMaps.map.getZoom()-this.zoomDelta}else{var d,h=[],u=[];
1if(e instanceof MapSVG.Marker||e instanceof MapSVG.MarkersCluster)return s.zoomToMarkerOrCluster(e,i);if("object"==typeof e&&void 0!==e.length){if(e[0]instanceof MapSVG.Region){var m=[(h=e[0].getBBox())[0]],v=[h[1]],f=[S=h[0]+h[2]],b=[M=h[1]+h[3]];if(1<e.length)for(l=1;l<e.length;l++){d=e[l].getBBox(),m.push(d[0]),v.push(d[1]);var y=d[0]+d[2],w=d[1]+d[3];f.push(y),b.push(w)}m=Math.min.apply(Math,m),v=Math.min.apply(Math,v);var S=Math.max.apply(Math,f)-m,M=Math.max.apply(Math,b)-v;h=[m,v,S,M]}else if(e[0]instanceof MapSVG.Marker||e[0]instanceof MapSVG.MarkersCluster){var x=[],k=[];if(1===e.length)return s.zoomToMarkerOrCluster(e[0]);e.forEach(function(e){x.push(e.x),k.push(e.y)});var V=Math.min.apply(null,x),G=Math.max.apply(null,x),C=Math.min.apply(null,k),D=Math.max.apply(null,k),L=10;L=s.convertPixelToSVG([L,0])[0]-s.convertPixelToSVG([0,0])[0],h=[V-L,C-L,G-V+2*L,D-C+2*L]}}else h=e.getBBox();u=[];var B=!0;$.each(s.zoomLevels,function(e,t){if(B&&u&&u.length&&u[2]>h[2]&&u[3]>h[3]&&(h[2]>t.viewBox[2]||h[3]>t.viewBox[3])){s.zoomLevel=i||parseInt(e)-1;var o=s.zoomLevels[s.zoomLevel].viewBox;s.setViewBox([h[0]-o[2]/2+h[2]/2,h[1]-o[3]/2+h[3]/2,o[2],o[3]]),s._scale=s.zoomLevels[s.zoomLevel]._scale,B=!1}u=t&&t.viewBox})}},zoomToMarkerOrCluster:function(e,t){var o=this;o.zoomLevel=t||1;var i=o.zoomLevels[o.zoomLevel].viewBox;o.setViewBox([e.x-i[2]/2,e.y-i[3]/2,i[2],i[3]]),o._scale=o.zoomLevels[o.zoomLevel]._scale},centerOn:function(e,t){var o=this;if(o.options.googleMaps.on){t=t?(t+12)/o.getScale():0,o.$map.addClass("scrolling");var i=e.getCenterLatLng(t);o.googleMaps.map.panTo(i),setTimeout(function(){o.$map.removeClass("scrolling")},100)}else{t=t?(t+12)/o.getScale():0;var s=e.getBBox(),a=o.viewBox;o.setViewBox([s[0]-a[2]/2+s[2]/2,s[1]-a[3]/2+s[3]/2-t,a[2],a[3]])}},zoom:function(e,t,o){var i=this,s=i.viewBox[2],a=i.viewBox[3],n=[],r=i.zoomLevel>=i.options.zoom.limit[0]&&i.zoomLevel<=i.options.zoom.limit[1];if(o)n[2]=i._viewBox[2]/o,n[3]=i._viewBox[3]/o;else{var l=0<e?1:-1;if(!i.zoomLevels[i.zoomLevel+l])return;if(i._zoomLevel=i.zoomLevel,i._zoomLevel+=l,r&&(i._zoomLevel>i.options.zoom.limit[1]||i._zoomLevel<i.options.zoom.limit[0]))return!1;i.zoomLevel=i._zoomLevel;var p=i.zoomLevels[i.zoomLevel];i._scale=p._scale,n=p.viewBox}var c=[];if(t){var g=0<l?.5:-1;c=[(t[0]-i.viewBox[0])*g,(t[1]-i.viewBox[1])*g],n[0]=i.viewBox[0]+c[0],n[1]=i.viewBox[1]+c[1]}else c=[(s-n[2])/2,(a-n[3])/2],n[0]=i.viewBox[0]+c[0],n[1]=i.viewBox[1]+c[1];i.options.scroll.limit&&(n[0]<i.svgDefault.viewBox[0]?n[0]=i.svgDefault.viewBox[0]:n[0]+n[2]>i.svgDefault.viewBox[0]+i.svgDefault.viewBox[2]&&(n[0]=i.svgDefault.viewBox[0]+i.svgDefault.viewBox[2]-n[2]),n[1]<i.svgDefault.viewBox[1]?n[1]=i.svgDefault.viewBox[1]:n[1]+n[3]>i.svgDefault.viewBox[1]+i.svgDefault.viewBox[3]&&(n[1]=i.svgDefault.viewBox[1]+i.svgDefault.viewBox[3]-n[3])),i.setViewBox(n)},markerDelete:function(e){var t=this;t.editingMarker&&t.editingMarker.id==e.id&&(t.editingMarker=null,delete t.editingMarker),t.markers.splice(t.markersDict[e.id],1),t.updateMarkersDict(),e=null,0==t.markers.length&&(t.options.markerLastID=0)},markersClusterAdd:function(e){this.layers.markers.append(e.node),this.markersClusters.push(e),e.adjustPosition()},markerAdd:function(e){e.node.hide(),e.adjustPosition(),this.layers.markers.append(e.node),this.markers.push(e),e.mapped=!0,this.markersDict[e.id]=this.markers.length-1,setTimeout(function(){e.node.show()},100)},markerRemove:function(e){e.node.detach(),e.show(),this.markers.splice(this.markersDict[e.id],1),e.mapped=!1,this.updateMarkersDict()},markerId:function(){var e=this;e.options.markerLastID=e.options.markerLastID+1;var t="marker_"+e.options.markerLastID;return e.getMarker(t)?e.markerId():t},labelsRegionsAdjustPosition:function(){var o=this;o.$map.is(":visible")&&o.regions.forEach(function(e){e.center||(e.center=e.getCenterSVG());var t=o.convertSVGToPixel([e.center.x,e.center.y]);e.textLabel&&(e.textLabel[0].style.transform="translate(-50%,-50%) translate("+t[0]+"px,"+t[1]+"px)")})},markersAdjustPosition:function(){var t=this;t.markers.forEach(function(e){e.adjustPosition(t.scale)}
1),t.markersClusters.forEach(function(e){e.adjustPosition()}),t.userLocationMarker&&t.userLocationMarker.adjustPosition()},markerMoveStart:function(){this.data("ox",parseFloat(this.attr("x"))),this.data("oy",parseFloat(this.attr("y")))},markerMove:function(e,t){e/=this.scale,t/=this.scale,this.attr({x:this.data("ox")+e,y:this.data("oy")+t})},markerMoveEnd:function(){this.data("ox")==this.attr("x")&&this.data("oy")==this.attr("y")&&options.markerEditHandler.call(this)},setEditingMarker:function(e){var t=this;t.editingMarker=e,t.editingMarker.mapped||(t.editingMarker.needToRemove=!0,t.markerAdd(t.editingMarker))},unsetEditingMarker:function(){var e=this;e.editingMarker&&e.editingMarker.needToRemove&&e.markerRemove(e.editingMarker),e.editingMarker=null},getEditingMarker:function(){return this.editingMarker},scrollStart:function(e,t){var o=this;if($(e.target).hasClass("mapsvg-btn-map")||$(e.target).closest(".mapsvg-gauge").length)return!1;if(o.editMarkers.on&&"mapsvg-marker"==$(e.target).hasClass("class"))return!1;e.preventDefault();var i=e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches[0]?e.originalEvent.touches[0]:e;o.scrollStarted=!0,o.scroll=o.scroll||{},o.scroll.vxi=o.viewBox[0],o.scroll.vyi=o.viewBox[1],o.scroll.x=i.clientX,o.scroll.y=i.clientY,o.scroll.dx=0,o.scroll.dy=0,o.scroll.vx=0,o.scroll.vy=0,o.scroll.gx=i.clientX,o.scroll.gy=i.clientY,o.scroll.tx=o.scroll.tx||0,o.scroll.ty=o.scroll.ty||0,0===e.type.indexOf("mouse")&&($(document).on("mousemove.scroll.mapsvg",function(e){o.scrollMove(e)}),o.options.scroll.spacebar?$(document).on("keyup.scroll.mapsvg",function(e){32==e.keyCode&&o.scrollEnd(e,t)}):$(document).on("mouseup.scroll.mapsvg",function(e){o.scrollEnd(e,t)}))},scrollMove:function(e){var t=this;e.preventDefault(),t.isScrolling||(t.isScrolling=!0,t.$map.addClass("scrolling"));var o=e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches[0]?e.originalEvent.touches[0]:e,i=t.panBy(t.scroll.gx-o.clientX,t.scroll.gy-o.clientY);if(t.googleMaps.map&&(i.x||i.y)){var s=t.googleMaps.map.getCenter(),a=t.googleMaps.overlay.getProjection(),n=a.fromLatLngToDivPixel(s);n.x+=i.x?t.scroll.gx-o.clientX:0,n.y+=i.y?t.scroll.gy-o.clientY:0,s=a.fromDivPixelToLatLng(n),t.googleMaps.map.setCenter(s)}t.scroll.gx=o.clientX,t.scroll.gy=o.clientY,t.scroll.dx=t.scroll.x-o.clientX,t.scroll.dy=t.scroll.y-o.clientY;var r=parseInt(t.scroll.vxi+t.scroll.dx/t.scale),l=parseInt(t.scroll.vyi+t.scroll.dy/t.scale);t.options.scroll.limit&&(r<t.svgDefault.viewBox[0]?r=t.svgDefault.viewBox[0]:t.viewBox[2]+r>t.svgDefault.viewBox[0]+t.svgDefault.viewBox[2]&&(r=t.svgDefault.viewBox[0]+t.svgDefault.viewBox[2]-t.viewBox[2]),l<t.svgDefault.viewBox[1]?l=t.svgDefault.viewBox[1]:t.viewBox[3]+l>t.svgDefault.viewBox[1]+t.svgDefault.viewBox[3]&&(l=t.svgDefault.viewBox[1]+t.svgDefault.viewBox[3]-t.viewBox[3])),t.scroll.vx=r,t.scroll.vy=l},scrollEnd:function(e,t,o){var i=this;setTimeout(function(){i.scrollStarted=!1,i.isScrolling=!1},100),i.googleMaps&&i.googleMaps.overlay&&i.googleMaps.overlay.draw(),i.$map.removeClass("scrolling"),$(document).off("keyup.scroll.mapsvg"),$(document).off("mousemove.scroll.mapsvg"),$(document).off("mouseup.scroll.mapsvg"),!0!==o&&Math.abs(i.scroll.dx)<5&&Math.abs(i.scroll.dy)<5&&(i.editMarkers.on?i.clickAddsMarker&&i.markerAddClickHandler(e):i.region_clicked&&i.regionClickHandler(e,i.region_clicked)),i.viewBox[0]=i.scroll.vx||i.viewBox[0],i.viewBox[1]=i.scroll.vy||i.viewBox[1]},panBy:function(e,t){var o=this,i=o.scroll.tx-e,s=o.scroll.ty-t,a={x:!0,y:!0};if(o.options.scroll.limit){var n=o.$svg[0].getBoundingClientRect(),r=o.$map[0].getBoundingClientRect();(n.left-e>r.left&&e<0||n.right-e<r.right&&0<e)&&(i=o.scroll.tx,a.x=!1),(n.top-t>r.top&&t<0||n.bottom-t<r.bottom&&0<t)&&(s=o.scroll.ty,a.y=!1)}return o.$scrollpane.css({transform:"translate("+i+"px,"+s+"px)"}),o.scroll.tx=i,o.scroll.ty=s,a},scrollRegionClickHandler:function(e,t){this.region_clicked=t},touchStart:function(e,t){var o=this;e.preventDefault(),o.scrollStarted&&o.scrollEnd(e,t,!0);var i=e.originalEvent;o.options.zoom.fingers&&i.touches&&2==i.touches.length?(o.touchZoomStart=!0,o.scaleDistStart=Math.hypot(i.touches[0].pageX-i.touches[1].pageX,i.touches[0].pageY-i.touches[1].pageY)):i.touches&&1==i.touches.length&&o.scrollStart(e,t),$(document).on("touchmove.scroll.mapsvg",function(e){e.preventDefault(),o.touchMove(e,o)}).on("touchend.scroll.mapsvg",function(e){e.preventDefault(),o.touchEnd(e,o)})},touchMove:function(e,t){var o=this;e.preventDefault();var i=e.originalEvent;if(o.options.zoom.fingers&&i.touches&&2==i.touches.length){if(MapSVG.ios||(i.scale=Math.hypot(i.touches[0].pageX-i.touches[1].pageX,i.touches[0].pageY-i.touches[1].pageY)/o.scaleDistStart),1!=i.scale&&o.canZoom){var s=1<i.scale?1:-1,a=i.touches[0].pageX>=i.touches[1].pageX?i.touches[0].pageX-(i.touches[0].pageX-i.touches[1].pageX)/2-o.$svg.offset().left:i.touches[1].pageX-(i.touches[1].pageX-i.touches[0].pageX)/2-o.$svg.offset().left,n=i.touches[0].pageY>=i.touches[1].pageY?i.touches[0].pageY-(i.touches[0].pageY-i.touches[1].pageY)-o.$svg.offset().top:i.touches[1].pageY-(i.touches[1].pageY-i.touches[0].pageY)-o.$svg.offset().top,r=o.convertPixelToSVG([a,n]);0<s?o.zoomIn(r):o.zoomOut(r)}}else i.touches&&1==i.touches.length&&o.scrollMove(e)},touchEnd:function(e,t){e.preventDefault();e.originalEvent;this.touchZoomStart?this.touchZoomStart=!1:this.scrollStarted&&this.scrollEnd(e,t),$(document).off("touchmove.scroll.mapsvg"),$(document).off("touchend.scroll.mapsvg")},getSelected:function(){return this.selected_id},selectRegion:function(e,t){var o=this;if("string"==typeof e)var i=o.getRegion(e);else i=e;if(!i)return!1;if(o.options.multiSelect&&!o.editRegions.on){if(i.selected){if(o.deselectRegion(i),!t&&o.options.menu.on){if("database"==o.options.menu.source){if(i.objects&&i.objects.length)var s=i.objects.map(function(e){return e.id})}else s=[i.id];o.controllers.directory.deselectItems(s)}return}}else if(0<o.selected_id.length&&(o.deselectAllRegions(),!t&&o.options.menu.on)){if("database"==o.options.menu.source){if(i.objects&&i.objects.length)s=i.objects.map(function(e){return e.id})}else s=[i.id];o.controllers.directory.deselectItems()}if(o.selected_id.push(i.id),i.select(),!o.options.actions.region.click.filterDirectory&&!t&&o.options.menu.on&&o.controllers&&o.controllers.directory){if("database"==o.options.menu.source)if(i.objects&&i.objects.length)s=i.objects.map(function(e){return e.id});else s=[i.id];else s=[i.id];o.controllers.directory.selectItems(s)}o.options.actions.region.click.addIdToUrl&&!o.options.actions.region.click.showAnotherMap&&(window.location.hash="/m/"+i.id)},deselectAllRegions:function(){var o=this;$.each(o.selected_id,function(e,t){o.deselectRegion(o.getRegion(t))})},deselectRegion:function(e){var t=this;if(e||(e=t.getRegion(t.selected_id[0])),e){e.deselect();var o=$.inArray(e.id,t.selected_id);t.selected_id.splice(o,1)}t.options.actions.region.click.addIdToUrl&&-1!==window.location.hash.indexOf(e.id)&&history.replaceState(null,null," ")},highlightRegions:function(e){var t=this;e.forEach(function(e){!e||e.selected||e.disabled||(t.highlightedRegions.push(e),e.highlight())})},unhighlightRegions:function(){this.highlightedRegions.forEach(function(e){!e||e.selected||e.disabled||e.unhighlight()}),this.highlightedRegions=[]},selectMarker:function(e){var t=this;if(!(e instanceof MapSVG.Marker))return!1;t.deselectAllMarkers(),e.select(),t.selected_marker=e,t.layers.markers.addClass("mapsvg-with-marker-active"),t.options.menu.on&&"database"==t.options.menu.source&&(t.controllers.directory.deselectItems(),t.controllers.directory.selectItems(e.object.id))},deselectAllMarkers:function(){this.selected_marker&&this.selected_marker.deselect(),this.layers.markers.removeClass("mapsvg-with-marker-active")},deselectMarker:function(e){e&&e.deselect()},highlightMarker:function(e){this.layers.markers.addClass("mapsvg-with-marker-hover"),e.highlight(),this.highlighted_marker=e},unhighlightMarker:function(){this.layers.markers.removeClass("mapsvg-with-marker-hover"),this.highlighted_marker&&this.highlighted_marker.unhighlight()},convertMouseToSVG:function(e){var t=MapSVG.mouseCoords(e),o=t.x-this.$svg.offset().left,i=t.y-this.$svg.offset().top;return this.convertPixelToSVG([o,i])},convertSVGToPixel:function(e){var t=this,o=t.getScale(),i=0;t.options.googleMaps.on&&(t.viewBox[0]-t.svgDefault.viewBox[0]>t.svgDefault.viewBox[2]&&(i=t.svgDefault.viewBox[2]/t.mapLonDelta*360*Math.floor((t.viewBox[0]-t.svgDefault.viewBox[0])/t.svgDefault.viewBox[2])));return[(e[0]-t.svgDefault.viewBox[0]+i)*o,(e[1]-t.svgDefault.viewBox[1]+0)*o]},convertPixelToSVG:function(e){var t=this.getScale();return[e[0]/t+this.svgDefault.viewBox[0],e[1]/t+this.svgDefault.viewBox[1]]},convertGeoToSVG:function(e){var t=this,o=parseFloat(e[0]),i=(parseFloat(e[1])-t.geoViewBox.leftLon)*(t.svgDefault.viewBox[2]/t.mapLonDelta),s=(o=3.14159*o/180,t.svgDefault.viewBox[2]/t.mapLonDelta*360/6.28318),a=s/2*Math.log((1+Math.sin(t.mapLatBottomDegree))/(1-Math.sin(t.mapLatBottomDegree))),n=t.svgDefault.viewBox[3]-(s/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))-a);return[i+=t.svgDefault.viewBox[0],n+=t.svgDefault.viewBox[1]]},convertSVGToGeo:function(e,t){var o=this;e-=o.svgDefault.viewBox[0],t-=o.svgDefault.viewBox[1];var i=o.svgDefault.viewBox[2]/o.mapLonDelta*360/(2*Math.PI),s=i/2*Math.log((1+Math.sin(o.mapLatBottomDegree))/(1-Math.sin(o.mapLatBottomDegree))),a=(o.svgDefault.viewBox[3]+s-t)/i,n=180/Math.PI*(2*Math.atan(Math.exp(a))-Math.PI/2),r=o.geoViewBox.leftLon+e/o.svgDefault.viewBox[2]*o.mapLonDelta;
1return[n=parseFloat(n.toFixed(6)),r=parseFloat(r.toFixed(6))]},convertGeoBoundsToViewBox:function(e,t){var o=this,i=parseFloat(coords[0]),s=(parseFloat(coords[1])-o.geoViewBox.leftLon)*(o.svgDefault.viewBox[2]/o.mapLonDelta),a=(i=3.14159*i/180,o.svgDefault.viewBox[2]/o.mapLonDelta*360/6.28318),n=a/2*Math.log((1+Math.sin(o.mapLatBottomDegree))/(1-Math.sin(o.mapLatBottomDegree))),r=o.svgDefault.viewBox[3]-(a/2*Math.log((1+Math.sin(i))/(1-Math.sin(i)))-n);return[s+=o.svgDefault.viewBox[0],r+=o.svgDefault.viewBox[1]]},pickGaugeColor:function(e){var t=this,o=(e-t.options.gauge.min)/t.options.gauge.maxAdjusted;return[Math.round(t.options.gauge.colors.diffRGB.r*o+t.options.gauge.colors.lowRGB.r),Math.round(t.options.gauge.colors.diffRGB.g*o+t.options.gauge.colors.lowRGB.g),Math.round(t.options.gauge.colors.diffRGB.b*o+t.options.gauge.colors.lowRGB.b),Math.round(t.options.gauge.colors.diffRGB.a*o+t.options.gauge.colors.lowRGB.a)]},isRegionDisabled:function(e,t){var o=this;return!(!o.options.regions[e]||!o.options.regions[e].disabled&&"none"!=t)||!(null!=o.options.regions[e]&&!MapSVG.parseBoolean(o.options.regions[e].disabled)||!o.options.disableAll&&"none"!=t&&"labels"!=e&&"Labels"!=e)},regionClickHandler:function(e,region){var _this=this;_this.region_clicked=null;var actions=_this.options.actions;if(!_this.eventsPreventList.click){if(_this.editRegions.on)return _this.selectRegion(region.id),void _this.regionEditHandler.call(region);if(region instanceof MapSVG.MarkersCluster)_this.zoomTo(region.markers);else if(region.isRegion()){if(_this.selectRegion(region.id),actions.region.click.zoom&&_this.zoomTo(region,actions.region.click.zoomToLevel),actions.region.click.filterDirectory&&(_this.database.getAll({filters:{regions:region.id}}).done(function(){_this.popover&&_this.popover.redraw(region.forTemplate()),_this.detailsController&&_this.detailsController.redraw(region.forTemplate())}
1),_this.updateFiltersState()),actions.region.click.showDetails&&_this.loadDetailsView(region),actions.region.click.showPopover?actions.region.click.zoom?setTimeout(function(){_this.showPopover(region)},400):_this.showPopover(region):e&&-1!==e.type.indexOf("touch")&&actions.region.touch.showPopover&&(actions.region.click.zoom?setTimeout(function(){_this.showPopover(region)},400):_this.showPopover(region)),actions.region.click.goToLink){var linkParts=actions.region.click.linkField.split("."),url;if(1<linkParts.length){var obj=linkParts.shift(),attr="."+linkParts.join(".");if("Region"==obj){if(region.data)try{url=eval("region.data"+attr)}catch(e){console.log("No such field as region.data"+attr)}}else if(region.objects&&region.objects[0])try{url=eval("region.objects[0]"+attr)}catch(e){console.log("No such field as region.objects[0]"+attr)}if(url&&!_this.disableLinks){if(_this.editMode)return alert("Redirect: "+url+"\nLinks are disabled in the preview."),!0;if(actions.region.click.newTab){var win=window.open(url,"_blank");win.focus()}else window.location.href=url}}}if(actions.region.click.showAnotherMap){if(_this.editMode)return alert('"Show another map" action is disabled in the preview'),!0;var linkParts=actions.region.click.showAnotherMapField.split("."),url;if(1<linkParts.length){var obj=linkParts.shift(),attr="."+linkParts.join("."),map_id;if("Region"==obj?region.data&&(map_id=eval("region.data"+attr)):region.objects&&region.objects[0]&&(map_id=eval("region.objects[0]"+attr)),map_id){var container=actions.region.click.showAnotherMapContainerId?$("#"+actions.region.click.showAnotherMapContainerId):_this.$map;jQuery.get(ajaxurl,{action:"mapsvg_get",id:map_id},function(data){container.find("svg").length&&container.mapSvg().destroy(),eval("var options = "+data),container.mapSvg(options)})}}}if(_this.events["click.region"])try{_this.events["click.region"].call(region,e,_this)}catch(e){console.log(e)}}else if(region.isMarker()){_this.selectMarker(region);var passingObject=region.object;if(actions.marker.click.zoom&&_this.zoomTo(region,actions.marker.click.zoomToLevel),actions.marker.click.filterDirectory&&(_this.database.getAll({filters:{id:region.object.id}}
1),_this.updateFiltersState()),actions.marker.click.showDetails&&_this.loadDetailsView(passingObject),actions.marker.click.showPopover?actions.marker.click.zoom?setTimeout(function(){_this.showPopover(passingObject)},500):_this.showPopover(passingObject):e&&-1!==e.type.indexOf("touch")&&actions.marker.touch.showPopover&&(actions.marker.click.zoom?setTimeout(function(){_this.showPopover(passingObject)},500):_this.showPopover(passingObject)),actions.marker.click.goToLink){var linkParts=actions.marker.click.linkField.split("."),url;if(1<linkParts.length){var obj=linkParts.shift(),attr="."+linkParts.join(".");try{url=eval("passingObject"+attr)}catch(e){console.log("MapSVG: No such field as passingObject"+attr)}if(url&&!_this.disableLinks&&_this.editMode)return alert("Redirect: "+url+"\nLinks are disabled in the preview."),!0;if(actions.marker.click.newTab){var win=window.open(url,"_blank");win.focus()}else window.location.href=url}}if(_this.events["click.marker"])try{_this.events["click.marker"].call(region,e,_this)}catch(e){console.log(e)}}}},fileExists:function(e){if("data"==e.substr(0,4))return!0;var t=new XMLHttpRequest;return t.open("HEAD",e,!1),t.send(),404!=t.status},getStyle:function(e,t){if(e.currentStyle)var o=e.currentStyle.margin;else if(window.getComputedStyle)if(window.getComputedStyle.getPropertyValue)o=window.getComputedStyle(e,null).getPropertyValue(t);else o=window.getComputedStyle(e)[t];return o},hideMarkersExceptOne:function(t){this.markers.forEach(function(e){e.id!=t&&e.hide()}),this.$wrap.addClass("mapsvg-edit-marker-mode")},showMarkers:function(){this.markers.forEach(function(e){e.show()}),this.$wrap.removeClass("mapsvg-edit-marker-mode")},markerAddClickHandler:function(e){var t=this;if($(e.target).hasClass("mapsvg-marker"))return!1;var o=MapSVG.mouseCoords(e),i=o.x-t.$svg.offset().left,s=o.y-t.$svg.offset().top,a=t.convertPixelToSVG([i,s]),n=t.convertSVGToGeo(a[0],a[1]);if(!$.isNumeric(i)||!$.isNumeric(s))return!1;var r=new MapSVG.Location({x:a[0],y:a[1],lat:n[0],lng:n[1],img:t.options.defaultMarkerImage});if(t.editingMarker)t.editingMarker.setXy(a);else{var l=new MapSVG.Marker({location:r,mapsvg:this});t.markerAdd(l),t.markerEditHandler&&t.markerEditHandler.call(l)}},setDefaultMarkerImage:function(e){this.options.defaultMarkerImage=e},setMarkerImagesDependency:function(){var e=this.locationField||this.database.getSchemaField("location");e.markersByFieldEnabled&&e.markerField&&0<Object.values(e.markersByField).length?(this.setMarkersByField=!0,this.locationField=e):this.setMarkersByField=!1},getMarkerImage:function(e,t){var o;return this.setMarkersByField&&(o="object"==typeof e?e[this.locationField.markerField]:e,this.locationField.markersByField[o])?this.locationField.markersByField[o]:t&&t.img?t.img:this.options.defaultMarkerImage?this.options.defaultMarkerImage:mapsvg_paths.root+"markers/_pin_default.png"},setMarkersEditMode:function(e,t){this.editMarkers.on=MapSVG.parseBoolean(e),this.clickAddsMarker=this.editMarkers.on,this.setEventHandlers()},setRegionsEditMode:function(e){this.editRegions.on=MapSVG.parseBoolean(e),this.deselectAllRegions(),this.setEventHandlers()},setEditMode:function(e){this.editMode=e},setDataEditMode:function(e){this.editData.on=MapSVG.parseBoolean(e),this.deselectAllRegions(),this.setEventHandlers()},download:function(){var e=this;e.downloadForm||(e.downloadForm=$('<form id="mdownload" action="/wp-content/plugins/mapsvg-dev/download.php" method="POST">
1<input type="hidden" name="svg_file" value="0" /><input type="hidden" name="svg_title"></form>'),e.downloadForm.appendTo("body")),e.downloadForm.find('input[name="svg_file"]').val(e.$svg.prop("outerHTML")),e.downloadForm.find('input[name="svg_title"]').val(e.options.title),setTimeout(function(){jQuery("#mdownload").submit()},500)},showTooltip:function(e){e.length&&(this.tooltip.container.html(e),this.tooltip.container.addClass("mapsvg-tooltip-visible"))},popoverAdjustPosition:function(){var e=this;if(e.$popover&&e.$popover.data("point")){var t=e.convertSVGToPixel(e.$popover.data("point"));e.$popover[0].style.transform="translateX(-50%) translate("+t[0]+"px,"+t[1]+"px)"}},showPopover:function(e){var t,o=this,i=e instanceof MapSVG.Region?e:e.location&&e.location.marker&&e.location.marker?e.location.marker:null;i&&(t=i instanceof MapSVG.Marker?{x:i.x,y:i.y}:i.getCenterSVG(),o.popover&&o.popover.destroy(),o.popover=new MapSVG.PopoverController({container:o.$popover,point:t,yShift:i instanceof MapSVG.Marker?i.height:0,template:e instanceof MapSVG.Region?o.templates.popoverRegion:o.templates.popoverMarker,mapsvg:o,data:e instanceof MapSVG.Region?e.forTemplate():e,mapObject:i,scrollable:!0,withToolbar:!MapSVG.isPhone||!o.options.popovers.mobileFullscreen,events:{shown:function(e){if(o.options.popovers.centerOn){var t=this.container.height()/2;!o.options.popovers.centerOn||MapSVG.isPhone&&o.options.popovers.mobileFullscreen||o.centerOn(i,t)}try{o.events["shown.popover"]&&o.events["shown.popover"].call(this,o)}catch(e){console.log(e)}o.popoverShowingFor=i,o.trigger("popoverShown")},closed:function(e){o.options.popovers.resetViewboxOnClose&&o.viewBoxReset(!0),o.popoverShowingFor=null;try{o.events["closed.popover"]&&o.events["closed.popover"].call(this,e)}catch(e){console.log(e)}o.trigger("popoverClosed")},resize:function(){if(o.options.popovers.centerOn){var e=this.container.height()/2;!o.options.popovers.centerOn||MapSVG.isPhone&&o.options.popovers.mobileFullscreen||o.centerOn(i,e)}}}}))},hidePopover:function(){this.popover&&this.popover.close()},hideTip:function(){this.tooltip.container.removeClass("mapsvg-tooltip-visible")},popoverOffHandler:function(e){this.isScrolling||$(e.target).closest(".mapsvg-popover").length||$(e.target).hasClass("mapsvg-btn-map")||this.popover&&this.popover.close()},mouseOverHandler:function(e,t){var o=this;if(!o.eventsPreventList.mouseover){var i,s;if(o.options.tooltips.on)t instanceof MapSVG.Region&&(i="tooltipRegion",s=t.forTemplate()),t instanceof MapSVG.Marker&&(i="tooltipMarker",s=t.object),o.popoverShowingFor!==t&&o.showTooltip(o.templates[i](s));if(o.options.menu.on){if("database"==o.options.menu.source){if(t instanceof MapSVG.Region&&t.objects.length)var a=t.objects.map(function(e){return e.id});if(t instanceof MapSVG.Marker)a=t.object?t.object.id:[]}else{if(t instanceof MapSVG.Region)a=[t.id];if(this instanceof MapSVG.Marker&&t.object.regions&&t.object.regions.length)a=t.object.regions.map(function(e){return e.id})}o.controllers.directory.highlightItems(a)}if(t instanceof MapSVG.Region){if(t.selected||t.highlight(),o.events["mouseover.region"])try{o.events["mouseover.region"].call(t,e,o)}catch(e){console.log(e)}}else if(o.highlightMarker(t),o.events["mouseover.marker"])try{o.events["mouseover.marker"].call(t,e,o)}catch(e){console.log(e)}}},mouseOutHandler:function(e,t){var o=this;if(!o.eventsPreventList.mouseout){if(o.options.tooltips.on&&o.hideTip(),t instanceof MapSVG.Region){if(t.selected||t.unhighlight(),o.events["mouseout.region"])try{o.events["mouseout.region"].call(t,e,o)}catch(e){console.log(e)}}else if(o.unhighlightMarker(t),o.events["mouseout.marker"])try{o.events["mouseout.marker"].call(t,e,o)}catch(e){console.log(e)}if(o.options.menu.on){if("database"==o.options.menu.source&&t instanceof MapSVG.Marker)t.object&&t.object.id;o.controllers.directory.unhighlightItems()}}},updateMarkersDict:function(){var o=this;o.markersDict={},o.markers.forEach(function(e,t){o.markersDict[e.id]=t})},eventsPrevent:function(e){this.eventsPreventList[e]=!0},eventsRestore:function(e){e?this.eventsPreventList[e]=!1:this.eventsPreventList={}},setEventHandlers:function(){var i=this;i.$map.off(".common.mapsvg"),i.$scrollpane.off(".common.mapsvg"),$(document).off("keydown.scroll.mapsvg"),$(document).off("mousemove.scrollInit.mapsvg"),$(document).off("mouseup.scrollInit.mapsvg"),i.editMarkers.on&&i.$map.on("touchstart.common.mapsvg mousedown.common.mapsvg",".mapsvg-marker",function(e){e.originalEvent.preventDefault();var t=i.getMarker($(this).attr("id")),o=MapSVG.mouseCoords(e);t.drag(o,i.scale,function(){i.mapIsGeo&&(this.geoCoords=i.convertSVGToGeo(this.x+this.width/2,this.y+(this.height-1))),i.markerEditHandler&&i.markerEditHandler.call(this,!0),this.onChange&&this.onChange.call(this)},function(){i.markerEditHandler&&i.markerEditHandler.call(this),this.onChange&&this.onChange.call(this)})}),i.editMarkers.on||i.$map.on("mouseover.common.mapsvg",".mapsvg-region",function(e){var t=$(this).attr("id");i.mouseOverHandler.call(i,e,i.getRegion(t))}).on("mouseleave.common.mapsvg",".mapsvg-region",function(e){var t=$(this).attr("id");i.mouseOutHandler.call(i,e,i.getRegion(t))}),i.editRegions.on||i.$map.on("mouseover.common.mapsvg",".mapsvg-marker",function(e){var t=$(this).attr("id");i.mouseOverHandler.call(i,e,i.getMarker(t))}).on("mouseleave.common.mapsvg",".mapsvg-marker",function(e){var t=$(this).attr("id");i.mouseOutHandler.call(i,e,i.getMarker(t))}
1),i.options.scroll.spacebar?$(document).on("keydown.scroll.mapsvg",function(e){"INPUT"===document.activeElement.tagName||i.isScrolling||32!=e.keyCode||(e.preventDefault(),i.$map.addClass("mapsvg-scrollable"),$(document).on("mousemove.scrollInit.mapsvg",function(e){i.isScrolling=!0,$(document).off("mousemove.scrollInit.mapsvg"),i.scrollStart(e,i)}).on("keyup.scroll.mapsvg",function(e){32==e.keyCode&&($(document).off("mousemove.scrollInit.mapsvg"),i.$map.removeClass("mapsvg-scrollable"))}))}):i.options.scroll.on?i.$map.on("touchstart.common.mapsvg mousedown.common.mapsvg",function(e){if($(e.target).hasClass("mapsvg-popover")||$(e.target).closest(".mapsvg-popover").length)$(e.target).hasClass("mapsvg-popover-close")&&"touchstart"==e.type&&e.cancelable&&e.preventDefault();else{if("touchstart"==e.type&&e.cancelable&&e.preventDefault(),e.target&&$(e.target).attr("class")&&-1!=$(e.target).attr("class").indexOf("mapsvg-region")){var t=i.getRegion($(e.target).attr("id"));i.scrollRegionClickHandler.call(i,e,t)}else if(e.target&&$(e.target).attr("class")&&-1!=$(e.target).attr("class").indexOf("mapsvg-marker")&&-1===$(e.target).attr("class").indexOf("mapsvg-marker-cluster")){if(i.editMarkers.on)return;t=i.getMarker($(e.target).attr("id"));i.scrollRegionClickHandler.call(i,e,t)}else if(e.target&&$(e.target).attr("class")&&-1!=$(e.target).attr("class").indexOf("mapsvg-marker-cluster")){if(i.editMarkers.on)return;t=$(e.target).data("cluster");i.scrollRegionClickHandler.call(i,e,t)}"mousedown"==e.type?i.scrollStart(e,i):i.touchStart(e,i)}}):i.editMarkers.on?i.clickAddsMarker&&i.$map.on("touchend.common.mapsvg mouseup.common.mapsvg",function(e){e.cancelable&&e.preventDefault(),i.markerAddClickHandler(e)}):(i.$map.on("touchstart.common.mapsvg",".mapsvg-region",function(e){i.touchScrollStart=$(window).scrollTop()}),i.$map.on("touchstart.common.mapsvg",".mapsvg-marker",function(e){i.touchScrollStart=$(window).scrollTop()}),i.$map.on("touchend.common.mapsvg mouseup.common.mapsvg",".mapsvg-region",function(e){e.cancelable&&e.preventDefault(),void 0!==i.touchScrollStart&&i.touchScrollStart!==$(window).scrollTop()||i.regionClickHandler.call(i,e,i.getRegion($(this).attr("id")))}),i.$map.on("touchend.common.mapsvg mouseup.common.mapsvg",".mapsvg-marker",function(e){e.cancelable&&e.preventDefault(),void 0!==i.touchScrollStart&&i.touchScrollStart!==$(window).scrollTop()||i.regionClickHandler.call(i,e,i.getMarker($(this).attr("id")))}),i.$map.on("touchend.common.mapsvg mouseup.common.mapsvg",".mapsvg-marker-cluster",function(e){if(e.cancelable&&e.preventDefault(),!i.touchScrollStart||i.touchScrollStart==$(window).scrollTop()){var t=$(this).data("cluster");i.zoomTo(t.markers)}}))},setLabelsRegions:function(e){var t=this;null!=(e=e||t.options.labelsRegions).on&&(e.on=MapSVG.parseBoolean(e.on)),$.extend(!0,t.options,{labelsRegions:e}),t.options.labelsRegions.on?(t.regions.forEach(function(e){e.textLabel||(e.textLabel=jQuery('<div class="mapsvg-region-label" />'),t.$scrollpane.append(e.textLabel));try{e.textLabel.html(t.templates.labelRegion(e.forTemplate()))}catch(e){console.error('MapSVG: Error in the "Region Label" template')}}),t.labelsRegionsAdjustPosition()):t.regions.forEach(function(e){e.textLabel&&(e.textLabel.remove(),e.textLabel=null,delete e.textLabel)})},deleteLabelsMarkers:function(){this.markers.forEach(function(e){e.textLabel&&(e.textLabel.remove(),e.textLabel=null,delete e.textLabel)})},setLabelsMarkers:function(e){var t=this;null!=(e=e||t.options.labelsMarkers).on&&(e.on=MapSVG.parseBoolean(e.on)),$.extend(!0,t.options,{labelsMarkers:e}),t.options.labelsMarkers.on?(t.markers.forEach(function(e){e.textLabel||(e.textLabel=jQuery('<div class="mapsvg-marker-label" data-object-id="'+e.object.id+'"/>'),t.$scrollpane.append(e.textLabel));try{e.textLabel.html(t.templates.labelMarker(e.object))}catch(e){console.error('MapSVG: Error in the "Marker Label" template')}}),t.markersAdjustPosition()):t.deleteLabelsMarkers()},addLayer:function(e){return this.layers[e]=$('<div class="mapsvg-layer mapsvg-layer-'+e+'"></div>'),this.$layers.append(this.layers[e]),this.layers[e]},getDatabaseService:function(){return this.database},getDb:function(){return this.database},getDbRegions:function(){return this.regionsDatabase},regionAdd:function(e){var o=this,t=new MapSVG.Region($(e),o.options,o.regionID,o);return t.setStatus(1),o.regions.push(t),o.regions.sort(function(e,t){return e.id==t.id?0:+(e.id>t.id)||-1}),o.regions.forEach(function(e,t){o.regionsDict[e.id]=t}),t},regionDelete:function(e){var t=_this.regionsDict[e];if(void 0!==t){var o=_this.getRegion(e);o.node&&o.node.remove(),_this.regions.splice(t,1),delete _this.regionsDict[e]}else $("#"+e).length&&$("#"+e).remove()},reloadRegions:function(){var o=this;o.regions=[],o.regionsDict={},o.$svg.find(".mapsvg-region").removeClass("mapsvg-region"),o.$svg.find(".mapsvg-region-disabled").removeClass("mapsvg-region-disabled"),o.$svg.find("path, polygon, circle, ellipse, rect").each(function(e){if(!$(this).closest("defs").length&&$(this)[0].getAttribute("id")&&(!o.options.regionPrefix||o.options.regionPrefix&&0===$(this)[0].getAttribute("id").indexOf(o.options.regionPrefix))){var t=new MapSVG.Region($(this),o.options,o.regionID,o);o.regions.push(t)}}),o.regions.sort(function(e,t){return e.id==t.id?0:+(e.id>t.id)||-1}),o.regions.forEach(function(e,t){o.regionsDict[e.id]=t})},reloadRegionsFull:function(){var o=this,i=o.regionsDatabase.getSchemaFieldByType("status");o.regions.forEach(function(e){var t=o.regionsDatabase.getLoadedObject(e.id);t?(e.data=t,i&&void 0!==t.status&&null!==t.status&&e.setStatus(t.status)):null!==o.options.filters.filteredRegionsStatus&&""!==o.options.filters.filteredRegionsStatus&&void 0!==o.options.filters.filteredRegionsStatus&&e.setStatus(o.options.filters.filteredRegionsStatus)}),o.loadDirectory(),o.setGauge(),o.setLayersControl(),o.setGroups(),o.options.labelsRegions.on&&o.setLabelsRegions()},fixMarkersWorldScreen:function(){var i=this;i.googleMaps.map&&setTimeout(function(){var t={left:0,right:0};
1if(1<i.markers.length&&(i.markers.forEach(function(e){e.node.offset().left<i.$map.offset().left+i.$map.width()/2?t.left++:t.right++}),0===t.left||0===t.right)){var e=0===t.left?1:-1,o=i.svgDefault.viewBox[2]/i.mapLonDelta*360*i.getScale();i.googleMaps.map.panBy(e*o,0)}},600)},updateOutdatedOptions:function(e){e.menu&&(e.menu.position||e.menu.customContainer)&&(e.menu.customContainer?e.menu.location="custom":(e.menu.position="left"===e.menu.position?"left":"right",e.menu.location="left"===e.menu.position?"leftSidebar":"rightSidebar",e.containers&&e.containers[e.menu.location]||(e.containers=e.containers||{},e.containers[e.menu.location]={on:!1,width:"200px"}),e.containers[e.menu.location].width=e.menu.width,MapSVG.parseBoolean(e.menu.on)&&(e.containers[e.menu.location].on=!0)),delete e.menu.position,delete e.menu.width,delete e.menu.customContainer),!e.detailsView||"near"!==e.detailsView.location&&"top"!==e.detailsView.location||(e.detailsView.location="mapContainer"),e.controls||(e.controls={},e.controls.zoom=e.zoom&&e.zoom.on&&"hide"!==e.zoom.buttons.location,e.controls.location=e.zoom&&"hide"!==e.zoom.buttons.location?e.zoom.buttons.location:"right"),e.colors&&!e.colors.markers&&(e.colors.markers={base:{opacity:100,saturation:100},hovered:{opacity:100,saturation:100},unhovered:{opacity:100,saturation:100},active:{opacity:100,saturation:100},inactive:{opacity:100,saturation:100}})},init:function(e,t){var n=this;if(!e.source)throw new Error("MapSVG: please provide SVG file source.");if("remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),Math.hypot=Math.hypot||function(){for(var e=0,t=arguments.length,o=0;o<t;o++){if(arguments[o]===1/0||arguments[o]===-1/0)return 1/0;e+=arguments[o]*arguments[o]}return Math.sqrt(e)},SVGElement.prototype.getTransformToElement=SVGElement.prototype.getTransformToElement||function(e){return e.getScreenCTM().inverse().multiply(this.getScreenCTM())},0===e.source.indexOf("//")?e.source=e.source.replace(/^\/\/[^\/]+/,"").replace("//","/"):e.source=e.source.replace(/^.*:\/\/[^\/]+/,"").replace("//","/"),n.editMode=e.editMode,delete e.editMode,n.updateOutdatedOptions(e),n.options=$.extend(!0,{},n.defaults,e),n.id=n.options.db_map_id,"new"==n.id&&(n.id=null),n.highlightedRegions=[],n.editRegions={on:!1},n.editMarkers={on:!1},n.editData={on:!1},n.map=t,n.$map=$(t),n.$scrollpane=$('<div class="mapsvg-scrollpane"></div>').appendTo(n.$map),n.$layers=$('<div class="mapsvg-layers-wrap"></div>').appendTo(n.$scrollpane),n.whRatio=0,n.isScrolling=!1,n.markerOptions={},n.svgDefault={},n.refLength=0,n.scale=1,n._scale=1,n.selected_id=[],n.mapData={},n.regions=[],n.regionsDict={},n.regionID={id:0},n.markers=[],n.markersDict={},n.markersClusters=[],n.markersClustersDict=[],n._viewBox=[],n.viewBox=[],n.viewBoxZoom=[],n.viewBoxFind=void 0,n.zoomLevel=0,n.scroll={},n.layers={},n.geoCoordinates=!1,n.geoViewBox={leftLon:0,topLat:0,rightLon:0,bottomLat:0},n.eventsPreventList={},n.googleMaps={loaded:!1,initialized:!1,map:null,zoomLimit:!0},n.setEvents(e.events),n.events.beforeLoad)try{n.events.beforeLoad.call(n)}catch(e){}if(n.events.beforeLoad&&n.events.beforeLoad.beforeLoad&&"function"==typeof n.events.beforeLoad.beforeLoad)try{n.events.beforeLoad.beforeLoad.call(n)}catch(e){console.log(e)}if(n.setCss(),n.$map.addClass("mapsvg").addClass("no-transitions").css("background",n.options.colors.background),n.setContainers(n.options.containers),n.setColors(),n.$loading=$("<div>"+n.options.loadingText+"</div>").addClass("mapsvg-loading"),n.$map.append(n.$loading),n.addLayer("markers"),n.addLayer("popovers"),n.$loading.css({"margin-left":function(){return-$(this).outerWidth(!1)/2+"px"},"margin-top":function(){return-$(this).outerHeight(!1)/2+"px"}}),n.options.googleMaps.on&&n.$map.addClass("mapsvg-google-map-loading"),n.options.extension&&$().mapSvg.extensions&&$().mapSvg.extensions[n.options.extension]){var o=$().mapSvg.extensions[n.options.extension];o&&o.common(n)}return $.ajax({url:n.options.source+"?v="+n.options.svgFileVersion}).fail(function(e){if(404==e.status){var t="MapSVG: file not found - "+n.options.source+"\n\nIf you moved MapSVG from another server please read the following docs page: https://mapsvg.com/docs/installation/moving";n.editMode?alert(t):console.error(t)}else{t="MapSVG: can't load SVG file for unknown reason. Please contact support: https://mapsvg.ticksy.com";n.editMode?alert(t):console.error(t)}}).done(function(e){var t=$(e).find("svg");if(n.$svg=t,n.svgDefault.width=t.attr("width"),n.svgDefault.height=t.attr("height"),n.svgDefault.viewBox=t.attr("viewBox"),n.svgDefault.width&&n.svgDefault.height)n.svgDefault.width=parseFloat(n.svgDefault.width.replace(/px/g,"")),n.svgDefault.height=parseFloat(n.svgDefault.height.replace(/px/g,"")),n.svgDefault.viewBox=n.svgDefault.viewBox?n.svgDefault.viewBox.split(" "):[0,0,n.svgDefault.width,n.svgDefault.height];else{if(!n.svgDefault.viewBox){var o="MapSVG: width/height and viewBox are missing in the SVG file. Can't parse the file because of that.";return n.editMode?alert(o):console.error(o),!1}n.svgDefault.viewBox=n.svgDefault.viewBox.split(" "),n.svgDefault.width=parseFloat(n.svgDefault.viewBox[2]),n.svgDefault.height=parseFloat(n.svgDefault.viewBox[3])}var i=t.attr("mapsvg:geoViewBox")||t.attr("mapsvg:geoviewbox");if(i&&4==(i=i.split(" ")).length&&(n.mapIsGeo=!0,n.geoCoordinates=!0,n.geoViewBox={leftLon:parseFloat(i[0]),topLat:parseFloat(i[1]),rightLon:parseFloat(i[2]),bottomLat:parseFloat(i[3])},n.mapLonDelta=n.geoViewBox.rightLon-n.geoViewBox.leftLon,n.mapLatBottomDegree=3.14159*n.geoViewBox.bottomLat/180),$.each(n.svgDefault.viewBox,function(e,t){n.svgDefault.viewBox[e]=parseFloat(t)}
1),n._viewBox=4==n.options.viewBox.length&&n.options.viewBox||n.svgDefault.viewBox,$.each(n._viewBox,function(e,t){n._viewBox[e]=parseFloat(t)}),t.attr("preserveAspectRatio","xMidYMid meet"),t.removeAttr("width"),t.removeAttr("height"),n.reloadRegions(),n.$scrollpane.append(t),n.setSize(n.options.width,n.options.height,n.options.responsive),n.options.disableAll&&n.setDisableAll(!0),n.setViewBox(n._viewBox),n.setResponsive(n.options.responsive,!0),n.setScroll(n.options.scroll,!0),n.setZoom(n.options.zoom),n.setControls(n.options.controls),n.setGoogleMaps(),n.options.tooltipsMode&&(n.options.tooltips.mode=n.options.tooltipsMode),n.setTooltips(n.options.tooltips),n.options.popover&&(n.options.popovers=n.options.popover),n.setPopovers(n.options.popovers),n.options.cursor&&n.setCursor(n.options.cursor),n.setTemplates(n.options.templates),!n.options.backend&&n.options.extension&&$().mapSvg.extensions&&$().mapSvg.extensions[n.options.extension]){var s=$().mapSvg.extensions[n.options.extension];s&&s.frontend(n)}if(n.filtersSchema=new MapSVG.Filters(n.options.filtersSchema),n.database=new MapSVG.DatabaseService({map_id:n.id,perpage:n.options.database.pagination.on?n.options.database.pagination.perpage:0,sortBy:"database"==n.options.menu.source?n.options.menu.sortBy:"id",sortDir:"database"==n.options.menu.source?n.options.menu.sortDirection:"desc",table:"database"},n),n.database.on("dataLoaded",function(){n.fitOnDataLoadDone=!1,n.addLocations(),n.fixMarkersWorldScreen(),n.attachDataToRegions(),n.loadDirectory(),n.options.labelsMarkers.on&&n.setLabelsMarkers(),n.options.templates.labelRegion.indexOf(!0)&&n.setLabelsRegions();try{n.events.databaseLoaded&&n.events.databaseLoaded.call(n)}catch(e){console.log(e)}n.updateFiltersState()}),n.database.on("schemaChange",function(){n.database.getAll()}),n.database.on("create",function(e){n.attachDataToRegions(e),n.reloadRegionsFull()}),n.database.on("update",function(e){n.attachDataToRegions(e),n.reloadRegionsFull()}),n.database.on("delete",function(e){n.attachDataToRegions(),n.reloadRegionsFull()}),n.regionsDatabase=new MapSVG.DatabaseService({map_id:n.id,perpage:0,sortBy:"regions"==n.options.menu.source?n.options.menu.sortBy:"id",sortDir:"regions"==n.options.menu.source?n.options.menu.sortDirection:"desc",table:"regions"},n),n.regionsDatabase.on("dataLoaded",function(){if(n.reloadRegionsFull(),n.events.regionsLoaded)if(n.events.regionsLoaded.length&&0<n.events.regionsLoaded.length)n.trigger("regionsLoaded",n);else try{n.events.regionsLoaded.call(n)}catch(e){console.log(e)}}),n.regionsDatabase.on("change",function(){n.reloadRegionsFull()}),n.menuDatabase="regions"==n.options.menu.source?n.regionsDatabase:n.database,n.setMenu(),n.setFilters(),n.options.menu.filterout.field){var a={};a[n.options.menu.filterout.field]=n.options.menu.filterout.val,"regions"==n.options.menu.source?n.regionsDatabase.query.setFilterOut(a):n.database.query.setFilterOut(a)}n.setEventHandlers(),n.id&&(n.options.data_regions&&n.options.data_db?(n.regionsDatabase.fill(n.options.data_regions),(n.editMode||n.options.database.loadOnStart)&&n.database.fill(n.options.data_db),delete n.options.data_regions,delete n.options.data_db):n.regionsDatabase.getAll().done(function(e){n.options.database.loadOnStart||n.editMode?n.database.getAll().done(function(e){n.final()}):n.final()})),n.final()}),n},final:function(){var e=this;if(!e.options.googleMaps.on||e.googleMaps.map){if(match=RegExp("[?&]mapsvg_select=([^&]*)").exec(window.location.search)){var t=decodeURIComponent(match[1].replace(/\+/g," "));e.selectRegion(t)}if(window.location.hash){var o=window.location.hash.replace("#/m/",""),i=e.getRegion(o);i&&e.options.actions.map.afterLoad.selectRegion&&e.regionClickHandler(null,i)}if(setTimeout(function(){e.updateSize(),setTimeout(function(){e.$map.removeClass("no-transitions")},200)},100),e.events.afterLoad&&"function"==typeof e.events.afterLoad)try{e.events.afterLoad.call(e)}catch(e){console.log(e)}e.editMode&&e.options.afterLoad&&e.options.afterLoad.call(e),e.options.dataLoaded&&e.options.dataLoaded.call(),e.$loading.hide(),MapSVG.addInstance(e)}else e.on("googleMapsLoaded",function(){e.final()})}},$.fn.mapSvg=function(e){if("object"!=typeof e)return $(this).data("_mapsvg");var t=new MapSVG.Map($(this).attr("id"),e);return $(this).data("_mapsvg",t),t}}(jQuery),function(r){MapSVG.MapObject=function(e,t){this.id="",this.objects=[],this.events={},this.data={},this.node=e,this.mapsvg=t,this.nodeType=e[0].tagName},MapSVG.MapObject.prototype.isMarker=function(){return this instanceof MapSVG.Marker},MapSVG.MapObject.prototype.isRegion=function(){return this instanceof MapSVG.Region},MapSVG.MapObject.prototype.setData=function(e){for(var t in e)this.data[t]=e[t]},MapSVG.MapObject.prototype.getBBox=function(){},MapSVG.MapObject.prototype.getGeoBounds=function(){var e=this.getBBox();return{sw:this.mapsvg.convertSVGToGeo(e[0],e[1]+e[3]),ne:this.mapsvg.convertSVGToGeo(e[0]+e[2],e[1])}},MapSVG.MapObject.prototype.getComputedStyle=function(t,e){var o,i;if(o=(e=e||this.node[0]).getAttribute(t))return o;if(i=e.getAttribute("style")){var s=i.split(";").filter(function(e){if((e=e.trim()).split(":")[0]==t)return!0});if(s.length)return s[0].split(":").pop().trim()}var a=r(e).parent(),n=a.length?a[0].tagName:null;return n&&"svg"!=n?this.getComputedStyle(t,a[0]):void 0},MapSVG.MapObject.prototype.getStyle=function(t){var e,o;if(e=this.attr(t))return e;if(o=this.attr("style")){var i=o.split(";").filter(function(e){if(0===(e=e.trim()).indexOf(t))return e});return i.length?i[0].split(":").pop().trim():void 0}return""},MapSVG.MapObject.prototype.getCenter=function(){var e=this.node[0].getBoundingClientRect().left,t=this.node[0].getBoundingClientRect().top;return[e+this.node[0].getBoundingClientRect().width/2,t+this.node[0].getBoundingClientRect().height/2]},MapSVG.MapObject.prototype.getCenterSVG=function(){var e=this.getBBox();return{x:e[0]+e[2]/2,y:e[1]+e[3]/2}},MapSVG.MapObject.prototype.getCenterLatLng=function(e){e=e||0;
1var t=this.getBBox(),o=t[0]+t[2]/2,i=t[1]+t[3]/2-e,s=this.mapsvg.convertSVGToGeo(o,i);return{lat:s[0],lng:s[1]}},MapSVG.MapObject.prototype.attr=function(e,t){var o=this.node[0];if("object"==typeof e)r.each(e,function(e,t){"string"!=typeof t&&"number"!=typeof t||o.setAttribute(e,t)});else if("string"!=typeof e||"string"!=typeof t&&"number"!=typeof t){if(null==t)return o.getAttribute(e)}else o.setAttribute(e,t)},MapSVG.MapObject.prototype.setId=function(e){void 0!==e&&(this.id=e,this.node[0].setAttribute("id",e))},MapSVG.MapObject.prototype.on=function(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)},MapSVG.MapObject.prototype.off=function(e){for(var t in this.events)this.events[t]&&0<this.events[t].length&&0===t.indexOf(e)&&e.length<=t&&(this.events[t]=[])},MapSVG.MapObject.prototype.trigger=function(e){var t=this;for(var o in this.events){if(this.events[o]&&0<this.events[o].length)0===o.explode(".")[0].indexOf(e)&&this.events[o].forEach(function(e){e&&e.call(t)})}}}(jQuery),function(i){MapSVG.Marker=function(e){this.imagePath=e.location.markerImageUrl;var t=i('<img src="'+this.imagePath+'" />').addClass("mapsvg-marker");if(MapSVG.MapObject.call(this,t,this.mapsvg),this.location=e.location,(this.location.marker=this).mapsvg=e.mapsvg,e.object&&this.setObject(e.object),this.positioned=!1,e.width&&e.height&&(this.width=e.width,this.height=e.height),this.setId(this.mapsvg.markerId()),this.mapsvg.isGeo()&&MapSVG.
1isNumber(this.location.lat)&&MapSVG.isNumber(this.location.lng)){var o=this.mapsvg.convertGeoToSVG([this.location.lat,this.location.lng]);this.x=o[0],this.y=o[1]}else{if(!MapSVG.isNumber(this.location.x)||!MapSVG.isNumber(this.location.y))return!1;this.x=parseFloat(this.location.x),this.y=parseFloat(this.location.y)}this.setImage(this.imagePath),this.setAltAttr(),this.positioned=!0},MapSVG.extend(MapSVG.Marker,MapSVG.MapObject),MapSVG.Marker.prototype.setId=function(e){MapSVG.MapObject.prototype.setId.call(this,e),this.mapsvg.updateMarkersDict()},MapSVG.Marker.prototype.getBBox=function(){var e=this.mapsvg.getData(),t={x:this.x,y:this.y,width:this.width/e.scale,height:this.height/e.scale};return[(t=i.extend(!0,{},t)).x,t.y,t.width,t.height]},MapSVG.Marker.prototype.getOptions=function(){var o={id:this.id,src:this.src,x:this.x,y:this.y,geoCoords:this.geoCoords};return i.each(o,function(e,t){null==t&&delete o[e]}),o},MapSVG.Marker.prototype.update=function(e,t){for(var o in e){var i="set"+MapSVG.ucfirst(o);i in this&&this[i](e[o],t)}},MapSVG.Marker.prototype.setImage=function(e,t){if(!e)return!1;var o=this;e=MapSVG.safeURL(e),t=t||this.mapScale;var i=new Image,s=this;this.src=e,"src"!==s.node[0].getAttribute("src")&&s.node[0].setAttribute("src",e),i.onload=function(){s.width=this.width,s.height=this.height,o.adjustPosition()},i.src=e,this.location&&this.location.setImage(e)},MapSVG.Marker.prototype.setAltAttr=function(){var e=this,t=void 0!==e.object&&void 0!==e.object.title&&""!==e.object.title?e.object.title:e.id;this.node[0].alt=t},MapSVG.Marker.prototype.setXy=function(e){this.x=e[0]||this.x,this.y=e[1]||this.y,this.xy=[this.x,this.y],this.location&&(this.location.x=this.x,this.location.y=this.y),this.mapsvg.getData().mapIsGeo&&(this.geoCoords=this.mapsvg.convertSVGToGeo(e[0],e[1]),this.location&&this.location.setLatLng({lat:this.geoCoords[0],lng:this.geoCoords[1]})),this.adjustPosition(),this.onChange&&this.onChange.call(this)},MapSVG.Marker.prototype.moveToClick=function(e){var t=this.mapsvg.getData(),o={};e[0]=e[0]+t.viewBox[0],e[1]=e[1]+t.viewBox[1],t.mapIsGeo&&(this.geoCoords=this.mapsvg.convertSVGToGeo(e[0],e[1])),o.xy=e,this.update(o)},MapSVG.Marker.prototype.adjustPosition=function(){var e=this.mapsvg.convertSVGToPixel([this.x,this.y]);if(3e7<e[0]?(this.node[0].style.left=e[0]-3e7+"px",e[0]=3e7,this.textLabel&&(this.textLabel[0].style.left=e[0]-3e7+"px")):this.node[0].style.left=0,3e7<e[1]?(this.node[0].style.top=e[1]-3e7+"px",e[1]=3e7,this.textLabel&&(this.textLabel[0].style.top=e[1]-3e7+"px")):this.node[0].style.top=0,e[0]-=this.width/2,e[1]-=this.centered?this.height/2:this.height,e[0]=Math.round(e[0]),e[1]=Math.round(e[1]),this.node[0].style.transform="translate("+e[0]+"px,"+e[1]+"px)",this.textLabel){var t=Math.round(e[0]+this.width/2-this.textLabel.outerWidth()/2),o=Math.round(e[1]-this.textLabel.outerHeight());this.textLabel[0].style.transform="translate("+t+"px,"+o+"px)"}},MapSVG.Marker.prototype.setGeoCoords=function(e){if("string"==typeof e&&(e=e.trim().split(","),e=[parseFloat(e[0]),parseFloat(e[1])]),"object"==typeof e&&2==e.length&&i.isNumeric(e[0])&&i.isNumeric(e[1])){var t=this.mapsvg.convertGeoToSVG(e);this.setXy(t)}},MapSVG.Marker.prototype.drag=function(s,a,n,r){var l=this;this.ox=this.x,this.oy=this.y,i("body").on("mousemove.drag.mapsvg",function(e){e.preventDefault(),l.mapsvg.getData().$map.addClass("no-transitions");var t=MapSVG.mouseCoords(e),o=t.x-s.x,i=t.y-s.y;l.setXy([l.ox+o/a,l.oy+i/a])}),i("body").on("mouseup.drag.mapsvg",function(e){e.preventDefault(),l.undrag();var t=MapSVG.mouseCoords(e),o=t.x-s.x,i=t.y-s.y;l.setXy([l.ox+o/a,l.oy+i/a]),n.call(l),l.ox==l.x&&l.oy==l.y&&r.call(l)})},MapSVG.Marker.prototype.undrag=function(){i("body").off(".drag.mapsvg"),this.mapsvg.getData().$map.removeClass("no-transitions")},MapSVG.Marker.prototype.delete=function(){this.textLabel&&(this.textLabel.remove(),this.textLabel=null),this.node.empty().remove(),this.mapsvg.markerDelete(this)},MapSVG.Marker.prototype.setObject=function(e){this.object=e,this.objects=[e],this.node.attr("data-object-id",this.object.id)},MapSVG.Marker.prototype.hide=function(){this.node.addClass("mapsvg-marker-hidden"),this.textLabel&&this.textLabel.hide()},MapSVG.Marker.prototype.show=function(){this.node.removeClass("mapsvg-marker-hidden"),this.textLabel&&this.textLabel.show()},MapSVG.Marker.prototype.highlight=function(){this.node.addClass("mapsvg-marker-hover")},MapSVG.Marker.prototype.unhighlight=function(){this.node.removeClass("mapsvg-marker-hover")},MapSVG.Marker.prototype.select=function(){this.selected=!0,this.node.addClass("mapsvg-marker-active")},MapSVG.Marker.prototype.deselect=function(){this.selected=!1,this.node.removeClass("mapsvg-marker-active")}}(jQuery),function(t){MapSVG.MarkersCluster=function(e){this.mapsvg=e.mapsvg,this.x=e.x,this.y=e.y,this.cellX=e.cellX,this.cellY=e.cellY,this.markers=e.markers||[],this.cellSize=50,this.width=30;var t=jQuery('<div class="mapsvg-marker-cluster">'+this.markers.length+"</div>");t.data("cluster",this),MapSVG.MapObject.call(this,t,this.mapsvg),this.markers.length<2&&this.node.hide(),this.adjustPosition()},MapSVG.extend(MapSVG.MarkersCluster,MapSVG.MapObject),MapSVG.MarkersCluster.prototype.addMarker=function(e){if(this.markers.push(e),1<this.markers.length){if(2===this.markers.length&&this.node.show(),2===this.markers.length){var t=this.markers.map(function(e){return e.x});this.min_x=Math.min.apply(null,t),this.max_x=Math.max.apply(null,t);var o=this.markers.map(function(e){return e.y});this.min_y=Math.min.apply(null,o),this.max_y=Math.max.apply(null,o),this.x=this.min_x+(this.max_x-this.min_x)/2,this.y=this.min_y+(this.max_y-this.min_y)/2}2<this.markers.length&&(e.x<this.min_x?this.min_x=e.x:e.x>this.max_x&&(this.max_x=e.x),e.y<this.min_y?this.min_y=e.y:e.x>this.max_x&&(this.max_y=e.y),this.x=this.min_x+(this.max_x-this.min_x)/2,this.y=this.min_y+(this.max_y-this.min_y)/2)}else this.x=e.x,this.y=e.y;this.node.text(this.markers.length),this.adjustPosition()},MapSVG.MarkersCluster.prototype.canTakeMarker=function(e){var t=this.mapsvg.convertSVGToPixel([e.x,e.y]);return this.cellX===Math.ceil(t[0]/this.cellSize)&&this.cellY===Math.ceil(t[1]/this.cellSize)},MapSVG.MarkersCluster.prototype.destroy=function(){this.markers=null,this.node.remove()},MapSVG.MarkersCluster.prototype.adjustPosition=function(){var e=this.mapsvg.convertSVGToPixel([this.x,this.y]);3e7<e[0]?(this.node[0].style.left=e[0]-3e7,e[0]=3e7):this.node[0].style.left=0,3e7<e[1]?(this.node[0].style.top=e[1]-3e7,e[1]=3e7):this.node[0].style.top=0,e[0]-=this.width/2,e[1]-=this.width/2,this.node[0].style.transform="translate("+e[0]+"px,"+e[1]+"px)"},MapSVG.MarkersCluster.prototype.getBBox=function(){var e={x:this.x,y:this.y,width:this.cellSize/this.mapsvg.getScale(),height:this.cellSize/this.mapsvg.getScale()};return[(e=t.extend(!0,{},e)).x,e.y,e.width,e.height]}}(jQuery),function(o){MapSVG.PopoverController=function(e){e.autoresize=!0,MapSVG.Controller.call(this,e),this.point=e.point,this.yShift=e.yShift,this.mapObject=e.mapObject,this.id=this.mapObject.id+"_"+Math.random(),this.container.data("popover-id",this.id)},MapSVG.extend(MapSVG.PopoverController,MapSVG.Controller),MapSVG.PopoverController.prototype.setPoint=function(e){this.point=e},MapSVG.PopoverController.prototype.getToolbarTemplate=function(){return this.withToolbar?'<div class="mapsvg-popover-close"></div>':""},MapSVG.PopoverController.prototype.viewDidLoad=function(){MapSVG.Controller.prototype.viewDidLoad.call(this);var e=this;MapSVG.isPhone&&e.mapsvg.getData().options.popovers.mobileFullscreen&&!this.mobileCloseBtn&&(this.mobileCloseBtn=o('<button class="mapsvg-mobile-modal-close mapsvg-btn">'+e.mapsvg.getData().options.mobileView.labelClose+"</button>"),this.view.append(this.mobileCloseBtn)),this.adjustPosition(),this.container.toggleClass("mapsvg-popover-animate",!0),this.container.toggleClass("mapsvg-popover-visible",!0),e.adjustHeight(),e.updateScroll(),this.resizeSensor.setScroll(),this.events&&this.events.shown&&this.events.shown.
1call(e,e.mapsvg)},MapSVG.PopoverController.prototype.adjustHeight=function(){this.container.height(this.container.find(".mapsvg-auto-height").outerHeight()+(this.toolbarView?this.toolbarView.outerHeight():0))},MapSVG.PopoverController.prototype.adjustPosition=function(){var e=this,t=e.mapsvg.convertSVGToPixel([e.point.x,e.point.y]);t[1]-=e.yShift,t[0]=Math.round(t[0]),t[1]=Math.round(t[1]),e.container[0].style.transform="translateX(-50%) translate("+t[0]+"px,"+t[1]+"px)"},MapSVG.PopoverController.prototype.setEventHandlers=function(){var t=this;o("body").off(".popover.mapsvg"),this.view.on("click touchend",".mapsvg-popover-close, .mapsvg-mobile-modal-close",function(e){e.stopImmediatePropagation(),t.close()}),o("body").on("mouseup.popover.mapsvg touchend.popover.mapsvg",function(e){t.mapsvg.getData().isScrolling||o(e.target).closest(".mapsvg-directory").length||o(e.target).closest(".mapsvg-popover").length||o(e.target).hasClass("mapsvg-btn-map")||t.close()})},MapSVG.PopoverController.prototype.close=function(){var e=this;this.container.data("popover-id")==this.id&&e.container.is(":visible")&&(e.destroy(),e.mapObject instanceof MapSVG.Region&&e.mapsvg.deselectRegion(e.mapObject),e.mapObject instanceof MapSVG.Marker&&e.mapsvg.deselectAllMarkers(),e.events&&e.events.closed&&e.events.closed.call(e,e.mapsvg))},MapSVG.PopoverController.prototype.destroy=function(){this.container.toggleClass("mapsvg-popover-animate",!1),this.container.toggleClass("mapsvg-popover-visible",!1),MapSVG.Controller.prototype.destroy.call(this)},MapSVG.PopoverController.prototype.show=function(){this.container.toggleClass("mapsvg-popover-animate",!0),this.container.toggleClass("mapsvg-popover-visible",!0)}}(jQuery),function(a){MapSVG.Region=function(e,t,o,i){MapSVG.MapObject.call(this,e),this.globalOptions=t,this.mapsvg=i,this.id=this.node.attr("id"),this.id&&t.regionPrefix&&this.setId(this.id.replace(t.regionPrefix,"")),this.id_no_spaces=this.id.replace(" ","_"),this.title=this.node.attr("title"),this.node[0].setAttribute("class",(this.node.attr("class")||"")+" mapsvg-region"),this.setStyleInitial();var s=t.regions&&t.regions[this.id]?t.regions[this.id]:null;this.disabled=this.getDisabledState(),this.disabled&&this.attr("class",this.attr("class")+" mapsvg-disabled"),this.default_attr={},this.selected_attr={};var a=!(this.hover_attr={});s&&s.selected&&(a=!0,delete s.selected),s&&this.update(s),this.setFill(),a&&this.setSelected(!0),this.saveState()},MapSVG.extend(MapSVG.Region,MapSVG.MapObject),MapSVG.Region.prototype.setStyleInitial=function(){var e;this.style={fill:this.getComputedStyle("fill")},this.style.stroke=this.getComputedStyle("stroke")||"",e=this.node.data("stroke-width")?this.node.data("stroke-width"):"1"==(e=(e=this.getComputedStyle("stroke-width"))?e.replace("px",""):"1")?1.2:parseFloat(e),this.style["stroke-width"]=e,this.node.data("stroke-width",e)},MapSVG.Region.prototype.saveState=function(){this.initialState=JSON.stringify(this.getOptions())},MapSVG.Region.prototype.getBBox=function(){this.mapsvg.getData();var e=this.node[0].getBBox();e=a.extend(!0,{},e);var t=this.node[0].getTransformToElement(this.mapsvg.getData().$svg[0]),o=e.x+e.width,i=e.y+e.height,s=this.mapsvg.getData().$svg[0].createSVGPoint();return s.x=e.x,s.y=e.y,s=s.matrixTransform(t),e.x=s.x,e.y=s.y,s.x=o,s.y=i,s=s.matrixTransform(t),e.width=s.x-e.x,e.height=s.y-e.y,[e.x,e.y,e.width,e.height]},MapSVG.Region.prototype.changed=function(){return JSON.stringify(this.getOptions())!=this.initialState},MapSVG.Region.prototype.edit=function(){this.nodeOriginal=this.node.clone()},MapSVG.Region.prototype.editCommit=function(){this.nodeOriginal=null},MapSVG.Region.prototype.editCancel=function(){this.nodeOriginal.appendTo(_this.mapsvg.getData().$svg),this.node=this.nodeOriginal,this.nodeOriginal=null},MapSVG.Region.prototype.getOptions=function(e){this.globalOptions.regions[this.id];var o={id:this.id,id_no_spaces:this.id_no_spaces,title:this.title,fill:this.globalOptions.regions[this.id]&&this.globalOptions.regions[this.id].fill,tooltip:this.tooltip,popover:this.popover,href:this.href,target:this.target,data:this.data,gaugeValue:this.gaugeValue};if(e&&(o.disabled=this.disabled,o.dataCounter=this.data&&this.data.length||0),a.each(o,function(e,t){null==t&&delete o[e]}),this.customAttrs){var t=this;
1this.customAttrs.forEach(function(e){o[e]=t[e]})}return o},MapSVG.Region.prototype.forTemplate=function(){var e={id:this.id,title:this.title,objects:this.objects,data:this.data};for(var t in this.data)"title"!=t&&"id"!=t&&(e[t]=this.data[t]);return e},MapSVG.Region.prototype.update=function(e){for(var t in e){var o="set"+MapSVG.ucfirst(t);o in this?this[o](e[t]):(this[t]=e[t],this.customAttrs=this.customAttrs||[],this.customAttrs.push(t))}},MapSVG.Region.prototype.setId=function(e){this.id=e,this.node.prop("id",e)},MapSVG.Region.prototype.setTitle=function(e){this.title=e},MapSVG.Region.prototype.setStyle=function(e){a.extend(!0,this.style,e),this.setFill()},MapSVG.Region.prototype.getChoroplethColor=function(){var e=this.globalOptions.gauge,t=0===e.maxAdjusted?0:(parseFloat(this.data[this.globalOptions.regionChoroplethField])-e.min)/e.maxAdjusted;return{r:Math.round(e.colors.diffRGB.r*t+e.colors.lowRGB.r),g:Math.round(e.colors.diffRGB.g*t+e.colors.lowRGB.g),b:Math.round(e.colors.diffRGB.b*t+e.colors.lowRGB.b),a:(e.colors.diffRGB.a*t+e.colors.lowRGB.a).toFixed(2)}},MapSVG.Region.prototype.setFill=function(e){if(this.globalOptions.colorsIgnore)this.node.css(this.style);else{if(e){var t={};t[this.id]={fill:e},a.extend(!0,this.globalOptions,{regions:t})}else!e&&void 0!==e&&this.globalOptions.regions&&this.globalOptions.regions[this.id]&&this.globalOptions.regions[this.id].fill&&delete this.globalOptions.regions[this.id].fill;if(this.globalOptions.gauge.on&&this.data&&void 0!==this.data[this.globalOptions.regionChoroplethField]&&""!==this.data[this.globalOptions.regionChoroplethField]){var o=this.getChoroplethColor();this.default_attr.fill="rgba("+o.r+","+o.g+","+o.b+","+o.a+")"}else void 0!==this.status&&this.mapsvg.regionsDatabase&&this.mapsvg.regionsDatabase.getSchemaFieldByType("status")&&this.mapsvg.regionsDatabase.getSchemaFieldByType("status").optionsDict&&this.mapsvg.regionsDatabase.getSchemaFieldByType("status").optionsDict[this.status]&&this.mapsvg.regionsDatabase.getSchemaFieldByType("status").optionsDict[this.status].color?this.default_attr.fill=this.mapsvg.regionsDatabase.getSchemaFieldByType("status").optionsDict[this.status].color:this.globalOptions.regions[this.id]&&this.globalOptions.regions[this.id].fill?this.default_attr.fill=this.globalOptions.regions[this.id].fill:this.globalOptions.colors.base?this.default_attr.fill=this.globalOptions.colors.base:"none"!=this.style.fill?this.default_attr.fill=this.style.fill?this.style.fill:this.globalOptions.colors.baseDefault:this.default_attr.fill="none";if(MapSVG.isNumber(this.globalOptions.colors.selected)?this.selected_attr.fill=MapSVG.tinycolor(this.default_attr.fill).lighten(parseFloat(this.globalOptions.colors.selected)).toRgbString():this.selected_attr.fill=this.globalOptions.colors.selected,MapSVG.isNumber(this.globalOptions.colors.hover)?this.hover_attr.fill=MapSVG.tinycolor(this.default_attr.fill).lighten(parseFloat(this.globalOptions.colors.hover)).toRgbString():this.hover_attr.fill=this.globalOptions.colors.hover,this.node.css("fill",this.default_attr.fill),this.fill=this.default_attr.fill,"none"!=this.style.stroke&&null!=this.globalOptions.colors.stroke)this.node.css("stroke",this.globalOptions.colors.stroke);else{var i=null==this.style.stroke?"":this.style.stroke;this.node.css("stroke",i)}this.selected&&this.setSelected()}},MapSVG.Region.prototype.setDisabled=function(e,t){e=void 0!==e?MapSVG.parseBoolean(e):this.getDisabledState();var o=this.disabled;this.disabled=e,this.attr("class",this.attr("class").replace("mapsvg-disabled","")),e&&this.attr("class",this.attr("class")+" mapsvg-disabled"),this.disabled!=o&&this.mapsvg.deselectRegion(this),!t&&this.setFill()},MapSVG.Region.prototype.setStatus=function(e){var t;(t=this.globalOptions.regionStatuses&&this.globalOptions.regionStatuses[e])?(this.status=e,this.data.status=e,this.setDisabled(t.disabled,!0)):(this.status=void 0,this.data.status=void 0,this.setDisabled(!1,!0)),this.setFill()},MapSVG.Region.prototype.setSelected=function(){this.mapsvg.selectRegion(this)},MapSVG.Region.prototype.setGaugeValue=function(e){this.gaugeValue=a.isNumeric(e)?parseFloat(e):void 0},MapSVG.Region.prototype.getDisabledState=function(e){var t=this.globalOptions.regions[this.id];return!e&&t&&void 0!==t.disabled?t.disabled:!(!this.globalOptions.disableAll&&"none"!=this.style.fill&&"labels"!=this.id&&"Labels"!=this.id)},MapSVG.Region.prototype.highlight=function(){this.node.css({fill:this.hover_attr.fill}),this.node.addClass("mapsvg-region-hover")},MapSVG.Region.prototype.unhighlight=function(){this.node.css({fill:this.default_attr.fill}),this.node.removeClass("mapsvg-region-hover")},MapSVG.Region.prototype.select=function(){this.node.css({fill:this.selected_attr.fill}),this.selected=!0,this.node.addClass("mapsvg-region-active")},MapSVG.Region.prototype.deselect=function(){this.node.css({fill:this.default_attr.fill}),this.selected=!1,this.node.removeClass("mapsvg-region-active")}}(jQuery),jQuery,MapSVG.ResizeSensor=function(e,t){var o=this;o.element=e,o.callback=t;var i=getComputedStyle(e),s=parseInt(i.zIndex);isNaN(s)&&(s=0),s--,o.expand=document.createElement("div"),o.expand.style.position="absolute",o.expand.style.left="0px",o.expand.style.top="0px",o.expand.style.right="0px",o.expand.style.bottom="0px",o.expand.style.overflow="hidden",o.expand.style.zIndex=s,o.expand.style.visibility="hidden";var a=document.createElement("div");a.style.position="absolute",a.style.left="0px",a.style.top="0px",a.style.width="10000000px",a.style.height="10000000px",o.expand.appendChild(a),o.shrink=document.createElement("div"),o.shrink.style.position="absolute",o.shrink.style.left="0px",o.shrink.style.top="0px",o.shrink.style.right="0px",o.shrink.style.bottom="0px",o.shrink.style.overflow="hidden",o.shrink.style.zIndex=s,o.shrink.style.visibility="hidden";var n=document.createElement("div");n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style.width="200%",n.style.height="200%",o.shrink.appendChild(n),o.element.appendChild(o.expand),o.element.appendChild(o.shrink);var r=e.getBoundingClientRect();o.currentWidth=r.width,o.currentHeight=r.height,o.setScroll(),o.expand.addEventListener("scroll",function(){o.onScroll()}),o.shrink.addEventListener("scroll",function(){o.onScroll()})},MapSVG.ResizeSensor.prototype.onScroll=function(){var e=this,t=e.element.getBoundingClientRect(),o=t.width,i=t.height;o==e.currentWidth&&i==e.currentHeight||(e.currentWidth=o,e.currentHeight=i,e.callback()),this.setScroll()},MapSVG.ResizeSensor.prototype.setScroll=function(){this.expand.scrollLeft=1e7,this.expand.scrollTop=1e7,this.shrink.scrollLeft=1e7,this.shrink.scrollTop=1e7},MapSVG.ResizeSensor.prototype.destroy=function(){this.expand.remove(),this.shrink.remove()},function(p){var l=/^\s+/,c=/\s+$/,i=0,a=p.round,g=p.min,d=p.max,e=p.random;function h(e,t){if(t=t||{},(e=e||"")instanceof h)return e;if(!(this instanceof h))return new h(e,t);var o=function(e){var t={r:0,g:0,b:0},o=1,i=!1,s=!1;"string"==typeof e&&(e=function(e){e=e.replace(l,"").replace(c,"").toLowerCase();var t,o=!1;if(G[e])e=G[e],o=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=F.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=F.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=F.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=F.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=F.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=F.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=F.hex8.exec(e))return{a:(i=t[1],B(i)/255),r:B(t[2]),g:B(t[3]),b:B(t[4]),format:o?"name":"hex8"};var i;if(t=F.hex6.exec(e))return{r:B(t[1]),g:B(t[2]),b:B(t[3]),format:o?"name":"hex"};if(t=F.hex3.exec(e))return{r:B(t[1]+""+t[1]),g:B(t[2]+""+t[2]),b:B(t[3]+""+t[3]),format:o?"name":"hex"};return!1}(e));"object"==typeof e&&(z(e.r)&&z(e.g)&&z(e.b)?(a=e.r,n=e.g,r=e.b,t={r:255*D(a,255),g:255*D(n,255),b:255*D(r,255)},i=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):z(e.h)&&z(e.s)&&z(e.v)?(e.s=O(e.s),e.v=O(e.v),t=function(e,t,o){e=6*D(e,360),t=D(t,100),o=D(o,100);var i=p.floor(e),s=e-i,a=o*(1-t),n=o*(1-s*t),r=o*(1-(1-s)*t),l=i%6;return{r:255*[o,n,a,a,r,o][l],g:255*[r,o,o,n,a,a][l],b:255*[a,a,r,o,o,n][l]}}(e.h,e.s,e.v),i=!0,s="hsv"):z(e.h)&&z(e.s)&&z(e.l)&&(e.s=O(e.s),e.l=O(e.l),t=function(e,t,o){var i,s,a;function n(e,t,o){return o<0&&(o+=1),1<o&&(o-=1),o<1/6?e+6*(t-e)*o:o<.5?t:o<2/3?e+(t-e)*(2/3-o)*6:e}if(e=D(e,360),t=D(t,100),o=D(o,100),0===t)i=s=a=o;else{var r=o<.5?o*(1+t):o+t-o*t,l=2*o-r;i=n(l,r,e+1/3),s=n(l,r,e),a=n(l,r,e-1/3)}return{r:255*i,g:255*s,b:255*a}}(e.h,e.s,e.l),i=!0,s="hsl"),e.hasOwnProperty("a")&&(o=e.a));var a,n,r;return o=$(o),{ok:i,format:e.format||s,r:g(255,d(t.r,0)),g:g(255,d(t.g,0)),b:g(255,d(t.b,0)),a:o}}(e);this._originalInput=e,this._r=o.r,this._g=o.g,this._b=o.b,this._a=o.a,this._roundA=a(100*this._a)/100,this._format=t.format||o.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=o.ok,this._tc_id=i++}function s(e,t,o){e=D(e,255),t=D(t,255),o=D(o,255);var i,s,a=d(e,t,o),n=g(e,t,o),r=(a+n)/2;if(a==n)i=s=0;else{var l=a-n;switch(s=.5<r?l/(2-a-n):l/(a+n),a){case e:i=(t-o)/l+(t<o?6:0);break;case t:i=(o-e)/l+2;break;case o:i=(e-t)/l+4}i/=6}return{h:i,s:s,l:r}}function n(e,t,o){e=D(e,255),t=D(t,255),o=D(o,255);var i,s,a=d(e,t,o),n=g(e,t,o),r=a,l=a-n;if(s=0===a?0:l/a,a==n)i=0;else{switch(a){case e:i=(t-o)/l+(t<o?6:0);break;case t:i=(o-e)/l+2;break;case o:i=(e-t)/l+4}i/=6}return{h:i,s:s,v:r}}function t(e,t,o,i){var s=[_(a(e).toString(16)),_(a(t).toString(16)),_(a(o).toString(16))];return i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function r(e,t,o,i){var s;return[_((s=i,p.round(255*parseFloat(s)).toString(16))),_(a(e).toString(16)),_(a(t).toString(16)),_(a(o).toString(16))].join("")}function o(e,t){t=0===t?0:t||10;var o=h(e).toHsl();return o.s-=t/100,o.s=L(o.s),h(o)}function u(e,t){t=0===t?0:t||10;var o=h(e).toHsl();return o.s+=t/100,o.s=L(o.s),h(o)}function m(e){return h(e).desaturate(100)}function v(e,t){t=0===t?0:t||10;var o=h(e).toHsl();return o.l+=t/100,o.l=L(o.l),h(o)}function f(e,t){t=0===t?0:t||10;var o=h(e).toRgb();return o.r=d(0,g(255,o.r-a(-t/100*255))),o.g=d(0,g(255,o.g-a(-t/100*255))),o.b=d(0,g(255,o.b-a(-t/100*255))),h(o)}function b(e,t){t=0===t?0:t||10;var o=h(e).toHsl();return o.l-=t/100,o.l=L(o.l),h(o)}function y(e,t){var o=h(e).toHsl(),i=(o.h+t)%360;return o.h=i<0?360+i:i,h(o)}function w(e){var t=h(e).toHsl();return t.h=(t.h+180)%360,h(t)}function S(e){var t=h(e).toHsl(),o=t.h;return[h(e),h({h:(o+120)%360,s:t.s,l:t.l}),h({h:(o+240)%360,s:t.s,l:t.l})]}function M(e){var t=h(e).toHsl(),o=t.h;return[h(e),h({h:(o+90)%360,s:t.s,l:t.l}),h({h:(o+180)%360,s:t.s,l:t.l}),h({h:(o+270)%360,s:t.s,l:t.l})]}function x(e){var t=h(e).toHsl(),o=t.h;return[h(e),h({h:(o+72)%360,s:t.s,l:t.l}),h({h:(o+216)%360,s:t.s,l:t.l})]}function k(e,t,o){t=t||6,o=o||30;var i=h(e).toHsl(),s=360/o,a=[h(e)];for(i.h=(i.h-(s*t>>1)+720)%360;--t;)i.h=(i.h+s)%360,a.push(h(i));return a}
vendor: 5,126 bytes, line 1
1function V(e,t){t=t||6;for(var o=h(e).toHsv(),i=o.h,s=o.s,a=o.v,n=[],r=1/t;t--;)n.push(h({h:i,s:s,v:a})),a=(a+r)%1;return n}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,o,i=this.toRgb();return e=i.r/255,t=i.g/255,o=i.b/255,.2126*(e<=.03928?e/12.92:p.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:p.pow((t+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:p.pow((o+.055)/1.055,2.4))},setAlpha:function(e){return this._a=$(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=n(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=n(this._r,this._g,this._b),t=a(360*e.h),o=a(100*e.s),i=a(100*e.v);return 1==this._a?"hsv("+t+", "+o+"%, "+i+"%)":"hsva("+t+", "+o+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=s(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=s(this._r,this._g,this._b),t=a(360*e.h),o=a(100*e.s),i=a(100*e.l);return 1==this._a?"hsl("+t+", "+o+"%, "+i+"%)":"hsla("+t+", "+o+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return t(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(){return r(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*D(this._r,255))+"%",g:a(100*D(this._g,255))+"%",b:a(100*D(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*D(this._r,255))+"%, "+a(100*D(this._g,255))+"%, "+a(100*D(this._b,255))+"%)":"rgba("+a(100*D(this._r,255))+"%, "+a(100*D(this._g,255))+"%, "+a(100*D(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(C[t(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+r(this._r,this._g,this._b,this._a),o=t,i=this._gradientType?"GradientType = 1, ":"";e&&(o=h(e).toHex8String());return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+t+",endColorstr="+o+")"},toString:function(e){var t=!!e;e=e||this._format;var o=!1,i=this._a<1&&0<=this._a;return t||!i||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"name"!==e?("rgb"===e&&(o=this.toRgbString()),"prgb"===e&&(o=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(o=this.toHexString()),"hex3"===e&&(o=this.toHexString(!0)),"hex8"===e&&(o=this.toHex8String()),"name"===e&&(o=this.toName()),"hsl"===e&&(o=this.toHslString()),"hsv"===e&&(o=this.toHsvString()),o||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(e,t){var o=e.apply(null,[this].concat([].slice.call(t)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(f,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(o,arguments)},saturate:function(){return this._applyModification(u,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(k,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(V,arguments)},splitcomplement:function(){return this._applyCombination(x,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},h.fromRatio=function(e,t){if("object"==typeof e){var o={};for(var i in e)e.hasOwnProperty(i)&&(o[i]="a"===i?e[i]:O(e[i]));e=o}return h(e,t)},h.equals=function(e,t){return!(!e||!t)&&h(e).toRgbString()==h(t).toRgbString()},h.random=function(){return h.fromRatio({r:e(),g:e(),b:e()})},h.mix=function(e,t,o){o=0===o?0:o||50;var i,s=h(e).toRgb(),a=h(t).toRgb(),n=o/100,r=2*n-1,l=a.a-s.a,p=1-(i=((i=r*l==-1?r:(r+l)/(1+r*l))+1)/2);return h({r:a.r*i+s.r*p,g:a.g*i+s.g*p,b:a.b*i+s.b*p,a:a.a*n+s.a*(1-n)})},h.readability=function(e,t){var o=h(e),i=h(t);return(p.max(o.getLuminance(),i.getLuminance())+.05)/(p.min(o.getLuminance(),i.getLuminance())+.05)},h.isReadable=function(e,t,o){var i,s,a=h.readability(e,t);switch(s=!1,(i=function(e){var t,o;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),o=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==o&&"large"!==o&&(o="small");return{level:t,size:o}}
1(o)).level+i.size){case"AAsmall":case"AAAlarge":s=4.5<=a;break;case"AAlarge":s=3<=a;break;case"AAAsmall":s=7<=a}return s},h.mostReadable=function(e,t,o){var i,s,a,n,r=null,l=0;s=(o=o||{}).includeFallbackColors,a=o.level,n=o.size;for(var p=0;p<t.length;p++)l<(i=h.readability(e,t[p]))&&(l=i,r=h(t[p]));return h.isReadable(e,r,{level:a,size:n})||!s?r:(o.includeFallbackColors=!1,h.mostReadable(e,["#fff","#000"],o))};var G=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
10",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},C=h.hexNames=function(e){var t={};for(var o in e)e.hasOwnProperty(o)&&(t[e[o]]=o);return t}(G);function $(e){return e=parseFloat(e),(isNaN(e)||e<0||1<e)&&(e=1),e}function D(e,t){var o;"string"==typeof(o=e)&&-1!=o.indexOf(".")&&1===parseFloat(o)&&(e="100%");var i,s="string"==typeof(i=e)&&-1!=i.indexOf("%");return e=g(t,d(0,parseFloat(e))),s&&(e=parseInt(e*t,10)/100),p.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function L(e){return g(1,d(0,e))}function B(e){return parseInt(e,16)}function _(e){return 1==e.length?"0"+e:""+e}function O(e){return e<=1&&(e=100*e+"%"),e}var T,R,j,F=(R="[\\s|\\(]+("+(T="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+T+")[,|\\s]+("+T+")\\s*\\)?",j="[\\s|\\(]+("+T+")[,|\\s]+("+T+")[,|\\s]+("+T+")[,|\\s]+("+T+")\\s*\\)?",{CSS_UNIT:new RegExp(T),rgb:new RegExp("rgb"+R),rgba:new RegExp("rgba"+j),hsl:new RegExp("hsl"+R),hsla:new RegExp("hsla"+j),hsv:new RegExp("hsv"+R),hsva:new RegExp("hsva"
1+j),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function z(e){return!!F.CSS_UNIT.exec(e)}MapSVG.tinycolor=h,"undefined"!=typeof module&&module.exports?module.exports=h:"function"==typeof define&&define.amd&&define(function(){return h})}(Math);
2!function(o){function t(e){var t=e||window.event,n=[].slice.call(arguments,1),i=0,l=0,s=0;return(e=o.event.fix(t)).type="mousewheel",t.wheelDelta&&(i=t.wheelDelta/120),t.detail&&(i=-t.detail/3),s=i,void 0!==t.axis&&t.axis===t.HORIZONTAL_AXIS&&(s=0,l=-1*i),void 0!==t.wheelDeltaY&&(s=t.wheelDeltaY/120),void 0!==t.wheelDeltaX&&(l=-1*t.wheelDeltaX/120),n.unshift(e,i,l,s),(o.event.dispatch||o.event.handle).apply(this,n)}var n=["DOMMouseScroll","mousewheel"];if(o.event.fixHooks)for(var e=n.length;e;)o.event.fixHooks[n[--e]]=o.event.mouseHooks;o.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=n.length;e;)this.addEventListener(n[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=n.length;e;)this.removeEventListener(n[--e],t,!1);else this.onmousewheel=null}},o.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(jQuery);
3!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Handlebars=e():t.Handlebars=e()}(this,function(){return function(r){var s={};function i(t){if(s[t])return s[t].exports;var e=s[t]={exports:{},id:t,loaded:!1};return r[t].call(e.exports,e,e.exports,i),e.loaded=!0,e.exports}return i.m=r,i.c=s,i.p="",i(0)}([function(t,e,r){"use strict";var s=r(1).default;e.__esModule=!0;var i=s(r(2)),n=s(r(21)),a=r(22),o=r(27),c=s(r(28)),h=s(r(25)),l=s(r(20)),p=i.default.create;function u(){var r=p();return r.compile=function(t,e){return o.compile(t,e,r)},r.precompile=function(t,e){return o.precompile(t,e,r)},r.AST=n.default,r.Compiler=o.Compiler,r.JavaScriptCompiler=c.default,r.Parser=a.parser,r.parse=a.parse,r}var f=u();f.create=u,l.default(f),f.Visitor=h.default,f.default=f,e.default=f,t.exports=e.default},function(t,e){"use strict";e.default=function(t){return t&&t.__esModule?t:{default:t}},e.__esModule=!0},function(t,e,r){"use strict";var s=r(3).default,i=r(1).default;e.__esModule=!0;var n=s(r(4)),a=i(r(18)),o=i(r(6)),c=s(r(5)),h=s(r(19)),l=i(r(20));function p(){var e=new n.HandlebarsEnvironment;return c.extend(e,n),e.SafeString=a.default,e.Exception=o.default,e.Utils=c,e.escapeExpression=c.escapeExpression,e.VM=h,e.template=function(t){return h.template(t,e)},e}var u=p();u.create=p,l.default(u),u.default=u,e.default=u,t.exports=e.default},function(t,e){"use strict";e.default=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e},e.__esModule=!0},function(t,e,r){"use strict";var s=r(1).default;e.__esModule=!0,e.HandlebarsEnvironment=l;var i=r(5),n=s(r(6)),a=r(7),o=r(15),c=s(r(17));e.VERSION="4.0.2";e.COMPILER_REVISION=7;e.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};var h="[object Object]";function l(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},a.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}l.prototype={constructor:l,logger:c.default,log:c.default.log,registerHelper:function(t,e){if(i.toString.call(t)===h){if(e)throw new n.default("Arg not supported with multiple helpers");i.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(i.toString.call(t)===h)i.extend(this.partials,t);else{if(void 0===e)throw new n.default("Attempting to register a partial as undefined");this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if(i.toString.call(t)===h){if(e)throw new n.default("Arg not supported with multiple decorators");i.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var p=c.default.log;e.log=p,e.createFrame=i.createFrame,e.logger=c.default},function(t,e){"use strict";
vendor: 8,852 bytes, line 3
3e.__esModule=!0,e.extend=a,e.indexOf=function(t,e){for(var r=0,s=t.length;r<s;r++)if(t[r]===e)return r;return-1},e.escapeExpression=function(t){if("string"!=typeof t){if(t&&t.toHTML)return t.toHTML();if(null==t)return"";if(!t)return t+"";t=""+t}return i.test(t)?t.replace(s,n):t},e.isEmpty=function(t){return!t&&0!==t||!(!h(t)||0!==t.length)},e.createFrame=function(t){var e=a({},t);return e._parent=t,e},e.blockParams=function(t,e){return t.path=e,t},e.appendContextPath=function(t,e){return(t?t+".":"")+e};var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},s=/[&<>"'`=]/g,i=/[&<>"'`=]/;function n(t){return r[t]}function a(t){for(var e=1;e<arguments.length;e++)for(var r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&(t[r]=arguments[e][r]);return t}var o=Object.prototype.toString;e.toString=o;var c=function(t){return"function"==typeof t};c(/x/)&&(e.isFunction=c=function(t){return"function"==typeof t&&"[object Function]"===o.call(t)}),e.isFunction=c;var h=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===o.call(t)};e.isArray=h},function(t,e){"use strict";e.__esModule=!0;var o=["description","fileName","lineNumber","message","name","number","stack"];function c(t,e){var r=e&&e.loc,s=void 0,i=void 0;r&&(t+=" - "+(s=r.start.line)+":"+(i=r.start.column));for(var n=Error.prototype.constructor.call(this,t),a=0;a<o.length;a++)this[o[a]]=n[o[a]];Error.captureStackTrace&&Error.captureStackTrace(this,c),r&&(this.lineNumber=s,this.column=i)}c.prototype=new Error,e.default=c,t.exports=e.default},function(t,e,r){"use strict";var s=r(1).default;e.__esModule=!0,e.registerDefaultHelpers=function(t){i.default(t),n.default(t),a.default(t),o.default(t),c.default(t),h.default(t),l.default(t)};var i=s(r(8)),n=s(r(9)),a=s(r(10)),o=s(r(11)),c=s(r(12)),h=s(r(13)),l=s(r(14))},function(t,e,r){"use strict";e.__esModule=!0;var a=r(5);e.default=function(n){n.registerHelper("blockHelperMissing",function(t,e){var r=e.inverse,s=e.fn;if(!0===t)return s(this);if(!1===t||null==t)return r(this);if(a.isArray(t))return 0<t.length?(e.ids&&(e.ids=[e.name]),n.helpers.each(t,e)):r(this);if(e.data&&e.ids){var i=a.createFrame(e.data);i.contextPath=a.appendContextPath(e.data.contextPath,e.name),e={data:i}}return s(t,e)})},t.exports=e.default},function(t,e,r){"use strict";var s=r(1).default;e.__esModule=!0;var u=r(5),f=s(r(6));e.default=function(t){t.registerHelper("each",function(s,t){if(!t)throw new f.default("Must pass iterator to #each");var i=t.fn,e=t.inverse,r=0,n="",a=void 0,o=void 0;function c(t,e,r){null!=s[t]&&(a&&(a.key=t,a.index=e,a.first=0===e,a.last=!!r,o&&(a.contextPath=o+t)),n+=i(s[t],{data:a,blockParams:u.blockParams([s[t],t],[o+t,null])}))}if(t.data&&t.ids&&(o=u.appendContextPath(t.data.contextPath,t.ids[0])+"."),u.isFunction(s)&&(s=s.call(this)),t.data&&(a=u.createFrame(t.data)),s&&"object"==typeof s)if(u.isArray(s))for(var h=s.length;r<h;r++)c(r,r,r===s.length-1);else{var l=void 0;for(var p in s)s.hasOwnProperty(p)&&(void 0!==l&&c(l,r-1),l=p,r++);void 0!==l&&c(l,r-1,!0)}return 0===r&&(n=e(this)),n})},t.exports=e.default},function(t,e,r){"use strict";var s=r(1).default;e.__esModule=!0;var i=s(r(6));e.default=function(t){t.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new i.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var s=r(5);e.default=function(r){r.registerHelper("if",function(t,e){return s.isFunction(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||s.isEmpty(t)?e.inverse(this):e.fn(this)}),r.registerHelper("unless",function(t,e){return r.helpers.if.call(this,t,{fn:e.inverse,inverse:e.fn,hash:e.hash})})},t.exports=e.default},function(t,e){"use strict";e.__esModule=!0,e.default=function(i){i.registerHelper("log",function(){for(var t=[void 0],e=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)t.push(arguments[r]);var s=1;null!=e.hash.level?s=e.hash.level:e.data&&null!=e.data.level&&(s=e.data.level),t[0]=s,i.log.apply(i,t)})},t.exports=e.default},function(t,e){"use strict";e.__esModule=!0,e.default=function(t){t.registerHelper("lookup",function(t,e){return t&&t[e]})},t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var i=r(5);e.default=function(t){t.registerHelper("with",function(t,e){i.isFunction(t)&&(t=t.call(this));var r=e.fn;if(i.isEmpty(t))return e.inverse(this);var s=e.data;return e.data&&e.ids&&((s=i.createFrame(e.data)).contextPath=i.appendContextPath(e.data.contextPath,e.ids[0])),r(t,{data:s,blockParams:i.blockParams([t],[s&&s.contextPath])})})},t.exports=e.default},function(t,e,r){"use strict";var s=r(1).default;e.__esModule=!0,e.registerDefaultDecorators=function(t){i.default(t)};var i=s(r(16))},function(t,e,r){"use strict";e.__esModule=!0;var o=r(5);e.default=function(t){t.registerDecorator("inline",function(i,n,a,t){var e=i;return n.partials||(n.partials={},e=function(t,e){var r=a.partials;a.partials=o.extend({},r,n.partials);var s=i(t,e);return a.partials=r,s}),n.partials[t.args[0]]=t.fn,e})},t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var n={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if("string"==typeof t){var e=n.methodMap.indexOf(t.toLowerCase());t=0<=e?e:parseInt(t,10)}return t},log:function(t){if(t=n.lookupLevel(t),"undefined"!=typeof console&&n.lookupLevel(n.level)<=t){var e=n.methodMap[t];console[e]||(e="log");for(var r=arguments.length,s=Array(1<r?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];console[e].apply(console,s)}}};e.default=n,t.exports=e.default},function(t,e){"use strict";function r(t){this.string=t}e.__esModule=!0,r.prototype.toString=r.prototype.toHTML=function(){return""+this.string},e.default=r,t.exports=e.default},function(t,e,r){"use strict";var s=r(3).default,i=r(1).default;e.__esModule=!0,e.checkRevision=function(t){var e=t&&t[0]||1,r=u.COMPILER_REVISION;if(e!==r){if(e<r){var s=u.REVISION_CHANGES[r],i=u.REVISION_CHANGES[e];throw new p.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s+") or downgrade your runtime to an older version ("+i+").")}throw new p.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}},e.template=function(o,c){if(!c)throw new p.default("No environment passed to template");if(!o||!o.main)throw new p.default("Unknown template object: "+typeof o);o.main.decorator=o.main_d,c.VM.checkRevision(o.compiler);var a={strict:function(t,e){if(!(e in t))throw new p.default('"'+e+'" not defined in '+t);return t[e]},lookup:function(t,e){for(var r=t.length,s=0;s<r;s++)if(t[s]&&null!=t[s][e])return t[s][e]},lambda:function(t,e){return"function"==typeof t?t.call(e):t},escapeExpression:l.escapeExpression,invokePartial:function(t,e,r){r.hash&&(e=l.extend({},e,r.hash),r.ids&&(r.ids[0]=!0));t=c.VM.resolvePartial.call(this,t,e,r);var s=c.VM.invokePartial.call(this,t,e,r);null==s&&c.compile&&(r.partials[r.name]=c.compile(t,o.compilerOptions,c),s=r.partials[r.name](e,r));{if(null==s)throw new p.default("The partial "+r.name+" could not be compiled when running in runtime-only mode");if(r.indent){for(var i=s.split("\n"),n=0,a=i.length;n<a&&(i[n]||n+1!==a);n++)i[n]=r.indent+i[n];s=i.join("\n")}return s}},fn:function(t){var e=o[t];return e.decorator=o[t+"_d"],e},programs:[],program:function(t,e,r,s,i){var n=this.programs[t],a=this.fn(t);return e||i||s||r?n=f(this,t,a,e,r,s,i):n||(n=this.programs[t]=f(this,t,a)),n},data:function(t,e){for(;t&&e--;)t=t._parent;return t},merge:function(t,e){var r=t||e;return t&&e&&t!==e&&(r=l.extend({},e,t)),r},noop:c.VM.noop,compilerInfo:o.compiler};function h(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=e.data;h._setup(e),!e.partial&&o.useData&&(r=function(t,e){e&&"root"in e||((e=e?u.createFrame(e):{}).root=t);return e}(t,r));var s=void 0,i=o.useBlockParams?[]:void 0;function n(t){return""+o.main(a,t,a.helpers,a.partials,r,i,s)}return o.useDepths&&(s=e.depths?t!==e.depths[0]?[t].concat(e.depths):e.depths:[t]),(n=d(o.main,n,a,e.depths||[],r,i))(t,e)}return h.isTop=!0,h._setup=function(t){t.partial?(a.helpers=t.helpers,a.partials=t.partials,a.decorators=t.decorators):(a.helpers=a.merge(t.helpers,c.helpers),o.usePartial&&(a.partials=a.merge(t.partials,c.partials)),(o.usePartial||o.useDecorators)&&(a.decorators=a.merge(t.decorators,c.decorators)))},h._child=function(t,e,r,s){if(o.useBlockParams&&!r)throw new p.default("must pass block params");if(o.useDepths&&!s)throw new p.default("must pass parent depths");return f(a,t,o[t],e,0,r,s)},h},e.wrapProgram=f,e.resolvePartial=function(t,e,r){t?t.call||r.name||(r.name=t,t=r.partials[t]):t="@partial-block"===r.
3name?r.data["partial-block"]:r.partials[r.name];return t},e.invokePartial=function(t,e,r){r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var s=void 0;r.fn&&r.fn!==n&&(s=r.data["partial-block"]=r.fn).partials&&(r.partials=l.extend({},r.partials,s.partials));void 0===t&&s&&(t=s);{if(void 0===t)throw new p.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}},e.noop=n;var l=s(r(5)),p=i(r(6)),u=r(4);function f(s,t,i,n,e,a,o){function r(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=o;return o&&t!==o[0]&&(r=[t].concat(o)),i(s,t,s.helpers,s.partials,e.data||n,a&&[e.blockParams].concat(a),r)}return(r=d(i,r,s,o,n,a)).program=t,r.depth=o?o.length:0,r.blockParams=e||0,r}function n(){return""}function d(t,e,r,s,i,n){if(t.decorator){var a={};e=t.decorator(e,a,r,s&&s[0],i,n,s),l.extend(e,a)}return e}},function(t,e){(function(s){"use strict";e.__esModule=!0,e.default=function(t){var e=void 0!==s?s:window,r=e.Handlebars;t.noConflict=function(){e.Handlebars===t&&(e.Handlebars=r)}},t.exports=e.default}).call(e,function(){return this}())},function(t,e){"use strict";e.__esModule=!0;var r={helpers:{helperExpression:function(t){return"SubExpression"===t.type||("MustacheStatement"===t.type||"BlockStatement"===t.type)&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return 1===t.parts.length&&!r.helpers.scopedId(t)&&!t.depth}}};e.default=r,t.exports=e.default},function(t,e,r){"use strict";var s=r(1).default,i=r(3).default;e.__esModule=!0,e.parse=function(t,e){return"Program"!==t.type?((n.default.yy=h).locInfo=function(t){return new h.SourceLocation(e&&e.srcName,t)},new a.default(e).accept(n.default.parse(t))):t};var n=s(r(23)),a=s(r(24)),o=i(r(26)),c=r(5);e.parser=n.default;var h={};c.extend(h,o)},function(t,e){"use strict";var r=function(){var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,
vendor: 8,271 bytes, line 3
3EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(t,e,r,s,i,n,a){var o=n.length-1;switch(i){case 1:return n[o-1];case 2:this.$=s.prepareProgram(n[o]);break;case 3:case 4:case 5:case 6:case 7:case 8:this.$=n[o];break;case 9:this.$={type:"CommentStatement",value:s.stripComment(n[o]),strip:s.stripFlags(n[o],n[o]),loc:s.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:n[o],value:n[o],loc:s.locInfo(this._$)};break;case 11:this.$=s.prepareRawBlock(n[o-2],n[o-1],n[o],this._$);break;case 12:this.$={path:n[o-3],params:n[o-2],hash:n[o-1]};break;case 13:this.$=s.prepareBlock(n[o-3],n[o-2],n[o-1],n[o],!1,this._$);break;case 14:this.$=s.prepareBlock(n[o-3],n[o-2],n[o-1],n[o],!0,this._$);break;case 15:this.$={open:n[o-5],path:n[o-4],params:n[o-3],hash:n[o-2],blockParams:n[o-1],strip:s.stripFlags(n[o-5],n[o])};break;case 16:case 17:this.$={path:n[o-4],params:n[o-3],hash:n[o-2],blockParams:n[o-1],strip:s.stripFlags(n[o-5],n[o])};break;case 18:this.$={strip:s.stripFlags(n[o-1],n[o-1]),program:n[o]};break;case 19:var c=s.prepareBlock(n[o-2],n[o-1],n[o],n[o],!1,this._$),h=s.prepareProgram([c],n[o-1].loc);h.chained=!0,this.$={strip:n[o-2].strip,program:h,chain:!0};break;case 20:this.$=n[o];break;case 21:this.$={path:n[o-1],strip:s.stripFlags(n[o-2],n[o])};break;case 22:case 23:this.$=s.prepareMustache(n[o-3],n[o-2],n[o-1],n[o-4],s.stripFlags(n[o-4],n[o]),this._$);break;case 24:this.$={type:"PartialStatement",name:n[o-3],params:n[o-2],hash:n[o-1],indent:"",strip:s.stripFlags(n[o-4],n[o]),loc:s.locInfo(this._$)};break;case 25:this.$=s.preparePartialBlock(n[o-2],n[o-1],n[o],this._$);break;case 26:this.$={path:n[o-3],params:n[o-2],hash:n[o-1],strip:s.stripFlags(n[o-4],n[o])};break;case 27:case 28:this.$=n[o];break;case 29:this.$={type:"SubExpression",path:n[o-3],params:n[o-2],hash:n[o-1],loc:s.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:n[o],loc:s.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:s.id(n[o-2]),value:n[o],loc:s.locInfo(this._$)};break;case 32:this.$=s.id(n[o-1]);break;case 33:case 34:this.$=n[o];break;case 35:this.$={type:"StringLiteral",value:n[o],original:n[o],loc:s.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(n[o]),original:Number(n[o]),loc:s.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===n[o],original:"true"===n[o],loc:s.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:s.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:s.locInfo(this._$)};break;case 40:case 41:this.$=n[o];break;case 42:this.$=s.preparePath(!0,n[o],this._$);break;case 43:this.$=s.preparePath(!1,n[o],this._$);break;case 44:n[o-2].push({part:s.id(n[o]),original:n[o],separator:n[o-1]}),this.$=n[o-2];break;case 45:this.$=[{part:s.id(n[o]),original:n[o]}];break;case 46:this.$=[];break;case 47:n[o-1].push(n[o]);break;case 48:this.$=[n[o]];break;case 49:n[o-1].push(n[o]);break;case 50:this.$=[];break;case 51:n[o-1].push(n[o]);break;case 58:this.$=[];break;case 59:n[o-1].push(n[o]);break;case 64:this.$=[];break;case 65:n[o-1].push(n[o]);break;case 70:this.$=[];break;case 71:n[o-1].push(n[o]);break;case 78:this.$=[];break;case 79:n[o-1].push(n[o]);break;case 82:this.$=[];break;case 83:n[o-1].push(n[o]);break;case 86:this.$=[];break;case 87:n[o-1].push(n[o]);break;case 90:this.$=[];break;case 91:n[o-1].push(n[o]);break;case 94:this.$=[];break;case 95:n[o-1].push(n[o]);break;case 98:this.$=[n[o]];break;case 99:n[o-1].push(n[o]);break;case 100:this.$=[n[o]];break;case 101:n[o-1].push(n[o])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37
vendor: 4,137 bytes, line 3
3],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]}
vendor: 16,440 bytes, line 3
3,{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(t,e){throw new Error(t)},parse:function(t){var e=this,r=[0],s=[null],i=[],n=this.table,a="",o=0,c=0,h=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,void 0===(this.yy.parser=this).lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;i.push(l);var p=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var u,f,d,m,g,v,y,k,S,b,_={};;){if(d=r[r.length-1],void 0===(m=this.defaultActions[d]?this.defaultActions[d]:(null==u&&(b=void 0,"number"!=typeof(b=e.lexer.lex()||1)&&(b=e.symbols_[b]||b),u=b),n[d]&&n[d][u]))||!m.length||!m[0]){var P="";if(!h){for(v in S=[],n[d])this.terminals_[v]&&2<v&&S.push("'"+this.terminals_[v]+"'");P=this.lexer.showPosition?"Parse error on line "+(o+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[u]||u)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==u?"end of input":"'"+(this.terminals_[u]||u)+"'"),this.parseError(P,{text:this.lexer.match,token:this.terminals_[u]||u,line:this.lexer.yylineno,loc:l,expected:S})}}if(m[0]instanceof Array&&1<m.length)throw new Error("Parse Error: multiple actions possible at state: "+d+", token: "+u);switch(m[0]){case 1:r.push(u),s.push(this.lexer.yytext),i.push(this.lexer.yylloc),r.push(m[1]),u=null,f?(u=f,f=null):(c=this.lexer.yyleng,a=this.lexer.yytext,o=this.lexer.yylineno,l=this.lexer.yylloc,0<h&&h--);break;case 2:if(y=this.productions_[m[1]][1],_.$=s[s.length-y],_._$={first_line:i[i.length-(y||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(y||1)].first_column,last_column:i[i.length-1].last_column},p&&(_._$.range=[i[i.length-(y||1)].range[0],i[i.length-1].range[1]]),void 0!==(g=this.performAction.call(_,a,c,o,this.yy,m[1],s,i)))return g;y&&(r=r.slice(0,-1*y*2),s=s.slice(0,-1*y),i=i.slice(0,-1*y)),r.push(this.productions_[m[1]][0]),s.push(_.$),i.push(_._$),k=n[r[r.length-2]][r[r.length-1]],r.push(k);break;case 3:return!0}}return!0}},e={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,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},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var s=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),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===s.length?this.yylloc.first_column:0)+s[s.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;var t,e,r,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length&&(!(r=this._input.match(this.rules[n[a]]))||e&&!(r[0].length>e[0].length)||(e=r,s=a,this.options.flex));a++);return e?((i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,n[s],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)},options:{},performAction:function(t,r,e,s){function i(t,e){return r.yytext=r.yytext.substr(t,r.yyleng-e)}switch(e){case 0:if("\\\\"===r.yytext.slice(-2)?(i(0,1),this.begin("mu")):"\\"===r.yytext.slice(-1)?(i(0,1),this.begin("emu")):this.begin("mu"),r.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(r.yytext=r.yytext.substr(5,r.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(r.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return r.yytext=i(1,2).replace(/\\"/g,'"'),80;case 32:return r.yytext=i(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:case 42:return 72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[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,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};function r(){this.yy={}}return t.lexer=e,new((r.prototype=t).Parser=r)}();e.__esModule=!0,e.default=r},function(t,e,r){"use strict";var s=r(1).default;e.__esModule=!0;var i=s(r(25));function n(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t}function f(t,e,r){void 0===e&&(e=t.length);var s=t[e-1],i=t[e-2];return s?"ContentStatement"===s.type?(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(s.original):void 0:r}function d(t,e,r){void 0===e&&(e=-1);var s=t[e+1],i=t[e+2];return s?"ContentStatement"===s.type?(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(s.original):void 0:r}function m(t,e,r){var s=t[null==e?0:e+1];if(s&&"ContentStatement"===s.type&&(r||!s.rightStripped)){var i=s.value;s.value=s.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),s.rightStripped=s.value!==i}}function g(t,e,r){var s=t[null==e?t.length-1:e-1];if(s&&"ContentStatement"===s.type&&(r||!s.leftStripped)){var i=s.value;return s.value=s.value.replace(r?/\s+$/:/[ \t]+$/,""),s.leftStripped=s.value!==i,s.leftStripped}}(n.prototype=new i.default).Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var s=t.body,i=0,n=s.length;i<n;i++){var a=s[i],o=this.accept(a);if(o){var c=f(s,i,r),h=d(s,i,r),l=o.openStandalone&&c,p=o.closeStandalone&&h,u=o.inlineStandalone&&c&&h;o.close&&m(s,i,!0),o.open&&g(s,i,!0),e&&u&&(m(s,i),g(s,i)&&"PartialStatement"===a.type&&(a.indent=/([ \t]+$)/.exec(s[i-1].original)[1])),e&&l&&(m((a.program||a.inverse).body),g(s,i)),e&&p&&(m(s,i),g((a.inverse||a.program).body))}}return t},n.prototype.BlockStatement=n.prototype.DecoratorBlock=n.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,s=r,i=r;if(r&&r.chained)for(s=r.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var n={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:d(e.body),closeStandalone:f((s||e).body)};if(t.openStrip.close&&m(e.body,null,!0),r){var a=t.inverseStrip;a.open&&g(e.body,null,!0),a.close&&m(s.body,null,!0),t.closeStrip.open&&g(i.body,null,!0),!this.options.ignoreStandalone&&f(e.body)&&d(s.body)&&(g(e.body),m(s.body))}else t.closeStrip.open&&g(e.body,null,!0);return n},n.prototype.Decorator=n.prototype.MustacheStatement=function(t){return t.strip},n.prototype.PartialStatement=n.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}},e.default=n,t.exports=e.default},function(t,e,r){"use strict";var s=r(1).default;e.__esModule=!0;var i=s(r(6));function n(){this.parents=[]}function a(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function o(t){a.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function c(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}n.prototype={constructor:n,mutating:!1,acceptKey:function(t,e){var r=this.accept(t[e]);if(this.mutating){if(r&&!n.prototype[r.type])throw new i.default('Unexpected node type "'+r.type+'" found when accepting '+e+" on "+t.type);t[e]=r}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new i.default(t.type+" requires "+e)},acceptArray:function(t){for(var e=0,r=t.length;e<r;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,r--)},accept:function(t){if(t){if(!this[t.type])throw new i.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);return this.current=this.parents.shift(),!this.mutating||e?e:!1!==e?t:void 0}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:a,Decorator:a,BlockStatement:o,DecoratorBlock:o,PartialStatement:c,PartialBlockStatement:function(t){c.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:a,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}},e.default=n,t.exports=e.default},function(t,e,r){"use strict";var s=r(1).default;
vendor: 5,190 bytes, line 3
3e.__esModule=!0,e.SourceLocation=function(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}},e.id=function(t){return/^\[.*\]$/.test(t)?t.substr(1,t.length-2):t},e.stripFlags=function(t,e){return{open:"~"===t.charAt(2),close:"~"===e.charAt(e.length-3)}},e.stripComment=function(t){return t.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")},e.preparePath=function(t,e,r){r=this.locInfo(r);for(var s=t?"@":"",i=[],n=0,a=0,o=e.length;a<o;a++){var c=e[a].part,h=e[a].original!==c;if(s+=(e[a].separator||"")+c,h||".."!==c&&"."!==c&&"this"!==c)i.push(c);else{if(0<i.length)throw new l.default("Invalid path: "+s,{loc:r});".."===c&&(n++,"../")}}return{type:"PathExpression",data:t,depth:n,parts:i,original:s,loc:r}},e.prepareMustache=function(t,e,r,s,i,n){var a=s.charAt(3)||s.charAt(2),o="{"!==a&&"&"!==a;return{type:/\*/.test(s)?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:o,strip:i,loc:this.locInfo(n)}},e.prepareRawBlock=function(t,e,r,s){h(t,r),s=this.locInfo(s);var i={type:"Program",body:e,strip:{},loc:s};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:s}},e.prepareBlock=function(t,e,r,s,i,n){s&&s.path&&h(t,s);var a=/\*/.test(t.open);e.blockParams=t.blockParams;var o=void 0,c=void 0;if(r){if(a)throw new l.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=s.strip),c=r.strip,o=r.program}i&&(i=o,o=e,e=i);return{type:a?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:o,openStrip:t.strip,inverseStrip:c,closeStrip:s&&s.strip,loc:this.locInfo(n)}},e.prepareProgram=function(t,e){if(!e&&t.length){var r=t[0].loc,s=t[t.length-1].loc;r&&s&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:s.end.line,column:s.end.column}})}return{type:"Program",body:t,strip:{},loc:e}},e.preparePartialBlock=function(t,e,r,s){return h(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(s)}};var l=s(r(6));function h(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new l.default(t.path.original+" doesn't match "+e,r)}}},function(t,e,r){"use strict";var s=r(1).default;e.__esModule=!0,e.Compiler=a,e.precompile=function(t,e,r){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new c.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);"data"in(e=e||{})||(e.data=!0);e.compat&&(e.useDepths=!0);var s=r.parse(t,e),i=(new r.Compiler).compile(s,e);return(new r.JavaScriptCompiler).compile(i,e)},e.compile=function(s,i,n){void 0===i&&(i={});if(null==s||"string"!=typeof s&&"Program"!==s.type)throw new c.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+s);"data"in i||(i.data=!0);i.compat&&(i.useDepths=!0);var a=void 0;function o(){var t=n.parse(s,i),e=(new n.Compiler).compile(t,i),r=(new n.JavaScriptCompiler).compile(e,i,void 0,!0);return n.template(r)}function t(t,e){return a||(a=o()),a.call(this,t,e)}return t._setup=function(t){return a||(a=o()),a._setup(t)},t._child=function(t,e,r,s){return a||(a=o()),a._child(t,e,r,s)},t};var c=s(r(6)),n=r(5),o=s(r(21)),i=[].slice;function a(){}function h(t,e){if(t===e)return!0;if(n.isArray(t)&&n.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!h(t[r],e[r]))return!1;return!0}}function l(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}a.prototype={compiler:a,equals:function(t){var e=this.opcodes.length;if(t.opcodes.length!==e)return!1;for(var r=0;r<e;r++){var s=this.opcodes[r],i=t.opcodes[r];if(s.opcode!==i.opcode||!h(s.args,i.args))return!1}e=this.children.length;for(r=0;r<e;r++)if(!this.children[r].equals(t.children[r]))return!1;return!0},guid:0,compile:function(t,e){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=e,this.stringParams=e.stringParams,this.trackIds=e.trackIds,e.blockParams=e.blockParams||[];var r=e.knownHelpers;if(e.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r)for(var s in r)s in r&&(e.knownHelpers[s]=r[s]);return this.accept(t)},compileProgram:function(t){var e=(new this.compiler).compile(t,this.options),r=this.guid++;return this.usePartial=this.usePartial||e.usePartial,this.children[r]=e,this.useDepths=this.useDepths||e.useDepths,r},accept:function(t){if(!this[t.type])throw new c.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var e=this[t.type](t);return this.sourceNode.shift(),e},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var e=t.body,r=e.length,s=0;s<r;s++)this.accept(e[s]);return this.options.blockParams.shift(),this.isSimple=1===r,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){l(t);var e=t.program,r=t.inverse;e=e&&this.compileProgram(e),r=r&&this.compileProgram(r);var s=this.classifySexpr(t);"helper"===s?this.helperSexpr(t,e,r):"simple"===s?(this.simpleSex
vendor: 1,844 bytes, line 3
3pr(t),this.opcode("pushProgram",e),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,e,r),this.opcode("pushProgram",e),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var e=t.program&&this.compileProgram(t.program),r=this.setupFullMustacheParams(t,e,void 0),s=t.path;this.useDecorators=!0,this.opcode("registerDecorator",r.length,s.original)},PartialStatement:function(t){this.usePartial=!0;var e=t.program;e&&(e=this.compileProgram(t.program));var r=t.params;if(1<r.length)throw new c.default("Unsupported number of partial arguments: "+r.length,t);r.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):r.push({type:"PathExpression",parts:[],depth:0}));var s=t.name.original,i="SubExpression"===t.name.type;i&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var n=t.indent||"";this.options.preventIndent&&n&&(this.opcode("appendContent",n),n=""),this.opcode("invokePartial",i,s,n),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){l(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,r){var s=t.path,i=s.parts[0],n=null!=e||null!=r;this.opcode("getContext",s.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",r),s.strict=!0,this.accept(s),this.opcode("invokeAmbiguous",i,n)}
vendor: 4,211 bytes, line 3
3,simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,r){var s=this.setupFullMustacheParams(t,e,r),i=t.path,n=i.parts[0];if(this.options.knownHelpers[n])this.opcode("invokeKnownHelper",s.length,n);else{if(this.options.knownHelpersOnly)throw new c.default("You specified knownHelpersOnly, but used the unknown helper "+n,t);i.strict=!0,i.falsy=!0,this.accept(i),this.opcode("invokeHelper",s.length,i.original,o.default.helpers.simpleId(i))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],r=o.default.helpers.scopedId(t),s=!t.depth&&!r&&this.blockParamIndex(e);s?this.opcode("lookupBlockParam",s,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,r):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,r=0,s=e.length;for(this.opcode("pushHash");r<s;r++)this.pushParam(e[r].value);for(;r--;)this.opcode("assignToHash",e[r].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:i.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var e=o.default.helpers.simpleId(t.path),r=e&&!!this.blockParamIndex(t.path.parts[0]),s=!r&&o.default.helpers.helperExpression(t),i=!r&&(s||e);if(i&&!s){var n=t.path.parts[0],a=this.options;a.knownHelpers[n]?s=!0:a.knownHelpersOnly&&(i=!1)}return s?"helper":i?"ambiguous":"simple"},pushParams:function(t){for(var e=0,r=t.length;e<r;e++)this.pushParam(t[e])},pushParam:function(t){var e=null!=t.value?t.value:t.original||"";if(this.stringParams)e.replace&&(e=e.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",e,t.type),"SubExpression"===t.type&&this.accept(t);else{if(this.trackIds){var r=void 0;if(!t.parts||o.default.helpers.scopedId(t)||t.depth||(r=this.blockParamIndex(t.parts[0])),r){var s=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",r,s)}else(e=t.original||e).replace&&(e=e.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,e)}this.accept(t)}},setupFullMustacheParams:function(t,e,r,s){var i=t.params;return this.pushParams(i),this.opcode("pushProgram",e),this.opcode("pushProgram",r),t.hash?this.accept(t.hash):this.opcode("emptyHash",s),i},blockParamIndex:function(t){for(var e=0,r=this.options.blockParams.length;e<r;e++){var s=this.options.blockParams[e],i=s&&n.indexOf(s,t);if(s&&0<=i)return[e,i]}}}},function(t,e,r){"use strict";var s=r(1).default;e.__esModule=!0;var i=r(4),d=s(r(6)),n=r(5),a=s(r(29));function c(t){this.value=t}function o(){}o.prototype={nameLookup:function(t,e){return o.isValidJavaScriptVariableName(e)?[t,".",e]:[t,"[",JSON.stringify(e),"]"]},depthedLookup:function(t){return[this.aliasable("container.lookup"),'(depths, "',t,'")']},compilerInfo:function(){var t=i.COMPILER_REVISION;return[t,i.REVISION_CHANGES[t]]},appendToBuffer:function(t,e,r){return n.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:r?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},compile:function(t,e,r,s){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!s,this.name=this.environment.name,this.isChild=!!r,this.context=r||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;
vendor: 2,749 bytes, line 3
3var i=t.opcodes,n=void 0,a=void 0,o=void 0,c=void 0;for(o=0,c=i.length;o<c;o++)n=i[o],this.source.currentLocation=n.loc,a=a||n.loc,this[n.opcode].apply(this,n.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new d.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),this.decorators=s?Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators.merge()));var h=this.createFunctionContext(s);if(this.isChild)return h;var l={compiler:this.compilerInfo(),main:h};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var p=this.context,u=p.programs,f=p.decorators;for(o=0,c=u.length;o<c;o++)u[o]&&(l[o]=u[o],f[o]&&(l[o+"_d"]=f[o],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),s?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),e.srcName?(l=l.toStringWithSourceMap({file:e.destName})).map=l.map&&l.map.toString():l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new a.default(this.options.srcName),this.decorators=new a.default(this.options.srcName)},createFunctionContext:function(t){var e="",r=this.stackVars.concat(this.registers.list);0<r.length&&(e+=", "+r.join(", "));var s=0;for(var i in this.aliases){var n=this.aliases[i];this.aliases.hasOwnProperty(i)&&n.children&&1<n.referenceCount&&(e+=", alias"+ ++s+"="+i,n.children[0]="alias"+s)}var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var o=this.mergeSource(e);return t?(a.push(o),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),") {\n  ",o,"}"])},mergeSource:function(t){var e=this.environment.isSimple,r=!this.forceBuffer,s=void 0,i=void 0,n=void 0,a=void 0;return this.source.each(function(t){t.appendToBuffer?(n?t.prepend("  + "):n=t,a=t):(n&&(i?n.prepend("buffer += "):s=!0,a.add(";"),n=a=void 0),i=!0,e||(r=!1))}),r?n?(n.prepend("return "),a.add(";")):i||this.source.push('return "";'):(t+=", buffer = "+(s?"":this.initializeBuffer()),n?(n.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;
3")),t&&this.source.prepend("var "+t.substring(2)+(s?"":";\n")),this.source.merge()},blockValue:function(t){var e=this.aliasable("helpers.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs(t,0,r);var s=this.popStack();r.splice(1,0,s),this.push(this.source.functionCall(e,"call",r))},ambiguousBlockValue:function(){var t=this.aliasable("helpers.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var r=this.topStack();e.splice(1,0,r),this.pushSource(["if (!",this.lastHelper,") { ",r," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,r,s){var i=0;s||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[i++])),this.resolvePath("context",t,i,e,r)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,r){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,r)},resolvePath:function(r,s,i,n,t){var a=this;if(this.options.strict||this.options.assumeObjects)this.push(function(t,e,r,s){var i=e.popStack(),n=0,a=r.length;t&&a--;for(;n<a;n++)i=e.nameLookup(i,r[n],s);return t?[e.aliasable("container.strict"),"(",i,", ",e.quotedString(r[n]),")"]:i}(this.options.strict&&t,this,s,r));else for(var e=s.length;i<e;i++)this.replaceStack(function(t){var e=a.nameLookup(t,s[i],r);return n?[" && ",e]:[" != null ? ",e," : ",t]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,e){this.pushContext(),this.pushString(e),"SubExpression"!==e&&("string"==typeof t?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){null!=t?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,e){var r=this.nameLookup("decorators",e,"decorator"),s=this.setupHelperArgs(e,t);this.decorators.push(["fn = ",this.decorators.functionCall(r,"",["fn","props","container",s])," || fn;"])},invokeHelper:function(t,e,r){var s=this.popStack(),i=this.setupHelper(t,e),n=r?[i.name," || "]:"",a=["("].concat(n,s);this.options.strict||a.push(" || ",this.aliasable("helpers.helperMissing")),a.push(")"),this.push(this.source.functionCall(a,"call",i.callParams))},invokeKnownHelper:function(t,e){var r=this.setupHelper(t,e);this.push(this.source.functionCall(r.name,"call",r.callParams))},invokeAmbiguous:function(t,e){this.useRegister("helper");var r=this.popStack();this.emptyHash();var s=this.setupHelper(0,t,e),i=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",t,"helper")," || ",r,")"];this.options.strict||(i[0]="(helper = ",i.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",i,s.paramsInit?["),(",s.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",s.callParams)," : helper))"])},invokePartial:function(t,e,r){var s=[],i=this.setupParams(e,1,s);t&&(e=this.popStack(),delete i.name),r&&(i.indent=JSON.stringify(r)),i.helpers="helpers",i.partials="partials",i.decorators="container.decorators",t?s.unshift(e):s.unshift(this.nameLookup("partials",e,"partial")),this.options.compat&&(i.depths="depths"),i=this.objectLiteral(i),s.push(i),this.push(this.source.functionCall("container.invokePartial","",s))},assignToHash:function(t){var e=this.popStack(),r=void 0,s=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(s=this.popStack(),r=this.popStack());var n=this.hash;r&&(n.contexts[t]=r),s&&(n.types[t]=s),i&&(n.ids[t]=i),n.values[t]=e},pushId:function(t,e,r){"BlockParam"===t?this.pushStackLiteral("blockParams["+e[0]+"].path["+e[1]+"]"+(r?" + "+JSON.stringify("."+r):"")):"PathExpression"===t?this.pushString(e):"SubExpression"===t?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:o,compileChildren:function(t,e){for(var r=t.children,s=void 0,i=void 0,n=0,a=r.length;n<a;n++){s=r[n],i=new this.compiler;var o=this.matchExistingProgram(s);this.useBlockParams=null==o?(this.context.programs.push(""),o=this.context.programs.length,s.index=o,s.name="program"+o,this.context.programs[o]=i.compile(s,e,this.context,!this.prec
vendor: 4,316 bytes, line 3
3ompile),this.context.decorators[o]=i.decorators,this.context.environments[o]=s,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams||i.useBlockParams):(s.index=o,s.name="program"+o,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams||s.useBlockParams)}},matchExistingProgram:function(t){for(var e=0,r=this.context.environments.length;e<r;e++){var s=this.context.environments[e];if(s&&s.equals(t))return e}},programExpression:function(t){var e=this.environment.children[t],r=[e.index,"data",e.blockParams];return(this.useBlockParams||this.useDepths)&&r.push("blockParams"),this.useDepths&&r.push("depths"),"container.program("+r.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof c||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new c(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var e=["("],r=void 0,s=void 0,i=void 0;if(!this.isInline())throw new d.default("replaceStack on non-inline");var n=this.popStack(!0);if(n instanceof c)e=["(",r=[n.value]],i=!0;else{s=!0;var a=this.incrStack();e=["((",this.push(a)," = ",n,")"],r=this.topStack()}var o=t.call(this,r);i||this.popStack(),s&&this.stackSlot--,this.push(e.concat(o,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,r=t.length;e<r;e++){var s=t[e];if(s instanceof c)this.compileStack.push(s);else{var i=this.incrStack();this.pushSource([i," = ",s,";"]),this.compileStack.push(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var e=this.isInline(),r=(e?this.inlineStack:this.compileStack).pop();if(!t&&r instanceof c)return r.value;if(!e){if(!this.stackSlot)throw new d.default("Invalid stack pop");this.stackSlot--}return r},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,e=t[t.length-1];return e instanceof c?e.value:e},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var e=this.aliases[t];return e?e.referenceCount++:((e=this.aliases[t]=this.source.wrap(t)).aliasable=!0,e.referenceCount=1),e},setupHelper:function(t,e,r){var s=[];return{params:s,paramsInit:this.setupHelperArgs(e,t,s,r),name:this.nameLookup("helpers",e,"helper"),callParams:[this.contextName(0)].concat(s)}},setupParams:function(t,e,r){var s={},i=[],n=[],a=[],o=!r,c=void 0;o&&(r=[]),s.name=this.quotedString(t),s.hash=this.popStack(),this.trackIds&&(s.hashIds=this.popStack()),this.stringParams&&(s.hashTypes=this.popStack(),s.hashContexts=this.popStack());var h=this.popStack(),l=this.popStack();(l||h)&&(s.fn=l||"container.noop",s.inverse=h||"container.noop");for(var p=e;p--;)c=this.popStack(),r[p]=c,this.trackIds&&(a[p]=this.popStack()),this.stringParams&&(n[p]=this.popStack(),i[p]=this.popStack());return o&&(s.args=this.source.generateArray(r)),this.trackIds&&(s.ids=this.source.generateArray(a)),this.stringParams&&(s.types=this.source.generateArray(n),s.contexts=this.source.generateArray(i)),this.options.data&&(s.data="data"),this.useBlockParams&&(s.blockParams="blockParams"),s},setupHelperArgs:function(t,e,r,s){var i=this.setupParams(t,e,r);return i=this.objectLiteral(i),s?(this.useRegister("options"),r.push("options"),["options=",i]):r?(r.push(i),""):i}},function(){for(var t="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=o.RESERVED_WORDS={},r=0,s=t.length;r<s;r++)e[t[r]]=!0}
vendor: 2,039 bytes, line 3
3(),o.isValidJavaScriptVariableName=function(t){return!o.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)},e.default=o,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var a=r(5),s=void 0;try{}catch(t){}function n(t,e,r){if(a.isArray(t)){for(var s=[],i=0,n=t.length;i<n;i++)s.push(e.wrap(t[i],r));return s}return"boolean"==typeof t||"number"==typeof t?t+"":t}function i(t){this.srcFile=t,this.source=[]}s||((s=function(t,e,r,s){this.src="",s&&this.add(s)}).prototype={add:function(t){a.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){a.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),i.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,e){this.source.unshift(this.wrap(t,e))},push:function(t,e){this.source.push(this.wrap(t,e))},merge:function(){var e=this.empty();return this.each(function(t){e.add(["  ",t,"\n"])}),e},each:function(t){for(var e=0,r=this.source.length;e<r;e++)t(this.source[e])},empty:function(){var t=this.currentLocation||{start:{}};return new s(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var e=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return t instanceof s?t:(t=n(t,this,e),new s(e.start.line,e.start.column,this.srcFile,t))},functionCall:function(t,e,r){return r=this.generateList(r),this.wrap([t,e?"."+e+"(":"(",r,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var e=[];for(var r in t)if(t.hasOwnProperty(r)){var s=n(t[r],this);"undefined"!==s&&e.push([this.quotedString(r),":",s])}var i=this.generateList(e);return i.prepend("{"),i.add("}"),i},generateList:function(t){for(var e=this.empty(),r=0,s=t.length;r<s;r++)r&&e.add(","),e.add(n(t[r],this));return e},generateArray:function(t){var e=this.generateList(t);
3return e.prepend("["),e.add("]"),e}},e.default=i,t.exports=e.default}])});
4function getDistanceFromLatLonInKm(e,r,t,n){var a=deg2rad(t-e),i=deg2rad(n-r),s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(deg2rad(e))*Math.cos(deg2rad(t))*Math.sin(i/2)*Math.sin(i/2);return 6371*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}function deg2rad(e){return e*(Math.PI/180)}Handlebars.registerHelper("ifeq",function(e,r,t){return e==r?t.fn(this):t.inverse(this)}),Handlebars.registerHelper("getLabel",function(e,r,t,n){return e&&r&&t&&r[t]?"object"==typeof e[r[t]]?e[r[t]].label||"...":e[r[t]]:e&&e[0]&&e[0].label?"...":""}),Handlebars.registerHelper("getStatusText",function(e,r,t,n){return e[r[t]]?e[r[t]].label:"..."}),Handlebars.registerHelper("round",function(e,r){return Math.round(e)}),Handlebars.registerHelper("ifinr",function(e,r,t){for(var n in r)if(r[n].id==e)return t.fn(this);return t.inverse(this)}),Handlebars.registerHelper("ifselected",function(e,r,t){for(var n in r)if(r[n].value==e)return t.fn(this);return t.inverse(this)}),Handlebars.registerHelper("ifin",function(e,r,t){return-1!=r.indexOf(e)?t.fn(this):t.inverse(this)}),Handlebars.registerHelper("ifnoteq",function(e,r,t){return e!=r?t.fn(this):t.inverse(this)}),Handlebars.registerHelper("ifjson",function(e,r,t){return"object"==typeof e[r]?t.fn(this):t.inverse(this)}),Handlebars.registerHelper("ifnotjson",function(e,r,t){return"object"!=typeof e[r]?t.fn(this):t.inverse(this)}),Handlebars.registerHelper("getRegions",function(e,r,t){var n=e[r],a="";if(n&&n.length)return a+='<label class="label label-default">'+(n[0].title?n[0].title:n[0].id)+"</label> ",1<n.length&&(a+='<span class="mapsvg-data-image-counter">+'+(n.length-1)+"</span>"),new Handlebars.SafeString(a)}),Handlebars.registerHelper("getSelectedOptions",function(e,r,t){var n=e[r],a="";if(n&&n.length)return a+='<label class="label label-default">'+(void 0===n[0].label?n[0].value:n[0].label)+"</label> ",1<n.length&&(a+='<span class="mapsvg-data-image-counter">+'+(n.length-1)+"</span>"),new Handlebars.SafeString(a)}),Handlebars.registerHelper("getRegionIDs",function(e,r,t){var n=e[r],a="";if(n&&n.length)return a+='<label class="label label-default">'+(region.title?region.title:region.id)+"</label> ",1<n.length&&(a+='<span class="mapsvg-data-image-counter">+'+(n.length-1)+"</span>"),new Handlebars.SafeString(a)}),Handlebars.registerHelper("getThumbs",function(e,r,t){var n=e[r],a="";if(n&&n.length)return a+='<img src="'+n[0].thumbnail+'" class="mapsvg-data-thumbnail"/>',1<n.length&&(a+='<span class="mapsvg-data-image-counter">+'+(n.length-1)+"</span>"),new Handlebars.SafeString(a)}),Handlebars.registerHelper("getMarkerImage",function(e,r,t){var n=e[r];if(n&&n.img)return new Handlebars.SafeString('<img src="'+n.markerImageUrl+'" class="mapsvg-marker-image"/> '+(n.address&&n.address.formatted?n.address.formatted:""))}),Handlebars.registerHelper("not",function(e,r,t){return e!=r?t.fn(this):t.inverse(this)}),Handlebars.registerHelper("if_starts",function(e,r,t){return e&&0==e.indexOf(r)?t.fn(this):t.inverse(this)}),Handlebars.registerHelper("if_function",function(e,r){return"function"==typeof e?r.fn(this):r.inverse(this)}),Handlebars.registerHelper("if_number",function(e,r){return jQuery.isNumeric(e)?r.fn(this):r.inverse(this)}),Handlebars.registerHelper("if_string",function(e,r){return"string"!=typeof e||jQuery.isNumeric(e)?r.inverse(this):r.fn(this)}),Handlebars.registerHelper("toString",function(e){return null!=e?MapSVG.convertToText(e):""}),Handlebars.registerHelper("jsonToString",function(e){return null!=e?JSON.stringify(e):""}),Handlebars.registerHelper("log",function(e){return console.log(e),e}),Handlebars.registerHelper("distanceFrom",function(e){if(MapSVG.distanceSearch){var r=getDistanceFromLatLonInKm(e.lat,e.lng,MapSVG.distanceSearch.latlng.lat,MapSVG.distanceSearch.latlng.lng);return"mi"===MapSVG.distanceSearch.units&&(r*=.62137),r.toFixed(2)+" "+MapSVG.distanceSearch.unitsLabel}return""}),Handlebars.registerHelper("distanceTo",function(e){if(MapSVG.distanceSearch){var r=getDistanceFromLatLonInKm(e.lat,e.lng,MapSVG.distanceSearch.latlng.lat,MapSVG.distanceSearch.latlng.lng);return"mi"===MapSVG.distanceSearch.units&&(r*=.62137),r.toFixed(2)+" "+MapSVG.distanceSearch.unitsLabel}return""}),Handlebars.registerHelper("stripUnderscores",function(e){return null!=e?e.replace(/_/g," "):""}),Handlebars.registerHelper("spacesToUnderscores",function(e){return null!=e?e.replace(/ /g,"_"):""}),Handlebars.registerHelper("switch",function(e,r){this._switch_value_=e,this._switch_break_=!1;var t=r.fn(this);return delete this._switch_break_,delete this._switch_value_,t}),Handlebars.registerHelper("case",function(e,r){var t=Array.prototype.slice.call(arguments),n=(r=t.pop(),t);return this._switch_break_||!this._open_break_&&-1===n.indexOf(this._switch_value_)?"":("true"===r.hash.break||!0===r.hash.break?this._switch_break_=!0:this._open_break_=!0,r.fn(this))}),Handlebars.registerHelper("default",function(e){if(!this._switch_break_)return e.fn(this)}),Handlebars.registerHelper("numberFormat",function(e,r){var t=r.hash.decimalLength||2,n=r.hash.thousandsSep||" ",a=r.hash.decimalSep||".",i="\\d(?=(\\d{3})+"+(0<t?"\\D":"$")+")",s=(e=parseFloat(e)).toFixed(Math.max(0,~~t));return(a?s.replace(".",a):s).replace(new RegExp(i,"g"),"$&"+n)}),Handlebars.registerHelper("shortcode",function(e){for(item in this)e=e.replace(new RegExp("{{"+item+"}}","g"),this[item]);return void 0===window.MapSVG.resizeIframe&&(window.MapSVG.resizeIframe=function(e){jQuery(e).contents();window.addEventListener("message",function(e){for(var r=document.getElementsByTagName("iframe"),t=0;t<r.length;t++)if(r[t].contentWindow===e.source){jQuery(r[t]).css({height:e.data.height});break}},!1)},window.MapSVG.resizeIframe()),new Handlebars.SafeString('<iframe width="100%" class="mapsvg-iframe-sh
4ortcode"  src="/mapsvg_sc?mapsvg_shortcode='+encodeURI(e)+'"></iframe>')}),Handlebars.registerHelper("shortcode_inline",function(e){for(item in this)e=e.replace(new RegExp("{{"+item+"}}","g"),this[item]);void 0===window.MapSVG.shortcodeCounter&&(window.MapSVG.shortcodeCounter=0);var r="mapsvg-inline-shortcode-"+ ++window.MapSVG.shortcodeCounter,t='<span class="mapsvg-inline-shortcode" id="'+r+'"></span>';return jQuery.get(ajaxurl,{action:"mapsvg_shortcode",shortcode:e},function(e){jQuery("#"+r).replaceWith(e)}),new Handlebars.SafeString(t)}),Handlebars.registerHelper("post",function(e){return this.post_id?(void 0===window.MapSVG.resizeIframe&&(window.MapSVG.resizeIframe=function(e){jQuery(e).contents();window.addEventListener("message",function(e){for(var r=document.getElementsByTagName("iframe"),t=0;t<r.length;t++)if(r[t].contentWindow===e.source){jQuery(r[t]).css({height:e.data.height});break}},!1)},window.MapSVG.resizeIframe()),new Handlebars.SafeString('<iframe width="100%" class="mapsvg-iframe-post"  src="/mapsvg_sc?mapsvg_embed_post='+encodeURI(this.post_id)+'"></iframe>')):""}),Handlebars.registerHelper("math",function(e,r,t){return{"+":(e=parseFloat(e))+(t=parseFloat(t)),"-":e-t,"*":e*t,"/":e/t,"%":e%t}[r]});
5var scripts=document.getElementsByTagName("script"),myScript=scripts[scripts.length-1].src.split("/");myScript.pop();
5var pluginRootURL=myScript.join("/")+"/";!function(c,d,e){function i(e,t){e=e||{};var a=this;if(this.formBuilder=t,this.images=[],this.type=e.type,this.value=e.value,this.searchable=d.parseBoolean(e.searchable),this.databaseFields=this.formBuilder.mapsvg.database.getSchema().map(function(e){if("text"==e.type||"region"==e.type||"textarea"==e.type||"post"==e.type||"select"==e.type||"radio"==e.type||"checkbox"==e.type)return"post"==e.type?"Object.post.post_title":"Object."+e.name}),this.databaseFieldsFilterableShort=this.formBuilder.mapsvg.database.getSchema().filter(function(e){return"select"==e.type||"radio"==e.type||"region"==e.type}).map(function(e){return e.name}),this.regionFields=this.formBuilder.mapsvg.regionsDatabase.getSchema().map(function(e){if("status"==e.type||"text"==e.type||"textarea"==e.type||"post"==e.type||"select"==e.type||"radio"==e.type||"checkbox"==e.type)return"post"==e.type?"Region.post.post_title":"Region."+e.name}),this.db_type="varchar(255)","region"==this.type)this.options=this.formBuilder.getRegionsList(),this.label="Regions",this.name="regions",this.db_type="text";else if("text"==this.type)this.searchType=e.searchType||"fulltext";else if("textarea"==this.type)this.autobr=e.autobr,this.html=e.html,this.db_type="text";else if("modal"==this.type)this.showButtonText=e.showButtonText;else if("location"==this.type)this.location=this.value,this.label=this.label||(void 0===e.label?"Location":e.label),this.name="location",this.db_type="text",this.languages=[{value:"sq",label:"Albanian"},{value:"ar",label:"Arabic"},{value:"eu",label:"Basque"},{value:"be",label:"Belarusian"},{value:"bg",label:"Bulgarian"},{value:"my",label:"Burmese"},{value:"bn",label:"Bengali"},{value:"ca",label:"Catalan"},{value:"zh-cn",label:"Chinese (simplified)"},{value:"zh-tw",label:"Chinese (traditional)"},{value:"hr",label:"Croatian"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"nl",label:"Dutch"},{value:"en",label:"English"},{value:"en-au",label:"English (australian)"},{value:"en-gb",label:"English (great Britain)"},{value:"fa",label:"Farsi"},{value:"fi",label:"Finnish"},{value:"fil",label:"Filipino"},{value:"fr",label:"French"},{value:"gl",label:"Galician"},{value:"de",label:"German"},{value:"el",label:"Greek"},{value:"gu",label:"Gujarati"},{value:"iw",label:"Hebrew"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"id",label:"Indonesian"},{value:"it",label:"Italian"},{value:"ja",label:"Japanese"},{value:"kn",label:"Kannada"},{value:"kk",label:"Kazakh"},{value:"ko",label:"Korean"},{value:"ky",label:"Kyrgyz"},{value:"lt",label:"Lithuanian"},{value:"lv",label:"Latvian"},{value:"mk",label:"Macedonian"},{value:"ml",label:"Malayalam"},{value:"mr",label:"Marathi"},{value:"no",label:"Norwegian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"pt-br",label:"Portuguese (brazil)"},{value:"pt-pt",label:"Portuguese (portugal)"},{value:"pa",label:"Punjabi"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sr",label:"Serbian"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"es",label:"Spanish"},{value:"sv",label:"Swedish"},{value:"tl",label:"Tagalog"},{value:"ta",label:"Tamil"},{value:"te",label:"Telugu"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"uz",label:"Uzbek"},{value:"vi",label:"Vietnamese"}],this.language=e.language,this.markerImages=d.markerImages,this.markersByField=e.markersByField,this.markerField=e.markerField,this.markersByFieldEnabled=d.parseBoolean(e.markersByFieldEnabled);else if("search"==this.type)this.searchFallback=d.parseBoolean(e.searchFallback),this.placeholder=e.placeholder||"Search",this.noResultsText=e.noResultsText||"No results found",this.width=a.formBuilder.filtersHide&&!a.formBuilder.modal?null:e.width||"100%";else if("distance"==this.type){this.label=this.label||(void 0===e.label?"Search radius":e.label),this.distanceControl=e.distanceControl||"select",this.distanceUnits=e.distanceUnits||"km",this.distanceUnitsLabel=e.distanceUnitsLabel||"km",this.fromLabel=e.fromLabel||"from",this.placeholder=e.placeholder,this.userLocationButton=e.userLocationButton||!1,this.type=e.type,this.addressField=e.addressField||!0,this.addressFieldPlaceholder=e.addressFieldPlaceholder||"Address",this.languages=[{value:"sq",label:"Albanian"},{value:"ar",label:"Arabic"},{value:"eu",label:"Basque"},{value:"be",label:"Belarusian"},{value:"bg",label:"Bulgarian"},{value:"my",label:"Burmese"},{value:"bn",label:"Bengali"},{value:"ca",label:"Catalan"},{value:"zh-cn",label:"Chinese (simplified)"},{value:"zh-tw",label:"Chinese (traditional)"},{value:"hr",label:"Croatian"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"nl",label:"Dutch"},{value:"en",label:"English"},{value:"en-au",label:"English (australian)"},{value:"en-gb",label:"English (great Britain)"},{value:"fa",label:"Farsi"},{value:"fi",label:"Finnish"},{value:"fil",label:"Filipino"},{value:"fr",label:"French"},{value:"gl",label:"Galician"},{value:"de",label:"German"},{value:"el",label:"Greek"},{value:"gu",label:"Gujarati"},{value:"iw",label:"Hebrew"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"id",label:"Indonesian"},{value:"it",label:"Italian"},{value:"ja",label:"Japanese"},{value:"kn",label:"Kannada"},{value:"kk",label:"Kazakh"},{value:"ko",label:"Korean"},{value:"ky",label:"Kyrgyz"},{value:"lt",label:"Lithuanian"},{value:"lv",label:"Latvian"},{value:"mk",label:"Macedonian"},{value:"ml",label:"Malayalam"},{value:"mr",label:"Marathi"},{value:"no",label:"Norwegian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"pt-br",label:"Portuguese (brazil)"},{value:"pt-pt",label:"Portuguese (portugal)"},{value:"pa",label:"Punjabi"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sr",label:"Serbian"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"es",label:"Spanish"},{value:"sv",label:"Swedish"},{value:"tl",label:"Tagalog"},{value:"ta",label:"Tamil"},{value:"te",label:"Telugu"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"uz",label:"Uzbek"},{value:"vi",label:"Vietnamese"}],this.countries=d.countries,this.country=e.country,this.language=e.language,this.searchByZip=e.searchByZip,this.zipLength=e.zipLength||5,this.userLocationButton=d.parseBoolean(e.userLocationButton),this.options=e.options||[{value:"10",default:!0},{value:"30",default:!1},{value:"50",default:!1},{value:"100",default:!1}];var i=!1;a.value&&this.options.forEach(function(e){e.value===a.value.length&&(e.selected=!0,i=!0)}),i||this.options.forEach(function(e){e.default&&(e.selected=!0)})}else"post"==this.type?(a.formBuilder.admin&&(this.post_types=this.formBuilder.admin.getPostTypes()),this.post_type=e.post_type||this.post_types[0],this.add_fields=d.parseBoolean(e.add_fields),this.db_type="int(11)",this.name="post_id",this.post_id=e.post_id,this.post=e.post):"checkbox"==this.type?(this.db_type="tinyint(1)",this.checkboxLabel=e.checkboxLabel,this.checkboxValue=e.checkboxValue):"checkboxes"==this.type?(this.db_type="text",this.checkboxLabel=e.checkboxLabel,this.options=e.options||[{label:"Option one",name:"option_one",value:1},{label:"Option two",name:"option_two",value:2}],this.optionsDict=e.optionsDict||{},this.optionsDict||this.options.forEach(function(e){a.optionsDict[e.value]=e.label})):"radio"==this.type||"select"==this.type?(this.options=e.options||[{label:"Option one",name:"option_one",value:1},{label:"Option two",name:"option_two",value:2}],"select"==this.type&&(this.multiselect=e.multiselect,this.optionsGrouped=e.optionsGrouped,this.db_type=this.multiselect?"text":"varchar(255)"),this.optionsDict=e.optionsDict||{},this.optionsDict||this.options.forEach(function(e){a.optionsDict[e.value]=e.label})):"image"==this.type?(this.button_text=e.button_text||"Browse...",this.db_type="text",this.label=e.label||"Images",this.name=e.name||"images"):"status"==this.type?(this.label=e.label||"Status",this.name="status",this.options=e.options||[{label:"Enabled",value:1,color:"",disabled:!1},{label:"Disabled",value:0,color:"",disabled:!0}]):"date"==this.type&&(a.formBuilder.admin&&(this.languages=["en-GB","ar","az","bg","bs","ca","cs","cy","da","de","el","es","et","eu","fa","fi","fo","fr","gl","he","hr","hu","hy","id","is","it","ja","ka","kh","kk","kr","lt","lv","mk","ms","nb","nl","nl-BE","no","pl","pt-BR","pt","ro","rs","rs-latin","ru","sk","sl","sq","sr","sr-latin","sv","sw","th","tr","uk","vi","zh-CN","zh-TW"]),this.db_type="varchar(50)",this.language=e.language);this.label=this.label||(void 0===e.label?"Label":e.label),this.name=this.name||e.name||"label",this.help=e.help||"",this.placeholder=e.placeholder;var s=this.type;if("marker"===s&&a.formBuilder.mapsvg.isGeo()&&(s="marker-geo"),"location"===s&&a.formBuilder.mapsvg.isGeo()&&(s="location-geo"),this.formBuilder.filtersMode?(this.parameterName=e.parameterName||"",this.parameterNameShort=this.parameterName.split(".")[1],this.placeholder=e.placeholder||"",this.templates={result:Handlebars.compile(c("#mapsvg-filters-tmpl-"+s+"-view").html())}):this.templates={result:Handlebars.compile(c("#mapsvg-data-tmpl-"+s+"-view").html())},this.views={result:c(this.templates.result(this.get()))},this.views.result.data("formElement",this),c().mselect2)if("distance"!==this.type){var l={};this.formBuilder.filtersMode&&"select"==this.type&&(l.placeholder=this.placeholder,this.multiselect||(l.allowClear=!0)),this.views.result.find("select").css({width:"100%",display:"block"}).mselect2(l).on("select2:focus",function(){c(this).mselect2("open")}),this.views.result.find(".select2-selection--multiple .select2-search__field").css("width","100%")}else this.views.result.find("select").mselect2().on("select2:focus",function(){c(this).mselect2("open")});if(c().colorpicker&&(this.views.result.find(".cpicker").colorpicker().on("changeColor.colorpicker",function(e){""==c(this).find("input").val()&&c(this).find("i").css({"background-color":""})}),this.views.edit&&this.views.edit.find(".cpicker").colorpicker().on("changeColor.colorpicker",function(e){""==c(this).find("input").val()&&c(this).find("i").css({"background-color":""})})),this.html){var r=this.views.result.find("textarea")[0];this.editor=CodeMirror.fromTextArea(r,{mode:{name:"handlebars",base
5:"text/html"},matchBrackets:!0,lineNumbers:!0}),a.formBuilder.admin&&this.editor.on("change",this.setTextareaValue)}"image"==this.type&&(this.images=this.value||[],this.redrawImages()),"marker"!=this.type&&"location"!=this.type||(this.templates.marker=Handlebars.compile(c("#mapsvg-data-tmpl-marker").html()),this.location&&this.location.marker&&a.renderMarker()),this.setEventHandlers()}d.parseBoolean=function(e){switch(String(e).toLowerCase()){case"on":case"true":case"1":case"yes":case"y":return!0;case"off":case"false":case"0":case"no":case"n":return!1;default:return}},i.prototype.setTextareaValue=function(e,t){var a=e.getValue();c(e.getTextArea()).val(a).trigger("change")},i.prototype.setEventHandlers=function(){var o=this;if(this.formBuilder.editMode)this.views.result.on("click",function(){o.formBuilder.edit(o)});else{if("image"==this.type){var e=o.views.result.find(".mapsvg-data-images");this.formBuilder.mediaUploader.on("select",function(){if(o.formBuilder.mediaUploaderFor!==o)return!1;o.formBuilder.mediaUploader.state().get("selection").toJSON().forEach(function(e){var t={sizes:{}};for(var a in e.sizes)t[a]=e.sizes[a].url.replace("http://","//").replace("https://","//"),t.sizes[a]={width:e.sizes[a].width,height:e.sizes[a].height};t.thumbnail||(t.thumbnail=t.full,t.sizes.thumbnail={width:e.sizes.full.width,height:e.sizes.full.height}),t.medium||(t.medium=t.full,t.sizes.medium={width:e.sizes.full.width,height:e.sizes.full.height}),t.caption=e.caption,t.description=e.description,o.images.push(t)}),o.redrawImages()}),o.views.result.on("click",".mapsvg-upload-image",function(e){e.preventDefault(),(o.formBuilder.mediaUploaderFor=o).formBuilder.mediaUploader.open()}),o.views.result.on("click",".mapsvg-image-delete",function(e){e.preventDefault(),c(this).closest(".mapsvg-thumbnail-wrap").remove(),o.images=[],o.views.result.find("img").each(function(e,t){o.images.push(c(t).data("image"))}),o.views.result.find("input").val(JSON.stringify(o.images))}),o.sortable=new Sortable(e[0],{animation:150,onStart:function(){o.elements.containers.form_view.addClass("sorting")},onEnd:function(e){o.images=[],o.views.result.find("img").each(function(e,t){o.images.push(c(t).data("image"))}),o.views.result.find("input").val(JSON.stringify(o.images))}})}if("post"==this.type){o.views.result.find(".mapsvg-find-post").mselect2({placeholder:"Search post by title",allowClear:!0,ajax:{url:ajaxurl+"?action=mapsvg_search_posts&post_type="+o.post_type,dataType:"json",delay:250,data:function(e){return{query:e.term,page:e.page}},processResults:function(e,t){return t.page=t.page||1,{results:e,pagination:{more:!1}}},cache:!0},escapeMarkup:function(e){return e},minimumInputLength:1,templateResult:function(e){return e.loading?e.text:"<div class='select2-result-repository clearfix'>"+e.post_title+"</div>"},templateSelection:function(e){return e.post_title||e.text}}).on("select2:select",function(e){o.post=e.params.data,o.views.result.find(".mapsvg-post-id").text(o.post.ID),o.views.result.find(".mapsvg-post-url").text(o.post.url).attr("href",o.post.url),o.views.result.find('input[name="post_id"]').val(o.post.ID)}).on("change",function(e){""===e.target.value&&(o.views.result.find(".mapsvg-post-id").text(""),o.views.result.find(".mapsvg-post-url").text(""),o.views.result.find('input[name="post_id"]').val(""))})}if("location"===this.type){if(o.formBuilder.mapsvg.isGeo()){var a=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("formatted_address"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:{url:ajaxurl+"?action=mapsvg_geocoding&address=%QUERY%&language="+this.language,wildcard:"%QUERY%",transform:function(e){return e.error_message&&alert(e.error_message),e.results},rateLimitWait:600}});(n=this.views.result.find(".typeahead")).typeahead({minLength:3},{name:"mapsvg-addresses",display:"formatted_address",source:a});n.on("typeahead:select",function(e,t){o.location&&o.location.marker&&o.deleteMarker();var a={};a.formatted=t.formatted_address,t.address_components.forEach(function(e){var t=e.types[0];a[t]=e.long_name,e.short_name!=e.long_name&&(a[t+"_short"]=e.short_name)});var i={address:a,lat:t.geometry.location.lat,lng:t.geometry.location.lng,img:o.formBuilder.mapsvg.getMarkerImage(o.formBuilder.getData())};o.location=new d.Location(i,o.formBuilder.mapsvg),o.formBuilder.location=this.location;var s=new d.Marker({location:o.location,mapsvg:o.formBuilder.mapsvg});o.location.marker=s,o.formBuilder.mapsvg.markerAdd(o.location.marker),o.formBuilder.mapsvg.setEditingMarker(s),o.formBuilder.marker=s.getOptions(),o.renderMarker();var l=o.formBuilder.view.find('select[name="regions"]');if(-1!==o.formBuilder.mapsvg.getData().options.source.indexOf("/geo-calibrated/us
5a.svg"))0!==l.length&&o.location.address.state_short&&(l.val(["US-"+o.location.address.state_short]),l.trigger("change"));else if(-1!==o.formBuilder.mapsvg.getData().options.source.indexOf("/geo-calibrated/world.svg"))0!==l.length&&o.location.address.country_short&&(l.val([o.location.address.country_short]),l.trigger("change"));else if(0!==l.length&&o.location.address.administrative_area_level_1){var r=o.formBuilder.mapsvg.getData().regions.filter(function(e){return e.title===o.location.address.administrative_area_level_1||e.title===o.location.address.administrative_area_level_2||e.id===o.location.address.country_short+"-"+o.location.address.administrative_area_level_1_short});0<r.length&&(r=r[0],l.val([r.id]),l.trigger("change"))}n.typeahead("val","")})}o.views.result.on("click",".mapsvg-marker-image-btn-trigger",function(e){c(this).toggleClass("active"),o.toggleMarkerSelector.call(o,c(this),e)}),o.views.result.on("click",".mapsvg-marker-delete",function(e){e.preventDefault(),o.deleteMarker()})}if("select"===this.type||"radio"===this.type){var i=o.formBuilder.mapsvg.database.getSchemaField("location");i&&i.markersByFieldEnabled&&i.markerField&&this.name==i.markerField&&0<Object.values(i.markersByField).length&&o.views.result.on("change","select",function(e){var t=i.markersByField[c(this).val()];t&&(o.formBuilder.marker&&(o.formBuilder.mapsvg.getMarker(o.formBuilder.marker.id).setImage(t),o.views.result.closest(".mapsvg-form-builder").find(".mapsvg-marker-image-btn img").attr("src",t)))})}if("distance"===this.type){if(o.formBuilder.mapsvg.isGeo()){a=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("formatted_address"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:{url:ajaxurl+"?action=mapsvg_geocoding&address="+(!0===this.searchByZip?"zip%20":"")+"%QUERY%&language="+this.language+(this.country?"&country="+this.country:""),wildcard:"%QUERY%",transform:function(e){return e.error_message&&alert(e.error_message),e.results},rateLimitWait:600}});var n=this.views.result.find(".typeahead");if(this.searchByZip)this.views.result.find(".mapsvg-distance-fields").addClass("search-by-zip"),n.on("change keyup",function(){c(this).val().length===parseInt(o.zipLength)&&a.search(c(this).val(),null,function(e){if(e&&e[0]){var t=e[0].geometry.location;o.formBuilder.view.find('[name="distanceLatLng"]').val(t.lat+","+t.lng).trigger("change")}})});else{n.typeahead({minLength:3},{name:"mapsvg-addresses",display:"formatted_address",source:a,limit:5});this.views.result.find(".mapsvg-distance-fields").removeClass("search-by-zip")}if(o.userLocationButton)this.views.result.find(".user-location-button").on("click",function(){o.formBuilder.mapsvg.showUserLocation(function(t){a.search(t.lat+","+t.lng,null,function(e){e&&e[0]?n.val(e[0].formatted_address):n.val(t.lat+","+t.lng)}),o.formBuilder.view.find('[name="distanceLatLng"]').val(t.lat+","+t.lng).trigger("change")})});n.on("change keyup",function(){""===c(this).val()&&o.formBuilder.view.find('[name="distanceLatLng"]').val("").trigger("change")}),n.on("typeahead:select",function(e,t){t.formatted_address;var a=t.geometry.location;o.formBuilder.view.find('[name="distanceLatLng"]').val(a.lat+","+a.lng).trigger("change"),n.blur()})}o.views.result.on("click",".mapsvg-marker-image-btn-trigger",function(e){c(this).toggleClass("active"),o.toggleMarkerSelector.call(o,c(this),e)}),o.views.result.on("click",".mapsvg-marker-delete",function(e){e.preventDefault(),o.deleteMarker()})}}},i.prototype.toggleMarkerSelector=function(e,t){t.preventDefault();var a=this;if(a.markerSelector&&a.markerSelector.is(":visible"))a.markerSelector.hide();else if(a.markerSelector&&a.markerSelector.not(":visible"))a.markerSelector.show();else{a.markerImageButton=e.find("img");var i=a.markerImageButton.attr("src"),s=d.markerImages.map(function(e){return'<button class="btn btn-default mapsvg-marker-image-btn mapsvg-marker-image-btn-choose '+(i==e.url?"active":"")+'"><img src="'+e.url+'" /></button>'});a.markerSelector||(a.markerSelector=a.views.result.find(".mapsvg-marker-image-selector")),a.markerSelector&&a.markerSelector.empty(),a.formBuilder.markerSelector=a.markerSelector,a.formBuilder.marker?a.markerSelector.data("marker",a.formBuilder.marker):a.markerSelector.data("marker",null),a.markerSelector.html(s.join("")),a.markerSelector.on("click",".mapsvg-marker-image-btn-choose",function(e){e.preventDefault();var t=c(this).find("img").attr("src");a.formBuilder.marker&&a.formBuilder.mapsvg.getMarker(a.formBuilder.marker.id).setImage(t);a.markerSelector.hide(),a.views.result.find(".mapsvg-marker-image-btn-trigger").toggleClass("active",!1),a.markerImageButton.attr("src",t)})}},i.prototype.toggleMarkerSelectorInLocationEditor=function(l,e){e.preventDefault();var r=this;if(l.data("markerSelector")&&l.data("markerSelector").is(":visible"))l.data("markerSelector").hide();else if(l.data("markerSelector")&&l.data("markerSelector").not(":visible"))l.data("markerSelector").show();else{var t=c(this).closest("td").find(".mapsvg-marker-image-btn-trigger").attr("src"),a=d.markerImages.map(function(e){return'<button class="btn btn-default mapsvg-marker-image-btn mapsvg-marker-image-btn-choose '+(t==e.url?"active":"")+'"><img src="'+e.url+'" /></button>'});if(l.data("markerSelector"))l.data("markerSelector").empty();else{var i=c('<div class="mapsvg-marker-image-selector"></div>');l.closest("td").append(i),l.data("markerSelector",i)}l.data("markerSelector").html(a.join("")),l.data("markerSelector").on("click",".mapsvg-marker-image-btn-choose",function(e){e.preventDefault();var t=c(this).find("img").attr("src");l.data("markerSelector").hide();var a=c(this).closest("td"),i=c(this).closest("tr").data("option-id"),s=a.find(".mapsvg-marker-image-btn-trigger");s.toggleClass("active",!1),s.find("img").attr("src",t),r.setMarkerByField(i,t)})}},i.prototype.setMarkerByField=function(e,t){this.markersByField=this.markersByField||{},this.markersByField[e]=t},i.prototype.deleteMarker=function(){this.formBuilder.backupData=this.formBuilder.backupData||{},this.formBuilder.backupData.location=this.location,this.formBuilder.backupData.marker=this.marker,this.location=null,this.marker=null,this.formBuilder.marker&&(this.formBuilder.mapsvg.getMarker(this.formBuilder.marker.id).delete(),this.formBuilder.mapsvg.editingMarker=null),this.views.result.find(".mapsvg-new-marker").hide(),this.views.result.find(".mapsvg-marker-id").attr("disabled","disabled")},i.prototype.renderMarker=function(e){var t=this;if(!(this.location||e&&e.location))return!1;e&&e.location&&(this.location=e.location),t.views.result.find(".mapsvg-new-marker").show().html(this.templates.marker(this.location)),this.location.marker.onChange=function(){t.renderMarker()}},i.prototype.redrawImages=function(){var i=this.views.result.find(".mapsvg-data-images");
5i.empty(),this.images&&this.images.forEach(function(e){var t=c('<img class="mapsvg-data-thumbnail" />').attr("src",e.thumbnail).data("image",e),a=c('<div class="mapsvg-thumbnail-wrap"></div>').data("image",e);a.append(t),a.append('<i class="fa fa-times  mapsvg-image-delete"></i>'),i.append(a)}),this.views.result.find("input").val(JSON.stringify(this.images))},i.prototype.setEditorEventHandlers=function(){var r=this;this.views.edit.on("click","button.mapsvg-remove",function(){r.views.result.empty().remove(),r.views.edit.empty().remove(),r.formBuilder.delete(r)}).on("keyup change paste",".mapsvg-edit-status-row input",function(){r.mayBeAddStatusRow()}).on("keyup change paste",".mapsvg-edit-distance-row input",function(){r.mayBeAddDistanceRow()});var a=c("#marker-file-uploader").closest(".form-group").find(".mapsvg-marker-image-selector"),i=c("#marker-file-uploader").closest(".btn-file");this.views.edit.on("change","#marker-file-uploader",function(){i=c(this).closest(".btn-file")._button("loading");for(var e=0;e<this.files.length;e++){var t=new FormData;t.append("file",this.files[0]),t.append("action","mapsvg_marker_upload"),t.append("_wpnonce",d.nonce),c.ajax({url:ajaxurl,type:"POST",data:t,processData:!1,contentType:!1}).done(function(e){if((e=JSON.parse(e)).error)alert(e.error);else{var t='<button class="btn btn-default mapsvg-marker-image-btn mapsvg-marker-image-btn-choose"><img src="'+e.url+'" /></button>';c(t).appendTo(a),d.markerImages.push(e)}}).always(function(){i._button("reset")})}}),this.views.edit.on("change",'select[name="markerField"]',function(){var e=c(this).val();r.fillMarkersByFieldOptions(e)}),r.views.edit.on("click",".mapsvg-marker-image-btn-trigger",function(e){c(this).toggleClass("active"),r.toggleMarkerSelectorInLocationEditor.call(r,c(this),e)}),this.views.edit.on("click",".mapsvg-filter-insert-options",function(){var e,t,a=r.parameterName.split(".")[0],i=r.parameterName.split(".")[1];(e="Object"==a?r.formBuilder.mapsvg.database.getSchemaField(i):"id"==i?{options:r.formBuilder.mapsvg.getData().regions.map(function(e){return{label:e.id,value:e.id}})}:"region_title"==i?{options:r.formBuilder.mapsvg.getData().regions.map(function(e){return{label:e.title,value:e.title}})}:r.formBuilder.mapsvg.regionsDatabase.getSchemaField(i))&&e.options&&(t="regions"==i?(e.options[0].title&&e.options[0].title.length&&e.options.sort(function(e,t){return e.title<t.title?-1:e.title>t.title?1:0}),e.options.map(function(e){return(e.title||e.id)+":"+e.id})):e.options.map(function(e){return e.label+":"+e.value}),c(this).closest(".form-group").find("textarea").val(t.join("\n")).trigger("change"))}),this.views.edit.on("keyup change paste","input, textarea, select",function(){var e=c(this).attr("name"),t=c(this).data("array");if("status"===r.type&&t){var a=c(this).data("param"),i=c(this).closest("tr").index();r.options[i]=r.options[i]||{label:"",value:"",color:"",disabled:!1},r.options[i][a]=c(this).is(":checkbox")?c(this).prop("checked"):c(this).val(),r.redraw()}else if("distance"===r.type&&t){a=c(this).data("param"),i=c(this).closest("tr").index();r.options[i]||(r.options[i]={value:"",default:!1}),"default"===a?(r.options.forEach(function(e,t){e.default=!1}),r.options[i].default=c(this).prop("checked")):r.options[i].value=c(this).val(),r.redraw()}else{if("label"==e||"name"==e)return!1;var s;if(s="checkbox"==c(this).attr("type")?c(this).prop("checked"):c(this).val(),"radio"==c(this).attr("type")){var l=c(this).attr("name");s=c('input[name="'+l+'"]:checked').val()}r.update(e,s)}}),this.views.edit.on("keyup change paste",'input[name="label"]',function(){if(!r.nameChanged){if(r.label=c(this).val(),"region"!=r.type&&"location"!=r.type){var e=c(this).val();e=e.toLowerCase().replace(/ /g,"_").replace(/\W/g,""),r.views.edit.find('input[name="name"]').val(e),r.name=e}r.views.result.find("label").first().html(r.label),r.formBuilder.filtersMode||r.views.result.find("label").first().append('<div class="field-name">'+r.name+"</div>")}}),this.views.edit.on("keyup change paste",'input[name="name"]',function(){this.value&&(this.value.match(/[^a-zA-Z0-9_]/g)&&(this.value=this.value.replace(/[^a-zA-Z0-9_]/g,""),c(this).trigger("change")),this.value[0].match(/[^a-zA-Z_]/g)&&(this.value=this.value[0].replace(/[^a-zA-Z_]/g,"")+this.value.slice(1),c(this).trigger("change"))),"region"!=r.type&&(r.name=this.value),r.views.result.find("label").html(r.label+'<div class="field-name">'+r.name+"</div>"),r.nameChanged=!0})},i.prototype.fillMarkersByFieldOptions=function(e){var a=this,t=a.formBuilder.mapsvg.database.getSchemaField(e);if(t){var i=a.formBuilder.mapsvg.getData().options.defaultMarkerImage,s=t.options.map(function(e){var t=a.markersByField&&a.markersByField[e.value]?a.markersByField[e.value]:i;return'<tr data-option-id="'+e.value+'"><td>'+e.label+'</td><td><button class="btn btn-default mapsvg-marker-image-btn-trigger mapsvg-marker-image-btn"><img src="'+t+'" class="new-marker-img" style="margin-right: 4px;"/><span class="caret"></span></button></td></tr>'});c("#markers-by-field").empty().append(s)}},i.prototype.getEditor=function(){return this.formBuilder.filtersMode?this.templates.edit=this.templates.edit||Handlebars.compile(c("#mapsvg-filters-tmpl-"+this.t
5ype+"-control").html()):this.templates.edit=this.templates.edit||Handlebars.compile(c("#mapsvg-data-tmpl-"+this.type+"-control").html()),this.views.edit=c(this.templates.edit(this.get())),this.views.edit},i.prototype.destroyEditor=function(){this.views.edit.empty().remove()},i.prototype.initEditor=function(){var i=this;this.views.edit.find("input").first().select(),c().mselect2&&("distance"!==this.type?this.views.edit.find("select").css({width:"100%",display:"block"}).mselect2():this.views.edit.find("select").mselect2()),"status"==this.type&&(i.views.edit.find(".cpicker").colorpicker().on("changeColor.colorpicker",function(e){var t=c(this).find("input"),a=c(this).closest("tr").index();""==t.val()&&c(this).find("i").css({"background-color":""}),i.options[a]=i.options[a]||{label:"",value:"",color:"",disabled:!1},i.options[a].color=t.val()}),i.mayBeAddStatusRow()),"distance"===this.type&&i.mayBeAddDistanceRow(),"location"===this.type&&i.fillMarkersByFieldOptions(i.markerField),this.views.edit.find(".mapsvg-onoff").bootstrapToggle({onstyle:"default",offstyle:"default"}),this.setEditorEventHandlers()},i.prototype.mayBeAddStatusRow=function(){var i=this;this.templates.editStatusRow=this.templates.editStatusRow||c(c("#mapsvg-edit-status-row").html());var e=i.views.edit.find(".mapsvg-edit-status-label:last-child");if(e&&e.last()&&e.last().val()&&e.last().val().trim().length){var t=this.templates.editStatusRow.clone();t.insertAfter(i.views.edit.find(".mapsvg-edit-status-row:last-child")),t.find(".cpicker").colorpicker().on("changeColor.colorpicker",function(e){var t=c(this).find("input"),a=c(this).closest("tr").index();""==t.val()&&c(this).find("i").css({"background-color":""}),i.options[a]=i.options[a]||{label:"",value:"",color:"",disabled:!1},i.options[a].color=t.val()})}var a=i.views.edit.find(".mapsvg-edit-status-row"),s=a.eq(a.length-2),l=a.eq(a.length-1);s.length&&l.length&&!(s.find("input:eq(0)").val().trim()||s.find("input:eq(1)").val().trim()||s.find("input:eq(2)").val().trim())&&!(l.find("input:eq(0)").val().trim()||l.find("input:eq(1)").val().trim()||l.find("input:eq(2)").val().trim())&&l.remove()},i.prototype.mayBeAddDistanceRow=function(){this.templates.editDistanceRow=this.templates.editDistanceRow||c(c("#mapsvg-edit-distance-row").html());var e=this.views.edit.find(".mapsvg-edit-distance-row:last-child input");e&&e.last()&&e.last().val()&&e.last().val().trim().length&&this.templates.editDistanceRow.clone().insertAfter(this.views.edit.find(".mapsvg-edit-distance-row:last-child"));var t=this.views.edit.find(".mapsvg-edit-distance-row"),a=t.eq(t.length-2),i=t.eq(t.length-1);a.length&&i.length&&!a.find("input:eq(0)").val().trim()&&!i.find("input:eq(0)").val().trim()&&i.remove()},i.prototype.getSchema=function(){var t=this,a={type:this.type,db_type:this.db_type,label:this.label,name:this.name,value:this.value,searchable:d.parseBoolean(this.searchable)};if("select"==this.type&&(a.multiselect=d.parseBoolean(this.multiselect),a.multiselect&&(a.db_type="text"),a.optionsGrouped=this.optionsGrouped),this.options){var e=c.extend(!0,{},{options:this.options});a.options=e.options,a.optionsDict={},"region"==a.type?a.options.forEach(function(e){a.optionsDict[e.id]=e.title||e.id}):"status"==t.type?a.options.forEach(function(e,t){""===a.options[t].value?a.options.splice(t,1):(a.options[t].disabled=d.parseBoolean(a.options[t].disabled),a.optionsDict[e.value]=e)}):"distance"==t.type?a.options.forEach(function(e,t){""===a.options[t].value?a.options.splice(t,1):a.options[t].default=d.parseBoolean(a.options[t].default)}):a.options.forEach(function(e){a.optionsDict[e.value]="status"==t.type?e:e.label})}return this.help&&(a.help=this.help),this.button_text&&(a.button_text=this.button_text),"post"==this.type&&(a.post_type=this.post_type,a.add_fields=this.add_fields),"date"==this.type&&(a.language=this.language),"location"==this.type&&(a.language=this.language,a.markersByField=this.markersByField,a.markerField=this.markerField,a.markersByFieldEnabled=d.parseBoolean(this.markersByFieldEnabled)),"textarea"==this.type&&(a.autobr=this.autobr,a.html=this.html),"text"==this.type&&(a.searchType=this.searchType),"modal"==this.type&&(a.showButtonText=this.showButtonText),"distance"==this.type&&(a.distanceControl=this.distanceControl,a.distanceUnits=this.distanceUnits,a.distanceUnitsLabel=this.distanceUnitsLabel,a.fromLabel=this.fromLabel,a.addressField=this.addressField,a.addressFieldPlaceholder=this.addressFieldPlaceholder,a.userLocationButton=this.userLocationButton,a.placeholder=this.placeholder,a.language=this.language,a.country=this.country,a.searchByZip=this.searchByZip,a.zipLength=this.zipLength,a.userLocationButton=d.parseBoolean(this.userLocationButton),"none"===a.distanceControl&&(a.distanceDefault=a.options.filter(function(e){return e.default})[0].value)),"search"==this.type&&(a.searchFallback=d.parseBoolean(this.searchFallback),a.placeholder=this.placeholder,a.noResultsText=this.noResultsText,a.width=this.width),this.checkboxLabel&&(a.checkboxLabel=this.checkboxLabel),this.checkboxValue&&(a.checkboxValue=this.checkboxValue),this.formBuilder.filtersMode&&(a.parameterName=this.parameterName,a.parameterNameShort=this.parameterName.split(".")[1],a.placeholder=this.placeholder),a.visible=void 0===this.visible||this.visible,a},i.prototype.get=function(){var e=this.getSchema();if(e._name=e.name,this.formBuilder.namespace){e.name=this.name.split("[")[0];var t=this.name.split("[")[1]||"";t&&(t="["+t),e.name=this.formBuilder.namespace+"["+e.name+"]"+t}if("post"==this.type&&(this.formBuilder.admin&&(e.post_types=this.formBuilder.admin.getPostTypes()),e.post_type=this.post_type,e.post=this.post,e.add_fields=this.add_fields||0),"date"==this.type&&(this.formBuilder.admin&&(e.languages=this.languages),e.language=this.language),"distance"==this.type&&(this.formBuilder.admin&&(e.languages=this.languages,e.countries=this.countries),e.language=this.language,e.country=this.country,e.searchByZip=this.searchByZip,e.zipLength=this.zipLength,e.userLocationButton=d.parseBoolean(this.userLocationButton)),"location"==this.type){if(this.formBuilder.admin){e.languages=this.languages,e.markerImages=d.markerImages,e.markersByField=this.markersByField,e.markerField=this.markerField,e.markersByFieldEnabled=d.parseBoolean(this.markersByFieldEnabled);var a=this;
5e.markerImages.forEach(function(e){e.url===a.formBuilder.mapsvg.getData().options.defaultMarkerImage?e.default=!0:e.default=!1})}e.language=this.language,this.location&&(e.location=this.location,this.location.marker&&(e.location.img=(0===this.location.marker.src.indexOf(d.urls.uploads)?"uploads/":"")+this.location.marker.src.split("/").pop()))}return"textarea"==this.type&&(e.html=this.html),e.databaseFields=this.databaseFields,e.databaseFieldsFilterableShort=this.databaseFieldsFilterableShort,e.regionFields=this.regionFields,e.placeholder=this.placeholder,e},i.prototype.update=function(e,t){var a=this;if("options"==e){var i=[];t=t.split("\n").forEach(function(e){e=e.trim().split(":"),"checkbox"==a.type&&3==e.length?i.push({label:e[0],name:e[1],value:e[2]}):"radio"!=a.type&&"select"!=a.type&&"checkboxes"!=a.type||2!=e.length||i.push({label:e[0],value:e[1]})}),this.options=i}else this[e]=t;"parameterName"==e&&this.views.edit.find(".mapsvg-filter-param-name").text(t),this.redraw()},i.prototype.redraw=function(){var e=c(this.templates.result(this.get()));this.views.result.html(e.html()),c().mselect2&&("distance"!==this.type?this.views.result.find("select").css({width:"100%",display:"block"}).mselect2().on("select2:focus",function(){c(this).mselect2("open")}):this.views.result.find("select").mselect2().on("select2:focus",function(){c(this).mselect2("open")})),c().colorpicker&&this.views.edit&&this.views.edit.find(".cpicker").colorpicker().on("changeColor.colorpicker",function(e){""==c(this).find("input").val()&&c(this).find("i").css({"background-color":""})})};var t=function(e){var t=this;this.container=e.container,this.namespace=e.namespace,this.mediaUploader=e.mediaUploader,this.schema=e.schema||[],this.editMode=null!=e.editMode&&e.editMode,this.filtersMode=null!=e.f
5iltersMode&&e.filtersMode,this.filtersHide=null!=e.filtersHide&&e.filtersHide,this.modal=null!=e.modal&&e.modal,this.admin=e.admin,this.mapsvg=e.mapsvg,this.data=e.data||{},this.eventHandlers=e.events,this.template="form-builder",this.closeOnSave=!0===e.closeOnSave,this.newRecord=!0===e.newRecord,this.types=e.types||["text","textarea","checkbox","radio","select","image","region","location","post","date"],this.templates={},this.elements={},this.view=c("<div />").addClass("mapsvg-form-builder"),this.editMode&&this.view.addClass("full-flex"),this.formControls=[],d.templatesLoaded[this.template]?this.init():c.get(d.urls.templates+t.template+".html?"+Math.random(),function(e){c(e).appendTo("body"),d.templatesLoaded[t.template]=!0,Handlebars.registerPartial("dataMarkerPartial",c("#mapsvg-data-tmpl-marker").html()),t.editMode&&Handlebars.registerPartial("markerByFieldPartial",c("#mapsvg-markers-by-field-tmpl-partial").html()),t.init()})};t.prototype.init=function(){var e=this;if(d.formBuilder=this,e.editMode){var t=Handlebars.compile(c("#mapsvg-form-editor-tmpl-ui").html());e.view.append(t({types:this.types})),e.view.addClass("edit")}else{var a=c('<div class="mapsvg-data-form-view"></div>');e.view.append(a),this.filtersMode||a.addClass("form-horizontal")}e.elements={buttons:{text:e.view.find("#mapsvg-data-btn-text"),textarea:e.view.find("#mapsvg-data-btn-textarea"),checkbox:e.view.find("#mapsvg-data-btn-checkbox"),radio:e.view.find("#mapsvg-data-btn-radio"),select:e.view.find("#mapsvg-data-btn-select"),image:e.view.find("#mapsvg-data-btn-image"),region:e.view.find("#mapsvg-data-btn-region"),marker:e.view.find("#mapsvg-data-btn-marker"),saveSchema:e.view.find("#mapsvg-data-btn-save-schema")},containers:{buttons_add:e.view.find("#mapsvg-data-buttons-add"),form_view:e.view.find(".mapsvg-data-form-view"),form_edit:e.view.find("#mapsvg-data-form-edit")}},e.redraw()},t.prototype.viewDidLoad=function(){_this.formControls.forEach(function(e){if(e.html){var t=e.views.result.find("textarea")[0];e.htmlEditor=CodeMirror.fromTextArea(t,{mode:{name:"handlebars",base:"text/html"},matchBrackets:!0,lineNumbers:!0})}})},t.prototype.setEventHandlers=function(){var u=this;c(e).off("keydown.form.mapsvg").on("keydown.form.mapsvg",function(e){d.formBuilder&&((e.metaKey||e.ctrlKey)&&13==e.keyCode?d.formBuilder.save():27==e.keyCode&&d.formBuilder.close())}),this.editMode?(this.view.on("click",".mapsvg-marker-image-selector button",function(e){e.preventDefault();var t=c(this).find("img").attr("src");c(this).parent().find("button").removeClass("active"),c(this).addClass("active"),u.mapsvg.setDefaultMarkerImage(t)}),this.view.on("click","#mapsvg-data-buttons-add button",function(e){e.preventDefault();var t=c(this).data("create");u.add({type:t})}),this.view.on("click","#mapsvg-data-btn-save-schema",function(e){e.preventDefault();var t=u.getSchema(),l={};u.formControls.forEach(function(e){l[e.name]=(l[e.name]||0)+1}),u.elements.containers.form_view.find(".form-group").removeClass("has-error");var r,o,n=[],d=["id","lat","lon","lng","location","location_lat","location_lon","location_lng","location_address","location_img","marker","marker_id","regions","region_id","post_id","post","post_title","post_url","keywords","status"],m={regions:"region",status:"status",post_id:"post",marker:"marker",location:"location"};u.formControls.forEach(function(e,t){var a=!1;if(!u.filtersMode)if(1<l[e.name])r||(r="Field names should be unique",n.push(r),a=!0);else if(0===e.name.length)o||(o="Field name can't be empty",n.push(o),a=!0);else if(-1!=d.indexOf(e.name)&&(!m[e.name]||m[e.name]&&m[e.name]!=e.type)){var i='Field name "'+e.name+'" is reserved, please set another name';n.push(i),a=!0}if(e.options&&"region"!=e.type&&"marker"!=e.type){var s=_.pluck(e.options,"value");s.length!=_.uniq(s).length&&(n.push('Check "Options" list - values should not repeat'),a=!0)}a&&e.views.result.addClass("has-error")}),0==n.length?u.eventHandlers.saveSchema&&u.eventHandlers.saveSchema(t):c.growl.error({title:"Errors",message:n.join("<br />")})}),setTimeout(function(){var e=u.elements.containers.form_view[0];u.sortable=new Sortable(e,{animation:150,onStart:function(){u.elements.containers.form_view.addClass("sorting")},onEnd:function(){setTimeout(function(){u.elements.containers.form_view.removeClass("sorting"),u.formControls=[],c(e).find(".form-group").each(function(e,t){u.formControls.push(c(t).data("formElement"))})},500)}})},1e3)):(u.view.on("click","button.btn-save",function(e){e.preventDefault(),u.save()}),u.view.on("click","button.btn-close",function(e){e.preventDefault(),u.close()})),new d.ResizeSensor(this.view[0],function(){u.scrollApi&&u.scrollApi.reinitialise()})},t.prototype.save=function(){var e=this;e.marker&&(e.marker.onChange=null,e.mapsvg.unsetEditingMarker());var t=e.getData();e.saved=!0,e.eventHandlers.save&&e.eventHandlers.save.call(e,t)},t.prototype.getData=function(){var a=this,e=a.toJSON(!0);
5return a.formControls.forEach(function(t){if("image"==t.type&&(e[t.name]=[],t.images&&t.images.length&&null!=t.images[0])){var i=[];t.views.result.find(".mapsvg-thumbnail-wrap").each(function(e,t){var a=c(t).data("image");i.push(a)}),t.images=i,e[t.name]=e[t.name].concat(t.images)}"location"==t.type&&(t.location?e[t.name]=t.location:e[t.name]=""),"post"==t.type&&(e.post=t.post),"region"==t.type&&(e.regions&&"object"==typeof e.regions&&e.regions.length?e.regions=e.regions.map(function(e){return{id:e,title:a.mapsvg.getRegion(e).title}}):e.regions=""),"select"==t.type&&t.multiselect&&e[t.name]&&e[t.name].length&&(e[t.name]=e[t.name].map(function(e){return{value:e,label:t.optionsDict[e]}}))}),null!=a.data.id&&(e.id=a.data.id),delete e.marker_id,e},t.prototype.getDataJSON=function(){var t=this,a=t.toJSON(!0);return t.formControls.forEach(function(e){if("image"==e.type&&(a[e.name]=[],e.images&&e.images.length&&null!=e.images[0])){var i=[];t.view.find(".mapsvg-thumbnail-wrap").each(function(e,t){var a=c(t).data("image");i.push(a)}),e.images=i,a[e.name]=a[e.name].concat(e.images)}"location"==e.type&&(a[e.name]=e.location)}),null!=t.data.id&&(a.id=t.data.id),a},t.prototype.redraw=function(e){var a=this;
5if(delete a.marker,a.container.empty(),a.elements.containers.form_view.empty(),a.formControls=[],a.data&&a.data.id&&a.add({type:"id",label:"ID",name:"id",value:a.data.id}),a.data&&a.data._title&&a.add({type:"title",label:"Title",name:"title",value:a.data._title}),a.schema&&a.schema.length&&a.schema.forEach(function(e){if(a.admin&&a.admin.isMetabox&&"post"==e.type);else{if(a.filtersMode?"distance"==e.type?e.value=a.data.distance?a.data.distance:void 0!==e.value?e.value:null:e.value=a.data[e.parameterNameShort]:e.value=a.data?a.data[e.name]:void 0!==e.value?e.value:null,"location"!=e.type||a.editMode?"post"==e.type&&(e.post=a.data.post):(e.value&&e.value.marker&&e.value.marker.id&&(a.marker=e.value.marker.getOptions(),a.mapsvg.setEditingMarker(e.value.marker)),a.admin&&a.admin.setMode&&a.admin.setMode("editMarkers"),a.admin&&a.admin.enableMarkersMode(!0),a.mapsvg.setMarkerEditHandler(function(){a.marker=this.getOptions(),a.mapsvg.setEditingMarker(this);var e=a.getData(),t=a.mapsvg.getMarkerImage(e);this.setImage(t),a.locationFormElement&&a.locationFormElement.renderMarker(a.mapsvg.getMarker(a.marker.id))})),a.filtersMode){if(!a.filtersHide||a.filtersHide&&a.modal&&"search"!==e.type||!a.modal&&"search"===e.type)var t=a.add(e)}else t=a.add(e);"location"==e.type&&(a.locationFormElement=t)}}),a.editMode||(0!=this.schema.length||a.filtersMode?a.admin&&!a.admin.isMetabox&&a.add({type:"save"}):a.add({type:"empty"}
5)),a.filtersMode&&a.filtersHide&&!a.modal&&(this.showFiltersButton=a.add({type:"modal",buttonText:a.mapsvg.getData().options.filters.showButtonText})),a.editMode||a.filtersMode)a.container.html(this.view);else{var t=c('<div class="nano"></div>'),i=c('<div class="nano-content"></div>');t.append(i),i.html(this.view),a.container.html(t),t.jScrollPane(),a.scrollApi=t.data("jsp")}a.eventHandlers.load&&a.eventHandlers.load(a),this.editMode||a.filtersMode||this.view.find("input:visible,textarea:visible").not(".tt-hint").first().focus(),this.container.find(".CodeMirror").each(function(e,t){t&&t.CodeMirror.refresh()}),a.setEventHandlers(),a.eventHandlers.init&&a.eventHandlers.init(a.data)},t.prototype.delete=function(a){var i=this;i.formControls.forEach(function(e,t){e===a&&(i.formControls.splice(t,1),i.structureChanged=!0)})},t.prototype.add=function(t){if(-1!=["region","marker","post","status","distance","location","search"].indexOf(t.type)){var a=!1;if(this.formControls.forEach(function(e){e.type==t.type&&(a=!0)}),a)return void c.growl.error({title:"Error",message:'You can add only 1 "'+d.ucfirst(t.type)+'" field'})}"date"==t.type&&(d.datepicker=d.datepicker||{});var e=new i(t,this);return this.formControls.push(e),this.elements.containers.form_view.append(e.views.result),this.editMode&&this.edit(e),e},t.prototype.edit=function(e){var t=this;t.currentlyEditing&&t.currentlyEditing.destroyEditor(),t.elements.containers.form_edit.append(e.getEditor()),e.initEditor(),t.currentlyEditing=e,t.elements.containers.form_view.find(".form-group.active").removeClass("active"),e.views.result.addClass("active")},t.prototype.get=function(){return this.formControls.map(function(e){return e.get()})},t.prototype.getSchema=function(){return this.formControls.map(function(e){return e.getSchema()})},t.prototype.close=function(){var e=this;if(!e.saved){if(null==e.data.id&&e.marker){var t=e.mapsvg.getMarker(e.marker.id);t.onChange=null,t.delete(),delete e.marker}if(this.backupData&&this.backupData.location&&(this.location=this.backupData.location,e.mapsvg.markerAdd(this.location.marker),e.mapsvg.setEditingMarker(this.location.marker)),e.marker){var a=e.mapsvg.getEditingMarker();a&&(a.setImage(e.marker.src),a.setXy([e.marker.x,e.marker.y]),e.mapsvg.unsetEditingMarker())}}if(e.markerSelector&&e.markerSelector.popover("destroy"),c().mselect2){var i=e.view.find(".mapsvg-select2");i.length&&i.mselect2("destroy")}var s=e.view.find(".CodeMirror");s.length&&s.empty().remove(),e.admin&&e.admin.enableMarkersMode(!1),d.formBuilder=null,e.eventHandlers.close&&e.eventHandlers.close()},t.prototype.destroy=function(){this.view.empty().remove(),this.sortable=null},t.prototype.on=function(e,t){this.eventHandlers[e]=t},t.prototype.toJSON=function(s){var t={};return this.elements.containers.form_view.find("input, textarea, select").each(function(){var e;c(this).data("skip")||c(this).prop("disabled")||!c(this).attr("name")||!s&&"checkbox"==c(this).attr("type")&&null==c(this).attr("checked")||"radio"==c(this).attr("type")&&!c(this).is(":checked")||(e="checkbox"==c(this).attr("type")?c(this).prop("checked"):c(this).val(),function e(t,a,i){if(!s&&!i)return!1;1==a.length?t[a[0]]=i:(null==t[a[0]]&&(""===a[1]?t[a[0]]=[]:t[a[0]]={}),void 0!==t[a[0]].length?t[a[0]].push(i):e(t[a[0]],a.slice(1),i))}(t,c(this).attr("name").replace(/]/g,"").split("["),e))}),t},t.prototype.getRegionsList=function(){return this.mapsvg.getData().regions.map(function(e){return{id:e.id,title:e.title}})},t.prototype.getMarkersList=function(){return this.mapsvg.getData().markers.map(function(e){return{id:e.id}})},d.FormBuilder=t}(jQuery,MapSVG,window);
6!function(e,n){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e.Bloodhound=n(t)}):"object"==typeof exports?module.exports=n(require("jquery")):e.Bloodhound=n(e.jQuery)}(this,function(f){var p=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:f.isArray,isFunction:f.isFunction,isObject:f.isPlainObject,isUndefined:function(t){return void 0===t},isElement:function(t){return!(!t||1!==t.nodeType)},isJQuery:function(t){return t instanceof f},toStr:function(t){return p.isUndefined(t)||null===t?"":t+""},bind:f.proxy,each:function(t,n){f.each(t,function(t,e){return n(e,t)})},map:f.map,filter:f.grep,every:function(n,i){var s=!0;return n?(f.each(n,function(t,e){if(!(s=i.call(null,e,t,n)))return!1}),!!s):s},some:function(n,i){var s=!1;return n?(f.each(n,function(t,e){if(s=i.call(null,e,t,n))return!1}),!!s):s},mixin:f.extend,identity:function(t){return t},clone:function(t){return f.extend(!0,{},t)},getIdGenerator:function(){var t=0;return function(){return t++}},templatify:function(t){return f.isFunction(t)?t:function(){return String(t)}},defer:function(t){setTimeout(t,0)},debounce:function(s,r,o){var a,u;return function(){var t,e,n=this,i=arguments;return t=function(){a=null,o||(u=s.apply(n,i))},e=o&&!a,clearTimeout(a),a=setTimeout(t,r),e&&(u=s.apply(n,i)),u}},throttle:function(n,i){var s,r,o,a,u,c;return u=0,c=function(){u=new Date,o=null,a=n.apply(s,r)},function(){var t=new Date,e=i-(t-u);return s=this,r=arguments,e<=0?(clearTimeout(o),o=null,u=t,a=n.apply(s,r)):o||(o=setTimeout(c,e)),a}},stringify:function(t){return p.isString(t)?t:JSON.stringify(t)},guid:function(){function t(t){var e=(Math.random().toString(16)+"000000000").substr(2,8);return t?"-"+e.substr(0,4)+"-"+e.substr(4,4):e}return"tt-"+t()+t(!0)+t(!0)+t()},noop:function(){}}}(),n=function(){"use strict";function t(t){return(t=p.toStr(t))?t.split(/\s+/):[]}function e(t){return(t=p.toStr(t))?t.split(/\W+/):[]}function n(t){t=p.toStr(t);var e=[],n="";return p.each(t.split(""),function(t){t.match(/\s+/)?n="":(e.push(n+t),n+=t)}),e}function i(i){return function(t){return t=p.isArray(t)?t:[].slice.call(arguments,0),function(e){var n=[];return p.each(t,function(t){n=n.concat(i(p.toStr(e[t])))}),n}}}return{nonword:e,whitespace:t,ngram:n,obj:{nonword:i(e),whitespace:i(t),ngram:i(n)}}}(),i=function(){"use strict";function t(t){this.maxSize=p.isNumber(t)?t:100,this.reset(),this.maxSize<=0&&(this.set=this.get=f.noop)}function e(){this.head=this.tail=null}function s(t,e){this.key=t,this.val=e,this.prev=this.next=null}return p.mixin(t.prototype,{set:function(t,e){var n,i=this.list.tail;this.size>=this.maxSize&&(this.list.remove(i),delete this.hash[i.key],this.size--),(n=this.hash[t])?(n.val=e,this.list.moveToFront(n)):(n=new s(t,e),this.list.add(n),this.hash[t]=n,this.size++)},get:function(t){var e=this.hash[t];if(e)return this.list.moveToFront(e),e.val},reset:function(){this.size=0,this.hash={},this.list=new e}}),p.mixin(e.prototype,{add:function(t){this.head&&(t.next=this.head,this.head.prev=t),this.head=t,this.tail=this.tail||t},remove:function(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev},moveToFront:function(t){this.remove(t),this.add(t)}}),t}(),e=function(){"use strict";function t(t,e){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+p.escapeRegExChars(this.prefix)),this.ls=e||r,!this.ls&&this._noop()}function i(){return(new Date).getTime()}function s(t){return JSON.stringify(p.isUndefined(t)?null:t)}function n(t){return f.parseJSON(t)}var r;try{(r=window.localStorage).setItem("~~~","!"),r.removeItem("~~~")}catch(t){r=null}return p.mixin(t.prototype,{_prefix:function(t){return this.prefix+t},_ttlKey:function(t){return this._prefix(t)+this.ttlKey},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=p.noop},_safeSet:function(t,e){try{this.ls.setItem(t,e)}catch(t){"QuotaExceededError"===t.name&&(this.clear(),this._noop())}},get:function(t){return this.isExpired(t)&&this.remove(t),n(this.ls.getItem(this._prefix(t)))},set:function(t,e,n){return p.isNumber(n)?this._safeSet(this._ttlKey(t),s(i()+n)):this.ls.removeItem(this._ttlKey(t)),this._safeSet(this._prefix(t),s(e))},remove:function(t){return this.ls.removeItem(this._ttlKey(t)),this.ls.removeItem(this._prefix(t)),this},clear:function(){var t,e=function(t){var e,n,i=[],s=r.length;for(e=0;e<s;e++)(n=r.key(e)).match(t)&&i.push(n.replace(t,""));return i}(this.keyMatcher);for(t=e.length;t--;)this.remove(e[t]);return this},isExpired:function(t){var e=n(this.ls.getItem(this._ttlKey(t)));return!!(p.isNumber(e)&&i()>e)}}),t}(),s=function(){"use strict";function t(t){t=t||{},this.maxPendingRequests=t.maxPendingRequests||6,this.cancelled=!1,this.lastReq=null,this._send=t.transport,this._get=t.limiter?t.limiter(this._get):this._get,this._cache=!1===t.cache?new i(0):e}var a=0,u={},e=new i(10);return t.setMaxPendingRequests=function(t){this.maxPendingRequests=t},t.resetCache=function(){e.reset()},p.mixin(t.prototype,{_fingerprint:function(t){return(t=t||{}).url+t.type+f.param(t.data||{})},_get:function(t,e){function n(t){e(null,t),o._cache.set(s,t)}function i(){e(!0)}var s,r,o=this;s=this._fingerprint(t),this.cancelled||s!==this.lastReq||((r=u[s])?r.done(n).fail(i):a<this.maxPendingRequests?(a++,u[s]=this._send(t).done(n).fail(i).al
6ways(function(){a--,delete u[s],o.onDeckRequestArgs&&(o._get.apply(o,o.onDeckRequestArgs),o.onDeckRequestArgs=null)})):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(t,e){var n,i;e=e||f.noop,t=p.isString(t)?{url:t}:t||{},i=this._fingerprint(t),this.cancelled=!1,this.lastReq=i,(n=this._cache.get(i))?e(null,n):this._get(t,e)},cancel:function(){this.cancelled=!0}}),t}(),r=window.SearchIndex=function(){"use strict";function t(t){(t=t||{}).datumTokenizer&&t.queryTokenizer||f.error("datumTokenizer and queryTokenizer are both required"),this.identify=t.identify||p.stringify,this.datumTokenizer=t.datumTokenizer,this.queryTokenizer=t.queryTokenizer,this.matchAnyQueryToken=t.matchAnyQueryToken,this.reset()}function n(t){return t=p.filter(t,function(t){return!!t}),p.map(t,function(t){return t.toLowerCase()})}function o(){var t={};return t[u]=[],t[a]={},t}var a="c",u="i";return p.mixin(t.prototype,{bootstrap:function(t){this.datums=t.datums,this.trie=t.trie},add:function(t){var r=this;t=p.isArray(t)?t:[t],p.each(t,function(t){var s,e;r.datums[s=r.identify(t)]=t,e=n(r.datumTokenizer(t)),p.each(e,function(t){var e,n,i;for(e=r.trie,n=t.split("");i=n.shift();)(e=e[a][i]||(e[a][i]=o()))[u].push(s)})})},get:function(t){var e=this;return p.map(t,function(t){return e.datums[t]})},search:function(t){var e,r,o=this;return e=n(this.queryTokenizer(t)),p.each(e,function(t){var e,n,i,s;if(r&&0===r.length&&!o.matchAnyQueryToken)return!1;for(e=o.trie,n=t.split("");e&&(i=n.shift());)e=e[a][i];if(e&&0===n.length)s=e[u].slice(0),r=r?function(t,e){var n=0,i=0,s=[];t=t.sort(),e=e.sort();for(var r=t.length,o=e.length;n<r&&i<o;)t[n]<e[i]?n++:(t[n]>e[i]||(s.push(t[n]),n++),i++);return s}(r,s):s;else if(!o.matchAnyQueryToken)return!(r=[])}),r?p.map(function(t){for(var e={},n=[],i=0,s=t.length;i<s;i++)e[t[i]]||(e[t[i]]=!0,n.push(t[i]));return n}(r),function(t){return o.datums[t]}):[]},all:function(){var t=[];for(var e in this.datums)t.push(this.datums[e]);return t},reset:function(){this.datums={},this.trie=o()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),t}(),o=function(){"use strict";function t(t){this.url=t.url,this.ttl=t.ttl,this.cache=t.cache,this.prepare=t.prepare,this.transform=t.transform,this.transport=t.transport,this.thumbprint=t.thumbprint,this.storage=new e(t.cacheKey)}var n;return n={data:"data",protocol:"protocol",thumbprint:"thumbprint"},p.mixin(t.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(t){this.cache&&(this.storage.set(n.data,t,this.ttl),this.storage.set(n.protocol,location.protocol,this.ttl),this.storage.set(n.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var t,e={};return this.cache?(e.data=this.storage.get(n.data),e.protocol=this.storage.get(n.protocol),e.thumbprint=this.storage.get(n.thumbprint),t=e.thumbprint!==this.thumbprint||e.protocol!==location.protocol,e.data&&!t?e.data:null):null},fromNetwork:function(e){var t,n=this;e&&(t=this.prepare(this._settings()),this.transport(t).fail(function(){e(!0)}).done(function(t){e(null,n.transform(t))}))},clear:function(){return this.storage.clear(),this}}),t}(),a=function(){"use strict";function t(t){this.url=t.url,this.prepare=t.prepare,this.transform=t.transform,this.indexResponse=t.indexResponse,this.transport=new s({cache:t.cache,limiter:t.limiter,transport:t.transport,maxPendingRequests:t.maxPendingRequests})}return p.mixin(t.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(t,n){var e,i=this;if(n)return t=t||"",e=this.prepare(t,this._settings()),this.transport.get(e,function(t,e){n(t?[]:i.transform(e))})},cancelLastRequest:function(){this.transport.cancel()}}),t}(),u=function(){"use strict";function r(t){var e,n,i,s,r,o,a,u,c,h,l;if(t)return e={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:p.identity,transport:null},t=p.isString(t)?{url:t}:t,!(t=p.mixin(e,t)).url&&f.error("remote requires url to be set"),t.transform=t.filter||t.transform,t.prepare=(c=(u=t).prepare,h=u.replace,l=u.wildcard,c||(c=h?function(t,e){return e.url=h(e.url,t),e}:u.wildcard?function(t,e){return e.url=e.url.replace(l,encodeURIComponent(t)),e}:function(t,e){return e})),t.limiter=(i=(n=t).limiter,s=n.rateLimitBy,r=n.rateLimitWait,i||(i=/^throttle$/i.test(s)?(a=r,function(t){return p.throttle(t,a)}):(o=r,function(t){return p.debounce(t,o)})),i),t.transport=t.transport?d(t.transport):f.ajax,delete t.replace,delete t.wildcard,delete t.rateLimitBy,delete t.rateLimitWait,t}function d(n){return function(t){var e=f.Deferred();return n(t,function(t){p.defer(function(){e.resolve(t)})},function(t){p.defer(function(){e.reject(t)})}),e}}return function(t){var e,n,i,s;return e={initialize:!0,identify:p.stringify,datumTokenizer:null,queryTokenizer:null,matchAnyQueryToken:!1,sufficient:5,indexRemote:!1,sorter:null,local:[],prefetch:null,remote:null},!(t=p.mixin(e,t||{})).datumTokenizer&&f.error("datumTokenizer is required"),!t.queryTokenizer&&f.error("queryTokenizer is required"),n=t.sorter,t.sorter=n?function(t){return t.sort(n)}:p.identity,t.local=p.isFunction(t.local)?t.local():t.local,t.prefetch=(i=t.prefetch)?(s={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:p.identity,transform:p.identity,transport:null},i=p.isString(i)?{url:i}:i,!(i=p.mixin(s,i)).url&&f.error("prefetch requires url to be set"),i.transform=i.filter||i.transform,i.cacheKey=i.cacheKey||i.url,i.thumbprint="1.2.0"+i.thumbprint,i.transport=i.transport?d(i.transport):f.ajax,i):null,t.remote=r(t.remote),t}}();return function(){"use strict";function t(t){t=u(t),this.sorter=t.sorter,this.identify=t.identify,this.sufficient=t.sufficient,this.indexRemote=t.indexRemote,this.local=t.local,this.remote=t.remote?new a(t.remote):null,this.prefetch=t.prefetch?new o(t.prefetch):null,this.index=new r({identify:this.identify,datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer}),!1!==t.initialize&&this.initialize()}var e;return e=window&&window.Bloodhound,t.noConflict=function(){return window&&(window.Bloodhound=e),t}
6,t.tokenizers=n,p.mixin(t.prototype,{__ttAdapter:function(){var i=this;return this.remote?function(t,e,n){return i.search(t,e,n)}:function(t,e){return i.search(t,e)}},_loadPrefetch:function(){var n,t,i=this;return n=f.Deferred(),this.prefetch?(t=this.prefetch.fromCache())?(this.index.bootstrap(t),n.resolve()):this.prefetch.fromNetwork(function(t,e){return t?n.reject():(i.add(e),i.prefetch.store(i.index.serialize()),void n.resolve())}):n.resolve(),n.promise()},_initialize:function(){var t=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(function(){t.add(t.local)}),this.initPromise},initialize:function(t){return!this.initPromise||t?this._initialize():this.initPromise},add:function(t){return this.index.add(t),this},get:function(t){return t=p.isArray(t)?t:[].slice.call(arguments),this.index.get(t)},search:function(t,e,i){var s,r=this;return e=e||p.noop,i=i||p.noop,s=this.sorter(this.index.search(t)),e(this.remote?s.slice():s),this.remote&&s.length<this.sufficient?this.remote.get(t,function(t){var n=[];p.each(t,function(e){!p.some(s,function(t){return r.identify(e)===r.identify(t)})&&n.push(e)}),r.indexRemote&&r.add(n),i(n)}):this.remote&&this.remote.cancelLastRequest(),this},all:function(){return this.index.all()},clear:function(){return this.index.reset(),this},clearPrefetchCache:function(){return this.prefetch&&this.prefetch.clear(),this},clearRemoteCache:function(){return s.resetCache(),this},ttAdapter:function(){return this.__ttAdapter()}}),t}()}),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):e(t.jQuery)}(this,function(_){var b=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:_.isArray,isFunction:_.isFunction,isObject:_.isPlainObject,isUndefined:function(t){return void 0===t},isElement:function(t){return!(!t||1!==t.nodeType)},isJQuery:function(t){return t instanceof _},toStr:function(t){return b.isUndefined(t)||null===t?"":t+""},bind:_.proxy,each:function(t,n){_.each(t,function(t,e){return n(e,t)})},map:_.map,filter:_.grep,every:function(n,i){var s=!0;return n?(_.each(n,function(t,e){if(!(s=i.call(null,e,t,n)))return!1}),!!s):s},some:function(n,i){var s=!1;return n?(_.each(n,function(t,e){if(s=i.call(null,e,t,n))return!1}),!!s):s},mixin:_.extend,identity:function(t){return t},clone:function(t){return _.extend(!0,{},t)},getIdGenerator:function(){var t=0;return function(){return t++}},templatify:function(t){return _.isFunction(t)?t:function(){return String(t)}},defer:function(t){setTimeout(t,0)},debounce:function(s,r,o){var a,u;return function(){var t,e,n=this,i=arguments;return t=function(){a=null,o||(u=s.apply(n,i))},e=o&&!a,clearTimeout(a),a=setTimeout(t,r),e&&(u=s.apply(n,i)),u}},throttle:function(n,i){var s,r,o,a,u,c;return u=0,c=function(){u=new Date,o=null,a=n.apply(s,r)},function(){var t=new Date,e=i-(t-u);return s=this,r=arguments,e<=0?(clearTimeout(o),o=null,u=t,a=n.apply(s,r)):o||(o=setTimeout(c,e)),a}},stringify:function(t){return b.isString(t)?t:JSON.stringify(t)},guid:function(){function t(t){var e=(Math.random().toString(16)+"000000000").substr(2,8);return t?"-"+e.substr(0,4)+"-"+e.substr(4,4):e}return"tt-"+t()+t(!0)+t(!0)+t()},noop:function(){}}}(),n=function(){"use strict";var a={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return function(t){var e,n,i,s,r,o;return n=b.mixin({},a,t),{css:(e={css:(o={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}},b.isMsie()&&b.mixin(o.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),o),classes:n,html:(r=n,{wrapper:'<span class="'+r.wrapper+'"></span>
6',menu:'<div role="listbox" class="'+r.menu+'"></div>'}),selectors:(i=n,s={},b.each(i,function(t,e){s[e]="."+t}),s)}).css,html:e.html,classes:e.classes,selectors:e.selectors,mixin:function(t){b.mixin(t,e)}}}}(),x=function(){"use strict";function t(t){t&&t.el||_.error("EventBus initialized without el"),this.$el=_(t.el)}var n;return"typeahead:",n={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},b.mixin(t.prototype,{_trigger:function(t,e){var n=_.Event("typeahead:"+t);return this.$el.trigger.call(this.$el,n,e||[]),n},before:function(t){var e;return e=[].slice.call(arguments,1),this._trigger("before"+t,e).isDefaultPrevented()},trigger:function(t){var e;this._trigger(t,[].slice.call(arguments,1)),(e=n[t])&&this._trigger(e,[].slice.call(arguments,1))}}),t}(),e=function(){"use strict";function i(t,e,n,i){var s;if(!n)return this;for(e=e.split(a),n=i?function(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}(n,i):n,this._callbacks=this._callbacks||{};s=e.shift();)this._callbacks[s]=this._callbacks[s]||{sync:[],async:[]},this._callbacks[s][t].push(n);return this}function o(i,s,r){return function(){for(var t,e=0,n=i.length;!t&&e<n;e+=1)t=!1===i[e].apply(s,r);return!t}}var a=/\s+/,u=window.setImmediate?function(t){setImmediate(function(){t()})}:function(t){setTimeout(function(){t()},0)};return{onSync:function(t,e,n){return i.call(this,"sync",t,e,n)},onAsync:function(t,e,n){return i.call(this,"async",t,e,n)},off:function(t){var e;if(!this._callbacks)return this;for(t=t.split(a);e=t.shift();)delete this._callbacks[e];return this},trigger:function(t){var e,n,i,s,r;if(!this._callbacks)return this;for(t=t.split(a),i=[].slice.call(arguments,1);(e=t.shift())&&(n=this._callbacks[e]);)s=o(n.sync,this,[e].concat(i)),r=o(n.async,this,[e].concat(i)),s()&&u(r);return this}}}(),u=function(o){"use strict";function c(t){return e[t.toUpperCase()]||t}
6var t={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1,diacriticInsensitive:!1},e={A:"[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]",B:"[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]",C:"[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]",D:"[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]",E:"[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]",F:"[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]",G:"[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]",H:"[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]",I:"[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]",J:"[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]",K:"[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]",L:"[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]",M:"[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]",N:"[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]",O:"[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]",P:"[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]",Q:"[Qqℚ⒬Ⓠⓠ㏃Qq]",R:"[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]",S:"[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]",T:"[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]",U:"[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]",V:"[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]",W:"[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]",X:"[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]",Y:"[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]",Z:"[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]"};return function(s){var r;(s=b.mixin({},t,s)).node&&s.pattern&&(s.pattern=b.isArray(s.pattern)?s.pattern:[s.pattern],r=function(t,e,n,i){for(var s,r=[],o=0,a=t.length;o<a;o++){var u=b.escapeRegExChars(t[o]);i&&(u=u.replace(/\S/g,c)),r.push(u)}return s=n?"\\b("+r.join("|")+")\\b":"("+r.join("|")+")",e?new RegExp(s):new RegExp(s,"i")}(s.pattern,s.caseSensitive,s.wordsOnly,s.diacriticInsensitive),function t(e,n){for(var i,s=0;s<e.childNodes.length;s++)3===(i=e.childNodes[s]).nodeType?s+=n(i)?1:0:t(i,n)}(s.node,function(t){var e,n,i;return(e=r.exec(t.data))&&(i=o.createElement(s.tagName),s.className&&(i.className=s.className),(n=t.splitText(e.index)).splitText(e[0].length),i.appendChild(n.cloneNode(!0)),t.parentNode.replaceChild(i,n)),!!e}))}}(window.document),S=function(){"use strict";function o(t,e){var n;(t=t||{}).input||_.error("input is missing"),e.mixin(this),this.$hint=_(t.hint),this.$input=_(t.input),this.$input.attr({"aria-activedescendant":"","aria-owns":this.$input.attr("id")+"_listbox",role:"combobox","aria-readonly":"true","aria-autocomplete":"list"}),_(e.menu).attr("id",this.$input.attr("id")+"_listbox"),this.query=this.$input.val(),this.queryWhenFocused=this.hasFocus()?this.query:null,this.$overflowHelper=(n=this.$input,_('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:n.css("font-family"),fontSize:n.css("font-size"),fontStyle:n.css("font-style"),fontVariant:n.css("font-variant"),fontWeight:n.css("font-weight"),wordSpacing:n.css("word-spacing"),letterSpacing:n.css("letter-spacing"),textIndent:n.css("text-indent"),textRendering:n.css("text-rendering"),textTransform:n.css("text-transform")}).insertAfter(n)),this._checkLanguageDirection(),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=b.noop),this.onSync("cursorchange",this._updateDescendent)}function i(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}var r;return r={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},o.normalizeQuery=function(t){return b.toStr(t).replace(/^\s*/g,"").replace(/\s{2,}/g," ")},b.mixin(o.prototype,e,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.queryWhenFocused=this.query,this.trigger("focused")},_onKeydown:function(t){var e=r[t.which||t.keyCode];this._managePreventDefault(e,t),e&&this._shouldTrigger(e,t)&&this.trigger(e+"Keyed",t)},_onInput:function(){this._setQuery(this.getInputValue()),this.clearHintIfInvalid(),this._checkLanguageDirection()},_managePreventDefault:function(t,e){var n;switch(t){case"up":case"down":n=!i(e);break;default:n=!1}n&&e.preventDefault()},_shouldTrigger:function(t,e){var n;switch(t){case"tab":n=!i(e);break;default:n=!0}
6return n},_checkLanguageDirection:function(){var t=(this.$input.css("direction")||"ltr").toLowerCase();this.dir!==t&&(this.dir=t,this.$hint.attr("dir",t),this.trigger("langDirChanged",t))},_setQuery:function(t,e){var n,i,s,r;s=t,r=this.query,i=!!(n=o.normalizeQuery(s)===o.normalizeQuery(r))&&this.query.length!==t.length,this.query=t,e||n?!e&&i&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},_updateDescendent:function(t,e){this.$input.attr("aria-activedescendant",e)},bind:function(){var t,e,n,i,s=this;return t=b.bind(this._onBlur,this),e=b.bind(this._onFocus,this),n=b.bind(this._onKeydown,this),i=b.bind(this._onInput,this),this.$input.on("blur.tt",t).on("focus.tt",e).on("keydown.tt",n),!b.isMsie()||9<b.isMsie()?this.$input.on("input.tt",i):this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(t){r[t.which||t.keyCode]||b.defer(b.bind(s._onInput,s,t))}),this},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getLangDir:function(){return this.dir},getQuery:function(){return this.query||""},setQuery:function(t,e){this.setInputValue(t),this._setQuery(t,e)},hasQueryChangedSinceLastFocus:function(){return this.query!==this.queryWhenFocused},getInputValue:function(){return this.$input.val()},setInputValue:function(t){this.$input.val(t),this.clearHintIfInvalid(),this._checkLanguageDirection()},resetInputValue:function(){this.setInputValue(this.query)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,e,n;n=(t=this.getInputValue())!==(e=this.getHint())&&0===e.indexOf(t),!(""!==t&&n&&!this.hasOverflow())&&this.clearHint()},hasFocus:function(){return this.$input.is(":focus")},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var t,e,n;return t=this.$input.val().length,e=this.$input[0].selectionStart,b.isNumber(e)?e===t:!document.selection||((n=document.selection.createRange()).moveStart("character",-t),t===n.text.length)},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$overflowHelper.remove(),this.$hint=this.$input=this.$overflowHelper=_("<div>")}}),o}(),s=function(){"use strict";function t(t,e){var n,i,s,r;(t=t||{}).templates=t.templates||{},t.templates.notFound=t.templates.notFound||t.templates.empty,t.source||_.error("missing source"),t.node||_.error("missing node"),t.name&&(r=t.name,!/^[_a-zA-Z0-9-]+$/.test(r))&&_.error("invalid dataset name: "+t.name),e.mixin(this),this.highlight=!!t.highlight,this.name=b.toStr(t.name||a()),this.limit=t.limit||5,this.displayFn=(s=(s=t.display||t.displayKey)||b.stringify,b.isFunction(s)?s:function(t){return t[s]}),this.templates=(n=t.templates,i=this.displayFn,{notFound:n.notFound&&b.templatify(n.notFound),pending:n.pending&&b.templatify(n.pending),header:n.header&&b.templatify(n.header),footer:n.footer&&b.templatify(n.footer),suggestion:n.suggestion||function(t){return _('<div role="option">').attr("id",b.guid()).text(i(t))}}),this.source=t.source.__ttAdapter?t.source.__ttAdapter():t.source,this.async=b.isUndefined(t.async)?2<this.source.length:!!t.async,this._resetLastSuggestion(),this.$el=_(t.node).attr("role","presentation").addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}var o,a;return o={dataset:"tt-selectable-dataset",val:"tt-selectable-display",obj:"tt-selectable-object"},a=b.getIdGenerator(),t.extractData=function(t){var e=_(t);return e.data(o.obj)?{dataset:e.data(o.dataset)||"",val:e.data(o.val)||"",obj:e.data(o.obj)||null}:null},b.mixin(t.prototype,e,{_overwrite:function(t,e){(e=e||[]).length?this._renderSuggestions(t,e):this.async&&this.templates.pending?this._renderPending(t):!this.async&&this.templates.notFound?this._renderNotFound(t):this._empty(),this.trigger("rendered",e,!1,this.name)},_append:function(t,e){(e=e||[]).length&&this.$lastSuggestion.length?this._appendSuggestions(t,e):e.length?this._renderSuggestions(t,e):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(t),this.trigger("rendered",e,!0,this.name)},_renderSuggestions:function(t,e){var n;n=this._getSuggestionsFragment(t,e),this.$lastSuggestion=n.children().last(
vendor: 4,085 bytes, line 6
6),this.$el.html(n).prepend(this._getHeader(t,e)).append(this._getFooter(t,e))},_appendSuggestions:function(t,e){var n,i;i=(n=this._getSuggestionsFragment(t,e)).children().last(),this.$lastSuggestion.after(n),this.$lastSuggestion=i},_renderPending:function(t){var e=this.templates.pending;this._resetLastSuggestion(),e&&this.$el.html(e({query:t,dataset:this.name}))},_renderNotFound:function(t){var e=this.templates.notFound;this._resetLastSuggestion(),e&&this.$el.html(e({query:t,dataset:this.name}))},_empty:function(){this.$el.empty(),this._resetLastSuggestion()},_getSuggestionsFragment:function(i,t){var s,r=this;return s=document.createDocumentFragment(),b.each(t,function(t){var e,n;n=r._injectQuery(i,t),e=_(r.templates.suggestion(n)).data(o.dataset,r.name).data(o.obj,t).data(o.val,r.displayFn(t)).addClass(r.classes.suggestion+" "+r.classes.selectable),s.appendChild(e[0])}),this.highlight&&u({className:this.classes.highlight,node:s,pattern:i}),_(s)},_getFooter:function(t,e){return this.templates.footer?this.templates.footer({query:t,suggestions:e,dataset:this.name}):null},_getHeader:function(t,e){return this.templates.header?this.templates.header({query:t,suggestions:e,dataset:this.name}):null},_resetLastSuggestion:function(){this.$lastSuggestion=_()},_injectQuery:function(t,e){return b.isObject(e)?b.mixin({_query:t},e):e},update:function(n){function t(t){e||(e=!0,t=(t||[]).slice(0,i.limit),r=t.length,i._overwrite(n,t),r<i.limit&&i.async&&i.trigger("asyncRequested",n,i.name))}var i=this,s=!1,e=!1,r=0;this.cancel(),this.cancel=function(){s=!0,i.cancel=_.noop,i.async&&i.trigger("asyncCanceled",n,i.name)},this.source(n,t,function(t){if(t=t||[],!s&&r<i.limit){i.cancel=_.noop;var e=Math.abs(r-i.limit);r+=e,i._append(n,t.slice(0,e)),i.async&&i.trigger("asyncReceived",n,i.name)}}),!e&&t([])},cancel:_.noop,clear:function(){this._empty(),this.cancel(),this.trigger("cleared")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=_("<div>")}}),t}(),w=function(){"use strict";function t(t,n){var i=this;(t=t||{}).node||_.error("node is required"),n.mixin(this),this.$node=_(t.node),this.query=null,this.datasets=b.map(t.datasets,function(t){var e=i.$node.find(t.node).first();return t.node=e.length?e:_("<div>").appendTo(i.$node),new s(t,n)})}return b.mixin(t.prototype,e,{_onSelectableClick:function(t){this.trigger("selectableClicked",_(t.currentTarget))},_onRendered:function(t,e,n,i){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetRendered",e,n,i)},_onCleared:function(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetCleared")},_propagate:function(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function(){return b.every(this.datasets,b.bind(function(t){var e=t.isEmpty();return this.$node.attr("aria-expanded",!e),e},this))},_getSelectables:function(){return this.$node.find(this.selectors.selectable)},_removeCursor:function(){var t=this.getActiveSelectable();t&&t.removeClass(this.classes.cursor)},_ensureVisible:function(t){var e,n,i,s;n=(e=t.position().top)+t.outerHeight(!0),i=this.$node.scrollTop(),s=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10),e<0?this.$node.scrollTop(i+e):s<n&&this.$node.scrollTop(i+(n-s))},bind:function(){var t,e=this;return t=b.bind(this._onSelectableClick,this),this.$node.on("click.tt",this.selectors.selectable,t),this.$node.on("mouseover",this.selectors.selectable,function(){e.setCursor(_(this))}),this.$node.on("mouseleave",function(){e._removeCursor()}),b.each(this.datasets,function(t){t.onSync("asyncRequested",e._propagate,e).onSync("asyncCanceled",e._propagate,e).onSync("asyncReceived",e._propagate,e).onSync("rendered",e._onRendered,e).onSync("cleared",e._onCleared,e)}),this},isOpen:function(){return this.$node.hasClass(this.classes.open)},open:function(){this.$node.scrollTop(0),this.$node.addClass(this.classes.open)},close:function(){this.$node.attr("aria-expanded",!1),this.$node.removeClass(this.classes.open),this._removeCursor()}
6,setLanguageDirection:function(t){this.$node.attr("dir",t)},selectableRelativeToCursor:function(t){var e,n,i;return n=this.getActiveSelectable(),e=this._getSelectables(),-1===(i=(i=((i=(n?e.index(n):-1)+t)+1)%(e.length+1)-1)<-1?e.length-1:i)?null:e.eq(i)},setCursor:function(t){this._removeCursor(),(t=t&&t.first())&&(t.addClass(this.classes.cursor),this._ensureVisible(t))},getSelectableData:function(t){return t&&t.length?s.extractData(t):null},getActiveSelectable:function(){var t=this._getSelectables().filter(this.selectors.cursor).first();return t.length?t:null},getTopSelectable:function(){var t=this._getSelectables().first();return t.length?t:null},update:function(e){var t=e!==this.query;return t&&(this.query=e,b.each(this.datasets,function(t){t.update(e)})),t},empty:function(){b.each(this.datasets,function(t){t.clear()}),this.query=null,this.$node.addClass(this.classes.empty)},destroy:function(){this.$node.off(".tt"),this.$node=_("<div>"),b.each(this.datasets,function(t){t.destroy()})}}),t}(),A=function(){"use strict";function t(t){this.$el=_("<span></span>",{role:"status","aria-live":"polite"}).css({position:"absolute",padding:"0",border:"0",height:"1px",width:"1px","margin-bottom":"-1px","margin-right":"-1px",overflow:"hidden",clip:"rect(0 0 0 0)","white-space":"nowrap"}),t.$input.after(this.$el),b.each(t.menu.datasets,b.bind(function(t){t.onSync&&(t.onSync("rendered",b.bind(this.update,this)),t.onSync("cleared",b.bind(this.cleared,this)))},this))}return b.mixin(t.prototype,{update:function(t,e){var n,i=e.length;n=1===i?{result:"result",is:"is"}:{result:"results",is:"are"},this.$el.text(i+" "+n.result+" "+n.is+" available, use up and down arrow keys to navigate.")},cleared:function(){this.$el.text("")}}),t}(),k=function(){"use strict";function t(){w.apply(this,[].slice.call(arguments,0))}var e=w.prototype;return b.mixin(t.prototype,w.prototype,{open:function(){return!this._allDatasetsEmpty()&&this._show(),e.open.apply(this,[].slice.call(arguments,0))},close:function(){return this._hide(),e.close.apply(this,[].slice.call(arguments,0))},_onRendered:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),e._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),e._onCleared.apply(this,[].slice.call(arguments,0))},setLanguageDirection:function(t){return this.$node.css("ltr"===t?this.css.ltr:this.css.rtl),e.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function(){this.$node.hide()},_show:function(){this.$node.css("display","block")}}),t}(),$=function(){"use strict";function t(t,e){var n,i,s,r,o,a,u,c,h,l,d;(t=t||{}).input||_.error("missing input"),t.menu||_.error("missing menu"),t.eventBus||_.error("missing event bus"),e.mixin(this),this.eventBus=t.eventBus,this.minLength=b.isNumber(t.minLength)?t.minLength:1,this.input=t.input,this.menu=t.menu,this.enabled=!0,this.autoselect=!!t.autoselect,this.active=!1,this.input.hasFocus()&&this.activate(),this.dir=this.input.getLangDir(),this._hacks(),this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this),n=f(this,"activate","open","_onFocused"),i=f(this,"deactivate","_onBlurred"),s=f(this,"isActive","isOpen","_onEnterKeyed"),r=f(this,"isActive","isOpen","_onTabKeyed"),o=f(this,"isActive","_onEscKeyed"),a=f(this,"isActive","open","_onUpKeyed"),u=f(this,"isActive","open","_onDownKeyed"),c=f(this,"isActive","isOpen","_onLeftKeyed"),h=f(this,"isActive","isOpen","_onRightKeyed"),l=f(this,"_openIfActive","_onQueryChanged"),d=f(this,"_openIfActive","_onWhitespaceChanged"),this.input.bind().onSync("focused",n,this).onSync("blurred",i,this).onSync("enterKeyed",s,this).onSync("tabKeyed",r,this).onSync("escKeyed",o,this).onSync("upKeyed",a,this).onSync("downKeyed",u,this).onSync("leftKeyed",c,this).onSync("rightKeyed",h,this).onSync("queryChanged",l,this).onSync("whitespaceChanged",d,this).onSync("langDirChanged",this._onLangDirChanged,this)}
6function f(n){var t=[].slice.call(arguments,1);return function(){var e=[].slice.call(arguments);b.each(t,function(t){return n[t].apply(n,e)})}}return b.mixin(t.prototype,{_hacks:function(){var s,r;s=this.input.$input||_("<div>"),r=this.menu.$node||_("<div>"),s.on("blur.tt",function(t){var e,n,i;e=document.activeElement,n=r.is(e),i=0<r.has(e).length,b.isMsie()&&(n||i)&&(t.preventDefault(),t.stopImmediatePropagation(),b.defer(function(){s.focus()}))}),r.on("mousedown.tt",function(t){t.preventDefault()})},_onSelectableClicked:function(t,e){this.select(e)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(t,e,n,i){if(this._updateHint(),this.autoselect){var s=this.selectors.cursor.substr(1);this.menu.$node.find(this.selectors.suggestion).first().addClass(s)}this.eventBus.trigger("render",e,n,i)},_onAsyncRequested:function(t,e,n){this.eventBus.trigger("asyncrequest",n,e)},_onAsyncCanceled:function(t,e,n){this.eventBus.trigger("asynccancel",n,e)},_onAsyncReceived:function(t,e,n){this.eventBus.trigger("asyncreceive",n,e)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(t,e){var n;(n=this.menu.getActiveSelectable())?this.select(n)&&(e.preventDefault(),e.stopPropagation()):this.autoselect&&this.select(this.menu.getTopSelectable())&&(e.preventDefault(),e.stopPropagation())},_onTabKeyed:function(t,e){var n;(n=this.menu.getActiveSelectable())?this.select(n)&&e.preventDefault():(n=this.menu.getTopSelectable())&&this.autocomplete(n)&&e.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){"rtl"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getActiveSelectable()||this.menu.getTopSelectable())},_onRightKeyed:function(){"ltr"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getActiveSelectable()||this.menu.getTopSelectable())},_onQueryChanged:function(t,e){this._minLengthMet(e)?this.menu.update(e):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(t,e){this.dir!==e&&(this.dir=e,this.menu.setLanguageDirection(e))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(t){return(t=b.isString(t)?t:this.input.getQuery()||"").length>=this.minLength},_updateHint:function(){var t,e,n,i,s,r;t=this.menu.getTopSelectable(),e=this.menu.getSelectableData(t),n=this.input.getInputValue(),!e||b.isBlankString(n)||this.input.hasOverflow()?this.input.clearHint():(i=S.normalizeQuery(n),s=b.escapeRegExChars(i),(r=new RegExp("^(?:"+s+")(.+$)","i").exec(e.val))&&this.input.setHint(n+r[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return!!this.isActive()||!(!this.isEnabled()||this.eventBus.before("active"))&&(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return!this.isActive()||!this.eventBus.before("idle")&&(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0)},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(t){this.input.setQuery(b.toStr(t))},getVal:function(){return this.input.getQuery()},select:function(t){var e=this.menu.getSelectableData(t);return!(!e||this.eventBus.before("select",e.obj,e.dataset)||(this.input.setQuery(e.val,!0),this.eventBus.trigger("select",e.obj,e.dataset),this.close(),0))},autocomplete:function(t){var e,n;return e=this.input.getQuery(),!(!((n=this.menu.getSelectableData(t))&&e!==n.val)||this.eventBus.before("autocomplete",n.obj,n.dataset)||(this.input.setQuery(n.val),this.eventBus.trigger("autocomplete",n.obj,n.dataset),0))},moveCursor:function(t){var e,n,i,s,r,o;return e=this.input.getQuery(),n=this.menu.selectableRelativeToCursor(t),s=(i=this.menu.getSelectableData(n))?i.obj:null,r=i?i.dataset:null,o=n?n.attr("id"):null,this.input.trigger("cursorchange",o),!(this._minLengthMet()&&this.menu.update(e))&&!this.eventBus.before("cursorchange",s,r)&&(this.menu.setCursor(n),i?this.input.setInputValue(i.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",s,r),!0)},destroy:function(){this.input.destroy(),this.menu.destroy()}}),t}();!function(){"use strict";function i(t,n){t.each(function(){var t,e=_(this);(t=e.data(v.typeahead))&&n(t,e)})}function y(t){var e;return(e=b.isJQuery(t)||b.isElement(t)?_(t).first():[]).length?e:null}var t,v,e;t=_.fn.typeahead,v={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},e={initialize:function(p,g){var m;
6return g=b.isArray(g)?g:[].slice.call(arguments,1),m=n((p=p||{}).classNames),this.each(function(){var t,e,n,i,s,r,o,a,u,c,h,l,d,f;b.each(g,function(t){t.highlight=!!p.highlight}),t=_(this),e=_(m.html.wrapper),n=y(p.hint),i=y(p.menu),s=!1!==p.hint&&!n,r=!1!==p.menu&&!i,s&&(d=m,n=(l=t).clone().addClass(d.classes.hint).removeData().css(d.css.hint).css((f=l,{backgroundAttachment:f.css("background-attachment"),backgroundClip:f.css("background-clip"),backgroundColor:f.css("background-color"),backgroundImage:f.css("background-image"),backgroundOrigin:f.css("background-origin"),backgroundPosition:f.css("background-position"),backgroundRepeat:f.css("background-repeat"),backgroundSize:f.css("background-size")})).prop({readonly:!0,required:!1}).removeAttr("id name placeholder").removeClass("required").attr({spellcheck:"false",tabindex:-1})),r&&(i=_(m.html.menu).css(m.css.menu)),n&&n.val(""),t=function(t,e){t.data(v.attrs,{dir:t.attr("dir"),autocomplete:t.attr("autocomplete"),spellcheck:t.attr("spellcheck"),style:t.attr("style")}),t.addClass(e.classes.input).attr({spellcheck:!1});try{!t.attr("dir")&&t.attr("dir","auto")}catch(t){}return t}(t,m),(s||r)&&(e.css(m.css.wrapper),t.css(s?m.css.input:m.css.inputWithNoHint),t.wrap(e).parent().prepend(s?n:null).append(r?i:null)),h=r?k:w,o=new x({el:t}),a=new S({hint:n,input:t},m),u=new h({node:i,datasets:g},m),new A({$input:t,menu:u}),c=new $({input:a,menu:u,eventBus:o,minLength:p.minLength,autoselect:p.autoselect},m),t.data(v.www,m),t.data(v.typeahead,c)})},isEnabled:function(){var e;return i(this.first(),function(t){e=t.isEnabled()}),e},enable:function(){return i(this,function(t){t.enable()}),this},disable:function(){return i(this,function(t){t.disable()}),this},isActive:function(){var e;return i(this.first(),function(t){e=t.isActive()}),e},activate:function(){return i(this,function(t){t.activate()}),this},deactivate:function(){return i(this,function(t){t.deactivate()}),this},isOpen:function(){var e;return i(this.first(),function(t){e=t.isOpen()}),e},open:function(){return i(this,function(t){t.open()}),this},close:function(){return i(this,function(t){t.close()}),this},select:function(t){var e=!1,n=_(t);return i(this.first(),function(t){e=t.select(n)}),e},autocomplete:function(t){var e=!1,n=_(t);return i(this.first(),function(t){e=t.autocomplete(n)}),e},moveCursor:function(e){var n=!1;return i(this.first(),function(t){n=t.moveCursor(e)}),n},val:function(e){var n;return arguments.length?(i(this,function(t){t.setVal(b.toStr(e))}),this):(i(this.first(),function(t){n=t.getVal()}),n)},destroy:function(){return i(this,function(t,e){var n,i,s;i=(n=e).data(v.www),s=n.parent().filter(i.selectors.wrapper),b.each(n.data(v.attrs),function(t,e){b.isUndefined(t)?n.removeAttr(e):n.attr(e,t)}),n.removeData(v.typeahead).removeData(v.www).removeData(v.attr).removeClass(i.classes.input),s.length&&(n.detach().insertAfter(s),s.remove()),t.destroy()}),this}},_.fn.typeahead=function(t){return e[t]?e[t].apply(this,[].slice.call(arguments,1)):e.initialize.apply(this,arguments)},_.fn.typeahead.noConflict=function(){return _.fn.typeahead=t,this}}()});
7!function(e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t,window,document)}):"object"==typeof exports?module.exports=e(require("jquery"),window,document):e(jQuery,window,document)}(function(s,n,o){"use strict";var p,d,i,c,a,u,e,g,v,f,l,r,h,S,m,T,y,b,w,x,$,C,H,O,A;b={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",enabledClass:"has-scrollbar",flashedClass:"flashed",activeClass:"active",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},S="scroll",e="mousedown",g="mouseenter",v="mousemove",l="mousewheel",f="mouseup",h="resize",a="drag",u="enter",T="up",i="DOMMouseScroll",c="down",m="touchmove",p="Microsoft Internet Explorer"===n.navigator.appName&&/msie 7./i.test(n.navigator.appVersion)&&n.ActiveXObject,d=null,C=n.requestAnimationFrame,y=n.cancelAnimationFrame,O=o.createElement("div").style,A=function(){var t,e,i,s;for(t=i=0,s=(e=["t","webkitT","MozT","msT","OT"]).length;i<s;t=++i)if(e[t],e[t]+"ransform"in O)return e[t].substr(0,e[t].length-1);return!1}(),H=function(t){return!1!==A&&(""===A?t:A+t.charAt(0).toUpperCase()+t.substr(1))}("transform"),x=!1!==H,w=function(){var t,e,i;return(e=(t=o.createElement("div")).style).position="absolute",e.width="100px",e.height="100px",e.overflow=S,e.top="-9999px",o.body.appendChild(t),i=t.offsetWidth-t.clientWidth,o.body.removeChild(t),i},$=function(){var t,e,i;return e=n.navigator.userAgent,!!(t=/(?=.+Mac OS X)(?=.+Firefox)/.test(e))&&((i=/Firefox\/\d{2}\./.exec(e))&&(i=i[0].replace(/\D+/g,"")),t&&23<+i)},r=function(){function t(t,e){this.el=t,this.options=e,d||(d=w()),this.$el=s(this.el),this.doc=s(this.options.documentContext||o),this.win=s(this.options.windowContext||n),this.body=this.doc.find("body"),this.$content=this.$el.children("."+this.options.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}return t.prototype.preventScrolling=function(t,e){if(this.isActive)if(t.type===i)(e===c&&0<t.originalEvent.detail||e===T&&t.originalEvent.detail<0)&&t.preventDefault();else if(t.type===l){if(!t.originalEvent||!t.originalEvent.wheelDelta)return;(e===c&&t.originalEvent.wheelDelta<0||e===T&&0<t.originalEvent.wheelDelta)&&t.preventDefault()}},t.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},t.prototype.updateScrollValues=function(){var t,e;t=this.content,this.maxScrollTop=t.scrollHeight-t.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=t.scrollTop,e=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop<this.previousPosition?"up":"same",this.previousPosition=this.contentScrollTop,"same"!==e&&this.$el.trigger("update",{position:this.contentScrollTop,maximum:this.maxScrollTop,direction:e}),this.iOSNativeScrolling||(this.maxSliderTop=this.paneHeight-this.sliderHeight,this.sliderTop=0===this.maxScrollTop?0:this.contentScrollTop*this.maxSliderTop/this.maxScrollTop)},t.prototype.setOnScrollStyles=function(){var t,e;x?(t={}
7)[H]="translate(0, "+this.sliderTop+"px)":t={top:this.sliderTop},C?(y&&this.scrollRAF&&y(this.scrollRAF),this.scrollRAF=C((e=this,function(){return e.scrollRAF=null,e.slider.css(t)}))):this.slider.css(t)},t.prototype.createEvents=function(){var i,s,e,o,n,l,r,h;this.events={down:(h=this,function(t){return h.isBeingDragged=!0,h.offsetY=t.pageY-h.slider.offset().top,h.slider.is(t.target)||(h.offsetY=0),h.pane.addClass(h.options.activeClass),h.doc.bind(v,h.events[a]).bind(f,h.events.up),h.body.bind(g,h.events[u]),!1}),drag:(r=this,function(t){return r.sliderY=t.pageY-r.$el.offset().top-r.paneTop-(r.offsetY||.5*r.sliderHeight),r.scroll(),r.contentScrollTop>=r.maxScrollTop&&r.prevScrollTop!==r.maxScrollTop?r.$el.trigger("scrollend"):0===r.contentScrollTop&&0!==r.prevScrollTop&&r.$el.trigger("scrolltop"),!1}),up:(l=this,function(t){return l.isBeingDragged=!1,l.pane.removeClass(l.options.activeClass),l.doc.unbind(v,l.events[a]).unbind(f,l.events.up),l.body.unbind(g,l.events[u]),!1}),resize:(n=this,function(t){n.reset()}),panedown:(o=this,function(t){return o.sliderY=(t.offsetY||t.originalEvent.layerY)-.5*o.sliderHeight,o.scroll(),o.events.down(t),!1}),scroll:(e=this,function(t){e.updateScrollValues(),e.isBeingDragged||(e.iOSNativeScrolling||(e.sliderY=e.sliderTop,e.setOnScrollStyles()),null!=t&&(e.contentScrollTop>=e.maxScrollTop?(e.options.preventPageScrolling&&e.preventScrolling(t,c),e.prevScrollTop!==e.maxScrollTop&&e.$el.trigger("scrollend")):0===e.contentScrollTop&&(e.options.preventPageScrolling&&e.preventScrolling(t,T),0!==e.prevScrollTop&&e.$el.trigger("scrolltop"))))}),wheel:(s=this,function(t){var e;if(null!=t)return(e=t.delta||t.wheelDelta||t.originalEvent&&t.originalEvent.wheelDelta||-t.detail||t.originalEvent&&-t.originalEvent.detail)&&(s.sliderY+=-e/3),s.scroll(),!1}),enter:(i=this,function(t){var e;if(i.isBeingDragged)return 1!==(t.buttons||t.which)?(e=i.events).up.apply(e,arguments):void 0})}},t.prototype.addEvents=function(){var t;this.removeEvents(),t=this.events,this.options.disableResize||this.win.bind(h,t[h]),this.iOSNativeScrolling||(this.slider.bind(e,t[c]),this.pane.bind(e,t.panedown).bind(l+" "+i,t.wheel)),this.$content.bind(S+" "+l+" "+i+" "+m,t[S])},t.prototype.removeEvents=function(){var t;t=this.events,this.win.unbind(h,t[h]),this.iOSNativeScrolling||(this.slider.unbind(),this.pane.unbind()),this.$content.unbind(S+" "+l+" "+i+" "+m,t[S])},t.prototype.generate=function(){var t,e,i,s,o;return s=(e=this.options).paneClass,o=e.sliderClass,e.contentClass,(i=this.$el.children("."+s)).length||i.children("."+o).length||this.$el.append('<div class="'+s+'"><div class="'+o+'" /></div>'),this.pane=this.$el.children("."+s),this.slider=this.pane.find("."+o),0===d&&$()?t={right:-14,paddingRight:+n.getComputedStyle(this.content,null).getPropertyValue("padding-right").replace(/[^0-9.]+/g,"")+14}:d&&(t={right:-d},this.$el.addClass(e.enabledClass)),null!=t&&this.$content.css(t),this},t.prototype.restore=function(){this.stopped=!1,this.iOSNativeScrolling||this.pane.show(),this.addEvents()},t.prototype.reset=function(){var t,e,i,s,o,n,l,r,h,c,a;return this.iOSNativeScrolling?void(this.contentHeight=this.content.scrollHeight):(this.$el.find("."+this.options.paneClass).length||this.generate().stop(),this.stopped&&this.restore(),o=(s=(t=this.content).style).overflowY,p&&this.$content.css({height:this.$content.height()}),e=t.scrollHeight+d,0<(h=parseInt(this.$el.css("max-height"),10))&&(this.$el.height(""),this.$el.height(t.scrollHeight>h?h:t.scrollHeight)),l=(n=this.pane.outerHeight(!1))+(r=parseInt(this.pane.css("top"),10))+parseInt(this.pane.css("bottom"),10),(a=Math.round(l/e*n))<this.options.sliderMinHeight?a=this.options.sliderMinHeight:null!=this.options.sliderMaxHeight&&a>this.options.sliderMaxHeight&&(a=this.options.sliderMaxHeight),o===S&&s.overflowX!==S&&(a+=d),this.maxSliderTop=l-a,this.contentHeight=e,this.paneHeight=n,this.paneOuterHeight=l,this.sliderHeight=a,this.paneTop=r,this.slider.height(a),this.events.scroll(),this.pane.show(),this.isActive=!0,t.scrollHeight===t.clientHeight||this.pane.outerHeight(!0)>=t.scrollHeight&&o!==S?(this.pane.hide(),this.isActive=!1):this.el.clientHeight===t.scrollHeight&&o===S?this.slider.hide():this.slider.show(),this.pane.css({opacity:this.options.alwaysVisible?1:"",visibility:this.options.alwaysVisible?"visible":""}),("static"===(i=this.$content.css("position"))||"relative"===i)&&((c=parseInt(this.$content.css("right"),10))&&this.$content.css({right:"",marginRight:c})),this)},t.prototype.scroll=function(){return this.isActive?(this.sliderY=Math.max(0,this.sliderY),this.sliderY=Math.min(this.maxSliderTop,this.sliderY),this.$content.scrollTop(this.maxScrollTop*this.sliderY/this.maxSliderTop),this.iOSNativeScrolling||(this.updateScrollValues(),this.setOnScrollStyles()),this):void 0},t.prototype.scrollBottom=function(t){return this.isActive?(this.$content.scrollTop(this.contentHeight-this.$content.height()-t).trigger(l),this.stop().restore(
vendor: 1,532 bytes, line 7
7),this):void 0},t.prototype.scrollTop=function(t){return this.isActive?(this.$content.scrollTop(+t).trigger(l),this.stop().restore(),this):void 0},t.prototype.scrollTo=function(t){return this.isActive?(this.scrollTop(this.$el.find(t).get(0).offsetTop),this):void 0},t.prototype.stop=function(){return y&&this.scrollRAF&&(y(this.scrollRAF),this.scrollRAF=null),this.stopped=!0,this.removeEvents(),this.iOSNativeScrolling||this.pane.hide(),this},t.prototype.destroy=function(){return this.stopped||this.stop(),!this.iOSNativeScrolling&&this.pane.length&&this.pane.remove(),p&&this.$content.height(""),this.$content.removeAttr("tabindex"),this.$el.hasClass(this.options.enabledClass)&&(this.$el.removeClass(this.options.enabledClass),this.$content.css({right:""})),this},t.prototype.flash=function(){return!this.iOSNativeScrolling&&this.isActive?(this.reset(),this.pane.addClass(this.options.flashedClass),setTimeout((t=this,function(){t.pane.removeClass(t.options.flashedClass)}),this.options.flashDelay),this):void 0;var t},t}(),s.fn.nanoScroller=function(i){return this.each(function(){var t,e;if((e=this.nanoscroller)||(t=s.extend({},b,i),this.nanoscroller=e=new r(this,t)),i&&"object"==typeof i){if(s.extend(e.options,i),null!=i.scrollBottom)return e.scrollBottom(i.scrollBottom);if(null!=i.scrollTop)return e.scrollTop(i.scrollTop);if(i.scrollTo)return e.scrollTo(i.scrollTo);if("bottom"===i.scroll)return e.scrollBottom(0);if("top"===i.scroll)return e.scrollTop(0);if(i.scroll&&i.scroll instanceof s)return e.scrollTo(i.scroll);
7if(i.stop)return e.stop();if(i.destroy)return e.destroy();if(i.flash)return e.flash()}return e.reset()})},s.fn.nanoScroller.Constructor=r});
8!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(n){var e=function(){if(n&&n.fn&&n.fn.mselect2&&n.fn.mselect2.amd)var e=n.fn.mselect2.amd;var t,o,c,u;return e&&e.requirejs||(e?c=e:e={},function(p){function h(e,t){return n.call(e,t)}function s(e,t){var n,i,o,r,s,a,l,c,u,d,p,h=t&&t.split("/"),f=$.map,g=f&&f["*"]||{};if(e&&"."===e.charAt(0))if(t){for(s=(e=e.split("/")).length-1,$.nodeIdCompat&&x.test(e[s])&&(e[s]=e[s].replace(x,"")),e=h.slice(0,h.length-1).concat(e),u=0;u<e.length;u+=1)if("."===(p=e[u]))e.splice(u,1),u-=1;else if(".."===p){if(1===u&&(".."===e[2]||".."===e[0]))break;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||g)&&f){for(u=(n=e.split("/")).length;0<u;u-=1){if(i=n.slice(0,u).join("/"),h)for(d=h.length;0<d;d-=1)if((o=f[h.slice(0,d).join("/")])&&(o=o[i])){r=o,a=u;break}if(r)break;!l&&g&&g[i]&&(l=g[i],c=u)}!r&&l&&(r=l,a=c),r&&(n.splice(0,a,r),e=n.join("/"))}return e}function f(t,n){return function(){var e=i.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),l.apply(p,e.concat([t,n]))}}function g(t){return function(e){_[t]=e}}function m(e){if(h(w,e)){var t=w[e];delete w[e],b[e]=!0,r.apply(p,t)}if(!h(_,e)&&!h(b,e))throw new Error("No "+e);return _[e]}function a(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}var r,l,v,y,_={},w={},$={},b={},n=Object.prototype.hasOwnProperty,i=[].slice,x=/\.js$/;v=function(e,t){var n,i,o=a(e),r=o[0];return e=o[1],r&&(n=m(r=s(r,t))),r?e=n&&n.normalize?n.normalize(e,(i=t,function(e){return s(e,i)})):s(e,t):(r=(o=a(e=s(e,t)))[0],e=o[1],r&&(n=m(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},y={require:function(e){return f(e)},exports:function(e){var t=_[e];return void 0!==t?t:_[e]={}},module:function(e){return{id:e,uri:"",exports:_[e],config:(t=e,function(){return $&&$.config&&$.config[t]||{}})};var t}},r=function(e,t,n,i){var o,r,s,a,l,c,u=[],d=typeof n;if(i=i||e,"undefined"===d||"function"===d){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(r=(a=v(t[l],i)).f))u[l]=y.require(e);else if("exports"===r)u[l]=y.exports(e),c=!0;else if("module"===r)o=u[l]=y.module(e);else if(h(_,r)||h(w,r)||h(b,r))u[l]=m(r);else{if(!a.p)throw new Error(e+" missing "+r);a.p.load(a.n,f(i,!0),g(r),{}),u[l]=_[r]}s=n?n.apply(_[e],u):void 0,e&&(o&&o.exports!==p&&o.exports!==_[e]?_[e]=o.exports:s===p&&c||(_[e]=s))}else e&&(_[e]=n)},o=c=l=function(e,t,n,i,o){if("string"==typeof e)return y[e]?y[e](t):m(v(e,t).f);if(!e.splice){if(($=e).deps&&l($.deps,$.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=i,i=o),i?r(p,e,t,n):setTimeout(function(){r(p,e,t,n)},4),l},l.config=function(e){return l(e)},o._defined=_,(u=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),h(_,e)||h(w,e)||(w[e]=[e,t,n])}).amd={jQuery:!0}}(),e.requirejs=o,e.require=c,e.define=u),e.define("almond",function(){}),e.define("jquery",[],function(){var e=n||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(r){function u(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&"constructor"!==i&&n.push(i)}return n}var e={Extend:function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var o in t)i.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},Decorate:function(i,o){function r(){var e=Array.prototype.unshift,t=o.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=o.prototype.constructor),n.apply(this,arguments)}var e=u(o),t=u(i);o.displayName=i.displayName,r.prototype=new function(){this.constructor=r};for(var n=0;n<t.length;n++){var s=t[n];r.prototype[s]=i.prototype[s]}for(var a=function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var n=o.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}},l=0;l<e.length;l++){var c=e[l];r.prototype[c]=a(c)}return r}},t=function(){this.listeners={}};return t.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},t.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1
8);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},t.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},e.Observable=t,e.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},e.bind=function(e,t){return function(){e.apply(t,arguments)}},e._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var o=0;o<n.length;o++){var r=n[o];(r=r.substring(0,1).toLowerCase()+r.substring(1))in i||(i[r]={}),o==n.length-1&&(i[r]=e[t]),i=i[r]}delete e[t]}}return e},e.hasScroll=function(e,t){var n=r(t),i=t.style.overflowX,o=t.style.overflowY;return(i!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===i||"scroll"===o||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},e.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){if("1.7"===r.fn.jquery.substr(0,3)){var n=r();r.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},e}),e.define("select2/results",["jquery","./utils"],function(p,e){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=p('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=p('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],o=this.option(i);t.push(o)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".select2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var t=this;this.data.current(function(e){var i=p.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=p(this),t=p.data(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<p.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var n={role:"treeitem","aria-selected":"false"};for(var i in e.disabled&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var o=n[i];t.setAttribute(i,o)}if(e.children){var r=p(t),s=document.createElement("strong");s.className="select2-results__group",p(s),this.template(e,s);for(var a=[],l=0;l<e.children.length;l++){var c=e.children[l],u=this.option(c);a.push(u)}var d=p("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});d.append(a),r.append(s),r.append(d)}else this.template(e,t);return p.data(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}
vendor: 4,734 bytes, line 8
8),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var o=t.eq(i);o.trigger("mouseenter");var r=l.$results.offset().top,s=o.offset().top,a=l.$results.scrollTop()+(s-r);0===i?l.$results.scrollTop(0):s-r<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var o=l.$results.offset().top+l.$results.outerHeight(!1),r=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+r-o;0===n?l.$results.scrollTop(0):o<r&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),p.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,o=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):o&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=p(this),n=t.data("data");return"true"===t.attr("aria-selected")?void(l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})):void l.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=p(this).data("data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:p(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,o=this.$results.scrollTop()+(i-n),r=i-n;o-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(r>this.$results.outerHeight()||r<0)&&this.$results.scrollTop(o)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),o=n(e,t);null==o?t.style.display="none":"string"==typeof o?t.innerHTML=i(o):p(t).append(o)},i}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,e,o){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},i.prototype.bind=function(e,t){var n=this,i=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===o.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","fal
8se"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){var e=n(this);this!=t[0]&&e.data("element").mselect2("close")})})},i.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},o.prototype.bind=function(t,e){var n=this;o.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(e){n.update(e.data)})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},o}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function o(e,t){o.__super__.constructor.apply(this,arguments)}return a.Extend(o,e),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},o.prototype.bind=function(e,t){var n=this;o.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!n.options.get("disabled")){var t=i(this).parent().data("data");n.trigger("unselect",{originalEvent:e,data:t})}})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},o.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var i=e[n],o=this.selectionContainer(),r=this.display(i,o);o.append(r),o.prop("title",i.title||i.text),o.data("data",i),t.push(o)}var s=this.$selection.find(".select2-selection__rendered");a.appendMany(s,t)}},o}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}
vendor: 8,679 bytes, line 8
8),e.define("select2/selection/allowClear",["jquery","../keys"],function(i,o){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),o=0;o<i.length;o++){var r={data:i[o]};if(this.trigger("unselect",r),r.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||(t.which==o.DELETE||t.which==o.BACKSPACE)&&this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=i('<span class="select2-selection__clear">&times;</span>');n.data("data",t),this.$selection.find(".select2-selection__rendered").prepend(n)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(i,e,s){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=i('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===s.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var n=t.data("data");i.searchRemoveChoice(n),e.preventDefault()}}});var o=document.documentMode,r=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){return r?void i.$selection.off("input.search input.searchcheck"):void i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(r&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=s.SHIFT&&t!=s.CTRL&&t!=s.ALT&&t!=s.TAB&&i.handleSearch(e)}})},t.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},t.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},t.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},t.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},t.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},t.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},t}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var i=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting"],r=["opening","closing","selecting","unselecting"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,o)){t=t||{};var n=s.Event("select2:"+e,{params:t});i.$element.trigger(n),-1!==s.inArray(e,r)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"
8V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("select2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return(n+=i.generateChars(4))+(null!=t.id?"-"+t.id.toString():"-"+i.generateChars(4))},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,t,a){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,e),n.prototype.current=function(e){var n=[],i=this;this.$element.find(":selected").each(function(){var e=a(this),t=i.item(e);n.push(t)}),e(n)},n.prototype.select=function(o){var r=this;if(o.selected=!0,a(o.element).is("option"))return o.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(o=[o]).push.apply(o,e);for(var n=0;n<o.length;n++){var i=o[n].id;-1===a.inArray(i,t)&&t.push(i)}r.$element.val(t),r.$element.trigger("change")});else{var e=o.id;this.$element.val(e),this.$element.trigger("change")}},n.prototype.unselect=function(o){var r=this;if(this.$element.prop("multiple"))return o.selected=!1,a(o.element).is("option")?(o.element.selected=!1,void this.$element.trigger("change")):void this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==o.id&&-1===a.inArray(i,t)&&t.push(i)}r.$element.val(t),r.$element.trigger("change")})},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.removeData(this,"data")})},n.prototype.query=function(i,e){var o=[],r=this;this.$element.children().each(function(){var e=a(this);if(e.is("option")||e.is("optgroup")){var t=r.item(e),n=r.matches(i,t);null!==n&&o.push(n)}}),e({results:o})},n.prototype.addOptions=function(e){t.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=a(t),i=this._normalizeItem(e);return i.element=t,a.data(t,"data",i),n},n.prototype.item=function(e){var t={};if(null!=(t=a.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),i=[],o=0;o<n.length;o++){var r=a(n[o]),s=this.item(r);i.push(s)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.data(e[0],"data",t),t},n.prototype._normalizeItem=function(e){a.isPlainObject(e)||(e={id:e,text:e});return null!=(e=a.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),a.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,f,g){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return f.Extend(i,e),i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){function t(e){return function(){return g(this).val()==e.id}}for(var n=this,i=this.$element.find("option"),o=i.map(function(){return n.item(g(this)).id}).get(),r=[],s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=g.inArray(a.id,o)){var l=i.filter(t(a)),c=this.item(l),u=g.extend(!0,{},a,c),d=this.option(u);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);f.appendMany(p,h)}r.push(p)}}return r},i}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,r){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return r.extend({},e,{q:e.term})},transport:function(e,t,n){var i=r.ajax(e);return i.then(t),i.fail(n),i}};return r.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){function e(){var e=t.transport(t,function(e){var t=o.processResults(e,n);o.options.get("debug")&&window.console&&console.error&&(t&&t.results&&r.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){e.status&&"0"===e.status||o.trigger("results:message",{message:"errorLoading"})});o._request=e}var o=this;null!=this._request&&(r.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=r.extend({type:"GET"},this.ajaxOptions);"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(u){function e(e,t,n){var i=n.get("tags"),o=n.get("createTag");void 0!==o&&(this.createTag=o);var r=n.get("insertTag");if(void 0!==r&&(this.insertTag=r),e.call(this,t,n),u.isArray(i))for(var s=0;s<i.length;
8s++){var a=i[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,u){var d=this;return this._removeOldTags(),null==c.term||null!=c.page?void e.call(this,c,u):void e.call(this,c,function e(t,n){for(var i=t.results,o=0;o<i.length;o++){var r=i[o],s=null!=r.children&&!e({results:r.children},!0);if(r.text===c.term||s)return!n&&(t.data=i,void u(t))}if(n)return!0;var a=d.createTag(c);if(null!=a){var l=d.option(a);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(i,a)}t.results=i,u(t)})},e.prototype.createTag=function(e,t){var n=u.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){(this._lastTag,this.$element.find("option[data-select2-tag]")).each(function(){this.selected||u(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(d){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var o=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=o._normalizeItem(e);if(!o.$element.find("option").filter(function(){return d(this).val()===n.id}).length){var i=o.option(n);i.attr("data-select2-tag",!0),o._removeOldTags(),o.addOptions([i])}t=n,o.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.focus()),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var o=n.get("tokenSeparators")||[],r=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<r.length;){var l=r[s];if(-1!==d.inArray(l,o)){var c=r.substr(0,s),u=a(d.extend({},t,{term:c}));null!=u?(i(u),r=r.substr(s+1)||"",s=0):s++}else s++}return{term:r}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(n,i,o){var r=this;this.current(function(e){var t=null!=e?e.length:0;return 0<r.maximumSelectionLength&&t>=r.maximumSelectionLength?void r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):void n.call(r,i,o)})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}
vendor: 4,973 bytes, line 8
8),t.on("focus",function(){t.isOpen()&&i.$search.focus()}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var o=t[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(o){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var e=o.contains(document.documentElement,i.$loadingMore[0]);if(!i.loading&&e){var t=i.$results.offset().top+i.$results.outerHeight(!1);i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=t+50&&i.loadMore()}})},e.prototype.loadMore=function(){this.loading=!0;var e=o.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=o('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||f(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this,o=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),o||(o=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,o="resize.select2."+t.id,r="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){f(this).data("select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(i,function(e){var t=f(this).data("select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(i+" "+o+" "+r,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+i+" "+o)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=o.top,r.bottom=o.top+r.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<o.top-s,u=l>o.bottom+s,d={left:o.left,top:r.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();d.top-=h.top,d.left-=h.left,t||n||(i="below"),u||!c||t?!c&&u&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.top=r.top-h.top-s),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(d)}
vendor: 18,523 bytes, line 8
8,e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var o=t[i];o.children?n+=e(o.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var o=i.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(f,g,m,v,y,_,w,$,b,x,A,t,C,S,O,E,D,T,q,j,L,k,P,I,M,R,z,H,e){function n(){this.reset()}return n.prototype.apply=function(t){if(null==(t=f.extend(!0,{},this.defaults,t)).dataAdapter){if(null!=t.ajax?t.dataAdapter=O:null!=t.data?t.dataAdapter=S:t.dataAdapter=C,0<t.minimumInputLength&&(t.dataAdapter=x.Decorate(t.dataAdapter,T)),0<t.maximumInputLength&&(t.dataAdapter=x.Decorate(t.dataAdapter,q)),0<t.maximumSelectionLength&&(t.dataAdapter=x.Decorate(t.dataAdapter,j)),t.tags&&(t.dataAdapter=x.Decorate(t.dataAdapter,E)),(null!=t.tokenSeparators||null!=t.tokenizer)&&(t.dataAdapter=x.Decorate(t.dataAdapter,D)),null!=t.query){var e=g(t.amdBase+"compat/query");t.dataAdapter=x.Decorate(t.dataAdapter,e)}if(null!=t.initSelection){var n=g(t.amdBase+"compat/initSelection");t.dataAdapter=x.Decorate(t.dataAdapter,n)}}if(null==t.resultsAdapter&&(t.resultsAdapter=m,null!=t.ajax&&(t.resultsAdapter=x.Decorate(t.resultsAdapter,I)),null!=t.placeholder&&(t.resultsAdapter=x.Decorate(t.resultsAdapter,P)),t.selectOnClose&&(t.resultsAdapter=x.Decorate(t.resultsAdapter,z))),null==t.dropdownAdapter){if(t.multiple)t.dropdownAdapter=L;else{var i=x.Decorate(L,k);t.dropdownAdapter=i}if(0!==t.minimumResultsForSearch&&(t.dropdownAdapter=x.Decorate(t.dropdownAdapter,R)),t.closeOnSelect&&(t.dropdownAdapter=x.Decorate(t.dropdownAdapter,H)),null!=t.dropdownCssClass||null!=t.dropdownCss||null!=t.adaptDropdownCssClass){var o=g(t.amdBase+"compat/dropdownCss");t.dropdownAdapter=x.Decorate(t.dropdownAdapter,o)}t.dropdownAdapter=x.Decorate(t.dropdownAdapter,M)}if(null==t.selectionAdapter){if(t.multiple?t.selectionAdapter=y:t.selectionAdapter=v,null!=t.placeholder&&(t.selectionAdapter=x.Decorate(t.selectionAdapter,_)),t.allowClear&&(t.selectionAdapter=x.Decorate(t.selectionAdapter,w)),t.multiple&&(t.selectionAdapter=x.Decorate(t.selectionAdapter,$)),null!=t.containerCssClass||null!=t.containerCss||null!=t.adaptContainerCssClass){var r=g(t.amdBase+"compat/containerCss");t.selectionAdapter=x.Decorate(t.selectionAdapter,r)}t.selectionAdapter=x.Decorate(t.selectionAdapter,b)}if("string"==typeof t.language)if(0<t.language.indexOf("-")){var s=t.language.split("-")[0];t.language=[t.language,s]}else t.language=[t.language];if(f.isArray(t.language)){var a=new A;t.language.push("en");for(var l=t.language,c=0;c<l.length;c++){var u=l[c],d={};try{d=A.loadPath(u)}catch(e){try{u=this.defaults.amdLanguageBase+u,d=A.loadPath(u)}catch(e){t.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+u+'" could not be automatically loaded. A fallback will be used instead.');continue}}a.extend(d)}t.translations=a}else{var p=A.loadPath(this.defaults.amdLanguageBase+"en"),h=new A(t.language);h.extend(p),t.translations=h}return t},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:x.escapeMarkup,language:e,matcher:function e(t,n){if(""===f.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=f.extend(!0,{},n),o=n.children.length-1;0<=o;o--)null==e(t,n.children[o])&&i.children.splice(o,1);return 0<i.children.length?i:e(t,i)}var r=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<r.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.set=function(e,t){var n={};n[f.camelCase(e)]=t;var i=x._convertData(n);f.extend(this.defaults,i)},new n}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(i,r,o,s){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),this.options=o.apply(this.options),t&&t.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=s.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var n;n=r.fn.jquery&&"1."==r.fn.jquery.substr(0,2)&&e[0].dataset?r.extend(!0,{},e[0].dataset,e.data()):e.data();var i=r.extend(!0,{},n);for(var o in i=s._convertData(i))-1<r.inArray(o,t)||(r.isPlainObject(this.options[o])?r.extend(this.options[o],i[o]):this.options[o]=i[o]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(o,c,n,i){var u=function(e,t){null!=e.data("select2")&&e.data("select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),u.__super__.constructor.call(this);var n=e.attr("tabindex")||0;e.data("old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var o=this.render();this._placeContainer(o);var r=this.options.get("selectionAdapter");this.selection=new r(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,o);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,o);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("select2",this)};return n.Extend(u,n.Observable),u.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},u.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},u.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"!=t)return t;var r=e.attr("style");if("string"!=typeof r)return null;for(var s=r.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null},u.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},u.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){o.each(e,t._syncA),o.each(e,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},u.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},u.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===o.inArray(e,i)&&n.trigger(e,t)})},u.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},u.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},u.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;t===i.ENTER&&(e.ctrlKey||e.metaKey)&&(n.close()||MapSVG.formBuilder.save()),t!==i.ESC||n.isOpen()||n.close()||MapSVG.formBuilder.close(),n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(),e.preventDefault()):t!==i.ENTER||e.ctrlKey||e.metaKey?t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(n.trigger("results:select",{}),e.preventDefault()):(t===(i.ENTER&&!e.ctrlKey&&!e.metaKey)||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},u.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},u.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var o=0;o<t.addedNodes.length;o++){t.addedNodes[o].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},u.prototype.trigger=function(e,t){var n=u.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var o=i[e],r={prevented:!1,name:e,args:t};if(n.call(this,o,r),r.prevented)return void(t.prevented=!0)}n.call(this,e,t)},u.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},u.prototype.open=function(){this.isOpen()||this.trigger("query",{})},u.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},u.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},u.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},u.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},u.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==e||0===e.length)&&(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},u.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},u.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("change")},u.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},u.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),e.data("element",this.$element),e},u}),e.define("select2/compat/utils",["jquery"],function(s){return{syncCssClasses:function(e,t,n){var i,o,r=[];(i=s.trim(e.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&r.push(this)}),(i=s.trim(t.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(o=n(this))&&r.push(o)}),e.attr("class",r.join(" "))}}}),e.define("select2/compat/containerCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("containerCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptContainerCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var o=i;i=function(e){var t=o(e);return null!=t?t+" "+e:e}}
vendor: 2,676 bytes, line 8
8var r=this.options.get("containerCss")||{};return s.isFunction(r)&&(r=r(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(r),t.addClass(n),t},e}),e.define("select2/compat/dropdownCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptDropdownCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var o=i;i=function(e){var t=o(e);return null!=t?t+" "+e:e}}var r=this.options.get("dropdownCss")||{};return s.isFunction(r)&&(r=r(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(r),t.addClass(n),t},e}),e.define("select2/compat/initSelection",["jquery"],function(i){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return e.prototype.current=function(e,t){var n=this;return this._isInitialized?void e.call(this,t):void this.initSelection.call(null,this.$element,function(e){n._isInitialized=!0,i.isArray(e)||(e=[e]),t(e)})},e}),e.define("select2/compat/inputData",["jquery"],function(s){function e(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),e.call(this,t,n)}return e.prototype.current=function(e,t){function i(e,t){var n=[];return e.selected||-1!==s.inArray(e.id,t)?(e.selected=!0,n.push(e)):e.selected=!1,e.children&&n.push.apply(n,i(e.children,t)),n}for(var n=[],o=0;o<this._currentData.length;o++){var r=this._currentData[o];n.push.apply(n,i(r,this.$element.val().split(this._valueSeparator)))}t(n)},e.prototype.select=function(e,t){if(this.options.get("multiple")){var n=this.$element.val();n+=this._valueSeparator+t.id,this.$element.val(n),this.$element.trigger("change")}else this.current(function(e){s.map(e,function(e){e.selected=!1})}),this.$element.val(t.id),this.$element.trigger("change")},e.prototype.unselect=function(e,o){var r=this;o.selected=!1,this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];o.id!=i.id&&t.push(i.id)}
vendor: 5,232 bytes, line 8
8r.$element.val(t.join(r._valueSeparator)),r.$element.trigger("change")})},e.prototype.query=function(e,t,n){for(var i=[],o=0;o<this._currentData.length;o++){var r=this._currentData[o],s=this.matches(t,r);null!==s&&i.push(s)}n({results:i})},e.prototype.addOptions=function(e,t){var n=s.map(t,function(e){return s.data(e[0],"data")});this._currentData.push.apply(this._currentData,n)},e}),e.define("select2/compat/matcher",["jquery"],function(s){return function(r){return function(e,t){var n=s.extend(!0,{},t);if(null==e.term||""===s.trim(e.term))return n;if(t.children){for(var i=t.children.length-1;0<=i;i--){var o=t.children[i];r(e.term,o.text,o)||n.children.splice(i,1)}if(0<n.children.length)return n}return r(e.term,t.text,t)?n:null}}}),e.define("select2/compat/query",[],function(){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n,this.options.get("query").call(null,t)},e}),e.define("select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t.addClass("select2-dropdown--below"),n.addClass("select2-container--below")},e}),e.define("select2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),e.define("select2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),t=function(p){function t(e){var t=e||window.event,n=v.call(arguments,1),i=0,o=0,r=0,s=0,a=0,l=0;if((e=p.event.fix(t)).type="mousewheel","detail"in t&&(r=-1*t.detail),"wheelDelta"in t&&(r=t.wheelDelta),"wheelDeltaY"in t&&(r=t.wheelDeltaY),"wheelDeltaX"in t&&(o=-1*t.wheelDeltaX),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(o=-1*r,r=0),i=0===r?o:r,"deltaY"in t&&(i=r=-1*t.deltaY),"deltaX"in t&&(o=t.deltaX,0===r&&(i=-1*o)),0!==r||0!==o){if(1===t.deltaMode){var c=p.data(this,"mousewheel-line-height");i*=c,r*=c,o*=c}else if(2===t.deltaMode){var u=p.data(this,"mousewheel-page-height");i*=u,r*=u,o*=u}if(s=Math.max(Math.abs(r),Math.abs(o)),(!m||s<m)&&(f(t,m=s)&&(m/=40)),f(t,s)&&(i/=40,o/=40,r/=40),i=Math[1<=i?"floor":"ceil"](i/m),o=Math[1<=o?"floor":"ceil"](o/m),r=Math[1<=r?"floor":"ceil"](r/m),y.settings.normalizeOffset&&this.getBoundingClientRect){var d=this.getBoundingClientRect();a=e.clientX-d.left,l=e.clientY-d.top}return e.deltaX=o,e.deltaY=r,e.deltaFactor=m,e.offsetX=a,e.offsetY=l,e.deltaMode=0,n.unshift(e,i,o,r),g&&clearTimeout(g),g=setTimeout(h,200),(p.event.dispatch||p.event.handle).apply(this,n)}}function h(){m=null}function f(e,t){return y.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var g,m,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],n="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],v=Array.prototype.slice;if(p.event.fixHooks)for(var i=e.length;i;)p.event.fixHooks[e[--i]]=p.event.mouseHooks;var y=p.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=n.length;e;)this.addEventListener(n[--e],t,!1);else this.onmousewheel=t;p.data(this,"mousewheel-line-height",y.getLineHeight(this)),p.data(this,"mousewheel-page-height",y.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=n.length;e;)this.removeEventListener(n[--e],t,!1);else this.onmousewheel=null;p.removeData(this,"mousewheel-line-height"),p.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=p(e),n=t["offsetParent"in p.fn?"offsetParent":"parent"]();return n.length||(n=p("body")),parseInt(n.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return p(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};p.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof e.define&&e.define.amd?e.define("jquery-mousewheel",["jquery"],t):"object"==typeof exports?module.exports=t:t(n),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(o,e,r,t){if(null==o.fn.mselect2){var s=["open","close","destroy"];o.fn.mselect2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=o.extend(!0,{},t);new r(o(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);
vendor: 457 bytes, line 8
8var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o(this).data("select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,i)}),-1<o.inArray(t,s)?this:n}}return null==o.fn.mselect2.defaults&&(o.fn.mselect2.defaults=t),r}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return n.fn.mselect2.amd=e,t});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.