(n=>{var r;"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e,window,document)}):"object"==typeof exports?(r=require("jquery"),"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||r(e),n(t,e,e.document)}:module.exports=n(r,window,window.document)):window.DataTable=n(jQuery,window,document)})(function(H,W,_){function f(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null}function c(e,t,n,r){var a=typeof e,o="string"==a;return"number"==a||"bigint"==a||!(!r||!T(e))||(t&&o&&(e=k(e,t)),n&&o&&(e=e.replace(E,"")),!isNaN(parseFloat(e))&&isFinite(e))}function n(e,t,n,r){var a;return!(!r||!T(e))||("string"!=typeof e||!e.match(/<(input|select)/i))&&(T(a=e)||"string"==typeof a)&&!!c(I(e),t,n,r)||null}function v(e,t,n,r){var a=[],o=0,i=t.length;if(void 0!==r)for(;o<i;o++)e[t[o]]&&e[t[o]][n]&&a.push(e[t[o]][n][r]);else for(;o<i;o++)e[t[o]]&&a.push(e[t[o]][n]);return a}function h(e,t){var n,r=[];void 0===t?(t=0,n=e):(n=t,t=e);for(var a=t;a<n;a++)r.push(a);return r}function L(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&t.push(e[n]);return t}function d(e){if(!(e.length<2))for(var t=e.slice().sort(),n=t[0],r=1,a=t.length;r<a;r++){if(t[r]===n)return;n=t[r]}return 1}var C,X,r,e,V=function(e,P){var E,k,M;return V.factory(e,P)?V:this instanceof V?H(e).DataTable(P):(k=void 0===(P=e),M=(E=this).length,k&&(P={}),this.api=function(){return new X(this)},this.each(function(){var t=1<M?nt({},P,!0):P,e=0,n=this.getAttribute("id"),r=V.defaults,a=H(this);if("table"!=this.nodeName.toLowerCase())z(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{t.on&&t.on.options&&st(a,"options",t.on.options),a.trigger("options.dt",t),K(r),ee(r.column),B(r,r,!0),B(r.column,r.column,!0),B(r,H.extend(t,ut(a.data())),!0);var o=V.settings;for(e=0,j=o.length;e<j;e++){var i=o[e];if(i.nTable==this||i.nTHead&&i.nTHead.parentNode==this||i.nTFoot&&i.nTFoot.parentNode==this){var l=(void 0!==t.bRetrieve?t:r).bRetrieve,s=(void 0!==t.bDestroy?t:r).bDestroy;if(k||l)return i.oInstance;if(s){new V.Api(i).destroy();break}return void z(i,0,"Cannot reinitialise DataTable",3)}if(i.sTableId==this.id){o.splice(e,1);break}}null!==n&&""!==n||(n="DataTables_Table_"+V.ext._unique++,this.id=n),a.children("colgroup").remove();var u,c=H.extend(!0,{},V.models.oSettings,{sDestroyWidth:a[0].style.width,sInstance:n,sTableId:n,colgroup:H("<colgroup>"),fastData:function(e,t,n){return q(c,e,t,n)}}),n=(c.nTable=this,c.oInit=t,o.push(c),c.api=new X(c),c.oInstance=1===E.length?E:a.dataTable(),K(t),t.aLengthMenu&&!t.iDisplayLength&&(t.iDisplayLength=Array.isArray(t.aLengthMenu[0])?t.aLengthMenu[0][0]:H.isPlainObject(t.aLengthMenu[0])?t.aLengthMenu[0].value:t.aLengthMenu[0]),t=nt(H.extend(!0,{},r),t),$(c.oFeatures,t,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),$(c,t,["ajax","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","iStateDuration","bSortCellsTop","iTabIndex","sDom","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId","caption","layout","orderDescReverse","orderIndicators","orderHandler","titleRow","typeDetect","columnTitleTag",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),$(c.oScroll,t,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),$(c.oLanguage,t,"fnInfoCallback"),Y(c,"aoDrawCallback",t.fnDrawCallback),Y(c,"aoStateSaveParams",t.fnStateSaveParams),Y(c,"aoStateLoadParams",t.fnStateLoadParams),Y(c,"aoStateLoaded",t.fnStateLoaded),Y(c,"aoRowCallback",t.fnRowCallback),Y(c,"aoRowCreatedCallback",t.fnCreatedRow),Y(c,"aoHeaderCallback",t.fnHeaderCallback),Y(c,"aoFooterCallback",t.fnFooterCallback),Y(c,"aoInitComplete",t.fnInitComplete),Y(c,"aoPreDrawCallback",t.fnPreDrawCallback),c.rowIdFn=U(t.rowId),t.on&&Object.keys(t.on).forEach(function(e){st(a,e,t.on[e])}),c),d=(V.__browser||(f={},V.__browser=f,p=H("<div/>").css({position:"fixed",top:0,left:-1*W.pageXOffset,height:1,width:1,overflow:"hidden"}).append(H("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(H("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=p.children(),u=d.children(),f.barWidth=d[0].offsetWidth-d[0].clientWidth,f.bScrollbarLeft=1!==Math.round(u.offset().left),p.remove()),H.extend(n.oBrowser,V.__browser),n.oScroll.iBarWidth=V.__browser.barWidth,c.oClasses),f=(H.extend(d,V.ext.classes,t.oClasses),a.addClass(d.table),c.oFeatures.bPaginate||(t.iDisplayStart=0),void 0===c.iInitDisplayStart&&(c.iInitDisplayStart=t.iDisplayStart,c._iDisplayStart=t.iDisplayStart),t.iDeferLoading),h=(null!==f&&(c.deferLoading=!0,u=Array.isArray(f),c._iRecordsDisplay=u?f[0]:f,c._iRecordsTotal=u?f[1]:f),[]),p=this.getElementsByTagName("thead"),n=Fe(c,p[0]);if(t.aoColumns)h=t.aoColumns;else if(n.length)for(j=n[e=0].length;e<j;e++)h.push(null);for(e=0,j=h.length;e<j;e++)te(c);var g,m,v,b,y,D,x,S=c,w=t.aoColumnDefs,T=h,_=n,C=function(e,t){ne(c,e,t)},I=S.aoColumns;if(T)for(g=0,m=T.length;g<m;g++)T[g]&&T[g].name&&(I[g].sName=T[g].name);if(w)for(g=w.length-1;0<=g;g--){var A=void 0!==(x=w[g]).target?x.target:void 0!==x.targets?x.targets:x.aTargets;for(Array.isArray(A)||(A=[A]),v=0,b=A.length;v<b;v++){var L=A[v];if("number"==typeof L&&0<=L){for(;I.length<=L;)te(S);C(L,x)}else if("number"==typeof L&&L<0)C(I.length+L,x);else if("string"==typeof L)for(y=0,D=I.length;y<D;y++)"_all"===L?C(y,x):-1!==L.indexOf(":name")?I[y].sName===L.replace(":name","")&&C(y,x):_.forEach(function(e){e[y]&&(e=H(e[y].cell),L.match(/^[a-z][\w-]*$/i)&&(L="."+L),e.is(L))&&C(y,x)})}}if(T)for(g=0,m=T.length;g<m;g++)C(g,T[g]);var N,n=a.children("tbody").find("tr:first-child").eq(0),F=(n.length&&(N=function(e,t){return null!==e.getAttribute("data-"+t)?t:null},H(n[0]).children("th, td").each(function(e,t){var n,r=c.aoColumns[e];r||z(c,0,"Incorrect column count",18),r.mData===e&&(n=N(t,"sort")||N(t,"order"),t=N(t,"filter")||N(t,"search"),null===n&&null===t||(r.mData={_:e+".display",sort:null!==n?e+".@data-"+n:void 0,type:null!==n?e+".@data-"+n:void 0,filter:null!==t?e+".@data-"+t:void 0},r._isArrayHost=!0,ne(c,e)))})),Y(c,"aoDrawCallback",et),c.oFeatures);if(t.bStateSave&&(F.bStateSave=!0),void 0===t.aaSorting)for(var O=c.aaSorting,e=0,j=O.length;e<j;e++)O[e][1]=c.aoColumns[e].asSorting[0];Ke(c),Y(c,"aoDrawCallback",function(){(c.bSorted||"ssp"===J(c)||F.bDeferRender)&&Ke(c)});var n=a.children("caption"),n=(c.caption&&(n=0===n.length?H("<caption/>").prependTo(a):n).html(c.caption),n.length&&(n[0]._captionSide=n.css("caption-side"),c.captionNode=n[0]),n.length?c.colgroup.insertAfter(n):c.colgroup.prependTo(c.nTable),0===p.length&&(p=H("<thead/>").appendTo(a)),c.nTHead=p[0],a.children("tbody")),n=(0===n.length&&(n=H("<tbody/>").insertAfter(p)),c.nTBody=n[0],a.children("tfoot")),R=(0===n.length&&(n=H("<tfoot/>").appendTo(a)),c.nTFoot=n[0],c.aiDisplay=c.aiDisplayMaster.slice(),c.bInitialised=!0,c.oLanguage);H.extend(!0,R,t.oLanguage),R.sUrl?H.ajax({dataType:"json",url:R.sUrl,success:function(e){B(r.oLanguage,e),H.extend(!0,R,e,c.oInit.oLanguage),G(c,null,"i18n",[c],!0),We(c)},error:function(){z(c,0,"i18n file loading error",21),We(c)}}):(G(c,null,"i18n",[c],!0),We(c))}}),E=null,this)},N=(V.ext=C={builder:"dt/dt-2.3.7/r-3.0.8",buttons:{},ccContent:{},classes:{},errMode:"alert",escape:{attributes:!1},feature:[],features:{},search:[],selector:{cell:[],column:[],row:[]},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{className:{},detect:[],render:{},search:{},order:{}},_unique:0,fnVersionCheck:V.fnVersionCheck,iApiIndex:0,sVersion:V.version},H.extend(C,{afnFiltering:C.search,aTypes:C.type.detect,ofnSearch:C.type.search,oSort:C.type.order,afnSortData:C.order,aoFeatures:C.feature,oStdClasses:C.classes,oPagination:C.pager}),H.extend(V.ext.classes,{container:"dt-container",empty:{row:"dt-empty"},info:{container:"dt-info"},layout:{row:"dt-layout-row",cell:"dt-layout-cell",tableRow:"dt-layout-table",tableCell:"",start:"dt-layout-start",end:"dt-layout-end",full:"dt-layout-full"},length:{container:"dt-length",select:"dt-input"},order:{canAsc:"dt-orderable-asc",canDesc:"dt-orderable-desc",isAsc:"dt-ordering-asc",isDesc:"dt-ordering-desc",none:"dt-orderable-none",position:"sorting_"},processing:{container:"dt-processing"},scrolling:{body:"dt-scroll-body",container:"dt-scroll",footer:{self:"dt-scroll-foot",inner:"dt-scroll-footInner"},header:{self:"dt-scroll-head",inner:"dt-scroll-headInner"}},search:{container:"dt-search",input:"dt-input"},table:"dataTable",tbody:{cell:"",row:""},thead:{cell:"",row:""},tfoot:{cell:"",row:""},paging:{active:"current",button:"dt-paging-button",container:"dt-paging",disabled:"disabled",nav:""}}),{}),F=/[\r\n\u2028]/g,O=/<([^>]*>)/g,j=Math.pow(2,28),R=/^\d{2,4}[./-]\d{1,2}[./-]\d{1,2}([T ]{1}\d{1,2}[:.]\d{2}([.:]\d{2})?)?$/,P=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),E=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,T=function(e){return!e||!0===e||"-"===e},k=function(e,t){return N[t]||(N[t]=new RegExp(ke(t),"g")),"string"==typeof e&&"."!==t?e.replace(/\./g,"").replace(N[t],"."):e},b=function(e,t,n){var r=[],a=0,o=e.length;if(void 0!==n)for(;a<o;a++)e[a]&&e[a][t]&&r.push(e[a][t][n]);else for(;a<o;a++)e[a]&&r.push(e[a][t]);return r},I=function(e,t){if(!e||"string"!=typeof e)return e;if(e.length>j)throw new Error("Exceeded max str len");var n;for(e=e.replace(O,t||"");(e=(n=e).replace(/<script/i,""))!==n;);return n},u=function(e){return"string"==typeof(e=Array.isArray(e)?e.join(","):e)?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):e},M=function(e,t){var n;return"string"!=typeof e?e:(n=e.normalize?e.normalize("NFD"):e).length!==e.length?(!0===t?e+" ":"")+n.replace(/[\u0300-\u036f]/g,""):n},w=function(e){if(Array.from&&Set)return Array.from(new Set(e));if(d(e))return e.slice();var t,n,r,a=[],o=e.length,i=0;e:for(n=0;n<o;n++){for(t=e[n],r=0;r<i;r++)if(a[r]===t)continue e;a.push(t),i++}return a},Z=function(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)Z(e,t[n]);else e.push(t);return e};function y(t,e){e&&e.split(" ").forEach(function(e){e&&t.classList.add(e)})}function Q(t){var n,r,a={};H.each(t,function(e){(n=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(n[1]+" ")&&(r=e.replace(n[0],n[2].toLowerCase()),a[r]=e,"o"===n[1])&&Q(t[e])}),t._hungarianMap=a}function B(t,n,r){var a;t._hungarianMap||Q(t),H.each(n,function(e){void 0===(a=t._hungarianMap[e])||!r&&void 0!==n[a]||("o"===a.charAt(0)?(n[a]||(n[a]={}),H.extend(!0,n[a],n[e]),B(t[a],n[a],r)):n[a]=n[e])})}V.util={diacritics:function(e,t){if("function"!=typeof e)return M(e,t);M=e},debounce:function(n,r){var a;return function(){var e=this,t=arguments;clearTimeout(a),a=setTimeout(function(){n.apply(e,t)},r||250)}},throttle:function(r,e){var a,o,i=void 0!==e?e:200;return function(){var e=this,t=+new Date,n=arguments;a&&t<a+i?(clearTimeout(o),o=setTimeout(function(){a=void 0,r.apply(e,n)},i)):(a=t,r.apply(e,n))}},escapeRegex:function(e){return e.replace(P,"\\$1")},set:function(r){var f;return H.isPlainObject(r)?V.util.set(r._):null===r?function(){}:"function"==typeof r?function(e,t,n){r(e,"set",t,n)}:"string"!=typeof r||-1===r.indexOf(".")&&-1===r.indexOf("[")&&-1===r.indexOf("(")?function(e,t){e[r]=t}:(f=function(e,t,n){for(var r,a,o,i,l=me(n),n=l[l.length-1],s=0,u=l.length-1;s<u;s++){if("__proto__"===l[s]||"constructor"===l[s])throw new Error("Cannot set prototype values");if(r=l[s].match(ge),a=l[s].match(p),r){if(l[s]=l[s].replace(ge,""),e[l[s]]=[],(r=l.slice()).splice(0,s+1),i=r.join("."),Array.isArray(t))for(var c=0,d=t.length;c<d;c++)f(o={},t[c],i),e[l[s]].push(o);else e[l[s]]=t;return}a&&(l[s]=l[s].replace(p,""),e=e[l[s]](t)),null==e[l[s]]&&(e[l[s]]={}),e=e[l[s]]}n.match(p)?e[n.replace(p,"")](t):e[n.replace(ge,"")]=t},function(e,t){return f(e,t,r)})},get:function(a){var o,f;return H.isPlainObject(a)?(o={},H.each(a,function(e,t){t&&(o[e]=V.util.get(t))}),function(e,t,n,r){var a=o[t]||o._;return void 0!==a?a(e,t,n,r):e}):null===a?function(e){return e}:"function"==typeof a?function(e,t,n,r){return a(e,t,n,r)}:"string"!=typeof a||-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("(")?function(e){return e[a]}:(f=function(e,t,n){var r,a,o;if(""!==n)for(var i=me(n),l=0,s=i.length;l<s;l++){if(d=i[l].match(ge),r=i[l].match(p),d){if(i[l]=i[l].replace(ge,""),""!==i[l]&&(e=e[i[l]]),a=[],i.splice(0,l+1),o=i.join("."),Array.isArray(e))for(var u=0,c=e.length;u<c;u++)a.push(f(e[u],t,o));var d=d[0].substring(1,d[0].length-1);e=""===d?a:a.join(d);break}if(r)i[l]=i[l].replace(p,""),e=e[i[l]]();else{if(null===e||null===e[i[l]])return null;if(void 0===e||void 0===e[i[l]])return;e=e[i[l]]}}return e},function(e,t){return f(e,t,a)})},stripHtml:function(e,t){var n=typeof e;if("function"!=n)return"string"==n?I(e,t):e;I=e},escapeHtml:function(e){var t=typeof e;if("function"!=t)return"string"==t||Array.isArray(e)?u(e):e;u=e},unique:w};var a=function(e,t,n){void 0!==e[t]&&(e[n]=e[t])};function K(e){a(e,"ordering","bSort"),a(e,"orderMulti","bSortMulti"),a(e,"orderClasses","bSortClasses"),a(e,"orderCellsTop","bSortCellsTop"),a(e,"order","aaSorting"),a(e,"orderFixed","aaSortingFixed"),a(e,"paging","bPaginate"),a(e,"pagingType","sPaginationType"),a(e,"pageLength","iDisplayLength"),a(e,"searching","bFilter"),"boolean"==typeof e.sScrollX&&(e.sScrollX=e.sScrollX?"100%":""),"boolean"==typeof e.scrollX&&(e.scrollX=e.scrollX?"100%":""),"object"==typeof e.bSort?(e.orderIndicators=void 0===e.bSort.indicators||e.bSort.indicators,e.orderHandler=void 0===e.bSort.handler||e.bSort.handler,e.bSort=!0):!1===e.bSort?(e.orderIndicators=!1,e.orderHandler=!1):!0===e.bSort&&(e.orderIndicators=!0,e.orderHandler=!0),"boolean"==typeof e.bSortCellsTop&&(e.titleRow=e.bSortCellsTop);var t=e.aoSearchCols;if(t)for(var n=0,r=t.length;n<r;n++)t[n]&&B(V.models.oSearch,t[n]);e.serverSide&&!e.searchDelay&&(e.searchDelay=400)}function ee(e){a(e,"orderable","bSortable"),a(e,"orderData","aDataSort"),a(e,"orderSequence","asSorting"),a(e,"orderDataType","sortDataType");var t=e.aDataSort;"number"!=typeof t||Array.isArray(t)||(e.aDataSort=[t])}function te(e){var t=V.defaults.column,n=e.aoColumns.length,t=H.extend({},V.models.oColumn,t,{aDataSort:t.aDataSort||[n],mData:t.mData||n,idx:n,searchFixed:{},colEl:H("<col>").attr("data-dt-column",n)}),t=(e.aoColumns.push(t),e.aoPreSearchCols);t[n]=H.extend({},V.models.oSearch,t[n])}function ne(e,t,n){function r(e){return"string"==typeof e&&-1!==e.indexOf("@")}var a=e.aoColumns[t],o=(null!=n&&(ee(n),B(V.defaults.column,n,!0),void 0===n.mDataProp||n.mData||(n.mData=n.mDataProp),n.sType&&(a._sManualType=n.sType),n.className&&!n.sClass&&(n.sClass=n.className),t=a.sClass,H.extend(a,n),$(a,n,"sWidth","sWidthOrig"),t!==a.sClass&&(a.sClass=t+" "+a.sClass),void 0!==n.iDataSort&&(a.aDataSort=[n.iDataSort]),$(a,n,"aDataSort")),a.mData),i=U(o);a.mRender&&Array.isArray(a.mRender)&&(n=(t=a.mRender.slice()).shift(),a.mRender=V.render[n].apply(W,t)),a._render=a.mRender?U(a.mRender):null;a._bAttrSrc=H.isPlainObject(o)&&(r(o.sort)||r(o.type)||r(o.filter)),a._setter=null,a.fnGetData=function(e,t,n){var r=i(e,t,void 0,n);return a._render&&t?a._render(r,t,e,n):r},a.fnSetData=function(e,t,n){return m(o)(e,t,n)},"number"==typeof o||a._isArrayHost||(e._rowReadObject=!0),e.oFeatures.bSort||(a.bSortable=!1)}function re(e){(t=>{if(t.oFeatures.bAutoWidth){var e,n,r,a=t.nTable,o=t.aoColumns,i=t.oScroll,l=i.sY,s=i.sX,i=i.sXInner,u=le(t,"bVisible"),c=a.getAttribute("width"),d=a.parentNode,f=a.style.width,h=$e(t);if(h===t.containerWidth)return;t.containerWidth=h,f||c||(a.style.width="100%",f="100%"),f&&-1!==f.indexOf("%")&&(c=f),G(t,null,"column-calc",{visible:u},!1);var p=H(a.cloneNode()).css("visibility","hidden").css("margin",0).removeAttr("id"),g=(p.append("<tbody/>"),p.append(H(t.nTHead).clone()).append(H(t.nTFoot).clone()),p.find("tfoot th, tfoot td").css("width",""),p.find("thead th, thead td").each(function(){var e=de(t,this,!0,!1);e?(this.style.width=e,s&&(this.style.minWidth=e,H(this).append(H("<div/>").css({width:e,margin:0,padding:0,border:0,height:1})))):this.style.width=""}),[]);for(e=0;e<u.length;e++)g.push(((e,t)=>{var n=e.aoColumns[t];if(!n.wideStrings){for(var r=[],a=[],o=0,i=e.aiDisplayMaster.length;o<i;o++){var l=e.aiDisplayMaster[o],l=xe(e,l)[t],l=l&&"object"==typeof l&&l.nodeType?l.innerHTML:l+"",s=(l=(l=l.replace(/id=".*?"/g,"").replace(/name=".*?"/g,"")).replace(/<script.*?<\/script>/gi," "),I(l," ").replace(/&nbsp;/g," "));a.push({str:l,len:s.length}),r.push(s)}a.sort(function(e,t){return t.len-e.len}).splice(3),n.wideStrings=a.map(function(e){return e.str});var u=r.join(" ").split(" ");u.sort(function(e,t){return t.length-e.length}),u.length&&n.wideStrings.push(u[0]),1<u.length&&n.wideStrings.push(u[1]),2<u.length&&n.wideStrings.push(u[3])}return n.wideStrings})(t,u[e]));if(g.length)for(e=0;e<g[0].length;e++){var m=H("<tr/>").appendTo(p.find("tbody"));for(n=0;n<u.length;n++){r=u[n],r=o[r];var v=g[n][e]||"",b=C.type.className[r.sType],y=v+(r.sContentPadding||(s?"-":"")),v=-1===v.indexOf("<")&&-1===v.indexOf("&")?_.createTextNode(y):y;H("<td/>").addClass(b).addClass(r.sClass).append(v).appendTo(m)}}H("[name]",p).removeAttr("name");var D,x,h=H("<div/>").css(s||l?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(p).appendTo(d),S=(s&&i?p.width(i):s?(p.css("width","auto"),p.removeAttr("width"),p.outerWidth()<d.clientWidth&&c&&p.outerWidth(d.clientWidth)):l?p.outerWidth(d.clientWidth):c&&p.outerWidth(c),0),w=p.find("tbody tr").eq(0).children();for(e=0;e<u.length;e++){var T=w[e].getBoundingClientRect().width;S+=T,o[u[e]].sWidth=A(T)}a.style.width=A(S),h.remove(),c&&(a.style.width=A(c)),!c&&!s||t._reszEvt||(D=V.util.throttle(function(){var e=$e(t);t.bDestroying||0===e||re(t)}),W.ResizeObserver?(x=H(t.nTableWrapper).is(":visible"),f=H("<div>").css({width:"100%",height:0}).addClass("dt-autosize").appendTo(t.nTableWrapper),t.resizeObserver=new ResizeObserver(function(e){x?x=!1:D()}),t.resizeObserver.observe(f[0])):H(W).on("resize.DT-"+t.sInstance,D),t._reszEvt=!0)}})(e);for(var t=e,n=t.aoColumns,r=0;r<n.length;r++){var a=de(t,[r],!1,!1);n[r].colEl.css("width",a),t.oScroll.sX&&n[r].colEl.css("min-width",a)}var o=e.oScroll;""===o.sY&&""===o.sX||ze(e),G(e,null,"column-sizing",[e])}function ae(e,t){e=le(e,"bVisible");return"number"==typeof e[t]?e[t]:null}function oe(e,t){e=le(e,"bVisible").indexOf(t);return-1!==e?e:null}function ie(e){var t=e.aoHeader,n=e.aoColumns,r=0;if(t.length)for(var a=0,o=t[0].length;a<o;a++)n[a].bVisible&&"none"!==H(t[0][a].cell).css("display")&&r++;return r}function le(e,n){var r=[];return e.aoColumns.map(function(e,t){e[n]&&r.push(t)}),r}function se(e,t){return!0===t?e._name:t}function ue(e){for(var t,n,r,a,o,i,l=e.aoColumns,s=e.aoData,u=V.ext.type.detect,c=0,d=l.length;c<d;c++){if(i=[],!(o=l[c]).sType&&o._sManualType)o.sType=o._sManualType;else if(!o.sType){if(!e.typeDetect)return;for(t=0,n=u.length;t<n;t++){var f=u[t],h=f.oneOf,p=f.allOf||f,g=f.init,m=!1,v=null;if(g&&(v=se(f,g(e,o,c)))){o.sType=v;break}for(r=0,a=s.length;r<a;r++)if(s[r]){if(void 0===i[r]&&(i[r]=q(e,r,c,"type")),h&&!m&&(m=se(f,h(i[r],e))),!(v=se(f,p(i[r],e)))&&t!==u.length-3)break;if("html"===v&&!T(i[r]))break}if(h&&m&&v||!h&&v){o.sType=v;break}}o.sType||(o.sType="string")}var b=C.type.className[o.sType],b=(b&&(ce(e.aoHeader,c,b),ce(e.aoFooter,c,b)),C.type.render[o.sType]);if(b&&!o._render){o._render=V.util.get(b),y=w=S=x=D=void 0;for(var y,D=e,x=c,S=D.aoData,w=0;w<S.length;w++)S[w].nTr&&(y=q(D,w,x,"display"),S[w].displayData[x]=y,pe(S[w].anCells[x],y))}}}function ce(e,t,n){e.forEach(function(e){e[t]&&e[t].unique&&y(e[t].cell,n)})}function de(e,t,n,r){Array.isArray(t)||(t=fe(t));for(var a,o=0,i=e.aoColumns,l=0,s=t.length;l<s;l++){var u=i[t[l]],c=n?u.sWidthOrig:u.sWidth;if(r||!1!==u.bVisible){if(null==c)return null;"number"==typeof c?(a="px",o+=c):(u=c.match(/([\d\.]+)([^\d]*)/))&&(o+=+u[1],a=3===u.length?u[2]:"px")}}return o+a}function fe(e){e=H(e).closest("[data-dt-column]").attr("data-dt-column");return e?e.split(",").map(function(e){return+e}):[]}function D(e,t,n,r){for(var a=e.aoData.length,o=H.extend(!0,{},V.models.oRow,{src:n?"dom":"data",idx:a}),i=(o._aData=t,e.aoData.push(o),e.aoColumns),l=0,s=i.length;l<s;l++)i[l].sType=null;e.aiDisplayMaster.push(a);t=e.rowIdFn(t);return void 0!==t&&(e.aIds[t]=o),!n&&e.oFeatures.bDeferRender||Se(e,a,n,r),a}function he(n,e){var r;return(e=e instanceof H?e:H(e)).map(function(e,t){return r=De(n,t),D(n,r.data,t,r.cells)})}function q(e,t,n,r){"search"===r?r="filter":"order"===r&&(r="sort");var a=e.aoData[t];if(a){var o=e.iDraw,i=e.aoColumns[n],a=a._aData,l=i.sDefaultContent,s=i.fnGetData(a,r,{settings:e,row:t,col:n});if(void 0===(s="display"!==r&&s&&"object"==typeof s&&s.nodeName?s.innerHTML:s))return e.iDrawError!=o&&null===l&&(z(e,0,"Requested unknown parameter "+("function"==typeof i.mData?"{function}":"'"+i.mData+"'")+" for row "+t+", column "+n,4),e.iDrawError=o),l;if(s!==a&&null!==s||null===l||void 0===r){if("function"==typeof s)return s.call(a)}else s=l;return null===s&&"display"===r?"":s="filter"===r&&(t=V.ext.type.search)[i.sType]?t[i.sType](s):s}}function pe(e,t){t&&"object"==typeof t&&t.nodeName?H(e).empty().append(t):e.innerHTML=t}var ge=/\[.*?\]$/,p=/\(\)$/;function me(e){return(e.match(/(\\.|[^.])+/g)||[""]).map(function(e){return e.replace(/\\\./g,".")})}var U=V.util.get,m=V.util.set;function ve(e){return b(e.aoData,"_aData")}function be(e){e.aoData.length=0,e.aiDisplayMaster.length=0,e.aiDisplay.length=0,e.aIds={}}function ye(e,t,n,r){var a,o,i=e.aoData[t];if(i._aSortData=null,i._aFilterData=null,i.displayData=null,"dom"!==n&&(n&&"auto"!==n||"dom"!==i.src)){var l=i.anCells,s=xe(e,t);if(l)if(void 0!==r)pe(l[r],s[r]);else for(a=0,o=l.length;a<o;a++)pe(l[a],s[a])}else i._aData=De(e,i,r,void 0===r?void 0:i._aData).data;var u=e.aoColumns;if(void 0!==r)u[r].sType=null,u[r].wideStrings=null;else{for(a=0,o=u.length;a<o;a++)u[a].sType=null,u[a].wideStrings=null;we(e,i)}}function De(e,t,n,r){function a(e,t){var n;"string"==typeof e&&-1!==(n=e.indexOf("@"))&&(n=e.substring(n+1),m(e)(r,t.getAttribute(n)))}function o(e){void 0!==n&&n!==d||(l=f[d],s=e.innerHTML.trim(),l&&l._bAttrSrc?(m(l.mData._)(r,s),a(l.mData.sort,e),a(l.mData.type,e),a(l.mData.filter,e)):h?(l._setter||(l._setter=m(l.mData)),l._setter(r,s)):r[d]=s),d++}var i,l,s,u=[],c=t.firstChild,d=0,f=e.aoColumns,h=e._rowReadObject;r=void 0!==r?r:h?{}:[];if(c)for(;c;)"TD"!=(i=c.nodeName.toUpperCase())&&"TH"!=i||(o(c),u.push(c)),c=c.nextSibling;else for(var p=0,g=(u=t.anCells).length;p<g;p++)o(u[p]);var t=t.firstChild?t:t.nTr;return t&&(t=t.getAttribute("id"))&&m(e.rowId)(r,t),{data:r,cells:u}}function xe(e,t){var n=e.aoData[t],r=e.aoColumns;if(!n.displayData){n.displayData=[];for(var a=0,o=r.length;a<o;a++)n.displayData.push(q(e,t,a,"display"))}return n.displayData}function Se(e,t,n,r){var a,o,i,l,s,u,c=e.aoData[t],d=c._aData,f=[],h=e.oClasses.tbody.row;if(null===c.nTr){for(a=n||_.createElement("tr"),c.nTr=a,c.anCells=f,y(a,h),a._DT_RowIndex=t,we(e,c),l=0,s=e.aoColumns.length;l<s;l++){i=e.aoColumns[l],(o=(u=!n||!r[l])?_.createElement(i.sCellType):r[l])||z(e,0,"Incorrect column count",18),o._DT_CellIndex={row:t,column:l},f.push(o);var p=xe(e,t);!u&&(!i.mRender&&i.mData===l||H.isPlainObject(i.mData)&&i.mData._===l+".display")||pe(o,p[l]),y(o,i.sClass),i.bVisible&&u?a.appendChild(o):i.bVisible||u||o.parentNode.removeChild(o),i.fnCreatedCell&&i.fnCreatedCell.call(e.oInstance,o,q(e,t,l),d,t,l)}G(e,"aoRowCreatedCallback","row-created",[a,d,t,f])}else y(c.nTr,h)}function we(e,t){var n=t.nTr,r=t._aData;n&&((e=e.rowIdFn(r))&&(n.id=e),r.DT_RowClass&&(e=r.DT_RowClass.split(" "),t.__rowc=t.__rowc?w(t.__rowc.concat(e)):e,H(n).removeClass(t.__rowc.join(" ")).addClass(r.DT_RowClass)),r.DT_RowAttr&&H(n).attr(r.DT_RowAttr),r.DT_RowData)&&H(n).data(r.DT_RowData)}function Te(e,t){var n,r,a,o=e.oClasses,i=e.aoColumns,l="header"===t?e.nTHead:e.nTFoot,s="header"===t?"sTitle":t;if(l){if(("header"===t||b(e.aoColumns,s).join(""))&&1===(a=(a=H("tr",l)).length?a:H("<tr/>").appendTo(l)).length){var u=0;for(H("td, th",a).each(function(){u+=this.colSpan}),n=u,r=i.length;n<r;n++)H("<th/>").html(i[n][s]||"").appendTo(a)}var c=Fe(e,l,!0);"header"===t?(e.aoHeader=c,H("tr",l).addClass(o.thead.row)):(e.aoFooter=c,H("tr",l).addClass(o.tfoot.row)),H(l).children("tr").children("th, td").each(function(){ot(e,t)(e,H(this),o)})}}function _e(e,t,n){var r,a,o,i,l,s=[],u=[],c=e.aoColumns,e=c.length;if(t){for(n=n||h(e).filter(function(e){return c[e].bVisible}),r=0;r<t.length;r++)s[r]=t[r].slice().filter(function(e,t){return n.includes(t)}),u.push([]);for(r=0;r<s.length;r++)for(a=0;a<s[r].length;a++)if(l=i=1,void 0===u[r][a]){for(o=s[r][a].cell;void 0!==s[r+i]&&s[r][a].cell==s[r+i][a].cell;)u[r+i][a]=null,i++;for(;void 0!==s[r][a+l]&&s[r][a].cell==s[r][a+l].cell;){for(var d=0;d<i;d++)u[r+d][a+l]=null;l++}var f=H(".dt-column-title",o);u[r][a]={cell:o,colspan:l,rowspan:i,title:(f.length?f:H(o)).html()}}return u}}function Ce(e,t){for(var n,r,a=_e(e,t),o=0;o<t.length;o++){if(n=t[o].row)for(;r=n.firstChild;)n.removeChild(r);for(var i=0;i<a[o].length;i++){var l=a[o][i];l&&H(l.cell).appendTo(n).attr("rowspan",l.rowspan).attr("colspan",l.colspan)}}}function x(e,t){if(a="ssp"==J(s=e),void 0!==(i=s.iInitDisplayStart)&&-1!==i&&(s._iDisplayStart=!a&&i>=s.fnRecordsDisplay()?0:i,s.iInitDisplayStart=-1),-1!==G(e,"aoPreDrawCallback","preDraw",[e]).indexOf(!1))S(e,!1);else{var l,n=[],r=0,a="ssp"==J(e),o=e.aiDisplay,i=e._iDisplayStart,s=e.fnDisplayEnd(),u=e.aoColumns,c=H(e.nTBody);if(e.bDrawing=!0,e.deferLoading)e.deferLoading=!1,e.iDraw++,S(e,!1);else if(a){if(!e.bDestroying&&!t)return 0===e.iDraw&&c.empty().append(Ae(e)),(l=e).iDraw++,S(l,!0),void Oe(l,(t=>{function n(e,t){return"function"==typeof r[e][t]?"function":r[e][t]}var r=t.aoColumns,e=t.oFeatures,a=t.oPreviousSearch,o=t.aoPreSearchCols;return{draw:t.iDraw,columns:r.map(function(t,e){return{data:n(e,"mData"),name:t.sName,searchable:t.bSearchable,orderable:t.bSortable,search:{value:o[e].search,regex:o[e].regex,fixed:Object.keys(t.searchFixed).map(function(e){return{name:e,term:"function"!=typeof t.searchFixed[e]?t.searchFixed[e].toString():"function"}})}}}),order:Ze(t).map(function(e){return{column:e.col,dir:e.dir,name:n(e.col,"sName")}}),start:t._iDisplayStart,length:e.bPaginate?t._iDisplayLength:-1,search:{value:a.search,regex:a.regex,fixed:Object.keys(t.searchFixed).map(function(e){return{name:e,term:"function"!=typeof t.searchFixed[e]?t.searchFixed[e].toString():"function"}})}}})(l),function(e){var t=l,n=je(t,e=e),r=Re(t,"draw",e),a=Re(t,"recordsTotal",e),e=Re(t,"recordsFiltered",e);if(void 0!==r){if(+r<t.iDraw)return;t.iDraw=+r}n=n||[],be(t),t._iRecordsTotal=parseInt(a,10),t._iRecordsDisplay=parseInt(e,10);for(var o=0,i=n.length;o<i;o++)D(t,n[o]);t.aiDisplay=t.aiDisplayMaster.slice(),ue(t),x(t,!0),Xe(t),S(t,!1)})}else e.iDraw++;if(0!==o.length)for(var d=a?e.aoData.length:s,f=a?0:i;f<d;f++){var h=o[f],p=e.aoData[h];if(null!==p){null===p.nTr&&Se(e,h);for(var g=p.nTr,m=0;m<u.length;m++){var v=u[m],b=p.anCells[m];y(b,C.type.className[v.sType]),y(b,e.oClasses.tbody.cell)}G(e,"aoRowCallback",null,[g,p._aData,r,f,h]),n.push(g),r++}}else n[0]=Ae(e);G(e,"aoHeaderCallback","header",[H(e.nTHead).children("tr")[0],ve(e),i,s,o]),G(e,"aoFooterCallback","footer",[H(e.nTFoot).children("tr")[0],ve(e),i,s,o]),c[0].replaceChildren?c[0].replaceChildren.apply(c[0],n):(c.children().detach(),c.append(H(n))),H(e.nTableWrapper).toggleClass("dt-empty-footer",0===H("tr",e.nTFoot).length),G(e,"aoDrawCallback","draw",[e],!0),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}}function Ie(e,t,n){var r=e.oFeatures,a=r.bSort,r=r.bFilter;void 0!==n&&!0!==n||(ue(e),a&&Qe(e),r?Pe(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice()),!0!==t&&(e._iDisplayStart=0),e._drawHold=t,x(e),e.api.one("draw",function(){e._drawHold=!1})}function Ae(e){var t=e.oLanguage,n=t.sZeroRecords,r=J(e);return"ssp"!==r&&"ajax"!==r||e.json?t.sEmptyTable&&0===e.fnRecordsTotal()&&(n=t.sEmptyTable):n=t.sLoadingRecords,H("<tr/>").append(H("<td />",{colSpan:ie(e),class:e.oClasses.empty.row}).html(n))[0]}function Le(e,t,a){var o=[];H.each(t,function(e,t){var n,r;null!==t&&(n=(e=e.match(/^([a-z]+)([0-9]*)([A-Za-z]*)$/))[2]?+e[2]:0,r=e[3]?e[3].toLowerCase():"full",e[1]===a)&&function e(t,n,r){if(Array.isArray(r))for(var a=0;a<r.length;a++)e(t,n,r[a]);else{var o=t[n];H.isPlainObject(r)?r.features?(r.rowId&&(t.id=r.rowId),r.rowClass&&(t.className=r.rowClass),o.id=r.id,o.className=r.className,e(t,n,r.features)):Object.keys(r).map(function(e){o.contents.push({feature:e,opts:r[e]})}):o.contents.push(r)}}(((e,t,n)=>{for(var r,a=0;a<e.length;a++)if((r=e[a]).rowNum===t&&("full"===n&&r.full||("start"===n||"end"===n)&&(r.start||r.end)))return r[n]||(r[n]={contents:[]}),r;return(r={rowNum:t})[n]={contents:[]},e.push(r),r})(o,n,r),r,t)}),o.sort(function(e,t){var n=e.rowNum,r=t.rowNum;return n===r?(e=e.full&&!t.full?-1:1,"bottom"===a?-1*e:e):r-n}),"bottom"===a&&o.reverse();for(var n=0;n<o.length;n++)delete o[n].rowNum,((o,i)=>{function l(e,t){return C.features[e]||z(o,0,"Unknown feature: "+e),C.features[e].apply(this,[o,t])}function e(e){if(i[e])for(var t,n=i[e].contents,r=0,a=n.length;r<a;r++)n[r]&&("string"==typeof n[r]?n[r]=l(n[r],null):H.isPlainObject(n[r])?n[r]=l(n[r].feature,n[r].opts):"function"==typeof n[r].node?n[r]=n[r].node(o):"function"==typeof n[r]&&(t=n[r](o),n[r]="function"==typeof t.node?t.node():t))}e("start"),e("end"),e("full")})(e,o[n]);return o}function Ne(t){var e=t.oClasses,n=H(t.nTable),r=H("<div/>").attr({id:t.sTableId+"_wrapper",class:e.container}).insertBefore(n);if(t.nTableWrapper=r[0],t.sDom)for(var a,o,i,l,s,u,c=t,e=t.sDom,d=r,f=e.match(/(".*?")|('.*?')|./g),h=0;h<f.length;h++)a=null,"<"==(o=f[h])?(i=H("<div/>"),"'"!=(l=f[h+1])[0]&&'"'!=l[0]||(l=l.replace(/['"]/g,""),s="",-1!=l.indexOf(".")?(u=l.split("."),s=u[0],u=u[1]):"#"==l[0]?s=l:u=l,i.attr("id",s.substring(1)).addClass(u),h++),d.append(i),d=i):">"==o?d=d.parent():"t"==o?a=Ue(c):V.ext.feature.forEach(function(e){o==e.cFeature&&(a=e.fnInit(c))}),a&&d.append(a);else{var n=Le(t,t.layout,"top"),e=Le(t,t.layout,"bottom"),p=ot(t,"layout");n.forEach(function(e){p(t,r,e)}),p(t,r,{full:{table:!0,contents:[Ue(t)]}}),e.forEach(function(e){p(t,r,e)})}var g,n=t,e=n.nTable,m=""!==n.oScroll.sX||""!==n.oScroll.sY;n.oFeatures.bProcessing&&(g=H("<div/>",{id:n.sTableId+"_processing",class:n.oClasses.processing.container,role:"status"}).html(n.oLanguage.sProcessing).append("<div><div></div><div></div><div></div><div></div></div>"),m?g.prependTo(H("div.dt-scroll",n.nTableWrapper)):g.insertBefore(e),H(e).on("processing.dt.DT",function(e,t,n){g.css("display",n?"block":"none")}))}function Fe(e,t,n){for(var r,a,o,i,l,s,u=e.aoColumns,c=H(t).children("tr"),d=e.titleRow,f=t&&"thead"===t.nodeName.toLowerCase(),h=[],p=0,g=c.length;p<g;p++)h.push([]);for(p=0,g=c.length;p<g;p++)for(a=(r=c[p]).firstChild;a;){if("TD"==a.nodeName.toUpperCase()||"TH"==a.nodeName.toUpperCase()){var m,v,b,y,D,x=[],S=H(a);for(y=(y=+a.getAttribute("colspan"))&&0!=y&&1!=y?y:1,D=(D=+a.getAttribute("rowspan"))&&0!=D&&1!=D?D:1,l=((e,t,n)=>{for(var r=e[t];r[n];)n++;return n})(h,p,0),s=1==y,n&&(s&&(ne(e,l,ut(S.data())),m=u[l],v=a.getAttribute("width")||null,(b=a.style.width.match(/width:\s*(\d+[pxem%]+)/))&&(v=b[1]),m.sWidthOrig=m.sWidth||v,f?(null===m.sTitle||m.autoTitle||(!0===d&&0===p||!1===d&&p===c.length-1||d===p||null===d)&&(a.innerHTML=m.sTitle),!m.sTitle&&s&&(m.sTitle=I(a.innerHTML),m.autoTitle=!0)):m.footer&&(a.innerHTML=m.footer),m.ariaTitle||(m.ariaTitle=S.attr("aria-label")||m.sTitle),m.className)&&S.addClass(m.className),0===H(".dt-column-title",a).length&&H(_.createElement(e.columnTitleTag)).addClass("dt-column-title").append(a.childNodes).appendTo(a),e.orderIndicators&&f&&0!==S.filter(":not([data-dt-order=disable])").length&&0!==S.parent(":not([data-dt-order=disable])").length&&0===H(".dt-column-order",a).length&&H(_.createElement(e.columnTitleTag)).addClass("dt-column-order").appendTo(a),0===H("div.dt-column-"+(b=f?"header":"footer"),a).length)&&H("<div>").addClass("dt-column-"+b).append(a.childNodes).appendTo(a),i=0;i<y;i++){for(o=0;o<D;o++)h[p+o][l+i]={cell:a,unique:s},h[p+o].row=r;x.push(l+i)}a.setAttribute("data-dt-column",w(x).join(","))}a=a.nextSibling}return h}function Oe(n,e,r){function t(e){var t=n.jqXHR?n.jqXHR.status:null;if((null===e||"number"==typeof t&&204==t)&&je(n,e={},[]),(t=e.error||e.sError)&&z(n,0,t),e.d&&"string"==typeof e.d)try{e=JSON.parse(e.d)}catch(e){}n.json=e,G(n,null,"xhr",[n,e,n.jqXHR],!0),r(e)}var a,o=n.ajax,i=n.oInstance,l=(H.isPlainObject(o)&&o.data&&(l="function"==typeof(a=o.data)?a(e,n):a,e="function"==typeof a&&l?l:H.extend(!0,e,l),delete o.data),{url:"string"==typeof o?o:"",data:e,success:t,dataType:"json",cache:!1,type:n.sServerMethod,error:function(e,t){-1===G(n,null,"xhr",[n,null,n.jqXHR],!0).indexOf(!0)&&("parsererror"==t?z(n,0,"Invalid JSON response",1):4===e.readyState&&z(n,0,"Ajax error",7)),S(n,!1)}});H.isPlainObject(o)&&H.extend(l,o),n.oAjaxData=e,G(n,null,"preXhr",[n,e,l],!0),"json"===l.submitAs&&"object"==typeof e&&(l.data=JSON.stringify(e),l.contentType||(l.contentType="application/json; charset=utf-8")),"function"==typeof o?n.jqXHR=o.call(i,e,t,n):""===o.url?(je(n,i={},[]),t(i)):n.jqXHR=H.ajax(l),a&&(o.data=a)}function je(e,t,n){var r="data";if(H.isPlainObject(e.ajax)&&void 0!==e.ajax.dataSrc&&("string"==typeof(e=e.ajax.dataSrc)||"function"==typeof e?r=e:void 0!==e.data&&(r=e.data)),!n)return"data"===r?t.aaData||t[r]:""!==r?U(r)(t):t;m(r)(t,n)}function Re(e,t,n){var e=H.isPlainObject(e.ajax)?e.ajax.dataSrc:null;return e&&e[t]?U(e[t])(n):(e="","draw"===t?e="sEcho":"recordsTotal"===t?e="iTotalRecords":"recordsFiltered"===t&&(e="iTotalDisplayRecords"),void 0!==n[e]?n[e]:n[t])}function Pe(n,e){var t=n.aoPreSearchCols;if("ssp"!=J(n)){for(var r,a,o,i,l,s=n,u=s.aoColumns,c=s.aoData,d=0;d<c.length;d++)if(c[d]&&!(l=c[d])._aFilterData){for(o=[],r=0,a=u.length;r<a;r++)u[r].bSearchable?"string"!=typeof(i=null===(i=q(s,d,r,"filter"))?"":i)&&i.toString&&(i=i.toString()):i="",i.indexOf&&-1!==i.indexOf("&")&&(Me.innerHTML=i,i=He?Me.textContent:Me.innerText),i.replace&&(i=i.replace(/[\r\n\u2028]/g,"")),o.push(i);l._aFilterData=o,l._sFilterRow=o.join("  "),0}n.aiDisplay=n.aiDisplayMaster.slice(),Ee(n.aiDisplay,n,e.search,e),H.each(n.searchFixed,function(e,t){Ee(n.aiDisplay,n,t,{})});for(var f=0;f<t.length;f++){var h=t[f];Ee(n.aiDisplay,n,h.search,h,f),H.each(n.aoColumns[f].searchFixed,function(e,t){Ee(n.aiDisplay,n,t,{},f)})}for(var p,g,m=n,v=V.ext.search,b=m.aiDisplay,y=0,D=v.length;y<D;y++){for(var x=[],S=0,w=b.length;S<w;S++)g=b[S],p=m.aoData[g],v[y](m,p._aFilterData,g,p._aData,S)&&x.push(g);b.length=0,lt(b,x)}}n.bFiltered=!0,G(n,null,"search",[n])}function Ee(e,t,n,r,a){if(""!==n){for(var o=0,i=[],l="function"==typeof n?n:null,s=n instanceof RegExp?n:l?null:((e,t)=>{var n,r,a,o=[],t=H.extend({},{boundary:!1,caseInsensitive:!0,exact:!1,regex:!1,smart:!0},t);return"string"!=typeof e&&(e=e.toString()),e=M(e),t.exact?new RegExp("^"+ke(e)+"$",t.caseInsensitive?"i":""):(e=t.regex?e:ke(e),t.smart&&(n=(e.match(/!?["\u201C][^"\u201D]+["\u201D]|[^ ]+/g)||[""]).map(function(e){var t,n=!1;return"!"===e.charAt(0)&&(n=!0,e=e.substring(1)),'"'===e.charAt(0)?e=(t=e.match(/^"(.*)"$/))?t[1]:e:"“"===e.charAt(0)&&(e=(t=e.match(/^\u201C(.*)\u201D$/))?t[1]:e),n&&(1<e.length&&o.push("(?!"+e+")"),e=""),e.replace(/"/g,"")}),r=o.length?o.join(""):"",a=t.boundary?"\\b":"",e="^(?=.*?"+a+n.join(")(?=.*?"+a)+")("+r+".)*$"),new RegExp(e,t.caseInsensitive?"i":""))})(n,r),o=0;o<e.length;o++){var u=t.aoData[e[o]],c=void 0===a?u._sFilterRow:u._aFilterData[a];(l&&l(c,u._aData,e[o],a)||s&&s.test(c))&&i.push(e[o])}for(e.length=i.length,o=0;o<i.length;o++)e[o]=i[o]}}var ke=V.util.escapeRegex,Me=H("<div>")[0],He=void 0!==Me.textContent;function We(i){var l,t,n,e,s=i.oInit,u=i.deferLoading,c=J(i);i.bInitialised?(Te(i,"header"),Te(i,"footer"),n=function(){Ce(i,i.aoHeader),Ce(i,i.aoFooter);var n=i.iInitDisplayStart;if(s.aaData)for(l=0;l<s.aaData.length;l++)D(i,s.aaData[l]);else!u&&"dom"!=c||he(i,H(i.nTBody).children("tr"));i.aiDisplay=i.aiDisplayMaster.slice(),Ne(i);var e=i,t=e.nTHead,r=t.querySelectorAll("tr"),a=e.titleRow,o=':not([data-dt-order="disable"]):not([data-dt-order="icon-only"])';!0===a?t=r[0]:!1===a?t=r[r.length-1]:null!==a&&(t=r[a]),e.orderHandler&&Ge(e,t,t===e.nTHead?"tr"+o+" th"+o+", tr"+o+" td"+o:"th"+o+", td"+o),g(e,r=[],e.aaSorting),e.aaSorting=r,Ye(i),S(i,!0),G(i,null,"preInit",[i],!0),Ie(i),"ssp"==c&&!u||("ajax"==c?Oe(i,{},function(e){var t=je(i,e);for(l=0;l<t.length;l++)D(i,t[l]);i.iInitDisplayStart=n,Ie(i),S(i,!1),Xe(i)}):(Xe(i),S(i,!1)))},(t=i).oFeatures.bStateSave?void 0!==(e=t.fnStateLoadCallback.call(t.oInstance,t,function(e){tt(t,e,n)}))&&tt(t,e,n):n()):setTimeout(function(){We(i)},200)}function Xe(e){var t;e._bInitComplete||(t=[e,e.json],e._bInitComplete=!0,re(e),G(e,null,"plugin-init",t,!0),G(e,"aoInitComplete","init",t,!0))}function Ve(e,t){t=parseInt(t,10);e._iDisplayLength=t,at(e),G(e,null,"length",[e,t])}function Be(e,t,n){var r=e._iDisplayStart,a=e._iDisplayLength,o=e.fnRecordsDisplay();if(0===o||-1===a)r=0;else if("number"==typeof t)o<(r=t*a)&&(r=0);else if("first"==t)r=0;else if("previous"==t)(r=0<=a?r-a:0)<0&&(r=0);else if("next"==t)r+a<o&&(r+=a);else if("last"==t)r=Math.floor((o-1)/a)*a;else{if("ellipsis"===t)return;z(e,0,"Unknown paging action: "+t,5)}o=e._iDisplayStart!==r;e._iDisplayStart=r,G(e,null,o?"page":"page-nc",[e]),o&&n&&x(e)}function S(e,t){e.bDrawing&&!1===t||G(e,null,"processing",[e,t])}function qe(e,t,n){t?(S(e,!0),setTimeout(function(){n(),S(e,!1)},0)):n()}function Ue(e){var t,n,r,a,o,i,l,s,u,c,d,f,h,p=H(e.nTable),g=e.oScroll;return""===g.sX&&""===g.sY?e.nTable:(t=g.sX,n=g.sY,r=e.oClasses.scrolling,o=(a=e.captionNode)?a._captionSide:null,u=H(p[0].cloneNode(!1)),i=H(p[0].cloneNode(!1)),c=function(e){return e?A(e):null},(l=p.children("tfoot")).length||(l=null),u=H(s="<div/>",{class:r.container}).append(H(s,{class:r.header.self}).css({overflow:"hidden",position:"relative",border:0,width:t?c(t):"100%"}).append(H(s,{class:r.header.inner}).css({"box-sizing":"content-box",width:g.sXInner||"100%"}).append(u.removeAttr("id").css("margin-left",0).append("top"===o?a:null).append(p.children("thead"))))).append(H(s,{class:r.body}).css({position:"relative",overflow:"auto",width:c(t)}).append(p)),l&&u.append(H(s,{class:r.footer.self}).css({overflow:"hidden",border:0,width:t?c(t):"100%"}).append(H(s,{class:r.footer.inner}).append(i.removeAttr("id").css("margin-left",0).append("bottom"===o?a:null).append(p.children("tfoot"))))),c=u.children(),d=c[0],f=c[1],h=l?c[2]:null,H(f).on("scroll.DT",function(){var e=this.scrollLeft;d.scrollLeft=e,l&&(h.scrollLeft=e)}),H("th, td",d).on("focus",function(){var e=d.scrollLeft;f.scrollLeft=e,l&&(f.scrollLeft=e)}),H(f).css("max-height",n),g.bCollapse||H(f).css("height",n),e.nScrollHead=d,e.nScrollBody=f,e.nScrollFoot=h,e.aoDrawCallback.push(ze),u[0])}function ze(t){var e=t.oScroll,n=e.iBarWidth,r=H(t.nScrollHead).children("div"),a=r.children("table"),o=t.nScrollBody,i=H(o),l=H(t.nScrollFoot).children("div"),s=l.children("table"),u=H(t.nTHead),c=H(t.nTable),d=t.nTFoot&&H("th, td",t.nTFoot).length?H(t.nTFoot):null,f=t.oBrowser,h=o.scrollHeight>o.clientHeight;if(t.scrollBarVis!==h&&void 0!==t.scrollBarVis)t.scrollBarVis=h,re(t);else{if(t.scrollBarVis=h,c.children("thead, tfoot").remove(),(h=u.clone().prependTo(c)).find("th, td").removeAttr("tabindex"),h.find("[id]").removeAttr("id"),d&&(D=d.clone().prependTo(c)).find("[id]").removeAttr("id"),t.aiDisplay.length){for(var p=null,g="ssp"!==J(t)?t._iDisplayStart:0,m=g;m<g+t.aiDisplay.length;m++){var v=t.aiDisplay[m],v=t.aoData[v].nTr;if(v){p=v;break}}if(p)for(var b=H(p).children("th, td").map(function(e){return{idx:ae(t,e),width:H(this).outerWidth()}}),m=0;m<b.length;m++){var y=t.aoColumns[b[m].idx].colEl[0];y.style.width.replace("px","")!==b[m].width&&(y.style.width=b[m].width+"px",e.sX)&&(y.style.minWidth=b[m].width+"px")}}a.find("colgroup").remove(),a.append(t.colgroup.clone()),d&&(s.find("colgroup").remove(),s.append(t.colgroup.clone())),H("th, td",h).each(function(){H(this.childNodes).wrapAll('<div class="dt-scroll-sizing">')}),d&&H("th, td",D).each(function(){H(this.childNodes).wrapAll('<div class="dt-scroll-sizing">')});var u=Math.floor(c.height())>o.clientHeight||"scroll"==i.css("overflow-y"),h="padding"+(f.bScrollbarLeft?"Left":"Right"),D=c.outerWidth();a.css("width",A(D)),r.css("width",A(D)).css(h,u?n+"px":"0px"),d&&(s.css("width",A(D)),l.css("width",A(D)).css(h,u?n+"px":"0px")),c.children("colgroup").prependTo(c),i.trigger("scroll"),!t.bSorted&&!t.bFiltered||t._drawHold||(o.scrollTop=0)}}function $e(e){return H(e.nTableWrapper).is(":visible")?H(e.nTableWrapper).width():0}function A(e){return null===e?"0px":"number"==typeof e?e<0?"0px":e+"px":e.match(/\d$/)?e+"px":e}function Ye(e){var t=e.aoColumns;for(e.colgroup.empty(),l=0;l<t.length;l++)t[l].bVisible&&e.colgroup.append(t[l].colEl)}function Ge(o,e,t,i,l){rt(e,t,function(e){var t=!1,n=void 0===i?fe(e.target):"function"==typeof i?i():Array.isArray(i)?i:[i];if(n.length){for(var r=0,a=n.length;r<a;r++)if(!1!==((e,t,n,r)=>{function a(e,t){var n=e._idx;return(n=void 0===n?s.indexOf(e[1]):n)+1<s.length?n+1:t?null:0}var o,i=e.aoColumns[t],l=e.aaSorting,s=i.asSorting;if(!i.bSortable)return!1;"number"==typeof l[0]&&(l=e.aaSorting=[l]),(r||n)&&e.oFeatures.bSortMulti?-1!==(i=b(l,"0").indexOf(t))?null===(o=null===(o=a(l[i],!0))&&1===l.length?0:o)||""===s[o]?l.splice(i,1):(l[i][1]=s[o],l[i]._idx=o):(r?l.push([t,s[0],0]):l.push([t,l[0][1],0]),l[l.length-1]._idx=0):l.length&&l[0][0]==t?(o=a(l[0]),l.length=1,l[0][1]=s[o],l[0]._idx=o):(l.length=0,l.push([t,s[0]]),l[0]._idx=0)})(o,n[r],r,e.shiftKey)&&(t=!0),1===o.aaSorting.length&&""===o.aaSorting[0][1])break;t&&qe(o,!0,function(){Qe(o),Je(o,o.aiDisplay),Ie(o,!1,!1),l&&l()})}})}function Je(e,t){if(!(t.length<2)){for(var n=e.aiDisplayMaster,r={},a={},o=0;o<n.length;o++)r[n[o]]=o;for(o=0;o<t.length;o++)a[t[o]]=r[t[o]];t.sort(function(e,t){return a[e]-a[t]})}}function g(n,r,e){function t(e){var t;H.isPlainObject(e)?void 0!==e.idx?r.push([e.idx,e.dir]):e.name&&-1!==(t=b(n.aoColumns,"sName").indexOf(e.name))&&r.push([t,e.dir]):r.push(e)}if(H.isPlainObject(e))t(e);else if(e.length&&"number"==typeof e[0])t(e);else if(e.length)for(var a=0;a<e.length;a++)t(e[a])}function Ze(e){var t,n,r,a,o,i,l,s=[],u=V.ext.type.order,c=e.aoColumns,d=e.aaSortingFixed,f=H.isPlainObject(d),h=[];if(e.oFeatures.bSort)for(Array.isArray(d)&&g(e,h,d),f&&d.pre&&g(e,h,d.pre),g(e,h,e.aaSorting),f&&d.post&&g(e,h,d.post),t=0;t<h.length;t++)if(c[l=h[t][0]])for(n=0,r=(a=c[l].aDataSort).length;n<r;n++)i=c[o=a[n]].sType||"string",void 0===h[t]._idx&&(h[t]._idx=c[o].asSorting.indexOf(h[t][1])),h[t][1]&&s.push({src:l,col:o,dir:h[t][1],index:h[t]._idx,type:i,formatter:u[i+"-pre"],sorter:u[i+"-"+h[t][1]]});return s}function Qe(e,t,n){var r,a,o,i,c,d=[],l=V.ext.type.order,f=e.aoData,s=e.aiDisplayMaster;for(ue(e),void 0!==t?(i=e.aoColumns[t],c=[{src:t,col:t,dir:n,index:0,type:i.sType,formatter:l[i.sType+"-pre"],sorter:l[i.sType+"-"+n]}],s=s.slice()):c=Ze(e),r=0,a=c.length;r<a;r++){o=c[r],x=D=y=p=h=u=b=v=m=g=void 0;var u,h,p,g=e,m=o.col,v=g.aoColumns[m],b=V.ext.order[v.sSortDataType];b&&(u=b.call(g.oInstance,g,m,oe(g,m)));for(var y=V.ext.type.order[v.sType+"-pre"],D=g.aoData,x=0;x<D.length;x++)D[x]&&((h=D[x])._aSortData||(h._aSortData=[]),h._aSortData[m]&&!b||(p=b?u[x]:q(g,x,m,"sort"),h._aSortData[m]=y?y(p,g):p))}if("ssp"!=J(e)&&0!==c.length){for(r=0,a=s.length;r<a;r++)d[r]=r;c.length&&"desc"===c[0].dir&&e.orderDescReverse&&d.reverse(),s.sort(function(e,t){for(var n,r,a,o,i=c.length,l=f[e]._aSortData,s=f[t]._aSortData,u=0;u<i;u++)if(n=l[(o=c[u]).col],r=s[o.col],o.sorter){if(0!==(a=o.sorter(n,r)))return a}else if(0!==(a=n<r?-1:r<n?1:0))return"asc"===o.dir?a:-a;return(n=d[e])<(r=d[t])?-1:r<n?1:0})}else 0===c.length&&s.sort(function(e,t){return e<t?-1:t<e?1:0});return void 0===t&&(e.bSorted=!0,e.sortDetails=c,G(e,null,"order",[e,c])),s}function Ke(e){var t,n,r,a=e.aLastSort,o=e.oClasses.order.position,i=Ze(e),l=e.oFeatures;if(l.bSort&&l.bSortClasses){for(t=0,n=a.length;t<n;t++)r=a[t].src,H(b(e.aoData,"anCells",r)).removeClass(o+(t<2?t+1:3));for(t=0,n=i.length;t<n;t++)r=i[t].src,H(b(e.aoData,"anCells",r)).addClass(o+(t<2?t+1:3))}e.aLastSort=i}function et(n){var t,e;n._bLoadingState||(g(n,e=[],n.aaSorting),t=n.aoColumns,e={time:+new Date,start:n._iDisplayStart,length:n._iDisplayLength,order:e.map(function(e){return t[e[0]]&&t[e[0]].sName?[t[e[0]].sName,e[1]]:e.slice()}),search:H.extend({},n.oPreviousSearch),columns:n.aoColumns.map(function(e,t){return{name:e.sName,visible:e.bVisible,search:H.extend({},n.aoPreSearchCols[t])}})},n.oSavedState=e,G(n,"aoStateSaveParams","stateSaveParams",[n,e]),n.oFeatures.bStateSave&&!n.bDestroying&&n.fnStateSaveCallback.call(n.oInstance,n,e))}function tt(r,e,t){var n,a,o=r.aoColumns,i=b(r.aoColumns,"sName"),l=(r._bLoadingState=!0,r._bInitComplete?new V.Api(r):null);if(e&&e.time){var s=r.iStateDuration;if(0<s&&e.time<+new Date-1e3*s)r._bLoadingState=!1;else if(-1!==G(r,"aoStateLoadParams","stateLoadParams",[r,e]).indexOf(!1))r._bLoadingState=!1;else{if(r.oLoadedState=H.extend(!0,{},e),G(r,null,"stateLoadInit",[r,e],!0),void 0!==e.length&&(l?l.page.len(e.length):r._iDisplayLength=e.length),void 0!==e.start&&(null===l?(r._iDisplayStart=e.start,r.iInitDisplayStart=e.start):Be(r,e.start/r._iDisplayLength)),void 0!==e.order&&(r.aaSorting=[],H.each(e.order,function(e,t){var n=[t[0],t[1]];if("string"==typeof t[0]){t=i.indexOf(t[0]);if(t<0)return;n[0]=t}else if(n[0]>=o.length)return;r.aaSorting.push(n)})),void 0!==e.search&&H.extend(r.oPreviousSearch,e.search),e.columns){var u,c=e.columns,d=b(e.columns,"name");if(d.join("").length&&d.join("")!==i.join(""))for(c=[],n=0;n<i.length;n++)""!=i[n]&&0<=(u=d.indexOf(i[n]))?c.push(e.columns[u]):c.push({});if(c.length===o.length){for(n=0,a=c.length;n<a;n++){var f=c[n];void 0!==f.visible&&(l?l.column(n).visible(f.visible,!1):o[n].bVisible=f.visible),void 0!==f.search&&H.extend(r.aoPreSearchCols[n],f.search)}l&&l.one("draw",function(){l.columns.adjust()})}}r._bLoadingState=!1,G(r,"aoStateLoaded","stateLoaded",[r,e])}}else r._bLoadingState=!1;t()}function z(e,t,n,r){if(n="DataTables warning: "+(e?"table id="+e.sTableId+" - ":"")+n,r&&(n+=". For more information about this error, please see https://datatables.net/tn/"+r),t)W.console&&console.log&&console.log(n);else{t=V.ext,t=t.sErrMode||t.errMode;if(e&&G(e,null,"dt-error",[e,r,n],!0),"alert"==t)alert(n);else{if("throw"==t)throw new Error(n);"function"==typeof t&&t(e,r,n)}}}function $(n,r,e,t){Array.isArray(e)?H.each(e,function(e,t){Array.isArray(t)?$(n,r,t[0],t[1]):$(n,r,t)}):(void 0===t&&(t=e),void 0!==r[e]&&(n[t]=r[e]))}function nt(e,t,n){var r,a;for(a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r=t[a],H.isPlainObject(r)?(H.isPlainObject(e[a])||(e[a]={}),H.extend(!0,e[a],r)):n&&"data"!==a&&"aaData"!==a&&Array.isArray(r)?e[a]=r.slice():e[a]=r);return e}function rt(e,t,n){H(e).on("click.DT",t,function(e){n(e)}).on("keypress.DT",t,function(e){13===e.which&&(e.preventDefault(),n(e))}).on("selectstart.DT",t,function(){return!1})}function Y(e,t,n){n&&e[t].push(n)}function G(t,e,n,r,a){var o=[];return e&&(o=t[e].slice().reverse().map(function(e){return e.apply(t.oInstance,r)})),null!==n&&(e=H.Event(n+".dt"),n=H(t.nTable),e.dt=t.api,n[a?"trigger":"triggerHandler"](e,r),a&&0===n.parents("body").length&&H("body").trigger(e,r),o.push(e.result)),o}function at(e){var t=e._iDisplayStart,n=e.fnDisplayEnd(),r=e._iDisplayLength;n<=t&&(t=n-r),t-=t%r,e._iDisplayStart=t=-1===r||t<0?0:t}function ot(e,t){var e=e.renderer,n=V.ext.renderer[t];return H.isPlainObject(e)&&e[t]?n[e[t]]||n._:"string"==typeof e&&n[e]||n._}function J(e){return e.oFeatures.bServerSide?"ssp":e.ajax?"ajax":"dom"}function it(e,t,n){var r=e.fnFormatNumber,a=e._iDisplayStart+1,o=e._iDisplayLength,i=e.fnRecordsDisplay(),l=e.fnRecordsTotal(),s=-1===o;return t.replace(/_START_/g,r.call(e,a)).replace(/_END_/g,r.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,r.call(e,l)).replace(/_TOTAL_/g,r.call(e,i)).replace(/_PAGE_/g,r.call(e,s?1:Math.ceil(a/o))).replace(/_PAGES_/g,r.call(e,s?1:Math.ceil(i/o))).replace(/_ENTRIES_/g,e.api.i18n("entries","",n)).replace(/_ENTRIES-MAX_/g,e.api.i18n("entries","",l)).replace(/_ENTRIES-TOTAL_/g,e.api.i18n("entries","",i))}function lt(e,t){if(t)if(t.length<1e4)e.push.apply(e,t);else for(l=0;l<t.length;l++)e.push(t[l])}function st(e,t,n){for(Array.isArray(n)||(n=[n]),l=0;l<n.length;l++)e.on(t+".dt",n[l])}function ut(n){return V.ext.escape.attributes&&H.each(n,function(e,t){n[e]=u(t)}),n}var ct=[],t=Array.prototype;X=function(e,t){if(!(this instanceof X))return new X(e,t);function n(e){e=e,t=V.settings,r=b(t,"nTable");var n,t,r,a=e?e.nTable&&e.oFeatures?[e]:e.nodeName&&"table"===e.nodeName.toLowerCase()?-1!==(a=r.indexOf(e))?[t[a]]:null:e&&"function"==typeof e.settings?e.settings().toArray():("string"==typeof e?n=H(e).get():e instanceof H&&(n=e.get()),n?t.filter(function(e,t){return n.includes(r[t])}):void 0):[];a&&o.push.apply(o,a)}var r,o=[];if(Array.isArray(e))for(r=0;r<e.length;r++)n(e[r]);else n(e);this.context=1<o.length?w(o):o,lt(this,t),this.selector={rows:null,cols:null,opts:null},X.extend(this,this,ct)},V.Api=X,H.extend(X.prototype,{any:function(){return 0!==this.count()},context:[],count:function(){return this.flatten().length},each:function(e){for(var t=0,n=this.length;t<n;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new X(t[e],this[e]):null},filter:function(e){e=t.filter.call(this,e,this);return new X(this.context,e)},flatten:function(){var e=[];return new X(this.context,e.concat.apply(e,this.toArray()))},get:function(e){return this[e]},join:t.join,includes:function(e){return-1!==this.indexOf(e)},indexOf:t.indexOf,iterator:function(e,t,n,r){var a,o,i,l,s,u,c,d,f=[],h=this.context,p=this.selector;for("string"==typeof e&&(r=n,n=t,t=e,e=!1),o=0,i=h.length;o<i;o++){var g=new X(h[o]);if("table"===t)void 0!==(a=n.call(g,h[o],o))&&f.push(a);else if("columns"===t||"rows"===t)void 0!==(a=n.call(g,h[o],this[o],o))&&f.push(a);else if("every"===t||"column"===t||"column-rows"===t||"row"===t||"cell"===t)for(c=this[o],"column-rows"===t&&(u=wt(h[o],p.opts)),l=0,s=c.length;l<s;l++)d=c[l],void 0!==(a="cell"===t?n.call(g,h[o],d.row,d.column,o,l):n.call(g,h[o],d,o,l,u))&&f.push(a)}return f.length||r?((e=(r=new X(h,e?f.concat.apply([],f):f)).selector).rows=p.rows,e.cols=p.cols,e.opts=p.opts,r):this},lastIndexOf:t.lastIndexOf,length:0,map:function(e){e=t.map.call(this,e,this);return new X(this.context,e)},pluck:function(e){var t=V.util.get(e);return this.map(function(e){return t(e)})},pop:t.pop,push:t.push,reduce:t.reduce,reduceRight:t.reduceRight,reverse:t.reverse,selector:null,shift:t.shift,slice:function(){return new X(this.context,this)},sort:t.sort,splice:t.splice,toArray:function(){return t.slice.call(this)},to$:function(){return H(this)},toJQuery:function(){return H(this)},unique:function(){return new X(this.context,w(this.toArray()))},unshift:t.unshift}),W.__apiStruct=ct,X.extend=function(e,t,n){if(n.length&&t&&(t instanceof X||t.__dt_wrapper))for(var r,a=0,o=n.length;a<o;a++)"__proto__"!==(r=n[a]).name&&(t[r.name]="function"===r.type?((t,n,r)=>function(){var e=n.apply(t||this,arguments);return X.extend(e,e,r.methodExt),e})(e,r.val,r):"object"===r.type?{}:r.val,t[r.name].__dt_wrapper=!0,X.extend(e,t[r.name],r.propExt))},X.register=r=function(e,t){if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)X.register(e[n],t);else for(var a=e.split("."),o=ct,i=0,l=a.length;i<l;i++){var s,u,c=((e,t)=>{for(var n=0,r=e.length;n<r;n++)if(e[n].name===t)return e[n];return null})(o,u=(s=-1!==a[i].indexOf("()"))?a[i].replace("()",""):a[i]);c||o.push(c={name:u,val:{},methodExt:[],propExt:[],type:"object"}),i===l-1?(c.val=t,c.type="function"==typeof t?"function":H.isPlainObject(t)?"object":"other"):o=s?c.methodExt:c.propExt}},X.registerPlural=e=function(e,t,n){X.register(e,n),X.register(t,function(){var e=n.apply(this,arguments);return e===this?this:e instanceof X?e.length?Array.isArray(e[0])?new X(e.context,e[0]):e[0]:void 0:e})};function dt(e,t){var n,r;return Array.isArray(e)?(n=[],e.forEach(function(e){e=dt(e,t);lt(n,e)}),n.filter(function(e){return e})):"number"==typeof e?[t[e]]:(r=t.map(function(e){return e.nTable}),H(r).filter(e).map(function(){var e=r.indexOf(this);return t[e]}).toArray())}function ft(a,o,e){var t,n;e&&(t=new X(a)).one("draw",function(){e(t.ajax.json())}),"ssp"==J(a)?Ie(a,o):(S(a,!0),(n=a.jqXHR)&&4!==n.readyState&&n.abort(),Oe(a,{},function(e){be(a);for(var t=je(a,e),n=0,r=t.length;n<r;n++)D(a,t[n]);Ie(a,o),Xe(a),S(a,!1)}))}function ht(e,t,n,r,a){for(var o,i=[],l=typeof t,s=0,u=(t=t&&"string"!=l&&"function"!=l&&void 0!==t.length?t:[t]).length;s<u;s++)(o=(o=n("string"==typeof t[s]?t[s].trim():t[s])).filter(function(e){return null!=e}))&&o.length&&(i=i.concat(o));var c=C.selector[e];if(c.length)for(s=0,u=c.length;s<u;s++)i=c[s](r,a,i);return w(i)}function pt(e){return(e=e||{}).filter&&void 0===e.search&&(e.search=e.filter),H.extend({columnOrder:"implied",search:"none",order:"current",page:"all"},e)}function gt(e){var t=new X(e.context[0]);return e.length&&t.push(e[0]),t.selector=e.selector,t.length&&1<t[0].length&&t[0].splice(1),t}r("tables()",function(e){return null!=e?new X(dt(e,this.context)):this}),r("table()",function(e){var e=this.tables(e),t=e.context;return t.length?new X(t[0]):e}),[["nodes","node","nTable"],["body","body","nTBody"],["header","header","nTHead"],["footer","footer","nTFoot"]].forEach(function(t){e("tables()."+t[0]+"()","table()."+t[1]+"()",function(){return this.iterator("table",function(e){return e[t[2]]},1)})}),[["header","aoHeader"],["footer","aoFooter"]].forEach(function(t){r("table()."+t[0]+".structure()",function(e){var n=this.columns(e).indexes().flatten().toArray(),e=this.context[0],e=_e(e,e[t[1]],n),r=n.slice().sort(function(e,t){return e-t});return e.map(function(t){return n.map(function(e){return t[r.indexOf(e)]})})})}),e("tables().containers()","table().container()",function(){return this.iterator("table",function(e){return e.nTableWrapper},1)}),r("tables().every()",function(n){var r=this;return this.iterator("table",function(e,t){n.call(r.table(t),t)})}),r("caption()",function(a,o){var e,t=this.context;return void 0===a?(e=t[0].captionNode)&&t.length?e.innerHTML:null:this.iterator("table",function(e){var t=H(e.nTable),n=H(e.captionNode),r=H(e.nTableWrapper);n.length||(n=H("<caption/>").html(a),e.captionNode=n[0],o)||(t.prepend(n),o=n.css("caption-side")),n.html(a),o&&(n.css("caption-side",o),n[0]._captionSide=o),(r.find("div.dataTables_scroll").length?(e="top"===o?"Head":"Foot",r.find("div.dataTables_scroll"+e+" table")):t).prepend(n)},1)}),r("caption.node()",function(){var e=this.context;return e.length?e[0].captionNode:null}),r("draw()",function(t){return this.iterator("table",function(e){"page"===t?x(e):Ie(e,!1===(t="string"==typeof t?"full-hold"!==t:t))})}),r("page()",function(t){return void 0===t?this.page.info().page:this.iterator("table",function(e){Be(e,t)})}),r("page.info()",function(){var e,t,n,r,a;if(0!==this.context.length)return t=(e=this.context[0])._iDisplayStart,n=e.oFeatures.bPaginate?e._iDisplayLength:-1,r=e.fnRecordsDisplay(),{page:(a=-1===n)?0:Math.floor(t/n),pages:a?1:Math.ceil(r/n),start:t,end:e.fnDisplayEnd(),length:n,recordsTotal:e.fnRecordsTotal(),recordsDisplay:r,serverSide:"ssp"===J(e)}}),r("page.len()",function(t){return void 0===t?0!==this.context.length?this.context[0]._iDisplayLength:void 0:this.iterator("table",function(e){Ve(e,t)})}),r("ajax.json()",function(){var e=this.context;if(0<e.length)return e[0].json}),r("ajax.params()",function(){var e=this.context;if(0<e.length)return e[0].oAjaxData}),r("ajax.reload()",function(t,n){return this.iterator("table",function(e){ft(e,!1===n,t)})}),r("ajax.url()",function(t){var e=this.context;return void 0===t?0===e.length?void 0:(e=e[0],H.isPlainObject(e.ajax)?e.ajax.url:e.ajax):this.iterator("table",function(e){H.isPlainObject(e.ajax)?e.ajax.url=t:e.ajax=t})}),r("ajax.url().load()",function(t,n){return this.iterator("table",function(e){ft(e,!1===n,t)})});function mt(o,i,e,t){function l(e,t){var n;if(Array.isArray(e)||e instanceof H)for(var r=0,a=e.length;r<a;r++)l(e[r],t);else e.nodeName&&"tr"===e.nodeName.toLowerCase()?(e.setAttribute("data-dt-row",i.idx),s.push(e)):(n=H("<tr><td></td></tr>").attr("data-dt-row",i.idx).addClass(t),H("td",n).addClass(t).html(e)[0].colSpan=ie(o),s.push(n[0]))}var s=[];l(e,t),i._details&&i._details.detach(),i._details=H(s),i._detailsShow&&i._details.insertAfter(i.nTr)}function vt(e,t){var i,a,n,l,r=e.context;r.length&&e.length&&(n=r[0].aoData[e[0]])._details&&((n._detailsShow=t)?(n._details.insertAfter(n.nTr),H(n.nTr).addClass("dt-hasChild")):(n._details.detach(),H(n.nTr).removeClass("dt-hasChild")),G(r[0],null,"childRow",[t,e.row(e[0])]),i=r[0],a=new X(i),t="draw"+(n=".dt.DT_details"),e="column-sizing"+n,n="destroy"+n,l=i.aoData,a.off(t+" "+e+" "+n),0<b(l,"_details").length&&(a.on(t,function(e,t){i===t&&a.rows({page:"current"}).eq(0).each(function(e){e=l[e];e._detailsShow&&e._details.insertAfter(e.nTr)})}),a.on(e,function(e,t){if(i===t)for(var n,r=ie(t),a=0,o=l.length;a<o;a++)(n=l[a])&&n._details&&n._details.each(function(){var e=H(this).children("td");1==e.length&&e.attr("colspan",r)})}),a.on(n,function(e,t){if(i===t)for(var n=0,r=l.length;n<r;n++)l[n]&&l[n]._details&&Ct(a,n)})),_t(r))}function bt(e,t,n,r,a,o){for(var i=[],l=0,s=a.length;l<s;l++)i.push(q(e,a[l],t,o));return i}function yt(e,t,n){var r=e.aoHeader,e=e.titleRow,a=null;if(void 0!==n)a=n;else if(!0===e)a=0;else if(!1===e)a=r.length-1;else if(null!==e)a=e;else{for(var o=0;o<r.length;o++)r[o][t].unique&&H(".dt-column-title",r[o][t].cell).text()&&(a=o);null===a&&(a=0)}return r[a][t].cell}function Dt(i,e,l){var s,u,c=i.aoColumns,d=(e=>{for(var t=[],n=0;n<e.length;n++)for(var r=0;r<e[n].length;r++){var a=e[n][r].cell;t.includes(a)||t.push(a)}return t})(i.aoHeader),e=ht("column",e,function(n){var r,e=f(n);if(""===n)return h(c.length);if(null!==e)return[0<=e?e:c.length+e];if("function"==typeof n)return r=wt(i,l),c.map(function(e,t){return n(t,bt(i,t,0,0,r),yt(i,t))?t:null});var t,a,o="string"==typeof n?n.match(Lt):"";if(o)switch(o[2]){case"visIdx":case"visible":return o[1]&&o[1].match(/^\d+$/)?(t=parseInt(o[1],10))<0?[(a=c.map(function(e,t){return e.bVisible?t:null}))[a.length+t]]:[ae(i,t)]:c.map(function(e,t){return e.bVisible&&!1!==e.responsiveVisible&&(!o[1]||0<H(d[t]).filter(o[1]).length)?t:null});case"name":return(s=s||b(c,"sName")).map(function(e,t){return e===o[1]?t:null});case"title":return(u=u||b(c,"sTitle")).map(function(e,t){return e===o[1]?t:null});default:return[]}return n.nodeName&&n._DT_CellIndex?[n._DT_CellIndex.column]:(e=H(d).filter(n).map(function(){return fe(this)}).toArray().sort(function(e,t){return e-t})).length||!n.nodeName?e:(e=H(n).closest("*[data-dt-column]")).length?[e.data("dt-column")]:[]},i,l);return l.columnOrder&&"index"===l.columnOrder?e.sort(function(e,t){return e-t}):e}var xt,St,wt=function(e,t){var n,r=[],a=e.aiDisplay,o=e.aiDisplayMaster,i=t.search,l=t.order,t=t.page;if("ssp"==J(e))return"removed"===i?[]:h(0,o.length);if("current"==t)for(u=e._iDisplayStart,c=e.fnDisplayEnd();u<c;u++)r.push(a[u]);else if("current"==l||"applied"==l){if("none"==i)r=o.slice();else if("applied"==i)r=a.slice();else if("removed"==i){for(var s={},u=0,c=a.length;u<c;u++)s[a[u]]=null;o.forEach(function(e){Object.prototype.hasOwnProperty.call(s,e)||r.push(e)})}}else if("index"==l||"original"==l)for(u=0,c=e.aoData.length;u<c;u++)e.aoData[u]&&("none"==i||-1===(n=a.indexOf(u))&&"removed"==i||0<=n&&"applied"==i)&&r.push(u);else if("number"==typeof l){var d=Qe(e,l,"asc");if("none"===i)r=d;else for(u=0;u<d.length;u++)(-1===(n=a.indexOf(d[u]))&&"removed"==i||0<=n&&"applied"==i)&&r.push(d[u])}return r},Tt=(r("rows()",function(n,r){void 0===n?n="":H.isPlainObject(n)&&(r=n,n=""),r=pt(r);var e=this.iterator("table",function(e){return t=ht("row",t=n,function(n){var e=f(n),r=a.aoData;if(null!==e&&!o)return[e];if(i=i||wt(a,o),null!==e&&-1!==i.indexOf(e))return[e];if(null==n||""===n)return i;if("function"==typeof n)return i.map(function(e){var t=r[e];return n(e,t._aData,t.nTr)?e:null});if(n.nodeName)return e=n._DT_RowIndex,t=n._DT_CellIndex,void 0!==e?r[e]&&r[e].nTr===n?[e]:[]:t?r[t.row]&&r[t.row].nTr===n.parentNode?[t.row]:[]:(e=H(n).closest("*[data-dt-row]")).length?[e.data("dt-row")]:[];if("string"==typeof n&&"#"===n.charAt(0)){var t=a.aIds[n.replace(/^#/,"")];if(void 0!==t)return[t.idx]}e=L(v(a.aoData,i,"nTr"));return H(e).filter(n).map(function(){return this._DT_RowIndex}).toArray()},a=e,o=r),"current"!==o.order&&"applied"!==o.order||Je(a,t),t;var a,t,o,i},1);return e.selector.rows=n,e.selector.opts=r,e}),r("rows().nodes()",function(){return this.iterator("row",function(e,t){return e.aoData[t].nTr||void 0},1)}),r("rows().data()",function(){return this.iterator(!0,"rows",function(e,t){return v(e.aoData,t,"_aData")},1)}),e("rows().cache()","row().cache()",function(n){return this.iterator("row",function(e,t){e=e.aoData[t];return"search"===n?e._aFilterData:e._aSortData},1)}),e("rows().invalidate()","row().invalidate()",function(n){return this.iterator("row",function(e,t){ye(e,t,n)})}),e("rows().indexes()","row().index()",function(){return this.iterator("row",function(e,t){return t},1)}),e("rows().ids()","row().id()",function(e){for(var t=[],n=this.context,r=0,a=n.length;r<a;r++)for(var o=0,i=this[r].length;o<i;o++){var l=n[r].rowIdFn(n[r].aoData[this[r][o]]._aData);t.push((!0===e?"#":"")+l)}return new X(n,t)}),e("rows().remove()","row().remove()",function(){return this.iterator("row",function(e,t){var n=e.aoData,r=n[t],a=e.aiDisplayMaster.indexOf(t),a=(-1!==a&&e.aiDisplayMaster.splice(a,1),0<e._iRecordsDisplay&&e._iRecordsDisplay--,at(e),e.rowIdFn(r._aData));void 0!==a&&delete e.aIds[a],n[t]=null}),this}),r("rows.add()",function(o){var e=this.iterator("table",function(e){for(var t,n=[],r=0,a=o.length;r<a;r++)(t=o[r]).nodeName&&"TR"===t.nodeName.toUpperCase()?n.push(he(e,t)[0]):n.push(D(e,t));return n},1),t=this.rows(-1);return t.pop(),lt(t,e),t}),r("row()",function(e,t){return gt(this.rows(e,t))}),r("row().data()",function(e){var t,n=this.context;return void 0===e?n.length&&this.length&&this[0].length?n[0].aoData[this[0]]._aData:void 0:((t=n[0].aoData[this[0]])._aData=e,Array.isArray(e)&&t.nTr&&t.nTr.id&&m(n[0].rowId)(e,t.nTr.id),ye(n[0],this[0],"data"),this)}),r("row().node()",function(){var e=this.context;if(e.length&&this.length&&this[0].length){e=e[0].aoData[this[0]];if(e&&e.nTr)return e.nTr}return null}),r("row.add()",function(t){t instanceof H&&t.length&&(t=t[0]);var e=this.iterator("table",function(e){return t.nodeName&&"TR"===t.nodeName.toUpperCase()?he(e,t)[0]:D(e,t)});return this.row(e[0])}),H(_).on("plugin-init.dt",function(e,t){var r=new X(t);r.on("stateSaveParams.DT",function(e,t,n){for(var r=t.rowIdFn,a=t.aiDisplayMaster,o=[],i=0;i<a.length;i++){var l=a[i],l=t.aoData[l];l._detailsShow&&o.push("#"+r(l._aData))}n.childRows=o}),r.on("stateLoaded.DT",function(e,t,n){Tt(r,n)}),Tt(r,r.state.loaded())}),function(e,t){t&&t.childRows&&e.rows(t.childRows.map(function(e){return e.replace(/([^:\\]*(?:\\.[^:\\]*)*):/g,"$1\\:")})).every(function(){G(e.settings()[0],null,"requestChild",[this])})}),_t=V.util.throttle(function(e){et(e[0])},500),Ct=function(e,t){var n=e.context;n.length&&(t=n[0].aoData[void 0!==t?t:e[0]])&&t._details&&(t._details.detach(),t._detailsShow=void 0,t._details=void 0,H(t.nTr).removeClass("dt-hasChild"),_t(n))},It="row().child",At=It+"()",Lt=(r(At,function(e,t){var n=this.context;return void 0===e?n.length&&this.length&&n[0].aoData[this[0]]?n[0].aoData[this[0]]._details:void 0:(!0===e?this.child.show():!1===e?Ct(this):n.length&&this.length&&mt(n[0],n[0].aoData[this[0]],e,t),this)}),r([It+".show()",At+".show()"],function(){return vt(this,!0),this}),r([It+".hide()",At+".hide()"],function(){return vt(this,!1),this}),r([It+".remove()",At+".remove()"],function(){return Ct(this),this}),r(It+".isShown()",function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]]&&e[0].aoData[this[0]]._detailsShow||!1}),/^([^:]+)?:(name|title|visIdx|visible)$/);r("columns()",function(t,n){void 0===t?t="":H.isPlainObject(t)&&(n=t,t=""),n=pt(n);var e=this.iterator("table",function(e){return Dt(e,t,n)},1);return e.selector.cols=t,e.selector.opts=n,e}),e("columns().header()","column().header()",function(n){return this.iterator("column",function(e,t){return yt(e,t,n)},1)}),e("columns().footer()","column().footer()",function(n){return this.iterator("column",function(e,t){return e.aoFooter.length?e.aoFooter[void 0!==n?n:0][t].cell:null},1)}),e("columns().data()","column().data()",function(){return this.iterator("column-rows",bt,1)}),e("columns().render()","column().render()",function(o){return this.iterator("column-rows",function(e,t,n,r,a){return bt(e,t,0,0,a,o)},1)}),e("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].mData},1)}),e("columns().cache()","column().cache()",function(o){return this.iterator("column-rows",function(e,t,n,r,a){return v(e.aoData,a,"search"===o?"_aFilterData":"_aSortData",t)},1)}),e("columns().init()","column().init()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t]},1)}),e("columns().names()","column().name()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].sName},1)}),e("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(e,t,n,r,a){return v(e.aoData,a,"anCells",t)},1)}),e("columns().titles()","column().title()",function(n,r){return this.iterator("column",function(e,t){"number"==typeof n&&(r=n,n=void 0);t=H(".dt-column-title",this.column(t).header(r));return void 0!==n?(t.html(n),this):t.html()},1)}),e("columns().types()","column().type()",function(){return this.iterator("column",function(e,t){var t=e.aoColumns[t],n=t.sType;return n||(ue(e),n=t.sType),n},1)}),e("columns().visible()","column().visible()",function(n,r){var t=this,a=[],e=this.iterator("column",function(e,t){if(void 0===n)return e.aoColumns[t].bVisible;((e,t,n)=>{var r,a,o=e.aoColumns,i=o[t],l=e.aoData;if(void 0===n)return i.bVisible;if(i.bVisible===n)return!1;if(n)for(var s=b(o,"bVisible").indexOf(!0,t+1),u=0,c=l.length;u<c;u++)l[u]&&(a=l[u].nTr,r=l[u].anCells,a)&&a.insertBefore(r[t],r[s]||null);else H(b(e.aoData,"anCells",t)).detach();return i.bVisible=n,Ye(e),!0})(e,t,n)&&a.push(t)});return void 0!==n&&this.iterator("table",function(e){Ce(e,e.aoHeader),Ce(e,e.aoFooter),e.aiDisplay.length||H(e.nTBody).find("td[colspan]").attr("colspan",ie(e)),et(e),t.iterator("column",function(e,t){a.includes(t)&&G(e,null,"column-visibility",[e,t,n,r])}),a.length&&(void 0===r||r)&&t.columns.adjust()}),e}),e("columns().widths()","column().width()",function(){var e=this.columns(":visible").count(),e=H("<tr>").html("<td>"+Array(e).join("</td><td>")+"</td>"),n=(H(this.table().body()).append(e),e.children().map(function(){return H(this).outerWidth()}));return e.remove(),this.iterator("column",function(e,t){e=oe(e,t);return null!==e?n[e]:0},1)}),e("columns().indexes()","column().index()",function(n){return this.iterator("column",function(e,t){return"visible"===n?oe(e,t):t},1)}),r("columns.adjust()",function(){return this.iterator("table",function(e){e.containerWidth=-1,re(e)},1)}),r("column.index()",function(e,t){var n;if(0!==this.context.length)return n=this.context[0],"fromVisible"===e||"toData"===e?ae(n,t):"fromData"===e||"toVisible"===e?oe(n,t):void 0}),r("column()",function(e,t){return gt(this.columns(e,t))});function Nt(e,t){H(e).find(".dt-column-order").remove(),H(e).find(".dt-column-title").each(function(){var e=H(this).html();H(this).parent().parent().append(e),H(this).remove()}),H(e).find("div.dt-column-"+t).remove(),H("th, td",e).removeAttr("data-dt-column")}r("cells()",function(g,e,m){var r,a,o,i,l,s,t;return H.isPlainObject(g)&&(void 0===g.row?(m=g,g=null):(m=e,e=null)),H.isPlainObject(e)&&(m=e,e=null),null==e?this.iterator("table",function(e){return r=e,e=g,t=pt(m),d=r.aoData,f=wt(r,t),n=L(v(d,f,"anCells")),h=H(Z([],n)),p=r.aoColumns.length,ht("cell",e,function(e){var t,n="function"==typeof e;if(null==e||n){for(o=[],i=0,l=f.length;i<l;i++)for(a=f[i],s=0;s<p;s++)u={row:a,column:s},(!n||(c=d[a],e(u,q(r,a,s),c.anCells?c.anCells[s]:null)))&&o.push(u);return o}return H.isPlainObject(e)?void 0!==e.column&&void 0!==e.row&&-1!==f.indexOf(e.row)?[e]:[]:(t=h.filter(e).map(function(e,t){return{row:t._DT_CellIndex.row,column:t._DT_CellIndex.column}}).toArray()).length||!e.nodeName?t:(c=H(e).closest("*[data-dt-row]")).length?[{row:c.data("dt-row"),column:c.data("dt-column")}]:[]},r,t);var r,t,a,o,i,l,s,u,c,d,f,n,h,p}):(t=m?{page:m.page,order:m.order,search:m.search}:{},r=this.columns(e,t),a=this.rows(g,t),t=this.iterator("table",function(e,t){var n=[];for(o=0,i=a[t].length;o<i;o++)for(l=0,s=r[t].length;l<s;l++)n.push({row:a[t][o],column:r[t][l]});return n},1),t=m&&m.selected?this.cells(t,m):t,H.extend(t.selector,{cols:e,rows:g,opts:m}),t)}),e("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(e,t,n){e=e.aoData[t];return e&&e.anCells?e.anCells[n]:void 0},1)}),r("cells().data()",function(){return this.iterator("cell",function(e,t,n){return q(e,t,n)},1)}),e("cells().cache()","cell().cache()",function(r){return r="search"===r?"_aFilterData":"_aSortData",this.iterator("cell",function(e,t,n){return e.aoData[t][r][n]},1)}),e("cells().render()","cell().render()",function(r){return this.iterator("cell",function(e,t,n){return q(e,t,n,r)},1)}),e("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(e,t,n){return{row:t,column:n,columnVisible:oe(e,n)}},1)}),e("cells().invalidate()","cell().invalidate()",function(r){return this.iterator("cell",function(e,t,n){ye(e,t,r,n)})}),r("cell()",function(e,t,n){return gt(this.cells(e,t,n))}),r("cell().data()",function(e){var t,n,r,a,o,i=this.context,l=this[0];return void 0===e?i.length&&l.length?q(i[0],l[0].row,l[0].column):void 0:(t=i[0],n=l[0].row,r=l[0].column,a=t.aoColumns[r],o=t.aoData[n]._aData,a.fnSetData(o,e,{settings:t,row:n,col:r}),ye(i[0],l[0].row,"data",l[0].column),this)}),r("order()",function(n,e){var t=this.context,r=Array.prototype.slice.call(arguments);return void 0===n?0!==t.length?t[0].aaSorting:void 0:("number"==typeof n?n=[[n,e]]:1<r.length&&(n=r),this.iterator("table",function(e){var t=[];g(e,t,n),e.aaSorting=t}))}),r("order.listener()",function(t,n,r){return this.iterator("table",function(e){Ge(e,t,{},n,r)})}),r("order.fixed()",function(t){var e;return t?this.iterator("table",function(e){e.aaSortingFixed=H.extend(!0,{},t)}):(e=(e=this.context).length?e[0].aaSortingFixed:void 0,Array.isArray(e)?{pre:e}:e)}),r(["columns().order()","column().order()"],function(n){var r=this;return n?this.iterator("table",function(e,t){e.aaSorting=r[t].map(function(e){return[e,n]})}):this.iterator("column",function(e,t){for(var n=Ze(e),r=0,a=n.length;r<a;r++)if(n[r].col===t)return n[r].dir;return null},1)}),e("columns().orderable()","column().orderable()",function(n){return this.iterator("column",function(e,t){e=e.aoColumns[t];return n?e.asSorting:e.bSortable},1)}),r("processing()",function(t){return this.iterator("table",function(e){S(e,t)})}),r("search()",function(t,n,r,a){var e=this.context;return void 0===t?0!==e.length?e[0].oPreviousSearch.search:void 0:this.iterator("table",function(e){e.oFeatures.bFilter&&Pe(e,"object"==typeof n?H.extend(e.oPreviousSearch,n,{search:t}):H.extend(e.oPreviousSearch,{search:t,regex:null!==n&&n,smart:null===r||r,caseInsensitive:null===a||a}))})}),r("search.fixed()",function(t,n){var e=this.iterator(!0,"table",function(e){e=e.searchFixed;return t?void 0===n?e[t]:(null===n?delete e[t]:e[t]=n,this):Object.keys(e)});return void 0!==t&&void 0===n?e[0]:e}),e("columns().search()","column().search()",function(r,a,o,i){return this.iterator("column",function(e,t){var n=e.aoPreSearchCols;if(void 0===r)return n[t].search;e.oFeatures.bFilter&&("object"==typeof a?H.extend(n[t],a,{search:r}):H.extend(n[t],{search:r,regex:null!==a&&a,smart:null===o||o,caseInsensitive:null===i||i}),Pe(e,e.oPreviousSearch))})}),r(["columns().search.fixed()","column().search.fixed()"],function(n,r){var e=this.iterator(!0,"column",function(e,t){e=e.aoColumns[t].searchFixed;return n?void 0===r?e[n]||null:(null===r?delete e[n]:e[n]=r,this):Object.keys(e)});return void 0!==n&&void 0===r?e[0]:e}),r("state()",function(e,t){var n;return e?(n=H.extend(!0,{},e),this.iterator("table",function(e){!1!==t&&(n.time=+new Date+100),tt(e,n,function(){})})):this.context.length?this.context[0].oSavedState:null}),r("state.clear()",function(){return this.iterator("table",function(e){e.fnStateSaveCallback.call(e.oInstance,e,{})})}),r("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),r("state.save()",function(){return this.iterator("table",function(e){et(e)})}),V.use=function(e,t){var n="string"==typeof e?t:e,t="string"==typeof t?t:e;if(void 0===n&&"string"==typeof t)switch(t){case"lib":case"jq":return H;case"win":return W;case"datetime":return V.DateTime;case"luxon":return o;case"moment":return i;case"bootstrap":return xt||W.bootstrap;case"foundation":return St||W.Foundation;default:return null}"lib"===t||"jq"===t||n&&n.fn&&n.fn.jquery?H=n:"win"===t||n&&n.document?_=(W=n).document:"datetime"===t||n&&"DateTime"===n.type?V.DateTime=n:"luxon"===t||n&&n.FixedOffsetZone?o=n:"moment"===t||n&&n.isMoment?i=n:"bootstrap"===t||n&&n.Modal&&"modal"===n.Modal.NAME?xt=n:("foundation"===t||n&&n.Reveal)&&(St=n)},V.factory=function(e,t){var n=!1;return e&&e.document&&(_=(W=e).document),t&&t.fn&&t.fn.jquery&&(H=t,n=!0),n},V.versionCheck=function(e,t){for(var n,r,a=(t||V.version).split("."),o=e.split("."),i=0,l=o.length;i<l;i++)if((n=parseInt(a[i],10)||0)!==(r=parseInt(o[i],10)||0))return r<n;return!0},V.isDataTable=function(e){var a=H(e).get(0),o=!1;return e instanceof V.Api||(H.each(V.settings,function(e,t){var n=t.nScrollHead?H("table",t.nScrollHead)[0]:null,r=t.nScrollFoot?H("table",t.nScrollFoot)[0]:null;t.nTable!==a&&n!==a&&r!==a||(o=!0)}),o)},V.tables=function(t){var e=!1,n=(H.isPlainObject(t)&&(e=t.api,t=t.visible),V.settings.filter(function(e){return!(t&&!H(e.nTable).is(":visible"))}).map(function(e){return e.nTable}));return e?new X(n):n},V.camelToHungarian=B,r("$()",function(e,t){t=this.rows(t).nodes(),t=H(t);return H([].concat(t.filter(e).toArray(),t.find(e).toArray()))}),H.each(["on","one","off"],function(e,n){r(n+"()",function(){var e=Array.prototype.slice.call(arguments),t=(e[0]=e[0].split(/\s/).map(function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" "),H(this.tables().nodes()));return t[n].apply(t,e),this})}),r("clear()",function(){return this.iterator("table",function(e){be(e)})}),r("error()",function(t){return this.iterator("table",function(e){z(e,0,t)})}),r("settings()",function(){return new X(this.context,this.context)}),r("init()",function(){var e=this.context;return e.length?e[0].oInit:null}),r("data()",function(){return this.iterator("table",function(e){return b(e.aoData,"_aData")}).flatten()}),r("trigger()",function(t,n,r){return this.iterator("table",function(e){return G(e,null,t,n,r)}).flatten()}),r("ready()",function(t){var e=this.context;return t?this.tables().every(function(){var e=this;this.context[0]._bInitComplete?t.call(e):this.on("init.dt.DT",function(){t.call(e)})}):e.length?e[0]._bInitComplete||!1:null}),r("destroy()",function(c){return c=c||!1,this.iterator("table",function(e){var t=e.oClasses,n=e.nTable,r=e.nTBody,a=e.nTHead,o=e.nTFoot,i=H(n),r=H(r),l=H(e.nTableWrapper),s=e.aoData.map(function(e){return e?e.nTr:null}),u=t.order,o=(e.bDestroying=!0,G(e,"aoDestroyCallback","destroy",[e],!0),c||new X(e).columns().visible(!0),e.resizeObserver&&e.resizeObserver.disconnect(),l.off(".DT").find(":not(tbody *)").off(".DT"),H(W).off(".DT-"+e.sInstance),n!=a.parentNode&&(i.children("thead").detach(),i.append(a)),o&&n!=o.parentNode&&(i.children("tfoot").detach(),i.append(o)),Nt(a,"header"),Nt(o,"footer"),e.colgroup.remove(),e.aaSorting=[],e.aaSortingFixed=[],Ke(e),H(i).find("th, td").removeClass(H.map(V.ext.type.className,function(e){return e}).join(" ")),H("th, td",a).removeClass(u.none+" "+u.canAsc+" "+u.canDesc+" "+u.isAsc+" "+u.isDesc).css("width","").removeAttr("aria-sort"),r.children().detach(),r.append(s),e.nTableWrapper.parentNode),a=e.nTableWrapper.nextSibling,u=c?"remove":"detach",r=(i[u](),l[u](),!c&&o&&(o.insertBefore(n,a),i.css("width",e.sDestroyWidth).removeClass(t.table)),V.settings.indexOf(e));-1!==r&&V.settings.splice(r,1)})}),H.each(["column","row","cell"],function(e,s){r(s+"s().every()",function(r){var a,o=this.selector.opts,i=this,l=0;return this.iterator("every",function(e,t,n){a=i[s](t,o),"cell"===s?r.call(a,a[0][0].row,a[0][0].column,n,l):r.call(a,t,n,l),l++})})}),r("i18n()",function(e,t,n){var r=this.context[0],e=U(e)(r.oLanguage);return"string"==typeof(e=H.isPlainObject(e=void 0===e?t:e)?void 0!==n&&void 0!==e[n]?e[n]:!1===n?e:e._:e)?e.replace("%d",n):e}),V.version="2.3.7",V.settings=[],V.models={},V.models.oSearch={caseInsensitive:!0,search:"",regex:!1,smart:!0,return:!1},V.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,src:null,idx:-1,displayData:null},V.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null,wideStrings:null,searchFixed:null},V.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],bAutoWidth:!0,bDeferRender:!0,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:null,titleRow:null,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnStateLoadCallback:function(e){try{return JSON.parse((-1===e.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(e){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(-1===e.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(e){}},fnStateSaveParams:null,iStateDuration:7200,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{orderable:": Activate to sort",orderableReverse:": Activate to invert sorting",orderableRemove:": Activate to remove sorting",paginate:{first:"First",last:"Last",next:"Next",previous:"Previous",number:""}},oPaginate:{sFirst:"«",sLast:"»",sNext:"›",sPrevious:"‹"},entries:{_:"entries",1:"entry"},lengthLabels:{"-1":"All"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ _ENTRIES-TOTAL_",sInfoEmpty:"Showing 0 to 0 of 0 _ENTRIES-TOTAL_",sInfoFiltered:"(filtered from _MAX_ total _ENTRIES-MAX_)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"_MENU_ _ENTRIES_ per page",sLoadingRecords:"Loading...",sProcessing:"",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},orderDescReverse:!0,oSearch:H.extend({},V.models.oSearch),layout:{topStart:"pageLength",topEnd:"search",bottomStart:"info",bottomEnd:"paging"},sDom:null,searchDelay:null,sPaginationType:"",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId",caption:null,iDeferLoading:null,on:null,columnTitleTag:"span"},Q(V.defaults),V.defaults.column={aDataSort:null,iDataSort:-1,ariaTitle:"",asSorting:["asc","desc",""],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},Q(V.defaults.column),V.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:!0,bLengthChange:!0,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollbarLeft:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},searchFixed:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",pagingControls:0,iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,bAjaxDataGet:!0,jqXHR:null,json:void 0,oAjaxData:void 0,sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==J(this)?+this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==J(this)?+this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,r=this.aiDisplay.length,a=this.oFeatures,o=a.bPaginate;return a.bServerSide?!1===o||-1===e?t+r:Math.min(t+e,this._iRecordsDisplay):!o||r<n||-1===e?r:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null,caption:"",captionNode:null,colgroup:null,deferLoading:null,typeDetect:!0,resizeObserver:null,containerWidth:-1,orderDescReverse:null,orderIndicators:!0,orderHandler:!0,titleRow:null,columnTitleTag:"span"};function Ft(t,n){return function(e){return T(e)||"string"!=typeof e||(e=e.replace(F," "),t&&(e=I(e)),n&&(e=M(e,!1))),e}}At=V.ext.pager;H.extend(At,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(){return["numbers"]},simple_numbers:function(){return["previous","numbers","next"]},full_numbers:function(){return["first","previous","numbers","next","last"]},first_last:function(){return["first","last"]},first_last_numbers:function(){return["first","numbers","last"]},_numbers:zt,numbers_length:7}),H.extend(!0,V.ext.renderer,{pagingButton:{_:function(e,t,n,r,a){var e=e.oClasses.paging,o=[e.button];return r&&o.push(e.active),a&&o.push(e.disabled),{display:r="ellipsis"===t?H('<span class="ellipsis"></span>').html(n)[0]:H("<button>",{class:o.join(" "),role:"link",type:"button"}).html(n),clicker:r}}},pagingContainer:{_:function(e,t){return t}}});function Ot(e,t,n,r,a){return i?e[t](a):o?e[n](a):r?e[r](a):e}var o,i,jt=!1;function Rt(e,t,n){var r;if(W.luxon&&!o&&(o=W.luxon),i=W.moment&&!i?W.moment:i){if(!(r=i.utc(e,t,n,!0)).isValid())return null}else if(o){if(!(r=t&&"string"==typeof e?o.DateTime.fromFormat(e,t):o.DateTime.fromISO(e)).isValid)return null;r=r.setLocale(n)}else t?(jt||alert("DataTables warning: Formatted date without Moment.js or Luxon - https://datatables.net/tn/17"),jt=!0):r=new Date(e);return r}function Pt(s){return function(r,a,o,i){0===arguments.length?(o="en",r=a=null):1===arguments.length?(o="en",a=r,r=null):2===arguments.length&&(o=a,a=r,r=null);var l="datetime"+(a?"-"+a:"");return V.ext.type.order[l+"-pre"]||V.type(l,{detect:function(e){return e===l&&l},order:{pre:function(e){return e.valueOf()}},className:"dt-right"}),function(e,t){var n;return null==e&&(e="--now"===i?(n=new Date,new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds()))):""),"type"===t?l:""===e?"sort"!==t?"":Rt("0000-01-01 00:00:00",null,o):!(null===a||r!==a||"sort"===t||"type"===t||e instanceof Date)||null===(n=Rt(e,r,o))?e:"sort"===t?n:(e=null===a?Ot(n,"toDate","toJSDate","")[s](navigator.language,{timeZone:"UTC"}):Ot(n,"format","toFormat","toISOString",a),"display"===t?u(e):e)}}}var Et=",",kt=".";if(void 0!==W.Intl)try{for(var Mt=(new Intl.NumberFormat).formatToParts(100000.1),l=0;l<Mt.length;l++)"group"===Mt[l].type?Et=Mt[l].value:"decimal"===Mt[l].type&&(kt=Mt[l].value)}catch(e){}V.datetime=function(n,r){var a="datetime-"+n;r=r||"en",V.ext.type.order[a]||V.type(a,{detect:function(e){var t=Rt(e,n,r);return!(""!==e&&!t)&&a},order:{pre:function(e){return Rt(e,n,r)||0}},className:"dt-right"})},V.render={date:Pt("toLocaleDateString"),datetime:Pt("toLocaleString"),time:Pt("toLocaleTimeString"),number:function(a,o,i,l,s){return null==a&&(a=Et),null==o&&(o=kt),{display:function(e){if("number"!=typeof e&&"string"!=typeof e)return e;if(""===e||null===e)return e;var t=e<0?"-":"",n=parseFloat(e),r=Math.abs(n);if(1e11<=r||r<1e-4&&0!==r)return(r=n.toExponential(i).split(/e\+?/))[0]+" x 10<sup>"+r[1]+"</sup>";if(isNaN(n))return u(e);n=n.toFixed(i),e=Math.abs(n);r=parseInt(e,10),n=i?o+(e-r).toFixed(i).substring(2):"";return(t=0===r&&0===parseFloat(n)?"":t)+(l||"")+r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+n+(s||"")}}},text:function(){return{display:u,filter:u}}};function Ht(e,t){return e=null!=e?e.toString().toLowerCase():"",t=null!=t?t.toString().toLowerCase():"",e.localeCompare(t,navigator.languages[0]||navigator.language,{numeric:!0,ignorePunctuation:!0})}function Wt(e,t){return e=I(e),t=I(t),Ht(e,t)}var s=V.ext.type,Xt=(V.type=function(n,e,t){if(!e)return{className:s.className[n],detect:s.detect.find(function(e){return e._name===n}),order:{pre:s.order[n+"-pre"],asc:s.order[n+"-asc"],desc:s.order[n+"-desc"]},render:s.render[n],search:s.search[n]};function r(e,t){s[e][n]=t}function a(e){Object.defineProperty(e,"_name",{value:n});var t=s.detect.findIndex(function(e){return e._name===n});-1===t?s.detect.unshift(e):s.detect.splice(t,1,e)}function o(e){s.order[n+"-pre"]=e.pre,s.order[n+"-asc"]=e.asc,s.order[n+"-desc"]=e.desc}void 0===t&&(t=e,e=null),"className"===e?r("className",t):"detect"===e?a(t):"order"===e?o(t):"render"===e?r("render",t):"search"===e?r("search",t):e||(t.className&&r("className",t.className),void 0!==t.detect&&a(t.detect),t.order&&o(t.order),void 0!==t.render&&r("render",t.render),void 0!==t.search&&r("search",t.search))},V.types=function(){return s.detect.map(function(e){return e._name})},V.type("string",{detect:function(){return"string"},order:{pre:function(e){return T(e)&&"boolean"!=typeof e?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""}},search:Ft(!1,!0)}),V.type("string-utf8",{detect:{allOf:function(e){return!0},oneOf:function(e){return!T(e)&&navigator.languages&&"string"==typeof e&&e.match(/[^\x00-\x7F]/)}},order:{asc:Ht,desc:function(e,t){return-1*Ht(e,t)}},search:Ft(!1,!0)}),V.type("html",{detect:{allOf:function(e){return T(e)||"string"==typeof e&&-1!==e.indexOf("<")},oneOf:function(e){return!T(e)&&"string"==typeof e&&-1!==e.indexOf("<")}},order:{pre:function(e){return T(e)?"":e.replace?I(e).trim().toLowerCase():e+""}},search:Ft(!0,!0)}),V.type("html-utf8",{detect:{allOf:function(e){return T(e)||"string"==typeof e&&-1!==e.indexOf("<")},oneOf:function(e){return navigator.languages&&!T(e)&&"string"==typeof e&&-1!==e.indexOf("<")&&"string"==typeof e&&e.match(/[^\x00-\x7F]/)}},order:{asc:Wt,desc:function(e,t){return-1*Wt(e,t)}},search:Ft(!0,!0)}),V.type("date",{className:"dt-type-date",detect:{allOf:function(e){var t;return!e||e instanceof Date||R.test(e)?null!==(t=Date.parse(e))&&!isNaN(t)||T(e):null},oneOf:function(e){return e instanceof Date||"string"==typeof e&&R.test(e)}},order:{pre:function(e){e=Date.parse(e);return isNaN(e)?-1/0:e}}}),V.type("html-num-fmt",{className:"dt-type-numeric",detect:{allOf:function(e,t){t=t.oLanguage.sDecimal;return n(e,t,!0,!1)},oneOf:function(e,t){t=t.oLanguage.sDecimal;return n(e,t,!0,!1)}},order:{pre:function(e,t){t=t.oLanguage.sDecimal;return Xt(e,t,O,E)}},search:Ft(!0,!0)}),V.type("html-num",{className:"dt-type-numeric",detect:{allOf:function(e,t){t=t.oLanguage.sDecimal;return n(e,t,!1,!0)},oneOf:function(e,t){t=t.oLanguage.sDecimal;return n(e,t,!1,!1)}},order:{pre:function(e,t){t=t.oLanguage.sDecimal;return Xt(e,t,O)}},search:Ft(!0,!0)}),V.type("num-fmt",{className:"dt-type-numeric",detect:{allOf:function(e,t){t=t.oLanguage.sDecimal;return c(e,t,!0,!0)},oneOf:function(e,t){t=t.oLanguage.sDecimal;return c(e,t,!0,!1)}},order:{pre:function(e,t){t=t.oLanguage.sDecimal;return Xt(e,t,E)}}}),V.type("num",{className:"dt-type-numeric",detect:{allOf:function(e,t){t=t.oLanguage.sDecimal;return c(e,t,!1,!0)},oneOf:function(e,t){t=t.oLanguage.sDecimal;return c(e,t,!1,!1)}},order:{pre:function(e,t){t=t.oLanguage.sDecimal;return Xt(e,t)}}}),function(e,t,n,r){var a;return 0===e||e&&"-"!==e?"number"==(a=typeof e)||"bigint"==a?e:+(e=(e=t?k(e,t):e).replace&&(n&&(e=e.replace(n,"")),r)?e.replace(r,""):e):-1/0});function Vt(e,t,n){n&&(e[t]=n)}H.extend(!0,V.ext.renderer,{footer:{_:function(e,t,n){t.addClass(n.tfoot.cell)}},header:{_:function(g,m,v){m.addClass(v.thead.cell),g.oFeatures.bSort||m.addClass(v.order.none);var e=g.titleRow,t=m.closest("thead").find("tr"),n=m.parent().index();"disable"===m.attr("data-dt-order")||"disable"===m.parent().attr("data-dt-order")||!0===e&&0!==n||!1===e&&n!==t.length-1||"number"==typeof e&&n!==e||H(g.nTable).on("order.dt.DT column-visibility.dt.DT",function(e,t,n){if(g===t){var r=t.sortDetails;if(r){var a=b(r,"col");if("column-visibility"!==e.type||a.includes(n)){for(var e=v.order,n=t.api.columns(m),o=g.aoColumns[n.flatten()[0]],i=n.orderable().includes(!0),l="",s=n.indexes(),u=n.orderable(!0).flatten(),c=g.iTabIndex,d=t.orderHandler&&i,f=(m.removeClass(e.isAsc+" "+e.isDesc).toggleClass(e.none,!i).toggleClass(e.canAsc,d&&u.includes("asc")).toggleClass(e.canDesc,d&&u.includes("desc")),!0),h=0;h<s.length;h++)a.includes(s[h])||(f=!1);f&&(d=n.order(),m.addClass(d.includes("asc")?e.isAsc:""+d.includes("desc")?e.isDesc:""));var p=-1;for(h=0;h<a.length;h++)if(g.aoColumns[a[h]].bVisible){p=a[h];break}s[0]==p?(u=r[0],n=o.asSorting,m.attr("aria-sort","asc"===u.dir?"ascending":"descending"),l=n[u.index+1]?"Reverse":"Remove"):m.removeAttr("aria-sort"),i&&((d=m.find(".dt-column-order")).attr("role","button").attr("aria-label",i?o.ariaTitle+t.api.i18n("oAria.orderable"+l):o.ariaTitle),-1!==c)&&d.attr("tabindex",c)}}}})}},layout:{_:function(e,t,n){var r=e.oClasses.layout,a=H("<div/>").attr("id",n.id||null).addClass(n.className||r.row).appendTo(t);V.ext.renderer.layout._forLayoutRow(n,function(e,t){var n;"id"!==e&&"className"!==e&&(n="",t.table&&(a.addClass(r.tableRow),n+=r.tableCell+" "),n+="start"===e?r.start:"end"===e?r.end:r.full,H("<div/>").attr({id:t.id||null,class:t.className||r.cell+" "+n}).append(t.contents).appendTo(a))})},_forLayoutRow:function(t,n){function r(e){switch(e){case"":return 0;case"start":return 1;case"end":return 2;default:return 3}}Object.keys(t).sort(function(e,t){return r(e)-r(t)}).forEach(function(e){n(e,t[e])})}}}),V.feature={},V.feature.register=function(e,t,n){V.ext.features[e]=t,n&&C.feature.push({cFeature:n,fnInit:t})},V.feature.register("div",function(e,t){var n=H("<div>")[0];return t&&(Vt(n,"className",t.className),Vt(n,"id",t.id),Vt(n,"innerHTML",t.html),Vt(n,"textContent",t.text)),n}),V.feature.register("info",function(e,s){var t,n,u;return e.oFeatures.bInfo?(t=e.oLanguage,n=e.sTableId,u=H("<div/>",{class:e.oClasses.info.container}),s=H.extend({callback:t.fnInfoCallback,empty:t.sInfoEmpty,postfix:t.sInfoPostFix,search:t.sInfoFiltered,text:t.sInfo},s),e.aoDrawCallback.push(function(e){var t=s,n=u,r=e._iDisplayStart+1,a=e.fnDisplayEnd(),o=e.fnRecordsTotal(),i=e.fnRecordsDisplay(),l=i?t.text:t.empty;i!==o&&(l+=" "+t.search),l+=t.postfix,l=it(e,l),t.callback&&(l=t.callback.call(e.oInstance,e,r,a,o,i,l)),n.html(l),G(e,null,"info",[e,n[0],l])}),e._infoEl||(u.attr({"aria-live":"polite",id:n+"_info",role:"status"}),H(e.nTable).attr("aria-describedby",n+"_info"),e._infoEl=u),u):null},"i");var Bt=0;function qt(e){var t=[];return e.numbers&&t.push("numbers"),e.previousNext&&(t.unshift("previous"),t.push("next")),e.firstLast&&(t.unshift("first"),t.push("last")),t}function Ut(e,t,n,r){var a=e.oLanguage.oPaginate,o={display:"",active:!1,disabled:!1};switch(t){case"ellipsis":o.display="&#x2026;";break;case"first":o.display=a.sFirst,0===n&&(o.disabled=!0);break;case"previous":o.display=a.sPrevious,0===n&&(o.disabled=!0);break;case"next":o.display=a.sNext,0!==r&&n!==r-1||(o.disabled=!0);break;case"last":o.display=a.sLast,0!==r&&n!==r-1||(o.disabled=!0);break;default:"number"==typeof t&&(o.display=e.fnFormatNumber(t+1),n===t)&&(o.active=!0)}return o}function zt(e,t,n,r){var a=[],o=Math.floor(n/2),i=r?2:1,l=r?1:0;return t<=n?a=h(0,t):1===n?a=[e]:3===n?e<=1?a=[0,1,"ellipsis"]:t-2<=e?(a=h(t-2,t)).unshift("ellipsis"):a=["ellipsis",e,"ellipsis"]:e<=o?((a=h(0,n-i)).push("ellipsis"),r&&a.push(t-1)):t-1-o<=e?((a=h(t-(n-i),t)).unshift("ellipsis"),r&&a.unshift(0)):((a=h(e-o+i,e+o-l)).push("ellipsis"),a.unshift("ellipsis"),r&&(a.push(t-1),a.unshift(0))),a}V.feature.register("search",function(n,r){var e,t,a,o,i,l,s,u,c,d;return n.oFeatures.bFilter?(e=n.oClasses.search,t=n.sTableId,a=n.oPreviousSearch,o='<input type="search" class="'+e.input+'"/>',-1===(r=H.extend({placeholder:(c=n.oLanguage).sSearchPlaceholder,processing:!1,text:c.sSearch},r)).text.indexOf("_INPUT_")&&(r.text+="_INPUT_"),r.text=it(n,r.text),c=r.text.match(/_INPUT_$/),s=r.text.match(/^_INPUT_/),i=r.text.replace(/_INPUT_/,""),l="<label>"+r.text+"</label>",s?l="_INPUT_<label>"+i+"</label>":c&&(l="<label>"+i+"</label>_INPUT_"),(s=H("<div>").addClass(e.container).append(l.replace(/_INPUT_/,o))).find("label").attr("for","dt-search-"+Bt),s.find("input").attr("id","dt-search-"+Bt),Bt++,u=function(e){var t=this.value;a.return&&"Enter"!==e.key||t!=a.search&&qe(n,r.processing,function(){a.search=t,Pe(n,a),n._iDisplayStart=0,x(n)})},c=null!==n.searchDelay?n.searchDelay:0,d=H("input",s).val(a.search).attr("placeholder",r.placeholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",c?V.util.debounce(u,c):u).on("mouseup.DT",function(e){setTimeout(function(){u.call(d[0],e)},10)}).on("keypress.DT",function(e){if(13==e.keyCode)return!1}).attr("aria-controls",t),H(n.nTable).on("search.dt.DT",function(e,t){n===t&&d[0]!==_.activeElement&&d.val("function"!=typeof a.search?a.search:"")}),s):null},"f"),V.feature.register("paging",function(e,t){if(!e.oFeatures.bPaginate)return null;t=H.extend({buttons:V.ext.pager.numbers_length,type:e.sPaginationType,boundaryNumbers:!0,firstLast:!0,previousNext:!0,numbers:!0},t);function n(){!function e(t,n,r){if(!t._bInitComplete)return;var a=r.type?V.ext.pager[r.type]:qt,o=t.oLanguage.oAria.paginate||{},i=t._iDisplayStart,l=t._iDisplayLength,s=t.fnRecordsDisplay(),u=-1===l,c=u?0:Math.ceil(i/l),d=u?1:Math.ceil(s/l),f=[],h=[],i=a(r).map(function(e){return"numbers"===e?zt(c,d,r.buttons,r.boundaryNumbers):e});f=f.concat.apply(f,i);for(var p=0;p<f.length;p++){var g=f[p],m=Ut(t,g,c,d),v=ot(t,"pagingButton")(t,g,m.display,m.active,m.disabled),b="string"==typeof g?o[g]:o.number?o.number+(g+1):null;H(v.clicker).attr({"aria-controls":t.sTableId,"aria-disabled":m.disabled?"true":null,"aria-current":m.active?"page":null,"aria-label":b,"data-dt-idx":g,tabIndex:m.disabled?-1:t.iTabIndex&&"span"!==v.clicker[0].nodeName.toLowerCase()?t.iTabIndex:null}),"number"!=typeof g&&H(v.clicker).addClass(g),rt(v.clicker,{action:g},function(e){e.preventDefault(),Be(t,e.data.action,!0)}),h.push(v.display)}u=ot(t,"pagingContainer")(t,h);s=n.find(_.activeElement).data("dt-idx");n.empty().append(u);void 0!==s&&n.find("[data-dt-idx="+s+"]").trigger("focus");h.length&&(l=H(h[0]).outerHeight(),1<r.buttons)&&0<l&&H(n).height()>=2*l-10&&e(t,n,H.extend({},r,{buttons:r.buttons-2}))}(e,r.children(),t)}var r=H("<div/>").addClass(e.oClasses.paging.container+(t.type?" paging_"+t.type:"")).append(H("<nav>").attr("aria-label","pagination").addClass(e.oClasses.paging.nav));return e.aoDrawCallback.push(n),H(e.nTable).on("column-sizing.dt.DT",n),r},"p");var $t=0;return V.feature.register("pageLength",function(r,e){var t=r.oFeatures;if(!t.bPaginate||!t.bLengthChange)return null;e=H.extend({menu:r.aLengthMenu,text:r.oLanguage.sLengthMenu},e);var t=r.oClasses.length,n=r.sTableId,a=e.menu,o=[],i=[];if(Array.isArray(a[0]))o=a[0],i=a[1];else for(p=0;p<a.length;p++)H.isPlainObject(a[p])?(o.push(a[p].value),i.push(a[p].label)):(o.push(a[p]),i.push(a[p]));for(var l=e.text.match(/_MENU_$/),s=e.text.match(/^_MENU_/),u=e.text.replace(/_MENU_/,""),e="<label>"+e.text+"</label>",s=(s?e="_MENU_<label>"+u+"</label>":l&&(e="<label>"+u+"</label>_MENU_"),"tmp-"+ +new Date),c=H("<div/>").addClass(t.container).append(e.replace("_MENU_",'<span id="'+s+'"></span>')),d=[],f=(Array.prototype.slice.call(c.find("label")[0].childNodes).forEach(function(e){e.nodeType===Node.TEXT_NODE&&d.push({el:e,text:e.textContent})}),function(t){d.forEach(function(e){e.el.textContent=it(r,e.text,t)})}),h=H("<select/>",{"aria-controls":n,class:t.select}),p=0;p<o.length;p++){var g=r.api.i18n("lengthLabels."+o[p],null);null===g&&(g="number"==typeof i[p]?r.fnFormatNumber(i[p]):i[p]),h[0][p]=new Option(g,o[p])}return c.find("label").attr("for","dt-length-"+$t),h.attr("id","dt-length-"+$t),$t++,c.find("#"+s).replaceWith(h),H("select",c).val(r._iDisplayLength).on("change.DT",function(){Ve(r,H(this).val()),x(r)}),H(r.nTable).on("length.dt.DT",function(e,t,n){r===t&&(H("select",c).val(n),f(n))}),f(r._iDisplayLength),c},"l"),((H.fn.dataTable=V).$=H).fn.dataTableSettings=V.settings,H.fn.dataTableExt=V.ext,H.fn.DataTable=function(e){return H(this).dataTable(e).api()},H.each(V,function(e,t){H.fn.DataTable[e]=t}),V});
(t=>{var o,d;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?(o=require("jquery"),d=function(e,n){n.fn.dataTable||require("datatables.net")(e,n)},"undefined"==typeof window?module.exports=function(e,n){return e=e||window,n=n||o(e),d(e,n),t(n,0,e.document)}:(d(window,o),module.exports=t(o,window,window.document))):t(jQuery,window,document)})(function(e,n,t){return e.fn.dataTable});
(n=>{var i,r;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return n(e,window,document)}):"object"==typeof exports?(i=require("jquery"),r=function(e,t){t.fn.dataTable||require("datatables.net")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||i(e),r(e,t),n(t,e,e.document)}:(r(window,i),module.exports=n(i,window,window.document))):n(jQuery,window,document)})(function(b,y,d){function a(e,t){if(!i.versionCheck||!i.versionCheck("2"))throw"DataTables Responsive requires DataTables 2 or newer";this.s={childNodeStore:{},columns:[],current:[],dt:new i.Api(e)},this.s.dt.settings()[0].responsive||(t&&"string"==typeof t.details?t.details={type:t.details}:t&&!1===t.details?t.details={type:!1}:t&&!0===t.details&&(t.details={type:"inline"}),this.c=b.extend(!0,{},a.defaults,i.defaults.responsive,t),(e.responsive=this)._constructor())}var i=b.fn.dataTable,e=(b.extend(a.prototype,{_constructor:function(){var o=this,r=this.s.dt,t=b(y).innerWidth(),e=(r.settings()[0]._responsive=this,b(y).on("orientationchange.dtr",i.util.throttle(function(){var e=b(y).innerWidth();e!==t&&(o._resize(),t=e)})),r.on("row-created.dtr",function(e,t,n,i){-1!==b.inArray(!1,o.s.current)&&b(">td, >th",t).each(function(e){e=r.column.index("toData",e);!1===o.s.current[e]&&b(this).css("display","none").addClass("dtr-hidden")})}),r.on("destroy.dtr",function(){r.off(".dtr"),b(r.table().body()).off(".dtr"),b(y).off("resize.dtr orientationchange.dtr"),r.cells(".dtr-control").nodes().to$().removeClass("dtr-control"),b(r.table().node()).removeClass("dtr-inline collapsed"),b.each(o.s.current,function(e,t){!1===t&&o._setColumnVis(e,!0)})}),this.c.breakpoints.sort(function(e,t){return e.width<t.width?1:e.width>t.width?-1:0}),this._classLogic(),this.c.details);!1!==e.type&&(o._detailsInit(),r.on("column-visibility.dtr",function(){o._timer&&clearTimeout(o._timer),o._timer=setTimeout(function(){o._timer=null,o._classLogic(),o._resizeAuto(),o._resize(!0),o._redrawChildren()},100)}),r.on("draw.dtr",function(){o._redrawChildren()}),b(r.table().node()).addClass("dtr-"+e.type)),r.on("column-calc.dt",function(e,t){for(var n=o.s.current,i=0;i<n.length;i++){var r=t.visible.indexOf(i);!1===n[i]&&0<=r&&t.visible.splice(r,1)}}),r.on("preXhr.dtr",function(){var e=[];r.rows().every(function(){this.child.isShown()&&e.push(this.id(!0))}),r.one("draw.dtr",function(){o._resizeAuto(),o._resize(),r.rows(e).every(function(){o._detailsDisplay(this,!1)})})}),r.on("draw.dtr",function(){r.page.info().serverSide&&(o.s.childNodeStore={}),o._controlClass()}).ready(function(){o._resizeAuto(),o._resize(),r.on("column-sizing.dtr",function(){o._resizeAuto(),o._resize()})}),r.on("column-reorder.dtr",function(e,t,n){o._classLogic(),o._resizeAuto(),o._resize(!0)})},_colGroupAttach:function(e,t,n){var i=null;if(t[n].get(0).parentNode!==e[0]){for(var r=n+1;r<t.length;r++)if(e[0]===t[r].get(0).parentNode){i=r;break}null!==i?t[n].insertBefore(t[i][0]):e.append(t[n])}},_childNodes:function(e,t,n){var i=t+"-"+n;if(this.s.childNodeStore[i])return this.s.childNodeStore[i];for(var r=[],o=e.cell(t,n).node().childNodes,s=0,d=o.length;s<d;s++)r.push(o[s]);return this.s.childNodeStore[i]=r},_childNodesRestore:function(e,t,n){var i=t+"-"+n;if(this.s.childNodeStore[i]){var r=e.cell(t,n).node(),e=this.s.childNodeStore[i];if(0<e.length){for(var o=e[0].parentNode.childNodes,s=[],d=0,a=o.length;d<a;d++)s.push(o[d]);for(var l=0,c=s.length;l<c;l++)r.appendChild(s[l])}this.s.childNodeStore[i]=void 0}},_columnsVisibility:function(n){for(var i=this.s.dt,e=this.s.columns,t=e.map(function(e,t){return{columnIdx:t,priority:e.priority}}).sort(function(e,t){return e.priority!==t.priority?e.priority-t.priority:e.columnIdx-t.columnIdx}),r=b.map(e,function(e,t){return!1===i.column(t).visible()?"not-visible":(!e.auto||null!==e.minWidth)&&(!0===e.auto?"-":-1!==b.inArray(n,e.includeIn))}),o=0,s=0,d=r.length;s<d;s++)!0===r[s]&&(o+=e[s].minWidth);var a=i.settings()[0].oScroll,a=a.sY||a.sX?a.iBarWidth:0,l=i.table().container().offsetWidth-a-o;for(s=0,d=r.length;s<d;s++)e[s].control&&(l-=e[s].minWidth);var c=!1;for(s=0,d=t.length;s<d;s++){var u=t[s].columnIdx;"-"===r[u]&&!e[u].control&&e[u].minWidth&&(c||l-e[u].minWidth<0?r[u]=!(c=!0):r[u]=!0,l-=e[u].minWidth)}var h=!1;for(s=0,d=e.length;s<d;s++)if(!e[s].control&&!e[s].never&&!1===r[s]){h=!0;break}for(s=0,d=e.length;s<d;s++)e[s].control&&(r[s]=h),"not-visible"===r[s]&&(r[s]=!1);return-1===b.inArray(!0,r)&&(r[0]=!0),r},_classLogic:function(){function d(e,t,n,i){var r,o,s;if(n){if("max-"===n)for(r=a._find(t).width,o=0,s=l.length;o<s;o++)l[o].width<=r&&u(e,l[o].name);else if("min-"===n)for(r=a._find(t).width,o=0,s=l.length;o<s;o++)l[o].width>=r&&u(e,l[o].name);else if("not-"===n)for(o=0,s=l.length;o<s;o++)-1===l[o].name.indexOf(i)&&u(e,l[o].name)}else c[e].includeIn.push(t)}var a=this,l=this.c.breakpoints,c=this.s.dt.columns().eq(0).map(function(e){var e=this.column(e),t=e.header().className,n=e.init().responsivePriority,e=e.header().getAttribute("data-priority");return void 0===n&&(n=null==e?1e4:+e),{className:t,includeIn:[],auto:!1,control:!1,never:!!t.match(/\b(dtr\-)?never\b/),priority:n}}),u=function(e,t){e=c[e].includeIn;-1===b.inArray(t,e)&&e.push(t)};c.each(function(e,r){for(var t=e.className.split(" "),o=!1,n=0,i=t.length;n<i;n++){var s=t[n].trim();if("all"===s||"dtr-all"===s)return o=!0,void(e.includeIn=b.map(l,function(e){return e.name}));if("none"===s||"dtr-none"===s||e.never)return void(o=!0);if("control"===s||"dtr-control"===s)return o=!0,void(e.control=!0);b.each(l,function(e,t){var n=t.name.split("-"),i=new RegExp("(min\\-|max\\-|not\\-)?("+n[0]+")(\\-[_a-zA-Z0-9])?"),i=s.match(i);i&&(o=!0,i[2]===n[0]&&i[3]==="-"+n[1]?d(r,t.name,i[1],i[2]+i[3]):i[2]!==n[0]||i[3]||d(r,t.name,i[1],i[2]))})}o||(e.auto=!0)}),this.s.columns=c},_controlClass:function(){var e,t,n;"inline"===this.c.details.type&&(e=this.s.dt,t=this.s.current,n=b.inArray(!0,t),e.cells(null,function(e){return e!==n},{page:"current"}).nodes().to$().filter(".dtr-control").removeClass("dtr-control"),0<=n)&&e.cells(null,n,{page:"current"}).nodes().to$().addClass("dtr-control"),this._tabIndexes()},_detailsDisplay:function(t,n){function e(e){b(t.node()).toggleClass("dtr-expanded",!1!==e),b(o.table().node()).triggerHandler("responsive-display.dt",[o,t,e,n])}var i,r=this,o=this.s.dt,s=this.c.details;s&&!1!==s.type&&(i="string"==typeof s.renderer?a.renderer[s.renderer]():s.renderer,"boolean"==typeof(s=s.display(t,n,function(){return i.call(r,o,t[0][0],r._detailsObj(t[0]))},function(){e(!1)})))&&e(s)},_detailsInit:function(){var n=this,i=this.s.dt,e=this.c.details,r=("inline"===e.type&&(e.target="td.dtr-control, th.dtr-control"),b(i.table().body()).on("keyup.dtr","td, th",function(e){var t=d.activeElement.nodeName.toLowerCase();13!==e.keyCode||!b(this).data("dtr-keyboard")||"td"!==t&&"th"!==t||b(this).click()}),e.target),e="string"==typeof r?r:"td, th";void 0===r&&null===r||b(i.table().body()).on("click.dtr mousedown.dtr mouseup.dtr",e,function(e){if(b(i.table().node()).hasClass("collapsed")&&-1!==b.inArray(b(this).closest("tr").get(0),i.rows().nodes().toArray())){if("number"==typeof r){var t=r<0?i.columns().eq(0).length+r:r;if(i.cell(this).index().column!==t)return}t=i.row(b(this).closest("tr"));"click"===e.type?n._detailsDisplay(t,!1):"mousedown"===e.type?b(this).css("outline","none"):"mouseup"===e.type&&b(this).trigger("blur").css("outline","")}})},_detailsObj:function(n){var i=this,r=this.s.dt,o=[];let s=r.settings()[0];return b.map(this.s.columns,function(e,t){if(!e.never&&!e.control)return e=s.aoColumns[t],o[t]||(o[t]=r.column(t)),{className:e.sClass,columnIndex:t,data:s.fastData(n,t,i.c.orthogonal),hidden:o[t].visible()&&!i.s.current[t],rowIndex:n,title:o[t].title()}})},_find:function(e){for(var t=this.c.breakpoints,n=0,i=t.length;n<i;n++)if(t[n].name===e)return t[n]},_redrawChildren:function(){var n=this,i=this.s.dt;i.rows({page:"current"}).iterator("row",function(e,t){n._detailsDisplay(i.row(t),!0)})},_resize:function(n){for(var e,i=this,r=this.s.dt,t=b(y).innerWidth(),o=this.c.breakpoints,s=o[0].name,d=this.s.columns,a=this.s.current.slice(),l=o.length-1;0<=l;l--)if(t<=o[l].width){s=o[l].name;break}var c=this._columnsVisibility(s),u=(this.s.current=c,!1);for(l=0,e=d.length;l<e;l++)if(!1===c[l]&&!d[l].never&&!d[l].control&&!1==!r.column(l).visible()){u=!0;break}b(r.table().node()).toggleClass("collapsed",u);var h=!1,p=0,f=r.settings()[0],m=b(r.table().node()).children("colgroup"),v=f.aoColumns.map(function(e){return e.colEl});r.columns().eq(0).each(function(e,t){r.column(e).visible()&&(!0===c[t]&&p++,!n&&c[t]===a[t]||(h=!0,i._setColumnVis(e,c[t])),c[t]?i._colGroupAttach(m,v,t):v[t].detach())}),h&&(r.columns.adjust(),this._redrawChildren(),b(r.table().node()).trigger("responsive-resize.dt",[r,this._responsiveOnlyHidden()]),0===r.page.info().recordsDisplay)&&b("td",r.table().body()).eq(0).attr("colspan",p),i._controlClass()},_resizeAuto:function(){var t=this.s.dt,n=this.s.columns,r=this,o=t.columns().indexes().filter(function(e){return t.column(e).visible()});if(this.c.auto&&-1!==b.inArray(!0,b.map(n,function(e){return e.auto}))){for(var e=t.table().node().cloneNode(!1),i=b(t.table().header().cloneNode(!1)).appendTo(e),s=b(t.table().footer().cloneNode(!1)).appendTo(e),d=b(t.table().body()).clone(!1,!1).empty().appendTo(e),a=(e.style.width="auto",t.table().header.structure(o).forEach(e=>{e=e.filter(function(e){return!!e}).map(function(e){return b(e.cell).clone(!1).css("display","table-cell").css("width","auto").css("min-width",0)});b("<tr/>").append(e).appendTo(i)}),b("<tr/>").appendTo(d)),l=0;l<o.count();l++)a.append("<td/>");this.c.details.renderer._responsiveMovesNodes?t.rows({page:"current"}).every(function(n){var i,e=this.node();e&&(i=e.cloneNode(!1),t.cells(n,o).every(function(e,t){t=r.s.childNodeStore[n+"-"+t];(t?b(this.node().cloneNode(!1)).append(b(t).clone()):b(this.node()).clone(!1)).appendTo(i)}),d.append(i))}):b(d).append(b(t.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display",""),d.find("th, td").css("display",""),t.table().footer.structure(o).forEach(e=>{e=e.filter(function(e){return!!e}).map(function(e){return b(e.cell).clone(!1).css("display","table-cell").css("width","auto").css("min-width",0)});b("<tr/>").append(e).appendTo(s)}),"inline"===this.c.details.type&&b(e).addClass("dtr-inline collapsed"),b(e).find("[name]").removeAttr("name"),b(e).css("position","relative");e=b("<div/>").css({width:1,height:1,overflow:"hidden",clear:"both"}).append(e);e.insertBefore(t.table().node()),a.children().each(function(e){e=t.column.index("fromVisible",e);n[e].minWidth=this.offsetWidth||0}),e.remove()}},_responsiveOnlyHidden:function(){var n=this.s.dt;return b.map(this.s.current,function(e,t){return!1===n.column(t).visible()||e})},_setColumnVis:function(e,t){var n=this,i=this.s.dt,r=t?"":"none";this._setHeaderVis(e,t,i.table().header.structure()),this._setHeaderVis(e,t,i.table().footer.structure()),i.column(e).nodes().to$().css("display",r).toggleClass("dtr-hidden",!t),i.settings()[0].aoColumns[e].responsiveVisible=t,b.isEmptyObject(this.s.childNodeStore)||i.cells(null,e).indexes().each(function(e){n._childNodesRestore(i,e.row,e.column)})},_setHeaderVis:function(n,i,o){var r=this,s=i?"":"none";o.forEach(function(e,t){for(var n=0;n<e.length;n++)if(e[n]&&1<e[n].rowspan)for(var i=e[n].rowspan,r=1;r<i;r++)o[t+r][n]={}}),o.forEach(function(e){if(e[n]&&e[n].cell)b(e[n].cell).css("display",s).toggleClass("dtr-hidden",!i);else for(var t=n;0<=t;){if(e[t]&&e[t].cell){e[t].cell.colSpan=r._colspan(e,t);break}t--}})},_colspan:function(e,t){for(var n=1,i=t+1;i<e.length;i++)if(null===e[i]&&this.s.current[i])n++;else if(e[i])break;return n},_tabIndexes:function(){var e=this.s.dt,t=e.cells({page:"current"}).nodes().to$(),n=e.settings()[0],i=this.c.details.target;t.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]"),("number"==typeof i?e.cells(null,i,{page:"current"}).nodes().to$():("td:first-child, th:first-child"===i&&(i=">td:first-child, >th:first-child"),t=e.rows({page:"current"}).nodes(),"tr"===i?b(t):b(i,t))).attr("tabIndex",n.iTabIndex).data("dtr-keyboard",1)}}),a.defaults={breakpoints:a.breakpoints=[{name:"desktop",width:1/0},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}],auto:!0,details:{display:(a.display={childRow:function(e,t,n){var i=b(e.node());return t?i.hasClass("dtr-expanded")?(e.child(n(),"child").show(),!0):void 0:i.hasClass("dtr-expanded")?(e.child(!1),!1):!1!==(t=n())&&(e.child(t,"child").show(),!0)},childRowImmediate:function(e,t,n){var i=b(e.node());return!t&&i.hasClass("dtr-expanded")||!e.responsive.hasHidden()?(e.child(!1),!1):!1!==(t=n())&&(e.child(t,"child").show(),!0)},modal:function(s){return function(e,t,n,i){n=n();if(!1===n)return!1;if(t){if(!(o=b("div.dtr-modal-content")).length||e.index()!==o.data("dtr-row-idx"))return null;o.empty().append(n)}else{var r=function(){o.remove(),b(d).off("keypress.dtr"),b(e.node()).removeClass("dtr-expanded"),i()},o=b('<div class="dtr-modal"/>').append(b('<div class="dtr-modal-display"/>').append(b('<div class="dtr-modal-content"/>').data("dtr-row-idx",e.index()).append(n)).append(b('<div class="dtr-modal-close">&times;</div>').click(function(){r()}))).append(b('<div class="dtr-modal-background"/>').click(function(){r()})).appendTo("body");b(e.node()).addClass("dtr-expanded"),b(d).on("keyup.dtr",function(e){27===e.keyCode&&(e.stopPropagation(),r())})}return s&&s.header&&b("div.dtr-modal-content").prepend("<h2>"+s.header(e)+"</h2>"),!0}}}).childRow,renderer:(a.renderer={listHiddenNodes:function(){function e(i,e,t){var r=this,o=b('<ul data-dtr-index="'+e+'" class="dtr-details"/>'),s=!1;return b.each(t,function(e,t){var n;t.hidden&&(n=t.className?'class="'+t.className+'"':"",b("<li "+n+' data-dtr-index="'+t.columnIndex+'" data-dt-row="'+t.rowIndex+'" data-dt-column="'+t.columnIndex+'"><span class="dtr-title">'+t.title+"</span> </li>").append(b('<span class="dtr-data"/>').append(r._childNodes(i,t.rowIndex,t.columnIndex))).appendTo(o),s=!0)}),!!s&&o}return e._responsiveMovesNodes=!0,e},listHidden:function(){return function(e,t,n){n=b.map(n,function(e){var t=e.className?'class="'+e.className+'"':"";return e.hidden?"<li "+t+' data-dtr-index="'+e.columnIndex+'" data-dt-row="'+e.rowIndex+'" data-dt-column="'+e.columnIndex+'"><span class="dtr-title">'+e.title+'</span> <span class="dtr-data">'+e.data+"</span></li>":""}).join("");return!!n&&b('<ul data-dtr-index="'+t+'" class="dtr-details"/>').append(n)}},tableAll:function(i){return i=b.extend({tableClass:""},i),function(e,t,n){n=b.map(n,function(e){return"<tr "+(e.className?'class="'+e.className+'"':"")+' data-dt-row="'+e.rowIndex+'" data-dt-column="'+e.columnIndex+'"><td>'+(""!==e.title?e.title+":":"")+"</td> <td>"+e.data+"</td></tr>"}).join("");return b('<table class="'+i.tableClass+' dtr-details" width="100%"/>').append(n)}}}).listHidden(),target:0,type:"inline"},orthogonal:"display"},b.fn.dataTable.Api);return e.register("responsive()",function(){return this}),e.register("responsive.index()",function(e){return{column:(e=b(e)).data("dtr-index"),row:e.parent().data("dtr-index")}}),e.register("responsive.rebuild()",function(){return this.iterator("table",function(e){e._responsive&&e._responsive._classLogic()})}),e.register("responsive.recalc()",function(){return this.iterator("table",function(e){e._responsive&&(e._responsive._resizeAuto(),e._responsive._resize())})}),e.register("responsive.hasHidden()",function(){var e=this.context[0];return!!e._responsive&&-1!==b.inArray(!1,e._responsive._responsiveOnlyHidden())}),e.registerPlural("columns().responsiveHidden()","column().responsiveHidden()",function(){return this.iterator("column",function(e,t){return!!e._responsive&&e._responsive._responsiveOnlyHidden()[t]},1)}),a.version="3.0.8",b.fn.dataTable.Responsive=a,b.fn.DataTable.Responsive=a,b(d).on("preInit.dt.dtr",function(e,t,n){"dt"===e.namespace&&(b(t.nTable).hasClass("responsive")||b(t.nTable).hasClass("dt-responsive")||t.oInit.responsive||i.defaults.responsive)&&!1!==(e=t.oInit.responsive)&&new a(t,b.isPlainObject(e)?e:{})}),i});
(function(factory){
if(typeof define==='function'&&define.amd){
define(['jquery', 'datatables.net-dt', 'datatables.net-responsive'], function($){
return factory($, window, document);
});
}
else if(typeof exports==='object'){
var jq=require('jquery');
var cjsRequires=function (root, $){
if(! $.fn.dataTable){
require('datatables.net-dt')(root, $);
}
if(! $.fn.dataTable.Responsive){
require('datatables.net-responsive')(root, $);
}};
if(typeof window==='undefined'){
module.exports=function (root, $){
if(! root){
root=window;
}
if(! $){
$=jq(root);
}
cjsRequires(root, $);
return factory($, root, root.document);
};}else{
cjsRequires(window, jq);
module.exports=factory(jq, window, window.document);
}}else{
factory(jQuery, window, document);
}}(function($, window, document){
'use strict';
var DataTable=$.fn.dataTable;
return DataTable;
}));
;(function (factory){
var registeredInModuleLoader=false;
if(typeof define==='function'&&define.amd){
define(factory);
registeredInModuleLoader=true;
}
if(typeof exports==='object'){
module.exports=factory();
registeredInModuleLoader=true;
}
if(!registeredInModuleLoader){
var OldCookies=window.Cookies;
var api=window.Cookies=factory();
api.noConflict=function (){
window.Cookies=OldCookies;
return api;
};}}(function (){
function extend (){
var i=0;
var result={};
for (; i < arguments.length; i++){
var attributes=arguments[ i ];
for (var key in attributes){
result[key]=attributes[key];
}}
return result;
}
function init (converter){
function api (key, value, attributes){
var result;
if(typeof document==='undefined'){
return;
}
if(arguments.length > 1){
attributes=extend({
path: '/'
}, api.defaults, attributes);
if(typeof attributes.expires==='number'){
var expires=new Date();
expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
attributes.expires=expires;
}
attributes.expires=attributes.expires ? attributes.expires.toUTCString():'';
try {
result=JSON.stringify(value);
if(/^[\{\[]/.test(result)){
value=result;
}} catch (e){}
if(!converter.write){
value=encodeURIComponent(String(value))
.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
}else{
value=converter.write(value, key);
}
key=encodeURIComponent(String(key));
key=key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
key=key.replace(/[\(\)]/g, escape);
var stringifiedAttributes='';
for (var attributeName in attributes){
if(!attributes[attributeName]){
continue;
}
stringifiedAttributes +='; ' + attributeName;
if(attributes[attributeName]===true){
continue;
}
stringifiedAttributes +='=' + attributes[attributeName];
}
return (document.cookie=key + '=' + value + stringifiedAttributes);
}
if(!key){
result={};}
var cookies=document.cookie ? document.cookie.split('; '):[];
var rdecode=/(%[0-9A-Z]{2})+/g;
var i=0;
for (; i < cookies.length; i++){
var parts=cookies[i].split('=');
var cookie=parts.slice(1).join('=');
if(cookie.charAt(0)==='"'){
cookie=cookie.slice(1, -1);
}
try {
var name=parts[0].replace(rdecode, decodeURIComponent);
cookie=converter.read ?
converter.read(cookie, name):converter(cookie, name) ||
cookie.replace(rdecode, decodeURIComponent);
if(this.json){
try {
cookie=JSON.parse(cookie);
} catch (e){}}
if(key===name){
result=cookie;
break;
}
if(!key){
result[name]=cookie;
}} catch (e){}}
return result;
}
api.set=api;
api.get=function (key){
return api.call(api, key);
};
api.getJSON=function (){
return api.apply({
json: true
}, [].slice.call(arguments));
};
api.defaults={};
api.remove=function (key, attributes){
api(key, '', extend(attributes, {
expires: -1
}));
};
api.withConverter=init;
return api;
}
return init(function (){});
}));
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof exports?b(a,require("jquery")):b(a,a.jQuery||a.Zepto)}(this,function(a,b){"use strict";function c(a){if(w&&"none"===a.css("animation-name")&&"none"===a.css("-webkit-animation-name")&&"none"===a.css("-moz-animation-name")&&"none"===a.css("-o-animation-name")&&"none"===a.css("-ms-animation-name"))return 0;var b,c,d,e,f=a.css("animation-duration")||a.css("-webkit-animation-duration")||a.css("-moz-animation-duration")||a.css("-o-animation-duration")||a.css("-ms-animation-duration")||"0s",g=a.css("animation-delay")||a.css("-webkit-animation-delay")||a.css("-moz-animation-delay")||a.css("-o-animation-delay")||a.css("-ms-animation-delay")||"0s",h=a.css("animation-iteration-count")||a.css("-webkit-animation-iteration-count")||a.css("-moz-animation-iteration-count")||a.css("-o-animation-iteration-count")||a.css("-ms-animation-iteration-count")||"1";for(f=f.split(", "),g=g.split(", "),h=h.split(", "),e=0,c=f.length,b=Number.NEGATIVE_INFINITY;e<c;e++)d=parseFloat(f[e])*parseInt(h[e],10)+parseFloat(g[e]),d>b&&(b=d);return b}function d(){if(b(document).height()<=b(window).height())return 0;var a,c,d=document.createElement("div"),e=document.createElement("div");return d.style.visibility="hidden",d.style.width="100px",document.body.appendChild(d),a=d.offsetWidth,d.style.overflow="scroll",e.style.width="100%",d.appendChild(e),c=e.offsetWidth,d.parentNode.removeChild(d),a-c}function e(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)||(c=b(document.body),a=parseInt(c.css("padding-right"),10)+d(),c.css("padding-right",a+"px"),e.addClass(f))}}function f(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)&&(c=b(document.body),a=parseInt(c.css("padding-right"),10)-d(),c.css("padding-right",a+"px"),e.removeClass(f))}}function g(a,b,c,d){var e=k("is",b),f=[k("is",u.CLOSING),k("is",u.OPENING),k("is",u.CLOSED),k("is",u.OPENED)].join(" ");a.$bg.removeClass(f).addClass(e),a.$overlay.removeClass(f).addClass(e),a.$wrapper.removeClass(f).addClass(e),a.$modal.removeClass(f).addClass(e),a.state=b,!c&&a.$modal.trigger({type:b,reason:d},[{reason:d}])}function h(a,d,e){var f=0,g=function(a){a.target===this&&f++},h=function(a){a.target===this&&0===--f&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())};b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].on(r,g).on(s,h)}),a(),0===c(e.$bg)&&0===c(e.$overlay)&&0===c(e.$wrapper)&&0===c(e.$modal)&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())}function i(a){a.state!==u.CLOSED&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(b,c){a[c].off(r+" "+s)}),a.$bg.removeClass(a.settings.modifier),a.$overlay.removeClass(a.settings.modifier).hide(),a.$wrapper.hide(),f(),g(a,u.CLOSED,!0))}function j(a){var b,c,d,e,f={};for(a=a.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,","),b=a.split(","),e=0,c=b.length;e<c;e++)b[e]=b[e].split(":"),d=b[e][1],("string"==typeof d||d instanceof String)&&(d="true"===d||"false"!==d&&d),("string"==typeof d||d instanceof String)&&(d=isNaN(d)?d:+d),f[b[e][0]]=d;return f}function k(){for(var a=q,b=0;b<arguments.length;++b)a+="-"+arguments[b];return a}function l(){var a,c,d=location.hash.replace("#","");if(d){try{c=b('[data-remodal-id="'+d+'"]')}catch(e){}c&&c.length&&(a=b[p].lookup[c.data(p)],a&&a.settings.hashTracking&&a.open())}else n&&n.state===u.OPENED&&n.settings.hashTracking&&n.close()}function m(a,c){var d=b(document.body),e=d,f=this;f.settings=b.extend({},t,c),f.index=b[p].lookup.push(f)-1,f.state=u.CLOSED,f.$overlay=b("."+k("overlay")),null!==f.settings.appendTo&&f.settings.appendTo.length&&(e=b(f.settings.appendTo)),f.$overlay.length||(f.$overlay=b("<div>").addClass(k("overlay")+" "+k("is",u.CLOSED)).hide(),e.append(f.$overlay)),f.$bg=b("."+k("bg")).addClass(k("is",u.CLOSED)),f.$modal=a.addClass(q+" "+k("is-initialized")+" "+f.settings.modifier+" "+k("is",u.CLOSED)).attr("tabindex","-1"),f.$wrapper=b("<div>").addClass(k("wrapper")+" "+f.settings.modifier+" "+k("is",u.CLOSED)).hide().append(f.$modal),e.append(f.$wrapper),f.$wrapper.on("click."+q,'[data-remodal-action="close"]',function(a){a.preventDefault(),f.close()}),f.$wrapper.on("click."+q,'[data-remodal-action="cancel"]',function(a){a.preventDefault(),f.$modal.trigger(v.CANCELLATION),f.settings.closeOnCancel&&f.close(v.CANCELLATION)}),f.$wrapper.on("click."+q,'[data-remodal-action="confirm"]',function(a){a.preventDefault(),f.$modal.trigger(v.CONFIRMATION),f.settings.closeOnConfirm&&f.close(v.CONFIRMATION)}),f.$wrapper.on("click."+q,function(a){var c=b(a.target);c.hasClass(k("wrapper"))&&f.settings.closeOnOutsideClick&&f.close()})}var n,o,p="remodal",q=a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.NAMESPACE||p,r=b.map(["animationstart","webkitAnimationStart","MSAnimationStart","oAnimationStart"],function(a){return a+"."+q}).join(" "),s=b.map(["animationend","webkitAnimationEnd","MSAnimationEnd","oAnimationEnd"],function(a){return a+"."+q}).join(" "),t=b.extend({hashTracking:!0,closeOnConfirm:!0,closeOnCancel:!0,closeOnEscape:!0,closeOnOutsideClick:!0,modifier:"",appendTo:null},a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.DEFAULTS),u={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened"},v={CONFIRMATION:"confirmation",CANCELLATION:"cancellation"},w=function(){var a=document.createElement("div").style;return void 0!==a.animationName||void 0!==a.WebkitAnimationName||void 0!==a.MozAnimationName||void 0!==a.msAnimationName||void 0!==a.OAnimationName}(),x=/iPad|iPhone|iPod/.test(navigator.platform);m.prototype.open=function(){var a,c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(a=c.$modal.attr("data-remodal-id"),a&&c.settings.hashTracking&&(o=b(window).scrollTop(),location.hash=a),n&&n!==c&&i(n),n=c,e(),c.$bg.addClass(c.settings.modifier),c.$overlay.addClass(c.settings.modifier).show(),c.$wrapper.show().scrollTop(0),c.$modal.focus(),h(function(){g(c,u.OPENING)},function(){g(c,u.OPENED)},c))},m.prototype.close=function(a){var c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&c.state!==u.CLOSED&&(c.settings.hashTracking&&c.$modal.attr("data-remodal-id")===location.hash.substr(1)&&(location.hash="",b(window).scrollTop(o)),h(function(){g(c,u.CLOSING,!1,a)},function(){c.$bg.removeClass(c.settings.modifier),c.$overlay.removeClass(c.settings.modifier).hide(),c.$wrapper.hide(),f(),g(c,u.CLOSED,!1,a)},c))},m.prototype.getState=function(){return this.state},m.prototype.destroy=function(){var a,c=b[p].lookup;i(this),this.$wrapper.remove(),delete c[this.index],a=b.grep(c,function(a){return!!a}).length,0===a&&(this.$overlay.remove(),this.$bg.removeClass(k("is",u.CLOSING)+" "+k("is",u.OPENING)+" "+k("is",u.CLOSED)+" "+k("is",u.OPENED)))},b[p]={lookup:[]},b.fn[p]=function(a){var c,d;return this.each(function(e,f){d=b(f),null==d.data(p)?(c=new m(d,a),d.data(p,c.index),c.settings.hashTracking&&d.attr("data-remodal-id")===location.hash.substr(1)&&c.open()):c=b[p].lookup[d.data(p)]}),c},b(document).ready(function(){b(document).on("click","[data-remodal-target]",function(a){a.preventDefault();var c=a.currentTarget,d=c.getAttribute("data-remodal-target"),e=b('[data-remodal-id="'+d+'"]');b[p].lookup[e.data(p)].open()}),b(document).find("."+q).each(function(a,c){var d=b(c),e=d.data("remodal-options");e?("string"==typeof e||e instanceof String)&&(e=j(e)):e={},d[p](e)}),b(document).on("keydown."+q,function(a){n&&n.settings.closeOnEscape&&n.state===u.OPENED&&27===a.keyCode&&n.close()}),b(window).on("hashchange."+q,l)})});
(function (global, factory){
typeof exports==='object'&&typeof module!=='undefined' ? module.exports=factory() :
typeof define==='function'&&define.amd ? define(factory) :
(global.PointerEventsPolyfill=factory());
}(this, function (){ 'use strict';
var MOUSE_PROPS=[
'bubbles',
'cancelable',
'view',
'detail',
'screenX',
'screenY',
'clientX',
'clientY',
'ctrlKey',
'altKey',
'shiftKey',
'metaKey',
'button',
'relatedTarget',
'pageX',
'pageY'
];
var MOUSE_DEFAULTS=[
false,
false,
null,
null,
0,
0,
0,
0,
false,
false,
false,
false,
0,
null,
0,
0
];
function PointerEvent(inType, inDict){
inDict=inDict||Object.create(null);
var e=document.createEvent('Event');
e.initEvent(inType, inDict.bubbles||false, inDict.cancelable||false);
for (var i=2, p; i < MOUSE_PROPS.length; i++){
p=MOUSE_PROPS[i];
e[p]=inDict[p]||MOUSE_DEFAULTS[i];
}
e.buttons=inDict.buttons||0;
var pressure=0;
if(inDict.pressure&&e.buttons){
pressure=inDict.pressure;
}else{
pressure=e.buttons ? 0.5:0;
}
e.x=e.clientX;
e.y=e.clientY;
e.pointerId=inDict.pointerId||0;
e.width=inDict.width||0;
e.height=inDict.height||0;
e.pressure=pressure;
e.tiltX=inDict.tiltX||0;
e.tiltY=inDict.tiltY||0;
e.twist=inDict.twist||0;
e.tangentialPressure=inDict.tangentialPressure||0;
e.pointerType=inDict.pointerType||'';
e.hwTimestamp=inDict.hwTimestamp||0;
e.isPrimary=inDict.isPrimary||false;
return e;
}
var USE_MAP=window.Map&&window.Map.prototype.forEach;
var PointerMap=USE_MAP ? Map:SparseArrayMap;
function SparseArrayMap(){
this.array=[];
this.size=0;
}
SparseArrayMap.prototype={
set: function(k, v){
if(v===undefined){
return this.delete(k);
}
if(!this.has(k)){
this.size++;
}
this.array[k]=v;
},
has: function(k){
return this.array[k]!==undefined;
},
delete: function(k){
if(this.has(k)){
delete this.array[k];
this.size--;
}},
get: function(k){
return this.array[k];
},
clear: function(){
this.array.length=0;
this.size=0;
},
forEach: function(callback, thisArg){
return this.array.forEach(function(v, k){
callback.call(thisArg, v, k, this);
}, this);
}};
var CLONE_PROPS=[
'bubbles',
'cancelable',
'view',
'detail',
'screenX',
'screenY',
'clientX',
'clientY',
'ctrlKey',
'altKey',
'shiftKey',
'metaKey',
'button',
'relatedTarget',
'buttons',
'pointerId',
'width',
'height',
'pressure',
'tiltX',
'tiltY',
'pointerType',
'hwTimestamp',
'isPrimary',
'type',
'target',
'currentTarget',
'which',
'pageX',
'pageY',
'timeStamp'
];
var CLONE_DEFAULTS=[
false,
false,
null,
null,
0,
0,
0,
0,
false,
false,
false,
false,
0,
null,
0,
0,
0,
0,
0,
0,
0,
'',
0,
false,
'',
null,
null,
0,
0,
0,
0
];
var BOUNDARY_EVENTS={
'pointerover': 1,
'pointerout': 1,
'pointerenter': 1,
'pointerleave': 1
};
var HAS_SVG_INSTANCE=(typeof SVGElementInstance!=='undefined');
var dispatcher={
pointermap: new PointerMap(),
eventMap: Object.create(null),
captureInfo: Object.create(null),
eventSources: Object.create(null),
eventSourceList: [],
registerSource: function(name, source){
var s=source;
var newEvents=s.events;
if(newEvents){
newEvents.forEach(function(e){
if(s[e]){
this.eventMap[e]=s[e].bind(s);
}}, this);
this.eventSources[name]=s;
this.eventSourceList.push(s);
}},
register: function(element){
var l=this.eventSourceList.length;
for (var i=0, es; (i < l)&&(es=this.eventSourceList[i]); i++){
es.register.call(es, element);
}},
unregister: function(element){
var l=this.eventSourceList.length;
for (var i=0, es; (i < l)&&(es=this.eventSourceList[i]); i++){
es.unregister.call(es, element);
}},
contains: function(container, contained){
try {
return container.contains(contained);
} catch (ex){
return false;
}},
down: function(inEvent){
inEvent.bubbles=true;
this.fireEvent('pointerdown', inEvent);
},
move: function(inEvent){
inEvent.bubbles=true;
this.fireEvent('pointermove', inEvent);
},
up: function(inEvent){
inEvent.bubbles=true;
this.fireEvent('pointerup', inEvent);
},
enter: function(inEvent){
inEvent.bubbles=false;
this.fireEvent('pointerenter', inEvent);
},
leave: function(inEvent){
inEvent.bubbles=false;
this.fireEvent('pointerleave', inEvent);
},
over: function(inEvent){
inEvent.bubbles=true;
this.fireEvent('pointerover', inEvent);
},
out: function(inEvent){
inEvent.bubbles=true;
this.fireEvent('pointerout', inEvent);
},
cancel: function(inEvent){
inEvent.bubbles=true;
this.fireEvent('pointercancel', inEvent);
},
leaveOut: function(event){
this.out(event);
this.propagate(event, this.leave, false);
},
enterOver: function(event){
this.over(event);
this.propagate(event, this.enter, true);
},
eventHandler: function(inEvent){
if(inEvent._handledByPE){
return;
}
var type=inEvent.type;
var fn=this.eventMap&&this.eventMap[type];
if(fn){
fn(inEvent);
}
inEvent._handledByPE=true;
},
listen: function(target, events){
events.forEach(function(e){
this.addEvent(target, e);
}, this);
},
unlisten: function(target, events){
events.forEach(function(e){
this.removeEvent(target, e);
}, this);
},
addEvent: function(target, eventName){
target.addEventListener(eventName, this.boundHandler);
},
removeEvent: function(target, eventName){
target.removeEventListener(eventName, this.boundHandler);
},
makeEvent: function(inType, inEvent){
if(this.captureInfo[inEvent.pointerId]){
inEvent.relatedTarget=null;
}
var e=new PointerEvent(inType, inEvent);
if(inEvent.preventDefault){
e.preventDefault=inEvent.preventDefault;
}
e._target=e._target||inEvent.target;
return e;
},
fireEvent: function(inType, inEvent){
var e=this.makeEvent(inType, inEvent);
return this.dispatchEvent(e);
},
cloneEvent: function(inEvent){
var eventCopy=Object.create(null);
var p;
for (var i=0; i < CLONE_PROPS.length; i++){
p=CLONE_PROPS[i];
eventCopy[p]=inEvent[p]||CLONE_DEFAULTS[i];
if(HAS_SVG_INSTANCE&&(p==='target'||p==='relatedTarget')){
if(eventCopy[p] instanceof SVGElementInstance){
eventCopy[p]=eventCopy[p].correspondingUseElement;
}}
}
if(inEvent.preventDefault){
eventCopy.preventDefault=function(){
inEvent.preventDefault();
};}
return eventCopy;
},
getTarget: function(inEvent){
var capture=this.captureInfo[inEvent.pointerId];
if(!capture){
return inEvent._target;
}
if(inEvent._target===capture||!(inEvent.type in BOUNDARY_EVENTS)){
return capture;
}},
propagate: function(event, fn, propagateDown){
var target=event.target;
var targets=[];
while (target!==document&&!target.contains(event.relatedTarget)){
targets.push(target);
target=target.parentNode;
if(!target){
return;
}}
if(propagateDown){
targets.reverse();
}
targets.forEach(function(target){
event.target=target;
fn.call(this, event);
}, this);
},
setCapture: function(inPointerId, inTarget, skipDispatch){
if(this.captureInfo[inPointerId]){
this.releaseCapture(inPointerId, skipDispatch);
}
this.captureInfo[inPointerId]=inTarget;
this.implicitRelease=this.releaseCapture.bind(this, inPointerId, skipDispatch);
document.addEventListener('pointerup', this.implicitRelease);
document.addEventListener('pointercancel', this.implicitRelease);
var e=new PointerEvent('gotpointercapture');
e.pointerId=inPointerId;
e._target=inTarget;
if(!skipDispatch){
this.asyncDispatchEvent(e);
}},
releaseCapture: function(inPointerId, skipDispatch){
var t=this.captureInfo[inPointerId];
if(!t){
return;
}
this.captureInfo[inPointerId]=undefined;
document.removeEventListener('pointerup', this.implicitRelease);
document.removeEventListener('pointercancel', this.implicitRelease);
var e=new PointerEvent('lostpointercapture');
e.pointerId=inPointerId;
e._target=t;
if(!skipDispatch){
this.asyncDispatchEvent(e);
}},
dispatchEvent: function(inEvent){
var t=this.getTarget(inEvent);
if(t){
return t.dispatchEvent(inEvent);
}},
asyncDispatchEvent: function(inEvent){
requestAnimationFrame(this.dispatchEvent.bind(this, inEvent));
}};
dispatcher.boundHandler=dispatcher.eventHandler.bind(dispatcher);
var targeting={
shadow: function(inEl){
if(inEl){
return inEl.shadowRoot||inEl.webkitShadowRoot;
}},
canTarget: function(shadow){
return shadow&&Boolean(shadow.elementFromPoint);
},
targetingShadow: function(inEl){
var s=this.shadow(inEl);
if(this.canTarget(s)){
return s;
}},
olderShadow: function(shadow){
var os=shadow.olderShadowRoot;
if(!os){
var se=shadow.querySelector('shadow');
if(se){
os=se.olderShadowRoot;
}}
return os;
},
allShadows: function(element){
var shadows=[];
var s=this.shadow(element);
while (s){
shadows.push(s);
s=this.olderShadow(s);
}
return shadows;
},
searchRoot: function(inRoot, x, y){
if(inRoot){
var t=inRoot.elementFromPoint(x, y);
var st, sr;
sr=this.targetingShadow(t);
while (sr){
st=sr.elementFromPoint(x, y);
if(!st){
sr=this.olderShadow(sr);
}else{
var ssr=this.targetingShadow(st);
return this.searchRoot(ssr, x, y)||st;
}}
return t;
}},
owner: function(element){
var s=element;
while (s.parentNode){
s=s.parentNode;
}
if(s.nodeType!==Node.DOCUMENT_NODE&&s.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){
s=document;
}
return s;
},
findTarget: function(inEvent){
var x=inEvent.clientX;
var y=inEvent.clientY;
var s=this.owner(inEvent.target);
if(!s.elementFromPoint(x, y)){
s=document;
}
return this.searchRoot(s, x, y);
}};
var forEach=Array.prototype.forEach.call.bind(Array.prototype.forEach);
var map=Array.prototype.map.call.bind(Array.prototype.map);
var toArray=Array.prototype.slice.call.bind(Array.prototype.slice);
var filter=Array.prototype.filter.call.bind(Array.prototype.filter);
var MO=window.MutationObserver||window.WebKitMutationObserver;
var SELECTOR='[touch-action]';
var OBSERVER_INIT={
subtree: true,
childList: true,
attributes: true,
attributeOldValue: true,
attributeFilter: ['touch-action']
};
function Installer(add, remove, changed, binder){
this.addCallback=add.bind(binder);
this.removeCallback=remove.bind(binder);
this.changedCallback=changed.bind(binder);
if(MO){
this.observer=new MO(this.mutationWatcher.bind(this));
}}
Installer.prototype={
watchSubtree: function(target){
if(this.observer&&targeting.canTarget(target)){
this.observer.observe(target, OBSERVER_INIT);
}},
enableOnSubtree: function(target){
this.watchSubtree(target);
if(target===document&&document.readyState!=='complete'){
this.installOnLoad();
}else{
this.installNewSubtree(target);
}},
installNewSubtree: function(target){
forEach(this.findElements(target), this.addElement, this);
},
findElements: function(target){
if(target.querySelectorAll){
return target.querySelectorAll(SELECTOR);
}
return [];
},
removeElement: function(el){
this.removeCallback(el);
},
addElement: function(el){
this.addCallback(el);
},
elementChanged: function(el, oldValue){
this.changedCallback(el, oldValue);
},
concatLists: function(accum, list){
return accum.concat(toArray(list));
},
installOnLoad: function(){
document.addEventListener('readystatechange', function(){
if(document.readyState==='complete'){
this.installNewSubtree(document);
}}.bind(this));
},
isElement: function(n){
return n.nodeType===Node.ELEMENT_NODE;
},
flattenMutationTree: function(inNodes){
var tree=map(inNodes, this.findElements, this);
tree.push(filter(inNodes, this.isElement));
return tree.reduce(this.concatLists, []);
},
mutationWatcher: function(mutations){
mutations.forEach(this.mutationHandler, this);
},
mutationHandler: function(m){
if(m.type==='childList'){
var added=this.flattenMutationTree(m.addedNodes);
added.forEach(this.addElement, this);
var removed=this.flattenMutationTree(m.removedNodes);
removed.forEach(this.removeElement, this);
}else if(m.type==='attributes'){
this.elementChanged(m.target, m.oldValue);
}}
};
function shadowSelector(v){
return 'body /shadow-deep/ ' + selector(v);
}
function selector(v){
return '[touch-action="' + v + '"]';
}
function rule(v){
return '{ -ms-touch-action: ' + v + '; touch-action: ' + v + '; }';
}
var attrib2css=[
'none',
'auto',
'pan-x',
'pan-y',
{
rule: 'pan-x pan-y',
selectors: [
'pan-x pan-y',
'pan-y pan-x'
]
}
];
var styles='';
var hasNativePE=window.PointerEvent||window.MSPointerEvent;
var hasShadowRoot = !window.ShadowDOMPolyfill&&document.head.createShadowRoot;
function applyAttributeStyles(){
if(hasNativePE){
attrib2css.forEach(function(r){
if(String(r)===r){
styles +=selector(r) + rule(r) + '\n';
if(hasShadowRoot){
styles +=shadowSelector(r) + rule(r) + '\n';
}}else{
styles +=r.selectors.map(selector) + rule(r.rule) + '\n';
if(hasShadowRoot){
styles +=r.selectors.map(shadowSelector) + rule(r.rule) + '\n';
}}
});
var el=document.createElement('style');
el.textContent=styles;
document.head.appendChild(el);
}}
var pointermap=dispatcher.pointermap;
var DEDUP_DIST=25;
var BUTTON_TO_BUTTONS=[1, 4, 2, 8, 16];
var HAS_BUTTONS=false;
try {
HAS_BUTTONS=new MouseEvent('test', { buttons: 1 }).buttons===1;
} catch (e){}
var mouseEvents={
POINTER_ID: 1,
POINTER_TYPE: 'mouse',
events: [
'mousedown',
'mousemove',
'mouseup',
'mouseover',
'mouseout'
],
register: function(target){
dispatcher.listen(target, this.events);
},
unregister: function(target){
dispatcher.unlisten(target, this.events);
},
lastTouches: [],
isEventSimulatedFromTouch: function(inEvent){
var lts=this.lastTouches;
var x=inEvent.clientX;
var y=inEvent.clientY;
for (var i=0, l=lts.length, t; i < l&&(t=lts[i]); i++){
var dx=Math.abs(x - t.x);
var dy=Math.abs(y - t.y);
if(dx <=DEDUP_DIST&&dy <=DEDUP_DIST){
return true;
}}
},
prepareEvent: function(inEvent){
var e=dispatcher.cloneEvent(inEvent);
var pd=e.preventDefault;
e.preventDefault=function(){
inEvent.preventDefault();
pd();
};
e.pointerId=this.POINTER_ID;
e.isPrimary=true;
e.pointerType=this.POINTER_TYPE;
return e;
},
prepareButtonsForMove: function(e, inEvent){
var p=pointermap.get(this.POINTER_ID);
if(inEvent.which===0||!p){
e.buttons=0;
}else{
e.buttons=p.buttons;
}
inEvent.buttons=e.buttons;
},
mousedown: function(inEvent){
if(!this.isEventSimulatedFromTouch(inEvent)){
var p=pointermap.get(this.POINTER_ID);
var e=this.prepareEvent(inEvent);
if(!HAS_BUTTONS){
e.buttons=BUTTON_TO_BUTTONS[e.button];
if(p){ e.buttons |=p.buttons; }
inEvent.buttons=e.buttons;
}
pointermap.set(this.POINTER_ID, inEvent);
if(!p||p.buttons===0){
dispatcher.down(e);
}else{
dispatcher.move(e);
}}
},
mousemove: function(inEvent){
if(!this.isEventSimulatedFromTouch(inEvent)){
var e=this.prepareEvent(inEvent);
if(!HAS_BUTTONS){ this.prepareButtonsForMove(e, inEvent); }
e.button=-1;
pointermap.set(this.POINTER_ID, inEvent);
dispatcher.move(e);
}},
mouseup: function(inEvent){
if(!this.isEventSimulatedFromTouch(inEvent)){
var p=pointermap.get(this.POINTER_ID);
var e=this.prepareEvent(inEvent);
if(!HAS_BUTTONS){
var up=BUTTON_TO_BUTTONS[e.button];
e.buttons=p ? p.buttons & ~up:0;
inEvent.buttons=e.buttons;
}
pointermap.set(this.POINTER_ID, inEvent);
e.buttons &=~BUTTON_TO_BUTTONS[e.button];
if(e.buttons===0){
dispatcher.up(e);
}else{
dispatcher.move(e);
}}
},
mouseover: function(inEvent){
if(!this.isEventSimulatedFromTouch(inEvent)){
var e=this.prepareEvent(inEvent);
if(!HAS_BUTTONS){ this.prepareButtonsForMove(e, inEvent); }
e.button=-1;
pointermap.set(this.POINTER_ID, inEvent);
dispatcher.enterOver(e);
}},
mouseout: function(inEvent){
if(!this.isEventSimulatedFromTouch(inEvent)){
var e=this.prepareEvent(inEvent);
if(!HAS_BUTTONS){ this.prepareButtonsForMove(e, inEvent); }
e.button=-1;
dispatcher.leaveOut(e);
}},
cancel: function(inEvent){
var e=this.prepareEvent(inEvent);
dispatcher.cancel(e);
this.deactivateMouse();
},
deactivateMouse: function(){
pointermap.delete(this.POINTER_ID);
}};
var captureInfo=dispatcher.captureInfo;
var findTarget=targeting.findTarget.bind(targeting);
var allShadows=targeting.allShadows.bind(targeting);
var pointermap$1=dispatcher.pointermap;
var DEDUP_TIMEOUT=2500;
var CLICK_COUNT_TIMEOUT=200;
var ATTRIB='touch-action';
var INSTALLER;
var touchEvents={
events: [
'touchstart',
'touchmove',
'touchend',
'touchcancel'
],
register: function(target){
INSTALLER.enableOnSubtree(target);
},
unregister: function(){
},
elementAdded: function(el){
var a=el.getAttribute(ATTRIB);
var st=this.touchActionToScrollType(a);
if(st){
el._scrollType=st;
dispatcher.listen(el, this.events);
allShadows(el).forEach(function(s){
s._scrollType=st;
dispatcher.listen(s, this.events);
}, this);
}},
elementRemoved: function(el){
el._scrollType=undefined;
dispatcher.unlisten(el, this.events);
allShadows(el).forEach(function(s){
s._scrollType=undefined;
dispatcher.unlisten(s, this.events);
}, this);
},
elementChanged: function(el, oldValue){
var a=el.getAttribute(ATTRIB);
var st=this.touchActionToScrollType(a);
var oldSt=this.touchActionToScrollType(oldValue);
if(st&&oldSt){
el._scrollType=st;
allShadows(el).forEach(function(s){
s._scrollType=st;
}, this);
}else if(oldSt){
this.elementRemoved(el);
}else if(st){
this.elementAdded(el);
}},
scrollTypes: {
EMITTER: 'none',
XSCROLLER: 'pan-x',
YSCROLLER: 'pan-y',
SCROLLER: /^(?:pan-x pan-y)|(?:pan-y pan-x)|auto$/
},
touchActionToScrollType: function(touchAction){
var t=touchAction;
var st=this.scrollTypes;
if(t==='none'){
return 'none';
}else if(t===st.XSCROLLER){
return 'X';
}else if(t===st.YSCROLLER){
return 'Y';
}else if(st.SCROLLER.exec(t)){
return 'XY';
}},
POINTER_TYPE: 'touch',
firstTouch: null,
isPrimaryTouch: function(inTouch){
return this.firstTouch===inTouch.identifier;
},
setPrimaryTouch: function(inTouch){
if(pointermap$1.size===0||(pointermap$1.size===1&&pointermap$1.has(1))){
this.firstTouch=inTouch.identifier;
this.firstXY={ X: inTouch.clientX, Y: inTouch.clientY };
this.scrolling=false;
this.cancelResetClickCount();
}},
removePrimaryPointer: function(inPointer){
if(inPointer.isPrimary){
this.firstTouch=null;
this.firstXY=null;
this.resetClickCount();
}},
clickCount: 0,
resetId: null,
resetClickCount: function(){
var fn=function(){
this.clickCount=0;
this.resetId=null;
}.bind(this);
this.resetId=setTimeout(fn, CLICK_COUNT_TIMEOUT);
},
cancelResetClickCount: function(){
if(this.resetId){
clearTimeout(this.resetId);
}},
typeToButtons: function(type){
var ret=0;
if(type==='touchstart'||type==='touchmove'){
ret=1;
}
return ret;
},
touchToPointer: function(inTouch){
var cte=this.currentTouchEvent;
var e=dispatcher.cloneEvent(inTouch);
var id=e.pointerId=inTouch.identifier + 2;
e.target=captureInfo[id]||findTarget(e);
e.bubbles=true;
e.cancelable=true;
e.detail=this.clickCount;
e.button=0;
e.buttons=this.typeToButtons(cte.type);
e.width=(inTouch.radiusX||inTouch.webkitRadiusX||0) * 2;
e.height=(inTouch.radiusY||inTouch.webkitRadiusY||0) * 2;
e.pressure=inTouch.force||inTouch.webkitForce||0.5;
e.isPrimary=this.isPrimaryTouch(inTouch);
e.pointerType=this.POINTER_TYPE;
e.altKey=cte.altKey;
e.ctrlKey=cte.ctrlKey;
e.metaKey=cte.metaKey;
e.shiftKey=cte.shiftKey;
var self=this;
e.preventDefault=function(){
self.scrolling=false;
self.firstXY=null;
cte.preventDefault();
};
return e;
},
processTouches: function(inEvent, inFunction){
var tl=inEvent.changedTouches;
this.currentTouchEvent=inEvent;
for (var i=0, t; i < tl.length; i++){
t=tl[i];
inFunction.call(this, this.touchToPointer(t));
}},
shouldScroll: function(inEvent){
if(this.firstXY){
var ret;
var scrollAxis=inEvent.currentTarget._scrollType;
if(scrollAxis==='none'){
ret=false;
}else if(scrollAxis==='XY'){
ret=true;
}else{
var t=inEvent.changedTouches[0];
var a=scrollAxis;
var oa=scrollAxis==='Y' ? 'X':'Y';
var da=Math.abs(t['client' + a] - this.firstXY[a]);
var doa=Math.abs(t['client' + oa] - this.firstXY[oa]);
ret=da >=doa;
}
this.firstXY=null;
return ret;
}},
findTouch: function(inTL, inId){
for (var i=0, l=inTL.length, t; i < l&&(t=inTL[i]); i++){
if(t.identifier===inId){
return true;
}}
},
vacuumTouches: function(inEvent){
var tl=inEvent.touches;
if(pointermap$1.size >=tl.length){
var d=[];
pointermap$1.forEach(function(value, key){
if(key!==1&&!this.findTouch(tl, key - 2)){
var p=value.out;
d.push(p);
}}, this);
d.forEach(this.cancelOut, this);
}},
touchstart: function(inEvent){
this.vacuumTouches(inEvent);
this.setPrimaryTouch(inEvent.changedTouches[0]);
this.dedupSynthMouse(inEvent);
if(!this.scrolling){
this.clickCount++;
this.processTouches(inEvent, this.overDown);
}},
overDown: function(inPointer){
pointermap$1.set(inPointer.pointerId, {
target: inPointer.target,
out: inPointer,
outTarget: inPointer.target
});
dispatcher.enterOver(inPointer);
dispatcher.down(inPointer);
},
touchmove: function(inEvent){
if(!this.scrolling){
if(this.shouldScroll(inEvent)){
this.scrolling=true;
this.touchcancel(inEvent);
}else{
inEvent.preventDefault();
this.processTouches(inEvent, this.moveOverOut);
}}
},
moveOverOut: function(inPointer){
var event=inPointer;
var pointer=pointermap$1.get(event.pointerId);
if(!pointer){
return;
}
var outEvent=pointer.out;
var outTarget=pointer.outTarget;
dispatcher.move(event);
if(outEvent&&outTarget!==event.target){
outEvent.relatedTarget=event.target;
event.relatedTarget=outTarget;
outEvent.target=outTarget;
if(event.target){
dispatcher.leaveOut(outEvent);
dispatcher.enterOver(event);
}else{
event.target=outTarget;
event.relatedTarget=null;
this.cancelOut(event);
}}
pointer.out=event;
pointer.outTarget=event.target;
},
touchend: function(inEvent){
this.dedupSynthMouse(inEvent);
this.processTouches(inEvent, this.upOut);
},
upOut: function(inPointer){
if(!this.scrolling){
dispatcher.up(inPointer);
dispatcher.leaveOut(inPointer);
}
this.cleanUpPointer(inPointer);
},
touchcancel: function(inEvent){
this.processTouches(inEvent, this.cancelOut);
},
cancelOut: function(inPointer){
dispatcher.cancel(inPointer);
dispatcher.leaveOut(inPointer);
this.cleanUpPointer(inPointer);
},
cleanUpPointer: function(inPointer){
pointermap$1.delete(inPointer.pointerId);
this.removePrimaryPointer(inPointer);
},
dedupSynthMouse: function(inEvent){
var lts=mouseEvents.lastTouches;
var t=inEvent.changedTouches[0];
if(this.isPrimaryTouch(t)){
var lt={ x: t.clientX, y: t.clientY };
lts.push(lt);
var fn=(function(lts, lt){
var i=lts.indexOf(lt);
if(i > -1){
lts.splice(i, 1);
}}).bind(null, lts, lt);
setTimeout(fn, DEDUP_TIMEOUT);
}}
};
INSTALLER=new Installer(touchEvents.elementAdded, touchEvents.elementRemoved,
touchEvents.elementChanged, touchEvents);
var pointermap$2=dispatcher.pointermap;
var HAS_BITMAP_TYPE=window.MSPointerEvent &&
typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE==='number';
var msEvents={
events: [
'MSPointerDown',
'MSPointerMove',
'MSPointerUp',
'MSPointerOut',
'MSPointerOver',
'MSPointerCancel',
'MSGotPointerCapture',
'MSLostPointerCapture'
],
register: function(target){
dispatcher.listen(target, this.events);
},
unregister: function(target){
dispatcher.unlisten(target, this.events);
},
POINTER_TYPES: [
'',
'unavailable',
'touch',
'pen',
'mouse'
],
prepareEvent: function(inEvent){
var e=inEvent;
if(HAS_BITMAP_TYPE){
e=dispatcher.cloneEvent(inEvent);
e.pointerType=this.POINTER_TYPES[inEvent.pointerType];
}
return e;
},
cleanup: function(id){
pointermap$2.delete(id);
},
MSPointerDown: function(inEvent){
pointermap$2.set(inEvent.pointerId, inEvent);
var e=this.prepareEvent(inEvent);
dispatcher.down(e);
},
MSPointerMove: function(inEvent){
var e=this.prepareEvent(inEvent);
dispatcher.move(e);
},
MSPointerUp: function(inEvent){
var e=this.prepareEvent(inEvent);
dispatcher.up(e);
this.cleanup(inEvent.pointerId);
},
MSPointerOut: function(inEvent){
var e=this.prepareEvent(inEvent);
dispatcher.leaveOut(e);
},
MSPointerOver: function(inEvent){
var e=this.prepareEvent(inEvent);
dispatcher.enterOver(e);
},
MSPointerCancel: function(inEvent){
var e=this.prepareEvent(inEvent);
dispatcher.cancel(e);
this.cleanup(inEvent.pointerId);
},
MSLostPointerCapture: function(inEvent){
var e=dispatcher.makeEvent('lostpointercapture', inEvent);
dispatcher.dispatchEvent(e);
},
MSGotPointerCapture: function(inEvent){
var e=dispatcher.makeEvent('gotpointercapture', inEvent);
dispatcher.dispatchEvent(e);
}};
function applyPolyfill(){
if(!window.PointerEvent){
window.PointerEvent=PointerEvent;
if(window.navigator.msPointerEnabled){
var tp=window.navigator.msMaxTouchPoints;
Object.defineProperty(window.navigator, 'maxTouchPoints', {
value: tp,
enumerable: true
});
dispatcher.registerSource('ms', msEvents);
}else{
Object.defineProperty(window.navigator, 'maxTouchPoints', {
value: 0,
enumerable: true
});
dispatcher.registerSource('mouse', mouseEvents);
if(window.ontouchstart!==undefined){
dispatcher.registerSource('touch', touchEvents);
}}
dispatcher.register(document);
}}
var n=window.navigator;
var s;
var r;
var h;
function assertActive(id){
if(!dispatcher.pointermap.has(id)){
var error=new Error('InvalidPointerId');
error.name='InvalidPointerId';
throw error;
}}
function assertConnected(elem){
var parent=elem.parentNode;
while (parent&&parent!==elem.ownerDocument){
parent=parent.parentNode;
}
if(!parent){
var error=new Error('InvalidStateError');
error.name='InvalidStateError';
throw error;
}}
function inActiveButtonState(id){
var p=dispatcher.pointermap.get(id);
return p.buttons!==0;
}
if(n.msPointerEnabled){
s=function(pointerId){
assertActive(pointerId);
assertConnected(this);
if(inActiveButtonState(pointerId)){
dispatcher.setCapture(pointerId, this, true);
this.msSetPointerCapture(pointerId);
}};
r=function(pointerId){
assertActive(pointerId);
dispatcher.releaseCapture(pointerId, true);
this.msReleasePointerCapture(pointerId);
};}else{
s=function setPointerCapture(pointerId){
assertActive(pointerId);
assertConnected(this);
if(inActiveButtonState(pointerId)){
dispatcher.setCapture(pointerId, this);
}};
r=function releasePointerCapture(pointerId){
assertActive(pointerId);
dispatcher.releaseCapture(pointerId);
};}
h=function hasPointerCapture(pointerId){
return !!dispatcher.captureInfo[pointerId];
};
function applyPolyfill$1(){
if(window.Element&&!Element.prototype.setPointerCapture){
Object.defineProperties(Element.prototype, {
'setPointerCapture': {
value: s
},
'releasePointerCapture': {
value: r
},
'hasPointerCapture': {
value: h
}});
}}
applyAttributeStyles();
applyPolyfill();
applyPolyfill$1();
var pointerevents={
dispatcher: dispatcher,
Installer: Installer,
PointerEvent: PointerEvent,
PointerMap: PointerMap,
targetFinding: targeting
};
return pointerevents;
}));
(function(scope){
'use strict';
if(scope['TextEncoder']&&scope['TextDecoder']){
return false;
}
function FastTextEncoder(utfLabel='utf-8'){
if(utfLabel!=='utf-8'){
throw new RangeError(
`Failed to construct 'TextEncoder': The encoding label provided ('${utfLabel}') is invalid.`);
}}
Object.defineProperty(FastTextEncoder.prototype, 'encoding', {value: 'utf-8'});
FastTextEncoder.prototype.encode=function(string, options={stream: false}){
if(options.stream){
throw new Error(`Failed to encode: the 'stream' option is unsupported.`);
}
let pos=0;
const len=string.length;
const out=[];
let at=0;
let tlen=Math.max(32, len + (len >> 1) + 7);
let target=new Uint8Array((tlen >> 3) << 3);
while (pos < len){
let value=string.charCodeAt(pos++);
if(value >=0xd800&&value <=0xdbff){
if(pos < len){
const extra=string.charCodeAt(pos);
if((extra & 0xfc00)===0xdc00){
++pos;
value=((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;
}}
if(value >=0xd800&&value <=0xdbff){
continue;
}}
if(at + 4 > target.length){
tlen +=8;
tlen *=(1.0 + (pos / string.length) * 2);
tlen=(tlen >> 3) << 3;
const update=new Uint8Array(tlen);
update.set(target);
target=update;
}
if((value & 0xffffff80)===0){
target[at++]=value;
continue;
}else if((value & 0xfffff800)===0){
target[at++]=((value >>  6) & 0x1f) | 0xc0;
}else if((value & 0xffff0000)===0){
target[at++]=((value >> 12) & 0x0f) | 0xe0;
target[at++]=((value >>  6) & 0x3f) | 0x80;
}else if((value & 0xffe00000)===0){
target[at++]=((value >> 18) & 0x07) | 0xf0;
target[at++]=((value >> 12) & 0x3f) | 0x80;
target[at++]=((value >>  6) & 0x3f) | 0x80;
}else{
continue;
}
target[at++]=(value & 0x3f) | 0x80;
}
return target.slice(0, at);
}
function FastTextDecoder(utfLabel='utf-8', options={fatal: false}){
if(utfLabel!=='utf-8'){
throw new RangeError(
`Failed to construct 'TextDecoder': The encoding label provided ('${utfLabel}') is invalid.`);
}
if(options.fatal){
throw new Error(`Failed to construct 'TextDecoder': the 'fatal' option is unsupported.`);
}}
Object.defineProperty(FastTextDecoder.prototype, 'encoding', {value: 'utf-8'});
Object.defineProperty(FastTextDecoder.prototype, 'fatal', {value: false});
Object.defineProperty(FastTextDecoder.prototype, 'ignoreBOM', {value: false});
FastTextDecoder.prototype.decode=function(buffer, options={stream: false}){
if(options['stream']){
throw new Error(`Failed to decode: the 'stream' option is unsupported.`);
}
const bytes=new Uint8Array(buffer);
let pos=0;
const len=bytes.length;
const out=[];
while (pos < len){
const byte1=bytes[pos++];
if(byte1===0){
break;
}
if((byte1 & 0x80)===0){
out.push(byte1);
}else if((byte1 & 0xe0)===0xc0){
const byte2=bytes[pos++] & 0x3f;
out.push(((byte1 & 0x1f) << 6) | byte2);
}else if((byte1 & 0xf0)===0xe0){
const byte2=bytes[pos++] & 0x3f;
const byte3=bytes[pos++] & 0x3f;
out.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3);
}else if((byte1 & 0xf8)===0xf0){
const byte2=bytes[pos++] & 0x3f;
const byte3=bytes[pos++] & 0x3f;
const byte4=bytes[pos++] & 0x3f;
let codepoint=((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;
if(codepoint > 0xffff){
codepoint -=0x10000;
out.push((codepoint >>> 10) & 0x3ff | 0xd800)
codepoint=0xdc00 | codepoint & 0x3ff;
}
out.push(codepoint);
}else{
}}
return String.fromCharCode.apply(null, out);
}
scope['TextEncoder']=FastTextEncoder;
scope['TextDecoder']=FastTextDecoder;
}(typeof window!=='undefined' ? window:(typeof global!=='undefined' ? global:this)));
!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",PAGE_INSIGHTS:"insights",PAGE_PRO_FEATURES:"pro-features",MOBILE_RESOLUTION_THRESHOLD:1e3,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;case"wp-google-maps-menu-insights":return WPGMZA.PAGE_INSIGHTS;case"wp-google-maps-menu-pro-features":return WPGMZA.PAGE_PRO_FEATURES;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 nativeFunction="getCurrentPosition";if(WPGMZA.userLocationDenied)error&&error({code:1,message:"Location unavailable"});else if(watch&&(nativeFunction="watchPosition"),navigator.geolocation){let highPrecision=!0;var options={enableHighAccuracy:highPrecision=WPGMZA.settings&&WPGMZA.settings.userLocationPrecision&&"low"===WPGMZA.settings.userLocationPrecision?!1:highPrecision};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")}else 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 engine,pro=WPGMZA.isProVersion()?"Pro":"";switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":engine="OL";break;case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":engine="Leaflet";break;default:engine="Google"}if("OLFeature"!=(pro=WPGMZA[engine+pro+instanceName]&&engine+instanceName!="OLFeature"&&engine+instanceName!="LeafletFeature"&&engine+instanceName!="GoogleFeature"?engine+pro+instanceName:WPGMZA[pro+instanceName]?pro+instanceName:WPGMZA[engine+instanceName]&&WPGMZA[engine+instanceName].prototype?engine+instanceName:instanceName)&&"LeafletFeature"!=pro&&"GoogleFeature"!=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)},isGooglePlacesSearchSupported:function(){return!!window.google&&!!(google.maps&&google.maps.places&&google.maps.places.Place&&google.maps.places.Place.searchByText)},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,container,anchor){text=text||"",time=time?parseInt(time):3e3,container=container||"body";anchor=`<div class="wpgmza-popup-notification ${anchor="fixed"===(anchor=anchor||"fixed")&&"body"!==container?"top-right":anchor}">${text}</div>`;jQuery(container).append(anchor),0<time-300&&setTimeout(()=>{jQuery(container).find(".wpgmza-popup-notification").addClass("animate-end")},time-300),setTimeout(()=>{jQuery(container).find(".wpgmza-popup-notification").remove()},time)},initMaps:function(){$(document.body).find(".wpgmza_map:not(.wpgmza-initialized)").each(function(index,el){if(el.wpgmzaMap)return WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code?void 0:void console.warn("Element missing class wpgmza-initialized but does have wpgmzaMap property. No new instance will be created");try{el.wpgmzaMap=WPGMZA.Map.createInstance(el)}catch(ex){WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code||(el.wpgmzaMap=!1)}}),WPGMZA.Map.nextInitTimeoutID=setTimeout(WPGMZA.initMaps,2e3)},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.accessibility=WPGMZA.Accessibility.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.accessibility=WPGMZA.Accessibility.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.Accessibility=function(){this.bind(),$(document.body).trigger("init.accessibility.wpgmza")},WPGMZA.Accessibility.createInstance=function(){return new WPGMZA.Accessibility},WPGMZA.Accessibility.prototype.bind=function(){var event,ariaEventGroupings={keydown:{keys:["Enter"],prevent:[" "]},keyup:{keys:[" "]}};for(event in ariaEventGroupings){const config=ariaEventGroupings[event];$(document.body).on(event,".wpgmza_map .wpgmza-aria-bridge, .wpgmza-standalone-component .wpgmza-aria-bridge",function(event){event&&event.key&&(config.keys&&-1!==config.keys.indexOf(event.key)&&(event.preventDefault(),$(this).trigger("click")),config.prevent)&&-1!==config.prevent.indexOf(event.key)&&event.preventDefault()})}$(document.body).on("focusin",".wpgmza_map .grouping:not(.visible)",function(event){$(this).parent().find(".grouping-handle .icon").click()}),$(document.body).on("keyup",".wpgmza_map .grouping.visible",function(event){event&&event.key&&"Escape"===event.key&&$(this).parent().find(".grouping-handle .icon").click()})}}),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).wpgmzaAutocomplete=WPGMZA.Autocomplete.createInstance(this.element,this.options),this.autocompleteProvider=this.wpgmzaAutocomplete.getProvider()},WPGMZA.extend(WPGMZA.AddressInput,WPGMZA.EventDispatcher),WPGMZA.AddressInput.createInstance=function(element,map){return new WPGMZA.AddressInput(element,map)}}),jQuery(function($){WPGMZA.Autocomplete=function(element,options){WPGMZA.EventDispatcher.call(this),options=options||{},this.element=element,this.options=options,this.provider=!1,this.state={ready:!1,busy:!1,internal:!1,term:!1,items:[]},this.components={},this.canAutoload()&&this.autoload()},WPGMZA.extend(WPGMZA.Autocomplete,WPGMZA.EventDispatcher),WPGMZA.Autocomplete.Providers={GOOGLE_AUTOCOMPLETE:1,GOOGLE_PLACES:2,CLOUD_API:3,NOMINATIM:4,AZURE_MAPS:5,LOCATION_IQ:6},WPGMZA.Autocomplete.Intervals={KEYSTROKE:700,FOCUS:400},WPGMZA.Autocomplete.createInstance=function(element,options){let constructor,provider=!(!WPGMZA.settings||!WPGMZA.settings.address_provider)&&WPGMZA.settings.address_provider;if(provider){if("string"==typeof provider)switch(provider){case"google-maps":provider=WPGMZA.Autocomplete.Providers.GOOGLE_AUTOCOMPLETE;break;case"nominatim":provider=WPGMZA.Autocomplete.Providers.NOMINATIM;break;case"azure-maps":provider=WPGMZA.Autocomplete.Providers.AZURE_MAPS;break;case"location-iq":provider=WPGMZA.Autocomplete.Providers.LOCATION_IQ}}else{if(WPGMZA.settings&&WPGMZA.settings.engine)switch(WPGMZA.settings.engine){case"google-maps":provider=WPGMZA.Autocomplete.Providers.GOOGLE_AUTOCOMPLETE;break;case"open-layers":case"open-layers-latest":case"leaflet":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-zerocost":provider=WPGMZA.Autocomplete.Providers.NOMINATIM;break;case"leaflet-azure":provider=WPGMZA.Autocomplete.Providers.AZURE_MAPS;break;case"leaflet-locationiq":provider=WPGMZA.Autocomplete.Providers.LOCATION_IQ}WPGMZA.CloudAPI&&WPGMZA.CloudAPI.isBeingUsed&&(provider=WPGMZA.Autocomplete.Providers.CLOUD_API)}switch(provider){case WPGMZA.Autocomplete.Providers.GOOGLE_AUTOCOMPLETE:case WPGMZA.Autocomplete.Providers.GOOGLE_PLACES:constructor=WPGMZA.GoogleAutocomplete;break;case WPGMZA.Autocomplete.Providers.CLOUD_API:constructor=WPGMZA.CloudAutocomplete;break;case WPGMZA.Autocomplete.Providers.NOMINATIM:constructor=WPGMZA.NominatimAutocomplete;break;case WPGMZA.Autocomplete.Providers.AZURE_MAPS:constructor=WPGMZA.AzureAutocomplete;break;case WPGMZA.Autocomplete.Providers.LOCATION_IQ:constructor=WPGMZA.LocationIQAutocomplete;break;default:constructor=WPGMZA.Autocomplete}return new constructor(element,options)},WPGMZA.Autocomplete.prototype.canAutoload=function(){return!this.element||!this.element.id||"wpgmza_add_address_map_editor"!==this.element.id},WPGMZA.Autocomplete.prototype.autoload=function(){this.provider=this.getProvider()},WPGMZA.Autocomplete.prototype.prepare=function(){this.setInternal(!0),this.generate(),(this.element.wpgmzaAutocomplete=this).element.setAttribute("data-address-provider",this.getProviderSlug());let placeholder=!!this.options.placeholder&&this.placeholder;(placeholder=placeholder||this.element.getAttribute("placeholder")?placeholder:!(!WPGMZA.localized_strings||!WPGMZA.localized_strings.autocomplete_placeholder)&&WPGMZA.localized_strings.autocomplete_placeholder)&&this.element.setAttribute("placeholder",placeholder),this.element.setAttribute("autocomplete","off"),this.bind()},WPGMZA.Autocomplete.prototype.generate=function(){this.isInternal()&&(this.components.list=document.createElement("div"),this.components.list.classList.add("wpgmza-hidden"),this.components.list.classList.add("wpgmza-internal-autocomplete-list"),document.body.appendChild(this.components.list))},WPGMZA.Autocomplete.prototype.bind=function(){this.isInternal()&&(this.element.addEventListener("keyup",event=>{1<event.key.length&&"Backspace"!==event.key||(this.state.timer&&clearTimeout(this.state.timer),this.state.timer=setTimeout(()=>{this.element.value&&this.element.value.trim()!==this.state.term&&(this.setBusy(!0),this.find())},this.options.keystrokeInterval||WPGMZA.Autocomplete.Intervals.KEYSTROKE))}),this.element.addEventListener("focusout",event=>{setTimeout(()=>{document.activeElement!==this.element&&this.hide()},this.options.focusInterval||WPGMZA.Autocomplete.Intervals.FOCUS)}),this.element.addEventListener("focusin",event=>{this.show(),this.autoplace()}),this.element.addEventListener("click",event=>{this.show(),this.autoplace()}),document.addEventListener("scroll",event=>{this.hide()}))},WPGMZA.Autocomplete.prototype.find=function(){this.setTerm(this.element.value),this.getTerm()?(this.hide(),this.clear()):this.setBusy(!1)},WPGMZA.Autocomplete.prototype.present=function(){if(this.state.items&&this.state.items.length){let html="";for(var location of this.state.items){var dataAddress;if(location.address&&(dataAddress=location.address.replace(/<[^>]*>/g,""),html+=`<div class='wpgmza-internal-autocomplete-location' data-address='${dataAddress}' data-coordinates='${location.coordinates||""}'>`,location.display?html=(html+=`<strong data-autocomplete-field='display'>${location.display}</strong>`)+`<span data-autocomplete-field='adr'>${location.address}</span>`:html+=`<strong data-autocomplete-field='display'>${location.address}</strong>`,(location.type||location.country)&&(html+="<span data-autocomplete-meta-list>",location.type&&(html+=`<small data-autocomplete-field='type'>${location.type}</small>`),location.country&&(html+=`<small data-autocomplete-field='country'>${location.country}</small>`),html+="</span>"),html+="</div>"),html&&html.length){this.components.list.innerHTML=html,this.show(),this.autoplace();for(let item of this.components.list.querySelectorAll(".wpgmza-internal-autocomplete-location"))item.addEventListener("click",event=>{event.preventDefault();event=item.getAttribute("data-address");event&&(this.element.value=event),this.hide(),this.clear(),this.state.term=""})}}}else this.hide()},WPGMZA.Autocomplete.prototype.show=function(){this.isInternal()&&this.components&&this.components.list&&this.state.items&&this.state.items.length&&this.components.list.classList.remove("wpgmza-hidden")},WPGMZA.Autocomplete.prototype.hide=function(){this.isInternal()&&this.components&&this.components.list&&this.components.list.classList.add("wpgmza-hidden")},WPGMZA.Autocomplete.prototype.autoplace=function(){var boundingRect;this.isInternal()&&this.components&&this.components.list&&(boundingRect=this.element.getBoundingClientRect()).width&&(this.components.list.style.width=boundingRect.width+"px",this.components.list.style.left=boundingRect.left+"px",this.components.list.style.top=boundingRect.bottom+"px")},WPGMZA.Autocomplete.prototype.clear=function(){this.isInternal()&&(this.clearItems(),this.components.list.innerHtml="")},WPGMZA.Autocomplete.prototype.getTerm=function(){return!(!this.state.term||"string"!=typeof this.state.term||!this.state.term.length)&&this.state.term},WPGMZA.Autocomplete.prototype.setTerm=function(term){term&&term.trim()!==this.state.term&&(this.state.term=term.trim())},WPGMZA.Autocomplete.prototype.clearItems=function(){this.setItems([])},WPGMZA.Autocomplete.prototype.setItems=function(items){var remapped=[];if(items&&items instanceof Array)for(var item of items){item=this.remapItem(item);item&&remapped.push(item)}this.state.items=remapped},WPGMZA.Autocomplete.prototype.remapItem=function(item){return item},WPGMZA.Autocomplete.prototype.getProvider=function(){return!1},WPGMZA.Autocomplete.prototype.getProviderSlug=function(){let slug="generic";switch(this.getProvider()){case WPGMZA.Autocomplete.Providers.GOOGLE_AUTOCOMPLETE:slug="google-autocomplete";break;case WPGMZA.Autocomplete.Providers.GOOGLE_PLACES:slug="google-places-search";break;case WPGMZA.Autocomplete.Providers.CLOUD_API:slug="legacy-cloud";break;case WPGMZA.Autocomplete.Providers.GOOGLE_PLACES:slug="nominatim"}return slug},WPGMZA.Autocomplete.prototype.isInternal=function(){return this.state.internal},WPGMZA.Autocomplete.prototype.setInternal=function(internal){this.state.internal=internal},WPGMZA.Autocomplete.prototype.isReady=function(){return this.state.ready},WPGMZA.Autocomplete.prototype.setReady=function(ready){this.state.ready=ready},WPGMZA.Autocomplete.prototype.setBusy=function(busy){if(this.state.busy=busy,this.element){let target=this.element;var parentClass;if(target.parentNode&&target.parentNode.classList)for(parentClass of["wpgmza-address-container","wpgmza-marker-editor-address-field","wpgmza-directions-input-row"])target.parentNode.classList.contains(parentClass)&&(target=target.parentNode);target.setAttribute("data-autocomplete-state",busy?"busy":"")}}}),jQuery(function($){WPGMZA.BoundaryInput=function(element,options){this.element=$(element),this.dataAttributes=this.element.data(),this.bounds=!1,this.options={},this.parseOptions(options),this.state={initialized:!1},this.bind()},WPGMZA.extend(WPGMZA.BoundaryInput,WPGMZA.EventDispatcher),WPGMZA.BoundaryInput.COORD_PATTERN=/^-?\d+(?:\.\d+)?$/,WPGMZA.BoundaryInput.createInstance=function(element,options){return new WPGMZA.BoundaryInput(element,options)},WPGMZA.BoundaryInput.prototype.parseOptions=function(options){if(options)for(var i in options)this.options[i]=options[i];if(this.dataAttributes)for(var i in this.dataAttributes)this.options[i]=this.dataAttributes[i]},WPGMZA.BoundaryInput.prototype.bind=function(){this.element.find(".wpgmza-boundary-input-corner").each((index,component)=>{$(component).find(".wpgmza-boundary-component-input").on("input",event=>{event.preventDefault(),event.stopPropagation(),event.stopImmediatePropagation()}),$(component).find(".wpgmza-boundary-component-input").on("change",event=>{event.preventDefault(),event.stopPropagation(),event.stopImmediatePropagation(),this.commit()})})},WPGMZA.BoundaryInput.prototype.receive=function(southWest,northEast){var corner,coord,lat,lng,corners={southWest:southWest||!1,northEast:northEast||!1};for(corner in corners){let data=corners[corner];data&&("string"==typeof data&&(coord=data.split(","),data=!!(coord&&2<=coord.length&&([lat,lng]=coord,lat)&&lng)&&{lat:lat.trim(),lng:lng.trim()}),data)&&data instanceof Object&&data.lat&&data.lng&&(this.element.find(`.wpgmza-boundary-input-corner[data-corner="${corner}"] .wpgmza-boundary-component-input[data-boundary-component="lat"]`).val(data.lat),this.element.find(`.wpgmza-boundary-input-corner[data-corner="${corner}"] .wpgmza-boundary-component-input[data-boundary-component="lng"]`).val(data.lng),corners[corner]=data)}this.setBounds(corners)},WPGMZA.BoundaryInput.prototype.commit=function(){var corner,corners={southWest:{lat:!1,lng:!1},northEast:{lat:!1,lng:!1}};for(corner in corners)for(var coord in corners[corner])corners[corner][coord]=this.element.find(`.wpgmza-boundary-input-corner[data-corner="${corner}"] .wpgmza-boundary-component-input[data-boundary-component="${coord}"]`).val().trim();this.setBounds(corners),this.options.update&&"function"==typeof this.options.update&&this.getBounds()&&this.options.update(this.getBounds())},WPGMZA.BoundaryInput.prototype.reset=function(){this.element.find(".wpgmza-boundary-input-corner .wpgmza-boundary-component-input[data-boundary-component]").length&&this.element.find(".wpgmza-boundary-input-corner .wpgmza-boundary-component-input[data-boundary-component]").val("")},WPGMZA.BoundaryInput.prototype.getBounds=function(){return this.bounds||!1},WPGMZA.BoundaryInput.prototype.setBounds=function(corners){this.validateCorners(corners)?this.bounds=new WPGMZA.LatLngBounds(new WPGMZA.LatLng(corners.southWest),new WPGMZA.LatLng(corners.northEast)):this.bounds=!1},WPGMZA.BoundaryInput.prototype.validateCorners=function(corners){if(corners&&corners instanceof Object&&corners.southWest&&corners.northEast&&corners.northEast.lat&&corners.northEast.lng&&corners.southWest.lat&&corners.southWest.lng){var coord;for(coord of[corners.northEast.lat,corners.northEast.lng,corners.southWest.lat,corners.southWest.lng])if(!WPGMZA.BoundaryInput.COORD_PATTERN.test(""+coord))return!1;return!0}return!1}}),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:"%",max:500},contrast:{enable:!1,value:0,unit:"%",max:500},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:"%",max:500}},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'":data.max&&(controlAttributes="data-min='0' data-max='"+data.max+"'");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").trigger("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(){switch(WPGMZA.settings.engine){case"google-maps":return WPGMZA.GoogleDrawingManager;case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":return WPGMZA.LeafletDrawingManager;default:return WPGMZA.OLDrawingManager}},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();switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":this.layer&&this.layer.setStyle(WPGMZA.OLFeature.getOLStyle(props));break;case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":this.leafletFeature&&this.leafletFeature instanceof L.Path&&this.leafletFeature.setStyle(WPGMZA.LeafletFeature.getLeafletStyle(props));break;default:this.googleFeature instanceof google.maps.marker.AdvancedMarkerElement?this.setOptions(props):this.googleFeature.setOptions(WPGMZA.GoogleFeature.getGoogleStyle(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.Providers={GOOGLE_MAPS:1,NOMINATIM:2,OPEN_LAYERS:3,LEAFLET:4,AZURE_MAPS:5,LOCATION_IQ:6},WPGMZA.Geocoder.getConstructor=function(){let provider=!(!WPGMZA.settings||!WPGMZA.settings.address_provider)&&WPGMZA.settings.address_provider;if(provider){if("string"==typeof provider)switch(provider){case"google-maps":provider=WPGMZA.Geocoder.Providers.GOOGLE_MAPS;break;case"nominatim":if(provider=WPGMZA.Geocoder.Providers.NOMINATIM,WPGMZA.settings&&WPGMZA.settings.engine)switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":provider=WPGMZA.Geocoder.Providers.OPEN_LAYERS;break;case"leaflet":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-zerocost":provider=WPGMZA.Geocoder.Providers.LEAFLET}break;case"azure-maps":provider=WPGMZA.Geocoder.Providers.AZURE_MAPS;break;case"location-iq":provider=WPGMZA.Geocoder.Providers.LOCATION_IQ}}else if(WPGMZA.settings&&WPGMZA.settings.engine)switch(WPGMZA.settings.engine){case"google-maps":provider=WPGMZA.Geocoder.Providers.GOOGLE_MAPS;break;case"open-layers":case"open-layers-latest":provider=WPGMZA.Geocoder.Providers.OPEN_LAYERS;break;case"leaflet":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-zerocost":provider=WPGMZA.Geocoder.Providers.LEAFLET;break;case"leaflet-azure":provider=WPGMZA.Geocoder.Providers.AZURE_MAPS;break;case"leaflet-locationiq":provider=WPGMZA.Geocoder.Providers.LOCATION_IQ}switch(provider){case WPGMZA.Geocoder.Providers.NOMINATIM:return WPGMZA.NominatimGeocoder;case WPGMZA.Geocoder.Providers.OPEN_LAYERS:return WPGMZA.OLGeocoder;case WPGMZA.Geocoder.Providers.LEAFLET:return WPGMZA.LeafletGeocoder;case WPGMZA.Geocoder.Providers.AZURE_MAPS:return WPGMZA.AzureGeocoder;case WPGMZA.Geocoder.Providers.LOCATION_IQ:return WPGMZA.LocationIQGeocoder;default:WPGMZA.Geocoder.Providers.GOOGLE_MAPS;return WPGMZA.GoogleGeocoder}},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(){switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":return WPGMZA.isProVersion()?WPGMZA.OLProInfoWindow:WPGMZA.OLInfoWindow;case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":return WPGMZA.isProVersion()?WPGMZA.LeafletProInfoWindow:WPGMZA.LeafletInfoWindow;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProInfoWindow:WPGMZA.GoogleInfoWindow}},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(){var buttons;if("map-edit"==WPGMZA.currentPage&&this.feature instanceof WPGMZA.Marker)return buttons='<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>'," "+(buttons+=this.addDeleteButton());return""},WPGMZA.InfoWindow.prototype.addDeleteButton=function(){return"map-edit"==WPGMZA.currentPage&&this.feature instanceof WPGMZA.Marker?' <a title="Delete this marker" style="width:15px;" class="wpgmza_del_btn" data-delete-marker-id="'+this.feature.id+'"><i class="fa fa-trash"></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(){},WPGMZA.InfoWindow.prototype.getWrapperAttributes=function(){var attrs={type:"system",id:this.feature&&this.feature.id?this.feature.id:null,feature:null};return this.feature&&(this.feature instanceof WPGMZA.Marker?attrs.feature="marker":this.feature instanceof WPGMZA.Polyline?attrs.feature="polyline":this.feature instanceof WPGMZA.Polygon?attrs.feature="polygon":this.feature instanceof WPGMZA.Circle?attrs.feature="circle":this.feature instanceof WPGMZA.Rectangle&&(attrs.feature="rectangle")),attrs},WPGMZA.InfoWindow.prototype.compileWrapperAttributes=function(){var key,attrs=this.getWrapperAttributes(),compiled=[];for(key in attrs){var value=attrs[key];key&&value&&compiled.push(`data-prop-${key}="${value}"`)}return compiled&&0<compiled.length?compiled.join(" "):""},WPGMZA.InfoWindow.prototype.getStyleTypeClass=function(){return"wpgmza-infowindow-style-classic"}}),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.declineAssistedSkip=!1,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("keyup change",'input[name="azure_key"]',function(event){self.setApiKey($(this).val())}),$(this.element).on("keyup change",'input[name="stadia_key"]',function(event){self.setApiKey($(this).val())}),$(this.element).on("keyup change",'input[name="maptiler_key"]',function(event){self.setApiKey($(this).val())}),$(this.element).on("keyup change",'input[name="locationiq_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",".assisted-setup-button",function(event){self.assistedSetupIntent($(this))}),$(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"),$(document.body).trigger("tileserverpreview.update.wpgmza")},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||-1===["google-maps","leaflet-azure","leaflet-stadia","leaflet-maptiler","leaflet-locationiq"].indexOf(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:this.apiKey};$(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;var options;this.element.data("auto-onboarding-procedure")?this.autoOnboardingSkip():this.element.data("has-temp-api-key")||this.declineAssistedSkip?($(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"),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}})):this.assistedSkip()},WPGMZA.Installer.prototype.assistedSetupIntent=function(button){const self=this;switch(button.data("intent")){case"quick-setup":$(this.element).find(".step-assisted-prompt").addClass("wpgmza-hidden"),$(this.element).find(".step-assisted-permission").removeClass("wpgmza-hidden");break;case"full-setup":case"assisted-decline":this.declineAssistedSkip=!0,this.loadStep(this.step),this.skipButton.removeClass("wpgmza-hidden"),$(this.element).find(".step-assisted-skip").addClass("wpgmza-hidden"),$(this.element).find(".step-controller").removeClass("wpgmza-hidden");break;case"generate-key":$(this.element).find(".step-assisted-skip").addClass("wpgmza-hidden"),$(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_temp_api_key",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.assistedSkip=function(){$(this.element).find(".step").removeClass("active"),$(this.element).find(".step-controller").addClass("wpgmza-hidden"),$(this.element).find(".step-loader").addClass("wpgmza-hidden"),this.skipButton.addClass("wpgmza-hidden"),$(this.element).find(".step-assisted-skip").removeClass("wpgmza-hidden")},WPGMZA.Installer.prototype.autoOnboardingSkip=function(){const self=this;var procedure=this.element.data("auto-onboarding-procedure"),procedure=($(this.element).find(".step").removeClass("active"),$(this.element).find(".step-controller").addClass("wpgmza-hidden"),$(this.element).find(".step-loader").removeClass("wpgmza-hidden"),this.skipButton.addClass("wpgmza-hidden"),$(this.element).find(".step-loader .progress-finish").removeClass("wpgmza-hidden"),{action:"wpgmza_installer_page_auto_onboarding_procedure",procedure:procedure,nonce:this.element.attr("data-ajax-nonce")});$.ajax(WPGMZA.ajaxurl,{method:"POST",data:procedure,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 southWest,northEast,y=x;if(!(map instanceof WPGMZA.Map))throw new Error("First argument must be an instance of WPGMZA.Map");this.isInInitialState()||(3<=arguments.length&&(y=arg),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)}switch("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)),parseInt(this.type)){case 2:options.mapType="satellite";break;case 3:options.mapType="hybrid";break;case 4:options.mapType="terrain";break;default:options.mapType="roadmap"}return options},WPGMZA.MapSettings.prototype.toLeafletViewOptions=function(){var coords,self=this,options={center:L.latLng({lat:36.7783,lng:-119.4179}),zoom:4};function empty(name){return!("object"==typeof self[name]||self[name]&&("string"==typeof self[name]?self[name]:self[name].toString()).length)}function isSettingDisabled(value){return"yes"===value||!!value}switch("string"==typeof this.start_location&&(coords=this.start_location.replace(/^\(|\)$/g,"").split(","),WPGMZA.isLatLngString(this.start_location)?options.center=L.latLng({lat:parseFloat(coords[0]),lng:parseFloat(coords[1])}):console.warn("Invalid start location")),this.center&&(options.center=L.latLng({lat:this.center.lat,lng:this.center.lng})),empty("map_start_lat")||empty("map_start_lng")||(options.center=L.latLng({lat:this.map_start_lat,lng:this.map_start_lng})),this.zoom&&(options.zoom=parseInt(this.zoom)),this.start_zoom&&(options.zoom=parseInt(this.start_zoom)),!this.map_start_zoom&&0!=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)),this.customTileMode||((!options.minZoom||options.minZoom<3)&&(options.minZoom=3),options.zoom<options.minZoom&&(options.zoom=options.minZoom)),options.zoomControl=!isSettingDisabled(this.wpgmza_settings_map_zoom),options.dragging=!isSettingDisabled(this.wpgmza_settings_map_draggable),options.doubleClickZoom=!isSettingDisabled(this.wpgmza_settings_map_clickzoom),options.scrollWheelZoom=!isSettingDisabled(this.wpgmza_settings_map_scroll),options.closePopupOnClick=!!this.close_infowindow_on_map_click,parseInt(this.type)){case 2:options.mapType="satellite";break;case 3:options.mapType="hybrid";break;case 4:options.mapType="terrain";break;default:options.mapType="roadmap"}return 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.cameraControl=!isSettingDisabled(this.wpgmza_settings_map_camera_control),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 WPGMZA.settings&&WPGMZA.settings.googleMarkerMode&&WPGMZA.settings.googleMarkerMode===WPGMZA.GoogleMarker.MARKER_MODE_ADVANCED&&(options.mapId="wpgmza_map_"+this.id),this.wpgmza_theme_data&&this.wpgmza_theme_data.length&&WPGMZA.settings&&WPGMZA.settings.googleMarkerMode&&WPGMZA.settings.googleMarkerMode!==WPGMZA.GoogleMarker.MARKER_MODE_ADVANCED&&(options.styles=WPGMZA.GoogleMap.parseThemeData(this.wpgmza_theme_data)),options},WPGMZA.MapSettings.prototype.configureTileServer=function(url,options){if(url){var replacementKey,config={url:url,params:{},replacements:[],authentication:{name:"apikey",token:!1},options:{},type:"xyz"},url=WPGMZA.settings||{};if("custom_override"===config.url&&(url.tile_server_url_override&&""!==url.tile_server_url_override.trim()&&(config.url=url.tile_server_url_override.trim()),url.tile_server_key_field_name_override&&""!==url.tile_server_key_field_name_override.trim()&&(config.authentication.name=url.tile_server_key_field_name_override.trim()),url.tile_server_type_override)&&""!==url.tile_server_type_override.trim()&&(config.type=url.tile_server_type_override.trim()),options&&(options.authentication&&0<options.authentication.trim().length&&(config.authentication.token=options.authentication.trim()),options.preferServerGlobals?config.replacements.push({key:"{a-c}",value:"{s}"}):config.replacements.push({key:"{s}",value:"{a-c}"})),config.definition=!!(WPGMZA.tileServer&&WPGMZA.tileServer instanceof Object)&&WPGMZA.tileServer,options.map&&options.map.settings&&options.map.settings.tile_server_override&&options.map.settings.tile_server_override_config&&options.map.settings.tile_server_override_config.provider===config.definition.provider&&(config.definition=options.map.settings.tile_server_override_config,config.url=config.definition.url),config.definition){if(config.definition.multi)if(config.definition.layers&&config.definition.layers.length){let selectedLayerType="roadmap";options.map&&options.map.getMapType&&(selectedLayerType=options.map.getMapType());var layerIndex,layerLookup=[];let activeLayer=config.definition.layers[0]||!1;for(layerIndex in config.definition.layers){var layer=config.definition.layers[layerIndex];layer.selection_type===selectedLayerType&&(activeLayer=layer),layerLookup[layerIndex]=layer.selection_type}activeLayer&&activeLayer.config&&activeLayer.config instanceof Object?(config.definition=activeLayer.config,config.definition.url!==config.url&&(config.url=config.definition.url),this._multilayerTileserver={layers:layerLookup,active:selectedLayerType},config.layers=layerLookup):console.warn("📍 WP Go Maps: Could not identify default map layer")}else console.warn("📍 WP Go Maps: You are using a multi-layer tile server, but no layers were found. Please check your configuration.");if(config.definition.attribution){let attribution=config.definition.attribution;var replaceK,attrReplace={YEAR:(new Date).getFullYear()};for(replaceK in attrReplace)attribution=attribution.replace(`{{${replaceK}}}`,attrReplace[replaceK]);config.options.attributions=attribution,config.options.attribution=attribution}if(config.definition.key_field_name&&"custom"!==config.definition.slug&&(config.authentication.name=config.definition.key_field_name),config.definition.type&&config.definition.type!==config.type&&"custom"!==config.definition.slug&&(config.type=config.definition.type),config.definition.params)for(var paramName in config.definition.params)config.params[paramName]=config.definition.params[paramName]}if(config.definition.dependencies)for(var depIndex in config.dependencies=[],config.definition.dependencies){depIndex=config.definition.dependencies[depIndex];depIndex&&depIndex.provider&&config.definition.provider&&depIndex.provider===config.definition.provider&&config.dependencies.push({url:depIndex.url,params:depIndex.params||{}})}if(config.authentication.token&&(-1!==config.url.indexOf("{"+config.authentication.name+"}")?config.replacements.push({key:"{"+config.authentication.name+"}",value:config.authentication.token}):config.params[config.authentication.name]=config.authentication.token),-1!==config.url.indexOf("{alias:")&&(config.url=config.url.replace(/{alias:.*?}/,"")),config.dependencies)for(let depIndex in config.dependencies){let dependencyUrl=config.dependencies[depIndex].url;var dependencyParams=config.dependencies[depIndex].params,compiledDepParams=(-1!==(dependencyUrl=dependencyUrl.replace(/{alias:.*?}/,"")).indexOf("{"+config.authentication.name+"}")?dependencyUrl=dependencyUrl.replace("{"+config.authentication.name+"}",config.authentication.token):dependencyParams[config.authentication.name]=config.authentication.token,[]);for(let paramName in dependencyParams)compiledDepParams.push(paramName+"="+dependencyParams[paramName]);config.dependencies[depIndex].compiledParams=compiledDepParams.join("&"),config.dependencies[depIndex].compiledParams&&(dependencyUrl=dependencyUrl+"?"+config.dependencies[depIndex].compiledParams),config.dependencies[depIndex].url=dependencyUrl}config.compiledParams=[];for(let paramName in config.params)config.compiledParams.push(paramName+"="+config.params[paramName]);for(replacementKey in config.compiledParams=config.compiledParams.join("&"),config.compiledParams&&(config.url=config.url+"?"+config.compiledParams),config.replacements){var replacement=config.replacements[replacementKey];config.url=config.url.replace(replacement.key,replacement.value)}if(this.custom_tile_enabled){config.custom={width:1024,height:1024},this.custom_tile_image_width&&(config.custom.width=parseInt(this.custom_tile_image_width)),this.custom_tile_image_height&&(config.custom.height=parseInt(this.custom_tile_image_height)),config.custom.dimensions=null;try{window.devicePixelRatio&&1!=window.devicePixelRatio&&(config.custom.dimensions=[config.custom.width,config.custom.height])}catch(ex){}this.custom_tile_image&&(config.type="custom",config.url=this.custom_tile_image,this.custom_tile_image_attribution)&&(config.custom.attribution=this.custom_tile_image_attribution)}return config}return!1},WPGMZA.MapSettings.prototype.hasMutlilayerTileServer=function(){return this._multilayerTileserver||!1}}),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).engineElement=element,this.markers=[],this.polygons=[],this.polylines=[],this.circles=[],this.rectangles=[],this.pointlabels=[],WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code)$(element).find(".wpgmza-gdpr-compliance").length<=0&&($(element).append($(WPGMZA.api_consent_html)),$(element).css({height:"auto"}));else{if(this.loadSettings(options),this.loadStyling(),this.applyMobileOverrides(),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.element).addClass("wpgmza-initialized"),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(){switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":return WPGMZA.isProVersion()?WPGMZA.OLProMap:WPGMZA.OLMap;case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":return WPGMZA.isProVersion()?WPGMZA.LeafletProMap:WPGMZA.LeafletMap;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProMap:WPGMZA.GoogleMap}},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;if(WPGMZA.settings&&WPGMZA.settings.engine&&this.settings)if("open-layers"===WPGMZA.settings.engine||"open-layers-latest"===WPGMZA.settings.engine)this.settings.wpgmza_ol_tile_filter&&(tileFilter=this.settings.wpgmza_ol_tile_filter.trim())&&$(this.element).css("--wpgmza-ol-tile-filter",tileFilter);else if(("leaflet"===WPGMZA.settings.engine||"leaflet-azure"===WPGMZA.settings.engine||"leaflet-stadia"===WPGMZA.settings.engine||"leaflet-maptiler"===WPGMZA.settings.engine||"leaflet-locationiq"===WPGMZA.settings.engine||"leaflet-zerocost"===WPGMZA.settings.engine)&&this.settings.wpgmza_leaflet_tile_filter){let tileFilter=this.settings.wpgmza_leaflet_tile_filter.trim();tileFilter&&$(this.element).css("--wpgmza-leaflet-tile-filter",tileFilter)}}},WPGMZA.Map.prototype.applyMobileOverrides=function(){if($(window).width()<=WPGMZA.MOBILE_RESOLUTION_THRESHOLD){if(this.settings.zoom_level_mobile_override_enabled)try{var mobileZoomOverride=parseInt(this.settings.zoom_level_mobile_override);this.settings.map_start_zoom=mobileZoomOverride}catch(e){}if(this.settings.map_dimensions_mobile_override_enabled)try{this.settings.map_width=this.settings.map_mobile_width?parseInt(this.settings.map_mobile_width):this.settings.map_width,this.settings.map_width_type=this.settings.map_mobile_width_type||this.settings.map_width_type,this.settings.map_height=this.settings.map_mobile_height?parseInt(this.settings.map_mobile_height):this.settings.map_height,this.settings.map_height_type=this.settings.map_mobile_height_type||this.settings.map_height_type}catch(e){}}},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&&$(selectors[i]).attr("data-id")&&parseInt($(selectors[i]).attr("data-id"))===parseInt(this.id)&&(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.shouldBatchLoad=function(){return!(!WPGMZA.settings.fetchMarkersBatchSize||!WPGMZA.settings.enable_batch_loading)},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 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(),this.shouldBatchLoad()?this.fetchMarkersBatched(filter,0):(filter=this.getRESTParameters({filter:JSON.stringify(filter)}),this.fetchFeaturesXhr=WPGMZA.restAPI.call("/features/",{useCompressedPathVariable:!0,data:filter,success:function(result,status,xhr){self.onFeaturesFetched(result)}}))},WPGMZA.Map.prototype.fetchMarkersBatched=function(filter,offset){offset=offset||0;const limit=parseInt(WPGMZA.settings.fetchMarkersBatchSize),data=(filter.offset=offset,filter.limit=limit,this.getRESTParameters({filter:JSON.stringify(filter)}));this.fetchFeaturesXhr=WPGMZA.restAPI.call("/markers/",{useCompressedPathVariable:!0,data:data,success:(result,status,xhr)=>{result.length?(this.onMarkersFetched(result,!0),this.fetchMarkersBatched(filter,offset+limit)):(this.onMarkersFetched(result),data.exclude="markers",WPGMZA.restAPI.call("/features/",{useCompressedPathVariable:!0,data:data,success:(featureResult,featureStatus,featureXhr)=>{this.onFeaturesFetched(featureResult)}}))}})},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){},WPGMZA.Map.prototype.extendNativeConfig=function(config){return config},$(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(){switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":return WPGMZA.isProVersion()?WPGMZA.OLProMarker:WPGMZA.OLMarker;case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":return WPGMZA.isProVersion()?WPGMZA.LeafletProMarker:WPGMZA.LeafletMarker;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProMarker:WPGMZA.GoogleMarker}},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){switch(WPGMZA.settings.engine){case"google-maps":return new WPGMZA.GoogleModernStoreLocatorCircle(map,settings);case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":return new WPGMZA.LeafletModernStoreLocatorCircle(map,settings);default:return new 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.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){switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":return new WPGMZA.OLModernStoreLocator(map_id);default:return new WPGMZA.GoogleModernStoreLocator(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.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,noticeSlug;item.data("disabled")||(action=item.data("ajax-action"),noticeSlug=this.element.data("slug"),item.attr("data-disabled","true"),item.css("opacity","0.5"),action&&(item={action:"wpgmza_persisten_notice_quick_action",relay:action,slug:noticeSlug,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),this.on("mapchanged",this.updateNativeMap),this.on("mapchanged",this.updateNativeFeature)},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,this.textFeature&&this.trigger("mapchanged")}}),WPGMZA.Pointlabel.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":return WPGMZA.isProVersion()?WPGMZA.OLProPointlabel:WPGMZA.OLPointlabel;case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":return WPGMZA.isProVersion()?WPGMZA.LeafletProPointlabel:WPGMZA.LeafletPointlabel;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProPointlabel:WPGMZA.GooglePointlabel}},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)},WPGMZA.Pointlabel.prototype.updateNativeMap=function(){this.textFeature&&this.textFeature.setMap(this.map||null)}}),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(){switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":return WPGMZA.isProVersion()?WPGMZA.OLProPolygon:WPGMZA.OLPolygon;case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":return WPGMZA.isProVersion()?WPGMZA.LeafletProPolygon:WPGMZA.LeafletPolygon;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProPolygon:WPGMZA.GooglePolygon}},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||"string"==typeof this.opacity&&!this.opacity.length?.6:this.opacity},set:function(a){this.opacity=a}}),Object.defineProperty(WPGMZA.Polyline.prototype,"strokeWeight",{enumerable:!0,get:function(){return!this.linethickness||"string"==typeof this.linethickness&&!this.linethickness.length?1:parseInt(this.linethickness)},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(){switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":return WPGMZA.isProVersion()?WPGMZA.OLProPolyline:WPGMZA.OLPolyline;case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":return WPGMZA.isProVersion()?WPGMZA.LeafletProPolyline:WPGMZA.LeafletPolyline;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProPolyline:WPGMZA.GooglePolyline}},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($){WPGMZA.PresetSelectionInput=function(element,options){this.element=$(element),this.input=this.element.find("input"),this.bind()},WPGMZA.extend(WPGMZA.PresetSelectionInput,WPGMZA.EventDispatcher),WPGMZA.PresetSelectionInput.createInstance=function(element){return new WPGMZA.PresetSelectionInput(element)},WPGMZA.PresetSelectionInput.prototype.bind=function(){this.input.on("change",()=>{var val=this.input.val();this.element.find(".wpgmza-preset-input-controller-option").removeClass("selected"),this.element.find(`.wpgmza-preset-input-controller-option[data-value="${val}"]`).length&&this.element.find(`.wpgmza-preset-input-controller-option[data-value="${val}"]`).addClass("selected")}),this.element.on("click",".wpgmza-preset-input-controller-option",event=>{event.preventDefault(),this.input.val($(event.currentTarget).data("value")),this.input.trigger("change")}),this.input.trigger("change")},$(document.body).ready(function(){$(".wpgmza-preset-input-controller").each(function(index,el){el.wpgmzaPresetSelectionInput=WPGMZA.PresetSelectionInput.createInstance(el)})})}),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");"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";let ajaxurl=WPGMZA.ajaxurl;return WPGMZA.settings&&WPGMZA.settings.enable_anti_cache_requests&&(params.data.cachebust=Date.now(),"POST"===params.method)&&(ajaxurl+=(-1!==ajaxurl.indexOf("?")?"&":"?")+"cachebust="+params.data.cachebust),WPGMZA.restAPI.addNonce(route,params,WPGMZA.RestAPI.CONTEXT_AJAX),$.ajax(ajaxurl,params)}WPGMZA.RestAPI=function(){WPGMZA.RestAPI.URL=WPGMZA.resturl,this.useAJAXFallback=!1,this.enableAntiCache=!1,WPGMZA.settings&&WPGMZA.settings.force_ajax_only_mode&&(this.useAJAXFallback=!0),WPGMZA.settings&&WPGMZA.settings.enable_anti_cache_requests&&(this.enableAntiCache=!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=void 0===params?{}: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(/\?/,"&")),this.enableAntiCache&&-1===route.indexOf("cachebust")&&(route+=(-1!==route.indexOf("?")?"&":"?")+"cachebust="+Date.now()),WPGMZA.wpml_language&&-1===route.indexOf("lang=")&&(route+=(-1!==route.indexOf("?")?"&":"?")+"lang="+encodeURIComponent(WPGMZA.wpml_language)),$.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.updateMarkerRenderSpecificControls(),this.updateAddressProviderSpecificControls(),this.updateStorageControls(),this.updateBatchControls(),this.updateGDPRControls(),this.updateWooControls(),this.updateInsightsControls(),$(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="Are you sure?",destroyPacket=("wpgmza_destroy_all_data"==ttype&&(e="Are you sure? This will delete ALL data and settings for WP Go Maps!"),{action:"wpgmza_maps_settings_danger_zone_delete_data",type:ttype,nonce:wpgmza_dz_nonce});"wpgmza_destroy_by_map"==ttype&&(destroyPacket.map_id=$(".wpgmza-danger-zone-map-target-select select").val(),destroyPacket.data_type=$(".wpgmza-danger-zone-map-target-data-select").val(),e=`Are you sure? This will delete all ${destroyPacket.data_type} for map ID: `+destroyPacket.map_id),window.confirm(e)&&jQuery.ajax(WPGMZA.ajaxurl,{method:"POST",data:destroyPacket,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()}),$("input[name='wpgmza_maps_engine']").on("change",function(event){self.updateEngineSpecificControls()}),$("select[name='googleMarkerMode']").on("change",function(event){self.updateMarkerRenderSpecificControls()}),$("select[name='address_provider']").on("change",function(event){self.updateAddressProviderSpecificControls()}),$('[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()}),$('input[name="enable_insights"]').on("change",function(event){self.updateInsightsControls()}),$('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_key_field_name_override").removeClass("wpgmza-hidden"),$(".wpgmza_tile_server_type_override").removeClass("wpgmza-hidden")):($(".wpgmza_tile_server_override_component").addClass("wpgmza-hidden"),$(".wpgmza_tile_server_key_field_name_override").addClass("wpgmza-hidden"),$(".wpgmza_tile_server_type_override").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(event,ui){for(var i in self._codemirrors)self._codemirrors[i].refresh();$(document.body).trigger("tileserverpreview.update.wpgmza")}}),$("#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-system-health-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("/system-health-tools/",{method:"POST",data:event,success:function(data,status,xhr){button.removeAttr("disabled"),data&&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(){let engine=$("select[name='wpgmza_maps_engine']").val();$("select[name='wpgmza_maps_engine']").length<=0&&(engine=$('input[type="radio"][name="wpgmza_maps_engine"]:checked').val()),$("[data-required-maps-engine]").each((index,element)=>{let supported=(element=$(element)).data("required-maps-engine");supported&&(-1!==(supported=supported.split("|")).indexOf(engine)?element.show():element.hide())}),$(document.body).trigger("tileserverpreview.update.wpgmza"),this.updateMarkerRenderSpecificControls()},WPGMZA.SettingsPage.prototype.updateMarkerRenderSpecificControls=function(){let engine=$("select[name='wpgmza_maps_engine']").val(),renderMode=!1;"google-maps"===(engine=$("select[name='wpgmza_maps_engine']").length<=0?$('input[type="radio"][name="wpgmza_maps_engine"]:checked').val():engine)?renderMode=$("select[name='googleMarkerMode']").val():"open-layers"!==engine&&"open-layers-latest"!==engine||(renderMode=$("select[name='olMarkerMode']").val());const compileMode=engine+"."+renderMode;$("[data-required-marker-renderer]").each((index,element)=>{var target=(element=$(element)).data("required-marker-renderer");target&&(target===compileMode?element.show():element.hide())}),$(document.body).trigger("tileserverpreview.update.wpgmza")},WPGMZA.SettingsPage.prototype.updateAddressProviderSpecificControls=function(){let provider=$("select[name='address_provider']").val();$("[data-required-address-provider]").each((index,element)=>{let supported=(element=$(element)).data("required-address-provider");supported&&(-1!==(supported=supported.split("|")).indexOf(provider)?element.show():element.hide())}),$(document.body).trigger("addressprovider.update.wpgmza")},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.updateInsightsControls=function(){$("input[name='enable_insights']").prop("checked")?$(".wpgmza-insights-controls").show():$(".wpgmza-insights-controls").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($){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;switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":WPGMZA.isProVersion()?constructor=WPGMZA.OLProCircle:constructor=WPGMZA.OLCircle;break;case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":WPGMZA.isProVersion()?constructor=WPGMZA.LeafletProCircle:constructor=WPGMZA.LeafletCircle;break;default:WPGMZA.isProVersion()?constructor=WPGMZA.GoogleProCircle:constructor=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;switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":WPGMZA.isProVersion()?constructor=WPGMZA.OLProRectangle:constructor=WPGMZA.OLRectangle;break;case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":WPGMZA.isProVersion()?constructor=WPGMZA.LeafletProRectangle:constructor=WPGMZA.LeafletRectangle;break;default:WPGMZA.isProVersion()?constructor=WPGMZA.GoogleProRectangle:constructor=WPGMZA.GoogleRectangle}return new constructor(options,engineRectangle)}}),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()}),$(this.element).on("click",".grouping .grouping-toggle-fullscreen",function(event){$(".sidebar").toggleClass("as-fullscreen")}),$(".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))}),$("[data-quick-action-relay]").on("click",function(event){var trigger=$(this).data("quick-action-relay");trigger&&$('.quick-actions .icon[data-type="'+trigger+'"]').trigger("click")}),$(".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.initContextMenu(),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-quick-tip-container").hide())},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"),$(".sidebar").removeClass("as-fullscreen"),$(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")},WPGMZA.SidebarGroupings.prototype.initContextMenu=function(){WPGMZA.InternalEngine.isLegacy()||WPGMZA.settings&&WPGMZA.settings.mapEditorContextMenu&&"disabled"===WPGMZA.settings.mapEditorContextMenu||(this.contextMenu={element:$(this.element).find(".wpgmza-context-menu")},this.contextMenu.element.find(".wpgmza-context-menu-item").on("click",event=>{event=event.target||event.currentTarget||!1;if(event){event=$(event).data("group");this.openTabByGroupId(event);try{WPGMZA.mapEditPage&&"map-markers-editor"===event&&this.contextMenu.cachedEvent&&WPGMZA.mapEditPage.onRightClick(this.contextMenu.cachedEvent)}catch(ex){}}this.closeContextMenu()}),$(this.element).on("click",()=>{this.closeContextMenu()}))},WPGMZA.SidebarGroupings.prototype.isContextMenuReady=function(){return!(!this.contextMenu||!this.contextMenu.element)},WPGMZA.SidebarGroupings.prototype.canOpenContextMenu=function(){var activeGroup;return!!this.isContextMenuReady()&&-1===(activeGroup=this.getActiveGroup()).indexOf("-editor")&&!$(`.grouping[data-group="${activeGroup}"]`).find(".feature-list").length},WPGMZA.SidebarGroupings.prototype.isContextMenuOpen=function(){return!(!this.isContextMenuReady()||this.contextMenu.element.hasClass("wpgmza-hidden"))},WPGMZA.SidebarGroupings.prototype.openContextMenu=function(event){var map;if(this.canOpenContextMenu()&&(event&&event instanceof WPGMZA.Event&&event.latLng&&event.target&&event.target instanceof WPGMZA.Map))return(map={container:(map=event.target).element.getBoundingClientRect(),coordinates:map.latLngToPixels(event.latLng)}).context={left:map.container.x+map.coordinates.x,top:map.container.y+map.coordinates.y},map.context.left>$(window).width()-150&&(map.context.left-=150),map.context.top>$(window).height()-180&&(map.context.top-=180),this.contextMenu.element.css("top",map.context.top+"px"),this.contextMenu.element.css("left",map.context.left+"px"),this.contextMenu.coordinates=event.latLng,this.contextMenu.cachedEvent=event,this.contextMenu.element.removeClass("wpgmza-hidden"),!0;return!1},WPGMZA.SidebarGroupings.prototype.closeContextMenu=function(){this.isContextMenuReady()&&this.contextMenu.element.addClass("wpgmza-hidden")}}),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)}),self.map.settings.store_locator_name_string&&$(this.element).find("input.wpgmza-keywords").attr("placeholder",self.map.settings.store_locator_name_string)),$(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){if(status==WPGMZA.Geocoder.SUCCESS)callback(results,status);else{let error=WPGMZA.localized_strings.address_not_found;status==WPGMZA.Geocoder.FAIL&&"string"==typeof results&&(error=results),WPGMZA.InternalEngine.isLegacy()?alert(error):(self.showError(error),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){switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":return new WPGMZA.OLText(options);case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":return new WPGMZA.LeafletText(options);default:return new WPGMZA.GoogleText(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(){},WPGMZA.Text.prototype.setMap=function(map){}}),jQuery(function($){WPGMZA.ThemeEditor=function(){switch(WPGMZA.EventDispatcher.call(this),this.element=$("#wpgmza-theme-editor"),WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":return this.element.remove(),void(this.olThemeEditor=new WPGMZA.OLThemeEditor);case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":return this.element.remove(),void(this.leafletThemeEditor=new WPGMZA.LeafletThemeEditor)}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&&"open-layers-latest"!=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;switch(this.element=$("#wpgmza-theme-panel"),this.map=WPGMZA.maps[0],WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":return this.element.remove(),void(this.olThemePanel=new WPGMZA.OLThemePanel);case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":return this.element.remove(),void(this.leafletThemePanel=new WPGMZA.LeafletThemePanel)}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.notification("Theme preset applied!",!1,'.grouping.open[data-group="map-settings-themes-presets"]',"top-right"))},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.TileServerPreview=function(element,options){if(!(element instanceof HTMLSelectElement))throw new Error("Element is not an instance of HTMLSelectElement");this.element=$(element),this.server=!1,this.wrap(),this.bindEvents(),this.update()},WPGMZA.extend(WPGMZA.TileServerPreview,WPGMZA.EventDispatcher),WPGMZA.TileServerPreview.createInstance=function(element){return new WPGMZA.TileServerPreview(element)},WPGMZA.TileServerPreview.prototype.wrap=function(){this.element&&(this.container=$("<div class='wpgmza-tile-server-preview-container' />"),this.image=$("<img class='wpgmza-tile-server-preview-image' />"),this.container.append(this.image),this.element.parent().append(this.container),this.container.append(this.element))},WPGMZA.TileServerPreview.prototype.bindEvents=function(){this.element.on("change",event=>{event.target&&(this.server=event.target.value,this.update())}),$(document.body).on("tileserverpreview.update.wpgmza",()=>{this.update()}),this.element.trigger("change")},WPGMZA.TileServerPreview.prototype.update=function(){if(this.container.removeClass("preview-ready"),this.container.removeClass("preview-failed"),this.container.find(".wpgmza-tile-server-preview-wrapper-multi").remove(),!this.container.is(":hidden")){var definition=this.lookup(this.server);if(definition)if(definition.multi){if(definition.layers&&definition.layers.length)for(var i in this.setImage(this.getPreview(definition.layers[0]),this.image,definition),definition.layers)if(0!=i){var i=definition.layers[i],secondaryImageWrapper=$("<div class='wpgmza-tile-server-preview-wrapper-multi' />"),secondaryImage=$("<img class='wpgmza-tile-server-preview-image' />");if(i.dependencies)for(var dependency of i.dependencies){var dependencyImage=$("<img class='wpgmza-tile-server-preview-image as-dependency' />");secondaryImageWrapper.append(dependencyImage),this.setImage(this.getPreview(dependency),dependencyImage)}secondaryImageWrapper.append(secondaryImage),this.container.append(secondaryImageWrapper),this.setImage(this.getPreview(i),secondaryImage)}}else{if(definition.dependencies)for(let dependency of definition.dependencies){let dependencyImage=$("<img class='wpgmza-tile-server-preview-image as-dependency' />");this.setImage(this.getPreview(dependency),dependencyImage),this.container.prepend(dependencyImage)}this.setImage(this.getPreview(definition),this.image,definition)}else this.container.addClass("preview-failed")}},WPGMZA.TileServerPreview.prototype.lookup=function(server){return!!this.element.find(`option[value="${server}"]`)&&this.element.find(`option[value="${server}"]`).data("tile-server-preview-config")},WPGMZA.TileServerPreview.prototype.getPreview=function(data){if(data.url){let url=data.url;url=decodeURI(url);var paramName,replacementKey,authentication={},replacements=(data.key_required&&(authentication.name=data.key_field_name||"apikey",authentication.token=this.getToken()),[{key:"{z}",value:7},{key:"{x}",value:20},{key:"{y}",value:49},{key:"{s}",value:"a"},{key:"{a-c}",value:"a"}]),params=data.params||{};authentication&&authentication.name&&authentication.token&&(-1!==url.indexOf("{"+authentication.name+"}")?replacements.push({key:"{"+authentication.name+"}",value:authentication.token}):params[authentication.name]=authentication.token),-1!==url.indexOf("{alias:")&&(url=url.replace(/{alias:.*?}/,""));let compiledParams=[];for(paramName in params)compiledParams.push(paramName+"="+params[paramName]);for(replacementKey in(compiledParams=compiledParams.join("&"))&&(url=url+"?"+compiledParams),replacements){var replacement=replacements[replacementKey];url=url.replace(replacement.key,replacement.value)}return url}return!1},WPGMZA.TileServerPreview.prototype.setImage=function(url,imageElement,definition){if(this.container.removeAttr("data-failed-fallback"),url){const previewImage=new Image;previewImage.src=url,previewImage.addEventListener("load",()=>{imageElement.attr("src",previewImage.src),this.container.addClass("preview-ready")}),previewImage.addEventListener("error",()=>{var fallback;this.container.addClass("preview-failed"),definition&&definition instanceof Object&&definition.type&&"vector"===definition.type&&definition.label&&definition.provider&&(fallback=definition.provider+"-"+definition.label,this.container.attr("data-failed-fallback",fallback.toLowerCase().replaceAll(" ","-")))})}else this.container.addClass("preview-failed")},WPGMZA.TileServerPreview.prototype.getToken=function(){let engine=!!WPGMZA.settings&&WPGMZA.settings.engine;if(engine=$('[name="wpgmza_maps_engine"]:checked').length&&$('[name="wpgmza_maps_engine"]:checked').val()!==engine?$('[name="wpgmza_maps_engine"]:checked').val():engine){let tokenFieldName=!1,token=!1;switch(engine){case"open-layer":case"open-layer-latest":tokenFieldName="open_layers_api_key";break;case"leaflet":tokenFieldName="leaflet_api_key";break;case"leaflet-azure":tokenFieldName="wpgmza_leaflet_azure_key";break;case"leaflet-stadia":tokenFieldName="wpgmza_leaflet_stadia_key";break;case"leaflet-maptiler":tokenFieldName="wpgmza_leaflet_maptiler_key";break;case"leaflet-locationiq":tokenFieldName="wpgmza_leaflet_locationiq_key"}return WPGMZA.settings&&WPGMZA.settings[tokenFieldName]&&(token=WPGMZA.settings[tokenFieldName]),token=$('[name="'+tokenFieldName+'"]').length&&$('[name="'+tokenFieldName+'"]').val()!==token?$('[name="'+tokenFieldName+'"]').val():token}return!1},$(document.body).ready(function(){$("select.wpgmza-tile-server-preview").each(function(index,el){el.wpgmzaTileServerPreview=WPGMZA.TileServerPreview.createInstance(el)})})}),jQuery(function($){WPGMZA.TilesetPanel=function(){this.element=$("#wpgmza-tileset-panel"),this.element.length&&(this.element.on("click",".tileset-option",event=>{this.onTilesetChange(event),WPGMZA.notification("Save map to apply tileset!",!1,'.grouping.open[data-group="map-settings-themes-tileset"]',"top-right")}),this.onTilesetChange())},WPGMZA.TilesetPanel.prototype.onTilesetChange=function(event){this.element.find(".tileset-option").removeClass("selected"),this.element.find(".tileset-option input:checked").parent().addClass("selected")}}),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(){var ftuTag;WPGMZA.adminTours={},$(document.body).find(".wpgmza-tour").each(function(index,element){var type=$(element).data("type");WPGMZA.adminTours[type]=WPGMZA.Tour.createInstance(element)}),0<$(document.body).find("[data-wpgmza-ftu]").length&&(ftuTag=$(document.body).find("[data-wpgmza-ftu]").data("wpgmza-ftu"))&&"ftu.trigger.markercreator"===ftuTag&&$(document.body).on("markersplaced.wpgmza",()=>{$('.wpgmza-editor .item[data-group="map-markers-editor"]').click()})},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(parseInt(v1parts[i])!==parseInt(v2parts[i]))return parseInt(v1parts[i])>parseInt(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($){var Parent=WPGMZA.Autocomplete;WPGMZA.AzureAutocomplete=function(element,options){Parent.call(this,element,options)},WPGMZA.AzureAutocomplete.prototype=Object.create(Parent.prototype),WPGMZA.AzureAutocomplete.prototype.constructor=WPGMZA.AzureAutocomplete,WPGMZA.AzureAutocomplete.API_URL="https://atlas.microsoft.com/search/fuzzy/json",WPGMZA.AzureAutocomplete.prototype.autoload=function(){WPGMZA.Autocomplete.prototype.autoload.apply(this,arguments),this.getApiKey()&&(this.prepare(),this.setReady(!0))},WPGMZA.AzureAutocomplete.prototype.getApiKey=function(){let apikey=!1;return WPGMZA.settings&&(WPGMZA.settings.address_provider_api_key?apikey=WPGMZA.settings.address_provider_api_key:WPGMZA.settings.wpgmza_leaflet_azure_key&&(apikey=WPGMZA.settings.wpgmza_leaflet_azure_key)),apikey},WPGMZA.AzureAutocomplete.prototype.getProvider=function(){return WPGMZA.Autocomplete.Providers.AZURE_MAPS},WPGMZA.AzureAutocomplete.prototype.find=function(){WPGMZA.Autocomplete.prototype.find.apply(this,arguments);var apikey,term=this.getTerm();term&&(apikey=this.getApiKey())&&(this.setBusy(!0),term=new URLSearchParams({"api-version":"1.0",query:term.trim(),typeahead:"true","subscription-key":apikey}),this.options&&this.options.country&&term.append("countrySet",this.options.country.toUpperCase()),fetch(WPGMZA.AzureAutocomplete.API_URL+"?"+term.toString()).then(response=>response.ok?response.json():response.json().then(error=>{this.setBusy(!1)})).then(data=>{suggestions=(suggestions=data.results||[]).map(place=>{let type=place.entityType||!1;switch(type=type||place.type){case"Municipality":type="City";break;case"MunicipalitySubdivision":type="Borough";break;case"CountrySubdivision":type="State/Province";break;case"PointOfInterest":case"POI":type="Point of Interest";break;case"PostalCodeArea":type="Postal Code Area";break;case"PointAddress":type="Address"}let name=!1,address=(place.poi&&place.poi.name&&(name=place.poi.name),place.address.freeformAddress);if(!name&&"Geography"===place.type){var addressKey,addressCompiled=[];for(addressKey of["municipalitySubdivision","municipality","countrySubdivision","country"])place.address[addressKey]&&addressCompiled.push(place.address[addressKey]);addressCompiled&&addressCompiled.length&&(name=address,address=addressCompiled.join(", "))}return{name:name,address:address,id:place.id,coordinates:place.position,country:place.address.country||!1,entityType:type}}),this.setItems(suggestions),this.setBusy(!1),this.present()}).catch(error=>{this.setBusy(!1)}))},WPGMZA.AzureAutocomplete.prototype.remapItem=function(item){return{display:item.name||!1,address:item.address||!1,country:item.country||!1,type:item.entityType?WPGMZA.capitalizeWords(item.entityType.replaceAll("_"," ")):"Location",coordinates:!!item.coordinates&&item.coordinates.lat+", "+item.coordinates.lon}}}),jQuery(function($){WPGMZA.AzureGeocoder=function(){},WPGMZA.AzureGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.AzureGeocoder.prototype.constructor=WPGMZA.AzureGeocoder,WPGMZA.AzureGeocoder.API_URL="https://atlas.microsoft.com/search/address/",WPGMZA.AzureGeocoder.Modes={ADDRESS:1,LATLNG:2},WPGMZA.AzureGeocoder.prototype.getApiKey=function(){let apikey=!1;return WPGMZA.settings&&(WPGMZA.settings.address_provider_api_key?apikey=WPGMZA.settings.address_provider_api_key:WPGMZA.settings.wpgmza_leaflet_azure_key&&(apikey=WPGMZA.settings.wpgmza_leaflet_azure_key)),apikey},WPGMZA.AzureGeocoder.prototype.getLatLngFromAddress=function(options,callback){return WPGMZA.AzureGeocoder.prototype.geocode(options,callback)},WPGMZA.AzureGeocoder.prototype.getAddressFromLatLng=function(options,callback){return WPGMZA.AzureGeocoder.prototype.geocode(options,callback)},WPGMZA.AzureGeocoder.prototype.geocode=function(options,callback){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{options.location&&(options.latLng=new WPGMZA.LatLng(options.location));let location=!1,mode=!1;if(options.address)location=options.address,mode=WPGMZA.AzureGeocoder.Modes.ADDRESS;else{if(!options.latLng)throw new Error("You must supply either a latLng or address");options.latLng instanceof WPGMZA.LatLng||(options.latLng=new WPGMZA.LatLng(options.latLng)),location=options.latLng.toString().replaceAll(" ",""),mode=WPGMZA.AzureGeocoder.Modes.LATLNG}var latLng=this.getApiKey();mode&&(latLng=new URLSearchParams({"api-version":"1.0",query:location.trim(),"subscription-key":latLng}),latLng=WPGMZA.AzureGeocoder.API_URL+(mode===WPGMZA.AzureGeocoder.Modes.ADDRESS?"json":"reverse/json")+"?"+latLng.toString(),fetch(latLng).then(response=>response.ok?response.json():response.json().then(error=>{})).then(data=>{let locations=data.results||!1;var formatted=[];if((locations=(locations=!locations&&data.addresses?data.addresses:locations)||[]).length){for(var result of locations)mode===WPGMZA.AzureGeocoder.Modes.ADDRESS?formatted.push({geometry:{location:new WPGMZA.LatLng({lat:parseFloat(result.position.lat),lng:parseFloat(result.position.lon)})},latLng:{lat:parseFloat(result.position.lat),lng:parseFloat(result.position.lon)},bounds:new WPGMZA.LatLngBounds(new WPGMZA.LatLng({lat:(result.boundingBox&&result.boundingBox.topLeftPoint&&result.boundingBox.topLeftPoint.lat?result.boundingBox:result.viewport).topLeftPoint.lat,lng:(result.boundingBox&&result.boundingBox.topLeftPoint&&result.boundingBox.topLeftPoint.lon?result.boundingBox:result.viewport).topLeftPoint.lon}),new WPGMZA.LatLng({lat:(result.boundingBox&&result.boundingBox.btmRightPoint&&result.boundingBox.btmRightPoint.lat?result.boundingBox:result.viewport).btmRightPoint.lat,lng:(result.boundingBox&&result.boundingBox.btmRightPoint&&result.boundingBox.btmRightPoint.lon?result.boundingBox:result.viewport).btmRightPoint.lon})),lat:result.position.lat,lng:result.position.lon}):mode===WPGMZA.AzureGeocoder.Modes.LATLNG&&(options.fullResult?formatted.push(result):formatted.push(result.address.freeformAddress));0<formatted.length?callback(formatted,WPGMZA.Geocoder.SUCCESS):callback([],WPGMZA.Geocoder.ZERO_RESULTS)}else callback([],WPGMZA.Geocoder.ZERO_RESULTS)}).catch(error=>{callback(null,WPGMZA.Geocoder.FAIL)}))}}}),jQuery(function($){$(document).ready(function(event){var parent=!(!document.body||!document.body.onclick)&&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($){var Parent=WPGMZA.Autocomplete;WPGMZA.GoogleAutocomplete=function(element,options){Parent.call(this,element,options)},WPGMZA.GoogleAutocomplete.prototype=Object.create(Parent.prototype),WPGMZA.GoogleAutocomplete.prototype.constructor=WPGMZA.GoogleAutocomplete,WPGMZA.GoogleAutocomplete.DIRECT_REQUEST_URL="https://places.googleapis.com/v1/places:autocomplete",WPGMZA.GoogleAutocomplete.prototype.autoload=function(){var provider;WPGMZA.Autocomplete.prototype.autoload.apply(this,arguments),this.getApiKey()&&((provider=this.getProvider())===WPGMZA.Autocomplete.Providers.GOOGLE_PLACES?(this.prepare(),this.setReady(!0)):provider===WPGMZA.Autocomplete.Providers.GOOGLE_AUTOCOMPLETE&&(this.element.googleAutoComplete=new google.maps.places.Autocomplete(this.element,this.options),this.options.country&&this.element.googleAutoComplete.setComponentRestrictions({country:this.options.country}),this.setReady(!0)))},WPGMZA.GoogleAutocomplete.prototype.getApiKey=function(){let apikey=!1;return WPGMZA.settings&&(WPGMZA.settings.address_provider_api_key?apikey=WPGMZA.settings.address_provider_api_key:WPGMZA.settings.googleMapsApiKey?apikey=WPGMZA.settings.googleMapsApiKey:WPGMZA.settings.wpgmza_google_maps_api_key&&(apikey=WPGMZA.settings.wpgmza_google_maps_api_key)),apikey},WPGMZA.GoogleAutocomplete.prototype.getProvider=function(){return!WPGMZA.isGooglePlacesSearchSupported()&&WPGMZA.isGoogleAutocompleteSupported()?WPGMZA.Autocomplete.Providers.GOOGLE_AUTOCOMPLETE:WPGMZA.Autocomplete.Providers.GOOGLE_PLACES},WPGMZA.GoogleAutocomplete.prototype.find=function(){if(WPGMZA.Autocomplete.prototype.find.apply(this,arguments),this.getProvider()===WPGMZA.Autocomplete.Providers.GOOGLE_PLACES){var body,term=this.getTerm();if(term){const config=this.getPlacesConfig(term);this.options&&this.options.country&&(config.region=this.options.country),this.setBusy(!0),this.isPlacesAvailable()?google.maps.places.Place.searchByText(config).then(locations=>{locations&&locations.places&&(this.setItems(locations.places),this.setBusy(!1),this.present())}):(term=this.getApiKey())?(body={input:config.textQuery},config.region&&(body.includedRegionCodes=[config.region]),fetch(WPGMZA.GoogleAutocomplete.DIRECT_REQUEST_URL,{method:"POST",headers:{"Content-Type":"application/json","X-Goog-Api-Key":term},body:JSON.stringify(body)}).then(response=>response.ok?response.json():response.json().then(error=>{this.setBusy(!1)})).then(data=>{suggestions=(suggestions=(suggestions=data.suggestions||[]).slice(0,config.maxResultCount)).map(place=>({displayName:place.placePrediction.structuredFormat.mainText.text,adrFormatAddress:place.placePrediction.text.text,placeId:place.placePrediction.placeId,primaryTypeDisplayName:!!place.placePrediction.types&&place.placePrediction.types.shift()})),this.setItems(suggestions),this.setBusy(!1),this.present()}).catch(error=>{this.setBusy(!1)})):this.setBusy(!1)}}},WPGMZA.GoogleAutocomplete.prototype.isPlacesAvailable=function(){return"undefined"!=typeof google&&void 0!==google.maps&&void 0!==google.maps.places},WPGMZA.GoogleAutocomplete.prototype.getPlacesConfig=function(term){return{textQuery:term.trim(),fields:["displayName","adrFormatAddress","primaryTypeDisplayName"],maxResultCount:8}},WPGMZA.GoogleAutocomplete.prototype.remapItem=function(item){return{display:item.displayName||!1,address:item.adrFormatAddress||!1,type:item.primaryTypeDisplayName?WPGMZA.capitalizeWords(item.primaryTypeDisplayName.replaceAll("_"," ")):"Location"}}}),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"})}),google.maps.event.addListener(this.googleCircle,"rightclick",function(event){var wpgmzaEvent;void 0!==self.map&&self.map instanceof WPGMZA.Map&&((wpgmzaEvent=new WPGMZA.Event("rightclick")).latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.map.dispatchEvent(wpgmzaEvent))})},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($){WPGMZA.GoogleDrawingManager=function(map){WPGMZA.DrawingManager.call(this,map),this.mode=null,this.mapListeners=[],this.previewShapes=[],this.vertexMarkers=[],this.vertices=[],this.dragging=!1,this.dragStart=null},WPGMZA.GoogleDrawingManager.prototype=Object.create(WPGMZA.DrawingManager.prototype),WPGMZA.GoogleDrawingManager.prototype.constructor=WPGMZA.GoogleDrawingManager,WPGMZA.GoogleDrawingManager.prototype.addMapListener=function(target,eventName,handler){target=google.maps.event.addListener(target,eventName,handler);return this.mapListeners.push(target),target},WPGMZA.GoogleDrawingManager.prototype.clearMapListeners=function(){this.mapListeners.forEach(function(l){google.maps.event.removeListener(l)}),this.mapListeners=[]},WPGMZA.GoogleDrawingManager.prototype.clearPreview=function(){this.previewShapes.forEach(function(shape){shape.setMap(null)}),this.previewShapes=[],this.vertexMarkers.forEach(function(marker){marker.setMap(null)}),this.vertexMarkers=[],this.vertices=[],this.dragging=!1,this.dragStart=null},WPGMZA.GoogleDrawingManager.prototype.setCrosshairCursor=function(){this.map.googleMap.setOptions({draggableCursor:"crosshair",clickableIcons:!1})},WPGMZA.GoogleDrawingManager.prototype.getLatLngMidpoint=function(a,b){return new google.maps.LatLng((a.lat()+b.lat())/2,(a.lng()+b.lng())/2)},WPGMZA.GoogleDrawingManager.prototype.placeVertexMarker=function(position,iconOptions,clickHandler){position=new google.maps.Marker({position:position,map:this.map.googleMap,clickable:!!clickHandler,cursor:clickHandler?"pointer":"crosshair",zIndex:iconOptions.zIndex||1e3,icon:{path:google.maps.SymbolPath.CIRCLE,scale:iconOptions.scale,fillColor:iconOptions.fillColor,fillOpacity:1,strokeColor:"#0494f4",strokeWeight:void 0!==iconOptions.strokeWeight?iconOptions.strokeWeight:2}});return clickHandler&&google.maps.event.addListener(position,"click",clickHandler),this.vertexMarkers.push(position),position},WPGMZA.GoogleDrawingManager.prototype.rebuildVertexHandles=function(firstClickHandler,lastClickHandler){this.vertexMarkers.forEach(function(m){m.setMap(null)}),this.vertexMarkers=[];for(var vertices=this.vertices,n=vertices.length,i=0;i<n;i++){var isFirst=0===i,isLast=i===n-1,icon={scale:4,fillColor:"#FFFFFF",strokeWeight:3,zIndex:1e3},handler=null;isFirst&&firstClickHandler&&3<=n?(icon.scale=6,icon.fillColor="#0494f4",handler=firstClickHandler):isLast&&!isFirst&&lastClickHandler&&2<=n&&(icon.scale=6,icon.fillColor="#0369a1",handler=lastClickHandler),this.placeVertexMarker(vertices[i],icon,handler),i<n-1&&this.placeVertexMarker(this.getLatLngMidpoint(vertices[i],vertices[i+1]),{scale:3,fillColor:"#FFFFFF",strokeWeight:2,zIndex:999},null)}},WPGMZA.GoogleDrawingManager.prototype.setDrawingMode=function(mode){switch(WPGMZA.DrawingManager.prototype.setDrawingMode.call(this,mode),this.clearMapListeners(),this.clearPreview(),this.map.googleMap.setOptions({draggableCursor:null,draggable:!0,disableDoubleClickZoom:!1,clickableIcons:!0}),mode){case WPGMZA.DrawingManager.MODE_NONE:case WPGMZA.DrawingManager.MODE_MARKER:case WPGMZA.DrawingManager.MODE_HEATMAP:case WPGMZA.DrawingManager.MODE_POINTLABEL:break;case WPGMZA.DrawingManager.MODE_POLYGON:this.enablePolygonDrawing();break;case WPGMZA.DrawingManager.MODE_POLYLINE:this.enablePolylineDrawing();break;case WPGMZA.DrawingManager.MODE_CIRCLE:this.enableCircleDrawing();break;case WPGMZA.DrawingManager.MODE_RECTANGLE:case WPGMZA.DrawingManager.MODE_IMAGEOVERLAY:this.enableRectangleDrawing();break;default:throw new Error("Invalid drawing mode")}},WPGMZA.GoogleDrawingManager.prototype.enablePolygonDrawing=function(){function completePolygon(){var polygon;self.vertices.length<3||(polygon=new google.maps.Polygon({paths:self.vertices.slice(),editable:!0}),self.clearMapListeners(),self.clearPreview(),googleMap.setOptions({draggableCursor:null,disableDoubleClickZoom:!1,clickableIcons:!0}),self.onPolygonClosed(polygon))}var self=this,googleMap=this.map.googleMap,previewLine=(this.setCrosshairCursor(),googleMap.setOptions({disableDoubleClickZoom:!0}),new google.maps.Polyline({map:googleMap,path:[],strokeColor:"#0494f4",strokeWeight:3,strokeOpacity:.8,clickable:!1})),ghostLine=(this.previewShapes.push(previewLine),new google.maps.Polyline({map:googleMap,path:[],strokeColor:"#0494f4",strokeWeight:3,strokeOpacity:.4,clickable:!1}));this.previewShapes.push(ghostLine);this.addMapListener(googleMap,"click",function(event){self.vertices.push(event.latLng),previewLine.setPath(self.vertices.slice()),self.rebuildVertexHandles(completePolygon,null)}),this.addMapListener(googleMap,"mousemove",function(event){0<self.vertices.length&&ghostLine.setPath([self.vertices[self.vertices.length-1],event.latLng])}),this.addMapListener(googleMap,"dblclick",function(){1<self.vertices.length&&self.vertices.pop(),completePolygon()})},WPGMZA.GoogleDrawingManager.prototype.enablePolylineDrawing=function(){function completePolyline(){var polyline;self.vertices.length<2||(polyline=new google.maps.Polyline({path:self.vertices.slice(),editable:!0}),self.clearMapListeners(),self.clearPreview(),googleMap.setOptions({draggableCursor:null,disableDoubleClickZoom:!1,clickableIcons:!0}),self.onPolylineComplete(polyline))}var self=this,googleMap=this.map.googleMap,previewLine=(this.setCrosshairCursor(),googleMap.setOptions({disableDoubleClickZoom:!0}),new google.maps.Polyline({map:googleMap,path:[],strokeColor:"#0494f4",strokeWeight:3,strokeOpacity:.8,clickable:!1})),ghostLine=(this.previewShapes.push(previewLine),new google.maps.Polyline({map:googleMap,path:[],strokeColor:"#0494f4",strokeWeight:3,strokeOpacity:.4,clickable:!1}));this.previewShapes.push(ghostLine);this.addMapListener(googleMap,"click",function(event){self.vertices.push(event.latLng),previewLine.setPath(self.vertices.slice()),self.rebuildVertexHandles(null,completePolyline)}),this.addMapListener(googleMap,"mousemove",function(event){0<self.vertices.length&&ghostLine.setPath([self.vertices[self.vertices.length-1],event.latLng])}),this.addMapListener(googleMap,"dblclick",function(){1<self.vertices.length&&self.vertices.pop(),completePolyline()})},WPGMZA.GoogleDrawingManager.prototype.enableCircleDrawing=function(){var self=this,googleMap=this.map.googleMap,previewCircle=(this.setCrosshairCursor(),new google.maps.Circle({map:googleMap,center:{lat:0,lng:0},radius:1,strokeColor:"#0494f4",strokeWeight:2,strokeOpacity:.8,fillColor:"#FFFFFF",fillOpacity:.3,clickable:!1,visible:!1}));this.previewShapes.push(previewCircle),this.addMapListener(googleMap,"mousedown",function(event){self.dragging=!0,self.dragStart=event.latLng,previewCircle.setCenter(event.latLng),previewCircle.setRadius(1),previewCircle.setVisible(!0),googleMap.setOptions({draggable:!1})}),this.addMapListener(googleMap,"mousemove",function(event){self.dragging&&self.dragStart&&(event=google.maps.geometry.spherical.computeDistanceBetween(self.dragStart,event.latLng),previewCircle.setRadius(Math.max(event,1)))}),this.addMapListener(googleMap,"mouseup",function(event){self.dragging&&self.dragStart&&(self.dragging=!1,(event=google.maps.geometry.spherical.computeDistanceBetween(self.dragStart,event.latLng))<10?(previewCircle.setVisible(!1),googleMap.setOptions({draggable:!0})):(event=new google.maps.Circle({center:self.dragStart,radius:event,editable:!0,draggable:!0}),self.clearMapListeners(),self.clearPreview(),googleMap.setOptions({draggable:!0,draggableCursor:null}),self.onCircleComplete(event)))})},WPGMZA.GoogleDrawingManager.prototype.enableRectangleDrawing=function(){var self=this,googleMap=this.map.googleMap,previewRect=(this.setCrosshairCursor(),new google.maps.Rectangle({map:googleMap,bounds:{north:0,south:0,east:0,west:0},strokeColor:"#0494f4",strokeWeight:1,strokeOpacity:.8,fillColor:"#FFFFFF",fillOpacity:0,clickable:!1,visible:!1}));this.previewShapes.push(previewRect),this.addMapListener(googleMap,"mousedown",function(event){self.dragging=!0,self.dragStart=event.latLng,previewRect.setVisible(!0),googleMap.setOptions({draggable:!1})}),this.addMapListener(googleMap,"mousemove",function(event){self.dragging&&self.dragStart&&previewRect.setBounds({north:Math.max(self.dragStart.lat(),event.latLng.lat()),south:Math.min(self.dragStart.lat(),event.latLng.lat()),east:Math.max(self.dragStart.lng(),event.latLng.lng()),west:Math.min(self.dragStart.lng(),event.latLng.lng())})}),this.addMapListener(googleMap,"mouseup",function(event){self.dragging&&self.dragStart&&(self.dragging=!1,event={north:Math.max(self.dragStart.lat(),event.latLng.lat()),south:Math.min(self.dragStart.lat(),event.latLng.lat()),east:Math.max(self.dragStart.lng(),event.latLng.lng()),west:Math.min(self.dragStart.lng(),event.latLng.lng())},Math.abs(event.north-event.south)<1e-4||Math.abs(event.east-event.west)<1e-4?(previewRect.setVisible(!1),googleMap.setOptions({draggable:!0})):(event=new google.maps.Rectangle({bounds:event,draggable:!0,editable:!0,strokeWeight:1,fillOpacity:0}),self.clearMapListeners(),self.clearPreview(),googleMap.setOptions({draggable:!0,draggableCursor:null}),self.onRectangleComplete(event)))})},WPGMZA.GoogleDrawingManager.prototype.setOptions=function(){},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.GoogleFeature=function(options){WPGMZA.assertInstangeOf(this,"GoogleFeature"),WPGMZA.Feature.apply(this,arguments)},WPGMZA.extend(WPGMZA.GoogleFeature,WPGMZA.Feature),WPGMZA.GoogleFeature.getGoogleStyle=function(options){var dashArray,dashGap,lineSymbol;return options.lineDashArray&&1<(dashArray=options.lineDashArray.split(" ")).length&&([dashArray,dashGap]=dashArray,dashArray=parseInt(dashArray),dashGap=parseInt(dashGap),lineSymbol={path:"M 0,-1 L 0,1",strokeOpacity:parseFloat(options.strokeOpacity),strokeWeight:options.strokeWeight,strokeColor:options.strokeColor,scale:dashArray?dashArray/2:.5},options.icons=[{icon:lineSymbol,offset:"0%",repeat:dashArray+dashGap+"px"}],options.strokeOpacity=0),options}}),jQuery(function($){WPGMZA.GoogleGeocoder=function(){},WPGMZA.GoogleGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.GoogleGeocoder.prototype.constructor=WPGMZA.GoogleGeocoder,WPGMZA.GoogleGeocoder.DIRECT_REQUEST_URL="https://maps.googleapis.com/maps/api/geocode/json",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}),this.isGoogleAvailable()?(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))}):this.fetchGeocode(options,callback)}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);if(this.isGoogleAvailable()){var 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)})}else this.fetchGeocode(options,callback)},WPGMZA.GoogleGeocoder.prototype.fetchGeocode=function(options,callback){var apikey=this.getApiKey();if(apikey){let params={key:apikey};options.address?params.address=options.address:options.latLng&&(apikey=new WPGMZA.LatLng(options.latLng),params.latlng=apikey.lat+","+apikey.lng),params=new URLSearchParams(params),options.country&&params.append("region",options.country.toLowerCase());apikey=WPGMZA.GoogleGeocoder.DIRECT_REQUEST_URL+"?"+params.toString();fetch(apikey).then(response=>response.ok?response.json():response.json().then(errorData=>{})).then(data=>{var results=data.results||[];"OK"===data.status&&0<results.length?(data=results.shift(),options.address?(results={lat:data.geometry.location.lat,lng:data.geometry.location.lng},data.geometry&&data.geometry.viewport&&data.geometry.viewport.northeast&&data.geometry.viewport.southwest&&(bounds=new WPGMZA.LatLngBounds(new WPGMZA.LatLng({lat:data.geometry.viewport.northeast.lat,lng:data.geometry.viewport.northeast.lng}),new WPGMZA.LatLng({lat:data.geometry.viewport.southwest.lat,lng:data.geometry.viewport.southwest.lng}))),results=[{geometry:{location:results},latLng:results,lat:results.lat,lng:results.lng,bounds:bounds}],callback(results,WPGMZA.Geocoder.SUCCESS)):options.fullResult?callback([data],WPGMZA.Geocoder.SUCCESS):callback([data.formatted_address],WPGMZA.Geocoder.SUCCESS)):callback([],WPGMZA.Geocoder.NO_RESULTS)})}else callback(null,WPGMZA.Geocoder.FAIL)},WPGMZA.GoogleGeocoder.prototype.isGoogleAvailable=function(){return"undefined"!=typeof google&&void 0!==google.maps&&void 0!==google.maps.Geocoder},WPGMZA.GoogleGeocoder.prototype.getApiKey=function(){let apikey=!1;return WPGMZA.settings&&(WPGMZA.settings.address_provider_api_key?apikey=WPGMZA.settings.address_provider_api_key:WPGMZA.settings.googleMapsApiKey?apikey=WPGMZA.settings.googleMapsApiKey:WPGMZA.settings.wpgmza_google_maps_api_key&&(apikey=WPGMZA.settings.wpgmza_google_maps_api_key)),apikey}}),jQuery(function($){WPGMZA.settings.engine&&"google-maps"!=WPGMZA.settings.engine||window.google&&window.google.maps&&google.maps.OverlayView&&(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($){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=this.compileWrapperAttributes(),styleTypeClass=this.getStyleTypeClass(),feature="<div id='"+guid+"' "+feature+" class='"+styleTypeClass+"'>"+map+" "+this.content+"</div>";return this.googleInfoWindow.setContent(feature),this.googleObject instanceof google.maps.marker.AdvancedMarkerElement&&(this.feature.offsetX||this.feature.offsetY)&&this.googleInfoWindow.setOptions({pixelOffset:new google.maps.Size(this.feature.offsetX,-this.feature.offsetY)}),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.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){raw=(raw=(raw=(raw=raw.replace(/\\'/g,"'")).replace(/\\"/g,'"')).replace(/\\0/g,"\0")).replace(/\\\\/g,"\\");try{json=JSON.parse(raw)}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(),options=this.extendNativeConfig(options);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.settings.enable_scale_control&&this.enableScaleControl(!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"}]})),WPGMZA.settings&&WPGMZA.settings.googleMarkerMode&&WPGMZA.settings.googleMarkerMode===WPGMZA.GoogleMarker.MARKER_MODE_ADVANCED&&initializing.styles&&delete initializing.styles,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.enableScaleControl=function(enable){var units=this.settings.store_locator_distance==WPGMZA.Distance.MILES?google.maps.ScaleControlStyle.IMPERIAL:google.maps.ScaleControlStyle.METRIC;this.googleMap.setOptions({scaleControl:enable,scaleControlOptions:{style:units,position:google.maps.ControlPosition.BOTTOM_LEFT}})},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.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]);WPGMZA.settings&&WPGMZA.settings.googleMarkerMode&&WPGMZA.settings.googleMarkerMode===WPGMZA.GoogleMarker.MARKER_MODE_ADVANCED?this.googleMarker=new google.maps.marker.AdvancedMarkerElement:(this.googleMarker=new google.maps.Marker(settings),WPGMZA&&!WPGMZA.__hasNotifiedLegacyMarkers&&(WPGMZA.__hasNotifiedLegacyMarkers=!0)),(this.googleMarker.wpgmzaMarker=this).googleFeature=this.googleMarker,this.setPosition(new WPGMZA.LatLng(this.lat,this.lng)),this.anim&&this.setAnimation(this.anim),this.animation&&this.setAnimation(this.animation),this.googleMarker instanceof google.maps.marker.AdvancedMarkerElement?(this.googleMarker.addListener("gmp-click",function(){self.dispatchEvent("click"),self.dispatchEvent("select")}),this.googleMarker.element.addEventListener("mouseover",function(){self.dispatchEvent("mouseover")}),this.googleMarker.element.addEventListener("mouseout",function(){self.dispatchEvent("mouseout")}),this.googleMarker.element&&this.googleMarker.element.classList.add("wpgmza-google-marker-advanced")):(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(){let googleMarkerPosition;self.googleMarker instanceof google.maps.marker.AdvancedMarkerElement?(googleMarkerPosition=self.googleMarker.position,self.setPosition({lat:googleMarkerPosition.lat,lng:googleMarkerPosition.lng})):(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,WPGMZA.GoogleMarker.MARKER_MODE_LEGACY="marker",WPGMZA.GoogleMarker.MARKER_MODE_ADVANCED="advancedMarkerElement",Object.defineProperty(WPGMZA.GoogleMarker.prototype,"opacity",{get:function(){return this._opacity},set:function(value){this._opacity=value,this.setOpacity(value)}}),WPGMZA.GoogleMarker.prototype.setLabel=function(label){var labelElement;this.googleMarker instanceof google.maps.marker.AdvancedMarkerElement?this.googleMarker.content&&(label?((labelElement=document.createElement("div")).classList.add("wpgmza-google-marker-label"),labelElement.innerText=label,this.googleMarker.content.appendChild(labelElement)):(labelElement=this.googleMarker.content.querySelector(".wpgmza-google-marker-label"))&&labelElement.remove()):label?(label=label.replaceAll("&amp;","&"),this.googleMarker.setLabel({text:label,className:"wpgmza-google-marker-label-legacy"}),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 instanceof google.maps.marker.AdvancedMarkerElement?this.googleMarker.position={lat:this.lat,lng:this.lng}:this.googleMarker.setPosition({lat:this.lat,lng:this.lng})},WPGMZA.GoogleMarker.prototype.updateOffset=function(){var self,icon,img,params,x,y;this.googleMarker instanceof google.maps.marker.AdvancedMarkerElement?this.googleMarker.content&&(this.googleMarker.content.style.setProperty("--wpgmza-nudge-x",this._offset.x+"px"),this.googleMarker.content.style.setProperty("--wpgmza-nudge-y",this._offset.y+"px"),this.googleMarker.content.classList.add("wpgmza-google-icon-nudge")):(icon=(self=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){if(this.googleMarker instanceof google.maps.marker.AdvancedMarkerElement)for(var key in options){var value=options[key];switch(key){case"animation":this.setAnimation(value);break;case"opacity":this.setOpacity(value);break;case"visible":this.setVisible(value);break;case"zIndex":this.googleMarker.zIndex=value;break;case"title":this.googleMarker.title=value}}else this.googleMarker.setOptions(options)},WPGMZA.GoogleMarker.prototype.setAnimation=function(animation){if(Parent.prototype.setAnimation.call(this,animation),this.googleMarker instanceof google.maps.marker.AdvancedMarkerElement){if(this.googleMarker.content)switch(animation){case WPGMZA.Marker.ANIMATION_BOUNCE:this.googleMarker.content.classList.add("wpgmza-google-marker-bounce");break;case WPGMZA.Marker.ANIMATION_DROP:this.googleMarker.content.classList.add("wpgmza-google-marker-drop");break;case WPGMZA.Marker.ANIMATION_NONE:}}else this.googleMarker.setAnimation(animation)},WPGMZA.GoogleMarker.prototype.setVisible=function(visible){Parent.prototype.setVisible.call(this,visible),this.googleMarker instanceof google.maps.marker.AdvancedMarkerElement?this.googleMarker.element&&(visible?this.googleMarker.element.classList.remove("wpgmza-google-marker-hidden"):this.googleMarker.element.classList.add("wpgmza-google-marker-hidden")):this.googleMarker.setVisible(!!visible)},WPGMZA.GoogleMarker.prototype.getVisible=function(visible){return this.googleMarker instanceof google.maps.marker.AdvancedMarkerElement?!this.googleMarker.element.classList.contains("wpgmza-google-marker-hidden"):this.googleMarker.getVisible()},WPGMZA.GoogleMarker.prototype.setDraggable=function(draggable){this.googleMarker instanceof google.maps.marker.AdvancedMarkerElement?this.googleMarker.gmpDraggable=draggable:this.googleMarker.setDraggable(draggable)},WPGMZA.GoogleMarker.prototype.setOpacity=function(opacity){this.googleMarker instanceof google.maps.marker.AdvancedMarkerElement?this.googleMarker.content&&(this.googleMarker.content.style.setProperty("--wpgmza-opacity",opacity),this.googleMarker.content.classList.add("wpgmza-google-marker-opacity")):this.googleMarker.setOpacity(opacity)}}),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.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($){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.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"})}),google.maps.event.addListener(this.googlePolygon,"rightclick",function(event){var wpgmzaEvent;void 0!==self.map&&self.map instanceof WPGMZA.Map&&((wpgmzaEvent=new WPGMZA.Event("rightclick")).latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.map.dispatchEvent(wpgmzaEvent))})},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(WPGMZA.GoogleFeature.getGoogleStyle(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.setVisible=function(visible){this.googlePolygon.setVisible(!!visible)},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.GooglePolyline=function(options,googlePolyline){var self=this;Parent.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(event){event=new WPGMZA.LatLng(event.latLng.lat(),event.latLng.lng());self.dispatchEvent({type:"click",coordinates:event})})},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolyline:WPGMZA.Polyline,WPGMZA.GooglePolyline.prototype=Object.create(Parent.prototype),WPGMZA.GooglePolyline.prototype.constructor=WPGMZA.GooglePolyline,WPGMZA.GooglePolyline.prototype.updateNativeFeature=function(){this.googlePolyline.setOptions(WPGMZA.GoogleFeature.getGoogleStyle(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.setVisible=function(visible){this.googlePolyline.setVisible(!!visible)},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($){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"})}),google.maps.event.addListener(this.googleRectangle,"rightclick",function(event){var wpgmzaEvent;void 0!==self.map&&self.map instanceof WPGMZA.Map&&((wpgmzaEvent=new WPGMZA.Event("rightclick")).latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.map.dispatchEvent(wpgmzaEvent))})},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.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.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($){WPGMZA.GoogleText=function(options){WPGMZA.Text.apply(this,arguments),this.overlay=new WPGMZA.GoogleTextOverlay(options)},WPGMZA.extend(WPGMZA.GoogleText,WPGMZA.Text),WPGMZA.GoogleText.prototype.setMap=function(map){this.overlay&&(map&&map.googleMap?this.overlay.setMap(map.googleMap):this.overlay.setMap(null))}}),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&&void 0!==google.maps.OverlayView&&(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($){var Parent=WPGMZA.Circle;WPGMZA.LeafletCircle=function(options,leafletFeature){var center;Parent.call(this,options,leafletFeature),options=options||{},leafletFeature&&(center=leafletFeature.getLatLng(),options.center=new WPGMZA.LatLng(center.lat,center.lng),options.radius=leafletFeature.getRadius()/1e3),this.leafletFeature=L.circle({lat:options.center.lat,lng:options.center.lng},{radius:options.radius?1e3*options.radius:0}),((this.leafletFeature.wpgmzaCircle=this).leafletFeature.wpgmzaFeature=this).leafletFeature.on("click",()=>{this.dispatchEvent({type:"click"})}),options&&this.setOptions(options)},WPGMZA.isProVersion()&&(Parent=WPGMZA.ProCircle),WPGMZA.LeafletCircle.prototype=Object.create(Parent.prototype),WPGMZA.LeafletCircle.prototype.constructor=WPGMZA.LeafletCircle,WPGMZA.LeafletCircle.prototype.getCenter=function(){var coordinates=this.leafletFeature.getLatLng();return new WPGMZA.LatLng({lat:coordinates.lat,lng:coordinates.lng})},WPGMZA.LeafletCircle.prototype.setVisible=function(visible){visible?this.map&&this.map.leafletMap&&this.leafletFeature.addTo(this.map.leafletMap):this.leafletFeature.remove()},WPGMZA.LeafletCircle.prototype.setCenter=function(center){WPGMZA.Circle.prototype.setCenter.apply(this,arguments),this.leafletFeature.setLatLng({lat:this.center.lat,lng:this.center.lng})},WPGMZA.LeafletCircle.prototype.getRadius=function(){return this.leafletFeature.getRadius()/1e3},WPGMZA.LeafletCircle.prototype.setRadius=function(radius){WPGMZA.Circle.prototype.setRadius.apply(this,arguments),this.leafletFeature.setRadius(1e3*radius)},WPGMZA.LeafletCircle.prototype.setOptions=function(options){Parent.prototype.setOptions.apply(this,arguments),"editable"in options&&WPGMZA.LeafletFeature.setEditable(this,options.editable)}}),jQuery(function($){WPGMZA.LeafletDrawingManager=function(map){WPGMZA.DrawingManager.call(this,map),this.interactions={draw:!1,edit:!1},this.bindEvents()},WPGMZA.LeafletDrawingManager.prototype=Object.create(WPGMZA.DrawingManager.prototype),WPGMZA.LeafletDrawingManager.prototype.constructor=WPGMZA.LeafletDrawingManager,WPGMZA.LeafletDrawingManager.prototype.enableEditorInteraction=function(feature){var mode=this.getModeFromFeature(feature),mode=this.getModeConfiguration(mode);if(mode){if(this.interactions.edit&&this.interactions.edit.feature){if(feature===this.interactions.edit.feature)return;this.disableEditorInteraction()}this.interactions.edit={map:!(!this.map||!this.map.leafletMap)&&this.map.leafletMap,feature:feature},this.interactions.edit.map&&(this.interactions.edit.tooling||(this.interactions.edit.tooling=new L.Edit[mode.editType](feature.leafletFeature,this.interactions.edit.map)),this.interactions.edit.tooling.enable(),feature.leafletFeature.on("edit",()=>{feature.trigger("change")}),feature.leafletFeature.on("remove",()=>{this.disableEditorInteraction()}))}},WPGMZA.LeafletDrawingManager.prototype.disableEditorInteraction=function(){this.interactions.edit&&this.interactions.edit.feature&&this.interactions.edit.tooling&&(this.interactions.edit.tooling.disable(),this.interactions.edit.feature.leafletFeature.remove(),this.interactions.edit=!1)},WPGMZA.LeafletDrawingManager.prototype.setDrawingMode=function(mode){WPGMZA.DrawingManager.prototype.setDrawingMode.call(this,mode),this.interactions.draw&&this.interactions.draw.tooling&&(this.interactions.draw.tooling.disable(),this.interactions.draw.tooling=!1);mode=this.getModeConfiguration(mode);mode&&(this.interactions.draw={map:!(!this.map||!this.map.leafletMap)&&this.map.leafletMap,config:mode},this.interactions.draw.map)&&(this.interactions.draw.tooling=new L.Draw[mode.type](this.interactions.draw.map,mode.drawOptions),this.interactions.draw.tooling.enable())},WPGMZA.LeafletDrawingManager.prototype.bindEvents=function(){var map=!(!this.map||!this.map.leafletMap)&&this.map.leafletMap;map&&(map.on(L.Draw.Event.CREATED,e=>{if(this.interactions.draw.tooling&&this.interactions.draw.tooling.disable(),this.interactions.draw.config&&this.interactions.draw.config.events.complete){var WPGMZAEvent=new WPGMZA.Event(this.interactions.draw.config.events.complete);switch(this.interactions.draw.config.mode){case WPGMZA.DrawingManager.MODE_POLYGON:WPGMZAEvent.enginePolygon=e.layer;break;case WPGMZA.DrawingManager.MODE_POLYLINE:WPGMZAEvent.enginePolyline=e.layer;break;case WPGMZA.DrawingManager.MODE_CIRCLE:WPGMZAEvent.engineCircle=e.layer;break;case WPGMZA.DrawingManager.MODE_RECTANGLE:WPGMZAEvent.engineRectangle=e.layer;break;case WPGMZA.DrawingManager.MODE_IMAGEOVERLAY:WPGMZAEvent.engineImageoverlay={engineRectangle:e.layer};break;default:throw new Error("Drawing mode not implemented")}this.dispatchEvent(WPGMZAEvent)}}),this.on("refresh",()=>{this.interactions.edit.tooling.enabled()&&(this.interactions.edit.tooling.disable(),this.interactions.edit.tooling.enable())}))},WPGMZA.LeafletDrawingManager.prototype.getModeFromFeature=function(feature){return feature instanceof WPGMZA.Marker?WPGMZA.DrawingManager.MODE_MARKER:feature instanceof WPGMZA.Polygon?WPGMZA.DrawingManager.MODE_POLYGON:feature instanceof WPGMZA.Polyline?WPGMZA.DrawingManager.MODE_POLYLINE:feature instanceof WPGMZA.Circle?WPGMZA.DrawingManager.MODE_CIRCLE:feature instanceof WPGMZA.Rectangle?WPGMZA.DrawingManager.MODE_RECTANGLE:feature instanceof WPGMZA.Heatmap?WPGMZA.DrawingManager.MODE_HEATMAP:feature instanceof WPGMZA.Pointlabel?WPGMZA.DrawingManager.MODE_POINTLABEL:feature instanceof WPGMZA.Imageoverlay?WPGMZA.DrawingManager.MODE_IMAGEOVERLAY:WPGMZA.DrawingManager.MODE_NONE},WPGMZA.LeafletDrawingManager.prototype.getModeConfiguration=function(mode){var config={mode:mode,type:!1,editType:!1,events:{complete:!1,change:"change"},drawOptions:{shapeOptions:{color:"#0494f4",fillColor:"#FFFFFF",fillOpacity:.3,weight:2,opacity:.8}}};switch(mode){case WPGMZA.DrawingManager.MODE_NONE:case WPGMZA.DrawingManager.MODE_MARKER:case WPGMZA.DrawingManager.MODE_POINTLABEL:case WPGMZA.DrawingManager.MODE_HEATMAP:break;case WPGMZA.DrawingManager.MODE_POLYGON:config.type="Polygon",config.editType="Poly",config.events.complete="polygonclosed",config.drawOptions.metric=this.map.settings.store_locator_distance===WPGMZA.Distance.KILOMETERS;break;case WPGMZA.DrawingManager.MODE_POLYLINE:config.type="Polyline",config.editType="Poly",config.events.complete="polylinecomplete",config.drawOptions.metric=this.map.settings.store_locator_distance===WPGMZA.Distance.KILOMETERS;break;case WPGMZA.DrawingManager.MODE_CIRCLE:config.type="Circle",config.events.complete="circlecomplete",config.drawOptions.metric=this.map.settings.store_locator_distance===WPGMZA.Distance.KILOMETERS,config.drawOptions.minRadius=1;break;case WPGMZA.DrawingManager.MODE_RECTANGLE:config.type="Rectangle",config.events.complete="rectanglecomplete",config.drawOptions.metric=this.map.settings.store_locator_distance===WPGMZA.Distance.KILOMETERS;break;case WPGMZA.DrawingManager.MODE_IMAGEOVERLAY:config.type="Rectangle",config.events.complete="imageoverlaycomplete";break;default:throw new Error("Invalid drawing mode")}return config.editType=config.editType||config.type,!!config.type&&config}}),jQuery(function($){WPGMZA.LeafletFeature=function(options){WPGMZA.assertInstangeOf(this,"LeafletFeature"),WPGMZA.Feature.apply(this,arguments)},WPGMZA.extend(WPGMZA.LeafletFeature,WPGMZA.Feature),WPGMZA.LeafletFeature.getLeafletStyle=function(options){if(!options)return!1;var name,compiled={},map={fillcolor:"fillColor",opacity:"fillOpacity",linecolor:"color",lineColor:"color",lineopacity:"opacity",lineOpacity:"opacity",linethickness:"weight",lineThickness:"weight",color:"fillColor",strokeColor:"color",strokeOpacity:"opacity",lineDashArray:"dashArray"};for(name in options=$.extend({},options))name in map&&(compiled[map[name]]=options[name]);return compiled},WPGMZA.LeafletFeature.setEditable=function(feature,enable){var drawingManager;WPGMZA.mapEditPage&&WPGMZA.mapEditPage.drawingManager&&(drawingManager=WPGMZA.mapEditPage.drawingManager,enable?drawingManager.enableEditorInteraction(feature):drawingManager.disableEditorInteraction(feature))}}),jQuery(function($){var Parent;WPGMZA.LeafletInfoWindow=function(feature){Parent.call(this,feature)},Parent=WPGMZA.isProVersion()?WPGMZA.ProInfoWindow:WPGMZA.InfoWindow,WPGMZA.LeafletInfoWindow.prototype=Object.create(Parent.prototype),WPGMZA.LeafletInfoWindow.prototype.constructor=WPGMZA.LeafletInfoWindow,WPGMZA.LeafletInfoWindow.prototype.open=function(map,feature){var latLng=feature.getPosition();if(!latLng)return!1;if(!Parent.prototype.open.call(this,map,feature))return!1;this.parent=map,this.leafletPopup||(this.leafletPopup=L.popup({maxWidth:this.maxWidth?parseInt(this.maxWidth):320,minWidth:this.maxWidth&&parseInt(this.maxWidth)<320?parseInt(this.maxWidth):320,maxHeight:280}),map.leafletMap.on("popupclose",event=>{event.popup===this.leafletPopup&&(this.state=WPGMZA.InfoWindow.STATE_CLOSED,this.trigger("infowindowclose"))})),this.leafletPopup.setLatLng({lat:latLng.lat,lng:latLng.lng});var feature=this.compileWrapperAttributes(),latLng=this.getStyleTypeClass();this.setContent(`<div class='wpgmza-infowindow leaflet-info-window-container ${latLng}' ${feature}>${this.content}</div>`),this.leafletPopup.openOn(map.leafletMap),this.feature&&this.feature instanceof WPGMZA.Marker?(latLng=this.feature.getNativeElement(),(feature=$(latLng).css("--wpgmza-leaflet-icon-height"))&&this.leafletPopup&&$(this.leafletPopup.getElement()).css("--wpgmza-leaflet-icon-height",feature)):$(this.leafletPopup.getElement()).addClass("no-offsets"),this.element=this.leafletPopup.getElement(),this.trigger("infowindowopen"),this.trigger("domready")},WPGMZA.LeafletInfoWindow.prototype.close=function(event){this.leafletPopup&&this.leafletPopup.isOpen()&&this.leafletPopup.close(),WPGMZA.InfoWindow.prototype.close.call(this),this.trigger("infowindowclose")},WPGMZA.LeafletInfoWindow.prototype.setContent=function(html){Parent.prototype.setContent.call(this,html),this.content=html;var editButton=WPGMZA.isProVersion()?"":this.addEditButton();editButton&&(html+=editButton),this.leafletPopup&&this.leafletPopup.setContent(html)},WPGMZA.LeafletInfoWindow.prototype.setOptions=function(options){options.maxWidth&&$(this.element).css({"max-width":options.maxWidth+"px"})},WPGMZA.LeafletInfoWindow.prototype.onOpen=function(){WPGMZA.InfoWindow.prototype.onOpen.apply(this,arguments)}}),jQuery(function($){var Parent;WPGMZA.LeafletMap=function(element,options){Parent.call(this,element),this.setOptions(options),$(this.element).html("");let mapOptions=this.settings.toLeafletViewOptions();function isSettingDisabled(value){return"yes"===value||!!value}if(mapOptions=mapOptions||{},this.mapType=mapOptions.mapType||"roadmap",this.tileLayers=this.getTileLayers(),mapOptions.layers=this.tileLayers,this.customTileMode&&(mapOptions.crs=L.extend({},L.CRS.Simple,{scale:zoom=>{return Math.min(1e3/this.customTileDimensions.width,1e3/this.customTileDimensions.height)*Math.pow(2,zoom)}}),this.customTileBounds)&&!(options=L.latLngBounds(this.customTileBounds)).contains(mapOptions.center)&&(mapOptions.center=options.getCenter(),this.onBoundsChanged()),mapOptions=this.extendNativeConfig(mapOptions),this.leafletMap=L.map($(element)[0],mapOptions),"greedy"!=this.settings.wpgmza_force_greedy_gestures&&"yes"!=this.settings.wpgmza_force_greedy_gestures&&1!=this.settings.wpgmza_force_greedy_gestures)if(this.gestureOverlay=$("<div class='wpgmza-gesture-overlay'></div>"),this.gestureOverlayTimeoutID=null,WPGMZA.isTouchDevice())this.leafletMap.dragging&&(this.leafletMap.dragging.disable(),this.gestureState={touches:{},touchCount:0,midpoint:null,center:null},options=this.leafletMap.getContainer(),L.DomEvent.on(options,"touchstart",event=>{Array.from(event.touches).forEach(touch=>{this.gestureState.touches[touch.identifier]={x:touch.clientX,y:touch.clientY}}),this.gestureState.touchCount=Object.keys(this.gestureState.touches).length,2===this.gestureState.touchCount?(L.DomEvent.preventDefault(event),event={a:event.touches[0],b:event.touches[1]},this.gestureState.midpoint=L.point((event.a.clientX+event.b.clientX)/2,(event.a.clientY+event.b.clientY)/2),this.gestureState.center=this.leafletMap.getCenter()):1===this.gestureState.touchCount&&this.showGestureOverlay()}),L.DomEvent.on(options,"touchmove",event=>{var mapCenterPoint;2===this.gestureState.touchCount&&2===event.touches.length&&(L.DomEvent.preventDefault(event),event={a:event.touches[0],b:event.touches[1]},event={x:(event=L.point((event.a.clientX+event.b.clientX)/2,(event.a.clientY+event.b.clientY)/2)).x-this.gestureState.midpoint.x,y:event.y-this.gestureState.midpoint.y},mapCenterPoint=this.leafletMap.latLngToContainerPoint(this.gestureState.center),this.leafletMap.panTo(this.leafletMap.containerPointToLatLng(L.point(mapCenterPoint.x-event.x,mapCenterPoint.y-event.y)),{animate:!1}))}),L.DomEvent.on(options,"touchend",event=>{Array.from(event.changedTouches).forEach(touch=>{delete this.gestureState.touches[touch.identifier]}),Object.keys(this.gestureState.touches).length<2&&(this.gestureState.midpoint=null,this.gestureState.center=null)}),L.DomEvent.on(options,"touchcancel",event=>{this.gestureState.touches={},this.gestureState.midpoint=null,this.gestureState.center=null}),this.gestureOverlay.text(WPGMZA.localized_strings.use_two_fingers));else if(this.leafletMap.scrollWheelZoom){this.leafletMap.scrollWheelZoom.disable();const leafletContainer=this.leafletMap.getContainer();L.DomEvent.on(leafletContainer,"wheel",event=>{L.DomEvent.preventDefault(event),event.ctrlKey||event.metaKey?(event=L.DomEvent.getWheelDelta(event),this.leafletMap.setZoom(this.leafletMap.getZoom()+(0<event?1:-1))):this.showGestureOverlay()});let getstureString=WPGMZA.localized_strings.use_ctrl_scroll_to_zoom;WPGMZA.isDeviceiOS()&&(getstureString=WPGMZA.localized_strings.use_ctrl_scroll_to_zoom_ios),this.gestureOverlay.text(getstureString)}element=this.settings.hasMutlilayerTileServer();!element||this.customTileMode||isSettingDisabled(WPGMZA.settings.wpgmza_settings_map_type)||this.addMapTypeControl(element),isSettingDisabled(WPGMZA.settings.wpgmza_settings_map_full_screen_control)||this.addFullscreenControl(),this.settings.enable_scale_control&&this.enableScaleControl(!0),this.leafletMap.on("click",event=>{this.dispatchEvent({type:"click",map:this,latLng:{lat:event.latlng.lat,lng:event.latlng.lng}})}),this.leafletMap.on("movestart",event=>{this.isBeingDragged=!0}),this.leafletMap.on("moveend",event=>{this.isBeingDragged&&(this.dispatchEvent("dragend"),this.isBeingDragged=!1),this.onIdle()}),this.leafletMap.on("zoomend",event=>{this.dispatchEvent("zoom_changed"),this.dispatchEvent("zoomchanged"),setTimeout(()=>{this.onIdle()},10)}),this.leafletMap.on("move",()=>{this.onBoundsChanged()}),this.onBoundsChanged(),this.leafletMap.on("click contextmenu",event=>{let isRight;if("which"in event.originalEvent?isRight=3==event.originalEvent.which:"button"in event.originalEvent&&(isRight=2==event.originalEvent.button),(1!=event.originalEvent.which&&1!=event.originalEvent.button||!this.isBeingDragged)&&isRight)return this.onRightClick(event)}),WPGMZA.isProVersion()||(this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}),$(this.element).trigger("wpgooglemaps_loaded")),this.innerStack&&0<this.innerStack.length&&this.innerStack.each((index,element)=>{L.DomEvent.disableClickPropagation(element),L.DomEvent.disableScrollPropagation(element),L.DomEvent.on(element,"mousedown",L.DomEvent.stopPropagation)})},Parent=WPGMZA.isProVersion()?WPGMZA.ProMap:WPGMZA.Map,WPGMZA.LeafletMap.prototype=Object.create(Parent.prototype),WPGMZA.LeafletMap.prototype.constructor=WPGMZA.LeafletMap,WPGMZA.LeafletMap.prototype.getTileLayers=function(){let url=WPGMZA.settings.tile_server_url||"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",tileKey=WPGMZA.settings.leaflet_api_key||!1;switch(WPGMZA.settings.engine){case"leaflet-azure":url=WPGMZA.settings.tile_server_url_leaflet_azure||url,tileKey=WPGMZA.settings.wpgmza_leaflet_azure_key||tileKey;break;case"leaflet-stadia":url=WPGMZA.settings.tile_server_url_leaflet_stadia||url,tileKey=WPGMZA.settings.wpgmza_leaflet_stadia_key||tileKey;break;case"leaflet-maptiler":url=WPGMZA.settings.tile_server_url_leaflet_maptiler||url,tileKey=WPGMZA.settings.wpgmza_leaflet_maptiler_key||tileKey;break;case"leaflet-locationiq":url=WPGMZA.settings.tile_server_url_leaflet_locationiq||url,tileKey=WPGMZA.settings.wpgmza_leaflet_locationiq_key||tileKey;break;case"leaflet-zerocost":url=WPGMZA.settings.tile_server_url_leaflet_zerocost||url}var config=this.settings.configureTileServer(url,{authentication:tileKey,preferServerGlobals:!0,map:this});if(config&&config.url){if(config.type&&"vector"===config.type&&void 0!==L.maplibreGL){var mapLibreOptions={style:config.url};if(config.options)for(var key in config.options)"url"!==key&&(mapLibreOptions[key]=config.options[key]);return[L.maplibreGL(mapLibreOptions)]}if(config.type&&"custom"===config.type)return this.customTileDimensions={width:config.custom.width,height:config.custom.height},this.customTileBounds=[[0,0],[this.customTileDimensions.height,this.customTileDimensions.width]],this.customTileMode=!0,[L.imageOverlay(config.url,this.customTileBounds,{attribution:config.custom.attribution||"©"})];var layers=[];if(config.dependencies)for(var dependency of config.dependencies)layers.push(new L.tileLayer(dependency.url,config.options||{}));return layers.push(new L.tileLayer(config.url,config.options||{})),layers}return[new L.tileLayer(url,{})]},WPGMZA.LeafletMap.prototype.wrapLongitude=function(){var center=this.leafletMap.getCenter();-180<=center.lng&&center.lng<=180||(center.lng=center.lng-360*Math.floor(center.lng/360),180<center.lng&&(center.lng-=360),this.setCenter(center))},WPGMZA.LeafletMap.prototype.getCenter=function(){var center=this.leafletMap.getCenter();return{lat:center.lat,lng:center.lng}},WPGMZA.LeafletMap.prototype.setCenter=function(latLng){WPGMZA.Map.prototype.setCenter.call(this,latLng),this.leafletMap.panTo(L.latLng({lat:latLng.lat,lng:latLng.lng}),{animate:!1}),this.onBoundsChanged()},WPGMZA.LeafletMap.prototype.getBounds=function(){var bounds=this.leafletMap.getBounds(),nativeBounds=new WPGMZA.LatLngBounds;return nativeBounds.north=bounds.getNorth(),nativeBounds.south=bounds.getSouth(),nativeBounds.west=bounds.getWest(),nativeBounds.east=bounds.getEast(),nativeBounds},WPGMZA.LeafletMap.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=L.latLngBounds(L.latLng({lat:northEast.lat,lng:northEast.lng}),L.latLng({lat:southWest.lat,lng:southWest.lng}));this.leafletMap.fitBounds(bounds,{padding:[60,60]})},WPGMZA.LeafletMap.prototype.panTo=function(latLng,zoom){1<arguments.length?this.leafletMap.flyTo(L.latLng({lat:latLng.lat,lng:latLng.lng}),parseInt(zoom)):this.leafletMap.flyTo(L.latLng({lat:latLng.lat,lng:latLng.lng}))},WPGMZA.LeafletMap.prototype.getZoom=function(){return Math.round(this.leafletMap.getZoom())},WPGMZA.LeafletMap.prototype.setZoom=function(value){this.leafletMap.setZoom(value)},WPGMZA.LeafletMap.prototype.getMinZoom=function(){return this.leafletMap.getMinZoom()},WPGMZA.LeafletMap.prototype.setMinZoom=function(value){this.leafletMap.setMinZoom(value)},WPGMZA.LeafletMap.prototype.getMaxZoom=function(){return this.leafletMap.getMaxZoom()},WPGMZA.LeafletMap.prototype.setMaxZoom=function(value){this.leafletMap.setMaxZoom(value)},WPGMZA.LeafletMap.prototype.setMapType=function(type){if(this.mapType!==type){if(this.mapType=type,this.tileLayers)for(var layer of this.tileLayers)this.leafletMap.hasLayer(layer)&&this.leafletMap.removeLayer(layer);this.tileLayers=this.getTileLayers();for(let layer of this.tileLayers)this.leafletMap.addLayer(layer);$(this.element).find(".leaflet-layer-button[data-map-type]").removeClass("selected"),$(this.element).find('.leaflet-layer-button[data-map-type="'+type+'"]').addClass("selected")}},WPGMZA.LeafletMap.prototype.getMapType=function(){return this.mapType||"roadmap"},WPGMZA.LeafletMap.prototype.setOptions=function(options){if(Parent.prototype.setOptions.call(this,options),this.leafletMap){var mapOptions=this.settings.toLeafletViewOptions();for(const key in mapOptions)if(mapOptions.hasOwnProperty(key)){var value=options[key];switch(key){case"zoomControl":!1===value&&this.leafletMap.zoomControl?this.leafletMap.removeControl(this.leafletMap.zoomControl):!0!==value||this.leafletMap.zoomControl||this.leafletMap.addControl(L.control.zoom());break;case"dragging":case"doubleClickZoom":case"scrollWheelZoom":case"boxZoom":case"keyboard":case"tap":case"touchZoom":this.leafletMap[key]&&(!0===value?this.leafletMap[key].enable():this.leafletMap[key].disable());break;case"minZoom":this.setMinZoom(value);break;case"maxZoom":this.setMaxZoom(value)}}}},WPGMZA.LeafletMap.prototype.addMarker=function(marker){marker.leafletMarker.addTo(this.leafletMap),Parent.prototype.addMarker.call(this,marker)},WPGMZA.LeafletMap.prototype.removeMarker=function(marker){marker.leafletMarker.removeFrom(this.leafletMap),Parent.prototype.removeMarker.call(this,marker)},WPGMZA.LeafletMap.prototype.addPolygon=function(polygon){polygon.leafletFeature.addTo(this.leafletMap),Parent.prototype.addPolygon.call(this,polygon)},WPGMZA.LeafletMap.prototype.removePolygon=function(polygon){polygon.leafletFeature.remove(),Parent.prototype.removePolygon.call(this,polygon)},WPGMZA.LeafletMap.prototype.addPolyline=function(polyline){polyline.leafletFeature.addTo(this.leafletMap),Parent.prototype.addPolyline.call(this,polyline)},WPGMZA.LeafletMap.prototype.removePolyline=function(polyline){polyline.leafletFeature.remove(),Parent.prototype.removePolyline.call(this,polyline)},WPGMZA.LeafletMap.prototype.addCircle=function(circle){circle.leafletFeature.addTo(this.leafletMap),Parent.prototype.addCircle.call(this,circle)},WPGMZA.LeafletMap.prototype.removeCircle=function(circle){circle.leafletFeature.remove(),Parent.prototype.removeCircle.call(this,circle)},WPGMZA.LeafletMap.prototype.addRectangle=function(rectangle){rectangle.leafletFeature.addTo(this.leafletMap),Parent.prototype.addRectangle.call(this,rectangle)},WPGMZA.LeafletMap.prototype.removeRectangle=function(rectangle){rectangle.leafletFeature.remove(),Parent.prototype.removeRectangle.call(this,rectangle)},WPGMZA.LeafletMap.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.leafletMap.containerPointToLatLng(L.point(x,y));return x?{lat:x.lat,lng:x.lng}:{x:null,y:null}},WPGMZA.LeafletMap.prototype.latLngToPixels=function(latLng){latLng=this.leafletMap.latLngToContainerPoint(latLng);return latLng?{x:latLng.x,y:latLng.y}:{x:null,y:null}},WPGMZA.LeafletMap.prototype.showGestureOverlay=function(){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(()=>{this.gestureOverlay.fadeOut(500)},1e3)},WPGMZA.LeafletMap.prototype.onRightClick=function(event){return this.trigger({type:"rightclick",latLng:event.latlng}),$(this.element).trigger({type:"rightclick",latLng:event.latlng}),event.originalEvent.preventDefault(),!1},WPGMZA.LeafletMap.prototype.addFullscreenControl=function(){var fullscreenController;this.leafletMap&&((fullscreenController=L.control({position:"topright"})).onAdd=map=>{var corner,container=L.DomUtil.create("div"),button=(container.classList.add("leaflet-bar"),container.classList.add("leaflet-control"),container.classList.add("leaflet-control-fullscreen"),L.DomUtil.create("a"));button.classList.add("leaflet-control-button"),button.classList.add("leaflet-fullscreen-button"),button.href="#",button.setAttribute("aria-label","Fullscreen");for(corner of["tl","tr","bl","br"]){var element=L.DomUtil.create("span");element.classList.add("leaflet-fullscreen-corner"),element.classList.add("leaflet-fullscreen-corner-"+corner),button.append(element)}return container.append(button),L.DomEvent.on(button,"click",event=>{event.preventDefault(),document.fullscreenElement?document.exitFullscreen():(event=this.element).requestFullscreen?event.requestFullscreen():event.mozRequestFullScreen?event.mozRequestFullScreen():event.webkitRequestFullscreen?event.webkitRequestFullscreen():event.msRequestFullscreen&&event.msRequestFullscreen()}),container},fullscreenController.addTo(this.leafletMap))},WPGMZA.LeafletMap.prototype.addMapTypeControl=function(config){var layerController;this.leafletMap&&config&&config.layers&&2<=config.layers.length&&((layerController=L.control({position:"topright"})).onAdd=map=>{var index,container=L.DomUtil.create("div");for(index in container.classList.add("leaflet-bar"),container.classList.add("leaflet-control"),container.classList.add("leaflet-control-layers"),config.layers){const layer=config.layers[index];var label=WPGMZA.localized_strings["map_type_"+layer]?WPGMZA.localized_strings["map_type_"+layer]:WPGMZA.capitalizeWords(layer),button=L.DomUtil.create("a");button.innerText=label,button.classList.add("leaflet-control-button"),button.classList.add("leaflet-layer-button"),button.href="#",button.setAttribute("data-map-type",layer),config.active&&config.active===layer&&button.classList.add("selected"),container.append(button),L.DomEvent.on(button,"click",event=>{event.preventDefault(),this.setMapType(layer)})}return container},layerController.addTo(this.leafletMap))},WPGMZA.LeafletMap.prototype.enableScaleControl=function(enable){this.leafletMap&&(this.scaleControl&&(this.scaleControl.remove(),this.scaleControl=null),enable)&&(enable=this.settings.store_locator_distance==WPGMZA.Distance.MILES,this.scaleControl=L.control.scale({imperial:enable,metric:!enable,position:"bottomleft"}).addTo(this.leafletMap))},WPGMZA.LeafletMap.prototype.getLayerGroupPane=function(pane,layer,basePane){return basePane=void 0!==basePane&&basePane?basePane:"overlayPane",!!this.leafletMap&&(this.leafletMap.getPane(""+pane+layer)||(this.leafletMap.createPane(""+pane+layer,this.leafletMap.getPane(basePane)).style.zIndex=layer),""+pane+layer)},WPGMZA.LeafletMap.prototype.resetBounds=function(){var latlng=new WPGMZA.LatLng(this.settings.map_start_lat,this.settings.map_start_lng);this.panTo(latlng,this.settings.map_start_zoom)}}),jQuery(function($){var Parent;WPGMZA.LeafletMarker=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=L.latLng({lat:this.lat,lng:this.lng}),icon=L.icon({iconUrl:WPGMZA.defaultMarkerIcon});this.leafletMarker=L.marker(origin,{icon:icon}),(this.leafletMarker.wpgmzaMarker=this).leafletFeature=this.leafletMarker,this.leafletMarker.on("mouseover",function(event){self.dispatchEvent("mouseover")}),this.leafletMarker.on("mouseout",function(event){self.dispatchEvent("mouseout")}),this.leafletMarker.on("dragstart",function(event){self.onDragStart(event)}),this.leafletMarker.on("dragend",function(event){self.onDragEnd(event)}),this.leafletMarker.on("remove",()=>{this.label&&this.label.remove()}),this.rebindClickListener(),this.setOptions(settings),this.trigger("init")},Parent=WPGMZA.isProVersion()?WPGMZA.ProMarker:WPGMZA.Marker,WPGMZA.LeafletMarker.prototype=Object.create(Parent.prototype),WPGMZA.LeafletMarker.prototype.constructor=WPGMZA.LeafletMarker,WPGMZA.LeafletMarker.prototype.addLabel=function(){this.setLabel(this.getLabelText())},WPGMZA.LeafletMarker.prototype.setLabel=function(label){label?this.label||(label=label.replaceAll("&amp;","&"),this.label=WPGMZA.Text.createInstance({text:label,map:this.map,position:this.getPosition(),class:"leaflet-marker-label"})):this.label&&(this.label.remove(),this.label=!1)},WPGMZA.LeafletMarker.prototype.getVisible=function(visible){return!(!this.getNativeElement()||!this.overlay)&&"none"!=this.overlay.getElement().style.display},WPGMZA.LeafletMarker.prototype.setVisible=function(visible){Parent.prototype.setVisible.call(this,visible);var element=this.getNativeElement();element&&(element.style.display=visible?"block":"none")},WPGMZA.LeafletMarker.prototype.setPosition=function(latLng){Parent.prototype.setPosition.call(this,latLng),this.leafletMarker.setLatLng({lat:latLng.lat,lng:latLng.lng})},WPGMZA.LeafletMarker.prototype.updateOffset=function(x,y){var x=this._offset.x,y=this._offset.y,element=this.getNativeElement();element&&(element.style.position="relative",element.style.left=x+"px",element.style.top=y+"px")},WPGMZA.LeafletMarker.prototype.setAnimation=function(anim){Parent.prototype.setAnimation.call(this,anim);var element=this.getNativeElement();if(element)switch(anim){case WPGMZA.Marker.ANIMATION_NONE:$(element).removeAttr("data-anim");break;case WPGMZA.Marker.ANIMATION_BOUNCE:$(element).attr("data-anim","bounce");break;case WPGMZA.Marker.ANIMATION_DROP:$(element).attr("data-anim","drop")}},WPGMZA.LeafletMarker.prototype.setDraggable=function(draggable){this.leafletMarker&&this.leafletMarker.dragging&&(draggable?this.leafletMarker.dragging.enable():this.leafletMarker.dragging.disable())},WPGMZA.LeafletMarker.prototype.setOpacity=function(opacity){var element=this.getNativeElement();element&&$(element).css({opacity:opacity})},WPGMZA.LeafletMarker.prototype.onDragStart=function(event){this.isBeingDragged=!0},WPGMZA.LeafletMarker.prototype.onDragEnd=function(event){event&&event.target&&event.target.getLatLng()&&(event=event.target.getLatLng(),this.setPosition({lat:event.lat,lng:event.lng}),this.trigger({type:"dragend",latLng:{lat:event.lat,lng:event.lng}}),this.trigger("change"),setTimeout(()=>{this.isBeingDragged=!1},100))},WPGMZA.LeafletMarker.prototype.onElementClick=function(event){this.wpgmzaMarker.isBeingDragged||(this.wpgmzaMarker.dispatchEvent("click"),this.wpgmzaMarker.dispatchEvent("select"))},WPGMZA.LeafletMarker.prototype.rebindClickListener=function(){this.leafletMarker.off("click",this.onElementClick),this.leafletMarker.on("click",this.onElementClick)},WPGMZA.LeafletMarker.prototype.getNativeElement=function(){return this.leafletMarker._icon||!1},WPGMZA.LeafletMarker.prototype.onAdded=function(event){Parent.prototype.onAdded.call(this,event),this.animation?this.setAnimation(this.animation):this.anim&&this.setAnimation(this.anim),this.draggable&&this.setDraggable(!0)}}),jQuery(function($){WPGMZA.LeafletModernStoreLocatorCircle=function(map,settings){WPGMZA.ModernStoreLocatorCircle.call(this,map,settings)},WPGMZA.LeafletModernStoreLocatorCircle.prototype=Object.create(WPGMZA.ModernStoreLocatorCircle.prototype),WPGMZA.LeafletModernStoreLocatorCircle.prototype.constructor=WPGMZA.LeafletModernStoreLocatorCircle,WPGMZA.LeafletModernStoreLocatorCircle.prototype.initCanvasLayer=function(){var self=this,leafletViewportElement=$(this.map.element);this.canvas=document.createElement("canvas"),this.canvas.className="wpgmza-leaflet-canvas-overlay",leafletViewportElement.find(".leaflet-map-pane .leaflet-overlay-pane").prepend(this.canvas),this.renderFunction=function(event){self.canvas.width==leafletViewportElement.width()&&self.canvas.height==leafletViewportElement.height()||(self.canvas.width=leafletViewportElement.width(),self.canvas.height=leafletViewportElement.height(),$(this.canvas).css({width:leafletViewportElement.width()+"px",height:leafletViewportElement.height()+"px"})),self.draw()},this.map.leafletMap.on("moveend",this.renderFunction)},WPGMZA.LeafletModernStoreLocatorCircle.prototype.getContext=function(type){return this.canvas.getContext(type)},WPGMZA.LeafletModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){return{width:this.canvas.width,height:this.canvas.height}},WPGMZA.LeafletModernStoreLocatorCircle.prototype.getCenterPixels=function(){return this.map.latLngToPixels(this.settings.center)},WPGMZA.LeafletModernStoreLocatorCircle.prototype.getWorldOriginOffset=function(){return{x:0,y:0}},WPGMZA.LeafletModernStoreLocatorCircle.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.LeafletModernStoreLocatorCircle.prototype.getScale=function(){return 1},WPGMZA.LeafletModernStoreLocatorCircle.prototype.destroy=function(){$(this.canvas).remove(),this.map.leafletMap.off("moveend",this.renderFunction),this.map=null,this.canvas=null}}),jQuery(function($){var Parent=WPGMZA.Pointlabel;WPGMZA.LeafletPointlabel=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.LeafletPointlabel,Parent),WPGMZA.LeafletPointlabel.prototype.updateNativeFeature=function(){var options=this.getScalarProperties();options.name&&this.textFeature.setText(options.name),this.textFeature.refresh()}}),jQuery(function($){var Parent;WPGMZA.LeafletPolygon=function(options,leafletFeature){if(Parent.call(this,options,leafletFeature),leafletFeature)this.leafletFeature=leafletFeature;else{var coordinates=[];if(options&&options.polydata){var paths=this.parseGeometry(options.polydata);for(let i=0;i<=paths.length;i++)coordinates.push({lat:parseFloat(paths[i%paths.length].lat),lng:parseFloat(paths[i%paths.length].lng)})}this.leafletFeature=L.polygon(coordinates)}((this.leafletFeature.wpgmzaPolygon=this).leafletFeature.wpgmzaFeature=this).leafletFeature.on("click",()=>{this.dispatchEvent({type:"click"})}),options&&this.setOptions(options)},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolygon:WPGMZA.Polygon,WPGMZA.LeafletPolygon.prototype=Object.create(Parent.prototype),WPGMZA.LeafletPolygon.prototype.constructor=WPGMZA.LeafletPolygon,WPGMZA.LeafletPolygon.prototype.getGeometry=function(){var coordinates=this.leafletFeature.getLatLngs(),result=[];for(let i=0;i<coordinates.length;i++){var point=coordinates[i];if(point instanceof Array)for(let subI=0;subI<point.length;subI++){var subPoint=point[subI];subPoint.lat&&subPoint.lng&&result.push({lat:subPoint.lat,lng:subPoint.lng})}else point.lat&&point.lng&&result.push({lat:point.lat,lng:point.lng})}return result},WPGMZA.LeafletPolygon.prototype.setVisible=function(visible){visible?this.map&&this.map.leafletMap&&this.leafletFeature.addTo(this.map.leafletMap):this.leafletFeature.remove()},WPGMZA.LeafletPolygon.prototype.setOptions=function(options){Parent.prototype.setOptions.apply(this,arguments),"editable"in options&&WPGMZA.LeafletFeature.setEditable(this,options.editable)}}),jQuery(function($){var Parent;WPGMZA.LeafletPolyline=function(options,leafletFeature){if(Parent.call(this,options),leafletFeature)this.leafletFeature=leafletFeature;else{var coordinates=[];if(options&&options.polydata){var paths=this.parseGeometry(options.polydata);for(let i=0;i<=paths.length;i++)if(paths[i]){if(!WPGMZA.isNumeric(paths[i].lat))throw new Error("Invalid latitude");if(!WPGMZA.isNumeric(paths[i].lng))throw new Error("Invalid longitude");coordinates.push({lat:parseFloat(paths[i%paths.length].lat),lng:parseFloat(paths[i%paths.length].lng)})}}this.leafletFeature=L.polyline(coordinates)}((this.leafletFeature.wpgmzaPolyline=this).leafletFeature.wpgmzaFeature=this).leafletFeature.on("click",event=>{event=new WPGMZA.LatLng(event.latlng.lat,event.latlng.lng);this.dispatchEvent({type:"click",coordinates:event})}),options&&this.setOptions(options)},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolyline:WPGMZA.Polyline,WPGMZA.LeafletPolyline.prototype=Object.create(Parent.prototype),WPGMZA.LeafletPolyline.prototype.constructor=WPGMZA.LeafletPolyline,WPGMZA.LeafletPolyline.prototype.getGeometry=function(){var coordinates=this.leafletFeature.getLatLngs(),result=[];for(let i=0;i<coordinates.length;i++){var point=coordinates[i];if(point instanceof Array)for(let subI=0;subI<point.length;subI++){var subPoint=point[subI];subPoint.lat&&subPoint.lng&&result.push({lat:subPoint.lat,lng:subPoint.lng})}else point.lat&&point.lng&&result.push({lat:point.lat,lng:point.lng})}return result},WPGMZA.LeafletPolyline.prototype.setVisible=function(visible){visible?this.map&&this.map.leafletMap&&this.leafletFeature.addTo(this.map.leafletMap):this.leafletFeature.remove()},WPGMZA.LeafletPolyline.prototype.setOptions=function(options){Parent.prototype.setOptions.apply(this,arguments),"editable"in options&&WPGMZA.LeafletFeature.setEditable(this,options.editable)},WPGMZA.LeafletPolyline.prototype.setLayergroup=function(layergroup){Parent.prototype.setLayergroup.call(this,layergroup),this.layergroup&&this.map&&(layergroup=this.map.getLayerGroupPane("polygon_layer_",this.layergroup))&&(this.leafletFeature.remove(),this.leafletFeature.options.pane=layergroup,this.leafletFeature.addTo(this.map.leafletMap))}}),jQuery(function($){var Parent=WPGMZA.Rectangle;WPGMZA.LeafletRectangle=function(options,leafletFeature){var coordinates;Parent.apply(this,arguments),leafletFeature?this.leafletFeature=leafletFeature:(coordinates=[],options.cornerA&&options.cornerB&&(coordinates.push({lat:parseFloat(options.cornerA.lat),lng:parseFloat(options.cornerA.lng)}),coordinates.push({lat:parseFloat(options.cornerB.lat),lng:parseFloat(options.cornerB.lng)})),this.leafletFeature=L.rectangle(coordinates)),((this.leafletFeature.wpgmzaRectangle=this).leafletFeature.wpgmzaFeature=this).leafletFeature.on("click",()=>{this.dispatchEvent({type:"click"})}),options&&this.setOptions(options)},WPGMZA.isProVersion()&&(Parent=WPGMZA.ProRectangle),WPGMZA.extend(WPGMZA.LeafletRectangle,Parent),WPGMZA.LeafletRectangle.prototype.getBounds=function(){var bounds=this.leafletFeature.getBounds(),topLeft=bounds.getNorthWest(),bounds=bounds.getSouthEast();return new WPGMZA.LatLngBounds(new WPGMZA.LatLng(topLeft.lat,topLeft.lng),new WPGMZA.LatLng(bounds.lat,bounds.lng))},WPGMZA.LeafletRectangle.prototype.setBounds=function(cornerA,cornerB){this.leafletFeature&&(this.cornerA=cornerA,this.cornerB=cornerB,cornerA=[],this.cornerA)&&this.cornerB&&(cornerA.push({lat:parseFloat(this.cornerA.lat),lng:parseFloat(this.cornerA.lng)}),cornerA.push({lat:parseFloat(this.cornerB.lat),lng:parseFloat(this.cornerB.lng)}),this.leafletFeature.setBounds(cornerA),this.trigger("change"))},WPGMZA.LeafletRectangle.prototype.setVisible=function(visible){visible?this.map&&this.map.leafletMap&&this.leafletFeature.addTo(this.map.leafletMap):this.leafletFeature.remove()},WPGMZA.LeafletRectangle.prototype.setOptions=function(options){Parent.prototype.setOptions.apply(this,arguments),"editable"in options&&WPGMZA.LeafletFeature.setEditable(this,options.editable)}}),jQuery(function($){WPGMZA.LeafletText=function(options){WPGMZA.Text.apply(this,arguments),this.options=options,this.overlay=new WPGMZA.LeafletTextOverlay(options)},WPGMZA.extend(WPGMZA.LeafletText,WPGMZA.Text),WPGMZA.LeafletText.prototype.refresh=function(){this.overlay&&this.overlay.refresh()},WPGMZA.LeafletText.prototype.setMap=function(map){this.overlay&&(map&&map.leafletMap?(this.overlay.leafletFeature?(this.overlay.remove(),this.overlay.leafletFeature.addTo(map.leafletMap)):(this.options.map=map,this.overlay=new WPGMZA.LeafletTextOverlay(this.options)),this.overlay.refresh()):this.overlay.remove())}}),jQuery(function($){WPGMZA.LeafletTextOverlay=function(options){options.position&&options.map&&(this.leafletFeature=L.marker(L.latLng({lat:options.position.lat,lng:options.position.lng}),{icon:L.divIcon({className:"wpgmza-leaflet-text-overlay-wrapper"+(options.class?" "+options.class:""),html:"",iconSize:[0,0],iconAnchor:[0,0]}),pane:options.map.getLayerGroupPane("text_layer_",0,"markerPane")}),this.styleOptions=options||{},this.leafletFeature.on("add",()=>{this.refresh()}),this.leafletFeature.addTo(options.map.leafletMap))},WPGMZA.LeafletTextOverlay.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=[];return labelStyles.push("width: fit-content"),labelStyles.push("font: bold "+this.styleOptions.fontSize+'px "Open Sans", "Arial Unicode MS", "sans-serif"'),labelStyles.push("color: "+this.styleOptions.fillColor),labelStyles.push("z-index: 10"),labelStyles.push("text-shadow: -1px -1px 0 "+this.styleOptions.strokeColor+", 1px -1px 0 "+this.styleOptions.strokeColor+", -1px 1px 0 "+this.styleOptions.strokeColor+", 1px 1px 0 "+this.styleOptions.strokeColor),this.styleOptions.opacity&&labelStyles.push("opacity: "+this.styleOptions.opacity),labelStyles.join("; ")},WPGMZA.LeafletTextOverlay.prototype.refresh=function(){this.styleOptions&&this.setText(this.styleOptions.text)},WPGMZA.LeafletTextOverlay.prototype.setPosition=function(position){this.leafletFeature&&this.leafletFeature.setLatLng({lat:position.lat,lng:position.lng})},WPGMZA.LeafletTextOverlay.prototype.setText=function(text){this.styleOptions&&(text&&(this.styleOptions.text=text),this.leafletFeature)&&(text=this.leafletFeature.getElement(),$(text).html(`<div class='wpgmza-leaflet-text-overlay' style='${this.getStyle()}'>${this.styleOptions.text||""}</div>`))},WPGMZA.LeafletTextOverlay.prototype.setFontSize=function(size){this.styleOptions&&(size=parseInt(size),this.styleOptions.fontSize=size)},WPGMZA.LeafletTextOverlay.prototype.setFillColor=function(color){this.styleOptions&&(color.match(/^#/)||(color="#"+color),this.styleOptions.fillColor=color)},WPGMZA.LeafletTextOverlay.prototype.setLineColor=function(color){this.styleOptions&&(color.match(/^#/)||(color="#"+color),this.styleOptions.strokeColor=color)},WPGMZA.LeafletTextOverlay.prototype.setOpacity=function(opacity){this.styleOptions&&(1<(opacity=parseFloat(opacity))?opacity=1:opacity<0&&(opacity=0),this.styleOptions.opacity=opacity)},WPGMZA.LeafletTextOverlay.prototype.remove=function(){this.leafletFeature&&this.leafletFeature.remove()}}),jQuery(function($){WPGMZA.LeafletThemeEditor=function(){var self=this;WPGMZA.EventDispatcher.call(this),this.element=$("#wpgmza-leaflet-theme-editor"),this.element.length?(this.mapElement=WPGMZA.maps[0].element,$(this.element).find('input[name="wpgmza_leaflet_tile_filter"]').on("change",function(event){self.onFilterChange(event.currentTarget)})):console.warn("No element to initialise theme editor on")},WPGMZA.extend(WPGMZA.LeafletThemeEditor,WPGMZA.EventDispatcher),WPGMZA.LeafletThemeEditor.prototype.onFilterChange=function(context){context instanceof HTMLInputElement&&(context=$(context).val(),this.mapElement)&&$(this.mapElement).css("--wpgmza-leaflet-tile-filter",context)}}),jQuery(function($){WPGMZA.LeafletThemePanel=function(){var self=this;this.element=$("#wpgmza-leaflet-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.LeafletThemePanel=this):console.warn("No element to initialise theme panel on")},WPGMZA.LeafletThemePanel.prototype.onThemePresetClick=function(event){var input;event.currentTarget&&(event=$(event.currentTarget).data("filter"))&&$('input[name="wpgmza_leaflet_tile_filter"]').length&&(input=$('input[name="wpgmza_leaflet_tile_filter"]').get(0)).wpgmzaCSSFilterInput&&(input.wpgmzaCSSFilterInput.parseFilters(event),WPGMZA.notification("Theme preset applied!",!1,'.grouping.open[data-group="map-settings-themes-presets"]',"top-right"))}}),jQuery(function($){var Parent=WPGMZA.Autocomplete;WPGMZA.LocationIQAutocomplete=function(element,options){Parent.call(this,element,options)},WPGMZA.LocationIQAutocomplete.prototype=Object.create(Parent.prototype),WPGMZA.LocationIQAutocomplete.prototype.constructor=WPGMZA.LocationIQAutocomplete,WPGMZA.LocationIQAutocomplete.API_URL="https://api.locationiq.com/v1/autocomplete",WPGMZA.LocationIQAutocomplete.prototype.autoload=function(){WPGMZA.Autocomplete.prototype.autoload.apply(this,arguments),this.getApiKey()&&(this.prepare(),this.setReady(!0))},WPGMZA.LocationIQAutocomplete.prototype.getApiKey=function(){let apikey=!1;return WPGMZA.settings&&(WPGMZA.settings.address_provider_api_key?apikey=WPGMZA.settings.address_provider_api_key:WPGMZA.settings.wpgmza_leaflet_locationiq_key&&(apikey=WPGMZA.settings.wpgmza_leaflet_locationiq_key)),apikey},WPGMZA.LocationIQAutocomplete.prototype.getProvider=function(){return WPGMZA.Autocomplete.Providers.LOCATION_IQ},WPGMZA.LocationIQAutocomplete.prototype.find=function(){WPGMZA.Autocomplete.prototype.find.apply(this,arguments);var apikey,term=this.getTerm();term&&(apikey=this.getApiKey())&&(this.setBusy(!0),term=new URLSearchParams({dedupe:"1",q:term.trim(),limit:8,key:apikey}),this.options&&this.options.country&&term.append("countrycodes",this.options.country.toLowerCase()),fetch(WPGMZA.LocationIQAutocomplete.API_URL+"?"+term.toString()).then(response=>response.ok?response.json():response.json().then(error=>{this.setBusy(!1)})).then(data=>{suggestions=(suggestions=data||[]).map(place=>({name:place.display_place,address:place.display_name,id:place.place_id,coordinates:{lat:place.lat,lon:place.lon},country:place.address.country||!1,type:!(!place.address||!place.address.country)&&place.address.country})),this.setItems(suggestions),this.setBusy(!1),this.present()}).catch(error=>{this.setBusy(!1)}))},WPGMZA.LocationIQAutocomplete.prototype.remapItem=function(item){return{display:item.name||!1,address:item.address||!1,country:item.country||!1,type:item.type?WPGMZA.capitalizeWords(item.type.replaceAll("_"," ")):"Location",coordinates:!!item.coordinates&&item.coordinates.lat+", "+item.coordinates.lon}}}),jQuery(function($){WPGMZA.LocationIQGeocoder=function(){},WPGMZA.LocationIQGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.LocationIQGeocoder.prototype.constructor=WPGMZA.LocationIQGeocoder,WPGMZA.LocationIQGeocoder.API_URL="https://us1.locationiq.com/v1/",WPGMZA.LocationIQGeocoder.Modes={ADDRESS:1,LATLNG:2},WPGMZA.LocationIQGeocoder.prototype.getApiKey=function(){let apikey=!1;return WPGMZA.settings&&(WPGMZA.settings.address_provider_api_key?apikey=WPGMZA.settings.address_provider_api_key:WPGMZA.settings.wpgmza_leaflet_locationiq_key&&(apikey=WPGMZA.settings.wpgmza_leaflet_locationiq_key)),apikey},WPGMZA.LocationIQGeocoder.prototype.getLatLngFromAddress=function(options,callback){return WPGMZA.LocationIQGeocoder.prototype.geocode(options,callback)},WPGMZA.LocationIQGeocoder.prototype.getAddressFromLatLng=function(options,callback){return WPGMZA.LocationIQGeocoder.prototype.geocode(options,callback)},WPGMZA.LocationIQGeocoder.prototype.geocode=function(options,callback){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{options.location&&(options.latLng=new WPGMZA.LatLng(options.location));let location=!1,mode=!1;if(options.address)location=options.address,mode=WPGMZA.LocationIQGeocoder.Modes.ADDRESS;else{if(!options.latLng)throw new Error("You must supply either a latLng or address");options.latLng instanceof WPGMZA.LatLng||(options.latLng=new WPGMZA.LatLng(options.latLng)),location=options.latLng,mode=WPGMZA.LocationIQGeocoder.Modes.LATLNG}var latLng=this.getApiKey();mode&&(latLng=new URLSearchParams({format:"json",key:latLng}),mode===WPGMZA.LocationIQGeocoder.Modes.ADDRESS?latLng.append("q",location):mode===WPGMZA.LocationIQGeocoder.Modes.LATLNG&&(latLng.append("lat",location.lat),latLng.append("lon",location.lng)),latLng=WPGMZA.LocationIQGeocoder.API_URL+(mode===WPGMZA.LocationIQGeocoder.Modes.ADDRESS?"search":"reverse")+"?"+latLng.toString(),fetch(latLng).then(response=>response.ok?response.json():response.json().then(error=>{})).then(data=>{var data=data||!1,formatted=[];if(data.length){for(var result of data)mode===WPGMZA.LocationIQGeocoder.Modes.ADDRESS?formatted.push({geometry:{location:new WPGMZA.LatLng({lat:parseFloat(result.lat),lng:parseFloat(result.lon)})},latLng:{lat:parseFloat(result.lat),lng:parseFloat(result.lon)},bounds:null,lat:result.lat,lng:result.lon}):mode===WPGMZA.LocationIQGeocoder.Modes.LATLNG&&(options.fullResult?formatted.push(result):formatted.push(result.display_name));0<formatted.length?callback(formatted,WPGMZA.Geocoder.SUCCESS):callback([],WPGMZA.Geocoder.ZERO_RESULTS)}else mode===WPGMZA.LocationIQGeocoder.Modes.LATLNG&&(options.fullResult?formatted.push(data):formatted.push(data.display_name),0<formatted.length)?callback(formatted,WPGMZA.Geocoder.SUCCESS):callback([],WPGMZA.Geocoder.ZERO_RESULTS)}).catch(error=>{callback(null,WPGMZA.Geocoder.FAIL)}))}}}),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="",this.writersblock._codeEditorActive)&&this.writersblock.onToolAction({command:"delegate_action_callback",value:"codeeditor"})):$("#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{enableWordCount:!0,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"));if(this.adjustSubMode||cloud_lat)WPGMZA.FeaturePanel.prototype.onSave.apply(self,arguments);else{if(WPGMZA.settings&&WPGMZA.settings.reduce_editor_geocoding){cloud_lng={lat:$(this.element).find("[data-ajax-name='lat']").val().trim(),lng:$(this.element).find("[data-ajax-name='lng']").val().trim()};if(0<cloud_lng.lat.length&&0<cloud_lng.lng.length)return void WPGMZA.FeaturePanel.prototype.onSave.apply(this,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)})}}}),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.tilesetPanel=new WPGMZA.TilesetPanel,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)}),$(document).on("heartbeat-tick",(event,response,status,jqXHR)=>{try{response&&response.nonces_expired&&response.wpgmza_nonce&&$('form[name="wpgmza_map_form"] input[name="nonce"]').val(response.wpgmza_nonce).trigger("change")}catch(ex){}});$("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",!1,".action-bar","top-left")}),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",!1,'.grouping.open[data-group="map-settings-shortcodes"]',"top-right"))}),$(document.body).find(".wpgmza-one-time-hint").each((index,hint)=>{const delay=$(hint).data("hint-delay");delay&&setTimeout(()=>{$(hint).addClass("show-hint"),setTimeout(()=>{$(hint).remove()},1e3*parseInt(delay))},1e3*parseInt(delay))}),0<$(document.body).find(".wpgmza-engine-switch-toolbar").length&&$(document.body).find(".wpgmza-engine-switch-toolbar .wpgmza-button[data-engine-switch-control]").on("click",function(event){var engineSwitchControl=$(this).attr("data-engine-switch-control");"apply"===engineSwitchControl?$.ajax(WPGMZA.ajaxurl,{method:"POST",data:{action:"wpgmza_persisten_notice_quick_action",relay:"swap_map_engine_from_toolbar",map_engine:$(document.body).find(".wpgmza-engine-switch-toolbar select").val(),wpgmza_security:WPGMZA.ajaxnonce},success:function(response){$('input[name="wpgmza_savemap"]').click()},error:function(){}}):"dismiss"===engineSwitchControl&&($(document.body).find(".wpgmza-engine-switch-toolbar").hide(),$.ajax(WPGMZA.ajaxurl,{method:"POST",data:{action:"wpgmza_persisten_notice_quick_action",relay:"swap_map_engine_from_toolbar_dismiss",wpgmza_security:WPGMZA.ajaxnonce},success:function(response){},error:function(){}}))}),this.initZoomSliderPreviews()},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:22,value:$("input[name='map_start_zoom']").val(),slide:function(event,ui){$("input[name='map_start_zoom']").val(ui.value),self.map.setZoom(ui.value),$("input[name='map_start_zoom']").parent().find("[data-zoom-hint]").text(""+ui.value)},create:function(event,ui){$("input[name='map_start_zoom']").parent().find("[data-zoom-hint]").text($("input[name='map_start_zoom']").val())}}),$("#zoom_level_mobile_override_enabled").on("change",function(){$(this).prop("checked")?$("#zoom_level_mobile_override_level").fadeIn():$("#zoom_level_mobile_override_level").fadeOut()}),$("#zoom_level_mobile_override_enabled").trigger("change"),$("#zoom-level-mobile-override-slider").slider({range:"max",min:1,max:22,value:$("input[name='zoom_level_mobile_override']").val(),slide:function(event,ui){$("input[name='zoom_level_mobile_override']").val(ui.value),$("input[name='zoom_level_mobile_override']").parent().find("[data-zoom-hint]").text(""+ui.value)},create:function(event,ui){$("input[name='zoom_level_mobile_override']").parent().find("[data-zoom-hint]").text($("input[name='zoom_level_mobile_override']").val())}}),$("#map_dimensions_mobile_override_enabled").on("change",function(){$(this).prop("checked")?$(".wpgmza-map-mobile-dimension-override").fadeIn():$(".wpgmza-map-mobile-dimension-override").fadeOut()}),$("#map_dimensions_mobile_override_enabled").trigger("change")},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("google-maps"!=WPGMZA.settings.engine)this.map.setMapType&&this.map.setMapType($(event.target).find('option[value="'+event.target.value+'"]').data("map-type"));else{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;if(!WPGMZA.InternalEngine.isLegacy()&&this.sidebarGroupings){if(this.sidebarGroupings.canOpenContextMenu()&&this.sidebarGroupings.openContextMenu(event))return;(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.wpgmzaAutocomplete&&element._wpgmzaAddressInput.wpgmzaAutocomplete.isReady())){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?(this.swapEnhancedAutocomplete(element),element._wpgmzaAddressInput&&element._wpgmzaAddressInput.wpgmzaAutocomplete.isReady()||($("#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.warn("Enhanced Autocomplete Error: "+results.error+" (Switching to internal)"),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.wpgmzaAutocomplete.isReady()&&(element._wpgmzaAddressInput.wpgmzaAutocomplete.autoload(),element._wpgmzaAddressInput.wpgmzaAutocomplete)&&element._wpgmzaAddressInput.wpgmzaAutocomplete.find(),$("#wpgmza_autocomplete_search_results").hide(),$("#wpgmza_autoc_disabled").hide()},WPGMZA.MapEditPage.prototype.initZoomSliderPreviews=function(){this._zoomPreviewState={type:!1,revert:!1,input:!1,wrap:!1,last:!1},$("input[data-zoom-slider-preview]").each((index,input)=>{const wrap=(input=$(input)).parent();wrap.on("mouseenter",()=>{this.bindZoomSliderPreview(wrap,input)}),wrap.on("mouseleave",()=>{this.unbindZoomSliderPreview()})})},WPGMZA.MapEditPage.prototype.bindZoomSliderPreview=function(wrap,input){this._zoomPreviewState.type&&this.unbindZoomSliderPreview(),this._zoomPreviewState.type=input.attr("id"),this._zoomPreviewState.revert=this.map.getZoom(),this._zoomPreviewState.input=input,this._zoomPreviewState.wrap=wrap;wrap=input.attr("data-zoom-slider-preview");$("#wpgmza-map-container").append(`<div class='zoom-slider-preview-frame'><span>${wrap} <span></span></span></div>`),this._zoomPreviewState.wrap.on("mousemove",()=>{this.onZoomSliderPreviewChange()})},WPGMZA.MapEditPage.prototype.unbindZoomSliderPreview=function(){this._zoomPreviewState&&(this._zoomPreviewState.wrap&&this._zoomPreviewState.wrap.off("mousemove"),this._zoomPreviewState.revert)&&($("input[name='map_start_zoom']").val(this._zoomPreviewState.revert),this.map.setZoom(this._zoomPreviewState.revert)),$(".zoom-slider-preview-frame").remove(),this._zoomPreviewState.type=!1,this._zoomPreviewState.revert=!1,this._zoomPreviewState.input=!1,this._zoomPreviewState.wrap=!1,this._zoomPreviewState.last=!1},WPGMZA.MapEditPage.prototype.onZoomSliderPreviewChange=function(event){var current;this._zoomPreviewState&&this._zoomPreviewState.input&&this._zoomPreviewState.input.val()&&(current=parseInt(this._zoomPreviewState.input.val()),this._zoomPreviewState.last!==current)&&(this._zoomPreviewState.last=current,this.map.setZoom(current),current=current>=this._zoomPreviewState.revert?current-this._zoomPreviewState.revert:-(this._zoomPreviewState.revert-current),$(".zoom-slider-preview-frame span span").text("("+(0<=current?"+"+current:current)+")"))},$(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),$(this.element).find(".wpgmza-boundary-input").length&&(this.boundaryInput=WPGMZA.BoundaryInput.createInstance($(this.element).find(".wpgmza-boundary-input"),{update:bounds=>{this.feature&&bounds&&bounds instanceof WPGMZA.LatLngBounds&&(this.feature.setBounds(new WPGMZA.LatLng(bounds.south,bounds.west),new WPGMZA.LatLng(bounds.north,bounds.east)),this.drawingManager)&&this.drawingManager.trigger("refresh")}}))},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),this.boundaryInput)&&this.boundaryInput.receive({lat:bounds.south,lng:bounds.west},{lat:bounds.north,lng:bounds.east})},WPGMZA.RectanglePanel.prototype.setTargetFeature=function(feature){WPGMZA.FeaturePanel.prototype.setTargetFeature.apply(this,arguments),feature?this.updateFields():this.boundaryInput&&this.boundaryInput.reset()},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($){var Parent=WPGMZA.Autocomplete;WPGMZA.NominatimAutocomplete=function(element,options){Parent.call(this,element,options)},WPGMZA.NominatimAutocomplete.prototype=Object.create(Parent.prototype),WPGMZA.NominatimAutocomplete.prototype.constructor=WPGMZA.NominatimAutocomplete,WPGMZA.NominatimAutocomplete.prototype.autoload=function(){WPGMZA.Autocomplete.prototype.autoload.apply(this,arguments),this.prepare(),this.setReady(!0)},WPGMZA.NominatimAutocomplete.prototype.getProvider=function(){return WPGMZA.Autocomplete.Providers.NOMINATIM},WPGMZA.NominatimAutocomplete.prototype.find=function(){WPGMZA.Autocomplete.prototype.find.apply(this,arguments);let term=this.getTerm();term&&(this.setBusy(!0),this.queryCache(term,locations=>{locations&&locations.length?(this.setItems(locations),this.setBusy(!1),this.present()):this.queryNominatim(term,locations=>{locations&&locations.length&&(this.setItems(locations),this.setBusy(!1),this.present())})}))},WPGMZA.NominatimAutocomplete.prototype.remapItem=function(item){return{display:item.displayName||!1,address:item.adrFormatAddress||!1,type:item.primaryTypeDisplayName?item.primaryTypeDisplayName.replaceAll("_"," "):"Location"}},WPGMZA.NominatimAutocomplete.prototype.queryCache=function(query,callback){WPGMZA.restAPI.call("/geocode-cache",{data:{query:JSON.stringify({location:query,options:{address:query}})},success:function(response,xhr,status){callback(response)},useCompressedPathVariable:!0})},WPGMZA.NominatimAutocomplete.prototype.queryNominatim=function(query,callback){var config=this.getConfig(query);this.options&&this.options.country&&(config.countrycodes=this.options.country),config._query=JSON.stringify({location:query,options:{address:query}}),WPGMZA.restAPI.call("/query-nominatim",{data:{data:config},success:function(response,xhr,status){response&&response.length?callback(response):callback(null)},error:function(response,xhr,status){callback(null)}})},WPGMZA.NominatimAutocomplete.prototype.getConfig=function(term){return{q:term,format:"json"}},WPGMZA.NominatimAutocomplete.prototype.remapItem=function(item){return{display:item.name||!1,address:item.display_name||!1,type:item.addresstype?WPGMZA.capitalizeWords(item.addresstype.replaceAll("_"," ")):"Location",coordinates:!(!item.lat||!item.lon)&&item.lat+", "+item.lon}}}),jQuery(function($){WPGMZA.NominatimGeocoder=function(){},WPGMZA.NominatimGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.NominatimGeocoder.prototype.constructor=WPGMZA.NominatimGeocoder,WPGMZA.NominatimGeocoder.prototype.getResponseFromCache=function(query,callback){WPGMZA.restAPI.call("/geocode-cache",{data:{query:JSON.stringify(query)},success:function(response,xhr,status){response&&response.lon&&(response.lng=response.lon),callback(response)},useCompressedPathVariable:!0})},WPGMZA.NominatimGeocoder.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),options._query&&(data._query=options._query),WPGMZA.restAPI.call("/query-nominatim",{data:{data:data},success:function(response,xhr,status){response&&response.length?callback(response):response&&response.error?callback(response.error,WPGMZA.Geocoder.FAIL):callback(null,WPGMZA.Geocoder.FAIL)},error:function(response,xhr,status){callback(null,WPGMZA.Geocoder.FAIL)}})},WPGMZA.NominatimGeocoder.prototype.clearCache=function(callback){$.ajax(WPGMZA.ajaxurl,{data:{action:"wpgmza_clear_nominatim_cache",wpgmza_security:WPGMZA.ajaxnonce||!1},method:"POST",success:function(response){callback(response)}})},WPGMZA.NominatimGeocoder.prototype.getLatLngFromAddress=function(options,callback){return WPGMZA.NominatimGeocoder.prototype.geocode(options,callback)},WPGMZA.NominatimGeocoder.prototype.getAddressFromLatLng=function(options,callback){return WPGMZA.NominatimGeocoder.prototype.geocode(options,callback)},WPGMZA.NominatimGeocoder.prototype.geocode=function(options,callback){var 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");options.latLng instanceof WPGMZA.LatLng||(options.latLng=new WPGMZA.LatLng(options.latLng)),location=options.latLng.toString(),finish=function(response,status){var address=response[0].display_name;options.fullResult&&(address=response[0]),callback([address],status)}}var latLng={location:location,options:options};this.getResponseFromCache(latLng,function(response){response.length?finish(response,WPGMZA.Geocoder.SUCCESS):self.getResponseFromNominatim($.extend(options,{address:location,_query:JSON.stringify({location:location,options:options})}),function(response,status){status==WPGMZA.Geocoder.FAIL?callback("string"==typeof response?response:null,WPGMZA.Geocoder.FAIL):0==response.length?callback([],WPGMZA.Geocoder.ZERO_RESULTS):finish(response,WPGMZA.Geocoder.SUCCESS)})})}}}),jQuery(function($){WPGMZA.LeafletGeocoder=function(){},WPGMZA.LeafletGeocoder.prototype=Object.create(WPGMZA.NominatimGeocoder.prototype),WPGMZA.LeafletGeocoder.prototype.constructor=WPGMZA.LeafletGeocoder}),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($){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",lineDashArray:"lineDash"};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),weight={color:WPGMZA.hexOpacityToString(options.strokeColor,opacity),width:weight},"lineDash"in options&&(weight.lineDash=options.lineDash.split(" ")),translated.stroke=new ol.style.Stroke(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.NominatimGeocoder.prototype),WPGMZA.OLGeocoder.prototype.constructor=WPGMZA.OLGeocoder}),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()}),this.on("infowindowcontentshift",function(event){self.autoResize(),self.panIntoView()})},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();if(!latLng)return!1;if(!Parent.prototype.open.call(this,map,feature))return!1;this.parent=map,this.overlay&&this.feature.map.olMap.removeOverlay(this.overlay),this.overlay=new ol.Overlay({element:this.element,stopEvent:!0,insertFirst:!1}),this.overlay.setPosition(ol.proj.fromLonLat([latLng.lng,latLng.lat])),self.feature.map.olMap.addOverlay(this.overlay),$(this.element).show(),this.setContent(this.content);let dataProps=this.compileWrapperAttributes();if(dataProps)for(var prop of dataProps=dataProps.split(" ")){var[prop,propValue]=prop.split("=");prop&&propValue&&$(this.element).attr(prop,propValue.replaceAll('"',""))}map=this.getStyleTypeClass();map&&$(this.element).addClass(map),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"),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}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)||self.panIntoView()}}),0!=numImages||inside(self.element,self.feature.map.element)||self.panIntoView())},WPGMZA.OLInfoWindow.prototype.panIntoView=function(){let canAutoPan=!0;var height;void 0!==this.feature._osDisableAutoPan&&this.feature._osDisableAutoPan&&(canAutoPan=!1,this.feature._osDisableAutoPan=!1),this.isPanIntoViewAllowed&&canAutoPan&&(height=$(this.element).height(),this.feature.map.animateNudge(0,.45*-(height+180),this.feature.getPosition()))},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($){var Parent;WPGMZA.OLMap=function(element,options){var self=this,options=(Parent.call(this,element),this.setOptions(options),this.settings.toOLViewOptions()),element=(this.mapType=options.mapType||"roadmap",this.tileLayers=this.getTileLayers(),$(this.element).html(""),options=this.extendNativeConfig(options),{target:$(element)[0],layers:this.tileLayers,view:this.getTileView(options)});function isSettingDisabled(value){return"yes"===value||!!value}if(this.isLegacy()||(options={collapsible:!0},void 0!==WPGMZA.tileServer&&WPGMZA.tileServer instanceof Object&&WPGMZA.tileServer.attribution&&"xyz"===WPGMZA.tileServer.type&&(options.attributions=WPGMZA.tileServer.attribution),options=new ol.control.Attribution(options),element.controls=ol.control.defaults.defaults({attribution:!1}).extend([options])),this.olMap=new ol.Map(element),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)if(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);else{this.olMap.on("wheel",function(event){if(!ol.events.condition.platformModifierKeyOnly(event))return self.showGestureOverlay(),!1});let getstureString=WPGMZA.localized_strings.use_ctrl_scroll_to_zoom;WPGMZA.isDeviceiOS()&&(getstureString=WPGMZA.localized_strings.use_ctrl_scroll_to_zoom_ios),this.gestureOverlay.text(getstureString)}this.olMap.getControls().forEach(function(control){control instanceof ol.control.Zoom&&1==WPGMZA.settings.wpgmza_settings_map_zoom&&self.olMap.removeControl(control)},this);options=this.settings.hasMutlilayerTileServer();options&&!isSettingDisabled(WPGMZA.settings.wpgmza_settings_map_type)&&this.addMapTypeControl(options,!isSettingDisabled(WPGMZA.settings.wpgmza_settings_map_full_screen_control)),isSettingDisabled(WPGMZA.settings.wpgmza_settings_map_full_screen_control)||this.olMap.addControl(new ol.control.FullScreen),this.settings.enable_scale_control&&this.enableScaleControl(!0),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),props=new WPGMZA.LatLng(latLng),nativeFeature.trigger({type:"click",coordinates:props}));return 0<featuresUnderPixel.length?void 0:void(event.target instanceof HTMLCanvasElement&&self.trigger({type:"click",latLng:latLng}))}if(isRight)return self.onRightClick(event)}),$(this.element).on("touchstart",function(event){try{let offsetX,offsetY;self.element&&(nestedCanvases=self.element.querySelectorAll("canvas"),touch=event.originalEvent.changedTouches[0],rect=event.originalEvent.target.getBoundingClientRect(),offsetX=touch.clientX-rect.left,offsetY=touch.clientY-rect.top,1<nestedCanvases.length)&&(diff=nestedCanvases[0].width/nestedCanvases[1].width,offsetX*=diff,offsetY*=diff);var nestedCanvases,touch,rect,diff,featuresUnderPixel=self.olMap.getFeaturesAtPixel([offsetX,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"))}),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.getTileLayers=function(){var layerGroup,projection,url=WPGMZA.settings.tile_server_url||"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",config=this.settings.configureTileServer(url,{authentication:WPGMZA.settings.open_layers_api_key||!1,map:this});if(config&&config.url){if(config.type&&"vector"===config.type&&"undefined"!=typeof olms)return layerGroup=new ol.layer.Group,olms.apply(layerGroup,config.url),[layerGroup];if(config.type&&"custom"===config.type&&config.custom)return layerGroup=[0,0,config.custom.width,config.custom.height],projection=new ol.proj.Projection({code:"custom-tile-map",units:"pixels",extent:layerGroup}),[new ol.layer.Image({source:new ol.source.ImageStatic({attributions:config.custom.attribution||"©",url:config.url,projection:projection,imageExtent:layerGroup,imageSize:config.custom.dimensions||null})})];var layers=[];if(config.dependencies)for(var dependency of config.dependencies)config.options.url=dependency.url,layers.push(new ol.layer.Tile({source:new ol.source.OSM(config.options)}));return config.options.url=config.url,layers.push(new ol.layer.Tile({source:new ol.source.OSM(config.options)})),layers}return[new ol.layer.Tile({source:new ol.source.OSM({url:url})})]},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,{size:this.olMap.getSize(),padding:[60,60,60,60]})},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.setMapType=function(type){if(this.mapType!==type){if(this.mapType=type,this.tileLayers)for(var layer of this.tileLayers)this.olMap.removeLayer(layer);this.tileLayers=this.getTileLayers();for(let layer of this.tileLayers.slice().reverse())this.olMap.getLayers().insertAt(0,layer);$(this.element).find(".ol-layer-button[data-map-type]").removeClass("selected"),$(this.element).find('.ol-layer-button[data-map-type="'+type+'"]').addClass("selected")}},WPGMZA.OLMap.prototype.getMapType=function(){return this.mapType||"roadmap"},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):marker.featureInSource||(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.resetBounds=function(){var latlng=new WPGMZA.LatLng(this.settings.map_start_lat,this.settings.map_start_lng);this.panTo(latlng,this.settings.map_start_zoom)},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)},WPGMZA.OLMap.prototype.addMapTypeControl=function(config,hasFullscreen){if(this.olMap&&config&&config.layers&&2<=config.layers.length){var index,container=document.createElement("div");for(index in container.classList.add("ol-control"),container.classList.add("ol-unselectable"),container.classList.add("ol-control-layers"),hasFullscreen&&container.classList.add("ol-has-fullscreen"),config.layers){const layer=config.layers[index];var label=WPGMZA.localized_strings["map_type_"+layer]?WPGMZA.localized_strings["map_type_"+layer]:WPGMZA.capitalizeWords(layer),button=document.createElement("button");button.innerText=label,button.classList.add("ol-layer-button"),button.classList.add("ol-layer-button"),button.setAttribute("type","button"),button.setAttribute("data-map-type",layer),config.active&&config.active===layer&&button.classList.add("selected"),container.append(button),button.addEventListener("click",event=>{event.preventDefault(),this.setMapType(layer)})}hasFullscreen=new ol.control.Control({element:container});this.olMap.addControl(hasFullscreen)}},WPGMZA.OLMap.prototype.enableScaleControl=function(enable){this.olMap&&(this.scaleControl&&(this.olMap.removeControl(this.scaleControl),this.scaleControl=null),enable)&&(enable=this.settings.store_locator_distance==WPGMZA.Distance.MILES?"imperial":"metric",this.scaleControl=new ol.control.ScaleLine({units:enable}),this.olMap.addControl(this.scaleControl))},WPGMZA.OLMap.prototype.isLegacy=function(){return!(!WPGMZA.settings||"open-layers"!==WPGMZA.settings.engine)}}),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.settings&&WPGMZA.settings.olMarkerMode&&WPGMZA.settings.olMarkerMode===WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER:WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT,"open-layers"!=WPGMZA.settings.engine&&"open-layers-latest"!=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)),label=label.replaceAll("&amp;","&"),this.label.html(label)):this.label&&($(this.element).find(".ol-marker-label").remove(),this.label=!1)},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(WPGMZA.OLMarker.hiddenVectorLayerStyle):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($){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($){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($){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;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.setVisible=function(visible){this.layer.setVisible(!!visible)},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.OLPolyline=function(options,olFeature){if(Parent.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.isProVersion()?WPGMZA.ProPolyline: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.setVisible=function(visible){this.layer.setVisible(!!visible)},WPGMZA.OLPolyline.prototype.setOptions=function(options){Parent.prototype.setOptions.apply(this,arguments),"editable"in options&&WPGMZA.OLFeature.setInteractionsOnFeature(this,options.editable)}}),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.setBounds=function(cornerA,cornerB){this.olFeature&&(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.olFeature.setGeometry(new ol.geom.Polygon(cornerA)),this.trigger("change"))},WPGMZA.OLRectangle.prototype.setVisible=function(visible){this.layer.setVisible(!!visible)},WPGMZA.OLRectangle.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.options=options,this.overlay=new WPGMZA.OLTextOverlay(options)},WPGMZA.extend(WPGMZA.OLText,WPGMZA.Text),WPGMZA.OLText.prototype.refresh=function(){this.overlay&&this.overlay.refresh()},WPGMZA.OLText.prototype.setMap=function(map){this.overlay&&(map&&map.olMap?this.overlay.olMap?(this.overlay.remove(),map.olMap.addLayer(this.overlay.layer)):(this.options.map=map,this.overlay=new WPGMZA.OLTextOverlay(this.options)):this.overlay.remove())}}),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&&(this.styleOptions.text=text)},WPGMZA.OLTextOverlay.prototype.setFontSize=function(size){this.styleOptions&&(size=parseInt(size),this.styleOptions.fontSize=size)},WPGMZA.OLTextOverlay.prototype.setFillColor=function(color){this.styleOptions&&(color.match(/^#/)||(color="#"+color),this.styleOptions.fillColor=color)},WPGMZA.OLTextOverlay.prototype.setLineColor=function(color){this.styleOptions&&(color.match(/^#/)||(color="#"+color),this.styleOptions.strokeColor=color)},WPGMZA.OLTextOverlay.prototype.setOpacity=function(opacity){this.styleOptions&&(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),WPGMZA.notification("Theme preset applied!",!1,'.grouping.open[data-group="map-settings-themes-presets"]',"top-right"))}}),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 2.0 or above.")),$.fn.dataTable.Api&&$.fn.dataTable.versionCheck&&!$.fn.dataTable.versionCheck("2.0.0")&&$.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,!(response.data instanceof Array)&&response.data instanceof Object&&(response.data=Object.keys(response.data).map(key=>response.data[key])),!(response.meta instanceof Array)&&response.meta instanceof Object&&(response.meta=Object.keys(response.meta).map(key=>response.meta[key])),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.pageLength=parseInt(WPGMZA.settings.wpgmza_default_items)),WPGMZA.settings&&WPGMZA.settings.enable_datatables_enter_search&&(options.search={return:!0}),options.lengthMenu=[[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_features",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)}),$(element).on("click","[data-fit-feature-bounds-id]",function(event){self.onFitBounds(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){}},WPGMZA.InternalEngine.isLegacy()||(options.pageLength=10),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(featureId){try{var feature=map[`get${WPGMZA.capitalizeWords(self.featureType)}ByID`](featureId);feature&&map["remove"+WPGMZA.capitalizeWords(self.featureType)](feature)}catch(ex){}}),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()}})})},WPGMZA.AdminFeatureDataTable.prototype.onFitBounds=function(event){event=null==event.currentTarget?event:$(event.currentTarget).attr("data-fit-feature-bounds-id");if(event)try{var feature=WPGMZA.mapEditPage.map[`get${WPGMZA.capitalizeWords(this.featureType)}ByID`](event);if(feature)if(feature instanceof WPGMZA.Polyline||feature instanceof WPGMZA.Polygon){var bounds=new WPGMZA.LatLngBounds,coordinates=feature.getGeometry();if(coordinates){for(var coordinate of coordinates)bounds.extend(coordinate);WPGMZA.mapEditPage.map.fitBounds(bounds)}}else if(feature instanceof WPGMZA.Rectangle||void 0!==WPGMZA.Imageoverlay&&feature instanceof WPGMZA.Imageoverlay){const bounds=feature.getBounds();WPGMZA.mapEditPage.map.fitBounds(bounds)}else if(feature instanceof WPGMZA.Circle){var center=feature.getPosition();WPGMZA.mapEditPage.map.setCenter(center)}else if(feature instanceof WPGMZA.Pointlabel){const center=feature.getPosition();WPGMZA.mapEditPage.map.setCenter(center)}else if(void 0!==WPGMZA.Heatmap&&feature instanceof WPGMZA.Heatmap){const bounds=new WPGMZA.LatLngBounds,coordinates=feature.getGeometry();if(coordinates){for(let coordinate of coordinates)bounds.extend(coordinate);WPGMZA.mapEditPage.map.fitBounds(bounds)}}}catch(ex){console.log(ex)}}}),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).on("mousedown","tr td",function(event){var tableColumn=$(event.target);if(!(0<tableColumn.find("button,input").length)&&!tableColumn.hasClass("wpgmza-button")&&0<tableColumn.parent().find("button[data-map-id]").length){tableColumn=tableColumn.parent().find("button[data-map-id]").data("map-id");if(tableColumn){var editUrl=window.location.href+"&action=edit&map_id="+tableColumn;switch(event.which){case 1:window.location.href=editUrl;break;case 2:window.open(editUrl)}}}}),$(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");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){confirm(WPGMZA.localized_strings.map_delete_prompt_text)&&(event=$(event.target).attr("data-map-id"),WPGMZA.restAPI.call("/maps/",{method:"DELETE",data:{id:event},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")}});
function CanvasLayerOptions(){}
CanvasLayerOptions.prototype.animate;
CanvasLayerOptions.prototype.map;
CanvasLayerOptions.prototype.paneName;
CanvasLayerOptions.prototype.resizeHandler;
CanvasLayerOptions.prototype.resolutionScale;
CanvasLayerOptions.prototype.updateHandler;
function CanvasLayer(opt_options){
this.isAdded_=false;
this.isAnimated_=false;
this.paneName_=CanvasLayer.DEFAULT_PANE_NAME_;
this.updateHandler_=null;
this.resizeHandler_=null;
this.topLeft_=null;
this.centerListener_=null;
this.resizeListener_=null;
this.needsResize_=true;
this.requestAnimationFrameId_=null;
var canvas=document.createElement('canvas');
canvas.style.position='absolute';
canvas.style.top=0;
canvas.style.left=0;
canvas.style.pointerEvents='none';
this.canvas=canvas;
this.canvasCssWidth_=300;
this.canvasCssHeight_=150;
this.resolutionScale_=1;
function simpleBindShim(thisArg, func){
return function(){ func.apply(thisArg); };}
this.repositionFunction_=simpleBindShim(this, this.repositionCanvas_);
this.resizeFunction_=simpleBindShim(this, this.resize_);
this.requestUpdateFunction_=simpleBindShim(this, this.update_);
if(opt_options){
this.setOptions(opt_options);
}}
CanvasLayer.__EXTENSION_STATUS={
attempts:0,
max:10,
delay:500,
extended:false
};
function __canvasLayerPrototypeExtension(){
CanvasLayer.__EXTENSION_STATUS.attempts +=1;
if(typeof window.google!=='undefined'&&typeof window.google.maps!=='undefined'&&typeof window.google.maps.OverlayView!=='undefined'){
CanvasLayer.__EXTENSION_STATUS.extended=true;
if(window.google)
CanvasLayer.prototype=new google.maps.OverlayView();
CanvasLayer.DEFAULT_PANE_NAME_='overlayLayer';
CanvasLayer.CSS_TRANSFORM_=(function(){
var div=document.createElement('div');
var transformProps=[
'transform',
'WebkitTransform',
'MozTransform',
'OTransform',
'msTransform'
];
for (var i=0; i < transformProps.length; i++){
var prop=transformProps[i];
if(div.style[prop]!==undefined){
return prop;
}}
return transformProps[0];
})();
CanvasLayer.prototype.requestAnimFrame_ =
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(callback){
return window.setTimeout(callback, 1000 / 60);
};
CanvasLayer.prototype.cancelAnimFrame_ =
window.cancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.oCancelAnimationFrame ||
window.msCancelAnimationFrame ||
function(requestId){};
CanvasLayer.prototype.setOptions=function(options){
if(options.animate!==undefined){
this.setAnimate(options.animate);
}
if(options.paneName!==undefined){
this.setPaneName(options.paneName);
}
if(options.updateHandler!==undefined){
this.setUpdateHandler(options.updateHandler);
}
if(options.resizeHandler!==undefined){
this.setResizeHandler(options.resizeHandler);
}
if(options.resolutionScale!==undefined){
this.setResolutionScale(options.resolutionScale);
}
if(options.map!==undefined){
this.setMap(options.map);
}};
CanvasLayer.prototype.setAnimate=function(animate){
this.isAnimated_ = !!animate;
if(this.isAnimated_){
this.scheduleUpdate();
}};
CanvasLayer.prototype.isAnimated=function(){
return this.isAnimated_;
};
CanvasLayer.prototype.setPaneName=function(paneName){
this.paneName_=paneName;
this.setPane_();
};
CanvasLayer.prototype.getPaneName=function(){
return this.paneName_;
};
CanvasLayer.prototype.setPane_=function(){
if(!this.isAdded_){
return;
}
var panes=this.getPanes();
if(!panes[this.paneName_]){
throw new Error('"' + this.paneName_ + '" is not a valid MapPane name.');
}
panes[this.paneName_].appendChild(this.canvas);
};
CanvasLayer.prototype.setResizeHandler=function(opt_resizeHandler){
this.resizeHandler_=opt_resizeHandler;
};
CanvasLayer.prototype.setResolutionScale=function(scale){
if(typeof scale==='number'){
this.resolutionScale_=scale;
this.resize_();
}};
CanvasLayer.prototype.setUpdateHandler=function(opt_updateHandler){
this.updateHandler_=opt_updateHandler;
};
CanvasLayer.prototype.onAdd=function(){
if(this.isAdded_){
return;
}
this.isAdded_=true;
this.setPane_();
this.resizeListener_=google.maps.event.addListener(this.getMap(),
'resize', this.resizeFunction_);
this.centerListener_=google.maps.event.addListener(this.getMap(),
'center_changed', this.repositionFunction_);
this.resize_();
this.repositionCanvas_();
};
CanvasLayer.prototype.onRemove=function(){
if(!this.isAdded_){
return;
}
this.isAdded_=false;
this.topLeft_=null;
this.canvas.parentElement.removeChild(this.canvas);
if(this.centerListener_){
google.maps.event.removeListener(this.centerListener_);
this.centerListener_=null;
}
if(this.resizeListener_){
google.maps.event.removeListener(this.resizeListener_);
this.resizeListener_=null;
}
if(this.requestAnimationFrameId_){
this.cancelAnimFrame_.call(window, this.requestAnimationFrameId_);
this.requestAnimationFrameId_=null;
}};
CanvasLayer.prototype.resize_=function(){
if(!this.isAdded_){
return;
}
var map=this.getMap();
var mapWidth=map.getDiv().getElementsByTagName('div')[0].offsetWidth;
var mapHeight=map.getDiv().getElementsByTagName('div')[0].offsetHeight;
var newWidth=mapWidth * this.resolutionScale_;
var newHeight=mapHeight * this.resolutionScale_;
var oldWidth=this.canvas.width;
var oldHeight=this.canvas.height;
if(oldWidth!==newWidth||oldHeight!==newHeight){
this.canvas.width=newWidth;
this.canvas.height=newHeight;
this.needsResize_=true;
this.scheduleUpdate();
}
if(this.canvasCssWidth_!==mapWidth ||
this.canvasCssHeight_!==mapHeight){
this.canvasCssWidth_=mapWidth;
this.canvasCssHeight_=mapHeight;
this.canvas.style.width=mapWidth + 'px';
this.canvas.style.height=mapHeight + 'px';
}};
CanvasLayer.prototype.draw=function(){
this.repositionCanvas_();
};
CanvasLayer.prototype.repositionCanvas_=function(){
var map=this.getMap();
var top=map.getBounds().getNorthEast().lat();
var center=map.getCenter();
var scale=Math.pow(2, map.getZoom());
var left=center.lng() - (this.canvasCssWidth_ * 180) / (256 * scale);
this.topLeft_=new google.maps.LatLng(top, left);
var projection=this.getProjection();
var divCenter=projection.fromLatLngToDivPixel(center);
var offsetX=-Math.round(this.canvasCssWidth_ / 2 - divCenter.x);
var offsetY=-Math.round(this.canvasCssHeight_ / 2 - divCenter.y);
this.canvas.style[CanvasLayer.CSS_TRANSFORM_]='translate(' +
offsetX + 'px,' + offsetY + 'px)';
this.scheduleUpdate();
};
CanvasLayer.prototype.update_=function(){
this.requestAnimationFrameId_=null;
if(!this.isAdded_){
return;
}
if(this.isAnimated_){
this.scheduleUpdate();
}
if(this.needsResize_&&this.resizeHandler_){
this.needsResize_=false;
this.resizeHandler_();
}
if(this.updateHandler_){
this.updateHandler_();
}};
CanvasLayer.prototype.getTopLeft=function(){
return this.topLeft_;
};
CanvasLayer.prototype.scheduleUpdate=function(){
if(this.isAdded_&&!this.requestAnimationFrameId_){
this.requestAnimationFrameId_ =
this.requestAnimFrame_.call(window, this.requestUpdateFunction_);
}};}else{
if(CanvasLayer.__EXTENSION_STATUS.attempts < CanvasLayer.__EXTENSION_STATUS.max){
setTimeout(()=> {
__canvasLayerPrototypeExtension();
}, CanvasLayer.__EXTENSION_STATUS.delay);
}}
}
__canvasLayerPrototypeExtension();