1(function($){$(document).ready(function(){$(document).on('click','.js-open-calendly',function(e){e.preventDefault() 2if(typeof Calendly==='undefined'){window.open($(this).attr('href')) 3return} 4var calendlyLink=$(this).attr('href') 5var prefill={} 6if(typeof currentUser!=='undefined'&¤tUser!==null){prefill={name:currentUser.data.firstName+' '+currentUser.data.lastName,email:currentUser.data.email,}} 7Calendly.initPopupWidget({url:calendlyLink,prefill:prefill})})}) 8function isCalendlyEvent(e){return(e.origin==='https://calendly.com'&&e.data.event&&e.data.event.indexOf('calendly.')===0)} 9function logCallBooked(payload){if(typeof F7HCalendly==='undefined'||!F7HCalendly.enabled){return} 10if(!payload||!payload.event||!payload.invitee){return} 11var activity='-' 12var location='-' 13if(typeof adventureInfo!=='undefined'){if(adventureInfo.activity){activity=Array.isArray(adventureInfo.activity)?adventureInfo.activity.join(', ')||'-':adventureInfo.activity} 14if(adventureInfo.location){location=Array.isArray(adventureInfo.location)?adventureInfo.location.join(', ')||'-':adventureInfo.location}} 15var data={action:'f7h_log_call_booked',nonce:F7HCalendly.nonce,event_uri:payload.event.uri,invitee_uri:payload.invitee.uri,url:window.location.href,path:window.location.pathname,activity:activity,location:location,} 16if(typeof adventureInfo!=='undefined'){data.adventure_id=adventureInfo.adventureId||'' 17data.title=adventureInfo.title||'' 18data.price=adventureInfo.price||'' 19data.lead_value=typeof adventureInfo.leadValue==='number'?adventureInfo.leadValue:'' 20data.inquiry_value=typeof adventureInfo.inquiryValue==='number'?adventureInfo.inquiryValue:'' 21data.call_value=typeof adventureInfo.callValue==='number'?adventureInfo.callValue:''} 22var params=new URLSearchParams(data).toString() 23if(navigator.sendBeacon){var blob=new Blob([params],{type:'application/x-www-form-urlencoded'}) 24if(navigator.sendBeacon(F7HCalendly.ajaxUrl,blob)){return}} 25if(typeof fetch==='function'){fetch(F7HCalendly.ajaxUrl,{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:params,keepalive:!0,})}else{jQuery.ajax({url:F7HCalendly.ajaxUrl,method:'POST',data:data,})}} 26window.addEventListener('message',function(e){if(isCalendlyEvent(e)){window.dataLayer=window.dataLayer||[] 27if(e.data.event==='calendly.event_type_viewed'){dataLayer.push({event:'BookACallClicked'})}else if(e.data.event==='calendly.date_and_time_selected'){dataLayer.push({event:'BookACallTimeSelected'})}else if(e.data.event==='calendly.event_scheduled'){var callValue=(typeof adventureInfo!=='undefined'&&typeof adventureInfo.callValue==='number')?adventureInfo.callValue:null 28if(typeof f7hTracking!=='undefined'&&typeof f7hTracking.sendFacebookEvent==='function'){if(typeof adventureInfo!=='undefined'&&typeof adventureInfo.inquiryValue!=='undefined'){f7hTracking.sendFacebookEvent(null,null,'Purchase',callValue);f7hTracking.sendFacebookEvent(null,null,'Contact',callValue);f7hTracking.sendFacebookEvent(null,null,'Call',callValue)}} 29if(callValue!==null){dataLayer.push({event:'CallBooked',inquiryValue:callValue,callValue:callValue})}else{dataLayer.push({event:'CallBooked'})} 30logCallBooked(e.data.payload)}}})})(jQuery)
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.