403Webshell
Server IP : 198.71.59.75  /  Your IP : 216.73.216.240
Web Server : nginx/1.30.2
System : Linux elegant-dhawan.198-71-59-75.plesk.page 5.15.0-105-generic #115-Ubuntu SMP Mon Apr 15 09:52:04 UTC 2024 x86_64
User : realtyna_guys ( 10000)
PHP Version : 8.2.31
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/vhosts/agenttango.com/httpdocs/wp-content/boost-cache/static/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/agenttango.com/httpdocs/wp-content/boost-cache/static/fadaf1638b.min.js
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=t()}}(function(){return function i(s,h,l){function o(e,t){if(!h[e]){if(!s[e]){var a="function"==typeof require&&require;if(!t&&a)return a(e,!0);if(_)return _(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var r=h[e]={exports:{}};s[e][0].call(r.exports,function(t){return o(s[e][1][t]||t)},r,r.exports,i,s,h,l)}return h[e].exports}for(var _="function"==typeof require&&require,t=0;t<l.length;t++)o(l[t]);return o}({1:[function(t,e,a){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;a.assign=function(t){for(var e,a,n=Array.prototype.slice.call(arguments,1);n.length;){var r=n.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)e=r,a=i,Object.prototype.hasOwnProperty.call(e,a)&&(t[i]=r[i])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,a,n,r){if(e.subarray&&t.subarray)t.set(e.subarray(a,a+n),r);else for(var i=0;i<n;i++)t[r+i]=e[a+i]},flattenChunks:function(t){var e,a,n,r,i,s;for(e=n=0,a=t.length;e<a;e++)n+=t[e].length;for(s=new Uint8Array(n),e=r=0,a=t.length;e<a;e++)i=t[e],s.set(i,r),r+=i.length;return s}},i={arraySet:function(t,e,a,n,r){for(var i=0;i<n;i++)t[r+i]=e[a+i]},flattenChunks:function(t){return[].concat.apply([],t)}};a.setTyped=function(t){t?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,r)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,i))},a.setTyped(n)},{}],2:[function(t,e,a){"use strict";var l=t("./common"),r=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){i=!1}for(var o=new l.Buf8(256),n=0;n<256;n++)o[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;function _(t,e){if(e<65534&&(t.subarray&&i||!t.subarray&&r))return String.fromCharCode.apply(null,l.shrinkBuf(t,e));for(var a="",n=0;n<e;n++)a+=String.fromCharCode(t[n]);return a}o[254]=o[254]=1,a.string2buf=function(t){var e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<s&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new l.Buf8(h),r=i=0;i<h;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<s&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),a<128?e[i++]=a:(a<2048?e[i++]=192|a>>>6:(a<65536?e[i++]=224|a>>>12:(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63),e[i++]=128|a>>>6&63),e[i++]=128|63&a);return e},a.buf2binstring=function(t){return _(t,t.length)},a.binstring2buf=function(t){for(var e=new l.Buf8(t.length),a=0,n=e.length;a<n;a++)e[a]=t.charCodeAt(a);return e},a.buf2string=function(t,e){var a,n,r,i,s=e||t.length,h=new Array(2*s);for(a=n=0;a<s;)if((r=t[a++])<128)h[n++]=r;else if(4<(i=o[r]))h[n++]=65533,a+=i-1;else{for(r&=2===i?31:3===i?15:7;1<i&&a<s;)r=r<<6|63&t[a++],i--;1<i?h[n++]=65533:r<65536?h[n++]=r:(r-=65536,h[n++]=55296|r>>10&1023,h[n++]=56320|1023&r)}return _(h,n)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+o[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){"use strict";e.exports=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3<a?2e3:a;i=i+(r=r+e[n++]|0)|0,--s;);r%=65521,i%=65521}return r|i<<16|0}},{}],4:[function(t,e,a){"use strict";var h=function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,n){var r=h,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t}},{}],5:[function(t,e,a){"use strict";var l,u=t("../utils/common"),o=t("./trees"),f=t("./adler32"),c=t("./crc32"),n=t("./messages"),_=0,d=4,p=0,g=-2,m=-1,b=4,r=2,v=8,w=9,i=286,s=30,h=19,y=2*i+1,k=15,z=3,x=258,B=x+z+1,A=42,C=113,S=1,j=2,E=3,U=4;function D(t,e){return t.msg=n[e],e}function I(t){return(t<<1)-(4<t?9:0)}function O(t){for(var e=t.length;0<=--e;)t[e]=0}function q(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(u.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function T(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,q(t.strm)}function L(t,e){t.pending_buf[t.pending++]=e}function N(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function R(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-B?t.strstart-(t.w_size-B):0,o=t.window,_=t.w_mask,d=t.prev,u=t.strstart+x,f=o[i+s-1],c=o[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(o[(a=e)+s]===c&&o[a+s-1]===f&&o[a]===o[i]&&o[++a]===o[i+1]){i+=2,a++;do{}while(o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&i<u);if(n=x-(u-i),i=u-x,s<n){if(t.match_start=e,h<=(s=n))break;f=o[i+s-1],c=o[i+s]}}}while((e=d[e&_])>l&&0!=--r);return s<=t.lookahead?s:t.lookahead}function H(t){var e,a,n,r,i,s,h,l,o,_,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-B)){for(u.arraySet(t.window,t.window,d,d,0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;n=t.head[--e],t.head[e]=d<=n?n-d:0,--a;);for(e=a=d;n=t.prev[--e],t.prev[e]=d<=n?n-d:0,--a;);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,h=t.window,l=t.strstart+t.lookahead,o=r,_=void 0,_=s.avail_in,o<_&&(_=o),a=0===_?0:(s.avail_in-=_,u.arraySet(h,s.input,s.next_in,_,l),1===s.state.wrap?s.adler=f(s.adler,h,_,l):2===s.state.wrap&&(s.adler=c(s.adler,h,_,l)),s.next_in+=_,s.total_in+=_,_),t.lookahead+=a,t.lookahead+t.insert>=z)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+z-1])&t.hash_mask,t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<z)););}while(t.lookahead<B&&0!==t.strm.avail_in)}function F(t,e){for(var a,n;;){if(t.lookahead<B){if(H(t),t.lookahead<B&&e===_)return S;if(0===t.lookahead)break}if(a=0,t.lookahead>=z&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+z-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-B&&(t.match_length=R(t,a)),t.match_length>=z)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-z),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=z){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+z-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=t.strstart<z-1?t.strstart:z-1,e===d?(T(t,!0),0===t.strm.avail_out?E:U):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?S:j}function K(t,e){for(var a,n,r;;){if(t.lookahead<B){if(H(t),t.lookahead<B&&e===_)return S;if(0===t.lookahead)break}if(a=0,t.lookahead>=z&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+z-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=z-1,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-B&&(t.match_length=R(t,a),t.match_length<=5&&(1===t.strategy||t.match_length===z&&4096<t.strstart-t.match_start)&&(t.match_length=z-1)),t.prev_length>=z&&t.match_length<=t.prev_length){for(r=t.strstart+t.lookahead-z,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-z),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+z-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=z-1,t.strstart++,n&&(T(t,!1),0===t.strm.avail_out))return S}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&T(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return S}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<z-1?t.strstart:z-1,e===d?(T(t,!0),0===t.strm.avail_out?E:U):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?S:j}function M(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}function P(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new u.Buf16(2*y),this.dyn_dtree=new u.Buf16(2*(2*s+1)),this.bl_tree=new u.Buf16(2*(2*h+1)),O(this.dyn_ltree),O(this.dyn_dtree),O(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new u.Buf16(k+1),this.heap=new u.Buf16(2*i+1),O(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new u.Buf16(2*i+1),O(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function G(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=r,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?A:C,t.adler=2===e.wrap?0:1,e.last_flush=_,o._tr_init(e),p):D(t,g)}function J(t){var e,a=G(t);return a===p&&((e=t.state).window_size=2*e.w_size,O(e.head),e.max_lazy_match=l[e.level].max_lazy,e.good_match=l[e.level].good_length,e.nice_match=l[e.level].nice_length,e.max_chain_length=l[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=z-1,e.match_available=0,e.ins_h=0),a}function Q(t,e,a,n,r,i){if(!t)return g;var s=1;if(e===m&&(e=6),n<0?(s=0,n=-n):15<n&&(s=2,n-=16),r<1||w<r||a!==v||n<8||15<n||e<0||9<e||i<0||b<i)return D(t,g);8===n&&(n=9);var h=new P;return(t.state=h).strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+z-1)/z),h.window=new u.Buf8(2*h.w_size),h.head=new u.Buf16(h.hash_size),h.prev=new u.Buf16(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new u.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,J(t)}l=[new M(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===_)return S;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,T(t,!1),0===t.strm.avail_out))return S;if(t.strstart-t.block_start>=t.w_size-B&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):(t.strstart>t.block_start&&(T(t,!1),t.strm.avail_out),S)}),new M(4,4,8,4,F),new M(4,5,16,8,F),new M(4,6,32,32,F),new M(4,4,16,16,K),new M(8,16,32,32,K),new M(8,16,128,128,K),new M(8,32,128,256,K),new M(32,128,258,1024,K),new M(32,258,258,4096,K)],a.deflateInit=function(t,e){return Q(t,e,v,15,8,0)},a.deflateInit2=Q,a.deflateReset=J,a.deflateResetKeep=G,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,p):g},a.deflate=function(t,e){var a,n,r,i;if(!t||!t.state||5<e||e<0)return t?D(t,g):g;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||666===n.status&&e!==d)return D(t,0===t.avail_out?-5:g);if(n.strm=t,a=n.last_flush,n.last_flush=e,n.status===A)if(2===n.wrap)t.adler=0,L(n,31),L(n,139),L(n,8),n.gzhead?(L(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),L(n,255&n.gzhead.time),L(n,n.gzhead.time>>8&255),L(n,n.gzhead.time>>16&255),L(n,n.gzhead.time>>24&255),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(L(n,255&n.gzhead.extra.length),L(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=c(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(L(n,0),L(n,0),L(n,0),L(n,0),L(n,0),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,3),n.status=C);else{var s=v+(n.w_bits-8<<4)<<8;s|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(s|=32),s+=31-s%31,n.status=C,N(n,s),0!==n.strstart&&(N(n,t.adler>>>16),N(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(r=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending!==n.pending_buf_size));)L(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}L(n,i=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0)}while(0!==i);n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}L(n,i=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0)}while(0!==i);n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),0===i&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&q(t),n.pending+2<=n.pending_buf_size&&(L(n,255&t.adler),L(n,t.adler>>8&255),t.adler=0,n.status=C)):n.status=C),0!==n.pending){if(q(t),0===t.avail_out)return n.last_flush=-1,p}else if(0===t.avail_in&&I(e)<=I(a)&&e!==d)return D(t,-5);if(666===n.status&&0!==t.avail_in)return D(t,-5);if(0!==t.avail_in||0!==n.lookahead||e!==_&&666!==n.status){var h=2===n.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===_)return S;break}if(t.match_length=0,a=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?S:j}(n,e):3===n.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=x){if(H(t),t.lookahead<=x&&e===_)return S;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=z&&0<t.strstart&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+x;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=x-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=z?(a=o._tr_tally(t,1,t.match_length-z),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?S:j}(n,e):l[n.level].func(n,e);if(h!==E&&h!==U||(n.status=666),h===S||h===E)return 0===t.avail_out&&(n.last_flush=-1),p;if(h===j&&(1===e?o._tr_align(n):5!==e&&(o._tr_stored_block(n,0,0,!1),3===e&&(O(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),q(t),0===t.avail_out))return n.last_flush=-1,p}return e!==d?p:n.wrap<=0?1:(2===n.wrap?(L(n,255&t.adler),L(n,t.adler>>8&255),L(n,t.adler>>16&255),L(n,t.adler>>24&255),L(n,255&t.total_in),L(n,t.total_in>>8&255),L(n,t.total_in>>16&255),L(n,t.total_in>>24&255)):(N(n,t.adler>>>16),N(n,65535&t.adler)),q(t),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?p:1)},a.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==A&&69!==e&&73!==e&&91!==e&&103!==e&&e!==C&&666!==e?D(t,g):(t.state=null,e===C?D(t,-3):p):g},a.deflateSetDictionary=function(t,e){var a,n,r,i,s,h,l,o,_=e.length;if(!t||!t.state)return g;if(2===(i=(a=t.state).wrap)||1===i&&a.status!==A||a.lookahead)return g;for(1===i&&(t.adler=f(t.adler,e,_,0)),a.wrap=0,_>=a.w_size&&(0===i&&(O(a.head),a.strstart=0,a.block_start=0,a.insert=0),o=new u.Buf8(a.w_size),u.arraySet(o,e,_-a.w_size,a.w_size,0),e=o,_=a.w_size),s=t.avail_in,h=t.next_in,l=t.input,t.avail_in=_,t.next_in=0,t.input=e,H(a);a.lookahead>=z;){for(n=a.strstart,r=a.lookahead-(z-1);a.ins_h=(a.ins_h<<a.hash_shift^a.window[n+z-1])&a.hash_mask,a.prev[n&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=n,n++,--r;);a.strstart=n,a.lookahead=z-1,H(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=z-1,a.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,a.wrap=i,p},a.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(t,e,a){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],7:[function(t,e,a){"use strict";var l=t("../utils/common"),h=0,o=1;function n(t){for(var e=t.length;0<=--e;)t[e]=0}var _=0,s=29,d=256,u=d+1+s,f=30,c=19,g=2*u+1,m=15,r=16,p=7,b=256,v=16,w=17,y=18,k=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],A=new Array(2*(u+2));n(A);var C=new Array(2*f);n(C);var S=new Array(512);n(S);var j=new Array(256);n(j);var E=new Array(s);n(E);var U,D,I,O=new Array(f);function q(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function i(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function T(t){return t<256?S[t]:S[256+(t>>>7)]}function L(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function N(t,e,a){t.bi_valid>r-a?(t.bi_buf|=e<<t.bi_valid&65535,L(t,t.bi_buf),t.bi_buf=e>>r-t.bi_valid,t.bi_valid+=a-r):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)}function R(t,e,a){N(t,a[2*e],a[2*e+1])}function H(t,e){for(var a=0;a|=1&t,t>>>=1,a<<=1,0<--e;);return a>>>1}function F(t,e,a){var n,r,i=new Array(m+1),s=0;for(n=1;n<=m;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=H(i[h]++,h))}}function K(t){var e;for(e=0;e<u;e++)t.dyn_ltree[2*e]=0;for(e=0;e<f;e++)t.dyn_dtree[2*e]=0;for(e=0;e<c;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*b]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function M(t){8<t.bi_valid?L(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function P(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]}function G(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&P(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!P(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n}function J(t,e,a){var n,r,i,s,h=0;if(0!==t.last_lit)for(;n=t.pending_buf[t.d_buf+2*h]<<8|t.pending_buf[t.d_buf+2*h+1],r=t.pending_buf[t.l_buf+h],h++,0===n?R(t,r,e):(R(t,(i=j[r])+d+1,e),0!==(s=k[i])&&N(t,r-=E[i],s),R(t,i=T(--n),a),0!==(s=z[i])&&N(t,n-=O[i],s)),h<t.last_lit;);R(t,b,e)}function Q(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,o=-1;for(t.heap_len=0,t.heap_max=g,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=o=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=o<2?++o:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=o,a=t.heap_len>>1;1<=a;a--)G(t,i,a);for(r=l;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,G(t,i,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,o=e.max_code,_=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=m;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<g;a++)c<(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)&&(i=c,p++),l[2*n+1]=i,o<n||(t.bl_count[i]++,s=0,f<=n&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(_[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(0<p);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)o<(r=t.heap[--a])||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),F(i,o,t.bl_count)}function V(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,o=4;for(0===s&&(l=138,o=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<o?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[2*v]++):h<=10?t.bl_tree[2*w]++:t.bl_tree[2*y]++,i=r,(h=0)===s?(l=138,o=3):r===s?(l=6,o=3):(l=7,o=4))}function W(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,o=4;for(0===s&&(l=138,o=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<o)for(;R(t,r,t.bl_tree),0!=--h;);else 0!==r?(r!==i&&(R(t,r,t.bl_tree),h--),R(t,v,t.bl_tree),N(t,h-3,2)):h<=10?(R(t,w,t.bl_tree),N(t,h-3,3)):(R(t,y,t.bl_tree),N(t,h-11,7));i=r,(h=0)===s?(l=138,o=3):r===s?(l=6,o=3):(l=7,o=4)}}n(O);var X=!1;function Y(t,e,a,n){var r,i,s,h;N(t,(_<<1)+(n?1:0),3),i=e,s=a,h=!0,M(r=t),h&&(L(r,s),L(r,~s)),l.arraySet(r.pending_buf,r.window,i,s,r.pending),r.pending+=s}a._tr_init=function(t){X||(function(){var t,e,a,n,r,i=new Array(m+1);for(n=a=0;n<s-1;n++)for(E[n]=a,t=0;t<1<<k[n];t++)j[a++]=n;for(j[a-1]=n,n=r=0;n<16;n++)for(O[n]=r,t=0;t<1<<z[n];t++)S[r++]=n;for(r>>=7;n<f;n++)for(O[n]=r<<7,t=0;t<1<<z[n]-7;t++)S[256+r++]=n;for(e=0;e<=m;e++)i[e]=0;for(t=0;t<=143;)A[2*t+1]=8,t++,i[8]++;for(;t<=255;)A[2*t+1]=9,t++,i[9]++;for(;t<=279;)A[2*t+1]=7,t++,i[7]++;for(;t<=287;)A[2*t+1]=8,t++,i[8]++;for(F(A,u+1,i),t=0;t<f;t++)C[2*t+1]=5,C[2*t]=H(t,5);U=new q(A,k,d+1,u,m),D=new q(C,z,0,f,m),I=new q(new Array(0),x,0,c,p)}(),X=!0),t.l_desc=new i(t.dyn_ltree,U),t.d_desc=new i(t.dyn_dtree,D),t.bl_desc=new i(t.bl_tree,I),t.bi_buf=0,t.bi_valid=0,K(t)},a._tr_stored_block=Y,a._tr_flush_block=function(t,e,a,n){var r,i,s=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return h;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return o;for(e=32;e<d;e++)if(0!==t.dyn_ltree[2*e])return o;return h}(t)),Q(t,t.l_desc),Q(t,t.d_desc),s=function(t){var e;for(V(t,t.dyn_ltree,t.l_desc.max_code),V(t,t.dyn_dtree,t.d_desc.max_code),Q(t,t.bl_desc),e=c-1;3<=e&&0===t.bl_tree[2*B[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(i=t.static_len+3+7>>>3)<=r&&(r=i)):r=i=a+5,a+4<=r&&-1!==e?Y(t,e,a,n):4===t.strategy||i===r?(N(t,2+(n?1:0),3),J(t,A,C)):(N(t,4+(n?1:0),3),function(t,e,a,n){var r;for(N(t,e-257,5),N(t,a-1,5),N(t,n-4,4),r=0;r<n;r++)N(t,t.bl_tree[2*B[r]+1],3);W(t,t.dyn_ltree,e-1),W(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),J(t,t.dyn_ltree,t.dyn_dtree)),K(t),n&&M(t)},a._tr_tally=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(j[a]+d+1)]++,t.dyn_dtree[2*T(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;N(t,2,3),R(t,b,A),16===(e=t).bi_valid?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":1}],8:[function(t,e,a){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(t,e,a){"use strict";var s=t("./zlib/deflate"),h=t("./utils/common"),l=t("./utils/strings"),r=t("./zlib/messages"),i=t("./zlib/zstream"),o=Object.prototype.toString,_=0,d=-1,u=0,f=8;function c(t){if(!(this instanceof c))return new c(t);this.options=h.assign({level:d,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var a=s.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==_)throw new Error(r[a]);if(e.header&&s.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"==typeof e.dictionary?l.string2buf(e.dictionary):"[object ArrayBuffer]"===o.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(a=s.deflateSetDictionary(this.strm,n))!==_)throw new Error(r[a]);this._dict_set=!0}}function n(t,e){var a=new c(e);if(a.push(t,!0),a.err)throw a.msg||r[a.err];return a.result}c.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:!0===e?4:0,"string"==typeof t?r.input=l.string2buf(t):"[object ArrayBuffer]"===o.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new h.Buf8(i),r.next_out=0,r.avail_out=i),1!==(a=s.deflate(r,n))&&a!==_)return this.onEnd(a),!(this.ended=!0);0!==r.avail_out&&(0!==r.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(l.buf2binstring(h.shrinkBuf(r.output,r.next_out))):this.onData(h.shrinkBuf(r.output,r.next_out)))}while((0<r.avail_in||0===r.avail_out)&&1!==a);return 4===n?(a=s.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===_):2!==n||(this.onEnd(_),!(r.avail_out=0))},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){t===_&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=c,a.deflate=n,a.deflateRaw=function(t,e){return(e=e||{}).raw=!0,n(t,e)},a.gzip=function(t,e){return(e=e||{}).gzip=!0,n(t,e)}},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")});
;
jQuery(function($){var core={MARKER_PULL_DATABASE:"0",MARKER_PULL_XML:"1",PAGE_MAP_LIST:"map-list",PAGE_MAP_EDIT:"map-edit",PAGE_SETTINGS:"map-settings",PAGE_STYLING:"map-styling",PAGE_SUPPORT:"map-support",PAGE_INSTALLER:"installer",PAGE_CATEGORIES:"categories",PAGE_ADVANCED:"advanced",PAGE_CUSTOM_FIELDS:"custom-fields",maps:[],events:null,settings:null,restAPI:null,localized_strings:null,loadingHTML:'<div class="wpgmza-preloader"><div class="wpgmza-loader">...</div></div>',preloaderHTML:"<div class='wpgmza-preloader'><div></div><div></div><div></div><div></div></div>",getCurrentPage:function(){switch(WPGMZA.getQueryParamValue("page")){case"wp-google-maps-menu":return window.location.href.match(/action=edit/)&&window.location.href.match(/map_id=\d+/)?WPGMZA.PAGE_MAP_EDIT:window.location.href.match(/action=installer/)?WPGMZA.PAGE_INSTALLER:WPGMZA.PAGE_MAP_LIST;case"wp-google-maps-menu-settings":return WPGMZA.PAGE_SETTINGS;case"wp-google-maps-menu-styling":return WPGMZA.PAGE_STYLING;case"wp-google-maps-menu-support":return WPGMZA.PAGE_SUPPORT;case"wp-google-maps-menu-categories":return WPGMZA.PAGE_CATEGORIES;case"wp-google-maps-menu-advanced":return WPGMZA.PAGE_ADVANCED;case"wp-google-maps-menu-custom-fields":return WPGMZA.PAGE_CUSTOM_FIELDS;default:return null}},getScrollAnimationOffset:function(){return(WPGMZA.settings.scroll_animation_offset||0)+($("#wpadminbar").height()||0)},getScrollAnimationDuration:function(){return WPGMZA.settings.scroll_animation_milliseconds||500},animateScroll:function(element,milliseconds){var offset=WPGMZA.getScrollAnimationOffset();milliseconds=milliseconds||WPGMZA.getScrollAnimationDuration(),$("html, body").animate({scrollTop:$(element).offset().top-offset},milliseconds)},extend:function(child,parent){var constructor=child;child.prototype=Object.create(parent.prototype),child.prototype.constructor=constructor},guid:function(){var d=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(d+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=(d+16*Math.random())%16|0;return d=Math.floor(d/16),("x"===c?r:3&r|8).toString(16)})},hexOpacityToRGBA:function(colour,opacity){colour=parseInt(colour.replace(/^#/,""),16);return[(16711680&colour)>>16,(65280&colour)>>8,255&colour,parseFloat(opacity)]},hexOpacityToString:function(colour,opacity){colour=WPGMZA.hexOpacityToRGBA(colour,opacity);return"rgba("+colour[0]+", "+colour[1]+", "+colour[2]+", "+colour[3]+")"},hexToRgba:function(hex){return/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)?{r:(hex="0x"+(hex=3==(hex=hex.substring(1).split("")).length?[hex[0],hex[0],hex[1],hex[1],hex[2],hex[2]]:hex).join(""))>>16&255,g:hex>>8&255,b:255&hex,a:1}:0},rgbaToString:function(rgba){return"rgba("+rgba.r+", "+rgba.g+", "+rgba.b+", "+rgba.a+")"},latLngRegexp:/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/,isLatLngString:function(str){return"string"==typeof str&&(str=(str=str.match(/^\(.+\)$/)?str.replace(/^\(|\)$/,""):str).match(WPGMZA.latLngRegexp))?new WPGMZA.LatLng({lat:parseFloat(str[1]),lng:parseFloat(str[3])}):null},stringToLatLng:function(str){str=WPGMZA.isLatLngString(str);if(str)return str;throw new Error("Not a valid latLng")},isHexColorString:function(str){return"string"==typeof str&&!!str.match(/#[0-9A-F]{6}/i)},imageDimensionsCache:{},getImageDimensions:function(src,callback){var img;WPGMZA.imageDimensionsCache[src]?callback(WPGMZA.imageDimensionsCache[src]):((img=document.createElement("img")).onload=function(event){var result={width:img.width,height:img.height};WPGMZA.imageDimensionsCache[src]=result,callback(result)},img.src=src)},decodeEntities:function(input){return input.replace(/&(nbsp|amp|quot|lt|gt);/g,function(m,e){return m[e]}).replace(/&#(\d+);/gi,function(m,e){return String.fromCharCode(parseInt(e,10))})},isDeveloperMode:function(){return this.settings.developer_mode||window.Cookies&&window.Cookies.get("wpgmza-developer-mode")},isProVersion:function(){return"1"==this._isProVersion},openMediaDialog:function(callback,config){var file_frame;file_frame?file_frame.uploader.uploader.param("post_id",set_to_post_id):(file_frame=wp.media.frames.file_frame=config?wp.media(config):wp.media({title:"Select a image to upload",button:{text:"Use this image"},multiple:!1})).on("select",function(){attachment=file_frame.state().get("selection").first().toJSON(),callback(attachment.id,attachment.url,attachment)}),file_frame.open()},getCurrentPosition:function(callback,error,watch){var options,nativeFunction="getCurrentPosition";WPGMZA.userLocationDenied?error&&error({code:1,message:"Location unavailable"}):(watch&&(nativeFunction="watchPosition"),navigator.geolocation?(options={enableHighAccuracy:!0},navigator.geolocation[nativeFunction]?navigator.geolocation[nativeFunction](function(position){callback&&callback(position),WPGMZA.events.trigger("userlocationfound")},function(err){options.enableHighAccuracy=!1,navigator.geolocation[nativeFunction](function(position){callback&&callback(position),WPGMZA.events.trigger("userlocationfound")},function(err){console.warn(err.code,err.message),1==err.code&&(WPGMZA.userLocationDenied=!0),error&&error(err)},options)},options):console.warn(nativeFunction+" is not available")):console.warn("No geolocation available on this device"))},watchPosition:function(callback,error){return WPGMZA.getCurrentPosition(callback,error,!0)},runCatchableTask:function(callback,friendlyErrorContainer){if(WPGMZA.isDeveloperMode())callback();else try{callback()}catch(e){callback=new WPGMZA.FriendlyError(e);$(friendlyErrorContainer).html(""),$(friendlyErrorContainer).append(callback.element),$(friendlyErrorContainer).show()}},capitalizeWords:function(string){return(string+"").replace(/^(.)|\s+(.)/g,function(m){return m.toUpperCase()})},pluralize:function(string){return WPGMZA.singularize(string)+"s"},singularize:function(string){return string.replace(/s$/,"")},assertInstanceOf:function(instance,instanceName){var pro=WPGMZA.isProVersion()?"Pro":"",engine="open-layers"===WPGMZA.settings.engine?"OL":"Google",pro=WPGMZA[engine+pro+instanceName]&&engine+instanceName!="OLFeature"?engine+pro+instanceName:WPGMZA[pro+instanceName]?pro+instanceName:WPGMZA[engine+instanceName]&&WPGMZA[engine+instanceName].prototype?engine+instanceName:instanceName;if("OLFeature"!=pro&&!(instance instanceof WPGMZA[pro]))throw new Error("Object must be an instance of "+pro+" (did you call a constructor directly, rather than createInstance?)")},getMapByID:function(id){for(var i=0;i<WPGMZA.maps.length;i++)if(WPGMZA.maps[i].id==id)return WPGMZA.maps[i];return null},isGoogleAutocompleteSupported:function(){return!(!window.google||!google.maps||!google.maps.places||!google.maps.places.Autocomplete||WPGMZA.CloudAPI&&WPGMZA.CloudAPI.isBeingUsed)},googleAPIStatus:window.wpgmza_google_api_status,isSafari:function(){var ua=navigator.userAgent.toLowerCase();return ua.match(/safari/i)&&!ua.match(/chrome/i)},isTouchDevice:function(){return"ontouchstart"in window},isDeviceiOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)},isModernComponentStyleAllowed:function(){return!(!WPGMZA.InternalEngine.isLegacy()||WPGMZA.settings.user_interface_style&&"legacy"!=WPGMZA.settings.user_interface_style&&"modern"!=WPGMZA.settings.user_interface_style)},isElementInView:function(element){var pageTop=$(window).scrollTop(),pageBottom=pageTop+$(window).height(),elementTop=$(element).offset().top,element=elementTop+$(element).height();return elementTop<pageTop&&pageBottom<element||pageTop<=elementTop&&elementTop<=pageBottom||pageTop<=element&&element<=pageBottom},isFullScreen:function(){return wpgmzaisFullScreen},isNumeric:function(num){return!isNaN(parseFloat(num))&&isFinite(num)},getQueryParamValue:function(name){var name=new RegExp(name+"=([^&#]*)");return(name=window.location.href.match(name))?decodeURIComponent(name[1]):null},notification:function(text,time){switch(arguments.length){case 0:text="",time=4e3;break;case 1:time=4e3}var html='<div class="wpgmza-popup-notification">'+text+"</div>";jQuery("body").append(html),setTimeout(function(){jQuery("body").find(".wpgmza-popup-notification").remove()},time)},initMaps:function(){$(document.body).find(".wpgmza_map:not(.wpgmza-initialized)").each(function(index,el){if(el.wpgmzaMap)console.warn("Element missing class wpgmza-initialized but does have wpgmzaMap property. No new instance will be created");else try{el.wpgmzaMap=WPGMZA.Map.createInstance(el)}catch(ex){console.warn("Map initalization: "+ex)}}),WPGMZA.Map.nextInitTimeoutID=setTimeout(WPGMZA.initMaps,3e3)},initCapsules:function(){WPGMZA.capsuleModules=WPGMZA.CapsuleModules.createInstance()},onScroll:function(){$(".wpgmza_map").each(function(index,el){var isInView=WPGMZA.isElementInView(el);el.wpgmzaScrollIntoViewTriggerFlag?isInView||(el.wpgmzaScrollIntoViewTriggerFlag=!1):isInView&&($(el).trigger("mapscrolledintoview.wpgmza"),el.wpgmzaScrollIntoViewTriggerFlag=!0)})},initInstallerRedirect:function(url){$(".wpgmza-wrap").hide(),window.location.href=url},delayedReloader(){setTimeout(()=>{try{WPGMZA.restAPI=WPGMZA.RestAPI.createInstance(),WPGMZA.CloudAPI&&(WPGMZA.cloudAPI=WPGMZA.CloudAPI.createInstance()),$(document.body).trigger("preinit.wpgmza"),WPGMZA.initMaps(),WPGMZA.onScroll(),WPGMZA.initCapsules(),$(document.body).trigger("postinit.wpgmza")}catch(ex){WPGMZA.delayedReloader()}},1e3)}},wpgmzaisFullScreen=!1;for(key in[]){console.warn("It appears that the built in JavaScript Array has been extended, this can create issues with for ... in loops, which may cause failure.");break}for(key in window.WPGMZA?window.WPGMZA=$.extend(window.WPGMZA,core):window.WPGMZA=core,window.uc&&window.uc.reloadOnOptIn&&(window.uc.reloadOnOptIn("S1pcEj_jZX"),window.uc.reloadOnOptOut("S1pcEj_jZX")),WPGMZA_localized_data){var value=WPGMZA_localized_data[key];WPGMZA[key]=value}var apiKeyIndex;for(apiKeyIndex of["googleMapsApiKey","wpgmza_google_maps_api_key","google_maps_api_key"])WPGMZA.settings[apiKeyIndex]&&(WPGMZA.settings[apiKeyIndex]=atob(WPGMZA.settings[apiKeyIndex]));var key,wpgmzaisFullScreen=!1;for(key in[]){console.warn("It appears that the built in JavaScript Array has been extended, this can create issues with for ... in loops, which may cause failure.");break}window.WPGMZA?window.WPGMZA=$.extend(window.WPGMZA,core):window.WPGMZA=core,window.uc&&window.uc.reloadOnOptIn&&(window.uc.reloadOnOptIn("S1pcEj_jZX"),window.uc.reloadOnOptOut("S1pcEj_jZX"));try{if(WPGMZA&&WPGMZA.settings&&WPGMZA.settings.disable_google_fonts){const _wpgmzaGoogleFontDisabler={head:document.getElementsByTagName("head")[0]};_wpgmzaGoogleFontDisabler.head&&(_wpgmzaGoogleFontDisabler.insertBefore=_wpgmzaGoogleFontDisabler.head.insertBefore,_wpgmzaGoogleFontDisabler.head.insertBefore=(nElem,rElem)=>{var excl;if(nElem.href&&-1!==nElem.href.indexOf("//fonts.googleapis.com/css"))for(excl of["Roboto","Google"])if(-1!==nElem.href.indexOf("?family="+excl))return;_wpgmzaGoogleFontDisabler.insertBefore.call(_wpgmzaGoogleFontDisabler.head,nElem,rElem)})}}catch(_wpgmzaDisableFontException){}for(key in WPGMZA_localized_data){value=WPGMZA_localized_data[key];WPGMZA[key]=value}WPGMZA.settings.useLegacyGlobals=!0,$(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange",function(){wpgmzaisFullScreen=!!document.fullscreenElement,$(document.body).trigger("fullscreenchange.wpgmza")}),$("body").on("click","#wpgmzaCloseChat",function(e){e.preventDefault(),$.ajax(WPGMZA.ajaxurl,{method:"POST",data:{action:"wpgmza_hide_chat",nonce:WPGMZA_localized_data.ajaxnonce}}),$(".wpgmza-chat-help").remove()}),$(window).on("scroll",WPGMZA.onScroll),$(document.body).on("click","button.wpgmza-api-consent",function(event){Cookies.set("wpgmza-api-consent-given",!0),window.location.reload()}),$(document.body).on("keydown",function(event){event.altKey&&(WPGMZA.altKeyDown=!0)}),$(document.body).on("keyup",function(event){event.altKey||(WPGMZA.altKeyDown=!1)}),$(document.body).on("preinit.wpgmza",function(){$(window).trigger("ready.wpgmza"),$(document.body).trigger("ready.body.wpgmza"),$("script[src*='wp-google-maps.combined.js'], script[src*='wp-google-maps-pro.combined.js']").length&&console.warn("Minified script is out of date, using combined script instead.");var key,elements=$("script[src]").filter(function(){return this.src.match(/(^|\/)jquery\.(min\.)?js(\?|$)/i)});1<elements.length&&console.warn("Multiple jQuery versions detected: ",elements);for(key in[]){console.warn("The Array object has been extended incorrectly by your theme or another plugin. This can cause issues with functionality.");break}"https:"!=window.location.protocol&&(elements='<div class="'+(WPGMZA.InternalEngine.isLegacy()?"":"wpgmza-shadow wpgmza-card wpgmza-pos-relative ")+'notice notice-warning"><p>'+WPGMZA.localized_strings.unsecure_geolocation+"</p></div>",$(".wpgmza-geolocation-setting").first().after($(elements))),WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code&&jQuery(".wpgmza-gdpr-compliance").length<=0&&($(".wpgmza-inner-stack").hide(),$("button.wpgmza-api-consent").on("click",function(event){Cookies.set("wpgmza-api-consent-given",!0),window.location.reload()}))}),function($){$(function(){try{WPGMZA.restAPI=WPGMZA.RestAPI.createInstance(),WPGMZA.CloudAPI&&(WPGMZA.cloudAPI=WPGMZA.CloudAPI.createInstance()),$(document.body).trigger("preinit.wpgmza"),WPGMZA.initMaps(),WPGMZA.onScroll(),WPGMZA.initCapsules(),$(document.body).trigger("postinit.wpgmza")}catch(ex){WPGMZA&&"function"==typeof WPGMZA.delayedReloader&&WPGMZA.delayedReloader()}})}($)}),jQuery(function($){WPGMZA.Compatibility=function(){this.preventDocumentWriteGoogleMapsAPI()},WPGMZA.Compatibility.prototype.preventDocumentWriteGoogleMapsAPI=function(){var old=document.write;document.write=function(content){content.match&&content.match(/maps\.google/)||old.call(document,content)}},WPGMZA.compatiblityModule=new WPGMZA.Compatibility}),!function(root,factory){"object"==typeof exports?module.exports=factory(root):"function"==typeof define&&define.amd?define([],factory.bind(root,root)):factory(root)}("undefined"!=typeof global?global:this,function(root){var cssEscape;return root.CSS&&root.CSS.escape?root.CSS.escape:(cssEscape=function(value){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var codeUnit,string=String(value),length=string.length,index=-1,result="",firstCodeUnit=string.charCodeAt(0);++index<length;)0==(codeUnit=string.charCodeAt(index))?result+="�":result+=1<=codeUnit&&codeUnit<=31||127==codeUnit||0==index&&48<=codeUnit&&codeUnit<=57||1==index&&48<=codeUnit&&codeUnit<=57&&45==firstCodeUnit?"\\"+codeUnit.toString(16)+" ":(0!=index||1!=length||45!=codeUnit)&&(128<=codeUnit||45==codeUnit||95==codeUnit||48<=codeUnit&&codeUnit<=57||65<=codeUnit&&codeUnit<=90||97<=codeUnit&&codeUnit<=122)?string.charAt(index):"\\"+string.charAt(index);return result},root.CSS||(root.CSS={}),root.CSS.escape=cssEscape)}),jQuery(function($){Math.PI;function deg2rad(deg){return deg*(Math.PI/180)}WPGMZA.Distance={MILES:!0,KILOMETERS:!1,MILES_PER_KILOMETER:.621371,KILOMETERS_PER_MILE:1.60934,uiToMeters:function(uiDistance){return parseFloat(uiDistance)/(WPGMZA.settings.distance_units==WPGMZA.Distance.MILES?WPGMZA.Distance.MILES_PER_KILOMETER:1)*1e3},uiToKilometers:function(uiDistance){return.001*WPGMZA.Distance.uiToMeters(uiDistance)},uiToMiles:function(uiDistance){return WPGMZA.Distance.uiToKilometers(uiDistance)*WPGMZA.Distance.MILES_PER_KILOMETER},kilometersToUI:function(km){return WPGMZA.settings.distance_units==WPGMZA.Distance.MILES?km*WPGMZA.Distance.MILES_PER_KILOMETER:km},between:function(a,b){if(!(a instanceof WPGMZA.LatLng||"lat"in a&&"lng"in a))throw new Error("First argument must be an instance of WPGMZA.LatLng or a literal");var lat1,lon1,lat2,dLat;if(b instanceof WPGMZA.LatLng||"lat"in b&&"lng"in b)return a===b?0:(lat1=a.lat,lon1=a.lng,lat2=b.lat,b=b.lng,dLat=deg2rad(lat2-lat1),b=deg2rad(b-lon1),a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(deg2rad(lat1))*Math.cos(deg2rad(lat2))*Math.sin(b/2)*Math.sin(b/2),6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))));throw new Error("Second argument must be an instance of WPGMZA.LatLng or a literal")}}}),jQuery(function($){WPGMZA.EliasFano=function(){if(!WPGMZA.EliasFano.isSupported)throw new Error("Elias Fano encoding is not supported on browsers without Uint8Array");WPGMZA.EliasFano.decodingTablesInitialised||WPGMZA.EliasFano.createDecodingTable()},WPGMZA.EliasFano.isSupported="Uint8Array"in window,WPGMZA.EliasFano.decodingTableHighBits=[],WPGMZA.EliasFano.decodingTableDocIDNumber=null,WPGMZA.EliasFano.decodingTableHighBitsCarryover=null,WPGMZA.EliasFano.createDecodingTable=function(){WPGMZA.EliasFano.decodingTableDocIDNumber=new Uint8Array(256),WPGMZA.EliasFano.decodingTableHighBitsCarryover=new Uint8Array(256);for(var decodingTableHighBits=WPGMZA.EliasFano.decodingTableHighBits,decodingTableDocIDNumber=WPGMZA.EliasFano.decodingTableDocIDNumber,decodingTableHighBitsCarryover=WPGMZA.EliasFano.decodingTableHighBitsCarryover,i=0;i<256;i++){var zeroCount=0;decodingTableHighBits[i]=[];for(var j=7;0<=j;j--)zeroCount=0<(i&1<<j)?(decodingTableHighBits[i][decodingTableDocIDNumber[i]]=zeroCount,decodingTableDocIDNumber[i]++,0):(zeroCount+1)%255;decodingTableHighBitsCarryover[i]=zeroCount}WPGMZA.EliasFano.decodingTablesInitialised=!0},WPGMZA.EliasFano.prototype.encode=function(list){var compressedBufferPointer1,compressedBufferPointer2,lowBitsLength,lowBitsMask,prev,averageDeltaLog,compressedBuffer,averageDelta,lastDocID=0,buffer1=0,bufferLength1=0,buffer2=0,bufferLength2=0;return 0!=list.length&&(compressedBufferPointer2=compressedBufferPointer1=0,averageDelta=list[list.length-1]/list.length,averageDeltaLog=Math.log2(averageDelta),lowBitsLength=Math.floor(averageDeltaLog),lowBitsMask=(1<<lowBitsLength)-1,prev=null,averageDeltaLog=Math.floor((2+Math.ceil(Math.log2(averageDelta)))*list.length/8)+6,compressedBuffer=new Uint8Array(averageDeltaLog),lowBitsLength<0&&(lowBitsLength=0),compressedBufferPointer2=Math.floor(lowBitsLength*list.length/8+6),compressedBuffer[compressedBufferPointer1++]=255&list.length,compressedBuffer[compressedBufferPointer1++]=255&list.length>>8,compressedBuffer[compressedBufferPointer1++]=255&list.length>>16,compressedBuffer[compressedBufferPointer1++]=255&list.length>>24,compressedBuffer[compressedBufferPointer1++]=255&lowBitsLength,list.forEach(function(docID){var docIDDelta=docID-lastDocID-1;if(!WPGMZA.isNumeric(docID))throw new Error("Value is not numeric");if(docID=parseInt(docID),null!==prev&&docID<=prev)throw new Error("Elias Fano encoding can only be used on a sorted, ascending list of unique integers.");for(prev=docID,buffer1=buffer1<<lowBitsLength|docIDDelta&lowBitsMask,bufferLength1+=lowBitsLength;7<bufferLength1;)bufferLength1-=8,compressedBuffer[compressedBufferPointer1++]=255&buffer1>>bufferLength1;docIDDelta=1+(docIDDelta>>lowBitsLength);for(buffer2=buffer2<<docIDDelta|1,bufferLength2+=docIDDelta;7<bufferLength2;)bufferLength2-=8,compressedBuffer[compressedBufferPointer2++]=255&buffer2>>bufferLength2;lastDocID=docID}),0<bufferLength1&&(compressedBuffer[compressedBufferPointer1++]=255&buffer1<<8-bufferLength1),0<bufferLength2&&(compressedBuffer[compressedBufferPointer2++]=255&buffer2<<8-bufferLength2),(averageDelta=new Uint8Array(compressedBuffer)).pointer=compressedBufferPointer2),averageDelta},WPGMZA.EliasFano.prototype.decode=function(compressedBuffer){for(var resultPointer=0,list=[],decodingTableHighBits=WPGMZA.EliasFano.decodingTableHighBits,decodingTableDocIDNumber=WPGMZA.EliasFano.decodingTableDocIDNumber,decodingTableHighBitsCarryover=WPGMZA.EliasFano.decodingTableHighBitsCarryover,lowBitsPointer=0,lastDocID=0,docID=0,listCount=compressedBuffer[lowBitsPointer++],lowBitsLength=(listCount=(listCount=(listCount|=compressedBuffer[lowBitsPointer++]<<8)|compressedBuffer[lowBitsPointer++]<<16)|compressedBuffer[lowBitsPointer++]<<24,compressedBuffer[lowBitsPointer++]),lowBitsCount=0,lowBits=0,cb=1,highBitsPointer=Math.floor(lowBitsLength*listCount/8+6);highBitsPointer<compressedBuffer.pointer;highBitsPointer++){docID+=decodingTableHighBitsCarryover[cb];for(var docIDNumber=decodingTableDocIDNumber[cb=compressedBuffer[highBitsPointer]],i=0;i<docIDNumber;i++){for(docID=docID<<lowBitsCount|lowBits&(1<<lowBitsCount)-1;lowBitsCount<lowBitsLength;)docID=(docID<<=8)|(lowBits=compressedBuffer[lowBitsPointer++]),lowBitsCount+=8;docID=(docID>>=lowBitsCount-=lowBitsLength)+((decodingTableHighBits[cb][i]<<lowBitsLength)+lastDocID+1),lastDocID=list[resultPointer++]=docID,docID=0}}return list}}),jQuery(function($){WPGMZA.EventDispatcher=function(){WPGMZA.assertInstanceOf(this,"EventDispatcher"),this._listenersByType={}},WPGMZA.EventDispatcher.prototype.addEventListener=function(type,listener,thisObject,useCapture){var types=type.split(/\s+/);if(1<types.length)for(var i=0;i<types.length;i++)this.addEventListener(types[i],listener,thisObject,useCapture);else{if(!(listener instanceof Function))throw new Error("Listener must be a function");type=this._listenersByType.hasOwnProperty(type)?this._listenersByType[type]:this._listenersByType[type]=[];type.push({listener:listener,thisObject:thisObject||this,useCapture:!!useCapture})}},WPGMZA.EventDispatcher.prototype.on=WPGMZA.EventDispatcher.prototype.addEventListener,WPGMZA.EventDispatcher.prototype.removeEventListener=function(type,listener,thisObject,useCapture){var arr,obj;if(arr=this._listenersByType[type]){thisObject=thisObject||this,useCapture=!!useCapture;for(var i=0;i<arr.length;i++)if(obj=arr[i],(1==arguments.length||obj.listener==listener)&&obj.thisObject==thisObject&&obj.useCapture==useCapture)return void arr.splice(i,1)}},WPGMZA.EventDispatcher.prototype.off=WPGMZA.EventDispatcher.prototype.removeEventListener,WPGMZA.EventDispatcher.prototype.hasEventListener=function(type){return!!_listenersByType[type]},WPGMZA.EventDispatcher.prototype.dispatchEvent=function(event){if(!(event instanceof WPGMZA.Event))if("string"==typeof event)event=new WPGMZA.Event(event);else{var name,src=event;for(name in event=new WPGMZA.Event,src)event[name]=src[name]}for(var path=[],obj=(event.target=this).parent;null!=obj;obj=obj.parent)path.unshift(obj);event.phase=WPGMZA.Event.CAPTURING_PHASE;for(var i=0;i<path.length&&!event._cancelled;i++)path[i]._triggerListeners(event);if(!event._cancelled){for(event.phase=WPGMZA.Event.AT_TARGET,this._triggerListeners(event),event.phase=WPGMZA.Event.BUBBLING_PHASE,i=path.length-1;0<=i&&!event._cancelled;i--)path[i]._triggerListeners(event);for(var topMostElement=this.element,obj=this.parent;null!=obj;obj=obj.parent)obj.element&&(topMostElement=obj.element);if(topMostElement){var key,customEvent={};for(key in event){var value=event[key];"type"==key&&(value+=".wpgmza"),customEvent[key]=value}$(topMostElement).trigger(customEvent)}}},WPGMZA.EventDispatcher.prototype.trigger=WPGMZA.EventDispatcher.prototype.dispatchEvent,WPGMZA.EventDispatcher.prototype._triggerListeners=function(event){var arr,obj;if(arr=this._listenersByType[event.type])for(var i=0;i<arr.length;i++)obj=arr[i],event.phase==WPGMZA.Event.CAPTURING_PHASE&&!obj.useCapture||obj.listener.call(arr[i].thisObject,event)},WPGMZA.events=new WPGMZA.EventDispatcher}),jQuery(function($){WPGMZA.AddressInput=function(element,map){if(!(element instanceof HTMLInputElement))throw new Error("Element is not an instance of HTMLInputElement");this.element=element;var json,options={fields:["name","formatted_address"],types:["geocode","establishment"]};(json=$(element).attr("data-autocomplete-options"))&&(options=$.extend(options,JSON.parse(json))),map&&map.settings.wpgmza_store_locator_restrict&&(options.country=map.settings.wpgmza_store_locator_restrict),this.options=options,(element._wpgmzaAddressInput=this).googleAutocompleteLoaded=!1,WPGMZA.isGoogleAutocompleteSupported()?this.shouldAutoLoadGoogleAutocomplete()&&this.loadGoogleAutocomplete():WPGMZA.CloudAPI&&WPGMZA.CloudAPI.isBeingUsed&&(element.cloudAutoComplete=new WPGMZA.CloudAutocomplete(element,options))},WPGMZA.extend(WPGMZA.AddressInput,WPGMZA.EventDispatcher),WPGMZA.AddressInput.createInstance=function(element,map){return new WPGMZA.AddressInput(element,map)},WPGMZA.AddressInput.prototype.loadGoogleAutocomplete=function(){WPGMZA.settings&&(WPGMZA.settings.googleMapsApiKey||WPGMZA.settings.wpgmza_google_maps_api_key)&&(WPGMZA.isGoogleAutocompleteSupported()&&(this.element.googleAutoComplete=new google.maps.places.Autocomplete(this.element,this.options),this.options.country)&&this.element.googleAutoComplete.setComponentRestrictions({country:this.options.country}),this.googleAutocompleteLoaded=!0)},WPGMZA.AddressInput.prototype.shouldAutoLoadGoogleAutocomplete=function(){return!this.element||!this.element.id||"wpgmza_add_address_map_editor"!==this.element.id}}),jQuery(function($){WPGMZA.CapsuleModules=function(){WPGMZA.EventDispatcher.call(this),this.proxies={},this.capsules=[],this.prepareCapsules(),this.flagCapsules()},WPGMZA.extend(WPGMZA.CapsuleModules,WPGMZA.EventDispatcher),WPGMZA.CapsuleModules.getConstructor=function(){return WPGMZA.isProVersion()?WPGMZA.ProCapsuleModules:WPGMZA.CapsuleModules},WPGMZA.CapsuleModules.createInstance=function(){return new(WPGMZA.CapsuleModules.getConstructor())},WPGMZA.CapsuleModules.prototype.proxyMap=function(id,settings){return this.proxies[id]||(this.proxies[id]=Object.create(this),this.proxies[id].id=id,this.proxies[id].markers=[],this.proxies[id].showPreloader=function(){},this.proxies[id].getMarkerByID=function(){return{}},this.proxies[id].markerFilter=WPGMZA.MarkerFilter.createInstance(this.proxies[id])),settings&&(this.proxies[id].settings=settings),this.proxies[id]},WPGMZA.CapsuleModules.prototype.flagCapsules=function(){if(this.capsules)for(var i in this.capsules)this.capsules[i].element&&$(this.capsules[i].element).addClass("wpgmza-capsule-module")},WPGMZA.CapsuleModules.prototype.prepareCapsules=function(){this.registerStoreLocator()},WPGMZA.CapsuleModules.prototype.registerStoreLocator=function(){$(".wpgmza-store-locator").each((index,element)=>{var settings,mapId=$(element).data("map-id"),url=$(element).data("url");mapId&&!WPGMZA.getMapByID(mapId)&&(url?(settings=$(element).data("map-settings"),settings=this.proxyMap(mapId,settings),(settings={type:"store_locator",element:element,instance:WPGMZA.StoreLocator.createInstance(settings,element)}).instance.isCapsule=!0,settings.instance.redirectUrl=url,this.capsules.push(settings)):console.warn('WPGMZA: You seem to have added a stadalone store locator without a map page URL. Please add a URL to your shortcode [wpgmza_store_locator id="'+mapId+'" url="{URL}"] and try again'))})}}),jQuery(function($){WPGMZA.ColorInput=function(element,options){if(!(element instanceof HTMLInputElement))throw new Error("Element is not an instance of HTMLInputElement");this.element=$(element),this.dataAttributes=this.element.data(),this.type=element.type,this.value=element.value,this.options={format:"hex",anchor:"left",container:!1,autoClose:!0,autoOpen:!1,supportAlpha:!0,supportPalette:!0,wheelBorderWidth:10,wheelPadding:6,wheelBorderColor:"rgb(255,255,255)"},this.parseOptions(options),this.state={initialized:!1,sliderInvert:!1,lockSlide:!1,lockPicker:!1,open:!1,mouse:{down:!1}},this.color={h:0,s:0,l:100,a:1},this.wrap(),this.renderControls(),this.parseColor(this.value)},WPGMZA.extend(WPGMZA.ColorInput,WPGMZA.EventDispatcher),WPGMZA.ColorInput.createInstance=function(element){return new WPGMZA.ColorInput(element)},WPGMZA.ColorInput.prototype.clamp=function(min,max,value){return isNaN(value)&&(value=0),Math.min(Math.max(value,min),max)},WPGMZA.ColorInput.prototype.degreesToRadians=function(degrees){return degrees*(Math.PI/180)},WPGMZA.ColorInput.prototype.hueToRgb=function(p,q,t){return t<0&&(t+=1),1<t&&--t,t<1/6?p+6*(q-p)*t:t<.5?q:t<2/3?p+(q-p)*(2/3-t)*6:p},WPGMZA.ColorInput.prototype.getMousePositionInCanvas=function(canvas,event){canvas=canvas.getBoundingClientRect();return{x:event.clientX-canvas.left,y:event.clientY-canvas.top}},WPGMZA.ColorInput.prototype.parseOptions=function(options){if(options)for(var i in options)void 0!==this.options[i]&&("object"==typeof this.options[i]&&"object"==typeof options[i]?this.options[i]=Object.assign(this.options[i],options[i]):this.options[i]=options[i]);if(this.dataAttributes)for(var i in this.dataAttributes)void 0!==this.options[i]&&(this.options[i]=this.dataAttributes[i])},WPGMZA.ColorInput.prototype.getColor=function(override,format){var hsl=Object.assign({},this.color);if(override)for(var i in override)hsl[i]=override[i];format=format||this.options.format;var rgb=this.hslToRgb(hsl.h,hsl.s,hsl.l,hsl.a);switch(format){case"hsl":return"hsl("+hsl.h+", "+hsl.s+"%, "+hsl.l+"%)";case"hsla":return"hsla("+hsl.h+", "+hsl.s+"%, "+hsl.l+"%, "+hsl.a+")";case"rgb":return"rgb("+rgb.r+", "+rgb.g+", "+rgb.b+")";case"rgba":return"rgba("+rgb.r+", "+rgb.g+", "+rgb.b+", "+rgb.a+")"}return this.rgbToHex(rgb.r,rgb.g,rgb.b,rgb.a)},WPGMZA.ColorInput.prototype.setColor=function(hsl){for(var i in hsl)this.color[i]=hsl[i];this.options.supportAlpha||(this.color.a=1),this.updatePreview(),this.commit(),this.state.initialized&&this.update()},WPGMZA.ColorInput.prototype.parseColor=function(value){var hsl;"string"==typeof value&&(-1!==(value=""===(value=value.trim().toLowerCase().replace(/ /g,""))?"rgb(255,255,255)":value).indexOf("rgb")?(value=value.replace(/[a-z\(\)%]/g,""),parts=value.split(","),this.setColor(this.rgbToHsl(parts[0],parts[1],parts[2],parts[3]))):-1!==value.indexOf("hsl")?(value=value.replace(/[a-z\(\)%]/g,""),hsl={h:(parts=value.split(","))[0]?parseInt(parts[0]):0,s:parts[1]?parseInt(parts[1]):0,l:parts[2]?parseInt(parts[2]):100,a:parts[3]?parseFloat(parts[3]):1},this.setColor(hsl)):(hsl=this.hexToRgb(value),this.setColor(this.rgbToHsl(hsl.r,hsl.g,hsl.b,hsl.a))))},WPGMZA.ColorInput.prototype.rgbToHsl=function(r,g,b,a){var rgb={r:0<=r?r/255:255,g:0<=g?g/255:255,b:0<=b?b/255:255,a:0<=a?a:1},r=Math.min(rgb.r,rgb.g,rgb.b),g=Math.max(rgb.r,rgb.g,rgb.b),delta=g-r,hsl={h:(g+r)/2,s:(g+r)/2,l:(g+r)/2,a:rgb.a};if(0!=delta){switch(hsl.s=.5<hsl.l?delta/(2-g-r):delta/(g+r),g){case rgb.r:hsl.h=(rgb.g-rgb.b)/delta+(rgb.g<rgb.b?6:0);break;case rgb.g:hsl.h=(rgb.b-rgb.r)/delta+2;break;case rgb.b:hsl.h=(rgb.r-rgb.g)/delta+4}hsl.h=hsl.h/6}else hsl.h=0,hsl.s=0;return hsl.h=parseInt(360*hsl.h),hsl.s=parseInt(100*hsl.s),hsl.l=parseInt(100*hsl.l),hsl},WPGMZA.ColorInput.prototype.hexToRgb=function(hex){return(hex=hex.trim().toLowerCase().replace(/ /g,"").replace(/[^A-Za-z0-9\s]/g,"")).length<6&&(hex+=hex.charAt(hex.length-1).repeat(6-hex.length)),{r:parseInt(hex.slice(0,2),16),g:parseInt(hex.slice(2,4),16),b:parseInt(hex.slice(4,6),16),a:6<hex.length?this.floatToPrecision(parseInt(hex.slice(6,8),16)/255,2):1}},WPGMZA.ColorInput.prototype.hslToRgb=function(h,s,l,a){var h={h:0<=h?h:0,s:0<=s?s/100:0,l:0<=l?l/100:0,a:0<=a?a:1},s={r:0,g:0,b:0,a:h.a},l=(1-Math.abs(2*h.l-1))*h.s,a=l*(1-Math.abs(h.h/60%2-1)),diff=h.l-l/2;return 0<=h.h&&h.h<60?(s.r=l,s.g=a,s.b=0):60<=h.h&&h.h<120?(s.r=a,s.g=l,s.b=0):120<=h.h&&h.h<180?(s.r=0,s.g=l,s.b=a):180<=h.h&&h.h<240?(s.r=0,s.g=a,s.b=l):240<=h.h&&h.h<300?(s.r=a,s.g=0,s.b=l):300<=h.h&&h.h<360&&(s.r=l,s.g=0,s.b=a),s.r=Math.round(255*(s.r+diff)),s.g=Math.round(255*(s.g+diff)),s.b=Math.round(255*(s.b+diff)),s},WPGMZA.ColorInput.prototype.rgbToHex=function(r,g,b,a){var i,rgb={r:0<=r?r:255,g:0<=g?g:255,b:0<=b?b:255,a:0<=a?a:1};for(i in rgb.r=rgb.r.toString(16),rgb.g=rgb.g.toString(16),rgb.b=rgb.b.toString(16),rgb.a=rgb.a<1?Math.round(255*rgb.a).toString(16):"",rgb)1===rgb[i].length&&(rgb[i]="0"+rgb[i]);return"#"+rgb.r+rgb.g+rgb.b+rgb.a},WPGMZA.ColorInput.prototype.floatToPrecision=function(float,precision){return float=parseFloat(float),parseFloat(float.toFixed(precision))},WPGMZA.ColorInput.prototype.wrap=function(){var self=this;if(!this.element||"text"!==this.type)throw new Error("WPGMZA.ColorInput requires a text field as a base");this.element.hide(),this.container=$("<div class='wpgmza-color-input-wrapper' />"),this.container.insertAfter(this.element),this.container.append(this.element),this.options.autoClose&&($(document.body).on("click",function(){self.state.open&&(self.state.mouse.down=!1,self.onTogglePicker())}),$(document.body).on("colorpicker.open.wpgmza",function(event){event.instance!==self&&self.state.open&&self.onTogglePicker()}))},WPGMZA.ColorInput.prototype.renderControls=function(){var self=this;this.container&&(this.preview=$("<div class='wpgmza-color-preview wpgmza-shadow' />"),this.swatch=$("<div class='swatch' />"),this.picker=$("<div class='wpgmza-color-picker wpgmza-card wpgmza-shadow' />"),this.preview.append(this.swatch),this.picker.addClass("anchor-"+this.options.anchor),this.preview.addClass("anchor-"+this.options.anchor),this.preview.on("click",function(event){event.stopPropagation(),self.onTogglePicker()}),this.picker.on("click",function(event){event.stopPropagation()}),this.container.append(this.preview),this.options.container&&0<$(this.options.container).length?($(this.options.container).append(this.picker),$(this.options.container).addClass("wpgmza-color-input-host")):this.container.append(this.picker),this.options.autoOpen)&&this.preview.trigger("click")},WPGMZA.ColorInput.prototype.renderPicker=function(){this.state.initialized||(this.renderWheel(),this.renderFields(),this.renderPalette(),this.state.initialized=!0)},WPGMZA.ColorInput.prototype.renderWheel=function(){var self=this;this.wheel={wrap:$("<div class='canvas-wrapper' />"),element:$("<canvas class='color-wheel' />"),handle:$("<div class='canvas-handle' />"),slider:$("<div class='canvas-slider' />")},this.wheel.target=this.wheel.element.get(0),this.wheel.target.height=256,this.wheel.target.width=256,this.wheel.radius=(this.wheel.target.width-2*(this.options.wheelBorderWidth+this.options.wheelPadding))/2,this.wheel.degreeStep=1/this.wheel.radius,this.wheel.context=this.wheel.target.getContext("2d"),this.wheel.context.clearRect(0,0,this.wheel.target.width,this.wheel.target.height),this.wheel.grid={canvas:document.createElement("canvas")},this.wheel.grid.canvas.width=20,this.wheel.grid.canvas.height=20,this.wheel.grid.context=this.wheel.grid.canvas.getContext("2d"),this.wheel.grid.context.fillStyle="rgb(255,255,255)",this.wheel.grid.context.fillRect(0,0,this.wheel.grid.canvas.width,this.wheel.grid.canvas.height),this.wheel.grid.context.fillStyle="rgb(180,180,180)",this.wheel.grid.context.fillRect(0,0,this.wheel.grid.canvas.width/2,this.wheel.grid.canvas.height/2),this.wheel.grid.context.fillRect(this.wheel.grid.canvas.width/2,this.wheel.grid.canvas.height/2,this.wheel.grid.canvas.width/2,this.wheel.grid.canvas.height/2),this.wheel.element.on("mousedown",function(event){self.state.mouse.down=!0,self.onPickerMouseSelect(event)}),this.wheel.element.on("mousemove",function(event){self.state.mouse.down&&self.onPickerMouseSelect(event)}),this.wheel.element.on("mouseup",function(event){self.clearStates()}),this.wheel.element.on("mouseleave",function(event){self.clearStates()}),this.wheel.wrap.append(this.wheel.element),this.wheel.wrap.append(this.wheel.handle),this.wheel.wrap.append(this.wheel.slider),this.picker.append(this.wheel.wrap)},WPGMZA.ColorInput.prototype.renderFields=function(){var group,self=this;for(group in this.fields={wrap:$("<div class='wpgmza-color-field-wrapper' />"),toggle:$("<div class='color-field-toggle' />"),blocks:{hsla:{keys:["h","s","l","a"]},rgba:{keys:["r","g","b","a"]},hex:{keys:["hex"]}}},this.fields.toggle.on("click",function(){var view=self.fields.view;switch(view){case"hex":view="hsla";break;case"hsla":view="rgba";break;case"rgba":view="hex"}self.updateFieldView(view)}),this.fields.wrap.append(this.fields.toggle),this.fields.blocks){var index,keys=this.fields.blocks[group].keys;for(index in this.fields.blocks[group].wrap=$("<div class='field-block' data-type='"+group+"'/>"),this.fields.blocks[group].rows={labels:$("<div class='labels' />"),controls:$("<div class='controls' />")},this.fields.blocks[group].wrap.append(this.fields.blocks[group].rows.controls),this.fields.blocks[group].wrap.append(this.fields.blocks[group].rows.labels),this.options.supportAlpha||-1===keys.indexOf("a")||this.fields.blocks[group].wrap.addClass("alpha-disabled"),keys){var name=keys[index],label=$("<div class='inner-label' />");label.text(name),this.fields.blocks[group][name]=$("<input type='text'/>"),this.fields.blocks[group].rows.controls.append(this.fields.blocks[group][name]),this.fields.blocks[group].rows.labels.append(label),this.fields.blocks[group][name].on("keydown",function(event){var originalEvent=event.originalEvent;"Enter"===originalEvent.key&&(originalEvent.preventDefault(),originalEvent.stopPropagation(),$(event.currentTarget).trigger("change"))}),this.fields.blocks[group][name].on("change",function(){self.onFieldChange(this)})}this.fields.wrap.append(this.fields.blocks[group].wrap)}this.picker.append(this.fields.wrap),this.updateFieldView()},WPGMZA.ColorInput.prototype.renderPalette=function(){var self=this;if(this.options.supportPalette){for(var i in this.palette={wrap:$("<div class='wpgmza-color-palette-wrap' />"),variations:[{s:-10,l:-10},{h:15},{h:30},{h:-15},{h:-30},{h:100,s:10},{h:-100,s:-10},{h:180}],controls:[]},this.palette.variations){var mutator,variation=this.palette.variations[i],control=$("<div class='palette-swatch' />");for(mutator in variation)control.attr("data-"+mutator,variation[mutator]);control.on("click",function(){var elem=$(this);self.parseColor(elem.css("background-color")),self.element.trigger("input")}),this.palette.wrap.append(control),this.palette.controls.push(control)}this.picker.append(this.palette.wrap)}},WPGMZA.ColorInput.prototype.updateWheel=function(){this.wheel.center={x:this.wheel.radius+this.options.wheelBorderWidth+this.options.wheelPadding,y:this.wheel.radius+this.options.wheelBorderWidth+this.options.wheelPadding},this.color.a<1&&(this.wheel.grid.pattern=this.wheel.context.createPattern(this.wheel.grid.canvas,"repeat"),this.wheel.context.fillStyle=this.wheel.grid.pattern,this.wheel.context.beginPath(),this.wheel.context.arc(this.wheel.center.x,this.wheel.center.y,this.wheel.radius,0,2*Math.PI,!0),this.wheel.context.closePath(),this.wheel.context.fill());for(var i=0;i<360;i++){var startAngle=(i-1)*Math.PI/180,endAngle=(i+1)*Math.PI/180;this.wheel.context.beginPath(),this.wheel.context.moveTo(this.wheel.center.x,this.wheel.center.y),this.wheel.context.arc(this.wheel.center.x,this.wheel.center.y,this.wheel.radius,startAngle,endAngle),this.wheel.context.closePath(),this.wheel.context.fillStyle="hsla("+i+", 100%, 50%, "+this.color.a+")",this.wheel.context.fill()}var gradient=this.wheel.context.createRadialGradient(this.wheel.center.x,this.wheel.center.y,0,this.wheel.center.x,this.wheel.center.y,this.wheel.radius),gradient=(gradient.addColorStop(0,"rgba(255, 255, 255, 1)"),gradient.addColorStop(1,"rgba(255, 255, 255, 0)"),this.wheel.context.fillStyle=gradient,this.wheel.context.beginPath(),this.wheel.context.arc(this.wheel.center.x,this.wheel.center.y,this.wheel.radius,0,2*Math.PI,!0),this.wheel.context.closePath(),this.wheel.context.fill(),this.wheel.context.lineWidth=2,this.wheel.context.strokeStyle=this.options.wheelBorderColor,this.wheel.context.stroke(),this.wheel.context.createLinearGradient(this.wheel.center.x,0,this.wheel.center.x,this.wheel.target.height)),gradient=(gradient.addColorStop(0,this.getColor({l:95},"hsl")),gradient.addColorStop(.5,this.getColor({l:50},"hsl")),gradient.addColorStop(1,this.getColor({l:5},"hsl")),this.wheel.context.beginPath(),this.wheel.context.lineWidth=this.options.wheelBorderWidth,this.wheel.context.strokeStyle=gradient,this.wheel.context.arc(this.wheel.center.x,this.wheel.center.y,this.wheel.radius+this.options.wheelPadding+this.options.wheelBorderWidth/2,0,2*Math.PI),this.wheel.context.stroke(),this.wheel.context.beginPath(),this.wheel.context.lineWidth=1,this.wheel.context.strokeStyle=this.options.wheelBorderColor,this.wheel.context.arc(this.wheel.center.x,this.wheel.center.y,this.wheel.radius+this.options.wheelPadding+this.options.wheelBorderWidth,0,2*Math.PI),this.wheel.context.stroke(),this.wheel.context.beginPath(),this.wheel.context.arc(this.wheel.center.x,this.wheel.center.y,this.wheel.radius+this.options.wheelPadding,0,2*Math.PI),this.wheel.context.stroke(),this.wheel.context.createRadialGradient(this.wheel.center.x,this.wheel.center.y,0,this.wheel.center.x,this.wheel.center.y,this.wheel.radius));gradient.addColorStop(0,"rgba(80, 80, 80, 0)"),gradient.addColorStop(.95,"rgba(80, 80, 80, 0.0)"),gradient.addColorStop(1,"rgba(80, 80, 80, 0.1)"),this.wheel.context.beginPath(),this.wheel.context.lineWidth=6,this.wheel.context.strokeStyle=gradient,this.wheel.context.arc(this.wheel.center.x,this.wheel.center.y,this.wheel.radius-3,0,2*Math.PI),this.wheel.context.stroke()},WPGMZA.ColorInput.prototype.update=function(){this.updateHandles(),this.updateWheel(),this.updateFields(),this.updatePalette()},WPGMZA.ColorInput.prototype.updateHandles=function(){var localRadius=this.wheel.element.width()/2,localHandleOffset=(localRadius-this.options.wheelBorderWidth-this.options.wheelPadding)/100*this.color.s,localHandleOffset={left:localRadius+localHandleOffset*Math.cos(this.degreesToRadians(this.color.h))+"px",top:localRadius+localHandleOffset*Math.sin(this.degreesToRadians(this.color.h))+"px"},localHandleOffset=(this.wheel.handle.css(localHandleOffset),this.color.l/100*360/2),localRadius=(this.state.sliderInvert&&(localHandleOffset=360-localHandleOffset),{left:localRadius+(localRadius-this.options.wheelBorderWidth/2)*Math.cos(this.degreesToRadians(localHandleOffset+90))+"px",top:localRadius+(localRadius-this.options.wheelBorderWidth/2)*Math.sin(this.degreesToRadians(localHandleOffset+90))+"px"});this.wheel.slider.css(localRadius)},WPGMZA.ColorInput.prototype.updatePreview=function(){this.swatch.css({background:this.getColor(!1,"rgba")})},WPGMZA.ColorInput.prototype.updateFields=function(){var group,hsl=Object.assign({},this.color);for(group in this.fields.blocks)switch(group){case"hsla":this.fields.blocks[group].h.val(hsl.h),this.fields.blocks[group].s.val(hsl.s),this.fields.blocks[group].l.val(hsl.l),this.fields.blocks[group].a.val(hsl.a);break;case"rgba":var rgb=this.hslToRgb(hsl.h,hsl.s,hsl.l,hsl.a);this.fields.blocks[group].r.val(rgb.r),this.fields.blocks[group].g.val(rgb.g),this.fields.blocks[group].b.val(rgb.b),this.fields.blocks[group].a.val(rgb.a);break;case"hex":var rgb=this.hslToRgb(hsl.h,hsl.s,hsl.l,hsl.a),hex=this.rgbToHex(rgb.r,rgb.g,rgb.b,rgb.a);this.fields.blocks[group].hex.val(hex)}},WPGMZA.ColorInput.prototype.updatePalette=function(){if(this.options.supportPalette)for(var i in this.palette.controls){var mutator,hsl=Object.assign({},this.color),i=this.palette.controls[i],data=i.data();for(mutator in 0===hsl.l?(data.h&&(hsl.l+=Math.abs(data.h)/360*100),hsl.l+=10):100===hsl.l&&(data.h&&(hsl.l-=Math.abs(data.h)/360*100),hsl.l-=10),data)hsl[mutator]+=data[mutator];hsl.h<0?hsl.h+=360:360<hsl.h&&(hsl.h-=360),hsl.h=this.clamp(0,360,hsl.h),hsl.s=this.clamp(0,100,hsl.s),hsl.l=this.clamp(0,100,hsl.l);var rgb=this.hslToRgb(hsl.h,hsl.s,hsl.l);i.css("background","rgb("+rgb.r+", "+rgb.g+", "+rgb.b+")")}},WPGMZA.ColorInput.prototype.updateFieldView=function(view){switch(view=view||this.options.format||"hex"){case"rgb":view="rgba";break;case"hsl":view="hsla"}for(var group in this.fields.view=view,this.fields.blocks)group===this.fields.view?this.fields.blocks[group].wrap.show():this.fields.blocks[group].wrap.hide()},WPGMZA.ColorInput.prototype.onPickerMouseSelect=function(event){var localRadius=this.wheel.element.width()/2,event=this.getMousePositionInCanvas(this.wheel.target,event),event={x:event.x-localRadius,y:event.y-localRadius},angle=360*Math.atan2(event.y,event.x)/(2*Math.PI),event=(angle<0&&(angle+=360),Math.sqrt(event.x*event.x+event.y*event.y)),range={pickerScaler:localRadius/this.wheel.radius};range.pickerEdge=range.pickerScaler*localRadius,(event<=range.pickerEdge||this.state.lockPicker)&&!this.state.lockSlide?(this.setColor({h:parseInt(angle),s:Math.min(parseInt(event/range.pickerEdge*100),100)}),this.state.lockPicker=!0):((angle-=90)<0&&(angle+=360),this.state.sliderInvert=!1,180<angle&&(angle=180-(angle-180),this.state.sliderInvert=!0),this.setColor({l:parseInt(angle/180*100)}),this.state.lockSlide=!0),this.element.trigger("input")},WPGMZA.ColorInput.prototype.onFieldChange=function(field){if(field&&""!==$(field).val().trim()){var field=$(field).closest(".field-block"),type=field.data("type"),raw=[];if(field.find("input").each(function(){raw.push($(this).val())}),("hsla"===type||"rgba"===type)&&raw[3]){field=raw[3];if("."===field.trim().charAt(field.trim().length-1))return}switch(type){case"hsla":(hsl={h:raw[0]?parseInt(raw[0]):0,s:raw[1]?parseInt(raw[1]):0,l:raw[2]?parseInt(raw[2]):100,a:raw[3]?parseFloat(raw[3]):1}).h=this.clamp(0,360,hsl.h),hsl.s=this.clamp(0,100,hsl.s),hsl.l=this.clamp(0,100,hsl.l),hsl.a=this.clamp(0,1,hsl.a),this.setColor(hsl);break;case"rgba":(rgb={r:raw[0]?parseInt(raw[0]):255,g:raw[1]?parseInt(raw[1]):255,b:raw[2]?parseInt(raw[2]):255,a:raw[3]?parseFloat(raw[3]):1}).r=this.clamp(0,255,rgb.r),rgb.g=this.clamp(0,255,rgb.g),rgb.b=this.clamp(0,255,rgb.b),rgb.a=this.clamp(0,1,rgb.a);var hsl=this.rgbToHsl(rgb.r,rgb.g,rgb.b,rgb.a);this.setColor(hsl);break;case"hex":var rgb=this.hexToRgb(raw[0]||"#ffffff");this.setColor(this.rgbToHsl(rgb.r,rgb.g,rgb.b,rgb.a))}this.element.trigger("input")}},WPGMZA.ColorInput.prototype.onTogglePicker=function(){this.renderPicker(),this.picker.toggleClass("active"),this.update(),this.state.open=this.picker.hasClass("active"),this.state.open&&$(document.body).trigger({type:"colorpicker.open.wpgmza",instance:this})},WPGMZA.ColorInput.prototype.clearStates=function(){this.state.mouse.down=!1,this.state.lockSlide=!1,this.state.lockPicker=!1},WPGMZA.ColorInput.prototype.commit=function(){var syncValue=this.getColor();this.element.val(syncValue),this.element.trigger("change")},$(document.body).ready(function(){$("input.wpgmza-color-input").each(function(index,el){el.wpgmzaColorInput=WPGMZA.ColorInput.createInstance(el)})})}),jQuery(function($){WPGMZA.CSSBackdropFilterInput=function(element,options){if(!(element instanceof HTMLInputElement))throw new Error("Element is not an instance of HTMLInputElement");this.element=$(element),this.dataAttributes=this.element.data(),this.type=element.type,this.value=element.value,this.options={},this.parseOptions(options),this.state={initialized:!1},this.filters={blur:{enable:!1,value:0,unit:"px"},brightness:{enable:!1,value:0,unit:"%"},contrast:{enable:!1,value:0,unit:"%"},grayscale:{enable:!1,value:0,unit:"%"},hue_rotate:{enable:!1,value:0,unit:"deg"},invert:{enable:!1,value:0,unit:"%"},sepia:{enable:!1,value:0,unit:"%"},saturate:{enable:!1,value:0,unit:"%"}},this.wrap(),this.renderControls(),this.parseFilters(this.value)},WPGMZA.extend(WPGMZA.CSSBackdropFilterInput,WPGMZA.EventDispatcher),WPGMZA.CSSBackdropFilterInput.FILTER_PATTERN=/(\S+)/g,WPGMZA.CSSBackdropFilterInput.VALUE_PATTERN=/(\(\S*\))/g,WPGMZA.CSSBackdropFilterInput.createInstance=function(element){return new WPGMZA.CSSBackdropFilterInput(element)},WPGMZA.CSSBackdropFilterInput.prototype.parseOptions=function(options){if(options)for(var i in options)void 0!==this.options[i]&&("object"==typeof this.options[i]&&"object"==typeof options[i]?this.options[i]=Object.assign(this.options[i],options[i]):this.options[i]=options[i]);if(this.dataAttributes)for(var i in this.dataAttributes)void 0!==this.options[i]&&(this.options[i]=this.dataAttributes[i])},WPGMZA.CSSBackdropFilterInput.prototype.getFilters=function(override,format){var type,filters=[];for(type in this.filters){var data=this.filters[type];data.enable&&(type=type.replace("_","-"),filters.push(type+"("+data.value+data.unit+")"))}return 0<filters.length?filters.join(" "):"none"},WPGMZA.CSSBackdropFilterInput.prototype.setFilters=function(filters){if(this.clearFilters(),filters instanceof Object)for(var type in filters){var value;this.filters[type]&&(value=filters[type])&&(this.filters[type].enable=!0,this.filters[type].value=value)}this.commit(),this.state.initialized&&this.update()},WPGMZA.CSSBackdropFilterInput.prototype.clearFilters=function(){for(var i in this.filters)this.filters[i].enable=!1,this.filters[i].value=0},WPGMZA.CSSBackdropFilterInput.prototype.parseFilters=function(value){if("string"==typeof value){var filters={};if("none"!==(value=""===(value=value.trim().toLowerCase())?"none":value)){value=value.match(WPGMZA.CSSBackdropFilterInput.FILTER_PATTERN);if(value&&value instanceof Array)for(var match of value){var valueArg=(valueArg=match.match(WPGMZA.CSSBackdropFilterInput.VALUE_PATTERN))instanceof Array&&0<valueArg.length?valueArg[0]:"",match=match.replace(valueArg,"").replace("-","_");let value=null;0<valueArg.length&&(valueArg=valueArg.match(/(\d+)/g))instanceof Array&&0<valueArg.length&&(value=parseFloat(valueArg[0])),filters[match]=value}}this.setFilters(filters)}},WPGMZA.CSSBackdropFilterInput.prototype.wrap=function(){if(!this.element||"text"!==this.type)throw new Error("WPGMZA.CSSUnitInput requires a text field as a base");this.element.hide(),this.container=$("<div class='wpgmza-styling-backdrop-filter-input-wrapper' />"),this.container.insertAfter(this.element),this.container.append(this.element)},WPGMZA.CSSBackdropFilterInput.prototype.renderControls=function(){if(this.container)for(var type in this.itemWrappers={},this.filters){var data=this.filters[type],printType=type.replace("_"," "),wrapper=$("<div class='backdrop-filter-item-wrap' data-type='"+type+"' />"),toggleWrap=$("<div class='backdrop-filter-toggle-wrap' />"),toggleInput=$("<input type='checkbox' class='backdrop-filter-item-toggle' />"),toggleLabel=$("<label />"),controlWrap=$("<div class='backdrop-filter-control-wrap' />");controlAttributes="data-min='1' data-max='100'","deg"===data.unit?controlAttributes="data-min='1' data-max='360'":"px"===data.unit&&(controlAttributes="data-min='1' data-max='200'");const controlInput=$("<input class='backdrop-filter-item-input' type='text' "+controlAttributes+" value='"+data.value+"' />"),controlLabel=$("<small />");controlLabel.append("<span>"+data.value+"</span>"+data.unit);data=$("<div class='backdrop-filter-item-slider' />");toggleLabel.append(toggleInput),toggleLabel.append(printType),toggleWrap.append(toggleLabel),controlWrap.append(controlInput),controlWrap.append(controlLabel),controlWrap.append(data),wrapper.append(toggleWrap),wrapper.append(controlWrap),this.itemWrappers[type]=wrapper,this.container.append(wrapper),this.state.initialized=!0,data.slider({range:"max",min:controlInput.data("min"),max:controlInput.data("max"),value:controlInput.val(),slide:function(event,ui){controlInput.val(ui.value),controlLabel.find("span").text(ui.value),controlInput.trigger("change")},change:function(event,ui){}}),controlInput.wpgmzaRelativeSlider=data,toggleInput.on("change",event=>{var event=$(event.currentTarget),parent=event.closest(".backdrop-filter-item-wrap"),type=parent.data("type");event.is(":checked")?(parent.addClass("enabled"),this.setFilterState(type,!0)):(parent.removeClass("enabled"),this.setFilterState(type,!1))}),controlInput.on("change",event=>{var event=$(event.currentTarget),type=event.closest(".backdrop-filter-item-wrap").data("type");this.setFilterValue(type,event.val())})}},WPGMZA.CSSBackdropFilterInput.prototype.setFilterState=function(type,state){this.filters[type]&&(this.filters[type].enable=state),this.commit()},WPGMZA.CSSBackdropFilterInput.prototype.setFilterValue=function(type,value){this.filters[type]&&(this.filters[type].value=parseFloat(value)),this.commit()},WPGMZA.CSSBackdropFilterInput.prototype.update=function(){if(this.container)for(var type in this.filters){var data=this.filters[type],type=this.container.find('.backdrop-filter-item-wrap[data-type="'+type+'"]');type.find(".backdrop-filter-item-toggle").prop("checked",data.enable).trigger("change"),type.find(".backdrop-filter-item-input").val(data.value).trigger("change"),type.find(".backdrop-filter-item-slider").slider("value",data.value),type.find(".backdrop-filter-control-wrap").find("small span").text(data.value)}},WPGMZA.CSSBackdropFilterInput.prototype.commit=function(){var syncValue=this.getFilters();this.element.val(syncValue),this.element.trigger("change")},$(document.body).ready(function(){$("input.wpgmza-styling-backdrop-filter-input").each(function(index,el){el.wpgmzaCSSBackdropFilterInput=WPGMZA.CSSBackdropFilterInput.createInstance(el)})})}),jQuery(function($){WPGMZA.CSSFilterInput=function(element,options){if(!(element instanceof HTMLInputElement))throw new Error("Element is not an instance of HTMLInputElement");this.element=$(element),this.dataAttributes=this.element.data(),this.type=element.type,this.value=element.value,this.options={},this.parseOptions(options),this.state={initialized:!1},this.filters={blur:{enable:!1,value:0,unit:"px"},brightness:{enable:!1,value:0,unit:"%"},contrast:{enable:!1,value:0,unit:"%"},grayscale:{enable:!1,value:0,unit:"%"},hue_rotate:{enable:!1,value:0,unit:"deg"},invert:{enable:!1,value:0,unit:"%"},sepia:{enable:!1,value:0,unit:"%"},saturate:{enable:!1,value:0,unit:"%"}},this.wrap(),this.renderControls(),this.parseFilters(this.value)},WPGMZA.extend(WPGMZA.CSSFilterInput,WPGMZA.EventDispatcher),WPGMZA.CSSFilterInput.FILTER_PATTERN=/(\S+)/g,WPGMZA.CSSFilterInput.VALUE_PATTERN=/(\(\S*\))/g,WPGMZA.CSSFilterInput.createInstance=function(element){return new WPGMZA.CSSFilterInput(element)},WPGMZA.CSSFilterInput.prototype.parseOptions=function(options){if(options)for(var i in options)void 0!==this.options[i]&&("object"==typeof this.options[i]&&"object"==typeof options[i]?this.options[i]=Object.assign(this.options[i],options[i]):this.options[i]=options[i]);if(this.dataAttributes)for(var i in this.dataAttributes)void 0!==this.options[i]&&(this.options[i]=this.dataAttributes[i])},WPGMZA.CSSFilterInput.prototype.getFilters=function(override,format){var type,filters=[];for(type in this.filters){var data=this.filters[type];data.enable&&(type=type.replace("_","-"),filters.push(type+"("+data.value+data.unit+")"))}return 0<filters.length?filters.join(" "):"none"},WPGMZA.CSSFilterInput.prototype.setFilters=function(filters){if(this.clearFilters(),filters instanceof Object)for(var type in filters){var value;this.filters[type]&&(value=filters[type])&&(this.filters[type].enable=!0,this.filters[type].value=value)}this.commit(),this.state.initialized&&this.update()},WPGMZA.CSSFilterInput.prototype.clearFilters=function(){for(var i in this.filters)this.filters[i].enable=!1,this.filters[i].value=0},WPGMZA.CSSFilterInput.prototype.parseFilters=function(value){if("string"==typeof value){var filters={};if("none"!==(value=""===(value=value.trim().toLowerCase())?"none":value)){value=value.match(WPGMZA.CSSFilterInput.FILTER_PATTERN);if(value&&value instanceof Array)for(var match of value){var valueArg=(valueArg=match.match(WPGMZA.CSSFilterInput.VALUE_PATTERN))instanceof Array&&0<valueArg.length?valueArg[0]:"",match=match.replace(valueArg,"").replace("-","_");let value=null;0<valueArg.length&&(valueArg=valueArg.match(/(\d+)/g))instanceof Array&&0<valueArg.length&&(value=parseFloat(valueArg[0])),filters[match]=value}}this.setFilters(filters)}},WPGMZA.CSSFilterInput.prototype.wrap=function(){if(!this.element||"text"!==this.type)throw new Error("WPGMZA.CSSFilterInput requires a text field as a base");this.element.hide(),this.container=$("<div class='wpgmza-css-filter-input-wrapper' />"),this.container.insertAfter(this.element),this.container.append(this.element)},WPGMZA.CSSFilterInput.prototype.renderControls=function(){if(this.container)for(var type in this.itemWrappers={},this.filters){var data=this.filters[type],printType=type.replace("_"," "),wrapper=$("<div class='css-filter-item-wrap' data-type='"+type+"' />"),toggleWrap=$("<div class='css-filter-toggle-wrap' />"),toggleInput=$("<input type='checkbox' class='css-filter-item-toggle' />"),toggleLabel=$("<label />"),controlWrap=$("<div class='css-filter-control-wrap' />");controlAttributes="data-min='1' data-max='100'","deg"===data.unit?controlAttributes="data-min='1' data-max='360'":"px"===data.unit&&(controlAttributes="data-min='1' data-max='200'");const controlInput=$("<input class='css-filter-item-input' type='text' "+controlAttributes+" value='"+data.value+"' />"),controlLabel=$("<small />");controlLabel.append("<span>"+data.value+"</span>"+data.unit);data=$("<div class='css-filter-item-slider' />");toggleLabel.append(toggleInput),toggleLabel.append(printType),toggleWrap.append(toggleLabel),controlWrap.append(controlInput),controlWrap.append(controlLabel),controlWrap.append(data),wrapper.append(toggleWrap),wrapper.append(controlWrap),this.itemWrappers[type]=wrapper,this.container.append(wrapper),this.state.initialized=!0,data.slider({range:"max",min:controlInput.data("min"),max:controlInput.data("max"),value:controlInput.val(),slide:function(event,ui){controlInput.val(ui.value),controlLabel.find("span").text(ui.value),controlInput.trigger("change")},change:function(event,ui){}}),controlInput.wpgmzaRelativeSlider=data,toggleInput.on("change",event=>{var event=$(event.currentTarget),parent=event.closest(".css-filter-item-wrap"),type=parent.data("type");event.is(":checked")?(parent.addClass("enabled"),this.setFilterState(type,!0)):(parent.removeClass("enabled"),this.setFilterState(type,!1))}),controlInput.on("change",event=>{var event=$(event.currentTarget),type=event.closest(".css-filter-item-wrap").data("type");this.setFilterValue(type,event.val())})}},WPGMZA.CSSFilterInput.prototype.setFilterState=function(type,state){this.filters[type]&&(this.filters[type].enable=state),this.commit()},WPGMZA.CSSFilterInput.prototype.setFilterValue=function(type,value){this.filters[type]&&(this.filters[type].value=parseFloat(value)),this.commit()},WPGMZA.CSSFilterInput.prototype.update=function(){if(this.container)for(var type in this.filters){var data=this.filters[type],type=this.container.find('.css-filter-item-wrap[data-type="'+type+'"]');type.find(".css-filter-item-toggle").prop("checked",data.enable).trigger("change"),type.find(".css-filter-item-input").val(data.value).trigger("change"),type.find(".css-filter-item-slider").slider("value",data.value),type.find(".css-filter-control-wrap").find("small span").text(data.value)}},WPGMZA.CSSFilterInput.prototype.commit=function(){var syncValue=this.getFilters();this.element.val(syncValue),this.element.trigger("change")},$(document.body).ready(function(){$("input.wpgmza-css-filter-input").each(function(index,el){el.wpgmzaCSSFilterInput=WPGMZA.CSSFilterInput.createInstance(el)})})}),jQuery(function($){WPGMZA.CSSStateBlock=function(element,options){if(!(element instanceof HTMLElement))throw new Error("Element is not an instance of HTMLInputElement");this.element=$(element),this.tabs=this.element.find(".wpgmza-css-state-block-item"),this.items=this.element.find(".wpgmza-css-state-block-content"),this.items.removeClass("active"),this.bindEvents(),this.element.find(".wpgmza-css-state-block-item:first-child").click()},WPGMZA.extend(WPGMZA.CSSStateBlock,WPGMZA.EventDispatcher),WPGMZA.CSSStateBlock.createInstance=function(element){return new WPGMZA.CSSStateBlock(element)},WPGMZA.CSSStateBlock.prototype.bindEvents=function(){let self=this;this.tabs.on("click",function(event){self.onClick($(this))})},WPGMZA.CSSStateBlock.prototype.onClick=function(item){var type=item.data("type");type&&(this.tabs.removeClass("active"),item.addClass("active"),this.items.removeClass("active"),this.element.find('.wpgmza-css-state-block-content[data-type="'+type+'"]').addClass("active"))},$(document.body).ready(function(){$(".wpgmza-css-state-block").each(function(index,el){el.wpgmzaCSSStateBlock=WPGMZA.CSSStateBlock.createInstance(el)})})}),jQuery(function($){WPGMZA.CSSUnitInput=function(element,options){if(!(element instanceof HTMLInputElement))throw new Error("Element is not an instance of HTMLInputElement");this.element=$(element),this.dataAttributes=this.element.data(),this.type=element.type,this.value=element.value,this.options={},this.parseOptions(options),this.state={initialized:!1},this.unit={value:0,suffix:"px"},this.wrap(),this.renderControls(),this.parseUnits(this.value)},WPGMZA.extend(WPGMZA.CSSUnitInput,WPGMZA.EventDispatcher),WPGMZA.CSSUnitInput.VALID_TYPES=["px","%","rem","em"],WPGMZA.CSSUnitInput.createInstance=function(element){return new WPGMZA.CSSUnitInput(element)},WPGMZA.CSSUnitInput.prototype.parseOptions=function(options){if(options)for(var i in options)void 0!==this.options[i]&&("object"==typeof this.options[i]&&"object"==typeof options[i]?this.options[i]=Object.assign(this.options[i],options[i]):this.options[i]=options[i]);if(this.dataAttributes)for(var i in this.dataAttributes)void 0!==this.options[i]&&(this.options[i]=this.dataAttributes[i])},WPGMZA.CSSUnitInput.prototype.getUnits=function(override,format){return this.unit.value+this.unit.suffix},WPGMZA.CSSUnitInput.prototype.setUnits=function(value,suffix){this.unit.value=value?parseFloat(value):this.unit.value,this.unit.suffix=suffix?suffix.trim():this.unit.suffix,0<this.unit.value-parseInt(this.unit.value)&&(this.unit.value=parseFloat(this.unit.value.toFixed(2))),this.unit.value<=0&&(this.unit.value=0),this.validateSuffix(),this.commit(),this.state.initialized&&this.update()},WPGMZA.CSSUnitInput.prototype.parseUnits=function(value){if("string"==typeof value){let unit=(value=""===(value=value.trim().toLowerCase().replace(/ /g,""))?"0px":value).match(/((\d+\.\d+)|(\d+))/),suffix=(unit=unit&&unit[0]?parseFloat(unit[0]):this.unit.value,value.match(/(([a-z]+)|(%))/));suffix=suffix&&suffix[0]?suffix[0]:this.unit.suffix,this.setUnits(unit,suffix)}},WPGMZA.CSSUnitInput.prototype.wrap=function(){if(!this.element||"text"!==this.type)throw new Error("WPGMZA.CSSUnitInput requires a text field as a base");this.element.hide(),this.container=$("<div class='wpgmza-styling-unit-input-wrapper' />"),this.container.insertAfter(this.element),this.container.append(this.element)},WPGMZA.CSSUnitInput.prototype.renderControls=function(){this.container&&(this.unitValueInput=$("<input type='text' class='unit-value-input' />"),this.unitSuffixToggle=$("<div class='unit-suffix-toggle' />"),this.unitValueStepDownBtn=$("<div class='unit-stepper-button' data-mode='down' />"),this.unitValueStepUpBtn=$("<div class='unit-stepper-button' data-mode='up' />"),this.unitValueStepperWrap=$("<div class='unit-stepper-wrapper' />"),this.unitInnerWrap=$("<div class='unit-input-inner-wrap' />"),this.unitValueStepperWrap.append(this.unitValueStepUpBtn),this.unitValueStepperWrap.append(this.unitValueStepDownBtn),this.unitInnerWrap.append(this.unitValueStepperWrap),this.unitInnerWrap.append(this.unitValueInput),this.unitInnerWrap.append(this.unitSuffixToggle),this.container.append(this.unitInnerWrap),this.state.initialized=!0,this.unitValueInput.on("keydown",event=>{var originalEvent=event.originalEvent;originalEvent.key&&1===originalEvent.key.length?(0===originalEvent.key.trim().length||"."!==originalEvent.key&&isNaN(parseInt(originalEvent.key)))&&this.unitSuffixToggle.hide():"ArrowUp"===originalEvent.key?this.increment():"ArrowDown"===originalEvent.key?this.decrement():"Enter"===originalEvent.key&&(originalEvent.preventDefault(),originalEvent.stopPropagation(),$(event.currentTarget).trigger("change"))}),this.unitValueInput.on("change",event=>{event=$(event.currentTarget);this.parseUnits(event.val())}),this.unitValueStepUpBtn.on("click",event=>{this.increment()}),this.unitValueStepDownBtn.on("click",event=>{this.decrement()}))},WPGMZA.CSSUnitInput.prototype.validateSuffix=function(){(!this.unit.suffix||-1===WPGMZA.CSSUnitInput.VALID_TYPES.indexOf(this.unit.suffix))&&(this.unit.suffix=this.options.defaultSuffix)},WPGMZA.CSSUnitInput.prototype.increment=function(){this.parseUnits(this.unitValueInput.val());let value=this.unit.value;0<value-parseInt(value)?value+=.1:value+=1,this.setUnits(value,this.unit.suffix)},WPGMZA.CSSUnitInput.prototype.decrement=function(){this.parseUnits(this.unitValueInput.val());let value=this.unit.value;0<value-parseInt(value)?value-=.1:--value,this.setUnits(this.unit.value-1,this.unit.suffix)},WPGMZA.CSSUnitInput.prototype.update=function(){this.unitValueInput&&this.unitSuffixToggle&&(this.unitValueInput.val(this.unit.value),this.unitSuffixToggle.text(this.unit.suffix),this.unitSuffixToggle.show())},WPGMZA.CSSUnitInput.prototype.commit=function(){var syncValue=this.getUnits();this.element.val(syncValue),this.element.trigger("change")},$(document.body).ready(function(){$("input.wpgmza-stylig-unit-input").each(function(index,el){el.wpgmzaCSSUnitInput=WPGMZA.CSSUnitInput.createInstance(el)})})}),jQuery(function($){WPGMZA.DrawingManager=function(map){WPGMZA.assertInstanceOf(this,"DrawingManager"),WPGMZA.EventDispatcher.call(this);var self=this;this.map=map,this.mode=WPGMZA.DrawingManager.MODE_NONE,this.map.on("click rightclick",function(event){self.onMapClick(event)})},WPGMZA.DrawingManager.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.DrawingManager.prototype.constructor=WPGMZA.DrawingManager,WPGMZA.DrawingManager.MODE_NONE=null,WPGMZA.DrawingManager.MODE_MARKER="marker",WPGMZA.DrawingManager.MODE_POLYGON="polygon",WPGMZA.DrawingManager.MODE_POLYLINE="polyline",WPGMZA.DrawingManager.MODE_CIRCLE="circle",WPGMZA.DrawingManager.MODE_RECTANGLE="rectangle",WPGMZA.DrawingManager.MODE_HEATMAP="heatmap",WPGMZA.DrawingManager.MODE_POINTLABEL="pointlabel",WPGMZA.DrawingManager.MODE_IMAGEOVERLAY="imageoverlay",WPGMZA.DrawingManager.getConstructor=function(){return"google-maps"!==WPGMZA.settings.engine?WPGMZA.OLDrawingManager:WPGMZA.GoogleDrawingManager},WPGMZA.DrawingManager.createInstance=function(map){return new(WPGMZA.DrawingManager.getConstructor())(map)},WPGMZA.DrawingManager.prototype.setDrawingMode=function(mode){this.mode=mode,this.trigger("drawingmodechanged")},WPGMZA.DrawingManager.prototype.onMapClick=function(event){event.target instanceof WPGMZA.Map&&(this.mode!==WPGMZA.DrawingManager.MODE_POINTLABEL||this.pointlabel||(this.pointlabel=WPGMZA.Pointlabel.createInstance({center:new WPGMZA.LatLng({lat:event.latLng.lat,lng:event.latLng.lng}),map:this.map}),this.map.addPointlabel(this.pointlabel),this.pointlabel.setEditable(!0),this.onPointlabelComplete(this.pointlabel),this.pointlabel=!1))},WPGMZA.DrawingManager.prototype.onPointlabelComplete=function(pointlabel){var event=new WPGMZA.Event("pointlabelcomplete");event.enginePointlabel=pointlabel,this.dispatchEvent(event)}}),jQuery(function($){WPGMZA.EmbeddedMedia=function(element,container){if(!(element instanceof HTMLElement))throw new Error("Element is not an instance of HTMLInputElement");if(!(container instanceof HTMLElement))throw new Error("Container is not an instance of HTMLInputElement");const self=this;WPGMZA.EventDispatcher.apply(this),this.element=$(element),this.container=$(container),this.corners=["southEast"],this.handles=null,this.activeCorner=!1,this.container.on("mousemove",function(event){self.onMoveHandle(event)}),this.container.on("mouseup",function(event){self.activeCorner&&self.onDeactivateHandle(self.activeCorner)}),this.container.on("mouseleave",function(event){self.activeCorner&&(self.onDeactivateHandle(self.activeCorner),self.onDetach())}),this.container.on("mousedown",function(event){self.onDetach()})},WPGMZA.extend(WPGMZA.EmbeddedMedia,WPGMZA.EventDispatcher),WPGMZA.EmbeddedMedia.createInstance=function(element,container){return new WPGMZA.EmbeddedMedia(element,container)},WPGMZA.EmbeddedMedia.detatchAll=function(){var element;for(element of document.querySelectorAll(".wpgmza-embedded-media"))element.wpgmzaEmbeddedMedia&&element.wpgmzaEmbeddedMedia.onDetach();$(".wpgmza-embedded-media").removeClass("selected"),$(".wpgmza-embedded-media-handle").remove()},WPGMZA.EmbeddedMedia.prototype.onSelect=function(){this.element.addClass("selected"),this.updateHandles()},WPGMZA.EmbeddedMedia.prototype.onDetach=function(){this.element.removeClass("selected"),this.destroyHandles(),this.container.trigger("media_resized")},WPGMZA.EmbeddedMedia.prototype.onActivateHandle=function(corner){this.activeCorner=corner},WPGMZA.EmbeddedMedia.prototype.onDeactivateHandle=function(corner){this.activeCorner=!1,this.updateHandles()},WPGMZA.EmbeddedMedia.prototype.onMoveHandle=function(event){var maxTop;this.activeCorner&&this.handles[this.activeCorner]&&(event=this.getMousePosition(event),this.handles[this.activeCorner].element)&&(maxTop=this.getAnchorPosition().y+this.element.height(),event.y>maxTop&&(event.y=maxTop),this.handles[this.activeCorner].element.css({left:event.x-3+"px",top:event.y-3+"px"}),this.applyResize(event))},WPGMZA.EmbeddedMedia.prototype.createHandles=function(){if(!this.handles){this.handles={};for(var corner of this.corners)this.handles[corner]={element:$("<div/>"),mutating:!1},this.handles[corner].element.addClass("wpgmza-embedded-media-handle"),this.handles[corner].element.attr("data-corner",corner),this.container.append(this.handles[corner].element),this.bindHandle(corner)}},WPGMZA.EmbeddedMedia.prototype.destroyHandles=function(){if(this.handles&&this.handles instanceof Object){for(var i in this.handles){i=this.handles[i];i.element&&i.element.remove()}this.handles=null}},WPGMZA.EmbeddedMedia.prototype.updateHandles=function(){this.createHandles();var anchor=this.getAnchorPosition();if(this.handles&&this.handles instanceof Object)for(var corner in this.handles){var handle=this.handles[corner].element,position={top:0,left:0};"southEast"===corner&&(position.left=anchor.x+this.element.width(),position.top=anchor.y+this.element.height()),handle.css({left:position.left-3+"px",top:position.top-3+"px"})}},WPGMZA.EmbeddedMedia.prototype.bindHandle=function(corner){const self=this;this.handles&&this.handles[corner]&&(this.handles[corner].element.on("mousedown",function(event){event.preventDefault(),event.stopPropagation(),self.onActivateHandle(corner)}),this.handles[corner].element.on("mouseup",function(event){event.preventDefault(),event.stopPropagation(),self.onDeactivateHandle(corner)}))},WPGMZA.EmbeddedMedia.prototype.applyResize=function(mouse){var anchor=this.getAnchorPosition(),padding=parseInt(this.container.css("padding").replace("px","")),mouse=Math.abs(mouse.x-anchor.x),mouse=this.clamp(padding,this.container.width()-padding,mouse);this.element.css("width",parseInt(mouse)+"px"),this.element.attr("width",parseInt(mouse)),this.container.trigger("media_resized")},WPGMZA.EmbeddedMedia.prototype.getMousePosition=function(event){event=event.originalEvent||event;var event={x:parseInt(event.pageX-this.container.offset().left),y:parseInt(event.pageY-this.container.offset().top)},padding=parseInt(this.container.css("padding").replace("px",""));return event.x=this.clamp(padding,this.container.width()-padding,event.x),event.y=this.clamp(padding,this.container.height()-padding,event.y),event},WPGMZA.EmbeddedMedia.prototype.getAnchorPosition=function(){return{x:parseInt(this.element.offset().left-this.container.offset().left),y:parseInt(this.element.offset().top-this.container.offset().top)}},WPGMZA.EmbeddedMedia.prototype.clamp=function(min,max,value){return isNaN(value)&&(value=0),Math.min(Math.max(value,min),max)}}),jQuery(function($){WPGMZA.Event=function(options){if("string"==typeof options&&(this.type=options),this.bubbles=!0,this.cancelable=!0,this.phase=WPGMZA.Event.PHASE_CAPTURE,this.target=null,this._cancelled=!1,"object"==typeof options)for(var name in options)this[name]=options[name]},WPGMZA.Event.CAPTURING_PHASE=0,WPGMZA.Event.AT_TARGET=1,WPGMZA.Event.BUBBLING_PHASE=2,WPGMZA.Event.prototype.stopPropagation=function(){this._cancelled=!0}}),jQuery(function($){WPGMZA.FancyControls={formatToggleSwitch:function(el){var div=$("<div class='switch'></div>"),input=el,el=el.parentNode,text=$(el).text().trim(),label=$("<label></label>");$(input).addClass("cmn-toggle cmn-toggle-round-flat"),$(input).attr("id",$(input).attr("name")),$(label).attr("for",$(input).attr("name")),$(div).append(input),$(div).append(label),$(el).replaceWith(div),$(div).wrap($("<div></div>")),$(div).after(text)},formatToggleButton:function(el){var div=$("<div class='switch'></div>"),input=el,el=el.parentNode,text=$(el).text().trim(),label=$("<label></label>");$(input).addClass("cmn-toggle cmn-toggle-yes-no"),$(input).attr("id",$(input).attr("name")),$(label).attr("for",$(input).attr("name")),$(label).attr("data-on",WPGMZA.localized_strings.yes),$(label).attr("data-off",WPGMZA.localized_strings.no),$(div).append(input),$(div).append(label),$(el).replaceWith(div),$(div).wrap($("<div></div>")),$(div).after(text)}},$(".wpgmza-fancy-toggle-switch").each(function(index,el){WPGMZA.FancyControls.formatToggleSwitch(el)}),$(".wpgmza-fancy-toggle-button").each(function(index,el){WPGMZA.FancyControls.formatToggleButton(el)})}),jQuery(function($){WPGMZA.Feature=function(options){for(var key in WPGMZA.assertInstanceOf(this,"Feature"),WPGMZA.EventDispatcher.call(this),this.id=-1,options)this[key]=options[key]},WPGMZA.extend(WPGMZA.Feature,WPGMZA.EventDispatcher),WPGMZA.MapObject=WPGMZA.Feature,WPGMZA.Feature.prototype.parseGeometry=function(subject){if("string"==typeof subject&&subject.match(/^\[/))try{subject=JSON.parse(subject)}catch(e){}if("object"==typeof subject){for(var arr=subject,i=0;i<arr.length;i++)arr[i].lat=parseFloat(arr[i].lat),arr[i].lng=parseFloat(arr[i].lng);return arr}if("string"!=typeof subject)throw new Error("Invalid geometry");for(var coords,results=[],pairs=subject.replace(/[^ ,\d\.\-+e]/g,"").split(","),i=0;i<pairs.length;i++)coords=pairs[i].split(" "),results.push({lat:parseFloat(coords[1]),lng:parseFloat(coords[0])});return results},WPGMZA.Feature.prototype.setOptions=function(options){for(var key in options)this[key]=options[key];this.updateNativeFeature()},WPGMZA.Feature.prototype.setEditable=function(editable){this.setOptions({editable:editable})},WPGMZA.Feature.prototype.setDraggable=function(draggable){this.setOptions({draggable:draggable})},WPGMZA.Feature.prototype.getScalarProperties=function(){var key,options={};for(key in this)switch(typeof this[key]){case"number":options[key]=parseFloat(this[key]);break;case"boolean":case"string":options[key]=this[key]}return options},WPGMZA.Feature.prototype.updateNativeFeature=function(){var props=this.getScalarProperties();"open-layers"===WPGMZA.settings.engine?this.layer&&this.layer.setStyle(WPGMZA.OLFeature.getOLStyle(props)):this.googleFeature.setOptions(props)}}),jQuery(function($){WPGMZA.FriendlyError=function(){}}),jQuery(function($){WPGMZA.GenericModal=function(element,complete,cancel){this.element=$(element),this._onComplete=complete||!1,this._onCancel=cancel||!1,this.bindEvents()},WPGMZA.extend(WPGMZA.GenericModal,WPGMZA.EventDispatcher),WPGMZA.GenericModal.createInstance=function(element,complete,cancel){return new(WPGMZA.isProVersion()?WPGMZA.ProGenericModal:WPGMZA.GenericModal)(element,complete,cancel)},WPGMZA.GenericModal.prototype.bindEvents=function(){const self=this;this.element.on("click",".wpgmza-button",function(){"complete"===$(this).data("action")?self.onComplete():self.onCancel()})},WPGMZA.GenericModal.prototype.getData=function(){const data={};return this.element.find("input,select").each(function(){$(this).data("ajax-name")&&(data[$(this).data("ajax-name")]=$(this).val())}),data},WPGMZA.GenericModal.prototype.onComplete=function(){this.hide(),"function"==typeof this._onComplete&&this._onComplete(this.getData())},WPGMZA.GenericModal.prototype.onCancel=function(){this.hide(),"function"==typeof this._onCancel&&this._onCancel()},WPGMZA.GenericModal.prototype.show=function(complete,cancel){this._onComplete=complete||this._onComplete,this._onCancel=cancel||this._onCancel,this.element.addClass("pending")},WPGMZA.GenericModal.prototype.hide=function(){this.element.removeClass("pending")}}),jQuery(function($){WPGMZA.Geocoder=function(){WPGMZA.assertInstanceOf(this,"Geocoder")},WPGMZA.Geocoder.SUCCESS="success",WPGMZA.Geocoder.ZERO_RESULTS="zero-results",WPGMZA.Geocoder.FAIL="fail",WPGMZA.Geocoder.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.GoogleGeocoder:WPGMZA.OLGeocoder},WPGMZA.Geocoder.createInstance=function(){return new(WPGMZA.Geocoder.getConstructor())},WPGMZA.Geocoder.prototype.getLatLngFromAddress=function(options,callback){WPGMZA.isLatLngString(options.address)&&(options=options.address.split(/,\s*/),callback([(callback=new WPGMZA.LatLng({lat:parseFloat(options[0]),lng:parseFloat(options[1])})).latLng=callback],WPGMZA.Geocoder.SUCCESS))},WPGMZA.Geocoder.prototype.getAddressFromLatLng=function(options,callback){callback([new WPGMZA.LatLng(options.latLng).toString()],WPGMZA.Geocoder.SUCCESS)},WPGMZA.Geocoder.prototype.geocode=function(options,callback){if("address"in options)return this.getLatLngFromAddress(options,callback);if("latLng"in options)return this.getAddressFromLatLng(options,callback);throw new Error("You must supply either a latLng or address")}}),jQuery(function($){WPGMZA.GoogleAPIErrorHandler=function(){var _error,self=this;"google-maps"==WPGMZA.settings.engine&&("map-edit"==WPGMZA.currentPage||0==WPGMZA.is_admin&&1==WPGMZA.userCanAdministrator)&&(this.element=$(WPGMZA.html.googleMapsAPIErrorDialog),1==WPGMZA.is_admin&&this.element.find(".wpgmza-front-end-only").remove(),this.errorMessageList=this.element.find(".wpgmza-google-api-error-list"),this.templateListItem=this.element.find("li.template").remove(),this.messagesAlreadyDisplayed={},_error=console.error,console.error=function(message){self.onErrorMessage(message),_error.apply(this,arguments)},"google-maps"!=WPGMZA.settings.engine||WPGMZA.settings.wpgmza_google_maps_api_key&&WPGMZA.settings.wpgmza_google_maps_api_key.length||WPGMZA.getCurrentPage()==WPGMZA.PAGE_MAP_EDIT||this.addErrorMessage(WPGMZA.localized_strings.no_google_maps_api_key,["https://www.wpgmaps.com/documentation/creating-a-google-maps-api-key/"]))},WPGMZA.GoogleAPIErrorHandler.prototype.onErrorMessage=function(message){var m,urls;message&&((m=(m=(m=message.match(/You have exceeded your (daily )?request quota for this API/))||message.match(/This API project is not authorized to use this API/))||message.match(/^Geocoding Service: .+/))?(urls=message.match(/http(s)?:\/\/[^\s]+/gm),this.addErrorMessage(m[0],urls)):(m=message.match(/^Google Maps.+error: (.+)\s+(http(s?):\/\/.+)/m))&&this.addErrorMessage(m[1].replace(/([A-Z])/g," $1"),[m[2]]))},WPGMZA.GoogleAPIErrorHandler.prototype.addErrorMessage=function(message,urls){var self=this;if(!this.messagesAlreadyDisplayed[message]){var li=this.templateListItem.clone(),buttonContainer=($(li).find(".wpgmza-message").html(message),$(li).find(".wpgmza-documentation-buttons")),buttonTemplate=$(li).find(".wpgmza-documentation-buttons>a");if(buttonTemplate.remove(),urls&&urls.length){for(var i=0;i<urls.length;i++){urls[i];var button=buttonTemplate.clone(),text=WPGMZA.localized_strings.documentation;button.attr("href",urls[i]),$(button).find("i").addClass("fa-external-link"),$(button).append(text)}buttonContainer.append(button)}$(this.errorMessageList).append(li),$("#wpgmza_map, .wpgmza_map").each(function(index,el){var container=$(el).find(".wpgmza-google-maps-api-error-overlay");0==container.length&&(container=$("<div class='wpgmza-google-maps-api-error-overlay'></div>")).html(self.element.html()),setTimeout(function(){$(el).append(container)},1e3)}),$(".gm-err-container").parent().css({"z-index":1}),this.messagesAlreadyDisplayed[message]=!0}},WPGMZA.googleAPIErrorHandler=new WPGMZA.GoogleAPIErrorHandler}),jQuery(function($){WPGMZA.InfoWindow=function(feature){var self=this;WPGMZA.EventDispatcher.call(this),WPGMZA.assertInstanceOf(this,"InfoWindow"),this.on("infowindowopen",function(event){self.onOpen(event)}),feature&&(this.feature=feature,this.state=WPGMZA.InfoWindow.STATE_CLOSED,feature.map?setTimeout(function(){self.onFeatureAdded(event)},100):feature.addEventListener("added",function(event){self.onFeatureAdded(event)}))},WPGMZA.InfoWindow.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.InfoWindow.prototype.constructor=WPGMZA.InfoWindow,WPGMZA.InfoWindow.OPEN_BY_CLICK=1,WPGMZA.InfoWindow.OPEN_BY_HOVER=2,WPGMZA.InfoWindow.STATE_OPEN="open",WPGMZA.InfoWindow.STATE_CLOSED="closed",WPGMZA.InfoWindow.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.isProVersion()?WPGMZA.GoogleProInfoWindow:WPGMZA.GoogleInfoWindow:WPGMZA.isProVersion()?WPGMZA.OLProInfoWindow:WPGMZA.OLInfoWindow},WPGMZA.InfoWindow.createInstance=function(feature){return new(this.getConstructor())(feature)},Object.defineProperty(WPGMZA.InfoWindow.prototype,"content",{get:function(){return this.getContent()},set:function(value){this.contentHtml=value}}),WPGMZA.InfoWindow.prototype.addEditButton=function(){return"map-edit"==WPGMZA.currentPage&&this.feature instanceof WPGMZA.Marker?' <a title="Edit this marker" style="width:15px;" class="wpgmza_edit_btn" data-edit-marker-id="'+this.feature.id+'"><i class="fa fa-edit"></i></a>':""},WPGMZA.InfoWindow.prototype.workOutDistanceBetweenTwoMarkers=function(location1,location2){if(location1&&location2)return location1=WPGMZA.Distance.between(location1,location2),this.distanceUnits==WPGMZA.Distance.MILES&&(location1/=WPGMZA.Distance.KILOMETERS_PER_MILE),Math.round(location1,2)},WPGMZA.InfoWindow.prototype.getContent=function(callback){var currentLatLng,html="",extra_html="";return this.feature instanceof WPGMZA.Marker&&(this.feature.map.settings.store_locator_show_distance&&this.feature.map.storeLocator&&this.feature.map.storeLocator.state==WPGMZA.StoreLocator.STATE_APPLIED&&(currentLatLng=this.feature.getPosition(),currentLatLng=this.workOutDistanceBetweenTwoMarkers(this.feature.map.storeLocator.center,currentLatLng),extra_html+="<p>"+(this.feature.map.settings.store_locator_distance==WPGMZA.Distance.KILOMETERS?currentLatLng+WPGMZA.localized_strings.kilometers_away:currentLatLng+" "+WPGMZA.localized_strings.miles_away)+"</p>"),html=this.feature.address+extra_html),this.contentHtml&&(html=this.contentHtml),callback&&callback(html),html},WPGMZA.InfoWindow.prototype.open=function(map,feature){return this.feature=feature,!WPGMZA.settings.disable_infowindows&&"1"!=WPGMZA.settings.wpgmza_settings_disable_infowindows&&!this.feature.disableInfoWindow&&(this.state=WPGMZA.InfoWindow.STATE_OPEN,!0)},WPGMZA.InfoWindow.prototype.close=function(){this.state!=WPGMZA.InfoWindow.STATE_CLOSED&&(this.state=WPGMZA.InfoWindow.STATE_CLOSED,this.trigger("infowindowclose"))},WPGMZA.InfoWindow.prototype.setContent=function(options){},WPGMZA.InfoWindow.prototype.setOptions=function(options){},WPGMZA.InfoWindow.prototype.onFeatureAdded=function(){1==this.feature.settings.infoopen&&this.open()},WPGMZA.InfoWindow.prototype.onOpen=function(){}}),jQuery(function($){"installer"==WPGMZA.currentPage&&(WPGMZA.Installer=function(){var defaultEngine,self=this;WPGMZA.EventDispatcher.apply(this),this.element=$(document.body).find(".wpgmza-installer-steps"),this.skipButton=$(document.body).find(".wpgmza-installer-skip"),this.element.length<=0||(this.redirectUrl=this.element.data("redirect"),this.step=0,this.max=0,this.findMax(),$(this.element).on("click",".next-step-button",function(event){self.next()}),$(this.element).on("click",".prev-step-button",function(event){self.prev()}),$(this.element).on("click",".sub-step-trigger",function(event){self.triggerSubStep($(this))}),$(this.element).on("change",'input[name="wpgmza_maps_engine"]',function(event){self.setEngine($(this).val())}),$(this.element).on("keyup change",'input[name="api_key"]',function(event){self.setApiKey($(this).val())}),$(this.element).on("change",'select[name="tile_server_url"]',function(event){self.setTileServer($(this).val())}),$(this.element).on("click",".google-maps-auto-key-form-wrapper .wpgmza-button",function(event){self.getAutoKey()}),$(this.element).on("click",".launcher-trigger",function(event){var launcher=$(this).data("launcher");launcher&&"google-maps-quick-start-launcher"===launcher&&self.launchQuickStart()}),this.skipButton.on("click",function(event){event.preventDefault(),self.skip()}),defaultEngine=WPGMZA&&WPGMZA.settings&&WPGMZA.settings.engine?WPGMZA.settings.engine:"google-maps",$(this.element).find('input[name="wpgmza_maps_engine"][value="'+defaultEngine+'"]').prop("checked",!0).trigger("change"),defaultEngine=WPGMZA&&WPGMZA.settings&&WPGMZA.settings.googleMapsApiKey?WPGMZA.settings.googleMapsApiKey:"",this.element.find('input[name="api_key"]').val(defaultEngine).trigger("change"),this.trigger("init.installer.admin"),this.loadStep(this.step),this.checkAutoSkip())},WPGMZA.extend(WPGMZA.Installer,WPGMZA.EventDispatcher),WPGMZA.Installer.NODE_SERVER="https://wpgmaps.us-3.evennode.com/api/v1/",WPGMZA.Installer.createInstance=function(){return new WPGMZA.Installer},WPGMZA.Installer.prototype.findMax=function(){var self=this;$(this.element).find(".step").each(function(){parseInt($(this).data("step"))>self.max&&(self.max=parseInt($(this).data("step")))})},WPGMZA.Installer.prototype.prepareAddressFields=function(){$(this.element).find("input.wpgmza-address").each(function(index,el){el.addressInput=WPGMZA.AddressInput.createInstance(el,null)})},WPGMZA.Installer.prototype.next=function(){this.step<this.max?this.loadStep(this.step+1):this.complete()},WPGMZA.Installer.prototype.prev=function(){0<this.step&&this.loadStep(this.step-1)},WPGMZA.Installer.prototype.loadStep=function(index){this.loadSubSteps(index),$(this.element).find(".step").removeClass("active"),$(this.element).find('.step[data-step="'+index+'"]').addClass("active"),this.step=index,0===this.step?$(this.element).find(".prev-step-button").addClass("wpgmza-hidden"):$(this.element).find(".prev-step-button").removeClass("wpgmza-hidden"),this.step===this.max?$(this.element).find(".next-step-button span").text($(this.element).find(".next-step-button").data("final")):$(this.element).find(".next-step-button span").text($(this.element).find(".next-step-button").data("next")),this.autoFocus(),this.applyStepConditionState(),$(window).scrollTop(0),this.trigger("step.installer.admin")},WPGMZA.Installer.prototype.loadSubSteps=function(index){index=$(this.element).find('.step[data-step="'+index+'"]');index.find(".sub-step-container").length&&(index.find(".sub-step").addClass("wpgmza-hidden"),index.find(".sub-step-container").removeClass("wpgmza-hidden"))},WPGMZA.Installer.prototype.triggerSubStep=function(context){var stepWrapper=$(this.element).find('.step[data-step="'+this.step+'"]');if(stepWrapper.find(".sub-step-container").length){context=context.data("sub-step");if(stepWrapper.find('.sub-step[data-sub-step="'+context+'"]').length&&(stepWrapper.find(".sub-step-container").addClass("wpgmza-hidden"),stepWrapper.find(".sub-step").addClass("wpgmza-hidden"),stepWrapper.find('.sub-step[data-sub-step="'+context+'"]').removeClass("wpgmza-hidden"),"google-maps-auto-key"===context))try{if(WPGMZA.getCurrentPosition(function(data){data.coords&&(data=data.coords,$('.google-maps-auto-key-form-wrapper input[name="address"]').attr("placeholder","Fetching..."),data.latitude&&data.longitude?WPGMZA.Geocoder.createInstance().getAddressFromLatLng({latLng:new WPGMZA.LatLng({lat:data.latitude,lng:data.longitude})},function(address){$('.google-maps-auto-key-form-wrapper input[name="address"]').attr("placeholder",""),address&&$('.google-maps-auto-key-form-wrapper input[name="address"]').val(address)}):$('.google-maps-auto-key-form-wrapper input[name="address"]').attr("placeholder",""))}),$('.google-maps-auto-key-form-wrapper input[name="site_url"]').val().trim().length<=0){var domain=window.location.hostname;if("localhost"===domain)try{var paths=window.location.pathname.match(/\/(.*?)\//);paths&&2<=paths.length&&paths[1]&&(domain+="-"+paths[1])}catch(ex){}$('.google-maps-auto-key-form-wrapper input[name="site_url"]').val(domain),$('.google-maps-auto-key-form-wrapper input[name="site_url"]').attr("data-predicted-domain",domain)}}catch(ex){}}},WPGMZA.Installer.prototype.getActiveBlock=function(){return $(this.element).find('.step[data-step="'+this.step+'"]')},WPGMZA.Installer.prototype.autoFocus=function(){var block=this.getActiveBlock();block&&(0<block.find("input").length?block.find("input")[0].focus():0<block.find("select").length&&block.find("select")[0].focus())},WPGMZA.Installer.prototype.complete=function(){$(this.element).find(".step").removeClass("active"),$(this.element).find(".step-controller").addClass("wpgmza-hidden"),$(this.element).find(".step-loader").removeClass("wpgmza-hidden"),$(this.element).find(".step-loader .progress-finish").removeClass("wpgmza-hidden"),this.saveOptions()},WPGMZA.Installer.prototype.getData=function(){var data={};return $(this.element).find(".step").each(function(){$(this).find("input,select").each(function(){var value,name=$(this).attr("name");name&&""!==name.trim()&&""!==(value=$(this).val()).trim()&&(data[name.trim()]=value.trim())})}),data},WPGMZA.Installer.prototype.setEngine=function(engine){this.engine=engine,$(this.element).attr("data-engine",engine)},WPGMZA.Installer.prototype.setApiKey=function(apiKey){this.apiKey=apiKey.trim(),this.applyStepConditionState()},WPGMZA.Installer.prototype.setTileServer=function(server){let previewLink=this.tileServer=server;previewLink=(previewLink=previewLink.replace("{a-c}","a")).replace("{z}/{x}/{y}","7/20/49"),$(this.element).find(".open_layers_sample_tile").attr("src",previewLink)},WPGMZA.Installer.prototype.applyStepConditionState=function(){var condition=this.getActiveBlock().data("conditional"),continueButton=$(this.element).find(".next-step-button");!condition||this.hasSatisfiedStepCondition(condition)?continueButton.removeClass("wpgmza-hidden"):continueButton.addClass("wpgmza-hidden")},WPGMZA.Installer.prototype.hasSatisfiedStepCondition=function(condition){let satisfied=!1;return satisfied="engine-set-up"===condition?!this.engine||"google-maps"!==this.engine||!!this.apiKey:satisfied},WPGMZA.Installer.prototype.getAutoKey=function(){return!1},WPGMZA.Installer.prototype.launchQuickStart=function(){var popupDimensions={width:570,height:700};popupDimensions.left=(screen.width-popupDimensions.width)/2,popupDimensions.top=(screen.height-popupDimensions.height)/2,$("#adminmenuwrap").length&&(popupDimensions.left+=$("#adminmenuwrap").width()/2);let attributes=[];attributes.push("resizable=yes"),attributes.push("width="+popupDimensions.width),attributes.push("height="+popupDimensions.height),attributes.push("left="+popupDimensions.left),attributes.push("top="+popupDimensions.top),attributes=attributes.join(","),window.open("https://console.cloud.google.com/google/maps-hosted","WP Go Maps - Create API Key",attributes)},WPGMZA.Installer.prototype.saveOptions=function(){const self=this;var formData=this.getData(),formData={action:"wpgmza_installer_page_save_options",nonce:this.element.attr("data-ajax-nonce"),wpgmza_maps_engine:this.engine,tile_server_url:formData.tile_server_url,api_key:formData.api_key};$(event.target).prop("disabled",!0),$.ajax(WPGMZA.ajaxurl,{method:"POST",data:formData,success:function(response,status,xhr){window.location.href=self.redirectUrl}})},WPGMZA.Installer.prototype.hideAutoKeyError=function(){$(".auto-key-error").addClass("wpgmza-hidden")},WPGMZA.Installer.prototype.showAutoKeyError=function(codeOrMsg){let message="";(message=-1===codeOrMsg.indexOf(" ")&&$(".auto-key-error").data(codeOrMsg)||codeOrMsg).length?($(".auto-key-error").find(".notice").text(message),$(".auto-key-error").removeClass("wpgmza-hidden")):this.hideAutoKeyError()},WPGMZA.Installer.prototype.skip=function(){const self=this;$(this.element).find(".step").removeClass("active"),$(this.element).find(".step-controller").addClass("wpgmza-hidden"),$(this.element).find(".step-loader").removeClass("wpgmza-hidden"),$(this.element).find(".step-loader .progress-finish").removeClass("wpgmza-hidden"),this.skipButton.addClass("wpgmza-hidden");var options={action:"wpgmza_installer_page_skip",nonce:this.element.attr("data-ajax-nonce")};$.ajax(WPGMZA.ajaxurl,{method:"POST",data:options,success:function(response,status,xhr){window.location.href=self.redirectUrl}})},WPGMZA.Installer.prototype.checkAutoSkip=function(){this.element.data("auto-skip")&&this.skip()},$(document).ready(function(event){WPGMZA.installer=WPGMZA.Installer.createInstance()}))}),jQuery(function($){WPGMZA.InternalEngine={LEGACY:"legacy",ATLAS_NOVUS:"atlast-novus",isLegacy:function(){return WPGMZA.settings.internalEngine===WPGMZA.InternalEngine.LEGACY},getEngine:function(){return WPGMZA.settings.internalEngine}}}),jQuery(function($){WPGMZA.InternalViewport=function(map){WPGMZA.EventDispatcher.apply(this),this.map=map,this.limits={},this.element=this.getContainer(),this.update(),$(window).on("resize",event=>{this.trigger("resize.internalviewport"),this.update()})},WPGMZA.extend(WPGMZA.InternalViewport,WPGMZA.EventDispatcher),WPGMZA.InternalViewport.RECT_TYPE_LARGE=0,WPGMZA.InternalViewport.RECT_TYPE_MEDIUM=1,WPGMZA.InternalViewport.RECT_TYPE_SMALL=2,WPGMZA.InternalViewport.CONTAINER_THRESHOLD_MEDIUM=960,WPGMZA.InternalViewport.CONTAINER_THRESHOLD_SMALL=760,WPGMZA.InternalViewport.createInstance=function(map){return new WPGMZA.InternalViewport(map)},WPGMZA.InternalViewport.prototype.getContainer=function(){return this.map&&this.map.element?this.map.element:document.body||!1},WPGMZA.InternalViewport.prototype.getRectType=function(){let type=WPGMZA.InternalViewport.RECT_TYPE_LARGE;return this.limits.container&&this.limits.container.width.value&&(this.limits.container.width.value<=WPGMZA.InternalViewport.CONTAINER_THRESHOLD_SMALL?type=WPGMZA.InternalViewport.RECT_TYPE_SMALL:this.limits.container.width.value<=WPGMZA.InternalViewport.CONTAINER_THRESHOLD_MEDIUM&&(type=WPGMZA.InternalViewport.RECT_TYPE_MEDIUM)),type},WPGMZA.InternalViewport.prototype.wrapMeasurement=function(value,suffix){return{value:value,suffix:suffix||"px"}},WPGMZA.InternalViewport.prototype.update=function(){this.trace(),this.localize(),this.addClass(),this.trigger("update.internalviewport")},WPGMZA.InternalViewport.prototype.trace=function(){this.traceLimits(),this.trigger("trace.internalviewport")},WPGMZA.InternalViewport.prototype.traceLimits=function(){this.limits={container:{},overlays:{},panels:{}},this.getContainer()&&(this.limits.container.width=this.wrapMeasurement(parseInt(this.map.element.offsetWidth)),this.limits.container.height=this.wrapMeasurement(parseInt(this.map.element.offsetHeight)),mode=this.getRectType(),this.limits.container.width)&&(this.limits.overlays.max_width=this.wrapMeasurement(100*[.5,.7,1][mode],"%"),this.limits.panels.max_width=this.wrapMeasurement(100*[.3,.5,1][mode],"%"))},WPGMZA.InternalViewport.prototype.localize=function(){var tag,localized={};for(tag in this.limits)if(this.limits[tag])for(var name in this.limits[tag]){var prop=this.limits[tag][name];name=name.replaceAll("_","-"),localized[name="--wpgmza--viewport-"+tag+"-"+name]=prop.value+prop.suffix}var container=this.getContainer();container&&$(container).css(localized),this.trigger("localize.internalviewport")},WPGMZA.InternalViewport.prototype.addClass=function(){var mode,classes=["wpgmza-viewport-large","wpgmza-viewport-medium","wpgmza-viewport-small"],container=this.getContainer();container&&($(container).removeClass(classes),mode=this.getRectType(),$(container).addClass(classes[mode]))}}),jQuery(function($){WPGMZA.LatLng=function(arg,lng){if(this._lat=0,(this._lng=0)!=arguments.length)if(1==arguments.length){if("string"==typeof arg){var m;if(!(m=arg.match(WPGMZA.LatLng.REGEXP)))throw new Error("Invalid LatLng string");arg={lat:m[1],lng:m[3]}}if("object"!=typeof arg||!("lat"in arg&&"lng"in arg))throw new Error("Argument must be a LatLng literal");this.lat=arg.lat,this.lng=arg.lng}else this.lat=arg,this.lng=lng},WPGMZA.LatLng.REGEXP=/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/,WPGMZA.LatLng.isValid=function(obj){return"object"==typeof obj&&"lat"in obj&&"lng"in obj},WPGMZA.LatLng.isLatLngString=function(str){return"string"==typeof str&&!!str.match(WPGMZA.LatLng.REGEXP)},Object.defineProperty(WPGMZA.LatLng.prototype,"lat",{get:function(){return this._lat},set:function(val){if(!WPGMZA.isNumeric(val))throw new Error("Latitude must be numeric");this._lat=parseFloat(val)}}),Object.defineProperty(WPGMZA.LatLng.prototype,"lng",{get:function(){return this._lng},set:function(val){if(!WPGMZA.isNumeric(val))throw new Error("Longitude must be numeric");this._lng=parseFloat(val)}}),WPGMZA.LatLng.fromString=function(string){if(WPGMZA.LatLng.isLatLngString(string))return string=string.match(WPGMZA.LatLng.REGEXP),new WPGMZA.LatLng({lat:parseFloat(string[1]),lng:parseFloat(string[3])});throw new Error("Not a valid latlng string")},WPGMZA.LatLng.prototype.toString=function(){return this._lat+", "+this._lng},WPGMZA.LatLng.fromCurrentPosition=function(callback,options){options=options||{},callback&&WPGMZA.getCurrentPosition(function(position){var latLng=new WPGMZA.LatLng({lat:position.coords.latitude,lng:position.coords.longitude});options.geocodeAddress?WPGMZA.Geocoder.createInstance().getAddressFromLatLng({latLng:latLng},function(results){results.length&&(latLng.address=results[0]),callback(latLng)}):callback(latLng)})},WPGMZA.LatLng.fromGoogleLatLng=function(googleLatLng){return new WPGMZA.LatLng(googleLatLng.lat(),googleLatLng.lng())},WPGMZA.LatLng.toGoogleLatLngArray=function(arr){var result=[];return arr.forEach(function(nativeLatLng){if(!(nativeLatLng instanceof WPGMZA.LatLng||"lat"in nativeLatLng&&"lng"in nativeLatLng))throw new Error("Unexpected input");result.push(new google.maps.LatLng({lat:parseFloat(nativeLatLng.lat),lng:parseFloat(nativeLatLng.lng)}))}),result},WPGMZA.LatLng.prototype.toGoogleLatLng=function(){return new google.maps.LatLng({lat:this.lat,lng:this.lng})},WPGMZA.LatLng.prototype.toLatLngLiteral=function(){return{lat:this.lat,lng:this.lng}},WPGMZA.LatLng.prototype.moveByDistance=function(kilometers,heading){var kilometers=parseFloat(kilometers)/6371,heading=parseFloat(heading)/180*Math.PI,phi1=this.lat/180*Math.PI,lambda1=this.lng/180*Math.PI,sinPhi1=Math.sin(phi1),phi1=Math.cos(phi1),sinDelta=Math.sin(kilometers),kilometers=Math.cos(kilometers),sinTheta=Math.sin(heading),heading=sinPhi1*kilometers+phi1*sinDelta*Math.cos(heading),phi2=Math.asin(heading),lambda1=lambda1+Math.atan2(sinTheta*sinDelta*phi1,kilometers-sinPhi1*heading);this.lat=180*phi2/Math.PI,this.lng=180*lambda1/Math.PI},WPGMZA.LatLng.prototype.getGreatCircleDistance=function(arg1,arg2){var lat1=this.lat,lon1=this.lng;if(1==arguments.length)other=new WPGMZA.LatLng(arg1);else{if(2!=arguments.length)throw new Error("Invalid number of arguments");other=new WPGMZA.LatLng(arg1,arg2)}var lat2=other.lat,other=other.lng,phi1=lat1.toRadians(),phi2=lat2.toRadians(),lat2=(lat2-lat1).toRadians(),lat1=(other-lon1).toRadians(),other=Math.sin(lat2/2)*Math.sin(lat2/2)+Math.cos(phi1)*Math.cos(phi2)*Math.sin(lat1/2)*Math.sin(lat1/2);return 6371*(2*Math.atan2(Math.sqrt(other),Math.sqrt(1-other)))}}),jQuery(function($){WPGMZA.LatLngBounds=function(southWest,northEast){var other;southWest instanceof WPGMZA.LatLngBounds?(this.south=(other=southWest).south,this.north=other.north,this.west=other.west,this.east=other.east):southWest&&northEast&&(this.south=southWest.lat,this.north=northEast.lat,this.west=southWest.lng,this.east=northEast.lng)},WPGMZA.LatLngBounds.fromGoogleLatLngBounds=function(googleLatLngBounds){var result,southWest;if(googleLatLngBounds instanceof google.maps.LatLngBounds)return result=new WPGMZA.LatLngBounds,southWest=googleLatLngBounds.getSouthWest(),googleLatLngBounds=googleLatLngBounds.getNorthEast(),result.north=googleLatLngBounds.lat(),result.south=southWest.lat(),result.west=southWest.lng(),result.east=googleLatLngBounds.lng(),result;throw new Error("Argument must be an instance of google.maps.LatLngBounds")},WPGMZA.LatLngBounds.fromGoogleLatLngBoundsLiteral=function(obj){var result=new WPGMZA.LatLngBounds,southWest=obj.southwest,obj=obj.northeast;return result.north=obj.lat,result.south=southWest.lat,result.west=southWest.lng,result.east=obj.lng,result},WPGMZA.LatLngBounds.prototype.isInInitialState=function(){return null==this.north&&null==this.south&&null==this.west&&null==this.east},WPGMZA.LatLngBounds.prototype.extend=function(latLng){latLng instanceof WPGMZA.LatLng||(latLng=new WPGMZA.LatLng(latLng)),this.isInInitialState()?(this.north=this.south=latLng.lat,this.west=this.east=latLng.lng):(latLng.lat<this.north&&(this.north=latLng.lat),latLng.lat>this.south&&(this.south=latLng.lat),latLng.lng<this.west&&(this.west=latLng.lng),latLng.lng>this.east&&(this.east=latLng.lng))},WPGMZA.LatLngBounds.prototype.extendByPixelMargin=function(map,x,arg){var y=x;if(!(map instanceof WPGMZA.Map))throw new Error("First argument must be an instance of WPGMZA.Map");if(this.isInInitialState())throw new Error("Cannot extend by pixels in initial state");3<=arguments.length&&(y=arg);var southWest=new WPGMZA.LatLng(this.south,this.west),northEast=new WPGMZA.LatLng(this.north,this.east),southWest=map.latLngToPixels(southWest),northEast=map.latLngToPixels(northEast);southWest.x-=x,southWest.y+=y,northEast.x+=x,northEast.y-=y,southWest=map.pixelsToLatLng(southWest.x,southWest.y),northEast=map.pixelsToLatLng(northEast.x,northEast.y),this.toString();this.north=northEast.lat,this.south=southWest.lat,this.west=southWest.lng,this.east=northEast.lng},WPGMZA.LatLngBounds.prototype.contains=function(latLng){if(latLng instanceof WPGMZA.LatLng)return!(latLng.lat<Math.min(this.north,this.south)||latLng.lat>Math.max(this.north,this.south)||!(this.west<this.east?latLng.lng>=this.west&&latLng.lng<=this.east:latLng.lng<=this.west||latLng.lng>=this.east));throw new Error("Argument must be an instance of WPGMZA.LatLng")},WPGMZA.LatLngBounds.prototype.toString=function(){return this.north+"N "+this.south+"S "+this.west+"W "+this.east+"E"},WPGMZA.LatLngBounds.prototype.toLiteral=function(){return{north:this.north,south:this.south,west:this.west,east:this.east}}}),jQuery(function($){var key,legacyGlobals={marker_pull:"0",marker_array:[],MYMAP:[],infoWindow_poly:[],markerClusterer:[],heatmap:[],WPGM_Path:[],WPGM_Path_Polygon:[],WPGM_PathLine:[],WPGM_PathLineData:[],WPGM_PathData:[],original_iw:null,wpgmza_user_marker:null,wpgmaps_localize_marker_data:[],wpgmaps_localize_polygon_settings:[],wpgmaps_localize_heatmap_settings:[],wpgmaps_localize_polyline_settings:[],wpgmza_cirtcle_data_array:[],wpgmza_rectangle_data_array:[],wpgmzaForceLegacyMarkerClusterer:!1};for(key in legacyGlobals)!function(key){key in window?console.warn("Cannot redefine legacy global "+key):Object.defineProperty(window,key,{get:function(){return console.warn("This property is deprecated and should no longer be used"),legacyGlobals[key]},set:function(value){console.warn("This property is deprecated and should no longer be used"),legacyGlobals[key]=value}})}(key);WPGMZA.legacyGlobals=legacyGlobals,window.InitMap=window.resetLocations=window.searchLocations=window.fillInAddress=window.searchLocationsNear=function(){console.warn("This function is deprecated and should no longer be used")}}),jQuery(function($){WPGMZA.MapListPage=function(){$("body").on("click",".wpgmza_copy_shortcode",function(){var $temp=jQuery("<input>");jQuery('<span id="wpgmza_tmp" style="display:none; width:100%; text-align:center;">');jQuery("body").append($temp),$temp.val(jQuery(this).val()).select(),document.execCommand("copy"),$temp.remove(),WPGMZA.notification("Shortcode Copied")})},WPGMZA.MapListPage.createInstance=function(){return new WPGMZA.MapListPage},$(document).ready(function(event){WPGMZA.getCurrentPage()==WPGMZA.PAGE_MAP_LIST&&(WPGMZA.mapListPage=WPGMZA.MapListPage.createInstance())})}),jQuery(function($){WPGMZA.MapSettings=function(element){var json,self=this,element=element.getAttribute("data-settings");try{json=JSON.parse(element)}catch(e){element=(element=element.replace(/\\%/g,"%")).replace(/\\\\"/g,'\\"');try{json=JSON.parse(element)}catch(e){json={},console.warn("Failed to parse map settings JSON")}}function addSettings(input){if(input)for(var key in input){var value;"other_settings"!=key&&(value=input[key],String(value).match(/^-?\d+$/)&&(value=parseInt(value)),self[key]=value)}}WPGMZA.assertInstanceOf(this,"MapSettings"),addSettings(WPGMZA.settings),addSettings(json),json&&json.other_settings&&addSettings(json.other_settings)},WPGMZA.MapSettings.prototype.toOLViewOptions=function(){var coords,self=this,options={center:ol.proj.fromLonLat([-119.4179,36.7783]),zoom:4};function empty(name){return!("object"==typeof self[name]||self[name]&&self[name].length)}return"string"==typeof this.start_location&&(coords=this.start_location.replace(/^\(|\)$/g,"").split(","),WPGMZA.isLatLngString(this.start_location)?options.center=ol.proj.fromLonLat([parseFloat(coords[1]),parseFloat(coords[0])]):console.warn("Invalid start location")),this.center&&(options.center=ol.proj.fromLonLat([parseFloat(this.center.lng),parseFloat(this.center.lat)])),empty("map_start_lat")||empty("map_start_lng")||(options.center=ol.proj.fromLonLat([parseFloat(this.map_start_lng),parseFloat(this.map_start_lat)])),this.zoom&&(options.zoom=parseInt(this.zoom)),this.start_zoom&&(options.zoom=parseInt(this.start_zoom)),this.map_start_zoom&&(options.zoom=parseInt(this.map_start_zoom)),this.map_min_zoom&&this.map_max_zoom&&(options.minZoom=Math.min(this.map_min_zoom,this.map_max_zoom),options.maxZoom=Math.max(this.map_min_zoom,this.map_max_zoom)),options},WPGMZA.MapSettings.prototype.toGoogleMapsOptions=function(){var self=this,latLngCoords=this.start_location&&this.start_location.length?this.start_location.split(","):[36.7783,-119.4179];function empty(name){return!("object"==typeof self[name]||self[name]&&self[name].length)}function formatCoord(coord){return WPGMZA.isNumeric(coord)?coord:parseFloat(String(coord).replace(/[\(\)\s]/,""))}var latLngCoords=new google.maps.LatLng(formatCoord(latLngCoords[0]),formatCoord(latLngCoords[1])),zoom=this.start_zoom?parseInt(this.start_zoom):4,options=(!this.start_zoom&&this.zoom&&(zoom=parseInt(this.zoom)),{zoom:zoom=this.map_start_zoom?parseInt(this.map_start_zoom):zoom,center:latLngCoords});function isSettingDisabled(value){return"yes"===value||!!value}switch(empty("center")||(options.center=new google.maps.LatLng({lat:parseFloat(this.center.lat),lng:parseFloat(this.center.lng)})),empty("map_start_lat")||empty("map_start_lng")||(options.center=new google.maps.LatLng({lat:parseFloat(this.map_start_lat),lng:parseFloat(this.map_start_lng)})),this.map_min_zoom&&this.map_max_zoom&&(options.minZoom=Math.min(this.map_min_zoom,this.map_max_zoom),options.maxZoom=Math.max(this.map_min_zoom,this.map_max_zoom)),options.zoomControl=!isSettingDisabled(this.wpgmza_settings_map_zoom),options.panControl=!isSettingDisabled(this.wpgmza_settings_map_pan),options.mapTypeControl=!isSettingDisabled(this.wpgmza_settings_map_type),options.streetViewControl=!isSettingDisabled(this.wpgmza_settings_map_streetview),options.fullscreenControl=!isSettingDisabled(this.wpgmza_settings_map_full_screen_control),options.draggable=!isSettingDisabled(this.wpgmza_settings_map_draggable),options.disableDoubleClickZoom=isSettingDisabled(this.wpgmza_settings_map_clickzoom),isSettingDisabled(this.wpgmza_settings_map_tilt_controls)&&(options.rotateControl=!1,options.tilt=0),this.wpgmza_settings_map_scroll&&(options.scrollwheel=!1),"greedy"==this.wpgmza_force_greedy_gestures||"yes"==this.wpgmza_force_greedy_gestures||1==this.wpgmza_force_greedy_gestures?(options.gestureHandling="greedy",!this.wpgmza_settings_map_scroll&&"scrollwheel"in options&&delete options.scrollwheel):options.gestureHandling="cooperative",parseInt(this.type)){case 2:options.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case 3:options.mapTypeId=google.maps.MapTypeId.HYBRID;break;case 4:options.mapTypeId=google.maps.MapTypeId.TERRAIN;break;default:options.mapTypeId=google.maps.MapTypeId.ROADMAP}return this.wpgmza_theme_data&&this.wpgmza_theme_data.length&&(options.styles=WPGMZA.GoogleMap.parseThemeData(this.wpgmza_theme_data)),options}}),jQuery(function($){WPGMZA.Map=function(element,options){var self=this;if(WPGMZA.assertInstanceOf(this,"Map"),WPGMZA.EventDispatcher.call(this),!(element instanceof HTMLElement||element instanceof HTMLDivElement||window.elementor))throw new Error("Argument must be a HTMLElement");if(element.hasAttribute("data-map-id")?this.id=element.getAttribute("data-map-id"):this.id=1,!/\d+/.test(this.id))throw new Error("Map ID must be an integer");if(WPGMZA.maps.push(this),this.element=element,this.element.wpgmzaMap=this,$(this.element).addClass("wpgmza-initialized"),this.engineElement=element,this.markers=[],this.polygons=[],this.polylines=[],this.circles=[],this.rectangles=[],this.pointlabels=[],WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code)$(element).append($(WPGMZA.api_consent_html)),$(element).css({height:"auto"});else{if(this.loadSettings(options),this.loadStyling(),this.shortcodeAttributes={},$(this.element).attr("data-shortcode-attributes"))try{this.shortcodeAttributes=JSON.parse($(this.element).attr("data-shortcode-attributes")),this.shortcodeAttributes.zoom&&(this.settings.map_start_zoom=parseInt(this.shortcodeAttributes.zoom))}catch(e){console.warn("Error parsing shortcode attributes")}this.innerStack=$(this.element).find(".wpgmza-inner-stack"),this.setDimensions(),this.setAlignment(),this.initInternalViewport(),this.markerFilter=WPGMZA.MarkerFilter.createInstance(this),this.on("init",function(event){self.onInit(event)}),this.on("click",function(event){self.onClick(event)}),$(document.body).on("fullscreenchange.wpgmza",function(event){var fullscreen=self.isFullScreen();self.onFullScreenChange(fullscreen)}),WPGMZA.useLegacyGlobals&&(wpgmzaLegacyGlobals.MYMAP[this.id]={map:null,bounds:null,mc:null},wpgmzaLegacyGlobals.MYMAP.init=wpgmzaLegacyGlobals.MYMAP[this.id].init=wpgmzaLegacyGlobals.MYMAP.placeMarkers=wpgmzaLegacyGlobals.MYMAP[this.id].placeMarkers=function(){console.warn("This function is deprecated and should no longer be used")})}},WPGMZA.Map.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.Map.prototype.constructor=WPGMZA.Map,WPGMZA.Map.nightTimeThemeData=[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{color:"#575663"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#80823e"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#1b737a"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}],WPGMZA.Map.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.isProVersion()?WPGMZA.GoogleProMap:WPGMZA.GoogleMap:WPGMZA.isProVersion()?WPGMZA.OLProMap:WPGMZA.OLMap},WPGMZA.Map.createInstance=function(element,options){return new(WPGMZA.Map.getConstructor())(element,options)},Object.defineProperty(WPGMZA.Map.prototype,"markersPlaced",{get:function(){return this._markersPlaced},set:function(value){throw new Error("Value is read only")}}),Object.defineProperty(WPGMZA.Map.prototype,"lat",{get:function(){return this.getCenter().lat},set:function(value){var center=this.getCenter();center.lat=value,this.setCenter(center)}}),Object.defineProperty(WPGMZA.Map.prototype,"lng",{get:function(){return this.getCenter().lng},set:function(value){var center=this.getCenter();center.lng=value,this.setCenter(center)}}),Object.defineProperty(WPGMZA.Map.prototype,"zoom",{get:function(){return this.getZoom()},set:function(value){this.setZoom(value)}}),WPGMZA.Map.prototype.onInit=function(event){this.initPreloader(),0<this.innerStack.length&&$(this.element).append(this.innerStack),WPGMZA.getCurrentPage()!=WPGMZA.PAGE_MAP_EDIT&&this.initStoreLocator(),"autoFetchFeatures"in this.settings&&!1===this.settings.autoFetchFeatures||this.fetchFeatures()},WPGMZA.Map.prototype.initPreloader=function(){this.preloader=$(WPGMZA.preloaderHTML),$(this.preloader).hide(),$(this.element).append(this.preloader)},WPGMZA.Map.prototype.showPreloader=function(show){show?$(this.preloader).show():$(this.preloader).hide()},WPGMZA.Map.prototype.loadSettings=function(options){var settings=new WPGMZA.MapSettings(this.element);settings.other_settings;if(delete settings.other_settings,options)for(var key in options)settings[key]=options[key];this.settings=settings},WPGMZA.Map.prototype.loadStyling=function(){if(!WPGMZA.InternalEngine.isLegacy()){if(WPGMZA.stylingSettings&&WPGMZA.stylingSettings instanceof Object&&0<Object.keys(WPGMZA.stylingSettings).length)for(var name in WPGMZA.stylingSettings){var value;-1!==name.indexOf("--")&&(value=WPGMZA.stylingSettings[name])&&$(this.element).css(name,value)}var tileFilter;this.settings&&this.settings.wpgmza_ol_tile_filter&&(tileFilter=this.settings.wpgmza_ol_tile_filter.trim())&&$(this.element).css("--wpgmza-ol-tile-filter",tileFilter)}},WPGMZA.Map.prototype.initInternalViewport=function(){"1"!=WPGMZA.is_admin&&(this.internalViewport=WPGMZA.InternalViewport.createInstance(this))},WPGMZA.Map.prototype.initStoreLocator=function(){var i,selectors=[".wpgmza-store-locator[data-id='"+this.id+"']",".wpgmza-store-locator",".wpgmza_sl_main_div"];let storeLocatorElement=!1;for(i in selectors)0<$(selectors[i]).length&&!1===storeLocatorElement&&(storeLocatorElement=$(selectors[i]));storeLocatorElement.length&&(this.storeLocator=WPGMZA.StoreLocator.createInstance(this,storeLocatorElement[0]))},WPGMZA.Map.prototype.getFeatureArrays=function(){var arrays=WPGMZA.Map.prototype.getFeatureArrays.call(this);return arrays.heatmaps=this.heatmaps,arrays.imageoverlays=this.imageoverlays,arrays},WPGMZA.Map.prototype.setOptions=function(options){for(var name in options)this.settings[name]=options[name]},WPGMZA.Map.prototype.getRESTParameters=function(options){var defaults={};return options&&options.filter||(defaults.filter=JSON.stringify(this.markerFilter.getFilteringParameters())),$.extend(!0,defaults,options)},WPGMZA.Map.prototype.fetchFeaturesViaREST=function(){var data,offset,limit,self=this,filter=this.markerFilter.getFilteringParameters();"1"==WPGMZA.is_admin&&(filter.includeUnapproved=!0,filter.excludeIntegrated=!0),this.shortcodeAttributes.acf_post_id&&(filter.acfPostID=this.shortcodeAttributes.acf_post_id),this.showPreloader(!0),this.fetchFeaturesXhr&&this.fetchFeaturesXhr.abort(),WPGMZA.settings.fetchMarkersBatchSize&&WPGMZA.settings.enable_batch_loading?(offset=0,limit=parseInt(WPGMZA.settings.fetchMarkersBatchSize),function fetchNextBatch(){filter.offset=offset,filter.limit=limit,data=self.getRESTParameters({filter:JSON.stringify(filter)}),self.fetchFeaturesXhr=WPGMZA.restAPI.call("/markers/",{useCompressedPathVariable:!0,data:data,success:function(result,status,xhr){result.length?(self.onMarkersFetched(result,!0),offset+=limit,fetchNextBatch()):(self.onMarkersFetched(result),data.exclude="markers",WPGMZA.restAPI.call("/features/",{useCompressedPathVariable:!0,data:data,success:function(result,status,xhr){self.onFeaturesFetched(result)}}))}})}()):(data=this.getRESTParameters({filter:JSON.stringify(filter)}),this.fetchFeaturesXhr=WPGMZA.restAPI.call("/features/",{useCompressedPathVariable:!0,data:data,success:function(result,status,xhr){self.onFeaturesFetched(result)}}))},WPGMZA.Map.prototype.fetchFeaturesViaXML=function(){var self=this,urls=[WPGMZA.markerXMLPathURL+this.id+"markers.xml"];function fetchFeaturesExcludingMarkersViaREST(){var filter={map_id:this.id,mashup_ids:this.mashupIDs},filter={filter:JSON.stringify(filter),exclude:"markers"};WPGMZA.restAPI.call("/features/",{useCompressedPathVariable:!0,data:filter,success:function(result,status,xhr){self.onFeaturesFetched(result)}})}if(this.mashupIDs&&this.mashupIDs.forEach(function(id){urls.push(WPGMZA.markerXMLPathURL+id+"markers.xml")}),urls=urls.filter(function(item,index){return urls.indexOf(item)==index}),window.Worker&&window.Blob&&window.URL&&WPGMZA.settings.enable_asynchronous_xml_parsing){var source=WPGMZA.loadXMLAsWebWorker.toString().replace(/function\(\)\s*{([\s\S]+)}/,"$1"),source=new Blob([source],{type:"text/javascript"}),source=new Worker(URL.createObjectURL(source));source.onmessage=function(event){self.onMarkersFetched(event.data),fetchFeaturesExcludingMarkersViaREST()},source.postMessage({command:"load",protocol:window.location.protocol,urls:urls})}else for(var filesLoaded=0,converter=new WPGMZA.XMLCacheConverter,converted=[],i=0;i<urls.length;i++)$.ajax(urls[i],{success:function(response,status,xhr){converted=converted.concat(converter.convert(response)),++filesLoaded==urls.length&&(self.onMarkersFetched(converted),fetchFeaturesExcludingMarkersViaREST())}})},WPGMZA.Map.prototype.fetchFeatures=function(){WPGMZA.settings.wpgmza_settings_marker_pull!=WPGMZA.MARKER_PULL_XML||"1"==WPGMZA.is_admin?this.fetchFeaturesViaREST():this.fetchFeaturesViaXML()},WPGMZA.Map.prototype.onFeaturesFetched=function(data){for(var type in data.markers&&this.onMarkersFetched(data.markers),data)if("markers"!=type)for(var module=type.substr(0,1).toUpperCase()+type.substr(1).replace(/s$/,""),i=0;i<data[type].length;i++){var instance=WPGMZA[module].createInstance(data[type][i]);this["add"+module](instance)}},WPGMZA.Map.prototype.onMarkersFetched=function(data,expectMoreBatches){for(var self=this,startFiltered=this.shortcodeAttributes.cat&&this.shortcodeAttributes.cat.length,i=0;i<data.length;i++){var obj=data[i],marker=WPGMZA.Marker.createInstance(obj);startFiltered&&(marker.isFiltered=!0,marker.setVisible(!1)),this.addMarker(marker)}if(!expectMoreBatches){this.showPreloader(!1);var triggerEvent=function(){self._markersPlaced=!0,self.trigger("markersplaced"),self.off("filteringcomplete",triggerEvent)};if(this.shortcodeAttributes.cat){for(var categories=this.shortcodeAttributes.cat.split(","),select=$("select[mid='"+this.id+"'][name='wpgmza_filter_select']"),i=0;i<categories.length;i++)$("input[type='checkbox'][mid='"+this.id+"'][value='"+categories[i]+"']").prop("checked",!0),select.val(categories[i]);this.on("filteringcomplete",triggerEvent),this.markerFilter.update({categories:categories})}else triggerEvent();if(this.shortcodeAttributes.markers){for(var arr=this.shortcodeAttributes.markers.split(","),markers=[],i=0;i<arr.length;i++){var id=(id=arr[i]).replace(" ",""),marker=this.getMarkerByID(id);markers.push(marker)}this.fitMapBoundsToMarkers(markers)}}},WPGMZA.Map.prototype.fetchFeaturesViaXML=function(){var self=this,urls=[WPGMZA.markerXMLPathURL+this.id+"markers.xml"];function fetchFeaturesExcludingMarkersViaREST(){var filter={map_id:this.id,mashup_ids:this.mashupIDs},filter={filter:JSON.stringify(filter),exclude:"markers"};WPGMZA.restAPI.call("/features/",{useCompressedPathVariable:!0,data:filter,success:function(result,status,xhr){self.onFeaturesFetched(result)}})}if(this.mashupIDs&&this.mashupIDs.forEach(function(id){urls.push(WPGMZA.markerXMLPathURL+id+"markers.xml")}),urls=urls.filter(function(item,index){return urls.indexOf(item)==index}),window.Worker&&window.Blob&&window.URL&&WPGMZA.settings.enable_asynchronous_xml_parsing){var source=WPGMZA.loadXMLAsWebWorker.toString().replace(/function\(\)\s*{([\s\S]+)}/,"$1"),source=new Blob([source],{type:"text/javascript"}),source=new Worker(URL.createObjectURL(source));source.onmessage=function(event){self.onMarkersFetched(event.data),fetchFeaturesExcludingMarkersViaREST()},source.postMessage({command:"load",protocol:window.location.protocol,urls:urls})}else for(var filesLoaded=0,converter=new WPGMZA.XMLCacheConverter,converted=[],i=0;i<urls.length;i++)$.ajax(urls[i],{success:function(response,status,xhr){converted=converted.concat(converter.convert(response)),++filesLoaded==urls.length&&(self.onMarkersFetched(converted),fetchFeaturesExcludingMarkersViaREST())}})},WPGMZA.Map.prototype.fetchFeatures=function(){WPGMZA.settings.wpgmza_settings_marker_pull!=WPGMZA.MARKER_PULL_XML||"1"==WPGMZA.is_admin?this.fetchFeaturesViaREST():this.fetchFeaturesViaXML()},WPGMZA.Map.prototype.onFeaturesFetched=function(data){for(var type in data.markers&&this.onMarkersFetched(data.markers),data)if("markers"!=type)for(var module=type.substr(0,1).toUpperCase()+type.substr(1).replace(/s$/,""),i=0;i<data[type].length;i++){var instance=WPGMZA[module].createInstance(data[type][i]);this["add"+module](instance)}},WPGMZA.Map.prototype.onMarkersFetched=function(data,expectMoreBatches){for(var self=this,startFiltered=this.shortcodeAttributes.cat&&this.shortcodeAttributes.cat.length,i=0;i<data.length;i++){var obj=data[i],marker=WPGMZA.Marker.createInstance(obj);startFiltered&&(marker.isFiltered=!0,marker.setVisible(!1)),this.addMarker(marker)}if(!expectMoreBatches){this.showPreloader(!1);var triggerEvent=function(){self._markersPlaced=!0,self.trigger("markersplaced"),self.off("filteringcomplete",triggerEvent)};if(this.shortcodeAttributes.cat){for(var categories=this.shortcodeAttributes.cat.split(","),select=$("select[mid='"+this.id+"'][name='wpgmza_filter_select']"),i=0;i<categories.length;i++)$("input[type='checkbox'][mid='"+this.id+"'][value='"+categories[i]+"']").prop("checked",!0),select.val(categories[i]);this.on("filteringcomplete",triggerEvent),this.markerFilter.update({categories:categories})}else triggerEvent();if(this.shortcodeAttributes.markers){for(var arr=this.shortcodeAttributes.markers.split(","),markers=[],i=0;i<arr.length;i++){var id=(id=arr[i]).replace(" ",""),marker=this.getMarkerByID(id);markers.push(marker)}this.fitMapBoundsToMarkers(markers)}}};Math.PI;function deg2rad(deg){return deg*(Math.PI/180)}WPGMZA.Map.getGeographicDistance=function(lat1,lon1,lat2,lon2){var dLat=deg2rad(lat2-lat1),lon2=deg2rad(lon2-lon1),lon1=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(deg2rad(lat1))*Math.cos(deg2rad(lat2))*Math.sin(lon2/2)*Math.sin(lon2/2);return 6371*(2*Math.atan2(Math.sqrt(lon1),Math.sqrt(1-lon1)))},WPGMZA.Map.prototype.setCenter=function(latLng){if(!("lat"in latLng&&"lng"in latLng))throw new Error("Argument is not an object with lat and lng")},WPGMZA.Map.prototype.setDimensions=function(width,height){0==arguments.length&&(width=this.settings.map_width||"100",this.settings.map_width_type?width+=this.settings.map_width_type.replace("\\",""):width+="%",height=this.settings.map_height||"400",this.settings.map_height_type?height+=this.settings.map_height_type.replace("\\",""):height+="px"),$(this.engineElement).css({width:width,height:height})},WPGMZA.Map.prototype.setAlignment=function(){switch(parseInt(this.settings.wpgmza_map_align)){case 1:case 2:$(this.element).addClass("wpgmza-auto-left");break;case 3:$(this.element).addClass("wpgmza-auto-right")}},WPGMZA.Map.prototype.addMarker=function(marker){if(!(marker instanceof WPGMZA.Marker))throw new Error("Argument must be an instance of WPGMZA.Marker");marker.map=this,(marker.parent=this).markers.push(marker),this.dispatchEvent({type:"markeradded",marker:marker}),marker.dispatchEvent({type:"added"})},WPGMZA.Map.prototype.removeMarker=function(marker){if(!(marker instanceof WPGMZA.Marker))throw new Error("Argument must be an instance of WPGMZA.Marker");if(marker.map!==this)throw new Error("Wrong map error");marker.infoWindow&&marker.infoWindow.close(),marker.map=null,marker.parent=null;var index=this.markers.indexOf(marker);if(-1==index)throw new Error("Marker not found in marker array");this.markers.splice(index,1),this.dispatchEvent({type:"markerremoved",marker:marker}),marker.dispatchEvent({type:"removed"})},WPGMZA.Map.prototype.removeAllMarkers=function(options){for(var i=this.markers.length-1;0<=i;i--)this.removeMarker(this.markers[i])},WPGMZA.Map.prototype.getMarkerByID=function(id){for(var i=0;i<this.markers.length;i++)if(this.markers[i].id==id)return this.markers[i];return null},WPGMZA.Map.prototype.getMarkerByTitle=function(title){if("string"==typeof title){for(var i=0;i<this.markers.length;i++)if(this.markers[i].title==title)return this.markers[i]}else{if(!(title instanceof RegExp))throw new Error("Invalid argument");for(i=0;i<this.markers.length;i++)if(title.test(this.markers[i].title))return this.markers[i]}return null},WPGMZA.Map.prototype.removeMarkerByID=function(id){id=this.getMarkerByID(id);id&&this.removeMarker(id)},WPGMZA.Map.prototype.addPolygon=function(polygon){if(!(polygon instanceof WPGMZA.Polygon))throw new Error("Argument must be an instance of WPGMZA.Polygon");(polygon.map=this).polygons.push(polygon),this.dispatchEvent({type:"polygonadded",polygon:polygon}),polygon.dispatchEvent({type:"added"})},WPGMZA.Map.prototype.removePolygon=function(polygon){if(!(polygon instanceof WPGMZA.Polygon))throw new Error("Argument must be an instance of WPGMZA.Polygon");if(polygon.map!==this)throw new Error("Wrong map error");polygon.map=null,this.polygons.splice(this.polygons.indexOf(polygon),1),this.dispatchEvent({type:"polygonremoved",polygon:polygon})},WPGMZA.Map.prototype.getPolygonByID=function(id){for(var i=0;i<this.polygons.length;i++)if(this.polygons[i].id==id)return this.polygons[i];return null},WPGMZA.Map.prototype.removePolygonByID=function(id){id=this.getPolygonByID(id);id&&this.removePolygon(id)},WPGMZA.Map.prototype.getPolylineByID=function(id){for(var i=0;i<this.polylines.length;i++)if(this.polylines[i].id==id)return this.polylines[i];return null},WPGMZA.Map.prototype.addPolyline=function(polyline){if(!(polyline instanceof WPGMZA.Polyline))throw new Error("Argument must be an instance of WPGMZA.Polyline");(polyline.map=this).polylines.push(polyline),this.dispatchEvent({type:"polylineadded",polyline:polyline}),polyline.dispatchEvent({type:"added"})},WPGMZA.Map.prototype.removePolyline=function(polyline){if(!(polyline instanceof WPGMZA.Polyline))throw new Error("Argument must be an instance of WPGMZA.Polyline");if(polyline.map!==this)throw new Error("Wrong map error");polyline.map=null,this.polylines.splice(this.polylines.indexOf(polyline),1),this.dispatchEvent({type:"polylineremoved",polyline:polyline})},WPGMZA.Map.prototype.getPolylineByID=function(id){for(var i=0;i<this.polylines.length;i++)if(this.polylines[i].id==id)return this.polylines[i];return null},WPGMZA.Map.prototype.removePolylineByID=function(id){id=this.getPolylineByID(id);id&&this.removePolyline(id)},WPGMZA.Map.prototype.addCircle=function(circle){if(!(circle instanceof WPGMZA.Circle))throw new Error("Argument must be an instance of WPGMZA.Circle");(circle.map=this).circles.push(circle),this.dispatchEvent({type:"circleadded",circle:circle}),circle.dispatchEvent({type:"added"})},WPGMZA.Map.prototype.removeCircle=function(circle){if(!(circle instanceof WPGMZA.Circle))throw new Error("Argument must be an instance of WPGMZA.Circle");if(circle.map!==this)throw new Error("Wrong map error");circle.map=null,this.circles.splice(this.circles.indexOf(circle),1),this.dispatchEvent({type:"circleremoved",circle:circle})},WPGMZA.Map.prototype.getCircleByID=function(id){for(var i=0;i<this.circles.length;i++)if(this.circles[i].id==id)return this.circles[i];return null},WPGMZA.Map.prototype.removeCircleByID=function(id){id=this.getCircleByID(id);id&&this.removeCircle(id)},WPGMZA.Map.prototype.addRectangle=function(rectangle){if(!(rectangle instanceof WPGMZA.Rectangle))throw new Error("Argument must be an instance of WPGMZA.Rectangle");(rectangle.map=this).rectangles.push(rectangle),this.dispatchEvent({type:"rectangleadded",rectangle:rectangle}),rectangle.dispatchEvent({type:"added"})},WPGMZA.Map.prototype.removeRectangle=function(rectangle){if(!(rectangle instanceof WPGMZA.Rectangle))throw new Error("Argument must be an instance of WPGMZA.Rectangle");if(rectangle.map!==this)throw new Error("Wrong map error");rectangle.map=null,this.rectangles.splice(this.rectangles.indexOf(rectangle),1),this.dispatchEvent({type:"rectangleremoved",rectangle:rectangle})},WPGMZA.Map.prototype.getRectangleByID=function(id){for(var i=0;i<this.rectangles.length;i++)if(this.rectangles[i].id==id)return this.rectangles[i];return null},WPGMZA.Map.prototype.removeRectangleByID=function(id){id=this.getRectangleByID(id);id&&this.removeRectangle(id)},WPGMZA.Map.prototype.addPointlabel=function(pointlabel){if(!(pointlabel instanceof WPGMZA.Pointlabel))throw new Error("Argument must be an instance of WPGMZA.Pointlabel");(pointlabel.map=this).pointlabels.push(pointlabel),this.dispatchEvent({type:"pointlabeladded",pointlabel:pointlabel})},WPGMZA.Map.prototype.removePointlabel=function(pointlabel){if(!(pointlabel instanceof WPGMZA.Pointlabel))throw new Error("Argument must be an instance of WPGMZA.Pointlabel");if(pointlabel.map!==this)throw new Error("Wrong map error");pointlabel.map=null,this.pointlabels.splice(this.pointlabels.indexOf(pointlabel),1),this.dispatchEvent({type:"pointlabelremoved",pointlabel:pointlabel})},WPGMZA.Map.prototype.getPointlabelByID=function(id){for(var i=0;i<this.pointlabels.length;i++)if(this.pointlabels[i].id==id)return this.pointlabels[i];return null},WPGMZA.Map.prototype.removePointlabelByID=function(id){id=this.getPointlabelByID(id);id&&this.removePointlabel(id)},WPGMZA.Map.prototype.resetBounds=function(){var latlng=new WPGMZA.LatLng(this.settings.map_start_lat,this.settings.map_start_lng);this.panTo(latlng),this.setZoom(this.settings.map_start_zoom)},WPGMZA.Map.prototype.nudge=function(x,y){x=this.nudgeLatLng(this.getCenter(),x,y);this.setCenter(x)},WPGMZA.Map.prototype.nudgeLatLng=function(latLng,x,y){latLng=this.latLngToPixels(latLng);if(latLng.x+=parseFloat(x),latLng.y+=parseFloat(y),isNaN(latLng.x)||isNaN(latLng.y))throw new Error("Invalid coordinates supplied");return this.pixelsToLatLng(latLng)},WPGMZA.Map.prototype.animateNudge=function(x,y,origin,milliseconds){if(origin){if(!(origin instanceof WPGMZA.LatLng))throw new Error("Origin must be an instance of WPGMZA.LatLng")}else origin=this.getCenter();origin=this.nudgeLatLng(origin,x,y),milliseconds=milliseconds||WPGMZA.getScrollAnimationDuration(),$(this).animate({lat:origin.lat,lng:origin.lng},milliseconds)},WPGMZA.Map.prototype.onWindowResize=function(event){},WPGMZA.Map.prototype.onElementResized=function(event){},WPGMZA.Map.prototype.onBoundsChanged=function(event){this.trigger("boundschanged"),this.trigger("bounds_changed")},WPGMZA.Map.prototype.onIdle=function(event){this.trigger("idle")},WPGMZA.Map.prototype.onClick=function(event){},WPGMZA.Map.prototype.onFullScreenChange=function(fullscreen){this.trigger("fullscreenchange.map"),fullscreen?$(this.element).addClass("is-fullscreen"):$(this.element).removeClass("is-fullscreen")},WPGMZA.Map.prototype.hasVisibleMarkers=function(){for(var marker,length=this.markers.length,i=0;i<length;i++)if((marker=this.markers[i]).isFilterable&&marker.getVisible())return!0;return!1},WPGMZA.Map.prototype.isFullScreen=function(){return!(!WPGMZA.isFullScreen()||parseInt(window.screen.height)!==parseInt(this.element.offsetHeight))},WPGMZA.Map.prototype.closeAllInfoWindows=function(){this.markers.forEach(function(marker){marker.infoWindow&&marker.infoWindow.close()})},WPGMZA.Map.prototype.openStreetView=function(options){},WPGMZA.Map.prototype.closeStreetView=function(options){},$(document).ready(function(event){var invisibleMaps;WPGMZA.visibilityWorkaroundIntervalID||(invisibleMaps=jQuery(".wpgmza_map:hidden"),WPGMZA.visibilityWorkaroundIntervalID=setInterval(function(){jQuery(invisibleMaps).each(function(index,el){var id;jQuery(el).is(":visible")&&(id=jQuery(el).attr("data-map-id"),WPGMZA.getMapByID(id).onElementResized(),invisibleMaps.splice(invisibleMaps.toArray().indexOf(el),1))})},1e3))})}),jQuery(function($){WPGMZA.MapsEngineDialog=function(element){var self=this;this.element=element,window.wpgmzaUnbindSaveReminder&&window.wpgmzaUnbindSaveReminder(),$(this.element).data("installer-link")?WPGMZA.initInstallerRedirect($(this.element).data("installer-link")):($(element).remodal().open(),$(element).show(),$(element).find("input:radio").on("change",function(event){$("#wpgmza-confirm-engine").prop("disabled",!1),$("#wpgmza-confirm-engine").click()}),$("#wpgmza-confirm-engine").on("click",function(event){self.onButtonClicked(event)}))},WPGMZA.MapsEngineDialog.prototype.onButtonClicked=function(event){$(event.target).prop("disabled",!0),$.ajax(WPGMZA.ajaxurl,{method:"POST",data:{action:"wpgmza_maps_engine_dialog_set_engine",engine:$("[name='wpgmza_maps_engine']:checked").val(),nonce:$("#wpgmza-maps-engine-dialog").attr("data-ajax-nonce")},success:function(response,status,xhr){window.location.reload()}})},$(document).ready(function(event){var element=$("#wpgmza-maps-engine-dialog");!element.length||WPGMZA.settings.wpgmza_maps_engine_dialog_done||WPGMZA.settings.wpgmza_google_maps_api_key&&WPGMZA.settings.wpgmza_google_maps_api_key.length||WPGMZA.ignoreInstallerRedirect||(WPGMZA.mapsEngineDialog=new WPGMZA.MapsEngineDialog(element))})}),jQuery(function($){WPGMZA.MarkerFilter=function(map){WPGMZA.EventDispatcher.call(this),this.map=map},WPGMZA.MarkerFilter.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.MarkerFilter.prototype.constructor=WPGMZA.MarkerFilter,WPGMZA.MarkerFilter.createInstance=function(map){return new WPGMZA.MarkerFilter(map)},WPGMZA.MarkerFilter.prototype.getFilteringParameters=function(){var params={map_id:this.map.id};return params=this.map.storeLocator?$.extend(params,this.map.storeLocator.getFilteringParameters()):params},WPGMZA.MarkerFilter.prototype.update=function(params,source){var self=this;function dispatchEvent(result){var event=new WPGMZA.Event("filteringcomplete");event.map=self.map,event.source=source,event.filteredMarkers=result,event.filteringParams=params,self.onFilteringComplete(event),self.trigger(event),self.map.trigger(event)}this.updateTimeoutID||(params=params||{},this.xhr&&(this.xhr.abort(),delete this.xhr),this.updateTimeoutID=setTimeout(function(){(params=$.extend(self.getFilteringParameters(),params)).center instanceof WPGMZA.LatLng&&(params.center=params.center.toLatLngLiteral()),params.hideAll?dispatchEvent([]):(self.map.showPreloader(!0),self.xhr=WPGMZA.restAPI.call("/markers",{data:{fields:["id"],filter:JSON.stringify(params)},success:function(result,status,xhr){self.map.showPreloader(!1),dispatchEvent(result)},useCompressedPathVariable:!0})),delete self.updateTimeoutID},0))},WPGMZA.MarkerFilter.prototype.onFilteringComplete=function(event){var map=[];event.filteredMarkers.forEach(function(data){map[data.id]=!0}),this.map.markers.forEach(function(marker){var allowByFilter;marker.isFilterable&&(allowByFilter=!!map[marker.id],marker.isFiltered=!allowByFilter,marker.setVisible(allowByFilter))})}}),jQuery(function($){WPGMZA.Marker=function(row){var self=this;this._offset={x:0,y:0},WPGMZA.assertInstanceOf(this,"Marker"),this.lat="36.778261",this.lng="-119.4179323999",this.address="California",this.title=null,this.description="",this.link="",this.icon="",this.approved=1,this.pic=null,this.isFilterable=!0,this.disableInfoWindow=!1,WPGMZA.Feature.apply(this,arguments),row&&row.heatmap||(row&&this.on("init",function(event){row.position&&this.setPosition(row.position),row.map&&row.map.addMarker(this)}),this.addEventListener("added",function(event){self.onAdded(event)}),this.handleLegacyGlobals(row))},WPGMZA.Marker.prototype=Object.create(WPGMZA.Feature.prototype),WPGMZA.Marker.prototype.constructor=WPGMZA.Marker,WPGMZA.Marker.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.isProVersion()?WPGMZA.GoogleProMarker:WPGMZA.GoogleMarker:WPGMZA.isProVersion()?WPGMZA.OLProMarker:WPGMZA.OLMarker},WPGMZA.Marker.createInstance=function(row){return new(WPGMZA.Marker.getConstructor())(row)},WPGMZA.Marker.ANIMATION_NONE="0",WPGMZA.Marker.ANIMATION_BOUNCE="1",WPGMZA.Marker.ANIMATION_DROP="2",Object.defineProperty(WPGMZA.Marker.prototype,"offsetX",{get:function(){return this._offset.x},set:function(value){this._offset.x=value,this.updateOffset()}}),Object.defineProperty(WPGMZA.Marker.prototype,"offsetY",{get:function(){return this._offset.y},set:function(value){this._offset.y=value,this.updateOffset()}}),WPGMZA.Marker.prototype.onAdded=function(event){var self=this;this.addEventListener("click",function(event){self.onClick(event)}),this.addEventListener("mouseover",function(event){self.onMouseOver(event)}),this.addEventListener("select",function(event){self.onSelect(event)}),this.map.settings.marker==this.id&&self.trigger("select"),"1"==this.infoopen&&(this._osDisableAutoPan=!0,this.openInfoWindow(!0))},WPGMZA.Marker.prototype.handleLegacyGlobals=function(row){var m;WPGMZA.settings.useLegacyGlobals&&this.map_id&&this.id&&(WPGMZA.pro_version&&(m=WPGMZA.pro_version.match(/\d+/))&&m[0]<=7||(WPGMZA.legacyGlobals.marker_array[this.map_id]||(WPGMZA.legacyGlobals.marker_array[this.map_id]=[]),WPGMZA.legacyGlobals.marker_array[this.map_id][this.id]=this,WPGMZA.legacyGlobals.wpgmaps_localize_marker_data[this.map_id]||(WPGMZA.legacyGlobals.wpgmaps_localize_marker_data[this.map_id]=[]),m=$.extend({marker_id:this.id},row),WPGMZA.legacyGlobals.wpgmaps_localize_marker_data[this.map_id][this.id]=m))},WPGMZA.Marker.prototype.initInfoWindow=function(){this.infoWindow||(this.infoWindow=WPGMZA.InfoWindow.createInstance())},WPGMZA.Marker.prototype.openInfoWindow=function(autoOpen){this.map?(autoOpen||(this.map.lastInteractedMarker&&this.map.lastInteractedMarker.infoWindow.close(),this.map.lastInteractedMarker=this),this.initInfoWindow(),this.infoWindow.open(this.map,this)):console.warn("Cannot open infowindow for marker with no map")},WPGMZA.Marker.prototype.onClick=function(event){},WPGMZA.Marker.prototype.onSelect=function(event){this.openInfoWindow()},WPGMZA.Marker.prototype.onMouseOver=function(event){WPGMZA.settings.wpgmza_settings_map_open_marker_by==WPGMZA.InfoWindow.OPEN_BY_HOVER&&this.openInfoWindow()},WPGMZA.Marker.prototype.getIcon=function(){function stripProtocol(url){return"string"!=typeof url?url:url.replace(/^http(s?):/,"")}return WPGMZA.defaultMarkerIcon?stripProtocol(WPGMZA.defaultMarkerIcon):stripProtocol(WPGMZA.settings.default_marker_icon)},WPGMZA.Marker.prototype.getPosition=function(){return new WPGMZA.LatLng({lat:parseFloat(this.lat),lng:parseFloat(this.lng)})},WPGMZA.Marker.prototype.setPosition=function(latLng){latLng instanceof WPGMZA.LatLng?(this.lat=latLng.lat,this.lng=latLng.lng):(this.lat=parseFloat(latLng.lat),this.lng=parseFloat(latLng.lng))},WPGMZA.Marker.prototype.setOffset=function(x,y){this._offset.x=x,this._offset.y=y,this.updateOffset()},WPGMZA.Marker.prototype.updateOffset=function(){},WPGMZA.Marker.prototype.getAnimation=function(){return this.anim},WPGMZA.Marker.prototype.setAnimation=function(animation){},WPGMZA.Marker.prototype.getVisible=function(){},WPGMZA.Marker.prototype.setVisible=function(visible){!visible&&this.infoWindow&&this.infoWindow.close()},WPGMZA.Marker.prototype.getMap=function(){return this.map},WPGMZA.Marker.prototype.setMap=function(map){map?map.addMarker(this):this.map&&this.map.removeMarker(this),this.map=map},WPGMZA.Marker.prototype.getDraggable=function(){},WPGMZA.Marker.prototype.setDraggable=function(draggable){},WPGMZA.Marker.prototype.setOptions=function(options){},WPGMZA.Marker.prototype.setOpacity=function(opacity){},WPGMZA.Marker.prototype.panIntoView=function(){if(!this.map)throw new Error("Marker hasn't been added to a map");this.map.setCenter(this.getPosition())},WPGMZA.Marker.prototype.toJSON=function(){var result=WPGMZA.Feature.prototype.toJSON.call(this),position=this.getPosition();return $.extend(result,{lat:position.lat,lng:position.lng,address:this.address,title:this.title,description:this.description,link:this.link,icon:this.icon,pic:this.pic,approved:this.approved}),result}}),jQuery(function($){WPGMZA.ModernStoreLocatorCircle=function(map_id,settings){var map=WPGMZA.isProVersion()?this.map=WPGMZA.getMapByID(map_id):this.map=WPGMZA.maps[0];this.map_id=map_id,this.mapElement=map.element,this.mapSize={width:$(this.mapElement).width(),height:$(this.mapElement).height()},this.initCanvasLayer(),this.settings={center:new WPGMZA.LatLng(0,0),radius:1,color:"#ff0000",shadowColor:"white",shadowBlur:4,centerRingRadius:10,centerRingLineWidth:3,numInnerRings:9,innerRingLineWidth:1,innerRingFade:!0,numOuterRings:7,ringLineWidth:1,mainRingLineWidth:2,numSpokes:6,spokesStartAngle:Math.PI/2,numRadiusLabels:6,radiusLabelsStartAngle:Math.PI/2,radiusLabelFont:"13px sans-serif",visible:!1},settings&&this.setOptions(settings)},WPGMZA.ModernStoreLocatorCircle.createInstance=function(map,settings){return new("google-maps"==WPGMZA.settings.engine?WPGMZA.GoogleModernStoreLocatorCircle:WPGMZA.OLModernStoreLocatorCircle)(map,settings)},WPGMZA.ModernStoreLocatorCircle.prototype.initCanvasLayer=function(){},WPGMZA.ModernStoreLocatorCircle.prototype.onResize=function(event){this.draw()},WPGMZA.ModernStoreLocatorCircle.prototype.onUpdate=function(event){this.draw()},WPGMZA.ModernStoreLocatorCircle.prototype.setOptions=function(options){for(var name in options){var functionName="set"+name.substr(0,1).toUpperCase()+name.substr(1);"function"==typeof this[functionName]?this[functionName](options[name]):this.settings[name]=options[name]}},WPGMZA.ModernStoreLocatorCircle.prototype.getResolutionScale=function(){return window.devicePixelRatio||1},WPGMZA.ModernStoreLocatorCircle.prototype.getCenter=function(){return this.getPosition()},WPGMZA.ModernStoreLocatorCircle.prototype.setCenter=function(value){this.setPosition(value)},WPGMZA.ModernStoreLocatorCircle.prototype.getPosition=function(){return this.settings.center},WPGMZA.ModernStoreLocatorCircle.prototype.setPosition=function(position){this.settings.center=position},WPGMZA.ModernStoreLocatorCircle.prototype.getRadius=function(){return this.settings.radius},WPGMZA.ModernStoreLocatorCircle.prototype.setRadius=function(radius){if(isNaN(radius))throw new Error("Invalid radius");this.settings.radius=radius},WPGMZA.ModernStoreLocatorCircle.prototype.getVisible=function(){return this.settings.visible},WPGMZA.ModernStoreLocatorCircle.prototype.setVisible=function(visible){this.settings.visible=visible},WPGMZA.ModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.getContext=function(type){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.validateSettings=function(){WPGMZA.isHexColorString(this.settings.color)||(this.settings.color="#ff0000")},WPGMZA.ModernStoreLocatorCircle.prototype.draw=function(){this.validateSettings();var settings=this.settings,canvasDimensions=this.getCanvasDimensions(),canvasWidth=canvasDimensions.width,canvasDimensions=canvasDimensions.height;this.map,this.getResolutionScale();if((context=this.getContext("2d")).clearRect(0,0,canvasWidth,canvasDimensions),settings.visible){context.shadowColor=settings.shadowColor,context.shadowBlur=settings.shadowBlur,context.setTransform(1,0,0,1,0,0);var end,scale=this.getScale(),canvasWidth=(context.scale(scale,scale),this.getWorldOriginOffset()),worldPoint=(context.translate(canvasWidth.x,canvasWidth.y),new WPGMZA.LatLng(this.settings.center),this.getCenterPixels()),rgba=WPGMZA.hexToRgba(settings.color),ringSpacing=this.getTransformedRadius(settings.radius)/(settings.numInnerRings+1),radius=(context.strokeStyle=settings.color,context.lineWidth=1/scale*settings.centerRingLineWidth,context.beginPath(),context.arc(worldPoint.x,worldPoint.y,this.getTransformedRadius(settings.centerRingRadius)/scale,0,2*Math.PI),context.stroke(),context.closePath(),this.getTransformedRadius(settings.radius)+ringSpacing*settings.numOuterRings+1),canvasDimensions=context.createRadialGradient(0,0,0,0,0,radius),rgba=WPGMZA.hexToRgba(settings.color),canvasWidth=WPGMZA.rgbaToString(rgba);rgba.a=0,end=WPGMZA.rgbaToString(rgba),canvasDimensions.addColorStop(0,canvasWidth),canvasDimensions.addColorStop(1,end),context.save(),context.translate(worldPoint.x,worldPoint.y),context.strokeStyle=canvasDimensions,context.lineWidth=2/scale;for(var i=0;i<settings.numSpokes;i++)spokeAngle=settings.spokesStartAngle+2*Math.PI*(i/settings.numSpokes),x=Math.cos(spokeAngle)*radius,y=Math.sin(spokeAngle)*radius,context.setLineDash([2/scale,15/scale]),context.beginPath(),context.moveTo(0,0),context.lineTo(x,y),context.stroke();context.setLineDash([]),context.restore(),context.lineWidth=1/scale*settings.innerRingLineWidth;for(i=1;i<=settings.numInnerRings;i++){radius=i*ringSpacing;settings.innerRingFade&&(rgba.a=1-(i-1)/settings.numInnerRings),context.strokeStyle=WPGMZA.rgbaToString(rgba),context.beginPath(),context.arc(worldPoint.x,worldPoint.y,radius,0,2*Math.PI),context.stroke(),context.closePath()}context.strokeStyle=settings.color,context.lineWidth=1/scale*settings.centerRingLineWidth,context.beginPath(),context.arc(worldPoint.x,worldPoint.y,this.getTransformedRadius(settings.radius),0,2*Math.PI),context.stroke(),context.closePath();for(radius=radius+ringSpacing,i=0;i<settings.numOuterRings;i++)settings.innerRingFade&&(rgba.a=1-i/settings.numOuterRings),context.strokeStyle=WPGMZA.rgbaToString(rgba),context.beginPath(),context.arc(worldPoint.x,worldPoint.y,radius,0,2*Math.PI),context.stroke(),context.closePath(),radius+=ringSpacing;if(0<settings.numRadiusLabels){var x,y,radius=this.getTransformedRadius(settings.radius);(canvasWidth=settings.radiusLabelFont.match(/(\d+)px/))&&parseInt(canvasWidth[1]),context.font=settings.radiusLabelFont,context.textAlign="center",context.textBaseline="middle",context.fillStyle=settings.color,context.save(),context.translate(worldPoint.x,worldPoint.y);for(i=0;i<settings.numRadiusLabels;i++){var spokeAngle,textAngle=(spokeAngle=settings.radiusLabelsStartAngle+2*Math.PI*(i/settings.numRadiusLabels))+Math.PI/2,text=settings.radiusString;0<Math.sin(spokeAngle)&&(textAngle-=Math.PI),x=Math.cos(spokeAngle)*radius,y=Math.sin(spokeAngle)*radius,context.save(),context.translate(x,y),context.rotate(textAngle),context.scale(1/scale,1/scale),textAngle=context.measureText(text).width,height=textAngle/2,context.clearRect(-textAngle,-height,2*textAngle,2*height),context.fillText(settings.radiusString,0,0),context.restore()}context.restore()}}}}),jQuery(function($){WPGMZA.NativeMapsAppIcon=function(){navigator.userAgent.match(/^Apple|iPhone|iPad|iPod/)?(this.type="apple",this.element=$('<span><i class="fab fa fa-apple" aria-hidden="true"></i></span>')):(this.type="google",this.element=$('<span><i class="fab fa fa-google" aria-hidden="true"></i></span>'))}}),jQuery(function($){WPGMZA.PersistentAdminNotice=function(element,options){if(!(element instanceof HTMLElement))throw new Error("Element is not an instance of HTMLInputElement");this.element=$(element),this.dismissButton=this.element.find(".notice-dismiss"),this.ajaxActionButton=this.element.find("a[data-ajax]"),this.bindEvents()},WPGMZA.extend(WPGMZA.PersistentAdminNotice,WPGMZA.EventDispatcher),WPGMZA.PersistentAdminNotice.createInstance=function(element){return new WPGMZA.PersistentAdminNotice(element)},WPGMZA.PersistentAdminNotice.prototype.bindEvents=function(){let self=this;this.dismissButton.on("click",function(event){self.onDismiss($(this))}),this.ajaxActionButton.on("click",function(event){event.preventDefault(),self.onAjaxAction($(this))})},WPGMZA.PersistentAdminNotice.prototype.onDismiss=function(item){var data={action:"wpgmza_dismiss_persistent_notice",slug:this.element.data("slug"),wpgmza_security:WPGMZA.ajaxnonce};$.ajax(WPGMZA.ajaxurl,{method:"POST",data:data,success:function(response,status,xhr){},error:function(){}})},WPGMZA.PersistentAdminNotice.prototype.onAjaxAction=function(item){var action;item.data("disabled")||(action=item.data("ajax-action"),item.attr("data-disabled","true"),item.css("opacity","0.5"),action&&(item={action:"wpgmza_persisten_notice_quick_action",relay:action,wpgmza_security:WPGMZA.ajaxnonce},$.ajax(WPGMZA.ajaxurl,{method:"POST",data:item,success:function(response){window.location.reload()},error:function(){}})))},$(document.body).ready(function(){$(".wpgmza-persistent-notice").each(function(index,el){el.wpgmzaPersistentAdminNotice=WPGMZA.PersistentAdminNotice.createInstance(el)})})}),jQuery(function($){WPGMZA.Pointlabel=function(options,pointlabel){var map;WPGMZA.assertInstanceOf(this,"Pointlabel"),(options=options||{}).map?this.map=options.map:!options.map&&options.map_id&&(map=WPGMZA.getMapByID(options.map_id))&&(this.map=map),this.center=new WPGMZA.LatLng,WPGMZA.Feature.apply(this,arguments),pointlabel&&(this.setPosition(pointlabel.getPosition()),pointlabel.marker)&&(this.marker=pointlabel.marker)},WPGMZA.Pointlabel.prototype=Object.create(WPGMZA.Feature.prototype),WPGMZA.Pointlabel.prototype.constructor=WPGMZA.Pointlabel,Object.defineProperty(WPGMZA.Pointlabel.prototype,"map",{enumerable:!0,get:function(){return this._map||null},set:function(a){this.textFeature&&!a&&this.textFeature.remove(),this._map=a}}),WPGMZA.Pointlabel.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.isProVersion()?WPGMZA.GoogleProPointlabel:WPGMZA.GooglePointlabel:WPGMZA.isProVersion()?WPGMZA.OLProPointlabel:WPGMZA.OLPointlabel},WPGMZA.Pointlabel.createInstance=function(options,pointlabel){return new(WPGMZA.Pointlabel.getConstructor())(options,pointlabel)},WPGMZA.Pointlabel.createEditableMarker=function(options){function callback(){try{marker.setIcon(WPGMZA.labelpointIcon)}catch(ex){}marker.off("added",callback)}(options=$.extend({draggable:!0,disableInfoWindow:!0},options)).pointlabel&&(latLng=options.pointlabel.getPosition(),options.lat=latLng.lat,options.lng=latLng.lng);var latLng,marker=WPGMZA.Marker.createInstance(options);return marker.on("added",callback),marker},WPGMZA.Pointlabel.prototype.setEditable=function(editable){var self=this;this.marker&&(this.marker.map.removeMarker(this.marker),delete this.marker),this._prevMap&&delete this._prevMap,editable&&(this.marker=WPGMZA.Pointlabel.createEditableMarker({pointlabel:this}),this.map.addMarker(this.marker),this._dragEndCallback=function(event){self.onDragEnd(event)},editable=this.map,this.marker.on("dragend",this._dragEndCallback),editable.on("pointlabelremoved",function(event){event.pointlabel}))},WPGMZA.Pointlabel.prototype.onDragEnd=function(event){event.target instanceof WPGMZA.Marker&&this.marker&&(event.latLng&&this.setPosition(event.latLng),this.trigger("change"))},WPGMZA.Pointlabel.prototype.onMapMouseDown=function(event){if(0==event.button)return this._mouseDown=!0,event.preventDefault(),!1},WPGMZA.Pointlabel.prototype.onWindowMouseUp=function(event){0==event.button&&(this._mouseDown=!1)},WPGMZA.Pointlabel.prototype.onMapMouseMove=function(event){this._mouseDown&&(event={x:event.pageX-$(this.map.element).offset().left,y:event.pageY+30-$(this.map.element).offset().top},(event=this.map.pixelsToLatLng(event))&&this.setPosition(event),this.trigger("change"))},WPGMZA.Pointlabel.prototype.getPosition=function(){return this.center?new WPGMZA.LatLng({lat:this.center.lat,lng:this.center.lng}):null},WPGMZA.Pointlabel.prototype.setPosition=function(position){this.center={},this.center.lat=position.lat,this.center.lng=position.lng,this.textFeature&&this.textFeature.setPosition(this.getPosition())},WPGMZA.Pointlabel.prototype.getMap=function(){return this.map},WPGMZA.Pointlabel.prototype.setMap=function(map){this.map&&this.map.removePointlabel(this),map&&map.addPointlabel(this)}}),jQuery(function($){Uint8Array.prototype.slice||Object.defineProperty(Uint8Array.prototype,"slice",{value:function(begin,end){return new Uint8Array(Array.prototype.slice.call(this,begin,end))}}),WPGMZA.isSafari()&&!window.external&&(window.external={})}),jQuery(function($){WPGMZA.Polygon=function(row,enginePolygon){var self=this;WPGMZA.assertInstanceOf(this,"Polygon"),this.paths=null,WPGMZA.Feature.apply(this,arguments),this.addEventListener("added",function(event){self.onAdded()})},WPGMZA.Polygon.prototype=Object.create(WPGMZA.Feature.prototype),WPGMZA.Polygon.prototype.constructor=WPGMZA.Polygon,Object.defineProperty(WPGMZA.Polygon.prototype,"fillColor",{enumerable:!0,get:function(){return this.fillcolor&&this.fillcolor.length?"#"+this.fillcolor.replace(/^#/,""):"#ff0000"},set:function(a){this.fillcolor=a}}),Object.defineProperty(WPGMZA.Polygon.prototype,"fillOpacity",{enumerable:!0,get:function(){return this.opacity&&this.opacity.length?this.opacity:.6},set:function(a){this.opacity=a}}),Object.defineProperty(WPGMZA.Polygon.prototype,"strokeColor",{enumerable:!0,get:function(){return this.linecolor&&this.linecolor.length?"#"+this.linecolor.replace(/^#/,""):"#ff0000"},set:function(a){this.linecolor=a}}),Object.defineProperty(WPGMZA.Polygon.prototype,"strokeOpacity",{enumerable:!0,get:function(){return this.lineopacity&&this.lineopacity.length?this.lineopacity:.6},set:function(a){this.lineopacity=a}}),Object.defineProperty(WPGMZA.Polygon.prototype,"strokeWeight",{enumerable:!0,get:function(){return this.linethickness&&this.linethickness.length?parseInt(this.linethickness):3}}),WPGMZA.Polygon.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.isProVersion()?WPGMZA.GoogleProPolygon:WPGMZA.GooglePolygon:WPGMZA.isProVersion()?WPGMZA.OLProPolygon:WPGMZA.OLPolygon},WPGMZA.Polygon.createInstance=function(row,engineObject){return new(WPGMZA.Polygon.getConstructor())(row,engineObject)},WPGMZA.Polygon.prototype.onAdded=function(){}}),jQuery(function($){WPGMZA.Polyline=function(options,googlePolyline){var self=this;WPGMZA.assertInstanceOf(this,"Polyline"),WPGMZA.Feature.apply(this,arguments),this.addEventListener("added",function(event){self.onAdded()})},WPGMZA.Polyline.prototype=Object.create(WPGMZA.Feature.prototype),WPGMZA.Polyline.prototype.constructor=WPGMZA.Polyline,Object.defineProperty(WPGMZA.Polyline.prototype,"strokeColor",{enumerable:!0,get:function(){return this.linecolor&&this.linecolor.length?"#"+this.linecolor.replace(/^#/,""):"#ff0000"},set:function(a){this.linecolor=a}}),Object.defineProperty(WPGMZA.Polyline.prototype,"strokeOpacity",{enumerable:!0,get:function(){return this.opacity&&this.opacity.length?this.opacity:.6},set:function(a){this.opacity=a}}),Object.defineProperty(WPGMZA.Polyline.prototype,"strokeWeight",{enumerable:!0,get:function(){return this.linethickness&&this.linethickness.length?parseInt(this.linethickness):1},set:function(a){this.linethickness=a}}),Object.defineProperty(WPGMZA.Polyline.prototype,"layergroup",{enumerable:!0,get:function(){return this._layergroup||0},set:function(value){parseInt(value)&&(this._layergroup=parseInt(value)+WPGMZA.Shape.BASE_LAYER_INDEX)}}),WPGMZA.Polyline.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.GooglePolyline:WPGMZA.OLPolyline},WPGMZA.Polyline.createInstance=function(options,engineObject){return new(WPGMZA.Polyline.getConstructor())(options,engineObject)},WPGMZA.Polyline.prototype.getPoints=function(){return this.toJSON().points},WPGMZA.Polyline.prototype.onAdded=function(){this.layergroup&&this.setLayergroup(this.layergroup)},WPGMZA.Polyline.prototype.toJSON=function(){var result=WPGMZA.Feature.prototype.toJSON.call(this);return result.title=this.title,result},WPGMZA.Polyline.prototype.setLayergroup=function(layergroup){this.layergroup=layergroup,this.layergroup&&this.setOptions({zIndex:this.layergroup})}}),jQuery(function($){WPGMZA.PopoutPanel=function(element){this.element=element},WPGMZA.PopoutPanel.prototype.open=function(){$(this.element).addClass("wpgmza-open")},WPGMZA.PopoutPanel.prototype.close=function(){$(this.element).removeClass("wpgmza-open")}}),jQuery(function($){function sendAJAXFallbackRequest(route,params){if((params=$.extend({},params)).data||(params.data={}),"route"in params.data)throw new Error("Cannot send route through this method");if("action"in params.data)throw new Error("Cannot send action through this method");return"DELETE"===params.method&&(params.method="POST",params.data||(params.data={}),params.data.simulateDelete="yes"),params.data.route=route,params.data.action="wpgmza_rest_api_request",WPGMZA.restAPI.addNonce(route,params,WPGMZA.RestAPI.CONTEXT_AJAX),$.ajax(WPGMZA.ajaxurl,params)}WPGMZA.RestAPI=function(){WPGMZA.RestAPI.URL=WPGMZA.resturl,this.useAJAXFallback=!1,WPGMZA.settings&&WPGMZA.settings.force_ajax_only_mode&&(this.useAJAXFallback=!0),$(document.body).trigger("init.restapi.wpgmza")},WPGMZA.RestAPI.CONTEXT_REST="REST",WPGMZA.RestAPI.CONTEXT_AJAX="AJAX",WPGMZA.RestAPI.createInstance=function(){return new WPGMZA.RestAPI},Object.defineProperty(WPGMZA.RestAPI.prototype,"isCompressedPathVariableSupported",{get:function(){return WPGMZA.serverCanInflate&&"Uint8Array"in window&&"TextEncoder"in window}}),Object.defineProperty(WPGMZA.RestAPI.prototype,"isCompressedPathVariableAllowed",{get:function(){return!WPGMZA.pro_version||WPGMZA.Version.compare(WPGMZA.pro_version,"8.0.0")>=WPGMZA.Version.EQUAL_TO?!WPGMZA.settings.disable_compressed_path_variables:WPGMZA.settings.enable_compressed_path_variables}}),Object.defineProperty(WPGMZA.RestAPI.prototype,"maxURLLength",{get:function(){return 2083}}),WPGMZA.RestAPI.prototype.compressParams=function(params){var suffix="",string=(params.markerIDs&&1<(markerIDs=params.markerIDs.split(",")).length&&(markerIDs=(new WPGMZA.EliasFano).encode(markerIDs),compressed=pako.deflate(markerIDs),string=Array.prototype.map.call(compressed,function(ch){return String.fromCharCode(ch)}).join(""),suffix="/"+btoa(string).replace(/\//g,"-").replace(/=+$/,""),params.midcbp=markerIDs.pointer,delete params.markerIDs),JSON.stringify(params)),markerIDs=(new TextEncoder).encode(string),compressed=pako.deflate(markerIDs),params=Array.prototype.map.call(compressed,function(ch){return String.fromCharCode(ch)}).join("");return btoa(params).replace(/\//g,"-").replace(/=+$/,"")+suffix},WPGMZA.RestAPI.prototype.getNonce=function(route){var pattern,matches=[];for(pattern in WPGMZA.restnoncetable){var regex=new RegExp(pattern);route.match(regex)&&matches.push({pattern:pattern,nonce:WPGMZA.restnoncetable[pattern],length:pattern.length})}if(matches.length)return matches.sort(function(a,b){return b.length-a.length}),matches[0].nonce;throw new Error("No nonce found for route")},WPGMZA.RestAPI.prototype.addNonce=function(route,params,context){function setRESTNonce(xhr){context==WPGMZA.RestAPI.CONTEXT_REST&&self.shouldAddNonce(route)&&xhr.setRequestHeader("X-WP-Nonce",WPGMZA.restnonce),params&&params.method&&!params.method.match(/^GET$/i)&&xhr.setRequestHeader("X-WPGMZA-Action-Nonce",self.getNonce(route))}var base,self=this;params.beforeSend?(base=params.beforeSend,params.beforeSend=function(xhr){base(xhr),setRESTNonce(xhr)}):params.beforeSend=setRESTNonce},WPGMZA.RestAPI.prototype.shouldAddNonce=function(route){route=route.replace(/\//g,"");var isAdmin=!1;WPGMZA.is_admin&&1===parseInt(WPGMZA.is_admin)&&(isAdmin=!0);return!(route&&["markers","features","marker-listing","datatables"].includes(route)&&!isAdmin)},WPGMZA.RestAPI.prototype.call=function(route,params){if(this.useAJAXFallback)return sendAJAXFallbackRequest(route,params);var compressedParams,data,attemptedCompressedPathVariable=!1,fallbackRoute=route,fallbackParams=$.extend({},params);if("string"!=typeof route||!route.match(/^\//)&&!route.match(/^http/))throw new Error("Invalid route");WPGMZA.RestAPI.URL.match(/\/$/)&&(route=route.replace(/^\//,"")),params=params||{},this.addNonce(route,params,WPGMZA.RestAPI.CONTEXT_REST),params.error||(params.error=function(xhr,status,message){if("abort"!=status){switch(xhr.status){case 401:case 403:case 405:return($.post(WPGMZA.ajaxurl,{action:"wpgmza_report_rest_api_blocked"},function(response){}),console.warn("The REST API was blocked. This is usually due to security plugins blocking REST requests for non-authenticated users."),"DELETE"===params.method)?(console.warn("The REST API rejected a DELETE request, attempting again with POST fallback"),params.method="POST",params.data||(params.data={}),params.data.simulateDelete="yes",WPGMZA.restAPI.call(route,params)):(this.useAJAXFallback=!0,sendAJAXFallbackRequest(fallbackRoute,fallbackParams));case 414:if(attemptedCompressedPathVariable)return fallbackParams.method="POST",fallbackParams.useCompressedPathVariable=!1,WPGMZA.restAPI.call(fallbackRoute,fallbackParams)}throw new Error(message)}}),params.useCompressedPathVariable&&this.isCompressedPathVariableSupported&&this.isCompressedPathVariableAllowed&&(compressedParams=$.extend({},params),data=params.data,data=this.compressParams(data),WPGMZA.isServerIIS&&(data=data.replace(/\+/g,"%20")),data=route.replace(/\/$/,"")+"/base64"+data,WPGMZA.RestAPI.URL,compressedParams.method="GET",delete compressedParams.data,!1===params.cache&&(compressedParams.data={skip_cache:1}),data.length<this.maxURLLength?(attemptedCompressedPathVariable=!0,route=data,params=compressedParams):(WPGMZA.RestAPI.compressedPathVariableURLLimitWarningDisplayed||console.warn("Compressed path variable route would exceed URL length limit"),WPGMZA.RestAPI.compressedPathVariableURLLimitWarningDisplayed=!0));var onSuccess=null;return params.success&&(onSuccess=params.success),params.success=function(result,status,xhr){if("object"!=typeof result){var rawResult=result;try{result=JSON.parse(result)}catch(parseExc){result=rawResult}}onSuccess&&"function"==typeof onSuccess&&onSuccess(result,status,xhr)},WPGMZA.RestAPI.URL.match(/\?/)&&(route=route.replace(/\?/,"&")),$.ajax(WPGMZA.RestAPI.URL+route,params)};var nativeCallFunction=WPGMZA.RestAPI.call;WPGMZA.RestAPI.call=function(){console.warn("WPGMZA.RestAPI.call was called statically, did you mean to call the function on WPGMZA.restAPI?"),nativeCallFunction.apply(this,arguments)},$(document.body).on("click","#wpgmza-rest-api-blocked button.notice-dismiss",function(event){WPGMZA.restAPI.call("/rest-api/",{method:"POST",data:{dismiss_blocked_notice:!0}})})});var $_GET={};if(-1!==document.location.toString().indexOf("?"))for(var query=document.location.toString().replace(/^.*?\?/,"").replace(/#.*$/,"").split("&"),wpgmza_i=0,wpgmza_l=query.length;wpgmza_i<wpgmza_l;wpgmza_i++){var aux=decodeURIComponent(query[wpgmza_i]).split("=");$_GET[aux[0]]=aux[1]}jQuery(function($){WPGMZA.SettingsPage=function(){var self=this;this._keypressHistory=[],this._codemirrors={},this.updateEngineSpecificControls(),this.updateStorageControls(),this.updateBatchControls(),this.updateGDPRControls(),this.updateWooControls(),$(window).on("keypress",function(event){self.onKeyPress(event)}),jQuery("body").on("click",".wpgmza_destroy_data",function(e){e.preventDefault();var ttype=jQuery(this).attr("danger"),e="wpgmza_destroy_all_data"==ttype?"Are you sure? This will delete ALL data and settings for WP Go Maps!":"Are you sure?";window.confirm(e)&&jQuery.ajax(WPGMZA.ajaxurl,{method:"POST",data:{action:"wpgmza_maps_settings_danger_zone_delete_data",type:ttype,nonce:wpgmza_dz_nonce},success:function(response,status,xhr){"wpgmza_destroy_all_data"==ttype?window.location.replace("admin.php?page=wp-google-maps-menu&action=welcome_page"):"wpgmza_reset_all_settings"==ttype?window.location.reload():alert("Complete.")}})}),$("select[name='wpgmza_maps_engine']").on("change",function(event){self.updateEngineSpecificControls()}),$('[name="wpgmza_settings_marker_pull"]').on("click",function(event){self.updateStorageControls()}),$('input[name="enable_batch_loading"]').on("change",function(event){self.updateBatchControls()}),$("input[name='wpgmza_gdpr_require_consent_before_load'], input[name='wpgmza_gdpr_require_consent_before_vgm_submit'], input[name='wpgmza_gdpr_override_notice']").on("change",function(event){self.updateGDPRControls()}),$('input[name="woo_checkout_map_enabled"]').on("change",function(event){self.updateWooControls()}),$('select[name="tile_server_url"]').on("change",function(event){"custom_override"===$('select[name="tile_server_url"]').val()?$(".wpgmza_tile_server_override_component").removeClass("wpgmza-hidden"):$(".wpgmza_tile_server_override_component").addClass("wpgmza-hidden")}),$('select[name="tile_server_url"]').trigger("change"),jQuery("#wpgmza_flush_cache_btn").on("click",function(){jQuery(this).attr("disabled","disabled"),WPGMZA.settingsPage.flushGeocodeCache()}),$("#wpgmza-global-settings").tabs({create:function(event,ui){var elmnt,y;void 0!==$_GET.highlight&&((elmnt=document.getElementById($_GET.highlight)).classList.add("highlight-item"),setTimeout(function(){elmnt.classList.add("highlight-item-step-2")},1e3),y=elmnt.getBoundingClientRect().top+window.pageYOffset+-100,window.scrollTo({top:y,behavior:"smooth"}))},activate:function(){for(var i in self._codemirrors)self._codemirrors[i].refresh()}}),$("#wpgmza-global-setting").on("create",function(event,ui){}),$("#wpgmza-global-settings fieldset").each(function(index,el){$(el).children(":not(legend)").wrapAll("<span class='settings-group'></span>")}),$("textarea[name^='wpgmza_custom_']").each(function(){var name=$(this).attr("name"),type="js"===name.replace("wpgmza_custom_","")?"javascript":"css";self._codemirrors[name]=wp.CodeMirror.fromTextArea(this,{lineNumbers:!0,mode:type,theme:"wpgmza"}),self._codemirrors[name].on("change",function(instance){instance.save()}),self._codemirrors[name].refresh()}),$(".wpgmza-integration-tool-button").on("click",function(event){event.preventDefault();event=$(this).data("tool-type");if(event){event={type:event};const button=$(this);button.attr("disabled","disabled"),WPGMZA.restAPI.call("/integration-tools/",{method:"POST",data:event,success:function(data,status,xhr){if(button.removeAttr("disabled"),data&&data.type)switch(data.type){case"test_collation":data.success||($('.wpgmza-integration-tool-button[data-tool-type="test_collation"]').addClass("wpgmza-hidden"),$('.wpgmza-integration-tool-button[data-tool-type="resolve_collation"]').removeClass("wpgmza-hidden")),data.message&&window.alert(data.message);break;case"resolve_collation":data.success||($('.wpgmza-integration-tool-button[data-tool-type="test_collation"]').removeClass("wpgmza-hidden"),$('.wpgmza-integration-tool-button[data-tool-type="resolve_collation"]').addClass("wpgmza-hidden")),data.message&&window.alert(data.message);break;default:data.message&&window.alert(data.message)}}})}}),$(".wpgmza-performance-tool-button").on("click",function(event){event.preventDefault();event=$(this).data("tool-type");if(event){event={type:event};const button=$(this);button.attr("disabled","disabled"),WPGMZA.restAPI.call("/performance-tools/",{method:"POST",data:event,success:function(data,status,xhr){button.removeAttr("disabled"),data&&data.message&&window.alert(data.message)}})}})},WPGMZA.SettingsPage.createInstance=function(){return new WPGMZA.SettingsPage},WPGMZA.SettingsPage.prototype.updateEngineSpecificControls=function(){var engine=$("select[name='wpgmza_maps_engine']").val();$("[data-required-maps-engine][data-required-maps-engine!='"+engine+"']").hide(),$("[data-required-maps-engine='"+engine+"']").show()},WPGMZA.SettingsPage.prototype.updateStorageControls=function(){$("input[name='wpgmza_settings_marker_pull'][value='1']").is(":checked")?$("#xml-cache-settings").show():$("#xml-cache-settings").hide()},WPGMZA.SettingsPage.prototype.updateBatchControls=function(){$("input[name='enable_batch_loading']").is(":checked")?$("#batch-loader-settings").show():$("#batch-loader-settings").hide()},WPGMZA.SettingsPage.prototype.updateGDPRControls=function(){var showNoticeControls=$("input[name='wpgmza_gdpr_require_consent_before_load']").prop("checked"),vgmCheckbox=$("input[name='wpgmza_gdpr_require_consent_before_vgm_submit']"),vgmCheckbox=(showNoticeControls=vgmCheckbox.length?showNoticeControls||vgmCheckbox.prop("checked"):showNoticeControls)&&$("input[name='wpgmza_gdpr_override_notice']").prop("checked");showNoticeControls?$("#wpgmza-gdpr-compliance-notice").show(!!WPGMZA.InternalEngine.isLegacy()&&"slow"):$("#wpgmza-gdpr-compliance-notice").hide(!!WPGMZA.InternalEngine.isLegacy()&&"slow"),vgmCheckbox?$("#wpgmza_gdpr_override_notice_text").show(!!WPGMZA.InternalEngine.isLegacy()&&"slow"):$("#wpgmza_gdpr_override_notice_text").hide(!!WPGMZA.InternalEngine.isLegacy()&&"slow")},WPGMZA.SettingsPage.prototype.updateWooControls=function(){$("input[name='woo_checkout_map_enabled']").prop("checked")?$(".woo-checkout-maps-select-row").show():$(".woo-checkout-maps-select-row").hide()},WPGMZA.SettingsPage.prototype.flushGeocodeCache=function(){(new WPGMZA.OLGeocoder).clearCache(function(response){jQuery("#wpgmza_flush_cache_btn").removeAttr("disabled")})},WPGMZA.SettingsPage.prototype.onKeyPress=function(event){this._keypressHistory.push(event.key),9<this._keypressHistory.length&&(this._keypressHistory=this._keypressHistory.slice(this._keypressHistory.length-9)),"codecabin"!=this._keypressHistory.join("")||this._developerModeRevealed||($("fieldset#wpgmza-developer-mode").show(),this._developerModeRevealed=!0)},$(document).ready(function(event){WPGMZA.getCurrentPage()&&(WPGMZA.settingsPage=WPGMZA.SettingsPage.createInstance())})}),jQuery(function($){var Parent=WPGMZA.Feature;WPGMZA.Shape=function(options,engineFeature){var self=this;WPGMZA.assertInstanceOf(this,"Shape"),Parent.apply(this,arguments),this.addEventListener("added",function(event){self.onAdded()})},WPGMZA.extend(WPGMZA.Shape,WPGMZA.Feature),WPGMZA.Shape.BASE_LAYER_INDEX=99999,WPGMZA.Shape.prototype.onAdded=function(){}}),jQuery(function($){WPGMZA.SidebarGroupings=function(){var self=this;this.element=document.body,this.actionBar={element:$(this.element).find(".action-bar"),dynamicAction:null,dynamicLabel:""},$(this.element).on("click",".grouping .item",function(event){self.openTab(event),$(this).hasClass("caret-right")&&self.intelliFeaturePanel()}),$(".quick-actions .actions").on("click",".icon",function(event){var feature=$(this).data("type");feature&&(self.openTabByFeatureType(feature),$(".quick-actions #qa-add-datasets").prop("checked",!1))}),$(".wpgmza-feature-accordion[data-wpgmza-feature-type]").on("sidebar-delegate-edit",function(event){event.feature&&self.openTabByFeatureType(event.feature)}),$(".wpgmza-feature-accordion[data-wpgmza-feature-type]").on("sidebar-delegate-saved",function(event){event.feature&&self.closeCurrent()}),$(".wpgmza-feature-accordion[data-wpgmza-feature-type]").on("sidebar-delegate-busy",function(event){self.resetScroll()}),$(".wpgmza-feature-accordion[data-wpgmza-feature-type]").on("sidebar-delegate-created",function(event){}),$(this.element).find(".fieldset-toggle").on("click",function(event){$(this).toggleClass("toggled")}),$(this.element).on("click",".wpgmza-toolbar .wpgmza-toolbar-list > *",function(event){$(this).parent().parent().find("label").click()}),$(".wpgmza-feature-accordion[data-wpgmza-feature-type]").on("sidebar-delegate-feature-caption-loaded",function(event){self.actionBar.dynamicAction&&(self.actionBar.dynamicLabel=self.actionBar.dynamicAction.text(),self.actionBar.element.find(".dynamic-action").removeClass("wpgmza-hidden").text(self.actionBar.dynamicLabel))}),this.actionBar.element.find(".dynamic-action").on("click",function(event){self.actionBar.dynamicAction&&self.actionBar.dynamicAction.click()}),this.initUpsellBlocks()},WPGMZA.extend(WPGMZA.SidebarGroupings,WPGMZA.EventDispatcher),WPGMZA.SidebarGroupings.createInstance=function(){return new WPGMZA.SidebarGroupings},WPGMZA.SidebarGroupings.prototype.openTab=function(event){event=event.currentTarget,event=$(event).data("group");this.openTabByGroupId(event),WPGMZA.mapEditPage&&WPGMZA.mapEditPage.map&&WPGMZA.mapEditPage.map.onElementResized()},WPGMZA.SidebarGroupings.prototype.openTabByFeatureType=function(feature){0<$(this.element).find('.grouping[data-feature="'+feature+'"]').length&&(feature=$(this.element).find('.grouping[data-feature="'+feature+'"]').data("group"),this.openTabByGroupId(feature))},WPGMZA.SidebarGroupings.prototype.openTabByGroupId=function(groupId){var element;groupId&&this.hasGroup(groupId)&&(this.closeAll(),(element=$(this.element).find('.grouping[data-group="'+groupId+'"]')).addClass("open"),element.data("feature-discard")&&$(element).trigger("feature-block-closed"),0<$(".wpgmza-map-settings-form").find(element).length?$(".wpgmza-map-settings-form").removeClass("wpgmza-hidden"):$(".wpgmza-map-settings-form").addClass("wpgmza-hidden"),element.hasClass("auto-expand")?$(".sidebar").addClass("expanded"):$(".sidebar").removeClass("expanded"),element.data("feature")&&$(element).trigger("feature-block-opened"),$(element).trigger("grouping-opened",[groupId]),this.updateActionBar(element))},WPGMZA.SidebarGroupings.prototype.hasGroup=function(groupId){return 0<$(this.element).find('.grouping[data-group="'+groupId+'"]').length},WPGMZA.SidebarGroupings.prototype.closeAll=function(){var self=this;$(this.element).find(".grouping.open").each(function(){var group=$(this).data("group");group&&$(self.element).trigger("grouping-closed",[group])}),$(this.element).find(".grouping").removeClass("open")},WPGMZA.SidebarGroupings.prototype.closeCurrent=function(){0<$(this.element).find(".grouping.open").length&&$(this.element).find(".grouping.open").find(".heading.has-back .item").click()},WPGMZA.SidebarGroupings.prototype.getActiveGroup=function(){return 0<$(this.element).find(".grouping.open").length&&$(this.element).find(".grouping.open").data("group")},WPGMZA.SidebarGroupings.prototype.isOpen=function(groupId){return this.getActiveGroup()===groupId},WPGMZA.SidebarGroupings.prototype.updateActionBar=function(element){this.actionBar.dynamicAction=null,element&&element.data("feature")&&0<element.find(".wpgmza-save-feature").length&&(this.actionBar.dynamicAction=element.find(".wpgmza-save-feature").first(),this.actionBar.dynamicLabel=this.actionBar.dynamicAction.text().trim()),this.actionBar.dynamicAction&&this.actionBar.dynamicAction.addClass("wpgmza-hidden"),this.actionBar.dynamicAction&&this.actionBar.dynamicLabel?(this.actionBar.element.find(".dynamic-action").removeClass("wpgmza-hidden").text(this.actionBar.dynamicLabel),this.actionBar.element.find(".static-action").addClass("wpgmza-hidden")):(this.actionBar.element.find(".static-action").removeClass("wpgmza-hidden"),this.actionBar.element.find(".dynamic-action").addClass("wpgmza-hidden").text(""))},WPGMZA.SidebarGroupings.prototype.resetScroll=function(){0<$(this.element).find(".grouping.open").length&&$(this.element).find(".grouping.open .settings").scrollTop(0)},WPGMZA.SidebarGroupings.prototype.intelliFeaturePanel=function(){var element,map,feature;WPGMZA.mapEditPage&&WPGMZA.mapEditPage.map&&WPGMZA.mapEditPage.map.markersPlaced&&(element=$(this.element).find(".grouping.open"),map=WPGMZA.mapEditPage.map,0<element.find("*[data-wpgmza-table]").length)&&(feature=element.find("*[data-wpgmza-table]").data("wpgmza-feature-type"))&&map[feature=WPGMZA.pluralize(feature)]&&0===map[feature].length&&element.find(".navigation .item:first-child").click()},WPGMZA.SidebarGroupings.prototype.initUpsellBlocks=function(){var upsellWrappers=$(this.element).find(".upsell-block.auto-rotate");if(upsellWrappers&&0<upsellWrappers.length)for(var currentWrapper of upsellWrappers)1<(currentWrapper=$(currentWrapper)).find(".upsell-block-card").length?(currentWrapper.addClass("rotate"),currentWrapper.on("wpgmza-upsell-rotate-card",function(){var cardLength=$(this).find(".upsell-block-card").length;$(this).find(".upsell-block-card").hide();let nextCard=parseInt(Math.random()*cardLength);nextCard<0?nextCard=0:nextCard>=cardLength&&(nextCard=cardLength-1);cardLength=$(this).find(".upsell-block-card:nth-child("+(nextCard+1)+")");0<cardLength.length&&!cardLength.hasClass("active")?($(this).find(".upsell-block-card").removeClass("active"),cardLength.addClass("active"),cardLength.fadeIn(200)):cardLength.show(),setTimeout(()=>{$(this).trigger("wpgmza-upsell-rotate-card")},1e4)}),currentWrapper.trigger("wpgmza-upsell-rotate-card")):currentWrapper.addClass("static")}}),jQuery(function($){WPGMZA.StoreLocator=function(map,element){var self=this;WPGMZA.EventDispatcher.call(this),this._center=null,this.map=map,this.element=element,this.state=WPGMZA.StoreLocator.STATE_INITIAL,this.distanceUnits=this.map.settings.store_locator_distance,this.addressInput=WPGMZA.AddressInput.createInstance(this.addressElement,this.map),$(element).find(".wpgmza-not-found-msg").hide(),this.radiusElement&&this.map.settings.wpgmza_store_locator_default_radius&&(this.radiusElement.data("default-override")||0<this.radiusElement.find("option[value='"+this.map.settings.wpgmza_store_locator_default_radius+"']").length&&this.radiusElement.val(this.map.settings.wpgmza_store_locator_default_radius)),this.map.on("storelocatorgeocodecomplete",function(event){self.onGeocodeComplete(event)}),this.map.on("init",function(event){self.map.markerFilter.on("filteringcomplete",function(event){self.onFilteringComplete(event)}),!WPGMZA.InternalEngine.isLegacy()||void 0!==self.map.settings.store_locator_style&&"modern"!=self.map.settings.store_locator_style&&"modern"!==WPGMZA.settings.user_interface_style||"default"!==WPGMZA.settings.user_interface_style&&"modern"!=WPGMZA.settings.user_interface_style&&"legacy"!=WPGMZA.settings.user_interface_style||(self.legacyModernAdapter=WPGMZA.ModernStoreLocator.createInstance(map.id))}),WPGMZA.InternalEngine.isLegacy()?($(document.body).on("click",".wpgmza_sl_search_button_"+map.id+", [data-map-id='"+map.id+"'] .wpgmza_sl_search_button",function(event){self.onSearch(event)}),$(document.body).on("click",".wpgmza_sl_reset_button_"+map.id+", [data-map-id='"+map.id+"'] .wpgmza_sl_reset_button_div",function(event){self.onReset(event)})):($(this.searchButton).on("click",function(event){self.onSearch(event)}),$(this.resetButton).on("click",function(event){self.onReset(event)})),$(this.addressElement).on("keypress",function(event){13==event.which&&self.onSearch(event)}),this.onQueryParamSearch(),self.trigger("init.storelocator")},WPGMZA.StoreLocator.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.StoreLocator.prototype.constructor=WPGMZA.StoreLocator,WPGMZA.StoreLocator.STATE_INITIAL="initial",WPGMZA.StoreLocator.STATE_APPLIED="applied",WPGMZA.StoreLocator.createInstance=function(map,element){return new WPGMZA.StoreLocator(map,element)},Object.defineProperty(WPGMZA.StoreLocator.prototype,"address",{get:function(){return $(this.addressElement).val()}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"addressElement",{get:function(){return(this.legacyModernAdapter?$(this.legacyModernAdapter.element):$(this.element)).find("input.wpgmza-address")[0]}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"countryRestriction",{get:function(){return this.map.settings.wpgmza_store_locator_restrict}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"radiusElement",{get:function(){return WPGMZA.InternalEngine.isLegacy()?$("#radiusSelect, #radiusSelect_"+this.map.id):$(this.element).find("select.wpgmza-radius")}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"searchButton",{get:function(){return $(this.element).find(".wpgmza-search")}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"resetButton",{get:function(){return $(this.element).find(".wpgmza-reset")}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"errorElement",{get:function(){return $(this.element).find(".wpgmza-error")}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"radius",{get:function(){return parseFloat(this.radiusElement.val())}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"center",{get:function(){return this._center}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"bounds",{get:function(){return this._bounds}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"marker",{get:function(){return 1!=this.map.settings.store_locator_bounce?null:(this._marker||(this._marker=WPGMZA.Marker.createInstance({visible:!1}),this._marker.disableInfoWindow=!0,this._marker.isFilterable=!1,this._marker.setAnimation(WPGMZA.Marker.ANIMATION_BOUNCE)),this._marker)}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"circle",{get:function(){return this._circle||("modern"!=this.map.settings.wpgmza_store_locator_radius_style||WPGMZA.isDeviceiOS()?this._circle=WPGMZA.Circle.createInstance({strokeColor:"#ff0000",strokeOpacity:"0.25",strokeWeight:2,fillColor:"#ff0000",fillOpacity:"0.15",visible:!1,clickable:!1,center:new WPGMZA.LatLng}):(this._circle=WPGMZA.ModernStoreLocatorCircle.createInstance(this.map.id),this._circle.settings.color=this.circleStrokeColor)),this._circle}}),WPGMZA.StoreLocator.prototype.onGeocodeComplete=function(event){event.results&&event.results.length?(event.results[0].latLng?this._center=new WPGMZA.LatLng(event.results[0].latLng):event.results[0]instanceof WPGMZA.LatLng&&(this._center=new WPGMZA.LatLng(event.results[0])),this._bounds=new WPGMZA.LatLngBounds(event.results[0].bounds),this.isCapsule?this.redirectUrl&&this.onRedirectSearch():this.map.markerFilter.update({},this)):(this._center=null,this._bounds=null)},WPGMZA.StoreLocator.prototype.onSearch=function(event){var geocoder,options,self=this;return this.state=WPGMZA.StoreLocator.STATE_APPLIED,this.address&&this.address.length?(WPGMZA.InternalEngine.isLegacy()&&void 0!==this.map.settings.store_locator_style&&"modern"!==this.map.settings.store_locator_style&&"modern"!==WPGMZA.settings.user_interface_style&&"default"===WPGMZA.settings.user_interface_style&&WPGMZA.animateScroll(this.map.element),$(this.element).find(".wpgmza-not-found-msg").hide(),$(this.element).find(".wpgmza-error").removeClass("visible"),this.setVisualState("busy"),WPGMZA.LatLng.isLatLngString(this.address)?callback([WPGMZA.LatLng.fromString(this.address)],WPGMZA.Geocoder.SUCCESS):(geocoder=WPGMZA.Geocoder.createInstance(),options={address:this.address},this.countryRestriction&&(options.country=this.countryRestriction),geocoder.geocode(options,function(results,status){status==WPGMZA.Geocoder.SUCCESS?callback(results,status):WPGMZA.InternalEngine.isLegacy()?alert(WPGMZA.localized_strings.address_not_found):(self.showError(WPGMZA.localized_strings.address_not_found),self.setVisualState(!1))})),self.trigger("search.storelocator"),!0):(this.addressElement.focus(),!1);function callback(results,status){self.map.trigger({type:"storelocatorgeocodecomplete",results:results,status:status}),self.setVisualState("complete")}},WPGMZA.StoreLocator.prototype.onReset=function(event){this.state=WPGMZA.StoreLocator.STATE_INITIAL,this._center=null,this._bounds=null,this.map.setZoom(this.map.settings.map_start_zoom),$(this.element).find(".wpgmza-not-found-msg").hide(),this.circle&&this.circle.setVisible(!1),this.marker&&this.marker.map&&this.map.removeMarker(this.marker),this.map.markerFilter.update({},this),this.setVisualState(!1),WPGMZA.InternalEngine.isLegacy()||$(this.addressElement).val("").focus(),this.trigger("reset.storelocator")},WPGMZA.StoreLocator.prototype.onRedirectSearch=function(){if(this.redirectUrl)try{var data={radius:this.radius,center:this.address||this.center.lat+","+this.center.lng},params=new URLSearchParams(data);window.location.href=this.redirectUrl+"?"+params.toString(),this.setVisualState("busy")}catch(ex){console.warn(ex)}},WPGMZA.StoreLocator.prototype.getFilteringParameters=function(){return this.center?{center:this.center,radius:this.radius}:{}},WPGMZA.StoreLocator.prototype.getZoomFromRadius=function(radius){return this.distanceUnits==WPGMZA.Distance.MILES&&(radius*=WPGMZA.Distance.KILOMETERS_PER_MILE),Math.round(14-Math.log(radius)/Math.LN2)},WPGMZA.StoreLocator.prototype.onFilteringComplete=function(event){var factor,params=event.filteringParams,marker=this.marker,marker=(marker&&marker.setVisible(!1),params.center&&(this.map.setCenter(params.center),marker)&&(marker.setPosition(params.center),marker.setVisible(!0),marker.map!=this.map)&&this.map.addMarker(marker),params.radius&&this.map.setZoom(this.getZoomFromRadius(params.radius)),this.circle);marker&&(marker.setVisible(!1),factor=this.distanceUnits==WPGMZA.Distance.MILES?WPGMZA.Distance.KILOMETERS_PER_MILE:1,params.center&&params.radius&&(marker.setRadius(params.radius*factor),marker.setCenter(params.center),marker.setVisible(!0),marker instanceof WPGMZA.ModernStoreLocatorCircle||marker.map==this.map||this.map.addCircle(marker)),marker instanceof WPGMZA.ModernStoreLocatorCircle)&&(marker.settings.radiusString=this.radius),0==event.filteredMarkers.length&&this.state===WPGMZA.StoreLocator.STATE_APPLIED&&(WPGMZA.InternalEngine.isLegacy()?0<$(this.element).find(".wpgmza-no-results").length&&"legacy"===WPGMZA.settings.user_interface_style?$(this.element).find(".wpgmza-no-results").show():alert(this.map.settings.store_locator_not_found_message||WPGMZA.localized_strings.zero_results):this.showError(this.map.settings.store_locator_not_found_message||WPGMZA.localized_strings.zero_results))},WPGMZA.StoreLocator.prototype.onQueryParamSearch=function(){var queryCenter=WPGMZA.getQueryParamValue("center"),queryRadius=(queryCenter&&$(this.addressElement).val(queryCenter.replaceAll("+"," ")),WPGMZA.getQueryParamValue("radius"));queryRadius&&$(this.radiusElement).val(queryRadius),!this.isCapsule&&queryRadius&&queryCenter&&this.map.on("init",()=>{this.onSearch()})},WPGMZA.StoreLocator.prototype.setVisualState=function(state){!1!==state?$(this.element).attr("data-state",state):$(this.element).removeAttr("data-state")},WPGMZA.StoreLocator.prototype.showError=function(error){var self=this;WPGMZA.InternalEngine.isLegacy()||($(this.errorElement).text(error).addClass("visible"),setTimeout(function(){$(self.errorElement).text("").removeClass("visible")},3e3))}}),jQuery(function($){WPGMZA.StylingPage=function(){var self=this;this.element=document.body,this.styleGuide={wrapper:$(this.element).find(".wpgmza-styling-map-preview .wpgmza-style-guide-wrapper")},this.controls={},$(this.element).find(".wpgmza-styling-editor fieldset").each(function(){self.prepareControl(this)}),$(this.element).find(".wpgmza-styling-preset-select").on("change",function(){self.applyPreset(this)}),this.bindEvents(),this.parseUserPreset()},WPGMZA.StylingPage.PRESETS={},WPGMZA.StylingPage.PRESETS.default={"--wpgmza-component-color":"#ffffff","--wpgmza-component-text-color":"#000000","--wpgmza-component-color-accent":"#1A73E8","--wpgmza-component-text-color-accent":"#ffffff","--wpgmza-color-grey-500":"#bfbfbf","--wpgmza-component-border-radius":"2px","--wpgmza-component-font-size":"15px","--wpgmza-component-backdrop-filter":"none"},WPGMZA.StylingPage.PRESETS.glass={"--wpgmza-component-color":"rgba(255, 255, 255, 0.3)","--wpgmza-component-text-color":WPGMZA.StylingPage.PRESETS.default["--wpgmza-component-text-color"],"--wpgmza-component-color-accent":WPGMZA.StylingPage.PRESETS.default["--wpgmza-component-color-accent"],"--wpgmza-component-text-color-accent":WPGMZA.StylingPage.PRESETS.default["--wpgmza-component-text-color-accent"],"--wpgmza-color-grey-500":WPGMZA.StylingPage.PRESETS.default["--wpgmza-color-grey-500"],"--wpgmza-component-border-radius":"8px","--wpgmza-component-font-size":WPGMZA.StylingPage.PRESETS.default["--wpgmza-component-font-size"],"--wpgmza-component-backdrop-filter":"blur(20px)"},WPGMZA.StylingPage.PRESETS.rounded={"--wpgmza-component-color":WPGMZA.StylingPage.PRESETS.default["--wpgmza-component-color"],"--wpgmza-component-text-color":WPGMZA.StylingPage.PRESETS.default["--wpgmza-component-text-color"],"--wpgmza-component-color-accent":WPGMZA.StylingPage.PRESETS.default["--wpgmza-component-color-accent"],"--wpgmza-component-text-color-accent":WPGMZA.StylingPage.PRESETS.default["--wpgmza-component-text-color-accent"],"--wpgmza-color-grey-500":WPGMZA.StylingPage.PRESETS.default["--wpgmza-color-grey-500"],"--wpgmza-component-border-radius":"20px","--wpgmza-component-font-size":WPGMZA.StylingPage.PRESETS.default["--wpgmza-component-font-size"],"--wpgmza-component-backdrop-filter":WPGMZA.StylingPage.PRESETS.default["--wpgmza-component-backdrop-filter"]},WPGMZA.StylingPage.createInstance=function(){return new WPGMZA.StylingPage},WPGMZA.StylingPage.prototype.prepareControl=function(element){var element=$(element),input=element.find("input"),name=input.attr("name");""!==name.trim()&&(this.controls[name]={container:element,input:input},(element=0<this.controls[name].input.length&&this.controls[name].input.get(0))&&(element.wpgmzaColorInput?(input=element.wpgmzaColorInput).container&&(this.controls[name].resetButton=$("<div class='wpgmza-styling-editor-reset-btn' data-reset-control-name='"+name+"' />"),input.container.prepend(this.controls[name].resetButton),input.container.addClass("wpgmza-styling-editor-contains-reset")):element.wpgmzaCSSUnitInput&&(input=element.wpgmzaCSSUnitInput).container&&(this.controls[name].resetButton=$("<div class='wpgmza-styling-editor-reset-btn' data-reset-control-name='"+name+"' />"),input.container.prepend(this.controls[name].resetButton),input.container.addClass("wpgmza-styling-editor-contains-reset"))),this.resetControl(this.controls[name]))},WPGMZA.StylingPage.prototype.bindEvents=function(){var name,self=this;for(name in this.controls)this.controls[name].input.on("change",function(){self.updateControl(this)});this.styleGuide.steps=this.styleGuide.wrapper.find(".wpgmza-style-guide-step").length,this.styleGuide.index=0,this.styleGuide.wrapper.find(".wpgmza-style-guide-nav .prev-btn").on("click",function(){--self.styleGuide.index,self.styleGuide.index<0&&(self.styleGuide.index=self.styleGuide.steps-1),self.styleGuide.wrapper.trigger("update-view")}),this.styleGuide.wrapper.find(".wpgmza-style-guide-nav .next-btn").on("click",function(){self.styleGuide.index+=1,self.styleGuide.index>=self.styleGuide.steps&&(self.styleGuide.index=0),self.styleGuide.wrapper.trigger("update-view")}),this.styleGuide.wrapper.on("update-view",function(){self.styleGuide.wrapper.find(".wpgmza-style-guide-step").removeClass("active"),self.styleGuide.wrapper.find(".wpgmza-style-guide-step:nth-child("+(self.styleGuide.index+1)+")").addClass("active")}),$(document.body).on("click",".wpgmza-styling-editor-reset-btn",function(){$(this);var field=$(this).data("reset-control-name");field&&self.controls[field]&&self.resetControl(self.controls[field])})},WPGMZA.StylingPage.prototype.updateControl=function(input){var name=$(input).attr("name");name&&-1!==name.indexOf("--")&&$(".wpgmza-styling-preview-wrap .wpgmza_map").css(name,$(input).val())},WPGMZA.StylingPage.prototype.resetControl=function(control){var activeInput,name=control.input.attr("name");name&&-1!==name.indexOf("--")&&(name=$(":root").css(name))&&(name=name.trim(),activeInput=0<control.input.length&&control.input.get(0))&&(activeInput.wpgmzaColorInput?activeInput.wpgmzaColorInput.parseColor(name):activeInput.wpgmzaCSSUnitInput?activeInput.wpgmzaCSSUnitInput.parseUnits(name):activeInput.wpgmzaCSSBackdropFilterInput?activeInput.wpgmzaCSSBackdropFilterInput.parseFilters(name):control.input.val(name))},WPGMZA.StylingPage.prototype.parseUserPreset=function(){WPGMZA.stylingSettings&&WPGMZA.stylingSettings instanceof Object&&0<Object.keys(WPGMZA.stylingSettings).length&&(WPGMZA.StylingPage.PRESETS.user=WPGMZA.stylingSettings,$(".wpgmza-styling-preset-select").append("<option value='user'>User Defined</option>"),$(".wpgmza-styling-preset-select").val("user").trigger("change"))},WPGMZA.StylingPage.prototype.applyPreset=function(element){element=(element=$(element)).val();if(element&&WPGMZA.StylingPage.PRESETS[element]){var fieldName,preset=WPGMZA.StylingPage.PRESETS[element];for(fieldName in preset){var fieldValue=preset[fieldName];let field=$(this.element).find('input[name="'+fieldName+'"]');0<field.length&&((field=field.get(0)).wpgmzaColorInput?field.wpgmzaColorInput.parseColor(fieldValue):field.wpgmzaCSSUnitInput?field.wpgmzaCSSUnitInput.parseUnits(fieldValue):field.wpgmzaCSSBackdropFilterInput?field.wpgmzaCSSBackdropFilterInput.parseFilters(fieldValue):($(field).val(fieldValue),$(field).trigger("change")))}}},$(document).ready(function(event){WPGMZA.getCurrentPage()&&(WPGMZA.stylingPage=WPGMZA.StylingPage.createInstance())})}),jQuery(function($){WPGMZA.SupportPage=function(){$(".support-page").tabs(),$(".wpgmza-copy-sysinfo").on("click",function(){var temp,info=$(".system-info").text();info.length&&(temp=jQuery("<textarea>"),$(document.body).append(temp),temp.val(info).select(),document.execCommand("copy"),temp.remove(),WPGMZA.notification("Info Copied"))})},WPGMZA.SupportPage.createInstance=function(){return new WPGMZA.SupportPage},$(document).ready(function(event){WPGMZA.getCurrentPage()===WPGMZA.PAGE_SUPPORT&&(WPGMZA.supportPage=WPGMZA.SupportPage.createInstance())})}),jQuery(function($){WPGMZA.Text=function(options){if(options)for(var name in options)this[name]=options[name]},WPGMZA.Text.createInstance=function(options){return new("open-layers"!==WPGMZA.settings.engine?WPGMZA.GoogleText:WPGMZA.OLText)(options)},WPGMZA.Text.prototype.setPosition=function(position){this.overlay&&this.overlay.setPosition(position)},WPGMZA.Text.prototype.setText=function(text){this.overlay&&this.overlay.setText(text)},WPGMZA.Text.prototype.setFontSize=function(size){this.overlay&&this.overlay.setFontSize(size)},WPGMZA.Text.prototype.setFillColor=function(color){this.overlay&&this.overlay.setFillColor(color)},WPGMZA.Text.prototype.setLineColor=function(color){this.overlay&&this.overlay.setLineColor(color)},WPGMZA.Text.prototype.setOpacity=function(opacity){this.overlay&&this.overlay.setOpacity(opacity)},WPGMZA.Text.prototype.remove=function(){this.overlay&&this.overlay.remove()},WPGMZA.Text.prototype.refresh=function(){}}),jQuery(function($){WPGMZA.ThemeEditor=function(){WPGMZA.EventDispatcher.call(this),this.element=$("#wpgmza-theme-editor"),"open-layers"==WPGMZA.settings.engine?(this.element.remove(),this.olThemeEditor=new WPGMZA.OLThemeEditor):this.element.length?(this.json=[{}],this.mapElement=WPGMZA.maps[0].element,this.element.appendTo("#wpgmza-map-theme-editor__holder"),$(window).on("scroll",function(event){}),setInterval(function(){},200),this.initHTML(),WPGMZA.themeEditor=this):console.warn("No element to initialise theme editor on")},WPGMZA.extend(WPGMZA.ThemeEditor,WPGMZA.EventDispatcher),WPGMZA.ThemeEditor.prototype.updatePosition=function(){},WPGMZA.ThemeEditor.features={all:[],administrative:["country","land_parcel","locality","neighborhood","province"],landscape:["man_made","natural","natural.landcover","natural.terrain"],poi:["attraction","business","government","medical","park","place_of_worship","school","sports_complex"],road:["arterial","highway","highway.controlled_access","local"],transit:["line","station","station.airport","station.bus","station.rail"],water:[]},WPGMZA.ThemeEditor.elements={all:[],geometry:["fill","stroke"],labels:["icon","text","text.fill","text.stroke"]},WPGMZA.ThemeEditor.prototype.parse=function(){$("#wpgmza_theme_editor_feature option, #wpgmza_theme_editor_element option").css("font-weight","normal"),$("#wpgmza_theme_editor_error").hide(),$("#wpgmza_theme_editor").show(),$("#wpgmza_theme_editor_do_hue").prop("checked",!1),$("#wpgmza_theme_editor_hue").val("#000000"),$("#wpgmza_theme_editor_lightness").val(""),$("#wpgmza_theme_editor_saturation").val(""),$("#wpgmza_theme_editor_gamma").val(""),$("#wpgmza_theme_editor_do_invert_lightness").prop("checked",!1),$("#wpgmza_theme_editor_visibility").val("inherit"),$("#wpgmza_theme_editor_do_color").prop("checked",!1),$("#wpgmza_theme_editor_color").val("#000000"),$("#wpgmza_theme_editor_weight").val("");var textarea=$('textarea[name="wpgmza_theme_data"]');if(this.refreshColorInputs(),!textarea.val()||textarea.val().length<1)this.json=[{}];else{try{this.json=$.parseJSON($('textarea[name="wpgmza_theme_data"]').val())}catch(e){return this.json=[{}],$("#wpgmza_theme_editor").hide(),void $("#wpgmza_theme_editor_error").show()}$.isArray(this.json)||(textarea=this.json,this.json=[],this.json.push(textarea)),this.highlightFeatures(),this.highlightElements(),this.loadElementStylers()}},WPGMZA.ThemeEditor.prototype.highlightFeatures=function(){$("#wpgmza_theme_editor_feature option").css("font-weight","normal"),$.each(this.json,function(i,v){(v.hasOwnProperty("featureType")?$('#wpgmza_theme_editor_feature option[value="'+v.featureType+'"]'):$('#wpgmza_theme_editor_feature option[value="all"]')).css("font-weight","bold")})},WPGMZA.ThemeEditor.prototype.highlightElements=function(){var feature=$("#wpgmza_theme_editor_feature").val();$("#wpgmza_theme_editor_element option").css("font-weight","normal"),$.each(this.json,function(i,v){(v.hasOwnProperty("featureType")&&v.featureType==feature||"all"==feature&&!v.hasOwnProperty("featureType"))&&(v.hasOwnProperty("elementType")?$('#wpgmza_theme_editor_element option[value="'+v.elementType+'"]'):$('#wpgmza_theme_editor_element option[value="all"]')).css("font-weight","bold")})},WPGMZA.ThemeEditor.prototype.loadElementStylers=function(){var feature=$("#wpgmza_theme_editor_feature").val(),element=$("#wpgmza_theme_editor_element").val();$("#wpgmza_theme_editor_do_hue").prop("checked",!1),$("#wpgmza_theme_editor_hue").val("#000000"),$("#wpgmza_theme_editor_lightness").val(""),$("#wpgmza_theme_editor_saturation").val(""),$("#wpgmza_theme_editor_gamma").val(""),$("#wpgmza_theme_editor_do_invert_lightness").prop("checked",!1),$("#wpgmza_theme_editor_visibility").val("inherit"),$("#wpgmza_theme_editor_do_color").prop("checked",!1),$("#wpgmza_theme_editor_color").val("#000000"),$("#wpgmza_theme_editor_weight").val(""),$.each(this.json,function(i,v){(v.hasOwnProperty("featureType")&&v.featureType==feature||"all"==feature&&!v.hasOwnProperty("featureType"))&&(v.hasOwnProperty("elementType")&&v.elementType==element||"all"==element&&!v.hasOwnProperty("elementType"))&&v.hasOwnProperty("stylers")&&$.isArray(v.stylers)&&0<v.stylers.length&&$.each(v.stylers,function(ii,vv){vv.hasOwnProperty("hue")&&($("#wpgmza_theme_editor_do_hue").prop("checked",!0),$("#wpgmza_theme_editor_hue").val(vv.hue)),vv.hasOwnProperty("lightness")&&$("#wpgmza_theme_editor_lightness").val(vv.lightness),vv.hasOwnProperty("saturation")&&$("#wpgmza_theme_editor_saturation").val(vv.xaturation),vv.hasOwnProperty("gamma")&&$("#wpgmza_theme_editor_gamma").val(vv.gamma),vv.hasOwnProperty("invert_lightness")&&$("#wpgmza_theme_editor_do_invert_lightness").prop("checked",!0),vv.hasOwnProperty("visibility")&&$("#wpgmza_theme_editor_visibility").val(vv.visibility),vv.hasOwnProperty("color")&&($("#wpgmza_theme_editor_do_color").prop("checked",!0),$("#wpgmza_theme_editor_color").val(vv.color)),vv.hasOwnProperty("weight")&&$("#wpgmza_theme_editor_weight").val(vv.weight)})}),this.refreshColorInputs()},WPGMZA.ThemeEditor.prototype.writeElementStylers=function(){var new_feature_element_stylers,feature=$("#wpgmza_theme_editor_feature").val(),element=$("#wpgmza_theme_editor_element").val(),indexJSON=null,stylers=[];"inherit"!=$("#wpgmza_theme_editor_visibility").val()&&stylers.push({visibility:$("#wpgmza_theme_editor_visibility").val()}),!0===$("#wpgmza_theme_editor_do_color").prop("checked")&&stylers.push({color:$("#wpgmza_theme_editor_color").val()}),!0===$("#wpgmza_theme_editor_do_hue").prop("checked")&&stylers.push({hue:$("#wpgmza_theme_editor_hue").val()}),0<$("#wpgmza_theme_editor_gamma").val().length&&stylers.push({gamma:parseFloat($("#wpgmza_theme_editor_gamma").val())}),0<$("#wpgmza_theme_editor_weight").val().length&&stylers.push({weight:parseFloat($("#wpgmza_theme_editor_weight").val())}),0<$("#wpgmza_theme_editor_saturation").val().length&&stylers.push({saturation:parseFloat($("#wpgmza_theme_editor_saturation").val())}),0<$("#wpgmza_theme_editor_lightness").val().length&&stylers.push({lightness:parseFloat($("#wpgmza_theme_editor_lightness").val())}),!0===$("#wpgmza_theme_editor_do_invert_lightness").prop("checked")&&stylers.push({invert_lightness:!0}),$.each(this.json,function(i,v){(v.hasOwnProperty("featureType")&&v.featureType==feature||"all"==feature&&!v.hasOwnProperty("featureType"))&&(v.hasOwnProperty("elementType")&&v.elementType==element||"all"==element&&!v.hasOwnProperty("elementType"))&&(indexJSON=i)}),null===indexJSON?0<stylers.length&&(new_feature_element_stylers={},"all"!=feature&&(new_feature_element_stylers.featureType=feature),"all"!=element&&(new_feature_element_stylers.elementType=element),new_feature_element_stylers.stylers=stylers,this.json.push(new_feature_element_stylers)):0<stylers.length?this.json[indexJSON].stylers=stylers:this.json.splice(indexJSON,1),$('textarea[name="wpgmza_theme_data"]').val(JSON.stringify(this.json).replace(/:/g,": ").replace(/,/g,", ")),this.highlightFeatures(),this.highlightElements(),WPGMZA.themePanel.updateMapTheme()},WPGMZA.ThemeEditor.prototype.initHTML=function(){var self=this;$.each(WPGMZA.ThemeEditor.features,function(i,v){$("#wpgmza_theme_editor_feature").append('<option value="'+i+'">'+i+"</option>"),0<v.length&&$.each(v,function(ii,vv){$("#wpgmza_theme_editor_feature").append('<option value="'+i+"."+vv+'">'+i+"."+vv+"</option>")})}),$.each(WPGMZA.ThemeEditor.elements,function(i,v){$("#wpgmza_theme_editor_element").append('<option value="'+i+'">'+i+"</option>"),0<v.length&&$.each(v,function(ii,vv){$("#wpgmza_theme_editor_element").append('<option value="'+i+"."+vv+'">'+i+"."+vv+"</option>")})}),this.parse(),$('textarea[name="wpgmza_theme_data"]').on("input selectionchange propertychange",function(){self.parse()}),$(".wpgmza_theme_selection").click(function(){setTimeout(function(){$('textarea[name="wpgmza_theme_data"]').trigger("input")},1e3)}),$("#wpgmza-theme-editor__toggle").click(function(){$("#wpgmza-theme-editor").removeClass("active")}),$("#wpgmza_theme_editor_feature").on("change",function(){self.highlightElements(),self.loadElementStylers()}),$("#wpgmza_theme_editor_element").on("change",function(){self.loadElementStylers()}),$("#wpgmza_theme_editor_do_hue, #wpgmza_theme_editor_hue, #wpgmza_theme_editor_lightness, #wpgmza_theme_editor_saturation, #wpgmza_theme_editor_gamma, #wpgmza_theme_editor_do_invert_lightness, #wpgmza_theme_editor_visibility, #wpgmza_theme_editor_do_color, #wpgmza_theme_editor_color, #wpgmza_theme_editor_weight").on("input selectionchange propertychange",function(){self.writeElementStylers()}),"open-layers"==WPGMZA.settings.engine&&$("#wpgmza_theme_editor :input").prop("disabled",!0)},WPGMZA.ThemeEditor.prototype.refreshColorInputs=function(){$("input#wpgmza_theme_editor_hue,input#wpgmza_theme_editor_color").each(function(){this.wpgmzaColorInput&&this.wpgmzaColorInput.parseColor(this.value)})}}),jQuery(function($){WPGMZA.ThemePanel=function(){var self=this;this.element=$("#wpgmza-theme-panel"),this.map=WPGMZA.maps[0],"open-layers"==WPGMZA.settings.engine?(this.element.remove(),this.olThemePanel=new WPGMZA.OLThemePanel):this.element.length?($("#wpgmza-theme-presets").owlCarousel({items:6,dots:!0}),this.element.on("click","#wpgmza-theme-presets label, .theme-selection-panel label",function(event){self.onThemePresetClick(event)}),$("#wpgmza-open-theme-editor").on("click",function(event){$("#wpgmza-map-theme-editor__holder").addClass("active"),$("#wpgmza-theme-editor").addClass("active"),WPGMZA.animateScroll($("#wpgmza-theme-editor"))}),WPGMZA.themePanel=this):console.warn("No element to initialise theme panel on")},WPGMZA.ThemePanel.previewImageCenter={lat:33.701806462148646,lng:-118.15949896058983},WPGMZA.ThemePanel.previewImageZoom=11,WPGMZA.ThemePanel.prototype.onThemePresetClick=function(event){var event=$(event.currentTarget).find("[data-theme-json]").attr("data-theme-json"),textarea=$("textarea[name='wpgmza_theme_data']"),existingData=textarea.val(),allPresetData=[];$(this.element).find("[data-theme-json]").each(function(index,el){allPresetData.push($(el).attr("data-theme-json"))}),existingData.length&&-1==allPresetData.indexOf(existingData)&&!confirm(WPGMZA.localized_strings.overwrite_theme_data)||(textarea.val(event),this.updateMapTheme(),WPGMZA.themeEditor.parse())},WPGMZA.ThemePanel.prototype.updateMapTheme=function(){var data;try{data=JSON.parse($("textarea[name='wpgmza_theme_data']").val())}catch(e){return void alert(WPGMZA.localized_strings.invalid_theme_data)}this.map.setOptions({styles:data})}}),jQuery(function($){WPGMZA.Tour=function(element){this.findElements(element),this.bindEvents(),this.prepare(),setTimeout(()=>{this.prompt()},3e3)},WPGMZA.Tour.INPUT_CHANGE_INTERVAL=1500,WPGMZA.Tour.createInstance=function(element){return new WPGMZA.Tour(element)},WPGMZA.Tour.AutoInit=function(){WPGMZA.adminTours={},$(document.body).find(".wpgmza-tour").each(function(index,element){var type=$(element).data("type");WPGMZA.adminTours[type]=WPGMZA.Tour.createInstance(element)})},WPGMZA.Tour.prototype.prepare=function(){this.slug=this.elements.wrapper.data("type"),this.state={running:!1,step:0,steps:this.elements.steps.length||0}},WPGMZA.Tour.prototype.findElements=function(wrapper){this.elements={},this.elements.wrapper=$(wrapper),this.elements.prompt=this.elements.wrapper.find(".wpgmza-tour-prompt"),this.elements.promptAction=this.elements.prompt.find(".wpgmza-tour-prompt-actions .wpgmza-button"),this.elements.steps=this.elements.wrapper.find(".wpgmza-tour-step")},WPGMZA.Tour.prototype.bindEvents=function(){this.elements.promptAction.on("click",event=>{event&&event.currentTarget&&this.onPromptAction(event.currentTarget)}),this.elements.steps.each((i,elem)=>{elem=$(elem).data("anchor");elem&&$(elem).addClass("wpgmza-tour-anchor-link")}),$(document.body).on("click",".wpgmza-tour-next-step-delegate",event=>{event.currentTarget instanceof HTMLInputElement||($(event.currentTarget).data("auto-step")?event.preventDefault():this.next())}),$(document.body).on("keyup",".wpgmza-tour-next-step-delegate",event=>{event.currentTarget instanceof HTMLInputElement&&(event.currentTarget._wpgmzaChangeTimer&&clearTimeout(event.currentTarget._wpgmzaChangeTimer),event.currentTarget._wpgmzaChangeTimer=setTimeout(()=>{this.next()},WPGMZA.Tour.INPUT_CHANGE_INTERVAL))}),$(document.body).on("click",".wpgmza-tour-anchor-link",event=>{this.state.running||(this.stop(),this.dismiss(!0))}),$(document.body).on("click",event=>{this.onFramedClick(event)})},WPGMZA.Tour.prototype.onPromptAction=function(context){context instanceof Element&&("start"===$(context).data("action")?(this.state.running=!0,this.step(0)):(this.stop(),this.dismiss()))},WPGMZA.Tour.prototype.onFramedClick=function(event){if(this.elements.frame&&this.elements.frame.hasClass("active")&&!jQuery.contains(this.elements.wrapper.get(0),event.target)&&!$(event.target).hasClass("wpgmza-tour-next-step-delegate")&&!$(event.target).hasClass("wpgmza-tour-anchor-link")){var boundary=Object.assign({},this._lastFramePlacement),event=event.originalEvent||!1;if(boundary.top&&boundary.left&&event&&event instanceof PointerEvent){boundary.right=boundary.left+boundary.width,boundary.bottom=boundary.top+boundary.height;event={x:event.clientX,y:event.clientY};let shouldDismiss=!1;(event.x<boundary.left||event.x>boundary.right)&&(shouldDismiss=!0),(shouldDismiss=event.y<boundary.top||event.y>boundary.bottom?!0:shouldDismiss)&&(this.stop(),this.dismiss(!0))}else this.stop(),this.dismiss(!0)}},WPGMZA.Tour.prototype.prompt=function(){this.state.running=!1,this.state.step=0,this.elements.steps.removeClass("active"),this.elements.prompt.addClass("active")},WPGMZA.Tour.prototype.stop=function(){this.clearViewport(),this.elements.prompt.removeClass("active"),this.elements.steps.removeClass("active")},WPGMZA.Tour.prototype.step=function(index){var anchor;this.state.running&&(this.state.step=index,this.elements.prompt.removeClass("active"),this.elements.steps.removeClass("active"),$(".wpgmza-tour-next-step-delegate").removeClass("wpgmza-tour-next-step-delegate"),this.elements.steps[this.state.step])&&(anchor=(index=$(this.elements.steps[this.state.step])).data("anchor"),this.frame(anchor),this._lastFramePlacement&&(index.addClass("active"),index.css({left:this._lastFramePlacement.left+this._lastFramePlacement.width+"px",top:this._lastFramePlacement.top+this._lastFramePlacement.height/2-index.outerHeight()/2+"px"})),$(anchor).addClass("wpgmza-tour-next-step-delegate"),this._lastAutoStepTimer&&clearTimeout(this._lastAutoStepTimer),index.data("auto-step"))&&(this._lastAutoStepTimer=setTimeout(()=>{this.next()},parseInt(index.data("auto-step"))))},WPGMZA.Tour.prototype.next=function(){if(this.state.running){this.clearViewport();let nextStep=this.state.step+1;var delay;nextStep<this.state.steps?(delay=this.getStepDelay(nextStep))?setTimeout(()=>{this.step(nextStep)},delay):this.step(nextStep):this.complete()}},WPGMZA.Tour.prototype.frame=function(anchor){this.elements.frame||(this.elements.frame=$("<div class='wpgmza-tour-frame'></div>"),this.elements.frame.appendTo(this.elements.wrapper)),this._lastFramePlacement=!1,this.elements.frame.removeClass("active");anchor=document.querySelector(anchor);if(anchor){var i,anchorRect=anchor.getBoundingClientRect(),anchor=window.getComputedStyle(anchor,null),frameStyle={top:parseInt(anchorRect.top),left:parseInt(anchorRect.left),width:parseInt(anchorRect.width),height:parseInt(anchorRect.height),borderRadius:0};for(i in this.elements.frame.css("--wpgmza-tour-frame-border-radius","0px"),parseInt(anchor["border-radius"])&&(frameStyle.borderRadius=parseInt(anchor["border-radius"]),this.elements.frame.css("--wpgmza-tour-frame-border-radius",parseInt(anchor["border-radius"])+"px")),this._lastFramePlacement=Object.assign({},frameStyle),frameStyle)frameStyle[i]+="px";this.elements.frame.css(frameStyle),this.elements.frame.addClass("active")}},WPGMZA.Tour.prototype.clearViewport=function(){this.elements.frame&&this.elements.frame.hasClass("active")&&this.elements.frame.removeClass("active"),this.elements.steps.removeClass("active")},WPGMZA.Tour.prototype.getStepDelay=function(index){return $(this.elements.steps[index]).data("step-delay")?parseInt($(this.elements.steps[index]).data("step-delay")):0},WPGMZA.Tour.prototype.dismiss=function(short){if(this.state.complete)return!0;short=!!short;short={action:"wpgmza_tour_progress_update",wpgmza_security:WPGMZA.ajaxnonce,tour:this.slug,type:short?"sleep":"dismiss"};this.request(short,()=>{})},WPGMZA.Tour.prototype.complete=function(){this.state.running=!1,this.state.complete=!0;var data={action:"wpgmza_tour_progress_update",wpgmza_security:WPGMZA.ajaxnonce,tour:this.slug,type:"complete"};this.request(data,()=>{})},WPGMZA.Tour.prototype.request=function(data,complete){"function"!=typeof complete&&(complete=()=>{}),$.ajax(WPGMZA.ajaxurl,{method:"POST",data:data,success:function(response,status,xhr){complete(response)},error:function(){complete()}})},$(document).ready(function(event){WPGMZA.getCurrentPage()&&WPGMZA.Tour.AutoInit()})}),jQuery(function($){WPGMZA.Version=function(){},WPGMZA.Version.GREATER_THAN=1,WPGMZA.Version.EQUAL_TO=0,WPGMZA.Version.LESS_THAN=-1,WPGMZA.Version.compare=function(v1,v2){for(var v1parts=v1.match(/\d+/g),v2parts=v2.match(/\d+/g),i=0;i<v1parts.length;++i){if(v2parts.length===i)return 1;if(v1parts[i]!==v2parts[i])return v1parts[i]>v2parts[i]?1:-1}return v1parts.length!=v2parts.length?-1:0}}),jQuery(function($){WPGMZA.XMLCacheConverter=function(){},WPGMZA.XMLCacheConverter.prototype.convert=function(xml){var markers=[],remap={marker_id:"id",linkd:"link"};return $(xml).find("marker").each(function(index,el){var data={};$(el).children().each(function(j,child){var key=child.nodeName;remap[key]&&(key=remap[key]),child.hasAttribute("data-json")?data[key]=JSON.parse($(child).text()):data[key]=$(child).text()}),markers.push(data)}),markers}}),jQuery(function($){WPGMZA.loadXMLAsWebWorker=function(){function tXml(a,d){function c(){for(var l=[];a[b];){if(60==a.charCodeAt(b)){if(47===a.charCodeAt(b+1)){b=a.indexOf(">",b);break}if(33===a.charCodeAt(b+1)){if(45==a.charCodeAt(b+2)){for(;62!==a.charCodeAt(b)||45!=a.charCodeAt(b-1)||45!=a.charCodeAt(b-2)||-1==b;)b=a.indexOf(">",b+1);-1===b&&(b=a.length)}else for(b+=2;62!==a.charCodeAt(b);)b++;b++;continue}var c=f();l.push(c)}else c=b,-2===(b=a.indexOf("<",b)-1)&&(b=a.length),0<(c=a.slice(c,b+1)).trim().length&&l.push(c);b++}return l}function l(){for(var c=b;-1===g.indexOf(a[b]);)b++;return a.slice(c,b)}function f(){var d={};b++,d.tagName=l();for(var f=!1;62!==a.charCodeAt(b);){if(64<(e=a.charCodeAt(b))&&e<91||96<e&&e<123){for(var h,g=l(),e=a.charCodeAt(b);39!==e&&34!==e&&!(64<e&&e<91||96<e&&e<123)&&62!==e;)b++,e=a.charCodeAt(b);f||(d.attributes={},f=!0),39===e||34===e?(e=a[b],h=++b,b=a.indexOf(e,h),e=a.slice(h,b)):(e=null,b--),d.attributes[g]=e}b++}return 47!==a.charCodeAt(b-1)&&("script"==d.tagName?(f=b+1,b=a.indexOf("<\/script>",b),d.children=[a.slice(f,b-1)],b+=8):"style"==d.tagName?(f=b+1,b=a.indexOf("</style>",b),d.children=[a.slice(f,b-1)],b+=7):-1==k.indexOf(d.tagName)&&(b++,d.children=c())),d}var b,g="\n\t>/= ",k=["img","br","input","meta","link"],h=null;return(d=d||{}).searchId?(-1!==(b=new RegExp("s*ids*=s*['\"]"+d.searchId+"['\"]").exec(a).index)&&-1!==(b=a.lastIndexOf("<",b))&&(h=f()),b):(b=0,h=c(),d.filter&&(h=tXml.filter(h,d.filter)),d.simplify?tXml.simplefy(h):h)}tXml.simplify=function(a){var c,d={};if(1===a.length&&"string"==typeof a[0])return a[0];for(c in a.forEach(function(a){var c;d[a.tagName]||(d[a.tagName]=[]),"object"==typeof a?(c=tXml.simplefy(a.children),d[a.tagName].push(c),a.attributes&&(c._attributes=a.attributes)):d[a.tagName].push(a)}),d)1==d[c].length&&(d[c]=d[c][0]);return d},tXml.filter=function(a,d){var c=[];return a.forEach(function(a){"object"==typeof a&&d(a)&&c.push(a),a.children&&(a=tXml.filter(a.children,d),c=c.concat(a))}),c},tXml.domToXml=function(a){var c="";return function d(a){if(a)for(var f=0;f<a.length;f++)if("string"==typeof a[f])c+=a[f].trim();else{var g=a[f],k=void(c+="<"+g.tagName);for(k in g.attributes)c=-1===g.attributes[k].indexOf('"')?c+(" "+k+'="'+g.attributes[k].trim())+'"':c+(" "+k+"='"+g.attributes[k].trim())+"'";c+=">",d(g.children),c+="</"+g.tagName+">"}}(O),c},"object"!=typeof window&&(module.exports=tXml);var inputData,totalFiles,worker=self,dataForMainThread=[],filesLoaded=0;function onXMLLoaded(request){4==request.readyState&&200==request.status&&((new Date).getTime(),function(xml){for(var markers=xml[0].children[0],remap={marker_id:"id",linkd:"link"},i=0;i<markers.children.length;i++){var data={};markers.children[i].children.forEach(function(node){var key=node.tagName;remap[key]&&(key=remap[key]),node.attributes["data-json"]?data[key]=JSON.parse(node.children[0]):node.children.length?data[key]=node.children[0]:data[key]=""}),dataForMainThread.push(data)}}(tXml(request.responseText)),++filesLoaded>=totalFiles?worker.postMessage(dataForMainThread):loadNextFile())}function loadNextFile(){var url=inputData.urls[filesLoaded],request=new XMLHttpRequest;request.onreadystatechange=function(){onXMLLoaded(this)},request.open("GET",inputData.protocol+url,!0),request.send()}self.addEventListener("message",function(event){event=event.data;if("load"!==event.command)throw new Error("Unknown command");dataForMainThread=[],filesLoaded=0,totalFiles=(inputData=event).urls.length,loadNextFile()},!1)}}),jQuery(function($){WPGMZA.Integration={},WPGMZA.integrationModules={},WPGMZA.Integration.Blocks={},WPGMZA.Integration.Blocks.instances={}}),jQuery(function($){$(document).ready(function(event){var parent=document.body.onclick;parent&&(document.body.onclick=function(event){event.target instanceof WPGMZA.Marker||parent(event)})})}),jQuery(function($){WPGMZA.GoogleUICompatibility=function(){var style;navigator.vendor&&-1<navigator.vendor.indexOf("Apple")&&navigator.userAgent&&-1==navigator.userAgent.indexOf("CriOS")&&-1==navigator.userAgent.indexOf("FxiOS")||((style=$("<style id='wpgmza-google-ui-compatiblity-fix'/>")).html(".wpgmza_map img:not(button img) { padding:0 !important; }"),$(document.head).append(style))},WPGMZA.googleUICompatibility=new WPGMZA.GoogleUICompatibility}),jQuery(function($){WPGMZA.GoogleDrawingManager=function(map){var self=this;WPGMZA.DrawingManager.call(this,map),this.mode=null,this.googleDrawingManager=new google.maps.drawing.DrawingManager({drawingControl:!1,polygonOptions:{editable:!0},polylineOptions:{editable:!0},circleOptions:{editable:!0},rectangleOptions:{draggable:!0,editable:!0,strokeWeight:1,fillOpacity:0}}),this.googleDrawingManager.setMap(map.googleMap),google.maps.event.addListener(this.googleDrawingManager,"polygoncomplete",function(polygon){self.onPolygonClosed(polygon)}),google.maps.event.addListener(this.googleDrawingManager,"polylinecomplete",function(polyline){self.onPolylineComplete(polyline)}),google.maps.event.addListener(this.googleDrawingManager,"circlecomplete",function(circle){self.onCircleComplete(circle)}),google.maps.event.addListener(this.googleDrawingManager,"rectanglecomplete",function(rectangle){self.onRectangleComplete(rectangle)})},WPGMZA.GoogleDrawingManager.prototype=Object.create(WPGMZA.DrawingManager.prototype),WPGMZA.GoogleDrawingManager.prototype.constructor=WPGMZA.GoogleDrawingManager,WPGMZA.GoogleDrawingManager.prototype.setDrawingMode=function(mode){var googleMode;switch(WPGMZA.DrawingManager.prototype.setDrawingMode.call(this,mode),mode){case WPGMZA.DrawingManager.MODE_NONE:case WPGMZA.DrawingManager.MODE_MARKER:googleMode=null;break;case WPGMZA.DrawingManager.MODE_POLYGON:googleMode=google.maps.drawing.OverlayType.POLYGON;break;case WPGMZA.DrawingManager.MODE_POLYLINE:googleMode=google.maps.drawing.OverlayType.POLYLINE;break;case WPGMZA.DrawingManager.MODE_CIRCLE:googleMode=google.maps.drawing.OverlayType.CIRCLE;break;case WPGMZA.DrawingManager.MODE_RECTANGLE:googleMode=google.maps.drawing.OverlayType.RECTANGLE;break;case WPGMZA.DrawingManager.MODE_HEATMAP:case WPGMZA.DrawingManager.MODE_POINTLABEL:googleMode=null;break;case WPGMZA.DrawingManager.MODE_IMAGEOVERLAY:googleMode=google.maps.drawing.OverlayType.RECTANGLE;break;default:throw new Error("Invalid drawing mode")}this.googleDrawingManager.setDrawingMode(googleMode)},WPGMZA.GoogleDrawingManager.prototype.setOptions=function(options){this.googleDrawingManager.setOptions({polygonOptions:options,polylineOptions:options})},WPGMZA.GoogleDrawingManager.prototype.onVertexClicked=function(event){},WPGMZA.GoogleDrawingManager.prototype.onPolygonClosed=function(googlePolygon){var event=new WPGMZA.Event("polygonclosed");event.enginePolygon=googlePolygon,this.dispatchEvent(event)},WPGMZA.GoogleDrawingManager.prototype.onPolylineComplete=function(googlePolyline){var event=new WPGMZA.Event("polylinecomplete");event.enginePolyline=googlePolyline,this.dispatchEvent(event)},WPGMZA.GoogleDrawingManager.prototype.onCircleComplete=function(googleCircle){var event=new WPGMZA.Event("circlecomplete");event.engineCircle=googleCircle,this.dispatchEvent(event)},WPGMZA.GoogleDrawingManager.prototype.onRectangleComplete=function(googleRectangle){var event;this.mode===WPGMZA.DrawingManager.MODE_IMAGEOVERLAY?this.onImageoverlayComplete(googleRectangle):((event=new WPGMZA.Event("rectanglecomplete")).engineRectangle=googleRectangle,this.dispatchEvent(event))},WPGMZA.GoogleDrawingManager.prototype.onHeatmapPointAdded=function(googleMarker){var position=WPGMZA.LatLng.fromGoogleLatLng(googleMarker.getPosition()),googleMarker=(googleMarker.setMap(null),WPGMZA.Marker.createInstance()),image=(googleMarker.setPosition(position),{url:WPGMZA.imageFolderURL+"heatmap-point.png",origin:new google.maps.Point(0,0),anchor:new google.maps.Point(13,13)}),image=(googleMarker.googleMarker.setIcon(image),this.map.addMarker(googleMarker),new WPGMZA.Event("heatmappointadded"));image.position=position,this.trigger(image)},WPGMZA.GoogleDrawingManager.prototype.onImageoverlayComplete=function(rectangle){var event=new WPGMZA.Event("imageoverlaycomplete");event.engineImageoverlay={googleRectangle:rectangle},this.dispatchEvent(event)}}),jQuery(function($){WPGMZA.GoogleGeocoder=function(){},WPGMZA.GoogleGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.GoogleGeocoder.prototype.constructor=WPGMZA.GoogleGeocoder,WPGMZA.GoogleGeocoder.prototype.getLatLngFromAddress=function(options,callback){if(options&&options.address){var latLng;if(options.lat&&options.lng&&(latLng={lat:options.lat,lng:options.lng},callback([{geometry:{location:latLng},latLng:latLng,lat:latLng.lat,lng:latLng.lng,bounds:null}],WPGMZA.Geocoder.SUCCESS)),WPGMZA.isLatLngString(options.address))return WPGMZA.Geocoder.prototype.getLatLngFromAddress.call(this,options,callback);options.country&&(options.componentRestrictions={country:options.country}),(new google.maps.Geocoder).geocode(options,function(results,status){var bounds,location;status==google.maps.GeocoderStatus.OK?(location={lat:(location=results[0].geometry.location).lat(),lng:location.lng()},bounds=null,results[0].geometry.bounds&&(bounds=WPGMZA.LatLngBounds.fromGoogleLatLngBounds(results[0].geometry.bounds)),callback(results=[{geometry:{location:location},latLng:location,lat:location.lat,lng:location.lng,bounds:bounds}],WPGMZA.Geocoder.SUCCESS)):(location=WPGMZA.Geocoder.FAIL,status==google.maps.GeocoderStatus.ZERO_RESULTS&&(location=WPGMZA.Geocoder.ZERO_RESULTS),callback(null,location))})}else nativeStatus=WPGMZA.Geocoder.NO_ADDRESS,callback(null,nativeStatus)},WPGMZA.GoogleGeocoder.prototype.getAddressFromLatLng=function(options,callback){if(!options||!options.latLng)throw new Error("No latLng specified");var latLng=new WPGMZA.LatLng(options.latLng),geocoder=new google.maps.Geocoder,options=$.extend(options,{location:{lat:latLng.lat,lng:latLng.lng}});let fullResult=!1;options.fullResult&&(fullResult=!0,delete options.fullResult),delete options.latLng,geocoder.geocode(options,function(results,status){"OK"!==status&&callback(null,WPGMZA.Geocoder.FAIL),results&&results.length||callback([],WPGMZA.Geocoder.NO_RESULTS),fullResult?callback([results[0]],WPGMZA.Geocoder.SUCCESS):callback([results[0].formatted_address],WPGMZA.Geocoder.SUCCESS)})}}),jQuery(function($){WPGMZA.settings.engine&&"google-maps"!=WPGMZA.settings.engine||window.google&&window.google.maps&&(WPGMZA.GoogleHTMLOverlay=function(map){this.element=$("<div class='wpgmza-google-html-overlay'></div>"),this.visible=!0,this.position=new WPGMZA.LatLng,this.setMap(map.googleMap),this.wpgmzaMap=map},WPGMZA.GoogleHTMLOverlay.prototype=new google.maps.OverlayView,WPGMZA.GoogleHTMLOverlay.prototype.onAdd=function(){this.getPanes().overlayMouseTarget.appendChild(this.element[0])},WPGMZA.GoogleHTMLOverlay.prototype.onRemove=function(){this.element&&$(this.element).parent().length&&($(this.element).remove(),this.element=null)},WPGMZA.GoogleHTMLOverlay.prototype.draw=function(){this.updateElementPosition()},WPGMZA.GoogleHTMLOverlay.prototype.updateElementPosition=function(){var projection=this.getProjection();projection&&(projection=projection.fromLatLngToDivPixel(this.position.toGoogleLatLng()),$(this.element).css({left:projection.x,top:projection.y}))})}),jQuery(function($){WPGMZA.GoogleModernStoreLocatorCircle=function(map,settings){var self=this;WPGMZA.ModernStoreLocatorCircle.call(this,map,settings),this.intervalID=setInterval(function(){var mapSize={width:$(self.mapElement).width(),height:$(self.mapElement).height()};mapSize.width==self.mapSize.width&&mapSize.height==self.mapSize.height||(self.canvasLayer.resize_(),self.canvasLayer.draw(),self.mapSize=mapSize)},1e3),$(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange",function(){self.canvasLayer.resize_(),self.canvasLayer.draw()})},WPGMZA.GoogleModernStoreLocatorCircle.prototype=Object.create(WPGMZA.ModernStoreLocatorCircle.prototype),WPGMZA.GoogleModernStoreLocatorCircle.prototype.constructor=WPGMZA.GoogleModernStoreLocatorCircle,WPGMZA.GoogleModernStoreLocatorCircle.prototype.initCanvasLayer=function(){var self=this;this.canvasLayer&&(this.canvasLayer.setMap(null),this.canvasLayer.setAnimate(!1)),this.canvasLayer=new CanvasLayer({map:this.map.googleMap,resizeHandler:function(event){self.onResize(event)},updateHandler:function(event){self.onUpdate(event)},animate:!0,resolutionScale:this.getResolutionScale()})},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setOptions=function(options){WPGMZA.ModernStoreLocatorCircle.prototype.setOptions.call(this,options),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setPosition=function(position){WPGMZA.ModernStoreLocatorCircle.prototype.setPosition.call(this,position),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setRadius=function(radius){WPGMZA.ModernStoreLocatorCircle.prototype.setRadius.call(this,radius),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){var spherical=google.maps.geometry.spherical,center=this.settings.center,equator=new WPGMZA.LatLng({lat:0,lng:0}),center=new WPGMZA.LatLng({lat:center.lat,lng:0}),equator=spherical.computeOffset(equator.toGoogleLatLng(),1e3*km,90),spherical=.006395*km*(spherical.computeOffset(center.toGoogleLatLng(),1e3*km,90).lng()/equator.lng());if(isNaN(spherical))throw new Error("here");return spherical},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){return{width:this.canvasLayer.canvas.width,height:this.canvasLayer.canvas.height}},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getWorldOriginOffset=function(){var position=this.map.googleMap.getProjection().fromLatLngToPoint(this.canvasLayer.getTopLeft());return{x:-position.x,y:-position.y}},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCenterPixels=function(){var center=new WPGMZA.LatLng(this.settings.center);return this.map.googleMap.getProjection().fromLatLngToPoint(center.toGoogleLatLng())},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getContext=function(type){return this.canvasLayer.canvas.getContext("2d")},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getScale=function(){return Math.pow(2,this.map.getZoom())*this.getResolutionScale()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setVisible=function(visible){WPGMZA.ModernStoreLocatorCircle.prototype.setVisible.call(this,visible),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.destroy=function(){this.canvasLayer.setMap(null),this.canvasLayer=null,clearInterval(this.intervalID)}}),jQuery(function($){WPGMZA.GooglePolyline=function(options,googlePolyline){var self=this;WPGMZA.Polyline.call(this,options,googlePolyline),this.googlePolyline=googlePolyline||new google.maps.Polyline(this.settings),this.googleFeature=this.googlePolyline,options&&options.polydata&&(googlePolyline=this.parseGeometry(options.polydata),this.googlePolyline.setPath(googlePolyline)),this.googlePolyline.wpgmzaPolyline=this,options&&this.setOptions(options),google.maps.event.addListener(this.googlePolyline,"click",function(){self.dispatchEvent({type:"click"})})},WPGMZA.GooglePolyline.prototype=Object.create(WPGMZA.Polyline.prototype),WPGMZA.GooglePolyline.prototype.constructor=WPGMZA.GooglePolyline,WPGMZA.GooglePolyline.prototype.updateNativeFeature=function(){this.googlePolyline.setOptions(this.getScalarProperties())},WPGMZA.GooglePolyline.prototype.setEditable=function(value){var path,self=this;this.googlePolyline.setOptions({editable:value}),value&&(path=this.googlePolyline.getPath(),["insert_at","remove_at","set_at"].forEach(function(name){google.maps.event.addListener(path,name,function(){self.trigger("change")})}),google.maps.event.addListener(this.googlePolyline,"dragend",function(event){self.trigger("change")}),google.maps.event.addListener(this.googlePolyline,"click",function(event){WPGMZA.altKeyDown&&(this.getPath().removeAt(event.vertex),self.trigger("change"))}))},WPGMZA.GooglePolyline.prototype.setDraggable=function(value){this.googlePolyline.setOptions({draggable:value})},WPGMZA.GooglePolyline.prototype.getGeometry=function(){for(var result=[],path=this.googlePolyline.getPath(),i=0;i<path.getLength();i++){var latLng=path.getAt(i);result.push({lat:latLng.lat(),lng:latLng.lng()})}return result}}),jQuery(function($){WPGMZA.GoogleText=function(options){WPGMZA.Text.apply(this,arguments),this.overlay=new WPGMZA.GoogleTextOverlay(options)},WPGMZA.extend(WPGMZA.GoogleText,WPGMZA.Text)}),jQuery(function($){WPGMZA.GoogleTextOverlay=function(options){this.element=$("<div class='wpgmza-google-text-overlay'><div class='wpgmza-inner'></div></div>"),(options=options||{}).position&&(this.position=options.position),options.text&&this.element.find(".wpgmza-inner").text(options.text),options.map&&this.setMap(options.map.googleMap)},window.google&&google.maps&&google.maps.OverlayView&&(WPGMZA.GoogleTextOverlay.prototype=new google.maps.OverlayView),WPGMZA.GoogleTextOverlay.prototype.onAdd=function(){var position=this.getProjection().fromLatLngToDivPixel(this.position.toGoogleLatLng());this.element.css({position:"absolute",left:position.x+"px",top:position.y+"px",minWidth:"200px"}),this.getPanes().floatPane.appendChild(this.element[0])},WPGMZA.GoogleTextOverlay.prototype.draw=function(){var position=this.getProjection().fromLatLngToDivPixel(this.position.toGoogleLatLng());this.element.css({position:"absolute",left:position.x+"px",top:position.y+"px",minWidth:"200px"})},WPGMZA.GoogleTextOverlay.prototype.onRemove=function(){this.element.remove()},WPGMZA.GoogleTextOverlay.prototype.hide=function(){this.element.hide()},WPGMZA.GoogleTextOverlay.prototype.show=function(){this.element.show()},WPGMZA.GoogleTextOverlay.prototype.toggle=function(){this.element.is(":visible")?this.element.hide():this.element.show()},WPGMZA.GoogleTextOverlay.prototype.setPosition=function(position){this.position=position},WPGMZA.GoogleTextOverlay.prototype.setText=function(text){this.element.find(".wpgmza-inner").text(text)},WPGMZA.GoogleTextOverlay.prototype.setFontSize=function(size){size=parseInt(size),this.element.find(".wpgmza-inner").css("font-size",size+"px")},WPGMZA.GoogleTextOverlay.prototype.setFillColor=function(color){color.match(/^#/)||(color="#"+color),this.element.find(".wpgmza-inner").css("color",color)},WPGMZA.GoogleTextOverlay.prototype.setLineColor=function(color){color.match(/^#/)||(color="#"+color),this.element.find(".wpgmza-inner").css("--wpgmza-color-white",color)},WPGMZA.GoogleTextOverlay.prototype.setOpacity=function(opacity){1<(opacity=parseFloat(opacity))?opacity=1:opacity<0&&(opacity=0),this.element.find(".wpgmza-inner").css("opacity",opacity)},WPGMZA.GoogleTextOverlay.prototype.remove=function(){this.element&&this.element.remove()}}),jQuery(function($){"google-maps"!=WPGMZA.settings.engine||WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code||"undefined"!=typeof google&&void 0!==google.maps&&(WPGMZA.GoogleVertexContextMenu=function(mapEditPage){var self=this;this.mapEditPage=mapEditPage,this.element=document.createElement("div"),this.element.className="wpgmza-vertex-context-menu",this.element.innerHTML="Delete",google.maps.event.addDomListener(this.element,"click",function(event){return self.removeVertex(),event.preventDefault(),event.stopPropagation(),!1})},WPGMZA.GoogleVertexContextMenu.prototype=new google.maps.OverlayView,WPGMZA.GoogleVertexContextMenu.prototype.onAdd=function(){var self=this,map=this.getMap();this.getPanes().floatPane.appendChild(this.element),this.divListener=google.maps.event.addDomListener(map.getDiv(),"mousedown",function(e){e.target!=self.element&&self.close()},!0)},WPGMZA.GoogleVertexContextMenu.prototype.onRemove=function(){google.maps.event.removeListener(this.divListener),this.element.parentNode.removeChild(this.element),this.set("position"),this.set("path"),this.set("vertex")},WPGMZA.GoogleVertexContextMenu.prototype.open=function(map,path,vertex){this.set("position",path.getAt(vertex)),this.set("path",path),this.set("vertex",vertex),this.setMap(map),this.draw()},WPGMZA.GoogleVertexContextMenu.prototype.close=function(){this.setMap(null)},WPGMZA.GoogleVertexContextMenu.prototype.draw=function(){var position=this.get("position"),projection=this.getProjection();position&&projection&&(projection=projection.fromLatLngToDivPixel(position),this.element.style.top=projection.y+"px",this.element.style.left=projection.x+"px")},WPGMZA.GoogleVertexContextMenu.prototype.removeVertex=function(){var path=this.get("path"),vertex=this.get("vertex");path&&null!=vertex&&path.removeAt(vertex),this.close()})}),jQuery(function($){WPGMZA.FeaturePanel=function(element,mapEditPage){var self=this;WPGMZA.EventDispatcher.apply(this,arguments),this.map=mapEditPage.map,this.drawingManager=mapEditPage.drawingManager,this.writersblock=!1,this.feature=null,this.element=element,this.initDefaults(),this.setMode(WPGMZA.FeaturePanel.MODE_ADD),this.drawingInstructionsElement=$(this.element).find(".wpgmza-feature-drawing-instructions"),this.drawingInstructionsElement.detach(),this.editingInstructionsElement=$(this.element).find(".wpgmza-feature-editing-instructions"),this.editingInstructionsElement.detach(),$("#wpgmaps_tabs_markers").on("tabsactivate",function(event,ui){$.contains(ui.newPanel[0],self.element[0])&&self.onTabActivated(event)}),$("#wpgmaps_tabs_markers").on("tabsactivate",function(event,ui){$.contains(ui.oldPanel[0],self.element[0])&&self.onTabDeactivated(event)}),$(".grouping").on("feature-block-opened",function(event){$(event.currentTarget).data("feature")===self.featureType?self.onTabActivated(event):self.onTabDeactivated(event)}),$(".grouping").on("feature-block-closed",function(event){self.onTabDeactivated(event),mapEditPage.drawingManager.setDrawingMode(WPGMZA.DrawingManager.MODE_NONE)}),$(document.body).on("click","[data-edit-"+this.featureType+"-id]",function(event){self.onEditFeature(event)}),$(document.body).on("click","[data-delete-"+this.featureType+"-id]",function(event){self.onDeleteFeature(event)}),$(this.element).find(".wpgmza-save-feature").on("click",function(event){self.onSave(event)}),this.drawingManager.on(self.drawingManagerCompleteEvent,function(event){self.onDrawingComplete(event)}),this.drawingManager.on("drawingmodechanged",function(event){self.onDrawingModeChanged(event)}),$(this.element).on("change input",function(event){self.onPropertyChanged(event)})},WPGMZA.extend(WPGMZA.FeaturePanel,WPGMZA.EventDispatcher),WPGMZA.FeaturePanel.MODE_ADD="add",WPGMZA.FeaturePanel.MODE_EDIT="edit",WPGMZA.FeaturePanel.prevEditableFeature=null,Object.defineProperty(WPGMZA.FeaturePanel.prototype,"featureType",{get:function(){return $(this.element).attr("data-wpgmza-feature-type")}}),Object.defineProperty(WPGMZA.FeaturePanel.prototype,"drawingManagerCompleteEvent",{get:function(){return this.featureType+"complete"}}),Object.defineProperty(WPGMZA.FeaturePanel.prototype,"featureDataTable",{get:function(){return $("[data-wpgmza-datatable][data-wpgmza-feature-type='"+this.featureType+"']")[0].wpgmzaDataTable}}),Object.defineProperty(WPGMZA.FeaturePanel.prototype,"featureAccordion",{get:function(){return $(this.element).closest(".wpgmza-accordion")}}),Object.defineProperty(WPGMZA.FeaturePanel.prototype,"map",{get:function(){return WPGMZA.mapEditPage.map}}),Object.defineProperty(WPGMZA.FeaturePanel.prototype,"mode",{get:function(){return this._mode}}),WPGMZA.FeaturePanel.prototype.initPreloader=function(){this.preloader||(this.preloader=$(WPGMZA.preloaderHTML),this.preloader.hide(),$(this.element).append(this.preloader))},WPGMZA.FeaturePanel.prototype.initDataTable=function(){var el=$(this.element).find("[data-wpgmza-datatable][data-wpgmza-rest-api-route]");this[this.featureType+"AdminDataTable"]=new WPGMZA.AdminFeatureDataTable(el)},WPGMZA.FeaturePanel.prototype.initDefaults=function(){$(this.element).find("[data-ajax-name]:not([type='radio'])").each(function(index,el){var val=$(el).val();val&&$(el).attr("data-default-value",val)})},WPGMZA.FeaturePanel.prototype.setCaptionType=function(type,id){var icons={add:"fa-plus-circle",save:"fa-pencil-square-o"};switch(type){case WPGMZA.FeaturePanel.MODE_ADD:case WPGMZA.FeaturePanel.MODE_EDIT:this.featureAccordion.find("[data-add-caption][data-edit-caption]").each(function(index,el){var text=$(el).attr("data-"+type+"-caption"),icon=$(el).find("i.fa");id&&(text+=" "+id),$(el).text(text),icon.length&&((icon=$("<i class='fa' aria-hidden='true'></i>")).addClass(icons[type]),$(el).prepend(" "),$(el).prepend(icon))}),this.sidebarTriggerDelegate("feature-caption-loaded");break;default:throw new Error("Invalid type")}},WPGMZA.FeaturePanel.prototype.setMode=function(type,id){this._mode=type,this.setCaptionType(type,id)},WPGMZA.FeaturePanel.prototype.setTargetFeature=function(feature){var prev,self=this;WPGMZA.FeaturePanel.prevEditableFeature&&((prev=WPGMZA.FeaturePanel.prevEditableFeature).setEditable(!1),prev.setDraggable(!1),prev.off("change")),feature?(feature.setEditable(!0),feature.setDraggable(!0),feature.on("change",function(event){self.onFeatureChanged(event)}),this.setMode(WPGMZA.FeaturePanel.MODE_EDIT),this.drawingManager.setDrawingMode(WPGMZA.DrawingManager.MODE_NONE),this.showInstructions()):this.setMode(WPGMZA.FeaturePanel.MODE_ADD),this.feature=WPGMZA.FeaturePanel.prevEditableFeature=feature},WPGMZA.FeaturePanel.prototype.reset=function(){$(this.element).find("[data-ajax-name]:not([data-ajax-name='map_id']):not([type='color']):not([type='checkbox']):not([type='radio'])").val(""),$(this.element).find("select[data-ajax-name]>option:first-child").prop("selected",!0),$(this.element).find("[data-ajax-name='id']").val("-1"),$(this.element).find("input[type='checkbox']").prop("checked",!1),WPGMZA.InternalEngine.isLegacy()?tinyMCE.get("wpgmza-description-editor")?tinyMCE.get("wpgmza-description-editor").setContent(""):$("#wpgmza-description-editor").val(""):("undefined"!=typeof WritersBlock&&0!=this.writersblock&&this.writersblock.ready?(this.writersblock.setContent(""),this.writersblock.elements&&this.writersblock.elements._codeEditor&&(this.writersblock.elements._codeEditor.value="")):$("#wpgmza-description-editor").val(""),$(this.element).find("input.wpgmza-color-input").each(function(){this.wpgmzaColorInput&&this.wpgmzaColorInput.parseColor($(this).data("default-value")||this.value)})),$("#wpgmza-description-editor").val(""),$(this.element).find(".wpgmza-image-single-input").trigger("change"),this.showPreloader(!1),this.setMode(WPGMZA.FeaturePanel.MODE_ADD),$(this.element).find("[data-ajax-name][data-default-value]").each(function(index,el){$(el).val($(el).data("default-value"))})},WPGMZA.FeaturePanel.prototype.select=function(arg){var id,expectedBaseClass,self=this;if(this.reset(),WPGMZA.isNumeric(arg))id=arg;else{if(expectedBaseClass=WPGMZA[WPGMZA.capitalizeWords(this.featureType)],!(feature instanceof expectedBaseClass))throw new Error("Invalid feature type for this panel");id=arg.id}this.showPreloader(!0),this.sidebarTriggerDelegate("edit"),WPGMZA.InternalEngine.isLegacy()&&WPGMZA.animateScroll($(".wpgmza_map")),WPGMZA.restAPI.call("/"+this.featureType+"s/"+id+"?skip_cache=1&context=editor",{success:function(data,status,xhr){var functionSuffix=WPGMZA.capitalizeWords(self.featureType),functionSuffix=self.map["get"+functionSuffix+"ByID"](id);self.populate(data),self.showPreloader(!1),self.setMode(WPGMZA.FeaturePanel.MODE_EDIT,id),self.setTargetFeature(functionSuffix)}})},WPGMZA.FeaturePanel.prototype.showPreloader=function(show){this.initPreloader(),0==arguments.length||show?(this.preloader.fadeIn(),this.element.addClass("wpgmza-loading")):(this.preloader.fadeOut(),this.element.removeClass("wpgmza-loading"))},WPGMZA.FeaturePanel.prototype.populate=function(data){var value,target,name,colorInput;for(name in data)switch(target=$(this.element).find("[data-ajax-name='"+name+"']"),value=data[name],(target.attr("type")||"").toLowerCase()){case"checkbox":case"radio":target.prop("checked",1==data[name]);break;case"color":value.match(/^#/)||(value="#"+value);default:"string"==typeof(value="object"==typeof value?JSON.stringify(value):value)&&(value=value.replace(/&amp;/g,"&")),$(this.element).find("[data-ajax-name='"+name+"']:not(select)").val(value),$(this.element).find("[data-ajax-name='"+name+"']:not(select)").hasClass("wpgmza-color-input")&&(colorInput=$(this.element).find("[data-ajax-name='"+name+"']:not(select)").get(0)).wpgmzaColorInput&&colorInput.wpgmzaColorInput.parseColor(colorInput.value),$(this.element).find("[data-ajax-name='"+name+"']:not(select)").hasClass("wpgmza-image-single-input")&&(colorInput=$(this.element).find("[data-ajax-name='"+name+"']:not(select)").get(0)).wpgmzaImageInputSingle&&colorInput.wpgmzaImageInputSingle.parseImage(colorInput.value),$(this.element).find("select[data-ajax-name='"+name+"']").each(function(index,el){"string"==typeof value&&0==data[name].length||$(el).val(value)})}},WPGMZA.FeaturePanel.prototype.serializeFormData=function(){var fields=$(this.element).find("[data-ajax-name]"),data={};return fields.each(function(index,el){var type="text";switch(type=$(el).attr("type")?$(el).attr("type").toLowerCase():type){case"checkbox":data[$(el).attr("data-ajax-name")]=$(el).prop("checked")?1:0;break;case"radio":$(el).prop("checked")&&(data[$(el).attr("data-ajax-name")]=$(el).val());break;default:data[$(el).attr("data-ajax-name")]=$(el).val()}}),data},WPGMZA.FeaturePanel.prototype.discardChanges=function(){var feature;this.feature&&(feature=this.feature,this.setTargetFeature(null),feature)&&feature.map&&(this.map["remove"+WPGMZA.capitalizeWords(this.featureType)](feature),-1<feature.id)&&this.updateFeatureByID(feature.id)},WPGMZA.FeaturePanel.prototype.updateFeatureByID=function(id){var feature,self=this,route="/"+this.featureType+"s/",functionSuffix=WPGMZA.capitalizeWords(self.featureType),getByIDFunction="get"+functionSuffix+"ByID",removeFunction="remove"+functionSuffix,addFunction="add"+functionSuffix;WPGMZA.restAPI.call(route+id,{success:function(data,status,xhr){(feature=self.map[getByIDFunction](id))&&self.map[removeFunction](feature),feature=WPGMZA[WPGMZA.capitalizeWords(self.featureType)].createInstance(data),self.map[addFunction](feature)}})},WPGMZA.FeaturePanel.prototype.showInstructions=function(){this.mode===WPGMZA.FeaturePanel.MODE_ADD?WPGMZA.InternalEngine.isLegacy()?($(this.map.element).append(this.drawingInstructionsElement),$(this.drawingInstructionsElement).hide().fadeIn()):$(this.element).prepend(this.drawingInstructionsElement):WPGMZA.InternalEngine.isLegacy()?($(this.map.element).append(this.editingInstructionsElement),$(this.editingInstructionsElement).hide().fadeIn()):$(this.element).prepend(this.editingInstructionsElement)},WPGMZA.FeaturePanel.prototype.onTabActivated=function(){var featureString;this.reset(),this.drawingManager.setDrawingMode(this.featureType),this.onAddFeature(event),WPGMZA.InternalEngine.isLegacy()&&($(".wpgmza-table-container-title").hide(),$(".wpgmza-table-container").hide(),featureString=this.featureType.charAt(0).toUpperCase()+this.featureType.slice(1),$("#wpgmza-table-container-"+featureString).show(),$("#wpgmza-table-container-title-"+featureString).show())},WPGMZA.FeaturePanel.prototype.onTabDeactivated=function(){this.discardChanges(),this.setTargetFeature(null)},WPGMZA.FeaturePanel.prototype.onAddFeature=function(event){this.drawingManager.setDrawingMode(this.featureType)},WPGMZA.FeaturePanel.prototype.onEditFeature=function(event){var name="data-edit-"+this.featureType+"-id",event=$(event.currentTarget).attr(name);this.discardChanges(),this.select(event)},WPGMZA.FeaturePanel.prototype.onDeleteFeature=function(event){var self=this,name="data-delete-"+this.featureType+"-id",event=$(event.currentTarget).attr(name),name="/"+this.featureType+"s/",feature=this.map["get"+WPGMZA.capitalizeWords(this.featureType)+"ByID"](event);confirm(WPGMZA.localized_strings.general_delete_prompt_text)&&(this.featureDataTable.dataTable.processing(!0),WPGMZA.restAPI.call(name+event,{method:"DELETE",success:function(data,status,xhr){self.map["remove"+WPGMZA.capitalizeWords(self.featureType)](feature),self.featureDataTable.reload()}}))},WPGMZA.FeaturePanel.prototype.onDrawingModeChanged=function(event){$(this.drawingInstructionsElement).detach(),$(this.editingInstructionsElement).detach(),this.drawingManager.mode==this.featureType&&this.showInstructions()},WPGMZA.FeaturePanel.prototype.onDrawingComplete=function(event){var event=event["engine"+WPGMZA.capitalizeWords(this.featureType)],formData=this.serializeFormData(),geometryField=$(this.element).find("textarea[data-ajax-name$='data']"),formData=(delete formData.polydata,WPGMZA[WPGMZA.capitalizeWords(this.featureType)].createInstance(formData,event));this.drawingManager.setDrawingMode(WPGMZA.DrawingManager.MODE_NONE),this.map["add"+WPGMZA.capitalizeWords(this.featureType)](formData),this.setTargetFeature(formData),geometryField.length&&geometryField.val(JSON.stringify(formData.getGeometry())),this.featureType},WPGMZA.FeaturePanel.prototype.onPropertyChanged=function(event){var feature=this.feature;feature&&(feature._dirtyFields||(feature._dirtyFields=[]),$(this.element).find(":input[data-ajax-name]").each(function(index,el){var key=$(el).attr("data-ajax-name");feature[key]&&-1===feature._dirtyFields.indexOf(key)&&feature[key]!==$(el).val()&&feature._dirtyFields.push(key),feature[key]=$(el).val()}),feature.updateNativeFeature())},WPGMZA.FeaturePanel.prototype.onFeatureChanged=function(event){var geometryField=$(this.element).find("textarea[data-ajax-name$='data']");geometryField.length&&geometryField.val(JSON.stringify(this.feature.getGeometry()))},WPGMZA.FeaturePanel.prototype.onSave=function(event){WPGMZA.EmbeddedMedia.detatchAll();var self=this,id=$(self.element).find("[data-ajax-name='id']").val(),data=this.serializeFormData(),route="/"+this.featureType+"s/",isNew=-1==id;"circle"!=this.featureType||data.center?"rectangle"!=this.featureType||data.cornerA?"polygon"!=this.featureType||data.polydata?"polyline"!=this.featureType||data.polydata?(isNew||(route+=id),WPGMZA.mapEditPage.drawingManager.setDrawingMode(WPGMZA.DrawingManager.MODE_NONE),this.showPreloader(!0),self.sidebarTriggerDelegate("busy"),WPGMZA.restAPI.call(route,{method:"POST",data:data,success:function(data,status,xhr){var functionSuffix=WPGMZA.capitalizeWords(self.featureType),removeFunction="remove"+functionSuffix,addFunction="add"+functionSuffix;(functionSuffix=self.map["get"+functionSuffix+"ByID"](id))&&self.map[removeFunction](functionSuffix),self.setTargetFeature(null),self.showPreloader(!1),functionSuffix=WPGMZA[WPGMZA.capitalizeWords(self.featureType)].createInstance(data),self.map[addFunction](functionSuffix),self.featureDataTable.reload(),self.onTabActivated(event),self.reset(),isNew?self.sidebarTriggerDelegate("created"):self.sidebarTriggerDelegate("saved"),WPGMZA.notification(WPGMZA.capitalizeWords(self.featureType)+" "+(isNew?"Added":"Saved"))}})):alert(WPGMZA.localized_strings.no_shape_polyline):alert(WPGMZA.localized_strings.no_shape_polygon):alert(WPGMZA.localized_strings.no_shape_rectangle):alert(WPGMZA.localized_strings.no_shape_circle)},WPGMZA.FeaturePanel.prototype.sidebarTriggerDelegate=function(type){type="sidebar-delegate-"+type;$(this.element).trigger({type:type,feature:this.featureType})},WPGMZA.FeaturePanel.prototype.initWritersBlock=function(element){!element||WPGMZA.InternalEngine.isLegacy()||"undefined"==typeof WritersBlock||(this.writersblock=new WritersBlock(element,this.getWritersBlockConfig()),this.writersblock.elements&&this.writersblock.elements.editor&&($(this.writersblock.elements.editor).on("click",".wpgmza-embedded-media",event=>{event.stopPropagation(),event.currentTarget&&(event.currentTarget.wpgmzaEmbeddedMedia||(event.currentTarget.wpgmzaEmbeddedMedia=WPGMZA.EmbeddedMedia.createInstance(event.currentTarget,this.writersblock.elements.editor)),event.currentTarget.wpgmzaEmbeddedMedia.onSelect())}),$(this.writersblock.elements.editor).on("media_resized",()=>{this.writersblock.onEditorChange()})))},WPGMZA.FeaturePanel.prototype.getWritersBlockConfig=function(){return{customTools:[{tag:"shared-blocks",tools:{"custom-media":{icon:"fa fa-file-image-o",title:"Upload Media",action:editor=>{"undefined"!=typeof wp&&void 0!==wp.media&&void 0!==WPGMZA.openMediaDialog&&WPGMZA.openMediaDialog((mediaId,mediaUrl,media)=>{if(mediaUrl)if(media.type)switch(media.type){case"image":editor.writeHtml(`<img class='wpgmza-embedded-media' src='${mediaUrl}' />`);break;case"video":editor.writeHtml(`<video class='wpgmza-embedded-media' controls src='${mediaUrl}'></video>`);break;case"audio":editor.writeHtml(`<audio controls src='${mediaUrl}'></audio>`)}else WPGMZA.notification("We couldn't determine the type of media being added")},{title:"Select media",button:{text:"Add media"},multiple:!1,library:{type:["video","image","audio"]}})}},"code-editor":{icon:"fa fa-code",title:"Code Editor (HTML)",action:editor=>{if(editor._codeEditorActive){if(editor.elements._codeEditor){editor.elements.editor.classList.remove("wpgmza-hidden"),editor.elements._codeEditor.classList.add("wpgmza-hidden");let toolbarItems=editor.elements.toolbar.querySelectorAll("a.tool");for(let tool of toolbarItems)"codeeditor"!==tool.getAttribute("data-value")?tool.classList.remove("wpgmza-writersblock-disabled"):tool.classList.remove("wpgmza-writersblock-hold-state");$(editor.elements._codeEditor).trigger("wpgmza-writersblock-code-edited")}editor.elements.wrap.classList.remove("wpgmza-code-syntax-invalid"),editor._codeEditorActive=!1}else{var tool;editor.elements._codeEditor||(editor.elements._codeEditor=editor.createElement("textarea",["writersblock-wpgmza-code-editor"]),editor.elements._codeEditor.setAttribute("placeholder","\x3c!-- Add HTML Here --\x3e"),editor.elements.wrap.appendChild(editor.elements._codeEditor),editor.elements._codeEditor.__editor=editor,$(editor.elements._codeEditor).on("wpgmza-writersblock-code-edited",function(){var target=$(this).get(0);if(target.__editor){let editedHtml=target.__editor.elements._codeEditor.value;editedHtml=editedHtml.replaceAll("\n","");var validator=document.createElement("div");validator.innerHTML=editedHtml,validator.innerHTML===editedHtml?(target.__editor.elements.editor.innerHTML=validator.innerHTML,target.__editor.onEditorChange(),editor.elements.wrap.classList.remove("wpgmza-code-syntax-invalid")):editor.elements.wrap.classList.add("wpgmza-code-syntax-invalid")}}),$(editor.elements._codeEditor).on("change input",function(){$(this).trigger("wpgmza-writersblock-code-edited")})),editor.elements.editor.classList.add("wpgmza-hidden"),editor.elements._codeEditor.classList.remove("wpgmza-hidden");for(tool of editor.elements.toolbar.querySelectorAll("a.tool"))"codeeditor"!==tool.getAttribute("data-value")?tool.classList.add("wpgmza-writersblock-disabled"):tool.classList.add("wpgmza-writersblock-hold-state");if(editor.elements.editor.innerHTML&&0<editor.elements.editor.innerHTML.trim().length){let sourceHtml=editor.elements.editor.innerHTML;sourceHtml=sourceHtml.replaceAll(/<\/(\w+)>/g,"</$1>\n"),editor.elements._codeEditor.value=sourceHtml}editor._codeEditorActive=!0}}}}}],enabledTools:["p","h1","h2","createlink","unlink","bold","italic","underline","strikeThrough","justifyLeft","justifyCenter","justifyRight","insertUnorderedList","insertOrderedList","insertHorizontalRule","custom-media","code-editor"],events:{onUpdateSelection:packet=>{packet.instance&&setTimeout(()=>{var pingedSelection=window.getSelection();pingedSelection&&0===pingedSelection.toString().trim().length&&this.writersblock.hidePopupTools()},10)}}}},WPGMZA.FeaturePanel.prototype.hasDirtyField=function(field){if(this.feature&&this.feature._dirtyFields){if(this.feature._dirtyFields instanceof Array&&-1!==this.feature._dirtyFields.indexOf(field))return!0}else if(!this.feature)return!0;return!1}}),jQuery(function($){WPGMZA.MarkerPanel=function(element,mapEditPage){WPGMZA.FeaturePanel.apply(this,arguments)},WPGMZA.extend(WPGMZA.MarkerPanel,WPGMZA.FeaturePanel),WPGMZA.MarkerPanel.createInstance=function(element,mapEditPage){return new(WPGMZA.isProVersion()?WPGMZA.ProMarkerPanel:WPGMZA.MarkerPanel)(element,mapEditPage)},WPGMZA.MarkerPanel.prototype.initDefaults=function(){var self=this;WPGMZA.FeaturePanel.prototype.initDefaults.apply(this,arguments),this.adjustSubMode=!1,WPGMZA.InternalEngine.isLegacy()&&this.onTabActivated(null),$(document.body).on("click","[data-adjust-"+this.featureType+"-id]",function(event){self.onAdjustFeature(event)}),$(document.body).on("click",".wpgmza_approve_btn",function(event){self.onApproveMarker(event)})},WPGMZA.MarkerPanel.prototype.onAdjustFeature=function(event){var name="data-adjust-"+this.featureType+"-id",event=$(event.currentTarget).attr(name);this.discardChanges(),this.adjustSubMode=!0,this.select(event)},WPGMZA.MarkerPanel.prototype.onApproveMarker=function(event){var self=this,event="/"+this.featureType+"s/"+$(event.currentTarget).attr("id");WPGMZA.restAPI.call(event,{method:"POST",data:{approved:"1"},success:function(data,status,xhr){self.featureDataTable.reload()}})},WPGMZA.MarkerPanel.prototype.onFeatureChanged=function(event){var aPos,pos;this.adjustSubMode?(aPos=this.feature.getPosition())&&($(this.element).find("[data-ajax-name='lat']").val(aPos.lat),$(this.element).find("[data-ajax-name='lng']").val(aPos.lng)):(aPos=$(this.element).find("input[data-ajax-name$='address']")).length&&(pos=this.feature.getPosition(),aPos.val(pos.lat+", "+pos.lng),aPos.trigger("change"))},WPGMZA.MarkerPanel.prototype.setTargetFeature=function(feature){var prev;WPGMZA.FeaturePanel.prevEditableFeature&&(prev=WPGMZA.FeaturePanel.prevEditableFeature).setOpacity&&prev.setOpacity(1),$(this.element).find("[data-ajax-name]").removeAttr("disabled"),$(this.element).find("fieldset").show(),$(this.element).find(".wpgmza-adjust-mode-notice").addClass("wpgmza-hidden"),$(this.element).find('[data-ajax-name="lat"]').attr("type","hidden"),$(this.element).find('[data-ajax-name="lng"]').attr("type","hidden"),$(this.element).find(".wpgmza-hide-in-adjust-mode").removeClass("wpgmza-hidden"),$(this.element).find(".wpgmza-show-in-adjust-mode").addClass("wpgmza-hidden"),$(this.element).find(".wpgmza-pro-feature [data-ajax-name]").attr("disabled","disabled"),feature?(feature.setOpacity&&feature.setOpacity(.7),feature.getMap().panTo(feature.getPosition()),this.adjustSubMode&&($(this.element).find("[data-ajax-name]").attr("disabled","disabled"),$(this.element).find("fieldset:not(.wpgmza-always-on)").hide(),$(this.element).find(".wpgmza-adjust-mode-notice").removeClass("wpgmza-hidden"),$(this.element).find('[data-ajax-name="lat"]').attr("type","text").removeAttr("disabled"),$(this.element).find('[data-ajax-name="lng"]').attr("type","text").removeAttr("disabled"),$(this.element).find(".wpgmza-hide-in-adjust-mode").addClass("wpgmza-hidden"),$(this.element).find(".wpgmza-show-in-adjust-mode").removeClass("wpgmza-hidden"))):this.adjustSubMode=!1,WPGMZA.FeaturePanel.prototype.setTargetFeature.apply(this,arguments)},WPGMZA.MarkerPanel.prototype.onSave=function(event){var self=this,geocoder=WPGMZA.Geocoder.createInstance(),geocodingData={address:$(this.element).find("[data-ajax-name='address']").val()},cloud_lat=(WPGMZA.mapEditPage.drawingManager.setDrawingMode(WPGMZA.DrawingManager.MODE_NONE),this.showPreloader(!0),!1),cloud_lng=!1,cloud_lat=(0<document.getElementsByName("lat").length&&(cloud_lat=document.getElementsByName("lat")[0].value),0<document.getElementsByName("lng").length&&(cloud_lng=document.getElementsByName("lng")[0].value),cloud_lat&&cloud_lng&&(WPGMZA_localized_data.settings.googleMapsApiKey&&""!==WPGMZA_localized_data.settings.googleMapsApiKey||(geocodingData.lat=parseFloat(cloud_lat),geocodingData.lng=parseFloat(cloud_lng))),!this.hasDirtyField("address"));this.adjustSubMode||cloud_lat?WPGMZA.FeaturePanel.prototype.onSave.apply(self,arguments):geocoder.geocode(geocodingData,function(results,status){switch(status){case WPGMZA.Geocoder.ZERO_RESULTS:return alert(WPGMZA.localized_strings.zero_results),void self.showPreloader(!1);case WPGMZA.Geocoder.SUCCESS:break;case WPGMZA.Geocoder.NO_ADDRESS:return alert(WPGMZA.localized_strings.no_address),void self.showPreloader(!1);default:WPGMZA.Geocoder.FAIL;return alert(WPGMZA.localized_strings.geocode_fail),void self.showPreloader(!1)}var result=results[0];$(self.element).find("[data-ajax-name='lat']").val(result.lat),$(self.element).find("[data-ajax-name='lng']").val(result.lng),WPGMZA.FeaturePanel.prototype.onSave.apply(self,arguments)}),WPGMZA.mapEditPage.map.resetBounds()}}),jQuery(function($){WPGMZA.CirclePanel=function(element,mapEditPage){WPGMZA.FeaturePanel.apply(this,arguments)},WPGMZA.extend(WPGMZA.CirclePanel,WPGMZA.FeaturePanel),WPGMZA.CirclePanel.createInstance=function(element,mapEditPage){return new(WPGMZA.isProVersion()?WPGMZA.ProCirclePanel:WPGMZA.CirclePanel)(element,mapEditPage)},WPGMZA.CirclePanel.prototype.updateFields=function(){$(this.element).find("[data-ajax-name='center']").val(this.feature.getCenter().toString()),$(this.element).find("[data-ajax-name='radius']").val(this.feature.getRadius())},WPGMZA.CirclePanel.prototype.onDrawingComplete=function(event){WPGMZA.FeaturePanel.prototype.onDrawingComplete.apply(this,arguments),this.updateFields()},WPGMZA.CirclePanel.prototype.setTargetFeature=function(feature){WPGMZA.FeaturePanel.prototype.setTargetFeature.apply(this,arguments),feature&&this.updateFields()},WPGMZA.CirclePanel.prototype.onFeatureChanged=function(event){WPGMZA.FeaturePanel.prototype.onFeatureChanged.apply(this,arguments),this.updateFields()}});var wpgmza_autoCompleteDisabled=!1;jQuery(function($){"map-edit"==WPGMZA.currentPage&&(WPGMZA.MapEditPage=function(){var self=this,element=document.body;WPGMZA.EventDispatcher.call(this),WPGMZA.settings.internalEngine&&!WPGMZA.InternalEngine.isLegacy()||$("#wpgmaps_options fieldset").wrapInner("<div class='wpgmza-flex'></div>"),this.themePanel=new WPGMZA.ThemePanel,this.themeEditor=new WPGMZA.ThemeEditor,this.sidebarGroupings=new WPGMZA.SidebarGroupings,this.map=WPGMZA.maps[0],(!WPGMZA.pro_version||WPGMZA.Version.compare(WPGMZA.pro_version,"8.1.0")>=WPGMZA.Version.EQUAL_TO)&&(this.drawingManager=WPGMZA.DrawingManager.createInstance(this.map)),this.initDataTables(),this.initFeaturePanels(),this.initJQueryUIControls(),"en"!==WPGMZA.locale&&(WPGMZA.InternalEngine.isLegacy()?$("#datatable_no_result_message,#datatable_search_string").parent():$("#datatable_no_result_message,#datatable_search_string")).parent().hide(),$("input.wpgmza-address").each(function(index,el){el.addressInput=WPGMZA.AddressInput.createInstance(el,self.map)}),$('#wpgmza-map-edit-page input[type="color"]').each(function(){var buttonClass=WPGMZA.InternalEngine.isLegacy()?"button-secondary":"wpgmza-button";$("<div class='"+buttonClass+" wpgmza-paste-color-btn' title='Paste a HEX color code'><i class='fa fa-clipboard' aria-hidden='true'></i></div>").insertAfter(this)}),jQuery("body").on("click",".wpgmza_ac_result",function(e){var index=jQuery(this).data("id"),lat=jQuery(this).data("lat"),lng=jQuery(this).data("lng"),index=jQuery("#wpgmza_item_address_"+index).html();jQuery("input[name='lat']").val(lat),jQuery("input[name='lng']").val(lng),jQuery("#wpgmza_add_address_map_editor").val(index),jQuery("#wpgmza_autocomplete_search_results").hide()}),jQuery("body").on("click",".wpgmza-paste-color-btn",function(){try{var colorBtn=$(this);navigator&&navigator.clipboard&&navigator.clipboard.readText&&navigator.clipboard.readText().then(function(textcopy){colorBtn.parent().find('input[type="color"]').val("#"+textcopy.replace("#","").trim())}).catch(function(err){console.error("WP Go Maps: Could not access clipboard",err)})}catch(c_ex){}}),jQuery("body").on("focusout","#wpgmza_add_address_map_editor",function(e){setTimeout(function(){jQuery("#wpgmza_autocomplete_search_results").fadeOut("slow")},500)});$("body").on("keypress",".wpgmza-address",function(e){self.shouldAddressFieldUseEnhancedAutocomplete(this)&&self.onKeyUpEnhancedAutocomplete(e,this)}),$("#wpgmza_map_height_type").on("change",function(event){self.onMapHeightTypeChange(event)}),$("#advanced-markers .wpgmza-feature-drawing-instructions").remove(),$("[data-search-area='auto']").hide(),$(document.body).on("click","[data-wpgmza-admin-marker-datatable] input[name='mark']",function(event){self.onShiftClick(event)}),$("#wpgmza_map_type").on("change",function(event){self.onMapTypeChanged(event)}),$("body").on("click",".wpgmza_copy_shortcode",function(){var $temp=jQuery("<input>");jQuery('<span id="wpgmza_tmp" style="display:none; width:100%; text-align:center;">');jQuery("body").append($temp),$temp.val(jQuery(this).val()).select(),document.execCommand("copy"),$temp.remove(),WPGMZA.notification("Shortcode Copied")}),this.on("markerupdated",function(event){self.onMarkerUpdated(event)}),this.map&&(this.map.on("zoomchanged",function(event){self.onZoomChanged(event)}),this.map.on("boundschanged",function(event){self.onBoundsChanged(event)}),this.map.on("rightclick",function(event){self.onRightClick(event)})),$(element).on("click",".wpgmza_poly_del_btn",function(event){self.onDeletePolygon(event)}),$(element).on("click",".wpgmza_polyline_del_btn",function(event){self.onDeletePolyline(event)}),$(element).on("click",".wpgmza_dataset_del_btn",function(evevnt){self.onDeleteHeatmap(event)}),$(element).on("click",".wpgmza_circle_del_btn",function(event){self.onDeleteCircle(event)}),$(element).on("click",".wpgmza_rectangle_del_btn",function(event){self.onDeleteRectangle(event)}),$(element).on("click","#wpgmza-open-advanced-theme-data",function(event){event.preventDefault(),$(".wpgmza_theme_data_container").toggleClass("wpgmza_hidden")}),$(element).on("click",".wpgmza-shortcode-button",function(event){event.preventDefault(),$(element).find(".wpgmza-shortcode-description").addClass("wpgmza-hidden");var temp,event=$(this).closest(".wpgmza-row"),event=(event.length&&(event=event.next(".wpgmza-shortcode-description")).length&&event.removeClass("wpgmza-hidden"),$(this).text());event.length&&(temp=jQuery("<input>"),$(document.body).append(temp),temp.val(event).select(),document.execCommand("copy"),temp.remove(),WPGMZA.notification("Shortcode Copied"))})},WPGMZA.extend(WPGMZA.MapEditPage,WPGMZA.EventDispatcher),WPGMZA.MapEditPage.createInstance=function(){return new(WPGMZA.isProVersion()&&WPGMZA.Version.compare(WPGMZA.pro_version,"8.0.0")>=WPGMZA.Version.EQUAL_TO?WPGMZA.ProMapEditPage:WPGMZA.MapEditPage)},WPGMZA.MapEditPage.prototype.initDataTables=function(){var self=this;$("[data-wpgmza-datatable][data-wpgmza-rest-api-route]").each(function(index,el){var featureType=$(el).attr("data-wpgmza-feature-type");self[featureType+"AdminDataTable"]=new WPGMZA.AdminFeatureDataTable(el)})},WPGMZA.MapEditPage.prototype.initFeaturePanels=function(){var self=this;$(".wpgmza-feature-accordion[data-wpgmza-feature-type]").each(function(index,el){var featurePanelElement=$(el).find(".wpgmza-feature-panel-container > *"),el=$(el).attr("data-wpgmza-feature-type"),panelClassName=WPGMZA.capitalizeWords(el)+"Panel",panelClassName=WPGMZA[panelClassName].createInstance(featurePanelElement,self);self[el+"Panel"]=panelClassName})},WPGMZA.MapEditPage.prototype.initJQueryUIControls=function(){var mapContainer,self=this;$("#wpgmaps_tabs").tabs(),mapContainer=$("#wpgmza-map-container").detach(),$("#wpgmaps_tabs_markers").tabs(),$(".map_wrapper").prepend(mapContainer),$("#slider-range-max").slider({range:"max",min:1,max:21,value:$("input[name='map_start_zoom']").val(),slide:function(event,ui){$("input[name='map_start_zoom']").val(ui.value),self.map.setZoom(ui.value)}})},WPGMZA.MapEditPage.prototype.onShiftClick=function(event){var checkbox=event.currentTarget,checkbox=jQuery(checkbox).closest("tr");if(this.lastSelectedRow&&event.shiftKey){var event=this.lastSelectedRow.index(),currIndex=checkbox.index(),startIndex=Math.min(event,currIndex),endIndex=Math.max(event,currIndex),rows=jQuery("[data-wpgmza-admin-marker-datatable] tbody>tr");jQuery("[data-wpgmza-admin-marker-datatable] input[name='mark']").prop("checked",!1);for(var i=startIndex;i<=endIndex;i++)jQuery(rows[i]).find("input[name='mark']").prop("checked",!0)}this.lastSelectedRow=checkbox},WPGMZA.MapEditPage.prototype.onMapTypeChanged=function(event){if("open-layers"!=WPGMZA.settings.engine){var mapTypeId;switch(event.target.value){case"2":mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"3":mapTypeId=google.maps.MapTypeId.HYBRID;break;case"4":mapTypeId=google.maps.MapTypeId.TERRAIN;break;default:mapTypeId=google.maps.MapTypeId.ROADMAP}this.map.setOptions({mapTypeId:mapTypeId})}},WPGMZA.MapEditPage.prototype.onMarkerUpdated=function(event){this.markerDataTable.reload()},WPGMZA.MapEditPage.prototype.onZoomChanged=function(event){$(".map_start_zoom").val(this.map.getZoom())},WPGMZA.MapEditPage.prototype.onBoundsChanged=function(event){var location=this.map.getCenter();$("#wpgmza_start_location").val(location.lat+","+location.lng),$("input[name='map_start_lat']").val(location.lat),$("input[name='map_start_lng']").val(location.lng),$("#wpgmza_start_zoom").val(this.map.getZoom()),$("#wpgmaps_save_reminder").show()},WPGMZA.MapEditPage.prototype.onMapHeightTypeChange=function(event){"%"==event.target.value&&$("#wpgmza_height_warning").show()},WPGMZA.MapEditPage.prototype.onRightClick=function(event){var marker,self=this;!WPGMZA.InternalEngine.isLegacy()&&this.sidebarGroupings&&(this.sidebarGroupings.isOpen("global")||this.sidebarGroupings.isOpen("map-markers"))&&this.sidebarGroupings.openTabByFeatureType("marker"),this.drawingManager&&this.drawingManager.mode!=WPGMZA.DrawingManager.MODE_MARKER||(this.rightClickMarker||(this.rightClickMarker=WPGMZA.Marker.createInstance({draggable:!0}),this.rightClickMarker.on("dragend",function(event){$(".wpgmza-marker-panel [data-ajax-name='address']").val(event.latLng.lat+", "+event.latLng.lng)}),this.map.on("click",function(event){self.rightClickMarker.setMap(null),$(".wpgmza-marker-panel [data-ajax-name='address']").val("")})),(marker=this.rightClickMarker).setPosition(event.latLng),marker.setMap(this.map),$(".wpgmza-marker-panel [data-ajax-name='address']").val(event.latLng.lat+", "+event.latLng.lng))},WPGMZA.MapEditPage.prototype.onDeletePolygon=function(event){var cur_id=parseInt($(this).attr("id")),data={action:"delete_poly",security:wpgmza_legacy_map_edit_page_vars.ajax_nonce,map_id:this.map.id,poly_id:cur_id};$.post(ajaxurl,data,function(response){WPGM_Path[cur_id].setMap(null),delete WPGM_PathData[cur_id],delete WPGM_Path[cur_id],$("#wpgmza_poly_holder").html(response)})},WPGMZA.MapEditPage.prototype.onDeletePolyline=function(event){var cur_id=$(this).attr("id"),data={action:"delete_polyline",security:wpgmza_legacy_map_edit_page_vars.ajax_nonce,map_id:this.map.id,poly_id:cur_id};$.post(ajaxurl,data,function(response){WPGM_PathLine[cur_id].setMap(null),delete WPGM_PathLineData[cur_id],delete WPGM_PathLine[cur_id],$("#wpgmza_polyline_holder").html(response)})},WPGMZA.MapEditPage.prototype.onDeleteHeatmap=function(event){var cur_id=$(this).attr("id"),data={action:"delete_dataset",security:wpgmza_legacy_map_edit_page_vars.ajax_nonce,map_id:this.map.id,poly_id:cur_id};$.post(ajaxurl,data,function(response){heatmap[cur_id].setMap(null),delete heatmap[cur_id],$("#wpgmza_heatmap_holder").html(response)})},WPGMZA.MapEditPage.prototype.onDeleteCircle=function(event){var circle_id=$(this).attr("id"),data={action:"delete_circle",security:wpgmza_legacy_map_edit_page_vars.ajax_nonce,map_id:this.map.id,circle_id:circle_id};$.post(ajaxurl,data,function(response){$("#tabs-m-5 table").replaceWith(response),circle_array.forEach(function(circle){if(circle.id==circle_id)return circle.setMap(null),!1})})},WPGMZA.MapEditPage.prototype.onDeleteRectangle=function(event){var rectangle_id=$(this).attr("id"),data={action:"delete_rectangle",security:wpgmza_legacy_map_edit_page_vars.ajax_nonce,map_id:this.map.id,rectangle_id:rectangle_id};$.post(ajaxurl,data,function(response){$("#tabs-m-6 table").replaceWith(response),rectangle_array.forEach(function(rectangle){if(rectangle.id==rectangle_id)return rectangle.setMap(null),!1})})},WPGMZA.MapEditPage.prototype.shouldAddressFieldUseEnhancedAutocomplete=function(element){return!(!element||!element.id||"wpgmza_add_address_map_editor"!==element.id)},WPGMZA.MapEditPage.prototype.onKeyUpEnhancedAutocomplete=function(event,element){if(!element._wpgmzaAddressInput||!element._wpgmzaAddressInput.googleAutocompleteLoaded){element._wpgmzaEnhancedAutocomplete||(element._wpgmzaEnhancedAutocomplete={identifiedTypingSpeed:!1,typingTimeout:!1,startTyping:!1,keyStrokeCount:1,avgTimeBetweenStrokes:300,totalTimeForKeyStrokes:0,ajaxRequest:!1,ajaxTimeout:!1,requestErrorCount:0,disabledFlag:!1,disabledCheckCount:0});let enhancedAutocomplete=element._wpgmzaEnhancedAutocomplete;if(-1!==["Escape","Alt","Control","Option","Shift","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].indexOf(event.key))$("#wpgmza_autocomplete_search_results").hide();else if(enhancedAutocomplete.disabledFlag)enhancedAutocomplete.disabledCheckCount++,5<=enhancedAutocomplete.disabledCheckCount&&this.swapEnhancedAutocomplete(element);else{let googleApiKey=!1;if(WPGMZA.settings&&(WPGMZA.settings.googleMapsApiKey||WPGMZA.settings.wpgmza_google_maps_api_key)&&(googleApiKey=WPGMZA.settings.googleMapsApiKey||WPGMZA.settings.wpgmza_google_maps_api_key),enhancedAutocomplete.identifiedTypingSpeed)if(enhancedAutocomplete.ajaxTimeout&&clearTimeout(enhancedAutocomplete.ajaxTimeout),$("#wpgmza_autocomplete_search_results").html('<div class="wpgmza-pad-5">Searching...</div>'),$("#wpgmza_autocomplete_search_results").show(),enhancedAutocomplete.currentSearch=$(element).val(),enhancedAutocomplete.currentSearch&&0<enhancedAutocomplete.currentSearch.trim().length){if(!1!==enhancedAutocomplete.ajaxRequest&&enhancedAutocomplete.ajaxRequest.abort(),enhancedAutocomplete.requestParams={domain:window.location.hostname},"localhost"===enhancedAutocomplete.requestParams.domain)try{var path,paths=window.location.pathname.match(/\/(.*?)\//);paths&&2<=paths.length&&paths[1]&&(path=paths[1],enhancedAutocomplete.requestParams.domain+="-"+path)}catch(ex){}enhancedAutocomplete.requestParams.url="https://wpgmaps.us-3.evennode.com/api/v1/autocomplete",enhancedAutocomplete.requestParams.query={s:enhancedAutocomplete.currentSearch,d:enhancedAutocomplete.requestParams.domain,hash:WPGMZA.siteHash},googleApiKey&&(enhancedAutocomplete.requestParams.query.k=googleApiKey),WPGMZA.settings&&(WPGMZA.settings.engine&&(enhancedAutocomplete.requestParams.query.engine=WPGMZA.settings.engine),WPGMZA.settings.internal_engine)&&(enhancedAutocomplete.requestParams.query.build=WPGMZA.settings.internal_engine),enhancedAutocomplete.requestParams.query=new URLSearchParams(enhancedAutocomplete.requestParams.query),enhancedAutocomplete.requestParams.url+="?"+enhancedAutocomplete.requestParams.query.toString(),enhancedAutocomplete.ajaxTimeout=setTimeout(()=>{enhancedAutocomplete.ajaxRequest=$.ajax({url:enhancedAutocomplete.requestParams.url,type:"GET",dataType:"json",success:results=>{try{if(results instanceof Object)if(results.error)"error1"==results.error?($("#wpgmza_autoc_disabled").html(WPGMZA.localized_strings.cloud_api_key_error_1),$("#wpgmza_autoc_disabled").fadeIn("slow"),$("#wpgmza_autocomplete_search_results").hide(),enhancedAutocomplete.disabledFlag=!0):(console.error(results.error),this.swapEnhancedAutocomplete(element));else{$("#wpgmza_autocomplete_search_results").html("");let html="";for(var i in results)html+="<div class='wpgmza_ac_result "+(""===html?"":"border-top")+"' data-id='"+i+"' data-lat='"+results[i].lat+"' data-lng='"+results[i].lng+"'><div class='wpgmza_ac_container'><div class='wpgmza_ac_icon'><img src='"+results[i].icon+"' /></div><div class='wpgmza_ac_item'><span id='wpgmza_item_name_"+i+"' class='wpgmza_item_name'>"+results[i].place_name+"</span><span id='wpgmza_item_address_"+i+"' class='wpgmza_item_address'>"+results[i].formatted_address+"</span></div></div></div>";(!html||html.length<=0)&&(html="<div class='p-2 text-center'><small>No results found...</small></div>"),$("#wpgmza_autocomplete_search_results").html(html),$("#wpgmza_autocomplete_search_results").show(),enhancedAutocomplete.disabledCheckCount=0,enhancedAutocomplete.requestErrorCount=0}else this.swapEnhancedAutocomplete(element)}catch(ex){console.error("WP Go Maps Plugin: There was an error returning the list of places for your search"),this.swapEnhancedAutocomplete(element)}},error:()=>{$("#wpgmza_autocomplete_search_results").hide(),enhancedAutocomplete.requestErrorCount++,3<=enhancedAutocomplete.requestErrorCount&&this.swapEnhancedAutocomplete(element)}})},2*enhancedAutocomplete.identifiedTypingSpeed)}else $("#wpgmza_autocomplete_search_results").hide();else event=new Date,enhancedAutocomplete.typingTimeout&&clearTimeout(enhancedAutocomplete.typingTimeout),enhancedAutocomplete.typingTimeout=setTimeout(()=>{enhancedAutocomplete.startTyping=!1,enhancedAutocomplete.avgTimeBetweenStrokes=300,enhancedAutocomplete.totalTimeForKeyStrokes=0},1500),enhancedAutocomplete.startTyping?1<enhancedAutocomplete.keyStrokeCount&&(enhancedAutocomplete.currentTimeBetweenStrokes=event.getTime()-enhancedAutocomplete.startTyping,enhancedAutocomplete.totalTimeForKeyStrokes+=enhancedAutocomplete.currentTimeBetweenStrokes,enhancedAutocomplete.avgTimeBetweenStrokes=enhancedAutocomplete.totalTimeForKeyStrokes/(enhancedAutocomplete.keyStrokeCount-1),enhancedAutocomplete.startTyping=event.getTime(),3<=enhancedAutocomplete.keyStrokeCount)&&(enhancedAutocomplete.identifiedTypingSpeed=enhancedAutocomplete.avgTimeBetweenStrokes):enhancedAutocomplete.startTyping=event.getTime(),enhancedAutocomplete.keyStrokeCount++}}},WPGMZA.MapEditPage.prototype.swapEnhancedAutocomplete=function(element){element._wpgmzaAddressInput&&!element._wpgmzaAddressInput.googleAutocompleteLoaded&&element._wpgmzaAddressInput.loadGoogleAutocomplete(),$("#wpgmza_autocomplete_search_results").hide(),$("#wpgmza_autoc_disabled").hide()},$(document).ready(function(event){WPGMZA.mapEditPage=WPGMZA.MapEditPage.createInstance()}))}),jQuery(function($){WPGMZA.PointlabelPanel=function(element,mapEditPage){WPGMZA.FeaturePanel.apply(this,arguments)},WPGMZA.extend(WPGMZA.PointlabelPanel,WPGMZA.FeaturePanel),WPGMZA.PointlabelPanel.createInstance=function(element,mapEditPage){return new WPGMZA.PointlabelPanel(element,mapEditPage)},WPGMZA.PointlabelPanel.prototype.updateFields=function(){$(this.element).find("[data-ajax-name='center']").val(this.feature.getPosition().toString())},WPGMZA.PointlabelPanel.prototype.onDrawingComplete=function(event){WPGMZA.FeaturePanel.prototype.onDrawingComplete.apply(this,arguments),this.updateFields()},WPGMZA.PointlabelPanel.prototype.setTargetFeature=function(feature){WPGMZA.FeaturePanel.prototype.setTargetFeature.apply(this,arguments),feature&&this.updateFields()},WPGMZA.PointlabelPanel.prototype.onFeatureChanged=function(event){WPGMZA.FeaturePanel.prototype.onFeatureChanged.apply(this,arguments),this.updateFields()}}),jQuery(function($){WPGMZA.PolygonPanel=function(element,mapEditPage){WPGMZA.FeaturePanel.apply(this,arguments)},WPGMZA.extend(WPGMZA.PolygonPanel,WPGMZA.FeaturePanel),WPGMZA.PolygonPanel.createInstance=function(element,mapEditPage){return new(WPGMZA.isProVersion()?WPGMZA.ProPolygonPanel:WPGMZA.PolygonPanel)(element,mapEditPage)},Object.defineProperty(WPGMZA.PolygonPanel.prototype,"drawingManagerCompleteEvent",{get:function(){return"polygonclosed"}})}),jQuery(function($){WPGMZA.PolylinePanel=function(element,mapEditPage){WPGMZA.FeaturePanel.apply(this,arguments)},WPGMZA.extend(WPGMZA.PolylinePanel,WPGMZA.FeaturePanel),WPGMZA.PolylinePanel.createInstance=function(element,mapEditPage){return new(WPGMZA.isProVersion()?WPGMZA.ProPolylinePanel:WPGMZA.PolylinePanel)(element,mapEditPage)}}),jQuery(function($){WPGMZA.RectanglePanel=function(element,mapEditPage){WPGMZA.FeaturePanel.apply(this,arguments)},WPGMZA.extend(WPGMZA.RectanglePanel,WPGMZA.FeaturePanel),WPGMZA.RectanglePanel.createInstance=function(element,mapEditPage){return new(WPGMZA.isProVersion()?WPGMZA.ProRectanglePanel:WPGMZA.RectanglePanel)(element,mapEditPage)},WPGMZA.RectanglePanel.prototype.updateFields=function(){var bounds=this.feature.getBounds();bounds.north&&bounds.west&&bounds.south&&bounds.east&&($(this.element).find("[data-ajax-name='cornerA']").val(bounds.north+", "+bounds.west),$(this.element).find("[data-ajax-name='cornerB']").val(bounds.south+", "+bounds.east))},WPGMZA.RectanglePanel.prototype.setTargetFeature=function(feature){WPGMZA.FeaturePanel.prototype.setTargetFeature.apply(this,arguments),feature&&this.updateFields()},WPGMZA.RectanglePanel.prototype.onDrawingComplete=function(event){WPGMZA.FeaturePanel.prototype.onDrawingComplete.apply(this,arguments),this.updateFields()},WPGMZA.RectanglePanel.prototype.onFeatureChanged=function(event){WPGMZA.FeaturePanel.prototype.onFeatureChanged.apply(this,arguments),this.updateFields()}}),jQuery(function($){WPGMZA.OLDrawingManager=function(map){WPGMZA.DrawingManager.call(this,map),this.source=new ol.source.Vector({wrapX:!1}),this.layer=new ol.layer.Vector({source:this.source})},WPGMZA.OLDrawingManager.prototype=Object.create(WPGMZA.DrawingManager.prototype),WPGMZA.OLDrawingManager.prototype.constructor=WPGMZA.OLDrawingManager,WPGMZA.OLDrawingManager.prototype.setOptions=function(options){var params={};options.strokeOpacity&&(params.stroke=new ol.style.Stroke({color:WPGMZA.hexOpacityToRGBA(options.strokeColor,options.strokeOpacity)})),options.fillOpacity&&(params.fill=new ol.style.Fill({color:WPGMZA.hexOpacityToRGBA(options.fillColor,options.fillOpacity)})),this.layer.setStyle(new ol.style.Style(params))},WPGMZA.OLDrawingManager.prototype.setDrawingMode=function(mode){var type,endEventType,self=this;switch(WPGMZA.DrawingManager.prototype.setDrawingMode.call(this,mode),this.interaction&&(this.map.olMap.removeInteraction(this.interaction),this.interaction=null),mode){case WPGMZA.DrawingManager.MODE_NONE:case WPGMZA.DrawingManager.MODE_MARKER:return;case WPGMZA.DrawingManager.MODE_POLYGON:type="Polygon",endEventType="polygonclosed";break;case WPGMZA.DrawingManager.MODE_POLYLINE:type="LineString",endEventType="polylinecomplete";break;case WPGMZA.DrawingManager.MODE_CIRCLE:type="Circle",endEventType="circlecomplete";break;case WPGMZA.DrawingManager.MODE_RECTANGLE:type="Circle",endEventType="rectanglecomplete";break;case WPGMZA.DrawingManager.MODE_HEATMAP:case WPGMZA.DrawingManager.MODE_POINTLABEL:return;case WPGMZA.DrawingManager.MODE_IMAGEOVERLAY:type="Circle",endEventType="imageoverlaycomplete";break;default:throw new Error("Invalid drawing mode")}WPGMZA.mapEditPage&&WPGMZA.mapEditPage.selectInteraction&&WPGMZA.mapEditPage.map.olMap.removeInteraction(WPGMZA.mapEditPage.selectInteraction);var options={source:this.source,type:type};mode!=WPGMZA.DrawingManager.MODE_RECTANGLE&&mode!=WPGMZA.DrawingManager.MODE_IMAGEOVERLAY||(options.geometryFunction=ol.interaction.Draw.createBox()),this.interaction=new ol.interaction.Draw(options),this.interaction.on("drawend",function(event){if(endEventType){var WPGMZAEvent=new WPGMZA.Event(endEventType);switch(mode){case WPGMZA.DrawingManager.MODE_POLYGON:WPGMZAEvent.enginePolygon=event.feature;break;case WPGMZA.DrawingManager.MODE_POLYLINE:WPGMZAEvent.enginePolyline=event.feature;break;case WPGMZA.DrawingManager.MODE_CIRCLE:WPGMZAEvent.engineCircle=event.feature;break;case WPGMZA.DrawingManager.MODE_RECTANGLE:WPGMZAEvent.engineRectangle=event.feature;break;case WPGMZA.DrawingManager.MODE_IMAGEOVERLAY:WPGMZAEvent.engineImageoverlay={engineRectangle:event.feature};break;default:throw new Error("Drawing mode not implemented")}self.dispatchEvent(WPGMZAEvent)}}),this.map.olMap.addInteraction(this.interaction)}}),jQuery(function($){WPGMZA.OLFeature=function(options){WPGMZA.assertInstangeOf(this,"OLFeature"),WPGMZA.Feature.apply(this,arguments)},WPGMZA.extend(WPGMZA.OLFeature,WPGMZA.Feature),WPGMZA.OLFeature.getOLStyle=function(options){var translated={};if(!options)return new ol.style.Style;var name,opacity,weight,map={fillcolor:"fillColor",opacity:"fillOpacity",linecolor:"strokeColor",lineopacity:"strokeOpacity",linethickness:"strokeWeight"};for(name in options=$.extend({},options))name in map&&(options[map[name]]=options[name]);return options.strokeColor&&(weight=opacity=1,"strokeOpacity"in options&&(opacity=options.strokeOpacity),"strokeWeight"in options&&(weight=options.strokeWeight),translated.stroke=new ol.style.Stroke({color:WPGMZA.hexOpacityToString(options.strokeColor,opacity),width:weight})),options.fillColor&&(opacity=1,"fillOpacity"in options&&(opacity=options.fillOpacity),weight=WPGMZA.hexOpacityToString(options.fillColor,opacity),translated.fill=new ol.style.Fill({color:weight})),new ol.style.Style(translated)},WPGMZA.OLFeature.setInteractionsOnFeature=function(feature,enable){enable?feature.modifyInteraction||(feature.snapInteraction=new ol.interaction.Snap({source:feature.layer.getSource()}),feature.map.olMap.addInteraction(feature.snapInteraction),feature.modifyInteraction=new ol.interaction.Modify({source:feature.layer.getSource()}),feature.map.olMap.addInteraction(feature.modifyInteraction),feature.modifyInteraction.on("modifyend",function(event){feature.trigger("change")})):feature.modifyInteraction&&(feature.map&&(feature.map.olMap.removeInteraction(feature.snapInteraction),feature.map.olMap.removeInteraction(feature.modifyInteraction)),delete feature.snapInteraction,delete feature.modifyInteraction)}}),jQuery(function($){WPGMZA.OLGeocoder=function(){},WPGMZA.OLGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.OLGeocoder.prototype.constructor=WPGMZA.OLGeocoder,WPGMZA.OLGeocoder.prototype.getResponseFromCache=function(query,callback){WPGMZA.restAPI.call("/geocode-cache",{data:{query:JSON.stringify(query)},success:function(response,xhr,status){response.lng=response.lon,callback(response)},useCompressedPathVariable:!0})},WPGMZA.OLGeocoder.prototype.getResponseFromNominatim=function(options,callback){var data={q:options.address,format:"json"};options.componentRestrictions&&options.componentRestrictions.country?data.countrycodes=options.componentRestrictions.country:options.country&&(data.countrycodes=options.country),$.ajax("https://nominatim.openstreetmap.org/search",{data:data,success:function(response,xhr,status){callback(response)},error:function(response,xhr,status){callback(null,WPGMZA.Geocoder.FAIL)}})},WPGMZA.OLGeocoder.prototype.cacheResponse=function(query,response){$.ajax(WPGMZA.ajaxurl,{data:{action:"wpgmza_store_nominatim_cache",query:JSON.stringify(query),response:JSON.stringify(response)},method:"POST"})},WPGMZA.OLGeocoder.prototype.clearCache=function(callback){$.ajax(WPGMZA.ajaxurl,{data:{action:"wpgmza_clear_nominatim_cache"},method:"POST",success:function(response){callback(response)}})},WPGMZA.OLGeocoder.prototype.getLatLngFromAddress=function(options,callback){return WPGMZA.OLGeocoder.prototype.geocode(options,callback)},WPGMZA.OLGeocoder.prototype.getAddressFromLatLng=function(options,callback){return WPGMZA.OLGeocoder.prototype.geocode(options,callback)},WPGMZA.OLGeocoder.prototype.geocode=function(options,callback){var latLng,finish,location,self=this;if(!options)throw new Error("Invalid options");if(WPGMZA.LatLng.REGEXP.test(options.address))latLng=WPGMZA.LatLng.fromString(options.address),callback([{geometry:{location:latLng},latLng:latLng,lat:latLng.lat,lng:latLng.lng}],WPGMZA.Geocoder.SUCCESS);else{if(options.location&&(options.latLng=new WPGMZA.LatLng(options.location)),options.address)location=options.address,finish=function(response,status){for(var i=0;i<response.length;i++)response[i].geometry={location:new WPGMZA.LatLng({lat:parseFloat(response[i].lat),lng:parseFloat(response[i].lon)})},response[i].latLng={lat:parseFloat(response[i].lat),lng:parseFloat(response[i].lon)},response[i].bounds=new WPGMZA.LatLngBounds(new WPGMZA.LatLng({lat:response[i].boundingbox[1],lng:response[i].boundingbox[2]}),new WPGMZA.LatLng({lat:response[i].boundingbox[0],lng:response[i].boundingbox[3]})),response[i].lng=response[i].lon;callback(response,status)};else{if(!options.latLng)throw new Error("You must supply either a latLng or address");location=options.latLng.toString(),finish=function(response,status){var address=response[0].display_name;options.fullResult&&(address=response[0]),callback([address],status)}}var query={location:location,options:options};this.getResponseFromCache(query,function(response){response.length?finish(response,WPGMZA.Geocoder.SUCCESS):self.getResponseFromNominatim($.extend(options,{address:location}),function(response,status){status==WPGMZA.Geocoder.FAIL?callback(null,WPGMZA.Geocoder.FAIL):0==response.length?callback([],WPGMZA.Geocoder.ZERO_RESULTS):(finish(response,WPGMZA.Geocoder.SUCCESS),self.cacheResponse(query,response))})})}}}),jQuery(function($){WPGMZA.OLModernStoreLocatorCircle=function(map,settings){WPGMZA.ModernStoreLocatorCircle.call(this,map,settings)},WPGMZA.OLModernStoreLocatorCircle.prototype=Object.create(WPGMZA.ModernStoreLocatorCircle.prototype),WPGMZA.OLModernStoreLocatorCircle.prototype.constructor=WPGMZA.OLModernStoreLocatorCircle,WPGMZA.OLModernStoreLocatorCircle.prototype.initCanvasLayer=function(){var self=this,olViewportElement=$(this.map.element).children(".ol-viewport");this.canvas=document.createElement("canvas"),this.canvas.className="wpgmza-ol-canvas-overlay",olViewportElement.find(".ol-layers .ol-layer:first-child").prepend(this.canvas),this.renderFunction=function(event){self.canvas.width==olViewportElement.width()&&self.canvas.height==olViewportElement.height()||(self.canvas.width=olViewportElement.width(),self.canvas.height=olViewportElement.height(),$(this.canvas).css({width:olViewportElement.width()+"px",height:olViewportElement.height()+"px"})),self.draw()},this.map.olMap.on("postrender",this.renderFunction)},WPGMZA.OLModernStoreLocatorCircle.prototype.getContext=function(type){return this.canvas.getContext(type)},WPGMZA.OLModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){return{width:this.canvas.width,height:this.canvas.height}},WPGMZA.OLModernStoreLocatorCircle.prototype.getCenterPixels=function(){return this.map.latLngToPixels(this.settings.center)},WPGMZA.OLModernStoreLocatorCircle.prototype.getWorldOriginOffset=function(){return{x:0,y:0}},WPGMZA.OLModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){var center=new WPGMZA.LatLng(this.settings.center),outer=new WPGMZA.LatLng(center),km=(outer.moveByDistance(km,90),this.map.latLngToPixels(center)),center=this.map.latLngToPixels(outer);return Math.abs(center.x-km.x)},WPGMZA.OLModernStoreLocatorCircle.prototype.getScale=function(){return 1},WPGMZA.OLModernStoreLocatorCircle.prototype.destroy=function(){$(this.canvas).remove(),this.map.olMap.un("postrender",this.renderFunction),this.map=null,this.canvas=null}}),jQuery(function($){var Parent;WPGMZA.OLPolyline=function(options,olFeature){if(WPGMZA.Polyline.call(this,options),olFeature)this.olFeature=olFeature;else{var coordinates=[];if(options&&options.polydata)for(var path=this.parseGeometry(options.polydata),i=0;i<path.length;i++){if(!WPGMZA.isNumeric(path[i].lat))throw new Error("Invalid latitude");if(!WPGMZA.isNumeric(path[i].lng))throw new Error("Invalid longitude");coordinates.push(ol.proj.fromLonLat([parseFloat(path[i].lng),parseFloat(path[i].lat)]))}this.olFeature=new ol.Feature({geometry:new ol.geom.LineString(coordinates)})}this.layer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.olFeature]})}),this.layer.getSource().getFeatures()[0].setProperties({wpgmzaPolyline:this,wpgmzaFeature:this}),options&&this.setOptions(options)},Parent=WPGMZA.Polyline,WPGMZA.OLPolyline.prototype=Object.create(Parent.prototype),WPGMZA.OLPolyline.prototype.constructor=WPGMZA.OLPolyline,WPGMZA.OLPolyline.prototype.getGeometry=function(){for(var result=[],coordinates=this.olFeature.getGeometry().getCoordinates(),i=0;i<coordinates.length;i++){var lonLat=ol.proj.toLonLat(coordinates[i]),lonLat={lat:lonLat[1],lng:lonLat[0]};result.push(lonLat)}return result},WPGMZA.OLPolyline.prototype.setOptions=function(options){Parent.prototype.setOptions.apply(this,arguments),"editable"in options&&WPGMZA.OLFeature.setInteractionsOnFeature(this,options.editable)}}),jQuery(function($){WPGMZA.OLText=function(options){WPGMZA.Text.apply(this,arguments),this.overlay=new WPGMZA.OLTextOverlay(options)},WPGMZA.extend(WPGMZA.OLText,WPGMZA.Text),WPGMZA.OLText.prototype.refresh=function(){this.overlay&&this.overlay.refresh()}}),jQuery(function($){WPGMZA.OLTextOverlay=function(options){var coords;options.position&&options.map&&(coords=ol.proj.fromLonLat([options.position.lng,options.position.lat]),this.olFeature=new ol.Feature({geometry:new ol.geom.Point(coords)}),this.styleOptions=options||{},this.layer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.olFeature]}),style:this.getStyle()}),this.layer.setZIndex(10),options.map.olMap.addLayer(this.layer))},WPGMZA.OLTextOverlay.prototype.getStyle=function(){var i,defaults={fontSize:11,fillColor:"#000000",strokeColor:"#ffffff"};for(i in defaults)void 0===this.styleOptions[i]&&(this.styleOptions[i]=defaults[i]);var labelStyles=new ol.style.Style({text:new ol.style.Text({font:"bold "+this.styleOptions.fontSize+'px "Open Sans", "Arial Unicode MS", "sans-serif"',placement:"point",fill:new ol.style.Fill({color:this.styleOptions.fillColor}),stroke:new ol.style.Stroke({color:this.styleOptions.strokeColor,width:1})})});return labelStyles.getText().setText(this.styleOptions.text||""),labelStyles},WPGMZA.OLTextOverlay.prototype.refresh=function(){this.layer&&this.layer.setStyle(this.getStyle())},WPGMZA.OLTextOverlay.prototype.setPosition=function(position){this.olFeature&&(position=ol.proj.fromLonLat([parseFloat(position.lng),parseFloat(position.lat)]),this.olFeature.setGeometry(new ol.geom.Point(position)))},WPGMZA.OLTextOverlay.prototype.setText=function(text){this.styleOptions.text=text},WPGMZA.OLTextOverlay.prototype.setFontSize=function(size){size=parseInt(size),this.styleOptions.fontSize=size},WPGMZA.OLTextOverlay.prototype.setFillColor=function(color){color.match(/^#/)||(color="#"+color),this.styleOptions.fillColor=color},WPGMZA.OLTextOverlay.prototype.setLineColor=function(color){color.match(/^#/)||(color="#"+color),this.styleOptions.strokeColor=color},WPGMZA.OLTextOverlay.prototype.setOpacity=function(opacity){1<(opacity=parseFloat(opacity))?opacity=1:opacity<0&&(opacity=0),this.layer&&this.layer.setOpacity(opacity)},WPGMZA.OLTextOverlay.prototype.remove=function(){this.styleOptions.map&&this.styleOptions.map.olMap.removeLayer(this.layer)}}),jQuery(function($){WPGMZA.OLThemeEditor=function(){var self=this;WPGMZA.EventDispatcher.call(this),this.element=$("#wpgmza-ol-theme-editor"),this.element.length?(this.mapElement=WPGMZA.maps[0].element,$(this.element).find('input[name="wpgmza_ol_tile_filter"]').on("change",function(event){self.onFilterChange(event.currentTarget)})):console.warn("No element to initialise theme editor on")},WPGMZA.extend(WPGMZA.OLThemeEditor,WPGMZA.EventDispatcher),WPGMZA.OLThemeEditor.prototype.onFilterChange=function(context){context instanceof HTMLInputElement&&(context=$(context).val(),this.mapElement)&&$(this.mapElement).css("--wpgmza-ol-tile-filter",context)}}),jQuery(function($){WPGMZA.OLThemePanel=function(){var self=this;this.element=$("#wpgmza-ol-theme-panel"),this.map=WPGMZA.maps[0],this.element.length?(this.element.on("click","#wpgmza-theme-presets label, .theme-selection-panel label",function(event){self.onThemePresetClick(event)}),WPGMZA.OLThemePanel=this):console.warn("No element to initialise theme panel on")},WPGMZA.OLThemePanel.prototype.onThemePresetClick=function(event){var input;event.currentTarget&&(event=$(event.currentTarget).data("filter"))&&$('input[name="wpgmza_ol_tile_filter"]').length&&(input=$('input[name="wpgmza_ol_tile_filter"]').get(0)).wpgmzaCSSFilterInput&&input.wpgmzaCSSFilterInput.parseFilters(event)}}),jQuery(function($){WPGMZA.DataTable=function(element){var version,settings,self=this;$.fn.dataTable?($.fn.dataTable.ext?$.fn.dataTable.ext.errMode="throw":(version=$.fn.dataTable.version||"unknown",console.warn("You appear to be running an outdated or modified version of the dataTables library. This may cause issues with table functionality. This is usually caused by 3rd party software loading an older version of DataTables. The loaded version is "+version+", we recommend version 1.10.12 or above.")),$.fn.dataTable.Api&&$.fn.dataTable.Api.register("processing()",function(show){return this.iterator("table",function(ctx){ctx.oApi._fnProcessingDisplay(ctx,show)})}),this.element=element,(this.element.wpgmzaDataTable=this).dataTableElement=this.getDataTableElement(),settings=this.getDataTableSettings(),this.phpClass=$(element).attr("data-wpgmza-php-class"),(this.wpgmzaDataTable=this).useCompressedPathVariable=WPGMZA.restAPI.isCompressedPathVariableSupported&&WPGMZA.settings.enable_compressed_path_variables,this.method=this.useCompressedPathVariable?"GET":"POST",null==this.getLanguageURL()||"//cdn.datatables.net/plug-ins/1.10.12/i18n/English.json"==this.getLanguageURL()?(this.dataTable=$(this.dataTableElement).DataTable(settings),this.dataTable.ajax.reload()):$.ajax(this.getLanguageURL(),{success:function(response,status,xhr){self.languageJSON=response,self.dataTable=$(self.dataTableElement).DataTable(settings),self.dataTable.ajax.reload()}})):(console.warn("The dataTables library is not loaded. Cannot create a dataTable. Did you enable 'Do not enqueue dataTables'?"),WPGMZA.settings.wpgmza_do_not_enqueue_datatables&&WPGMZA.getCurrentPage()==WPGMZA.PAGE_MAP_EDIT&&alert("You have selected 'Do not enqueue DataTables' in WP Go Maps' settings. No 3rd party software is loading the DataTables library. Because of this, the marker table cannot load. Please uncheck this option to use the marker table."))},WPGMZA.DataTable.prototype.getDataTableElement=function(){return $(this.element).find("table")},WPGMZA.DataTable.prototype.onAJAXRequest=function(data,settings){var params={phpClass:this.phpClass},attr=$(this.element).attr("data-wpgmza-ajax-parameters");return attr&&$.extend(params,JSON.parse(attr)),$.extend(data,params)},WPGMZA.DataTable.prototype.onDataTableAjaxRequest=function(data,callback,settings){var self=this,element=this.element,element=$(element).attr("data-wpgmza-rest-api-route"),data=this.onAJAXRequest(data,settings),draw=data.draw;if(delete data.draw,element)return settings={method:"POST",useCompressedPathVariable:!0,data:data,dataType:"json",cache:!this.preventCaching,beforeSend:function(xhr){xhr.setRequestHeader("X-DataTables-Draw",draw)},success:function(response,status,xhr){response.draw=draw,self.lastResponse=response,callback(response),$("[data-marker-icon-src]").each(function(index,element){WPGMZA.MarkerIcon.createInstance($(element).attr("data-marker-icon-src")).applyToElement(element)})}},WPGMZA.restAPI.call(element,settings);throw new Error("No data-wpgmza-rest-api-route attribute specified")},WPGMZA.DataTable.prototype.getDataTableSettings=function(){var self=this,element=this.element,options={},element=((options=$(element).attr("data-wpgmza-datatable-options")?JSON.parse($(element).attr("data-wpgmza-datatable-options")):options).deferLoading=!0,options.processing=!0,options.serverSide=!0,options.ajax=function(data,callback,settings){return WPGMZA.DataTable.prototype.onDataTableAjaxRequest.apply(self,arguments)},WPGMZA.AdvancedTableDataTable&&this instanceof WPGMZA.AdvancedTableDataTable&&WPGMZA.settings.wpgmza_default_items&&(options.iDisplayLength=parseInt(WPGMZA.settings.wpgmza_default_items)),WPGMZA.settings&&WPGMZA.settings.enable_datatables_enter_search&&(options.search={return:!0}),options.aLengthMenu=[[5,10,25,50,100,-1],["5","10","25","50","100",WPGMZA.localized_strings.all]],this.getLanguageURL());return element&&(options.language={url:element}),options},WPGMZA.DataTable.prototype.getLanguageURL=function(){if(!WPGMZA.locale)return null;var languageURL;switch(WPGMZA.locale.substr(0,2)){case"af":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Afrikaans.json";break;case"sq":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Albanian.json";break;case"am":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Amharic.json";break;case"ar":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Arabic.json";break;case"hy":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Armenian.json";break;case"az":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Azerbaijan.json";break;case"bn":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Bangla.json";break;case"eu":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Basque.json";break;case"be":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Belarusian.json";break;case"bg":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Bulgarian.json";break;case"ca":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Catalan.json";break;case"zh":languageURL="zh_TW"==WPGMZA.locale?WPGMZA.pluginDirURL+"languages/datatables/Chinese-traditional.json":"//cdn.datatables.net/plug-ins/1.10.12/i18n/Chinese.json";break;case"hr":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Croatian.json";break;case"cs":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Czech.json";break;case"da":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Danish.json";break;case"nl":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Dutch.json";break;case"et":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Estonian.json";break;case"fi":languageURL=WPGMZA.locale.match(/^fil/)?WPGMZA.pluginDirURL+"languages/datatables/Filipino.json":WPGMZA.pluginDirURL+"languages/datatables/Finnish.json";break;case"fr":languageURL=WPGMZA.pluginDirURL+"languages/datatables/French.json";break;case"gl":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Galician.json";break;case"ka":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Georgian.json";break;case"de":languageURL=WPGMZA.pluginDirURL+"languages/datatables/German.json";break;case"el":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Greek.json";break;case"gu":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Gujarati.json";break;case"he":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Hebrew.json";break;case"hi":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Hindi.json";break;case"hu":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Hungarian.json";break;case"is":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Icelandic.json";break;case"id":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Indonesian.json";break;case"ga":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Irish.json";break;case"it":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Italian.json";break;case"ja":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Japanese.json";break;case"kk":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Kazakh.json";break;case"ko":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Korean.json";break;case"ky":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Kyrgyz.json";break;case"lv":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Latvian.json";break;case"lt":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Lithuanian.json";break;case"mk":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Macedonian.json";break;case"ml":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Malay.json";break;case"mn":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Mongolian.json";break;case"ne":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Nepali.json";break;case"nb":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Norwegian-Bokmal.json";break;case"nn":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Norwegian-Nynorsk.json";break;case"ps":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Pashto.json";break;case"fa":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Persian.json";break;case"pl":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Polish.json";break;case"pt":languageURL="pt_BR"==WPGMZA.locale?WPGMZA.pluginDirURL+"languages/datatables/Portuguese-Brasil.json":"//cdn.datatables.net/plug-ins/1.10.12/i18n/Portuguese.json";break;case"ro":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Romanian.json";break;case"ru":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Russian.json";break;case"sr":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Serbian.json";break;case"si":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Sinhala.json";break;case"sk":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Slovak.json";break;case"sl":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Slovenian.json";break;case"es":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Spanish.json";break;case"sw":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Swahili.json";break;case"sv":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Swedish.json";break;case"ta":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Tamil.json";break;case"te":languageURL=WPGMZA.pluginDirURL+"languages/datatables/telugu.json";break;case"th":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Thai.json";break;case"tr":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Turkish.json";break;case"uk":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Ukrainian.json";break;case"ur":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Urdu.json";break;case"uz":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Uzbek.json";break;case"vi":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Vietnamese.json";break;case"cy":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Welsh.json"}return languageURL},WPGMZA.DataTable.prototype.onAJAXResponse=function(response){},WPGMZA.DataTable.prototype.reload=function(){this.dataTable&&this.dataTable.ajax.reload(null,!1)}}),jQuery(function($){WPGMZA.AdminFeatureDataTable=function(element){var self=this;this.allSelected=!1,WPGMZA.DataTable.call(this,element),this.initModals(),$(element).on("click",".wpgmza.bulk_delete",function(event){self.onBulkDelete(event)}),$(element).on("click",".wpgmza.select_all_markers",function(event){self.onSelectAll(event)}),$(element).on("click",".wpgmza.bulk_edit",function(event){self.onBulkEdit(event)}),$(element).on("click","[data-center-marker-id]",function(event){self.onCenterMarker(event)}),$(element).on("click","[data-duplicate-feature-id]",function(event){self.onDuplicate(event)}),$(element).on("click","[data-move-map-feature-id]",function(event){self.onMoveMap(event)})},WPGMZA.extend(WPGMZA.AdminFeatureDataTable,WPGMZA.DataTable),Object.defineProperty(WPGMZA.AdminFeatureDataTable.prototype,"featureType",{get:function(){return $(this.element).attr("data-wpgmza-feature-type")}}),Object.defineProperty(WPGMZA.AdminFeatureDataTable.prototype,"featurePanel",{get:function(){return WPGMZA.mapEditPage[this.featureType+"Panel"]}}),WPGMZA.AdminFeatureDataTable.prototype.initModals=function(){this.moveModal=!1,this.bulkEditorModal=!1,"marker"===this.featureType&&($(".wpgmza-map-select-modal").length&&(this.moveModal=WPGMZA.GenericModal.createInstance($(".wpgmza-map-select-modal"))),$(".wpgmza-bulk-marker-editor-modal").length)&&(this.bulkEditorModal=WPGMZA.GenericModal.createInstance($(".wpgmza-bulk-marker-editor-modal")))},WPGMZA.AdminFeatureDataTable.prototype.getDataTableSettings=function(){var self=this,options=WPGMZA.DataTable.prototype.getDataTableSettings.call(this);return options.createdRow=function(row,data,index){index=self.lastResponse.meta[index];row.wpgmzaFeatureData=index;try{$(row).find(".wpgmza-toolbar .wpgmza_approve_btn").length&&($(row).addClass("wpgmza-row-needs-approval"),$(row).attr("title","Pending Approval"))}catch(ex){}},options},WPGMZA.AdminFeatureDataTable.prototype.onBulkDelete=function(event){var self=this,ids=[],map=WPGMZA.maps[0],plural=this.featureType+"s";$(this.element).find("input[name='mark']:checked").each(function(index,el){el=$(el).closest("tr")[0];ids.push(el.wpgmzaFeatureData.id)}),confirm(WPGMZA.localized_strings.general_delete_prompt_text)&&(ids.forEach(function(marker_id){marker_id=map.getMarkerByID(marker_id);marker_id&&map.removeMarker(marker_id)}),WPGMZA.restAPI.call("/"+plural+"/",{method:"DELETE",data:{ids:ids},complete:function(){self.reload()}}))},WPGMZA.AdminFeatureDataTable.prototype.onSelectAll=function(event){this.allSelected=!this.allSelected;var self=this;$(this.element).find("input[name='mark']").each(function(){self.allSelected?$(this).prop("checked",!0):$(this).prop("checked",!1)})},WPGMZA.AdminFeatureDataTable.prototype.onBulkEdit=function(event){const self=this,ids=[];WPGMZA.maps[0];const plural=this.featureType+"s";$(this.element).find("input[name='mark']:checked").each(function(index,el){el=$(el).closest("tr")[0];ids.push(el.wpgmzaFeatureData.id)}),this.bulkEditorModal&&ids.length&&this.bulkEditorModal.show(function(data){data.ids=ids,data.action="bulk_edit",WPGMZA.restAPI.call("/"+plural+"/",{method:"POST",data:data,success:function(response,status,xhr){self.reload()}})})},WPGMZA.AdminFeatureDataTable.prototype.onCenterMarker=function(event){var event=null==event.currentTarget?event:$(event.currentTarget).attr("data-center-marker-id"),event=WPGMZA.mapEditPage.map.getMarkerByID(event);event&&(event=new WPGMZA.LatLng({lat:event.lat,lng:event.lng}),WPGMZA.mapEditPage.map.setCenter(event),WPGMZA.InternalEngine.isLegacy())&&WPGMZA.animateScroll("#wpgmaps_tabs_markers")},WPGMZA.AdminFeatureDataTable.prototype.onDuplicate=function(event){const self=this;let id=!1;id=null==event.currentTarget?event:$(event.currentTarget).attr("data-duplicate-feature-id");event=this.featureType+"s";WPGMZA.restAPI.call("/"+event+"/",{method:"POST",data:{id:id,action:"duplicate"},success:function(response,status,xhr){self.reload()}})},WPGMZA.AdminFeatureDataTable.prototype.onMoveMap=function(event){const self=this;let id=!1,plural=(id=null==event.currentTarget?event:$(event.currentTarget).attr("data-move-map-feature-id"),this.featureType+"s");this.moveModal&&this.moveModal.show(function(data){data=!!data.map_id&&parseInt(data.map_id);data&&WPGMZA.restAPI.call("/"+plural+"/",{method:"POST",data:{id:id,map_id:data,action:"move_map"},success:function(response,status,xhr){self.reload()}})})}}),jQuery(function($){WPGMZA.AdminMapDataTable=function(element){var self=this;this.allSelected=!1,WPGMZA.DataTable.call(this,element),$(element).on("mousedown","button[data-action='edit']",function(event){switch(event.which){case 1:var map_id=$(event.target).attr("data-map-id");window.location.href=window.location.href+"&action=edit&map_id="+map_id;break;case 2:map_id=$(event.target).attr("data-map-id");window.open(window.location.href+"&action=edit&map_id="+map_id)}}),$(element).find(".wpgmza.select_all_maps").on("click",function(event){self.onSelectAll(event)}),$(element).find(".wpgmza.bulk_delete_maps").on("click",function(event){self.onBulkDelete(event)}),$(element).on("click","button[data-action='duplicate']",function(event){event=$(event.target).attr("data-map-id");self.dataTable.processing(!0),WPGMZA.restAPI.call("/maps/",{method:"POST",data:{id:event,action:"duplicate"},success:function(response,status,xhr){self.reload()}})}),$(element).on("click","button[data-action='trash']",function(event){var result=confirm(WPGMZA.localized_strings.map_delete_prompt_text);self.dataTable.processing(!0),result&&(result=$(event.target).attr("data-map-id"),WPGMZA.restAPI.call("/maps/",{method:"DELETE",data:{id:result},success:function(response,status,xhr){self.reload()}}))})},WPGMZA.extend(WPGMZA.AdminMapDataTable,WPGMZA.DataTable),WPGMZA.AdminMapDataTable.prototype.getDataTableSettings=function(){var self=this,options=WPGMZA.DataTable.prototype.getDataTableSettings.call(this);return options.createdRow=function(row,data,index){index=self.lastResponse.meta[index];row.wpgmzaMapData=index},options},WPGMZA.AdminMapDataTable.prototype.onSelectAll=function(event){this.allSelected=!this.allSelected;var self=this;$(this.element).find("input[name='mark']").each(function(){self.allSelected?$(this).prop("checked",!0):$(this).prop("checked",!1)})},WPGMZA.AdminMapDataTable.prototype.onBulkDelete=function(event){var self=this,ids=[];$(this.element).find("input[name='mark']:checked").each(function(index,el){el=$(el).closest("tr")[0];ids.push(el.wpgmzaMapData.id)}),confirm(WPGMZA.localized_strings.map_bulk_delete_prompt_text)&&WPGMZA.restAPI.call("/maps/",{method:"DELETE",data:{ids:ids},complete:function(){self.reload()}})},$(document).ready(function(event){$("[data-wpgmza-admin-map-datatable]").each(function(index,el){WPGMZA.AdminMapDataTable=new WPGMZA.AdminMapDataTable(el)})})}),jQuery(function($){WPGMZA.AdminMarkerDataTable=function(element){var self=this;this.preventCaching=!0,WPGMZA.DataTable.call(this,element),$(element).on("click","[data-delete-marker-id]",function(event){self.onDeleteMarker(event)}),$(element).find(".wpgmza.select_all_markers").on("click",function(event){self.onSelectAll(event)}),$(element).find(".wpgmza.bulk_delete").on("click",function(event){self.onBulkDelete(event)}),$(element).on("click","[data-center-marker-id]",function(event){self.onCenterMarker(event)})},WPGMZA.AdminMarkerDataTable.prototype=Object.create(WPGMZA.DataTable.prototype),WPGMZA.AdminMarkerDataTable.prototype.constructor=WPGMZA.AdminMarkerDataTable,WPGMZA.AdminMarkerDataTable.createInstance=function(element){return new WPGMZA.AdminMarkerDataTable(element)},WPGMZA.AdminMarkerDataTable.prototype.getDataTableSettings=function(){var self=this,options=WPGMZA.DataTable.prototype.getDataTableSettings.call(this);return options.createdRow=function(row,data,index){index=self.lastResponse.meta[index];row.wpgmzaMarkerData=index},options},WPGMZA.AdminMarkerDataTable.prototype.onEditMarker=function(event){WPGMZA.animatedScroll("#wpgmaps_tabs_markers")},WPGMZA.AdminMarkerDataTable.prototype.onDeleteMarker=function(event){var self=this,id=$(event.currentTarget).attr("data-delete-marker-id"),event={action:"delete_marker",security:WPGMZA.legacyajaxnonce,map_id:WPGMZA.mapEditPage.map.id,marker_id:id};$.post(ajaxurl,event,function(response){WPGMZA.mapEditPage.map.removeMarkerByID(id),self.reload()})},WPGMZA.AdminMarkerDataTable.prototype.onApproveMarker=function(event){var cur_id=$(this).attr("id"),cur_id={action:"approve_marker",security:WPGMZA.legacyajaxnonce,map_id:WPGMZA.mapEditPage.map.id,marker_id:cur_id};$.post(ajaxurl,cur_id,function(response){wpgmza_InitMap(),wpgmza_reinitialisetbl()})},WPGMZA.AdminMarkerDataTable.prototype.onSelectAll=function(event){$(this.element).find("input[name='mark']").prop("checked",!0)},WPGMZA.AdminMarkerDataTable.prototype.onBulkDelete=function(event){var self=this,ids=[],map=WPGMZA.maps[0];$(this.element).find("input[name='mark']:checked").each(function(index,el){el=$(el).closest("tr")[0];ids.push(el.wpgmzaMarkerData.id)}),ids.forEach(function(marker_id){marker_id=map.getMarkerByID(marker_id);marker_id&&map.removeMarker(marker_id)}),WPGMZA.restAPI.call("/markers/",{method:"DELETE",data:{ids:ids},complete:function(){self.reload()}})},WPGMZA.AdminMarkerDataTable.prototype.onCenterMarker=function(event){var event=null==event.currentTarget?event:$(event.currentTarget).attr("data-center-marker-id"),event=WPGMZA.mapEditPage.map.getMarkerByID(event);event&&(event=new WPGMZA.LatLng({lat:event.lat,lng:event.lng}),WPGMZA.mapEditPage.map.setCenter(event),WPGMZA.mapEditPage.map.setZoom(6),WPGMZA.InternalEngine.isLegacy())&&WPGMZA.animateScroll("#wpgmaps_tabs_markers")}}),jQuery(function($){WPGMZA.AdvancedPage=function(){$("#wpgmaps_tabs").tabs(),WPGMZA.restAPI.call("/markers?action=count-duplicates",{success:function(result){}}),$("button#wpgmza-remove-duplicates").on("click",function(event){confirm(WPGMZA.localized_strings.confirm_remove_duplicates)&&($(event.target).prop("disabled",!0),WPGMZA.restAPI.call("/markers?action=remove-duplicates",{success:function(result){result.message&&alert(result.message),$(event.target).prop("disabled",!1)}}))})},$(document).ready(function(event){WPGMZA.getCurrentPage()==WPGMZA.PAGE_ADVANCED&&(WPGMZA.advancedPage=new WPGMZA.AdvancedPage)})}),jQuery(function($){WPGMZA.CategoriesPage=function(){0<$(".wpgmza-marker-icon-picker").length&&(this.markerIconPicker=new WPGMZA.MarkerIconPicker($(".wpgmza-marker-icon-picker")))},$(document).ready(function(event){WPGMZA.getCurrentPage()==WPGMZA.PAGE_CATEGORIES&&(WPGMZA.categoriesPage=new WPGMZA.CategoriesPage)})}),jQuery(function($){WPGMZA.CategoryPicker=function(element){var self=this,data=JSON.parse($(element).attr("data-js-tree-data"));this.element=element,this.input=$(this.element).find("input.wpgmza-category-picker-input"),$(this.element).jstree({core:{data:data},plugins:["checkbox"]}).on("loaded.jstree",function(){$(self.element).jstree("open_all")}),$(this.element).after(this.input),$(this.element).on("changed.jstree",function(e,data){self.input.val(self.getSelection().join(","))})},WPGMZA.CategoryPicker.prototype.getSelection=function(){return $(this.element).jstree("get_selected")},WPGMZA.CategoryPicker.prototype.setSelection=function(arr){$(this.element).jstree("deselect_all"),arr&&$(this.element).jstree("select_node",arr)}}),jQuery(function($){WPGMZA.CategoryTreeNode=function(options){for(var name in this.children=[],options)if("children"===name)for(var i=0;i<options.children.length;i++){var child=WPGMZA.CategoryTreeNode.createInstance(options.children[i]);(child.parent=this).children.push(child)}else this[name]=options[name]},WPGMZA.extend(WPGMZA.CategoryTreeNode,WPGMZA.EventDispatcher),WPGMZA.CategoryTreeNode.createInstance=function(options){return new WPGMZA.CategoryTreeNode(options)},WPGMZA.CategoryTreeNode.prototype.getChildByID=function(id){if(this.id==id)return this;for(var i=0;i<this.children.length;i++){var result=this.children[i].getChildByID(id);if(result)return result}return null}}),jQuery(function($){WPGMZA.CategoryTree=function(options){WPGMZA.CategoryTreeNode.call(this,options)},WPGMZA.extend(WPGMZA.CategoryTree,WPGMZA.CategoryTreeNode),WPGMZA.CategoryTree.createInstance=function(options){return new WPGMZA.CategoryTree(options)},WPGMZA.CategoryTree.prototype.getCategoryByID=function(id){return this.getChildByID(id)},WPGMZA.categoryTreeData&&(WPGMZA.categories=WPGMZA.CategoryTree.createInstance(WPGMZA.categoryTreeData),delete WPGMZA.categoryTreeData)}),jQuery(function($){WPGMZA.CustomFieldFilterController=function(map_id){var self=this,container=(this.map_id=map_id,this.widgets=[],this.ajaxTimeoutID=null,this.ajaxRequest=null,this.markerListingCSS=$("<style type='text/css'/>"),$(document.body).append(this.markerListingCSS),WPGMZA.CustomFieldFilterController.controllersByMapID[map_id]=this,$("[data-wpgmza-filter-widget-class][data-map-id="+map_id+"]").each(function(index,el){self.widgets.push(WPGMZA.CustomFieldFilterWidget.createInstance(el)),$(el).on("input change",function(event){self.onWidgetChanged(event)}),$(el).is(":checkbox")&&$(el).on("click",function(event){self.onWidgetChanged(event)})}),$(".wpgmza-filter-widgets[data-map-id='"+map_id+"']"));$(container).find("button.wpgmza-reset-custom-fields").on("click",function(event){$(container).find("input:not([type='checkbox']):not([type='radio']), textarea").val(""),$(container).find("input[type='checkbox']").prop("checked",!1),$(container).find("select").val(""),self.onWidgetChanged()})},WPGMZA.CustomFieldFilterController.AJAX_DELAY=500,WPGMZA.CustomFieldFilterController.controllersByMapID={},WPGMZA.CustomFieldFilterController.dataTablesSourceHTMLByMapID={},WPGMZA.CustomFieldFilterController.createInstance=function(map_id){return new WPGMZA.CustomFieldFilterController(map_id)},WPGMZA.CustomFieldFilterController.prototype.getAjaxRequestData=function(){var self=this,result={url:WPGMZA.ajaxurl,method:"POST",data:{action:"wpgmza_custom_field_filter_get_filtered_marker_ids",map_id:this.map_id,widgetData:[]},success:function(response,status,xhr){self.onAjaxResponse(response,status,xhr)}};return this.widgets.forEach(function(widget){result.data.widgetData.push(widget.getAjaxRequestData())}),result},WPGMZA.CustomFieldFilterController.prototype.onWidgetChanged=function(event){var map=WPGMZA.getMapByID(this.map_id);map.markerListing&&map.markerListing.dataTable&&map.markerListing.dataTable.dataTable&&map.markerListing.dataTable.dataTable.page(1).draw(),map.markerFilter.update({},this)},WPGMZA.CustomFieldFilterController.prototype.onAjaxResponse=function(response,status,xhr){this.lastResponse=response;var marker_id,container,selectors=[];for(marker_id in marker_array[this.map_id]){var visible=0==response.marker_ids.length||-1<response.marker_ids.indexOf(marker_id);marker_array[this.map_id][marker_id].setVisible(visible),visible||selectors.push(".wpgmaps_mlist_row[mid='"+marker_id+"']")}wpgmaps_localize[this.map_id].order_markers_by&&2==wpgmaps_localize[this.map_id].order_markers_by?wpgmza_update_data_table(WPGMZA.CustomFieldFilterController.dataTablesSourceHTMLByMapID[this.map_id],this.map_id):(this.markerListingCSS.html(selectors.join(", ")+"{ display: none; }"),container=this.currAdvancedTableHTML?$("#wpgmza_marker_holder_"+this.map_id):$(this.currAdvancedTableHTML),this.applyToAdvancedTable(container))},WPGMZA.CustomFieldFilterController.prototype.reapplyLastResponse=function(){if(this.lastResponse){var marker_id,response=this.lastResponse;for(marker_id in marker_array[this.map_id]){var visible=-1<response.marker_ids.indexOf(marker_id);marker_array[this.map_id][marker_id].setVisible(visible)}}},WPGMZA.CustomFieldFilterController.prototype.applyToAdvancedTable=function(){var response,container;this.lastResponse&&(response=this.lastResponse,container=$("#wpgmza_marker_holder_"+this.map_id),$(container).find("[mid]").each(function(index,el){var marker_id=$(el).attr("mid");-1==response.marker_ids.indexOf(marker_id)&&$(el).remove()}))},$(window).on("load",function(event){1!=WPGMZA.is_admin&&$(".wpgmza_map").each(function(index,el){parseInt($(el).attr("id").match(/\d+/)[0]);setTimeout(function(){$(el).children("div").first().after($(".wpgmza-modern-marker-open-button"))},500)})})}),jQuery(function($){WPGMZA.CustomFieldFilterWidget=function(element){this.element=element},WPGMZA.CustomFieldFilterWidget.createInstance=function(element){var widgetPHPClass=$(element).attr("data-wpgmza-filter-widget-class"),constructor=null;switch(widgetPHPClass){case"WPGMZA\\CustomFieldFilterWidget\\Text":constructor=WPGMZA.CustomFieldFilterWidget.Text;break;case"WPGMZA\\CustomFieldFilterWidget\\Dropdown":constructor=WPGMZA.CustomFieldFilterWidget.Dropdown;break;case"WPGMZA\\CustomFieldFilterWidget\\Checkboxes":constructor=WPGMZA.CustomFieldFilterWidget.Checkboxes;break;case"WPGMZA\\CustomFieldFilterWidget\\Time":constructor=WPGMZA.CustomFieldFilterWidget.Time;break;case"WPGMZA\\CustomFieldFilterWidget\\Date":constructor=WPGMZA.CustomFieldFilterWidget.Date;break;default:throw new Error("Unknown field type '"+widgetPHPClass+"'")}return new constructor(element)},WPGMZA.CustomFieldFilterWidget.prototype.getAjaxRequestData=function(){return{field_id:$(this.element).attr("data-field-id"),value:$(this.element).val()}},WPGMZA.CustomFieldFilterWidget.Text=function(element){WPGMZA.CustomFieldFilterWidget.apply(this,arguments)},WPGMZA.CustomFieldFilterWidget.Text.prototype=Object.create(WPGMZA.CustomFieldFilterWidget.prototype),WPGMZA.CustomFieldFilterWidget.Text.prototype.constructor=WPGMZA.CustomFieldFilterWidget.Text,WPGMZA.CustomFieldFilterWidget.Dropdown=function(element){WPGMZA.CustomFieldFilterWidget.apply(this,arguments)},WPGMZA.CustomFieldFilterWidget.Dropdown.prototype=Object.create(WPGMZA.CustomFieldFilterWidget.prototype),WPGMZA.CustomFieldFilterWidget.Dropdown.prototype.constructor=WPGMZA.CustomFieldFilterWidget.Dropdown,WPGMZA.CustomFieldFilterWidget.Checkboxes=function(element){WPGMZA.CustomFieldFilterWidget.apply(this,arguments)},WPGMZA.CustomFieldFilterWidget.Checkboxes.prototype=Object.create(WPGMZA.CustomFieldFilterWidget.prototype),WPGMZA.CustomFieldFilterWidget.Checkboxes.prototype.constructor=WPGMZA.CustomFieldFilterWidget.Checkboxes,WPGMZA.CustomFieldFilterWidget.Checkboxes.prototype.getAjaxRequestData=function(){var checked=[];return $(this.element).find(":checked").each(function(index,el){checked.push($(el).val())}),{field_id:$(this.element).attr("data-field-id"),value:checked}},$(document.body).on("mouseover",".wpgmza-placeholder-label",function(event){$(event.currentTarget).children("ul.wpgmza-checkboxes").stop(!0,!1).fadeIn()}),$(document.body).on("mouseleave",".wpgmza-placeholder-label",function(event){$(event.currentTarget).children("ul.wpgmza-checkboxes").stop(!0,!1).fadeOut()}),WPGMZA.CustomFieldFilterWidget.Time=function(element){WPGMZA.CustomFieldFilterWidget.apply(this,arguments)},WPGMZA.CustomFieldFilterWidget.Time.prototype.getAjaxRequestData=function(){var field_id=$(this.element).attr("data-field-id");return{field_id:field_id,value_start:$('[data-field-id="'+field_id+'"][data-date-start="true"]').val(),value_end:$('[data-field-id="'+field_id+'"][data-date-end="true"]').val(),type:"time"}},WPGMZA.CustomFieldFilterWidget.Date=function(element){WPGMZA.CustomFieldFilterWidget.apply(this,arguments)},WPGMZA.CustomFieldFilterWidget.Date.prototype.getAjaxRequestData=function(){var field_id=$(this.element).attr("data-field-id");return{field_id:field_id,value_start:$('[data-field-id="'+field_id+'"][data-date-start="true"]').val(),value_end:$('[data-field-id="'+field_id+'"][data-date-end="true"]').val(),type:"date"}}}),jQuery(function($){WPGMZA.DirectionsBox=function(map){var self=this;if(this.map=map,this.element=$("#wpgmaps_directions_edit_"+map.id),this.element[0].wpgmzaMap=map,$(this.element).find("input.wpgmza-address").each(function(index,el){el.wpgmzaAddressInput=WPGMZA.AddressInput.createInstance(el,map)}),this.optionsElement=this.element.find(".wpgmza-directions-options"),this.optionsElement.hide(),this.showOptionsElement=this.element.find("#wpgmza_show_options_"+map.id),this.showOptionsElement.on("click",function(event){self.onShowOptions(event)}),this.hideOptionsElement=this.element.find("#wpgmza_hide_options_"+map.id),this.hideOptionsElement.on("click",function(event){self.onHideOptions(event)}),this.hideOptionsElement.hide(),this.waypointTemplateItem=$(this.element).find(".wpgmaps_via.wpgmaps_template"),this.waypointTemplateItem.removeClass("wpgmaps_template"),this.waypointTemplateItem.remove(),this.element.find(".wpgmaps_add_waypoint a").on("click",function(event){self.onAddWaypoint(event)}),this.element.on("click",".wpgmza_remove_via",function(event){self.onRemoveWaypoint(event)}),this.element.on("click",".wpgmza-travel-mode-option",function(){var mode=jQuery(this).data("mode");self.travelMode=mode,jQuery("body").find(".wpgmza-travel-mode-option").removeClass("wpgmza-travel-option__selected"),jQuery(this).addClass("wpgmza-travel-option__selected"),jQuery("body").find(".wpgmza-travel-mode").val(mode)}),$("body").sortable&&$(this.element).find(".wpgmaps_directions_outer_div [data-map-id]").sortable({items:".wpgmza-form-field.wpgmaps_via"}),this.getDirectionsButton=this.element.find(".wpgmaps_get_directions"),this.getDirectionsButton.on("click",function(event){self.onGetDirections()}),$(this.element).find(".wpgmza-reset-directions").on("click",function(event){self.onResetDirections(event)}),$(this.element).find(".wpgmza-print-directions").on("click",function(event){self.onPrintDirections(event)}),this.service=WPGMZA.DirectionsService.createInstance(map),this.renderer=WPGMZA.DirectionsRenderer.createInstance(map),this.map.shortcodeAttributes.directions_from&&$("#wpgmza_input_from_"+this.map.id).val(this.map.shortcodeAttributes.directions_from),this.map.shortcodeAttributes.directions_to&&$("#wpgmza_input_to_"+this.map.id).val(this.map.shortcodeAttributes.directions_to),this.map.shortcodeAttributes.directions_waypoints)for(var addresses=this.map.shortcodeAttributes.directions_waypoints.split("|"),i=0;i<addresses.length;i++)this.addWaypoint(addresses[i]);"true"==this.map.shortcodeAttributes.directions_auto&&this.route(),$(this.element).data("auto-run")&&this.route(),this.openExternal&&this.isUsingAppleMaps&&$(".wpgmza-add-waypoint").hide(),this.openExternal||this.map.settings.dbox!==WPGMZA.DirectionsBox.OPEN_BY_DEFAULT?$(".wpgmza-standalone-component .wpgmza-directions-box.wpgmza-panel-view[data-map-id="+this.map.id+"]").addClass("wpgmza-hidden"):this.map.viewportGroupings.update("directions")},WPGMZA.DirectionsBox.prototype=Object.create(WPGMZA.EventDispatcher),WPGMZA.DirectionsBox.prototype.constructor=WPGMZA.DirectionsBox,WPGMZA.DirectionsBox.STYLE_DEFAULT="default",WPGMZA.DirectionsBox.STYLE_MODERN="modern",WPGMZA.DirectionsBox.STATE_INPUT="input",WPGMZA.DirectionsBox.STATE_DISPLAY="display",WPGMZA.DirectionsBox.forceGoogleMaps=!1,WPGMZA.DirectionsBox.OPEN_BY_DEFAULT=6,WPGMZA.DirectionsBox.createInstance=function(map){return new(!WPGMZA.isModernComponentStyleAllowed()||"modern"!=map.settings.directions_box_style&&"modern"!=WPGMZA.settings.user_interface_style?WPGMZA.DirectionsBox:WPGMZA.ModernDirectionsBox)(map)},Object.defineProperty(WPGMZA.DirectionsBox.prototype,"style",{get:function(){return this.map.settings.directions_box_style}}),Object.defineProperty(WPGMZA.DirectionsBox.prototype,"state",{set:function(value){switch($(".wpgmza-directions-box[data-map-id='"+this.map.id+"']").show(),$(".wpgmza-directions-box[data-map-id='"+this.map.id+"']").removeClass("wpgmza-hidden"),this.map.viewportGroupings.update("directions"),value){case WPGMZA.DirectionsBox.STATE_INPUT:WPGMZA.InternalEngine.isLegacy()?($("#wpgmaps_directions_editbox_"+this.map.id).show("slow"),$("#wpgmaps_directions_notification_"+this.map.id).hide("slow"),$(this.element).find("input.wpgmza-get-directions").show(),$(this.element).find("a.wpgmza-reset-directions").hide(),$(this.element).find("a.wpgmza-print-directions").hide()):($(this.element).find("#wpgmaps_directions_notification_"+this.map.id).addClass("wpgmza-hidden"),$(this.element).find(".wpgmza-directions-result-bar").addClass("wpgmza-hidden"));break;case WPGMZA.DirectionsBox.STATE_DISPLAY:WPGMZA.InternalEngine.isLegacy()?($("#wpgmaps_directions_editbox_"+this.map.id).hide("slow"),$("#wpgmaps_directions_notification_"+this.map.id).show("slow"),$(this.element).find("input.wpgmza-get-directions").hide(),$(this.element).find("a.wpgmza-reset-directions").show(),$(this.element).find("a.wpgmza-print-directions").show()):($(this.element).find("#wpgmaps_directions_notification_"+this.map.id).removeClass("wpgmza-hidden"),$(this.element).find(".wpgmza-directions-result-bar").removeClass("wpgmza-hidden"));break;default:throw new Error("Unknown state")}}}),Object.defineProperty(WPGMZA.DirectionsBox.prototype,"start",{get:function(){return this.from}}),Object.defineProperty(WPGMZA.DirectionsBox.prototype,"end",{get:function(){return this.to}}),Object.defineProperty(WPGMZA.DirectionsBox.prototype,"from",{get:function(){return $("#wpgmza_input_from_"+this.map.id).val()},set:function(value){$("#wpgmza_input_from_"+this.map.id).val(value)}}),Object.defineProperty(WPGMZA.DirectionsBox.prototype,"to",{get:function(){return $("#wpgmza_input_to_"+this.map.id).val()},set:function(value){$("#wpgmza_input_to_"+this.map.id).val(value)}}),Object.defineProperty(WPGMZA.DirectionsBox.prototype,"avoidTolls",{get:function(){return $("#wpgmza_tolls_"+this.map.id).is(":checked")}}),Object.defineProperty(WPGMZA.DirectionsBox.prototype,"avoidHighways",{get:function(){return $("#wpgmza_highways_"+this.map.id).is(":checked")}}),Object.defineProperty(WPGMZA.DirectionsBox.prototype,"avoidFerries",{get:function(){return $("#wpgmza_ferries_"+this.map.id).is(":checked")}}),Object.defineProperty(WPGMZA.DirectionsBox.prototype,"travelMode",{get:function(){return $("#wpgmza_dir_type_"+this.map.id).val()}}),Object.defineProperty(WPGMZA.DirectionsBox.prototype,"travelModeShort",{get:function(){return this.travelMode.substr(0,1).toLowerCase()}}),Object.defineProperty(WPGMZA.DirectionsBox.prototype,"openExternal",{get:function(){return"external"==this.map.settings.directions_behaviour||"intelligent"==this.map.settings.directions_behaviour&&WPGMZA.isTouchDevice()}}),Object.defineProperty(WPGMZA.DirectionsBox.prototype,"isUsingAppleMaps",{get:function(){return navigator.platform.match(/iPhone|iPod|iPad/)&&!this.map.settings.force_google_directions_app}}),WPGMZA.DirectionsBox.prototype.getAjaxParameters=function(){var request={origin:this.from,destination:this.to,provideRouteAlternatives:!0,avoidHighways:this.avoidHighways,avoidTolls:this.avoidTolls,avoidFerries:this.avoidFerries,travelMode:this.travelMode,unitSystem:this.map.settings.store_locator_distance},addresses=this.getWaypointAddresses(),waypoints=[];if(addresses.length){for(var i in addresses){var location=addresses[i];location&&location.length&&(waypoints[i]={location:location,stopover:!1})}request.waypoints=waypoints}return request},WPGMZA.DirectionsBox.prototype.getWaypointAddresses=function(){$("#wpgmza_input_waypoints_"+this.map.id).val();var elements=$("#wpgmaps_directions_edit_"+this.map.id+" input.wpgmaps_via"),values=[];return elements.length&&elements.each(function(index,el){values.push($(el).val())}),values},WPGMZA.DirectionsBox.prototype.getExternalURLParameters=function(options){var waypoints;if("apple"==(options=options||{}).scheme?(params={saddr:this.from,daddr:this.to},options.marker&&(params.daddr=options.marker.address)):(params={api:1,origin:this.from,destination:this.to,travelmode:this.travelMode},(waypoints=this.getWaypointAddresses()).length&&(params.waypoints=waypoints.join("|")),options.marker&&(params.destination=options.marker.address)),"string"!=options.format)return params;var name,components=[];for(name in params)components.push(name+"="+encodeURIComponent(params[name]));return"?"+components.join("&")},WPGMZA.DirectionsBox.prototype.getExternalURL=function(options){return options=$.extend(options=options||{},{format:"string"}),this.isUsingAppleMaps?(options.scheme="apple","https://maps.apple.com/maps"+this.getExternalURLParameters(options)):"https://www.google.com/maps/dir/"+this.getExternalURLParameters(options)},WPGMZA.DirectionsBox.prototype.route=function(){var params,self=this;""==this.from&&""==this.to?alert(WPGMZA.localized_strings.please_fill_out_both_from_and_to_fields):(params=this.getAjaxParameters(),"legacy"==WPGMZA.settings.user_interface_style&&"modern"==self.map.settings.directions_box_style||WPGMZA.settings.user_interface_style,this.state=WPGMZA.DirectionsBox.STATE_DISPLAY,WPGMZA.InternalEngine.isLegacy()&&this.map.modernDirectionsBox&&this.map.modernDirectionsBox.open(),this.service.route(params,function(response,status){switch(status){case WPGMZA.DirectionsService.SUCCESS:$("#wpgmaps_directions_notification_"+self.map.id).html(""),$("#directions_panel_"+self.map.id).show(),self.renderer.setDirections(response);break;case WPGMZA.DirectionsService.ZERO_RESULTS:self.state=WPGMZA.DirectionsBox.STATE_INPUT,$("#wpgmaps_directions_notification_"+self.map.id).html(WPGMZA.localized_strings.zero_results),self.reset();break;case WPGMZA.DirectionsService.NOT_FOUND:if(self.state=WPGMZA.DirectionsBox.STATE_INPUT,$("#wpgmaps_directions_notification_"+self.map.id).html(WPGMZA.localized_strings.zero_results),self.reset(),response.geocoded_waypoints&&response.geocoded_waypoints.length)for(var i=0;i<response.geocoded_waypoints.length;i++)(status=response.geocoded_waypoints[i].geocoder_status)==WPGMZA.DirectionsService.NOT_FOUND&&(0==i?$(self.element).find(".wpgmza-directions-from"):i==response.geocoded_waypoints.length-1?$(self.element).find(".wpgmza-directions-to"):$($(self.element).find("div.wpgmza-waypoint-via")[i-1])).addClass("wpgmza-not-found");break;default:alert(WPGMZA.localized_strings.unknown_directions_service_status),this.state=WPGMZA.DirectionsBox.STATE_INPUT}}))},WPGMZA.DirectionsBox.prototype.reset=function(){$("#wpgmaps_directions_editbox_"+this.map.id).show(),$("#directions_panel_"+this.map.id).hide(),$("#directions_panel_"+this.map.id).html(""),$("#wpgmaps_directions_notification_"+this.map.id).hide(),$("#wpgmaps_directions_reset_"+this.map.id).hide(),$("#wpgmaps_directions_notification_"+this.map.id).html(WPGMZA.localized_strings.fetching_directions),$(".wpgmza-not-found").removeClass("wpgmza-not-found"),this.state=WPGMZA.DirectionsBox.STATE_INPUT,this.renderer.clear()},WPGMZA.DirectionsBox.prototype.showOptions=function(show){show||0==arguments.length?(this.optionsElement.show(),this.showOptionsElement.hide(),this.hideOptionsElement.show()):(this.optionsElement.hide(),this.showOptionsElement.show(),this.hideOptionsElement.hide())},WPGMZA.DirectionsBox.prototype.hideOptions=function(){this.showOptions(!1)},WPGMZA.DirectionsBox.prototype.addWaypoint=function(address){var row=this.waypointTemplateItem.clone();return $(this.element).find("div.wpgmza-directions-to").before(row),address&&$(row).find("input").val(address),WPGMZA.AddressInput.createInstance($(row).find("input")[0],this.map),row},WPGMZA.DirectionsBox.prototype.onAddWaypoint=function(){this.addWaypoint().find("input").focus()},WPGMZA.DirectionsBox.prototype.onShowOptions=function(event){$(this.element).find(".wpgmza-directions-options").show(),$(this.element).find(".wpgmza-hide-directions-options").show(),$(this.element).find(".wpgmza-show-directions-options").hide()},WPGMZA.DirectionsBox.prototype.onHideOptions=function(event){$(this.element).find(".wpgmza-directions-options").hide(),$(this.element).find(".wpgmza-hide-directions-options").hide(),$(this.element).find(".wpgmza-show-directions-options").show()},WPGMZA.DirectionsBox.prototype.onRemoveWaypoint=function(){$(event.target).closest(".wpgmza-form-field").remove()},WPGMZA.DirectionsBox.prototype.onGetDirections=function(event){this.openExternal?window.open(this.getExternalURL(),"_blank"):(this.reset(),this.route())},WPGMZA.DirectionsBox.prototype.onPrintDirections=function(event){try{var routeHtml=document.getElementById("directions_panel_"+this.map.id).innerHTML,printWindow=window.open("","","height=600,width=800");printWindow.document.write("<html><head><title>Get Directions</title>"),printWindow.document.write("</head><body >"),printWindow.document.write(routeHtml),printWindow.document.write("</body></html>"),printWindow.document.close(),printWindow.print()}catch(ex){routeHtml=this.getExternalURL()+"&om=1";window.open(routeHtml,"_blank")}},WPGMZA.DirectionsBox.prototype.onResetDirections=function(event){this.reset()},$(document.body).on("click",".wpgmza_gd, .wpgmza-directions-button",function(event){var marker,address,coords,map,component=$(event.currentTarget).closest("[data-wpgmza-marker-listing]");(component=(component=component.length?component:$(event.currentTarget).closest(".wpgmza_modern_infowindow, [data-map-id]"))[0].wpgmzaMarkerListing||component[0].wpgmzaInfoWindow||component[0].wpgmzaMap?component:$(event.currentTarget).closest(".wpgmza_map[data-map-id]")).length&&(component.length&&((component=component[0]).wpgmzaMarkerListing?marker=(map=component.wpgmzaMarkerListing.map).getMarkerByID($(event.currentTarget).closest("[data-marker-id]").attr("data-marker-id")):component.wpgmzaInfoWindow?map=(marker=component.wpgmzaInfoWindow.mapObject).map:marker=component.wpgmzaMap?(map=component.wpgmzaMap,(marker=component.wpgmzaMap.getMarkerByID($(event.currentTarget).attr("data-marker-id")))||map.getMarkerByID($(event.currentTarget).closest("[data-marker-id]").attr("data-marker-id"))):(map=component.wpgmzaMap).getMarkerByID($(event.currentTarget).closest("[data-marker-id]").attr("data-marker-id"))),marker?(address=marker.address,coords=marker.getPosition().toString()):(component=$(event.currentTarget).data("latlng"))&&(marker={address:coords=component}),map.directionsBox.openExternal?window.open(map.directionsBox.getExternalURL({marker:marker})):(map.directionsBox.state=WPGMZA.DirectionsBox.STATE_INPUT,map.directionsBox.to=address&&address.length?address:coords,$("#wpgmza_input_from_"+map.id).focus().select(),map.directionsBox instanceof WPGMZA.ModernDirectionsBox?map.directionsBox.open():$(map.directionsBox.element).closest(".wpgmza-inner-stack").length||WPGMZA.animateScroll(map.directionsBox.element)))})}),jQuery(function($){WPGMZA.DirectionsRenderer=function(map){WPGMZA.EventDispatcher.apply(this,arguments),this.map=map},WPGMZA.extend(WPGMZA.DirectionsRenderer,WPGMZA.EventDispatcher),WPGMZA.DirectionsRenderer.createInstance=function(map){return new("open-layers"!==WPGMZA.settings.engine?WPGMZA.CloudAPI.isBeingUsed?WPGMZA.CloudDirectionsRenderer:WPGMZA.GoogleDirectionsRenderer:WPGMZA.OLDirectionsRenderer)(map)},WPGMZA.DirectionsRenderer.prototype.getPolylineOptions=function(){var settings={strokeColor:"#4285F4",strokeWeight:4,strokeOpacity:.8};return this.map.settings.directions_route_stroke_color&&(settings.strokeColor=this.map.settings.directions_route_stroke_color),this.map.settings.directions_route_stroke_weight&&(settings.strokeWeight=parseInt(this.map.settings.directions_route_stroke_weight)),this.map.settings.directions_route_stroke_opacity&&(settings.strokeOpacity=parseFloat(this.map.settings.directions_route_stroke_opacity)),settings},WPGMZA.DirectionsRenderer.prototype.removeMarkers=function(){this.directionStartMarker&&this.map.removeMarker(this.directionStartMarker),this.directionEndMarker&&this.map.removeMarker(this.directionEndMarker)},WPGMZA.DirectionsRenderer.prototype.addMarkers=function(points){this.directionStartMarker=WPGMZA.Marker.createInstance({position:points[0],icon:this.map.settings.directions_route_origin_icon,retina:this.map.settings.directions_origin_retina,disableInfoWindow:!0}),this.directionStartMarker._icon.retina=this.directionStartMarker.retina,this.map.addMarker(this.directionStartMarker),this.directionEndMarker=WPGMZA.Marker.createInstance({position:points[points.length-1],icon:this.map.settings.directions_route_destination_icon,retina:this.map.settings.directions_destination_retina,disableInfoWindow:!0}),this.directionEndMarker._icon.retina=this.directionEndMarker.retina,this.map.addMarker(this.directionEndMarker)},WPGMZA.DirectionsRenderer.prototype.setDirections=function(directions){},WPGMZA.DirectionsRenderer.prototype.fitBoundsToRoute=function(pointA,pointB){var bounds=new WPGMZA.LatLngBounds;bounds.extend(pointA),bounds.extend(pointB),this.map.fitBounds(bounds)}}),jQuery(function($){WPGMZA.DirectionsService=function(map){WPGMZA.EventDispatcher.apply(this,arguments),this.map=map},WPGMZA.extend(WPGMZA.DirectionsService,WPGMZA.EventDispatcher),WPGMZA.DirectionsService.ZERO_RESULTS="zero-results",WPGMZA.DirectionsService.NOT_FOUND="not-found",WPGMZA.DirectionsService.SUCCESS="success",WPGMZA.DirectionsService.DRIVING="driving",WPGMZA.DirectionsService.WALKING="walking",WPGMZA.DirectionsService.TRANSIT="transit",WPGMZA.DirectionsService.BICYCLING="bicycling",WPGMZA.DirectionsService.createInstance=function(map){return new("open-layers"!==WPGMZA.settings.engine?WPGMZA.GoogleDirectionsService:WPGMZA.OLDirectionsService)(map)},WPGMZA.DirectionsService.route=function(params,callback){}}),jQuery(function($){WPGMZA.FontAwesomeIconPickerField=function(input){this.input=$(input),this.ready=!1,this.build(),this.bindEvents()},WPGMZA.extend(WPGMZA.FontAwesomeIconPickerField,WPGMZA.EventDispatcher),WPGMZA.FontAwesomeIconPickerField.prototype.build=function(){this.popup||(this.popup=$(this.prepareHtml()).insertAfter(this.input))},WPGMZA.FontAwesomeIconPickerField.prototype.bindEvents=function(){var self=this;this.input.on("keyup",function(){var search=self.input.val();""!==search.trim()?(self.show(),self.autocomplete(search.trim())):self.hide()}),this.popup.on("click",".icon-item",function(){var value=$(this).text();self.input.val(value),self.hide(),self.input.trigger("change")})},WPGMZA.FontAwesomeIconPickerField.prototype.show=function(){this.popup&&this.popup.addClass("visible")},WPGMZA.FontAwesomeIconPickerField.prototype.hide=function(){this.popup&&this.popup.removeClass("visible")},WPGMZA.FontAwesomeIconPickerField.prototype.autocomplete=function(term){this.popup&&this.popup.find(".icon-item").each(function(){-1!==$(this).text().indexOf(term)?$(this).show():$(this).hide()})},WPGMZA.FontAwesomeIconPickerField.prototype.prepareHtml=function(){if(WPGMZA.FontAwesomeIconPickerField.cachedHtml)return WPGMZA.FontAwesomeIconPickerField.cachedHtml;var i,icons=this.getIcons(),html="<div class='icon-picker-autocomplete wpgmza-card wpgmza-shadow'>";for(i in icons)html=(html+="<div class='icon-item'>")+"<i class='"+icons[i]+"'></i>"+icons[i]+"</div>";return html+="<div>",WPGMZA.FontAwesomeIconPickerField.cachedHtml=html},WPGMZA.FontAwesomeIconPickerField.prototype.getIcons=function(){var version=WPGMZA.settings&&WPGMZA.settings.useFontAwesome&&("5.*"===WPGMZA.settings.useFontAwesome||"none"===WPGMZA.settings.useFontAwesome)?"v5":"v4";return WPGMZA.FontAwesomeIconPickerField.icons[version]},WPGMZA.FontAwesomeIconPickerField.icons={v4:["fa fa-address-book","fa fa-address-book-o","fa fa-address-card","fa fa-address-card-o","fa fa-adjust","fa fa-american-sign-language-interpreting","fa fa-anchor","fa fa-archive","fa fa-area-chart","fa fa-arrows","fa fa-arrows-h","fa fa-arrows-v","fa fa-asl-interpreting","fa fa-assistive-listening-systems","fa fa-asterisk","fa fa-at","fa fa-audio-description","fa fa-automobile","fa fa-balance-scale","fa fa-ban","fa fa-bank","fa fa-bar-chart","fa fa-bar-chart-o","fa fa-barcode","fa fa-bars","fa fa-bath","fa fa-bathtub","fa fa-battery","fa fa-battery-0","fa fa-battery-1","fa fa-battery-2","fa fa-battery-3","fa fa-battery-4","fa fa-battery-empty","fa fa-battery-full","fa fa-battery-half","fa fa-battery-quarter","fa fa-battery-three-quarters","fa fa-bed","fa fa-beer","fa fa-bell","fa fa-bell-o","fa fa-bell-slash","fa fa-bell-slash-o","fa fa-bicycle","fa fa-binoculars","fa fa-birthday-cake","fa fa-blind","fa fa-bluetooth","fa fa-bluetooth-b","fa fa-bolt","fa fa-bomb","fa fa-book","fa fa-bookmark","fa fa-bookmark-o","fa fa-braille","fa fa-briefcase","fa fa-bug","fa fa-building","fa fa-building-o","fa fa-bullhorn","fa fa-bullseye","fa fa-bus","fa fa-cab","fa fa-calculator","fa fa-calendar","fa fa-calendar-check-o","fa fa-calendar-minus-o","fa fa-calendar-o","fa fa-calendar-plus-o","fa fa-calendar-times-o","fa fa-camera","fa fa-camera-retro","fa fa-car","fa fa-caret-square-o-down","fa fa-caret-square-o-left","fa fa-caret-square-o-right","fa fa-caret-square-o-up","fa fa-cart-arrow-down","fa fa-cart-plus","fa fa-cc","fa fa-certificate","fa fa-check","fa fa-check-circle","fa fa-check-circle-o","fa fa-check-square","fa fa-check-square-o","fa fa-child","fa fa-circle","fa fa-circle-o","fa fa-circle-o-notch","fa fa-circle-thin","fa fa-clock-o","fa fa-clone","fa fa-close","fa fa-cloud","fa fa-cloud-download","fa fa-cloud-upload","fa fa-code","fa fa-code-fork","fa fa-coffee","fa fa-cog","fa fa-cogs","fa fa-comment","fa fa-comment-o","fa fa-commenting","fa fa-commenting-o","fa fa-comments","fa fa-comments-o","fa fa-compass","fa fa-copyright","fa fa-creative-commons","fa fa-credit-card","fa fa-credit-card-alt","fa fa-crop","fa fa-crosshairs","fa fa-cube","fa fa-cubes","fa fa-cutlery","fa fa-dashboard","fa fa-database","fa fa-deaf","fa fa-deafness","fa fa-desktop","fa fa-diamond","fa fa-dot-circle-o","fa fa-download","fa fa-drivers-license","fa fa-drivers-license-o","fa fa-edit","fa fa-ellipsis-h","fa fa-ellipsis-v","fa fa-envelope","fa fa-envelope-o","fa fa-envelope-open","fa fa-envelope-open-o","fa fa-envelope-square","fa fa-eraser","fa fa-exchange","fa fa-exclamation","fa fa-exclamation-circle","fa fa-exclamation-triangle","fa fa-external-link","fa fa-external-link-square","fa fa-eye","fa fa-eye-slash","fa fa-eyedropper","fa fa-fax","fa fa-feed","fa fa-female","fa fa-fighter-jet","fa fa-file-archive-o","fa fa-file-audio-o","fa fa-file-code-o","fa fa-file-excel-o","fa fa-file-image-o","fa fa-file-movie-o","fa fa-file-pdf-o","fa fa-file-photo-o","fa fa-file-picture-o","fa fa-file-powerpoint-o","fa fa-file-sound-o","fa fa-file-video-o","fa fa-file-word-o","fa fa-file-zip-o","fa fa-film","fa fa-filter","fa fa-fire","fa fa-fire-extinguisher","fa fa-flag","fa fa-flag-checkered","fa fa-flag-o","fa fa-flash","fa fa-flask","fa fa-folder","fa fa-folder-o","fa fa-folder-open","fa fa-folder-open-o","fa fa-frown-o","fa fa-futbol-o","fa fa-gamepad","fa fa-gavel","fa fa-gear","fa fa-gears","fa fa-gift","fa fa-glass","fa fa-globe","fa fa-graduation-cap","fa fa-group","fa fa-hand-grab-o","fa fa-hand-lizard-o","fa fa-hand-paper-o","fa fa-hand-peace-o","fa fa-hand-pointer-o","fa fa-hand-rock-o","fa fa-hand-scissors-o","fa fa-hand-spock-o","fa fa-hand-stop-o","fa fa-handshake-o","fa fa-hard-of-hearing","fa fa-hashtag","fa fa-hdd-o","fa fa-headphones","fa fa-heart","fa fa-heart-o","fa fa-heartbeat","fa fa-history","fa fa-home","fa fa-hotel","fa fa-hourglass","fa fa-hourglass-1","fa fa-hourglass-2","fa fa-hourglass-3","fa fa-hourglass-end","fa fa-hourglass-half","fa fa-hourglass-o","fa fa-hourglass-start","fa fa-i-cursor","fa fa-id-badge","fa fa-id-card","fa fa-id-card-o","fa fa-image","fa fa-inbox","fa fa-industry","fa fa-info","fa fa-info-circle","fa fa-institution","fa fa-key","fa fa-keyboard-o","fa fa-language","fa fa-laptop","fa fa-leaf","fa fa-legal","fa fa-lemon-o","fa fa-level-down","fa fa-level-up","fa fa-life-bouy","fa fa-life-buoy","fa fa-life-ring","fa fa-life-saver","fa fa-lightbulb-o","fa fa-line-chart","fa fa-location-arrow","fa fa-lock","fa fa-low-vision","fa fa-magic","fa fa-magnet","fa fa-mail-forward","fa fa-mail-reply","fa fa-mail-reply-all","fa fa-male","fa fa-map","fa fa-map-marker","fa fa-map-o","fa fa-map-pin","fa fa-map-signs","fa fa-meh-o","fa fa-microchip","fa fa-microphone","fa fa-microphone-slash","fa fa-minus","fa fa-minus-circle","fa fa-minus-square","fa fa-minus-square-o","fa fa-mobile","fa fa-mobile-phone","fa fa-money","fa fa-moon-o","fa fa-mortar-board","fa fa-motorcycle","fa fa-mouse-pointer","fa fa-music","fa fa-navicon","fa fa-newspaper-o","fa fa-object-group","fa fa-object-ungroup","fa fa-paint-brush","fa fa-paper-plane","fa fa-paper-plane-o","fa fa-paw","fa fa-pencil","fa fa-pencil-square","fa fa-pencil-square-o","fa fa-percent","fa fa-phone","fa fa-phone-square","fa fa-photo","fa fa-picture-o","fa fa-pie-chart","fa fa-plane","fa fa-plug","fa fa-plus","fa fa-plus-circle","fa fa-plus-square","fa fa-plus-square-o","fa fa-podcast","fa fa-power-off","fa fa-print","fa fa-puzzle-piece","fa fa-qrcode","fa fa-question","fa fa-question-circle","fa fa-question-circle-o","fa fa-quote-left","fa fa-quote-right","fa fa-random","fa fa-recycle","fa fa-refresh","fa fa-registered","fa fa-remove","fa fa-reorder","fa fa-reply","fa fa-reply-all","fa fa-retweet","fa fa-road","fa fa-rocket","fa fa-rss","fa fa-rss-square","fa fa-s15","fa fa-search","fa fa-search-minus","fa fa-search-plus","fa fa-send","fa fa-send-o","fa fa-server","fa fa-share","fa fa-share-alt","fa fa-share-alt-square","fa fa-share-square","fa fa-share-square-o","fa fa-shield","fa fa-ship","fa fa-shopping-bag","fa fa-shopping-basket","fa fa-shopping-cart","fa fa-shower","fa fa-sign-in","fa fa-sign-language","fa fa-sign-out","fa fa-signal","fa fa-signing","fa fa-sitemap","fa fa-sliders","fa fa-smile-o","fa fa-snowflake-o","fa fa-soccer-ball-o","fa fa-sort","fa fa-sort-alpha-asc","fa fa-sort-alpha-desc","fa fa-sort-amount-asc","fa fa-sort-amount-desc","fa fa-sort-asc","fa fa-sort-desc","fa fa-sort-down","fa fa-sort-numeric-asc","fa fa-sort-numeric-desc","fa fa-sort-up","fa fa-space-shuttle","fa fa-spinner","fa fa-spoon","fa fa-square","fa fa-square-o","fa fa-star","fa fa-star-half","fa fa-star-half-empty","fa fa-star-half-full","fa fa-star-half-o","fa fa-star-o","fa fa-sticky-note","fa fa-sticky-note-o","fa fa-street-view","fa fa-suitcase","fa fa-sun-o","fa fa-support","fa fa-tablet","fa fa-tachometer","fa fa-tag","fa fa-tags","fa fa-tasks","fa fa-taxi","fa fa-television","fa fa-terminal","fa fa-thermometer","fa fa-thermometer-0","fa fa-thermometer-1","fa fa-thermometer-2","fa fa-thermometer-3","fa fa-thermometer-4","fa fa-thermometer-empty","fa fa-thermometer-full","fa fa-thermometer-half","fa fa-thermometer-quarter","fa fa-thermometer-three-quarters","fa fa-thumb-tack","fa fa-thumbs-down","fa fa-thumbs-o-down","fa fa-thumbs-o-up","fa fa-thumbs-up","fa fa-ticket","fa fa-times","fa fa-times-circle","fa fa-times-circle-o","fa fa-times-rectangle","fa fa-times-rectangle-o","fa fa-tint","fa fa-toggle-down","fa fa-toggle-left","fa fa-toggle-off","fa fa-toggle-on","fa fa-toggle-right","fa fa-toggle-up","fa fa-trademark","fa fa-trash","fa fa-trash-o","fa fa-tree","fa fa-trophy","fa fa-truck","fa fa-tty","fa fa-tv","fa fa-umbrella","fa fa-universal-access","fa fa-university","fa fa-unlock","fa fa-unlock-alt","fa fa-unsorted","fa fa-upload","fa fa-user","fa fa-user-circle","fa fa-user-circle-o","fa fa-user-o","fa fa-user-plus","fa fa-user-secret","fa fa-user-times","fa fa-users","fa fa-vcard","fa fa-vcard-o","fa fa-video-camera","fa fa-volume-control-phone","fa fa-volume-down","fa fa-volume-off","fa fa-volume-up","fa fa-warning","fa fa-wheelchair","fa fa-wheelchair-alt","fa fa-wifi","fa fa-window-close","fa fa-window-close-o","fa fa-window-maximize","fa fa-window-minimize","fa fa-window-restore","fa fa-wrench"],v5:["fab fa-500px","fab fa-accessible-icon","fab fa-accusoft","fab fa-acquisitions-incorporated","fas fa-ad","fas fa-address-book","far fa-address-book","fas fa-address-card","far fa-address-card","fas fa-adjust","fab fa-adn","fab fa-adversal","fab fa-affiliatetheme","fas fa-air-freshener","fab fa-algolia","fas fa-align-center","fas fa-align-justify","fas fa-align-left","fas fa-align-right","fab fa-alipay","fas fa-allergies","fab fa-amazon","fab fa-amazon-pay","fas fa-ambulance","fas fa-american-sign-language-interpreting","fab fa-amilia","fas fa-anchor","fab fa-android","fab fa-angellist","fas fa-angle-double-down","fas fa-angle-double-left","fas fa-angle-double-right","fas fa-angle-double-up","fas fa-angle-down","fas fa-angle-left","fas fa-angle-right","fas fa-angle-up","fas fa-angry","far fa-angry","fab fa-angrycreative","fab fa-angular","fas fa-ankh","fab fa-app-store","fab fa-app-store-ios","fab fa-apper","fab fa-apple","fas fa-apple-alt","fab fa-apple-pay","fas fa-archive","fas fa-archway","fas fa-arrow-alt-circle-down","far fa-arrow-alt-circle-down","fas fa-arrow-alt-circle-left","far fa-arrow-alt-circle-left","fas fa-arrow-alt-circle-right","far fa-arrow-alt-circle-right","fas fa-arrow-alt-circle-up","far fa-arrow-alt-circle-up","fas fa-arrow-circle-down","fas fa-arrow-circle-left","fas fa-arrow-circle-right","fas fa-arrow-circle-up","fas fa-arrow-down","fas fa-arrow-left","fas fa-arrow-right","fas fa-arrow-up","fas fa-arrows-alt","fas fa-arrows-alt-h","fas fa-arrows-alt-v","fas fa-assistive-listening-systems","fas fa-asterisk","fab fa-asymmetrik","fas fa-at","fas fa-atlas","fas fa-atom","fab fa-audible","fas fa-audio-description","fab fa-autoprefixer","fab fa-avianex","fab fa-aviato","fas fa-award","fab fa-aws","fas fa-backspace","fas fa-backward","fas fa-balance-scale","fas fa-ban","fas fa-band-aid","fab fa-bandcamp","fas fa-barcode","fas fa-bars","fas fa-baseball-ball","fas fa-basketball-ball","fas fa-bath","fas fa-battery-empty","fas fa-battery-full","fas fa-battery-half","fas fa-battery-quarter","fas fa-battery-three-quarters","fas fa-bed","fas fa-beer","fab fa-behance","fab fa-behance-square","fas fa-bell","far fa-bell","fas fa-bell-slash","far fa-bell-slash","fas fa-bezier-curve","fas fa-bible","fas fa-bicycle","fab fa-bimobject","fas fa-binoculars","fas fa-birthday-cake","fab fa-bitbucket","fab fa-bitcoin","fab fa-bity","fab fa-black-tie","fab fa-blackberry","fas fa-blender","fas fa-blender-phone","fas fa-blind","fab fa-blogger","fab fa-blogger-b","fab fa-bluetooth","fab fa-bluetooth-b","fas fa-bold","fas fa-bolt","fas fa-bomb","fas fa-bone","fas fa-bong","fas fa-book","fas fa-book-dead","fas fa-book-open","fas fa-book-reader","fas fa-bookmark","far fa-bookmark","fas fa-bowling-ball","fas fa-box","fas fa-box-open","fas fa-boxes","fas fa-braille","fas fa-brain","fas fa-briefcase","fas fa-briefcase-medical","fas fa-broadcast-tower","fas fa-broom","fas fa-brush","fab fa-btc","fas fa-bug","fas fa-building","far fa-building","fas fa-bullhorn","fas fa-bullseye","fas fa-burn","fab fa-buromobelexperte","fas fa-bus","fas fa-bus-alt","fas fa-business-time","fab fa-buysellads","fas fa-calculator","fas fa-calendar","far fa-calendar","fas fa-calendar-alt","far fa-calendar-alt","fas fa-calendar-check","far fa-calendar-check","fas fa-calendar-minus","far fa-calendar-minus","fas fa-calendar-plus","far fa-calendar-plus","fas fa-calendar-times","far fa-calendar-times","fas fa-camera","fas fa-camera-retro","fas fa-campground","fas fa-cannabis","fas fa-capsules","fas fa-car","fas fa-car-alt","fas fa-car-battery","fas fa-car-crash","fas fa-car-side","fas fa-caret-down","fas fa-caret-left","fas fa-caret-right","fas fa-caret-square-down","far fa-caret-square-down","fas fa-caret-square-left","far fa-caret-square-left","fas fa-caret-square-right","far fa-caret-square-right","fas fa-caret-square-up","far fa-caret-square-up","fas fa-caret-up","fas fa-cart-arrow-down","fas fa-cart-plus","fas fa-cat","fab fa-cc-amazon-pay","fab fa-cc-amex","fab fa-cc-apple-pay","fab fa-cc-diners-club","fab fa-cc-discover","fab fa-cc-jcb","fab fa-cc-mastercard","fab fa-cc-paypal","fab fa-cc-stripe","fab fa-cc-visa","fab fa-centercode","fas fa-certificate","fas fa-chair","fas fa-chalkboard","fas fa-chalkboard-teacher","fas fa-charging-station","fas fa-chart-area","fas fa-chart-bar","far fa-chart-bar","fas fa-chart-line","fas fa-chart-pie","fas fa-check","fas fa-check-circle","far fa-check-circle","fas fa-check-double","fas fa-check-square","far fa-check-square","fas fa-chess","fas fa-chess-bishop","fas fa-chess-board","fas fa-chess-king","fas fa-chess-knight","fas fa-chess-pawn","fas fa-chess-queen","fas fa-chess-rook","fas fa-chevron-circle-down","fas fa-chevron-circle-left","fas fa-chevron-circle-right","fas fa-chevron-circle-up","fas fa-chevron-down","fas fa-chevron-left","fas fa-chevron-right","fas fa-chevron-up","fas fa-child","fab fa-chrome","fas fa-church","fas fa-circle","far fa-circle","fas fa-circle-notch","fas fa-city","fas fa-clipboard","far fa-clipboard","fas fa-clipboard-check","fas fa-clipboard-list","fas fa-clock","far fa-clock","fas fa-clone","far fa-clone","fas fa-closed-captioning","far fa-closed-captioning","fas fa-cloud","fas fa-cloud-download-alt","fas fa-cloud-meatball","fas fa-cloud-moon","fas fa-cloud-moon-rain","fas fa-cloud-rain","fas fa-cloud-showers-heavy","fas fa-cloud-sun","fas fa-cloud-sun-rain","fas fa-cloud-upload-alt","fab fa-cloudscale","fab fa-cloudsmith","fab fa-cloudversify","fas fa-cocktail","fas fa-code","fas fa-code-branch","fab fa-codepen","fab fa-codiepie","fas fa-coffee","fas fa-cog","fas fa-cogs","fas fa-coins","fas fa-columns","fas fa-comment","far fa-comment","fas fa-comment-alt","far fa-comment-alt","fas fa-comment-dollar","fas fa-comment-dots","far fa-comment-dots","fas fa-comment-slash","fas fa-comments","far fa-comments","fas fa-comments-dollar","fas fa-compact-disc","fas fa-compass","far fa-compass","fas fa-compress","fas fa-concierge-bell","fab fa-connectdevelop","fab fa-contao","fas fa-cookie","fas fa-cookie-bite","fas fa-copy","far fa-copy","fas fa-copyright","far fa-copyright","fas fa-couch","fab fa-cpanel","fab fa-creative-commons","fab fa-creative-commons-by","fab fa-creative-commons-nc","fab fa-creative-commons-nc-eu","fab fa-creative-commons-nc-jp","fab fa-creative-commons-nd","fab fa-creative-commons-pd","fab fa-creative-commons-pd-alt","fab fa-creative-commons-remix","fab fa-creative-commons-sa","fab fa-creative-commons-sampling","fab fa-creative-commons-sampling-plus","fab fa-creative-commons-share","fab fa-creative-commons-zero","fas fa-credit-card","far fa-credit-card","fab fa-critical-role","fas fa-crop","fas fa-crop-alt","fas fa-cross","fas fa-crosshairs","fas fa-crow","fas fa-crown","fab fa-css3","fab fa-css3-alt","fas fa-cube","fas fa-cubes","fas fa-cut","fab fa-cuttlefish","fab fa-d-and-d","fab fa-d-and-d-beyond","fab fa-dashcube","fas fa-database","fas fa-deaf","fab fa-delicious","fas fa-democrat","fab fa-deploydog","fab fa-deskpro","fas fa-desktop","fab fa-dev","fab fa-deviantart","fas fa-dharmachakra","fas fa-diagnoses","fas fa-dice","fas fa-dice-d20","fas fa-dice-d6","fas fa-dice-five","fas fa-dice-four","fas fa-dice-one","fas fa-dice-six","fas fa-dice-three","fas fa-dice-two","fab fa-digg","fab fa-digital-ocean","fas fa-digital-tachograph","fas fa-directions","fab fa-discord","fab fa-discourse","fas fa-divide","fas fa-dizzy","far fa-dizzy","fas fa-dna","fab fa-dochub","fab fa-docker","fas fa-dog","fas fa-dollar-sign","fas fa-dolly","fas fa-dolly-flatbed","fas fa-donate","fas fa-door-closed","fas fa-door-open","fas fa-dot-circle","far fa-dot-circle","fas fa-dove","fas fa-download","fab fa-draft2digital","fas fa-drafting-compass","fas fa-dragon","fas fa-draw-polygon","fab fa-dribbble","fab fa-dribbble-square","fab fa-dropbox","fas fa-drum","fas fa-drum-steelpan","fas fa-drumstick-bite","fab fa-drupal","fas fa-dumbbell","fas fa-dungeon","fab fa-dyalog","fab fa-earlybirds","fab fa-ebay","fab fa-edge","fas fa-edit","far fa-edit","fas fa-eject","fab fa-elementor","fas fa-ellipsis-h","fas fa-ellipsis-v","fab fa-ello","fab fa-ember","fab fa-empire","fas fa-envelope","far fa-envelope","fas fa-envelope-open","far fa-envelope-open","fas fa-envelope-open-text","fas fa-envelope-square","fab fa-envira","fas fa-equals","fas fa-eraser","fab fa-erlang","fab fa-ethereum","fab fa-etsy","fas fa-euro-sign","fas fa-exchange-alt","fas fa-exclamation","fas fa-exclamation-circle","fas fa-exclamation-triangle","fas fa-expand","fas fa-expand-arrows-alt","fab fa-expeditedssl","fas fa-external-link-alt","fas fa-external-link-square-alt","fas fa-eye","far fa-eye","fas fa-eye-dropper","fas fa-eye-slash","far fa-eye-slash","fab fa-facebook","fab fa-facebook-f","fab fa-facebook-messenger","fab fa-facebook-square","fab fa-fantasy-flight-games","fas fa-fast-backward","fas fa-fast-forward","fas fa-fax","fas fa-feather","fas fa-feather-alt","fas fa-female","fas fa-fighter-jet","fas fa-file","far fa-file","fas fa-file-alt","far fa-file-alt","fas fa-file-archive","far fa-file-archive","fas fa-file-audio","far fa-file-audio","fas fa-file-code","far fa-file-code","fas fa-file-contract","fas fa-file-csv","fas fa-file-download","fas fa-file-excel","far fa-file-excel","fas fa-file-export","fas fa-file-image","far fa-file-image","fas fa-file-import","fas fa-file-invoice","fas fa-file-invoice-dollar","fas fa-file-medical","fas fa-file-medical-alt","fas fa-file-pdf","far fa-file-pdf","fas fa-file-powerpoint","far fa-file-powerpoint","fas fa-file-prescription","fas fa-file-signature","fas fa-file-upload","fas fa-file-video","far fa-file-video","fas fa-file-word","far fa-file-word","fas fa-fill","fas fa-fill-drip","fas fa-film","fas fa-filter","fas fa-fingerprint","fas fa-fire","fas fa-fire-extinguisher","fab fa-firefox","fas fa-first-aid","fab fa-first-order","fab fa-first-order-alt","fab fa-firstdraft","fas fa-fish","fas fa-fist-raised","fas fa-flag","far fa-flag","fas fa-flag-checkered","fas fa-flag-usa","fas fa-flask","fab fa-flickr","fab fa-flipboard","fas fa-flushed","far fa-flushed","fab fa-fly","fas fa-folder","far fa-folder","fas fa-folder-minus","fas fa-folder-open","far fa-folder-open","fas fa-folder-plus","fas fa-font","fab fa-font-awesome","fab fa-font-awesome-alt","fab fa-font-awesome-flag","far fa-font-awesome-logo-full","fas fa-font-awesome-logo-full","fab fa-font-awesome-logo-full","fab fa-fonticons","fab fa-fonticons-fi","fas fa-football-ball","fab fa-fort-awesome","fab fa-fort-awesome-alt","fab fa-forumbee","fas fa-forward","fab fa-foursquare","fab fa-free-code-camp","fab fa-freebsd","fas fa-frog","fas fa-frown","far fa-frown","fas fa-frown-open","far fa-frown-open","fab fa-fulcrum","fas fa-funnel-dollar","fas fa-futbol","far fa-futbol","fab fa-galactic-republic","fab fa-galactic-senate","fas fa-gamepad","fas fa-gas-pump","fas fa-gavel","fas fa-gem","far fa-gem","fas fa-genderless","fab fa-get-pocket","fab fa-gg","fab fa-gg-circle","fas fa-ghost","fas fa-gift","fab fa-git","fab fa-git-square","fab fa-github","fab fa-github-alt","fab fa-github-square","fab fa-gitkraken","fab fa-gitlab","fab fa-gitter","fas fa-glass-martini","fas fa-glass-martini-alt","fas fa-glasses","fab fa-glide","fab fa-glide-g","fas fa-globe","fas fa-globe-africa","fas fa-globe-americas","fas fa-globe-asia","fab fa-gofore","fas fa-golf-ball","fab fa-goodreads","fab fa-goodreads-g","fab fa-google","fab fa-google-drive","fab fa-google-play","fab fa-google-plus","fab fa-google-plus-g","fab fa-google-plus-square","fab fa-google-wallet","fas fa-gopuram","fas fa-graduation-cap","fab fa-gratipay","fab fa-grav","fas fa-greater-than","fas fa-greater-than-equal","fas fa-grimace","far fa-grimace","fas fa-grin","far fa-grin","fas fa-grin-alt","far fa-grin-alt","fas fa-grin-beam","far fa-grin-beam","fas fa-grin-beam-sweat","far fa-grin-beam-sweat","fas fa-grin-hearts","far fa-grin-hearts","fas fa-grin-squint","far fa-grin-squint","fas fa-grin-squint-tears","far fa-grin-squint-tears","fas fa-grin-stars","far fa-grin-stars","fas fa-grin-tears","far fa-grin-tears","fas fa-grin-tongue","far fa-grin-tongue","fas fa-grin-tongue-squint","far fa-grin-tongue-squint","fas fa-grin-tongue-wink","far fa-grin-tongue-wink","fas fa-grin-wink","far fa-grin-wink","fas fa-grip-horizontal","fas fa-grip-vertical","fab fa-gripfire","fab fa-grunt","fab fa-gulp","fas fa-h-square","fab fa-hacker-news","fab fa-hacker-news-square","fab fa-hackerrank","fas fa-hammer","fas fa-hamsa","fas fa-hand-holding","fas fa-hand-holding-heart","fas fa-hand-holding-usd","fas fa-hand-lizard","far fa-hand-lizard","fas fa-hand-paper","far fa-hand-paper","fas fa-hand-peace","far fa-hand-peace","fas fa-hand-point-down","far fa-hand-point-down","fas fa-hand-point-left","far fa-hand-point-left","fas fa-hand-point-right","far fa-hand-point-right","fas fa-hand-point-up","far fa-hand-point-up","fas fa-hand-pointer","far fa-hand-pointer","fas fa-hand-rock","far fa-hand-rock","fas fa-hand-scissors","far fa-hand-scissors","fas fa-hand-spock","far fa-hand-spock","fas fa-hands","fas fa-hands-helping","fas fa-handshake","far fa-handshake","fas fa-hanukiah","fas fa-hashtag","fas fa-hat-wizard","fas fa-haykal","fas fa-hdd","far fa-hdd","fas fa-heading","fas fa-headphones","fas fa-headphones-alt","fas fa-headset","fas fa-heart","far fa-heart","fas fa-heartbeat","fas fa-helicopter","fas fa-highlighter","fas fa-hiking","fas fa-hippo","fab fa-hips","fab fa-hire-a-helper","fas fa-history","fas fa-hockey-puck","fas fa-home","fab fa-hooli","fab fa-hornbill","fas fa-horse","fas fa-hospital","far fa-hospital","fas fa-hospital-alt","fas fa-hospital-symbol","fas fa-hot-tub","fas fa-hotel","fab fa-hotjar","fas fa-hourglass","far fa-hourglass","fas fa-hourglass-end","fas fa-hourglass-half","fas fa-hourglass-start","fas fa-house-damage","fab fa-houzz","fas fa-hryvnia","fab fa-html5","fab fa-hubspot","fas fa-i-cursor","fas fa-id-badge","far fa-id-badge","fas fa-id-card","far fa-id-card","fas fa-id-card-alt","fas fa-image","far fa-image","fas fa-images","far fa-images","fab fa-imdb","fas fa-inbox","fas fa-indent","fas fa-industry","fas fa-infinity","fas fa-info","fas fa-info-circle","fab fa-instagram","fab fa-internet-explorer","fab fa-ioxhost","fas fa-italic","fab fa-itunes","fab fa-itunes-note","fab fa-java","fas fa-jedi","fab fa-jedi-order","fab fa-jenkins","fab fa-joget","fas fa-joint","fab fa-joomla","fas fa-journal-whills","fab fa-js","fab fa-js-square","fab fa-jsfiddle","fas fa-kaaba","fab fa-kaggle","fas fa-key","fab fa-keybase","fas fa-keyboard","far fa-keyboard","fab fa-keycdn","fas fa-khanda","fab fa-kickstarter","fab fa-kickstarter-k","fas fa-kiss","far fa-kiss","fas fa-kiss-beam","far fa-kiss-beam","fas fa-kiss-wink-heart","far fa-kiss-wink-heart","fas fa-kiwi-bird","fab fa-korvue","fas fa-landmark","fas fa-language","fas fa-laptop","fas fa-laptop-code","fab fa-laravel","fab fa-lastfm","fab fa-lastfm-square","fas fa-laugh","far fa-laugh","fas fa-laugh-beam","far fa-laugh-beam","fas fa-laugh-squint","far fa-laugh-squint","fas fa-laugh-wink","far fa-laugh-wink","fas fa-layer-group","fas fa-leaf","fab fa-leanpub","fas fa-lemon","far fa-lemon","fab fa-less","fas fa-less-than","fas fa-less-than-equal","fas fa-level-down-alt","fas fa-level-up-alt","fas fa-life-ring","far fa-life-ring","fas fa-lightbulb","far fa-lightbulb","fab fa-line","fas fa-link","fab fa-linkedin","fab fa-linkedin-in","fab fa-linode","fab fa-linux","fas fa-lira-sign","fas fa-list","fas fa-list-alt","far fa-list-alt","fas fa-list-ol","fas fa-list-ul","fas fa-location-arrow","fas fa-lock","fas fa-lock-open","fas fa-long-arrow-alt-down","fas fa-long-arrow-alt-left","fas fa-long-arrow-alt-right","fas fa-long-arrow-alt-up","fas fa-low-vision","fas fa-luggage-cart","fab fa-lyft","fab fa-magento","fas fa-magic","fas fa-magnet","fas fa-mail-bulk","fab fa-mailchimp","fas fa-male","fab fa-mandalorian","fas fa-map","far fa-map","fas fa-map-marked","fas fa-map-marked-alt","fas fa-map-marker","fas fa-map-marker-alt","fas fa-map-pin","fas fa-map-signs","fab fa-markdown","fas fa-marker","fas fa-mars","fas fa-mars-double","fas fa-mars-stroke","fas fa-mars-stroke-h","fas fa-mars-stroke-v","fas fa-mask","fab fa-mastodon","fab fa-maxcdn","fas fa-medal","fab fa-medapps","fab fa-medium","fab fa-medium-m","fas fa-medkit","fab fa-medrt","fab fa-meetup","fab fa-megaport","fas fa-meh","far fa-meh","fas fa-meh-blank","far fa-meh-blank","fas fa-meh-rolling-eyes","far fa-meh-rolling-eyes","fas fa-memory","fas fa-menorah","fas fa-mercury","fas fa-meteor","fas fa-microchip","fas fa-microphone","fas fa-microphone-alt","fas fa-microphone-alt-slash","fas fa-microphone-slash","fas fa-microscope","fab fa-microsoft","fas fa-minus","fas fa-minus-circle","fas fa-minus-square","far fa-minus-square","fab fa-mix","fab fa-mixcloud","fab fa-mizuni","fas fa-mobile","fas fa-mobile-alt","fab fa-modx","fab fa-monero","fas fa-money-bill","fas fa-money-bill-alt","far fa-money-bill-alt","fas fa-money-bill-wave","fas fa-money-bill-wave-alt","fas fa-money-check","fas fa-money-check-alt","fas fa-monument","fas fa-moon","far fa-moon","fas fa-mortar-pestle","fas fa-mosque","fas fa-motorcycle","fas fa-mountain","fas fa-mouse-pointer","fas fa-music","fab fa-napster","fab fa-neos","fas fa-network-wired","fas fa-neuter","fas fa-newspaper","far fa-newspaper","fab fa-nimblr","fab fa-nintendo-switch","fab fa-node","fab fa-node-js","fas fa-not-equal","fas fa-notes-medical","fab fa-npm","fab fa-ns8","fab fa-nutritionix","fas fa-object-group","far fa-object-group","fas fa-object-ungroup","far fa-object-ungroup","fab fa-odnoklassniki","fab fa-odnoklassniki-square","fas fa-oil-can","fab fa-old-republic","fas fa-om","fab fa-opencart","fab fa-openid","fab fa-opera","fab fa-optin-monster","fab fa-osi","fas fa-otter","fas fa-outdent","fab fa-page4","fab fa-pagelines","fas fa-paint-brush","fas fa-paint-roller","fas fa-palette","fab fa-palfed","fas fa-pallet","fas fa-paper-plane","far fa-paper-plane","fas fa-paperclip","fas fa-parachute-box","fas fa-paragraph","fas fa-parking","fas fa-passport","fas fa-pastafarianism","fas fa-paste","fab fa-patreon","fas fa-pause","fas fa-pause-circle","far fa-pause-circle","fas fa-paw","fab fa-paypal","fas fa-peace","fas fa-pen","fas fa-pen-alt","fas fa-pen-fancy","fas fa-pen-nib","fas fa-pen-square","fas fa-pencil-alt","fas fa-pencil-ruler","fab fa-penny-arcade","fas fa-people-carry","fas fa-percent","fas fa-percentage","fab fa-periscope","fas fa-person-booth","fab fa-phabricator","fab fa-phoenix-framework","fab fa-phoenix-squadron","fas fa-phone","fas fa-phone-slash","fas fa-phone-square","fas fa-phone-volume","fab fa-php","fab fa-pied-piper","fab fa-pied-piper-alt","fab fa-pied-piper-hat","fab fa-pied-piper-pp","fas fa-piggy-bank","fas fa-pills","fab fa-pinterest","fab fa-pinterest-p","fab fa-pinterest-square","fas fa-place-of-worship","fas fa-plane","fas fa-plane-arrival","fas fa-plane-departure","fas fa-play","fas fa-play-circle","far fa-play-circle","fab fa-playstation","fas fa-plug","fas fa-plus","fas fa-plus-circle","fas fa-plus-square","far fa-plus-square","fas fa-podcast","fas fa-poll","fas fa-poll-h","fas fa-poo","fas fa-poo-storm","fas fa-poop","fas fa-portrait","fas fa-pound-sign","fas fa-power-off","fas fa-pray","fas fa-praying-hands","fas fa-prescription","fas fa-prescription-bottle","fas fa-prescription-bottle-alt","fas fa-print","fas fa-procedures","fab fa-product-hunt","fas fa-project-diagram","fab fa-pushed","fas fa-puzzle-piece","fab fa-python","fab fa-qq","fas fa-qrcode","fas fa-question","fas fa-question-circle","far fa-question-circle","fas fa-quidditch","fab fa-quinscape","fab fa-quora","fas fa-quote-left","fas fa-quote-right","fas fa-quran","fab fa-r-project","fas fa-rainbow","fas fa-random","fab fa-ravelry","fab fa-react","fab fa-reacteurope","fab fa-readme","fab fa-rebel","fas fa-receipt","fas fa-recycle","fab fa-red-river","fab fa-reddit","fab fa-reddit-alien","fab fa-reddit-square","fas fa-redo","fas fa-redo-alt","fas fa-registered","far fa-registered","fab fa-renren","fas fa-reply","fas fa-reply-all","fab fa-replyd","fas fa-republican","fab fa-researchgate","fab fa-resolving","fas fa-retweet","fab fa-rev","fas fa-ribbon","fas fa-ring","fas fa-road","fas fa-robot","fas fa-rocket","fab fa-rocketchat","fab fa-rockrms","fas fa-route","fas fa-rss","fas fa-rss-square","fas fa-ruble-sign","fas fa-ruler","fas fa-ruler-combined","fas fa-ruler-horizontal","fas fa-ruler-vertical","fas fa-running","fas fa-rupee-sign","fas fa-sad-cry","far fa-sad-cry","fas fa-sad-tear","far fa-sad-tear","fab fa-safari","fab fa-sass","fas fa-save","far fa-save","fab fa-schlix","fas fa-school","fas fa-screwdriver","fab fa-scribd","fas fa-scroll","fas fa-search","fas fa-search-dollar","fas fa-search-location","fas fa-search-minus","fas fa-search-plus","fab fa-searchengin","fas fa-seedling","fab fa-sellcast","fab fa-sellsy","fas fa-server","fab fa-servicestack","fas fa-shapes","fas fa-share","fas fa-share-alt","fas fa-share-alt-square","fas fa-share-square","far fa-share-square","fas fa-shekel-sign","fas fa-shield-alt","fas fa-ship","fas fa-shipping-fast","fab fa-shirtsinbulk","fas fa-shoe-prints","fas fa-shopping-bag","fas fa-shopping-basket","fas fa-shopping-cart","fab fa-shopware","fas fa-shower","fas fa-shuttle-van","fas fa-sign","fas fa-sign-in-alt","fas fa-sign-language","fas fa-sign-out-alt","fas fa-signal","fas fa-signature","fab fa-simplybuilt","fab fa-sistrix","fas fa-sitemap","fab fa-sith","fas fa-skull","fas fa-skull-crossbones","fab fa-skyatlas","fab fa-skype","fab fa-slack","fab fa-slack-hash","fas fa-slash","fas fa-sliders-h","fab fa-slideshare","fas fa-smile","far fa-smile","fas fa-smile-beam","far fa-smile-beam","fas fa-smile-wink","far fa-smile-wink","fas fa-smog","fas fa-smoking","fas fa-smoking-ban","fab fa-snapchat","fab fa-snapchat-ghost","fab fa-snapchat-square","fas fa-snowflake","far fa-snowflake","fas fa-socks","fas fa-solar-panel","fas fa-sort","fas fa-sort-alpha-down","fas fa-sort-alpha-up","fas fa-sort-amount-down","fas fa-sort-amount-up","fas fa-sort-down","fas fa-sort-numeric-down","fas fa-sort-numeric-up","fas fa-sort-up","fab fa-soundcloud","fas fa-spa","fas fa-space-shuttle","fab fa-speakap","fas fa-spider","fas fa-spinner","fas fa-splotch","fab fa-spotify","fas fa-spray-can","fas fa-square","far fa-square","fas fa-square-full","fas fa-square-root-alt","fab fa-squarespace","fab fa-stack-exchange","fab fa-stack-overflow","fas fa-stamp","fas fa-star","far fa-star","fas fa-star-and-crescent","fas fa-star-half","far fa-star-half","fas fa-star-half-alt","fas fa-star-of-david","fas fa-star-of-life","fab fa-staylinked","fab fa-steam","fab fa-steam-square","fab fa-steam-symbol","fas fa-step-backward","fas fa-step-forward","fas fa-stethoscope","fab fa-sticker-mule","fas fa-sticky-note","far fa-sticky-note","fas fa-stop","fas fa-stop-circle","far fa-stop-circle","fas fa-stopwatch","fas fa-store","fas fa-store-alt","fab fa-strava","fas fa-stream","fas fa-street-view","fas fa-strikethrough","fab fa-stripe","fab fa-stripe-s","fas fa-stroopwafel","fab fa-studiovinari","fab fa-stumbleupon","fab fa-stumbleupon-circle","fas fa-subscript","fas fa-subway","fas fa-suitcase","fas fa-suitcase-rolling","fas fa-sun","far fa-sun","fab fa-superpowers","fas fa-superscript","fab fa-supple","fas fa-surprise","far fa-surprise","fas fa-swatchbook","fas fa-swimmer","fas fa-swimming-pool","fas fa-synagogue","fas fa-sync","fas fa-sync-alt","fas fa-syringe","fas fa-table","fas fa-table-tennis","fas fa-tablet","fas fa-tablet-alt","fas fa-tablets","fas fa-tachometer-alt","fas fa-tag","fas fa-tags","fas fa-tape","fas fa-tasks","fas fa-taxi","fab fa-teamspeak","fas fa-teeth","fas fa-teeth-open","fab fa-telegram","fab fa-telegram-plane","fas fa-temperature-high","fas fa-temperature-low","fab fa-tencent-weibo","fas fa-terminal","fas fa-text-height","fas fa-text-width","fas fa-th","fas fa-th-large","fas fa-th-list","fab fa-the-red-yeti","fas fa-theater-masks","fab fa-themeco","fab fa-themeisle","fas fa-thermometer","fas fa-thermometer-empty","fas fa-thermometer-full","fas fa-thermometer-half","fas fa-thermometer-quarter","fas fa-thermometer-three-quarters","fab fa-think-peaks","fas fa-thumbs-down","far fa-thumbs-down","fas fa-thumbs-up","far fa-thumbs-up","fas fa-thumbtack","fas fa-ticket-alt","fas fa-times","fas fa-times-circle","far fa-times-circle","fas fa-tint","fas fa-tint-slash","fas fa-tired","far fa-tired","fas fa-toggle-off","fas fa-toggle-on","fas fa-toilet-paper","fas fa-toolbox","fas fa-tooth","fas fa-torah","fas fa-torii-gate","fas fa-tractor","fab fa-trade-federation","fas fa-trademark","fas fa-traffic-light","fas fa-train","fas fa-transgender","fas fa-transgender-alt","fas fa-trash","fas fa-trash-alt","far fa-trash-alt","fas fa-tree","fab fa-trello","fab fa-tripadvisor","fas fa-trophy","fas fa-truck","fas fa-truck-loading","fas fa-truck-monster","fas fa-truck-moving","fas fa-truck-pickup","fas fa-tshirt","fas fa-tty","fab fa-tumblr","fab fa-tumblr-square","fas fa-tv","fab fa-twitch","fab fa-twitter","fab fa-twitter-square","fab fa-typo3","fab fa-uber","fab fa-uikit","fas fa-umbrella","fas fa-umbrella-beach","fas fa-underline","fas fa-undo","fas fa-undo-alt","fab fa-uniregistry","fas fa-universal-access","fas fa-university","fas fa-unlink","fas fa-unlock","fas fa-unlock-alt","fab fa-untappd","fas fa-upload","fab fa-usb","fas fa-user","far fa-user","fas fa-user-alt","fas fa-user-alt-slash","fas fa-user-astronaut","fas fa-user-check","fas fa-user-circle","far fa-user-circle","fas fa-user-clock","fas fa-user-cog","fas fa-user-edit","fas fa-user-friends","fas fa-user-graduate","fas fa-user-injured","fas fa-user-lock","fas fa-user-md","fas fa-user-minus","fas fa-user-ninja","fas fa-user-plus","fas fa-user-secret","fas fa-user-shield","fas fa-user-slash","fas fa-user-tag","fas fa-user-tie","fas fa-user-times","fas fa-users","fas fa-users-cog","fab fa-ussunnah","fas fa-utensil-spoon","fas fa-utensils","fab fa-vaadin","fas fa-vector-square","fas fa-venus","fas fa-venus-double","fas fa-venus-mars","fab fa-viacoin","fab fa-viadeo","fab fa-viadeo-square","fas fa-vial","fas fa-vials","fab fa-viber","fas fa-video","fas fa-video-slash","fas fa-vihara","fab fa-vimeo","fab fa-vimeo-square","fab fa-vimeo-v","fab fa-vine","fab fa-vk","fab fa-vnv","fas fa-volleyball-ball","fas fa-volume-down","fas fa-volume-mute","fas fa-volume-off","fas fa-volume-up","fas fa-vote-yea","fas fa-vr-cardboard","fab fa-vuejs","fas fa-walking","fas fa-wallet","fas fa-warehouse","fas fa-water","fab fa-weebly","fab fa-weibo","fas fa-weight","fas fa-weight-hanging","fab fa-weixin","fab fa-whatsapp","fab fa-whatsapp-square","fas fa-wheelchair","fab fa-whmcs","fas fa-wifi","fab fa-wikipedia-w","fas fa-wind","fas fa-window-close","far fa-window-close","fas fa-window-maximize","far fa-window-maximize","fas fa-window-minimize","far fa-window-minimize","fas fa-window-restore","far fa-window-restore","fab fa-windows","fas fa-wine-bottle","fas fa-wine-glass","fas fa-wine-glass-alt","fab fa-wix","fab fa-wizards-of-the-coast","fab fa-wolf-pack-battalion","fas fa-won-sign","fab fa-wordpress","fab fa-wordpress-simple","fab fa-wpbeginner","fab fa-wpexplorer","fab fa-wpforms","fab fa-wpressr","fas fa-wrench","fas fa-x-ray","fab fa-xbox","fab fa-xing","fab fa-xing-square","fab fa-y-combinator","fab fa-yahoo","fab fa-yandex","fab fa-yandex-international","fab fa-yelp","fas fa-yen-sign","fas fa-yin-yang","fab fa-yoast","fab fa-youtube","fab fa-youtube-square","fab fa-zhihu"]}}),jQuery(function($){WPGMZA.Gallery=function(items,feature,fullSize){this.guid=WPGMZA.guid();var settings=this.parseFeatureSettings(feature);this.config=this.parseConfig(settings,fullSize),this.config.feature=feature,this.element=$("<div class='wpgmza-gallery' id='"+this.guid+"'/>"),this.stage=$("<div class='wpgmza-gallery-stage'/>"),this.index=0,this.sources=[],items&&items instanceof Array&&(this.sources=items),this.prepare(),this.element.append(this.stage),this.config.navigation&&1<this.sources.length&&(this.navigation={left:$("<div class='navigation left' />"),right:$("<div class='navigation right' />")},this.element.append(this.navigation.left),this.element.append(this.navigation.right)),this.bindEvents()},WPGMZA.Gallery.prototype.bindEvents=function(){var self=this;this.element.on("mouseenter",function(){self.hasFocus=!0}),this.element.on("mouseleave",function(){self.hasFocus=!1}),this.element.on("click",".navigation",function(){$(this).hasClass("left")?self.previous():self.next()}),this.element.on("click",".wpgmza-gallery-item",function(){self.lightbox()}),this.config.autoplay&&1<this.sources.length&&(this.interval=setInterval(function(){self.ticker()},this.config.timer))},WPGMZA.Gallery.prototype.parseConfig=function(settings,fullSize){var config={autoplay:!0,timer:5e3,pauseOnFocus:!0,resize:!0,navigation:!0,lightbox:!0};if(fullSize&&(config.fullSize=!0),settings&&settings instanceof Object)for(var i in settings)config[i]&&(config[i]=settings[i]);return config},WPGMZA.Gallery.prototype.parseFeatureSettings=function(feature){var settings={};if(void 0!==feature._internal)return feature;var originalKey,remap={disable_lightbox_images:"lightbox"};for(originalKey in remap){var remappedKey=remap[originalKey];let remappedValue=!1;feature&&feature.map&&feature.map.settings&&feature.map.settings[originalKey]&&(remappedValue=feature.map.settings[originalKey]),(remappedValue=WPGMZA.settings&&WPGMZA.settings[originalKey]?WPGMZA.settings[originalKey]:remappedValue)&&(settings[remappedKey]="lightbox"!==remappedKey&&remappedValue)}return settings},WPGMZA.Gallery.prototype.prepare=function(){if(WPGMZA.settings&&WPGMZA.settings.infoWindowImageResizing&&WPGMZA.settings.infoWindowImageHeight&&this.stage.css("--wpgmza-gallery-stage-dynamic-height",parseInt(WPGMZA.settings.infoWindowImageHeight)+"px"),0<this.sources.length)for(var i in this.sources){i=this.sources[i];if(void 0!==i.url&&"string"==typeof i.url||i.thumbnail&&(i.url=i.thumbnail),i.url){let imageUrl=i.url;imageUrl instanceof Array&&(imageUrl=imageUrl.shift()),!this.config.fullSize&&i.thumbnail&&"string"==typeof i.thumbnail&&(imageUrl=i.thumbnail);var i=$("<div class='wpgmza-gallery-item'/>"),img=$("<img/>").attr("src",imageUrl);WPGMZA.settings&&WPGMZA.settings.infoWindowImageResizing&&(WPGMZA.settings.infoWindowImageWidth&&img.css("max-width",parseInt(WPGMZA.settings.infoWindowImageWidth)+"px"),WPGMZA.settings.infoWindowImageHeight)&&img.css("max-height",parseInt(WPGMZA.settings.infoWindowImageHeight)+"px"),i.append(img),this.stage.append(i),img.on("load",()=>{this.resize()})}}},WPGMZA.Gallery.prototype.ticker=function(){this.config.pauseOnFocus&&this.hasFocus||this.next()},WPGMZA.Gallery.prototype.next=function(){this.move(this.index+1)},WPGMZA.Gallery.prototype.previous=function(){this.move(this.index-1)},WPGMZA.Gallery.prototype.move=function(index){this.index=index,this.index>=this.sources.length?this.index=0:this.index<0&&(this.index=this.sources.length-1),this.stage.css("--wpgmza-gallery-index",this.index),this.resize()},WPGMZA.Gallery.prototype.place=function(container){var self=this;if(container){$(container).find(".wpgmza-gallery").remove(),$(container).append(this.element),setTimeout(function(){self.resize()},10);try{this.element.get(0).__wpgmzaGallery=this}catch(ex){}}},WPGMZA.Gallery.prototype.resize=function(){var imageHeight;this.config.resize&&(imageHeight=this.stage.find(".wpgmza-gallery-item:nth-child("+(this.index+1)+")").find("img").height()+"px",this.stage.css("max-height",imageHeight),this.stage.css("--wpgmza-gallery-stage-dynamic-height",imageHeight))},WPGMZA.Gallery.prototype.lightbox=function(){var wrap,inner,settings;!this.config.lightbox||WPGMZA.is_admin&&parseInt(WPGMZA.is_admin)||(wrap=$('<div class="wpgmza-gallery-lightbox" />'),inner=$('<div class="wpgmza-gallery-lightbox-inner" />'),wrap.append(inner),(settings=Object.assign({},this.config)).lightbox=!1,settings.autoplay=!1,settings._internal=!0,this.lightboxElement=new WPGMZA.Gallery(this.sources,settings,!0),this.lightboxElement.place(inner),this.lightboxElement.move(this.index),wrap.on("click",function(event){event.target.classList.contains("wpgmza-gallery-lightbox")&&wrap.remove()}),$(document.body).append(wrap),this.config.feature&&this.config.feature.map&&this.config.feature.map.isFullScreen()&&(settings="google-maps"===WPGMZA.settings.engine?this.config.feature.map.element.firstChild:this.config.feature.map.element,wrap.appendTo(settings)))}}),jQuery(function($){WPGMZA.Heatmap=function(options){WPGMZA.assertInstanceOf(this,"EventDispatcher"),options=options||{},this.name="",this.radius=20,this.opacity=.5;options.gradient&&"default"!=options.gradient&&("string"==typeof options.gradient?options.gradient=JSON.parse(options.gradient):"array"!=typeof options.gradient&&console.warn("Ignoring invalid gradient")),"default"==options.gradient&&delete options.gradient,WPGMZA.Feature.apply(this,arguments),this.dataset instanceof Array||(this.dataset=[this.dataset])},WPGMZA.Heatmap.prototype=Object.create(WPGMZA.Feature.prototype),WPGMZA.Heatmap.prototype.constructor=WPGMZA.Heatmap,WPGMZA.Heatmap.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.GoogleHeatmap:WPGMZA.OLHeatmap},WPGMZA.Heatmap.createInstance=function(row){return new(WPGMZA.Heatmap.getConstructor())(row)},WPGMZA.Heatmap.createEditableMarker=function(options){function callback(){marker.setIcon(WPGMZA.heatmapIcon),marker.off("added",callback)}var options=$.extend({draggable:!0},options),marker=WPGMZA.Marker.createInstance(options);return marker.on("added",callback),options.heatmap&&options.heatmap.markers.push(marker),marker},WPGMZA.Heatmap.prototype.setEditable=function(editable){var map,self=this;this.markers&&(this.markers.forEach(function(marker){marker.map.removeMarker(marker)}),delete this.markers),this._prevMap&&delete this._prevMap,editable&&(this.markers=[],this.dataset.forEach(function(latLng){latLng={lat:latLng.lat,lng:latLng.lng,heatmap:self},latLng=WPGMZA.Heatmap.createEditableMarker(latLng);self.map.addMarker(latLng)}),this._clickCallback=function(event){self.onClick(event)},this._dragEndCallback=function(event){self.onDragEnd(event)},this._mouseDownCallback=function(event){self.onMapMouseDown(event)},this._mouseMoveCallback=function(event){self.onMapMouseMove(event)},this._mouseUpCallback=function(event){self.onWindowMouseUp(event)},(map=this.map).on("click",this._clickCallback),map.on("dragend",this._dragEndCallback),$(map.element).on("mousedown",this._mouseDownCallback),$(map.element).on("mousemove",this._mouseMoveCallback),$(window).on("mouseup",function(event){self.onWindowMouseUp(event)}),map.on("heatmapremoved",function(event){event.heatmap===self&&(map.off("click",self._clickCallback),map.off("dragend",self._dragEndCallback),$(map.element).off("mousedown",self._mouseDownCallback),$(map.element).off("mousemove",self._mouseMoveCallback),$(window).off("mouseup",this._mouseUpCallback))}))},WPGMZA.Heatmap.prototype.updateDatasetFromMarkers=function(){var dataset=[];this.markers.forEach(function(marker){dataset.push(marker.getPosition())}),this.dataset=dataset},WPGMZA.Heatmap.prototype.onClick=function(event){var index;event.target instanceof WPGMZA.Marker&&event.target.heatmap===this?(index=this.markers.indexOf(event.target),this.markers.splice(index,1),this.map.removeMarker(event.target),this.updateDatasetFromMarkers(),this.trigger("change")):event.target instanceof WPGMZA.Map&&(index={lat:event.latLng.lat,lng:event.latLng.lng,heatmap:this},event=WPGMZA.Heatmap.createEditableMarker(index),this.map.addMarker(event),this.updateDatasetFromMarkers(),this.trigger("change"))},WPGMZA.Heatmap.prototype.onDragEnd=function(event){event.target instanceof WPGMZA.Marker&&this.markers&&-1!=this.markers.indexOf(event.target)&&(this.updateDatasetFromMarkers(),this.trigger("change"))},WPGMZA.Heatmap.prototype.getGeometry=function(){return this.dataset},WPGMZA.Heatmap.prototype.onMapMouseDown=function(event){if(2==event.button)return this._rightMouseDown=!0,event.preventDefault(),!1},WPGMZA.Heatmap.prototype.onWindowMouseUp=function(event){2==event.button&&(this._rightMouseDown=!1)},WPGMZA.Heatmap.prototype.onMapMouseMove=function(event){this._rightMouseDown&&(event={x:event.pageX-$(this.map.element).offset().left,y:event.pageY-$(this.map.element).offset().top},event={lat:(event=this.map.pixelsToLatLng(event)).lat,lng:event.lng,heatmap:this},event=WPGMZA.Heatmap.createEditableMarker(event),this.map.addMarker(event),this.updateDatasetFromMarkers(),this.trigger("change"))}}),jQuery(function($){WPGMZA.ImageInputSingle=function(element,options){if(!(element instanceof HTMLInputElement))throw new Error("Element is not an instance of HTMLInputElement");this.element=$(element),this.type=element.type,this.value=element.value,this.wrap(),this.bindEvents(),this.parseImage(this.value)},WPGMZA.extend(WPGMZA.ImageInputSingle,WPGMZA.EventDispatcher),WPGMZA.ImageInputSingle.createInstance=function(element){return new WPGMZA.ImageInputSingle(element)},WPGMZA.ImageInputSingle.prototype.wrap=function(){if(!this.element||"text"!==this.type)throw new Error("WPGMZA.ImageInputSingle requires a text field as a base");this.element.hide(),this.container=$("<div class='wpgmza-image-single-input-wrapper' />"),this.imageFrame=$("<div class='wpgmza-image-single-input-preview' />"),this.image=$("<img />"),this.placeholder=$("<div />"),this.placeholder.append('<i class="fa fa-camera"></i>'),this.container.insertAfter(this.element),this.container.append(this.element),this.container.append(this.imageFrame)},WPGMZA.ImageInputSingle.prototype.bindEvents=function(){this.imageFrame.on("click",event=>{this.onOpenMediaPicker()}),this.element.on("change",event=>{this.value=this.element.val(),this.parseImage(this.value)})},WPGMZA.ImageInputSingle.prototype.onOpenMediaPicker=function(){this.hasDependencies()&&WPGMZA.openMediaDialog((mediaId,mediaUrl)=>{mediaUrl&&(this.value=mediaUrl,this.commit())})},WPGMZA.ImageInputSingle.prototype.parseImage=function(url){this.placeholder.remove(),this.image.remove(),0<url.trim().length?(this.image.on("load",()=>{$(this.element).trigger("imagechange")}),this.image.attr("src",url.trim()),this.imageFrame.append(this.image)):this.imageFrame.append(this.placeholder)},WPGMZA.ImageInputSingle.prototype.commit=function(){this.element.val(this.value),this.element.trigger("change")},WPGMZA.ImageInputSingle.prototype.hasDependencies=function(){return"undefined"!=typeof wp&&void 0!==wp.media&&void 0!==WPGMZA.openMediaDialog},$(document.body).ready(function(){$("input.wpgmza-image-single-input").each(function(index,el){el.wpgmzaImageInputSingle=WPGMZA.ImageInputSingle.createInstance(el)})})}),jQuery(function($){WPGMZA.Imageoverlay=function(options,imageoverlay){var map,self=this;WPGMZA.assertInstanceOf(this,"Imageoverlay"),(options=options||{}).map?this.map=options.map:!options.map&&options.map_id&&(map=WPGMZA.getMapByID(options.map_id))&&(this.map=map),WPGMZA.Feature.apply(this,arguments),this.on("change",function(){self.redraw()})},WPGMZA.Imageoverlay.prototype=Object.create(WPGMZA.Feature.prototype),WPGMZA.Imageoverlay.prototype.constructor=WPGMZA.Imageoverlay,Object.defineProperty(WPGMZA.Imageoverlay.prototype,"map",{enumerable:!0,get:function(){return this._map||null},set:function(a){a||this.destroy(),this._map=a}}),Object.defineProperty(WPGMZA.Imageoverlay.prototype,"image",{enumerable:!0,get:function(){return this._image||null},set:function(a){this._image=a,this.trigger("change")}}),Object.defineProperty(WPGMZA.Imageoverlay.prototype,"opacity",{enumerable:!0,get:function(){return this._opacity||null},set:function(a){this._opacity=parseFloat(a),this.trigger("change")}}),WPGMZA.Imageoverlay.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.GoogleImageoverlay:WPGMZA.OLImageoverlay},WPGMZA.Imageoverlay.createInstance=function(options,imageoverlay){return new(WPGMZA.Imageoverlay.getConstructor())(options,imageoverlay)},WPGMZA.Imageoverlay.prototype.getMap=function(){return this.map},WPGMZA.Imageoverlay.prototype.setMap=function(map){this.map&&this.map.removeImageoverlay(this),map&&map.addImageoverlay(this)},WPGMZA.Imageoverlay.prototype.redraw=function(){},WPGMZA.Imageoverlay.prototype.destroy=function(){}}),jQuery(function($){WPGMZA.LegacyJSONConverter=function(){},WPGMZA.LegacyJSONConverter.prototype.convert=function(json){var key,markers=[];for(key in json="string"==typeof json?JSON.parse(json):json){var data={map_id:json.map_id,marker_id:json.marker_id,title:json.title,address:json.address,icon:json.icon,pic:json.pic,desc:json.desc,linkd:json.linkd,anim:json.anim,retina:json.retina,category:json.category,lat:json.lat,lng:json.lng,infoopen:json.infoopen};markers[data.marker_id]=data}return markers}}),jQuery(function($){"wizard"==WPGMZA.currentPage&&(WPGMZA.MapWizard=function(){var self=this;this.element=$(document.body).find(".wpgmza-wizard-steps"),this.element.length<=0||(this.step=0,this.max=0,this.findMax(),this.geocoder=WPGMZA.Geocoder.createInstance(),$(this.element).on("click",".next-step-button",function(event){self.next()}),$(this.element).on("keypress",function(event){13==event.which&&self.next()}),$(this.element).on("click",".prev-step-button",function(event){self.prev()}),this.prepareAddressFields(),this.loadStep(this.step))},WPGMZA.extend(WPGMZA.MapWizard,WPGMZA.EventDispatcher),WPGMZA.MapWizard.createInstance=function(){return new WPGMZA.MapWizard},WPGMZA.MapWizard.prototype.findMax=function(){var self=this;$(this.element).find(".step").each(function(){parseInt($(this).data("step"))>self.max&&(self.max=parseInt($(this).data("step")))})},WPGMZA.MapWizard.prototype.prepareAddressFields=function(){$(this.element).find("input.wpgmza-address").each(function(index,el){el.addressInput=WPGMZA.AddressInput.createInstance(el,null)})},WPGMZA.MapWizard.prototype.next=function(){this.step<this.max?this.loadStep(this.step+1):this.complete()},WPGMZA.MapWizard.prototype.prev=function(){0<this.step&&this.loadStep(this.step-1)},WPGMZA.MapWizard.prototype.loadStep=function(index){$(this.element).find(".step").removeClass("active"),$(this.element).find('.step[data-step="'+index+'"]').addClass("active"),this.step=index,0===this.step?$(this.element).find(".prev-step-button").addClass("wpgmza-hidden"):$(this.element).find(".prev-step-button").removeClass("wpgmza-hidden"),this.step===this.max?$(this.element).find(".next-step-button span").text($(this.element).find(".next-step-button").data("final")):$(this.element).find(".next-step-button span").text($(this.element).find(".next-step-button").data("next")),this.autoFocus()},WPGMZA.MapWizard.prototype.getActiveBlock=function(){return $(this.element).find('.step[data-step="'+this.step+'"]')},WPGMZA.MapWizard.prototype.autoFocus=function(){var block=this.getActiveBlock();block&&(0<block.find("input").length?block.find("input")[0].focus():0<block.find("select").length&&block.find("select")[0].focus())},WPGMZA.MapWizard.prototype.complete=function(){$(this.element).find(".step").removeClass("active"),$(this.element).find(".step-controller").addClass("wpgmza-hidden"),$(this.element).find(".step-loader").removeClass("wpgmza-hidden"),this.prepareMap()},WPGMZA.MapWizard.prototype.getData=function(){var data={map_title:WPGMZA.localized_strings.new_map,map_start_lat:36.778261,map_start_lng:-119.4179323999,map_start_zoom:3};return $(this.element).find(".step").each(function(){$(this).find("input,select").each(function(){var value,name=$(this).attr("name");name&&""!==name.trim()&&""!==(value=$(this).val()).trim()&&(data[name.trim()]=value.trim())})}),data},WPGMZA.MapWizard.prototype.prepareMap=function(){var name,self=this,filteredData={},parsedData=this.getData(),mapAddress=!1,firstMarker=!1;for(name in parsedData)switch(name){case"map_start_address":mapAddress=parsedData[name];break;case"first_marker":firstMarker=parsedData[name];break;default:filteredData[name]=parsedData[name]}!1!==mapAddress?this.geocoder.getLatLngFromAddress({address:mapAddress},function(results,status){status==WPGMZA.Geocoder.SUCCESS&&(status=new WPGMZA.LatLng(results[0].latLng),filteredData.map_start_lat=status.lat,filteredData.map_start_lng=status.lng),self.createMap(filteredData,firstMarker)}):self.createMap(filteredData,firstMarker)},WPGMZA.MapWizard.prototype.createMap=function(data,firstMarker){var self=this;WPGMZA.restAPI.call("/maps/",{method:"POST",data:data,success:function(response,status,xhr){var redirect="admin.php?page=wp-google-maps-menu&action=edit&map_id="+response.id;!1!==firstMarker?self.geocoder.getLatLngFromAddress({address:firstMarker},function(results,status){status==WPGMZA.Geocoder.SUCCESS?(status=new WPGMZA.LatLng(results[0].latLng),results={map_id:response.id,lat:status.lat,lng:status.lng,address:firstMarker,approved:"1"},self.createMarker(results,function(){window.location.href=window.location.href=redirect})):window.location.href=window.location.href=redirect}):window.location.href=window.location.href=redirect}})},WPGMZA.MapWizard.prototype.createMarker=function(data,callback){WPGMZA.restAPI.call("/markers/",{method:"POST",data:data,success:function(response,status,xhr){"function"==typeof callback&&callback()}})},$(document).ready(function(event){WPGMZA.mapWizard=WPGMZA.MapWizard.createInstance()}))}),jQuery(function($){WPGMZA.MarkerGalleryInput=function(input){var self=this,container=$(input).parent();container.append("<div class='wpgmza-gallery-input'><ul><li class='wpgmza-add-new-picture'><i class='fa fa-camera' aria-hidden='true'></i></li></ul></div>"),this.input=input,this.element=container.find(".wpgmza-gallery-input"),$(this.input).next("#upload_image_button").remove(),$(this.input).hide(),this.addNewPictureButton=$(this.element).find(".wpgmza-add-new-picture"),this.addNewPictureButton.on("click",function(event){self.onAddNewPictureClicked(event)}),this.templateItem=$(this.addNewPictureButton).clone(),this.templateItem.removeClass("wpgmza-add-new-picture"),this.templateItem.find("i").remove(),$(this.element).find("ul").sortable({items:"li:not(.wpgmza-add-new-picture)",stop:function(){self.onDragEnd()}}),$(document.body).on("click",".wpgmza-delete-gallery-item",function(event){self.onDeleteItem(event)})},WPGMZA.MarkerGalleryInput.prototype.populate=function(arr){if(this.clear(),arr&&arr.length)for(var i=0;i<arr.length;i++)this.addPicture(arr[i])},WPGMZA.MarkerGalleryInput.prototype.update=function(){var string=this.serialize();this.input.val(string),this.input.attr("value",string)},WPGMZA.MarkerGalleryInput.prototype.clear=function(){$(this.element).find("[data-picture-url]").remove()},WPGMZA.MarkerGalleryInput.prototype.addPicture=function(picture){var item=this.templateItem.clone(),url=picture.url;item.css({"background-image":"url('"+url+"')"}),item.attr("data-picture-url",url),item.attr("data-attachment-id",picture.attachment_id),item.insertBefore(this.addNewPictureButton),item.append($("<button type='button' class='wpgmza-delete-gallery-item'>✖</button>")),this.update()},WPGMZA.MarkerGalleryInput.prototype.serialize=function(){return JSON.stringify(this.toJSON())},WPGMZA.MarkerGalleryInput.prototype.toJSON=function(){var gallery=[];return $(this.element).find("[data-picture-url]").each(function(index,el){gallery.push({attachment_id:$(el).attr("data-attachment-id"),url:$(el).attr("data-picture-url")})}),gallery},WPGMZA.MarkerGalleryInput.prototype.onDragEnd=function(){this.update()},WPGMZA.MarkerGalleryInput.prototype.onAttachmentPicked=function(attachment_id,attachment_url){this.addPicture({attachment_id:attachment_id,url:attachment_url})},WPGMZA.MarkerGalleryInput.prototype.onAddNewPictureClicked=function(event){var self=this;WPGMZA.openMediaDialog(function(attachment_id,attachment_url){self.onAttachmentPicked(attachment_id,attachment_url)})},WPGMZA.MarkerGalleryInput.prototype.onDeleteItem=function(event){$(event.target).closest("[data-picture-url]").remove()}}),jQuery(function($){WPGMZA.MarkerGallery=function(marker,context){var preview,first,self=this,guid=WPGMZA.guid();if(this.element=$("<div class='wpgmza-empty-gallery'/>"),(this.marker=marker).gallery){if(marker.gallery.length<2)return first=marker.gallery[0],0==marker.gallery.length?void 0:(preview=first.thumbnail||first.url,preview=context.getImageElementFromURL(preview),WPGMZA.settings.disable_lightbox_images||this.marker.map.settings.disable_lightbox_images||(preview.attr("data-featherlight",first.url),context instanceof WPGMZA.ProInfoWindow&&(preview.attr("id",guid),context.on("domready",function(event){$("#"+guid).on("click",function(event){self.onFeatherLightClick(event)})}))),void(this.element=preview));this.element=$("<div class='wpgmza-marker-gallery'><div id='"+guid+"' class='owl-carousel'></div></div>"),this.carouselElement=this.element.find(".owl-carousel"),marker.gallery.forEach(function(item){self.addPicture(item,context)}),context instanceof WPGMZA.ProInfoWindow?(first=(first=context.imageWidth)||200,this.element.css({width:first+"px","max-width":first+"px",overflow:"hidden"}),this.carouselElement.css({width:first+"px","max-width":first+"px",overflow:"hidden"}),context.on("domready",function(event){$("#"+guid).owlCarousel(self.getOwlCarouselOptions()),$("#"+guid).on("click","[data-featherlight]",function(event){self.onFeatherLightClick(event)})})):context instanceof WPGMZA.CarouselMarkerListing?setTimeout(function(){var width=$(context.element).find(".owl-item").innerWidth()-40;self.element.css({width:width+"px","max-width":width+"px",overflow:"hidden"}),self.carouselElement.css({width:width+"px","max-width":width+"px",overflow:"hidden"}),$(self.carouselElement).owlCarousel(self.getOwlCarouselOptions())},1e3):setTimeout(function(){$(self.carouselElement).owlCarousel(self.getOwlCarouselOptions())},100)}},WPGMZA.MarkerGallery.prototype.getOwlCarouselOptions=function(){return{navigation:!0,pagination:!1,dots:!1,slideSpeed:3e3,paginationSpeed:400,singleItem:!0,loop:!0,items:1,autoplay:!0,autoplayTimeout:4e3}},WPGMZA.MarkerGallery.prototype.addPicture=function(item,context){var img,container=$("<div/>");item.thumbnail||(item.thumbnail=item.url),context instanceof WPGMZA.ProInfoWindow?img=context.getImageElementFromURL(item.thumbnail):(img=$("<img/>")).attr("src",item.thumbnail),img.css({float:"none"}),WPGMZA.settings.disable_lightbox_images||this.marker.map.settings.disable_lightbox_images||img.attr("data-featherlight",item.url),container.append(img),$(this.carouselElement).append(container)},WPGMZA.MarkerGallery.prototype.onFeatherLightClick=function(event){var self=this;WPGMZA.isFullScreen()&&setTimeout(function(){$($(self.marker.map.element).find(".gm-style")[0]).append($(".featherlight"))},250)},$(document).on("fullscreenchange",function(){$(".featherlight").remove()})}),jQuery(function($){WPGMZA.MarkerIconEditor=function(element){this.source=!1,this.layerModeState=!1,this.container=$(element),this.findElements(),this.bindEvents()},WPGMZA.MarkerIconEditor.prototype.findElements=function(){this.preview=this.container.find(".wpgmza-marker-icon-editor-preview canvas"),this.icons=this.container.find(".wpgmza-marker-icon-editor-list .base-icon"),this.tabs=this.container.find(".wpgmza-marker-icon-editor-tabs .inner-tab"),this.layerMode=this.container.find(".wpgmza-icon-layer-mode-wrapper select"),this.layerControls=this.container.find(".wpgmza-icon-layer-control[data-mode]"),this.layerInputs=this.container.find(".wpgmza-icon-layer-control input"),this.effectMode=this.container.find(".wpgmza-icon-effect-mode-wrapper select"),this.effectControls=this.container.find('.wpgmza-marker-icon-editor-controls input[type="range"]'),this.actions=this.container.find(".wpgmza-marker-icon-editor-actions .wpgmza-button"),this.historyToggle=this.container.find(".wpgmza-marker-icon-editor-history-toggle"),this.setRestoreState(),this.setBinding(!1),this.container.find(".icon-picker").each((index,element)=>{element.wpgmzaFaPicker=new WPGMZA.FontAwesomeIconPickerField(element)})},WPGMZA.MarkerIconEditor.prototype.bindEvents=function(){this.icons.on("click",event=>{event.preventDefault(),this.onClickIcon(event.currentTarget)}),this.actions.on("click",event=>{event.preventDefault(),this.onClickAction(event.currentTarget)}),this.tabs.on("click",event=>{event.preventDefault(),this.onClickTab(event.currentTarget)}),this.layerMode.on("change",event=>{event.preventDefault(),this.onChangeLayerMode(event.currentTarget),this.updatePreview()}),this.layerInputs.on("change input",event=>{event.preventDefault(),this.updatePreview()}),this.effectMode.on("change",event=>{event.preventDefault(),this.onChangeEffectMode(event.currentTarget)}),this.effectControls.on("change input",event=>{event.preventDefault(),this.updatePreview()}),this.historyToggle.on("click",event=>{event.preventDefault(),this.container.toggleClass("view-history")}),$(document.body).on("click",".wpgmza-marker-library",event=>{event.preventDefault(),this.onBindInput(event.currentTarget)}),$(document.body).find(".wpgmza-editor .sidebar .grouping").on("grouping-opened",event=>{this.isVisible()&&this.hide()}),$(window).on("resize",event=>{this.isVisible()&&this.autoPlace()})},WPGMZA.MarkerIconEditor.prototype.onClickIcon=function(context){var source;context instanceof HTMLElement&&(source=(context=$(context)).data("src"))&&(this.container.find(".wpgmza-marker-icon-editor-list .base-icon.selected").removeClass("selected"),context.addClass("selected"),this.setIcon(source))},WPGMZA.MarkerIconEditor.prototype.onClickAction=function(context){context instanceof HTMLElement&&(context=$(context).data("action"))&&("use"===context?this.saveIcon():this.hide())},WPGMZA.MarkerIconEditor.prototype.onClickTab=function(context){var tab;context instanceof HTMLElement&&(tab=(context=$(context)).data("tab"))&&(this.tabs.removeClass("active"),context.addClass("active"),this.container.find(".wpgmza-marker-icon-editor-tab").removeClass("active"),this.container.find('.wpgmza-marker-icon-editor-tab[data-tab="'+tab+'"]').addClass("active"))},WPGMZA.MarkerIconEditor.prototype.onBindInput=function(context){context instanceof HTMLElement&&(this.setBinding(context),this.show())},WPGMZA.MarkerIconEditor.prototype.onChangeLayerMode=function(context){context instanceof HTMLElement&&(context=$(context).val())!==this.layerModeState&&(this.layerModeState=context,this.layerControls.removeClass("active"),this.container.find('.wpgmza-icon-layer-control[data-mode="'+this.layerModeState+'"]').addClass("active"))},WPGMZA.MarkerIconEditor.prototype.onChangeEffectMode=function(context){context instanceof HTMLElement&&(context=$(context).val(),this.effectControls.removeClass("active"),this.container.find('.wpgmza-marker-icon-editor-controls input[type="range"][data-control="'+context+'"]').addClass("active"))},WPGMZA.MarkerIconEditor.prototype.setBinding=function(element){element!==this.binding&&(this.dirty=!0),this.binding=element},WPGMZA.MarkerIconEditor.prototype.setRestoreState=function(){this.layerInputs.each((index,element)=>{$(element).attr("data-restore",$(element).val())}),this.effectControls.each((index,element)=>{$(element).attr("data-restore",$(element).val())})},WPGMZA.MarkerIconEditor.prototype.setIcon=function(source){(source=source||this.getDefaultIcon())!==this.source&&(this.source=source,this.prepareCanvas(),this.updatePreview())},WPGMZA.MarkerIconEditor.prototype.getDefaultIcon=function(){let icon=this.container.find('.wpgmza-marker-icon-editor-list *[data-type="system"]');if(icon.length){var source=(icon=$(icon.get(0))).data("src");if(source)return source}return!1},WPGMZA.MarkerIconEditor.prototype.getSourceElement=function(){if(this.source){var image=this.container.find('.wpgmza-marker-icon-editor-list *[data-src="'+this.source+'"] img');if(image.length)return image.get(0)}return!1},WPGMZA.MarkerIconEditor.prototype.getSourceDimensions=function(){var imageElement,dimensions={width:27,height:43};return this.source&&(imageElement=this.getSourceElement())&&(dimensions.width=imageElement.naturalWidth,dimensions.height=imageElement.naturalHeight),dimensions},WPGMZA.MarkerIconEditor.prototype.getFilters=function(){let filters=[];return this.effectControls.each((index,elem)=>{var elem=$(elem),filter=elem.data("control"),suffix=elem.data("suffix");filter&&(filter=filter.trim()+"("+elem.val().trim()+(suffix?suffix.trim():"")+")",filters.push(filter))}),filters.length?filters.join(" "):""},WPGMZA.MarkerIconEditor.prototype.prepareControls=function(){this.container.removeClass("view-history"),this.layerInputs.each((index,element)=>{var restore=$(element).data("restore");let fallback="";var type=$(element).attr("type");switch(type){case"number":fallback=0;break;case"checkbox":$(element).prop("checked",!1).trigger("change")}"checkbox"!==type&&($(element).val(restore||fallback),$(element).trigger("change"))}),this.effectControls.each((index,element)=>{var restore=$(element).data("restore");$(element).val(restore||0),$(element).trigger("change")}),this.icons.first().trigger("click"),this.tabs.first().trigger("click"),this.layerMode.val("text"),this.layerMode.trigger("change"),this.effectMode.val("hue-rotate"),this.effectMode.trigger("change")},WPGMZA.MarkerIconEditor.prototype.prepareCanvas=function(){var canvas=this.preview.get(0),dimensions=this.getSourceDimensions();canvas.width=dimensions.width,canvas.height=dimensions.height},WPGMZA.MarkerIconEditor.prototype.updatePreview=function(){const canvas=this.preview.get(0),context=canvas.getContext("2d");context.clearRect(0,0,canvas.width,canvas.height),this.source&&(this.imageData&&this.imageData.src===this.source?(this.renderImage(canvas,context),this.renderOverlay(canvas,context)):(this.imageData=new Image,this.imageData.onload=()=>{this.renderImage(canvas,context),this.renderOverlay(canvas,context)},this.imageData.src=this.source))},WPGMZA.MarkerIconEditor.prototype.renderImage=function(canvas,context){var filters;this.imageData&&((filters=this.getFilters())&&(context.filter=filters),context.drawImage(this.imageData,0,0))},WPGMZA.MarkerIconEditor.prototype.renderOverlay=function(canvas,context){const layerOptions={};this.layerInputs.each((index,input)=>{var control=$(input).data("control");control&&("checkbox"===$(input).attr("type")?layerOptions[control]=$(input).prop("checked"):layerOptions[control]=$(input).val())}),layerOptions.size=layerOptions.size?parseInt(layerOptions.size):20;var position={x:canvas.width/2,y:canvas.width/2};switch(layerOptions.xOffset&&(position.x+=parseInt(layerOptions.xOffset)),layerOptions.yOffset&&(position.y+=parseInt(layerOptions.yOffset)),this.layerModeState){case"text":layerOptions.content.trim().length&&(context.textAlign="center",context.textBaseline="middle",context.font=layerOptions.size+"px sans-serif",context.fillStyle=layerOptions.invertColor?"#000000":"#FFFFFF",context.fillText(layerOptions.content.trim(),position.x,position.y));break;case"icon":if(layerOptions.icon.trim().length){var input=this.container.find(".icon-picker").get(0);if(input&&input.wpgmzaFaPicker)if(-1!==input.wpgmzaFaPicker.getIcons().indexOf(layerOptions.icon.trim())){var content,input=layerOptions.icon.trim(),sampler=$("<i/>"),input=(sampler.addClass(input),this.container.append(sampler),sampler.get(0));let styles=window.getComputedStyle(input,":before");styles.content&&(content=styles.content.replaceAll('"',""),styles=window.getComputedStyle(input),context.textAlign="center",context.textBaseline="middle",context.font=styles.fontWeight+" "+layerOptions.size+"px "+styles.fontFamily,context.fillStyle=layerOptions.invertColor?"#000000":"#FFFFFF",context.fillText(content,position.x,position.y)),sampler.remove()}}}},WPGMZA.MarkerIconEditor.prototype.saveIcon=function(){this.setSaving(!0);var imageData=this.preview.get(0).toDataURL();imageData?$.ajax({url:WPGMZA.ajaxurl,type:"POST",data:{action:"wpgmza_upload_base64_image",security:WPGMZA.legacyajaxnonce,data:imageData.replace(/^data:.+?base64,/,""),folder:"wp-google-maps/icons",mimeType:"image/png"},success:data=>{this.setSaving(!1),data.url&&this.applyIcon(data.url)},error:()=>{this.setSaving(!1)}}):this.setSaving(!1)},WPGMZA.MarkerIconEditor.prototype.applyIcon=function(url){var input,button;url&&this.binding&&(this.hide(),input=(button=$(this.binding)).closest(".wpgmza-marker-icon-picker").find(".wpgmza-marker-icon-url"),button=button.closest(".wpgmza-marker-icon-picker").find("img, .wpgmza-marker-icon-preview"),input.val(url).trigger("change"),button.prop("tagName").match(/img/)?button.attr("src",url):button.css("background-image","url("+url+")"))},WPGMZA.MarkerIconEditor.prototype.show=function(){this.setVisible(!0),this.autoPlace(),this.dirty&&(this.dirty=!1,this.prepareControls())},WPGMZA.MarkerIconEditor.prototype.hide=function(){this.setVisible(!1)},WPGMZA.MarkerIconEditor.prototype.setVisible=function(visible){visible&&this.binding?this.container.addClass("open"):this.container.removeClass("open")},WPGMZA.MarkerIconEditor.prototype.isVisible=function(){return this.container.hasClass("open")},WPGMZA.MarkerIconEditor.prototype.setSaving=function(busy){this.actions.each((index,button)=>{var busyText;button=$(button),busy?(busyText=button.data("busy"))&&(button.data("restore")||button.attr("data-restore",button.text()),button.text(busyText)):(busyText=button.data("restore"))&&button.text(busyText)}),busy?this.container.addClass("saving"):this.container.removeClass("saving")},WPGMZA.MarkerIconEditor.prototype.autoPlace=function(){var sidebar,editor,position={x:0,y:0},ref=this.container.get(0);$(document.body).find(".wpgmza-editor .sidebar").length?(editor=$(document.body).find(".wpgmza-editor").get(0),(sidebar=$(document.body).find(".wpgmza-editor .sidebar").get(0)).offsetWidth&&sidebar.offsetWidth<editor.offsetWidth?(position.x=sidebar.offsetWidth,editor.offsetHeight&&(position.y=editor.offsetHeight/2-ref.offsetHeight/2)):(position.x=editor.offsetWidth/2-ref.offsetWidth/2,position.y=sidebar.offsetHeight+10)):this.binding&&(editor=$(this.binding).closest(".wpgmza-marker-icon-picker").get(0))&&(ref=editor.getBoundingClientRect(),position.x=editor.offsetLeft,position.y=ref.top+window.scrollY+10),this.container.css({left:position.x+"px",top:position.y+"px"})},$(document).ready(function(event){var element=$(".wpgmza-marker-icon-editor");element.length&&(WPGMZA.markerIconEditor=new WPGMZA.MarkerIconEditor(element))})}),jQuery(function($){WPGMZA.MarkerIconPicker=function(element){var self=this;if(!element)throw new Error("Element cannot be undefined");if(!(element instanceof HTMLElement||element instanceof jQuery&&1==element.length))throw new Error("Invalid element");this.element=element;var element=$(this.element).find("input.wpgmza-marker-icon-url"),name=$(element).attr("name")||$(element).attr("data-ajax-name");if(element.length){if(!name)throw new Error("Input must have a name for marker library to function");$(this.element).find("button.wpgmza-marker-library").attr("data-target-name",name);WPGMZA.MarkerIcon.createInstance(element.val())}$(this.element).find("button.wpgmza-upload").on("click",function(event){self.onUploadImage(event)}),$(this.element).find("button.wpgmza-reset").on("click",function(event){self.onReset(event)})},WPGMZA.MarkerIconPicker.prototype.setIcon=function(input){var input=WPGMZA.MarkerIcon.createInstance(input).url,preview=input;input!=WPGMZA.defaultMarkerIcon?$(this.element).find("input.wpgmza-marker-icon-url").val(input):$(this.element).find("input.wpgmza-marker-icon-url").val(""),0==input.length&&(preview=WPGMZA.defaultMarkerIcon),$(this.element).find(".wpgmza-marker-icon-preview").css({"background-image":"url('"+preview+"')"})},WPGMZA.MarkerIconPicker.prototype.onUploadImage=function(){var self=this;WPGMZA.openMediaDialog(function(attachment_id,attachment_url){self.setIcon(attachment_url),$(this.element).find("input.wpgmza-marker-icon-url").val("")})},WPGMZA.MarkerIconPicker.prototype.onReset=function(){this.reset()},WPGMZA.MarkerIconPicker.prototype.reset=function(){this.setIcon(WPGMZA.defaultMarkerIcon)}}),jQuery(function($){WPGMZA.MarkerIcon=function(options){var self=this;if(WPGMZA.EventDispatcher.apply(this,arguments),this.isLoaded=!1,this.url="",this.retina=!1,"object"==typeof options)for(var key in options)this[key]=options[key];else if("string"==typeof options)try{var json=JSON.parse(options);for(key in json)this[key]=json[key]}catch(e){this.url=options}else if(options)throw new Error("Argument must be an object");this.url=this.url.replace(/^http(s?):/,""),this.dimensions={width:null,height:null};var url=this.isDefault?WPGMZA.defaultMarkerIcon:this.url;WPGMZA.getImageDimensions(url,function(dimensions){self.dimensions=dimensions,self.isLoaded=!0,self.trigger("load")})},WPGMZA.extend(WPGMZA.MarkerIcon,WPGMZA.EventDispatcher),WPGMZA.MarkerIcon.createInstance=function(options){return new WPGMZA.MarkerIcon(options)},Object.defineProperty(WPGMZA.MarkerIcon.prototype,"width",{get:function(){return this.retina?parseInt(WPGMZA.settings.retinaWidth):parseInt(this.dimensions.width)}}),Object.defineProperty(WPGMZA.MarkerIcon.prototype,"height",{get:function(){return this.retina?parseInt(WPGMZA.settings.retinaHeight):parseInt(this.dimensions.height)}}),Object.defineProperty(WPGMZA.MarkerIcon.prototype,"isDefault",{get:function(){return 0==this.url.length||this.url==WPGMZA.defaultMarkerIcon.replace(/^http(s?):/,"")}}),WPGMZA.MarkerIcon.prototype.applyToElement=function(element){this.isDefault?$(element).attr("src",WPGMZA.defaultMarkerIcon):$(element).attr("src",this.url),this.retina&&$(element).css({width:this.width+"px",height:this.height+"px"})}}),jQuery(function($){var currentCallback;window.WPGMZA||(window.WPGMZA={}),WPGMZA.MarkerLibraryDialog=function(element){var self=this;this.element=element,$(element).remodal(),window.addEventListener("message",function(event){"download_marker"==event.data.action&&$.ajax({url:ajaxurl,type:"POST",data:{action:"wpgmza_upload_base64_image",security:WPGMZA.legacyajaxnonce,data:event.data.data.replace(/^data:.+?base64,/,""),mimeType:"image/png"},success:function(data,status,xhr){data=data.url;currentCallback(data),$(self.element).remodal().close()}})},!1)},WPGMZA.MarkerLibraryDialog.prototype.open=function(callback){currentCallback=callback,$(this.element).remodal().open(),$("iframe#mappity").attr("src","https://www.mappity.org?wpgmza-embed=1")},WPGMZA.MarkerLibraryDialog.prototype.onSearch=function(){var string=this.searchInput.val().replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&"),regexp=new RegExp(string,"i");$(this.element).find("img").each(function(index,img){var li=$(img).closest("li"),img=$(img).attr("title").replace(/\.png$/,"");string.length&&!img.match(regexp)?$(li).addClass("wpgmza-marker-library-no-result"):$(li).removeClass("wpgmza-marker-library-no-result")})},WPGMZA.MarkerLibraryDialog.prototype.onIconSelected=function(event){currentCallback(event.target.src),$(this.element).remodal().close()},$(document).ready(function(event){var el=$(".wpgmza-marker-library-dialog");el.length&&($(el).css("display",""),WPGMZA.markerLibraryDialog=new WPGMZA.MarkerLibraryDialog(el),$("input.wpgmza-marker-library, button.wpgmza-marker-library").each(function(index,el){var button,target,preview;target=$(button=el).closest(".wpgmza-marker-icon-picker").find(".wpgmza-marker-icon-url"),preview=$(button).closest(".wpgmza-marker-icon-picker").find("img, .wpgmza-marker-icon-preview"),$(button).on("click",function(){WPGMZA.markerLibraryDialog.open(function(src){target.val(src),target.change(),preview.prop("tagName").match(/img/)?preview.attr("src",src):preview.css({"background-image":"url("+src+")"}),$(button).hasClass("wpgmza-marker-directions-library")||$("#wpgmza_cmm>img").attr("src",src)})})}))})}),jQuery(function($){WPGMZA.ModernDirectionsBox=function(map){WPGMZA.DirectionsBox.apply(this,arguments);var container,self=this,original=this.element;original.length&&(container=$(map.element),this.map=map,this.element=$("<div class='wpgmza-popout-panel wpgmza-modern-directions-box'></div>"),this.panel=new WPGMZA.PopoutPanel(this.element),this.element.append(original),container.append(this.element),$(this.element).find("h2").after($("\t\t\t<div class='wpgmza-directions-buttons'>\t\t\t\t<span class='wpgmza-close'><i class='fa fa-times' aria-hidden='true'></i></span>\t\t\t</div>\t\t")),$(this.element).find("td:first-child").remove(),original=$(this.element).find("select[name^='wpgmza_dir_type']").closest("tr"),$(this.element).find(".wpgmaps_to_row").after(original),$(this.element).find("#wpgmza_options_box_"+map.id).addClass("wpgmza-directions-options"),this.resultBox=new WPGMZA.ModernDirectionsResultBox(map,this),"default"==(container="intelligent"==(container=map.settings.directions_behaviour)?WPGMZA.isTouchDevice()?"external":"default":container)&&$(this.element).find(".wpgmaps_get_directions").on("click",function(event){0!=self.from.length&&0!=self.to.length&&self.resultBox.open()}),$(this.element).find(".wpgmza-close").on("click",function(event){self.panel.close()}),$(this.element).on("click",".wpgmza-travel-mode-option",function(){var mode=jQuery(this).data("mode");jQuery("body").find(".wpgmza-travel-mode-option").removeClass("wpgmza-travel-option__selected"),jQuery(this).addClass("wpgmza-travel-option__selected"),jQuery("body").find(".wpgmza-travel-mode").val(mode)}))},WPGMZA.extend(WPGMZA.ModernDirectionsBox,WPGMZA.DirectionsBox),Object.defineProperty(WPGMZA.ModernDirectionsBox.prototype,"from",{get:function(){return $(this.element).find("input.wpgmza-directions-from").val()},set:function(value){return $(this.element).find("input.wpgmza-directions-from").val(value)}}),Object.defineProperty(WPGMZA.ModernDirectionsBox.prototype,"to",{get:function(){return $(this.element).find("input.wpgmza-directions-to").val()},set:function(value){return $(this.element).find("input.wpgmza-directions-to").val(value)}}),WPGMZA.ModernDirectionsBox.prototype.open=function(){this.panel.open(),this.resultBox&&this.resultBox.close(),$(this.element).children().show()},WPGMZA.ModernDirectionsBox.prototype.onNativeMapsApp=function(){var url=this.getExternalURL();window.open(url,"_blank")}}),jQuery(function($){WPGMZA.ModernDirectionsResultBox=function(map,directionsBox){WPGMZA.PopoutPanel.apply(this,arguments);var self=this,container=$(map.element),nativeIcon=(this.map=map,this.directionsBox=directionsBox,this.element=$("<div class='wpgmza-popout-panel wpgmza-modern-directions-box'>\t\t\t<h2 class='wpgmza-directions-box__title'>"+$(directionsBox.element).find("h2").html()+"</h2>\t\t\t<div class='wpgmza-directions-buttons'>\t\t\t\t<span class='wpgmza-close'><i class='fa fa-arrow-left' aria-hidden='true'></i></span>\t\t\t\t<a class='wpgmza-print' style='display: none;'><i class='fa fa-print' aria-hidden='true'></i></a>\t\t\t</div>\t\t\t<div class='wpgmza-directions-results'>\t\t\t</div>\t\t</div>"),this.element.addClass("wpgmza-modern-directions-box__results"),new WPGMZA.NativeMapsAppIcon);this.nativeMapAppIcon=nativeIcon,$(this.element).find(".wpgmza-directions-buttons").append(nativeIcon.element),$(nativeIcon.element).on("click",function(event){self.onNativeMapsApp(event)}),container.append(this.element),this.element.append($("#directions_panel_"+map.id)),$(this.element).find(".wpgmza-print").attr("href","data:text/html,<script>document.body.innerHTML += sessionStorage.wpgmzaPrintDirectionsHTML; window.print();<\/script>"),$(this.element).find(".wpgmza-close").on("click",function(event){self.close()}),$(this.element).find(".wpgmza-print").on("click",function(event){self.onPrint(event)}),this.map.on("directionsserviceresult",function(event){self.onDirectionsChanged(event,event.response,event.status)}),this.clear()},WPGMZA.ModernDirectionsResultBox.prototype=Object.create(WPGMZA.PopoutPanel.prototype),WPGMZA.ModernDirectionsResultBox.prototype.constructor=WPGMZA.ModernDirectionsResultBox,WPGMZA.ModernDirectionsResultBox.prototype.clear=function(){$(this.element).find(".wpgmza-directions-results").html(""),$(this.element).find("a.wpgmza-print").attr("href","")},WPGMZA.ModernDirectionsResultBox.prototype.open=function(){WPGMZA.PopoutPanel.prototype.open.apply(this,arguments),this.showPreloader()},WPGMZA.ModernDirectionsResultBox.prototype.showPreloader=function(){$(this.element).find(".wpgmza-directions-results").html("<img src='"+wpgmza_ajax_loader_gif.src+"'/>")},WPGMZA.ModernDirectionsResultBox.prototype.onDirectionsChanged=function(event,response,status){switch(this.clear(),status){case WPGMZA.DirectionsService.SUCCESS:break;case WPGMZA.DirectionsService.NOT_FOUND:case WPGMZA.DirectionsService.ZERO_RESULTS:var key=status.toLowerCase(),key=WPGMZA.localized_strings[key];$(this.element).find(".wpgmza-directions-results").html('<i class="fa fa-times" aria-hidden="true"></i>'+key);break;default:key=WPGMZA.localized_strings.unknown_error;$(this.element).find(".wpgmza-directions-results").html('<i class="fa fa-times" aria-hidden="true"></i>'+key)}},WPGMZA.ModernDirectionsResultBox.prototype.onNativeMapsApp=function(event){var url=this.directionsBox.getExternalURL();window.open(url,"_blank")},WPGMZA.ModernDirectionsResultBox.prototype.onPrint=function(event){var content=$(this.element).find(".wpgmza-directions-results").html();document.implementation.createHTMLDocument();sessionStorage.wpgmzaPrintDirectionsHTML=content}}),jQuery(function($){WPGMZA.ModernMarkerListingMarkerView=function(map){var self=this,container=(this.map=map,this.map_id=map.id,WPGMZA.PopoutPanel.apply(this,arguments),$("#wpgmza_map_"+map.id));this.element=$("<div class='wpgmza-popout-panel wpgmza-modern-marker-listing-marker-view'>\t\t\t<div class='wpgmza-close-container'>\t\t\t\t<span class='wpgmza-close'><i class='fa fa-arrow-left' aria-hidden='true'></i></span>\t\t\t\t<span class='wpgmza-close'><i class='fa fa-times' aria-hidden='true'></i></span>\t\t\t</div>\t\t\t<div data-name='title'></div>\t\t\t<div data-name='address'></div>\t\t\t<div data-name='category'></div>\t\t\t<img data-name='pic'/>\t\t\t<div data-name='description'></div>\t\t\t<div class='wpgmza-modern-marker-listing-buttons'>\t\t\t\t<div class='wpgmza-modern-marker-listing-button wpgmza-link-button'>\t\t\t\t\t<i class='fa fa-link' aria-hidden='true'></i>\t\t\t\t\t<div>\t\t\t\t\t\t"+WPGMZA.localized_strings.link+"\t\t\t\t\t</div>\t\t\t\t</div>\t\t\t\t<div class='wpgmza-modern-marker-listing-button wpgmza-directions-button'>\t\t\t\t\t<i class='fa fa-road' aria-hidden='true'></i>\t\t\t\t\t<div>\t\t\t\t\t\t"+WPGMZA.localized_strings.directions+"\t\t\t\t\t</div>\t\t\t\t</div>\t\t\t\t<div class='wpgmza-modern-marker-listing-button wpgmza-zoom-button'>\t\t\t\t\t<i class='fa fa-search-plus' aria-hidden='true'></i>\t\t\t\t\t<div>\t\t\t\t\t\t"+WPGMZA.localized_strings.zoom+"\t\t\t\t\t</div>\t\t\t\t</div>\t\t\t</div>\t\t</div>"),map.on("init",function(){container.append(self.element)}),map.on("click",function(event){event.target instanceof WPGMZA.Marker&&event.target!=self.map.userLocationMarker&&event.target!=self.map.storeLocatorMarker&&self.open(event.target.id)}),$(this.element).find(".wpgmza-close").on("click",function(event){self.close(),$("#wpgmza_map_"+self.map_id+" .wpgmza-modern-store-locator").removeClass("wpgmza_sl_mv_offset")}),$(this.element).find(".wpgmza-link-button").on("click",function(event){self.onLink(event)}),$(this.element).find(".wpgmza-directions-button").on("click",function(event){self.onDirections(event)}),$(this.element).find(".wpgmza-zoom-button").on("click",function(event){self.onZoom(event)}),$(container).append(this.element),container.children(".wpgmza-modern-directions-box").length&&$(this.element).after(container.children(".wpgmza-modern-directions-box"))},WPGMZA.ModernMarkerListingMarkerView.prototype=Object.create(WPGMZA.PopoutPanel.prototype),WPGMZA.ModernMarkerListingMarkerView.prototype.constructor=WPGMZA.ModernMarkerListingMarkerView,WPGMZA.ModernMarkerListingMarkerView.prototype.open=function(marker_id){var self=this,marker=this.map.getMarkerByID(marker_id);marker.disableInfoWindow||(WPGMZA.PopoutPanel.prototype.open.apply(this,arguments),this.marker=marker,$(this.element).find("[data-name]").each(function(index,el){var name=$(el).attr("data-name"),value=marker[name]||"";switch("category"===name&&0<marker.categories.length&&(value=marker.categories.join(",")),name){case"pic":$(el).attr("src",value),$(el).attr("alt",marker.title),marker.pic.length?$(el).show():$(el).hide();break;case"category":for(var ids=value.split(","),names=[],i=0;i<ids.length;i++){var id=ids[i];wpgmza_category_data[id]&&names.push(wpgmza_category_data[id].category_name)}$(el).html(names.join(", "));break;default:$(el).html(value)}}),marker.link&&0!=marker.link.length?$(this.element).find(".wpgmza-link-button").show():$(this.element).find(".wpgmza-link-button").hide(),$("#wpgmza_map_"+this.map_id+" .wpgmza-modern-store-locator").addClass("wpgmza_sl_mv_offset"),$(this.element).find("[data-custom-field-name]").remove(),$(this.element).find(".wpgmza-modern-marker-listing-buttons").before(marker.custom_fields_html),$(this.element).find(".wpgmza-directions-button").attr("data-marker-id",marker_id),$(this.element).find(".wpgmza-close").on("click",function(event){self.close()}))},WPGMZA.ModernMarkerListingMarkerView.prototype.onLink=function(event){window.open(this.marker.link,"_blank")},WPGMZA.ModernMarkerListingMarkerView.prototype.onDirections=function(event){this.map.directionsBox.to=this.marker.address,this.map.directionsBox.element.show()},WPGMZA.ModernMarkerListingMarkerView.prototype.onZoom=function(event){this.map.setCenter(this.marker.getPosition()),this.map.setZoom(14)}}),jQuery(function($){WPGMZA.ProAddressInput=function(element,map){WPGMZA.AddressInput.apply(this,arguments),this.useMyLocationButton=new WPGMZA.UseMyLocationButton(element),$(this.element).after(this.useMyLocationButton.element)},WPGMZA.extend(WPGMZA.ProAddressInput,WPGMZA.AddressInput),WPGMZA.AddressInput.createInstance=function(element,map){return new WPGMZA.ProAddressInput(element,map)}}),jQuery(function($){WPGMZA.ProCapsuleModules=function(){WPGMZA.CapsuleModules.call(this,arguments)},WPGMZA.extend(WPGMZA.ProCapsuleModules,WPGMZA.CapsuleModules),WPGMZA.ProCapsuleModules.prototype.prepareCapsules=function(){WPGMZA.CapsuleModules.prototype.prepareCapsules.call(this,arguments),this.registerMarkerListings()},WPGMZA.ProCapsuleModules.prototype.registerMarkerListings=function(){$("[data-wpgmza-table]").each((index,element)=>{var mapId=$(element).data("map-id");if(mapId&&!WPGMZA.getMapByID(mapId)){var settings=$(element).data("map-settings");const mapProxy=this.proxyMap(mapId,settings);mapId={type:"marker_listing",element:element,instance:WPGMZA.MarkerListing.createInstance(mapProxy,element)};mapId.instance.onItemClick=function(){},mapProxy.markerListing=mapId.instance,mapId.instance.isCapsule=!0,this.capsules.push(mapId),mapProxy.on("filteringcomplete",event=>{mapProxy.markerListing&&mapProxy.markerListing.onFilteringComplete(event)})}})}}),jQuery(function($){var Parent="open-layers"==WPGMZA.settings.engine?WPGMZA.OLDrawingManager:WPGMZA.GoogleDrawingManager;WPGMZA.ProDrawingManager=function(map){Parent.apply(this,arguments)},WPGMZA.extend(WPGMZA.ProDrawingManager,Parent),WPGMZA.DrawingManager.getConstructor=function(){return"google-maps"!==WPGMZA.settings.engine?WPGMZA.OLProDrawingManager:WPGMZA.GoogleProDrawingManager},WPGMZA.ProDrawingManager.prototype.setDrawingMode=function(mode){var self=this;mode!=WPGMZA.DrawingManager.MODE_HEATMAP&&this.heatmap&&(this.heatmap.markers.forEach(function(marker){self.map.removeMarker(marker)}),this.map.removeHeatmap(this.heatmap),delete this.heatmap),Parent.prototype.setDrawingMode.apply(this,arguments)},WPGMZA.ProDrawingManager.prototype.getHeatmapParameters=function(){var params={},str=($(".wpgmza-feature-panel[data-wpgmza-feature-type='heatmap'] [data-ajax-name]").each(function(index,el){var value;"gradient"!=$(el).attr("data-ajax-name")&&(value="number"===$(el).attr("type")?parseFloat($(el).val()):$(el).val(),params[$(el).attr("data-ajax-name")]=value)}),$(".wpgmza-feature-panel[data-wpgmza-feature-type='heatmap'] [data-ajax-name='gradient']:checked").val());return"default"!=str&&(params.gradient=JSON.parse(str)),params},WPGMZA.ProDrawingManager.prototype.onMapClick=function(event){Parent.prototype.onMapClick.apply(this,arguments);var self=this;if(this.mode==WPGMZA.DrawingManager.MODE_HEATMAP&&event.target instanceof WPGMZA.Map)return this.heatmap||(this.heatmap=WPGMZA.Heatmap.createInstance({dataset:[]}),this.map.addHeatmap(this.heatmap),this.heatmap.setEditable(!0),this.heatmap.on("change",function(event){self.onHeatmapGeometryChanged(event)})),2==event.button?(event.preventDefault(),!1):void 0},WPGMZA.ProDrawingManager.prototype.updateHeatmapGeometryField=function(){var arr=[];this.heatmap.markers.forEach(function(marker){marker=marker.getPosition().toLatLngLiteral();arr.push(marker)}),$("[data-wpgmza-feature-type='heatmap']").find("[data-ajax-name='dataset']").val(JSON.stringify(arr))},WPGMZA.ProDrawingManager.prototype.updateHeatmap=function(){var key,params=this.getHeatmapParameters();for(key in params)this.heatmap[key]=params[key];this.heatmap.update()},WPGMZA.ProDrawingManager.prototype.onHeatmapPropertyChanged=function(event){"dataset_name"!=$(event.target).attr("data-ajax-name")&&this.updateHeatmap()},WPGMZA.ProDrawingManager.prototype.onHeatmapGeometryChanged=function(event){this.updateHeatmapGeometryField()}}),jQuery(function($){WPGMZA.ProGenericModal=function(element,complete,cancel){WPGMZA.GenericModal.call(this,element,complete,cancel),this.initCategoryPickers()},WPGMZA.extend(WPGMZA.ProGenericModal,WPGMZA.GenericModal),WPGMZA.ProGenericModal.prototype.initCategoryPickers=function(){const self=this;this.categoryPickers=[],$(this.element).find(".wpgmza-category-picker").each(function(){var picker=new WPGMZA.CategoryPicker($(this));self.categoryPickers.push(picker)})}}),jQuery(function($){WPGMZA.ProInfoWindow=function(feature){var self=this;WPGMZA.InfoWindow.call(this,feature),this.on("infowindowopen",function(event){self.updateDistanceFromLocation(),self.showDistanceAwayFromStoreLocatorCenter(),self.updateGalleries()}),$(document.body).on("click",".wpgmza-share",function(event){(marker=self.feature.map.getMarkerByID($(event.currentTarget).closest("[data-marker-id]").attr("data-marker-id")))&&self.onShare()})},WPGMZA.ProInfoWindow.prototype=Object.create(WPGMZA.InfoWindow.prototype),WPGMZA.ProInfoWindow.prototype.constructor=WPGMZA.ProInfoWindow,WPGMZA.ProInfoWindow.STYLE_INHERIT="-1",WPGMZA.ProInfoWindow.STYLE_NATIVE_GOOGLE="0",WPGMZA.ProInfoWindow.STYLE_MODERN="1",WPGMZA.ProInfoWindow.STYLE_MODERN_PLUS="2",WPGMZA.ProInfoWindow.STYLE_MODERN_CIRCULAR="3",WPGMZA.ProInfoWindow.STYLE_PANEL="4",WPGMZA.ProInfoWindow.STYLE_TEMPLATE="template",WPGMZA.ProInfoWindow.OPEN_BY_CLICK=1,WPGMZA.ProInfoWindow.OPEN_BY_HOVER=2,Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"maxWidth",{get:function(){var width=WPGMZA.settings.wpgmza_settings_infowindow_width;return!(!width||!/^\d+$/.test(width))&&width}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"imageWidth",{get:function(){var width=WPGMZA.settings.wpgmza_settings_image_width;return!(!width||!/^\d+$/.test(width))&&width}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"imageHeight",{get:function(){var height=WPGMZA.settings.wpgmza_settings_image_height;return!(!height||!/^\d+$/.test(height))&&height}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"enableImageResizing",{get:function(){return 1==WPGMZA.settings.wpgmza_settings_image_resizing}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"linkTarget",{get:function(){return 1==WPGMZA.settings.infoWindowLinks?"_BLANK":""}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"linkText",{get:function(){return WPGMZA.localized_strings.more_info}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"directionsText",{get:function(){return WPGMZA.localized_strings.get_directions}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"distanceUnits",{get:function(){return 1==this.feature.map.settings.store_locator_distance?WPGMZA.Distance.MILES:WPGMZA.Distance.KILOMETERS}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"showAddress",{get:function(){return 1!=WPGMZA.settings.infoWindowAddress||"map-edit"==WPGMZA.currentPage}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"showTitle",{get:function(){return 1!=WPGMZA.settings.infoWindowHideTitle||"map-edit"==WPGMZA.currentPage}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"showCategory",{get:function(){return 1!=WPGMZA.settings.infoWindowHideCategory||"map-edit"==WPGMZA.currentPage}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"showGallery",{get:function(){return 1!=WPGMZA.settings.infoWindowHideGallery||"map-edit"==WPGMZA.currentPage}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"showDescription",{get:function(){return 1!=WPGMZA.settings.infoWindowHideDescription||"map-edit"==WPGMZA.currentPage}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"showMarkerFields",{get:function(){return 1!=WPGMZA.settings.infoWindowHideMarkerFields||"map-edit"==WPGMZA.currentPage}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"style",{get:function(){return this.map&&this.map.userLocationMarker==this?WPGMZA.ProInfoWindow.STYLE_NATIVE_GOOGLE:this.getSelectedStyle()}}),Object.defineProperty(WPGMZA.ProInfoWindow.prototype,"isPanIntoViewAllowed",{get:function(){return this.style==WPGMZA.ProInfoWindow.STYLE_NATIVE_GOOGLE}}),WPGMZA.ProInfoWindow.prototype.getSelectedStyle=function(){var globalTypeSetting=WPGMZA.settings.wpgmza_iw_type,localTypeSetting=this.feature.map.settings.wpgmza_iw_type,type=localTypeSetting;return(localTypeSetting!=WPGMZA.ProInfoWindow.STYLE_INHERIT&&void 0!==localTypeSetting||(type=globalTypeSetting)!=WPGMZA.ProInfoWindow.STYLE_INHERIT)&&type?String(type):WPGMZA.ProInfoWindow.STYLE_NATIVE_GOOGLE},WPGMZA.ProInfoWindow.prototype.getImageElementFromURL=function(url){var img=$("<img/>");return img.addClass("wpgmza_infowindow_image"),img.attr("src",url),img.css({float:"right"}),this.maxWidth&&img.css({"max-width":this.maxWidth}),this.enableImageResizing&&this.imageWidth&&(img.css({width:this.imageWidth}),img.css({height:this.imageHeight})),this.enableImageResizing||img.css({margin:"5px"}),img},WPGMZA.ProInfoWindow.prototype.showDistanceAwayFromStoreLocatorCenter=function(){var currentLatLng;this.feature instanceof WPGMZA.Marker&&this.feature.map.settings.store_locator_show_distance&&this.feature.map.storeLocator&&this.feature.map.storeLocator.state==WPGMZA.StoreLocator.STATE_APPLIED&&(this.feature.map.settings.show_distance_from_location||(currentLatLng=this.feature.getPosition(),currentLatLng=this.workOutDistanceBetweenTwoMarkers(this.feature.map.storeLocator.center,currentLatLng),$(this.element).find(".sl-distance").remove(),currentLatLng&&$(this.element).append("<p class='sl-distance'>"+(this.feature.map.settings.store_locator_distance==WPGMZA.Distance.KILOMETERS?currentLatLng+WPGMZA.localized_strings.kilometers_away:currentLatLng+" "+WPGMZA.localized_strings.miles_away)+"</p>")))},WPGMZA.ProInfoWindow.prototype.updateDistanceFromLocation=function(){var location,units,marker=this.feature;marker instanceof WPGMZA.Marker?(location=marker.map.showDistanceFromLocation)&&(marker=WPGMZA.Distance.between(location,marker.getPosition()),this.distanceUnits==WPGMZA.Distance.MILES&&(marker/=WPGMZA.Distance.KILOMETERS_PER_MILE),marker=Math.round(marker,2),location=location.source==WPGMZA.ProMap.SHOW_DISTANCE_FROM_USER_LOCATION?WPGMZA.localized_strings.from_your_location:WPGMZA.localized_strings.from_searched_location,units=this.distanceUnits==WPGMZA.Distance.MILES?WPGMZA.localized_strings.miles_away:WPGMZA.localized_strings.kilometers_away,$(this.element).find(".wpgmza-distance-from-location .wpgmza-amount").length<=0&&$(this.element).find(".wpgmza-distance-from-location").html("<span class='wpgmza-amount'></span> <span class='wpgmza-units'></span> <span class='wpgmza-source'></span>"),$(this.element).find(".wpgmza-distance-from-location .wpgmza-amount").text(marker),$(this.element).find(".wpgmza-distance-from-location .wpgmza-units").text(units),$(this.element).find(".wpgmza-distance-from-location .wpgmza-source").text(location)):console.warn("This function is only intended for use with markers and should not have been called in this manner")},WPGMZA.ProInfoWindow.prototype.updateGalleries=function(){var placeholder;this.element&&(placeholder=$(this.element).find(".wpgmza_gallery_placeholder")).length&&(this.feature.gallery?new WPGMZA.Gallery(this.feature.gallery,this.feature).place(placeholder):placeholder.remove())},WPGMZA.ProInfoWindow.prototype.legacyCreateDefaultInfoWindow=function(map){var marker=this.feature,map=marker.map;function empty(field){return!(field&&field.length&&0<field.length)}var div,img,a,container=$("<div class='wpgmza_markerbox scrollFix'></div>");if(this.maxWidth&&container.css({"max-width":this.maxWidth}),this.showGallery&&(empty(marker.gallery)?empty(marker.pic)||(img=this.getImageElementFromURL(marker.pic),container.append(img)):WPGMZA.InternalEngine.isLegacy()?(img=new WPGMZA.MarkerGallery(marker,this),container.append(img.element)):(img=$("<div class='wpgmza_gallery_placeholder'></div>"),WPGMZA.settings&&WPGMZA.settings.infoWindowImageResizing&&(WPGMZA.settings.infoWindowImageHeight&&img.css("min-height",parseInt(WPGMZA.settings.infoWindowImageHeight)+"px"),WPGMZA.settings.infoWindowImageWidth)&&img.css("min-width",parseInt(WPGMZA.settings.infoWindowImageWidth)+"px"),container.append(img))),!empty(marker.title)&&this.showTitle&&((p=$("<p class='wpgmza_infowindow_title'></p>")).html(marker.title),container.append(p)),marker.categories&&this.showCategory&&0<marker.categories.length){var i,p,markerCategories=[];for(i in marker.categories){var category=WPGMZA.categories.getCategoryByID(parseInt(marker.categories[i]));category&&""!==category.name.trim()&&markerCategories.push(category.name)}markerCategories.length&&(markerCategories=markerCategories.join(", "),(p=$("<p class='wpgmza_infowindow_categories'></p>")).html(markerCategories),container.append(p))}!empty(marker.address)&&this.showAddress&&((p=$("<p class='wpgmza_infowindow_address'></p>")).html(marker.address),container.append(p)),empty(marker.desc)&&empty(marker.description)||!this.showDescription||(img=empty(marker.desc)?marker.description:marker.desc,(div=$("<div class='wpgmza_infowindow_description'></div>")).html(img),container.append(div)),1==map.settings.show_distance_from_location&&(p=$("<p class='wpgmza-distance-from-location'><span class='wpgmza-amount'></span> <span class='wpgmza-units'></span> <span class='wpgmza-source'></span></p>"),this.distanceUnits==WPGMZA.Distance.MILES?WPGMZA.localized_strings.miles_away:WPGMZA.localized_strings.kilometers_away,container.append(p)),empty(marker.linkd)&&empty(marker.link)||(img=empty(marker.link)?marker.linkd:marker.link,p=$("<p class='wpgmza_infowindow_link'></p>"),(a=$("<a class='wpgmza_infowindow_link'></a>")).attr("href",WPGMZA.decodeEntities(img)),a.attr("target",this.linkTarget),a.text(this.linkText),p.append(a),container.append(p)),map.directionsEnabled&&1!==parseInt(WPGMZA.is_admin)&&marker.getPosition&&(p=$("<p></p>"),(a=$("<a class='wpgmza_gd'></a>")).attr("href","javascript: ;"),a.attr("id",map.id),a.attr("data-address",marker.address),a.attr("data-latlng",marker.getPosition().toString()),a.attr("data-marker-id",marker.id),a.attr("wpgm_addr_field",marker.address),a.attr("gps",marker.lat+","+marker.lng),a.text(this.directionsText),p.append(a),container.append(p)),marker.custom_fields_html&&this.showMarkerFields&&container.append(marker.custom_fields_html),container.append(this.addEditButton()),this.setContent(container.html())},WPGMZA.ProInfoWindow.prototype.legacyCreateModernInfoWindow=function(map){var units,t,legend,p,mapid=map.id;0==$("#wpgmza_iw_holder_"+map.id).length&&($(document.body).append("<div id='wpgmza_iw_holder_"+map.id+"'></div>"),null!==(legend=document.getElementById("wpgmza_iw_holder_"+mapid))&&$(legend).remove(),window.wpgmza_iw_Div||(window.wpgmza_iw_Div=[]),wpgmza_iw_Div[mapid]=document.createElement("div"),wpgmza_iw_Div[mapid].id="wpgmza_iw_holder_"+mapid,wpgmza_iw_Div[mapid].style="display:block;",document.getElementsByTagName("body")[0].appendChild(wpgmza_iw_Div[mapid]),(wpgmza_iw_Div_inner=document.createElement("div")).className="wpgmza_modern_infowindow_inner wpgmza_modern_infowindow_inner_"+mapid,wpgmza_iw_Div[mapid].appendChild(wpgmza_iw_Div_inner),(wpgmza_iw_Div_close=document.createElement("div")).className="wpgmza_modern_infowindow_close",wpgmza_iw_Div_close.setAttribute("mid",mapid),$(wpgmza_iw_Div_close).on("click",function(event){$(wpgmza_iw_Div[mapid]).remove()}),t=document.createTextNode("x"),wpgmza_iw_Div_close.appendChild(t),wpgmza_iw_Div_inner.appendChild(wpgmza_iw_Div_close),(wpgmza_iw_Div_img=document.createElement("div")).className="wpgmza_iw_image",wpgmza_iw_Div_inner.appendChild(wpgmza_iw_Div_img),(wpgmza_iw_img=document.createElement("img")).className="wpgmza_iw_marker_image",wpgmza_iw_img.src="",wpgmza_iw_img.style="max-width:100%;",wpgmza_iw_Div_img.appendChild(wpgmza_iw_img),(wpgmza_iw_img_div=document.createElement("div")).className="wpgmza_iw_title",wpgmza_iw_Div_inner.appendChild(wpgmza_iw_img_div),(wpgmza_iw_img_div_p=document.createElement("p")).className="wpgmza_iw_title_p",wpgmza_iw_img_div.appendChild(wpgmza_iw_img_div_p),WPGMZA.settings.wpgmza_settings_infowindow_address||((wpgmza_iw_address_div=document.createElement("div")).className="wpgmza_iw_address",wpgmza_iw_Div_inner.appendChild(wpgmza_iw_address_div),(wpgmza_iw_address_p=document.createElement("p")).className="wpgmza_iw_address_p",wpgmza_iw_address_div.appendChild(wpgmza_iw_address_p)),(wpgmza_iw_description=document.createElement("div")).className="wpgmza_iw_description",wpgmza_iw_Div_inner.appendChild(wpgmza_iw_description),(wpgmza_iw_description_p=document.createElement("p")).className="wpgmza_iw_description_p",wpgmza_iw_description.appendChild(wpgmza_iw_description_p),1==map.settings.show_distance_from_location&&(p=$("<p class='wpgmza-distance-from-location'><span class='wpgmza-amount'></span> <span class='wpgmza-units'></span> <span class='wpgmza-source'></span></p>"),units=this.distanceUnits==WPGMZA.Distance.MILES?WPGMZA.localized_strings.miles_away:WPGMZA.localized_strings.kilometers_away,p.find(".wpgmza-units").text(units),$(wpgmza_iw_Div_inner).append(p)),units=$("<div class='wpgmza-rating-container'></div>")[0],wpgmza_iw_Div_inner.appendChild(units),$(wpgmza_iw_Div_inner).append("<div class='wpgmza_iw_custom_fields'/>"),(wpgmza_iw_buttons=document.createElement("div")).className="wpgmza_iw_buttons",wpgmza_iw_Div_inner.appendChild(wpgmza_iw_buttons),(wpgmza_directions_button=document.createElement("a")).className="wpgmza_button wpgmza_left wpgmza_directions_button",wpgmza_directions_button.src="#",t=document.createTextNode(WPGMZA.localized_strings.directions),wpgmza_directions_button.appendChild(t),wpgmza_iw_buttons.appendChild(wpgmza_directions_button),(wpgmza_more_info_button=document.createElement("a")).className="wpgmza_button wpgmza_right wpgmza_more_info_button",wpgmza_more_info_button.src="#",t=document.createTextNode(WPGMZA.localized_strings.more_info),wpgmza_more_info_button.appendChild(t),wpgmza_iw_buttons.appendChild(wpgmza_more_info_button),legend=document.getElementById("wpgmza_iw_holder_"+mapid),$(legend).css("display","block"),$(legend).addClass("wpgmza_modern_infowindow"),$(legend).addClass("wpgmza-shadow"),"google-maps"==WPGMZA.settings.engine?(map=this.feature.map).googleMap.controls[google.maps.ControlPosition.RIGHT_TOP].push(legend):((p=$(".wpgmza-ol-modern-infowindow-container[data-map-id='"+mapid+"']")).length||(p=$("<div class='wpgmza-ol-modern-infowindow-container' data-map-id='"+mapid+"'></div>"),$(".wpgmza_map[data-map-id='"+mapid+"']").append(p)),p.append(legend)))},WPGMZA.ProInfoWindow.prototype.open=function(map,feature){if(window.infoWindow&&(infoWindow[feature.map.id]=this),!WPGMZA.InfoWindow.prototype.open.call(this,map,feature))return!1;if(this.feature!=map.userLocationMarker){if(map.settings.wpgmza_list_markers_by==WPGMZA.MarkerListing.STYLE_MODERN)return!1;if(WPGMZA.settings.wpgmza_settings_disable_infowindows)return!1;if(0<$('.wpgmza-standalone-component .wpgmza-panel-info-window[data-map="'+feature.map.id+'"]').length)return $('.wpgmza-standalone-component .wpgmza-panel-info-window[data-map="'+feature.map.id+'"]').removeClass("wpgmza-hidden"),this.populatePanel(),!1;if(this.style==WPGMZA.ProInfoWindow.STYLE_NATIVE_GOOGLE||"map-edit"==WPGMZA.currentPage)this.legacyCreateDefaultInfoWindow();else{if(this.style==WPGMZA.ProInfoWindow.STYLE_PANEL)return this.populatePanel(),!1;var data=wpgmaps_localize_marker_data[map.id],marker=feature;if("array"==typeof data){for(var i=0;i<data.length;i++)if(data[i].marker_id==feature.id){data[i];break}}else if("object"==typeof data)for(var key in data)if(data[key].marker_id==feature.id){data[key];break}this.legacyCreateModernInfoWindow(map),window.modern_iw_open&&(modern_iw_open[map.id]=!0);var element=this.element=jQuery("#wpgmza_iw_holder_"+map.id);element.find(".wpgmza_iw_marker_image").attr("src",""),element.find(".wpgmza_iw_title").html(""),element.find(".wpgmza_iw_description").html(""),element.find(".wpgmza_iw_address_p").html(""),element.find(".wpgmza_more_info_button").attr("href","#"),element.find(".wpgmza_more_info_button").attr("target",""),element.find(".wpgmza_directions_button").attr("gps",""),element.find(".wpgmza_directions_button").attr("href","#"),element.find(".wpgmza_directions_button").attr("id",""),element.find(".wpgmza_directions_button").attr("data-marker-id",""),element.find(".wpgmza_directions_button").attr("wpgm_addr_field",""),""===marker.image&&""===marker.title?element.find(".wpgmza_iw_image").css("display","none"):element.find(".wpgmza_iw_image").css("display","block");(container=$("#wpgmza_iw_holder_"+map.id+" .wpgmza_iw_image")).html(""),marker.gallery?((gallery=new WPGMZA.MarkerGallery(marker,this)).element.css({float:"none"}),container.append(gallery.element)):marker.pic.length?((gallery=$("<img class='wpgmza_infowindow_image'/>")).attr("src",marker.pic),gallery.css({display:"block"}),container.append(gallery)):(element.find(".wpgmza_iw_marker_image").css("display","none"),element.find(".wpgmza_iw_title").attr("style","position: relative !important"),element.find(".wpgmza_iw_title").addClass("wpgmze_iw_title_no_image")),""!==marker.title&&element.find(".wpgmza_iw_title").html(marker.title);var gallery="",container=(marker.desc?gallery=marker.desc:marker.description&&(gallery=marker.description),gallery&&gallery.length?(element.find(".wpgmza_iw_description").css("display","block"),element.find(".wpgmza_iw_description").html(gallery)):element.find(".wpgmza_iw_description").css("display","none"),element.find(".wpgmza_iw_description"));marker.custom_fields_html&&(container.append(marker.custom_fields_html),container.css("display","block")),void 0!==marker.address&&""!==marker.address&&element.find(".wpgmza_iw_address_p").html(marker.address),void 0!==marker.link&&""!==marker.link?(element.find(".wpgmza_more_info_button").show(),element.find(".wpgmza_more_info_button").attr("href",marker.link),element.find(".wpgmza_more_info_button").attr("target",this.linkTarget)):element.find(".wpgmza_more_info_button").hide(),map.directionsEnabled?(element.find(".wpgmza_directions_button").show(),element.find(".wpgmza_directions_button").attr("href","javascript:void(0);"),element.find(".wpgmza_directions_button").attr("gps",marker.lat+","+marker.lng),element.find(".wpgmza_directions_button").attr("wpgm_addr_field",marker.address),element.find(".wpgmza_directions_button").attr("id",map.id),element.find(".wpgmza_directions_button").attr("data-marker-id",marker.id),element.find(".wpgmza_directions_button").addClass("wpgmza_gd")):element.find(".wpgmza_directions_button").hide(),element.show(),this.trigger("domready"),this.trigger("infowindowopen")}}return!0},WPGMZA.ProInfoWindow.prototype.close=function(){$(this.feature.map.element).find(".wpgmza-pro-info-window-container").html()},WPGMZA.ProInfoWindow.prototype.setPosition=function(position){},WPGMZA.ProInfoWindow.prototype.onShare=function(){if(this.feature instanceof WPGMZA.Marker){var id=this.feature.id;if(window.location&&window.location.href){var url=new URL(window.location.href);let link="";if(url.origin&&(link+=url.origin),url.pathname&&(link+=url.pathname),id&&(link+="?markerid="+id),link.trim().length){let title=document.title||"";url={title:title=this.feature.title?this.feature.title:title,text:title,url:link};navigator.canShare&&navigator.canShare(url)&&navigator.share(url).then(()=>{}).catch(error=>{})}}}},WPGMZA.ProInfoWindow.prototype.populatePanel=function(){var self=this;$('.wpgmza-panel-info-window[data-map="'+this.feature.map.id+'"]').each(function(){var feature=self.feature,map=feature.map;feature instanceof WPGMZA.Marker?$(this).attr("data-marker-id",feature.id):$(this).removeAttr("data-marker-id"),map.directionsEnabled&&$(this).find(".wpgmza-directions").removeClass("wpgmza-hidden"),map.settings.store_locator_nearby_searches&&$(this).find(".wpgmza-nearby").removeClass("wpgmza-hidden"),map.settings.marker_share_links&&navigator.canShare&&$(this).find(".wpgmza-share").removeClass("wpgmza-hidden"),self.element=$(this),$(this).find("[data-name]").each(function(){var key=$(this).data("name"),value="";if(feature[key]&&(value=feature[key]),"categories"===key&&feature.categories&&0<feature.categories.length){var i,markerCategories=[];for(i in feature.categories){var category=WPGMZA.categories.getCategoryByID(parseInt(feature.categories[i]));category&&""!==category.name.trim()&&markerCategories.push(category.name)}value=markerCategories.join(", ")}switch(key){case"title":case"description":var prop="show"+key.charAt(0).toUpperCase()+key.substr(1);if(self[prop])break;return void $(this).addClass("wpgmza-hidden");case"address":if(self.showAddress)break;return void $(this).closest(".wpgmza-address").addClass("wpgmza-hidden");case"categories":if(self.showCategory)break;return void $(this).addClass("wpgmza-hidden");case"pic":if(self.showGallery)break;return $(this).parent().remove(),void $(this).addClass("wpgmza-hidden");case"custom_fields_html":if(self.showMarkerFields)break;return void $(this).addClass("wpgmza-hidden")}switch(key){case"pic":$(this).parent().find(".wpgmza-gallery").remove(),feature.gallery?(new WPGMZA.Gallery(feature.gallery,feature).place($(this).parent()),$(this).hide()):value?($(this).attr("src",value),$(this).show()):$(this).hide();break;case"link":$(this).hide(),value?($(this).find("a").attr("href",value),$(this).find("a").attr("target",self.linkTarget),$(this).find("a").html(self.linkText),$(this).show()):$(this).find("a").attr("href","#");break;case"title":feature instanceof WPGMZA.Marker&&(feature.map.userLocationMarker===feature||void 0!==feature.user_location&&feature.user_location)&&(value=WPGMZA.localized_strings.my_location),$(this).html(value);break;case"address":feature instanceof WPGMZA.Marker&&(feature.map.userLocationMarker===feature||void 0!==feature.user_location&&feature.user_location)&&(value=feature.getPosition().toString()),$(this).html(value);break;default:$(this).html(value)}}),$(this).find(".wpgmza-rating-container").html(""),$(this).find(".wpgmza-rating").remove(),self.updateDistanceFromLocation(),self.showDistanceAwayFromStoreLocatorCenter(),self.feature.map.viewportGroupings.update("infowindow"),self.trigger("infowindowopen")})},$(document).ready(function(event){$(document.body).on("click",".wpgmza-close-info-window",function(event){$(event.target).closest(".wpgmza-info-window").remove()})})}),jQuery(function($){var Parent;WPGMZA.GoogleInfoWindow=function(feature){Parent.call(this,feature),this.setFeature(feature)},WPGMZA.GoogleInfoWindow.Z_INDEX=99,Parent=WPGMZA.isProVersion()?WPGMZA.ProInfoWindow:WPGMZA.InfoWindow,WPGMZA.GoogleInfoWindow.prototype=Object.create(Parent.prototype),WPGMZA.GoogleInfoWindow.prototype.constructor=WPGMZA.GoogleInfoWindow,WPGMZA.GoogleInfoWindow.prototype.setFeature=function(feature){(this.feature=feature)instanceof WPGMZA.Marker?this.googleObject=feature.googleMarker:feature instanceof WPGMZA.Polygon?this.googleObject=feature.googlePolygon:feature instanceof WPGMZA.Polyline&&(this.googleObject=feature.googlePolyline)},WPGMZA.GoogleInfoWindow.prototype.createGoogleInfoWindow=function(){var self=this;this.googleInfoWindow||(this.googleInfoWindow=new google.maps.InfoWindow,this.googleInfoWindow.setZIndex(WPGMZA.GoogleInfoWindow.Z_INDEX),google.maps.event.addListener(this.googleInfoWindow,"domready",function(event){self.trigger("domready")}),google.maps.event.addListener(this.googleInfoWindow,"closeclick",function(event){self.state!=WPGMZA.InfoWindow.STATE_CLOSED&&(self.state=WPGMZA.InfoWindow.STATE_CLOSED,self.feature.map.trigger("infowindowclose"))}))},WPGMZA.GoogleInfoWindow.prototype.open=function(map,feature){var self=this;if(!Parent.prototype.open.call(this,map,feature))return!1;this.parent=map,this.createGoogleInfoWindow(),this.setFeature(feature),void 0!==feature._osDisableAutoPan&&(feature._osDisableAutoPan?(this.googleInfoWindow.setOptions({disableAutoPan:!0}),feature._osDisableAutoPan=!1):this.googleInfoWindow.setOptions({disableAutoPan:!1})),this.googleInfoWindow.open(this.feature.map.googleMap,this.googleObject);var intervalID,guid=WPGMZA.guid(),map=WPGMZA.isProVersion()?"":this.addEditButton(),feature="<div id='"+guid+"'>"+map+" "+this.content+"</div>";return this.googleInfoWindow.setContent(feature),intervalID=setInterval(function(event){(div=$("#"+guid)).length&&(clearInterval(intervalID),div[0].wpgmzaFeature=self.feature,div.addClass("wpgmza-infowindow"),self.element=div[0],self.trigger("infowindowopen"))},50),!0},WPGMZA.GoogleInfoWindow.prototype.close=function(){this.googleInfoWindow&&(WPGMZA.InfoWindow.prototype.close.call(this),this.googleInfoWindow.close())},WPGMZA.GoogleInfoWindow.prototype.setContent=function(html){Parent.prototype.setContent.call(this,html),this.content=html,this.createGoogleInfoWindow(),this.googleInfoWindow.setContent(html)},WPGMZA.GoogleInfoWindow.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options),this.createGoogleInfoWindow(),this.googleInfoWindow.setOptions(options)}}),jQuery(function($){var Parent;WPGMZA.OLInfoWindow=function(feature){var self=this;Parent.call(this,feature),this.element=$("<div class='wpgmza-infowindow ol-info-window-container ol-info-window-plain'></div>")[0],$(this.element).on("click",".ol-info-window-close",function(event){self.close()})},Parent=WPGMZA.isProVersion()?WPGMZA.ProInfoWindow:WPGMZA.InfoWindow,WPGMZA.OLInfoWindow.prototype=Object.create(Parent.prototype),WPGMZA.OLInfoWindow.prototype.constructor=WPGMZA.OLInfoWindow,Object.defineProperty(WPGMZA.OLInfoWindow.prototype,"isPanIntoViewAllowed",{get:function(){return!0}}),WPGMZA.OLInfoWindow.prototype.open=function(map,feature){var self=this,latLng=feature.getPosition();return!!latLng&&!!Parent.prototype.open.call(this,map,feature)&&(this.parent=map,this.overlay&&this.feature.map.olMap.removeOverlay(this.overlay),this.overlay=new ol.Overlay({element:this.element,stopEvent:!0,insertFirst:!0}),this.overlay.setPosition(ol.proj.fromLonLat([latLng.lng,latLng.lat])),self.feature.map.olMap.addOverlay(this.overlay),$(this.element).show(),this.setContent(this.content),WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER&&WPGMZA.getImageDimensions(feature.getIcon(),function(size){$(self.element).css({left:Math.round(size.width/2)+"px"})}),this.autoResize(),this.trigger("infowindowopen"),void this.trigger("domready"))},WPGMZA.OLInfoWindow.prototype.close=function(event){this.overlay&&($(this.element).hide(),WPGMZA.InfoWindow.prototype.close.call(this),this.trigger("infowindowclose"),this.feature.map.olMap.removeOverlay(this.overlay),this.overlay=null)},WPGMZA.OLInfoWindow.prototype.setContent=function(html){Parent.prototype.setContent.call(this,html),this.content=html;var eaBtn=WPGMZA.isProVersion()?"":this.addEditButton();$(this.element).html(eaBtn+"<i class='fa fa-times ol-info-window-close' aria-hidden='true'></i>"+html)},WPGMZA.OLInfoWindow.prototype.setOptions=function(options){options.maxWidth&&$(this.element).css({"max-width":options.maxWidth+"px"})},WPGMZA.OLInfoWindow.prototype.onOpen=function(){var self=this,imgs=$(this.element).find("img"),numImages=imgs.length,numImagesLoaded=0;WPGMZA.InfoWindow.prototype.onOpen.apply(this,arguments);let canAutoPan=!0;function inside(el,viewport){el=$(el)[0].getBoundingClientRect(),viewport=$(viewport)[0].getBoundingClientRect();return el.left>=viewport.left&&el.left<=viewport.right&&el.right<=viewport.right&&el.right>=viewport.left&&el.top>=viewport.top&&el.top<=viewport.bottom&&el.bottom<=viewport.bottom&&el.bottom>=viewport.top}function panIntoView(){var height=$(self.element).height();self.feature.map.animateNudge(0,.45*-(height+180),self.feature.getPosition())}void 0!==this.feature._osDisableAutoPan&&this.feature._osDisableAutoPan&&(canAutoPan=!1,this.feature._osDisableAutoPan=!1),this.isPanIntoViewAllowed&&canAutoPan&&(imgs.each(function(index,el){el.onload=function(){++numImagesLoaded!=numImages||inside(self.element,self.feature.map.element)||panIntoView()}}),0!=numImages||inside(self.element,self.feature.map.element)||panIntoView())},WPGMZA.OLInfoWindow.prototype.autoResize=function(){var mapWidth,mapHeight;$(this.element).css("max-height","none"),$(this.feature.map.element).length&&(mapHeight=$(this.feature.map.element).height(),mapWidth=$(this.feature.map.element).width(),mapHeight=mapHeight-180,$(this.element).height()>mapHeight&&$(this.element).css("max-height",mapHeight+"px"),mapHeight=648<mapWidth?648:mapWidth-120,$(this.element).width()>mapHeight)&&$(this.element).css("max-width",mapHeight+"px")}}),jQuery(function($){WPGMZA.LatLng.fromJpeg=function(src,callback){var img=new Image;img.onload=function(){EXIF.getData(img,function(){var lngRef,latRef,aLat=EXIF.getTag(img,"GPSLatitude"),aLng=EXIF.getTag(img,"GPSLongitude");aLat&&aLng?(latRef=EXIF.getTag(img,"GPSLatitudeRef")||"N",lngRef=EXIF.getTag(img,"GPSLongitudeRef")||"W",aLat=(aLat[0]+aLat[1]/60+aLat[2]/3600)*("N"==latRef?1:-1),latRef=(aLng[0]+aLng[1]/60+aLng[2]/3600)*("W"==lngRef?-1:1),callback(new WPGMZA.LatLng({lat:aLat,lng:latRef}))):callback(null)})},img.src=src},WPGMZA.LatLng.EXIF_ADDRESS_GEOCODE_KM_THRESHOLD=.5,$(document.body).on("click",".wpgmza-get-location-from-picture[data-source][data-destination]",function(event){var url,source=$(this).attr("data-source"),dest=$(this).attr("data-destination"),lat=$(this).attr("data-destination-lat"),lng=$(this).attr("data-destination-lng");if(!$(source).length)throw alert(WPGMZA.localized_strings.no_picture_found),new Error("Source element not found");if(!$(dest).length)throw new Error("Destination element not found");if($(source).is("img"))url=$(source).attr("src");else{if(!(source=$(source).css("background-image").match(/url\(["'](.+)["'"]\)/)))throw new Error("No background image found");url=source[1]}url&&0!=url.length||alert(WPGMZA.localized_strings.no_picture_found),WPGMZA.LatLng.fromJpeg(url,function(jpegLatLng){var geocoder;jpegLatLng?($(dest).val(jpegLatLng.toString()),lat&&lng&&($(lat).val(jpegLatLng.lat),$(lng).val(jpegLatLng.lng)),WPGMZA.settings.useRawJpegCoordinates||(geocoder=WPGMZA.Geocoder.createInstance()).getAddressFromLatLng({latLng:jpegLatLng},function(results,status){var address;status==WPGMZA.Geocoder.SUCCESS&&(address=results[0],geocoder.getLatLngFromAddress({address:address},function(results,status){status==WPGMZA.Geocoder.SUCCESS&&(status=new WPGMZA.LatLng(results[0].latLng),WPGMZA.Distance.between(status,jpegLatLng)<=WPGMZA.LatLng.EXIF_ADDRESS_GEOCODE_KM_THRESHOLD)&&$(dest).val(address)}))})):alert(WPGMZA.localized_strings.no_gps_coordinates)})})}),jQuery(function($){"map-edit"==WPGMZA.currentPage&&(WPGMZA.ProMapEditPage=function(){var self=this;WPGMZA.MapEditPage.apply(this,arguments),this.directionsOriginIconPicker=new WPGMZA.MarkerIconPicker($("#directions_origin_icon_picker_container .wpgmza-marker-icon-picker")),this.directionsDestinationIconPicker=new WPGMZA.MarkerIconPicker($("#directions_destination_icon_picker_container .wpgmza-marker-icon-picker")),this.advancedSettingsMarkerIconPicker=new WPGMZA.MarkerIconPicker($("#advanced-settings-marker-icon-picker-container .wpgmza-marker-icon-picker")),this.userIconPicker=new WPGMZA.MarkerIconPicker($("#wpgmza_show_user_location_conditional .wpgmza-marker-icon-picker")),this.storeLocatorIconPicker=new WPGMZA.MarkerIconPicker($("#wpgmza_store_locator_bounce_conditional .wpgmza-marker-icon-picker")),WPGMZA.InternalEngine.isLegacy()||(this.streetViewEditor=new WPGMZA.StreetViewEditor($(".streetview-starting-editor"),this.map)),$("input[name='store_locator_search_area']").on("input",function(event){self.onStoreLocatorSearchAreaChanged(event)}),self.onStoreLocatorSearchAreaChanged(),$('input[name="wpgmza_iw_type"][value="1"]').prop("checked")||$('input[name="wpgmza_iw_type"][value="2"]').prop("checked")||$('input[name="wpgmza_iw_type"][value="3"]').prop("checked")?$("#iw_custom_colors_row").fadeIn():$("#iw_custom_colors_row").fadeOut(),$(".iw_custom_click_show").on("click",function(){$("#iw_custom_colors_row").fadeIn()}),$(".iw_custom_click_hide").on("click",function(){$("#iw_custom_colors_row").fadeOut()}),$("#wpgmza_push_in_map").prop("checked")?$("#wpgmza_marker_list_conditional").fadeIn():$("#wpgmza_marker_list_conditional").fadeOut(),$("#wpgmza_push_in_map").on("change",function(){$(this).prop("checked")?$("#wpgmza_marker_list_conditional").fadeIn():$("#wpgmza_marker_list_conditional").fadeOut()}),parseInt($("#marker_listing_component_anchor").val())<9&&parseInt(jQuery('input[name="wpgmza_listmarkers_by"]:checked').val())===WPGMZA.MarkerListing.STYLE_PANEL?$("#marker_listing_component_auto_open_wrap").fadeIn():$("#marker_listing_component_auto_open_wrap").fadeOut(),$('#marker_listing_component_anchor, input[name="wpgmza_listmarkers_by"]').on("change click",function(){parseInt($(this).val())<9&&parseInt(jQuery('input[name="wpgmza_listmarkers_by"]:checked').val())===WPGMZA.MarkerListing.STYLE_PANEL?$("#marker_listing_component_auto_open_wrap").fadeIn():$("#marker_listing_component_auto_open_wrap").fadeOut()}),$("#wpgmza_show_user_location").prop("checked")?$("#wpgmza_show_user_location_conditional").fadeIn():$("#wpgmza_show_user_location_conditional").fadeOut(),$("#wpgmza_show_user_location").on("change",function(){$(this).prop("checked")?$("#wpgmza_show_user_location_conditional").fadeIn():$("#wpgmza_show_user_location_conditional").fadeOut()}),$("#wpgmza_store_locator_bounce").prop("checked")?$("#wpgmza_store_locator_bounce_conditional").fadeIn():$("#wpgmza_store_locator_bounce_conditional").fadeOut(),$("#wpgmza_store_locator_bounce").on("change",function(){$(this).prop("checked")?$("#wpgmza_store_locator_bounce_conditional").fadeIn():$("#wpgmza_store_locator_bounce_conditional").fadeOut()}),$("#wpgmza_override_users_location_zoom_level").prop("checked")?$("#wpgmza_override_users_location_zoom_levels_slider").fadeIn():$("#wpgmza_override_users_location_zoom_levels_slider").fadeOut(),$("#wpgmza_override_users_location_zoom_level").on("change",function(){$(this).prop("checked")?$("#wpgmza_override_users_location_zoom_levels_slider").fadeIn():$("#wpgmza_override_users_location_zoom_levels_slider").fadeOut()}),$("#override-users-location-zoom-levels-slider").slider({range:"max",min:1,max:21,value:$("input[name='override_users_location_zoom_levels']").val(),slide:function(event,ui){$("input[name='override_users_location_zoom_levels']").val(ui.value)}}),$("#zoom_level_on_marker_listing_override").prop("checked")?$("#zoom_level_on_marker_listing_click_level").fadeIn():$("#zoom_level_on_marker_listing_click_level").fadeOut(),$("#zoom_level_on_marker_listing_override").on("change",function(){$(this).prop("checked")?$("#zoom_level_on_marker_listing_click_level").fadeIn():$("#zoom_level_on_marker_listing_click_level").fadeOut()}),$("#zoom-on-marker-listing-click-slider").slider({range:"max",min:1,max:21,value:$("input[name='zoom_level_on_marker_listing_click']").val(),slide:function(event,ui){$("input[name='zoom_level_on_marker_listing_click']").val(ui.value)}}),$("#open-route-service-key-notice").wrapInner("<div class='"+(WPGMZA.InternalEngine.isLegacy()?"":"wpgmza-pos-relative wpgmza-card wpgmza-shadow ")+"notice notice-error'><p></p></div>"),$("#zoom-on-marker-click-slider").slider({range:"max",min:1,max:21,value:$("input[name='wpgmza_zoom_on_marker_click_slider']").val(),slide:function(event,ui){$("input[name='wpgmza_zoom_on_marker_click_slider']").val(ui.value)}}),$("#wpgmza_zoom_on_marker_click").prop("checked")?$("#wpgmza_zoom_on_marker_click_zoom_level").fadeIn():$("#wpgmza_zoom_on_marker_click_zoom_level").fadeOut(),$("#wpgmza_zoom_on_marker_click").on("change",function(){$(this).prop("checked")?$("#wpgmza_zoom_on_marker_click_zoom_level").fadeIn():$("#wpgmza_zoom_on_marker_click_zoom_level").fadeOut()}),$("#datatable_result").prop("checked")?$("#datable_strings").fadeIn():$("#datable_strings").fadeOut(),$("#datatable_result").on("change",function(){$(this).prop("checked")?$("#datable_strings").fadeIn():$("#datable_strings").fadeOut()}),$("#datatable_result_page").prop("checked")?$("#datable_strings_entries").fadeIn():$("#datable_strings_entries").fadeOut(),$("#datatable_result_page").on("change",function(){$(this).prop("checked")?$("#datable_strings_entries").fadeIn():$("#datable_strings_entries").fadeOut()}),$('input[name="only_load_markers_within_viewport"]').on("change",function(){$(this).prop("checked")&&$('input[name="fit_maps_bounds_to_markers"]').prop("checked")&&($('input[name="fit_maps_bounds_to_markers"]').prop("checked",!1),WPGMZA.notification("Fit map bounds to markers has been disabled"))}),$('input[name="fit_maps_bounds_to_markers"]').on("change",function(){$(this).prop("checked")&&$('input[name="only_load_markers_within_viewport"]').prop("checked")&&($('input[name="only_load_markers_within_viewport"]').prop("checked",!1),WPGMZA.notification("Only load markers within viewport has been disabled"))}),$('input[name="custom_tile_image"]').on("imagechange",function(event){event.currentTarget&&self.onCustomTileImageChange(event.currentTarget)}),$('input[name="map_starts_in_streetview"]').prop("checked")?$(".streetview-starting-editor").fadeIn():$(".streetview-starting-editor").fadeOut(),$('input[name="map_starts_in_streetview"]').on("change",function(){$(this).prop("checked")?($(".streetview-starting-editor").fadeIn(),self.streetViewEditor.hasLocation()||self.streetViewEditor.setEditing(!0)):$(".streetview-starting-editor").fadeOut()}),$(document.body).on("grouping-closed",function(event,grouping){grouping&&"map-settings-behaviour-streetview"===grouping&&self.streetViewEditor.setEditing(!1)})},WPGMZA.extend(WPGMZA.ProMapEditPage,WPGMZA.MapEditPage),WPGMZA.ProMapEditPage.prototype.onStoreLocatorSearchAreaChanged=function(event){var value=$("input[name='store_locator_search_area']:checked").val();$("[data-search-area='"+value+"']").show(),$("[data-search-area][data-search-area!='"+value+"']").hide()},WPGMZA.ProMapEditPage.prototype.onCustomTileImageChange=function(context){context instanceof HTMLInputElement&&$(context).val()!==this.map.settings.custom_tile_image&&context.wpgmzaImageInputSingle&&context.wpgmzaImageInputSingle.element&&(context=$(context.wpgmzaImageInputSingle.element).next(".wpgmza-image-single-input-preview").find("img"),context={width:parseInt(context.prop("naturalWidth")),height:parseInt(context.prop("naturalHeight"))},$('input[name="custom_tile_image_width"]').val(context.width),$('input[name="custom_tile_image_height"]').val(context.height),WPGMZA.notification("Custom Image width/height updated"))})}),jQuery(function($){WPGMZA.ProMapListPage=function(){var self=this;WPGMZA.MapListPage.apply(this,arguments),$("[data-action='new-map']").on("click",function(event){self.onNewMap(event)}),$("[data-action='wizard']").on("click",function(event){self.onWizard(event)})},WPGMZA.extend(WPGMZA.ProMapListPage,WPGMZA.MapListPage),WPGMZA.MapListPage.createInstance=function(){return new WPGMZA.ProMapListPage},WPGMZA.ProMapListPage.prototype.onNewMap=function(event){$(event.target).prop("disabled","true"),WPGMZA.restAPI.call("/maps/",{method:"POST",data:{map_title:WPGMZA.localized_strings.new_map,map_start_lat:36.778261,map_start_lng:-119.4179323999,map_start_zoom:3},success:function(response,status,xhr){window.location.href=window.location.href="admin.php?page=wp-google-maps-menu&action=edit&map_id="+response.id}})},WPGMZA.ProMapListPage.prototype.onWizard=function(event){window.location.href="admin.php?page=wp-google-maps-menu&action=wizard"}}),jQuery(function($){WPGMZA.ProMap=function(element,options){var self=this;this._markersPlaced=!1,this.element=element,WPGMZA.Map.call(this,element,options),this.defaultMarkerIcon=null,this.settings.upload_default_marker&&(this.defaultMarkerIcon=WPGMZA.MarkerIcon.createInstance(this.settings.upload_default_marker)),this.heatmaps=[],this.imageoverlays=[],this.showDistanceFromLocation=null,this.initCustomFieldFilterController(),this.initUserLocationMarker(),this.on("filteringcomplete",function(){self.onFilteringComplete()}),this._onMarkersPlaced=function(event){self.onMarkersPlaced(event)},this.on("markersplaced",this._onMarkersPlaced),WPGMZA.CloudAPI&&WPGMZA.CloudAPI.isBeingUsed&&WPGMZA.cloudAPI.call("/load")},WPGMZA.ProMap.prototype=Object.create(WPGMZA.Map.prototype),WPGMZA.ProMap.prototype.constructor=WPGMZA.ProMap,WPGMZA.ProMap.SHOW_DISTANCE_FROM_USER_LOCATION="user",WPGMZA.ProMap.SHOW_DISTANCE_FROM_SEARCHED_ADDRESS="searched",WPGMZA.ProMap.ControlPosition={TOP_CENTER:1,TOP_LEFT:2,TOP_RIGHT:3,LEFT_TOP:4,RIGHT_TOP:5,LEFT_CENTER:6,RIGHT_CENTER:7,LEFT_BOTTOM:8,RIGHT_BOTTOM:9,BOTTOM_CENTER:10,BOTTOM_LEFT:11,BOTTOM_RIGHT:12},Object.defineProperty(WPGMZA.ProMap.prototype,"mashupIDs",{get:function(){var result=[],attr=$(this.element).attr("data-mashup-ids");return result=attr&&attr.length?attr.split(","):result}}),Object.defineProperty(WPGMZA.ProMap.prototype,"directionsEnabled",{get:function(){return 0<$(".wpgmza-standalone-component #wpgmaps_directions_edit_"+this.id).length||1==this.settings.directions_enabled}}),WPGMZA.ProMap.prototype.onInit=function(event){var latLng,self=this;if(WPGMZA.Map.prototype.onInit.apply(this,arguments),this.initViewportGroupings(),this.initDirectionsBox(),this.shortcodeAttributes.lat&&this.shortcodeAttributes.lng?(latLng=new WPGMZA.LatLng({lat:this.shortcodeAttributes.lat,lng:this.shortcodeAttributes.lng}),this.setCenter(latLng),this.shortcodeAttributes.mark_center&&"true"===this.shortcodeAttributes.mark_center&&(latLng=WPGMZA.Marker.createInstance({lat:this.shortcodeAttributes.lat,lng:this.shortcodeAttributes.lng,address:this.shortcodeAttributes.lat+", "+this.shortcodeAttributes.lng}),this.addMarker(latLng))):this.shortcodeAttributes.address&&WPGMZA.Geocoder.createInstance().geocode({address:this.shortcodeAttributes.address},function(results,status){status!=WPGMZA.Geocoder.SUCCESS?console.warn("Shortcode attribute address could not be geocoded"):self.setCenter(results[0].latLng)}),(latLng=WPGMZA.getQueryParamValue("mzoom"))&&this.setZoom(latLng),WPGMZA.getCurrentPage()!=WPGMZA.PAGE_MAP_EDIT&&"1"==this.settings.automatically_pan_to_users_location&&WPGMZA.getCurrentPosition(function(result){self.userLocationMarker||self.initUserLocationMarker(result),self.setCenter(new WPGMZA.LatLng({lat:result.coords.latitude,lng:result.coords.longitude})),self.settings.override_users_location_zoom_level&&self.setZoom(self.settings.override_users_location_zoom_levels)}),this.settings.map_starts_in_streetview&&this.settings.map_starts_in_streetview_location&&this.settings.map_starts_in_streetview_location.trim().length)try{var streetviewStartOptions={position:new WPGMZA.LatLng(this.settings.map_starts_in_streetview_location)};this.settings.map_starts_in_streetview_heading&&(streetviewStartOptions.heading=parseFloat(this.settings.map_starts_in_streetview_heading)),this.settings.map_starts_in_streetview_pitch&&(streetviewStartOptions.pitch=parseFloat(this.settings.map_starts_in_streetview_pitch)),this.openStreetView(streetviewStartOptions),WPGMZA.getCurrentPage()===WPGMZA.PAGE_MAP_EDIT&&WPGMZA.notification("Starting map in Street View")}catch(ex){}},WPGMZA.ProMap.prototype.onMarkersPlaced=function(event){var self=this,jumpToNearestMarker=0==WPGMZA.is_admin&&1==self.settings.jump_to_nearest_marker_on_initialization;if(this.settings.order_markers_by!=WPGMZA.MarkerListing.ORDER_BY_DISTANCE&&1!=this.settings.show_distance_from_location&&!jumpToNearestMarker||WPGMZA.getCurrentPosition(function(result){result=new WPGMZA.LatLng({lat:result.coords.latitude,lng:result.coords.longitude});self.userLocation=result,self.userLocation.source=WPGMZA.ProMap.SHOW_DISTANCE_FROM_USER_LOCATION,self.showDistanceFromLocation=result,self.updateInfoWindowDistances(),self.markerListing&&(self.markersPlaced?self.markerListing.reload():self.on("markersplaced",function(event){self.markerListing.reload()})),jumpToNearestMarker&&self.panToNearestMarker(result)},function(error){self.markerListing&&self.markerListing.reload()}),self.settings.fit_maps_bounds_to_markers&&0<self.markers.length&&self.fitBoundsToMarkers(),self.initMarkerListing(),1==this.settings.mass_marker_support&&WPGMZA.MarkerClusterer){var options={};if(WPGMZA.settings.wpgmza_cluster_advanced_enabled){var styles=[];options.gridSize=parseInt(WPGMZA.settings.wpgmza_cluster_grid_size),options.maxZoom=parseInt(WPGMZA.settings.wpgmza_cluster_max_zoom),options.minClusterSize=parseInt(WPGMZA.settings.wpgmza_cluster_min_cluster_size),options.zoomOnClick=!!WPGMZA.settings.wpgmza_cluster_zoom_click;for(var i=1;i<=5;i++)(level={}).url=WPGMZA.settings["clusterLevel"+i].replace(/%2F/g,"/"),level.width=parseInt(WPGMZA.settings["clusterLevel"+i+"Width"]),level.height=parseInt(WPGMZA.settings["clusterLevel"+i+"Height"]),level.textColor=WPGMZA.settings.wpgmza_cluster_font_color,level.textSize=parseInt(WPGMZA.settings.wpgmza_cluster_font_size),styles.push(level);options.styles=styles}this.markerClusterer=new WPGMZA.MarkerClusterer(this,null,options),this.markerClusterer.addMarkers(this.markers)}},WPGMZA.ProMap.prototype.getRESTParameters=function(options){var params=WPGMZA.Map.prototype.getRESTParameters.apply(this,arguments);return this.settings.only_load_markers_within_viewport&&this.initialFetchCompleted&&(params.include="markers"),params},WPGMZA.ProMap.prototype.fetchFeatures=function(){var self=this;this.settings.only_load_markers_within_viewport?this.on("idle",function(event){self.fetchFeaturesViaREST(),self.initialFetchCompleted=!0}):WPGMZA.Map.prototype.fetchFeatures.apply(this,arguments)},WPGMZA.ProMap.prototype.onMarkersFetched=function(data,expectMoreBatches){this.settings.only_load_markers_within_viewport&&this.removeAllMarkers(),WPGMZA.Map.prototype.onMarkersFetched.apply(this,arguments)},WPGMZA.ProMap.prototype.panToNearestMarker=function(latlng){var closestMarker,distance=1/0;latlng=latlng||this.getCenter();for(var i=0;i<this.markers.length;i++){var distanceToMarker=WPGMZA.Distance.between(latlng,this.markers[i].getPosition());distanceToMarker<distance&&(closestMarker=this.markers[i],distance=distanceToMarker)}closestMarker&&this.panTo(closestMarker.getPosition(this.setZoom(7)))},WPGMZA.ProMap.prototype.fitBoundsToMarkers=function(markers){var bounds=new WPGMZA.LatLngBounds;markers=markers||this.markers;for(var i=0;i<markers.length;i++){if(!(markers[i]instanceof WPGMZA.Marker))throw new Error("Invalid input, not a WPGMZA.Marker");markers[i].isFiltered||bounds.extend(markers[i])}this.fitBounds(bounds)},WPGMZA.ProMap.prototype.fitMapBoundsToMarkers=WPGMZA.ProMap.prototype.fitBoundsToMarkers,WPGMZA.ProMap.prototype.resetBounds=function(){var latlng=new WPGMZA.LatLng(this.settings.map_start_lat,this.settings.map_start_lng);this.panTo(latlng),this.setZoom(this.settings.map_start_zoom)},WPGMZA.ProMap.prototype.onFilteringComplete=function(){if("1"==this.settings.fit_maps_bounds_to_markers_after_filtering){for(var areMarkersVisible=!1,i=0;i<this.markers.length;i++)if(!this.markers[i].isFiltered){areMarkersVisible=!0;break}areMarkersVisible&&this.fitBoundsToMarkers()}},WPGMZA.ProMap.prototype.initMarkerListing=function(){var markerListingElement;"1"!=WPGMZA.is_admin&&(markerListingElement=$("[data-wpgmza-marker-listing][id$='_"+this.id+"']"),this.markerListing=WPGMZA.MarkerListing.createInstance(this,markerListingElement[0]),this.off("markersplaced",this._onMarkersPlaced),delete this._onMarkersPlaced)},WPGMZA.ProMap.prototype.initCustomFieldFilterController=function(){this.customFieldFilterController=WPGMZA.CustomFieldFilterController.createInstance(this.id),WPGMZA.useLegacyGlobals&&wpgmzaLegacyGlobals.MYMAP[this.id]&&(wpgmzaLegacyGlobals.MYMAP[this.id].customFieldFilterController=this.customFieldFilterController)},WPGMZA.ProMap.prototype.initUserLocationMarker=function(cachedPos){var icon,options,marker,self=this;1==this.settings.show_user_location&&1!=parseInt(WPGMZA.is_admin)&&(icon=this.settings.upload_default_ul_marker,options={id:WPGMZA.guid(),animation:WPGMZA.Marker.ANIMATION_DROP,user_location:!0},icon&&icon.length&&(options.icon=icon),this.settings.upload_default_ul_marker_retina&&(options.retina=!0),(marker=WPGMZA.Marker.createInstance(options)).isFilterable=!1,marker.setOptions({zIndex:999999}),marker._icon.retina=marker.retina,cachedPos&&cachedPos.coords&&(marker.setPosition({lat:cachedPos.coords.latitude,lng:cachedPos.coords.longitude}),marker.map||self.addMarker(marker),self.userLocationMarker||(self.userLocationMarker=marker,self.trigger("userlocationmarkerplaced"))),WPGMZA.watchPosition(function(position){marker.setPosition({lat:position.coords.latitude,lng:position.coords.longitude}),marker.map||self.addMarker(marker),self.userLocationMarker||(self.userLocationMarker=marker,self.trigger("userlocationmarkerplaced"))}))},WPGMZA.ProMap.prototype.initDirectionsBox=function(){1!=WPGMZA.is_admin&&this.directionsEnabled&&(this.directionsBox=WPGMZA.DirectionsBox.createInstance(this))},WPGMZA.ProMap.prototype.initViewportGroupings=function(){"1"!=WPGMZA.is_admin&&(this.viewportGroupings=WPGMZA.ViewportGroupings.createInstance(this))},WPGMZA.ProMap.prototype.addHeatmap=function(heatmap){if(!(heatmap instanceof WPGMZA.Heatmap))throw new Error("Argument must be an instance of WPGMZA.Heatmap");(heatmap.map=this).heatmaps.push(heatmap),this.dispatchEvent({type:"heatmapadded",heatmap:heatmap})},WPGMZA.ProMap.prototype.getHeatmapByID=function(id){for(var i=0;i<this.heatmaps.length;i++)if(this.heatmaps[i].id==id)return this.heatmaps[i];return null},WPGMZA.ProMap.prototype.removeHeatmap=function(heatmap){if(!(heatmap instanceof WPGMZA.Heatmap))throw new Error("Argument must be an instance of WPGMZA.Heatmap");if(heatmap.map!=this)throw new Error("Wrong map error");heatmap.map=null,heatmap instanceof WPGMZA.GoogleHeatmap?heatmap.googleHeatmap.setMap(null):heatmap instanceof WPGMZA.OLHeatmap&&heatmap.olHeatmap.setMap(null),this.heatmaps.splice(this.heatmaps.indexOf(heatmap),1),this.dispatchEvent({type:"heatmapremoved",heatmap:heatmap})},WPGMZA.ProMap.prototype.removeHeatmapByID=function(id){id=this.getHeatmapByID(id);id&&this.removeHeatmap(id)},WPGMZA.ProMap.prototype.addImageoverlay=function(overlay){if(!(overlay instanceof WPGMZA.Imageoverlay))throw new Error("Argument must be an instance of WPGMZA.Imageoverlay");(overlay.map=this).imageoverlays.push(overlay),this.dispatchEvent({type:"imageoverlayadded",imageoverlay:overlay})},WPGMZA.ProMap.prototype.getImageoverlayByID=function(id){for(var i=0;i<this.imageoverlays.length;i++)if(this.imageoverlays[i].id==id)return this.imageoverlays[i];return null},WPGMZA.ProMap.prototype.removeImageoverlay=function(overlay){if(!(overlay instanceof WPGMZA.Imageoverlay))throw new Error("Argument must be an instance of WPGMZA.Imageoverlay");if(overlay.map!=this)throw new Error("Wrong map error");overlay.map=null,this.imageoverlays.splice(this.imageoverlays.indexOf(overlay),1),this.dispatchEvent({type:"imageoverlayremoved",imageoverlay:overlay})},WPGMZA.ProMap.prototype.removeImageoverlayByID=function(id){id=this.getImageoverlayByID(id);id&&this.removeImageoverlay(id)},WPGMZA.ProMap.prototype.getInfoWindowStyle=function(){var local,global;return!this.settings.other_settings||(local=this.settings.other_settings.wpgmza_iw_type,global=WPGMZA.settings.wpgmza_iw_type,"-1"==local&&"-1"==global)?WPGMZA.ProInfoWindow.STYLE_NATIVE_GOOGLE:"-1"==local?global:local||WPGMZA.ProInfoWindow.STYLE_NATIVE_GOOGLE},WPGMZA.ProMap.prototype.getFilteringParameters=function(){},WPGMZA.ProMap.prototype.updateInfoWindowDistances=function(){this.showDistanceFromLocation;this.markers.forEach(function(marker){marker.infoWindow&&marker.infoWindow.updateDistanceFromLocation()})},WPGMZA.ProMap.prototype.hasVisibleMarkers=function(){for(var markers=this.markers,i=0;i<markers.length;i++)if(markers[i].isFilterable&&markers[i].getVisible())return!0;return!1},WPGMZA.ProMap.prototype.pushElementIntoMapPanel=function(element,position){},WPGMZA.ProMap.prototype.onClick=function(event){if(this.settings.close_infowindow_on_map_click&&event.target instanceof WPGMZA.Map){void 0!==this.lastInteractedMarker&&this.lastInteractedMarker.infoWindow&&(this.lastInteractedMarker.infoWindow.close(),$(this.lastInteractedMarker.infoWindow.element).hasClass("wpgmza_modern_infowindow"))&&$(this.lastInteractedMarker.infoWindow.element).remove();try{if(event.target.viewportGroupings&&event.target.viewportGroupings.groups&&event.target.viewportGroupings.groups.length)for(var group of event.target.viewportGroupings.groups)group.hide()}catch(ex){}}},jQuery(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange",function(){var isFullScreen,modernMarkerButton,modernPopoutPanel,modernStoreLocator,fullScreenMap;WPGMZA.InternalEngine.isLegacy()&&(isFullScreen=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen,modernMarkerButton=jQuery(".wpgmza-modern-marker-open-button"),modernPopoutPanel=jQuery(".wpgmza-popout-panel"),modernStoreLocator=jQuery(".wpgmza-modern-store-locator"),fullScreenMap=void 0,fullScreenMap=(modernMarkerButton.length?modernMarkerButton:modernPopoutPanel.length?modernPopoutPanel:modernStoreLocator).parent(".wpgmza_map").children("div").first(),isFullScreen)&&void 0!==fullScreenMap&&fullScreenMap.append(modernMarkerButton,modernPopoutPanel,modernStoreLocator)})}),jQuery(function($){var Parent;WPGMZA.GoogleMap=function(element,options){var self=this;Parent.call(this,element,options),this.loadGoogleMap(),options?this.setOptions(options,!0):this.setOptions({},!0),google.maps.event.addListener(this.googleMap,"click",function(event){var wpgmzaEvent=new WPGMZA.Event("click");wpgmzaEvent.latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.dispatchEvent(wpgmzaEvent)}),google.maps.event.addListener(this.googleMap,"rightclick",function(event){var wpgmzaEvent=new WPGMZA.Event("rightclick");wpgmzaEvent.latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.dispatchEvent(wpgmzaEvent)}),google.maps.event.addListener(this.googleMap,"dragend",function(event){self.dispatchEvent("dragend")}),google.maps.event.addListener(this.googleMap,"zoom_changed",function(event){self.dispatchEvent("zoom_changed"),self.dispatchEvent("zoomchanged")}),google.maps.event.addListener(this.googleMap,"idle",function(event){self.onIdle(event)}),this.googleMap.getStreetView()&&(google.maps.event.addListener(this.googleMap.getStreetView(),"visible_changed",function(){var wpgmzaEvent=new WPGMZA.Event("streetview_visible_changed");wpgmzaEvent.visible=this.getVisible(),self.dispatchEvent(wpgmzaEvent)}),google.maps.event.addListener(this.googleMap.getStreetView(),"position_changed",function(){var wpgmzaEvent=new WPGMZA.Event("streetview_position_changed"),position=this.getPosition();position&&(wpgmzaEvent.latLng={lat:position.lat(),lng:position.lng()}),wpgmzaEvent.visible=this.getVisible(),self.dispatchEvent(wpgmzaEvent)}),google.maps.event.addListener(this.googleMap.getStreetView(),"pov_changed",function(){var wpgmzaEvent=new WPGMZA.Event("streetview_pov_changed"),pov=this.getPov();pov&&(wpgmzaEvent.pov={heading:pov.heading,pitch:pov.pitch}),wpgmzaEvent.visible=this.getVisible(),self.dispatchEvent(wpgmzaEvent)})),WPGMZA.isProVersion()||(this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}),$(this.element).trigger("wpgooglemaps_loaded"))},WPGMZA.isProVersion()?(Parent=WPGMZA.ProMap,WPGMZA.GoogleMap.prototype=Object.create(WPGMZA.ProMap.prototype)):(Parent=WPGMZA.Map,WPGMZA.GoogleMap.prototype=Object.create(WPGMZA.Map.prototype)),WPGMZA.GoogleMap.prototype.constructor=WPGMZA.GoogleMap,WPGMZA.GoogleMap.parseThemeData=function(raw){var json;try{json=JSON.parse(raw)}catch(e){try{json=eval(raw)}catch(e){var str=raw,str=str.replace(/\\'/g,"'");str=str.replace(/\\"/g,'"'),str=str.replace(/\\0/g,"\0"),str=str.replace(/\\\\/g,"\\");try{json=eval(str)}catch(e){return console.warn("Couldn't parse theme data"),[]}}}if(!(json instanceof Array))return[];try{for(var data of json)if(!(data instanceof Object))return[]}catch(ex){return[]}return json},WPGMZA.GoogleMap.prototype.loadGoogleMap=function(){var self=this,options=this.settings.toGoogleMapsOptions();this.googleMap=new google.maps.Map(this.engineElement,options),google.maps.event.addListener(this.googleMap,"bounds_changed",function(){self.onBoundsChanged()}),1==this.settings.bicycle&&this.enableBicycleLayer(!0),1==this.settings.traffic&&this.enableTrafficLayer(!0),this.settings.transport_layer&&this.enablePublicTransportLayer(!0),this.showPointsOfInterest(this.settings.wpgmza_show_point_of_interest),$(this.engineElement).append($(this.element).find(".wpgmza-loader"))},WPGMZA.GoogleMap.prototype.setOptions=function(options,initializing){Parent.prototype.setOptions.call(this,options),options.scrollwheel&&delete options.scrollwheel,initializing?(initializing=$.extend(options,this.settings.toGoogleMapsOptions()),!(initializing=$.extend({},initializing)).center instanceof google.maps.LatLng&&(initializing.center instanceof WPGMZA.LatLng||"object"==typeof initializing.center)&&(initializing.center={lat:parseFloat(initializing.center.lat),lng:parseFloat(initializing.center.lng)}),this.settings.hide_point_of_interest&&(initializing.styles||(initializing.styles=[]),initializing.styles.push({featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]})),this.googleMap.setOptions(initializing)):this.googleMap.setOptions(options)},WPGMZA.GoogleMap.prototype.addMarker=function(marker){marker.googleMarker.setMap(this.googleMap),Parent.prototype.addMarker.call(this,marker)},WPGMZA.GoogleMap.prototype.removeMarker=function(marker){marker.googleMarker.setMap(null),Parent.prototype.removeMarker.call(this,marker)},WPGMZA.GoogleMap.prototype.addPolygon=function(polygon){polygon.googlePolygon.setMap(this.googleMap),Parent.prototype.addPolygon.call(this,polygon)},WPGMZA.GoogleMap.prototype.removePolygon=function(polygon){polygon.googlePolygon.setMap(null),Parent.prototype.removePolygon.call(this,polygon)},WPGMZA.GoogleMap.prototype.addPolyline=function(polyline){polyline.googlePolyline.setMap(this.googleMap),Parent.prototype.addPolyline.call(this,polyline)},WPGMZA.GoogleMap.prototype.removePolyline=function(polyline){polyline.googlePolyline.setMap(null),Parent.prototype.removePolyline.call(this,polyline)},WPGMZA.GoogleMap.prototype.addCircle=function(circle){circle.googleCircle.setMap(this.googleMap),Parent.prototype.addCircle.call(this,circle)},WPGMZA.GoogleMap.prototype.removeCircle=function(circle){circle.googleCircle.setMap(null),Parent.prototype.removeCircle.call(this,circle)},WPGMZA.GoogleMap.prototype.addRectangle=function(rectangle){rectangle.googleRectangle.setMap(this.googleMap),Parent.prototype.addRectangle.call(this,rectangle)},WPGMZA.GoogleMap.prototype.removeRectangle=function(rectangle){rectangle.googleRectangle.setMap(null),Parent.prototype.removeRectangle.call(this,rectangle)},WPGMZA.GoogleMap.prototype.getCenter=function(){var latLng=this.googleMap.getCenter();return{lat:latLng.lat(),lng:latLng.lng()}},WPGMZA.GoogleMap.prototype.setCenter=function(latLng){WPGMZA.Map.prototype.setCenter.call(this,latLng),latLng instanceof WPGMZA.LatLng?this.googleMap.setCenter({lat:latLng.lat,lng:latLng.lng}):this.googleMap.setCenter(latLng)},WPGMZA.GoogleMap.prototype.panTo=function(latLng){latLng instanceof WPGMZA.LatLng?this.googleMap.panTo({lat:latLng.lat,lng:latLng.lng}):this.googleMap.panTo(latLng)},WPGMZA.GoogleMap.prototype.getZoom=function(){return this.googleMap.getZoom()},WPGMZA.GoogleMap.prototype.setZoom=function(value){if(isNaN(value))throw new Error("Value must not be NaN");return this.googleMap.setZoom(parseInt(value))},WPGMZA.GoogleMap.prototype.getBounds=function(){var nativeBounds=new WPGMZA.LatLngBounds({});try{var bounds=this.googleMap.getBounds(),northEast=bounds.getNorthEast(),southWest=bounds.getSouthWest();nativeBounds.north=northEast.lat(),nativeBounds.south=southWest.lat(),nativeBounds.west=southWest.lng(),nativeBounds.east=northEast.lng(),nativeBounds.topLeft={lat:northEast.lat(),lng:southWest.lng()},nativeBounds.bottomRight={lat:southWest.lat(),lng:northEast.lng()}}catch(ex){}return nativeBounds},WPGMZA.GoogleMap.prototype.fitBounds=function(southWest,northEast){southWest instanceof WPGMZA.LatLng&&(southWest={lat:southWest.lat,lng:southWest.lng}),northEast instanceof WPGMZA.LatLng?northEast={lat:northEast.lat,lng:northEast.lng}:southWest instanceof WPGMZA.LatLngBounds&&(southWest={lat:(bounds=southWest).south,lng:bounds.west},northEast={lat:bounds.north,lng:bounds.east});var bounds=new google.maps.LatLngBounds(southWest,northEast);this.googleMap.fitBounds(bounds)},WPGMZA.GoogleMap.prototype.fitBoundsToVisibleMarkers=function(){for(var bounds=new google.maps.LatLngBounds,i=0;i<this.markers.length;i++)markers[i].getVisible()&&bounds.extend(markers[i].getPosition());this.googleMap.fitBounds(bounds)},WPGMZA.GoogleMap.prototype.enableBicycleLayer=function(enable){this.bicycleLayer||(this.bicycleLayer=new google.maps.BicyclingLayer),this.bicycleLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.enableTrafficLayer=function(enable){this.trafficLayer||(this.trafficLayer=new google.maps.TrafficLayer),this.trafficLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.enablePublicTransportLayer=function(enable){this.publicTransportLayer||(this.publicTransportLayer=new google.maps.TransitLayer),this.publicTransportLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.showPointsOfInterest=function(show){var text=$("textarea[name='theme_data']").val();text&&((text=JSON.parse(text)).push({featureType:"poi",stylers:[{visibility:show?"on":"off"}]}),this.googleMap.setOptions({styles:text}))},WPGMZA.GoogleMap.prototype.getMinZoom=function(){return parseInt(this.settings.min_zoom)},WPGMZA.GoogleMap.prototype.setMinZoom=function(value){this.googleMap.setOptions({minZoom:value,maxZoom:this.getMaxZoom()})},WPGMZA.GoogleMap.prototype.getMaxZoom=function(){return parseInt(this.settings.max_zoom)},WPGMZA.GoogleMap.prototype.setMaxZoom=function(value){this.googleMap.setOptions({minZoom:this.getMinZoom(),maxZoom:value})},WPGMZA.GoogleMap.prototype.latLngToPixels=function(latLng){var map=this.googleMap,latLng=new google.maps.LatLng({lat:parseFloat(latLng.lat),lng:parseFloat(latLng.lng)}),topRight=map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast()),bottomLeft=map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest()),scale=Math.pow(2,map.getZoom()),map=map.getProjection().fromLatLngToPoint(latLng);return{x:(map.x-bottomLeft.x)*scale,y:(map.y-topRight.y)*scale}},WPGMZA.GoogleMap.prototype.pixelsToLatLng=function(x,y){null==y&&("x"in x&&"y"in x?(y=x.y,x=x.x):console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)"));var map=this.googleMap,topRight=map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast()),bottomLeft=map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest()),scale=Math.pow(2,map.getZoom()),x=new google.maps.Point(x/scale+bottomLeft.x,y/scale+topRight.y),bottomLeft=map.getProjection().fromPointToLatLng(x);return{lat:bottomLeft.lat(),lng:bottomLeft.lng()}},WPGMZA.GoogleMap.prototype.onElementResized=function(event){this.googleMap&&google.maps.event.trigger(this.googleMap,"resize")},WPGMZA.GoogleMap.prototype.enableAllInteractions=function(){var options={scrollwheel:!0,draggable:!0,disableDoubleClickZoom:!1};this.googleMap.setOptions(options)},WPGMZA.GoogleMap.prototype.openStreetView=function(options){var pov;this.googleMap.getStreetView()&&(options&&(options.position&&options.position instanceof WPGMZA.LatLng&&this.googleMap.getStreetView().setPosition(options.position.toGoogleLatLng()),options.heading||options.pitch)&&(pov={},options.heading&&(pov.heading=parseFloat(options.heading)),options.pitch&&(pov.pitch=parseFloat(options.pitch)),this.googleMap.getStreetView().setPov(pov)),this.googleMap.getStreetView().setVisible(!0))},WPGMZA.GoogleMap.prototype.closeStreetView=function(){this.googleMap.getStreetView()&&this.googleMap.getStreetView().setVisible(!1)},WPGMZA.GoogleMap.prototype.isFullScreen=function(){return!(WPGMZA.Map.prototype.isFullScreen.call(this)||!WPGMZA.isFullScreen()||parseInt(window.screen.height)!==parseInt(this.element.firstChild.offsetHeight))},WPGMZA.GoogleMap.prototype.onFullScreenChange=function(fullscreen){if(Parent.prototype.onFullScreenChange.call(this,fullscreen),fullscreen&&!this._stackedComponentsMoved&&this.element.firstChild){const innerContainer=this.element.firstChild;$(this.element).find(".wpgmza-inner-stack").each(function(index,element){$(element).appendTo(innerContainer)}),this._stackedComponentsMoved=!0}}}),jQuery(function($){var Parent;WPGMZA.OLMap=function(element,options){var self=this,options=(Parent.call(this,element),this.setOptions(options),this.settings.toOLViewOptions());function isSettingDisabled(value){return"yes"===value||!!value}$(this.element).html(""),this.olMap=new ol.Map({target:$(element)[0],layers:[this.getTileLayer()],view:this.getTileView(options)}),this.customTileMode&&!ol.extent.containsCoordinate(this.customTileModeExtent,this.olMap.getView().getCenter())&&(this.olMap.getView().setCenter(ol.extent.getCenter(this.customTileModeExtent)),this.wrapLongitude(),this.onBoundsChanged()),this.olMap.getInteractions().forEach(function(interaction){interaction instanceof ol.interaction.DragPan?interaction.setActive(!isSettingDisabled(self.settings.wpgmza_settings_map_draggable)):interaction instanceof ol.interaction.DoubleClickZoom?interaction.setActive(!isSettingDisabled(self.settings.wpgmza_settings_map_clickzoom)):interaction instanceof ol.interaction.MouseWheelZoom&&interaction.setActive(!isSettingDisabled(self.settings.wpgmza_settings_map_scroll))},this),"greedy"!=this.settings.wpgmza_force_greedy_gestures&&"yes"!=this.settings.wpgmza_force_greedy_gestures&&1!=this.settings.wpgmza_force_greedy_gestures&&(this.gestureOverlay=$("<div class='wpgmza-gesture-overlay'></div>"),this.gestureOverlayTimeoutID=null,WPGMZA.isTouchDevice()?(this.olMap.getInteractions().forEach(function(interaction){interaction instanceof ol.interaction.DragPan&&self.olMap.removeInteraction(interaction)}),this.olMap.addInteraction(new ol.interaction.DragPan({condition:function(olBrowserEvent){let allowed=!1;olBrowserEvent=olBrowserEvent.originalEvent;return olBrowserEvent instanceof PointerEvent?this.targetPointers&&this.targetPointers.length&&(allowed=2==this.targetPointers.length):olBrowserEvent instanceof TouchEvent&&olBrowserEvent.touches&&olBrowserEvent.touches.length&&(allowed=2==olBrowserEvent.touches.length),allowed||self.showGestureOverlay(),allowed}})),this.gestureOverlay.text(WPGMZA.localized_strings.use_two_fingers)):(this.olMap.on("wheel",function(event){if(!ol.events.condition.platformModifierKeyOnly(event))return self.showGestureOverlay(),!1}),this.gestureOverlay.text(WPGMZA.localized_strings.use_ctrl_scroll_to_zoom))),this.olMap.getControls().forEach(function(control){control instanceof ol.control.Zoom&&1==WPGMZA.settings.wpgmza_settings_map_zoom&&self.olMap.removeControl(control)},this),isSettingDisabled(WPGMZA.settings.wpgmza_settings_map_full_screen_control)||this.olMap.addControl(new ol.control.FullScreen),WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER&&(this.markerLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[]})}),this.olMap.addLayer(this.markerLayer),this.olMap.on("click",function(event){var event=self.olMap.getFeaturesAtPixel(event.pixel);event&&event.length&&(event=event[0].wpgmzaMarker)&&(event.trigger("click"),event.trigger("select"))})),this.olMap.on("movestart",function(event){self.isBeingDragged=!0}),this.olMap.on("moveend",function(event){self.wrapLongitude(),self.isBeingDragged=!1,self.dispatchEvent("dragend"),self.onIdle()}),this.olMap.getView().on("change:resolution",function(event){self.dispatchEvent("zoom_changed"),self.dispatchEvent("zoomchanged"),setTimeout(function(){self.onIdle()},10)}),this.olMap.getView().on("change",function(){self.onBoundsChanged()}),self.onBoundsChanged(),this._mouseoverNativeFeatures=[],this.olMap.on("pointermove",function(event){if(!event.dragging){try{var featuresUnderPixel=event.target.getFeaturesAtPixel(event.pixel)}catch(e){return}for(var props,featuresUnderPixel=featuresUnderPixel||[],nativeFeaturesUnderPixel=[],i=0;i<featuresUnderPixel.length;i++)(props=featuresUnderPixel[i].getProperties()).wpgmzaFeature&&(nativeFeature=props.wpgmzaFeature,nativeFeaturesUnderPixel.push(nativeFeature),-1==self._mouseoverNativeFeatures.indexOf(nativeFeature))&&(nativeFeature.trigger("mouseover"),self._mouseoverNativeFeatures.push(nativeFeature));for(i=self._mouseoverNativeFeatures.length-1;0<=i;i--)nativeFeature=self._mouseoverNativeFeatures[i],-1==nativeFeaturesUnderPixel.indexOf(nativeFeature)&&(nativeFeature.trigger("mouseout"),self._mouseoverNativeFeatures.splice(i,1))}}),$(this.element).on("click contextmenu",function(event){event=event||window.event;var isRight,latLng=self.pixelsToLatLng(event.offsetX,event.offsetY);if("which"in event?isRight=3==event.which:"button"in event&&(isRight=2==event.button),1==event.which||1==event.button){if(self.isBeingDragged)return;if($(event.target).closest(".ol-marker").length)return;try{self.element&&1<(nestedCanvases=self.element.querySelectorAll("canvas")).length&&(diff=nestedCanvases[0].width/nestedCanvases[1].width,event.offsetX*=diff,event.offsetY*=diff);var nestedCanvases,diff,featuresUnderPixel=self.olMap.getFeaturesAtPixel([event.offsetX,event.offsetY])}catch(e){return}for(var props,featuresUnderPixel=featuresUnderPixel||[],nativeFeaturesUnderPixel=[],i=0;i<featuresUnderPixel.length;i++)(props=featuresUnderPixel[i].getProperties()).wpgmzaFeature&&(nativeFeature=props.wpgmzaFeature,nativeFeaturesUnderPixel.push(nativeFeature),nativeFeature.trigger("click"));return 0<featuresUnderPixel.length?void 0:void(event.target instanceof HTMLCanvasElement&&self.trigger({type:"click",latLng:latLng}))}if(isRight)return self.onRightClick(event)}),WPGMZA.isProVersion()||(this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}),$(this.element).trigger("wpgooglemaps_loaded"))},Parent=WPGMZA.isProVersion()?WPGMZA.ProMap:WPGMZA.Map,WPGMZA.OLMap.prototype=Object.create(Parent.prototype),WPGMZA.OLMap.prototype.constructor=WPGMZA.OLMap,WPGMZA.OLMap.prototype.getTileLayer=function(){var options={};if(WPGMZA.settings.tile_server_url&&(options.url=WPGMZA.settings.tile_server_url,"custom_override"===WPGMZA.settings.tile_server_url&&(WPGMZA.settings.tile_server_url_override&&""!==WPGMZA.settings.tile_server_url_override.trim()?options.url=WPGMZA.settings.tile_server_url_override.trim():options.url="https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png"),WPGMZA.settings.open_layers_api_key)&&""!==WPGMZA.settings.open_layers_api_key&&(options.url+="?apikey="+WPGMZA.settings.open_layers_api_key.trim()),this.settings&&this.settings.custom_tile_enabled&&this.settings.custom_tile_image_width&&this.settings.custom_tile_image_height){var width=parseInt(this.settings.custom_tile_image_width),height=parseInt(this.settings.custom_tile_image_height);let imageDimensions=null;try{window.devicePixelRatio&&1!=window.devicePixelRatio&&(imageDimensions=[width,height])}catch(ex){}if(this.settings.custom_tile_image)return width=[0,0,width,height],height=new ol.proj.Projection({code:"custom-tile-map",units:"pixels",extent:width}),new ol.layer.Image({source:new ol.source.ImageStatic({attributions:this.settings.custom_tile_image_attribution||"©",url:this.settings.custom_tile_image,projection:height,imageExtent:width,imageSize:imageDimensions})})}return new ol.layer.Tile({source:new ol.source.OSM(options)})},WPGMZA.OLMap.prototype.getTileView=function(viewOptions){var width,height;return this.settings&&this.settings.custom_tile_enabled&&this.settings.custom_tile_image_width&&this.settings.custom_tile_image_height&&(width=parseInt(this.settings.custom_tile_image_width),height=parseInt(this.settings.custom_tile_image_height),this.settings.custom_tile_image)&&(width=[0,0,width,height],height=new ol.proj.Projection({code:"custom-tile-map",units:"pixels",extent:width}),viewOptions.projection=height,this.customTileModeExtent=width,this.customTileMode=!0),new ol.View(viewOptions)},WPGMZA.OLMap.prototype.wrapLongitude=function(){var transformed=ol.proj.transform(this.olMap.getView().getCenter(),"EPSG:3857","EPSG:4326"),transformed={lat:transformed[1],lng:transformed[0]};-180<=transformed.lng&&transformed.lng<=180||(transformed.lng=transformed.lng-360*Math.floor(transformed.lng/360),180<transformed.lng&&(transformed.lng-=360),this.setCenter(transformed))},WPGMZA.OLMap.prototype.getCenter=function(){var lonLat=ol.proj.toLonLat(this.olMap.getView().getCenter());return{lat:lonLat[1],lng:lonLat[0]}},WPGMZA.OLMap.prototype.setCenter=function(latLng){var view=this.olMap.getView();WPGMZA.Map.prototype.setCenter.call(this,latLng),view.setCenter(ol.proj.fromLonLat([latLng.lng,latLng.lat])),this.wrapLongitude(),this.onBoundsChanged()},WPGMZA.OLMap.prototype.getBounds=function(){var bounds=this.olMap.getView().calculateExtent(this.olMap.getSize()),nativeBounds=new WPGMZA.LatLngBounds,topLeft=ol.proj.toLonLat([bounds[0],bounds[1]]),bounds=ol.proj.toLonLat([bounds[2],bounds[3]]);return nativeBounds.north=topLeft[1],nativeBounds.south=bounds[1],nativeBounds.west=topLeft[0],nativeBounds.east=bounds[0],nativeBounds},WPGMZA.OLMap.prototype.fitBounds=function(southWest,northEast){southWest instanceof WPGMZA.LatLng&&(southWest={lat:southWest.lat,lng:southWest.lng}),northEast instanceof WPGMZA.LatLng?northEast={lat:northEast.lat,lng:northEast.lng}:southWest instanceof WPGMZA.LatLngBounds&&(southWest={lat:(bounds=southWest).south,lng:bounds.west},northEast={lat:bounds.north,lng:bounds.east});var bounds=this.olMap.getView(),southWest=ol.extent.boundingExtent([ol.proj.fromLonLat([parseFloat(southWest.lng),parseFloat(southWest.lat)]),ol.proj.fromLonLat([parseFloat(northEast.lng),parseFloat(northEast.lat)])]);bounds.fit(southWest,this.olMap.getSize())},WPGMZA.OLMap.prototype.panTo=function(latLng,zoom){var view=this.olMap.getView(),options={center:ol.proj.fromLonLat([parseFloat(latLng.lng),parseFloat(latLng.lat)]),duration:500};1<arguments.length&&(options.zoom=parseInt(zoom)),view.animate(options)},WPGMZA.OLMap.prototype.getZoom=function(){return Math.round(this.olMap.getView().getZoom())},WPGMZA.OLMap.prototype.setZoom=function(value){this.olMap.getView().setZoom(value)},WPGMZA.OLMap.prototype.getMinZoom=function(){return this.olMap.getView().getMinZoom()},WPGMZA.OLMap.prototype.setMinZoom=function(value){this.olMap.getView().setMinZoom(value)},WPGMZA.OLMap.prototype.getMaxZoom=function(){return this.olMap.getView().getMaxZoom()},WPGMZA.OLMap.prototype.setMaxZoom=function(value){this.olMap.getView().setMaxZoom(value)},WPGMZA.OLMap.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options),this.olMap&&this.olMap.getView().setProperties(this.settings.toOLViewOptions())},WPGMZA.OLMap.prototype.addMarker=function(marker){WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT?this.olMap.addOverlay(marker.overlay):(this.markerLayer.getSource().addFeature(marker.feature),marker.featureInSource=!0),Parent.prototype.addMarker.call(this,marker)},WPGMZA.OLMap.prototype.removeMarker=function(marker){WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT?this.olMap.removeOverlay(marker.overlay):(this.markerLayer.getSource().removeFeature(marker.feature),marker.featureInSource=!1),Parent.prototype.removeMarker.call(this,marker)},WPGMZA.OLMap.prototype.addPolygon=function(polygon){this.olMap.addLayer(polygon.layer),Parent.prototype.addPolygon.call(this,polygon)},WPGMZA.OLMap.prototype.removePolygon=function(polygon){this.olMap.removeLayer(polygon.layer),Parent.prototype.removePolygon.call(this,polygon)},WPGMZA.OLMap.prototype.addPolyline=function(polyline){this.olMap.addLayer(polyline.layer),Parent.prototype.addPolyline.call(this,polyline)},WPGMZA.OLMap.prototype.removePolyline=function(polyline){this.olMap.removeLayer(polyline.layer),Parent.prototype.removePolyline.call(this,polyline)},WPGMZA.OLMap.prototype.addCircle=function(circle){this.olMap.addLayer(circle.layer),Parent.prototype.addCircle.call(this,circle)},WPGMZA.OLMap.prototype.removeCircle=function(circle){this.olMap.removeLayer(circle.layer),Parent.prototype.removeCircle.call(this,circle)},WPGMZA.OLMap.prototype.addRectangle=function(rectangle){this.olMap.addLayer(rectangle.layer),Parent.prototype.addRectangle.call(this,rectangle)},WPGMZA.OLMap.prototype.removeRectangle=function(rectangle){this.olMap.removeLayer(rectangle.layer),Parent.prototype.removeRectangle.call(this,rectangle)},WPGMZA.OLMap.prototype.pixelsToLatLng=function(x,y){null==y&&("x"in x&&"y"in x?(y=x.y,x=x.x):console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)"));x=this.olMap.getCoordinateFromPixel([x,y]);return x?{lat:(y=ol.proj.toLonLat(x))[1],lng:y[0]}:{x:null,y:null}},WPGMZA.OLMap.prototype.latLngToPixels=function(latLng){latLng=ol.proj.fromLonLat([latLng.lng,latLng.lat]),latLng=this.olMap.getPixelFromCoordinate(latLng);return latLng?{x:latLng[0],y:latLng[1]}:{x:null,y:null}},WPGMZA.OLMap.prototype.enableBicycleLayer=function(value){value?(this.bicycleLayer||(this.bicycleLayer=new ol.layer.Tile({source:new ol.source.OSM({url:"http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png"})})),this.olMap.addLayer(this.bicycleLayer)):this.bicycleLayer&&this.olMap.removeLayer(this.bicycleLayer)},WPGMZA.OLMap.prototype.showGestureOverlay=function(){var self=this;clearTimeout(this.gestureOverlayTimeoutID),$(this.gestureOverlay).stop().animate({opacity:"100"}),$(this.element).append(this.gestureOverlay),$(this.gestureOverlay).css({"line-height":$(this.element).height()+"px",opacity:"1.0"}),$(this.gestureOverlay).show(),this.gestureOverlayTimeoutID=setTimeout(function(){self.gestureOverlay.fadeOut(2e3)},2e3)},WPGMZA.OLMap.prototype.onElementResized=function(event){this.olMap.updateSize()},WPGMZA.OLMap.prototype.onRightClick=function(event){var parentOffset,relX;return!!$(event.target).closest(".ol-marker, .wpgmza_modern_infowindow, .wpgmza-modern-store-locator").length||(parentOffset=$(this.element).offset(),relX=event.pageX-parentOffset.left,parentOffset=event.pageY-parentOffset.top,relX=this.pixelsToLatLng(relX,parentOffset),this.trigger({type:"rightclick",latLng:relX}),$(this.element).trigger({type:"rightclick",latLng:relX}),event.preventDefault(),!1)},WPGMZA.OLMap.prototype.enableAllInteractions=function(){this.olMap.getInteractions().forEach(function(interaction){(interaction instanceof ol.interaction.DragPan||interaction instanceof ol.interaction.DoubleClickZoom||interaction instanceof ol.interaction.MouseWheelZoom)&&interaction.setActive(!0)},this)}}),jQuery(function($){WPGMZA.ProMarkerFilter=function(map){WPGMZA.MarkerFilter.call(this,map)},WPGMZA.ProMarkerFilter.prototype=Object.create(WPGMZA.MarkerFilter.prototype),WPGMZA.ProMarkerFilter.prototype.constructor=WPGMZA.ProMarkerFilter,WPGMZA.MarkerFilter.createInstance=function(map){return new WPGMZA.ProMarkerFilter(map)},WPGMZA.ProMarkerFilter.prototype.getFilteringParameters=function(){var params=WPGMZA.MarkerFilter.prototype.getFilteringParameters.call(this),mashupIDs=this.map.mashupIDs;return mashupIDs&&(params.mashupIDs=mashupIDs),this.map.markerListing&&(params=$.extend(params,this.map.markerListing.getFilteringParameters())),this.map.customFieldFilterController&&(mashupIDs=this.map.customFieldFilterController.getAjaxRequestData().data.widgetData,params.customFields=mashupIDs),this.map.settings.only_load_markers_within_viewport&&(mashupIDs=this.map.getBounds(),params.bounds=mashupIDs),params},WPGMZA.ProMarkerFilter.prototype.update=function(params,source){var self=this;function dispatchEvent(result){var event=new WPGMZA.Event("filteringcomplete");event.map=self.map,event.source=source,event.filteredMarkers=result,event.filteringParams=params,self.onFilteringComplete(event),self.trigger(event),self.map.trigger(event)}this.updateTimeoutID||(params=params||{},this.xhr&&(this.xhr.abort(),delete this.xhr),this.updateTimeoutID=setTimeout(function(){(params=$.extend(self.getFilteringParameters(),params)).center instanceof WPGMZA.LatLng&&(params.center=params.center.toLatLngLiteral()),params.hideAll?dispatchEvent([]):(self.map.showPreloader(!0),self.xhr=WPGMZA.restAPI.call("/markers",{data:{fields:["id"],filter:JSON.stringify(params)},success:function(result,status,xhr){self.map.showPreloader(!1),dispatchEvent(result)},useCompressedPathVariable:!0})),delete self.updateTimeoutID},0))},WPGMZA.ProMarkerFilter.prototype.onFilteringComplete=function(event){var map=[];event.filteredMarkers.forEach(function(data){map[data.id]=!0}),this.map.markers.forEach(function(marker){var allowByFilter;marker.isFilterable&&(allowByFilter=!!map[marker.id],marker.isFiltered=!allowByFilter,marker.setVisible(allowByFilter))})}}),jQuery(function($){WPGMZA.ProMarker=function(row){var currentMap,self=this;if(this._icon=WPGMZA.MarkerIcon.createInstance(),row&&row.map_id&&(currentMap=WPGMZA.getMapByID(row.map_id)),this.title="",this.description="",this.categories=[],this.approved=1,this.hoverIcon=!1,row&&row.retina?"object"==typeof row.icon&&row.icon.retina?this.retina=row.icon.retina:!0===row.retina?this.retina=row.retina:this.retina=row.retina&&"1"==row.retina?1:0:this.retina=0,row&&row.icon&&row.icon instanceof Object&&row.icon.hover_url&&(this.hoverIcon={url:row.icon.hover_url},row.icon.hover_retina)&&(this.hoverIcon.retina=!0),currentMap&&currentMap.settings&&currentMap.settings.default_marker)try{var objtmp=JSON.parse(currentMap.settings.default_marker);"object"==typeof objtmp&&objtmp.retina&&1==objtmp.retina&&(this.retina=!0)}catch(e){}row&&row.category&&row.category.length&&(currentMap=row.category.match(/\d+/g))&&(this.categories=currentMap),this.isIntegrated&&row&&row.id&&row.address&&row.id.indexOf&&-1!==row.id.indexOf("wcp_")&&('"'!==row.address.charAt(0)&&'"'!==row.address.charAt(row.address.length-1)||(row.address=row.address.replaceAll('"',""))),WPGMZA.Marker.call(this,row),this.on("mouseover",function(event){self.onMouseOver(event)}),this.on("mouseout",function(event){self.onMouseOut(event)})},WPGMZA.ProMarker.prototype=Object.create(WPGMZA.Marker.prototype),WPGMZA.ProMarker.prototype.constructor=WPGMZA.ProMarker,WPGMZA.ProMarker.STICKY_ZINDEX=999999,WPGMZA.ProMarker.BASE_LAYER_INDEX=99999,Object.defineProperty(WPGMZA.ProMarker.prototype,"isIntegrated",{get:function(){return/[^\d]/.test(this.id)}}),Object.defineProperty(WPGMZA.ProMarker.prototype,"icon",{get:function(){return this._icon.isDefault?this.map.defaultMarkerIcon:this._icon},set:function(value){if(value instanceof WPGMZA.MarkerIcon)this._icon=value;else{if("object"!=typeof value&&"string"!=typeof value)throw new Error("Value must be an instance of WPGMZA.MarkerIcon, an icon literal, or a string");"object"==typeof value&&(value.retina=!(!this.retina||!0!==this.retina)||(this.retina&&"1"==this.retina?1:0)),this._icon=WPGMZA.MarkerIcon.createInstance(value)}this.map&&this.updateIcon()}}),Object.defineProperty(WPGMZA.ProMarker.prototype,"layergroup",{enumerable:!0,get:function(){return this._layergroup||0},set:function(value){parseInt(value)&&(this._layergroup=parseInt(value)+WPGMZA.ProMarker.BASE_LAYER_INDEX)}}),WPGMZA.ProMarker.prototype.onAdded=function(event){if(WPGMZA.Marker.prototype.onAdded.call(this,event),this.updateIcon(),(!this.map.storeLocator||this!=this.map.storeLocator.marker)&&this!=this.map.userLocationMarker){if(1==this.map.settings.wpgmza_store_locator_hide_before_search&&1!=WPGMZA.is_admin&&this.isFilterable)return this.userCreated?void 0:(this.isFiltered=!0,void this.setVisible(!1));WPGMZA.getQueryParamValue("markerid")!=this.id&&this.map.shortcodeAttributes.marker!=this.id||(this.openInfoWindow(),this.map.setCenter(this.getPosition())),"approved"in this&&0==this.approved&&this.setOpacity(.6),1==this.sticky&&this.setOptions({zIndex:WPGMZA.ProMarker.STICKY_ZINDEX}),this.layergroup&&this.setLayergroup(this.layergroup)}},WPGMZA.ProMarker.prototype.onClick=function(event){WPGMZA.Marker.prototype.onClick.apply(this,arguments),this.map.settings.wpgmza_zoom_on_marker_click&&this.map.settings.wpgmza_zoom_on_marker_click_slider&&(this.map.setZoom(this.map.settings.wpgmza_zoom_on_marker_click_slider),this.map.setCenter(this.getPosition())),1==this.map.settings.click_open_link&&this.link&&this.link.length&&("yes"==WPGMZA.settings.wpgmza_settings_infowindow_links?window.open(this.link):window.open(this.link,"_self"))},WPGMZA.ProMarker.prototype.onMouseOver=function(event){WPGMZA.settings.wpgmza_settings_map_open_marker_by==WPGMZA.ProInfoWindow.OPEN_BY_HOVER&&this.openInfoWindow(),this.hoverIcon&&this.hoverIcon instanceof Object&&this.hoverIcon.url&&(this.restoreIcon||(this.restoreIcon=Object.assign({},this.icon)),this.icon=this.hoverIcon)},WPGMZA.ProMarker.prototype.onMouseOut=function(event){this.hoverIcon&&this.restoreIcon&&this.restoreIcon instanceof Object&&(this.icon=this.restoreIcon,this.restoreIcon=!1)},WPGMZA.ProMarker.prototype.getIconFromCategory=function(){if(this.categories.length){var self=this,categoryIDs=this.categories.slice();categoryIDs.sort(function(a,b){a=self.map.getCategoryByID(a),b=self.map.getCategoryByID(b);return a&&b?a.depth<b.depth?-1:1:null});for(var i=0;i<categoryIDs.length;i++){var category=this.map.getCategoryByID(categoryIDs[i]);if(category){category=category.icon;if(category&&category.length)return category}}}},WPGMZA.ProMarker.prototype.setIcon=function(icon){this.icon=icon},WPGMZA.ProMarker.prototype.openInfoWindow=function(autoOpen){return!(this.map.settings.wpgmza_listmarkers_by&&6==parseInt(this.map.settings.wpgmza_listmarkers_by)||(WPGMZA.Marker.prototype.openInfoWindow.apply(this,arguments),this.disableInfoWindow))&&void((this.map&&this.map.userLocationMarker==this||void 0!==this.user_location&&this.user_location)&&this.infoWindow.setContent(WPGMZA.localized_strings.my_location))},WPGMZA.ProMarker.prototype.setLayergroup=function(layergroup){this.layergroup=layergroup,this.layergroup&&this.setOptions({zIndex:this.layergroup})}}),jQuery(function($){var Parent;WPGMZA.GoogleMarker=function(options){var self=this,settings=(Parent.call(this,options),{});if(options)for(var name in options)options[name]instanceof WPGMZA.LatLng?settings[name]=options[name].toGoogleLatLng():options[name]instanceof WPGMZA.Map||"icon"==name||(settings[name]=options[name]);this.googleMarker=new google.maps.Marker(settings),(this.googleMarker.wpgmzaMarker=this).googleFeature=this.googleMarker,this.googleMarker.setPosition(new google.maps.LatLng({lat:parseFloat(this.lat),lng:parseFloat(this.lng)})),this.anim&&this.googleMarker.setAnimation(this.anim),this.animation&&this.googleMarker.setAnimation(this.animation),google.maps.event.addListener(this.googleMarker,"click",function(){self.dispatchEvent("click"),self.dispatchEvent("select")}),google.maps.event.addListener(this.googleMarker,"mouseover",function(){self.dispatchEvent("mouseover")}),google.maps.event.addListener(this.googleMarker,"mouseout",function(){self.dispatchEvent("mouseout")}),google.maps.event.addListener(this.googleMarker,"dragend",function(){var googleMarkerPosition=self.googleMarker.getPosition();self.setPosition({lat:googleMarkerPosition.lat(),lng:googleMarkerPosition.lng()}),self.dispatchEvent({type:"dragend",latLng:self.getPosition()}),self.trigger("change")}),this.setOptions(settings),this.trigger("init")},Parent=WPGMZA.isProVersion()?WPGMZA.ProMarker:WPGMZA.Marker,WPGMZA.GoogleMarker.prototype=Object.create(Parent.prototype),WPGMZA.GoogleMarker.prototype.constructor=WPGMZA.GoogleMarker,Object.defineProperty(WPGMZA.GoogleMarker.prototype,"opacity",{get:function(){return this._opacity},set:function(value){this._opacity=value,this.googleMarker.setOpacity(value)}}),WPGMZA.GoogleMarker.prototype.setLabel=function(label){label?(this.googleMarker.setLabel({text:label}),this.googleMarker.getIcon()||this.googleMarker.setIcon(WPGMZA.settings.default_marker_icon)):this.googleMarker.setLabel(null)},WPGMZA.GoogleMarker.prototype.setPosition=function(latLng){Parent.prototype.setPosition.call(this,latLng),this.googleMarker.setPosition({lat:this.lat,lng:this.lng})},WPGMZA.GoogleMarker.prototype.updateOffset=function(){var params,self=this,icon=this.googleMarker.getIcon(),img=new Image,x=this._offset.x,y=this._offset.y;icon||(WPGMZA.settings.default_marker_icon?icon=WPGMZA.settings.default_marker_icon:this.map.settings.default_marker_icon?icon=this.map.settings.default_marker_icon:this.map.settings.default_marker&&(icon=this.map.settings.default_marker)),params="string"==typeof icon?{url:icon}:icon,img.onload=function(){var defaultAnchor_x=img.width/2,defaultAnchor_y=img.height;params.anchor=new google.maps.Point(defaultAnchor_x-x,defaultAnchor_y-y),self.googleMarker.setIcon(params)},img.src=params.url},WPGMZA.GoogleMarker.prototype.setOptions=function(options){this.googleMarker.setOptions(options)},WPGMZA.GoogleMarker.prototype.setAnimation=function(animation){Parent.prototype.setAnimation.call(this,animation),this.googleMarker.setAnimation(animation)},WPGMZA.GoogleMarker.prototype.setVisible=function(visible){Parent.prototype.setVisible.call(this,visible),this.googleMarker.setVisible(!!visible)},WPGMZA.GoogleMarker.prototype.getVisible=function(visible){return this.googleMarker.getVisible()},WPGMZA.GoogleMarker.prototype.setDraggable=function(draggable){this.googleMarker.setDraggable(draggable)},WPGMZA.GoogleMarker.prototype.setOpacity=function(opacity){this.googleMarker.setOpacity(opacity)}}),jQuery(function($){var Parent;WPGMZA.OLMarker=function(options){var self=this,settings=(Parent.call(this,options),{});if(options)for(var name in options)options[name]instanceof WPGMZA.LatLng?settings[name]=options[name].toLatLngLiteral():options[name]instanceof WPGMZA.Map||(settings[name]=options[name]);var origin=ol.proj.fromLonLat([parseFloat(this.lng),parseFloat(this.lat)]);if(WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT){var img=$("<img alt=''/>")[0];img.onload=function(event){self.updateElementHeight(),self.map&&self.map.olMap.updateSize()},img.src=WPGMZA.defaultMarkerIcon,this.element=$("<div class='ol-marker'></div>")[0],this.element.appendChild(img),this.element.wpgmzaMarker=this,$(this.element).on("mouseover",function(event){self.dispatchEvent("mouseover")}),$(this.element).on("mouseout",function(event){self.dispatchEvent("mouseout")}),this.overlay=new ol.Overlay({element:this.element,position:origin,positioning:"bottom-center",stopEvent:!1}),this.overlay.setPosition(origin),this.animation?this.setAnimation(this.animation):this.anim&&this.setAnimation(this.anim),options&&options.draggable&&this.setDraggable(!0),this.rebindClickListener()}else{if(WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)throw new Error("Invalid marker render mode");this.feature=new ol.Feature({geometry:new ol.geom.Point(origin)}),this.feature.setStyle(this.getVectorLayerStyle()),(this.feature.wpgmzaMarker=this).feature.wpgmzaFeature=this}this.setOptions(settings),this.trigger("init")},Parent=WPGMZA.isProVersion()?WPGMZA.ProMarker:WPGMZA.Marker,WPGMZA.OLMarker.prototype=Object.create(Parent.prototype),WPGMZA.OLMarker.prototype.constructor=WPGMZA.OLMarker,WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT="element",WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER="vector",WPGMZA.OLMarker.renderMode=WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT,"open-layers"==WPGMZA.settings.engine&&WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER&&(WPGMZA.OLMarker.defaultVectorLayerStyle=new ol.style.Style({image:new ol.style.Icon({anchor:[.5,1],src:WPGMZA.defaultMarkerIcon})}),WPGMZA.OLMarker.hiddenVectorLayerStyle=new ol.style.Style({})),WPGMZA.OLMarker.prototype.getVectorLayerStyle=function(){return this.vectorLayerStyle||WPGMZA.OLMarker.defaultVectorLayerStyle},WPGMZA.OLMarker.prototype.updateElementHeight=function(height,calledOnFocus){var self=this;0!=(height=height||$(this.element).find("img").height())||calledOnFocus||$(window).one("focus",function(event){self.updateElementHeight(!1,!0)}),$(this.element).css({height:height+"px"})},WPGMZA.OLMarker.prototype.addLabel=function(){this.setLabel(this.getLabelText())},WPGMZA.OLMarker.prototype.setLabel=function(label){WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?console.warn("Marker labels are not currently supported in Vector Layer rendering mode"):label?(this.label||(this.label=$("<div class='ol-marker-label'/>"),$(this.element).append(this.label)),this.label.html(label)):this.label&&$(this.element).find(".ol-marker-label").remove()},WPGMZA.OLMarker.prototype.getVisible=function(visible){if(WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)return"none"!=this.overlay.getElement().style.display},WPGMZA.OLMarker.prototype.setVisible=function(visible){var style;Parent.prototype.setVisible.call(this,visible),WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?visible?(style=this.getVectorLayerStyle(),this.feature.setStyle(style)):this.feature.setStyle(null):this.overlay.getElement().style.display=visible?"block":"none"},WPGMZA.OLMarker.prototype.setPosition=function(latLng){Parent.prototype.setPosition.call(this,latLng);latLng=ol.proj.fromLonLat([parseFloat(this.lng),parseFloat(this.lat)]);WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?this.feature.setGeometry(new ol.geom.Point(latLng)):this.overlay.setPosition(latLng)},WPGMZA.OLMarker.prototype.updateOffset=function(x,y){WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?console.warn("Marker offset is not currently supported in Vector Layer rendering mode"):(x=this._offset.x,y=this._offset.y,this.element.style.position="relative",this.element.style.left=x+"px",this.element.style.top=y+"px")},WPGMZA.OLMarker.prototype.setAnimation=function(anim){if(WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)console.warn("Marker animation is not currently supported in Vector Layer rendering mode");else switch(Parent.prototype.setAnimation.call(this,anim),anim){case WPGMZA.Marker.ANIMATION_NONE:$(this.element).removeAttr("data-anim");break;case WPGMZA.Marker.ANIMATION_BOUNCE:$(this.element).attr("data-anim","bounce");break;case WPGMZA.Marker.ANIMATION_DROP:$(this.element).attr("data-anim","drop")}},WPGMZA.OLMarker.prototype.setDraggable=function(draggable){var self=this;if(WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)console.warn("Marker dragging is not currently supported in Vector Layer rendering mode");else if(draggable){draggable={disabled:!1};this.jQueryDraggableInitialized||(draggable.start=function(event){self.onDragStart(event)},draggable.stop=function(event){self.onDragEnd(event)});try{$(this.element).draggable(draggable),this.jQueryDraggableInitialized=!0,this.rebindClickListener()}catch(ex){}}else $(this.element).draggable({disabled:!0})},WPGMZA.OLMarker.prototype.setOpacity=function(opacity){WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?console.warn("Marker opacity is not currently supported in Vector Layer rendering mode"):$(this.element).css({opacity:opacity})},WPGMZA.OLMarker.prototype.onDragStart=function(event){this.isBeingDragged=!0,this.map.olMap.getInteractions().forEach(function(interaction){interaction instanceof ol.interaction.DragPan&&interaction.setActive(!1)})},WPGMZA.OLMarker.prototype.onDragEnd=function(event){var offset_top=parseFloat($(this.element).css("top").match(/-?\d+/)[0]),offset_left=parseFloat($(this.element).css("left").match(/-?\d+/)[0]),currentLatLng=($(this.element).css({top:"0px",left:"0px"}),this.getPosition()),currentLatLng=this.map.latLngToPixels(currentLatLng),offset_left={x:currentLatLng.x+offset_left,y:currentLatLng.y+offset_top},currentLatLng=this.map.pixelsToLatLng(offset_left);this.setPosition(currentLatLng),this.isBeingDragged=!1,this.trigger({type:"dragend",latLng:currentLatLng}),this.trigger("change"),"yes"!=this.map.settings.wpgmza_settings_map_draggable&&this.map.olMap.getInteractions().forEach(function(interaction){interaction instanceof ol.interaction.DragPan&&interaction.setActive(!0)})},WPGMZA.OLMarker.prototype.onElementClick=function(event){event=event.currentTarget.wpgmzaMarker;event.isBeingDragged||(event.dispatchEvent("click"),event.dispatchEvent("select"))},WPGMZA.OLMarker.prototype.rebindClickListener=function(){$(this.element).off("click",this.onElementClick),$(this.element).on("click",this.onElementClick)}}),jQuery(function($){var Parent;WPGMZA.ProPointlabel=function(options,pointLabel){Parent.call(this,options,pointLabel)},Parent=WPGMZA.Pointlabel,WPGMZA.ProPointlabel.prototype=Object.create(Parent.prototype),WPGMZA.ProPointlabel.prototype.constructor=WPGMZA.ProPointlabel}),jQuery(function($){var Parent;WPGMZA.GooglePointlabel=function(options,pointFeature){Parent.call(this,options,pointFeature),pointFeature&&pointFeature.textFeature?this.textFeature=pointFeature.textFeature:this.textFeature=new WPGMZA.Text.createInstance({text:"",map:this.map,position:this.getPosition()}),(this.googleFeature=this).setOptions(options)},Parent=WPGMZA.isProVersion()?WPGMZA.ProPointlabel:WPGMZA.Pointlabel,WPGMZA.extend(WPGMZA.GooglePointlabel,Parent),WPGMZA.GooglePointlabel.prototype.setOptions=function(options){options.name&&this.textFeature.setText(options.name)}}),jQuery(function($){var Parent=WPGMZA.Pointlabel;WPGMZA.OLPointlabel=function(options,pointFeature){Parent.call(this,options,pointFeature),pointFeature&&pointFeature.textFeature?this.textFeature=pointFeature.textFeature:this.textFeature=new WPGMZA.Text.createInstance({text:"",map:this.map,position:this.getPosition()}),this.updateNativeFeature()},Parent=WPGMZA.isProVersion()?WPGMZA.ProPointlabel:WPGMZA.Pointlabel,WPGMZA.extend(WPGMZA.OLPointlabel,Parent),WPGMZA.OLPointlabel.prototype.updateNativeFeature=function(){var options=this.getScalarProperties();options.name&&this.textFeature.setText(options.name),this.textFeature.refresh()}}),jQuery(function($){var Parent;function compareMax(a,b){return b.max-a.max}function Cell(x,y,h,polygon){this.x=x,this.y=y,this.h=h,this.d=function(x,y,polygon){for(var inside=!1,minDistSq=1/0,k=0;k<polygon.length;k++)for(var ring=polygon[k],i=0,len=ring.length,j=len-1;i<len;j=i++){var a=ring[i],b=ring[j];a[1]>y!=b[1]>y&&x<(b[0]-a[0])*(y-a[1])/(b[1]-a[1])+a[0]&&(inside=!inside),minDistSq=Math.min(minDistSq,function(px,py,a,b){var x=a[0],a=a[1],dx=b[0]-x,dy=b[1]-a;{var t;0==dx&&0==dy||(1<(t=((px-x)*dx+(py-a)*dy)/(dx*dx+dy*dy))?(x=b[0],a=b[1]):0<t&&(x+=dx*t,a+=dy*t))}return(dx=px-x)*dx+(dy=py-a)*dy}(x,y,a,b))}return(inside?1:-1)*Math.sqrt(minDistSq)}(x,y,polygon),this.max=this.d+this.h*Math.SQRT2}WPGMZA.ProPolygon=function(row,enginePolygon){var self=this;Parent.call(this,row,enginePolygon),this.on("mouseover",function(event){self.onMouseOver(event)}),this.on("mouseout",function(event){self.onMouseOut(event)}),this.on("click",function(event){self.onClick(event)}),this.initPolygonLabels()},Parent=WPGMZA.Polygon,WPGMZA.ProPolygon.prototype=Object.create(Parent.prototype),WPGMZA.ProPolygon.prototype.constructor=WPGMZA.ProPolygon,Object.defineProperty(WPGMZA.ProPolygon.prototype,"hoverFillColor",{enumerable:!0,get:function(){return this.ohfillcolor&&this.ohfillcolor.length?"#"+this.ohfillcolor.replace(/^#/,""):"#ff0000"},set:function(a){this.ohfillcolor=a}}),Object.defineProperty(WPGMZA.ProPolygon.prototype,"hoverStrokeColor",{enumerable:!0,get:function(){return this.ohlinecolor&&this.ohlinecolor.length?"#"+this.ohlinecolor.replace(/^#/,""):"#ff0000"},set:function(a){this.ohlinecolor=a}}),Object.defineProperty(WPGMZA.ProPolygon.prototype,"hoverOpacity",{enumerable:!0,get:function(){return this.ohopacity||.6},set:function(a){this.ohopacity=a}}),Object.defineProperty(WPGMZA.ProPolygon.prototype,"layergroup",{enumerable:!0,get:function(){return this._layergroup||0},set:function(value){parseInt(value)&&(this._layergroup=parseInt(value)+WPGMZA.ProShape.BASE_LAYER_INDEX)}}),WPGMZA.ProPolygon.getLabelPosition=function(geojson,precision,debug){var minX,minY,maxX,maxY,polygon=geojson;precision=precision||1;for(var i=0;i<polygon[0].length;i++){var p=polygon[0][i];(!i||p[0]<minX)&&(minX=p[0]),(!i||p[1]<minY)&&(minY=p[1]),(!i||p[0]>maxX)&&(maxX=p[0]),(!i||p[1]>maxY)&&(maxY=p[1])}var geojson=maxX-minX,height=maxY-minY,cellSize=Math.min(geojson,height),h=cellSize/2;if(0===cellSize)return[minX,minY];for(var cellQueue=new WPGMZA.Queue(null,compareMax),x=minX;x<maxX;x+=cellSize)for(var y=minY;y<maxY;y+=cellSize)cellQueue.push(new Cell(x+h,y+h,h,polygon));for(var bestCell=function(polygon){for(var area=0,x=0,y=0,points=polygon[0],i=0,len=points.length,j=len-1;i<len;j=i++){var a=points[i],b=points[j],f=a[0]*b[1]-b[0]*a[1];x+=(a[0]+b[0])*f,y+=(a[1]+b[1])*f,area+=3*f}return 0===area?new Cell(points[0][0],points[0][1],0,polygon):new Cell(x/area,y/area,0,polygon)}(polygon),geojson=new Cell(minX+geojson/2,minY+height/2,0,polygon),numProbes=(geojson.d>bestCell.d&&(bestCell=geojson),cellQueue.length);cellQueue.length;){var cell=cellQueue.pop();cell.d>bestCell.d&&(bestCell=cell,debug)&&console.log("found best %d after %d probes",Math.round(1e4*cell.d)/1e4,numProbes),cell.max-bestCell.d<=precision||(h=cell.h/2,cellQueue.push(new Cell(cell.x-h,cell.y-h,h,polygon)),cellQueue.push(new Cell(cell.x+h,cell.y-h,h,polygon)),cellQueue.push(new Cell(cell.x-h,cell.y+h,h,polygon)),cellQueue.push(new Cell(cell.x+h,cell.y+h,h,polygon)),numProbes+=4)}return debug&&(console.log("num probes: "+numProbes),console.log("best distance: "+bestCell.d)),[bestCell.x,bestCell.y]},WPGMZA.ProPolygon.prototype.onMouseOver=function(event){this.revertOptions=this.getScalarProperties();var options={fillColor:this.hoverFillColor,strokeColor:this.hoverStrokeColor,fillOpacity:this.hoverOpacity,strokeWeight:this.strokeWeight};this.setOptions(options)},WPGMZA.ProPolygon.prototype.onMouseOut=function(event){var options={fillColor:this.fillColor,strokeColor:this.strokeColor,fillOpacity:this.fillOpacity,strokeWeight:this.strokeWeight};this.revertOptions&&(options=this.revertOptions,this.revertOptions=!1),this.setOptions(options)},WPGMZA.ProPolygon.prototype.onClick=function(event){this.map.settings.disable_polygon_info_windows||this.openInfoWindow()},WPGMZA.ProPolygon.prototype.onAdded=function(){WPGMZA.Polygon.prototype.onAdded.call(this,arguments),this.layergroup&&this.setLayergroup(this.layergroup)},WPGMZA.ProPolygon.prototype.getPosition=function(){return this.getCentroid()},WPGMZA.ProPolygon.prototype.openInfoWindow=function(){this.map?(this.map.lastInteractedMarker&&this.map.lastInteractedMarker.infoWindow.close(),(this.map.lastInteractedMarker=this).initInfoWindow(),this.pic="",this.infoWindow.open(this.map,this),this.centroid=this.getCentroid(),this.infoWindow.setPosition(this.centroid),this.infoWindow.element&&this.infoWindow.element.classList&&this.infoWindow.element.classList.add("ol-info-window-polygon"),1==this.map.settings.click_open_link&&this.link&&this.link.length&&("yes"==WPGMZA.settings.wpgmza_settings_infowindow_links?window.open(this.link):window.open(this.link,"_self"))):console.warn("Cannot open infowindow for polygon with no map")},WPGMZA.ProPolygon.prototype.initInfoWindow=function(){this.infoWindow||(this.infoWindow=WPGMZA.InfoWindow.createInstance())},WPGMZA.ProPolygon.prototype.getCentroid=function(){var i,geojson=[[]];for(i in this.polydata)geojson[0].push([parseFloat(this.polydata[i].lat),parseFloat(this.polydata[i].lng)]);var latLng=WPGMZA.ProPolygon.getLabelPosition(geojson);return new WPGMZA.LatLng({lat:latLng[0],lng:latLng[1]})},WPGMZA.ProPolygon.prototype.getCenterApprox=function(){var i,pos={lat:0,lng:0},n=this.polydata.length;for(i in this.polydata)pos.lat+=parseFloat(this.polydata[i].lat),pos.lng+=parseFloat(this.polydata[i].lng);return new WPGMZA.LatLng(pos.lat/n,pos.lng/n)},WPGMZA.ProPolygon.prototype.initPolygonLabels=function(){var settings;WPGMZA.getMapByID(this.map_id)&&(settings=WPGMZA.getMapByID(this.map_id).settings)&&settings.polygon_labels&&this.title&&this.polydata&&0<this.polydata.length&&WPGMZA.Text.createInstance({text:this.title,map:WPGMZA.getMapByID(this.map_id),position:this.getCentroid()})},WPGMZA.ProPolygon.prototype.setLayergroup=function(layergroup){this.layergroup=layergroup,this.layergroup&&this.setOptions({zIndex:this.layergroup})}}),jQuery(function($){var Parent;WPGMZA.GooglePolygon=function(options,googlePolygon){var self=this;Parent.call(this,options=options||{},googlePolygon),this.googlePolygon=googlePolygon||new google.maps.Polygon,this.googleFeature=this.googlePolygon,options&&options.polydata&&this.googlePolygon.setOptions({paths:this.parseGeometry(options.polydata)}),this.googlePolygon.wpgmzaPolygon=this,options&&this.setOptions(options),google.maps.event.addListener(this.googlePolygon,"click",function(){self.dispatchEvent({type:"click"})})},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolygon:WPGMZA.Polygon,WPGMZA.GooglePolygon.prototype=Object.create(Parent.prototype),WPGMZA.GooglePolygon.prototype.constructor=WPGMZA.GooglePolygon,WPGMZA.GooglePolygon.prototype.updateNativeFeature=function(){this.googlePolygon.setOptions(this.getScalarProperties())},WPGMZA.GooglePolygon.prototype.getEditable=function(){return this.googlePolygon.getOptions().editable},WPGMZA.GooglePolygon.prototype.setEditable=function(value){var self=this;this.googlePolygon.setOptions({editable:value}),value&&(this.googlePolygon.getPaths().forEach(function(path,index){["insert_at","remove_at","set_at"].forEach(function(name){google.maps.event.addListener(path,name,function(){self.trigger("change")})})}),google.maps.event.addListener(this.googlePolygon,"dragend",function(event){self.trigger("change")}),google.maps.event.addListener(this.googlePolygon,"click",function(event){WPGMZA.altKeyDown&&(this.getPath().removeAt(event.vertex),self.trigger("change"))}))},WPGMZA.GooglePolygon.prototype.setDraggable=function(value){this.googlePolygon.setDraggable(value)},WPGMZA.GooglePolygon.prototype.getGeometry=function(){for(var result=[],path=this.googlePolygon.getPath(),i=0;i<path.getLength();i++){var latLng=path.getAt(i);result.push({lat:latLng.lat(),lng:latLng.lng()})}return result}}),jQuery(function($){var Parent;WPGMZA.OLPolygon=function(options,olFeature){if(Parent.call(this,options,olFeature),olFeature)this.olFeature=olFeature;else{var coordinates=[[]];if(options&&options.polydata)for(var paths=this.parseGeometry(options.polydata),i=0;i<=paths.length;i++)coordinates[0].push(ol.proj.fromLonLat([parseFloat(paths[i%paths.length].lng),parseFloat(paths[i%paths.length].lat)]));this.olFeature=new ol.Feature({geometry:new ol.geom.Polygon(coordinates)})}this.layer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.olFeature]})}),this.layer.getSource().getFeatures()[0].setProperties({wpgmzaPolygon:this,wpgmzaFeature:this}),options&&this.setOptions(options)},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolygon:WPGMZA.Polygon,WPGMZA.OLPolygon.prototype=Object.create(Parent.prototype),WPGMZA.OLPolygon.prototype.constructor=WPGMZA.OLPolygon,WPGMZA.OLPolygon.prototype.getGeometry=function(){for(var coordinates=this.olFeature.getGeometry().getCoordinates()[0],result=[],i=0;i<coordinates.length;i++){var lonLat=ol.proj.toLonLat(coordinates[i]),lonLat={lat:lonLat[1],lng:lonLat[0]};result.push(lonLat)}return result},WPGMZA.OLPolygon.prototype.setOptions=function(options){Parent.prototype.setOptions.apply(this,arguments),"editable"in options&&WPGMZA.OLFeature.setInteractionsOnFeature(this,options.editable)}}),jQuery(function($){var Parent=WPGMZA.Shape;WPGMZA.ProShape=function(options,engineFeature){var self=this;WPGMZA.assertInstanceOf(this,"ProShape"),Parent.apply(this,arguments),this.on("mouseover",function(event){self.onMouseOver(event)}),this.on("mouseout",function(event){self.onMouseOut(event)}),this.on("click",function(event){self.onClick(event)})},WPGMZA.extend(WPGMZA.ProShape,WPGMZA.Shape),WPGMZA.ProShape.BASE_LAYER_INDEX=99999,Object.defineProperty(WPGMZA.ProShape.prototype,"hoverFillColor",{enumerable:!0,get:function(){return this.ohFillColor&&this.ohFillColor.length?"#"+this.ohFillColor.replace(/^#/,""):"#000000"},set:function(a){this.ohFillColor=a}}),Object.defineProperty(WPGMZA.ProShape.prototype,"hoverStrokeColor",{enumerable:!0,get:function(){return this.ohLineColor&&this.ohLineColor.length?"#"+this.ohLineColor.replace(/^#/,""):"#000000"},set:function(a){this.ohLineColor=a}}),Object.defineProperty(WPGMZA.ProShape.prototype,"hoverFillOpacity",{enumerable:!0,get:function(){return this.ohFillOpacity||.5},set:function(a){this.ohFillOpacity=a}}),Object.defineProperty(WPGMZA.ProShape.prototype,"hoverLineOpacity",{enumerable:!0,get:function(){return this.ohLineOpacity||.5},set:function(a){this.ohLineOpacity=a}}),Object.defineProperty(WPGMZA.ProShape.prototype,"layergroup",{enumerable:!0,get:function(){return this._layergroup||0},set:function(value){parseInt(value)&&(this._layergroup=parseInt(value)+WPGMZA.ProShape.BASE_LAYER_INDEX)}}),WPGMZA.ProShape.prototype.onClick=function(event){this.map&&this.map.settings&&(this.map.settings.disable_polygon_info_windows||this.openInfoWindow())},WPGMZA.ProShape.prototype.onMouseOver=function(event){var options;parseInt(this.hoverEnabled)&&(this.revertOptions=this.getScalarProperties(),options={fillColor:this.hoverFillColor,strokeColor:this.hoverStrokeColor,fillOpacity:this.hoverFillOpacity,strokeOpacity:this.hoverLineOpacity},this.setOptions(options))},WPGMZA.ProShape.prototype.onMouseOut=function(event){var options;parseInt(this.hoverEnabled)&&(options={fillColor:this.fillColor,strokeColor:this.strokeColor,fillOpacity:this.fillOpacity,strokeOpacity:this.strokeOpacity},this.revertOptions&&(options=this.revertOptions,this.revertOptions=!1),this.setOptions(options))},WPGMZA.ProShape.prototype.onAdded=function(){WPGMZA.Shape.prototype.onAdded.call(this,arguments),this.layergroup&&this.setLayergroup(this.layergroup)},WPGMZA.ProShape.prototype.openInfoWindow=function(){this.map?(this.map.lastInteractedMarker&&this.map.lastInteractedMarker.infoWindow.close(),(this.map.lastInteractedMarker=this).initInfoWindow(),this.title=this.name,this.pic="",this.infoWindow.open(this.map,this),this.infoWindow.setPosition(this.getPosition()),this.infoWindow.element&&this.infoWindow.element.classList&&this.infoWindow.element.classList.add("ol-info-window-shape")):console.warn("Cannot open infowindow for shape with no map")},WPGMZA.ProShape.prototype.initInfoWindow=function(){this.infoWindow||(this.infoWindow=WPGMZA.InfoWindow.createInstance())},WPGMZA.ProShape.prototype.getPosition=function(){return this.position},WPGMZA.ProShape.prototype.initShapeLabels=function(){var settings;WPGMZA.getMapByID(this.map_id)&&(settings=WPGMZA.getMapByID(this.map_id).settings)&&settings.polygon_labels&&this.name&&(settings=this.getPosition(),WPGMZA.Text.createInstance({text:this.name,map:WPGMZA.getMapByID(this.map_id),position:new WPGMZA.LatLng(settings)}))},WPGMZA.ProShape.prototype.setLayergroup=function(layergroup){this.layergroup=layergroup,this.layergroup&&this.setOptions({zIndex:this.layergroup})}}),jQuery(function($){var Parent=WPGMZA.Shape;WPGMZA.Circle=function(options,engineCircle){WPGMZA.assertInstanceOf(this,"Circle"),this.center=new WPGMZA.LatLng,this.radius=100,Parent.apply(this,arguments)},WPGMZA.isProVersion()&&(Parent=WPGMZA.ProShape),WPGMZA.extend(WPGMZA.Circle,Parent),Object.defineProperty(WPGMZA.Circle.prototype,"fillColor",{enumerable:!0,get:function(){return this.color&&this.color.length?this.color:"#ff0000"},set:function(a){this.color=a}}),Object.defineProperty(WPGMZA.Circle.prototype,"fillOpacity",{enumerable:!0,get:function(){return this.opacity||0==this.opacity?parseFloat(this.opacity):.5},set:function(a){this.opacity=a}}),Object.defineProperty(WPGMZA.Circle.prototype,"strokeColor",{enumerable:!0,get:function(){return this.lineColor||"#000000"},set:function(a){this.lineColor=a}}),Object.defineProperty(WPGMZA.Circle.prototype,"strokeOpacity",{enumerable:!0,get:function(){return this.lineOpacity||0==this.lineOpacity?parseFloat(this.lineOpacity):0},set:function(a){this.lineOpacity=a}}),WPGMZA.Circle.createInstance=function(options,engineCircle){var constructor="open-layers"===WPGMZA.settings.engine?WPGMZA.isProVersion()?WPGMZA.OLProCircle:WPGMZA.OLCircle:WPGMZA.isProVersion()?WPGMZA.GoogleProCircle:WPGMZA.GoogleCircle;return new constructor(options,engineCircle)},WPGMZA.Circle.prototype.getCenter=function(){return this.center.clone()},WPGMZA.Circle.prototype.setCenter=function(latLng){this.center.lat=latLng.lat,this.center.lng=latLng.lng},WPGMZA.Circle.prototype.getRadius=function(){return this.radius},WPGMZA.Circle.prototype.setRadius=function(radius){this.radius=radius},WPGMZA.Circle.prototype.getMap=function(){return this.map},WPGMZA.Circle.prototype.setMap=function(map){this.map&&this.map.removeCircle(this),map&&map.addCircle(this)}}),jQuery(function($){var Parent=WPGMZA.Shape;WPGMZA.Rectangle=function(options,engineRectangle){WPGMZA.assertInstanceOf(this,"Rectangle"),this.name="",this.cornerA=new WPGMZA.LatLng,this.cornerB=new WPGMZA.LatLng,this.color="#ff0000",this.opacity=.5,Parent.apply(this,arguments)},WPGMZA.isProVersion()&&(Parent=WPGMZA.ProShape),WPGMZA.extend(WPGMZA.Rectangle,Parent),Object.defineProperty(WPGMZA.Rectangle.prototype,"fillColor",{enumerable:!0,get:function(){return this.color&&this.color.length?this.color:"#ff0000"},set:function(a){this.color=a}}),Object.defineProperty(WPGMZA.Rectangle.prototype,"fillOpacity",{enumerable:!0,get:function(){return this.opacity||0==this.opacity?parseFloat(this.opacity):.5},set:function(a){this.opacity=a}}),Object.defineProperty(WPGMZA.Rectangle.prototype,"strokeColor",{enumerable:!0,get:function(){return this.lineColor||"#000000"},set:function(a){this.lineColor=a}}),Object.defineProperty(WPGMZA.Rectangle.prototype,"strokeOpacity",{enumerable:!0,get:function(){return this.lineOpacity||0==this.lineOpacity?parseFloat(this.lineOpacity):0},set:function(a){this.lineOpacity=a}}),WPGMZA.Rectangle.createInstance=function(options,engineRectangle){var constructor="open-layers"===WPGMZA.settings.engine?WPGMZA.isProVersion()?WPGMZA.OLProRectangle:WPGMZA.OLRectangle:WPGMZA.isProVersion()?WPGMZA.GoogleProRectangle:WPGMZA.GoogleRectangle;return new constructor(options,engineRectangle)}}),jQuery(function($){var Parent;WPGMZA.ProCircle=function(options,engineCircle){Parent.call(this,options,engineCircle),this.center&&(this.position=new WPGMZA.LatLng({lat:this.center.lat,lng:this.center.lng})),this.initShapeLabels()},Parent=WPGMZA.Circle,WPGMZA.ProCircle.prototype=Object.create(Parent.prototype),WPGMZA.ProCircle.prototype.constructor=WPGMZA.ProCircle}),jQuery(function($){var Parent=WPGMZA.Circle;WPGMZA.GoogleCircle=function(options,googleCircle){var self=this;Parent.call(this,options,googleCircle),googleCircle?(this.googleCircle=googleCircle,options&&(options.center=WPGMZA.LatLng.fromGoogleLatLng(googleCircle.getCenter()),options.radius=googleCircle.getRadius()/1e3)):(this.googleCircle=new google.maps.Circle,this.googleCircle.wpgmzaCircle=this),this.googleFeature=this.googleCircle,options&&this.setOptions(options),google.maps.event.addListener(this.googleCircle,"click",function(){self.dispatchEvent({type:"click"})})},WPGMZA.isProVersion()&&(Parent=WPGMZA.ProCircle),WPGMZA.GoogleCircle.prototype=Object.create(Parent.prototype),WPGMZA.GoogleCircle.prototype.constructor=WPGMZA.GoogleCircle,WPGMZA.GoogleCircle.prototype.getCenter=function(){return WPGMZA.LatLng.fromGoogleLatLng(this.googleCircle.getCenter())},WPGMZA.GoogleCircle.prototype.setCenter=function(center){WPGMZA.Circle.prototype.setCenter.apply(this,arguments),this.googleCircle.setCenter(center)},WPGMZA.GoogleCircle.prototype.getRadius=function(){return this.googleCircle.getRadius()/1e3},WPGMZA.GoogleCircle.prototype.setRadius=function(radius){WPGMZA.Circle.prototype.setRadius.apply(this,arguments),this.googleCircle.setRadius(1e3*parseFloat(radius))},WPGMZA.GoogleCircle.prototype.setVisible=function(visible){this.googleCircle.setVisible(!!visible)},WPGMZA.GoogleCircle.prototype.setDraggable=function(value){this.googleCircle.setDraggable(!!value)},WPGMZA.GoogleCircle.prototype.setEditable=function(value){var self=this;this.googleCircle.setOptions({editable:value}),value&&(google.maps.event.addListener(this.googleCircle,"center_changed",function(event){self.center=WPGMZA.LatLng.fromGoogleLatLng(self.googleCircle.getCenter()),self.trigger("change")}),google.maps.event.addListener(this.googleCircle,"radius_changed",function(event){self.radius=self.googleCircle.getRadius()/1e3,self.trigger("change")}))},WPGMZA.GoogleCircle.prototype.setOptions=function(options){WPGMZA.Circle.prototype.setOptions.apply(this,arguments),options.center&&(this.center=new WPGMZA.LatLng(options.center))},WPGMZA.GoogleCircle.prototype.updateNativeFeature=function(){var googleOptions=this.getScalarProperties(),center=new WPGMZA.LatLng(this.center);googleOptions.radius*=1e3,googleOptions.center=center.toGoogleLatLng(),this.googleCircle.setOptions(googleOptions)}}),jQuery(function($){var Parent=WPGMZA.Circle;WPGMZA.OLCircle=function(options,olFeature){var center,geom;Parent.call(this,options,olFeature),options=options||{},olFeature?(olFeature=olFeature.getGeometry(),center=ol.proj.toLonLat(olFeature.getCenter()),geom=olFeature,options.center=new WPGMZA.LatLng(center[1],center[0]),options.radius=olFeature.getRadius()/1e3):geom=new ol.geom.Circle(ol.proj.fromLonLat([parseFloat(options.center.lng),parseFloat(options.center.lat)]),1e3*options.radius),this.layer=new ol.layer.Vector({source:new ol.source.Vector}),this.olFeature=new ol.Feature({geometry:geom}),this.layer.getSource().addFeature(this.olFeature),this.layer.getSource().getFeatures()[0].setProperties({wpgmzaCircle:this,wpgmzaFeature:this}),options&&this.setOptions(options)},WPGMZA.isProVersion()&&(Parent=WPGMZA.ProCircle),WPGMZA.OLCircle.prototype=Object.create(Parent.prototype),WPGMZA.OLCircle.prototype.constructor=WPGMZA.OLCircle,WPGMZA.OLCircle.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options),"editable"in options&&WPGMZA.OLFeature.setInteractionsOnFeature(this,options.editable)},WPGMZA.OLCircle.prototype.getCenter=function(){var lonLat=ol.proj.toLonLat(this.olFeature.getGeometry().getCenter());return new WPGMZA.LatLng({lat:lonLat[1],lng:lonLat[0]})},WPGMZA.OLCircle.prototype.recreate=function(){var radius,y,x;this.olFeature&&(this.layer.getSource().removeFeature(this.olFeature),delete this.olFeature),this.center&&this.radius&&(radius=1e3*parseFloat(this.radius),x=this.center.lng,y=this.center.lat,x=ol.geom.Polygon.circular([x,y],radius,64).clone().transform("EPSG:4326","EPSG:3857"),this.olFeature=new ol.Feature(x),this.layer.getSource().addFeature(this.olFeature))},WPGMZA.OLCircle.prototype.setVisible=function(visible){this.layer.setVisible(!!visible)},WPGMZA.OLCircle.prototype.setCenter=function(center){WPGMZA.Circle.prototype.setCenter.apply(this,arguments),this.recreate()},WPGMZA.OLCircle.prototype.getRadius=function(){return this.layer.getSource().getFeatures()[0].getGeometry().getRadius()/1e3},WPGMZA.OLCircle.prototype.setRadius=function(radius){WPGMZA.Circle.prototype.setRadius.apply(this,arguments)},WPGMZA.OLCircle.prototype.setOptions=function(options){Parent.prototype.setOptions.apply(this,arguments),"editable"in options&&WPGMZA.OLFeature.setInteractionsOnFeature(this,options.editable)}}),jQuery(function($){var Parent;WPGMZA.ProRectangle=function(options,engineCircle){Parent.call(this,options,engineCircle),this.cornerA&&this.cornerB&&(this.position=new WPGMZA.LatLng({lat:(parseFloat(this.cornerA.lat)+parseFloat(this.cornerB.lat))/2,lng:(parseFloat(this.cornerA.lng)+parseFloat(this.cornerB.lng))/2})),this.initShapeLabels()},Parent=WPGMZA.Rectangle,WPGMZA.ProRectangle.prototype=Object.create(Parent.prototype),WPGMZA.ProRectangle.prototype.constructor=WPGMZA.ProRectangle}),jQuery(function($){var Parent=WPGMZA.Rectangle;WPGMZA.GoogleRectangle=function(options,googleRectangle){var self=this;Parent.call(this,options=options||{},googleRectangle),googleRectangle?(this.googleRectangle=googleRectangle,this.cornerA=options.cornerA=new WPGMZA.LatLng({lat:googleRectangle.getBounds().getNorthEast().lat(),lng:googleRectangle.getBounds().getSouthWest().lng()}),this.cornerB=options.cornerB=new WPGMZA.LatLng({lat:googleRectangle.getBounds().getSouthWest().lat(),lng:googleRectangle.getBounds().getNorthEast().lng()})):(this.googleRectangle=new google.maps.Rectangle,this.googleRectangle.wpgmzaRectangle=this),this.googleFeature=this.googleRectangle,options&&this.setOptions(options),google.maps.event.addListener(this.googleRectangle,"click",function(){self.dispatchEvent({type:"click"})})},WPGMZA.isProVersion()&&(Parent=WPGMZA.ProRectangle),WPGMZA.GoogleRectangle.prototype=Object.create(Parent.prototype),WPGMZA.GoogleRectangle.prototype.constructor=WPGMZA.GoogleRectangle,WPGMZA.GoogleRectangle.prototype.getBounds=function(){return WPGMZA.LatLngBounds.fromGoogleLatLngBounds(this.googleRectangle.getBounds())},WPGMZA.GoogleRectangle.prototype.setVisible=function(visible){this.googleRectangle.setVisible(!!visible)},WPGMZA.GoogleRectangle.prototype.setDraggable=function(value){this.googleRectangle.setDraggable(!!value)},WPGMZA.GoogleRectangle.prototype.setEditable=function(value){var self=this;this.googleRectangle.setEditable(!!value),value&&google.maps.event.addListener(this.googleRectangle,"bounds_changed",function(event){self.trigger("change")})},WPGMZA.GoogleRectangle.prototype.setOptions=function(options){WPGMZA.Rectangle.prototype.setOptions.apply(this,arguments),options.cornerA&&options.cornerB&&(this.cornerA=new WPGMZA.LatLng(options.cornerA),this.cornerB=new WPGMZA.LatLng(options.cornerB))},WPGMZA.GoogleRectangle.prototype.updateNativeFeature=function(){var googleOptions=this.getScalarProperties(),north=parseFloat(this.cornerA.lat),west=parseFloat(this.cornerA.lng),south=parseFloat(this.cornerB.lat),east=parseFloat(this.cornerB.lng);north&&west&&south&&east&&(googleOptions.bounds={north:north,west:west,south:south,east:east}),this.googleRectangle.setOptions(googleOptions)}}),jQuery(function($){var Parent=WPGMZA.Rectangle;WPGMZA.OLRectangle=function(options,olFeature){var coordinates;Parent.apply(this,arguments),olFeature?this.olFeature=olFeature:(coordinates=[[]],options.cornerA&&options.cornerB&&(coordinates[0].push(ol.proj.fromLonLat([parseFloat(options.cornerA.lng),parseFloat(options.cornerA.lat)])),coordinates[0].push(ol.proj.fromLonLat([parseFloat(options.cornerB.lng),parseFloat(options.cornerA.lat)])),coordinates[0].push(ol.proj.fromLonLat([parseFloat(options.cornerB.lng),parseFloat(options.cornerB.lat)])),coordinates[0].push(ol.proj.fromLonLat([parseFloat(options.cornerA.lng),parseFloat(options.cornerB.lat)])),coordinates[0].push(ol.proj.fromLonLat([parseFloat(options.cornerA.lng),parseFloat(options.cornerA.lat)]))),this.olFeature=new ol.Feature({geometry:new ol.geom.Polygon(coordinates)})),this.layer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.olFeature]}),style:this.olStyle}),this.layer.getSource().getFeatures()[0].setProperties({wpgmzaRectangle:this,wpgmzaFeature:this}),options&&this.setOptions(options)},WPGMZA.isProVersion()&&(Parent=WPGMZA.ProRectangle),WPGMZA.extend(WPGMZA.OLRectangle,Parent),WPGMZA.OLRectangle.prototype.getBounds=function(){var extent=this.olFeature.getGeometry().getExtent(),topLeft=ol.extent.getTopLeft(extent),extent=ol.extent.getBottomRight(extent),topLeft=ol.proj.toLonLat(topLeft),extent=ol.proj.toLonLat(extent),topLeft=new WPGMZA.LatLng(topLeft[1],topLeft[0]),extent=new WPGMZA.LatLng(extent[1],extent[0]);return new WPGMZA.LatLngBounds(topLeft,extent)},WPGMZA.OLRectangle.prototype.setOptions=function(options){Parent.prototype.setOptions.apply(this,arguments),"editable"in options&&WPGMZA.OLFeature.setInteractionsOnFeature(this,options.editable)}}),jQuery(function($){WPGMZA.ProStoreLocator=function(map,element){var self=this;WPGMZA.StoreLocator.call(this,map,element),map.settings.wpgmza_store_locator_use_their_location||$(this.element).find(".wpgmza-use-my-location").remove(),map.settings.store_locator_search_area==WPGMZA.ProStoreLocator.SEARCH_AREA_AUTO&&($(this.element).find(".wpgmza_sl_radius_select").remove(),$(this.element).find(".wpgmza-radius-container").remove()),this.map.on("init",function(event){}),$(this.element).find(".wpgmza-category-filter-toggle").on("click",function(event){$(this).toggleClass("active"),$(self.element).find(".wpgmza-category-filter-container").toggleClass("active")}),$(document.body).on("click",".wpgmza-nearby",function(event){(marker=self.map.getMarkerByID($(event.currentTarget).closest("[data-marker-id]").attr("data-marker-id")))&&($(self.addressElement).val(marker.address),self.onSearch())})},WPGMZA.ProStoreLocator.prototype=Object.create(WPGMZA.StoreLocator.prototype),WPGMZA.ProStoreLocator.prototype.constructor=WPGMZA.ProStoreLocator,WPGMZA.ProStoreLocator.SEARCH_AREA_RADIAL="radial",WPGMZA.ProStoreLocator.SEARCH_AREA_AUTO="auto",WPGMZA.StoreLocator.createInstance=function(map,element){return new WPGMZA.ProStoreLocator(map,element)},Object.defineProperty(WPGMZA.ProStoreLocator.prototype,"keywords",{get:function(){var legacy=$(".wpgmza_name_search_string + input").val();return legacy||$(this.map.element).find(".wpgmza-text-search").val()}}),Object.defineProperty(WPGMZA.ProStoreLocator.prototype,"categories",{configurable:!0,get:function(){var dropdown,results;if(0<$(this.map.element).find(".wpgmza-modern-store-locator").length)$(this.map.element).find(".wpgmza-modern-store-locator [name='wpgmza_cat_checkbox']:checked").each(function(index,el){(results=results||[]).push($(el).val())});else{if((dropdown=$(this.element).find(".wpgmza_sl_category_div > select")).length)return"0"==(dropdown=dropdown.val())?null:[dropdown];$(this.element).find(".wpgmza_sl_category_div :checked").each(function(index,el){results=results||[],$(el).siblings("ul").length&&$(el).siblings("ul").find(":checked").length||results.push($(el).val())})}return results}}),Object.defineProperty(WPGMZA.ProStoreLocator.prototype,"hideMarkersInInitialState",{get:function(){return 1==this.map.settings.wpgmza_store_locator_hide_before_search}}),Object.defineProperty(WPGMZA.ProStoreLocator.prototype,"circleStrokeColor",{get:function(){return this.map.settings.sl_stroke_color?"#"+this.map.settings.sl_stroke_color.replace(/^#/,""):"#ff0000"}}),Object.defineProperty(WPGMZA.ProStoreLocator.prototype,"circleFillColor",{get:function(){return this.map.settings.sl_fill_color?"#"+this.map.settings.sl_fill_color.replace(/^#/,""):"#ff0000"}}),Object.defineProperty(WPGMZA.ProStoreLocator.prototype,"circleStrokeOpacity",{get:function(){return void 0!==this.map.settings.sl_stroke_opacity&&""!==this.map.settings.sl_stroke_opacity?parseFloat(this.map.settings.sl_stroke_opacity):.25}}),Object.defineProperty(WPGMZA.ProStoreLocator.prototype,"circleFillOpacity",{get:function(){return void 0!==this.map.settings.sl_fill_opacity&&""!==this.map.settings.sl_fill_opacity?parseFloat(this.map.settings.sl_fill_opacity):.15}}),Object.defineProperty(WPGMZA.ProStoreLocator.prototype,"circle",{get:function(){return this.map.settings.store_locator_search_area==WPGMZA.ProStoreLocator.SEARCH_AREA_AUTO?null:(this._circle||(WPGMZA.isDeviceiOS()||"modern"!=this.map.settings.wpgmza_store_locator_radius_style?this._circle=WPGMZA.Circle.createInstance({strokeColor:this.circleStrokeColor,strokeOpacity:this.circleStrokeOpacity,strokeWeight:2,fillColor:this.circleFillColor,fillOpacity:this.circleFillOpacity,visible:!1,clickable:!1,center:new WPGMZA.LatLng}):(this._circle=WPGMZA.ModernStoreLocatorCircle.createInstance(this.map.id),this._circle.settings.color=this.circleStrokeColor)),this._circle)}}),Object.defineProperty(WPGMZA.ProStoreLocator.prototype,"marker",{get:function(){var options;return 1!=this.map.settings.wpgmza_store_locator_bounce?null:(this._marker||(options={visible:!1},this.map.settings.upload_default_sl_marker&&this.map.settings.upload_default_sl_marker.length&&(options.icon=this.map.settings.upload_default_sl_marker,this.map.settings.upload_default_sl_marker_retina)&&(options.retina=!0),this._marker=WPGMZA.Marker.createInstance(options),this._marker.disableInfoWindow=!0,this._marker.isFilterable=!1,this._marker._icon.retina=this._marker.retina,1==this.map.settings.wpgmza_sl_animation?this._marker.setAnimation(WPGMZA.Marker.ANIMATION_BOUNCE):2==this.map.settings.wpgmza_sl_animation&&this._marker.setAnimation(WPGMZA.Marker.ANIMATION_DROP)),this._marker)}}),WPGMZA.ProStoreLocator.prototype.getZoomFromRadius=function(radius){return this.distanceUnits==WPGMZA.Distance.MILES&&(radius*=WPGMZA.Distance.KILOMETERS_PER_MILE),Math.round(14-Math.log(radius)/Math.LN2)},WPGMZA.ProStoreLocator.prototype.getFilteringParameters=function(){var params,proParams;return this.state==WPGMZA.StoreLocator.STATE_INITIAL?this.hideMarkersInInitialState?{hideAll:!0}:{}:(params=WPGMZA.StoreLocator.prototype.getFilteringParameters.call(this),proParams={},this.map.settings.store_locator_search_area==WPGMZA.ProStoreLocator.SEARCH_AREA_AUTO&&(delete params.center,delete params.radius),this.keywords&&(proParams.keywords=this.keywords),this.categories&&(proParams.categories=this.categories),$.extend(params,proParams))},WPGMZA.ProStoreLocator.prototype.onFilteringComplete=function(event){var maxZoom,params=event.filteringParams,circle=this.circle,marker=this.marker,factor=this.distanceUnits==WPGMZA.Distance.MILES?WPGMZA.Distance.KILOMETERS_PER_MILE:1;event.source instanceof WPGMZA.StoreLocator&&(WPGMZA.StoreLocator.prototype.onFilteringComplete.apply(this,arguments),this.map.settings.store_locator_search_area===WPGMZA.ProStoreLocator.SEARCH_AREA_AUTO?!this.bounds||this.bounds.isInInitialState()?(this.map.setZoom(this.map.settings.map_start_zoom),this.center&&(this.map.setCenter(this.center),this.map.settings.store_locator_auto_area_max_zoom&&this.map.setZoom(this.map.settings.store_locator_auto_area_max_zoom),marker)&&(marker.setPosition(this.center),marker.setVisible(!0),marker.map!=this.map)&&this.map.addMarker(marker)):(this.map.fitBounds(this.bounds),(maxZoom=this.map.settings.store_locator_auto_area_max_zoom)&&this.map.getZoom()>=maxZoom&&this.map.setZoom(maxZoom),marker&&(marker.setPosition(this.map.getCenter()),marker.setVisible(!0),marker.map!=this.map)&&this.map.addMarker(marker)):(circle&&circle.setVisible(!1),params.center&&params.radius&&(this.map.setCenter(params.center),this.map.setZoom(this.getZoomFromRadius(params.radius)),circle)&&(circle instanceof WPGMZA.ModernStoreLocatorCircle&&(circle.settings.radiusString=Math.round(params.radius)),circle.setRadius(params.radius*factor),circle.setCenter(params.center),circle.setVisible(!0),circle.map!=this.map)&&this.map.addCircle(circle)),maxZoom={type:"storelocatorresult"},event.center&&(maxZoom.center=event.center),this.map.trigger(maxZoom))},WPGMZA.ProStoreLocator.prototype.onGeocodeComplete=function(event){var location;event.results&&event.results.length&&((location=new WPGMZA.LatLng({lat:event.results[0].lat,lng:event.results[0].lng})).source=WPGMZA.ProMap.SHOW_DISTANCE_FROM_SEARCHED_ADDRESS,this.map.showDistanceFromLocation=location),WPGMZA.StoreLocator.prototype.onGeocodeComplete.apply(this,arguments)},WPGMZA.ProStoreLocator.prototype.onReset=function(event){this.map.showDistanceFromLocation=this.map.userLocation,this.map.updateInfoWindowDistances(),WPGMZA.StoreLocator.prototype.onReset.apply(this,arguments)}}),jQuery(function($){function defaultCompare(a,b){return a<b?-1:b<a?1:0}WPGMZA.Queue=function(data,compare){if(compare=compare||defaultCompare,this.data=data=data||[],this.length=this.data.length,this.compare=compare,0<this.lenght)for(var i=(this.length>>1)-1;0<=i;i--)this._down(i)},WPGMZA.Queue.prototype.push=function(item){this.data.push(item),this.length++,this._up(this.length-1)},WPGMZA.Queue.prototype.pop=function(){var top,bottom;if(0!==this.length)return top=this.data[0],bottom=this.data.pop(),this.length--,0<this.length&&(this.data[0]=bottom,this._down(0)),top},WPGMZA.Queue.prototype.peek=function(){return this.data[0]},WPGMZA.Queue.prototype._up=function(pos){for(var data=this.data,compare=this.compare,item=data[pos];0<pos;){var parent=pos-1>>1,current=data[parent];if(0<=compare(item,current))break;data[pos]=current,pos=parent}data[pos]=item},WPGMZA.Queue.prototype._down=function(pos){for(var data=this.data,compare=this.compare,halfLength=this.length>>1,item=data[pos];pos<halfLength;){var left=1+(pos<<1),best=data[left],right=left+1;if(right<this.length&&compare(data[right],best)<0&&(best=data[left=right]),0<=compare(best,item))break;data[pos]=best,pos=left}data[pos]=item}}),jQuery(function($){WPGMZA.StreetViewEditor=function(element,map){if(!element)throw new Error("Element cannot be undefined");if(!(element instanceof HTMLElement||element instanceof jQuery&&1==element.length))throw new Error("Invalid element");this.element=element,this.map=map,this.isEditing=!1,this.marker=!1,this.bindControls(),this.bindEvents(),this.updateState()},WPGMZA.StreetViewEditor.prototype.bindControls=function(){this.controls={},this.controls.editBtn=$(this.element).find(".streetview-edit-button"),this.controls.previewBtn=$(this.element).find(".streetview-preview-button"),this.controls.positionInput=$(this.element).find('input[name="map_starts_in_streetview_location"]'),this.controls.headingInput=$(this.element).find('input[name="map_starts_in_streetview_heading"]'),this.controls.pitchInput=$(this.element).find('input[name="map_starts_in_streetview_pitch"]'),this.controls.infoBox=$(this.element).find(".streetview-starting-poisition-info"),this.controls.helpBox=$(this.element).find(".streetview-help-box")},WPGMZA.StreetViewEditor.prototype.bindEvents=function(){const self=this;this.controls.editBtn.on("click",function(){self.isEditing=!self.isEditing,self.updateState()}),this.controls.previewBtn.on("click",function(){self.onPreview()}),this.map.on("streetview_visible_changed",function(event){self.onChange(event)}),this.map.on("streetview_position_changed",function(event){self.onChange(event)}),this.map.on("streetview_pov_changed",function(event){self.onChange(event)})},WPGMZA.StreetViewEditor.prototype.setEditing=function(state){this.isEditing=state,this.updateState()},WPGMZA.StreetViewEditor.prototype.updateState=function(){this.isEditing?(this.controls.editBtn.text(this.controls.editBtn.data("editing")),(this.hasLocation()?(this.controls.infoBox.show(),this.controls.previewBtn.text(this.controls.previewBtn.data("open")),this.controls.previewBtn.show(),this.controls.helpBox.find(".notice-warning").hide(),this.controls.helpBox.find('.notice-warning[data-help-type="edit"]')):(this.controls.previewBtn.hide(),this.controls.helpBox.find(".notice-warning").hide(),this.controls.helpBox.find('.notice-warning[data-help-type="add"]'))).show(),this.controls.helpBox.show()):(this.hasLocation()?(this.controls.editBtn.text(this.controls.editBtn.data("edit")),this.controls.previewBtn.text(this.controls.previewBtn.data("preview")),this.controls.previewBtn.show()):this.controls.editBtn.text(this.controls.editBtn.data("add")),this.controls.infoBox.hide(),this.controls.helpBox.hide(),this.controls.helpBox.find(".notice-warning").hide()),this.updateMarker()},WPGMZA.StreetViewEditor.prototype.onChange=function(event){var latlng;this.isEditing&&(event.latLng&&(latlng=new WPGMZA.LatLng(event.latLng),this.controls.positionInput.val(latlng.toString())),event.pov&&(event.pov.heading&&this.controls.headingInput.val(event.pov.heading),event.pov.pitch)&&this.controls.pitchInput.val(event.pov.pitch),this.updateState())},WPGMZA.StreetViewEditor.prototype.onPreview=function(event){this.map.openStreetView({position:this.getLocation(),heading:this.getHeading(),pitch:this.getPitch()})},WPGMZA.StreetViewEditor.prototype.updateMarker=function(){const self=this;this.isEditing&&this.hasLocation()?(this.marker?this.marker.setVisible(!0):(this.marker=WPGMZA.Marker.createInstance({position:this.getLocation(),disableInfoWindow:!0,icon:WPGMZA.pegmanIcon,title:"Click to open"}),this.marker.setMap(this.map),this.marker.on("click",function(){self.onPreview()})),this.marker.setPosition(this.getLocation())):this.marker instanceof WPGMZA.Marker&&this.marker.setVisible(!1)},WPGMZA.StreetViewEditor.prototype.hasLocation=function(){return!!this.controls.positionInput.val().trim().length},WPGMZA.StreetViewEditor.prototype.hasHeading=function(){return!!this.controls.headingInput.val().trim().length},WPGMZA.StreetViewEditor.prototype.hasPitch=function(){return!!this.controls.pitchInput.val().trim().length},WPGMZA.StreetViewEditor.prototype.getLocation=function(){return!!this.hasLocation()&&new WPGMZA.LatLng(this.controls.positionInput.val())},WPGMZA.StreetViewEditor.prototype.getHeading=function(){return this.hasHeading()?parseFloat(this.controls.headingInput.val()):0},WPGMZA.StreetViewEditor.prototype.getPitch=function(){return this.hasPitch()?parseFloat(this.controls.pitchInput.val()):0}}),jQuery(function($){WPGMZA.UseMyLocationButton=function(target,options){var self=this,options=(this.options={},options&&(this.options=options),this.target=$(target),"button-secondary");"legacy"!==WPGMZA.settings.internalEngine&&(options="wpgmza-button"),WPGMZA.InternalEngine.isLegacy()||1===parseInt(WPGMZA.is_admin)?this.element=$("<button class='wpgmza-use-my-location "+options+"' type='button' title='"+WPGMZA.localized_strings.use_my_location+"'><i class='fa fa-crosshairs' aria-hidden='true'></i></button>"):this.element=$("<button class='wpgmza-use-my-location "+options+"' type='button' title='"+WPGMZA.localized_strings.use_my_location+"'>"+this.getSVG()+"</button>"),this.element.on("click",function(event){self.onClick(event)})},WPGMZA.UseMyLocationButton.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.UseMyLocationButton.prototype.constructor=WPGMZA.UseMyLocationButton,WPGMZA.UseMyLocationButton.prototype.onClick=function(event){var self=this;WPGMZA.getCurrentPosition(function(position){var lat=position.coords.latitude,position=position.coords.longitude;self.target.val(lat+", "+position),self.target.trigger("change"),WPGMZA.Geocoder.createInstance().geocode({latLng:{lat:lat,lng:position}},function(results){results&&results.length&&self.target.val(results[0])})})},WPGMZA.UseMyLocationButton.prototype.getSVG=function(){var html='<svg width="40" height="40" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg" class="wpgmza-use-loc">';html+='<circle cx="30" cy="30" r="20.5" stroke-width="5" class="circle_outer"/>';return'<svg width="40" height="40" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg" class="wpgmza-use-loc"><circle cx="30" cy="30" r="20.5" stroke-width="5" class="circle_outer"/><circle cx="30" cy="30" r="12" class="circle_inner"/><line x1="30" y1="7" x2="30" y2="3" stroke-width="6" stroke-linecap="round" class="line" /><line x1="30" y1="57" x2="30" y2="53" stroke-width="6" stroke-linecap="round" class="line" /><line x1="53" y1="30" x2="57" y2="30" stroke-width="6" stroke-linecap="round" class="line" /><line x1="3" y1="30" x2="7" y2="30" stroke-width="6" stroke-linecap="round" class="line" /></svg>'}}),jQuery(function($){WPGMZA.ModernStoreLocator=function(map_id){var original,inner,addressInput,placeholder,container,titleSearch,numCategories,icons,self=this,map=WPGMZA.getMapByID(map_id);WPGMZA.assertInstanceOf(this,"ModernStoreLocator"),(original=(WPGMZA.isProVersion()?$(".wpgmza_sl_search_button[mid='"+map_id+"'], .wpgmza_sl_search_button_"+map_id):$(".wpgmza_sl_search_button")).closest(".wpgmza_sl_main_div")).length&&(this.element=$("<div class='wpgmza-modern-store-locator'><div class='wpgmza-inner wpgmza-modern-hover-opaque'/></div>")[0],inner=$(this.element).find(".wpgmza-inner"),addressInput=WPGMZA.isProVersion()?$(original).find(".addressInput"):$(original).find("#addressInput"),map.settings.store_locator_query_string&&map.settings.store_locator_query_string.length&&addressInput.attr("placeholder",map.settings.store_locator_query_string),inner.append(addressInput),(titleSearch=$(original).find("[id='nameInput_"+map_id+"']")).length&&((placeholder=map.settings.store_locator_name_string)&&placeholder.length&&titleSearch.attr("placeholder",placeholder),inner.append(titleSearch)),(placeholder=$(original).find("button.wpgmza-use-my-location"))&&inner.append(placeholder),$(addressInput).on("keydown keypress",function(event){13==event.keyCode&&self.searchButton.is(":visible")&&self.searchButton.trigger("click")}),$(addressInput).on("input",function(event){self.searchButton.show(),self.resetButton.hide()}),inner.append($(original).find("select.wpgmza_sl_radius_select")),this.searchButton=$(original).find(".wpgmza_sl_search_button, .wpgmza_sl_search_button_div"),inner.append(this.searchButton),this.resetButton=$(original).find(".wpgmza_sl_reset_button_div"),inner.append(this.resetButton),this.resetButton.on("click",function(event){resetLocations(map_id)}),this.resetButton.hide(),WPGMZA.isProVersion()&&(this.searchButton.on("click",function(event){0!=$("addressInput_"+map_id).val()&&(self.searchButton.hide(),self.resetButton.show(),map.storeLocator.state=WPGMZA.StoreLocator.STATE_APPLIED)}),this.resetButton.on("click",function(event){self.resetButton.hide(),self.searchButton.show(),map.storeLocator.state=WPGMZA.StoreLocator.STATE_INITIAL})),inner.append($("#wpgmza_distance_type_"+map_id)),container=$(original).find(".wpgmza_cat_checkbox_holder"),$(container).children("ul"),titleSearch=$(container).find("li"),numCategories=0,icons=[],titleSearch.each(function(index,el){var category_id,id=$(el).attr("class").match(/\d+/);for(category_id in wpgmza_category_data)if(id==category_id){var src=wpgmza_category_data[category_id].image,icon=$('<div class="wpgmza-chip-icon"/>');icon.css({"background-image":"url('"+src+"')",width:$("#wpgmza_cat_checkbox_"+category_id+" + label").height()+"px"}),icons.push(icon),null!=src&&""!=src&&$("#wpgmza_cat_checkbox_"+category_id+" + label").prepend(icon),numCategories++;break}}),$(this.element).append(container),numCategories&&(this.optionsButton=$('<span class="wpgmza_store_locator_options_button"><i class="fa fa-list"></i></span>'),$(this.searchButton).before(this.optionsButton)),setInterval(function(){icons.forEach(function(icon){var height=$(icon).height();$(icon).css({width:height+"px"}),$(icon).closest("label").css({"padding-left":height+8+"px"})}),$(container).css("width",$(self.element).find(".wpgmza-inner").outerWidth()+"px")},1e3),$(this.element).find(".wpgmza_store_locator_options_button").on("click",function(event){container.hasClass("wpgmza-open")?container.removeClass("wpgmza-open"):container.addClass("wpgmza-open")}),$(original).remove(),$(this.element).find("input, select").on("focus",function(){$(inner).addClass("active")}),$(this.element).find("input, select").on("blur",function(){$(inner).removeClass("active")}),$(this.element).on("mouseover","li.wpgmza_cat_checkbox_item_holder",function(event){self.onMouseOverCategory(event)}),$(this.element).on("mouseleave","li.wpgmza_cat_checkbox_item_holder",function(event){self.onMouseLeaveCategory(event)}),$("body").on("click",".wpgmza_store_locator_options_button",function(event){setTimeout(function(){var p_cat,$p_map;$(".wpgmza_cat_checkbox_holder").hasClass("wpgmza-open")&&(p_cat=(p_cat=$(".wpgmza_cat_checkbox_holder")).position().top+p_cat.outerHeight(!0)+$(".wpgmza-modern-store-locator").height(),($p_map=$(".wpgmza_map")).position().top+$p_map.outerHeight(!0)<=p_cat)&&($(".wpgmza_cat_ul").css("overflow","scroll "),$(".wpgmza_cat_ul").css("height","100%"),$(".wpgmza-modern-store-locator").css("height","100%"),$(".wpgmza_cat_checkbox_holder.wpgmza-open").css({"padding-bottom":"50px",height:"100%"}))},500)}))},WPGMZA.ModernStoreLocator.createInstance=function(map_id){return new("open-layers"!==WPGMZA.settings.engine?WPGMZA.GoogleModernStoreLocator:WPGMZA.OLModernStoreLocator)(map_id)},WPGMZA.ModernStoreLocator.prototype.onMouseOverCategory=function(event){event=event.currentTarget;$(event).children("ul.wpgmza_cat_checkbox_item_holder").stop(!0,!1).fadeIn()},WPGMZA.ModernStoreLocator.prototype.onMouseLeaveCategory=function(event){event=event.currentTarget;$(event).children("ul.wpgmza_cat_checkbox_item_holder").stop(!0,!1).fadeOut()}}),jQuery(function($){WPGMZA.GoogleModernStoreLocator=function(map_id){var map=this.map=WPGMZA.getMapByID(map_id),map_id=(WPGMZA.ModernStoreLocator.call(this,map_id),map.settings.wpgmza_store_locator_restrict);this.addressInput=$(this.element).find(".addressInput, #addressInput")[0],this.addressInput&&map_id&&map_id.length,this.map.googleMap.controls[google.maps.ControlPosition.TOP_CENTER].push(this.element)},WPGMZA.GoogleModernStoreLocator.prototype=Object.create(WPGMZA.ModernStoreLocator.prototype),WPGMZA.GoogleModernStoreLocator.prototype.constructor=WPGMZA.GoogleModernStoreLocator}),jQuery(function($){WPGMZA.OLModernStoreLocator=function(map_id){WPGMZA.ModernStoreLocator.call(this,map_id),(WPGMZA.isProVersion()?$(".wpgmza_map[data-map-id='"+map_id+"']"):$("#wpgmza_map")).append(this.element)},WPGMZA.OLModernStoreLocator.prototype=Object.create(WPGMZA.ModernStoreLocator),WPGMZA.OLModernStoreLocator.prototype.constructor=WPGMZA.OLModernStoreLocator}),jQuery(function($){WPGMZA.ViewportGroupingPanel=function(element){var self=this;WPGMZA.EventDispatcher.apply(this),this.element=$(element),this.parent=this.element.parent(),this.toggleControl=this.parent.find(".grouping-handle"),this.viewChain=[],this.findComponents(),this.toggleControl.on("click",function(){self.toggle()}),this.element.on("click",".wpgmza-close",function(){self.showPreviousComponent()}),this.showDefaultComponent(),this.parent.addClass("viewport-grouping")},WPGMZA.extend(WPGMZA.ViewportGroupingPanel,WPGMZA.EventDispatcher),WPGMZA.ViewportGroupingPanel.createInstance=function(map){return new WPGMZA.ViewportGroupingPanel(map)},WPGMZA.ViewportGroupingPanel.prototype.show=function(){this.toggleControl.hasClass("wpgmza-hidden")&&this.toggleControl.removeClass("wpgmza-hidden"),this.element.addClass("visible"),this.parent.addClass("expanded")},WPGMZA.ViewportGroupingPanel.prototype.hide=function(){this.element.removeClass("visible"),this.parent.removeClass("expanded")},WPGMZA.ViewportGroupingPanel.prototype.toggle=function(){this.element.toggleClass("visible"),this.parent.toggleClass("expanded")},WPGMZA.ViewportGroupingPanel.prototype.findComponents=function(){var self=this;this.componentCount=0,this.components={},this.defaultView=!1,this.element.find(".grouping-item").each(function(){var tag=$(this).data("component");self.components[tag]=$(this),self.defaultView||(self.defaultView=tag,$(this).data("requires-feature")&&(self.toggleControl.addClass("wpgmza-hidden"),$(this).find(".wpgmza-close").hide())),self.componentCount++}),1===this.componentCount?this.element.find(".wpgmza-close").hide():0<this.components[this.defaultView].find(".wpgmza-close").length&&this.components[this.defaultView].find(".wpgmza-close").hide()},WPGMZA.ViewportGroupingPanel.prototype.hasComponent=function(tag){return!!this.components[tag]},WPGMZA.ViewportGroupingPanel.prototype.showComponent=function(tag,disableFocus){this.hasComponent(tag)&&(this.hideComponents(),this.components[tag].show(),this.defaultView===tag&&(this.viewChain=[]),-1===this.viewChain.indexOf(tag)&&this.viewChain.push(tag),disableFocus||this.show())},WPGMZA.ViewportGroupingPanel.prototype.showPreviousComponent=function(){var previous;this.viewChain.pop(),0<this.viewChain.length?(previous=this.viewChain.length-1,this.showComponent(this.viewChain[previous])):this.showDefaultComponent()},WPGMZA.ViewportGroupingPanel.prototype.hideComponents=function(){this.element.find(".grouping-item").hide()},WPGMZA.ViewportGroupingPanel.prototype.showDefaultComponent=function(){this.defaultView&&this.showComponent(this.defaultView,!0)}}),jQuery(function($){WPGMZA.ViewportGroupings=function(map){WPGMZA.EventDispatcher.apply(this),this.map=map,this.initGroups()},WPGMZA.extend(WPGMZA.ViewportGroupings,WPGMZA.EventDispatcher),WPGMZA.ViewportGroupings.createInstance=function(map){return new WPGMZA.ViewportGroupings(map)},WPGMZA.ViewportGroupings.prototype.initGroups=function(){var self=this;this.groups=[],$(this.map.element).find(".wpgmza-inner-stack .grouping").each(function(){var group=WPGMZA.ViewportGroupingPanel.createInstance(this);self.groups.push(group)})},WPGMZA.ViewportGroupings.prototype.update=function(tag){for(var i in this.groups)this.groups[i].showComponent(tag)}}),jQuery(function($){WPGMZA.WooCommerceCheckout=function(element){this.element=element,this.map=!1,this.checkout=!1,this.marker=!1,this.coords=!1,this.findMap(),this.findCheckout(),this.map&&this.checkout&&(this.bindEvents(),this.updateCoordinatesFromAddress())},WPGMZA.WooCommerceCheckout.prototype.findMap=function(){this.element.find(".wpgmza_map").length&&(this.map=WPGMZA.getMapByID(this.element.find(".wpgmza_map").data("map-id")))},WPGMZA.WooCommerceCheckout.prototype.findCheckout=function(){if($("form.checkout.woocommerce-checkout").length){for(var type in this.checkout={},this.checkout.element=$("form.checkout.woocommerce-checkout"),this.checkout.fields={billing:{},shipping:{}},this.checkout.fields)this.checkout.fields[type].address=this.checkout.element.find('*[name="'+type+'_address_1"]'),this.checkout.fields[type].city=this.checkout.element.find('*[name="'+type+'_city"]'),this.checkout.fields[type].postcode=this.checkout.element.find('*[name="'+type+'_postcode"]'),this.checkout.fields[type].country=this.checkout.element.find('*[name="'+type+'_country"]'),this.checkout.fields[type].state=this.checkout.element.find('*[name="'+type+'_state"]');this.checkout.coords=this.checkout.element.find('input[name="_wpgmza_wcc_coords"]')}},WPGMZA.WooCommerceCheckout.prototype.bindEvents=function(){const self=this;for(var type in this.map.on("rightclick",function(event){event.latLng&&self.updateCoordinates(event.latLng,!0)}),this.checkout.fields)for(var slug in this.checkout.fields[type])this.checkout.fields[type][slug].on("change",function(){self.updateCoordinatesFromAddress()})},WPGMZA.WooCommerceCheckout.prototype.updateCoordinates=function(coords,updateAddress){coords.lat&&coords.lng&&(this.coords=coords,this.updateMarker(),updateAddress&&this.updateAddressFromCoordinates(),this.checkout.coords.val(this.coords.lat+", "+this.coords.lng))},WPGMZA.WooCommerceCheckout.prototype.updateMarker=function(coords){const self=this;var options;this.coords&&this.coords.lat&&this.coords.lng&&(this.marker?this.marker.setPosition(new WPGMZA.LatLng(this.coords)):(options={draggable:!0,lat:this.coords.lat,lng:this.coords.lng,disableInfoWindow:!0},this.marker=WPGMZA.Marker.createInstance(options),this.map.addMarker(this.marker),this.marker.on("dragend",function(event){event.target instanceof WPGMZA.Marker&&event.latLng&&self.updateCoordinates(event.latLng)})),setTimeout(function(){self.map.panTo(new WPGMZA.LatLng(self.coords))},800))},WPGMZA.WooCommerceCheckout.prototype.updateAddressFromCoordinates=function(){const self=this;this.coords&&this.coords.lat&&this.coords.lng&&WPGMZA.Geocoder.createInstance().geocode({latLng:new WPGMZA.LatLng(this.coords),fullResult:!0},function(data){if(data&&data instanceof Array&&(data=data.shift())){let address=!1;address=data.address_components?self.parseAdddressFromComponents(data.address_components):self.parseAddressFromText(data.display_name),self.updateCheckoutField("address",[address.number,address.street,address.suburb]),self.updateCheckoutField("city",address.city),self.updateCheckoutField("postcode",address.zip),self.updateCheckoutField("country",address.country),setTimeout(function(){self.updateCheckoutField("state",address.state)},1500)}})},WPGMZA.WooCommerceCheckout.prototype.updateCoordinatesFromAddress=function(){const self=this;var type,addresses={},onlyShipping=this.checkout.element.find('input[name="ship_to_different_address"]').prop("checked"),sections=["shipping"];onlyShipping||sections.push("billing");for(type of sections)if(this.checkout.fields[type]){var fields=this.checkout.fields[type],compiled=[];try{fields.address.length&&fields.address.val().trim().length&&compiled.push(fields.address.val().trim()),fields.city.length&&fields.city.val().trim().length&&compiled.push(fields.city.val().trim()),fields.state.length&&fields.state.val().trim().length&&compiled.push(fields.state.find('option[value="'+fields.state.val().trim()+'"]').text()),fields.country.length&&fields.country.val().trim().length&&compiled.push(fields.country.find('option[value="'+fields.country.val().trim()+'"]').text()),fields.postcode.length&&fields.postcode.val().trim().length&&compiled.push(fields.postcode.val().trim())}catch(ex){}compiled.length&&(addresses[type]=compiled.join(", "))}let address=!1;onlyShipping&&addresses.shipping?address=addresses.shipping:addresses.billing&&(address=addresses.billing),address&&WPGMZA.Geocoder.createInstance().geocode({address:address},function(data){data&&data instanceof Array&&(data=data.shift())&&data.latLng&&self.updateCoordinates(data.latLng)})},WPGMZA.WooCommerceCheckout.prototype.parseAdddressFromComponents=function(components){if(components instanceof Array){var component,compiled={},remap={street_number:"number",route:"street",sublocality:"suburb",locality:"city",administrative_area_level_1:"state",country:"country",postal_code:"zip"};for(component of components)for(var key in remap){var compiledKey=remap[key];component.types&&component.types instanceof Array&&-1!==component.types.indexOf(key)&&(compiled[compiledKey]="country"===compiledKey||"state"===compiledKey?component.short_name:component.long_name)}return compiled}return!1},WPGMZA.WooCommerceCheckout.prototype.parseAddressFromText=function(text){return{street:text}},WPGMZA.WooCommerceCheckout.prototype.updateCheckoutField=function(slug,value){if(value&&(value=value instanceof Array?(value=value.join(" ")).trim():value).trim().length){var type,field,sections=["shipping"];this.checkout.element.find('input[name="ship_to_different_address"]').prop("checked")||sections.push("billing");for(type of sections)this.checkout.fields[type]&&this.checkout.fields[type]instanceof Object&&this.checkout.fields[type][slug]&&((field=this.checkout.fields[type][slug]).val(value),field.trigger("change"))}},$(document).ready(function(event){$(".wpgmza-woo-checkout-map-wrapper").length&&(WPGMZA.wooCommerceCheckout=new WPGMZA.WooCommerceCheckout($(".wpgmza-woo-checkout-map-wrapper")))})}),jQuery(function($){WPGMZA.WooCommerceLocationEditor=function(element){const self=this;this.element=$(element),this.map=WPGMZA.maps[0],this.marker=!1,this.lastAddress=element.find("input.wpgmza-address").val(),this.lastCoords=!1,this.input=this.element.find("input.wpgmza-address"),this.input.addressInput=WPGMZA.AddressInput.createInstance(this.input.get(0)),this.input.addressInput.useMyLocationButton&&this.input.addressInput.useMyLocationButton.element&&(this.input.addressInput.useMyLocationButton.element.text(this.input.addressInput.useMyLocationButton.element.attr("title")),this.input.addressInput.useMyLocationButton.element.addClass("wpgmza-margin-l-10")),this.input.on("change focusout",function(){setTimeout(()=>{var address=$(this).val();self.updateAddress(address)},500)}),this.element.find('input[name="_wpgmza_wcp_loc_lat"],input[name="_wpgmza_wcp_loc_lng"]').on("change",function(){self.updateCoordinates({lat:parseFloat(self.element.find('input[name="_wpgmza_wcp_loc_lat"]').val()),lng:parseFloat(self.element.find('input[name="_wpgmza_wcp_loc_lng"]').val())})}),this.element.find(".wpgmza-wcp-clear-coords-button").on("click",function(event){event.preventDefault(),self.input.val(""),self.element.find('input[name="_wpgmza_wcp_loc_lng"]').val(""),self.element.find('input[name="_wpgmza_wcp_loc_lng"]').val(""),self.marker&&(self.map.removeMarker(self.marker),self.marker=!1)}),this.element.find(".wpgmza-wcp-toggle-coords-button").on("click",function(event){event.preventDefault(),$(".wpgmza-wcp-coords-block").toggleClass("wpgmza-hidden")}),this.map.on("rightclick",function(event){event&&event.latLng&&self.updateCoordinates(event.latLng,!0)}),this.element.find('input[name="_wpgmza_wcp_loc_lat"]').val().trim().length&&this.element.find('input[name="_wpgmza_wcp_loc_lng"]').val().trim().length&&self.updateCoordinates({lat:this.element.find('input[name="_wpgmza_wcp_loc_lat"]').val(),lng:this.element.find('input[name="_wpgmza_wcp_loc_lng"]').val()})},WPGMZA.WooCommerceLocationEditor.prototype.updateAddress=function(address){const self=this;this.lastAddress!==address.trim()&&(this.lastAddress=address.trim(),WPGMZA.Geocoder.createInstance().geocode({address:address.trim()},function(data){data&&data instanceof Array&&(data=data.shift()).latLng&&self.updateCoordinates(data.latLng)}))},WPGMZA.WooCommerceLocationEditor.prototype.updateCoordinates=function(coords,forceAddress){coords.lat&&coords.lng&&(this.lastCoords=coords,this.element.find('input[name="_wpgmza_wcp_loc_lat"]').val(coords.lat),this.element.find('input[name="_wpgmza_wcp_loc_lng"]').val(coords.lng),this.lastAddress&&!forceAddress||(this.lastAddress=coords.lat+","+coords.lng,this.input.val(this.lastAddress)),this.updateMarker())},WPGMZA.WooCommerceLocationEditor.prototype.updateMarker=function(){const self=this;var options;this.lastCoords&&this.lastCoords.lat&&this.lastCoords.lng&&(this.marker?this.marker.setPosition(new WPGMZA.LatLng(this.lastCoords)):(options={draggable:!0,lat:this.lastCoords.lat,lng:this.lastCoords.lng,disableInfoWindow:!0},this.marker=WPGMZA.Marker.createInstance(options),this.map.addMarker(this.marker),this.marker.on("dragend",function(event){event.target instanceof WPGMZA.Marker&&event.latLng&&self.updateCoordinates(event.latLng)})),setTimeout(function(){self.map.panTo(new WPGMZA.LatLng(self.lastCoords))},800))},$(document).ready(function(event){1===parseInt(WPGMZA.is_admin)&&$("#wpgmza_wcp_location_editor").length&&(WPGMZA.wooCommerceLocationEditor=new WPGMZA.WooCommerceLocationEditor($("#wpgmza_wcp_location_editor")))})}),jQuery(function($){WPGMZA.WooCommerceLocationViewer=function(element){this.element=$(element),this.map=WPGMZA.maps[0],this.marker=!1,this.coords=!1,this.mapWrapper=this.element.find("#wpgmza-wco-map-container"),this.mapWrapper.data("coords")&&this.updateCoordinates(this.mapWrapper.data("coords"))},WPGMZA.WooCommerceLocationViewer.prototype.updateCoordinates=function(value){var coords={lat:!1,lng:!1};value&&2<=(value=value.split(",")).length&&(coords.lat=value.shift(),coords.lng=value.shift()),coords.lat&&coords.lng&&(this.coords=coords,this.updateMarker())},WPGMZA.WooCommerceLocationViewer.prototype.updateMarker=function(){const self=this;var options;this.coords&&this.coords.lat&&this.coords.lng&&(this.marker?this.marker.setPosition(new WPGMZA.LatLng(this.coords)):(options={lat:this.coords.lat,lng:this.coords.lng,disableInfoWindow:!0},this.marker=WPGMZA.Marker.createInstance(options),this.map.addMarker(this.marker)),setTimeout(function(){self.map.panTo(new WPGMZA.LatLng(self.coords))},800))},$(document).ready(function(event){1===parseInt(WPGMZA.is_admin)&&$("#wpgmza_wco_location_viewer").length&&(WPGMZA.wooCommerceLocationViewer=new WPGMZA.WooCommerceLocationViewer($("#wpgmza_wco_location_viewer")))})}),jQuery(function($){"custom-fields"==WPGMZA.currentPage&&(WPGMZA.CustomFieldsPage=function(){var self=this;this.element=$(".custom-field-list-container"),this.form=$("form#wpgmza-custom-fields"),this.parseRowTemplate(),this.element.sortable({items:".wpgmza-custom-field-item-row",handle:".wpgmza-drag-handle"}),this.form.on("submit",function(event){self.onSubmit(event)}),this.element.find(".icon-picker").each(function(event){new WPGMZA.FontAwesomeIconPickerField(this)}),this.element.on("click",".field-action-btn",function(event){self.onFieldAction($(this))}),this.element.on("keydown",".html-attributes input",function(event){self.onAttributeKeydown(event)}),this.element.parent().find(".custom-field-new-row-control").on("click",function(event){self.addRow()})},WPGMZA.extend(WPGMZA.CustomFieldsPage,WPGMZA.EventDispatcher),WPGMZA.CustomFieldsPage.createInstance=function(){return new WPGMZA.CustomFieldsPage},WPGMZA.CustomFieldsPage.prototype.onFieldAction=function(element){var type=element.data("action"),row=element.parent().parent().parent();switch(type){case"edit":this.onEdit(row);break;case"delete":this.onDelete(row)}},WPGMZA.CustomFieldsPage.prototype.onEdit=function(row){row.find(".field-meta-container").toggleClass("wpgmza-hidden")},WPGMZA.CustomFieldsPage.prototype.onDelete=function(row){row.remove()},WPGMZA.CustomFieldsPage.prototype.parseRowTemplate=function(){this.rowTemplate=this.element.find(".wpgmza-custom-field-item-row.row-template").clone(),this.rowTemplate.removeClass("row-template"),this.element.find(".wpgmza-custom-field-item-row.row-template").remove()},WPGMZA.CustomFieldsPage.prototype.addRow=function(){this.element.append(this.rowTemplate.clone()).find(".icon-picker").each(function(event){new WPGMZA.FontAwesomeIconPickerField(this)})},WPGMZA.CustomFieldsPage.prototype.onAttributeKeydown=function(event){var row=$(event.target).closest(".wpgmza-row"),attrName=row.find("input.attribute-name"),attrValue=row.find("input.attribute-value");switch(event.keyCode){case 13:return this.addAttributeRow(event),event.preventDefault(),!1;case 8:if(0==attrName.val().length&&0==attrValue.val().length)return this.removeAttributeRow(event),event.preventDefault(),!1;0==attrValue.val().length&&event.target==attrValue[0]&&attrName.focus()}},WPGMZA.CustomFieldsPage.prototype.addAttributeRow=function(event){var newAttribute,event=$(event.target).closest(".wpgmza-row"),attrName=event.find("input.attribute-name");event.find("input.attribute-value");($(attrName).val().length?((newAttribute=event.clone()).find("input").val(""),event.parent().append(newAttribute),newAttribute.find("input.attribute-name")):$(attrName)).focus()},WPGMZA.CustomFieldsPage.prototype.removeAttributeRow=function(event){var prevValueInput;1!=$(event.target).closest(".attributes").children(".wpgmza-row").length&&(prevValueInput=(event=$(event.target).closest(".wpgmza-row")).prev(".wpgmza-row").find("input.attribute-value"),event.remove(),prevValueInput.focus())},WPGMZA.CustomFieldsPage.prototype.onSubmit=function(event){var names=[];this.element.children().find("input[name='names[]']").each(function(){names.push($(this).val())});for(var i=0;i<names.length;i++)for(var j=i+1;j<names.length;j++)if(names[i]==names[j])return alert(WPGMZA.localized_strings.duplicate_custom_field_name),event.preventDefault(),!1;this.element.find(".attributes").each(function(index,el){var json={};$(el).find("input.attribute-name").each(function(j,input){var name=$(input).val(),input=$(input).closest(".wpgmza-row").find("input.attribute-value").val();json[name]=input}),$(el).find("input[name='attributes[]']").val(JSON.stringify(json))})},$(document).ready(function(event){WPGMZA.customFieldsPage=WPGMZA.CustomFieldsPage.createInstance()}))}),jQuery(function($){WPGMZA.CloudAPI=function(){},WPGMZA.CloudAPI.createInstance=function(){return new WPGMZA.CloudAPI},Object.defineProperty(WPGMZA.CloudAPI,"url",{value:"https://www.wpgmaps.com/cloud/public",writable:!1}),Object.defineProperty(WPGMZA.CloudAPI,"isBeingUsed",{get:function(){return/^wpgmza[a-f0-9]+$/.test(WPGMZA.settings.wpgmza_google_maps_api_key)}}),Object.defineProperty(WPGMZA.CloudAPI,"key",{get:function(){return WPGMZA.settings.wpgmza_google_maps_api_key}});var nativeCallFunction=WPGMZA.CloudAPI.call;WPGMZA.CloudAPI.call=function(){console.warn("WPGMZA.CloudAPI.call was called statically, did you mean to call the function on WPGMZA.cloudAPI?"),nativeCallFunction.apply(this,arguments)},WPGMZA.CloudAPI.prototype.call=function(url,options){(options=options||{}).data||(options.data={});var sessionToken,language=WPGMZA.locale.substr(0,2);options.data.sessiontoken&&(sessionToken=options.data.sessiontoken,delete options.data.sessiontoken),"he_IL"==WPGMZA.locale&&(language="iw"),options.url=WPGMZA.CloudAPI.url+url,options.beforeSend=function(xhr){xhr.setRequestHeader("X-WPGMZA-CLOUD-API-KEY",WPGMZA.CloudAPI.key),sessionToken&&xhr.setRequestHeader("X-WPGMZA-CLOUD-API-SESSION-TOKEN",sessionToken)},options.data.language=language,$.ajax(options)}}),jQuery(function($){WPGMZA.CloudAutocomplete=function(element,options){var self=this;WPGMZA.EventDispatcher.apply(this,arguments),this.element=element,this.options=options,$(this.element).wrap("<div class='wpgmza-cloud-address-input-wrapper'></div>"),this.wrapper=$(this.element).parent(),this.preloader=$(WPGMZA.loadingHTML),$(this.element).after(this.preloader),$(this.preloader).hide(),this.session={guid:null,expires:0},$(element).autocomplete({open:function(event,ui){self.onOpen(event,ui)},select:function(event,ui){self.onSelect(event,ui)},source:function(request,response){var now=(new Date).getTime(),now=(self.session.expires<now&&(self.session.guid=WPGMZA.guid()),self.session.expires=now+3e4,{input:$(self.element).val(),sessiontoken:self.session.guid}),now=(options.country&&(now.components="country:"+options.country),$.extend(now,self.options));self.showPreloader(!0),WPGMZA.cloudAPI.call("/autocomplete",{data:now,success:function(data){var items=[];data.predictions.forEach(function(prediction){items.push({id:prediction.id,value:prediction.description})}),response(items),self.showPreloader(!1)}})}}),this.widget=$(element).autocomplete("widget"),this.widget.addClass("wpgmza-cloud-autocomplete")},WPGMZA.extend(WPGMZA.CloudAutocomplete,WPGMZA.EventDispatcher),WPGMZA.CloudAutocomplete.prototype.onOpen=function(event,ui){this.widget.css({width:$(this.element).outerWidth()+"px"})},WPGMZA.CloudAutocomplete.prototype.onSelect=function(event,ui){this.session.expires=0},WPGMZA.CloudAutocomplete.prototype.showPreloader=function(show){show?$(this.preloader).show():$(this.preloader).hide()}}),jQuery(function($){WPGMZA.CloudDirectionsRenderer=function(map){WPGMZA.DirectionsRenderer.apply(this,arguments),this.panel=$("#directions_panel_"+map.id)},WPGMZA.extend(WPGMZA.CloudDirectionsRenderer,WPGMZA.DirectionsRenderer),WPGMZA.CloudDirectionsRenderer.maneuverToClassName=function(maneuver){var map={"turn-slight-left":"slight-left","turn-sharp-left":"sharp-left","uturn-left":"sharp-left","turn-left":"left","turn-slight-right":"slight-right","turn-sharp-right":"sharp-right","uturn-right":"sharp-right","turn-right":"right",straight:"straight","ramp-left":"keep-left","ramp-right":"keep-right","fork-left":"keep-left","fork-right":"keep-right","roundabout-left":"enter-roundabout","roundabout-right":"enter-roundabout"};return map[maneuver]?"wpgmza-instruction-type-"+map[maneuver]:""},WPGMZA.CloudDirectionsRenderer.prototype.clear=function(){this.removeMarkers(),this.polyline&&(this.map.removePolyline(this.polyline),delete this.polyline),this.panel.html("")},WPGMZA.CloudDirectionsRenderer.prototype.setDirections=function(directions){var path,points,settings,steps,self=this,directions=directions.routes[0];this.clear(),directions&&(path=[],points=[],window.polyline.decode(directions.overview_polyline.points).forEach(function(arr){path.push(new google.maps.LatLng({lat:arr[0],lng:arr[1]})),points.push(new WPGMZA.LatLng({lat:arr[0],lng:arr[1]}))}),settings=this.getPolylineOptions(),this.polyline=WPGMZA.Polyline.createInstance({settings:settings}),this.polyline.googlePolyline.setOptions({path:path}),this.map.addPolyline(this.polyline),this.addMarkers(points),steps=[],directions.legs&&directions.legs.forEach(function(leg){steps=steps.concat(leg.steps)}),steps.forEach(function(step){var div=$("<div class='wpgmza-directions-step'></div>");div[0].wpgmzaDirectionsStep=step,div.html(step.html_instructions),div.addClass(WPGMZA.CloudDirectionsRenderer.maneuverToClassName(step.maneuver)),self.panel.append(div)}))}}),jQuery(function($){WPGMZA.CloudDirectionsService=function(map){WPGMZA.DirectionsService.apply(this,arguments)},WPGMZA.extend(WPGMZA.CloudDirectionsService,WPGMZA.DirectionsService),WPGMZA.CloudDirectionsService.prototype.route=function(request,callback){WPGMZA.cloudAPI.call("/directions",{data:request,success:function(response,status,xhr){for(var key in request)response[key]=request[key];callback(response)}})}}),jQuery(function($){WPGMZA.CloudGeocoder=function(){},WPGMZA.CloudGeocoder.SUCCESS="success",WPGMZA.CloudGeocoder.prototype.geocode=function(options,callback){WPGMZA.cloudAPI.call("/geocode",{data:options,success:function(results,status){results?(results.forEach(function(result){result.geometry.location=new google.maps.LatLng(result.geometry.location.lat,result.geometry.location.lng)}),0==results.length&&(status=WPGMZA.Geocoder.ZERO_RESULTS),callback(results,status)):callback(results,WPGMZA.GeocoderStatus.FAIL)}})}}),jQuery(function($){WPGMZA.GoogleDirectionsRenderer=function(map){WPGMZA.DirectionsRenderer.apply(this,arguments),this.map=map,this.googleDirectionsDisplay=new google.maps.DirectionsRenderer({map:map.googleMap,preserveViewport:!0,draggable:!0,suppressMarkers:!0}),this.googleDirectionsDisplay.setPanel($("#directions_panel_"+map.id)[0])},WPGMZA.extend(WPGMZA.GoogleDirectionsRenderer,WPGMZA.DirectionsRenderer),WPGMZA.GoogleDirectionsRenderer.prototype.setDirections=function(directions){this.googleDirectionsDisplay.setDirections(directions.originalResponse),directions.routes&&directions.routes[0]&&directions.routes[0].legs&&directions.routes[0].legs[0]&&(this.directionLeg=directions.routes[0].legs[0],this.directionStartMarker=WPGMZA.Marker.createInstance({position:new WPGMZA.LatLng(this.directionLeg.start_location.lat(),this.directionLeg.start_location.lng()),icon:this.map.settings.directions_route_origin_icon||"",retina:this.map.settings.directions_origin_retina,disableInfoWindow:!0}),this.directionStartMarker._icon.retina=this.directionStartMarker.retina,this.map.addMarker(this.directionStartMarker),this.directionEndMarker=WPGMZA.Marker.createInstance({position:new WPGMZA.LatLng(this.directionLeg.end_location.lat(),this.directionLeg.end_location.lng()),icon:this.map.settings.directions_route_destination_icon||"",retina:this.map.settings.directions_destination_retina,disableInfoWindow:!0}),this.directionEndMarker._icon.retina=this.directionEndMarker.retina,this.map.addMarker(this.directionEndMarker));directions={polylineOptions:{strokeColor:"#4285F4"}};this.map.settings.directions_route_stroke_color&&(directions.polylineOptions.strokeColor=this.map.settings.directions_route_stroke_color),this.map.settings.directions_route_stroke_weight&&(directions.polylineOptions.strokeWeight=parseFloat(this.map.settings.directions_route_stroke_weight)),this.map.settings.directions_route_stroke_opacity&&(directions.polylineOptions.strokeOpacity=parseFloat(this.map.settings.directions_route_stroke_opacity)),this.googleDirectionsDisplay.setMap(this.map.googleMap),this.googleDirectionsDisplay.setOptions(directions),this.map.settings.directions_fit_bounds_to_route&&this.directionStartMarker&&this.directionEndMarker&&this.fitBoundsToRoute(this.directionStartMarker.getPosition(),this.directionEndMarker.getPosition())},WPGMZA.GoogleDirectionsRenderer.prototype.clear=function(){this.googleDirectionsDisplay.setMap(null),this.directionStartMarker&&(this.map.removeMarker(this.directionStartMarker),this.directionStartMarker=null),this.directionEndMarker&&(this.map.removeMarker(this.directionEndMarker),this.directionEndMarker=null)}}),jQuery(function($){WPGMZA.GoogleDirectionsService=function(map){WPGMZA.DirectionsService.apply(this,arguments),WPGMZA.CloudAPI.isBeingUsed?this.googleDirectionsService=new WPGMZA.CloudDirectionsService:this.googleDirectionsService=new google.maps.DirectionsService},WPGMZA.extend(WPGMZA.GoogleDirectionsService,WPGMZA.DirectionsService),WPGMZA.GoogleDirectionsService.prototype.route=function(request,callback){var self=this;request.travelMode=request.travelMode.toUpperCase(),request.unitSystem===WPGMZA.Distance.KILOMETERS?request.unitSystem=google.maps.UnitSystem.METRIC:request.unitSystem=google.maps.UnitSystem.IMPERIAL,this.googleDirectionsService.route(request,function(response){var status;switch(response.originalResponse=$.extend({},response),response.status){case google.maps.DirectionsStatus.OK:status=WPGMZA.DirectionsService.SUCCESS;break;case google.maps.DirectionsStatus.ZERO_RESULTS:status=WPGMZA.DirectionsService.ZERO_RESULTS;break;case google.maps.DirectionsStatus.NOT_FOUND:status=WPGMZA.DirectionsService.NOT_FOUND;break;default:return void console.warn("Failed to get directions from Google: "+response.status)}callback(response,status);var event=new WPGMZA.Event({type:"directionsserviceresult",response:response,status:status});self.map.trigger(event)})}}),jQuery(function($){WPGMZA.GoogleHeatmap=function(options){WPGMZA.Heatmap.call(this,options),google.maps.visualization?(this.googleHeatmap=new google.maps.visualization.HeatmapLayer,this.googleFeature=this.googleHeatmap,this.updateGoogleHeatmap()):console.warn("Heatmaps disabled. You must include the visualization library in the Google Maps API")},WPGMZA.GoogleHeatmap.prototype=Object.create(WPGMZA.Heatmap.prototype),WPGMZA.GoogleHeatmap.prototype.constructor=WPGMZA.GoogleHeatmap,WPGMZA.GoogleHeatmap.prototype.updateGoogleHeatmap=function(){for(var points=this.parseGeometry(this.dataset),len=points.length,data=[],i=0;i<len;i++)data.push(new google.maps.LatLng(parseFloat(points[i].lat),parseFloat(points[i].lng)));this.googleHeatmap.setData(data),this.gradient&&this.googleHeatmap.set("gradient",this.gradient),this.radius&&this.googleHeatmap.set("radius",parseFloat(this.radius)),this.heatmap_radius&&this.googleHeatmap.set("radius",parseFloat(this.heatmap_radius)),this.opacity&&this.googleHeatmap.set("opacity",parseFloat(this.opacity)),this.heatmap_opacity&&this.googleHeatmap.set("opacity",parseFloat(this.heatmap_opacity)),this.map&&!this.googleHeatmap.getMap()&&this.googleHeatmap.setMap(this.map.googleMap)},WPGMZA.GoogleHeatmap.prototype.update=function(){this.updateGoogleHeatmap()},WPGMZA.GoogleHeatmap.prototype.updateDatasetFromMarkers=function(){WPGMZA.Heatmap.prototype.updateDatasetFromMarkers.apply(this,arguments),this.updateGoogleHeatmap()},WPGMZA.GoogleHeatmap.prototype.onMapMouseDown=function(event){2==event.button&&this.map.googleMap.setOptions({draggable:!1}),WPGMZA.Heatmap.prototype.onMapMouseDown.apply(this,arguments)},WPGMZA.GoogleHeatmap.prototype.onWindowMouseUp=function(event){2==event.button&&this.map.googleMap.setOptions({draggable:!0}),WPGMZA.Heatmap.prototype.onWindowMouseUp.apply(this,arguments)}}),jQuery(function($){WPGMZA.GoogleImageoverlay=function(options,googleImageoverlay){options=options||{},WPGMZA.Imageoverlay.call(this,options,googleImageoverlay),googleImageoverlay&&googleImageoverlay.googleRectangle?(this.googleRectangle=googleImageoverlay.googleRectangle,this.googleRectangle instanceof WPGMZA.Rectangle&&(this.googleRectangle=this.googleRectangle.googleRectangle),this.cornerA=options.cornerA=new WPGMZA.LatLng({lat:this.googleRectangle.getBounds().getNorthEast().lat(),lng:this.googleRectangle.getBounds().getSouthWest().lng()}),this.cornerB=options.cornerB=new WPGMZA.LatLng({lat:this.googleRectangle.getBounds().getSouthWest().lat(),lng:this.googleRectangle.getBounds().getNorthEast().lng()})):(this.googleRectangle=new google.maps.Rectangle,this.cornerA instanceof WPGMZA.LatLng||(this.cornerA=new WPGMZA.LatLng(this.cornerA)),this.cornerB instanceof WPGMZA.LatLng||(this.cornerB=new WPGMZA.LatLng(this.cornerB)),this.setBounds(this.cornerA,this.cornerB)),this.googleImageoverlay=new google.maps.GroundOverlay,(this.googleImageoverlay.wpgmzaImageoverlay=this).googleFeature=this.googleImageoverlay,options&&this.setOptions(options)},WPGMZA.GoogleImageoverlay.prototype=Object.create(WPGMZA.Imageoverlay.prototype),WPGMZA.GoogleImageoverlay.prototype.constructor=WPGMZA.GoogleImageoverlay,WPGMZA.GoogleImageoverlay.prototype.getBounds=function(){return WPGMZA.LatLngBounds.fromGoogleLatLngBounds(this.googleRectangle.getBounds())},WPGMZA.GoogleImageoverlay.prototype.setBounds=function(cornerA,cornerB){this.googleRectangle&&(this.cornerA=cornerA,this.cornerB=cornerB,this.googleRectangle.setOptions({bounds:{north:parseFloat(this.cornerA.lat),west:parseFloat(this.cornerA.lng),south:parseFloat(this.cornerB.lat),east:parseFloat(this.cornerB.lng)}}))},WPGMZA.GoogleImageoverlay.prototype.setOptions=function(options){WPGMZA.Imageoverlay.prototype.setOptions.apply(this,arguments),options.cornerA&&options.cornerB&&(this.cornerA=new WPGMZA.LatLng(options.cornerA),this.cornerB=new WPGMZA.LatLng(options.cornerB))},WPGMZA.GoogleImageoverlay.prototype.setEditable=function(value){var self=this;this.googleRectangle.setEditable(!!value),this.googleRectangle.setDraggable(!!value),this.googleRectangle.setMap(this.map?this.map.googleMap:null),value&&google.maps.event.addListener(this.googleRectangle,"bounds_changed",function(event){self.cornerA=new WPGMZA.LatLng({lat:self.googleRectangle.getBounds().getNorthEast().lat(),lng:self.googleRectangle.getBounds().getSouthWest().lng()}),self.cornerB=new WPGMZA.LatLng({lat:self.googleRectangle.getBounds().getSouthWest().lat(),lng:self.googleRectangle.getBounds().getNorthEast().lng()}),self.trigger("change")})},WPGMZA.GoogleImageoverlay.prototype.updateNativeFeature=function(){this.getScalarProperties();var bounds=this.getBounds();bounds.north&&bounds.west&&bounds.south&&bounds.east&&(bounds={bounds:{north:bounds.north,west:bounds.west,south:bounds.south,east:bounds.east},visible:this.googleRectangle.getEditable(),strokeColor:"#000000",strokeOpacity:.8,fillOpacity:0,strokeWeight:1},this.googleRectangle.setOptions(bounds)),this.redraw()},WPGMZA.GoogleImageoverlay.prototype.redraw=function(){WPGMZA.Imageoverlay.prototype.redraw.apply(this,arguments);this.getScalarProperties();var url,bounds=this.getBounds();bounds.north&&bounds.west&&bounds.south&&bounds.east&&(bounds={north:bounds.north,west:bounds.west,south:bounds.south,east:bounds.east},url=this.image)&&(this.googleImageoverlay&&this.googleImageoverlay.setMap(null),this.googleImageoverlay=new google.maps.GroundOverlay(url,bounds),this.googleImageoverlay.setOpacity(this.opacity),this.googleImageoverlay.setMap(this.map?this.map.googleMap:null),(this.googleImageoverlay.wpgmzaImageoverlay=this).googleFeature=this.googleImageoverlay)},WPGMZA.GoogleImageoverlay.prototype.destroy=function(){WPGMZA.Imageoverlay.prototype.destroy.apply(this,arguments),this.googleImageoverlay&&this.googleImageoverlay.setMap(null)}}),jQuery(function($){WPGMZA.GoogleProCircle=function(options,googleCircle){var self=this;WPGMZA.GoogleCircle.call(this,options,googleCircle),google.maps.event.addListener(this.googleCircle,"mouseover",function(event){self.trigger("mouseover")}),google.maps.event.addListener(this.googleCircle,"mouseout",function(event){self.trigger("mouseout")})},WPGMZA.GoogleProCircle.prototype=Object.create(WPGMZA.GoogleCircle.prototype),WPGMZA.GoogleProCircle.prototype.constructor=WPGMZA.GoogleProCircle}),jQuery(function($){WPGMZA.GoogleProDrawingManager=function(map){WPGMZA.ProDrawingManager.apply(this,arguments)},WPGMZA.extend(WPGMZA.GoogleProDrawingManager,WPGMZA.ProDrawingManager)}),jQuery(function($){WPGMZA.GoogleProInfoWindow=function(feature){WPGMZA.GoogleInfoWindow.call(this,feature)},WPGMZA.GoogleProInfoWindow.prototype=Object.create(WPGMZA.GoogleInfoWindow.prototype),WPGMZA.GoogleProInfoWindow.prototype.constructor=WPGMZA.GoogleProInfoWindow,WPGMZA.GoogleProInfoWindow.prototype.open=function(map,feature){switch(this.feature=feature,"map-edit"==WPGMZA.currentPage?WPGMZA.ProInfoWindow.STYLE_NATIVE_GOOGLE:this.style){case WPGMZA.ProInfoWindow.STYLE_MODERN:case WPGMZA.ProInfoWindow.STYLE_MODERN_PLUS:case WPGMZA.ProInfoWindow.STYLE_MODERN_CIRCULAR:case WPGMZA.ProInfoWindow.STYLE_TEMPLATE:return WPGMZA.ProInfoWindow.prototype.open.call(this,map,feature);default:var result=WPGMZA.GoogleInfoWindow.prototype.open.call(this,map,feature);return this.maxWidth&&this.googleInfoWindow&&this.googleInfoWindow.setOptions({maxWidth:this.maxWidth}),result}},WPGMZA.GoogleProInfoWindow.prototype.setPosition=function(position){this.googleInfoWindow&&this.googleInfoWindow.setPosition(position.toGoogleLatLng())}}),jQuery(function($){WPGMZA.GoogleProMap=function(element,options){WPGMZA.GoogleMap.call(this,element,options),this.loadKMLLayers(),this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}),$(this.element).trigger("wpgooglemaps_loaded")},WPGMZA.GoogleProMap.prototype=Object.create(WPGMZA.GoogleMap.prototype),WPGMZA.GoogleProMap.prototype.constructor=WPGMZA.GoogleProMap.prototype,WPGMZA.GoogleProMap.prototype.addHeatmap=function(heatmap){heatmap.googleHeatmap.setMap(this.googleMap),WPGMZA.ProMap.prototype.addHeatmap.call(this,heatmap)},WPGMZA.GoogleProMap.prototype.loadKMLLayers=function(){if(this.kmlLayers)for(var i=0;i<this.kmlLayers.length;i++)this.kmlLayers[i].setMap(null);if(this.kmlLayers=[],this.settings.kml)for(var urls=this.settings.kml.split(","),cachebuster=(new Date).getTime(),i=0;i<urls.length;i++)this.kmlLayers.push(new google.maps.KmlLayer(urls[i]+"?cachebuster="+cachebuster,{map:this.googleMap,preserveViewport:!0}))},WPGMZA.GoogleProMap.prototype.loadFusionTableLayer=function(){this.settings.fusion&&(console.warn("Fusion Table Layers are deprecated and will cease functioning from 2019/12/03"),this.fusionLayer=new google.maps.FusionTablesLayer(this.settings.fusion,{map:this.googleMap,surpressInfoWindows:!0}))},WPGMZA.GoogleProMap.prototype.setStreetView=function(options){var latLng=this.getCenter();"marker"in(options=options||{bearing:0,pitch:10})&&(marker=this.getMarkerByID(options.marker))?latLng=marker.getPosition().toLatLngLiteral():"lat"in options&&"lng"in options&&(latLng={lat:parseFloat(options.lat),lng:parseFloat(options.lng)}),"bearing"in options&&(options.bearing=parseInt(options.bearing),isNaN(options.bearing))&&console.warn("Invalid bearing"),"pitch"in options&&(options.pitch=parseInt(options.pitch),isNaN(options.pitch))&&console.warn("Invalid pitch"),this.panorama=new google.maps.StreetViewPanorama(this.element,{position:latLng,pov:{heading:parseInt(options.bearing),pitch:parseInt(options.pitch)}})},WPGMZA.GoogleProMap.prototype.onInit=function(event){WPGMZA.GoogleMap.prototype.onInit.call(this,event),this.shortcodeAttributes.streetview&&!this.shortcodeAttributes.marker&&this.setStreetView(this.shortcodeAttributes)},WPGMZA.GoogleProMap.prototype.onMarkersPlaced=function(event){WPGMZA.GoogleMap.prototype.onMarkersPlaced.call(this,event),this.shortcodeAttributes.streetview&&this.shortcodeAttributes.marker&&this.setStreetView(this.shortcodeAttributes)}}),jQuery(function($){WPGMZA.GoogleProMarker=function(row){WPGMZA.GoogleMarker.call(this,row)},WPGMZA.GoogleProMarker.prototype=Object.create(WPGMZA.GoogleMarker.prototype),WPGMZA.GoogleProMarker.prototype.constructor=WPGMZA.GoogleProMarker,WPGMZA.GoogleProMarker.prototype.onAdded=function(event){WPGMZA.GoogleMarker.prototype.onAdded.apply(this,arguments),this.map.settings.wpgmza_settings_disable_infowindows&&this.googleMarker.setOptions({clickable:!1})},WPGMZA.GoogleProMarker.prototype.updateIcon=function(){var img,self=this,icon=this._icon;icon.retina?((img=new Image).onload=function(event){var size=new google.maps.Size(WPGMZA.settings.retinaWidth?parseInt(WPGMZA.settings.retinaWidth):Math.round(img.width/2),WPGMZA.settings.retinaHeight?parseInt(WPGMZA.settings.retinaHeight):Math.round(img.height/2));self.googleMarker.setIcon(new google.maps.MarkerImage(icon.url,null,null,null,size))},img.src=icon.isDefault?WPGMZA.defaultMarkerIcon:icon.url):this.googleMarker.setIcon(icon.url)}}),jQuery(function($){var Parent=WPGMZA.GooglePointlabel;WPGMZA.GoogleProPointlabel=function(options,pointFeature){Parent.call(this,options,pointFeature)},WPGMZA.extend(WPGMZA.GoogleProPointlabel,Parent),WPGMZA.GoogleProPointlabel.prototype.setOptions=function(options){Parent.prototype.setOptions.apply(this,arguments),options.fontSize&&this.textFeature.setFontSize(options.fontSize),options.fillColor&&this.textFeature.setFillColor(options.fillColor),options.lineColor&&this.textFeature.setLineColor(options.lineColor),options.opacity&&this.textFeature.setOpacity(options.opacity)}}),jQuery(function($){WPGMZA.GoogleProPolygon=function(row,googlePolygon){var self=this;WPGMZA.GooglePolygon.call(this,row,googlePolygon),google.maps.event.addListener(this.googlePolygon,"mouseover",function(event){self.trigger("mouseover")}),google.maps.event.addListener(this.googlePolygon,"mouseout",function(event){self.trigger("mouseout")})},WPGMZA.GoogleProPolygon.prototype=Object.create(WPGMZA.GooglePolygon.prototype),WPGMZA.GoogleProPolygon.prototype.constructor=WPGMZA.GoogleProPolygon}),jQuery(function($){WPGMZA.GoogleProRectangle=function(options,googleRectangle){var self=this;WPGMZA.GoogleRectangle.call(this,options,googleRectangle),google.maps.event.addListener(this.googleRectangle,"mouseover",function(event){self.trigger("mouseover")}),google.maps.event.addListener(this.googleRectangle,"mouseout",function(event){self.trigger("mouseout")})},WPGMZA.GoogleProRectangle.prototype=Object.create(WPGMZA.GoogleRectangle.prototype),WPGMZA.GoogleProRectangle.prototype.constructor=WPGMZA.GoogleProRectangle}),jQuery(function($){WPGMZA.HeatmapPanel=function(element,mapEditPage){WPGMZA.FeaturePanel.apply(this,arguments)},WPGMZA.extend(WPGMZA.HeatmapPanel,WPGMZA.FeaturePanel),WPGMZA.HeatmapPanel.createInstance=function(element,mapEditPage){return new WPGMZA.HeatmapPanel(element,mapEditPage)},WPGMZA.HeatmapPanel.prototype.reset=function(event){WPGMZA.FeaturePanel.prototype.reset.apply(this,arguments),$(this.element).find("[data-ajax-name='gradient']").prop("checked",!1),$($(this.element).find("[data-ajax-name='gradient']")[0]).prop("checked",!0)},WPGMZA.HeatmapPanel.prototype.populate=function(data){var str;WPGMZA.FeaturePanel.prototype.populate.apply(this,arguments),data.gradient&&(str=JSON.stringify(JSON.parse(data.gradient)),$(this.element).find("input[data-ajax-name='gradient']").each(function(index,el){var compare=JSON.stringify(JSON.parse($(el).val()));if(str==compare)return $(el).prop("checked",!0),!1}))},WPGMZA.HeatmapPanel.prototype.onPropertyChanged=function(event){var name;this.drawingManager.mode==WPGMZA.DrawingManager.MODE_HEATMAP?this.drawingManager.onHeatmapPropertyChanged(event):this.feature&&(name=$(event.target).attr("data-ajax-name"),event=$(event.target).val(),"gradient"===name&&(event=JSON.parse(event)),this.feature[name]=event,this.feature.update())},WPGMZA.HeatmapPanel.prototype.onFeatureChanged=function(event){var geometryField=$(this.element).find("[data-ajax-name='dataset']");geometryField.length&&geometryField.val(JSON.stringify(this.feature.getGeometry()))}}),jQuery(function($){WPGMZA.ImageoverlayPanel=function(element,mapEditPage){var self=this;WPGMZA.FeaturePanel.apply(this,arguments),this.placementOptions={},$(this.element).find('input[data-ajax-name="image"]').on("imagechange",function(event){self.onImageChange()}),$(this.element).find("button[data-placement]").on("click",function(event){event.preventDefault();event=$(this).data("placement");self.onImagePlacementChange(event)})},WPGMZA.extend(WPGMZA.ImageoverlayPanel,WPGMZA.FeaturePanel),WPGMZA.ImageoverlayPanel.createInstance=function(element,mapEditPage){return new WPGMZA.ImageoverlayPanel(element,mapEditPage)},WPGMZA.ImageoverlayPanel.prototype.updateFields=function(){var bounds=this.feature.getBounds();bounds.north&&bounds.west&&bounds.south&&bounds.east&&($(this.element).find("[data-ajax-name='cornerA']").val(bounds.north+", "+bounds.west),$(this.element).find("[data-ajax-name='cornerB']").val(bounds.south+", "+bounds.east))},WPGMZA.ImageoverlayPanel.prototype.setTargetFeature=function(feature){WPGMZA.FeaturePanel.prototype.setTargetFeature.apply(this,arguments),feature&&this.updateFields(),this.updateOverlayControlBar()},WPGMZA.ImageoverlayPanel.prototype.onDrawingComplete=function(event){WPGMZA.FeaturePanel.prototype.onDrawingComplete.apply(this,arguments),this.updateFields()},WPGMZA.ImageoverlayPanel.prototype.onFeatureChanged=function(event){WPGMZA.FeaturePanel.prototype.onFeatureChanged.apply(this,arguments),this.updateFields()},WPGMZA.ImageoverlayPanel.prototype.onImageChange=function(){try{var predictedRect,predictImageoverlay;this.feature||0<$(this.element).find("[data-ajax-name='image']").val().length&&(this.predictPlacement(),this.placementOptions)&&this.placementOptions.contain&&(predictedRect=new WPGMZA.Rectangle.createInstance({cornerA:new WPGMZA.LatLng(this.placementOptions.contain.topLeft),cornerB:new WPGMZA.LatLng(this.placementOptions.contain.bottomRight)}),predictImageoverlay=WPGMZA.Imageoverlay.createInstance({},predictedRect),this.onDrawingComplete({engineImageoverlay:predictImageoverlay}))}catch(exception){}this.updateOverlayControlBar()},WPGMZA.ImageoverlayPanel.prototype.onImagePlacementChange=function(placement){this.feature&&(this.predictPlacement(),this.placementOptions)&&this.placementOptions[placement]&&this.feature.setBounds(new WPGMZA.LatLng(this.placementOptions[placement].topLeft),new WPGMZA.LatLng(this.placementOptions[placement].bottomRight))},WPGMZA.ImageoverlayPanel.prototype.predictPlacement=function(){this.placementOptions={};var imgRef=$(this.element).find(".wpgmza-image-single-input-wrapper img"),mapDimensions={width:$(this.map.element).width(),height:$(this.map.element).height(),xH:$(this.map.element).width()/2,yH:$(this.map.element).height()/2};const imgDimensions_width=parseFloat(imgRef.prop("naturalWidth")),imgDimensions_height=parseFloat(imgRef.prop("naturalHeight")),imgDimensions_xH=parseFloat(imgRef.prop("naturalWidth"))/2,imgDimensions_yH=parseFloat(imgRef.prop("naturalHeight"))/2;if(imgDimensions_width<mapDimensions.width&&imgDimensions_height<mapDimensions.height)this.placementOptions.contain={topLeft:this.map.pixelsToLatLng(mapDimensions.xH-imgDimensions_xH,mapDimensions.yH-imgDimensions_yH),bottomRight:this.map.pixelsToLatLng(mapDimensions.xH+imgDimensions_xH,mapDimensions.yH+imgDimensions_yH)};else if(imgDimensions_width<mapDimensions.width){imgRef=mapDimensions.height/imgDimensions_height;this.placementOptions.contain={topLeft:this.map.pixelsToLatLng(mapDimensions.xH-imgDimensions_xH*imgRef,0),bottomRight:this.map.pixelsToLatLng(mapDimensions.xH+imgDimensions_xH*imgRef,mapDimensions.height)}}else{let multi=mapDimensions.width/imgDimensions_width;this.placementOptions.contain={topLeft:this.map.pixelsToLatLng(0,mapDimensions.yH-imgDimensions_yH*multi),bottomRight:this.map.pixelsToLatLng(mapDimensions.width,mapDimensions.yH+imgDimensions_yH*multi)}}this.placementOptions.stretch={topLeft:this.map.pixelsToLatLng(0,0),bottomRight:this.map.pixelsToLatLng(mapDimensions.width,mapDimensions.height)}},WPGMZA.ImageoverlayPanel.prototype.updateOverlayControlBar=function(){this.feature&&this.feature.image?$(this.element).find(".overlay-actions").removeClass("wpgmza-hidden"):$(this.element).find(".overlay-actions").addClass("wpgmza-hidden")}}),jQuery(function($){WPGMZA.ProCirclePanel=function(element){WPGMZA.CirclePanel.apply(this,arguments),WPGMZA.InternalEngine.isLegacy()||(this.descriptionElement=$(this.element).find('[data-ajax-name="description"]'),this.initWritersBlock(this.descriptionElement.get(0)))},WPGMZA.extend(WPGMZA.ProCirclePanel,WPGMZA.CirclePanel),WPGMZA.ProCirclePanel.prototype.populate=function(data){for(var name in WPGMZA.CirclePanel.prototype.populate.apply(this,arguments),data)"description"!==name||WPGMZA.InternalEngine.isLegacy()||this.writersblock&&this.writersblock.ready&&this.writersblock.setContent(data.description)}}),jQuery(function($){WPGMZA.ProMarkerPanel=function(element){WPGMZA.MarkerPanel.apply(this,arguments),this.initWritersBlock("#wpgmza-description-editor"),this.initMarkerIconPicker(),this.initMarkerGalleryInput(),this.initCategoryPicker()},WPGMZA.extend(WPGMZA.ProMarkerPanel,WPGMZA.MarkerPanel),WPGMZA.ProMarkerPanel.prototype.initMarkerIconPicker=function(){this.markerIconPicker=new WPGMZA.MarkerIconPicker($(this.element).find(".wpgmza-marker-icon-picker-container .wpgmza-marker-icon-picker")),WPGMZA.InternalEngine.isLegacy()||(this.markerHoverIconPicker=new WPGMZA.MarkerIconPicker($(this.element).find(".wpgmza-marker-hover-icon-picker-container .wpgmza-marker-icon-picker")))},WPGMZA.ProMarkerPanel.prototype.initMarkerGalleryInput=function(){this.markerGalleryInput=new WPGMZA.MarkerGalleryInput($(this.element).find("input[data-ajax-name='gallery']"))},WPGMZA.ProMarkerPanel.prototype.initCategoryPicker=function(){this.categoryPicker=new WPGMZA.CategoryPicker($(this.element).find(".wpgmza-category-picker"))},WPGMZA.ProMarkerPanel.prototype.focusMapOnFeature=function(marker){this.map.panTo(marker.getPosition())},WPGMZA.ProMarkerPanel.prototype.reset=function(){WPGMZA.MarkerPanel.prototype.reset.apply(this,arguments),this.categoryPicker.setSelection(null),this.markerGalleryInput.clear(),this.markerIconPicker.reset(),WPGMZA.InternalEngine.isLegacy()||this.markerHoverIconPicker.reset()},WPGMZA.ProMarkerPanel.prototype.initDefaults=function(){var self=this,args=arguments;$(this.element).find(".wpgmza-category-picker").on("loaded.jstree",function(){WPGMZA.MarkerPanel.prototype.initDefaults.apply(self,args)})},WPGMZA.ProMarkerPanel.prototype.populate=function(data){for(var name in WPGMZA.FeaturePanel.prototype.populate.apply(this,arguments),data)switch(name){case"description":var tinyMCEInstance;WPGMZA.InternalEngine.isLegacy()?tinyMCE.get("wpgmza-description-editor")?(tinyMCEModeToggled=!1,(tinyMCEInstance=tinyMCE.get("wpgmza-description-editor")).isHidden()&&(tinyMCEInstance.show(),tinyMCEModeToggled=!0),tinyMCEInstance.setContent(data.description),tinyMCEModeToggled&&tinyMCEInstance.hide()):$("#wpgmza-description-editor").val(data.description):this.writersblock?($("#wpgmza-description-editor").val(data.description),this.writersblock.ready&&this.writersblock.setContent(data.description)):$("#wpgmza-description-editor").val(data.description);break;case"icon":var tinyMCEModeToggled;this.markerIconPicker.setIcon(data.icon),data.icon.hover_url&&!WPGMZA.InternalEngine.isLegacy()&&(tinyMCEModeToggled={url:data.icon.hover_url,retina:!!data.icon.hover_retina},this.markerHoverIconPicker.setIcon(tinyMCEModeToggled),tinyMCEModeToggled.retina?$(this.markerHoverIconPicker.element).find('input[data-ajax-name="hover_retina"]').prop("checked",!0):$(this.markerHoverIconPicker.element).find('input[data-ajax-name="hover_retina"]').prop("checked",!1));break;case"categories":this.categoryPicker.setSelection(data.categories);break;case"gallery":data.gallery&&this.markerGalleryInput.populate(data.gallery);break;case"custom_field_data":data.custom_field_data.forEach(function(field){$("fieldset[data-custom-field-id='"+field.id+"'] input[data-ajax-name]").val(field.value)})}!data.pic||!data.pic.length||data.gallery&&data.gallery.length||this.markerGalleryInput.addPicture({url:data.pic})},WPGMZA.ProMarkerPanel.prototype.serializeFormData=function(){var data=WPGMZA.MarkerPanel.prototype.serializeFormData.apply(this,arguments);return WPGMZA.InternalEngine.isLegacy()&&(0<$("#wpgmza-description-editor-tmce").length&&$("#wpgmza-description-editor-tmce").click(),tinyMCE.get("wpgmza-description-editor"))?data.description=tinyMCE.get("wpgmza-description-editor").getContent():data.description=$("#wpgmza-description-editor").val(),data.gallery=this.markerGalleryInput.toJSON(),data},WPGMZA.ProMarkerPanel.prototype.onSave=function(event){var addressUnchanged,self=this,address=$(this.element).find("[data-ajax-name='address']").val();0==address.length?alert(WPGMZA.localized_strings.no_address_specified):(this.showPreloader(!0),addressUnchanged=!this.hasDirtyField("address"),this.adjustSubMode||addressUnchanged?WPGMZA.FeaturePanel.prototype.onSave.apply(self,arguments):WPGMZA.Geocoder.createInstance().geocode({address:address},function(results,status){switch(status){case WPGMZA.Geocoder.SUCCESS:var latLng=results[0].latLng;$(self.element).find("[data-ajax-name='lat']").val(latLng.lat),$(self.element).find("[data-ajax-name='lng']").val(latLng.lng),WPGMZA.FeaturePanel.prototype.onSave.apply(self,arguments);break;case WPGMZA.Geocoder.ZERO_RESULTS:alert(WPGMZA.localized_strings.zero_results),self.showPreloader(!1);break;default:alert(WPGMZA.localized_strings.geocode_fail),self.showPreloader(!1)}}))}}),jQuery(function($){WPGMZA.ProPolygonPanel=function(element){WPGMZA.PolygonPanel.apply(this,arguments),WPGMZA.InternalEngine.isLegacy()||(this.descriptionElement=$(this.element).find('[data-ajax-name="description"]'),this.initWritersBlock(this.descriptionElement.get(0)))},WPGMZA.extend(WPGMZA.ProPolygonPanel,WPGMZA.PolygonPanel),WPGMZA.ProPolygonPanel.prototype.populate=function(data){for(var name in WPGMZA.PolygonPanel.prototype.populate.apply(this,arguments),data)"description"!==name||WPGMZA.InternalEngine.isLegacy()||this.writersblock&&this.writersblock.ready&&this.writersblock.setContent(data.description)}}),jQuery(function($){WPGMZA.ProPolylinePanel=function(element){WPGMZA.PolylinePanel.apply(this,arguments)},WPGMZA.extend(WPGMZA.ProPolylinePanel,WPGMZA.PolylinePanel)}),jQuery(function($){WPGMZA.ProRectanglePanel=function(element){WPGMZA.RectanglePanel.apply(this,arguments),WPGMZA.InternalEngine.isLegacy()||(this.descriptionElement=$(this.element).find('[data-ajax-name="description"]'),this.initWritersBlock(this.descriptionElement.get(0)))},WPGMZA.extend(WPGMZA.ProRectanglePanel,WPGMZA.RectanglePanel),WPGMZA.ProRectanglePanel.prototype.populate=function(data){for(var name in WPGMZA.RectanglePanel.prototype.populate.apply(this,arguments),data)"description"!==name||WPGMZA.InternalEngine.isLegacy()||this.writersblock&&this.writersblock.ready&&this.writersblock.setContent(data.description)}}),jQuery(function($){WPGMZA.AdvancedTableDataTable=function(element,listing){var self=this;this.element=element,this.listing=listing,WPGMZA.DataTable.apply(this,arguments),this.overrideListingOrderSettings=!1,$(this.dataTableElement).on("click","th",function(event){self.onUserChangedOrder(event)})},WPGMZA.AdvancedTableDataTable.prototype=Object.create(WPGMZA.DataTable.prototype),WPGMZA.AdvancedTableDataTable.prototype.constructor=WPGMZA.AdvancedTableDataTable,WPGMZA.AdvancedTableDataTable.prototype.getDataTableSettings=function(){var start,string_of,string_to,total,show,entries,self=this,options=WPGMZA.DataTable.prototype.getDataTableSettings.apply(this,arguments),json=((json=$(this.element).attr("data-order-json"))&&(options.order=JSON.parse(json)),options.drawCallback=function(settings){var ths=$(self.element).find(".wpgmza_table > thead th");self.lastResponse&&self.lastResponse.meta&&(0!=self.lastResponse.meta.length&&(self.listing.map.settings.dataTable_pagination_style&&"hidden"===self.listing.map.settings.dataTable_pagination_style&&$(self.element).find(".dataTables_paginate").addClass("wpgmza-hidden"),$(self.element).find(".wpgmza_table > tbody > tr").each(function(index,tr){index=self.lastResponse.meta[index];$(tr).addClass("wpgmaps_mlist_row"),$(tr).attr("mid",index.id),$(tr).attr("mapid",self.map.id),$(tr).children("td").each(function(col,td){col=ths[col].className.match(/wpgmza_\w+/)[0];$(td).addClass(col)})}),$(self.element).find("[data-marker-icon-src]").each(function(index,el){var data,src=$(el).attr("data-marker-icon-src");try{data=JSON.parse(src)}catch(e){data=src}WPGMZA.MarkerIcon.createInstance(data).applyToElement(el)})),self.map.markerListing.trigger("markerlistingupdated"))},options.language={},this.getLanguageURL());switch(json&&(options.language={url:json}),""!=this.listing.map.settings.datatable_no_result_message&&(json=this.listing.map.settings.datatable_no_result_message,options.language.zeroRecords=json),1==this.listing.map.settings.remove_search_box_datables&&(options.searching=!1),this.listing.map.settings.dataTable_pagination_style){case"page-number-buttons-only":options.pagingType="numbers";break;case"prev-and-next-buttons-only":options.pagingType="simple";break;case"prev-and-next-buttons-plus-page-numbers":options.pagingType="simple_numbers";break;case"first-prev-next-and-last-buttons":options.pagingType="full";break;case"first-prev-next-and-last-buttons-plus-page-numbers":options.pagingType="full_numbers";break;case"first-and-last-buttons-plus-page-numbers":options.pagingType="fist_last_numbers"}return""!=this.listing.map.settings.datatable_search_string&&(json=this.listing.map.settings.datatable_search_string,options.language.search=json),this.listing.map.settings.datatable_result&&(""!=this.listing.map.settings.datatable_result_start&&(start=this.listing.map.settings.datatable_result_start),""!=this.listing.map.settings.datatable_result_of&&(string_of=this.listing.map.settings.datatable_result_of),""!=this.listing.map.settings.datatable_result_to&&(string_to=this.listing.map.settings.datatable_result_to),""!=this.listing.map.settings.datatable_result_total&&(total=this.listing.map.settings.datatable_result_total),options.language.sInfo=start+" _START_ "+string_of+" _END_ "+string_to+" _TOTAL_ "+total),this.listing.map.settings.datatable_result_page&&(""!=this.listing.map.settings.datatable_result_show&&(show=this.listing.map.settings.datatable_result_show),""!=this.listing.map.settings.datatable_result_to&&(entries=this.listing.map.settings.datatable_result_entries),options.language.sLengthMenu=show+" _MENU_ "+entries),options},WPGMZA.AdvancedTableDataTable.prototype.onAJAXRequest=function(data,settings){var listingParams=this.listing.getAJAXRequestParameters().data,listingFilteringParams=listingParams.filteringParams;listingParams.overrideMarkerIDs;return delete listingParams.filteringParams,delete listingParams.overrideMarkerIDs,(listingParams=$.extend({},listingParams,WPGMZA.DataTable.prototype.onAJAXRequest.apply(this,arguments))).filteringParams=$.extend({},listingFilteringParams,this.filteringParams),this.filteredMarkerIDs&&(listingParams.markerIDs=this.filteredMarkerIDs.join(",")),void 0!==this.overrideListingOrderSettings&&(listingParams.overrideListingOrderSettings=this.overrideListingOrderSettings),listingParams},WPGMZA.AdvancedTableDataTable.prototype.getLanguageURL=function(){return WPGMZA.DataTable.prototype.getLanguageURL.apply(this,arguments)},WPGMZA.AdvancedTableDataTable.prototype.onMarkerFilterFilteringComplete=function(event){var self=this;this.filteredMarkerIDs=[],event.filteredMarkers.forEach(function(data){self.filteredMarkerIDs.push(data.id)}),self.filteringParams=event.filteringParams},WPGMZA.AdvancedTableDataTable.prototype.onUserChangedOrder=function(event){this.overrideListingOrderSettings=!0}}),jQuery(function($){WPGMZA.MarkerListing=function(map,element,options){var self=this;if(WPGMZA.EventDispatcher.apply(this),this._paginationEnabled=!0,this.map=this.parent=map,this.element=element,this.element?this.element.wpgmzaMarkerListing=this:WPGMZA.isDeveloperMode()&&console.warn("Marker listing initialised with null element. This is presently supported to allow the marker listing category filter to still function, however this will be removed in the future."),options)for(var key in options)this[key]=options[key];this.categoryDropdown=$(".wpgmza-marker-listing-category-filter[data-map-id='"+this.map.id+"'] select"),$(this.categoryDropdown).closest(".wpgmza-store-locator").length||this.categoryDropdown.on("change",function(event){(self.isCapsule?self.map:WPGMZA.getMapByID(self.map.id)).markerFilter.update()}),this.categoryCheckboxes=$(".wpgmza-marker-listing-category-filter[data-map-id='"+this.map.id+"'] input[type='checkbox']"),this.categoryCheckboxes.on("change",function(event){WPGMZA.getMapByID(self.map.id).markerFilter.update()}),1==map.settings.wpgmza_store_locator_hide_before_search&&(this.showOnFilteringComplete=!0,$(this.element).hide()),WPGMZA.InternalEngine.isLegacy()&&(void 0!==map.settings.push_in_map&&void 0===map.settings.wpgmza_push_in_map&&(map.settings.wpgmza_push_in_map=map.settings.push_in_map,map.settings.wpgmza_push_in_map_placement=map.settings.push_in_map_placement),map.settings.wpgmza_push_in_map)&&this.pushIntoMap(),$(this.element).on("click",".wpgmaps_mlist_row, .wpgmaps_blist_row",function(event){self.onItemClick(event)}),$(document.body).on("filteringcomplete.wpgmza",function(event){event.map.id==self.map.id&&self.onFilteringComplete(event)}),this.reload()},WPGMZA.extend(WPGMZA.MarkerListing,WPGMZA.EventDispatcher),WPGMZA.MarkerListing.createInstance=function(map,element,options){switch(void 0!==map.settings.list_markers_by&&void 0===map.settings.wpgmza_listmarkers_by&&(map.settings.wpgmza_listmarkers_by=parseInt(map.settings.list_markers_by)),map.settings.wpgmza_listmarkers_by){case WPGMZA.MarkerListing.STYLE_ADVANCED_TABLE:return new WPGMZA.AdvancedTableMarkerListing(map,element,options);case WPGMZA.MarkerListing.STYLE_CAROUSEL:return new WPGMZA.CarouselMarkerListing(map,element,options);case WPGMZA.MarkerListing.STYLE_MODERN:return new WPGMZA.ModernMarkerListing(map,element,options);default:return new WPGMZA.MarkerListing(map,element,options)}},WPGMZA.MarkerListing.STYLE_NONE=0,WPGMZA.MarkerListing.STYLE_BASIC_TABLE=1,WPGMZA.MarkerListing.STYLE_BASIC_LIST=4,WPGMZA.MarkerListing.STYLE_ADVANCED_TABLE=2,WPGMZA.MarkerListing.STYLE_CAROUSEL=3,WPGMZA.MarkerListing.STYLE_MODERN=6,WPGMZA.MarkerListing.STYLE_PANEL=8,WPGMZA.MarkerListing.ORDER_BY_ID=1,WPGMZA.MarkerListing.ORDER_BY_TITLE=2,WPGMZA.MarkerListing.ORDER_BY_ADDRESS=3,WPGMZA.MarkerListing.ORDER_BY_DESCRIPTION=4,WPGMZA.MarkerListing.ORDER_BY_CATEGORY=5,WPGMZA.MarkerListing.ORDER_BY_CATEGORY_PRIORITY=6,WPGMZA.MarkerListing.ORDER_BY_DISTANCE=7,WPGMZA.MarkerListing.ORDER_BY_RATING=8,Object.defineProperty(WPGMZA.MarkerListing.prototype,"mapID",{get:function(){return this.map.id}}),Object.defineProperty(WPGMZA.MarkerListing.prototype,"paginationEnabled",{get:function(){return this._paginationEnabled},set:function(value){this._paginationEnabled=!!value}}),Object.defineProperty(WPGMZA.MarkerListing.prototype,"pageSize",{get:function(){var pageSize;return WPGMZA.settings.wpgmza_default_items?(pageSize=parseInt(WPGMZA.settings.wpgmza_default_items),isNaN(pageSize)?null:pageSize):10},set:function(value){this.pagination("pageSize",value)}}),Object.defineProperty(WPGMZA.MarkerListing.prototype,"currentPage",{get:function(){if(!this.paginationElement)return 0;try{return $(this.paginationElement).pagination("getSelectedPageNum")-1}catch(e){return 0}},set:function(value){throw new Error("Not yet implemented")}}),Object.defineProperty(WPGMZA.MarkerListing.prototype,"imageWidth",{get:function(){var width=WPGMZA.settings.wpgmza_settings_image_width;return!(!width||!/^\d+$/.test(width))&&width}}),Object.defineProperty(WPGMZA.MarkerListing.prototype,"imageHeight",{get:function(){var height=WPGMZA.settings.wpgmza_settings_image_height;return!(!height||!/^\d+$/.test(height))&&height}}),Object.defineProperty(WPGMZA.MarkerListing.prototype,"style",{get:function(){return this.map.settings.list_markers_by}}),WPGMZA.MarkerListing.prototype.initPagination=function(){if(this.paginationElement){try{$(this.paginationElement).pagination("destroy")}catch(e){}$(this.paginationElement).remove()}var options;this.paginationEnabled&&!this.showOnFilteringComplete&&this.pageSize&&(options=this.getPaginationOptions(),this.lastAJAXResponse.recordsFiltered<=options.pageSize||(this.paginationElement=$("<div class='wpgmza-pagination'/>"),this.pagination=$(this.paginationElement).pagination(this.getPaginationOptions()),this.map.settings.dataTable_pagination_style&&"hidden"===this.map.settings.dataTable_pagination_style&&this.paginationElement.addClass("wpgmza-hidden"),$(this.element).after(this.paginationElement),this.map.settings.wpgmza_push_in_map&&this.paginationElement&&"google-maps"===WPGMZA.settings.engine&&($(this.paginationElement).css({zIndex:"999"}),options=parseInt(this.map.settings.wpgmza_push_in_map_placement),this.paginationElement.style?this.map.googleMap.controls[options].push(this.paginationElement):this.paginationElement[0]&&this.map.googleMap.controls[options].push(this.paginationElement[0]))))},WPGMZA.MarkerListing.prototype.getPaginationOptions=function(){var self=this,options={triggerPagingOnInit:!1,pageSize:this.pageSize,dataSource:function(done){done(self.getPaginationDataSource())},callback:function(data,pagination){self.pageOnPaginationReinit=$(self.paginationElement).pagination("getSelectedPageNum"),$(self.paginationElement).pagination("disable"),self.reload()}};return this.pageOnPaginationReinit&&(options.pageNumber=this.pageOnPaginationReinit),options},WPGMZA.MarkerListing.prototype.getPaginationDataSource=function(){var source=[];if(this.lastAJAXResponse)for(var i=0;i<this.lastAJAXResponse.recordsFiltered;i++)source.push(i);return source},WPGMZA.MarkerListing.prototype.getAJAXRequestParameters=function(params){var self=this,str=((params=params||{}).data||(params.data={}),params.method="POST",params.useCompressedPathVariable=!0,params.cache=!0,$(this.element).attr("data-wpgmza-ajax-parameters"));if(str&&str.length)return str=JSON.parse(str),$.extend(params.data,{phpClass:$(this.element).attr("data-wpgmza-php-class"),start:this.currentPage*this.pageSize,length:this.pageSize},str),this.overrideMarkerIDs&&(params.data.overrideMarkerIDs=this.overrideMarkerIDs.join(",")),this.lastFilteringParams&&(params.data.filteringParams=this.lastFilteringParams),this.map.showDistanceFromLocation&&(params.data.filteringParams||(params.data.filteringParams={}),str=this.map.showDistanceFromLocation,params.data.filteringParams.center={lat:str.lat,lng:str.lng,source:str.source}),params.success=function(response,textStatus,xhr){self.onAJAXResponse(response,textStatus,xhr)},params;throw new Error("No AJAX parameters specified on Marker Listing attribute")},WPGMZA.MarkerListing.prototype.onAJAXResponse=function(response,textStatus,xhr){this.map.showPreloader(!1),this.lastAJAXResponse=response,this.onHTMLResponse(response.html),this.initPagination(),void 0!==this.map.settings.directions_enabled&&0==parseInt(this.map.settings.directions_enabled)&&$(".wpgmza_marker_directions_link").remove(),this.trigger("markerlistingupdated"),this.map.settings.marker_listing_component_auto_open&&this.map.viewportGroupings.update("listing")},WPGMZA.MarkerListing.prototype.onHTMLResponse=function(html){var self=this;$(this.element).html(html),$(this.element).find(".wpgmza-gallery-container").each(function(index,el){var map=self.map,marker_id=$(el).closest("[data-marker-id]").attr("data-marker-id"),map=map.getMarkerByID(marker_id);null!==map&&map.gallery&&(marker_id=new WPGMZA.MarkerGallery(map,self),$(el).html(""),$(el).append(marker_id.element))}),$(this.element).find("[data-marker-icon-src]").each(function(index,el){var data,src=$(el).attr("data-marker-icon-src");try{data=JSON.parse(src)}catch(e){data=src}WPGMZA.MarkerIcon.createInstance(data).applyToElement(el)})},WPGMZA.MarkerListing.prototype.getImageElementFromURL=function(url){var img=$("<img class='wpgmza_map_image'/>");return $(img).attr("src",url),this.imageWidth&&$(img).css({width:this.imageWidth+"px"}),this.imageHeight&&$(img).css({height:this.imageHeight+"px"}),img},WPGMZA.MarkerListing.prototype.getRatingWidget=function(marker){var options={type:"marker",id:marker.id};return marker.rating&&(options.averageRating=marker.rating.average,options.numRatings=marker.rating.count),WPGMZA.RatingWidget.createInstance(options)},WPGMZA.MarkerListing.prototype.reload=function(){var route,params;this.element&&(this.prevXHRRequest&&this.prevXHRRequest.abort(),route=$(this.element).attr("data-wpgmza-rest-api-route"),params=this.getAJAXRequestParameters(),this.map.showPreloader(!0),this.prevXHRRequest=WPGMZA.restAPI.call(route,params))},WPGMZA.MarkerListing.prototype.enable=function(value){value?this.pagination("enable"):this.pagination("disable")},WPGMZA.MarkerListing.prototype.getFilteringParameters=function(){var shortcodeCategories,params={};return this.categoryDropdown.length&&"0"!=this.categoryDropdown.val()&&(params.categories=[this.categoryDropdown.val()]),this.categoryCheckboxes.length?(params.categories=[],this.categoryCheckboxes.each(function(index,el){!$(el).prop("checked")||$(el).siblings("ul").length&&$(el).siblings("ul").find(":checked").length||params.categories.push($(el).val())})):this.map&&this.map.settings&&(this.map.settings.store_locator_category||this.map.settings.filterbycat||this.map.shortcodeAttributes&&this.map.shortcodeAttributes.cat&&(shortcodeCategories=this.map.shortcodeAttributes.cat.split(","),params.categories=shortcodeCategories)),params},WPGMZA.MarkerListing.prototype.pushIntoMap=function(){var setting,width="30%",height="50%";return!(!this.element||("open-layers"==WPGMZA.settings.engine?(console.warn("Push into map is not yet supported when using OpenLayers engine"),1):this.map.settings.list_markers_by==WPGMZA.MarkerListing.STYLE_MODERN?(console.warn("Push into map is not available with modern style marker listing"),1):((setting=this.map.settings.wpgmza_push_in_map_width)&&setting.length&&(width=setting),(setting=this.map.settings.wpgmza_push_in_map_height)&&setting.length&&(height=setting),$(this.element).css({margin:"15px",overflow:"auto",zIndex:"999",width:width,height:height}),$(this.element).addClass("wpgmza-shadow-sm wpgmza_innermap_holder"),"open-layers"!==WPGMZA.settings.engine&&(setting=parseInt(this.map.settings.wpgmza_push_in_map_placement),this.element.style?this.map.googleMap.controls[setting].push(this.element):this.element[0]&&this.map.googleMap.controls[setting].push(this.element[0])),0)))},WPGMZA.MarkerListing.prototype.onFilteringComplete=function(event){var self=this;this.showOnFilteringComplete&&($(this.element).show(),delete this.showOnFilteringComplete),this.overrideMarkerIDs=[],event.filteredMarkers.forEach(function(data){self.overrideMarkerIDs.push(data.id)}),this.lastFilteringParams=event.filteringParams,this.pageOnPaginationReinit=1,this.reload()},WPGMZA.MarkerListing.prototype.onItemClick=function(event){var marker_id=$(event.currentTarget).attr("mid"),marker_id=this.map.getMarkerByID(marker_id),listingPushedInMap=WPGMZA.maps[0].settings.push_in_map&&WPGMZA.maps[0].settings.push_in_map.length,event=$(event.target).hasClass("wpgmza_gd"),zoomLevelOnClick=13;if(null!==marker_id){if(marker_id.trigger("select"),this.style!=WPGMZA.MarkerListing.STYLE_MODERN&&!WPGMZA.settings.disable_scroll_on_marker_listing_click&&!event&&!listingPushedInMap){event=0;WPGMZA.settings.marker_listing_item_click_scroll_offset&&(event=parseInt(WPGMZA.settings.marker_listing_item_click_scroll_offset));let shouldPanToMap=!1;WPGMZA.InternalEngine.isLegacy()?this.map.settings.wpgmza_push_in_map||(shouldPanToMap=!0):$(this.element).closest(".wpgmza-inner-stack").length||(shouldPanToMap=!0),shouldPanToMap&&$("html, body").animate({scrollTop:$(this.map.element).offset().top-event},500)}this.map.settings.zoom_level_on_marker_listing_override&&this.map.settings.zoom_level_on_marker_listing_click?zoomLevelOnClick=this.map.settings.zoom_level_on_marker_listing_click:this.map.settings.mass_marker_support&&WPGMZA.settings.clusterAdvancedEnabled&&WPGMZA.settings.clusterMaxZoom&&(zoomLevelOnClick=parseInt(WPGMZA.settings.clusterMaxZoom)),this.map instanceof WPGMZA.GoogleMap?(this.map.panTo(marker_id.getPosition()),this.map.settings.marker_listing_disable_zoom||this.map.setZoom(zoomLevelOnClick)):this.map.settings.marker_listing_disable_zoom?this.map.panTo(marker_id.getPosition()):this.map.panTo(marker_id.getPosition(),zoomLevelOnClick)}}}),jQuery(function($){WPGMZA.AdvancedTableMarkerListing=function(map,element,options){this.element=element=$("#wpgmza_marker_holder_"+map.id+", #wpgmza_marker_list_"+map.id),WPGMZA.MarkerListing.apply(this,arguments),this.dataTable=new WPGMZA.AdvancedTableDataTable(element,this),this.dataTable.map=map},WPGMZA.AdvancedTableMarkerListing.prototype=Object.create(WPGMZA.MarkerListing.prototype),WPGMZA.AdvancedTableMarkerListing.prototype.constructor=WPGMZA.AdvancedTableMarkerListing,WPGMZA.AdvancedTableMarkerListing.prototype.reload=function(){this.dataTable&&this.dataTable.reload()},WPGMZA.AdvancedTableMarkerListing.prototype.onFilteringComplete=function(event){this.dataTable.onMarkerFilterFilteringComplete(event),WPGMZA.MarkerListing.prototype.onFilteringComplete.apply(this,arguments),this.dataTable&&this.dataTable.dataTable.ajax.reload(!1,null)},WPGMZA.AdvancedTableMarkerListing.prototype.onItemClick=function(event){var isFirstCell=$(event.target).is(":first-child");$(event.target).closest(".dataTable").is(".collapsed")&&isFirstCell||WPGMZA.MarkerListing.prototype.onItemClick.call(this,event)}}),jQuery(function($){WPGMZA.CarouselMarkerListing=function(map,element,options){WPGMZA.MarkerListing.call(this,map,element,$.extend({paginationEnabled:!1},options))},WPGMZA.CarouselMarkerListing.prototype=Object.create(WPGMZA.MarkerListing.prototype),WPGMZA.CarouselMarkerListing.prototype.constructor=WPGMZA.CarouselMarkerListing,WPGMZA.CarouselMarkerListing.createInstance=function(el){return new WPGMZA.CarouselMarkerListing(el)},WPGMZA.CarouselMarkerListing.prototype.getOwlCarouselOptions=function(){var options={autoplay:!0,autoplayTimeout:5e3,lazyLoad:!1,autoHeight:!1,dots:!1,nav:!1,loop:!0,responsive:{0:{items:1},500:{items:3},800:{items:5}}};return WPGMZA.settings.carousel_lazyload&&(options.lazyLoad=!0),WPGMZA.settings.carouselAutoplay&&!isNaN(WPGMZA.settings.carouselAutoplay)&&(options.autoplayTimeout=parseInt(WPGMZA.settings.carouselAutoplay)),WPGMZA.settings.carousel_autoheight&&(options.autoHeight=!0),WPGMZA.settings.carousel_pagination&&(options.dots=!0),WPGMZA.settings.carousel_navigation&&(options.nav=!0),WPGMZA.settings.carousel_items&&!isNaN(WPGMZA.settings.carousel_items)&&(options.responsive[800].items=parseInt(WPGMZA.settings.carousel_items)),WPGMZA.settings.carousel_items_tablet&&!isNaN(WPGMZA.settings.carousel_items_tablet)&&(options.responsive[500].items=parseInt(WPGMZA.settings.carousel_items_tablet)),WPGMZA.settings.carousel_items_mobile&&!isNaN(WPGMZA.settings.carousel_items_mobile)&&(options.responsive[0].items=parseInt(WPGMZA.settings.carousel_items_mobile)),options},WPGMZA.CarouselMarkerListing.prototype.getAJAXRequestParameters=function(params){return delete(params=WPGMZA.MarkerListing.prototype.getAJAXRequestParameters.call(this,params)).data.start,delete params.data.length,params},WPGMZA.CarouselMarkerListing.prototype.onHTMLResponse=function(html){WPGMZA.MarkerListing.prototype.onHTMLResponse.call(this,html),$(this.element).trigger("destroy.owl.carousel"),$(this.element).owlCarousel(this.getOwlCarouselOptions())}}),jQuery(function($){WPGMZA.ModernMarkerListing=function(map,element,options){var self=this,map_id=map.id,container=$("#wpgmza_map_"+map_id);container.attr("data-mashup-ids");WPGMZA.MarkerListing.apply(this,arguments),this.map=map,this.element=element,this.openButton=$('<div class="wpgmza-modern-marker-open-button wpgmza-modern-shadow wpgmza-modern-hover-opaque"><i class="fa fa-map-marker"></i> <i class="fa fa-list"></i></div>'),container.append(this.openButton),container.append(this.element),this.popoutPanel=new WPGMZA.PopoutPanel,this.popoutPanel.element=this.element,map.on("init",function(event){container.append(self.element),container.append(self.openButton)}),self.openButton.on("click",function(event){self.open(),$("#wpgmza_map_"+map_id+" .wpgmza-modern-store-locator").addClass("wpgmza_sl_offset")}),this.markerView=new WPGMZA.ModernMarkerListingMarkerView(map),this.markerView.parent=this,$(this.element).find(".wpgmza-close-container").on("click",function(event){self.close(),$("#wpgmza_map_"+self.map.id+" .wpgmza-modern-store-locator").removeClass("wpgmza_sl_offset")}),$(this.element).on("click","li",function(event){self.markerView.open($(event.currentTarget).attr("mid"))}),$(document.body).on("click",".wpgmza_sl_reset_button_"+map_id,function(event){$(self.element).find("li[mid]").show()}),$(document.body).on("filteringcomplete.wpgmza",function(event){event.map.id==self._mapID&&self.onFilteringComplete(event)})},WPGMZA.ModernMarkerListing.prototype=Object.create(WPGMZA.MarkerListing.prototype),WPGMZA.ModernMarkerListing.prototype.constructor=WPGMZA.ModernMarkerListing,WPGMZA.ModernMarkerListing.prototype.initPagination=function(){WPGMZA.MarkerListing.prototype.initPagination.apply(this,arguments),this.pageSize&&$(this.element).find("ul").after(this.paginationElement)},WPGMZA.ModernMarkerListing.prototype.onHTMLResponse=function(html){$(this.element).find("ul.wpgmza-modern-marker-listing-list-item-container").html(html)},WPGMZA.ModernMarkerListing.prototype.open=function(){this.popoutPanel.open()},WPGMZA.ModernMarkerListing.prototype.close=function(){this.popoutPanel.close()}}),jQuery(function($){WPGMZA.OLDirectionsRenderer=function(map){var self=this;WPGMZA.DirectionsRenderer.apply(this,arguments),this.panel=$("#directions_panel_"+map.id),this.panel.on("click",".wpgmza-directions-step",function(event){self.onStepClicked(event)})},WPGMZA.extend(WPGMZA.OLDirectionsRenderer,WPGMZA.DirectionsRenderer),WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_LEFT=0,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_RIGHT=1,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_SHARP_LEFT=2,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_SHARP_RIGHT=3,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_SLIGHT_LEFT=4,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_SLIGHT_RIGHT=5,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_STRAIGHT=6,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_ENTER_ROUNDABOUT=7,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_EXIT_ROUNDABOUT=8,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_U_TURN=9,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_GOAL=10,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_DEPART=11,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_KEEP_LEFT=12,WPGMZA.OLDirectionsRenderer.INSTRUCTION_TYPE_KEEP_RIGHT=13,WPGMZA.OLDirectionsRenderer.instructionTypeToClassName=function(type){for(var name in WPGMZA.OLDirectionsRenderer)if(name.match(/^INSTRUCTION_TYPE_/)&&WPGMZA.OLDirectionsRenderer[name]==type)return"wpgmza-"+name.replace(/_/g,"-").toLowerCase()},WPGMZA.OLDirectionsRenderer.prototype.clear=function(){this.polyline&&(this.map.removePolyline(this.polyline),delete this.polyline),this.stepHighlightPolyline&&(this.map.removePolyline(this.stepHighlightPolyline),delete this.stepHighlightPolyline),this.panel.html("")},WPGMZA.OLDirectionsRenderer.prototype.setDirections=function(directions){var self=this,directions=directions.routes[0],source=window.polyline.decode(directions.geometry),points=[],source=(this.clear(),source.forEach(function(arr){points.push({lat:arr[0],lng:arr[1]})}),{linecolor:"#4285F4",linethickness:4,opacity:.8}),steps=(this.map.settings.directions_route_stroke_color&&(source.linecolor=this.map.settings.directions_route_stroke_color),this.map.settings.directions_route_stroke_weight&&(source.linethickness=this.map.settings.directions_route_stroke_weight),this.map.settings.directions_route_stroke_opacity&&(source.opacity=this.map.settings.directions_route_stroke_opacity),this.polyline=WPGMZA.Polyline.createInstance({polydata:points,strokeWeight:source.linethickness,strokeOpacity:source.opacity,strokeColor:source.linecolor}),this.polyline.map=this.map,this.map.addPolyline(this.polyline),this.directionStartMarker&&this.map.removeMarker(this.directionStartMarker),this.directionEndMarker&&this.map.removeMarker(this.directionEndMarker),this.directionStartMarker=WPGMZA.Marker.createInstance({position:points[0],icon:this.map.settings.directions_route_origin_icon,retina:this.map.settings.directions_origin_retina,disableInfoWindow:!0}),this.directionStartMarker._icon.retina=this.directionStartMarker.retina,this.map.addMarker(this.directionStartMarker),this.directionEndMarker=WPGMZA.Marker.createInstance({position:points[points.length-1],icon:this.map.settings.directions_route_destination_icon,retina:this.map.settings.directions_destination_retina,disableInfoWindow:!0}),this.directionEndMarker._icon.retina=this.directionEndMarker.retina,this.map.addMarker(this.directionEndMarker),[]);directions.segments&&directions.segments.forEach(function(segment){steps=steps.concat(segment.steps)}),steps.forEach(function(step){var div=$("<div class='wpgmza-directions-step'></div>");div[0].wpgmzaDirectionsStep=step,div.html(step.instruction),div.addClass(WPGMZA.OLDirectionsRenderer.instructionTypeToClassName(step.type)),self.panel.append(div)}),this.map.settings.directions_fit_bounds_to_route&&this.fitBoundsToRoute(points[0],points[points.length-1])},WPGMZA.OLDirectionsRenderer.prototype.onStepClicked=function(event){var event=event.currentTarget.wpgmzaDirectionsStep,bounds=new WPGMZA.LatLngBounds,startIndex=event.way_points[0],endIndex=event.way_points[event.way_points.length-1];if(this.stepHighlightPolyline&&(this.map.removePolyline(this.stepHighlightPolyline),delete this.stepHighlightPolyline),startIndex!=endIndex){for(var points=[],i=startIndex;i<=endIndex;i++){var vertex=this.polyline.polydata[i];points.push(vertex),bounds.extend(vertex)}event={strokeColor:"#ff0000",strokeWeight:4,strokeOpacity:.8},startIndex=(this.map.settings.directions_route_stroke_weight&&(event.linethickness=this.map.settings.directions_route_stroke_weight),this.map.settings.directions_route_stroke_opacity&&(event.opacity=this.map.settings.directions_route_stroke_opacity),WPGMZA.Polyline.createInstance({polydata:points,settings:event}));this.stepHighlightPolyline=startIndex,this.map.addPolyline(this.stepHighlightPolyline),this.map.fitBounds(bounds),WPGMZA.animateScroll(this.map.element)}}}),jQuery(function($){WPGMZA.OLDirectionsService=function(map){WPGMZA.DirectionsService.apply(this,arguments),this.apiKey=WPGMZA.settings.open_route_service_key},WPGMZA.extend(WPGMZA.OLDirectionsService,WPGMZA.DirectionsService),WPGMZA.OLDirectionsService.prototype.geocodeWaypoints=function(waypoints,callback){var geocoder=WPGMZA.Geocoder.createInstance(),index=0,coordinates=[];!function geocodeNextWaypoint(){geocoder.geocode({address:waypoints[index]},function(results){results.length?coordinates.push([results[0].latLng.lng,results[0].latLng.lat]):coordinates.push(WPGMZA.DirectionsService.NOT_FOUND),++index==waypoints.length?callback(coordinates):geocodeNextWaypoint()})}()},WPGMZA.OLDirectionsService.prototype.route=function(request,callback){var profile,self=this,translated={};switch(request.travelMode){case WPGMZA.DirectionsService.WALKING:profile="foot-walking";break;case WPGMZA.DirectionsService.BICYCLING:profile="cycling-regular";break;case WPGMZA.DirectionsService.TRANSIT:console.warn("Public transport profile is not supported by OpenRouteService");default:profile="driving-car"}request.unitSystem===WPGMZA.Distance.KILOMETERS?translated.units="km":translated.units="mi";var url="https://api.openrouteservice.org/v2/directions/"+profile,waypoints=[request.origin];request.waypoints&&request.waypoints.forEach(function(obj){waypoints.push(obj.location)}),waypoints.push(request.destination),this.geocodeWaypoints(waypoints,function(coordinates){for(var i=0;i<coordinates.length;i++)if(coordinates[i]==WPGMZA.DirectionsService.NOT_FOUND){for(var response={geocoded_waypoints:[]},i=0;i<waypoints.length;i++)response.geocoded_waypoints.push({geocoder_status:coordinates[i]});return void callback(response,WPGMZA.DirectionsService.NOT_FOUND)}switch(translated.coordinates=coordinates,WPGMZA.locale.substr(0,2)){case"de":case"en":case"pt":case"ru":case"hu":case"fr":case"it":case"cn":case"dk":case"de":translated.language=WPGMZA.locale.substr(0,2)}$.ajax(url,{method:"POST",dataType:"json",contentType:"application/json; charset=utf-8",data:JSON.stringify(translated),beforeSend:function(xhr){xhr.setRequestHeader("Authorization",self.apiKey)},success:function(response,status,xhr){status=response.routes&&0<response.routes.length?WPGMZA.DirectionsService.SUCCESS:WPGMZA.DirectionsService.ZERO_RESULTS,callback(response,status);response=new WPGMZA.Event({type:"directionsserviceresult",response:response,status:status});self.map.trigger(response)}})})}}),jQuery(function($){WPGMZA.OLHeatmap=function(row){WPGMZA.Heatmap.call(this,row),this._removeListenerBound=!1;row=this.getOLHeatmapSettings();this.olHeatmap=new ol.layer.Heatmap(row)},WPGMZA.OLHeatmap.prototype=Object.create(WPGMZA.Heatmap.prototype),WPGMZA.OLHeatmap.prototype.constructor=WPGMZA.OLHeatmap,WPGMZA.OLHeatmap.prototype.getOLHeatmapSettings=function(){var settings={source:this.getSource()};return this.opacity&&(settings.opacity=parseFloat(this.opacity)),this.radius&&(settings.radius=parseFloat(this.radius)),this.heatmap_opacity&&(settings.opacity=parseFloat(this.heatmap_opacity)),this.heatmap_radius&&(settings.radius=parseFloat(this.heatmap_radius)),this.gradient&&(settings.gradient=this.gradient),settings},WPGMZA.OLHeatmap.prototype.removeLayer=function(){this.olHeatmap&&(this.olHeatmap.getSource().dispose(),this.olHeatmap.renderer_&&this.olHeatmap.renderer_.dispose(),this.olHeatmap.setMap(null),this.olHeatmap.dispose(),delete this.olHeatmap)},WPGMZA.OLHeatmap.prototype.updateOLHeatmap=function(){var self=this,settings=(this.olHeatmap&&this.removeLayer(),this.getOLHeatmapSettings());this.olHeatmap=new ol.layer.Heatmap(settings),this.map&&(this.olHeatmap.setMap(this.map.olMap),this._removeListenerBound||this.map.on("heatmapremoved",function(event){event.heatmap===self&&self.removeLayer()}))},WPGMZA.OLHeatmap.prototype.getSource=function(){for(var points=this.parseGeometry(this.dataset),len=points.length,features=[],i=0;i<len;i++)features.push(new ol.Feature({geometry:new ol.geom.Point(ol.proj.fromLonLat([parseFloat(points[i].lng),parseFloat(points[i].lat)]))}));return new ol.source.Vector({features:features})},WPGMZA.OLHeatmap.prototype.setDraggable=function(){},WPGMZA.OLHeatmap.prototype.update=function(){this.updateOLHeatmap()},WPGMZA.OLHeatmap.prototype.updateDatasetFromMarkers=function(){WPGMZA.Heatmap.prototype.updateDatasetFromMarkers.apply(this,arguments),this.updateOLHeatmap()}}),jQuery(function($){WPGMZA.OLImageoverlay=function(options,olImageoverlay){var topLeft;options=options||{},WPGMZA.Imageoverlay.call(this,options,olImageoverlay),(olImageoverlay=olImageoverlay instanceof WPGMZA.Rectangle?{engineRectangle:olImageoverlay}:olImageoverlay)&&olImageoverlay.engineRectangle?(this.engineRectangle=olImageoverlay.engineRectangle,this.engineRectangle instanceof WPGMZA.Rectangle&&(this.engineRectangle=this.engineRectangle.olFeature),olImageoverlay=this.engineRectangle.getGeometry().getExtent(),topLeft=ol.extent.getTopLeft(olImageoverlay),olImageoverlay=ol.extent.getBottomRight(olImageoverlay),topLeft=ol.proj.toLonLat(topLeft),olImageoverlay=ol.proj.toLonLat(olImageoverlay),topLeft=new WPGMZA.LatLng(topLeft[1],topLeft[0]),olImageoverlay=new WPGMZA.LatLng(olImageoverlay[1],olImageoverlay[0]),this.cornerA=options.cornerA=topLeft,this.cornerB=options.cornerB=olImageoverlay):(this.engineRectangle=new ol.Feature,this.cornerA instanceof WPGMZA.LatLng||(this.cornerA=new WPGMZA.LatLng(this.cornerA)),this.cornerB instanceof WPGMZA.LatLng||(this.cornerB=new WPGMZA.LatLng(this.cornerB)),this.setBounds(this.cornerA,this.cornerB)),this.olImageoverlay=new ol.layer.Image({}),(this.olImageoverlay.wpgmzaImageoverlay=this).olFeature=this.olImageoverlay,this.engineRectangle.olFeature=this.engineRectangle,options&&this.setOptions(options)},WPGMZA.OLImageoverlay.prototype=Object.create(WPGMZA.Imageoverlay.prototype),WPGMZA.OLImageoverlay.prototype.constructor=WPGMZA.OLImageoverlay,WPGMZA.OLImageoverlay.prototype.getBounds=function(){var extent=this.engineRectangle.getGeometry().getExtent(),topLeft=ol.extent.getTopLeft(extent),extent=ol.extent.getBottomRight(extent),topLeft=ol.proj.toLonLat(topLeft),extent=ol.proj.toLonLat(extent),topLeft=new WPGMZA.LatLng(topLeft[1],topLeft[0]),extent=new WPGMZA.LatLng(extent[1],extent[0]);return new WPGMZA.LatLngBounds(topLeft,extent)},WPGMZA.OLImageoverlay.prototype.setBounds=function(cornerA,cornerB){this.engineRectangle&&(this.cornerA=cornerA,this.cornerB=cornerB,(cornerA=[[]])[0].push(ol.proj.fromLonLat([parseFloat(this.cornerA.lng),parseFloat(this.cornerA.lat)])),cornerA[0].push(ol.proj.fromLonLat([parseFloat(this.cornerB.lng),parseFloat(this.cornerA.lat)])),cornerA[0].push(ol.proj.fromLonLat([parseFloat(this.cornerB.lng),parseFloat(this.cornerB.lat)])),cornerA[0].push(ol.proj.fromLonLat([parseFloat(this.cornerA.lng),parseFloat(this.cornerB.lat)])),cornerA[0].push(ol.proj.fromLonLat([parseFloat(this.cornerA.lng),parseFloat(this.cornerA.lat)])),this.engineRectangle.setGeometry(new ol.geom.Polygon(cornerA)),this.redraw(),this.trigger("change"))},WPGMZA.OLImageoverlay.prototype.setOptions=function(options){WPGMZA.Imageoverlay.prototype.setOptions.apply(this,arguments),options.cornerA&&options.cornerB&&(this.cornerA=new WPGMZA.LatLng(options.cornerA),this.cornerB=new WPGMZA.LatLng(options.cornerB),this.setBounds(this.cornerA,this.cornerB))},WPGMZA.OLImageoverlay.prototype.setEditable=function(enable){let self=this;this.isModifying=enable,this.rectLayer.setVisible(enable),enable?this.engineRectangle.modifyInteraction||(this.engineRectangle.snapInteraction=new ol.interaction.Snap({source:this.rectLayer.getSource()}),this.map.olMap.addInteraction(this.engineRectangle.snapInteraction),this.engineRectangle.modifyDefaultStyle=new ol.interaction.Modify({source:this.rectLayer.getSource()}).getOverlay().getStyleFunction(),this.engineRectangle.modifyInteraction=new ol.interaction.Modify({source:this.rectLayer.getSource(),deleteCondition:ol.events.condition.never,insertVertexCondition:ol.events.condition.never,pixelTolerance:$(this.map.element).width(),style:function(feature){var mutatedGeometry,staticGeometry,modifyGeometry=self.engineRectangle.get("modifyGeometry");return modifyGeometry&&(staticGeometry=modifyGeometry.geometry.clone(),mutatedGeometry=self.engineRectangle.getGeometry().clone(),staticGeometry=staticGeometry.getCoordinates(),mutatedGeometry=mutatedGeometry.getCoordinates(),staticGeometry=self.applyModifyCorrections(staticGeometry,mutatedGeometry,modifyGeometry.closestIndex))&&modifyGeometry.geometry.setCoordinates(staticGeometry),self.engineRectangle.modifyDefaultStyle(feature)}}),this.map.olMap.addInteraction(this.engineRectangle.modifyInteraction),this.engineRectangle.modifyInteraction.on("modifystart",function(event){let closestIndex=0;event.mapBrowserEvent.coordinate&&(closestIndex=self.findClosestCoordinateIndex(event.mapBrowserEvent.coordinate)),self.engineRectangle.set("modifyGeometry",{geometry:self.engineRectangle.getGeometry().clone(),closestIndex:closestIndex},!0)}),this.engineRectangle.modifyInteraction.on("modifyend",function(event){var modifyGeometry=self.engineRectangle.get("modifyGeometry"),modifyGeometry=(modifyGeometry&&(self.engineRectangle.setGeometry(modifyGeometry.geometry),self.engineRectangle.unset("modifyGeometry",!0)),self.getBounds());modifyGeometry.north&&modifyGeometry.west&&modifyGeometry.south&&modifyGeometry.east&&self.setBounds(new WPGMZA.LatLng({lat:modifyGeometry.north,lng:modifyGeometry.west}),new WPGMZA.LatLng({lat:modifyGeometry.south,lng:modifyGeometry.east})),self.trigger("change")})):this.engineRectangle.modifyInteraction&&(this.map&&(this.map.olMap.removeInteraction(this.engineRectangle.snapInteraction),this.map.olMap.removeInteraction(this.engineRectangle.modifyInteraction)),delete this.engineRectangle.snapInteraction,delete this.engineRectangle.modifyInteraction)},WPGMZA.OLImageoverlay.prototype.updateNativeFeature=function(){this.getScalarProperties();var bounds=this.getBounds();bounds.north&&bounds.west&&bounds.south&&bounds.east&&(this.rectLayer?this.setBounds(new WPGMZA.LatLng({lat:bounds.north,lng:bounds.west}),new WPGMZA.LatLng({lat:bounds.south,lng:bounds.east})):(this.rectLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.engineRectangle]}),style:new ol.style.Style({geometry:function(feature){var modifyGeometry=feature.get("modifyGeometry");return modifyGeometry?modifyGeometry.geometry:feature.getGeometry()},fill:new ol.style.Fill({color:WPGMZA.hexOpacityToString("#000000",0)}),stroke:new ol.style.Stroke({color:WPGMZA.hexOpacityToString("#000000",1),width:1})})}),this.rectLayer.setZIndex(5),this.rectLayer.setVisible(this.isModifying)))},WPGMZA.OLImageoverlay.prototype.redraw=function(){WPGMZA.Imageoverlay.prototype.redraw.apply(this,arguments);this.getScalarProperties();var imageExtent,bounds=this.getBounds();bounds.north&&bounds.west&&bounds.south&&bounds.east&&(bounds=this.image)&&this.olImageoverlay&&this.engineRectangle&&(imageExtent=[...imageExtent=this.engineRectangle.getGeometry().getExtent()],bounds=new ol.source.ImageStatic({url:bounds,crossOrigin:"",imageExtent:imageExtent,interpolate:!0}),this.olImageoverlay.setSource(bounds),this.olImageoverlay.setOpacity(this.opacity),this.olImageoverlay.setZIndex(1))},WPGMZA.OLImageoverlay.prototype.destroy=function(){WPGMZA.Imageoverlay.prototype.destroy.apply(this,arguments),this.olImageoverlay&&this.olImageoverlay.setMap(null)},WPGMZA.OLImageoverlay.prototype.setMap=function(map){map?(this.rectLayer.setMap(map),this.olImageoverlay.setMap(map)):(this.rectLayer&&this.rectLayer.setMap(null),this.olImageoverlay&&this.olImageoverlay.setMap(null))},WPGMZA.OLImageoverlay.prototype.applyModifyCorrections=function(staticCoordinates,mutatedCoordinates,closestIndex){if(mutatedCoordinates&&staticCoordinates){var i,point,ref,pointsToUpdate=[];for(i in staticCoordinates=staticCoordinates.shift(),mutatedCoordinates=mutatedCoordinates.shift())staticCoordinates[i]&&(point=mutatedCoordinates[i],ref=staticCoordinates[i],closestIndex!==i||point[0]===ref[0]&&point[1]===ref[1]||(i=parseInt(i))!==mutatedCoordinates.length-1&&pointsToUpdate.push(i));if(pointsToUpdate.length){for(var k in pointsToUpdate){k=pointsToUpdate[k];let point=mutatedCoordinates[k],prevIndex=k-1,nextIndex=(prevIndex===mutatedCoordinates.length-1?prevIndex=0:prevIndex<0&&(prevIndex=mutatedCoordinates.length-2),k+1);nextIndex>=mutatedCoordinates.length-1&&(nextIndex=0),mutatedCoordinates[prevIndex]&&(k%2==0||0===k?mutatedCoordinates[prevIndex][0]=point[0]:mutatedCoordinates[prevIndex][1]=point[1]),mutatedCoordinates[nextIndex]&&(k%2==0||0===k?mutatedCoordinates[nextIndex][1]=point[1]:mutatedCoordinates[nextIndex][0]=point[0]),mutatedCoordinates[mutatedCoordinates.length-1][0]=mutatedCoordinates[0][0],mutatedCoordinates[mutatedCoordinates.length-1][1]=mutatedCoordinates[0][1]}return[mutatedCoordinates]}}return!1},WPGMZA.OLImageoverlay.prototype.findClosestCoordinateIndex=function(coord){let coordinates=this.engineRectangle.getGeometry().clone().getCoordinates(),locatedIndex=null,lastDistance=null;for(var i in coordinates=coordinates.shift()){var line=new ol.geom.LineString([coord,coordinates[i]]);(null===lastDistance||lastDistance>line.getLength())&&(lastDistance=line.getLength(),locatedIndex=i)}return locatedIndex}}),jQuery(function($){WPGMZA.OLProCircle=function(options,olFeature){WPGMZA.OLCircle.call(this,options,olFeature)},WPGMZA.OLProCircle.prototype=Object.create(WPGMZA.OLCircle.prototype),WPGMZA.OLProCircle.prototype.constructor=WPGMZA.OLProCircle,WPGMZA.OLProCircle.prototype.setLayergroup=function(layergroup){WPGMZA.OLCircle.prototype.setLayergroup.call(this,layergroup),this.layergroup&&this.layer&&this.layer.setZIndex(this.layergroup)}}),jQuery(function($){WPGMZA.OLProDrawingManager=function(){WPGMZA.ProDrawingManager.apply(this,arguments)},WPGMZA.extend(WPGMZA.OLProDrawingManager,WPGMZA.ProDrawingManager)}),jQuery(function($){WPGMZA.OLProInfoWindow=function(feature){WPGMZA.OLInfoWindow.call(this,feature);var self=this;$(this.element).on("click",function(event){self.feature.map.settings.close_infowindow_on_map_click&&(event.stopPropagation(),event.stopImmediatePropagation())})},WPGMZA.OLProInfoWindow.prototype=Object.create(WPGMZA.OLInfoWindow.prototype),WPGMZA.OLProInfoWindow.prototype.constructor=WPGMZA.OLProInfoWindow,Object.defineProperty(WPGMZA.OLProInfoWindow.prototype,"panIntoViewOnOpen",{get:function(){return this.style==WPGMZA.ProInfoWindow.STYLE_NATIVE_GOOGLE}}),WPGMZA.OLProInfoWindow.prototype.open=function(map,feature){switch(this.feature=feature,"map-edit"==WPGMZA.currentPage?WPGMZA.ProInfoWindow.STYLE_NATIVE_GOOGLE:this.style){case WPGMZA.ProInfoWindow.STYLE_MODERN:case WPGMZA.ProInfoWindow.STYLE_MODERN_PLUS:case WPGMZA.ProInfoWindow.STYLE_MODERN_CIRCULAR:case WPGMZA.ProInfoWindow.STYLE_TEMPLATE:return WPGMZA.ProInfoWindow.prototype.open.call(this,map,feature);default:return WPGMZA.OLInfoWindow.prototype.open.call(this,map,feature)}},WPGMZA.OLProInfoWindow.prototype.setPosition=function(position){position&&(position=position.toLatLngLiteral(),this.overlay.setPosition(ol.proj.fromLonLat([position.lng,position.lat])))}}),jQuery(function($){WPGMZA.OLProMap=function(element,options){WPGMZA.OLMap.call(this,element,options);this.loadKMLLayers(),this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}),$(this.element).trigger("wpgooglemaps_loaded")},WPGMZA.OLProMap.prototype=Object.create(WPGMZA.OLMap.prototype),WPGMZA.OLProMap.prototype.constructor=WPGMZA.OLMap.prototype,WPGMZA.OLMap.prototype.addHeatmap=function(heatmap){heatmap.olHeatmap.setMap(this.olMap),WPGMZA.ProMap.prototype.addHeatmap.call(this,heatmap)},WPGMZA.OLMap.prototype.addImageoverlay=function(imageoverlay){imageoverlay.setMap(this.olMap),WPGMZA.ProMap.prototype.addImageoverlay.call(this,imageoverlay)},WPGMZA.OLMap.prototype.removeImageoverlay=function(imageoverlay){imageoverlay.setMap(null),WPGMZA.ProMap.prototype.addImageoverlay.call(this,imageoverlay)},WPGMZA.OLProMap.prototype.loadKMLLayers=function(){if(this.kmlLayers)for(var i=0;i<this.kmlLayers.length;i++)this.olMap.removeLayer(this.kmlLayers[i]);if(this.kmlLayers=[],this.settings.kml)for(var urls=this.settings.kml.split(","),i=((new Date).getTime(),0);i<urls.length;i++){var layer=new ol.layer.Vector({source:new ol.source.Vector({url:urls[i],format:new ol.format.KML({extractAttributes:!0})})});this.kmlLayers.push(layer),this.olMap.addLayer(layer)}}}),jQuery(function($){WPGMZA.OLProMarker=function(row){WPGMZA.OLMarker.call(this,row)},WPGMZA.OLProMarker.prototype=Object.create(WPGMZA.OLMarker.prototype),WPGMZA.OLProMarker.prototype.constructor=WPGMZA.OLProMarker,WPGMZA.OLProMarker.prototype.updateIcon=function(){var self=this,icon=this._icon;WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT?(icon.applyToElement($(this.element).find("img")),WPGMZA.getImageDimensions(icon.url,function(dimensions){self.updateElementHeight(dimensions.height)})):(this.vectorLayerStyle=new ol.style.Style({image:new ol.style.Icon({anchor:[.5,1],src:icon.url})}),this.feature.setStyle(this.vectorLayerStyle))},WPGMZA.OLProMarker.prototype.setLayergroup=function(layergroup){WPGMZA.OLMarker.prototype.setLayergroup.call(this,arguments),this.layergroup&&WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT&&this.overlay&&this.overlay.element&&this.overlay.element.style&&(this.overlay.element.style.zIndex=layergroup)}}),jQuery(function($){var Parent=WPGMZA.OLPointlabel;WPGMZA.OLProPointlabel=function(options,pointFeature){Parent.call(this,options,pointFeature)},WPGMZA.extend(WPGMZA.OLProPointlabel,Parent),WPGMZA.OLProPointlabel.prototype.updateNativeFeature=function(){Parent.prototype.updateNativeFeature.apply(this,arguments);var options=this.getScalarProperties();options.fontSize&&this.textFeature.setFontSize(options.fontSize),options.fillColor&&this.textFeature.setFillColor(options.fillColor),options.lineColor&&this.textFeature.setLineColor(options.lineColor),options.opacity&&this.textFeature.setOpacity(options.opacity),this.textFeature.refresh()}}),jQuery(function($){WPGMZA.OLProPolygon=function(row,olFeature){WPGMZA.OLPolygon.call(this,row,olFeature)},WPGMZA.OLProPolygon.prototype=Object.create(WPGMZA.OLPolygon.prototype),WPGMZA.OLProPolygon.prototype.constructor=WPGMZA.OLProPolygon,WPGMZA.OLProPolygon.prototype.setLayergroup=function(layergroup){WPGMZA.OLPolygon.prototype.setLayergroup.call(this,layergroup),this.layergroup&&this.layer&&this.layer.setZIndex(this.layergroup)}}),jQuery(function($){WPGMZA.OLProRectangle=function(options,olFeature){WPGMZA.OLRectangle.call(this,options,olFeature)},WPGMZA.OLProRectangle.prototype=Object.create(WPGMZA.OLRectangle.prototype),WPGMZA.OLProRectangle.prototype.constructor=WPGMZA.OLProRectangle,WPGMZA.OLProRectangle.prototype.setLayergroup=function(layergroup){WPGMZA.OLRectangle.prototype.setLayergroup.call(this,layergroup),this.layergroup&&this.layer&&this.layer.setZIndex(this.layergroup)}});;
/**
 * Owl carousel
 * @version 2.3.4
 * @author Bartosz Wojciechowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 * @todo Lazy Load Icon
 * @todo prevent animationend bubling
 * @todo itemsScaleUp
 * @todo Test Zepto
 * @todo stagePadding calculate wrong active classes
 */
;(function($,window,document,undefined){function Owl(element,options){this.settings=null;this.options=$.extend({},Owl.Defaults,options);this.$element=$(element);this._handlers={};this._plugins={};this._supress={};this._current=null;this._speed=null;this._coordinates=[];this._breakpoint=null;this._width=null;this._items=[];this._clones=[];this._mergers=[];this._widths=[];this._invalidated={};this._pipe=[];this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null};this._states={current:{},tags:{'initializing':['busy'],'animating':['busy'],'dragging':['interacting']}};$.each(['onResize','onThrottledResize'],$.proxy(function(i,handler){this._handlers[handler]=$.proxy(this[handler],this)},this));$.each(Owl.Plugins,$.proxy(function(key,plugin){this._plugins[key.charAt(0).toLowerCase()+key.slice(1)]=new plugin(this)},this));$.each(Owl.Workers,$.proxy(function(priority,worker){this._pipe.push({'filter':worker.filter,'run':$.proxy(worker.run,this)})},this));this.setup();this.initialize()}
Owl.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:window,fallbackEasing:'swing',slideTransition:'',info:!1,nestedItemSelector:!1,itemElement:'div',stageElement:'div',refreshClass:'owl-refresh',loadedClass:'owl-loaded',loadingClass:'owl-loading',rtlClass:'owl-rtl',responsiveClass:'owl-responsive',dragClass:'owl-drag',itemClass:'owl-item',stageClass:'owl-stage',stageOuterClass:'owl-stage-outer',grabClass:'owl-grab'};Owl.Width={Default:'default',Inner:'inner',Outer:'outer'};Owl.Type={Event:'event',State:'state'};Owl.Plugins={};Owl.Workers=[{filter:['width','settings'],run:function(){this._width=this.$element.width()}},{filter:['width','items','settings'],run:function(cache){cache.current=this._items&&this._items[this.relative(this._current)]}},{filter:['items','settings'],run:function(){this.$stage.children('.cloned').remove()}},{filter:['width','items','settings'],run:function(cache){var margin=this.settings.margin||'',grid=!this.settings.autoWidth,rtl=this.settings.rtl,css={'width':'auto','margin-left':rtl?margin:'','margin-right':rtl?'':margin};!grid&&this.$stage.children().css(css);cache.css=css}},{filter:['width','items','settings'],run:function(cache){var width=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,merge=null,iterator=this._items.length,grid=!this.settings.autoWidth,widths=[];cache.items={merge:!1,width:width};while(iterator--){merge=this._mergers[iterator];merge=this.settings.mergeFit&&Math.min(merge,this.settings.items)||merge;cache.items.merge=merge>1||cache.items.merge;widths[iterator]=!grid?this._items[iterator].width():width*merge}
this._widths=widths}},{filter:['items','settings'],run:function(){var clones=[],items=this._items,settings=this.settings,view=Math.max(settings.items*2,4),size=Math.ceil(items.length/2)*2,repeat=settings.loop&&items.length?settings.rewind?view:Math.max(view,size):0,append='',prepend='';repeat/=2;while(repeat>0){clones.push(this.normalize(clones.length/2,!0));append=append+items[clones[clones.length-1]][0].outerHTML;clones.push(this.normalize(items.length-1-(clones.length-1)/2,!0));prepend=items[clones[clones.length-1]][0].outerHTML+prepend;repeat-=1}
this._clones=clones;$(append).addClass('cloned').appendTo(this.$stage);$(prepend).addClass('cloned').prependTo(this.$stage)}},{filter:['width','items','settings'],run:function(){var rtl=this.settings.rtl?1:-1,size=this._clones.length+this._items.length,iterator=-1,previous=0,current=0,coordinates=[];while(++iterator<size){previous=coordinates[iterator-1]||0;current=this._widths[this.relative(iterator)]+this.settings.margin;coordinates.push(previous+current*rtl)}
this._coordinates=coordinates}},{filter:['width','items','settings'],run:function(){var padding=this.settings.stagePadding,coordinates=this._coordinates,css={'width':Math.ceil(Math.abs(coordinates[coordinates.length-1]))+padding*2,'padding-left':padding||'','padding-right':padding||''};this.$stage.css(css)}},{filter:['width','items','settings'],run:function(cache){var iterator=this._coordinates.length,grid=!this.settings.autoWidth,items=this.$stage.children();if(grid&&cache.items.merge){while(iterator--){cache.css.width=this._widths[this.relative(iterator)];items.eq(iterator).css(cache.css)}}else if(grid){cache.css.width=cache.items.width;items.css(cache.css)}}},{filter:['items'],run:function(){this._coordinates.length<1&&this.$stage.removeAttr('style')}},{filter:['width','items','settings'],run:function(cache){cache.current=cache.current?this.$stage.children().index(cache.current):0;cache.current=Math.max(this.minimum(),Math.min(this.maximum(),cache.current));this.reset(cache.current)}},{filter:['position'],run:function(){this.animate(this.coordinates(this._current))}},{filter:['width','position','items','settings'],run:function(){var rtl=this.settings.rtl?1:-1,padding=this.settings.stagePadding*2,begin=this.coordinates(this.current())+padding,end=begin+this.width()*rtl,inner,outer,matches=[],i,n;for(i=0,n=this._coordinates.length;i<n;i++){inner=this._coordinates[i-1]||0;outer=Math.abs(this._coordinates[i])+padding*rtl;if((this.op(inner,'<=',begin)&&(this.op(inner,'>',end)))||(this.op(outer,'<',begin)&&this.op(outer,'>',end))){matches.push(i)}}
this.$stage.children('.active').removeClass('active');this.$stage.children(':eq('+matches.join('), :eq(')+')').addClass('active');this.$stage.children('.center').removeClass('center');if(this.settings.center){this.$stage.children().eq(this.current()).addClass('center')}}}];Owl.prototype.initializeStage=function(){this.$stage=this.$element.find('.'+this.settings.stageClass);if(this.$stage.length){return}
this.$element.addClass(this.options.loadingClass);this.$stage=$('<'+this.settings.stageElement+'>',{"class":this.settings.stageClass}).wrap($('<div/>',{"class":this.settings.stageOuterClass}));this.$element.append(this.$stage.parent())};Owl.prototype.initializeItems=function(){var $items=this.$element.find('.owl-item');if($items.length){this._items=$items.get().map(function(item){return $(item)});this._mergers=this._items.map(function(){return 1});this.refresh();return}
this.replace(this.$element.children().not(this.$stage.parent()));if(this.isVisible()){this.refresh()}else{this.invalidate('width')}
this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)};Owl.prototype.initialize=function(){this.enter('initializing');this.trigger('initialize');this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl);if(this.settings.autoWidth&&!this.is('pre-loading')){var imgs,nestedSelector,width;imgs=this.$element.find('img');nestedSelector=this.settings.nestedItemSelector?'.'+this.settings.nestedItemSelector:undefined;width=this.$element.children(nestedSelector).width();if(imgs.length&&width<=0){this.preloadAutoWidthImages(imgs)}}
this.initializeStage();this.initializeItems();this.registerEventHandlers();this.leave('initializing');this.trigger('initialized')};Owl.prototype.isVisible=function(){return this.settings.checkVisibility?this.$element.is(':visible'):!0};Owl.prototype.setup=function(){var viewport=this.viewport(),overwrites=this.options.responsive,match=-1,settings=null;if(!overwrites){settings=$.extend({},this.options)}else{$.each(overwrites,function(breakpoint){if(breakpoint<=viewport&&breakpoint>match){match=Number(breakpoint)}});settings=$.extend({},this.options,overwrites[match]);if(typeof settings.stagePadding==='function'){settings.stagePadding=settings.stagePadding()}
delete settings.responsive;if(settings.responsiveClass){this.$element.attr('class',this.$element.attr('class').replace(new RegExp('('+this.options.responsiveClass+'-)\\S+\\s','g'),'$1'+match))}}
this.trigger('change',{property:{name:'settings',value:settings}});this._breakpoint=match;this.settings=settings;this.invalidate('settings');this.trigger('changed',{property:{name:'settings',value:this.settings}})};Owl.prototype.optionsLogic=function(){if(this.settings.autoWidth){this.settings.stagePadding=!1;this.settings.merge=!1}};Owl.prototype.prepare=function(item){var event=this.trigger('prepare',{content:item});if(!event.data){event.data=$('<'+this.settings.itemElement+'/>').addClass(this.options.itemClass).append(item)}
this.trigger('prepared',{content:event.data});return event.data};Owl.prototype.update=function(){var i=0,n=this._pipe.length,filter=$.proxy(function(p){return this[p]},this._invalidated),cache={};while(i<n){if(this._invalidated.all||$.grep(this._pipe[i].filter,filter).length>0){this._pipe[i].run(cache)}
i++}
this._invalidated={};!this.is('valid')&&this.enter('valid')};Owl.prototype.width=function(dimension){dimension=dimension||Owl.Width.Default;switch(dimension){case Owl.Width.Inner:case Owl.Width.Outer:return this._width;default:return this._width-this.settings.stagePadding*2+this.settings.margin}};Owl.prototype.refresh=function(){this.enter('refreshing');this.trigger('refresh');this.setup();this.optionsLogic();this.$element.addClass(this.options.refreshClass);this.update();this.$element.removeClass(this.options.refreshClass);this.leave('refreshing');this.trigger('refreshed')};Owl.prototype.onThrottledResize=function(){window.clearTimeout(this.resizeTimer);this.resizeTimer=window.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)};Owl.prototype.onResize=function(){if(!this._items.length){return!1}
if(this._width===this.$element.width()){return!1}
if(!this.isVisible()){return!1}
this.enter('resizing');if(this.trigger('resize').isDefaultPrevented()){this.leave('resizing');return!1}
this.invalidate('width');this.refresh();this.leave('resizing');this.trigger('resized')};Owl.prototype.registerEventHandlers=function(){if($.support.transition){this.$stage.on($.support.transition.end+'.owl.core',$.proxy(this.onTransitionEnd,this))}
if(this.settings.responsive!==!1){this.on(window,'resize',this._handlers.onThrottledResize)}
if(this.settings.mouseDrag){this.$element.addClass(this.options.dragClass);this.$stage.on('mousedown.owl.core',$.proxy(this.onDragStart,this));this.$stage.on('dragstart.owl.core selectstart.owl.core',function(){return!1})}
if(this.settings.touchDrag){this.$stage.on('touchstart.owl.core',$.proxy(this.onDragStart,this));this.$stage.on('touchcancel.owl.core',$.proxy(this.onDragEnd,this))}};Owl.prototype.onDragStart=function(event){var stage=null;if(event.which===3){return}
if($.support.transform){stage=this.$stage.css('transform').replace(/.*\(|\)| /g,'').split(',');stage={x:stage[stage.length===16?12:4],y:stage[stage.length===16?13:5]}}else{stage=this.$stage.position();stage={x:this.settings.rtl?stage.left+this.$stage.width()-this.width()+this.settings.margin:stage.left,y:stage.top}}
if(this.is('animating')){$.support.transform?this.animate(stage.x):this.$stage.stop()
this.invalidate('position')}
this.$element.toggleClass(this.options.grabClass,event.type==='mousedown');this.speed(0);this._drag.time=new Date().getTime();this._drag.target=$(event.target);this._drag.stage.start=stage;this._drag.stage.current=stage;this._drag.pointer=this.pointer(event);$(document).on('mouseup.owl.core touchend.owl.core',$.proxy(this.onDragEnd,this));$(document).one('mousemove.owl.core touchmove.owl.core',$.proxy(function(event){var delta=this.difference(this._drag.pointer,this.pointer(event));$(document).on('mousemove.owl.core touchmove.owl.core',$.proxy(this.onDragMove,this));if(Math.abs(delta.x)<Math.abs(delta.y)&&this.is('valid')){return}
event.preventDefault();this.enter('dragging');this.trigger('drag')},this))};Owl.prototype.onDragMove=function(event){var minimum=null,maximum=null,pull=null,delta=this.difference(this._drag.pointer,this.pointer(event)),stage=this.difference(this._drag.stage.start,delta);if(!this.is('dragging')){return}
event.preventDefault();if(this.settings.loop){minimum=this.coordinates(this.minimum());maximum=this.coordinates(this.maximum()+1)-minimum;stage.x=(((stage.x-minimum)%maximum+maximum)%maximum)+minimum}else{minimum=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum());maximum=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum());pull=this.settings.pullDrag?-1*delta.x/5:0;stage.x=Math.max(Math.min(stage.x,minimum+pull),maximum+pull)}
this._drag.stage.current=stage;this.animate(stage.x)};Owl.prototype.onDragEnd=function(event){var delta=this.difference(this._drag.pointer,this.pointer(event)),stage=this._drag.stage.current,direction=delta.x>0^this.settings.rtl?'left':'right';$(document).off('.owl.core');this.$element.removeClass(this.options.grabClass);if(delta.x!==0&&this.is('dragging')||!this.is('valid')){this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed);this.current(this.closest(stage.x,delta.x!==0?direction:this._drag.direction));this.invalidate('position');this.update();this._drag.direction=direction;if(Math.abs(delta.x)>3||new Date().getTime()-this._drag.time>300){this._drag.target.one('click.owl.core',function(){return!1})}}
if(!this.is('dragging')){return}
this.leave('dragging');this.trigger('dragged')};Owl.prototype.closest=function(coordinate,direction){var position=-1,pull=30,width=this.width(),coordinates=this.coordinates();if(!this.settings.freeDrag){$.each(coordinates,$.proxy(function(index,value){if(direction==='left'&&coordinate>value-pull&&coordinate<value+pull){position=index}else if(direction==='right'&&coordinate>value-width-pull&&coordinate<value-width+pull){position=index+1}else if(this.op(coordinate,'<',value)&&this.op(coordinate,'>',coordinates[index+1]!==undefined?coordinates[index+1]:value-width)){position=direction==='left'?index+1:index}
return position===-1},this))}
if(!this.settings.loop){if(this.op(coordinate,'>',coordinates[this.minimum()])){position=coordinate=this.minimum()}else if(this.op(coordinate,'<',coordinates[this.maximum()])){position=coordinate=this.maximum()}}
return position};Owl.prototype.animate=function(coordinate){var animate=this.speed()>0;this.is('animating')&&this.onTransitionEnd();if(animate){this.enter('animating');this.trigger('translate')}
if($.support.transform3d&&$.support.transition){this.$stage.css({transform:'translate3d('+coordinate+'px,0px,0px)',transition:(this.speed()/1000)+'s'+(this.settings.slideTransition?' '+this.settings.slideTransition:'')})}else if(animate){this.$stage.animate({left:coordinate+'px'},this.speed(),this.settings.fallbackEasing,$.proxy(this.onTransitionEnd,this))}else{this.$stage.css({left:coordinate+'px'})}};Owl.prototype.is=function(state){return this._states.current[state]&&this._states.current[state]>0};Owl.prototype.current=function(position){if(position===undefined){return this._current}
if(this._items.length===0){return undefined}
position=this.normalize(position);if(this._current!==position){var event=this.trigger('change',{property:{name:'position',value:position}});if(event.data!==undefined){position=this.normalize(event.data)}
this._current=position;this.invalidate('position');this.trigger('changed',{property:{name:'position',value:this._current}})}
return this._current};Owl.prototype.invalidate=function(part){if($.type(part)==='string'){this._invalidated[part]=!0;this.is('valid')&&this.leave('valid')}
return $.map(this._invalidated,function(v,i){return i})};Owl.prototype.reset=function(position){position=this.normalize(position);if(position===undefined){return}
this._speed=0;this._current=position;this.suppress(['translate','translated']);this.animate(this.coordinates(position));this.release(['translate','translated'])};Owl.prototype.normalize=function(position,relative){var n=this._items.length,m=relative?0:this._clones.length;if(!this.isNumeric(position)||n<1){position=undefined}else if(position<0||position>=n+m){position=((position-m/2)%n+n)%n+m/2}
return position};Owl.prototype.relative=function(position){position-=this._clones.length/2;return this.normalize(position,!0)};Owl.prototype.maximum=function(relative){var settings=this.settings,maximum=this._coordinates.length,iterator,reciprocalItemsWidth,elementWidth;if(settings.loop){maximum=this._clones.length/2+this._items.length-1}else if(settings.autoWidth||settings.merge){iterator=this._items.length;if(iterator){reciprocalItemsWidth=this._items[--iterator].width();elementWidth=this.$element.width();while(iterator--){reciprocalItemsWidth+=this._items[iterator].width()+this.settings.margin;if(reciprocalItemsWidth>elementWidth){break}}}
maximum=iterator+1}else if(settings.center){maximum=this._items.length-1}else{maximum=this._items.length-settings.items}
if(relative){maximum-=this._clones.length/2}
return Math.max(maximum,0)};Owl.prototype.minimum=function(relative){return relative?0:this._clones.length/2};Owl.prototype.items=function(position){if(position===undefined){return this._items.slice()}
position=this.normalize(position,!0);return this._items[position]};Owl.prototype.mergers=function(position){if(position===undefined){return this._mergers.slice()}
position=this.normalize(position,!0);return this._mergers[position]};Owl.prototype.clones=function(position){var odd=this._clones.length/2,even=odd+this._items.length,map=function(index){return index%2===0?even+index/2:odd-(index+1)/2};if(position===undefined){return $.map(this._clones,function(v,i){return map(i)})}
return $.map(this._clones,function(v,i){return v===position?map(i):null})};Owl.prototype.speed=function(speed){if(speed!==undefined){this._speed=speed}
return this._speed};Owl.prototype.coordinates=function(position){var multiplier=1,newPosition=position-1,coordinate;if(position===undefined){return $.map(this._coordinates,$.proxy(function(coordinate,index){return this.coordinates(index)},this))}
if(this.settings.center){if(this.settings.rtl){multiplier=-1;newPosition=position+1}
coordinate=this._coordinates[position];coordinate+=(this.width()-coordinate+(this._coordinates[newPosition]||0))/2*multiplier}else{coordinate=this._coordinates[newPosition]||0}
coordinate=Math.ceil(coordinate);return coordinate};Owl.prototype.duration=function(from,to,factor){if(factor===0){return 0}
return Math.min(Math.max(Math.abs(to-from),1),6)*Math.abs((factor||this.settings.smartSpeed))};Owl.prototype.to=function(position,speed){var current=this.current(),revert=null,distance=position-this.relative(current),direction=(distance>0)-(distance<0),items=this._items.length,minimum=this.minimum(),maximum=this.maximum();if(this.settings.loop){if(!this.settings.rewind&&Math.abs(distance)>items/2){distance+=direction*-1*items}
position=current+distance;revert=((position-minimum)%items+items)%items+minimum;if(revert!==position&&revert-distance<=maximum&&revert-distance>0){current=revert-distance;position=revert;this.reset(current)}}else if(this.settings.rewind){maximum+=1;position=(position%maximum+maximum)%maximum}else{position=Math.max(minimum,Math.min(maximum,position))}
this.speed(this.duration(current,position,speed));this.current(position);if(this.isVisible()){this.update()}};Owl.prototype.next=function(speed){speed=speed||!1;this.to(this.relative(this.current())+1,speed)};Owl.prototype.prev=function(speed){speed=speed||!1;this.to(this.relative(this.current())-1,speed)};Owl.prototype.onTransitionEnd=function(event){if(event!==undefined){event.stopPropagation();if((event.target||event.srcElement||event.originalTarget)!==this.$stage.get(0)){return!1}}
this.leave('animating');this.trigger('translated')};Owl.prototype.viewport=function(){var width;if(this.options.responsiveBaseElement!==window){width=$(this.options.responsiveBaseElement).width()}else if(window.innerWidth){width=window.innerWidth}else if(document.documentElement&&document.documentElement.clientWidth){width=document.documentElement.clientWidth}else{console.warn('Can not detect viewport width.')}
return width};Owl.prototype.replace=function(content){this.$stage.empty();this._items=[];if(content){content=(content instanceof jQuery)?content:$(content)}
if(this.settings.nestedItemSelector){content=content.find('.'+this.settings.nestedItemSelector)}
content.filter(function(){return this.nodeType===1}).each($.proxy(function(index,item){item=this.prepare(item);this.$stage.append(item);this._items.push(item);this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge')*1||1)},this));this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0);this.invalidate('items')};Owl.prototype.add=function(content,position){var current=this.relative(this._current);position=position===undefined?this._items.length:this.normalize(position,!0);content=content instanceof jQuery?content:$(content);this.trigger('add',{content:content,position:position});content=this.prepare(content);if(this._items.length===0||position===this._items.length){this._items.length===0&&this.$stage.append(content);this._items.length!==0&&this._items[position-1].after(content);this._items.push(content);this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge')*1||1)}else{this._items[position].before(content);this._items.splice(position,0,content);this._mergers.splice(position,0,content.find('[data-merge]').addBack('[data-merge]').attr('data-merge')*1||1)}
this._items[current]&&this.reset(this._items[current].index());this.invalidate('items');this.trigger('added',{content:content,position:position})};Owl.prototype.remove=function(position){position=this.normalize(position,!0);if(position===undefined){return}
this.trigger('remove',{content:this._items[position],position:position});this._items[position].remove();this._items.splice(position,1);this._mergers.splice(position,1);this.invalidate('items');this.trigger('removed',{content:null,position:position})};Owl.prototype.preloadAutoWidthImages=function(images){images.each($.proxy(function(i,element){this.enter('pre-loading');element=$(element);$(new Image()).one('load',$.proxy(function(e){element.attr('src',e.target.src);element.css('opacity',1);this.leave('pre-loading');!this.is('pre-loading')&&!this.is('initializing')&&this.refresh()},this)).attr('src',element.attr('src')||element.attr('data-src')||element.attr('data-src-retina'))},this))};Owl.prototype.destroy=function(){this.$element.off('.owl.core');this.$stage.off('.owl.core');$(document).off('.owl.core');if(this.settings.responsive!==!1){window.clearTimeout(this.resizeTimer);this.off(window,'resize',this._handlers.onThrottledResize)}
for(var i in this._plugins){this._plugins[i].destroy()}
this.$stage.children('.cloned').remove();this.$stage.unwrap();this.$stage.children().contents().unwrap();this.$stage.children().unwrap();this.$stage.remove();this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr('class',this.$element.attr('class').replace(new RegExp(this.options.responsiveClass+'-\\S+\\s','g'),'')).removeData('owl.carousel')};Owl.prototype.op=function(a,o,b){var rtl=this.settings.rtl;switch(o){case '<':return rtl?a>b:a<b;case '>':return rtl?a<b:a>b;case '>=':return rtl?a<=b:a>=b;case '<=':return rtl?a>=b:a<=b;default:break}};Owl.prototype.on=function(element,event,listener,capture){if(element.addEventListener){element.addEventListener(event,listener,capture)}else if(element.attachEvent){element.attachEvent('on'+event,listener)}};Owl.prototype.off=function(element,event,listener,capture){if(element.removeEventListener){element.removeEventListener(event,listener,capture)}else if(element.detachEvent){element.detachEvent('on'+event,listener)}};Owl.prototype.trigger=function(name,data,namespace,state,enter){var status={item:{count:this._items.length,index:this.current()}},handler=$.camelCase($.grep(['on',name,namespace],function(v){return v}).join('-').toLowerCase()),event=$.Event([name,'owl',namespace||'carousel'].join('.').toLowerCase(),$.extend({relatedTarget:this},status,data));if(!this._supress[name]){$.each(this._plugins,function(name,plugin){if(plugin.onTrigger){plugin.onTrigger(event)}});this.register({type:Owl.Type.Event,name:name});this.$element.trigger(event);if(this.settings&&typeof this.settings[handler]==='function'){this.settings[handler].call(this,event)}}
return event};Owl.prototype.enter=function(name){$.each([name].concat(this._states.tags[name]||[]),$.proxy(function(i,name){if(this._states.current[name]===undefined){this._states.current[name]=0}
this._states.current[name]++},this))};Owl.prototype.leave=function(name){$.each([name].concat(this._states.tags[name]||[]),$.proxy(function(i,name){this._states.current[name]--},this))};Owl.prototype.register=function(object){if(object.type===Owl.Type.Event){if(!$.event.special[object.name]){$.event.special[object.name]={}}
if(!$.event.special[object.name].owl){var _default=$.event.special[object.name]._default;$.event.special[object.name]._default=function(e){if(_default&&_default.apply&&(!e.namespace||e.namespace.indexOf('owl')===-1)){return _default.apply(this,arguments)}
return e.namespace&&e.namespace.indexOf('owl')>-1};$.event.special[object.name].owl=!0}}else if(object.type===Owl.Type.State){if(!this._states.tags[object.name]){this._states.tags[object.name]=object.tags}else{this._states.tags[object.name]=this._states.tags[object.name].concat(object.tags)}
this._states.tags[object.name]=$.grep(this._states.tags[object.name],$.proxy(function(tag,i){return $.inArray(tag,this._states.tags[object.name])===i},this))}};Owl.prototype.suppress=function(events){$.each(events,$.proxy(function(index,event){this._supress[event]=!0},this))};Owl.prototype.release=function(events){$.each(events,$.proxy(function(index,event){delete this._supress[event]},this))};Owl.prototype.pointer=function(event){var result={x:null,y:null};event=event.originalEvent||event||window.event;event=event.touches&&event.touches.length?event.touches[0]:event.changedTouches&&event.changedTouches.length?event.changedTouches[0]:event;if(event.pageX){result.x=event.pageX;result.y=event.pageY}else{result.x=event.clientX;result.y=event.clientY}
return result};Owl.prototype.isNumeric=function(number){return!isNaN(parseFloat(number))};Owl.prototype.difference=function(first,second){return{x:first.x-second.x,y:first.y-second.y}};$.fn.owlCarousel=function(option){var args=Array.prototype.slice.call(arguments,1);return this.each(function(){var $this=$(this),data=$this.data('owl.carousel');if(!data){data=new Owl(this,typeof option=='object'&&option);$this.data('owl.carousel',data);$.each(['next','prev','to','destroy','refresh','replace','add','remove'],function(i,event){data.register({type:Owl.Type.Event,name:event});data.$element.on(event+'.owl.carousel.core',$.proxy(function(e){if(e.namespace&&e.relatedTarget!==this){this.suppress([event]);data[event].apply(this,[].slice.call(arguments,1));this.release([event])}},data))})}
if(typeof option=='string'&&option.charAt(0)!=='_'){data[option].apply(data,args)}})};$.fn.owlCarousel.Constructor=Owl})(window.Zepto||window.jQuery,window,document);
/**
 * AutoRefresh Plugin
 * @version 2.3.4
 * @author Artus Kolanowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($,window,document,undefined){var AutoRefresh=function(carousel){this._core=carousel;this._interval=null;this._visible=null;this._handlers={'initialized.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.autoRefresh){this.watch()}},this)};this._core.options=$.extend({},AutoRefresh.Defaults,this._core.options);this._core.$element.on(this._handlers)};AutoRefresh.Defaults={autoRefresh:!0,autoRefreshInterval:500};AutoRefresh.prototype.watch=function(){if(this._interval){return}
this._visible=this._core.isVisible();this._interval=window.setInterval($.proxy(this.refresh,this),this._core.settings.autoRefreshInterval)};AutoRefresh.prototype.refresh=function(){if(this._core.isVisible()===this._visible){return}
this._visible=!this._visible;this._core.$element.toggleClass('owl-hidden',!this._visible);this._visible&&(this._core.invalidate('width')&&this._core.refresh())};AutoRefresh.prototype.destroy=function(){var handler,property;window.clearInterval(this._interval);for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler])}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null)}};$.fn.owlCarousel.Constructor.Plugins.AutoRefresh=AutoRefresh})(window.Zepto||window.jQuery,window,document);
/**
 * Lazy Plugin
 * @version 2.3.4
 * @author Bartosz Wojciechowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($,window,document,undefined){var Lazy=function(carousel){this._core=carousel;this._loaded=[];this._handlers={'initialized.owl.carousel change.owl.carousel resized.owl.carousel':$.proxy(function(e){if(!e.namespace){return}
if(!this._core.settings||!this._core.settings.lazyLoad){return}
if((e.property&&e.property.name=='position')||e.type=='initialized'){var settings=this._core.settings,n=(settings.center&&Math.ceil(settings.items/2)||settings.items),i=((settings.center&&n*-1)||0),position=(e.property&&e.property.value!==undefined?e.property.value:this._core.current())+i,clones=this._core.clones().length,load=$.proxy(function(i,v){this.load(v)},this);if(settings.lazyLoadEager>0){n+=settings.lazyLoadEager;if(settings.loop){position-=settings.lazyLoadEager;n++}}
while(i++<n){this.load(clones/2+this._core.relative(position));clones&&$.each(this._core.clones(this._core.relative(position)),load);position++}}},this)};this._core.options=$.extend({},Lazy.Defaults,this._core.options);this._core.$element.on(this._handlers)};Lazy.Defaults={lazyLoad:!1,lazyLoadEager:0};Lazy.prototype.load=function(position){var $item=this._core.$stage.children().eq(position),$elements=$item&&$item.find('.owl-lazy');if(!$elements||$.inArray($item.get(0),this._loaded)>-1){return}
$elements.each($.proxy(function(index,element){var $element=$(element),image,url=(window.devicePixelRatio>1&&$element.attr('data-src-retina'))||$element.attr('data-src')||$element.attr('data-srcset');this._core.trigger('load',{element:$element,url:url},'lazy');if($element.is('img')){$element.one('load.owl.lazy',$.proxy(function(){$element.css('opacity',1);this._core.trigger('loaded',{element:$element,url:url},'lazy')},this)).attr('src',url)}else if($element.is('source')){$element.one('load.owl.lazy',$.proxy(function(){this._core.trigger('loaded',{element:$element,url:url},'lazy')},this)).attr('srcset',url)}else{image=new Image();image.onload=$.proxy(function(){$element.css({'background-image':'url("'+url+'")','opacity':'1'});this._core.trigger('loaded',{element:$element,url:url},'lazy')},this);image.src=url}},this));this._loaded.push($item.get(0))};Lazy.prototype.destroy=function(){var handler,property;for(handler in this.handlers){this._core.$element.off(handler,this.handlers[handler])}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null)}};$.fn.owlCarousel.Constructor.Plugins.Lazy=Lazy})(window.Zepto||window.jQuery,window,document);
/**
 * AutoHeight Plugin
 * @version 2.3.4
 * @author Bartosz Wojciechowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($,window,document,undefined){var AutoHeight=function(carousel){this._core=carousel;this._previousHeight=null;this._handlers={'initialized.owl.carousel refreshed.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.autoHeight){this.update()}},this),'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.autoHeight&&e.property.name==='position'){this.update()}},this),'loaded.owl.lazy':$.proxy(function(e){if(e.namespace&&this._core.settings.autoHeight&&e.element.closest('.'+this._core.settings.itemClass).index()===this._core.current()){this.update()}},this)};this._core.options=$.extend({},AutoHeight.Defaults,this._core.options);this._core.$element.on(this._handlers);this._intervalId=null;var refThis=this;$(window).on('load',function(){if(refThis._core.settings.autoHeight){refThis.update()}});$(window).resize(function(){if(refThis._core.settings.autoHeight){if(refThis._intervalId!=null){clearTimeout(refThis._intervalId)}
refThis._intervalId=setTimeout(function(){refThis.update()},250)}})};AutoHeight.Defaults={autoHeight:!1,autoHeightClass:'owl-height'};AutoHeight.prototype.update=function(){var start=this._core._current,end=start+this._core.settings.items,lazyLoadEnabled=this._core.settings.lazyLoad,visible=this._core.$stage.children().toArray().slice(start,end),heights=[],maxheight=0;$.each(visible,function(index,item){heights.push($(item).height())});maxheight=Math.max.apply(null,heights);if(maxheight<=1&&lazyLoadEnabled&&this._previousHeight){maxheight=this._previousHeight}
this._previousHeight=maxheight;this._core.$stage.parent().height(maxheight).addClass(this._core.settings.autoHeightClass)};AutoHeight.prototype.destroy=function(){var handler,property;for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler])}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!=='function'&&(this[property]=null)}};$.fn.owlCarousel.Constructor.Plugins.AutoHeight=AutoHeight})(window.Zepto||window.jQuery,window,document);
/**
 * Video Plugin
 * @version 2.3.4
 * @author Bartosz Wojciechowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($,window,document,undefined){var Video=function(carousel){this._core=carousel;this._videos={};this._playing=null;this._handlers={'initialized.owl.carousel':$.proxy(function(e){if(e.namespace){this._core.register({type:'state',name:'playing',tags:['interacting']})}},this),'resize.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.video&&this.isInFullScreen()){e.preventDefault()}},this),'refreshed.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.is('resizing')){this._core.$stage.find('.cloned .owl-video-frame').remove()}},this),'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name==='position'&&this._playing){this.stop()}},this),'prepared.owl.carousel':$.proxy(function(e){if(!e.namespace){return}
var $element=$(e.content).find('.owl-video');if($element.length){$element.css('display','none');this.fetch($element,$(e.content))}},this)};this._core.options=$.extend({},Video.Defaults,this._core.options);this._core.$element.on(this._handlers);this._core.$element.on('click.owl.video','.owl-video-play-icon',$.proxy(function(e){this.play(e)},this))};Video.Defaults={video:!1,videoHeight:!1,videoWidth:!1};Video.prototype.fetch=function(target,item){var type=(function(){if(target.attr('data-vimeo-id')){return'vimeo'}else if(target.attr('data-vzaar-id')){return'vzaar'}else{return'youtube'}})(),id=target.attr('data-vimeo-id')||target.attr('data-youtube-id')||target.attr('data-vzaar-id'),width=target.attr('data-width')||this._core.settings.videoWidth,height=target.attr('data-height')||this._core.settings.videoHeight,url=target.attr('href');if(url){id=url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);if(id[3].indexOf('youtu')>-1){type='youtube'}else if(id[3].indexOf('vimeo')>-1){type='vimeo'}else if(id[3].indexOf('vzaar')>-1){type='vzaar'}else{throw new Error('Video URL not supported.')}
id=id[6]}else{throw new Error('Missing video URL.')}
this._videos[url]={type:type,id:id,width:width,height:height};item.attr('data-video',url);this.thumbnail(target,this._videos[url])};Video.prototype.thumbnail=function(target,video){var tnLink,icon,path,dimensions=video.width&&video.height?'width:'+video.width+'px;height:'+video.height+'px;':'',customTn=target.find('img'),srcType='src',lazyClass='',settings=this._core.settings,create=function(path){icon='<div class="owl-video-play-icon"></div>';if(settings.lazyLoad){tnLink=$('<div/>',{"class":'owl-video-tn '+lazyClass,"srcType":path})}else{tnLink=$('<div/>',{"class":"owl-video-tn","style":'opacity:1;background-image:url('+path+')'})}
target.after(tnLink);target.after(icon)};target.wrap($('<div/>',{"class":"owl-video-wrapper","style":dimensions}));if(this._core.settings.lazyLoad){srcType='data-src';lazyClass='owl-lazy'}
if(customTn.length){create(customTn.attr(srcType));customTn.remove();return!1}
if(video.type==='youtube'){path="//img.youtube.com/vi/"+video.id+"/hqdefault.jpg";create(path)}else if(video.type==='vimeo'){$.ajax({type:'GET',url:'//vimeo.com/api/v2/video/'+video.id+'.json',jsonp:'callback',dataType:'jsonp',success:function(data){path=data[0].thumbnail_large;create(path)}})}else if(video.type==='vzaar'){$.ajax({type:'GET',url:'//vzaar.com/api/videos/'+video.id+'.json',jsonp:'callback',dataType:'jsonp',success:function(data){path=data.framegrab_url;create(path)}})}};Video.prototype.stop=function(){this._core.trigger('stop',null,'video');this._playing.find('.owl-video-frame').remove();this._playing.removeClass('owl-video-playing');this._playing=null;this._core.leave('playing');this._core.trigger('stopped',null,'video')};Video.prototype.play=function(event){var target=$(event.target),item=target.closest('.'+this._core.settings.itemClass),video=this._videos[item.attr('data-video')],width=video.width||'100%',height=video.height||this._core.$stage.height(),html,iframe;if(this._playing){return}
this._core.enter('playing');this._core.trigger('play',null,'video');item=this._core.items(this._core.relative(item.index()));this._core.reset(item.index());html=$('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>');html.attr('height',height);html.attr('width',width);if(video.type==='youtube'){html.attr('src','//www.youtube.com/embed/'+video.id+'?autoplay=1&rel=0&v='+video.id)}else if(video.type==='vimeo'){html.attr('src','//player.vimeo.com/video/'+video.id+'?autoplay=1')}else if(video.type==='vzaar'){html.attr('src','//view.vzaar.com/'+video.id+'/player?autoplay=true')}
iframe=$(html).wrap('<div class="owl-video-frame" />').insertAfter(item.find('.owl-video'));this._playing=item.addClass('owl-video-playing')};Video.prototype.isInFullScreen=function(){var element=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement;return element&&$(element).parent().hasClass('owl-video-frame')};Video.prototype.destroy=function(){var handler,property;this._core.$element.off('click.owl.video');for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler])}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null)}};$.fn.owlCarousel.Constructor.Plugins.Video=Video})(window.Zepto||window.jQuery,window,document);
/**
 * Animate Plugin
 * @version 2.3.4
 * @author Bartosz Wojciechowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($,window,document,undefined){var Animate=function(scope){this.core=scope;this.core.options=$.extend({},Animate.Defaults,this.core.options);this.swapping=!0;this.previous=undefined;this.next=undefined;this.handlers={'change.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name=='position'){this.previous=this.core.current();this.next=e.property.value}},this),'drag.owl.carousel dragged.owl.carousel translated.owl.carousel':$.proxy(function(e){if(e.namespace){this.swapping=e.type=='translated'}},this),'translate.owl.carousel':$.proxy(function(e){if(e.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)){this.swap()}},this)};this.core.$element.on(this.handlers)};Animate.Defaults={animateOut:!1,animateIn:!1};Animate.prototype.swap=function(){if(this.core.settings.items!==1){return}
if(!$.support.animation||!$.support.transition){return}
this.core.speed(0);var left,clear=$.proxy(this.clear,this),previous=this.core.$stage.children().eq(this.previous),next=this.core.$stage.children().eq(this.next),incoming=this.core.settings.animateIn,outgoing=this.core.settings.animateOut;if(this.core.current()===this.previous){return}
if(outgoing){left=this.core.coordinates(this.previous)-this.core.coordinates(this.next);previous.one($.support.animation.end,clear).css({'left':left+'px'}).addClass('animated owl-animated-out').addClass(outgoing)}
if(incoming){next.one($.support.animation.end,clear).addClass('animated owl-animated-in').addClass(incoming)}};Animate.prototype.clear=function(e){$(e.target).css({'left':''}).removeClass('animated owl-animated-out owl-animated-in').removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut);this.core.onTransitionEnd()};Animate.prototype.destroy=function(){var handler,property;for(handler in this.handlers){this.core.$element.off(handler,this.handlers[handler])}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null)}};$.fn.owlCarousel.Constructor.Plugins.Animate=Animate})(window.Zepto||window.jQuery,window,document);
/**
 * Autoplay Plugin
 * @version 2.3.4
 * @author Bartosz Wojciechowski
 * @author Artus Kolanowski
 * @author David Deutsch
 * @author Tom De Caluwé
 * @license The MIT License (MIT)
 */
;(function($,window,document,undefined){var Autoplay=function(carousel){this._core=carousel;this._call=null;this._time=0;this._timeout=0;this._paused=!0;this._handlers={'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name==='settings'){if(this._core.settings.autoplay){this.play()}else{this.stop()}}else if(e.namespace&&e.property.name==='position'&&this._paused){this._time=0}},this),'initialized.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.autoplay){this.play()}},this),'play.owl.autoplay':$.proxy(function(e,t,s){if(e.namespace){this.play(t,s)}},this),'stop.owl.autoplay':$.proxy(function(e){if(e.namespace){this.stop()}},this),'mouseover.owl.autoplay':$.proxy(function(){if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){this.pause()}},this),'mouseleave.owl.autoplay':$.proxy(function(){if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){this.play()}},this),'touchstart.owl.core':$.proxy(function(){if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){this.pause()}},this),'touchend.owl.core':$.proxy(function(){if(this._core.settings.autoplayHoverPause){this.play()}},this)};this._core.$element.on(this._handlers);this._core.options=$.extend({},Autoplay.Defaults,this._core.options)};Autoplay.Defaults={autoplay:!1,autoplayTimeout:5000,autoplayHoverPause:!1,autoplaySpeed:!1};Autoplay.prototype._next=function(speed){this._call=window.setTimeout($.proxy(this._next,this,speed),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read());if(this._core.is('interacting')||document.hidden){return}
this._core.next(speed||this._core.settings.autoplaySpeed)}
Autoplay.prototype.read=function(){return new Date().getTime()-this._time};Autoplay.prototype.play=function(timeout,speed){var elapsed;if(!this._core.is('rotating')){this._core.enter('rotating')}
timeout=timeout||this._core.settings.autoplayTimeout;elapsed=Math.min(this._time%(this._timeout||timeout),timeout);if(this._paused){this._time=this.read();this._paused=!1}else{window.clearTimeout(this._call)}
this._time+=this.read()%timeout-elapsed;this._timeout=timeout;this._call=window.setTimeout($.proxy(this._next,this,speed),timeout-elapsed)};Autoplay.prototype.stop=function(){if(this._core.is('rotating')){this._time=0;this._paused=!0;window.clearTimeout(this._call);this._core.leave('rotating')}};Autoplay.prototype.pause=function(){if(this._core.is('rotating')&&!this._paused){this._time=this.read();this._paused=!0;window.clearTimeout(this._call)}};Autoplay.prototype.destroy=function(){var handler,property;this.stop();for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler])}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null)}};$.fn.owlCarousel.Constructor.Plugins.autoplay=Autoplay})(window.Zepto||window.jQuery,window,document);
/**
 * Navigation Plugin
 * @version 2.3.4
 * @author Artus Kolanowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($,window,document,undefined){'use strict';var Navigation=function(carousel){this._core=carousel;this._initialized=!1;this._pages=[];this._controls={};this._templates=[];this.$element=this._core.$element;this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to};this._handlers={'prepared.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.dotsData){this._templates.push('<div class="'+this._core.settings.dotClass+'">'+$(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot')+'</div>')}},this),'added.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.dotsData){this._templates.splice(e.position,0,this._templates.pop())}},this),'remove.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.dotsData){this._templates.splice(e.position,1)}},this),'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name=='position'){this.draw()}},this),'initialized.owl.carousel':$.proxy(function(e){if(e.namespace&&!this._initialized){this._core.trigger('initialize',null,'navigation');this.initialize();this.update();this.draw();this._initialized=!0;this._core.trigger('initialized',null,'navigation')}},this),'refreshed.owl.carousel':$.proxy(function(e){if(e.namespace&&this._initialized){this._core.trigger('refresh',null,'navigation');this.update();this.draw();this._core.trigger('refreshed',null,'navigation')}},this)};this._core.options=$.extend({},Navigation.Defaults,this._core.options);this.$element.on(this._handlers)};Navigation.Defaults={nav:!1,navText:['<span aria-label="'+'Previous'+'">&#x2039;</span>','<span aria-label="'+'Next'+'">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:'owl-nav',navClass:['owl-prev','owl-next'],slideBy:1,dotClass:'owl-dot',dotsClass:'owl-dots',dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1};Navigation.prototype.initialize=function(){var override,settings=this._core.settings;this._controls.$relative=(settings.navContainer?$(settings.navContainer):$('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');this._controls.$previous=$('<'+settings.navElement+'>').addClass(settings.navClass[0]).html(settings.navText[0]).prependTo(this._controls.$relative).on('click',$.proxy(function(e){this.prev(settings.navSpeed)},this));this._controls.$next=$('<'+settings.navElement+'>').addClass(settings.navClass[1]).html(settings.navText[1]).appendTo(this._controls.$relative).on('click',$.proxy(function(e){this.next(settings.navSpeed)},this));if(!settings.dotsData){this._templates=[$('<button role="button">').addClass(settings.dotClass).append($('<span>')).prop('outerHTML')]}
this._controls.$absolute=(settings.dotsContainer?$(settings.dotsContainer):$('<div>').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled');this._controls.$absolute.on('click','button',$.proxy(function(e){var index=$(e.target).parent().is(this._controls.$absolute)?$(e.target).index():$(e.target).parent().index();e.preventDefault();this.to(index,settings.dotsSpeed)},this));for(override in this._overrides){this._core[override]=$.proxy(this[override],this)}};Navigation.prototype.destroy=function(){var handler,control,property,override,settings;settings=this._core.settings;for(handler in this._handlers){this.$element.off(handler,this._handlers[handler])}
for(control in this._controls){if(control==='$relative'&&settings.navContainer){this._controls[control].html('')}else{this._controls[control].remove()}}
for(override in this.overides){this._core[override]=this._overrides[override]}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null)}};Navigation.prototype.update=function(){var i,j,k,lower=this._core.clones().length/2,upper=lower+this._core.items().length,maximum=this._core.maximum(!0),settings=this._core.settings,size=settings.center||settings.autoWidth||settings.dotsData?1:settings.dotsEach||settings.items;if(settings.slideBy!=='page'){settings.slideBy=Math.min(settings.slideBy,settings.items)}
if(settings.dots||settings.slideBy=='page'){this._pages=[];for(i=lower,j=0,k=0;i<upper;i++){if(j>=size||j===0){this._pages.push({start:Math.min(maximum,i-lower),end:i-lower+size-1});if(Math.min(maximum,i-lower)===maximum){break}
j=0,++k}
j+=this._core.mergers(this._core.relative(i))}}};Navigation.prototype.draw=function(){var difference,settings=this._core.settings,disabled=this._core.items().length<=settings.items,index=this._core.relative(this._core.current()),loop=settings.loop||settings.rewind;this._controls.$relative.toggleClass('disabled',!settings.nav||disabled);if(settings.nav){this._controls.$previous.toggleClass('disabled',!loop&&index<=this._core.minimum(!0));this._controls.$next.toggleClass('disabled',!loop&&index>=this._core.maximum(!0))}
this._controls.$absolute.toggleClass('disabled',!settings.dots||disabled);if(settings.dots){difference=this._pages.length-this._controls.$absolute.children().length;if(settings.dotsData&&difference!==0){this._controls.$absolute.html(this._templates.join(''))}else if(difference>0){this._controls.$absolute.append(new Array(difference+1).join(this._templates[0]))}else if(difference<0){this._controls.$absolute.children().slice(difference).remove()}
this._controls.$absolute.find('.active').removeClass('active');this._controls.$absolute.children().eq($.inArray(this.current(),this._pages)).addClass('active')}};Navigation.prototype.onTrigger=function(event){var settings=this._core.settings;event.page={index:$.inArray(this.current(),this._pages),count:this._pages.length,size:settings&&(settings.center||settings.autoWidth||settings.dotsData?1:settings.dotsEach||settings.items)}};Navigation.prototype.current=function(){var current=this._core.relative(this._core.current());return $.grep(this._pages,$.proxy(function(page,index){return page.start<=current&&page.end>=current},this)).pop()};Navigation.prototype.getPosition=function(successor){var position,length,settings=this._core.settings;if(settings.slideBy=='page'){position=$.inArray(this.current(),this._pages);length=this._pages.length;successor?++position:--position;position=this._pages[((position%length)+length)%length].start}else{position=this._core.relative(this._core.current());length=this._core.items().length;successor?position+=settings.slideBy:position-=settings.slideBy}
return position};Navigation.prototype.next=function(speed){$.proxy(this._overrides.to,this._core)(this.getPosition(!0),speed)};Navigation.prototype.prev=function(speed){$.proxy(this._overrides.to,this._core)(this.getPosition(!1),speed)};Navigation.prototype.to=function(position,speed,standard){var length;if(!standard&&this._pages.length){length=this._pages.length;$.proxy(this._overrides.to,this._core)(this._pages[((position%length)+length)%length].start,speed)}else{$.proxy(this._overrides.to,this._core)(position,speed)}};$.fn.owlCarousel.Constructor.Plugins.Navigation=Navigation})(window.Zepto||window.jQuery,window,document);
/**
 * Hash Plugin
 * @version 2.3.4
 * @author Artus Kolanowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($,window,document,undefined){'use strict';var Hash=function(carousel){this._core=carousel;this._hashes={};this.$element=this._core.$element;this._handlers={'initialized.owl.carousel':$.proxy(function(e){if(e.namespace&&this._core.settings.startPosition==='URLHash'){$(window).trigger('hashchange.owl.navigation')}},this),'prepared.owl.carousel':$.proxy(function(e){if(e.namespace){var hash=$(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash');if(!hash){return}
this._hashes[hash]=e.content}},this),'changed.owl.carousel':$.proxy(function(e){if(e.namespace&&e.property.name==='position'){var current=this._core.items(this._core.relative(this._core.current())),hash=$.map(this._hashes,function(item,hash){return item===current?hash:null}).join();if(!hash||window.location.hash.slice(1)===hash){return}
window.location.hash=hash}},this)};this._core.options=$.extend({},Hash.Defaults,this._core.options);this.$element.on(this._handlers);$(window).on('hashchange.owl.navigation',$.proxy(function(e){var hash=window.location.hash.substring(1),items=this._core.$stage.children(),position=this._hashes[hash]&&items.index(this._hashes[hash]);if(position===undefined||position===this._core.current()){return}
this._core.to(this._core.relative(position),!1,!0)},this))};Hash.Defaults={URLhashListener:!1};Hash.prototype.destroy=function(){var handler,property;$(window).off('hashchange.owl.navigation');for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler])}
for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null)}};$.fn.owlCarousel.Constructor.Plugins.Hash=Hash})(window.Zepto||window.jQuery,window,document);
/**
 * Support Plugin
 *
 * @version 2.3.4
 * @author Vivid Planet Software GmbH
 * @author Artus Kolanowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($,window,document,undefined){var style=$('<support>').get(0).style,prefixes='Webkit Moz O ms'.split(' '),events={transition:{end:{WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd',transition:'transitionend'}},animation:{end:{WebkitAnimation:'webkitAnimationEnd',MozAnimation:'animationend',OAnimation:'oAnimationEnd',animation:'animationend'}}},tests={csstransforms:function(){return!!test('transform')},csstransforms3d:function(){return!!test('perspective')},csstransitions:function(){return!!test('transition')},cssanimations:function(){return!!test('animation')}};function test(property,prefixed){var result=!1,upper=property.charAt(0).toUpperCase()+property.slice(1);$.each((property+' '+prefixes.join(upper+' ')+upper).split(' '),function(i,property){if(style[property]!==undefined){result=prefixed?property:!0;return!1}});return result}
function prefixed(property){return test(property,!0)}
if(tests.csstransitions()){$.support.transition=new String(prefixed('transition'))
$.support.transition.end=events.transition.end[$.support.transition]}
if(tests.cssanimations()){$.support.animation=new String(prefixed('animation'))
$.support.animation.end=events.animation.end[$.support.animation]}
if(tests.csstransforms()){$.support.transform=new String(prefixed('transform'));$.support.transform3d=tests.csstransforms3d()}})(window.Zepto||window.jQuery,window,document);
/**
 * Featherlight - ultra slim jQuery lightbox
 * Version 1.7.13 - http://noelboss.github.io/featherlight/
 *
 * Copyright 2018, Noël Raoul Bossart (http://www.noelboss.com)
 * MIT Licensed.
**/
!function(a){"use strict";function b(a,c){if(!(this instanceof b)){var d=new b(a,c);return d.open(),d}this.id=b.id++,this.setup(a,c),this.chainCallbacks(b._callbackChain)}function c(a,b){var c={};for(var d in a)d in b&&(c[d]=a[d],delete a[d]);return c}function d(a,b){var c={},d=new RegExp("^"+b+"([A-Z])(.*)");for(var e in a){var f=e.match(d);if(f){var g=(f[1]+f[2].replace(/([A-Z])/g,"-$1")).toLowerCase();c[g]=a[e]}}return c}if("undefined"==typeof a)return void("console"in window&&window.console.info("Too much lightness, Featherlight needs jQuery."));if(a.fn.jquery.match(/-ajax/))return void("console"in window&&window.console.info("Featherlight needs regular jQuery, not the slim version."));var e=[],f=function(b){return e=a.grep(e,function(a){return a!==b&&a.$instance.closest("body").length>0})},g={allow:1,allowfullscreen:1,frameborder:1,height:1,longdesc:1,marginheight:1,marginwidth:1,mozallowfullscreen:1,name:1,referrerpolicy:1,sandbox:1,scrolling:1,src:1,srcdoc:1,style:1,webkitallowfullscreen:1,width:1},h={keyup:"onKeyUp",resize:"onResize"},i=function(c){a.each(b.opened().reverse(),function(){return c.isDefaultPrevented()||!1!==this[h[c.type]](c)?void 0:(c.preventDefault(),c.stopPropagation(),!1)})},j=function(c){if(c!==b._globalHandlerInstalled){b._globalHandlerInstalled=c;var d=a.map(h,function(a,c){return c+"."+b.prototype.namespace}).join(" ");a(window)[c?"on":"off"](d,i)}};b.prototype={constructor:b,namespace:"featherlight",targetAttr:"data-featherlight",variant:null,resetCss:!1,background:null,openTrigger:"click",closeTrigger:"click",filter:null,root:"body",openSpeed:250,closeSpeed:250,closeOnClick:"background",closeOnEsc:!0,closeIcon:"&#10005;",loading:"",persist:!1,otherClose:null,beforeOpen:a.noop,beforeContent:a.noop,beforeClose:a.noop,afterOpen:a.noop,afterContent:a.noop,afterClose:a.noop,onKeyUp:a.noop,onResize:a.noop,type:null,contentFilters:["jquery","image","html","ajax","iframe","text"],setup:function(b,c){"object"!=typeof b||b instanceof a!=!1||c||(c=b,b=void 0);var d=a.extend(this,c,{target:b}),e=d.resetCss?d.namespace+"-reset":d.namespace,f=a(d.background||['<div class="'+e+"-loading "+e+'">','<div class="'+e+'-content">','<button class="'+e+"-close-icon "+d.namespace+'-close" aria-label="Close">',d.closeIcon,"</button>",'<div class="'+d.namespace+'-inner">'+d.loading+"</div>","</div>","</div>"].join("")),g="."+d.namespace+"-close"+(d.otherClose?","+d.otherClose:"");return d.$instance=f.clone().addClass(d.variant),d.$instance.on(d.closeTrigger+"."+d.namespace,function(b){if(!b.isDefaultPrevented()){var c=a(b.target);("background"===d.closeOnClick&&c.is("."+d.namespace)||"anywhere"===d.closeOnClick||c.closest(g).length)&&(d.close(b),b.preventDefault())}}),this},getContent:function(){if(this.persist!==!1&&this.$content)return this.$content;var b=this,c=this.constructor.contentFilters,d=function(a){return b.$currentTarget&&b.$currentTarget.attr(a)},e=d(b.targetAttr),f=b.target||e||"",g=c[b.type];if(!g&&f in c&&(g=c[f],f=b.target&&e),f=f||d("href")||"",!g)for(var h in c)b[h]&&(g=c[h],f=b[h]);if(!g){var i=f;if(f=null,a.each(b.contentFilters,function(){return g=c[this],g.test&&(f=g.test(i)),!f&&g.regex&&i.match&&i.match(g.regex)&&(f=i),!f}),!f)return"console"in window&&window.console.error("Featherlight: no content filter found "+(i?' for "'+i+'"':" (no target specified)")),!1}return g.process.call(b,f)},setContent:function(b){return this.$instance.removeClass(this.namespace+"-loading"),this.$instance.toggleClass(this.namespace+"-iframe",b.is("iframe")),this.$instance.find("."+this.namespace+"-inner").not(b).slice(1).remove().end().replaceWith(a.contains(this.$instance[0],b[0])?"":b),this.$content=b.addClass(this.namespace+"-inner"),this},open:function(b){var c=this;if(c.$instance.hide().appendTo(c.root),!(b&&b.isDefaultPrevented()||c.beforeOpen(b)===!1)){b&&b.preventDefault();var d=c.getContent();if(d)return e.push(c),j(!0),c.$instance.fadeIn(c.openSpeed),c.beforeContent(b),a.when(d).always(function(a){c.setContent(a),c.afterContent(b)}).then(c.$instance.promise()).done(function(){c.afterOpen(b)})}return c.$instance.detach(),a.Deferred().reject().promise()},close:function(b){var c=this,d=a.Deferred();return c.beforeClose(b)===!1?d.reject():(0===f(c).length&&j(!1),c.$instance.fadeOut(c.closeSpeed,function(){c.$instance.detach(),c.afterClose(b),d.resolve()})),d.promise()},resize:function(a,b){if(a&&b){this.$content.css("width","").css("height","");var c=Math.max(a/(this.$content.parent().width()-1),b/(this.$content.parent().height()-1));c>1&&(c=b/Math.floor(b/c),this.$content.css("width",""+a/c+"px").css("height",""+b/c+"px"))}},chainCallbacks:function(b){for(var c in b)this[c]=a.proxy(b[c],this,a.proxy(this[c],this))}},a.extend(b,{id:0,autoBind:"[data-featherlight]",defaults:b.prototype,contentFilters:{jquery:{regex:/^[#.]\w/,test:function(b){return b instanceof a&&b},process:function(b){return this.persist!==!1?a(b):a(b).clone(!0)}},image:{regex:/\.(png|jpg|jpeg|gif|tiff?|bmp|svg)(\?\S*)?$/i,process:function(b){var c=this,d=a.Deferred(),e=new Image,f=a('<img src="'+b+'" alt="" class="'+c.namespace+'-image" />');return e.onload=function(){f.naturalWidth=e.width,f.naturalHeight=e.height,d.resolve(f)},e.onerror=function(){d.reject(f)},e.src=b,d.promise()}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(b){return a(b)}},ajax:{regex:/./,process:function(b){var c=a.Deferred(),d=a("<div></div>").load(b,function(a,b){"error"!==b&&c.resolve(d.contents()),c.fail()});return c.promise()}},iframe:{process:function(b){var e=new a.Deferred,f=a("<iframe/>"),h=d(this,"iframe"),i=c(h,g);return f.hide().attr("src",b).attr(i).css(h).on("load",function(){e.resolve(f.show())}).appendTo(this.$instance.find("."+this.namespace+"-content")),e.promise()}},text:{process:function(b){return a("<div>",{text:b})}}},functionAttributes:["beforeOpen","afterOpen","beforeContent","afterContent","beforeClose","afterClose"],readElementConfig:function(b,c){var d=this,e=new RegExp("^data-"+c+"-(.*)"),f={};return b&&b.attributes&&a.each(b.attributes,function(){var b=this.name.match(e);if(b){var c=this.value,g=a.camelCase(b[1]);if(a.inArray(g,d.functionAttributes)>=0)c=new Function(c);else try{c=JSON.parse(c)}catch(h){}f[g]=c}}),f},extend:function(b,c){var d=function(){this.constructor=b};return d.prototype=this.prototype,b.prototype=new d,b.__super__=this.prototype,a.extend(b,this,c),b.defaults=b.prototype,b},attach:function(b,c,d){var e=this;"object"!=typeof c||c instanceof a!=!1||d||(d=c,c=void 0),d=a.extend({},d);var f,g=d.namespace||e.defaults.namespace,h=a.extend({},e.defaults,e.readElementConfig(b[0],g),d),i=function(g){var i=a(g.currentTarget),j=a.extend({$source:b,$currentTarget:i},e.readElementConfig(b[0],h.namespace),e.readElementConfig(g.currentTarget,h.namespace),d),k=f||i.data("featherlight-persisted")||new e(c,j);"shared"===k.persist?f=k:k.persist!==!1&&i.data("featherlight-persisted",k),j.$currentTarget.blur&&j.$currentTarget.blur(),k.open(g)};return b.on(h.openTrigger+"."+h.namespace,h.filter,i),{filter:h.filter,handler:i}},current:function(){var a=this.opened();return a[a.length-1]||null},opened:function(){var b=this;return f(),a.grep(e,function(a){return a instanceof b})},close:function(a){var b=this.current();return b?b.close(a):void 0},_onReady:function(){var b=this;if(b.autoBind){var c=a(b.autoBind);c.each(function(){b.attach(a(this))}),a(document).on("click",b.autoBind,function(d){if(!d.isDefaultPrevented()){var e=a(d.currentTarget),f=c.length;if(c=c.add(e),f!==c.length){var g=b.attach(e);(!g.filter||a(d.target).parentsUntil(e,g.filter).length>0)&&g.handler(d)}}})}},_callbackChain:{onKeyUp:function(b,c){return 27===c.keyCode?(this.closeOnEsc&&a.featherlight.close(c),!1):b(c)},beforeOpen:function(b,c){return a(document.documentElement).addClass("with-featherlight"),this._previouslyActive=document.activeElement,this._$previouslyTabbable=a("a, input, select, textarea, iframe, button, iframe, [contentEditable=true]").not("[tabindex]").not(this.$instance.find("button")),this._$previouslyWithTabIndex=a("[tabindex]").not('[tabindex="-1"]'),this._previousWithTabIndices=this._$previouslyWithTabIndex.map(function(b,c){return a(c).attr("tabindex")}),this._$previouslyWithTabIndex.add(this._$previouslyTabbable).attr("tabindex",-1),document.activeElement.blur&&document.activeElement.blur(),b(c)},afterClose:function(c,d){var e=c(d),f=this;return this._$previouslyTabbable.removeAttr("tabindex"),this._$previouslyWithTabIndex.each(function(b,c){a(c).attr("tabindex",f._previousWithTabIndices[b])}),this._previouslyActive.focus(),0===b.opened().length&&a(document.documentElement).removeClass("with-featherlight"),e},onResize:function(a,b){return this.resize(this.$content.naturalWidth,this.$content.naturalHeight),a(b)},afterContent:function(a,b){var c=a(b);return this.$instance.find("[autofocus]:not([disabled])").focus(),this.onResize(b),c}}}),a.featherlight=b,a.fn.featherlight=function(a,c){return b.attach(this,a,c),this},a(document).ready(function(){b._onReady()})}(jQuery);;

Youez - 2016 - github.com/yon3zu
LinuXploit