var asl_gdpr=function (e){
window.asl_async_callback=function (){
asl_store_locator();
};
function t(){
0;
var e=document.createElement("script");
(e.type="text/javascript"),
(e.src =
"https://maps.googleapis.com/maps/api/js?libraries=places,drawing&callback=asl_async_callback&key=" +
asl_configuration.api_key),
document.body.appendChild(e);
}
function o(){
window.localStorage&&window.localStorage.setItem("asl-gdpr", 1),
(asl_configuration.gdpr = !1),
t(),
jQuery(".asl-cont #sl-btn-gdpr").parent().parent().parent().remove();
}
e
? t()
: (jQuery(".asl-cont #sl-btn-gdpr").bind("click", o),
window.localStorage &&
"1"==window.localStorage.getItem("asl-gdpr") &&
o());
};
function asl_store_locator(){
if("1"!=asl_configuration.gdpr)
if(window.google&&google.maps){
if((2 <=jQuery(".storelocator-main").length &&
console.warn("Store Locator Error! Multiple instances of store locator loaded on the page."
),
window._asl_map_customize||(window._asl_map_customize=null),
!asl_configuration.is_loaded)
){
asl_configuration.is_loaded = !0;
var asl_locator=function (){},
do_geocoding=null,
f,
g,
head,
insertBefore,
asl_drawing =
(jQuery.fn.adropdown ||
((f=this),
(g=function (o, e){
"use strict";
var c =
(e=e)&&"object"==typeof e&&"default" in e
? e
: { default: e };
function i(e, t){
for (var o=0; o < t.length; o++){
var i=t[o];
(i.enumerable=i.enumerable||!1),
(i.configurable = !0),
"value" in i&&(i.writable = !0),
Object.defineProperty(e, i.key, i);
}}
function a(e, t, o){
return t&&i(e.prototype, t), o&&i(e, o), e;
}
function s(){
return (s =
Object.assign ||
function (e){
for (var t=1; t < arguments.length; t++){
var o,
i=arguments[t];
for (o in i)
Object.prototype.hasOwnProperty.call(i, o) &&
(e[o]=i[o]);
}
return e;
}).apply(this, arguments);
}
var r="bs4_transitionend",
l={
TRANSITION_END: r,
getUID: function (e){
for (
;
(e +=~~(1e6 * Math.random())),
document.getElementById(e);
);
return e;
},
getSelectorFromElement: function (e){
var t,
o=e.getAttribute("data-target");
(o&&"#"!==o) ||
(o =
(t=e.getAttribute("href"))&&"#"!==t
? t.trim()
: "");
try {
return document.querySelector(o) ? o:null;
} catch (e){
return null;
}},
getTransitionDurationFromElement: function (e){
if(!e) return 0;
var t=c.default(e).css("transition-duration"),
e=c.default(e).css("transition-delay"),
o=parseFloat(t),
i=parseFloat(e);
return o||i
? ((t=t.split(",")[0]),
(e=e.split(",")[0]),
1e3 * (parseFloat(t) + parseFloat(e)))
: 0;
},
reflow: function (e){
return e.offsetHeight;
},
triggerTransitionEnd: function (e){
c.default(e).trigger(r);
},
supportsTransitionEnd: function (){
return Boolean(r);
},
isElement: function (e){
return (e[0]||e).nodeType;
},
typeCheckConfig: function (e, t, o){
for (var i in o)
if(Object.prototype.hasOwnProperty.call(o, i)){
var a=o[i],
n=t[i],
n =
n&&l.isElement(n)
? "element"
: null===n||void 0===n
? "" + n
: {}.toString
.call(n)
.match(/\s([a-z]+)/i)[1]
.toLowerCase();
if(!new RegExp(a).test(n))
throw new Error(
e.toUpperCase() +
': Option "' +
i +
'" provided type "' +
n +
'" but expected type "' +
a +
'".'
);
}},
findShadowRoot: function (e){
return document.documentElement.attachShadow
? "function"==typeof e.getRootNode
? (t=e.getRootNode()) instanceof ShadowRoot
? t
: null
: e instanceof ShadowRoot
? e
: e.parentNode
? l.findShadowRoot(e.parentNode)
: null
: null;
var t;
},
jQueryDetection: function (){
void 0===c.default &&
console.log("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript."
);
var e=c.default.fn.jquery.split(" ")[0].split(".");
((e[0] < 2&&e[1] < 9) ||
(1===e[0]&&9===e[1]&&e[2] < 1) ||
4 <=e[0]) &&
console.log("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0"
);
},
},
f =
(l.jQueryDetection(),
(c.default.fn.emulateTransitionEnd=function (e){
var t=this,
o = !1;
return (
c.default(this).one(r, function (){
o = !0;
}),
setTimeout(function (){
o||l.triggerTransitionEnd(t);
}, e),
this
);
}),
(c.default.event.special.bs4_transitionend={
bindType: r,
delegateType: r,
handle: function (e){
if(c.default(e.target).is(this))
return e.handleObj.handler.apply(this, arguments);
},
}),
"colision"),
g="bs.colision",
m=c.default.fn[f],
v="show",
y="colision",
w="collapsing",
b="colisiond",
k="width",
C='[data-toggle="colision"]',
x={ toggle: !0, parent: "" },
L={ toggle: "boolean", parent: "(string|element)" },
S =
(((e=n.prototype).toggle=function (){
c.default(this._element).hasClass(v)
? this.hide()
: this.show();
}),
(e.show=function (){
var e,
t,
o,
i,
a=this;
this._isTransitioning ||
c.default(this._element).hasClass(v) ||
((e =
this._parent &&
0===(e=[].slice
.call(this._parent.querySelectorAll(".show, .collapsing"
)
)
.filter(function (e){
return "string"==typeof a._config.parent
? e.getAttribute("data-parent")===a._config.parent
: e.classList.contains(y);
})).length
? null
: e) &&
(i=c.default(e).not(this._selector).data(g)) &&
i._isTransitioning) ||
((o=c.default.Event("show.bs.colision")),
c.default(this._element).trigger(o),
o.isDefaultPrevented() ||
(e &&
(n._jQueryInterface.call(c.default(e).not(this._selector),
"hide"
),
i||c.default(e).data(g, null)),
(t=this._getDimension()),
c.default(this._element).removeClass(y).addClass(w),
(this._element.style[t]=0),
this._triggerArray.length &&
c
.default(this._triggerArray)
.removeClass(b)
.attr("aria-expanded", !0),
this.setTransitioning(!0),
(o="scroll" + (t[0].toUpperCase() + t.slice(1))),
(i=l.getTransitionDurationFromElement(this._element
)),
c
.default(this._element)
.one(l.TRANSITION_END, function (){
c
.default(a._element)
.removeClass(w)
.addClass("colision show"),
(a._element.style[t]=""),
a.setTransitioning(!1),
c
.default(a._element)
.trigger("shown.bs.colision");
})
.emulateTransitionEnd(i),
(this._element.style[t]=this._element[o] + "px")));
}),
(e.hide=function (){
var e=this;
if(!this._isTransitioning &&
c.default(this._element).hasClass(v)
){
var t=c.default.Event("hide.bs.colision");
if((c.default(this._element).trigger(t),
!t.isDefaultPrevented())
){
var t=this._getDimension(),
o =
((this._element.style[t] =
this._element.getBoundingClientRect()[t] +
"px"),
l.reflow(this._element),
c
.default(this._element)
.addClass(w)
.removeClass("colision show"),
this._triggerArray.length);
if(0 < o)
for (var i=0; i < o; i++){
var a=this._triggerArray[i],
n=l.getSelectorFromElement(a);
null!==n &&
(c
.default([].slice.call(document.querySelectorAll(n))
)
.hasClass(v) ||
c
.default(a)
.addClass(b)
.attr("aria-expanded", !1));
}
this.setTransitioning(!0),
(this._element.style[t]="");
t=l.getTransitionDurationFromElement(this._element);
c.default(this._element)
.one(l.TRANSITION_END, function (){
e.setTransitioning(!1),
c
.default(e._element)
.removeClass(w)
.addClass(y)
.trigger("hidden.bs.colision");
})
.emulateTransitionEnd(t);
}}
}),
(e.setTransitioning=function (e){
this._isTransitioning=e;
}),
(e.dispose=function (){
c.default.removeData(this._element, g),
(this._config=null),
(this._parent=null),
(this._element=null),
(this._triggerArray=null),
(this._isTransitioning=null);
}),
(e._getConfig=function (e){
return (
((e=s({}, x, e)).toggle=Boolean(e.toggle)),
l.typeCheckConfig(f, e, L),
e
);
}),
(e._getDimension=function (){
return c.default(this._element).hasClass(k)
? k
: "height";
}),
(e._getParent=function (){
var e,
o=this,
t =
(l.isElement(this._config.parent)
? ((e=this._config.parent),
void 0!==this._config.parent.jquery &&
(e=this._config.parent[0]))
: (e=document.querySelector(this._config.parent)),
'[data-toggle="colision"][data-parent="' +
this._config.parent +
'"]'),
t=[].slice.call(e.querySelectorAll(t));
return (
c.default(t).each(function (e, t){
o._addAriaAndaCollapsedClass(n._getTargetFromElement(t),
[t]
);
}),
e
);
}),
(e._addAriaAndaCollapsedClass=function (e, t){
e=c.default(e).hasClass(v);
t.length &&
c
.default(t)
.toggleClass(b, !e)
.attr("aria-expanded", e);
}),
(n._getTargetFromElement=function (e){
e=l.getSelectorFromElement(e);
return e ? document.querySelector(e):null;
}),
(n._jQueryInterface=function (i){
return this.each(function (){
var e=c.default(this),
t=e.data(g),
o=s(
{},
x,
e.data(),
"object"==typeof i&&i ? i:{}
);
if((!t &&
o.toggle &&
"string"==typeof i &&
/show|hide/.test(i) &&
(o.toggle = !1),
t||((t=new n(this, o)), e.data(g, t)),
"string"==typeof i)
){
if(void 0===t[i])
throw new TypeError('No method named "' + i + '"');
t[i]();
}});
}),
a(n, null, [
{
key: "VERSION",
get: function (){
return "4.6.1";
},
},
{
key: "Default",
get: function (){
return x;
},
},
]),
n);
function n(t, e){
(this._isTransitioning = !1),
(this._element=t),
(this._config=this._getConfig(e)),
(this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="colision"][href="#' +
t.id +
'"],[data-toggle="colision"][data-target="#' +
t.id +
'"]'
)
));
for (
var o=[].slice.call(document.querySelectorAll(C)),
i=0,
a=o.length;
i < a;
i++
){
var n=o[i],
s=l.getSelectorFromElement(n),
r=[].slice
.call(document.querySelectorAll(s))
.filter(function (e){
return e===t;
});
null!==s &&
0 < r.length &&
((this._selector=s), this._triggerArray.push(n));
}
(this._parent=this._config.parent
? this._getParent()
: null),
this._config.parent ||
this._addAriaAndaCollapsedClass(this._element,
this._triggerArray
),
this._config.toggle&&this.toggle();
}
c
.default(document)
.on("click.bs.colision.data-api", C, function (e){
"A"===e.currentTarget.tagName&&e.preventDefault();
var o=c.default(this),
e=l.getSelectorFromElement(this),
e=[].slice.call(document.querySelectorAll(e));
c.default(e).each(function (){
var e=c.default(this),
t=e.data(g) ? "toggle":o.data();
S._jQueryInterface.call(e, t);
});
}),
(c.default.fn[f]=S._jQueryInterface),
(c.default.fn[f].Constructor=S),
(c.default.fn[f].noConflict=function (){
return (c.default.fn[f]=m), S._jQueryInterface;
});
var M =
"undefined"!=typeof window &&
"undefined"!=typeof document &&
"undefined"!=typeof navigator,
P=(function (){
for (
var e=["Edge", "Trident", "Firefox"], t=0;
t < e.length;
t +=1
)
if(M&&0 <=navigator.userAgent.indexOf(e[t])) return 1;
return 0;
})(),
T =
M&&window.Promise
? function (e){
var t = !1;
return function (){
t ||
((t = !0),
window.Promise.resolve().then(function (){
(t = !1), e();
}));
};}
: function (e){
var t = !1;
return function (){
t ||
((t = !0),
setTimeout(function (){
(t = !1), e();
}, P));
};};
function I(e){
return e&&"[object Function]"==={}.toString.call(e);
}
function d(e, t){
if(1!==e.nodeType) return [];
e=e.ownerDocument.defaultView.getComputedStyle(e, null);
return t ? e[t]:e;
}
function O(e){
return "HTML"===e.nodeName ? e:e.parentNode||e.host;
}
function z(e){
if(!e) return document.body;
switch (e.nodeName){
case "HTML":
case "BODY":
return e.ownerDocument.body;
case "#document":
return e.body;
}
var t=d(e),
o=t.overflow,
i=t.overflowX,
t=t.overflowY;
return /(auto|scroll|overlay)/.test(o + t + i) ? e:z(O(e));
}
function E(e){
return e&&e.referenceNode ? e.referenceNode:e;
}
var B =
M &&
!(!window.MSInputMethodContext||!document.documentMode),
F=M&&/MSIE 10/.test(navigator.userAgent);
function D(e){
return 11===e ? B:(10!==e&&B)||F;
}
function A(e){
if(!e) return document.documentElement;
for (
var t=D(10) ? document.body:null,
o=e.offsetParent||null;
o===t&&e.nextElementSibling;
)
o=(e=e.nextElementSibling).offsetParent;
var i=o&&o.nodeName;
return i&&"BODY"!==i&&"HTML"!==i
? -1!==["TH", "TD", "TABLE"].indexOf(o.nodeName) &&
"static"===d(o, "position")
? A(o)
: o
: (e ? e.ownerDocument:document).documentElement;
}
function N(e){
return null!==e.parentNode ? N(e.parentNode):e;
}
function j(e, t){
if(!(e&&e.nodeType&&t && t.nodeType))
return document.documentElement;
var o =
e.compareDocumentPosition(t) &
Node.DOCUMENT_POSITION_FOLLOWING,
i=o ? e:t,
o=o ? t:e,
a=document.createRange();
a.setStart(i, 0), a.setEnd(o, 0);
a=a.commonAncestorContainer;
if((e!==a&&t!==a)||i.contains(o))
return "BODY"===(o=(i=a).nodeName) ||
("HTML"!==o&&A(i.firstElementChild)!==i)
? A(a)
: a;
o=N(e);
return o.host ? j(o.host, t):j(e, N(t).host);
}
function V(e, t){
var t =
"top"===(1 < arguments.length&&void 0!==t ? t:"top")
? "scrollTop"
: "scrollLeft",
o=e.nodeName;
return "BODY"===o||"HTML"===o
? ((o=e.ownerDocument.documentElement),
(e.ownerDocument.scrollingElement||o)[t])
: e[t];
}
function R(e, t){
var t="x"===t ? "Left":"Top",
o="Left"==t ? "Right":"Bottom";
return (
parseFloat(e["border" + t + "Width"]) +
parseFloat(e["border" + o + "Width"])
);
}
function W(e, t, o, i){
return Math.max(t["offset" + e],
t["scroll" + e],
o["client" + e],
o["offset" + e],
o["scroll" + e],
D(10)
? parseInt(o["offset" + e]) +
parseInt(
i["margin" + ("Height"===e ? "Top":"Left")]
) +
parseInt(
i["margin" + ("Height"===e ? "Bottom":"Right")]
)
: 0
);
}
function H(e){
var t=e.body,
e=e.documentElement,
o=D(10)&&getComputedStyle(e);
return {
height: W("Height", t, e, o),
width: W("Width", t, e, o),
};}
function U(e, t, o){
return (
t in e
? Object.defineProperty(e, t, {
value: o,
enumerable: !0,
configurable: !0,
writable: !0,
})
: (e[t]=o),
e
);
}
var $=function (e, t){
if(!(e instanceof t))
throw new TypeError("Cannot call a class as a function");
},
e=function (e, t, o){
return t&&q(e.prototype, t), o&&q(e, o), e;
},
h =
Object.assign ||
function (e){
for (var t=1; t < arguments.length; t++){
var o,
i=arguments[t];
for (o in i)
Object.prototype.hasOwnProperty.call(i, o) &&
(e[o]=i[o]);
}
return e;
};
function q(e, t){
for (var o=0; o < t.length; o++){
var i=t[o];
(i.enumerable=i.enumerable||!1),
(i.configurable = !0),
"value" in i&&(i.writable = !0),
Object.defineProperty(e, i.key, i);
}}
function u(e){
return h({}, e, {
right: e.left + e.width,
bottom: e.top + e.height,
});
}
function Q(e){
var t={};
try {
D(10)
? ((t=e.getBoundingClientRect()),
(i=V(e, "top")),
(a=V(e, "left")),
(t.top +=i),
(t.left +=a),
(t.bottom +=i),
(t.right +=a))
: (t=e.getBoundingClientRect());
} catch (e){}
var o,
i={
left: t.left,
top: t.top,
width: t.right - t.left,
height: t.bottom - t.top,
},
a="HTML"===e.nodeName ? H(e.ownerDocument):{},
t=a.width||e.clientWidth||i.width,
a=a.height||e.clientHeight||i.height,
t=e.offsetWidth - t,
a=e.offsetHeight - a;
return (
(t||a) &&
((t -=R((o=d(e)), "x")),
(a -=R(o, "y")),
(i.width -=t),
(i.height -=a)),
u(i)
);
}
function G(e, t, o){
var o=2 < arguments.length&&void 0!==o&&o,
i=D(10),
a="HTML"===t.nodeName,
n=Q(e),
s=Q(t),
e=z(e),
r=d(t),
l=parseFloat(r.borderTopWidth),
c=parseFloat(r.borderLeftWidth),
s =
(o &&
a &&
((s.top=Math.max(s.top, 0)),
(s.left=Math.max(s.left, 0))),
u({
top: n.top - s.top - l,
left: n.left - s.left - c,
width: n.width,
height: n.height,
}));
return (
(s.marginTop=0),
(s.marginLeft=0),
!i &&
a &&
((n=parseFloat(r.marginTop)),
(a=parseFloat(r.marginLeft)),
(s.top -=l - n),
(s.bottom -=l - n),
(s.left -=c - a),
(s.right -=c - a),
(s.marginTop=n),
(s.marginLeft=a)),
(s=(
i&&!o ? t.contains(e):t===e&&"BODY"!==e.nodeName
)
? (function (e, t, o){
var o=2 < arguments.length&&void 0!==o&&o,
i=V(t, "top"),
t=V(t, "left"),
o=o ? -1:1;
return (
(e.top +=i * o),
(e.bottom +=i * o),
(e.left +=t * o),
(e.right +=t * o),
e
);
})(s, t)
: s)
);
}
function Z(e){
if(!e||!e.parentElement||D())
return document.documentElement;
for (
var t=e.parentElement;
t&&"none"===d(t, "transform");
)
t=t.parentElement;
return t||document.documentElement;
}
function K(e, t, o, i, a){
var n,
a=4 < arguments.length&&void 0!==a&&a,
s={ top: 0, left: 0 },
r=a ? Z(e):j(e, E(t)),
r =
("viewport"===i
? (s=(function (e, t){
var t=1 < arguments.length&&void 0!==t&&t,
o=e.ownerDocument.documentElement,
e=G(e, o),
i=Math.max(o.clientWidth,
window.innerWidth||0
),
a=Math.max(o.clientHeight,
window.innerHeight||0
),
n=t ? 0:V(o),
t=t ? 0:V(o, "left");
return u({
top: n - e.top + e.marginTop,
left: t - e.left + e.marginLeft,
width: i,
height: a,
});
})(r, a))
: ((n=void 0),
"scrollParent"===i
? "BODY"===(n=z(O(t))).nodeName &&
(n=e.ownerDocument.documentElement)
: (n =
"window"===i
? e.ownerDocument.documentElement
: i),
(t=G(n, r, a)),
"HTML"!==n.nodeName ||
(function e(t){
var o=t.nodeName;
if("BODY"===o||"HTML"===o) return !1;
if("fixed"===d(t, "position")) return !0;
o=O(t);
return !!o&&e(o);
})(r)
? (s=t)
: ((a=(i=H(e.ownerDocument)).height),
(n=i.width),
(s.top +=t.top - t.marginTop),
(s.bottom=a + t.top),
(s.left +=t.left - t.marginLeft),
(s.right=n + t.left))),
"number"==typeof (o=o||0));
return (
(s.left +=r ? o:o.left||0),
(s.top +=r ? o:o.top||0),
(s.right -=r ? o:o.right||0),
(s.bottom -=r ? o:o.bottom||0),
s
);
}
function J(e, t, o, i, a, n){
n=5 < arguments.length&&void 0!==n ? n:0;
if(-1===e.indexOf("auto")) return e;
var i=K(o, i, n, a),
s={
top: { width: i.width, height: t.top - i.top },
right: { width: i.right - t.right, height: i.height },
bottom: { width: i.width, height: i.bottom - t.bottom },
left: { width: t.left - i.left, height: i.height },
},
n=Object.keys(s)
.map(function (e){
return h({ key: e }, s[e], {
area: (e=s[e]).width * e.height,
});
})
.sort(function (e, t){
return t.area - e.area;
}),
a=n.filter(function (e){
var t=e.width,
e=e.height;
return t >=o.clientWidth&&e >=o.clientHeight;
}),
t=(0 < a.length ? a:n)[0].key,
i=e.split("-")[1];
return t + (i ? "-" + i:"");
}
function Y(e, t, o, i){
i=3 < arguments.length&&void 0!==i ? i:null;
return G(o, i ? Z(t):j(t, E(o)), i);
}
function X(e){
var t=e.ownerDocument.defaultView.getComputedStyle(e),
o =
parseFloat(t.marginTop||0) +
parseFloat(t.marginBottom||0),
t =
parseFloat(t.marginLeft||0) +
parseFloat(t.marginRight||0);
return {
width: e.offsetWidth + t,
height: e.offsetHeight + o,
};}
function ee(e){
var t={
left: "right",
right: "left",
bottom: "top",
top: "bottom",
};
return e.replace(/left|right|bottom|top/g, function (e){
return t[e];
});
}
function te(e, t, o){
o=o.split("-")[0];
var e=X(e),
i={ width: e.width, height: e.height },
a=-1!==["right", "left"].indexOf(o),
n=a ? "top":"left",
s=a ? "left":"top",
r=a ? "height":"width",
a=a ? "width":"height";
return (
(i[n]=t[n] + t[r] / 2 - e[r] / 2),
(i[s]=o===s ? t[s] - e[a]:t[ee(s)]),
i
);
}
function oe(e, t){
return Array.prototype.find ? e.find(t):e.filter(t)[0];
}
function ie(e, o, t){
return (
(void 0===t
? e
: e.slice(0,
(function (e, t){
if(Array.prototype.findIndex)
return e.findIndex(function (e){
return e.name===t;
});
var o=oe(e, function (e){
return e.name===t;
});
return e.indexOf(o);
})(e, t)
)
).forEach(function (e){
e.function &&
console.warn("`modifier.function` is deprecated, use `modifier.fn`!"
);
var t=e.function||e.fn;
e.enabled &&
I(t) &&
((o.offsets.popper=u(o.offsets.popper)),
(o.offsets.reference=u(o.offsets.reference)),
(o=t(o, e)));
}),
o
);
}
function ae(e, o){
return e.some(function (e){
var t=e.name;
return e.enabled&&t===o;
});
}
function ne(e){
for (
var t=[!1, "ms", "Webkit", "Moz", "O"],
o=e.charAt(0).toUpperCase() + e.slice(1),
i=0;
i < t.length;
i++
){
var a=t[i],
a=a ? "" + a + o:e;
if(void 0!==document.body.style[a]) return a;
}
return null;
}
function se(e){
e=e.ownerDocument;
return e ? e.defaultView:window;
}
function re(e, t, o, i){
(o.updateBound=i),
se(e).addEventListener("resize", o.updateBound, {
passive: !0,
});
i=z(e);
return (
(function e(t, o, i, a){
var n="BODY"===t.nodeName,
t=n ? t.ownerDocument.defaultView:t;
t.addEventListener(o, i, { passive: !0 }),
n||e(z(t.parentNode), o, i, a),
a.push(t);
})(i, "scroll", o.updateBound, o.scrollParents),
(o.scrollElement=i),
(o.eventsEnabled = !0),
o
);
}
function le(e){
return ""!==e&&!isNaN(parseFloat(e))&&isFinite(e);
}
function ce(o, i){
Object.keys(i).forEach(function (e){
var t="";
-1!==[
"width",
"height",
"top",
"right",
"bottom",
"left",
].indexOf(e) &&
le(i[e]) &&
(t="px"),
(o.style[e]=i[e] + t);
});
}
var _e=M&&/Firefox/i.test(navigator.userAgent);
function de(e, t, o){
var i,
a=oe(e, function (e){
return e.name===t;
}),
e =
!!a &&
e.some(function (e){
return e.name===o&&e.enabled&&e.order < a.order;
});
return (
e ||
((i="`" + t + "`"),
console.warn("`" +
o +
"`" +
" modifier is required by " +
i +
" modifier in order to work, be sure to include it before " +
i +
"!"
)),
e
);
}
var ue=[
"auto-start",
"auto",
"auto-end",
"top-start",
"top",
"top-end",
"right-start",
"right",
"right-end",
"bottom-end",
"bottom",
"bottom-start",
"left-end",
"left",
"left-start",
],
pe=ue.slice(3);
function fe(e, t){
(t=1 < arguments.length&&void 0!==t&&t),
(e=pe.indexOf(e)),
(e=pe.slice(e + 1).concat(pe.slice(0, e)));
return t ? e.reverse():e;
}
var ge={
placement: "bottom",
positionFixed: !1,
eventsEnabled: !0,
removeOnDestroy: !1,
onCreate: function (){},
onUpdate: function (){},
modifiers: {
shift: {
order: 100,
enabled: !0,
fn: function (e){
var t,
o,
i,
a=e.placement,
n=a.split("-")[0],
a=a.split("-")[1];
return (
a &&
((t=(o=e.offsets).reference),
(o=o.popper),
(i=(n=-1!==["bottom", "top"].indexOf(n))
? "width"
: "height"),
(n={
start: U({}, (n=n ? "left":"top"), t[n]),
end: U({}, n, t[n] + t[i] - o[i]),
}),
(e.offsets.popper=h({}, o, n[a]))),
e
);
},
},
offset: {
order: 200,
enabled: !0,
fn: function (e, t){
var r,
l,
a,
i,
t=t.offset,
o=e.placement,
n=e.offsets,
s=n.popper,
n=n.reference,
o=o.split("-")[0],
c=le(+t)
? [+t, 0]
: ((t=t),
(r=s),
(l=n),
(a=[0, 0]),
(i=-1!==["right", "left"].indexOf(o)),
(t=t.split(/(\+|\-)/).map(function (e){
return e.trim();
})),
(n=t.indexOf(oe(t, function (e){
return -1!==e.search(/,|\s/);
})
)),
t[n] &&
-1===t[n].indexOf(",") &&
console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."
),
(c=/\s*,\s*|\s+/),
(-1!==n
? [
t.slice(0, n).concat([t[n].split(c)[0]]),
[t[n].split(c)[1]].concat(t.slice(n + 1)),
]
: [t]
)
.map(function (e, t){
var s=(1===t ? !i:i)
? "height"
: "width",
o = !1;
return e
.reduce(function (e, t){
return ""===e[e.length - 1] &&
-1!==["+", "-"].indexOf(t)
? ((e[e.length - 1]=t), (o = !0), e)
: o
? ((e[e.length - 1] +=t),
(o = !1),
e)
: e.concat(t);
}, [])
.map(function (e){
return (
(t=s),
(o=r),
(i=l),
(a=(e=e).match(/((?:\-|\+)?\d*\.?\d*)(.*)/
)),
(n=+a[1]),
(a=a[2]),
n
? 0===a.indexOf("%")
? (u("%p"===a ? o:i)[t] /
100) *
n
: "vh"===a||"vw"===a
? (("vh"===a
? Math.max(document.documentElement
.clientHeight,
window.innerHeight||0
)
: Math.max(document.documentElement
.clientWidth,
window.innerWidth||0
)) /
100) *
n
: n
: e
);
var t, o, i, a, n;
});
})
.forEach(function (o, i){
o.forEach(function (e, t){
le(e) &&
(a[i] +=
e * ("-"===o[t - 1] ? -1:1));
});
}),
a);
return (
"left"===o
? ((s.top +=c[0]), (s.left -=c[1]))
: "right"===o
? ((s.top +=c[0]), (s.left +=c[1]))
: "top"===o
? ((s.left +=c[0]), (s.top -=c[1]))
: "bottom"===o &&
((s.left +=c[0]), (s.top +=c[1])),
(e.popper=s),
e
);
},
offset: 0,
},
preventOverflow: {
order: 300,
enabled: !0,
fn: function (e, i){
var t=i.boundariesElement||A(e.instance.popper),
o =
(e.instance.reference===t&&(t=A(t)),
ne("transform")),
a=e.instance.popper.style,
n=a.top,
s=a.left,
r=a[o],
l =
((a.top=""),
(a.left=""),
(a[o]=""),
K(
e.instance.popper,
e.instance.reference,
i.padding,
t,
e.positionFixed
)),
t =
((a.top=n),
(a.left=s),
(a[o]=r),
(i.boundaries=l),
i.priority),
c=e.offsets.popper,
_={
primary: function (e){
var t=c[e];
return (
c[e] < l[e] &&
!i.escapeWithReference &&
(t=Math.max(c[e], l[e])),
U({}, e, t)
);
},
secondary: function (e){
var t="right"===e ? "left":"top",
o=c[t];
return (
c[e] > l[e] &&
!i.escapeWithReference &&
(o=Math.min(c[t],
l[e] -
("right"===e ? c.width:c.height)
)),
U({}, t, o)
);
},
};
return (
t.forEach(function (e){
var t =
-1!==["left", "top"].indexOf(e)
? "primary"
: "secondary";
c=h({}, c, _[t](e));
}),
(e.offsets.popper=c),
e
);
},
priority: ["left", "right", "top", "bottom"],
padding: 5,
boundariesElement: "scrollParent",
},
keepTogether: {
order: 400,
enabled: !0,
fn: function (e){
var t=e.offsets,
o=t.popper,
t=t.reference,
i=e.placement.split("-")[0],
a=Math.floor,
i=-1!==["top", "bottom"].indexOf(i),
n=i ? "right":"bottom",
s=i ? "left":"top",
i=i ? "width":"height";
return (
o[n] < a(t[s]) &&
(e.offsets.popper[s]=a(t[s]) - o[i]),
o[s] > a(t[n])&&(e.offsets.popper[s]=a(t[n])),
e
);
},
},
arrow: {
order: 500,
enabled: !0,
fn: function (e, t){
if(!de(e.instance.modifiers, "arrow", "keepTogether")
)
return e;
t=t.element;
if("string"==typeof t){
if(!(t=e.instance.popper.querySelector(t)))
return e;
}else if(!e.instance.popper.contains(t))
return (
console.warn("WARNING: `arrow.element` must be child of its popper element!"
),
e
);
var o=e.placement.split("-")[0],
i=e.offsets,
a=i.popper,
i=i.reference,
o=-1!==["left", "right"].indexOf(o),
n=o ? "height":"width",
s=o ? "Top":"Left",
r=s.toLowerCase(),
l=o ? "left":"top",
o=o ? "bottom":"right",
c=X(t)[n],
o =
(i[o] - c < a[r] &&
(e.offsets.popper[r] -=a[r] - (i[o] - c)),
i[r] + c > a[o] &&
(e.offsets.popper[r] +=i[r] + c - a[o]),
(e.offsets.popper=u(e.offsets.popper)),
i[r] + i[n] / 2 - c / 2),
i=d(e.instance.popper),
_=parseFloat(i["margin" + s]),
i=parseFloat(i["border" + s + "Width"]),
s=o - e.offsets.popper[r] - _ - i,
s=Math.max(Math.min(a[n] - c, s), 0);
return (
(e.arrowElement=t),
(e.offsets.arrow =
(U((o={}), r, Math.round(s)), U(o, l, ""), o)),
e
);
},
element: "[x-arrow]",
},
flip: {
order: 600,
enabled: !0,
fn: function (c, _){
if(ae(c.instance.modifiers, "inner")) return c;
if(c.flipped&&c.placement===c.originalPlacement)
return c;
var d=K(
c.instance.popper,
c.instance.reference,
_.padding,
_.boundariesElement,
c.positionFixed
),
u=c.placement.split("-")[0],
p=ee(u),
f=c.placement.split("-")[1]||"",
g=[];
switch (_.behavior){
case "flip":
g=[u, p];
break;
case "clockwise":
g=fe(u);
break;
case "counterclockwise":
g=fe(u, !0);
break;
default:
g=_.behavior;
}
return (
g.forEach(function (e, t){
if(u!==e||g.length===t + 1) return c;
(u=c.placement.split("-")[0]), (p=ee(u));
var e=c.offsets.popper,
o=c.offsets.reference,
i=Math.floor,
o =
("left"===u&&i(e.right) > i(o.left)) ||
("right"===u&&i(e.left) < i(o.right)) ||
("top"===u&&i(e.bottom) > i(o.top)) ||
("bottom"===u&&i(e.top) < i(o.bottom)),
a=i(e.left) < i(d.left),
n=i(e.right) > i(d.right),
s=i(e.top) < i(d.top),
e=i(e.bottom) > i(d.bottom),
i =
("left"===u&&a) ||
("right"===u&&n) ||
("top"===u&&s) ||
("bottom"===u&&e),
r=-1!==["top", "bottom"].indexOf(u),
l =
!!_.flipVariations &&
((r&&"start"===f&&a) ||
(r&&"end"===f&&n) ||
(!r&&"start"===f&&s) ||
(!r&&"end"===f&&e)),
n =
!!_.flipVariationsByContent &&
((r&&"start"===f&&n) ||
(r&&"end"===f&&a) ||
(!r&&"start"===f&&e) ||
(!r&&"end"===f&&s)),
a=l||n;
(o||i || a) &&
((c.flipped = !0),
(o||i)&&(u=g[t + 1]),
a &&
(f =
"end"===f
? "start"
: "start"===f
? "end"
: f),
(c.placement=u + (f ? "-" + f:"")),
(c.offsets.popper=h(
{},
c.offsets.popper,
te(
c.instance.popper,
c.offsets.reference,
c.placement
)
)),
(c=ie(c.instance.modifiers, c, "flip")));
}),
c
);
},
behavior: "flip",
padding: 5,
boundariesElement: "viewport",
flipVariations: !1,
flipVariationsByContent: !1,
},
inner: {
order: 700,
enabled: !1,
fn: function (e){
var t=e.placement,
o=t.split("-")[0],
i=e.offsets,
a=i.popper,
i=i.reference,
n=-1!==["left", "right"].indexOf(o),
s=-1===["top", "left"].indexOf(o);
return (
(a[n ? "left":"top"] =
i[o] - (s ? a[n ? "width":"height"]:0)),
(e.placement=ee(t)),
(e.offsets.popper=u(a)),
e
);
},
},
hide: {
order: 800,
enabled: !0,
fn: function (e){
if(!de(e.instance.modifiers, "hide", "preventOverflow")
)
return e;
var t=e.offsets.reference,
o=oe(e.instance.modifiers, function (e){
return "preventOverflow"===e.name;
}).boundaries;
if(t.bottom < o.top ||
t.left > o.right ||
t.top > o.bottom ||
t.right < o.left
){
if(!0===e.hide) return e;
(e.hide = !0),
(e.attributes["x-out-of-boundaries"]="");
}else{
if(!1===e.hide) return e;
(e.hide = !1),
(e.attributes["x-out-of-boundaries"] = !1);
}
return e;
},
},
computeStyle: {
order: 850,
enabled: !0,
fn: function (e, t){
var _=t.x,
d=t.y,
o=e.offsets.popper,
u=oe(e.instance.modifiers, function (e){
return "applyStyle"===e.name;
}).gpuAcceleration;
void 0!==u &&
console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!"
);
var i,
a,
p,
u=void 0!==u ? u:t.gpuAcceleration,
t=A(e.instance.popper),
f=Q(t),
o={ position: o.position },
n =
((l=e),
(i=window.devicePixelRatio < 2||!_e),
(s=l.offsets),
(c=s.popper),
(s=s.reference),
(n=Math.round),
(a=Math.floor),
(s=n(s.width)),
(r=n(c.width)),
(p =
-1!==["left", "right"].indexOf(l.placement)),
(l=-1!==l.placement.indexOf("-")),
(p=i ? (p||l || s % 2==r % 2 ? n:a):g),
(a=i ? n:g),
{
left: p(
s % 2==1&&r % 2==1&&!l&&i
? c.left - 1
: c.left
),
top: a(c.top),
bottom: a(c.bottom),
right: p(c.right),
}),
s="bottom"===_ ? "top":"bottom",
r="right"===d ? "left":"right",
l=ne("transform");
function g(e){
return e;
}
(i =
"bottom"==s
? "HTML"===t.nodeName
? -t.clientHeight + n.bottom
: -f.height + n.bottom
: n.top),
(a =
"right"==r
? "HTML"===t.nodeName
? -t.clientWidth + n.right
: -f.width + n.right
: n.left),
u&&l
? ((o[l] =
"translate3d(" + a + "px, " + i + "px, 0)"),
(o[s]=0),
(o[r]=0),
(o.willChange="transform"))
: ((p="right"==r ? -1:1),
(o[s]=i * ("bottom"==s ? -1:1)),
(o[r]=a * p),
(o.willChange=s + ", " + r));
var c={ "x-placement": e.placement };
return (
(e.attributes=h({}, c, e.attributes)),
(e.styles=h({}, o, e.styles)),
(e.arrowStyles=h(
{},
e.offsets.arrow,
e.arrowStyles
)),
e
);
},
gpuAcceleration: !0,
x: "bottom",
y: "right",
},
applyStyle: {
order: 900,
enabled: !0,
fn: function (e){
var t, o;
return (
ce(e.instance.popper, e.styles),
(t=e.instance.popper),
(o=e.attributes),
Object.keys(o).forEach(function (e){
!1!==o[e]
? t.setAttribute(e, o[e])
: t.removeAttribute(e);
}),
e.arrowElement &&
Object.keys(e.arrowStyles).length &&
ce(e.arrowElement, e.arrowStyles),
e
);
},
onLoad: function (e, t, o, i, a){
(a=Y(a, t, e, o.positionFixed)),
(a=J(
o.placement,
a,
t,
e,
o.modifiers.flip.boundariesElement,
o.modifiers.flip.padding
));
return (
t.setAttribute("x-placement", a),
ce(t, {
position: o.positionFixed ? "fixed":"absolute",
}),
o
);
},
gpuAcceleration: void 0,
},
},
},
e =
(e(he, [
{
key: "update",
value: function (){
return function (){
var e;
this.state.isDestroyed ||
(((e={
instance: this,
styles: {},
arrowStyles: {},
attributes: {},
flipped: !1,
offsets: {},
}).offsets.reference=Y(
this.state,
this.popper,
this.reference,
this.options.positionFixed
)),
(e.placement=J(
this.options.placement,
e.offsets.reference,
this.popper,
this.reference,
this.options.modifiers.flip.boundariesElement,
this.options.modifiers.flip.padding
)),
(e.originalPlacement=e.placement),
(e.positionFixed=this.options.positionFixed),
(e.offsets.popper=te(
this.popper,
e.offsets.reference,
e.placement
)),
(e.offsets.popper.position=this.options
.positionFixed
? "fixed"
: "absolute"),
(e=ie(this.modifiers, e)),
this.state.isCreated
? this.options.onUpdate(e)
: ((this.state.isCreated = !0),
this.options.onCreate(e)));
}.call(this);
},
},
{
key: "destroy",
value: function (){
return function (){
return (
(this.state.isDestroyed = !0),
ae(this.modifiers, "applyStyle") &&
(this.popper.removeAttribute("x-placement"),
(this.popper.style.position=""),
(this.popper.style.top=""),
(this.popper.style.left=""),
(this.popper.style.right=""),
(this.popper.style.bottom=""),
(this.popper.style.willChange=""),
(this.popper.style[ne("transform")]="")),
this.disableEventListeners(),
this.options.removeOnDestroy &&
this.popper.parentNode.removeChild(this.popper),
this
);
}.call(this);
},
},
{
key: "enableEventListeners",
value: function (){
return function (){
this.state.eventsEnabled ||
(this.state=re(
this.reference,
this.options,
this.state,
this.scheduleUpdate
));
}.call(this);
},
},
{
key: "disableEventListeners",
value: function (){
return function (){
var e, t;
this.state.eventsEnabled &&
(cancelAnimationFrame(this.scheduleUpdate),
(this.state =
((e=this.reference),
(t=this.state),
se(e).removeEventListener("resize",
t.updateBound
),
t.scrollParents.forEach(function (e){
e.removeEventListener("scroll",
t.updateBound
);
}),
(t.updateBound=null),
(t.scrollParents=[]),
(t.scrollElement=null),
(t.eventsEnabled = !1),
t)));
}.call(this);
},
},
]),
he);
function he(e, t){
var o=this,
i =
2 < arguments.length&&void 0!==arguments[2]
? arguments[2]
: {},
e =
($(this, he),
(this.scheduleUpdate=function (){
return requestAnimationFrame(o.update);
}),
(this.update=T(this.update.bind(this))),
(this.options=h({}, he.Defaults, i)),
(this.state={
isDestroyed: !1,
isCreated: !1,
scrollParents: [],
}),
(this.reference=e&&e.jquery ? e[0]:e),
(this.popper=t&&t.jquery ? t[0]:t),
(this.options.modifiers={}),
Object.keys(h({}, he.Defaults.modifiers, i.modifiers)
).forEach(function (e){
o.options.modifiers[e]=h(
{},
he.Defaults.modifiers[e]||{},
i.modifiers ? i.modifiers[e]:{}
);
}),
(this.modifiers=Object.keys(this.options.modifiers)
.map(function (e){
return h({ name: e }, o.options.modifiers[e]);
})
.sort(function (e, t){
return e.order - t.order;
})),
this.modifiers.forEach(function (e){
e.enabled &&
I(e.onLoad) &&
e.onLoad(o.reference,
o.popper,
o.options,
e,
o.state
);
}),
this.update(),
this.options.eventsEnabled);
e&&this.enableEventListeners(),
(this.state.eventsEnabled=e);
}
(e.Utils=(
"undefined"!=typeof window ? window:global
).PopperUtils),
(e.placements=ue),
(e.Defaults=ge);
var me=e,
ve="adropdown",
ye="bs.adropdown",
we="." + ye,
be=c.default.fn[ve],
ke=new RegExp("38|40|27"),
Ce="disabled",
_="show",
xe="adropdown-menu-right",
Le="hide" + we,
Se="hidden" + we,
ue="click.bs.adropdown.data-api",
ge="keydown.bs.adropdown.data-api",
Me='[data-toggle="adropdown"]',
Pe=".adropdown-menu",
Te={
offset: 0,
flip: !0,
boundary: "scrollParent",
reference: "toggle",
display: "dynamic",
popperConfig: null,
},
Ie={
offset: "(number|string|function)",
flip: "boolean",
boundary: "(string|element)",
reference: "(string|element)",
display: "string",
popperConfig: "(null|object)",
},
t =
(((e=p.prototype).toggle=function (){
var e;
this._element.disabled ||
c.default(this._element).hasClass(Ce) ||
((e=c.default(this._menu).hasClass(_)),
p._clearMenus(),
e||this.show(!0));
}),
(e.show=function (e){
if((void 0===e&&(e = !1),
!(
this._element.disabled ||
c.default(this._element).hasClass(Ce) ||
c.default(this._menu).hasClass(_)
))
){
var t={ relatedTarget: this._element },
o=c.default.Event("show.bs.adropdown", t),
i=p._getParentFromElement(this._element);
if((c.default(i).trigger(o), !o.isDefaultPrevented())
){
if(!this._inNavbar&&e){
if(void 0===me)
throw new TypeError(
"Bootstrap's adropdowns require Popper (https://popper.js.org)"
);
o=this._element;
"parent"===this._config.reference
? (o=i)
: l.isElement(this._config.reference) &&
((o=this._config.reference),
void 0!==this._config.reference.jquery &&
(o=this._config.reference[0])),
"scrollParent"!==this._config.boundary &&
c.default(i).addClass("position-static"),
(this._popper=new me(
o,
this._menu,
this._getPopperConfig()
));
}
"ontouchstart" in document.documentElement &&
0===c.default(i).closest(".navbar-nav").length &&
c
.default(document.body)
.children()
.on("mouseover", null, c.default.noop),
this._element.focus(),
this._element.setAttribute("aria-expanded", !0),
c.default(this._menu).toggleClass(_),
c
.default(i)
.toggleClass(_)
.trigger(c.default.Event("shown.bs.adropdown", t)
);
}}
}),
(e.hide=function (){
var e, t, o;
this._element.disabled ||
c.default(this._element).hasClass(Ce) ||
!c.default(this._menu).hasClass(_) ||
((e={ relatedTarget: this._element }),
(t=c.default.Event(Le, e)),
(o=p._getParentFromElement(this._element)),
c.default(o).trigger(t),
t.isDefaultPrevented() ||
(this._popper&&this._popper.destroy(),
c.default(this._menu).toggleClass(_),
c
.default(o)
.toggleClass(_)
.trigger(c.default.Event(Se, e))));
}),
(e.dispose=function (){
c.default.removeData(this._element, ye),
c.default(this._element).off(we),
(this._element=null),
(this._menu=null)!==this._popper &&
(this._popper.destroy(), (this._popper=null));
}),
(e.update=function (){
(this._inNavbar=this._detectNavbar()),
null!==this._popper&&this._popper.scheduleUpdate();
}),
(e._addEventListeners=function (){
var t=this;
c.default(this._element).on("click.bs.adropdown",
function (e){
e.preventDefault(), e.stopPropagation(), t.toggle();
}
);
}),
(e._getConfig=function (e){
return (
(e=s(
{},
this.constructor.Default,
c.default(this._element).data(),
e
)),
l.typeCheckConfig(ve, e, this.constructor.DefaultType),
e
);
}),
(e._getMenuElement=function (){
var e;
return (
this._menu ||
((e=p._getParentFromElement(this._element)) &&
(this._menu=e.querySelector(Pe))),
this._menu
);
}),
(e._getPlacement=function (){
var e=c.default(this._element.parentNode),
t="bottom-start";
return (
e.hasClass("dropup")
? (t=c.default(this._menu).hasClass(xe)
? "top-end"
: "top-start")
: e.hasClass("dropright")
? (t="right-start")
: e.hasClass("dropleft")
? (t="left-start")
: c.default(this._menu).hasClass(xe) &&
(t="bottom-end"),
t
);
}),
(e._detectNavbar=function (){
return (
0 < c.default(this._element).closest(".navbar").length
);
}),
(e._getOffset=function (){
var t=this,
e={};
return (
"function"==typeof this._config.offset
? (e.fn=function (e){
return (
(e.offsets=s(
{},
e.offsets,
t._config.offset(e.offsets, t._element)
)),
e
);
})
: (e.offset=this._config.offset),
e
);
}),
(e._getPopperConfig=function (){
var e={
placement: this._getPlacement(),
modifiers: {
offset: this._getOffset(),
flip: { enabled: this._config.flip },
preventOverflow: {
boundariesElement: this._config.boundary,
},
},
};
return (
"static"===this._config.display &&
(e.modifiers.applyStyle={ enabled: !1 }),
s({}, e, this._config.popperConfig)
);
}),
(p._jQueryInterface=function (t){
return this.each(function (){
var e=c.default(this).data(ye);
if((e ||
((e=new p(this, "object"==typeof t ? t:null)),
c.default(this).data(ye, e)),
"string"==typeof t)
){
if(void 0===e[t])
throw new TypeError('No method named "' + t + '"');
e[t]();
}});
}),
(p._clearMenus=function (e){
if(!e ||
(3!==e.which&&("keyup"!==e.type||9===e.which))
)
for (
var t=[].slice.call(document.querySelectorAll(Me)),
o=0,
i=t.length;
o < i;
o++
){
var a,
n,
s=p._getParentFromElement(t[o]),
r=c.default(t[o]).data(ye),
l={ relatedTarget: t[o] };
e&&"click"===e.type&&(l.clickEvent=e),
r &&
((a=r._menu),
!c.default(s).hasClass(_) ||
(e &&
(("click"===e.type &&
/input|textarea/i.test(e.target.tagName)) ||
("keyup"===e.type&&9===e.which)) &&
c.default.contains(s, e.target)) ||
((n=c.default.Event(Le, l)),
c.default(s).trigger(n),
n.isDefaultPrevented() ||
("ontouchstart" in document.documentElement &&
c
.default(document.body)
.children()
.off("mouseover", null, c.default.noop),
t[o].setAttribute("aria-expanded", "false"),
r._popper&&r._popper.destroy(),
c.default(a).removeClass(_),
c
.default(s)
.removeClass(_)
.trigger(c.default.Event(Se, l)))));
}}),
(p._getParentFromElement=function (e){
var t,
o=l.getSelectorFromElement(e);
return (
(t=o ? document.querySelector(o):t)||e.parentNode
);
}),
(p._dataApiKeydownHandler=function (e){
if(!(/input|textarea/i.test(e.target.tagName)
? 32===e.which ||
(27!==e.which &&
((40!==e.which&&38!==e.which) ||
c.default(e.target).closest(Pe).length))
: !ke.test(e.which)) &&
!this.disabled &&
!c.default(this).hasClass(Ce)
){
var t=p._getParentFromElement(this),
o=c.default(t).hasClass(_);
if(o||27!==e.which){
if((e.preventDefault(),
e.stopPropagation(),
!o||27===e.which||32===e.which)
)
return (
27===e.which &&
c.default(t.querySelector(Me)).trigger("focus"),
void c.default(this).trigger("click")
);
o=[].slice
.call(t.querySelectorAll(".adropdown-menu .adropdown-item:not(.disabled):not(:disabled)"
)
)
.filter(function (e){
return c.default(e).is(":visible");
});
0!==o.length &&
((t=o.indexOf(e.target)),
38===e.which&&0 < t&&t--,
40===e.which&&t < o.length - 1&&t++,
o[(t=t < 0 ? 0:t)].focus());
}}
}),
a(p, null, [
{
key: "VERSION",
get: function (){
return "4.6.1";
},
},
{
key: "Default",
get: function (){
return Te;
},
},
{
key: "DefaultType",
get: function (){
return Ie;
},
},
]),
p);
function p(e, t){
(this._element=e),
(this._popper=null),
(this._config=this._getConfig(t)),
(this._menu=this._getMenuElement()),
(this._inNavbar=this._detectNavbar()),
this._addEventListeners();
}
c
.default(document)
.on(ge, Me, t._dataApiKeydownHandler)
.on(ge, Pe, t._dataApiKeydownHandler)
.on(ue + " keyup.bs.adropdown.data-api", t._clearMenus)
.on(ue, Me, function (e){
e.preventDefault(),
e.stopPropagation(),
t._jQueryInterface.call(c.default(this), "toggle");
})
.on(ue, ".adropdown form", function (e){
e.stopPropagation();
}),
(c.default.fn[ve]=t._jQueryInterface),
(c.default.fn[ve].Constructor=t),
(c.default.fn[ve].noConflict=function (){
return (c.default.fn[ve]=be), t._jQueryInterface;
}),
(o.Util=l),
(o.aCollapse=S),
(o.aDropdown=t),
Object.defineProperty(o, "__esModule", { value: !0 });
}),
"object"==typeof exports&&"undefined"!=typeof module
? g(exports, require("jquery"))
: "function"==typeof define&&define.amd
? define(["exports", "jquery"], g)
: g(
((f =
"undefined"!=typeof globalThis
? globalThis
: f||self).bootstrap={}),
f.jQuery
)),
(InfoBox.prototype=new google.maps.OverlayView()),
(InfoBox.prototype.createInfoBoxDiv_=function (){
var e,
t,
o,
i=this,
a=function (e){
(e.cancelBubble = !0),
e.stopPropagation&&e.stopPropagation();
};
if(!this.div_){
if(((this.div_=document.createElement("div")),
this.setBoxStyle_(),
void 0===this.content_.nodeType
? (this.div_.innerHTML =
this.getCloseBoxImg_() + this.content_)
: ((this.div_.innerHTML=this.getCloseBoxImg_()),
this.div_.appendChild(this.content_)),
this.getPanes()[this.pane_].appendChild(this.div_),
this.addClickHandler_(),
this.div_.style.width
? (this.fixedWidthSet_ = !0)
: 0!==this.maxWidth_ &&
this.div_.offsetWidth > this.maxWidth_
? ((this.div_.style.width=this.maxWidth_),
(this.div_.style.overflow="auto"),
(this.fixedWidthSet_ = !0))
: ((o=this.getBoxWidths_()),
(this.div_.style.width =
this.div_.offsetWidth - o.left - o.right + "px"),
(this.fixedWidthSet_ = !1)),
this.panBox_(this.disableAutoPan_),
!this.enableEventPropagation_)
){
for (
this.eventListeners_=[],
t=[
"mousedown",
"mouseover",
"mouseout",
"mouseup",
"click",
"dblclick",
"touchstart",
"touchend",
"touchmove",
],
e=0;
e < t.length;
e++
)
this.eventListeners_.push(this.div_.addEventListener(t[e], a)
);
this.eventListeners_.push(this.div_.addEventListener("mouseover", function (e){
this.style.cursor="default";
})
);
}
(this.contextListener_=this.div_.addEventListener("contextmenu",
function (e){
(e.returnValue = !1),
e.preventDefault&&e.preventDefault(),
i.enableEventPropagation_||a(e);
}
)),
google.maps.event.trigger(this, "domready");
}}),
(InfoBox.prototype.getCloseBoxImg_=function (){
var e="";
return (e =
""!==this.closeBoxURL_
? (e =
(e="<img") +
(" src='" + this.closeBoxURL_) +
"' align=right style=' position: relative; cursor: pointer;") +
" margin: " +
this.closeBoxMargin_ +
";'>"
: e);
}),
(InfoBox.prototype.addClickHandler_=function (){
var e;
""!==this.closeBoxURL_
? ((e=this.div_.firstChild),
(this.closeListener_=e.addEventListener("click",
this.getCloseClickHandler_()
)))
: (this.closeListener_=null);
}),
(InfoBox.prototype.getCloseClickHandler_=function (){
var t=this;
return function (e){
(e.cancelBubble = !0),
e.stopPropagation&&e.stopPropagation(),
google.maps.event.trigger(t, "closeclick"),
t.close();
};}),
(InfoBox.prototype.panBox_=function (e){
var _,
t,
o,
i,
d,
a,
n,
s,
r,
l=0,
c=0;
e ||
((e=this.getMap()) instanceof google.maps.Map &&
(e.getBounds().contains(this.position_) ||
e.setCenter(this.position_),
e.getBounds(),
(_=(t=e.getDiv()).offsetWidth),
(t=t.offsetHeight),
(o=this.pixelOffset_.width),
(i=this.pixelOffset_.height),
(d=this.div_.offsetWidth),
(a=this.div_.offsetHeight),
(n=this.infoBoxClearance_.width),
(s=this.infoBoxClearance_.height),
(r=this.getProjection().fromLatLngToContainerPixel(this.position_
)).x <
-o + n
? (l=r.x + o - n)
: r.x + d + o + n > _&&(l=r.x + d + o + n - _),
this.alignBottom_
? r.y < -i + s + a
? (c=r.y + i - s - a)
: r.y + i + s > t&&(c=r.y + i + s - t)
: r.y < -i + s
? (c=r.y + i - s)
: r.y + a + i + s > t&&(c=r.y + a + i + s - t),
(0===l&&0===c)||(e.getCenter(), e.panBy(l, c))));
}),
(InfoBox.prototype.setBoxStyle_=function (){
var e, t;
if(this.div_){
for (e in ((this.div_.className=this.boxClass_),
(this.div_.style.cssText=""),
(t=this.boxStyle_)))
t.hasOwnProperty(e)&&(this.div_.style[e]=t[e]);
(this.div_.style.WebkitTransform="translateZ(0)"),
void 0!==this.div_.style.opacity &&
""!==this.div_.style.opacity &&
((this.div_.style.MsFilter =
'"progid:DXImageTransform.Microsoft.Alpha(Opacity=' +
100 * this.div_.style.opacity +
')"'),
(this.div_.style.filter =
"alpha(opacity=" + 100 * this.div_.style.opacity + ")")),
(this.div_.style.position="absolute"),
(this.div_.style.visibility="hidden"),
null!==this.zIndex_ &&
(this.div_.style.zIndex=this.zIndex_);
}}),
(InfoBox.prototype.getBoxWidths_=function (){
var e,
t={ top: 0, bottom: 0, left: 0, right: 0 },
o=this.div_;
return (
document.defaultView&&document.defaultView.getComputedStyle
? (e=o.ownerDocument.defaultView.getComputedStyle(o, "")) &&
((t.top=parseInt(e.borderTopWidth, 10)||0),
(t.bottom=parseInt(e.borderBottomWidth, 10)||0),
(t.left=parseInt(e.borderLeftWidth, 10)||0),
(t.right=parseInt(e.borderRightWidth, 10)||0))
: document.documentElement.currentStyle &&
o.currentStyle &&
((t.top=parseInt(o.currentStyle.borderTopWidth, 10)||0),
(t.bottom =
parseInt(o.currentStyle.borderBottomWidth, 10)||0),
(t.left =
parseInt(o.currentStyle.borderLeftWidth, 10)||0),
(t.right =
parseInt(o.currentStyle.borderRightWidth, 10)||0)),
t
);
}),
(InfoBox.prototype.onRemove=function (){
this.div_ &&
(this.div_.parentNode.removeChild(this.div_),
(this.div_=null));
}),
(InfoBox.prototype.draw=function (){
this.createInfoBoxDiv_();
var e=this.getProjection().fromLatLngToDivPixel(this.position_);
(this.div_.style.left=e.x + this.pixelOffset_.width + "px"),
this.alignBottom_
? (this.div_.style.bottom =
-(e.y + this.pixelOffset_.height) + "px")
: (this.div_.style.top =
e.y + this.pixelOffset_.height + "px"),
this.isHidden_
? (this.div_.style.visibility="hidden")
: (this.div_.style.visibility="visible");
}),
(InfoBox.prototype.setOptions=function (e){
void 0!==e.boxClass &&
((this.boxClass_=e.boxClass), this.setBoxStyle_()),
void 0!==e.boxStyle &&
((this.boxStyle_=e.boxStyle), this.setBoxStyle_()),
void 0!==e.content&&this.setContent(e.content),
void 0!==e.disableAutoPan &&
(this.disableAutoPan_=e.disableAutoPan),
void 0!==e.maxWidth&&(this.maxWidth_=e.maxWidth),
void 0!==e.pixelOffset&&(this.pixelOffset_=e.pixelOffset),
void 0!==e.alignBottom&&(this.alignBottom_=e.alignBottom),
void 0!==e.position&&this.setPosition(e.position),
void 0!==e.zIndex&&this.setZIndex(e.zIndex),
void 0!==e.closeBoxMargin &&
(this.closeBoxMargin_=e.closeBoxMargin),
void 0!==e.closeBoxURL&&(this.closeBoxURL_=e.closeBoxURL),
void 0!==e.infoBoxClearance &&
(this.infoBoxClearance_=e.infoBoxClearance),
void 0!==e.isHidden&&(this.isHidden_=e.isHidden),
void 0!==e.visible&&(this.isHidden_ = !e.visible),
void 0!==e.enableEventPropagation &&
(this.enableEventPropagation_=e.enableEventPropagation),
this.div_&&this.draw();
}),
(InfoBox.prototype.setContent=function (e){
(this.content_=e),
this.div_ &&
(this.closeListener_ &&
(google.maps.event.removeListener(this.closeListener_),
(this.closeListener_=null)),
this.fixedWidthSet_||(this.div_.style.width=""),
void 0===e.nodeType
? (this.div_.innerHTML=this.getCloseBoxImg_() + e)
: ((this.div_.innerHTML=this.getCloseBoxImg_()),
this.div_.appendChild(e)),
this.fixedWidthSet_ ||
((this.div_.style.width=this.div_.offsetWidth + "px"),
void 0===e.nodeType
? (this.div_.innerHTML=this.getCloseBoxImg_() + e)
: ((this.div_.innerHTML=this.getCloseBoxImg_()),
this.div_.appendChild(e))),
this.addClickHandler_()),
google.maps.event.trigger(this, "content_changed");
}),
(InfoBox.prototype.setPosition=function (e){
(this.position_=e),
this.div_&&this.draw(),
google.maps.event.trigger(this, "position_changed");
}),
(InfoBox.prototype.setZIndex=function (e){
(this.zIndex_=e),
this.div_&&(this.div_.style.zIndex=e),
google.maps.event.trigger(this, "zindex_changed");
}),
(InfoBox.prototype.setVisible=function (e){
(this.isHidden_ = !e),
this.div_ &&
(this.div_.style.visibility=this.isHidden_
? "hidden"
: "visible");
}),
(InfoBox.prototype.getContent=function (){
return this.content_;
}),
(InfoBox.prototype.getPosition=function (){
return this.position_;
}),
(InfoBox.prototype.getZIndex=function (){
return this.zIndex_;
}),
(InfoBox.prototype.getVisible=function (){
var e =
void 0!==this.getMap() &&
null!==this.getMap() &&
!this.isHidden_;
return e;
}),
(InfoBox.prototype.show=function (){
(this.isHidden_ = !1),
this.div_&&(this.div_.style.visibility="visible");
}),
(InfoBox.prototype.hide=function (){
(this.isHidden_ = !0),
this.div_&&(this.div_.style.visibility="hidden");
}),
(InfoBox.prototype.open=function (e, t){
var o=this;
t &&
((this.position_=t.getPosition()),
(this.moveListener_=google.maps.event.addListener(t,
"position_changed",
function (){
o.setPosition(this.getPosition());
}
))),
this.setMap(e),
this.div_&&this.panBox_();
}),
(InfoBox.prototype.close=function (){
var e;
if((this.closeListener_ &&
(google.maps.event.removeListener(this.closeListener_),
(this.closeListener_=null)),
this.eventListeners_)
){
for (e=0; e < this.eventListeners_.length; e++)
google.maps.event.removeListener(this.eventListeners_[e]);
this.eventListeners_=null;
}
this.moveListener_ &&
(google.maps.event.removeListener(this.moveListener_),
(this.moveListener_=null)),
this.contextListener_ &&
(google.maps.event.removeListener(this.contextListener_),
(this.contextListener_=null)),
this.setMap(null);
}),
(Date.prototype.addHours=function (e){
return this.setTime(this.getTime() + 60 * e * 60 * 1e3), this;
}),
(Date.prototype.subDays=function (e){
return (
this.setTime(this.getTime() - 60 * e * 60 * 1e3 * 24), this
);
}),
asl_configuration.gdpr_enabled &&
((head=document.getElementsByTagName("head")[0]),
(insertBefore=head.insertBefore),
(head.insertBefore=function (e, t){
(e.href &&
0===e.href.indexOf("https://fonts.googleapis.com/css?family=Roboto"
)) ||
insertBefore.call(head, e, t);
})),
{
shapes: [],
shapes_index: 0,
current_map: null,
loadData: function (e, t){
var o,
i=this;
for (o in ((i.current_map=t), e.shapes))
e.shapes[o] &&
("polygon"==e.shapes[o].type
? i.shapes.push(i.create_polygon.call(i,
e.shapes[o].coord,
t,
e.shapes[o]
)
)
: "polyline"==e.shapes[o].type
? i.shapes.push(i.create_polyline.call(i,
e.shapes[o].coord,
t,
e.shapes[o]
)
)
: "circle"==e.shapes[o].type
? i.shapes.push(i.create_circle.call(i, e.shapes[o], t))
: "rectangle"==e.shapes[o].type &&
i.shapes.push(i.create_rectangle.call(i, e.shapes[o], t)
));
},
create_rectangle: function (e){
var t=this.current_map;
return new google.maps.Rectangle({
strokeColor: e.strokeColor,
fillColor: e.color,
strokeWeight: 1,
type: "rectangle",
editable: asl_drawing.allow_edit||!1,
map: t,
bounds: new google.maps.LatLngBounds(new google.maps.LatLng(e.sw[0], e.sw[1]),
new google.maps.LatLng(e.ne[0], e.ne[1])
),
});
},
create_circle: function (e, t){
t=this.current_map;
return new google.maps.Circle({
strokeColor: e.strokeColor,
fillColor: e.color,
type: "circle",
strokeWeight: 1,
map: t,
editable: asl_drawing.allow_edit||!1,
center: new google.maps.LatLng(e.center[0], e.center[1]),
radius: e.radius,
});
},
create_polyline: function (e, t, o){
var i,
t=this.current_map,
a=[];
for (i in e) a.push({ lat: e[i][0], lng: e[i][1] });
return new google.maps.Polyline({
path: a,
strokeColor: o.strokeColor||"#000000",
strokeWeight: 3,
editable: !1,
type: "polyline",
map: t,
});
},
create_polygon: function (e, t, o){
var i,
t=this.current_map,
a=[];
for (i in e) a.push({ lat: e[i][0], lng: e[i][1] });
return new google.maps.Polygon({
paths: a,
fillColor: o.color,
strokeColor: o.strokeColor,
strokeWeight: 1,
editable: !!asl_drawing.allow_edit,
type: "polygon",
map: t,
});
},
}),
ASL_CLOSE_BUTTON =
'<button aria-label="' +
asl_configuration.words.clear +
'" title="' +
asl_configuration.words.clear +
'" class="asl-search-clr asl-clear-btn hide" type="button"><svg width="12" height="12" viewBox="0 0 12 12" xmlns="https://www.w3.org/2000/svg"><path d="M.566 1.698L0 1.13 1.132 0l.565.566L6 4.868 10.302.566 10.868 0 12 1.132l-.566.565L7.132 6l4.302 4.3.566.568L10.868 12l-.565-.566L6 7.132l-4.3 4.302L1.13 12 0 10.868l.566-.565L4.868 6 .566 1.698z"></path></svg></button>',
ASL_PICKUP_ROW =
asl_configuration.pickup||asl_configuration.ship_from
? '<div class="sl-row mt-2 sl-pickup-row"><div class="pol"><a class="btn btn-block btn-asl sl-pickup">' +
(asl_configuration.ship_from
? asl_configuration.words.ship_from
: asl_configuration.words.pickup) +
"</a></div></div>"
: null,
zg=jQuery;
if((zg.templates||(zg.templates=asl_jQuery.templates),
zg.views||(zg.templates=asl_jQuery.views),
zg.views &&
zg.views.tags &&
(zg.views.tags("hasCategory", function (e, t){
for (var o=0; o < t.length; o++)
if(t[o].id===e) return this.tagCtx.render();
return "";
}),
zg.views.tags("equal", function (e, t){
return e==t;
}),
zg.views.tags("list", function (e){
var t="";
if(e){
var o=e.split(",");
if(o.length){
for (var i=0; i < o.length; i++)
t +="<li><span>" + o[i] + "</span></li>";
t='<ul class="sl-list-props">' + t + "</ul>";
}}
return t;
}),
zg.views.tags("stars", function (e){
if(!isNaN(e))
return (
(e=Math.round(4 * parseFloat(e)) / 4),
'<span class="sl-stars"><div class="sl-stars-out icon-star"><div style="width:' +
(5 * Math.round(((e / 5) * 100) / 5) + "%") +
'" class="sl-stars-in icon-star"></div></div></span>'
);
})),
"1"==asl_configuration.debug)
){
var Ng=window.console;
if(Ng)
for (var Pg=["error"], Qg=0; Qg < Pg.length; Qg++)
!(function (e){
var o=Ng[e];
Ng[e]=function (){
var e, t;
arguments[0] &&
-1!==arguments[0].indexOf("Google") &&
((e=zg(
'<div class="alert alert-danger asl-geo-err"></div>'
)).html(arguments[0]),
e.appendTo(".asl-cont .asl-map"),
window.setTimeout(function (){
e.remove();
}, 5e3)),
o.apply
? o.apply(Ng, arguments)
: ((t=Array.prototype.slice.apply(arguments).join(" ")),
o(t));
};})(Pg[Qg]);
}
(asl_locator.hook_event=function (e){
window.asl_event_hook &&
"function"==typeof window.asl_event_hook &&
asl_event_hook.call(this, e);
}),
(asl_locator.add_clear_button=function (e){
var t=zg(ASL_CLOSE_BUTTON);
return (
e.after(t),
t.bind("click", function (){
(asl_view.search_text=asl_view._location=null),
asl_view.clear_search(e),
t.addClass("hide");
}),
t
);
}),
(asl_locator.save_analytics=function (e, t){
var o={ action: "asl_search_log", nonce: ASL_REMOTE.nonce };
if(t) (o.is_search=0), (o.store_id=e.id_);
else {
t=null;
if((e.geometry &&
(t=(
e.geometry.location.lat() + e.geometry.location.lng()
).toFixed(5)),
(o.is_search=1),
(o.place_id=t),
(o.search_str=e.formatted_address),
!zg.trim(o.search_str))
)
return;
}
zg.ajax({
url: ASL_REMOTE.ajax_url,
data: o,
type: "POST",
success: function (e){},
});
}),
(asl_locator.toRad_=function (e){
return (e * Math.PI) / 180;
}),
(asl_locator.Store=function (e, t, o, i){
(this.id_=e),
(this.location_=t),
(this.categories_=o),
(this.props_=i||{}),
(this.v_id=i.vendor_id);
}),
(asl_locator.Store.prototype.setMarker=function (e){
(this.marker_=e),
google.maps.event.trigger(this, "marker_changed", e);
}),
(asl_locator.Store.prototype.getMarker=function (){
return this.marker_;
}),
(asl_locator.Store.prototype.getId=function (){
return this.id_;
}),
(asl_locator.Store.prototype.getLocation=function (){
return this.location_;
}),
(asl_locator.Store.prototype.hasCategory=function (e){
return -1!=this.categories_.indexOf(e);
}),
(asl_locator.Store.prototype.hasAnyCategory=function (e){
if(e&&!e.array_.length) return asl_configuration.on_select;
for (var t=e.asList(), o=0, i=t.length; o < i; o++)
if(-1!=this.categories_.indexOf(t[o].id_)) return !0;
return !1;
}),
(asl_locator.Store.prototype.hasAllCategory=function (e){
if(!e.array_.length) return asl_configuration.on_select;
for (var t=e.asList(), o=0, i=t.length; o < i; o++)
if(-1==this.categories_.indexOf(t[o].id_)) return !1;
return !0;
}),
(asl_locator.Store.prototype.getDetails=function (){
return this.props_;
}),
(asl_locator.Store.prototype.generateFieldsHTML_=function (e){
for (var t=[], o=0, i=e.length; o < i; o++){
var a=e[o];
this.props_[a] &&
(t.push('<div class="'),
t.push(a),
t.push('">'),
t.push(a + ": "),
t.push(isNaN(this.props_[a])
? this.props_[a]
: numberWithCommas(this.props_[a])
),
t.push("</div>"));
}
return t.join("");
}),
(asl_locator.Store.prototype.generateFeaturesHTML_=function (){
for (
var e,
t=[],
o =
(t.push('<ul class="features">'), this.categories_.asList()),
i=0;
(e=o[i]);
i++
)
t.push("<li>"), t.push(e.getDisplayName()), t.push("</li>");
return t.push("</ul>"), t.join("");
}),
(asl_locator.Store.prototype.getStoreContent=function (){
this.content_ ||
((e =
window.asl_tmpl_list_item ||
zg.templates((window.asl_tmpls&&window.asl_tmpls.list) ||
"#tmpl_list_item"
)),
(window.asl_tmpl_list_item=e),
(this.props_.target=asl_configuration.target_blank),
(this.content_=e.render(this.props_)));
var e=zg(this.content_);
return (
(asl_configuration.pickup||asl_configuration.ship_from) &&
e.append(ASL_PICKUP_ROW),
e
);
}),
(asl_locator.Store.prototype.advMkrContent=function (){
var e =
window.asl_tmpl_adv_mkr ||
zg.templates((window.asl_tmpls&&window.asl_tmpls.adv_mkr) ||
"#asl_tmpl_adv_mkr"
);
(window.asl_tmpl_adv_mkr=e),
(this.props_.target=asl_configuration.target_blank);
const t=document.createElement("div");
return (
(t.className="adv-mkr-cont"),
(t.innerHTML=e.render(this.props_)),
t
);
}),
(asl_locator.Store.prototype.getcontent_=function (e){
var t =
window.asl_too_tip_tmpl ||
zg.templates((window.asl_tmpls&&window.asl_tmpls.infobox)||"#asl_too_tip"
);
return (
(window.asl_too_tip_tmpl=t),
(e.props_.show_categories=asl_configuration.show_categories),
t.render(e.props_)
);
}),
(asl_locator.Store.prototype.getInfoWindowContent=function (e){
var t =
'<div class="infoWindow" id="style_' +
(asl_configuration.infobox_layout||"1") +
'">';
return t + this.getcontent_(this) + "</div>";
}),
(asl_locator.Store.infoPanelCache_={}),
(asl_locator.Store.prototype.getInfoPanelItem=function (){
var e,
t=asl_locator.Store.infoPanelCache_,
o=this.id_;
return t[o]||((e=this.getStoreContent()), (t[o]=e[0])), t[o];
}),
(asl_locator.Store.prototype.distanceTo=function (e){
var t=this.getLocation(),
o=asl_locator.toRad_(t.lat()),
t=asl_locator.toRad_(t.lng()),
i=asl_locator.toRad_(e.lat()),
a=i - o,
e=asl_locator.toRad_(e.lng()) - t,
t =
Math.sin(a / 2) * Math.sin(a / 2) +
Math.cos(o) * Math.cos(i) * Math.sin(e / 2) * Math.sin(e / 2),
a=6371 * (2 * Math.atan2(Math.sqrt(t), Math.sqrt(1 - t)));
return "Miles"==asl_configuration.distance_unit
? 0.621371 * a
: a;
}),
(asl_locator.View=function (e, t, o){
var i;
(this.map_=e),
(this.data_=t),
(this._cont=o.container),
(this.settings_=zg.extend({
updateOnPan: !0,
geolocation: !1,
features: new asl_locator.FeatureSet(),
},
o
)),
this.init_(),
google.maps.event.trigger(this, "load"),
this.set("featureFilter", new asl_locator.FeatureSet()),
asl_configuration.active_marker &&
(this.active_marker={
m: null,
picon: null,
icon: new google.maps.MarkerImage(asl_configuration.URL +
"icon/" +
asl_configuration.active_marker,
null,
null
),
}),
asl_configuration.icon_size &&
((e=asl_configuration.icon_size.split("x")),
(t=parseInt(e[0])),
(o=parseInt(e[1])),
(e=null),
asl_configuration.label_origin
? (((e=asl_configuration.label_origin.split("x"))[0] =
parseInt(e[0])),
(e[1]=parseInt(e[1])))
: (e=[t / 2, o / 2 - 10]),
(i=null),
asl_configuration.infowin_anchor
? (((i=asl_configuration.infowin_anchor.split("x"))[0] =
parseInt(i[0])),
(i[1]=parseInt(i[1])))
: (i=[t / 2, o / 2 + 8]),
(this.icon={
scaledSize: new google.maps.Size(t, o),
origin: new google.maps.Point(0, 0),
anchor: new google.maps.Point(i[0], i[1]),
labelOrigin: new google.maps.Point(e[0], e[1]),
})),
(this.display_list=asl_configuration.display_list),
(this.cat_in_tooltip="1"!=asl_configuration.title_only);
}),
(asl_locator.View=asl_locator.View),
(asl_locator.View.prototype=new google.maps.MVCObject()),
(asl_locator.View.prototype.secondary_match=function (t){
if(asl_configuration.search_2_contain){
for (var o of asl_configuration.search_2){
let e=t[o] ? t[o].toLowerCase():"";
o=this.second_filter.title.toLowerCase();
if(e.includes(o)) return !0;
}
return !1;
}
return t[this.second_filter.type]===this.second_filter.title;
}),
(asl_locator.View.prototype.clear_search=function (e){
var t;
"1"==asl_configuration.search_type&&(this.filter_text=null),
(this.second_filter =
this.locality =
this.prop_filter =
this._location =
null),
asl_locator.hook_event({ type: "beforeclear", data: null }),
asl_configuration.search_2 &&
((t=this._cont.find(".asl-name-search .asl-search-name")).val(""
),
t.parent().find(".asl-clear-btn").addClass("hide")),
this.reset_measure(e),
this.getMap().panTo(new google.maps.LatLng(asl_configuration.default_lat,
asl_configuration.default_lng
)
),
this.getMap().setZoom(parseInt(asl_configuration.zoom)),
!asl_configuration.category_accordion ||
((t=this._cont.find("#asl-list li.item-state > a:not(.colisiond)"
))[0] &&
(t.addClass("colisiond"), t.next().removeClass("in"))),
asl_locator.hook_event({ type: "clear", data: null });
}),
(asl_locator.View.prototype.reset_all=function (e, t){
var o,
i=this.getMap();
if(asl_configuration.filter_ddl)
for (var a in asl_configuration.filter_ddl)
asl_configuration.filter_ddl.hasOwnProperty(a) &&
((a=asl_configuration.filter_ddl[a]),
asl_engine.controls[a].val(""),
asl_engine.select_controls[a]
.multiselect("deselect", "", !0)
.multiselect("clearSelection"));
if((!this._panel.$category_ddl ||
((o=asl_view._panel.$category_ddl.val()) &&
0 < o.length &&
this._panel.$category_ddl
.multiselect("deselect",
this._panel.$category_ddl.val(),
!0
)
.multiselect("clearSelection")),
asl_configuration.address_ddl)
)
for (var n in this._panel.address_ddls)
this._panel.address_ddls.hasOwnProperty(n) &&
((n=this._panel.address_ddls[n]).val(""),
n
.multiselect("deselect", "", !0)
.multiselect("clearSelection"));
if((this.highlight(null),
asl_configuration.is_mob &&
zg("html, body")
.stop()
.animate({ scrollTop: this._cont.offset().top },
900,
"swing"
),
!t)
){
i.panTo(new google.maps.LatLng(asl_configuration.default_lat,
asl_configuration.default_lng
)
),
i.setZoom(parseInt(asl_configuration.zoom));
let e=this;
google.maps.event.addListenerOnce(i, "idle", function (){
e.refreshView();
});
}
e&&e.apply(this);
}),
(asl_locator.View.prototype.render_branch_list=function (e){
this.data_.setBranchList(e),
this.parent_branch_position(e),
(this.branch_view = !0),
this.refreshView(),
this._cont
.find(".Num_of_store .sl-head-title")
.html(e.props_.title),
this._cont
.find(".Num_of_store .sl-hide-branches")
.removeClass("d-none");
}),
(asl_locator.View.prototype.reset_branch_list=function (){
(this.branch_view = !1),
this.data_.setBranchList(null),
this.parent_branch_position(null),
this.refreshView(),
this._cont
.find(".Num_of_store .sl-head-title")
.html(asl_configuration.head_title),
this._cont
.find(".Num_of_store .sl-hide-branches")
.addClass("d-none");
}),
(asl_locator.View.prototype.parent_branch_position=function (e){
e
? (e.real_location &&
(this.markerCache_[e.id_] &&
this.markerCache_[e.id_].setPosition(e.real_location),
(e.props_.distance=e.props_.real_distance),
(e.props_.dist_str=e.props_.real_distance_str)),
(this.parent_branch=e))
: this.parent_branch &&
((e=this.parent_branch).closest_store &&
(this.markerCache_[e.id_] &&
this.markerCache_[e.id_].setPosition(e.closest_store.location_
),
(e.props_.distance=e.closest_store.props_.distance),
(e.props_.dist_str=e.closest_store.props_.distance_str)),
(this.parent_branch=null));
}),
(asl_locator.View.prototype.measure_distance=function (e, _, d, t){
var o=this,
e =
(this.clear_infobox(),
asl_configuration.adv_mkr &&
(o.clearMarkers(),
delete o.markerCache_,
(o.markerCache_={})),
new google.maps.LatLng(e.lat(), e.lng()));
if(((o._panel.dest_coords=o.dest_coords=e),
asl_configuration.sort_random &&
(asl_configuration.sort_random = !1),
"5"==asl_configuration.first_load
? o.display_list ||
(o._cont.removeClass("sl-search-only"), (o.display_list = !0))
: "3"==asl_configuration.first_load
? o.display_list ||
(o._cont.removeClass("map-full"), (o.display_list = !0))
: "4"==asl_configuration.first_load &&
(o.list_shown ||
(o._cont.removeClass("map-full"), (o.list_shown = !0))),
asl_configuration.filter_address)
){
var u,
i={};
if((t=Array.isArray(t) ? t[0]:t)&&t.address_components)
for (var a in t.address_components)
t.address_components.hasOwnProperty(a) &&
(-1!=t.address_components[a].types.indexOf("sublocality") ||
-1!=t.address_components[a].types.indexOf("sublocality_level_1"
) ||
-1!=t.address_components[a].types.indexOf("locality") ||
-1!=t.address_components[a].types.indexOf("administrative_area_level_2"
)
? ((u=[
t.address_components[a].long_name.toLowerCase(),
t.address_components[a].short_name.toLowerCase(),
]),
(i.city=i.city ? i.city.concat(u):u))
: -1!=t.address_components[a].types.indexOf("administrative_area_level_1"
)
? (i.state=[
t.address_components[a].long_name.toLowerCase(),
t.address_components[a].short_name.toLowerCase(),
])
: -1!=t.address_components[a].types.indexOf("country")
? (i.country=[
t.address_components[a].long_name.toLowerCase(),
t.address_components[a].short_name.toUpperCase(),
])
: -1!=t.address_components[a].types.indexOf("postal_code"
) &&
(i.postal_code=[
t.address_components[a].long_name.toLowerCase(),
t.address_components[a].short_name.toLowerCase(),
]));
i.city&&delete i.state,
(o.locality =
i.city||i.state||i.country||i.postal_code ? i:null);
}
var n,
s,
p,
r,
f=100,
g=1e3,
h=null,
m =
"KM"==asl_configuration.distance_unit
? asl_configuration.words.Km
: asl_configuration.words.Miles,
l=o.data_.stores_;
for (c in l)
l.hasOwnProperty(c) &&
((n=l[c].distanceTo(o.dest_coords)),
(l[c].content_=null),
(l[c].props_.distance=n),
(l[c].props_.dist_str =
asl_engine.helper.format_count(n) + " " + m),
f < n&&(f=n),
n < g&&((h=l[c]), (g=n)));
if(asl_configuration.branches)
for (var c in l)
l.hasOwnProperty(c) &&
(s=l[c]).props_.childs &&
((p=o.data_.getClosestBranch(s)),
(s.closest_store=p[1]),
(s.props_.real_distance=s.props_.distance),
(s.props_.real_distance_str=s.props_.dist_str),
(s.props_.distance=p[0]),
(s.props_.dist_str =
asl_engine.helper.format_count(p[0]) + " " + m),
(s.real_location=s.location_),
(s.location_=s.closest_store.location_),
o.markerCache_[s.id_] &&
o.markerCache_[s.id_].setPosition(s.location_));
o.my_marker
? o.my_marker.setPosition(e)
: ((o.my_marker=new google.maps.Marker({
title: asl_configuration.words.your_cur_loc,
position: e,
zIndex: 0,
animation: google.maps.Animation.DROP,
draggable: !0,
map: "0"==asl_configuration.geo_marker ? null:o.getMap(),
})),
(r=asl_configuration.URL + "icon/me-pin.png"),
asl_configuration.geo_marker_id &&
asl_markers[asl_configuration.geo_marker_id] &&
(r =
asl_configuration.URL +
"icon/" +
asl_markers[asl_configuration.geo_marker_id].icon),
(r=new google.maps.MarkerImage(r, null, null, null)),
o.my_marker.setIcon(r),
o.my_marker.addListener("dragend", function (e){
o.measure_distance(e.latLng);
})),
_ &&
"1"==asl_configuration.search_destin &&
h &&
(e=h.getLocation()),
asl_configuration.radius_circle
? (o.draw_radius_center(o.dest_coords), o.refreshView())
: d ||
("0"==asl_configuration.search_zoom&&o.bbox
? o.bbox.isEmpty()||o.getMap().fitBounds(o.bbox)
: (o.getMap().setCenter(e),
asl_configuration.search_zoom &&
o
.getMap()
.setZoom(parseInt(asl_configuration.search_zoom)),
google.maps.event.trigger(o, "load")),
o.refreshView()),
o._panel.geo_modal&&o._panel.hideGeoModal();
}),
(asl_locator.View.prototype.draw_radius_center=function (e){
var t=this,
o=null;
e &&
((o=parseInt(asl_configuration.radius_range)),
(o *=1e3),
"KM"!=asl_configuration.distance_unit&&(o *=1.60934),
t.$circle
? t.$circle.setOptions({ radius: o, center: e })
: (t.$circle=new google.maps.Circle({
strokeColor: asl_configuration.radius_color||"#FFFF00",
strokeOpacity: 0.7,
strokeWeight: 2,
fillColor: asl_configuration.radius_color||"#FFFF00",
fillOpacity: 0.2,
map: t.getMap(),
radius: o,
center: e,
})),
t.getMap().fitBounds(t.$circle.getBounds()));
}),
(asl_locator.View.prototype.setup_distance_control=function (){
var o=this,
e =
((asl_configuration.radius_range=100),
asl_configuration.fixed_radius &&
(asl_configuration.radius_range=parseInt(
asl_configuration.fixed_radius
)),
asl_configuration.dropdown_range.split(","));
if(!asl_configuration.boundary_box)
if(asl_configuration.distance_slider &
asl_configuration.advance_filter &&
"1"==asl_configuration.distance_control
){
var t =
"KM"==asl_configuration.distance_unit
? asl_configuration.words.Km
: asl_configuration.words.Miles,
i="";
if(o.$dist_control)
asl_configuration.radius_range=parseInt(
o.$dist_control.val()
);
else {
for (var a=0; a < e.length; a++){
var n=e[a];
i += !(!n||"*"!=n[0])
? '<option selected="selected" value="' +
(n=n.replace("*", "")) +
'">' +
n +
" " +
t +
"</option>"
: '<option value="' +
n +
'">' +
n +
" " +
t +
"</option>";
}
var s =
"1"!=asl_configuration.template
? '<label for="asl-ctrl-ddl-range" class="asl-cntrl-lbl">' +
asl_configuration.words.distance +
"</label>"
: "";
o._cont
.find(".range_filter")
.html('<div class="asl-filter-cntrl">' +
s +
'<div class="sl-dropdown-cont">          <select id="asl-ctrl-ddl-range" class="asl-dist-ddl">' +
i +
"</select></div></div>"
)
.removeClass("hide"),
"1"==asl_configuration.template &&
o._cont
.find(".range_filter")
.prepend('<label for="asl-ctrl-ddl-range">' +
asl_configuration.words.in +
"</label>"
),
(o.$dist_control=o._cont.find(".asl-dist-ddl")),
o.$dist_control.multiselect({
enableFiltering: !1,
nonSelectedText: asl_configuration.words.select_distance,
numberDisplayed: 1,
maxHeight: asl_configuration.ddl_max_height
? parseInt(asl_configuration.ddl_max_height)
: 250,
onChange: function (e, t){
e=parseInt(e.val());
isNaN(e)&&(e=1e3),
(asl_configuration.radius_range=e),
o.refreshView(),
o.$circle&&o.draw_radius_center(o.dest_coords);
},
}),
(asl_configuration.radius_range=parseInt(
o.$dist_control.val()
));
}} else
asl_configuration.distance_slider &
asl_configuration.advance_filter &&
"0"==asl_configuration.distance_control &&
(o._cont.find(".range_filter").removeClass("hide"),
o._cont
.find("#asl-radius-input")
.html(asl_configuration.radius_range),
o.$dist_control
? (o.$dist_control.aslSlider("setAttribute",
"max",
asl_configuration.radius_range
),
o.$dist_control.aslSlider("setValue",
asl_configuration.radius_range
),
o._cont
.find("#asl-radius-input")
.html(asl_configuration.radius_range))
: ((s=asl_configuration.slider_val_radius
? parseInt(asl_configuration.slider_val_radius)
: asl_configuration.radius_range),
(o.$dist_control=o._cont
.find("#asl-radius-slide")
.aslSlider({
value: s,
min: asl_configuration.slider_min_radius
? parseInt(asl_configuration.slider_min_radius)
: 1,
max: asl_configuration.radius_range,
})
.on("slide", function (e){
o._cont.find("#asl-radius-input").html(e.value),
(asl_configuration.radius_range=e.value);
})
.on("slideStop", function (e){
o.refreshView(),
o.$circle&&o.draw_radius_center(o.dest_coords);
})),
(asl_configuration.radius_range=s)));
}),
(asl_locator.View.prototype.reset_measure=function (e){
var t,
o=this,
i =
(this.clear_infobox(),
asl_configuration.adv_mkr &&
(o.clearMarkers(),
delete o.markerCache_,
(o.markerCache_={})),
(o.bbox=o._panel.dest_coords=o.dest_coords=null),
asl_configuration.radius_range,
o.data_.stores_);
for (a in i)
i.hasOwnProperty(a) &&
((i[a].content_=null),
(i[a].props_.dist_str=i[a].props_.distance=null));
if(asl_configuration.branches)
for (var a in i)
i.hasOwnProperty(a) &&
(t=i[a]).props_.childs &&
((t.location_=t.real_location),
(t.real_distance_str =
t.real_distance =
t.closest_store =
t.real_location =
null),
o.markerCache_[t.id_] &&
o.markerCache_[t.id_].setPosition(t.location_));
o._cont
.find("#asl-radius-input")
.html(asl_configuration.radius_range),
delete asl_locator.Store.infoPanelCache_,
(asl_locator.Store.infoPanelCache_={}),
o.my_marker &&
(o.my_marker.setMap(null),
delete o.my_marker,
(o.my_marker=null)),
o.$circle &&
(o.$circle.setMap(null), delete o.$circle, (o.$circle=null)),
o.refreshView(),
zg(e).val("");
}),
(asl_locator.View.prototype.add_search_text=function (e){
this._panel.search_control &&
((this._panel.search_control.value=e),
zg(this._panel.search_control).next().removeClass("hide"));
}),
(asl_locator.View.prototype.geolocate_=function (){
var t=this;
function e(e){
var t=zg('<div class="alert alert-danger asl-geo-err"></div>');
switch (e.code){
case "http":
t.html("Error! site is loading with HTTP connection");
break;
case e.PERMISSION_DENIED:
t.html(asl_configuration.words.geo_location_error ||
e.message ||
"User denied the request for Geolocation."
);
break;
case e.POSITION_UNAVAILABLE:
t.html("Location information is unavailable.");
break;
case e.TIMEOUT:
t.html("The request to get user location timed out.");
break;
case e.UNKNOWN_ERROR:
t.html("An unknown error occurred.");
break;
default:
t.html(e.message);
}
t.appendTo(".asl-cont .asl-map"),
window.setTimeout(function (){
t.remove();
}, 5e3);
}
window.navigator &&
navigator.geolocation &&
("http:"!=window.location.protocol
? navigator.geolocation.getCurrentPosition(function (e){
t.measure_distance(new google.maps.LatLng(e.coords.latitude,
e.coords.longitude
)
),
asl_locator.hook_event({
type: "geolocation",
data: e.coords,
}),
t.add_search_text(asl_configuration.words.current_location
);
},
e,
{ maximumAge: 6e4, timeout: 1e4 }
)
: e({ code: "http" }));
}),
(asl_locator.View.prototype.geo_service=function (){
var i=this,
a=i._cont.find("#auto-complete-search,.asl-search-address");
zg.ajax({
url: "https://get.geojs.io/v1/ip/geo.json",
type: "GET",
dataType: "json",
success: function (e){
var t, o;
e &&
e.latitude &&
e.longitude &&
((t=parseFloat(e.latitude)),
(o=parseFloat(e.longitude)),
(t=new google.maps.LatLng(t, o)),
(o=[]),
e.city&&o.push(e.city),
e.region&&o.push(e.region),
e.country&&o.push(e.country),
(e=o.join(", ")),
a.val(e),
a.next().removeClass("hide"),
i.measure_distance(t),
asl_locator.hook_event({ type: "geolocation", data: t }));
},
error: function (e){
console.warn("Error Store Locator! GeoJS API: ", e);
},
});
}),
(asl_locator.View.prototype.clear_infobox=function (){
this.get("selectedStore")&&this.highlight(null);
}),
(asl_locator.View.prototype.fitBound=function (e){
var t=e||this.get("stores");
if(t.length){
var o,
i=new google.maps.LatLngBounds();
for (o in t) t.hasOwnProperty(o)&&i.extend(t[o].getLocation());
var a=asl_configuration.max_bound_zoom,
n=asl_configuration.min_bound_zoom||2;
google.maps.event.addListenerOnce(this.getMap(),
"bounds_changed",
function (){
this.setZoom(Math.max(n, Math.min(this.getZoom(), a)));
}
),
this.getMap().fitBounds(i);
}}),
(asl_locator.View.prototype.init_=function (){
this.settings_.geolocation&&this.geolocate_(),
(this.markerCache_={});
var e=asl_configuration.infobox_width||320,
t =
asl_configuration.PLUGIN_URL +
(asl_configuration.close_white
? "public/img/cross-white.png"
: "public/img/cross.png"),
o =
(("2"==asl_configuration.infobox_layout ||
("1"==asl_configuration.template &&
"0"==asl_configuration.infobox_layout)) &&
(t =
asl_configuration.PLUGIN_URL +
"public/img/close-white.svg"),
(this.infoWindow_=new InfoBox({
boxStyle: {
width: e + "px",
margin:
"0 0 " +
asl_configuration.marker_height +
"px -" +
e / 2 +
"px",
},
alignBottom: !0,
pane: !1,
disableAutoPan: !0,
closeBoxMargin: "11px 10px -27px 0px",
closeBoxURL: t,
infoBoxClearance: new google.maps.Size(1, 1),
})),
this),
e=this.getMap();
this.set("updateOnPan", this.settings_.updateOnPan),
google.maps.event.addListener(this.infoWindow_,
"closeclick",
function (){
o.highlight(null);
}
),
google.maps.event.addListener(e, "click", function (){
o.get("selectedStore") &&
(o.highlight(null), o.infoWindow_.close());
}),
o._cont
.find(".Num_of_store .sl-hide-branches")
.bind("click", o.reset_branch_list.bind(o)),
o.setup_distance_control(),
asl_configuration.adv_mkr &&
((asl_configuration.marker_label =
asl_configuration.do_bounce =
asl_configuration.active_marker =
asl_configuration.cluster =
!1),
(o.active_marker=""),
(this.createMarker=function (e){
return new google.maps.marker.AdvancedMarkerElement({
content: e.advMkrContent(),
position: e.getLocation(),
title: e.props_.title,
});
}),
(google.maps.marker.AdvancedMarkerElement.prototype.getPosition =
function (){
return this.position;
}),
(google.maps.marker.AdvancedMarkerElement.prototype.getMap =
function (){
return this.map;
})),
asl_configuration["default-addr"] &&
asl_engine.helper.query_parameter("sl-addr") &&
zg("html, body").animate({ scrollTop: o._cont.offset().top },
1e3
);
}),
(asl_locator.View.prototype.updateOnPan_changed=function (){
this.updateOnPanListener_ &&
google.maps.event.removeListener(this.updateOnPanListener_);
var e,
t=this;
this.get("updateOnPan") &&
this.getMap() &&
((e=(t=this).getMap()),
(this.updateOnPanListener_=google.maps.event.addListener(e,
"dragend",
function (e){
asl_configuration.reset_button &&
zg(".asl-reset-map")[0] &&
"block"!=zg(".asl-reset-map")[0].style &&
(zg(".asl-reset-map")[0].style.display="block"),
asl_configuration.sort_by_bound&&t.refreshView();
}
)));
}),
(asl_locator.View.prototype.addStoreToMap=function (t){
var o=this.getMarker(t),
i=(t.setMarker(o), this);
(o.clickListener_=google.maps.event.addListener(o,
asl_configuration.mouseover ? "mouseover":"click",
function (){
var e;
asl_configuration.click_redirect
? (e=t.props_[asl_configuration.click_redirect]) &&
(window.location.href=e)
: ((i.marker_clicked = !0),
(i.halt_fetch = !0),
(i.marker_center=o.getPosition()),
i.highlight(t, !1),
_asl_map_customize &&
1==_asl_map_customize.marker_animations &&
o.setAnimation(google.maps.Animation.Xp));
}
)),
o.getMap()!=this.getMap() &&
(o.setMap(this.getMap()),
_asl_map_customize &&
1==_asl_map_customize.marker_animations &&
o.setAnimation(google.maps.Animation.Xp));
}),
(asl_locator.View.prototype.createMarker=function (e){
var t=asl_configuration.URL + "icon/",
o=asl_categories[e.categories_[0]],
i=0,
i =
asl_configuration.category_marker&&o
? ((t=asl_configuration.URL + "svg/"),
(t +=
(asl_categories[e.categories_[0]] &&
asl_categories[e.categories_[0]].icon) ||
"default.png"),
parseInt(asl_categories[e.categories_[0]].ordr))
: ((t +=
(asl_markers[e.props_.marker_id] &&
asl_markers[e.props_.marker_id].icon) ||
"default.png"),
e.props_.ordr||0),
o=asl_configuration.marker_title
? this.cat_in_tooltip&&o && o.name
? o.name + " | " + e.props_.title
: e.props_.title
: null,
o={
title: asl_engine.helper.html_entites(o),
position: e.getLocation(),
zIndex: asl_configuration.marker_index ? i:null,
animation:
_asl_map_customize &&
1==_asl_map_customize.marker_animations
? google.maps.Animation.BOUNCE
: null,
icon: { url: t },
};
return (
this.icon &&
((o.icon=Object.assign({}, this.icon)), (o.icon.url=t)),
asl_configuration.marker_label &&
e.props_.label &&
(o.label={
text: e.props_.label,
color: asl_configuration.label_color||"#eb3a44",
fontSize: "16px",
fontWeight: "bold",
}),
new google.maps.Marker(o)
);
}),
(asl_locator.View.prototype.getMarker=function (e){
var t=this.markerCache_,
o=e.id_;
return t[o]||(t[o]=this.createMarker(e)), t[o];
}),
(asl_locator.View.prototype.getInfoWindow=function (e, t){
if(!e) return this.infoWindow_;
e=zg(e.getInfoWindowContent(t));
return this.infoWindow_.setContent(e[0]), this.infoWindow_;
}),
(asl_locator.View.prototype.getViewFeatures=function (){
return this.settings_.features;
}),
(asl_locator.View.prototype.getFeatureById=function (e){
if(!this.featureById_){
this.featureById_={};
for (
var t, o=this.getViewFeatures().asList(), i=0;
(t=o[i]);
i++
)
this.featureById_[t.id_]=t;
}
return this.featureById_[e];
}),
(asl_locator.View.prototype.featureFilter_changed=function (){
google.maps.event.trigger(this,
"featureFilter_changed",
this.get("featureFilter")
),
this.get("stores")&&this.clearMarkers();
}),
(asl_locator.View.prototype.clearMarkers=function (){
for (var e in this.markerCache_){
this.markerCache_[e].setMap(null);
e=this.markerCache_[e].clickListener_;
e&&google.maps.event.removeListener(e);
}}),
(asl_locator.View.prototype.storesWithCategory=function (e){
var t=this.get("stores"),
o=[];
if(t)
for (var i=0, a=t.length; i < a; i++)
t[i].hasCategory(e)&&o.push(t[i]);
return o;
}),
(asl_locator.View.prototype.categoryClearAll=function (){
var e,
t=this.get("featureFilter");
for (e in t.array_) t.array_.pop();
}),
(asl_locator.View.prototype.categoryAccFilter=function (e, t){
var o=this.get("featureFilter"),
t=e&&t ? this.getFeatureById(e):null;
t&&o.add(t),
this.set("featureFilter", o),
this.refreshView(),
this.fitBound();
}),
(asl_locator.View.prototype.doBounce=function (e, t){
asl_configuration.marker_label ||
((e=e.getMarker()).setAnimation(null),
t&&e.setAnimation(google.maps.Animation.BOUNCE));
}),
(asl_locator.View.prototype.panTo=function (e){
e=e.getMarker();
this.getMap().panTo(e.getPosition());
}),
(asl_locator.View.prototype.reloadLocator=function (e, t){
(asl_configuration.load_all="1"),
this.clearMarkers(),
asl_configuration.cluster &&
asl_locator.marker_clusters.clearMarkers(),
(this.data_.stores_=[]),
this.refreshView(),
delete asl_locator.Store.infoPanelCache_,
(asl_locator.Store.infoPanelCache_={}),
this.data_.fetch_remote_data(null, e, t);
}),
(asl_locator.View.prototype.refreshView=function (){
var C=this,
x=this.getMap().getBounds(),
L=(console.log("Calling Refresh View"), {}),
e = !1;
if(asl_configuration.filter_ddl)
for (var t in asl_configuration.filter_ddl)
asl_configuration.filter_ddl.hasOwnProperty(t) &&
((t=asl_configuration.filter_ddl[t]),
(L[t]=asl_engine.controls[t].val()),
"1"==asl_configuration.single_cat_select &&
(L[t]="0"!=L[t]&&L[t] ? [L[t]]:null),
L[t]&&L[t].length&&(e = !0));
if((!asl_configuration.first_load ||
("1"!=asl_configuration.first_load &&
"4"!=asl_configuration.first_load)) &&
!(
("6"==asl_configuration.first_load &&
(C.dest_coords ||
C.prop_filter ||
C.get("featureFilter").count() ||
e ||
!asl_engine.helper.is_empty(C.address_values))) ||
C.dest_coords ||
C.prop_filter ||
C.second_filter
)
)
return (
(C.search_performed = !1),
C.set("stores", []),
void C._panel.set("stores", [!0])
);
(C.search_performed = !0),
this.data_.getStores(x, this.get("featureFilter"), function (e){
var t=C.get("stores");
if(t)
for (var _=0, d=t.length; _ < d; _++)
google.maps.event.removeListener(t[_].getMarker().clickListener_
);
var o,
i=[],
a=[],
u=(C.filter_text, !!(e&&e[0]&&e[0].props_.dist_str)),
p = !(
!u ||
(!asl_configuration.distance_slider &&
!asl_configuration.fixed_radius)
),
f = !(!asl_configuration.boundary_box||!C.bbox),
g =
(asl_configuration.branches,
!(!asl_configuration.store_radius||!u)),
h=asl_configuration.sort_by,
n =
(asl_configuration.search_dist_sort &&
C.dest_coords &&
(h=""),
"1"==asl_configuration.distance_filter_off&&(p = !1),
Object.keys(asl_categories)),
s=asl_configuration.filter_ddl;
for (l in n)
asl_categories[n[l]]&&(asl_categories[n[l]].len=0);
for (l in n)
asl_categories[n[l]]&&(asl_categories[n[l]].len=0);
for (o in e)
if(e.hasOwnProperty(o)){
var r=e[o].props_;
if(asl_configuration.address_ddl){
if(C.address_values.country &&
C.address_values.country!=r.country
)
continue;
if(C.address_values.state &&
C.address_values.state!=r.state
)
continue;
if(C.address_values.city &&
C.address_values.city!=r.city
)
continue;
}
if(s){
var m,
v = !0;
for (m in s){
var y=L[s[m]];
if(y&&0 < y.length){
var w=r[s[m]];
if(!(v=y.some(function (e){
return -1!=w.indexOf(e);
}))
)
break;
}}
if(!v) continue;
}
if((!C.prop_filter ||
!C.prop_filter.type ||
r[C.prop_filter.type]==C.prop_filter.title) &&
(!C.second_filter||C.secondary_match(r)) &&
(!asl_configuration.additional_search ||
!C.search_text ||
(e[o].props_.description_2 &&
-1!=e[o].props_.description_2.indexOf(C.search_text)))
){
if(asl_configuration.filter_address)
if(null==C.locality){
if(asl_configuration.default_city &&
r.city.toLowerCase()!=asl_configuration.default_city.toLowerCase()
)
continue;
}else if(C.locality){
var b = !1;
if(!(b =
(C.locality.city &&
r.city &&
-1!=C.locality.city.indexOf(r.city.toLowerCase()
)) ||
(C.locality.postal_code &&
r.postal_code &&
-1!=C.locality.postal_code.indexOf(r.postal_code.toLowerCase()
)) ||
(C.locality.state &&
r.state &&
-1!=C.locality.state.indexOf(r.state.toLowerCase()
))
? !0
: b)
)
continue;
}
if(g){
if(r.distance >=parseFloat(r.radius)) continue;
}else if(f){
if(!C.bbox.contains(e[o].getLocation())) continue;
}else if(asl_configuration.advance_filter){
if(p&&r.distance >=asl_configuration.radius_range)
continue;
if(asl_configuration.time_switch &&
asl_configuration.show_opened &&
1!=r.open
)
continue;
}else if(asl_configuration.fixed_radius &&
r.distance &&
r.distance >=asl_configuration.fixed_radius
)
continue;
for (var l in e[o].categories_)
e[o].categories_.hasOwnProperty(l) &&
asl_categories[e[o].categories_[l]] &&
asl_categories[e[o].categories_[l]].len++;
if(asl_configuration.branches)
if(C.branch_view){
if(!r.branch) continue;
}else if(r.branch) continue;
(0 < r.ordr ? a:i).push(e[o]);
}}
if(("2"==asl_configuration.template &&
asl_configuration.advance_filter &&
C._cont
.find(".asl-categories-list .round-box")
.each(function (e){
zg(this).attr("data-c",
asl_categories[zg(this).attr("data-id")].len
),
(this.children[0].children[1].children[0].children[1].innerHTML =
"(" +
asl_categories[zg(this).attr("data-id")].len +
")");
}),
0 < a.length &&
(C.dest_coords&&C.data_.sortDistance(C.dest_coords, a),
C.data_.sortByDesc("ordr", a)),
asl_configuration.sort_random
? C.data_.sortRandom(i)
: h
? C.data_.sortBy(h, i)
: i&&C.dest_coords
? C.data_.sortDistance(C.dest_coords, i)
: x &&
asl_configuration.sort_by_bound &&
C.data_.sortDistance(x.getCenter(), i),
0 < a.length&&(i=a.concat(i)),
(C.total_stores=i.length),
asl_configuration.stores_limit &&
(i=i.slice(0, asl_configuration.stores_limit)),
(asl_configuration.adv_mkr ||
asl_configuration.marker_label) &&
u)
){
for (var k=i.length, c=0; c < k; c++)
i[c].props_.label=String(c + 1);
delete C.markerCache_, (C.markerCache_={});
}
!i.length &&
asl_configuration.default_store &&
(i=e.filter(function (e){
return (
e.props_.id===parseInt(asl_configuration.default_store)
);
})),
C.set("stores", i),
C._panel.set("stores", [!0]),
asl_configuration.select_category &&
asl_configuration.category_bound &&
(asl_configuration["default-addr"]||C.fitBound(null),
(asl_configuration.select_category=null));
});
}),
(asl_locator.View.prototype.countWithBranches=function (e){
for (var t=e.length, o=0; o < e.length; o++)
e[o].props_.childs&&(t +=e[o].props_.childs.length);
return t;
}),
(asl_locator.View.prototype.stores_changed=function (){
delete asl_locator.Store.infoPanelCache_,
(asl_locator.Store.infoPanelCache_={});
var e=this.get("stores"),
t=[];
asl_configuration.cluster||this.clearMarkers();
for (var o, i=0; (o=e[i]); i++)
this.addStoreToMap(o), t.push(o.marker_);
asl_configuration.cluster &&
(asl_locator.marker_clusters.clearMarkers(),
asl_locator.marker_clusters.addMarkers(t));
}),
(asl_locator.View.prototype.getMap=function (){
return this.map_;
}),
(asl_locator.View.prototype.map_recenter=function (e, t, o){
var i;
asl_configuration.disable_pan ||
((e=(i=this.getMap())
.getProjection()
.fromLatLngToPoint(e instanceof google.maps.LatLng ? e:i.getCenter()
)),
(t=new google.maps.Point(("number"==typeof t ? t:0) / Math.pow(2, i.getZoom())||0,
("number"==typeof o ? o:0) / Math.pow(2, i.getZoom())||0
)),
i.panTo(i
.getProjection()
.fromPointToLatLng(new google.maps.Point(e.x - t.x, e.y + t.y)
)
));
}),
(asl_locator.View.prototype.highlightAdvMkr=function (i, e){
var t,
o=this.getMap(),
a=this,
n=this.get("selectedStore");
n &&
((t=n.getMarker()),
zg(t.targetElement).removeClass("asl-mkr-actv"),
(t.zIndex=null)),
i &&
(this.get("stores"),
asl_configuration.analytics&&asl_locator.save_analytics(i, 1),
asl_configuration.zoom_li &&
o.setZoom(parseInt(asl_configuration.zoom_li)),
this.map_recenter(i.getLocation(),
asl_configuration.info_x_offset,
asl_configuration.info_y_offset
),
asl_locator.hook_event({ type: "select", data: i.props_ }),
o.getStreetView().getVisible() &&
o.getStreetView().setPosition(i.getLocation()),
(t=i.getMarker()),
zg(t.targetElement).addClass("asl-mkr-actv"),
(t.zIndex=1)),
this.set("selectedStore", i),
this.display_list &&
(e ||
!i ||
asl_configuration.accordion ||
window.setTimeout(function (){
var e=a._panel.mainPanel,
t=a._panel.storeList_.find('.sl-item[data-id="' + i.id_ + '"]'
),
o=t.position().top;
t[0]&&e.animate({ scrollTop: o }, "fast");
}, 500));
}),
(asl_locator.View.prototype.highlight=function (i, e){
var t,
o=null,
a=this.getMap(),
n=this;
if(asl_configuration.adv_mkr) return this.highlightAdvMkr(i, e);
i
? ((t=this.get("stores")),
(o=this.getInfoWindow(i, t)),
i.getMarker()
? (i.getMarker(),
o.open(a, i.getMarker()),
asl_configuration.analytics &&
asl_locator.save_analytics(i, 1))
: (o.setPosition(i.getLocation()), o.open(a)),
asl_configuration.zoom_li &&
a.setZoom(parseInt(asl_configuration.zoom_li)),
this.map_recenter(i.getLocation(),
asl_configuration.info_x_offset,
asl_configuration.info_y_offset
),
asl_locator.hook_event({ type: "select", data: i.props_ }),
a.getStreetView().getVisible() &&
a.getStreetView().setPosition(i.getLocation()))
: (this.getInfoWindow().close(),
asl_locator.hook_event({ type: "unselect", data: null })),
this.set("selectedStore", i),
this.display_list &&
(e ||
!i ||
asl_configuration.accordion ||
window.setTimeout(function (){
var e=n._panel.mainPanel,
t=n._panel.storeList_.find('.sl-item[data-id="' + i.id_ + '"]'
),
o=t.position().top;
t[0]&&e.animate({ scrollTop: o }, "fast");
}, 500));
}),
(asl_locator.View.prototype.selectedStore_changed=function (){
google.maps.event.trigger(this,
"selectedStore_changed",
this.get("selectedStore")
);
}),
(asl_locator.ViewOptions=function (){}),
asl_locator.ViewOptions.prototype.updateOnPan,
asl_locator.ViewOptions.prototype.geolocation,
asl_locator.ViewOptions.prototype.features,
asl_locator.ViewOptions.prototype.markerIcon,
(asl_locator.Feature=function (e, t, o, i){
(this.id_=e), (this.name_=t), (this.img_=o), (this.order=i);
}),
(asl_locator.Feature=asl_locator.Feature),
(asl_locator.Feature.prototype.getId=function (){
return this.id_;
}),
(asl_locator.Feature.prototype.getDisplayName=function (){
return this.name_;
}),
(asl_locator.Feature.prototype.toString=function (){
return this.getDisplayName();
}),
(asl_locator.FeatureSet=function (e){
(this.array_=[]), (this.hash_={});
for (var t, o=0; (t=arguments[o]); o++) this.add(t);
}),
(asl_locator.FeatureSet=asl_locator.FeatureSet),
(asl_locator.FeatureSet.prototype.toggle=function (e){
this.hash_[e.id_] ? this.remove(e):this.add(e);
}),
(asl_locator.FeatureSet.prototype.add=function (e){
e&&(this.array_.push(e), (this.hash_[e.id_]=1));
}),
(asl_locator.FeatureSet.prototype.count=function (){
return this.array_.length;
}),
(asl_locator.FeatureSet.prototype.remove=function (e){
var t=e.id_;
this.hash_[t] &&
(delete this.hash_[t],
(this.array_=this.array_.filter(function (e){
return e&&e.id_!=t;
})));
}),
(asl_locator.FeatureSet.prototype.asList=function (){
for (var e=[], t=0, o=this.array_.length; t < o; t++){
var i=this.array_[t];
null!==i&&e.push(i);
}
return e;
}),
(asl_locator.FeatureSet.NONE=new asl_locator.FeatureSet()),
(asl_locator.Panel=function (e, t){
var o=this;
(this.el_=zg(e)),
(this._cont=t.container),
this.el_.addClass("asl_locator-panel"),
(this.settings_=zg.extend({
locationSearch: !0,
locationSearchLabel: "Enter Location/ZipCode: ",
featureFilter: !0,
directions: !0,
view: null,
},
t
)),
(this.directionsRenderer_=new google.maps.DirectionsRenderer({
draggable: !0,
})),
(this.directionsService_=new google.maps.DirectionsService()),
(t.view._panel=this).init_(),
o.get("view");
(this.filter_=o._cont.find(".header-search")),
o._cont.find(".asl-print-btn").bind("click", function (e){
var t="asl-list",
t =
("none"==o._cont.find(".panel-inner").css("display") &&
((t="asl-rendered-dir"),
o._cont
.find("#asl-list")
.find(".rendered-directions")
.attr("id", t)),
{
printable: t,
type: "html",
css:
asl_configuration.PLUGIN_URL + "public/css/print.css",
});
asl_configuration.print_header &&
(t.header=asl_configuration.print_header),
printJS(t);
}),
this.lead_form_modal();
}),
(asl_locator.Panel=asl_locator.Panel),
(asl_locator.Panel.prototype=new google.maps.MVCObject()),
(asl_locator.Panel.prototype.init_=function (){
var t,
n=this,
s =
((this.itemCache_={}),
this.settings_.view&&this.set("view", this.settings_.view),
n.get("view")),
_=s.getMap(),
e =
((this.filter_=s._cont.find(".header-search")),
asl_configuration.cluster &&
(asl_locator.marker_clusters=new MarkerClusterer(_, [], {
maxZoom: parseInt(asl_configuration.cluster_max_zoom)||9,
gridSize:
parseInt(asl_configuration.cluster_grid_size)||90,
styles: [
{ width: 30, height: 30, className: "asl-cluster-1" },
{ width: 40, height: 40, className: "asl-cluster-2" },
{ width: 50, height: 50, className: "asl-cluster-3" },
],
clusterClass: "asl-cluster",
})),
this.settings_.locationSearch &&
((this.locationSearch_=this.filter_),
void 0!==google.maps.places
? ((t=n._cont.find("#auto-complete-search,.asl-search-address"
)[0]),
"0"==asl_configuration.search_type &&
this.initAutocomplete_(t),
"2"==asl_configuration.search_type &&
this.geoCoder(t, null, !0),
n._cont
.find(".asl-reset-btn")
.bind("click", function (e){
s.clear_search(t),
t &&
zg(t)
.parent()
.find(".asl-clear-btn")
.addClass("hide"),
s.reset_all(null, !0);
}))
: this.filter_.submit(function (){
n.searchPosition(zg("input", n.locationSearch_).val());
}),
this.filter_.submit(function (){
return !1;
}),
google.maps.event.addListener(this, "geocode", function (e){
var t, o;
n.searchPositionTimeout_ &&
window.clearTimeout(n.searchPositionTimeout_),
e.geometry
? ((this.directionsFrom_=e.geometry.location),
n.directionsVisible_&&n.renderDirections_(),
(t=n.get("view")).highlight(null),
(o=t.getMap()),
e.geometry.viewport
? o.fitBounds(e.geometry.viewport)
: (o.setCenter(e.geometry.location),
asl_configuration.zoom_li &&
o.setZoom(parseInt(asl_configuration.zoom_li))),
t.refreshView(),
n.listenForStoresUpdate_())
: n.searchPosition(e.name);
})),
(this.featureFilter_=s._cont.find("#filter-options")),
this.featureFilter_.show(),
asl_configuration.show_categories ||
s._cont.find(".sl-category-filter.drop_box_filter").remove(),
asl_configuration.advance_filter &&
s._cont.find(".asl-advance-filters").removeClass("hide"),
s._cont.find("#asl-open-close")),
o =
(asl_configuration.time_switch &&
e[0] &&
((e[0].checked = !1),
e.bind("change", function (e){
(asl_configuration.show_opened=this.checked),
n.get("view").refreshView();
}),
s._cont.find(".Status_filter").addClass("asl-block")),
this.get("view").getViewFeatures().asList()),
d =
(this.featureFilter_.find(".inner-filter"),
(this.storeList_=this.el_.find(".sl-list")),
(this.SListCont_=this.el_.find(".asl-panel-inner")),
(this.mainPanel=this.el_.find(".sl-main-cont-box")),
(o =
"name_"==asl_configuration.cat_sort
? asl_engine.helper.sortBy(o, "name_", !0)
: asl_engine.helper.sortBy(o, "order")),
"1"==asl_configuration.single_cat_select
? ""
: 'multiple="multiple"');
if("2"==asl_configuration.template &&
asl_configuration.advance_filter &&
asl_configuration.show_categories
){
for (
var u=s._cont.find(".asl-categories-panel"),
p=u.find(".asl-categories-list"),
f=asl_configuration.URL + "svg/",
i=0,
g=o.length;
i < g;
i++
){
var a=o[i],
r=zg(
'<div class="round-box" data-c="' +
asl_categories[a.id_].len +
'" data-id="' +
a.id_ +
'"><div class="iner-box"><div class="box-icon">                  <span style="background-image:url(' +
f +
a.img_ +
')"></span></div><div class="cat-name"><span>' +
a.getDisplayName() +
"<br><span>(" +
asl_categories[a.id_].len +
")</span></span></div></div></div>"
);
p.append(r), r.data("feature", a);
}
s._cont
.find(".Num_of_store .back-button")
.bind("click", function (e){
var t,
o=n.get("featureFilter");
for (t in o.array_) o.array_.pop();
n.get("view").refreshView(),
u.removeClass("hide"),
_.panTo(new google.maps.LatLng(asl_configuration.default_lat,
asl_configuration.default_lng
)
),
_.setZoom(parseInt(asl_configuration.zoom));
}),
p.find(".round-box").bind("click", function (e){
var t,
o=zg(this),
i=n.get("featureFilter");
for (t in i.array_) i.array_.pop();
o=o.data("feature");
i.add(o),
n.set("featureFilter", i),
n.get("view").refreshView(),
asl_configuration.category_bound&&s.fitBound(null),
u.addClass("hide"),
n.el_.removeClass("hide").animate({ scrollTop: 0 }, 0);
});
}else{
var h=asl_configuration.filter_ddl;
if(((asl_engine.controls={}),
(asl_engine.select_controls={}),
h)
)
for (var m in h){
for (
var v,
l=h[m],
y =
(s._cont
.find("#" + l + "_filter")
.append('<select data-type="' +
l +
'" id="asl-' +
l +
'" ' +
d +
' style="width:350px"></select>'
),
s._cont.find("#asl-" + l)),
m =
((asl_engine.controls[l]=y),
asl_configuration.words["all_" + l] ||
asl_configuration.words.none),
w =
("1"==asl_configuration.single_cat_select &&
((r=zg('<option value="0">' + m + "</option>")),
y.append(r)),
asl_engine.helper.sortBy(Object.values(asl_attributes[l]),
asl_configuration.filter_sort||"name",
!0
)),
i=0,
g=w.length;
i < g;
i++
){
a=w[i];
(r=zg(
'<option  value="' + a.id + '">' + a.name + "</option>"
)).data("feature", a),
y.append(r);
}
asl_configuration["select_" + l] &&
((b =
1==(v=(v=asl_configuration["select_" + l]).split(","))
.length
? v[0]
: v),
y.val(b)),
(asl_engine.select_controls[l]=y.multiselect({
enableFiltering: asl_configuration.ddl_search,
disableIfEmpty: !0,
enableCaseInsensitiveFiltering:
asl_configuration.ddl_search,
enableFiltering: asl_configuration.ddl_search,
nonSelectedText: asl_configuration.words.select_option,
filterPlaceholder:
asl_configuration.words.search||"Search",
nonSelectedText: m||"None Selected",
nSelectedText:
asl_configuration.words.selected||"selected",
allSelectedText: m||"All selected",
includeSelectAllOption: !1,
numberDisplayed: 1,
maxHeight: asl_configuration.ddl_max_height
? parseInt(asl_configuration.ddl_max_height)
: 250,
onChange: function (e, t){
this.$select.val(), this.$select.data("type");
s.refreshView(),
asl_configuration.category_bound&&s.fitBound(null);
},
}));
}
if(asl_configuration.show_categories){
e=s._cont.find("#categories_filter");
e.append('<select id="asl-categories" ' +
d +
' style="width:350px"></select>'
),
(n.$category_ddl=s._cont.find("#asl-categories")),
"1"==asl_configuration.single_cat_select &&
((r=zg(
'<option value="0">' +
asl_configuration.words.all_categories +
"</option>"
)),
n.$category_ddl.append(r)),
asl_configuration.select_category &&
(asl_configuration.select_category =
asl_configuration.select_category.split(","));
for (var b, i=0, g=o.length; i < g; i++){
var k,
a=o[i];
(r=zg(
'<option  value="' +
a.id_ +
'">' +
a.getDisplayName() +
"</option>"
)).data("feature", a),
n.$category_ddl.append(r),
asl_configuration.select_category &&
-1!=jQuery.inArray(a.id_,
asl_configuration.select_category
) &&
((k=n.get("featureFilter")).add(a),
n.set("featureFilter", k));
}
asl_configuration.select_category &&
((b =
1==asl_configuration.select_category.length
? asl_configuration.select_category[0]
: asl_configuration.select_category),
n.$category_ddl.val(b));
var C,
c={
enableFiltering: asl_configuration.ddl_search,
includeFilterClearBtn: !1,
disableIfEmpty: !0,
enableCaseInsensitiveFiltering:
asl_configuration.ddl_search,
nonSelectedText: asl_configuration.words.select_option,
filterPlaceholder:
asl_configuration.words.search||"Search",
nonSelectedText:
asl_configuration.words.all_categories||"None Selected",
nSelectedText:
asl_configuration.words.selected||"selected",
allSelectedText:
asl_configuration.words.all_categories||"All selected",
includeSelectAllOption: !1,
numberDisplayed: 1,
maxHeight: asl_configuration.ddl_max_height
? parseInt(asl_configuration.ddl_max_height)
: 250,
onChange: function (e, t){
var o=n.get("featureFilter");
if("1"==asl_configuration.single_cat_select){
for (var i in o.array_) o.array_.pop();
var a=e.data("feature");
o.add(a), n.set("featureFilter", o);
}else{
a=e.data("feature");
n.toggleFeatureFilter_(a);
}
asl_configuration.has_child_categories &&
n._make_sub_categories(o.array_),
(s.halt_fetch = !1),
s.refreshView(),
asl_configuration.category_bound&&s.fitBound(null),
asl_locator.hook_event({
type: "category",
data: o.array_,
});
},
},
x=null,
L=null;
asl_configuration.image_filter &&
((x=function (e){
var t;
return s.data_.flat_categories[e.value]
? s.data_.flat_categories[e.value].icon
? '<img src="' +
(asl_configuration.URL +
"svg/" +
s.data_.flat_categories[e.value].icon) +
'" alt="' +
(t=s.data_.flat_categories[e.value].name) +
'" >' +
(asl_configuration.image_filter_title
? '<span class="sl-img-filter-title">' +
t +
"</span>"
: "")
: s.data_.flat_categories[e.value].name
: e.text;
}),
(L=function (e){
var t;
if(s.data_.flat_categories[e.value] &&
s.data_.flat_categories[e.value].icon
)
return (
(t =
asl_configuration.URL +
"svg/" +
s.data_.flat_categories[e.value].icon),
"<span>" +
s.data_.flat_categories[e.value].name +
'</span><img src="' +
t +
'" alt="' +
s.data_.flat_categories[e.value].name +
'" >'
);
return e.text;
}),
(c.enableHTML = !0),
(c.optionLabel=asl_configuration.tabs_layout ? x:L),
e.addClass(asl_configuration.tabs_layout
? "asl-image-filter"
: "asl-ddl-image-filter"
)),
n.$category_ddl.multiselect(c),
asl_configuration.has_child_categories &&
((l="c_ids"),
(e=s._cont.find("#asl-sub_cats-filter"))[0] &&
((C=zg(
"<select " + d + ' data-type="' + l + '"></select>'
)),
e.append(C),
((e=Object.assign({}, c)).allSelectedText =
asl_configuration.words.all_sub_categories),
(e.nonSelectedText =
asl_configuration.words.all_sub_categories),
(e.onChange=function (e, t){
(s.halt_fetch = !1),
s.refreshView(),
asl_configuration.category_bound&&s.fitBound(null),
asl_locator.hook_event({
type: "category",
data: n.get("featureFilter").array_,
});
}),
asl_configuration.filter_ddl
? asl_configuration.filter_ddl.push(l)
: (asl_configuration.filter_ddl=[l]),
asl_configuration.image_filter &&
((e.enableHTML = !0),
(e.optionLabel=asl_configuration.tabs_layout
? x
: L)),
(asl_engine.controls[l]=C),
(asl_engine.select_controls[l]=C.multiselect(e))),
asl_configuration.select_category &&
asl_configuration.select_category.length &&
((c=null),
asl_configuration.select_sub_category &&
(c=asl_configuration.select_sub_category.split(",")),
n._make_sub_categories(n.get("featureFilter").array_,
c
)));
}}
this.directionsPanel_=s._cont.find("#agile-modal-direction");
var S=this.directionsPanel_.find(".frm-place"),
x =
(S.val(""),
n.dest_coords&&(M.directionsFrom_=n.dest_coords),
this.directionsPanel_.find(".frm-place")[0]),
h =
((this.input_search=new google.maps.places.Autocomplete(x)),
["geometry"]),
M=(this.input_search.setFields(h), this);
google.maps.event.addListener(this.input_search,
"place_changed",
function (){
M.directionsFrom_=this.getPlace().geometry.location;
}
),
this.directionsPanel_
.find(".directions-to")
.attr("readonly", "readonly"),
(this.directionsVisible_ = !1),
this.directionsPanel_.find(".btn-submit").click(function (e){
return (
n.dest_coords &&
S.val()==asl_configuration.words.current_location &&
(n.directionsFrom_=n.dest_coords||null),
n.renderDirections_(),
!1
);
}),
"KM"==asl_configuration.distance_unit
? ((n.distance_type=google.maps.UnitSystem.METRIC),
(n.directionsPanel_.find("#rbtn-km")[0].checked = !0))
: (n.distance_type=google.maps.UnitSystem.IMPERIAL),
n.directionsPanel_
.find("input[name=dist-type]")
.change(function (){
n.distance_type =
1==this.value
? google.maps.UnitSystem.IMPERIAL
: google.maps.UnitSystem.METRIC;
}),
this.el_.find(".directions-cont .close").click(function (){
n.hideDirections(),
s._cont.find(".count-row").removeClass("hide"),
s._cont.find("#filter-options").removeClass("hide");
}),
this.directionsPanel_
.find(".close-directions")
.click(function (){
n.hideDirections(),
s._cont.find(".count-row").removeClass("hide"),
s._cont.find("#filter-options").removeClass("hide");
}),
asl_locator.hook_event({ type: "init", data: s.data_.stores_ });
}),
(asl_locator.Panel.prototype.lead_form_modal=function (){
function t(){
zg(o).removeClass("show"), zg(o).hide();
}
var o;
asl_configuration.wpforms &&
((o="#asl-lead-form-modal"),
zg(document).on("keydown", function (e){
zg(o).hasClass("show")&&27===e.keyCode&&t();
}),
this._cont
.find('#asl-lead-form-modal button[data-dismiss="modal"]')
.bind("click", function (e){
t();
}));
}),
(asl_locator.Panel.prototype._make_sub_categories=function (e, i){
for (
var a=[], t=asl_configuration.words.all_sub_categories, o=0;
o < e.length;
o++
){
var n=asl_categories[e[o].id_],
n=n&&n.children ? n.children:[];
n &&
Array.isArray(n) &&
n.forEach(function (e, t){
var o = !1;
i&&i.length&&-1!=i.indexOf(e.id)&&(o = !0),
a.push({
label: e.name,
title: e.name,
value: parseInt(e.id),
selected: o,
});
});
}
(a=asl_engine.helper.sortBy(a, "title", !0)).length &&
"1"==asl_configuration.single_cat_select &&
a.unshift({ label: t, title: t, value: "" }),
asl_engine.select_controls.c_ids.multiselect("dataprovider", a);
}),
(asl_locator.Panel.prototype.address_dropdowns=function (e, t){
(this.address_object=e),
(this.address_ddls={}),
(asl_view.address_values={}),
(asl_view.have_countries=t);
var t = !0,
o=Object.keys(e),
i=[],
a=[];
asl_view.have_countries
? this._make_dropdown(o, "country", "countries")
: (i=o)&&1==i.length&&(t = !1),
t
? this._make_dropdown(i, "state", "states")
: (a=e[Object.keys(e)[0]]),
this._make_dropdown(a, "city", "cities");
}),
(asl_locator.Panel.prototype._to_multi_data=function (e, t){
var i=[],
t=asl_configuration.words["ph_" + t]||"All " + t;
return (
i.push({ label: t, title: t, value: "" }),
e &&
Array.isArray(e) &&
(e.sort(function (e, t){
return e.localeCompare(t);
}),
e.forEach(function (e, t){
var o=asl_engine.helper.html_entites(e);
i.push({ label: o, title: o, value: e });
})),
i
);
}),
(asl_locator.Panel.prototype._make_dropdown=function (e, t, o){
var i=this._cont.find(".asl-advance-filters > div:first-child"),
a=((e=e||[]), asl_configuration.words["label_" + t]||t),
n=asl_configuration.words["ph_" + o]||"All " + o,
s=zg(
'<select id="sl-addr-ddl-' +
t +
'" data-type="' +
t +
'"></select>'
),
r =
("4"==asl_configuration.template ? "":"pol-lg-4 ") +
"pol-md-6 pol-sm-12 asl-ddl-filters",
r =
("1"==asl_configuration.template &&
(r="sl-form-group asl-ddl-filters"),
zg(
'<div class="' +
(r +=" sl-ddl-" + t) +
'"><div class="asl-filter-cntrl"><label for="sl-addr-ddl-' +
t +
'" class="asl-cntrl-lbl">' +
a +
'</label><div class="sl-dropdown-cont"></div></div></div>'
));
return (
r.find(".sl-dropdown-cont").append(s),
i.append(r),
s.multiselect({
disableIfEmpty: !0,
filterPlaceholder: asl_configuration.words.search||"Search",
enableFiltering: !0,
enableCaseInsensitiveFiltering: !0,
nonSelectedText:
(asl_configuration.words.select_option, n||"Select"),
includeSelectAllOption: !1,
numberDisplayed: 1,
maxHeight: asl_configuration.ddl_max_height
? parseInt(asl_configuration.ddl_max_height)
: 250,
onChange: this.address_selected,
}),
(this.address_ddls[t]=s),
e.length
? s.multiselect("dataprovider", this._to_multi_data(e, o))
: s.multiselect("disable"),
s
);
}),
(asl_locator.Panel.prototype.address_selected=function (e, t){
var o,
i=this.$select.val(),
a=this.$select.data("type"),
n=asl_view._panel,
s=asl_view;
asl_locator.hook_event({
type: "addr_ddl_event",
data: { type: a, value: i },
}),
"country"==a &&
((s.address_values.country =
s.address_values.state =
s.address_values.city =
null),
""!=i
? ((o=Object.keys(n.address_object[i])),
n.address_ddls.state.multiselect("dataprovider",
n._to_multi_data(o, "states")
),
n.address_ddls.state.multiselect("enable"),
(s.address_values.country=i),
o &&
1==o.length &&
""==o[0] &&
((a="state"), (i="")))
: (n.address_ddls.state.multiselect("dataprovider", []),
n.address_ddls.state.multiselect("disable")),
n.address_ddls.city.multiselect("dataprovider", []),
n.address_ddls.city.multiselect("disable")),
"state"==a &&
((o=(
s.have_countries
? n.address_object[s.address_values.country]
: n.address_object
)[i]),
n.address_ddls.city.multiselect("dataprovider",
n._to_multi_data(o, "cities")
),
n.address_ddls.city.multiselect(o&&o.length ? "enable":"disable"
),
(s.address_values.state=i),
(s.address_values.city=null)),
"city"==a&&(s.address_values.city=i||null),
asl_view.refreshView(),
asl_view.fitBound();
}),
(asl_locator.Panel.prototype.toggleFeatureFilter_=function (e){
var t=this.get("featureFilter");
t.toggle(e), this.set("featureFilter", t);
}),
(asl_locator.geocoder_=new google.maps.Geocoder()),
(asl_locator.Panel.prototype.listenForStoresUpdate_=function (){
this.get("view");
this.storesChangedListener_ &&
google.maps.event.removeListener(this.storesChangedListener_);
}),
(asl_locator.Panel.prototype.searchPosition=function (e){
var o=this,
e={ address: e, bounds: this.get("view").getMap().getBounds() };
asl_locator.geocoder_.geocode(e, function (e, t){
t==google.maps.GeocoderStatus.OK &&
google.maps.event.trigger(o, "geocode", e[0]);
});
}),
(asl_locator.Panel.prototype.setView=function (e){
this.set("view", e);
}),
(asl_locator.Panel.prototype.view_changed=function (){
function e(){
t.listenForStoresUpdate_();
}
var t=this,
o=this.get("view");
this.bindTo("selectedStore", o),
this.geolocationListener_ &&
google.maps.event.removeListener(this.geolocationListener_),
this.zoomListener_ &&
google.maps.event.removeListener(this.zoomListener_),
this.idleListener_ &&
google.maps.event.removeListener(this.idleListener_),
o.getMap().getCenter();
(this.geolocationListener_=google.maps.event.addListener(o,
"load",
e
)),
(this.zoomListener_=google.maps.event.addListener(o.getMap(),
"zoom_changed",
e
)),
(this.idleListener_=google.maps.event.addListener(o.getMap(),
"idle",
function (){
return t.idle_(o.getMap());
}
)),
e(),
this.bindTo("featureFilter", o),
this.autoComplete_ &&
this.autoComplete_.bindTo("bounds", o.getMap());
}),
(asl_locator.Panel.prototype.geoCoder=function (o, i, e){
var t=this,
a=t.get("view"),
n=new google.maps.Geocoder(),
i =
i ||
function (e, t){
"OK"==t
? ((e.search_text=o.value),
(a.bbox =
e[0].geometry&&e[0].geometry.viewport
? e[0].geometry.viewport
: null),
asl_locator.hook_event({
type: "before_search",
data: e,
}),
a.measure_distance(e[0].geometry.location, !0, null, e),
asl_locator.hook_event({ type: "search", data: e }),
"2"==asl_configuration.load_all &&
a._cont.find(".asl-reload-map").trigger("click"),
zg(o).next().removeClass("hide"))
: console.log("Geocode was not successful for the following reason: " +
t
);
},
s =
((do_geocoding=function (e){
var t;
"1"!=asl_configuration.no_geocode &&
e &&
((e={ address: e, componentRestrictions: {}}),
asl_configuration.country_restrict &&
((t=(t =
asl_configuration.country_restrict.toLowerCase()).split(","
)),
(e.componentRestrictions.country=t[0])),
a.data_.all_states &&
(e.componentRestrictions.administrativeArea =
a.data_.all_states.join("|")),
n.geocode(e, i));
}),
zg(o).bind("click", function (e){
o.select();
}),
asl_configuration["default-addr"]);
o &&
s &&
window.setTimeout(function (){
var e;
"2"==asl_configuration.search_type
? asl_view.data_ &&
asl_view.data_.ds_items &&
((e=asl_view.data_.ds_items.find(function (e){
return e.value===s;
}))
? zg(o).trigger("typeahead:selected", e)
: do_geocoding(asl_configuration["default-addr"]))
: asl_configuration.req_coords
? do_geocoding(asl_configuration["default-addr"])
: (t
.get("view")
.measure_distance(new google.maps.LatLng(asl_configuration.default_lat,
asl_configuration.default_lng
),
!0,
null,
null
),
"2"==asl_configuration.load_all &&
zg(".asl-reload-map").trigger("click")),
zg(o).next().removeClass("hide");
}, 800),
e ||
(zg(o).bind("keyup", function (e){
13==e.keyCode &&
((e=zg.trim(this.value)), do_geocoding(e));
}),
a._cont.find(".icon-search").bind("click", function (e){
var t=zg.trim(o.value);
t&&do_geocoding(t);
}));
}),
(asl_locator.Panel.prototype.initAutocomplete_=function (o){
var e,
i=this;
asl_configuration.geocoding_only ||
((e={}),
asl_configuration.google_search_type &&
(e.types =
"cities"==asl_configuration.google_search_type ||
"regions"==asl_configuration.google_search_type
? ["(" + asl_configuration.google_search_type + ")"]
: [asl_configuration.google_search_type]),
(this.autoComplete_=new google.maps.places.Autocomplete(o, e)),
asl_configuration.country_restrict &&
((e=(e =
asl_configuration.country_restrict.toLowerCase()).split(",")),
this.autoComplete_.setComponentRestrictions({ country: e })),
(e=["geometry"]),
asl_configuration.filter_address&&e.push("address_components"),
this.autoComplete_.setFields(e),
this.get("view") &&
this.autoComplete_.bindTo("bounds", this.get("view").getMap()),
google.maps.event.addListener(this.autoComplete_,
"place_changed",
function (){
var e,
t=this.getPlace();
asl_configuration.analytics &&
(t.formatted_address||(t.formatted_address=o.value),
asl_locator.save_analytics(t)),
t.geometry &&
(((e=i.get("view")).bbox =
t.geometry&&t.geometry.viewport
? t.geometry.viewport
: null),
asl_locator.hook_event({
type: "before_search",
data: t,
}),
e.measure_distance(t.geometry.location, !0, null, t),
(t.search_text=o.value),
asl_locator.hook_event({ type: "search", data: t }),
zg(o).next().removeClass("hide"),
"2"==asl_configuration.load_all &&
e._cont.find(".asl-reload-map").trigger("click"));
}
)),
(i.search_control=o),
i.geoCoder(o);
}),
(asl_locator.Panel.prototype.idle_=function (e){
this.center_
? e.getBounds().contains(this.center_) ||
((this.center_=e.getCenter()), this.listenForStoresUpdate_())
: (this.center_=e.getCenter());
}),
(asl_locator.Panel.prototype.hideGeoModal=function (){
var e=this._cont.find("#asl-geolocation-agile-modal");
e.removeClass("in"),
window.setTimeout(function (){
e.css("display", "none");
}, 300),
(this.geo_modal = !1);
}),
(asl_locator.Panel.prototype.hideDescModal=function (){
var e=this._cont.find("#asl-desc-agile-modal");
e.removeClass("in"),
window.setTimeout(function (){
e.css("display", "none");
}, 300),
(this.isDescModal = !1);
}),
(asl_locator.Panel.prototype.descriptionModal=function (e){
var t=this._cont.find("#asl-desc-agile-modal"),
o =
(t.find(".sl-title").html(e.props_.title),
"<h5>" +
asl_configuration.words.desc_title +
"</h5><p>" +
e.props_.description +
"</p>");
e.props_.description_2 &&
(o +=
'<br><h5 class="sl-addit-desc">' +
asl_configuration.words.add_desc_title +
"</h5><p>" +
e.props_.description_2 +
"</p>"),
t.find(".sl-desc").html(o),
t.css("display", "block"),
t.addClass("in"),
asl_configuration.is_mob &&
zg("html, body")
.stop()
.animate({ scrollTop: t.offset().top }, 900, "swing"),
(this.isDescModal = !0);
}),
(asl_locator.Panel.prototype.stores_changed=function (_){
var o=this;
if((o.isDescModal&&o.hideDescModal(), this.get("stores"))){
var i=this.get("view");
if(!i.showing_direction &&
i.display_list &&
(!asl_configuration.accordion||!i.is_updated)
){
i.is_updated = !0;
i&&i.getMap().getBounds();
var e=i.get("stores"),
d=this.get("selectedStore");
if(asl_configuration.highlight_first&&_){
for (var u=[], p=[], t=0; t < e.length; t++)
(e[t].id_==_.id_ ? u:p).push(e[t]);
e=u.concat(p);
}
asl_configuration.accordion||this.storeList_.empty(),
e.length
? this._cont
.find(".Num_of_store .count-result")
.html(i.total_stores||e.length)
: (this._cont.find(".Num_of_store .count-result").html("0"),
o.storeList_.html('<div class="asl-overlay-on-item" id="asl-no-item-found"><div class="white"></div><div class="sl-no-item"><p>' +
(i.search_performed
? asl_configuration.no_item_text
: asl_configuration.words.perform_search) +
"</p></div></div>"
),
asl_locator.hook_event({
type: "no_stores",
data: { element: o.storeList_ },
}));
function f(e){
var t=zg(e.target);
if(((i.halt_fetch = !0),
asl_configuration.accordion&&e.stopPropagation(),
asl_configuration.branches &&
this.store &&
this.store.props_.childs &&
this.store.props_.childs.length)
)
return (
e.preventDefault(), void i.render_branch_list(this.store)
);
if(t.hasClass("asl-lead-cta-btn"))
return (
e.preventDefault(),
void o.lead_event_fn.call(o, this.store)
);
if(t.hasClass("sl-btn-custom"))
return (
e.preventDefault(),
void asl_locator.hook_event({
type: "custom_btn",
data: this.store,
})
);
if(t.hasClass("s-direction")) e.preventDefault();
else {
if(t.hasClass("sl-link"))
return (
e.preventDefault(), void o.descriptionModal(this.store)
);
if(t.hasClass("sl-pickup"))
return (
e.preventDefault(),
void asl_locator.hook_event({
type: asl_configuration.ship_from
? "ship_from"
: "pickup",
data: this.store,
})
);
if((o.isDescModal&&o.hideDescModal(),
o.geo_modal&&o.hideGeoModal(),
"A"==e.target.className ||
asl_configuration.disable_list_click)
)
asl_locator.hook_event({
type: "highlight",
data: this.store,
});
else {
if("1"==asl_configuration.template){
t=i.get("selectedStore");
if(t&&this.store&&t.id_==this.store.id_)
return void i.highlight(null, !0);
}
(i.noRefreshList = !0),
i.highlight(this.store, !0),
(!asl_configuration.is_mob &&
"4"!=asl_configuration.template) ||
zg("html, body")
.stop()
.animate({
scrollTop: zg(i.getMap().getDiv()).offset().top,
},
900,
"swing"
);
}}
}
var a, n, s;
asl_configuration.accordion &&
((s=this.get("view").data_).stateCities,
(a=this.storeList_),
(n=""),
asl_configuration.category_accordion
? ((n=s.generateHTMLCategories()),
a.attr("id", "p-catlist"))
: s.countries
? ((n=s.generateHTMLCountriesStates(s.stateCities)),
a.attr("id", "p-countlist"))
: (n=s.generateHTMLStates(s.stateCities)),
a.html(n),
o._cont.find(".item-state > a span:empty").each(function (e){
var t=zg(this).parent().next().find("li.item-state");
t.appendTo(t.parent().parent().parent().parent()),
zg(this).parent().remove();
}),
1!=a.children().length ||
((s=a.find(">li>div>ul>li")).length&&s.appendTo(a)));
for (var r=0, g=e.length; r < g; r++){
var l=e[r].getInfoPanelItem(),
h =
((l.store=e[r]),
e[r],
d&&e[r].id_==d.id_&&zg(l).addClass("highlighted"),
l.addEventListener(asl_configuration.list_event, f),
l.addEventListener("keyup", function (e){
"Enter"==e.key
? f.call(this, e)
: "Tab"==e.key
? i.get("selectedStore")&&i.highlight(null)
: ("d"!=e.key&&"D"!=e.key) ||
((e=this.store),
(o.directionsTo_=e),
o.showDirections(e));
}),
l.querySelector(".sl-show-branches"));
if((h &&
h.addEventListener("click",
function (e){
e.preventDefault(), (e.cancelBubble = !0);
e=e.target.closest(".sl-item").store;
return e&&i.render_branch_list(e), !1;
}.bind(this),
!1
),
asl_configuration.hover_center &&
(l.addEventListener("mouseenter", i.panTo.bind(i, e[r])),
asl_configuration.zoom_li &&
asl_map.setZoom(parseInt(asl_configuration.zoom_li))),
asl_configuration.do_bounce &&
(l.addEventListener("mouseenter",
i.doBounce.bind(i, e[r], !0)
),
l.addEventListener("mouseleave",
i.doBounce.bind(i, e[r], !1)
)),
zg(l)
.find(".s-direction")
.click(function (e){
var t=zg(this).data("_store");
(o.directionsTo_=t), o.showDirections(t);
})
.data("_store", e[r]),
asl_configuration.category_accordion)
)
if(e[r].props_.c_ids.length){
var m="#sl-cat-" + e[r].props_.c_ids[0];
zg(m).append(l);
for (var v=1; v < e[r].props_.c_ids.length; v++){
var m="#sl-cat-" + e[r].props_.c_ids[v],
c=l.cloneNode(!0);
(c.store=l.store),
c.addEventListener(asl_configuration.list_event, f),
c.addEventListener("mouseenter",
i.doBounce.bind(i, e[r], !0)
),
c.addEventListener("mouseleave",
i.doBounce.bind(i, e[r], !1)
),
zg(m).append(c),
zg(c)
.find(".s-direction")
.click(function (e){
var t=zg(this).data("_store");
(o.directionsTo_=t), o.showDirections(t);
})
.data("_store", e[r]);
}} else o.storeList_.append(l);
else
asl_configuration.accordion
? ((m =
"#city-list-" +
e[r].props_.state
.replace(asl_configuration.regex, "")
.replace(/[ ]/gi, "-")
.toLowerCase() +
"-" +
e[r].props_.city
.replace(asl_configuration.regex, "")
.replace(/[ ]/gi, "-")
.toLowerCase()),
zg(m).append(l))
: o.storeList_.append(l);
}
asl_configuration.category_accordion &&
o._cont.find("li.item-state").bind("click", function (e){
zg(e.target).parent();
var e=zg(this).data("id"),
t=zg(this).children(0).hasClass("colisiond");
asl_view._panel.storeList_.find(".show").colision("hide"),
asl_view.categoryClearAll(),
e&&i.categoryAccFilter(String(e), t);
}),
0 < o.mainPanel.scrollTop() &&
o.mainPanel.stop().animate({ scrollTop: 0 }, 100, "swing");
}}
}),
(asl_locator.Panel.prototype.lead_event_fn=function (e){
var t=this._cont.find("#asl-lead-form-modal");
e &&
((e=e.props_),
t.find(".asl_store_id input")[0] &&
t.find(".asl_store_id input").val(e.id)),
asl_locator.hook_event({
type: "lead_event",
data: { store: e },
}),
t.toggleClass("show"),
t.css("display", "block");
}),
(asl_locator.Panel.prototype.selectedStore_changed=function (){
var t=this,
o=this.get("selectedStore"),
e=t.get("view"),
i=zg(".highlighted", this.storeList_),
a = !1,
n=e.marker_clicked;
if(((e.marker_clicked = !1),
"1"==asl_configuration.template &&
((a=i[0]&&o && i.data("id")==o.id_ ? !0:a) ||
i.find(".sl-addr-sec").slideUp()),
i.removeClass("highlighted"),
!asl_configuration.adv_mkr &&
e.active_marker &&
e.active_marker.m &&
(e.active_marker.m.setIcon(e.active_marker.picon),
(e.active_marker.m=null)),
o)
){
(i=o.getMarker()),
(i =
(e.active_marker &&
((e.active_marker.picon=i.getIcon()),
(e.active_marker.m=i).setIcon(e.active_marker.icon)),
(this.directionsTo_=o),
this.storeList_.find('li.sl-item[data-id="' + o.id_ + '"]')));
if((i=1 < i.length ? i.eq(0):i) &&
("1"!=asl_configuration.template ||
i.hasClass("highlighted") ||
a ||
i.find(".sl-addr-sec").slideDown(),
i.addClass("highlighted"),
asl_configuration.accordion&&n)
){
var e=t._cont.find(".asl-panel-inner").find(".colision.in"),
s=i.parentsUntil(".asl-panel-inner", "div.colision");
if((e.length &&
e[e.length - 1].id!=s[0].id &&
e.colision("hide"),
s)
){
t.accordion_showing=i;
for (var r=s.length - 1; 0 <=r; r--)
zg(s[r]).colision("show"),
window.setTimeout(function (){
var e=t.accordion_showing.position().top;
t.mainPanel.animate({ scrollTop: e }, "fast");
}, 800);
}}
this.settings_.directions &&
this.directionsPanel_
.find(".directions-to")
.val(o.getDetails().title);
var a=t.get("view").getInfoWindow().getContent(),
n=zg(a).find(".asl-buttons"),
e=zg("<a/>")
.text(asl_configuration.words.direction)
.attr("href", "javascript:void(0)")
.attr("title",
asl_configuration.words.direction_title ||
"link to Google Maps"
)
.addClass("action")
.addClass("directions"),
i=zg("<a/>")
.text(asl_configuration.words.zoom)
.attr("href", "javascript:void(0)")
.addClass("action")
.addClass("zoomhere"),
l=o.props_.link,
e =
(e.click(function (){
return t.showDirections(), !1;
}),
i.click(function (){
t.get("view")
.getMap()
.setOptions({
center: o.getLocation(),
zoom: asl_map.getZoom() + 1,
});
}),
n.append(e).append(i),
(asl_configuration.pickup||asl_configuration.ship_from) &&
((a=zg("<a/>")
.text(asl_configuration.ship_from
? asl_configuration.words.ship_from
: asl_configuration.words.pickup
)
.addClass("action")
.addClass("sl-pickup")),
n.append(a),
a.click(function (e){
asl_locator.hook_event({
type: asl_configuration.ship_from
? "ship_from"
: "pickup",
data: o,
});
})),
n.find(".asl-lead-cta-btn").bind("click", function (e){
e.preventDefault(), t.lead_event_fn.call(t, o);
}),
n.find(".sl-btn-custom").bind("click", function (e){
e.preventDefault(),
asl_locator.hook_event({ type: "custom_btn", data: o });
}),
zg("<a/>")
.text(asl_configuration.words.detail)
.addClass("action")
.addClass("a-website"));
window.asl_website_click
? (e.click(function (){
asl_website_click(o.props_, l);
}),
n.append(e))
: l &&
(n.append(e),
e.attr("href", l),
e.attr("target", asl_configuration.target_blank));
}}),
(asl_locator.Panel.prototype.hideDirections=function (){
(this.directionsVisible_ = !1),
this.directionsPanel_.removeClass("in"),
this.el_.find(".directions-cont").addClass("hide"),
this.storeList_.fadeIn(),
this.directionsRenderer_.setMap(null),
(this.get("view").showing_direction = !1);
}),
(asl_locator.Panel.prototype.showDirections=function (e){
var t,
e=e||this.get("selectedStore");
if(e){
if((asl_locator.hook_event({ type: "direction", data: e.props_ }),
(asl_configuration.is_mob &&
"1"==asl_configuration.direction_redirect) ||
"2"==asl_configuration.direction_redirect)
)
if((asl_locator.hook_event({
type: "direction",
data: e.props_,
}),
(asl_configuration.is_mob &&
"1"==asl_configuration.direction_redirect) ||
"2"==asl_configuration.direction_redirect)
)
return void window.open("https://www.google.com/maps/dir/?api=1&destination=" +
encodeURIComponent(
e.props_.title + ", " + e.props_.address
)
);
this.directionsPanel_
.find(".frm-place")
.val(this.dest_coords
? asl_configuration.words.current_location
: ""
),
this.directionsPanel_
.find(".directions-to")
.val(e.getDetails().title),
this.directionsPanel_.addClass("in"),
this.renderDirections_(),
(!asl_configuration.is_mob &&
"4"!=asl_configuration.template) ||
zg("html, body")
.stop()
.animate({
scrollTop: zg(
this.get("view").getMap().getDiv()
).offset().top,
},
900,
"swing"
),
(this.directionsVisible_ = !0);
}}),
(asl_locator.Panel.prototype.renderDirections_=function (){
var o,
e,
t,
i=this;
this.directionsFrom_ &&
this.directionsTo_ &&
(this.el_.find("#map-loading").show(),
this.el_.find(".directions-cont").removeClass("hide"),
this.storeList_.fadeOut(),
i.directionsPanel_.removeClass("in"),
(o=this.el_.find(".rendered-directions").empty()),
(e=google.maps.DirectionsTravelMode.DRIVING),
asl_configuration.direction_mode &&
((t=asl_configuration.direction_mode.toUpperCase()),
google.maps.DirectionsTravelMode[t]&&(e=t)),
this.directionsService_.route({
origin: this.directionsFrom_,
destination: this.directionsTo_.getLocation(),
travelMode: e,
unitSystem: i.distance_type,
},
function (e, t){
i.el_.find("#map-loading").hide(),
t==google.maps.DirectionsStatus.OK &&
(i._cont.find(".count-row").addClass("hide"),
i._cont.find("#filter-options").addClass("hide"),
((t=i.get("view")).showing_direction = !0),
t.infoWindow_.getVisible()&&t.infoWindow_.close(),
(t=i.directionsRenderer_).setPanel(o[0]),
t.setMap(i.get("view").getMap()),
t.setDirections(e));
}
),
(this.directionsFrom_=null));
}),
(asl_locator.Panel.prototype.featureFilter_changed=function (){
this.listenForStoresUpdate_();
}),
(asl_locator.PanelOptions=function (){}),
asl_locator.prototype.locationSearch,
asl_locator.PanelOptions.prototype.locationSearchLabel,
asl_locator.PanelOptions.prototype.featureFilter,
asl_locator.PanelOptions.prototype.directions,
asl_locator.PanelOptions.prototype.view,
(function ($){
var charMap={
a: /[àáâăÀÁÂĂ]/gi,
c: /[çÇ]/gi,
s: /[șŞş]/gi,
e: /[èéêëÈÉÊË]/gi,
t: /[țŢţ]/gi,
i: /[ïîîÏÎ]/gi,
o: /[ôÓÖ]/gi,
oe: /[œ]/gi,
u: /[üÚÚ]/gi,
},
normalize=function (o){
return (
$.each(charMap, function (e, t){
o=o.replace(t, e);
}),
o
);
},
queryTokenizer=function (e){
e=normalize(e);
return Bloodhound.tokenizers.whitespace(e);
},
asl_search={
address_ta: null,
address_td: null,
address_inst: null,
title_ta: null,
title_td: null,
title_inst: null,
ds: null,
add_prop_search: function (e, t, o, i){
var a=this,
n=this[o + "_td"],
s=this[o + "_ta"];
this[o + "_inst"], e&&e[0]&&e[0].value;
if(n) return (n.local=[]), n.clear(), void n.add(e);
function r(){
var e;
return n.get(t.val()).length ||
"1"!=asl_configuration.no_geocode
? i&&asl_configuration.search_2_contain
? (s.typeahead("close"), void a.contains_search(t, i))
: ((s.parent().find(".tt-suggestion.tt-cursor")[0]
? s.parent().find(".tt-suggestion.tt-cursor")
: s.parent().find(".tt-suggestion:first-child")
).trigger("click"),
void (
i ||
"2"!=asl_configuration.search_type ||
s.parent().find(".tt-suggestion:first-child")[0] ||
do_geocoding(t.val())
))
: ((e={ title: t.val(), type: "title" }),
(asl_view.prop_filter=e),
t.next().removeClass("hide"),
asl_view.refreshView(),
void asl_locator.hook_event({
type: "search",
data: { search: e, stores: [] },
}));
}
var s=t,
n=new Bloodhound({
datumTokenizer: function (e){
var t,
o=[];
for (t in e)
e.hasOwnProperty(t) &&
"string"==typeof e[t] &&
(o=o.concat(queryTokenizer(e[t])));
return o;
},
queryTokenizer: queryTokenizer,
local: e,
sorter: function (e, t){
var o=s.val().trim().toLowerCase(),
i=e.title.toLowerCase()===o,
o=t.title.toLowerCase()===o;
return i&&!o
? -1
: !i&&o
? 1
: e.title.localeCompare(t.title);
},
}),
e=s.next().children(),
l =
((e =
"4"!=asl_configuration.template||i
? e
: s
.parents(".Filter_section")
.find(".icon-search")).hasClass("icon-search") &&
e.bind("click", function (e){
r();
}),
n.initialize(),
(e=s.typeahead({ hint: !1, highlight: !0, minLength: 1 },
{
name: "title",
limit: asl_configuration.search_name_limit
? parseInt(asl_configuration.search_name_limit)
: 5,
displayKey: "title",
source: n.ttAdapter(),
templates: {
empty: function (e){
return (
'<p class="tt-empty">' +
asl_configuration.words.no_search_item +
"</p>"
);
},
},
}
)),
s.on("typeahead:selected",
i ? this.selected_secondary:this.selected
),
asl_locator.add_clear_button(s));
s.bind("keyup", function (e){
this.value||l.hasClass("hide")||l.trigger("click"),
13==e.which&&r();
}),
i &&
l.unbind("click").bind("click", function (){
(asl_view.second_filter=null),
l.addClass("hide"),
s.val(""),
asl_view.refreshView(),
asl_map.panTo(new google.maps.LatLng(asl_lat, asl_lng)
),
asl_map.setZoom(parseInt(asl_configuration.zoom));
}),
(this[o + "_td"]=n),
(this[o + "_ta"]=s),
(this[o + "_inst"]=e);
},
contains_search: function (e, t){
(asl_view.second_filter={ title: e.val() }),
e.next().removeClass("hide"),
asl_view.refreshView();
e=asl_view.get("stores");
asl_view.fitBound(e),
asl_locator.hook_event({
type: "search",
data: { search: asl_view.second_filter, stores: e },
});
},
selected: function (e, t, o){
var e=$(e.target),
i=asl_view.get("stores");
if(t.type){
if(asl_configuration.additional_search){
i=[];
var a,
n=asl_view.data_.stores_;
for (a in n)
n.hasOwnProperty(a) &&
-1!=n[a].props_.description_2.indexOf(t.title) &&
i.push(n[a]);
(asl_view._location=null),
(asl_view.search_text=t.title),
asl_locator.hook_event({
type: "search",
data: { search: t, stores: i },
});
} else asl_view.prop_filter=t;
e.next().removeClass("hide"), asl_view.refreshView();
i=asl_view.get("stores");
asl_view.fitBound(i),
asl_locator.hook_event({
type: "search",
data: { search: t, stores: i },
});
}},
selected_secondary: function (e, t, o){
(e=$(e.target)),
(asl_view.second_filter=t),
e.next().removeClass("hide"),
asl_view.refreshView(),
(e=asl_view.get("stores"));
asl_view.fitBound(e),
asl_locator.hook_event({
type: "search",
data: { search: t, stores: e },
});
},
category_accordion: function (e){
return (
!(!asl_configuration.category_accordion||!e.id) &&
((e=$(
'.asl-cont #asl-list li.item-state[data-id="' +
e.id +
'"]'
))[0] &&
(e.children(0).trigger("click"),
$("#asl-storelocator #asl-list").animate({ scrollTop: e.position().top },
"fast"
)),
_input.next().removeClass("hide"),
!0)
);
},
},
map=null,
asl_engine={ config: {}, helper: {}},
asl_lat,
asl_lng,
categories,
asl_date,
COUNT_FORMATS,
not_initial_load,
asl_view,
asl_panel,
data_source;
(window.asl_engine=asl_engine),
window.asl_configuration &&
((asl_configuration.category_accordion =
"2"==asl_configuration.layout),
(asl_configuration.accordion = !(
"1"!=asl_configuration.layout &&
!asl_configuration.category_accordion
)),
(asl_configuration.analytics =
"1"==asl_configuration.analytics),
(asl_configuration.sort_by_bound =
"1"==asl_configuration.sort_by_bound),
(asl_configuration.scroll_wheel =
"1"==asl_configuration.scroll_wheel),
(asl_configuration.distance_slider =
"1"==asl_configuration.distance_slider),
(asl_configuration.show_categories =
"0"!=asl_configuration.show_categories),
(asl_configuration.time_switch =
"0"!=asl_configuration.time_switch),
(asl_configuration.category_marker =
"0"!=asl_configuration.category_marker),
(asl_configuration.advance_filter =
"0"!=asl_configuration.advance_filter),
(asl_configuration.time_24 =
"1"==asl_configuration.time_format),
(asl_configuration.user_center =
"1"==asl_configuration.user_center),
(asl_configuration.distance_unit =
"KM"==asl_configuration.distance_unit
? asl_configuration.distance_unit
: "Miles"),
(asl_configuration.filter_address =
"1"==asl_configuration.filter_address),
(asl_configuration.regex=asl_configuration.no_regex
? /#|\./gi
: /[^a-z0-9\s]/gi),
(asl_configuration.info_x_offset =
asl_configuration.info_x_offset &&
!isNaN(asl_configuration.info_x_offset)
? parseInt(asl_configuration.info_x_offset)
: 0),
(asl_configuration.info_y_offset =
asl_configuration.info_y_offset &&
!isNaN(asl_configuration.info_y_offset)
? parseInt(asl_configuration.info_y_offset)
: 0),
(asl_configuration.enter_key = !0),
(asl_configuration.category_sort = !0),
(asl_configuration.stores_limit =
asl_configuration.stores_limit &&
!isNaN(asl_configuration.stores_limit)
? parseInt(asl_configuration.stores_limit)
: null),
(asl_configuration.radius_circle =
"1"==asl_configuration.radius_circle),
(asl_configuration.marker_height =
asl_configuration.marker_height||"43"),
(asl_configuration.and_filter =
"1"==asl_configuration.and_filter),
(asl_configuration.category_bound =
"1"==asl_configuration.category_bound),
(asl_configuration.fit_bound =
"1"==asl_configuration.fit_bound),
(asl_configuration.sort_random =
"1"==asl_configuration.sort_random),
(asl_configuration.filter_ddl=asl_configuration.filter_ddl
? asl_configuration.filter_ddl.split(",")
: null),
(asl_configuration.boundary_box =
"2"==asl_configuration.distance_control),
(asl_configuration.store_radius =
"1"==asl_configuration.store_radius),
(asl_configuration.marker_title =
"0"!=asl_configuration.marker_title),
(asl_configuration.hide_logo =
"1"==asl_configuration.hide_logo),
(asl_configuration.hide_hours =
"1"==asl_configuration.hide_hours),
(asl_configuration.do_bounce =
"0"!==asl_configuration.do_bounce),
(asl_configuration.list_event =
"1"===asl_configuration.mouseover_list
? "mouseover"
: "click"),
(asl_configuration.pickup="1"===asl_configuration.pickup),
(asl_configuration.ship_from =
"1"===asl_configuration.ship_from),
(asl_configuration.address_ddl =
"1"===asl_configuration.address_ddl),
(asl_configuration.tabs_layout =
"1"===asl_configuration.tabs_layout),
(asl_configuration.ddl_search = !!asl_configuration.ddl_search),
(asl_configuration.target_blank =
"1"==asl_configuration.target_blank ? "_blank":"_self"),
(asl_configuration.cluster="0"!=asl_configuration.cluster),
(asl_configuration.display_list =
"1"==asl_configuration.display_list),
(asl_configuration.branches =
"1"==asl_configuration.branches),
(asl_configuration.adv_mkr =
!!asl_configuration.advanced_marker),
(asl_configuration.search_zoom=parseInt(
asl_configuration.search_zoom
)),
asl_configuration.advance_filter ||
$(".asl-cont").addClass("no-asl-filters"),
asl_configuration.display_list ||
(asl_configuration.sort_by_bound = !1),
"2"==asl_configuration.template &&
((asl_configuration.address_ddl = !1),
(asl_configuration.filter_ddl="")),
asl_configuration.distance_slider ||
(asl_configuration.radius_circle = !1),
(asl_configuration.on_select = !0),
(asl_configuration["default-addr"] ||
asl_configuration.select_category) &&
(asl_configuration.prompt_location="0"),
"1"==asl_configuration.search_type &&
"2"!=asl_configuration.template &&
asl_configuration.search_2 &&
(asl_configuration.search_type="0"),
asl_configuration.sort_random &&
asl_configuration.user_center &&
((asl_configuration.user_center = !1),
console.log("Warning! Sort Random disable the default location marker"
)),
("1"!=asl_configuration.search_type &&
"2"!=asl_configuration.search_type) ||
((asl_configuration.user_center = !1),
(asl_configuration.distance_slider = !1)),
"1"!=asl_configuration.first_load &&
((asl_configuration.user_center = !1),
(asl_configuration.load_all="1")),
asl_configuration.info_y_offset ||
((asl_configuration.info_y_offset=-100),
"2"==asl_configuration.template &&
(asl_configuration.info_y_offset=-150),
"1"==asl_configuration.infobox_layout &&
(asl_configuration.info_y_offset=-150)),
(asl_configuration.fixed_radius =
asl_configuration.fixed_radius &&
!isNaN(asl_configuration.fixed_radius)
? parseInt(asl_configuration.fixed_radius)
: null),
(asl_configuration.is_mob=_isMobileDevice()),
asl_configuration.is_mob &&
(asl_configuration.mobile_zoom &&
(asl_configuration.zoom=parseInt(
asl_configuration.mobile_zoom
)),
asl_configuration.mobile_search_zoom &&
(asl_configuration.search_zoom=parseInt(
asl_configuration.mobile_search_zoom
)),
asl_configuration.mobile_click_zoom &&
(asl_configuration.zoom_li=parseInt(
asl_configuration.mobile_click_zoom
)),
(asl_configuration.list_event="click"),
(asl_configuration.mouseover = !1)),
(asl_configuration.max_bound_zoom =
asl_configuration.max_bound_zoom
? parseInt(asl_configuration.max_bound_zoom)
: "0"!=asl_configuration.search_zoom
? asl_configuration.search_zoom
: asl_configuration.zoom),
"3"==asl_configuration.search_type &&
((asl_configuration.search_type="0"),
(asl_configuration.geocoding_only = !0)),
asl_configuration.full_height&&asl_configuration.is_mob,
asl_configuration.is_mob &&
asl_configuration.mobile_load_bound &&
((asl_configuration.load_all="2"),
(asl_configuration.search_type="0")),
"0"!=asl_configuration.search_type &&
(console.log("Radius Circle Works with Google Search Only and Distance Control."
),
(asl_configuration.radius_circle = !1)),
asl_configuration.additional_search &&
(asl_configuration.search_type="2"),
asl_configuration.is_mob &&
asl_configuration.mobile_stores_limit &&
(asl_configuration.stores_limit =
asl_configuration.mobile_stores_limit &&
!isNaN(asl_configuration.mobile_stores_limit)
? parseInt(asl_configuration.mobile_stores_limit)
: null),
asl_configuration.accordion
? ((asl_configuration.load_all="1"),
(asl_configuration.address_ddl =
asl_configuration.sort_by_bound =
asl_configuration.filter_address =
asl_configuration.advance_filter =
!1))
: (asl_configuration.mobile_stores_limit =
asl_configuration.mobile_stores_limit
? parseInt(asl_configuration.mobile_stores_limit)
: 100),
asl_configuration.advance_filter ||
(asl_configuration.filter_ddl =
asl_configuration.address_ddl =
asl_configuration.sort_by_bound =
asl_configuration.filter_address =
!1),
"1"!=asl_configuration.load_all &&
((asl_configuration.cache=asl_configuration.radius_circle =
!1),
console.log("Radius Circle Works with load all only")),
asl_configuration.advance_filter &&
$("#asl-open-close")[0] &&
($("#asl-open-close")[0].checked = !0),
(asl_lat=asl_configuration.default_lat
? parseFloat(asl_configuration.default_lat)
: 39.9217698526),
(asl_lng=asl_configuration.default_lng
? parseFloat(asl_configuration.default_lng)
: -75.5718432),
(categories={}),
(asl_date=new Date()),
(asl_configuration.default_lat=asl_lat),
(asl_configuration.default_lng=asl_lng),
(asl_configuration.show_opened = !1),
$("#asl-dist-unit").html(asl_configuration.distance_unit),
(COUNT_FORMATS=[
{ letter: "", limit: 1e3 },
{ letter: "K", limit: 1e6 },
]),
(asl_engine.helper.query_parameter=function (e){
var t=window.location.search;
const o=new URLSearchParams(t);
return o.get(e);
}),
(asl_engine.helper.html_entites=function (e){
var t=document.createElement("div");
return (t.innerHTML=e), t.innerText;
}),
(asl_engine.helper.is_empty=function (e){
if(null==e) return !0;
if("object"!=typeof e||Array.isArray(e)) return !1;
for (var t in e)
if(null!==e[t]&&void 0!==e[t]) return !1;
return !0;
}),
(asl_engine.helper.format_count=function (e){
return e < 1e6&&1e3 < e
? ((e=(1e3 * e) / 1e6),
(e=Math.round(10 * e) / 10) + "K")
: e.toFixed(2);
}),
(asl_engine.helper.flattenCategories=function (e){
const a={};
for (const t in e)
!(function e(t, o){
if(((t.value=[t.id]),
(t.len=0),
o&&t.value.push(o.id),
(a[t.id]=t).children.length)
)
for (const i of t.children) e(i, t);
})(e[t], null);
return a;
}),
(asl_engine.helper.uniqe_merge=function (e, t){
e=new Set(e.concat(t));
return Array.from(e);
}),
(asl_engine.helper.pluck=function (e, t){
for (var o=new Set(), i=0; i < t.length; i++)
o.add(t[i][e]);
var a=[];
return (
o.forEach(function (e){
a.push(e);
}),
a
);
}),
(asl_engine.helper.uniq=function (e, t, o){
for (var i=[], a=[], n=0; n < e.length; n++)
i[e[n][t]] ||
(a.push(o
? { type: t, title: e[n][t] }
: {
type: t,
title: e[n][t],
value: normalize(e[n][t]),
}
),
(i[e[n][t]]=1));
return a;
}),
(asl_engine.helper.merge=function (e, t){
for (var o={}, i=0; i < e.length; i++) o[e[i]] = !0;
for (i=0; i < t.length; i++) o[t[i]] = !0;
return Object.keys(o);
}),
(asl_engine.helper.asl_leadzero=function (e){
return 9 < e ? "" + e:"0" + e;
}),
(asl_engine.helper.asl_timeConvert=function (e){
if(!e) return 0;
var t,
o,
e=$.trim(e).toUpperCase();
return /(1[012]|[0-9]):[0-5][0-9]$/.test(e)
? (t=Number(e.match(/^(\d+)/)[1])) +
(o=Number(e.match(/:(\d+)/)[1])) / 100
: /(1[012]|[1-9]):[0-5][0-9][ ]?(AM|PM)/.test(e)
? ((t=Number(e.match(/^(\d+)/)[1])),
(o=Number(e.match(/:(\d+)/)[1])),
"PM"==(e=-1!=e.indexOf("PM") ? "PM":"AM") &&
t < 12 &&
(t +=12),
"AM"==e&&12==t&&(t -=12),
t + o / 100)
: 0;
}),
(asl_engine.helper.between=function (e, t, o){
return t < e&&e < o;
}),
(asl_engine.helper.implode=function (e, t){
for (var o=[], i=0, a=e.length; i < a; i++)
e[i]&&o.push(e[i]);
return o.join(t);
}),
(asl_engine.helper.toObject_=function (e, t){
for (var o={}, i=0, a=t.length; i < a; i++)
o[e[i]]=t[i];
return o;
}),
(asl_engine.helper.distanceCalc=function (e){
var t=this.getLocation(),
o=asl_locator.toRad_(t.lat()),
t=asl_locator.toRad_(t.lng()),
i=asl_locator.toRad_(e.lat()),
a=i - o,
e=asl_locator.toRad_(e.lng()) - t,
t =
Math.sin(a / 2) * Math.sin(a / 2) +
Math.cos(o) *
Math.cos(i) *
Math.sin(e / 2) *
Math.sin(e / 2);
return (
6371 * (2 * Math.atan2(Math.sqrt(t), Math.sqrt(1 - t)))
);
}),
(asl_engine.helper.multi_sort=function (e, a, n){
e.sort(function (e, t){
var o=e[a],
i=t[a],
e=e[n],
t=t[n];
return o==i
? e < t
? -1
: t < e
? 1
: 0
: o < i
? -1
: 1;
});
}),
(asl_engine.helper.sortBy=function (e, o, t){
var i=null,
i=t
? "desc"==asl_configuration.sort_order
? function (e, t){
return e[o]&&t[o] ? -e[o].localeCompare(t[o]):0;
}
: function (e, t){
return e[o]&&t[o] ? e[o].localeCompare(t[o]):0;
}
: "desc"==asl_configuration.sort_order
? function (e, t){
return parseInt(t[o]) - parseInt(e[o]);
}
: function (e, t){
return parseInt(e[o]) - parseInt(t[o]);
};
return e.sort(i);
}),
(asl_engine.dataSource=function (){
(this.stores_=[]),
(this.parent_store=null),
(this.remote_url=ASL_REMOTE.ajax_url);
}),
(asl_engine.dataSource.prototype.getCountriesStateCities =
function (e){
for (var t={}, o=0; o < e.length; o++)
t[e[o].props_.country]||(t[e[o].props_.country]={}),
t[e[o].props_.country][e[o].props_.state] ||
(t[e[o].props_.country][e[o].props_.state]=[]),
-1==t[e[o].props_.country][e[o].props_.state].indexOf(e[o].props_.city
) &&
t[e[o].props_.country][e[o].props_.state].push(e[o].props_.city
);
return t;
}),
(asl_engine.dataSource.prototype.getStateCities=function (e){
for (var t={}, o=0; o < e.length; o++)
t[e[o].props_.state]||(t[e[o].props_.state]=[]),
-1==t[e[o].props_.state].indexOf(e[o].props_.city) &&
t[e[o].props_.state].push(e[o].props_.city);
return t;
}),
(asl_engine.dataSource.prototype.generateHTMLCategories =
function (){
var e,
t,
o,
i="",
a =
"name_"==asl_configuration.cat_sort
? "name"
: asl_configuration.cat_sort,
n=Object.values(asl_categories);
for (e in (n =
"ordr"==a
? asl_engine.helper.sortBy(n, "ordr")
: asl_engine.helper.sortBy(n, a, !0)))
n.hasOwnProperty(e) &&
((o=(t=n[e]).id),
t.len &&
(i =
i +
('<li data-id="' +
o +
'"  class="item-state asl-state-li">                      <a class="colisiond" href="#colision' +
o +
'"  aria-controls="colision' +
o +
'" data-parent="#p-catlist" data-toggle="colision"><span>' +
t.name) +
'</span></a>                      <div id="colision' +
o +
'" class="colision" role="tabpanel">                      <ul class="sl-acc-layout" id="sl-cat-' +
o +
'"></ul></div></li>'));
return i;
}),
(asl_engine.dataSource.prototype.generateHTMLCountriesStates =
function (e){
var t,
o="",
i=Object.keys(e).sort();
for (t in i)
if(i.hasOwnProperty(t)){
var a,
n=i[t],
s =
((o +=
'<li data-id="' +
n
.replace(asl_configuration.regex, "")
.replace(/[ ]/gi, "-")
.toLowerCase() +
'" class="item-state asl-country-li">                <a class="colisiond" href="#colision-' +
t +
'"  aria-controls="colision-' +
t +
'" data-parent="#p-countlist" data-toggle="colision"><span>' +
n +
'</span></a>                <div id="colision-' +
t +
'" class="colision" role="tabpanel">                <ul id="p-statelist-' +
t +
'">'),
Object.keys(e[i[t]]).sort());
for (a in s)
if(s.hasOwnProperty(a)){
var r,
l,
_=s[a],
c =
((o +=
'<li data-id="' +
_.replace(asl_configuration.regex, "")
.replace(/[ ]/gi, "-")
.toLowerCase() +
'"  class="item-state asl-state-li">                    <a class="colisiond" href="#colision' +
a +
"-" +
t +
'"  aria-controls="colision' +
a +
"-" +
t +
'" data-parent="#p-statelist-' +
t +
'" data-toggle="colision"><span>' +
_ +
'</span></a>                    <div id="colision' +
a +
"-" +
t +
'" class="colision" role="tabpanel">                    <ul id="item-city-' +
a +
"-" +
t +
'">'),
e[i[t]][s[a]].sort());
for (r in c)
c.hasOwnProperty(r) &&
(o +=
'<li data-id="' +
(l =
s[a]
.replace(asl_configuration.regex, "")
.replace(/[ ]/gi, "-")
.toLowerCase() +
"-" +
c[r]
.replace(asl_configuration.regex, "")
.replace(/[ ]/gi, "-")
.toLowerCase()) +
'" class="item-state"><a class="colisiond" href="#colision' +
t +
"-" +
a +
"-" +
r +
'" data-parent="#item-city-' +
a +
"-" +
t +
'" data-toggle="colision"><span>' +
c[r] +
'</span></a>                    <div class="colision" id="colision' +
t +
"-" +
a +
"-" +
r +
'" role="tabpanel"><div id="city-list-' +
l +
'"></div></div></li>');
o +="</ul></div></li>";
}
o +="</ul></div></li>";
}
return o;
}),
(asl_engine.dataSource.prototype.generateHTMLStates=function (
e
){
var t,
o="",
i=Object.keys(e).sort();
for (t in i)
if(i.hasOwnProperty(t)){
o +=
'<li data-id="' +
i[t]
.replace(asl_configuration.regex, "")
.replace(/[ ]/gi, "-")
.toLowerCase() +
'"   class="item-state">                  <a class="colisiond" href="#colision' +
t +
'"  aria-controls="colision' +
t +
'" data-parent="#p-statelist" data-toggle="colision"><span>' +
i[t] +
'</span></a>                  <div id="colision' +
t +
'" class="colision" role="tabpanel">                  <ul id="item-city-' +
t +
'">';
var a,
n,
s=e[i[t]].sort();
for (a in s)
s.hasOwnProperty(a) &&
(o +=
'<li data-id="' +
(n =
i[t]
.replace(asl_configuration.regex, "")
.replace(/[ ]/gi, "-")
.toLowerCase() +
"-" +
s[a]
.replace(asl_configuration.regex, "")
.replace(/[ ]/gi, "-")
.toLowerCase()) +
'" class="item-state"><a class="colisiond" href="#colision' +
t +
"-" +
a +
'" data-parent="#item-city-' +
t +
'" data-toggle="colision"><span>' +
s[a] +
'</span></a>              <div class="colision" id="colision' +
t +
"-" +
a +
'" role="tabpanel"><div id="city-list-' +
n +
'"></div></div></li>');
o +="</ul></div></li>";
}
return o;
}),
(asl_engine.dataSource.prototype.sortDistance=function (
o,
e
){
e.sort(function (e, t){
return e.distanceTo(o) - t.distanceTo(o);
});
}),
(asl_engine.dataSource.prototype.sortRandom=function (e){
e.sort(function (e, t){
return Math.random() - 0.5;
});
}),
(asl_engine.dataSource.prototype.sortBy=function (o, e){
var t,
i=null;
e &&
e.length &&
((t="number"==typeof e[0].props_[o]),
(i =
"cat"==o
? function (e, t){
var o=e.props_.cat,
i=t.props_.cat,
e=e.props_.distance,
t=t.props_.distance;
return o==i
? e < t
? -1
: t < e
? 1
: 0
: i < o
? -1
: 1;
}
: t
? function (e, t){
return e.props_[o] > t.props_[o]
? 1
: t.props_[o] > e.props_[o]
? -1
: 0;
}
: "desc"==asl_configuration.sort_order
? function (e, t){
return e.props_[o].toLowerCase() <
t.props_[o].toLowerCase()
? 1
: t.props_[o].toLowerCase() <
e.props_[o].toLowerCase()
? -1
: 0;
}
: function (e, t){
return e.props_[o].toLowerCase() &&
t.props_[o].toLowerCase()
? e.props_[o]
.toLowerCase()
.localeCompare(t.props_[o].toLowerCase(),
"is"
)
: 0;
}),
e.sort(i));
}),
(asl_engine.dataSource.prototype.sortByDesc=function (o, e){
e.sort(function (e, t){
return e.props_[o] < t.props_[o]
? 1
: t.props_[o] < e.props_[o]
? -1
: 0;
});
}),
(asl_engine.dataSource.prototype.load_kml=function (e){
var t,
o,
i=asl_configuration.kml_files;
for (t in i)
i.hasOwnProperty(t) &&
((o=asl_configuration.URL + "kml/" + i[t]),
new google.maps.KmlLayer(o, {
preserveViewport: !0,
map: e,
}));
}),
(not_initial_load = !1),
(asl_view=null),
(asl_panel=null),
(asl_engine.dataSource.prototype.fetch_remote_data=function (
T,
e,
S
){
for (
var t,
o,
i,
M=this,
P=$("#asl-storelocator"),
a =
(P.find(".asl-overlay").show(),
!e &&
asl_configuration.reload_params &&
((e=asl_configuration.reload_params),
(asl_configuration.reload_params=null)),
!1),
n={
action: "asl_load_stores",
nonce: ASL_REMOTE.nonce,
asl_lang: asl_configuration.lang,
load_all: asl_configuration.load_all,
layout: asl_configuration.layout ? 1:0,
},
r =
(e&&(n=Object.assign(n, e)),
asl_configuration.stores &&
((n.stores=asl_configuration.stores), (a = !0)),
asl_configuration.branches&&(n.branches="1"),
"1"!=asl_configuration.load_all &&
((t=(e=map.getBounds()).getNorthEast()),
(o=e.getSouthWest()),
(i=e.getCenter()),
(n.lat=i.lat()),
(n.lng=i.lng()),
(n.nw=[t.lat(), o.lng()]),
(n.se=[o.lat(), t.lng()])),
[
"category",
"brand",
"special",
"state",
"city",
"postal_code",
"title",
"country",
]),
s=0;
s < r.length;
s++
){
var l=r[s];
asl_configuration[l] &&
((n[l]=asl_configuration[l]), (a = !0));
}
M.on_call = !0;
e =
"1"!=asl_configuration.cache||a
? ASL_REMOTE.ajax_url
: asl_configuration.URL +
"locator-data" +
(asl_configuration.lang
? "-" + asl_configuration.lang
: "") +
".json?v=" +
asl_configuration.cache_ver;
$.ajax({
url: e,
data: n,
type: asl_configuration.stores ? "POST":"GET",
dataType: "json",
success: function (e){
M.stores_=M.parseData(e);
var _=P.find("#auto-complete-search,.asl-search-address"
);
if(("2"==asl_configuration.load_all &&
P.find(".asl-reload-map")
.find("i")
.removeClass("animate-spin"),
"1"==asl_configuration.search_type ||
"2"==asl_configuration.search_type)
){
var d=null,
t=[];
if("1"==asl_configuration.search_type){
var d="title",
o=asl_engine.helper.uniq(e, "title");
t=t.concat(o);
}else if("2"==asl_configuration.search_type){
d="address";
var u=asl_engine.helper.uniq(e, "city"),
i=asl_engine.helper.uniq(e, "state"),
p=asl_engine.helper.uniq(e, "country"),
f=asl_engine.helper.uniq(e, "postal_code");
if((asl_configuration.search_title &&
((o=asl_engine.helper.uniq(e, "title")),
(t=t.concat(o))),
(t=(t=(t=t.concat(u)).concat(i)).concat(f)),
asl_configuration.category_accordion)
)
for (var a in asl_categories)
asl_categories.hasOwnProperty(a) &&
t.push({
type: "category",
id: asl_categories[a].id,
title: asl_categories[a].name,
});
else t=t.concat(p);
if(asl_configuration.additional_search){
var n,
g=[];
for (a in ((t=[]), e))
e.hasOwnProperty(a) &&
((n=e[a].description_2)
? ((n=n.split("|")),
(g=asl_engine.helper.merge(g, n)),
(e[a].description_2=n))
: (e[a].description_2=[]));
for (var h=0; h < g.length; h++)
t.push({ type: "search_2", title: g[h] });
}}
asl_configuration["default-addr"]&&(M.ds_items=t),
asl_search.add_prop_search(t, _, d);
} else
not_initial_load||asl_locator.add_clear_button(_);
if(asl_configuration.search_2){
var m =
"1"==asl_configuration.search_2
? ["title"]
: asl_configuration.search_2.split(","),
o=P.find(".asl-name-search .asl-search-name"),
t=[];
if(o[0]){
for (var v in m)
m.hasOwnProperty(v) &&
((v=asl_engine.helper.uniq(e, m[v], !0)),
(t=t.concat(v)));
asl_search.add_prop_search(t, o, "name", !0);
}
asl_configuration.search_2=m;
}
var s=M.stores_,
y=s[0] ? s[0].props_.country:null;
M.countries = !1;
for (var r, l, c, w, b, k, C=0; C < s.length; C++)
if(y!=s[C].props_.country){
M.countries = !0;
break;
}
function x(e){
asl_view.measure_distance(e.geometry.location,
!0,
null,
e
),
r.removeClass("in").css("display", "none"),
(e.search_text=l.val()),
asl_locator.hook_event({ type: "search", data: e }),
asl_configuration.analytics;
}
function L(){
var e,
t=$.trim(l.val());
t &&
((t={ address: t }),
asl_configuration.country_restrict &&
((e=(e =
asl_configuration.country_restrict.toLowerCase()).split(","
)),
(t.componentRestrictions={ country: e[0] })),
w.geocode(t, b));
}
(asl_configuration.accordion ||
asl_configuration.address_ddl) &&
(M.stateCities=M.countries
? M.getCountriesStateCities(s)
: M.getStateCities(s)),
asl_configuration.state_restrict &&
(M.all_states=asl_engine.helper.pluck("state", e)),
not_initial_load ||
((not_initial_load = !0),
(asl_view=new asl_locator.View(map, M, {
geolocation: !1,
container: P,
features: M.getDSFeatures(),
})),
(asl_panel=new asl_locator.Panel(P.find("#asl-panel")[0],
{ view: asl_view, container: P }
)),
(window.asl_view=asl_view),
asl_configuration.kml_files&&M.load_kml(map),
P.find("#asl-desc-agile-modal")
.find(".sl-close")
.bind("click",
asl_panel.hideDescModal.bind(asl_panel)
),
(r=P.find("#asl-geolocation-agile-modal"))
.find(".sl-close")
.bind("click",
asl_panel.hideGeoModal.bind(asl_panel)
),
"3"==asl_configuration.prompt_location
? asl_view.geolocate_()
: "4"==asl_configuration.prompt_location
? asl_view.geo_service()
: "0"!=asl_configuration.prompt_location &&
(r.css("display", "block"),
window.setTimeout(function (){
r.addClass("in");
}, 300),
P.find("#asl-btn-geolocation").bind("click",
function (){
asl_view.geolocate_(),
r.removeClass("in").css("display", "none");
}
),
(asl_panel.geo_modal = !0)),
"2"==asl_configuration.prompt_location &&
((l=P.find("#asl-current-loc")),
(c=null),
(w=new google.maps.Geocoder()),
(b =
b ||
function (e, t){
"OK"==t
? x((c=e[0]))
: console.log("Geocode was not successful for the following reason: " +
t
);
}),
l.bind("keyup", function (e){
13==e.keyCode&&L();
}),
P.find("#asl-btn-locate").click(function (e){
c ? x(c):L();
}),
(u={}),
asl_configuration.google_search_type &&
(u.types=[
"(" +
asl_configuration.google_search_type +
")",
]),
(i=new google.maps.places.Autocomplete(l[0], u)),
asl_configuration.country_restrict &&
((f=(f =
asl_configuration.country_restrict.toLowerCase()).split(","
)),
i.setComponentRestrictions({ country: f })),
(p=["geometry"]),
asl_configuration.filter_address &&
p.push("address_components"),
i.setFields(p),
google.maps.event.addListener(i,
"place_changed",
function (){
var e=this.getPlace();
(c=e).search_text=l.val();
}
)),
P.find(".asl-geo.icon-direction-outline").bind("click",
function (e){
asl_view.geolocate_();
}
),
asl_configuration.address_ddl &&
asl_panel.address_dropdowns(M.stateCities,
M.countries
),
asl_configuration.user_center &&
asl_view.measure_distance(new google.maps.LatLng(asl_configuration.default_lat,
asl_configuration.default_lng
)
)),
"1"!=asl_configuration.load_all &&
asl_view.dest_coords &&
asl_view.measure_distance(asl_view.dest_coords,
null,
!0
),
asl_view.refreshView(),
P.find(".asl-overlay").hide(),
T&&map.panTo(T),
(M.on_call = !1),
window.asl_loaded &&
"function"==typeof window.asl_loaded &&
asl_loaded.call(this),
"1"!=asl_configuration.load_all ||
((k=window.location.hash.replace("#", "")) &&
!isNaN(k) &&
window.setTimeout(function (){
var e=asl_view.data_.findStore(k);
asl_view.highlight(e);
}, 500)),
asl_locator.hook_event({ type: "load", data: null }),
S&&"function"==typeof S&&S.call(this);
},
error: function (){
M.on_call = !1;
},
}),
(M.pos=i);
}),
(asl_engine.dataSource.prototype.load_locator=function (){
var that=this;
if(!document.getElementById("asl-map-canv")) return !1;
var maps_params={
center: new google.maps.LatLng(asl_lat, asl_lng),
zoom: parseInt(asl_configuration.zoom),
scrollwheel: asl_configuration.scroll_wheel,
gestureHandling:
asl_configuration.gesture_handling||"cooperative",
mapTypeId: asl_configuration.map_type,
},
$reset_btn,
centerControlDiv,
centerControl,
map_style;
function ASLResetMAP(e, t){
($reset_btn=$(
'<span class="asl-reset-map" style="display:none">' +
asl_configuration.words.reset_map +
"</span>"
)),
e.appendChild($reset_btn[0]),
$reset_btn[0].addEventListener("click", function (){
asl_view.reset_all(),
($reset_btn[0].style.display="none");
});
}
asl_configuration.advanced_marker &&
(maps_params.mapId =
asl_configuration.map_id||"asl-maps-id-tag"),
"false"==asl_configuration.zoomcontrol &&
(maps_params.zoomControl = !1),
"false"==asl_configuration.maptypecontrol &&
(maps_params.mapTypeControl = !1),
"false"==asl_configuration.scalecontrol &&
(maps_params.scaleControl = !1),
"false"==asl_configuration.rotatecontrol &&
(maps_params.rotateControl = !1),
"false"==asl_configuration.fullscreencontrol &&
(maps_params.fullscreenControl = !1),
"false"==asl_configuration.streetviewcontrol &&
(maps_params.streetViewControl = !1),
(maps_params.fullscreenControlOptions={
position: google.maps.ControlPosition.RIGHT_CENTER,
}),
asl_configuration.position_maptype &&
(maps_params.mapTypeControlOptions={
position: parseInt(asl_configuration.position_maptype),
}),
asl_configuration.position_fullscreen &&
(maps_params.fullscreenControlOptions={
position: parseInt(
asl_configuration.position_fullscreen
),
}),
asl_configuration.position_zoom &&
(maps_params.zoomControlOptions={
position: parseInt(asl_configuration.position_zoom),
}),
asl_configuration.position_streetview &&
(maps_params.streetViewControlOptions={
position: parseInt(
asl_configuration.position_streetview
),
}),
asl_configuration.maxzoom &&
!isNaN(asl_configuration.maxzoom) &&
(maps_params.maxZoom=parseInt(
asl_configuration.maxzoom
)),
asl_configuration.minzoom &&
!isNaN(asl_configuration.minzoom) &&
(maps_params.minZoom=parseInt(
asl_configuration.minzoom
)),
(map=new google.maps.Map(document.getElementById("asl-map-canv"),
maps_params
)),
(window.asl_map=map),
(asl_configuration.reset_button = !0),
asl_configuration.reset_button &&
(($reset_btn=null),
(centerControlDiv=document.createElement("div")),
(centerControl=new ASLResetMAP(centerControlDiv, map)),
(centerControlDiv.index=1),
map.controls[google.maps.ControlPosition.TOP_RIGHT].push(centerControlDiv
)),
asl_configuration.map_layout &&
((map_style=eval(
"(" + asl_configuration.map_layout + ")"
)),
map.set("styles", map_style)),
window._asl_map_customize &&
((_asl_map_customize=JSON.parse(_asl_map_customize)),
asl_configuration.advanced_marker &&
(_asl_map_customize.marker_animations = !1),
_asl_map_customize.trafic_layer &&
1==_asl_map_customize.trafic_layer &&
((trafic_layer=new google.maps.TrafficLayer()),
trafic_layer.setMap(map)),
_asl_map_customize.bike_layer &&
1==_asl_map_customize.bike_layer &&
((bike_layer=new google.maps.BicyclingLayer()),
bike_layer.setMap(map)),
_asl_map_customize.transit_layer &&
1==_asl_map_customize.transit_layer &&
((transit_layer=new google.maps.TransitLayer()),
transit_layer.setMap(map)),
_asl_map_customize.drawing &&
asl_drawing.loadData(_asl_map_customize.drawing, map));
var _features=[],
i,
$reload_btn,
_set_position,
first_loaded,
centerControlDiv,
centerControl;
for (i in asl_categories){
var cat=asl_categories[i];
that.FEATURES_.add(new asl_locator.Feature(cat.id,
cat.name,
cat.icon,
cat.ordr&&!isNaN(cat.ordr) ? parseInt(cat.ordr):0
)
);
}
function ASLReloadMAP(e, t){
($reload_btn=$(
'<span class="asl-reload-map" display="none"><i class="icon-arrows-cw"></i>' +
asl_configuration.words.reload_map +
"</span>"
)),
e.appendChild($reload_btn[0]),
$reload_btn[0].addEventListener("click", function (){
$reload_btn.find("i").addClass("animate-spin"),
that.fetch_remote_data(_set_position);
});
}
"1"==asl_configuration.load_all
? that.fetch_remote_data()
: "2"==asl_configuration.load_all
? (($reload_btn=null),
(_set_position=null),
(first_loaded = !1),
(centerControlDiv=document.createElement("div")),
(centerControl=new ASLReloadMAP(centerControlDiv, map)),
(centerControlDiv.index=1),
map.controls[google.maps.ControlPosition.TOP_CENTER].push(centerControlDiv
),
google.maps.event.addListener(map, "idle", function (){
asl_view &&
asl_view.halt_fetch &&
((_set_position=asl_view.marker_center),
(asl_view.halt_fetch = !1)),
($reload_btn[0].style.display="block"),
first_loaded ||
((first_loaded = !0), that.fetch_remote_data());
}))
: google.maps.event.addListener(map, "idle", function (){
var e=null;
if(asl_view&&asl_view.halt_fetch)
return (
(e=asl_view.marker_center),
void (asl_view.halt_fetch = !1)
);
that.fetch_remote_data(e);
});
}),
(asl_engine.dataSource.prototype.FEATURES_ =
new asl_locator.FeatureSet()),
(asl_engine.dataSource.prototype.getDSFeatures=function (){
return this.FEATURES_;
}),
(asl_engine.dataSource.prototype.filterBranches=function (
e,
t
){
for (var o, i=[], a=0; (o=e[a]); a++)
-1!=t.indexOf(o.id_) &&
((e[a].props_.branch = !0), i.push(e[a]));
return i;
}),
(asl_engine.dataSource.prototype.addChildrenFeatures =
function (){
for (var e in asl_categories)
if(asl_categories.hasOwnProperty(e) &&
asl_categories[e].children.length
)
for (
var t=0;
t < asl_categories[e].children.length;
t++
){
var o=asl_categories[e].children[t];
this.FEATURES_.add(new asl_locator.Feature(o.id,
o.name,
o.icon,
o.ordr&&!isNaN(o.ordr) ? parseInt(o.ordr):0
)
);
}}),
(asl_engine.dataSource.prototype.parseData=function (l){
var e,
t=[],
C=asl_date.getHours() + asl_date.getMinutes() / 100,
x=asl_date.getDay(),
c=asl_categories,
_=((asl_categories={}), Object.keys(c));
for (e in _)
"object"==typeof c[_[e]] &&
((asl_categories[String(_[e])]=c[_[e]]),
(asl_categories[_[e]].len=0));
var b=["mon", "tue", "wed", "thu", "fri", "sat", "sun"],
x={
1: "mon",
2: "tue",
3: "wed",
4: "thu",
5: "fri",
6: "sat",
0: "sun",
}[x],
k=new Date(),
L={
sun: 0,
mon: 1,
tue: 2,
wed: 3,
thu: 4,
fri: 5,
sat: 6,
},
S="2"==asl_configuration.week_hours;
function M(){
(this.start=null), (this.end=null), (this.hours=[]);
}
var d =
asl_configuration.show_categories ||
asl_configuration.category_accordion,
u="1"==asl_configuration.slug_link,
p=asl_configuration.rewrite_slug + "/",
f = !(
"1"!=asl_configuration.link_type ||
!asl_configuration.rewrite_slug
),
g="0"!=asl_configuration.additional_info,
h="2"==asl_configuration.additional_info,
m="1"==asl_configuration.template,
v=Object.keys(asl_attributes)||null,
y="cat"==asl_configuration.sort_by,
w = !1,
o =
(y &&
(w=Object.values(asl_categories).some(function (e){
return 0 < parseInt(e.ordr);
})),
asl_configuration.has_child_categories
? asl_engine.helper.flattenCategories(asl_categories)
: asl_categories);
asl_configuration.image_filter&&(this.flat_categories=o);
for (var P=0; P < l.length; P++){
var i=l[P],
T =
((i.id=parseInt(i.id)),
(i.ordr =
!i.ordr||isNaN(i.ordr) ? 0:parseInt(i.ordr)),
(i.lat=parseFloat(i.lat)),
(i.lng=parseFloat(i.lng)),
(i.logo_id =
i.logo_id&&!isNaN(i.logo_id)
? parseInt(i.logo_id)
: i.logo_id),
new google.maps.LatLng(i.lat, i.lng)),
I =
((i.open_hours=i.open_hours||null),
i.state||(i.state=""),
asl_engine.helper.implode([i.city, i.state, i.postal_code],
", "
)),
I=[i.street, I],
O =
(m&&I.shift(),
(i.address=asl_engine.helper.implode(I, " <br>")),
i.categories ? i.categories.split(","):[]),
a=[];
if(d){
var z,
E=[],
B=[],
F=[];
for (z in O){
var n=O[z].toString();
o[n]
? (o[n].len++,
a.push(o[n]),
E.push(o[n].name),
B.push(o[n].id),
F.push(o[n].id),
asl_configuration.has_child_categories &&
(F=o[n].children.length
? asl_engine.helper.uniqe_merge(F,
asl_engine.helper.pluck("id", o[n].children)
)
: asl_engine.helper.uniqe_merge(F, o[n].value)))
: delete O[z];
}
asl_configuration.has_child_categories&&(O=F),
y &&
(1 < a.length &&
w &&
(a=a.sort(function (e, t){
return parseInt(t.ordr) - parseInt(e.ordr);
})),
(i.cat=w
? a&&a[0]
? parseInt(a[0].ordr)
: -1
: a&&a[0]
? a[0].name
: "z")),
(i.c_ids=B),
(i.c_names=asl_engine.helper.implode(E, ", ")),
(i.categories=a);
}
if(v)
for (var D in v){
var A,
s=v[D],
N=i[s] ? i[s].split(","):[],
j=[];
for (A in (i[s]=N))
N.hasOwnProperty(A) &&
asl_attributes[s][N[A]] &&
j.push(asl_attributes[s][N[A]].name);
j.length&&(i["str_" + s]=j.join(", "));
}
(i.city=$.trim(i.city)),
(i.country=$.trim(i.country)),
i.state||(i.state=""),
(i.marker_id=i.marker_id ? i.marker_id.toString():""),
asl_configuration.hide_hours
? (i.days_str=i.open_hours=null)
: ("0"==asl_configuration.week_hours
? function (e){
if(e.open_hours){
(e.open = !1),
(e.open_hours=JSON.parse(e.open_hours));
var t,
o,
i,
a,
n,
s,
r=e.open_hours[x];
if(((e.open_hours=null), "1"==r))
(e.open = !0), (e.open_hours=null);
else if("0"==r)
(e.open = !1), (e.open_hours=null);
else if(r){
for (var l in ((e.open_hours=[]), r))
r.hasOwnProperty(l) &&
((t=(l=r[l].split(" - "))[0]),
(l=l[1]),
(s =
0!=t
? asl_engine.helper.asl_timeConvert(t
)
: 0),
0==(o =
0!=l
? asl_engine.helper.asl_timeConvert(l
)
: 24)&&(o=24),
e.open ||
(s < o
? e.open ||
(e.open =
!(!s||!o) &&
asl_engine.helper.between(C,
s,
o
))
: ((i=24 - s + o),
(a=new Date()).setHours(Math.floor(s)
),
a.setMinutes(getDecimal(s)),
k.getDay()!=L[x] &&
a.subDays(1),
(n=new Date(
a.getTime()
)).addHours(i),
n.setMinutes(getDecimal(o)),
a < k&&k < n&&(e.open = !0))),
(l=asl_configuration.time_24
? ((s +=0.01),
(s=parseFloat(s).toFixed(2)),
((i=String(s).split("."))[0] =
asl_engine.helper.asl_leadzero(parseInt(i[0])
)),
(i[1] =
asl_engine.helper.asl_leadzero(parseInt(i[1]) - 1
)),
(t=i.join(":")),
(o +=0.01),
(o=parseFloat(o).toFixed(2)),
((a=String(o).split("."))[0] =
asl_engine.helper.asl_leadzero(parseInt(a[0])
)),
(a[1] =
asl_engine.helper.asl_leadzero(parseInt(a[1]) - 1
)),
a.join(":"))
: ((n=t.split(":")),
(s=l.split(":")),
n[0] &&
(n[0] =
asl_engine.helper.asl_leadzero(parseInt(n[0])
)),
(t=n.join(":")),
s[0] &&
(s[0] =
asl_engine.helper.asl_leadzero(parseInt(s[0])
)),
(l=s.join(":")),
(t=t
.replace("AM",
asl_configuration.words.am
)
.replace("PM",
asl_configuration.words.pm
)),
l
.replace("AM",
asl_configuration.words.am
)
.replace("PM",
asl_configuration.words.pm
))),
e.open_hours.push(t + " - " + l));
e.open_hours =
0 < e.open_hours.length
? e.open_hours.join(" <br> ")
: null;
}} else e.open = !0;
}
: function (e){
if(e.open_hours){
(e.open = !1),
(e.days=[]),
(e.open_hours=JSON.parse(e.open_hours));
var _,
t=asl_configuration.days,
o=S ? {}:[];
for (_ in b){
var i=b[_],
d=e.open_hours[i],
u=i==x;
if("1"==d)
u&&(e.open = !0),
e.days.push(t[i]),
S ||
o.push('<span class="asl-lbl-day-hr"><span class="asl-day-lbl">' +
t[i] +
':</span><span class="asl-time-hrs">' +
asl_configuration.words.opened +
"</span></span>"
);
else if("0"==d)
u&&(e.open = !1),
S
? asl_configuration.closed_label &&
(o[i]=[
asl_configuration.words.closed,
])
: o.push('<span class="asl-lbl-day-hr"><span class="asl-day-lbl">' +
t[i] +
':</span><span class="asl-time-hrs">' +
asl_configuration.words.closed +
"</span></span>"
);
else if(d){
e.days.push(t[i]);
var p,
a,
n,
s,
f,
r,
l,
c,
g=[];
for (p in d)
d.hasOwnProperty(p) &&
((a=(n=d[p].split(" - "))[0]),
(n=n[1]),
(c =
0!=a
? asl_engine.helper.asl_timeConvert(a
)
: 0),
0==(s =
0!=n
? asl_engine.helper.asl_timeConvert(n
)
: 24)&&(s=24),
e.open ||
(c < s
? !e.open &&
u &&
(e.open =
!(!c||!s) &&
asl_engine.helper.between(C,
c,
s
))
: ((f=24 - c + s),
(r=new Date()).setHours(Math.floor(c)
),
r.setMinutes(getDecimal(c)),
k.getDay()!=L[i] &&
r.subDays(1),
(l=new Date(
r.getTime()
)).addHours(f),
l.setMinutes(getDecimal(s)),
r < k &&
k < l &&
(e.open = !0))),
(n=asl_configuration.time_24
? ((c +=0.01),
(c=parseFloat(c).toFixed(2)),
((f=String(c).split("."))[0] =
asl_engine.helper.asl_leadzero(parseInt(f[0])
)),
(f[1] =
asl_engine.helper.asl_leadzero(parseInt(f[1]) - 1
)),
(a=f.join(":")),
(s +=0.01),
(s=parseFloat(s).toFixed(2)),
((r=String(s).split("."))[0] =
asl_engine.helper.asl_leadzero(parseInt(r[0])
)),
(r[1] =
asl_engine.helper.asl_leadzero(parseInt(r[1]) - 1
)),
r.join(":"))
: ((l=a.split(":")),
(c=n.split(":")),
l[0] &&
(l[0] =
asl_engine.helper.asl_leadzero(parseInt(l[0])
)),
(a=l.join(":")),
c[0] &&
(c[0] =
asl_engine.helper.asl_leadzero(parseInt(c[0])
)),
(n=c.join(":")),
(a=a
.replace("AM",
asl_configuration.words.am
)
.replace("PM",
asl_configuration.words.pm
)),
n
.replace("AM",
asl_configuration.words.am
)
.replace("PM",
asl_configuration.words.pm
))),
g.push(a + " - " + n));
S
? (o[i]=g)
: o.push('<span><span class="asl-day-lbl">' +
t[i] +
':</span><span class="asl-time-hrs">' +
g.map(function (e){
return "<span>" + e + "</span>";
}) +
"</span></span>"
);
}}
if(S){
for (
var h, m=[], v=null, y = !1, w=0;
w < b.length;
w++
)
!v ||
y ||
JSON.stringify(v.hours)!=JSON.stringify(o[b[w]])
? (y =
!o[b[w]] ||
(((v=new M()).start=b[w]),
(v.hours=o[b[w]]),
m.push(v),
!1))
: (v.end=b[w]);
0 < m.length &&
((h=""),
m.forEach(function (e){
h +=
'<span class="asl-group-slots"><span class="asl-day-lbl">' +
t[e.start] +
(e.end ? " - " + t[e.end]:"") +
':</span><span class="asl-time-hrs">' +
e.hours
.map(function (e){
return "<span>" + e + "</span>";
})
.join("") +
"</span></span>";
})),
(e.open_hours=h);
} else
e.open_hours =
0 < o.length
? '<span class="asl-week-hrs">' +
o.join("") +
"</span>"
: null;
e.days=e.days.join(", ");
} else e.open = !0;
})(i),
asl_configuration.hide_logo&&(i.path=null),
g ? (i.desc_link=h):(i.description=null),
u&&(i.link=f ? p + i.slug + "/":i.website);
I=new asl_locator.Store(i.id, T, O, i);
t.push(I);
}
if(asl_configuration.branches)
for (var V, r=0; r < t.length; r++)
t[r].props_.childs &&
((V=t[r].props_.childs.split(",")),
(t[r].props_.childs=this.filterBranches(t,
V.map(Number)
)),
(t[r].props_.have_childs = !0));
return t;
}),
(data_source=new asl_engine.dataSource()),
(data_source.getClosestBranch=function (e){
for (
var t=e, o=e.props_.distance, i=0;
i < e.props_.childs.length;
i++
)
e.props_.childs[i].props_.distance < o &&
((o=e.props_.childs[i].props_.distance),
(t=e.props_.childs[i]));
return [o, t];
}),
(data_source.getStores=function (e, t, o){
for (
var i,
a=[],
n=asl_configuration.and_filter
? "hasAllCategory"
: "hasAnyCategory",
s=this.parent_store
? this.parent_store.props_.childs.concat(this.parent_store
)
: this.stores_,
r=0;
(i=s[r]);
r++
)
i[n](t)&&a.push(i);
o(a);
}),
(data_source.setBranchList=function (e){
if(!e)
return (
this.parent_store &&
((this.parent_store.props_.branch=null),
(this.parent_store.props_.have_childs = !0),
(this.parent_store.content_=null),
(asl_locator.Store.infoPanelCache_[
this.parent_store.id_
]=null)),
void (this.parent_store=null)
);
(this.parent_store=e),
(this.parent_store.props_.branch = !0),
(this.parent_store.props_.have_childs=void 0),
(this.parent_store.content_=null),
(asl_locator.Store.infoPanelCache_[this.parent_store.id_] =
null);
}),
(data_source.getActiveStoreList=function (){
return this.parent_store
? this.parent_store.props_.childs
: this.stores_;
}),
(data_source.findStore=function (e){
e=parseInt(e);
for (var t, o=0; (t=this.stores_[o]); o++)
if(t.id_==e) return t;
return null;
}),
(data_source.allStores=function (){
return this.stores_;
}),
asl_configuration.advanced_marker
? google.maps.importLibrary("marker").then(function (){
data_source.load_locator();
})
: data_source.load_locator());
})(jQuery);
}} else
asl_configuration.gdpr_enabled ||
console.warn("Store Locator Error! Google Maps library is not loaded, check your cache plugin"
);
function InfoBox(e){
(e=e||{}),
google.maps.OverlayView.apply(this, arguments),
(this.content_=e.content||""),
(this.disableAutoPan_=e.disableAutoPan||!1),
(this.maxWidth_=e.maxWidth||0),
(this.pixelOffset_=e.pixelOffset||new google.maps.Size(0, 0)),
(this.position_=e.position||new google.maps.LatLng(0, 0)),
(this.zIndex_=e.zIndex||null),
(this.boxClass_=e.boxClass||"infoBox"),
(this.boxStyle_=e.boxStyle||{}),
(this.closeBoxMargin_=e.closeBoxMargin||"2px"),
(this.closeBoxURL_ =
e.closeBoxURL ||
"https://www.google.com/intl/en_us/mapfiles/close.gif"),
""===e.closeBoxURL&&(this.closeBoxURL_=""),
(this.infoBoxClearance_ =
e.infoBoxClearance||new google.maps.Size(1, 1)),
void 0===e.visible &&
(void 0===e.isHidden ? (e.visible = !0):(e.visible = !e.isHidden)),
(this.isHidden_ = !e.visible),
(this.alignBottom_=e.alignBottom||!1),
(this.pane_=e.pane||"floatPane"),
(this.enableEventPropagation_=e.enableEventPropagation||!1),
(this.div_=null),
(this.closeListener_=null),
(this.moveListener_=null),
(this.contextListener_=null),
(this.eventListeners_=null),
(this.fixedWidthSet_=null);
}
function _isMobileDevice(){
var e,
t=window.innerWidth < 768;
return (
(e=navigator.userAgent||navigator.vendor||window.opera),
(t =
/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e
) ||
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0, 4)
)
? !0
: t)
);
}
function getDecimal(e){
return Math.ceil(100 * (e - Math.floor(e)));
}}
"1"==asl_configuration.gdpr &&
((asl_configuration.gdpr_enabled = !0), asl_gdpr()),
jQuery(document).ready(asl_store_locator);