var wpslAddons=wpslAddons||{};function wpslWidget(){wpslAddons.widget.init()}wpslAddons.widget={init:function(){jQuery("#wpsl-widget-search").length&&"undefined"!=typeof wpslWidgetSettings&&(1==wpslWidgetSettings.autoComplete&&wpslAddons.widget.api.autoComplete(),1!=wpslWidgetSettings.autoLocate||jQuery(".wpsl-search").hasClass("wpsl-widget")||wpslAddons.widget.api.geoLocationRequest()),jQuery(".wpsl-icon-direction").on("click",function(){wpslAddons.widget.api.geoLocationRequest()}),jQuery("#wpsl-widget-submit").bind("click",function(e){return jQuery.trim(jQuery("#wpsl-widget-search").val()).length?void jQuery("#wpsl-widget-search").removeClass("wpsl-error"):(jQuery("#wpsl-widget-search").addClass("wpsl-error").focus(),!1)})},api:{autoComplete:function(){var e,t={};if(void 0===wpslWidgetSettings.geocodeComponents||jQuery.isEmptyObject(wpslWidgetSettings.geocodeComponents)||(t.componentRestrictions=wpslWidgetSettings.geocodeComponents),void 0!==wpslWidgetSettings.autoCompleteOptions&&!jQuery.isEmptyObject(wpslWidgetSettings.autoCompleteOptions))for(var o in wpslWidgetSettings.autoCompleteOptions)wpslWidgetSettings.autoCompleteOptions.hasOwnProperty(o)&&(t[o]=wpslWidgetSettings.autoCompleteOptions[o]);e=document.getElementById("wpsl-widget-search"),new google.maps.places.Autocomplete(e,t)},geoLocationRequest:function(){var t,o,e=Number(wpslWidgetSettings.geoLocationTimout);navigator.geolocation&&(t=setInterval(function(){jQuery(".wpsl-icon-direction").toggleClass("wpsl-active-icon")},600),navigator.geolocation.getCurrentPosition(function(e){void 0!==e&&(o=new google.maps.LatLng(e.coords.latitude,e.coords.longitude),clearInterval(t),wpslAddons.widget.api.geocode.reverse(o))},function(e){switch(e.code){case e.PERMISSION_DENIED:alert(wpslGeolocationErrors.denied);break;case e.POSITION_UNAVAILABLE:alert(wpslGeolocationErrors.unavailable);break;case e.TIMEOUT:alert(wpslGeolocationErrors.timeout);break;default:alert(wpslGeolocationErrors.generalError)}clearInterval(t),jQuery(".wpsl-icon-direction").removeClass("wpsl-active-icon")},{maximumAge:6e4,timeout:e,enableHighAccuracy:!0}))},geocode:{reverse:function(e){(new google.maps.Geocoder).geocode({latLng:e},function(e,t){e=wpslAddons.widget.api.geocode.filterResponse(e),t==google.maps.GeocoderStatus.OK&&jQuery("#wpsl-widget-search").val(e)})},filterResponse:function(e){var t,o,s,i,n=wpslWidgetSettings.filterPattern;if("formatted_address"==n)s=e[0].formatted_address;else{for(i=e[0].address_components.length,o=0;o 0) {
var filterOption = jQuery(".filter-option");
filterOption.css("display", "none");
var providers = [
[
"Company ID",
"Provider Name",
"Address 1",
"Address 2",
"City",
"State/Province",
"Zip",
"Country",
"Phone",
"Web Site",
"Accreditation Area",
"Federal Tax ID",
"Program",
"Program Focus",
"Age Group/Special Population",
"Outcome",
"Expiration Date",
"Survey End Date",
"Temporary Expiration Date"
],
];
// Loop over the returned locations.
jQuery.each(response, function (index) {
provider = response[index];
var filterOptions =
provider.program +
"," +
provider.program_focus +
"," +
provider.age_group;
const filterOptionsArray = filterOptions.split(",");
// Properly display the filter option if it is available in the provider information
filterOptionsArray.forEach((filterOptionStr) => {
jQuery(".filter-option").each(function () {
if (filterOptionStr && jQuery(this).text().trim() == filterOptionStr.trim()) {
jQuery(this).css("display", "block");
}
});
});
// hide or display the filter titles if no filter option is displayed in it's category
jQuery(".filter-title-option").each(function () {
var shouldHide = true;
jQuery(this)
.next()
.find(".filter-option")
.each(function () {
if (jQuery(this).css("display") !== "none") {
shouldHide = false;
}
});
jQuery(this).css("display", shouldHide ? "none" : "flex");
});
provider.programList.forEach((program) => {
providers.push([
provider.companyNumber,
provider.store,
provider.address,
provider.address2,
provider.city,
provider.state,
provider.zip,
provider.country,
provider.phone,
provider.website,
provider.accredArea,
provider.federalTaxID,
program.program ? program.program[0] : "",
program.programFocus ? program.programFocus[0] : "",
program.ageGroupSpecialPop ? program.ageGroupSpecialPop[0] : "",
program.decision ? program.decision[0] : "",
program.expirationDate ? program.expirationDate[0] : "",
program.surveyEndDate ? program.surveyEndDate[0] : "",
program.tempExpirationDate ? program.tempExpirationDate[0] : ""
]);
});
});
if (providers.length > 0) {
jQuery("#export-providers").on("click", function () {
exportToCsv("export.csv", providers);
});
}
}
}
});
// Update the filter button to display the proper number of applied terms
function updateFilterAppliedCount() {
var filtersAppliedCount = 0;
jQuery(".filter-option").each(function() {
if (jQuery(this).children().children("input").is(":checked")){
filtersAppliedCount++;
}
});
if (filtersAppliedCount > 0){
jQuery(".filter-button-count").text("("+filtersAppliedCount+")");
} else {
jQuery(".filter-button-count").text("");
}
}
// Function to uncheck all of the currently aplied filter options
function clearFilters(e) {
jQuery(".filter-option").each(function() {
if (jQuery(this).children().children("input").is(":checked")){
jQuery(this).children().children("input").prop('checked', false);
}
});
updateFilterAppliedCount();
e.preventDefault();
}
// Function to open or close the panel
function openPanel() {
const providerSearchInput = document.getElementById("wpsl-search-input").value
const providerSearchInputError = document.querySelector("#enter-location-error");
window.scroll({
top: 300,
behavior: "smooth"
});
if (providerSearchInput === '') {
providerSearchInputError.innerHTML = 'Please enter a location first
'
providerSearchInputError.style.display="block";
}
else if (providerSearchInput.match(/[|;$%'"@<>()\\+]+/) ) {
providerSearchInputError.innerHTML = 'The following characters are not allowed | ; $ % " < > ( ) + \ @';
providerSearchInputError.style.display="block";
} else {
providerSearchInputError.style.display="none";
var panel = document.getElementById("filterProviderPanel");
var header = document.getElementById("mobile-header");
if (panel.style.bottom === "-300px") {
panel.style.bottom = "0px";
panel.style.height = "100%";
header.style.display = "none";
} else {
panel.style.bottom = "-300px";
panel.style.height = "0px";
header.style.display = "block";
}
}
updateFilterAppliedCount();
}
// Export a list of providers in a csv file
function exportToCsv(filename, rows) {
var processRow = function (row) {
var finalVal = "";
for (var j = 0; j < row.length; j++) {
var innerValue = row[j] === null ? "" : row[j].toString();
if (row[j] instanceof Date) {
innerValue = row[j].toLocaleString();
}
var result = innerValue.replace(/"/g, '""');
if (result.search(/("|,|\n)/g) >= 0) result = '"' + result + '"';
if (j > 0) finalVal += ",";
finalVal += result;
}
return finalVal + "\n";
};
var csvFile = "";
for (var i = 0; i < rows.length; i++) {
csvFile += processRow(rows[i]);
}
var blob = new Blob([csvFile], { type: "text/csv;charset=utf-8;" });
if (navigator.msSaveBlob) {
// IE 10+
navigator.msSaveBlob(blob, filename);
} else {
var link = document.createElement("a");
if (link.download !== undefined) {
// feature detection
// Browsers that support HTML5 download attribute
var url = URL.createObjectURL(blob);
link.setAttribute("href", url);
link.setAttribute("download", filename);
link.style.visibility = "hidden";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
}
}
;
// Function to open or close locations accordion
function toggleAllLocations() {
var allLocations = document.getElementById("location-expand-hidden");
var isDisplayed = allLocations.style.display === "none";
allLocations.style.display = isDisplayed ? "block" : "none";
var expandLocationsBtn = document.getElementById("expand-locations");
expandLocationsBtn.textContent = isDisplayed ? "Collapse all locations" : "Reveal all locations";
}
// Function to open or close the programs accordion
function toggleAllPrograms() {
var allPrograms = document.getElementById("program-expand-hidden");
var isDisplayed = allPrograms.style.display === "none";
allPrograms.style.display = isDisplayed ? "block" : "none";
var expandProgramsBtn = document.getElementById("expand-programs");
expandProgramsBtn.textContent = isDisplayed ? "Collapse all programs" : "Reveal all programs";
}
// Add aria label to reads the newletter's title
jQuery( document ).ready(function() {
jQuery(".newsletter-button").each(function () {
var text = jQuery(this).closest(".kt-blocks-post-grid-item-inner").find(".entry-title").text();
jQuery(this).attr("aria-label", text);
});
});
// add collapsible behavior to the filter options
jQuery( document ).ready(function() {
var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
var icon = this.childNodes[3];
if (content.style.display === "block") {
content.style.display = "none";
icon.classList.remove("dashicons-arrow-up-alt2");
icon.classList.add("dashicons-arrow-down-alt2");
} else {
content.style.display = "block";
icon.classList.remove("dashicons-arrow-down-alt2");
icon.classList.add("dashicons-arrow-up-alt2");
}
});
coll[i].addEventListener("keypress", function(event) {
if (event.key === "Enter") {
event.preventDefault();
this.click();
}
});
}
});
// set Radius dropdown tabindex and behaviours
jQuery( document ).ready(function() {
var drowpdownIcon = jQuery(".provider-dropdown-icon");
jQuery("#wpsl-radius-dropdown").focus(function() {
if (drowpdownIcon) {
drowpdownIcon.addClass("dashicons-arrow-up");
drowpdownIcon.removeClass("dashicons-arrow-down");
}
});
jQuery("#wpsl-radius-dropdown").change(function() {
if (drowpdownIcon) {
drowpdownIcon.removeClass("dashicons-arrow-up");
drowpdownIcon.addClass("dashicons-arrow-down");
}
});
jQuery("#wpsl-radius-dropdown-group").blur(function() {
if (drowpdownIcon) {
drowpdownIcon.removeClass("dashicons-arrow-up");
drowpdownIcon.addClass("dashicons-arrow-down");
}
});
jQuery("#wpsl-radius-dropdown").blur(function() {
if (drowpdownIcon) {
drowpdownIcon.removeClass("dashicons-arrow-up");
drowpdownIcon.addClass("dashicons-arrow-down");
}
});
jQuery("#wpsl-search-btn").focus(function() {
jQuery(".wpsl-dropdown").removeClass("wpsl-active");
jQuery(".wpsl-selected-item").next().find("li").attr( 'tabIndex', -1 )
});
jQuery("#wpsl-search-provider").focus(function() {
jQuery(".wpsl-dropdown").removeClass("wpsl-active");
jQuery(".wpsl-selected-item").next().find("li").attr( 'tabIndex', -1 )
});
jQuery(".wpsl-selected-item").next().find("ul").blur(function() {
jQuery(".wpsl-selected-item").next().find("li").attr( 'tabIndex', -1 )
});
if (document.getElementById("wpsl-radius-dropdown-group")) {
document.getElementById("wpsl-radius-dropdown-group").addEventListener("keypress", function(event) {
if (event.key === "Enter") {
if (jQuery(this).children().hasClass("wpsl-active")){
jQuery("#wpsl-radius-dropdown").click();
jQuery(".wpsl-selected-item").next().find("li").attr( 'tabIndex', -1 )
} else {
jQuery(".wpsl-selected-item").next().find("li").attr( 'tabIndex', 0 )
jQuery("#wpsl-radius-dropdown").click();
jQuery(".wpsl-selected-item").next().find("li").each(function() {
this.addEventListener("keypress", function(event) {
if (event.key === "Enter") {
jQuery(".wpsl-selected-item").next().find("li").attr( 'tabIndex', -1 )
jQuery(this).click();
jQuery("#wpsl-search-provider").focus();
jQuery("#wpsl-radius-dropdown").click();
}
});
});
}
}
});
}
});
/* Sets the mega-menu behaviours */
jQuery( document ).ready(function() {
jQuery(document).click(function(event) {
//Hide the menus if visible
if (!jQuery(event.target).hasClass("nav-drop-title-wrap") && !jQuery(event.target).hasClass("kadence-svg-icon")) {
jQuery(".kadence-menu-mega-enabled").find(".kadence-svg-iconset").removeClass("menu-icon-active");
jQuery(".kadence-menu-mega-enabled").removeClass("menu-item--toggled-on");
}
});
jQuery(".kadence-menu-mega-enabled").on( "mouseenter", function(event) {
jQuery(this).find("ul").first().css( "display", "none" );
});
var SUBMENUS = document.querySelectorAll( '.menu ul' );
for ( let i = 0; i < SUBMENUS.length; i++ ) {
var parentMenuItem = SUBMENUS[ i ].parentNode;
parentMenuItem.addEventListener( 'mouseleave', function( e ) {
e.preventDefault();
e.stopPropagation();
}, true);
parentMenuItem.addEventListener( 'mouseout', function( e ) {
e.preventDefault();
e.stopPropagation();
}, true);
parentMenuItem.addEventListener( 'mouseenter', function( e ) {
e.preventDefault();
e.stopPropagation();
}, true);
parentMenuItem.addEventListener( 'mouseover', function( e ) {
if ( this.classList.contains("menu-item--toggled-on")) {
e.preventDefault();
e.stopPropagation();
}
}, true);
}
jQuery(".kadence-menu-mega-enabled").on("click", function(event) {
if (jQuery(event.target).hasClass("nav-drop-title-wrap") || jQuery(event.target).hasClass("kadence-svg-icon")) {
var submenu = jQuery(this)
var menuDisplay = submenu.find("ul").first().css('display');
submenu.find("ul").first().css( "display", menuDisplay === "none" ? "grid" : "none");
if (jQuery(this).find(".kadence-svg-iconset").hasClass("menu-icon-active")) {
jQuery(this).find(".kadence-svg-iconset").removeClass("menu-icon-active");
jQuery(this).removeClass("menu-item--toggled-on");
} else {
jQuery(".kadence-menu-mega-enabled").find(".kadence-svg-iconset").removeClass("menu-icon-active");
jQuery(".kadence-menu-mega-enabled").removeClass("menu-item--toggled-on");
jQuery(this).find(".kadence-svg-iconset").addClass("menu-icon-active");
jQuery(this).addClass("menu-item--toggled-on");
}
} else {
event.stopPropagation()
}
});
});
jQuery( document ).ready(function() {
jQuery("#user_pass0").attr("autocomplete", "off");
jQuery("#user_login0").attr("autocomplete", "off");
});;
!function(){"use strict";window.kadence={initOutlineToggle:function(){document.body.addEventListener("keydown",(function(){document.body.classList.remove("hide-focus-outline")})),document.body.addEventListener("mousedown",(function(){document.body.classList.add("hide-focus-outline")}))},getOffset:function(e){if(e instanceof HTMLElement){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}return{top:null,left:null}},findParents:function(e,t){var n=[];return function e(o){var a=o.parentNode;a instanceof HTMLElement&&(a.matches(t)&&n.push(a),e(a))}(e),n},toggleAttribute:function(e,t,n,o){void 0===n&&(n=!0),void 0===o&&(o=!1),e.getAttribute(t)!==n?e.setAttribute(t,n):e.setAttribute(t,o)},initNavToggleSubmenus:function(){var e=document.querySelectorAll(".nav--toggle-sub");if(e.length)for(let t=0;t=r))return l();u=h(s)}}function l(){f=!0}function d(){u&&cancelAnimationFrame(u),f=!(u=c=0)}return{start:function(n){n||d(),o=e()-(n?c*t:0),f=!1,u=h(s)},rewind:function(){o=e(),c=0,i&&i(c)},pause:l,cancel:d,set:function(n){t=n},isPaused:function(){return f}}}function s(n){var t=n;return{set:function(n){t=n},is:function(n){return b(y(n),t)}}}var n="Arrow",Bn=n+"Left",Hn=n+"Right",t=n+"Up",n=n+"Down",Jn="ttb",l={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[t,Hn],ArrowRight:[n,Bn]};var Z="role",$="tabindex",i="aria-",Kn=i+"controls",Vn=i+"current",Qn=i+"selected",nn=i+"label",Zn=i+"labelledby",$n=i+"hidden",nt=i+"orientation",tt=i+"roledescription",it=i+"live",rt=i+"busy",ot=i+"atomic",ut=[Z,$,"disabled",Kn,Vn,nn,Zn,$n,nt,tt],i=yn+"__",et=yn,ct=i+"track",ft=i+"list",at=i+"slide",st=at+"--clone",lt=at+"__container",dt=i+"arrows",vt=i+"arrow",ht=vt+"--prev",pt=vt+"--next",gt=i+"pagination",mt=gt+"__page",yt=i+"progress"+"__bar",bt=i+"toggle",wt=i+"sr",tn="is-active",xt="is-prev",kt="is-next",St="is-visible",Et="is-loading",Lt="is-focus-in",Ot="is-overflow",At=[tn,St,xt,kt,Et,Lt,Ot];var _t="touchstart mousedown",zt="touchmove mousemove",Dt="touchend touchcancel mouseup click";var Mt="slide",Pt="loop",It="fade";function Rt(o,r,t,u){var e,n=Q(o),i=n.on,c=n.emit,f=n.bind,a=o.Components,s=o.root,l=o.options,d=l.isNavigation,v=l.updateOnMove,h=l.i18n,p=l.pagination,g=l.slideFocus,m=a.Direction.resolve,y=z(u,"style"),b=z(u,nn),w=-1u.perPage}}},Layout:function(t,n,i){var r,o,u,e=(a=Q(t)).on,c=a.bind,f=a.emit,a=n.Slides,s=n.Direction.resolve,l=(n=n.Elements).root,d=n.track,v=n.list,h=a.getAt,p=a.style;function g(){r=i.direction===Jn,_(l,"maxWidth",W(i.width)),_(d,s("paddingLeft"),y(!1)),_(d,s("paddingRight"),y(!0)),m(!0)}function m(n){var t=N(l);!n&&o.width===t.width&&o.height===t.height||(_(d,"height",function(){var n="";r&&(bn(n=b(),"height or heightRatio is missing."),n="calc("+n+" - "+y(!1)+" - "+y(!0)+")");return n}()),p(s("marginRight"),W(i.gap)),p("width",i.autoWidth?null:W(i.fixedWidth)||(r?"":w())),p("height",W(i.fixedHeight)||(r?i.autoHeight?null:w():b()),!0),o=t,f(Nn),u!==(u=O())&&(A(l,Ot,u),f("overflow",u)))}function y(n){var t=i.padding,n=s(n?"right":"left");return t&&W(t[n]||(un(t)?0:t))||"0px"}function b(){return W(i.height||N(v).width*i.heightRatio)}function w(){var n=W(i.gap);return"calc((100%"+(n&&" + "+n)+")/"+(i.perPage||1)+(n&&" - "+n)+")"}function x(){return N(v)[s("width")]}function k(n,t){n=h(n||0);return n?N(n.slide)[s("width")]+(t?0:L()):0}function S(n,t){var i,n=h(n);return n?(n=N(n.slide)[s("right")],i=N(v)[s("left")],U(n-i)+(t?0:L())):0}function E(n){return S(t.length-1)-S(0)+k(0,n)}function L(){var n=h(0);return n&&parseFloat(_(n.slide,s("marginRight")))||0}function O(){return t.is(It)||E(!0)>x()}return{mount:function(){var n,t,i;g(),c(window,"resize load",(n=R(f,jn),i=qn(t||0,n,null,1),function(){i.isPaused()&&i.start()})),e([K,J],g),e(jn,m)},resize:m,listSize:x,slideSize:k,sliderSize:E,totalSize:S,getPadding:function(n){return parseFloat(_(d,s("padding"+(n?"Right":"Left"))))||0},isOverflow:O}},Clones:function(c,i,f){var t,r=Q(c),n=r.on,a=i.Elements,s=i.Slides,o=i.Direction.resolve,l=[];function u(){if(n(J,d),n([K,jn],v),t=h()){var o=t,u=s.get().slice(),e=u.length;if(e){for(;u.lengthc.Controller.getEnd(),(t<0||i)&&(n=w(n,i)))}return n}(n),_(p,"transform","translate"+v("X")+"("+t+"px)"),n!==t&&f(Un))}function w(n,t){var i=n-L(t),r=d();return n-=h(r*(kn(U(i)/r)||1))*(t?1:-1)}function x(){b(E(),!0),e.cancel()}function k(n){for(var t=c.Slides.get(),i=0,r=1/0,o=0;oh(L(!0));return i||n},reposition:m}},Controller:function(o,u,e){var c,f,a,s,n=Q(o),t=n.on,i=n.emit,l=u.Move,d=l.getPosition,r=l.getLimit,v=l.toPosition,h=(n=u.Slides).isEnough,p=n.getLength,g=e.omitEnd,m=o.is(Pt),y=o.is(Mt),b=R(L,!1),w=R(L,!0),x=e.start||0,k=x;function S(){f=p(!0),a=e.perMove,s=e.perPage,c=_();var n=q(x,0,g?c:f-1);n!==x&&(x=n,l.reposition())}function E(){c!==_()&&i("ei")}function L(n,t){var i=a||(P()?1:s),i=O(x+i*(n?-1:1),x,!(a||P()));return-1===i&&y&&!Sn(d(),r(!n),1)?n?0:c:t?i:A(i)}function O(n,t,i){var r;return h()||P()?((r=function(n){if(y&&"move"===e.trimSpace&&n!==x)for(var t=d();t===v(n,!0)&&En(n,0,o.length-1,!e.rewind);)n])(\d+)?/)||[],i=r[1],r=r[2],"+"===i||"-"===i?t=O(x+ +(""+i+(+r||1)),x):">"===i?t=r?z(+r):b(!0):"<"===i&&(t=w(!0))):t=m?n:q(n,0,c)}return t}(n)))&&(t||r!==x)&&(M(r),l.move(n,r,k,i))},scroll:function(n,t,i,r){u.Scroll.scroll(n,t,i,function(){var n=A(l.toIndex(d()));M(g?Y(n,c):n),r&&r()})},getNext:b,getPrev:w,getAdjacent:L,getEnd:_,setIndex:M,getIndex:function(n){return n?k:x},toIndex:z,toPage:D,toDest:function(n){return n=l.toIndex(n),y?q(n,0,c):n},hasFocus:P,isBusy:I}},Arrows:function(o,n,t){var i,r,u=Q(o),e=u.on,c=u.bind,f=u.emit,a=t.classes,s=t.i18n,l=n.Elements,d=n.Controller,v=l.arrows,h=l.track,p=v,g=l.prev,m=l.next,y={};function b(){var n=t.arrows;!n||g&&m||(p=v||j("div",a.arrows),g=S(!0),m=S(!1),i=!0,L(p,[g,m]),v||O(p,h)),g&&m&&(an(y,{prev:g,next:m}),ln(p,n?"":"none"),M(p,r=dt+"--"+t.direction),n&&(e([B,Dn,J,V,"ei"],E),c(m,"click",R(k,">")),c(g,"click",R(k,"<")),E(),I([g,m],Kn,h.id),f("arrows:mounted",g,m))),e(K,w)}function w(){x(),b()}function x(){u.destroy(),X(p,r),i?(T(v?[g,m]:p),g=m=null):P([g,m],ut)}function k(n){d.go(n,!0)}function S(n){return hn('