1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f0b9541d-4a9a-4ec8-bfbd-374144c517b3",e._sentryDebugIdIdentifier="sentry-dbid-f0b9541d-4a9a-4ec8-bfbd-374144c517b3")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8588],{88588:function(e,t,n){n.r(t),n.d(t,{default:function(){return CalendarInline}});var l=n(85893),i=n(67294),a=n(11163),d=n(59291),r=n(22278);let s="calendly-widget-js",o="https://assets.calendly.com/assets/external/widget.js";function CalendarInline(){let e=(0,a.useRouter)(),[t,n]=(0,i.useState)(!1),[c,u]=(0,i.useState)(!1),[m,y]=(0,i.useState)(null),g=(0,i.useRef)(null);(0,i.useEffect)(()=>{var t,l,i;if(!e.isReady)return;let a=(null===(t=e.query)||void 0===t?void 0:t.message)==="success"&&((null===(l=e.query)||void 0===l?void 0:l.lead_id)||(null===(i=e.query)||void 0===i?void 0:i.id));n(!!a)},[e.isReady,e.query]);let h=(0,i.useCallback)(()=>{let t={};try{let e=localStorage.getItem("leadFormData");t=e?JSON.parse(e):{}}catch(e){t={}}let n=new URLSearchParams;(null==t?void 0:t.name)&&n.set("name",String(t.name).trim()),(null==t?void 0:t.email)&&n.set("email",String(t.email).trim()),(null==t?void 0:t.phone)&&n.set("a1",String(t.phone).trim()),!n.get("name")&&e.query.name&&n.set("name",String(e.query.name)),!n.get("email")&&e.query.email&&n.set("email",String(e.query.email)),!n.get("phone")&&e.query.phone&&n.set("phone",String(e.query.phone));let l=(0,d.O)();for(let e of["utm_source","utm_medium","utm_campaign"])l[e]&&n.set(e,l[e]);let i=[];l.utm_content&&i.push(l.utm_content),l.gclid&&i.push("gclid:".concat(l.gclid)),l.gbraid&&i.push("gbraid:".concat(l.gbraid)),l.wbraid&&i.push("wbraid:".concat(l.wbraid)),i.length&&n.set("utm_content",i.join("|"));let a=(0,r.o)(e.query);a?n.set("utm_term","lead:".concat(a)):l.utm_term&&n.set("utm_term",l.utm_term);let s="https://calendly.com/neelesh-rangwani-wishup/30min",o=n.toString().replace(/\+/g,"%20");return o?"".concat(s,"?").concat(o):s},[e.query]);async function renderInsideContainer(e){var t;if(!g.current)return;if(g.current.innerHTML="",null===(t=window.Calendly)||void 0===t?void 0:t.initInlineWidget)try{window.Calendly.initInlineWidget({url:e,parentElement:g.current});return}catch(e){}let n=document.createElement("div");n.className="calendly-inline-widget",n.setAttribute("data-url",e),n.style.minWidth="320px",n.style.height="100%",g.current.appendChild(n);let l=document.createElement("script");l.src=o,l.async=!0,document.body.appendChild(l)}let closeModal=async()=>{n(!1);let{pathname:t,query:l}=e,i={...l};delete i.lead_id,delete i.id,await e.replace({pathname:t,query:i},void 0,{shallow:!0})};return((0,i.useEffect)(()=>{if(!t){g.current&&(g.current.innerHTML=""),u(!1),y(null);return}u(!0),y(null);let e=h(),n=!0,l=g.current,onCalendlyMessage=e=>{let t=e&&e.data||{};"string"==typeof(null==t?void 0:t.event)&&t.event.startsWith("calendly.")&&("calendly.profile_page_viewed"===t.event||"calendly.event_type_viewed"===t.event||"calendly.date_and_time_selected"===t.event)&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"meeting_funnel_step",step:t.event.replace("calendly.",""),page_path:window.location.pathname}))};return window.addEventListener("message",onCalendlyMessage),new Promise((e,t)=>{if(window.Calendly)return e();let n=document.getElementById(s);if(n){let wait=()=>{if(window.Calendly)return e();setTimeout(wait,100)};return wait()}let l=document.createElement("script");l.id=s,l.src=o,l.async=!0,l.onload=()=>e(),l.onerror=()=>t(Error("Failed to load Calendly script")),document.body.appendChild(l)}).then(()=>{n&&(renderInsideContainer(e),n&&u(!1))}).catch(e=>{n&&(y("Unable to load scheduler. Please try again later."),u(!1))}),()=>{n=!1,window.removeEventListener("message",onCalendlyMessage),l&&(l.innerHTML="")}},[h,t]),t)?(0,l.jsx)("div",{className:"modal show d-flex justify-content-center",tabIndex:-1,role:"dialog",id:"schedule_modal_global",style:{zIndex:2e3},onClick:closeModal,children:(0,l.jsx)("div",{className:"modal-dialog modal-xl modal-dialog-centered",role:"document",style:{width:1050,borderRadius:16,maxWidth:"100vw"},children:(0,l.jsxs)("div",{className:"modal-content",onClick:e=>e.stopPropagation(),style:{height:700},children:[(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"1rem"},children:[(0,l.jsx)("p",{className:"f-28 fw-600 blue-text m-0",children:"Schedule a call now"}),(0,l.jsx)("button",{onClick:closeModal,className:"btn btn-sm btn-light",style:{fontSize:14},children:"â"})]}),(0,l.jsxs)("div",{style:{padding:0,height:"calc(100% - 56px)"},children:[c?(0,l.jsx)("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:"Loading schedulerâ¦"}):m?(0,l.jsx)("div",{style:{padding:16,color:"#b00020",textAlign:"center"},children:m}):null,(0,l.jsx)("div",{ref:g,style:{minWidth:275,height:"100%"}})]})]})})}):null}},22278:function(e,t,n){n.d(t,{o:function(){return resolveLeadId}});function resolveLeadId(e){if(e){var t;let n=null!==(t=e.lead_id)&&void 0!==t?t:e.id;if(n)return String(n)}if("undefined"==typeof document)return null;let n=document.cookie.split("; ").find(e=>e.startsWith("post_lead="));if(!n)return null;try{let e=decodeURIComponent(n.split("=")[1]),t=JSON.parse(e);if(null==t?void 0:t.id)return String(t.id)}catch(e){}return null}}}]);
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.