{var g_cbebloader_called="defined!",g_mbk=void 0,g_mpt=void 0,g_cbeb_md=void 0,g_db=void 0,g_expectCache=!1,g_allow_google_map=void 0,g_bespoke_google_api_key=void 0,read_cookie=e=>{var o=document.cookie.match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)");return o&&o.pop()||""};function initialise_msp_login_details(e){void 0!==e&&void 0!==e.memberInfo?((g_cbeb_md={}).u=e.memberInfo.email,g_cbeb_md.f=e.memberInfo.firstName,g_cbeb_md.l=e.memberInfo.lastName,g_cbeb_md.msp_key=e.memberInfo.id,g_cbeb_md.m="memberspace"):void 0!==e?console.log("Unusual member info:",e):console.log("Undefined member_info")}function CbDbCachePrefetch(e,o){var t="https://cdn.communitybox.co/directory/"+e+"/"+o+"/db-"+o,r=new XMLHttpRequest;r.open("GET",t,!0),r.onload=function(){4===r.readyState&&200===r.status?r.responseText&&(g_db=JSON.parse(r.responseText)):console.log(`CbDbCachePrefetch - onload - unexpected status ${r.status}`)},r.onerror=function(){console.error("An error occurred during CbDbCachePrefetch")},r.send()}function loadCbResources(e){var o={box:e,origin:window.location.href},t=new XMLHttpRequest;t.open("POST","https://cfapi.communitybox.co/get/embed/bootstrap/data",!0),t.setRequestHeader("Content-type","application/json; charset=utf-8"),t.onload=function(){if(4===t.readyState&&200===t.status){var o=JSON.parse(t.responseText);if(o.hasOwnProperty("err"))console.error(o.err);else{o.cachecode?(g_expectCache=!0,CbDbCachePrefetch(e,o.cachecode)):console.log("No cache-code for box ",e),g_allow_google_map=o.allow_google_map,g_mbk=o.mapbox_api_key||atob("cGsuZXlKMUlqb2ljbTlzWVc1a1pqY2lMQ0poSWpvaVkyczRjMnM1Tnpabk1HTjZlRE5sYnpWM1lXVjVNM1Z3YXlKOS5wV0xTR0hMWFBhX3JqVGFpSzlkYW5B");var r=o.revision,i=document.createElement("script"),c=void 0,n=document.createElement("link"),s=document.createElement("link"),a=document.createElement("link"),d=document.createElement("link");if(i.src=/localhost/.test(window.location.href)?"embed.js":"https://dashboard.communitybox.co/embed/"+r+"/embed-"+r+".js",i.setAttribute("defer",""),g_bespoke_google_api_key=o.bespoke_google_api_key,void 0!==o.gmap_api_key||void 0!==o.bespoke_google_api_key){var m=o.bespoke_google_api_key||o.gmap_api_key;(c=document.createElement("script")).src="https://maps.googleapis.com/maps/api/js?key="+m+"&libraries=places,geometry",c.setAttribute("async","")}if(n.href="https://api.tiles.mapbox.com/mapbox-gl-js/v2.2.0/mapbox-gl.css",n.rel="stylesheet",s.href="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.7.0/mapbox-gl-geocoder.css",s.rel="stylesheet",void 0!==o.font_loader?a.href=o.font_loader:a.href="https://fonts.googleapis.com/css?family=Quicksand:400,500",a.rel="stylesheet",d.rel="stylesheet",d.href="https://use.fontawesome.com/releases/v5.2.0/css/all.css",d.setAttribute("crossorigin","anonymous"),d.setAttribute("integrity","sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ"),void 0!==o.custom_design_file){var b=document.createElement("link");b.rel="stylesheet",b.href=["https://cdn.communitybox.co/directory/",e,"/design/",o.custom_design_file,"/design-",o.custom_design_file,".css"].join(""),document.head.appendChild(b)}document.head.appendChild(a),document.head.appendChild(d),document.head.appendChild(i),document.head.appendChild(n),document.head.appendChild(s),void 0!==c&&document.head.appendChild(c)}}else console.log(`Unexpected network state ${t.readyState} and/or status ${t.status} during loadCbResources`),console.error(t.responseText)},t.onerror=function(){console.log("Error registered in loadCbResources")},t.send(JSON.stringify(o))}function fetchCbBoxKey(){var e=document.getElementById("communitybox-target"),o=document.querySelector("[cbeb-filter-bar]")||document.querySelector("[communitybox-search-bar]");if(e||o){var t=e&&e.getAttribute("box")||o.getAttribute("directory");if(t)return t}}function waitForCbDiv(e){var o=fetchCbBoxKey();void 0===o&&e.triesLeft>0?window.setTimeout((function(){waitForCbDiv({triesLeft:e.triesLeft-1})}),500):void 0!==o&&loadCbResources(o)}!function(){if("object"==typeof UserAccountApi&&!0===UserAccountApi.isUserAuthenticated()){const e=read_cookie("logged_in_maybe");"string"==typeof e&&e.length>0&&(g_cbeb_md={u:e,m:"member areas"})}}(),"object"==typeof Thinkific&&Thinkific.current_user&&(console.log("Found Thinkific user ",Thinkific.current_user.email),g_cbeb_md={u:Thinkific.current_user.email,m:"thinkific"}),function(){if("undefined"!=typeof MemberSpace&&!0===MemberSpace.ready)console.log("MemberSpace.ready === true"),MemberSpace.getMemberInfo&&MemberSpace.getMemberInfo()&&initialise_msp_login_details(MemberSpace.getMemberInfo());else{if("undefined"!=typeof MemberSpace&&(console.log("MemberSpace object exists but ready was false or undefined:",MemberSpace),void 0!==MemberSpace.User&&void 0!==MemberSpace.User.get&&"function"==typeof MemberSpace.User.get)){const e=MemberSpace.User.get();if(void 0!==e)return(g_cbeb_md={}).u=e.email,g_cbeb_md.f=e.firstName,g_cbeb_md.l=e.lastName,g_cbeb_md.msp_key=e.id,g_cbeb_md.m="memberspace",void console.log("Updated MemberSpace user data the old-fashioned way")}document.addEventListener("MemberSpace.member.info",(function({detail:e}){const{memberInfo:o}=e;(g_cbeb_md={}).u=o.email,g_cbeb_md.f=o.firstName,g_cbeb_md.l=o.lastName,g_cbeb_md.msp_key=o.id,g_cbeb_md.m="memberspace"}))}}(),waitForCbDiv({triesLeft:10})}