!function(){"use strict";const t={RECEIVED_ANALYTICS:"HS_CTA_PARENT_RECEIVED_ANALYTICS",DEVICE_TYPE:"HS_CTA_PARENT_DEVICE_TYPE",PROXY_ANALYTICS_FN_CALLBACK:"HS_CTA_PARENT_PROXY_ANALYTICS_FN",INIT:"HS_CTA_PARENT_INIT",SHOWING_CTA:"HS_CTA_SHOWING_CTA",SEND_EXTRACTED_STYLES:"HS_SEND_EXTRACTED_STYLES",STARTED:"HS_CTA_STARTED",NAVIGATE_PAGE:"HS_CTA_NAVIGATE_PAGE",CLICK_EVENT:"HS_CTA_CLICK_EVENT",CLOSE_INTERACTIVE:"HS_CTA_CLOSE_INTERACTIVE",HAS_CLOSED:"HS_CTA_HAS_CLOSED",NEW_HEIGHT:"HS_CTA_NEW_HEIGHT",DISPLAY_CALL_TO_ACTION:"HS_DISPLAY_CALL_TO_ACTION",PROXY_ANALYTICS:"HS_CTA_PROXY_ANALYTICS",PROXY_ANALYTICS_FN:"HS_CTA_PROXY_ANALYTICS_FN",SEND_FORM_DEFINITION:"HS_SEND_FORM_DEFINITION",SEND_CTA_CONFIG:"HS_SEND_CTA_CONFIG",SEND_EMBED_CONTEXT:"HS_SEND_EMBED_CONTEXT",RECEIVE_FILTERED_STYLESHEETS:"RECEIVE_FILTERED_STYLESHEETS",SEND_STYLESHEETS:"SEND_STYLESHEETS",RENDER_RECAPTCHA:"RENDER_RECAPTCHA",EXECUTE_RECAPTCHA:"EXECUTE_RECAPTCHA",RESET_RECAPTCHA:"RESET_RECAPTCHA",RECAPTCHA_SUCCESS:"RECAPTCHA_SUCCESS",RECAPTCHA_EXPIRED:"RECAPTCHA_EXPIRED",TRIGGER_CTA:"HS_CTA_TRIGGER_CTA",CTA_FORM_SUBMITTED:"HS_CTA_FORM_SUBMITTED",V4_FORM_READY:"HS_V4_FORM_READY",SEND_FORM_EXTRA_SUBMISSION_METADATA:"HS_SEND_FORM_EXTRA_SUBMISSION_METADATA",SEND_FORM_SUBMISSION_SUCCESS_INFO:"HS_SEND_FORM_SUBMISSION_SUCCESS_INFO",SEND_FORM_SUBMISSION_SUCCESS:"HS_SEND_FORM_SUBMISSION_SUCCESS",SEND_FORM_SUBMISSION_FAILED:"HS_SEND_FORM_SUBMISSION_FAILED",SEND_FORM_INTERACTION_NAVIGATE:"HS_SEND_FORM_INTERACTION_NAVIGATE",GET_FORM_FIELD_VALUES:"HS_GET_FORM_FIELD_VALUES",SEND_FORM_FIELD_VALUES:"HS_SEND_FORM_FIELD_VALUES",GET_FIELD_VALUE:"HS_GET_FIELD_VALUE",SET_FIELD_VALUE:"HS_SET_FIELD_VALUE",SEND_FIELD_VALUE:"HS_SEND_FIELD_VALUE",MEETINGS_BOOKING_SUCCESS:"HS_CTA_MEETINGS_BOOKING_SUCCESS"};function e(...t){if(window.location.search.indexOf("hs_debug_interactive")>-1||window.location.host.includes("local.hsappstatic")){console.log("[web-interactives-embed]",...t);window.location.search.indexOf("hs_is_selenium")>-1&&console.log(...[...t].map((t=>JSON.stringify(t))))}}class i{constructor(){this.listeners=new Map}on(t,e){if(!this.listeners.has(t)){this.listeners.set(t,[e]);return}const i=this.listeners.get(t);this.listeners.set(t,[...i,e])}off(t){this.listeners.delete(t)}emit(t,e){const i=this.listeners.get(t);i&&i.length&&i.forEach((t=>t(e)))}reset(){this.listeners=new Map}}function s(){return new i}const n=(...t)=>{e("[GlobalIframeCommunication]",...t)};class o{constructor(){this.iframeCommunicators=new Map;this.eventEmitter=s();this.reset=()=>{this.eventEmitter.reset();this.iframeCommunicators=new Map}}registerHandler(t,e){this.eventEmitter.on(t,e)}registerHandlers(t){n("Registering handlers",t);Object.keys(t).forEach((e=>{const i=e,s=t[i];s&&this.registerHandler(i,s)}))}registerCommunicator(t,e){n("Registering communicator",e);const i=this.iframeCommunicators.get(e)||[];this.iframeCommunicators.set(e,[...i,t])}removeCommunicator(t){n("Removing Iframe Communicator from GlobalCommunication: ",t);this.iframeCommunicators.delete(t)}emit(t,e){n("Emitting event",{event:t,messagePayload:e});this.eventEmitter.emit(t,e)}broadcast(t,e){const i=this.iframeCommunicators.get(t);if(i){n("Broadcasting",i);i.forEach((t=>{t.sendMessage(e)}))}else n("Cannot find communcators array, not broadcasting",t,e)}broadcastAll(t){n("Broadcasting",t,"to all",this.iframeCommunicators);for(const[e,i]of this.iframeCommunicators)this.broadcast(e,t)}}new o;class r{constructor(t,e){this.listeners=new Set;this.batching=!1;this.queue=[];this.subscribe=t=>{this.listeners.add(t);let e=()=>{};this.options&&this.options.onSubscribe&&(e=this.options.onSubscribe(t,this));return()=>{this.listeners.delete(t);e()}};this.setState=t=>{const e=this.state;this.options&&this.options.updateFn?this.state=this.options.updateFn(e)(t):this.state=t(e);if(this.state!==e){this.queue.push((()=>{this.listeners.forEach((t=>t(this.state,e)));this.options&&this.options.onUpdate&&this.options.onUpdate(this.state,e)}));this._flush()}};this._flush=()=>{if(!this.batching){this.queue.forEach((t=>t()));this.queue=[]}};this.batch=t=>{this.batching=!0;t();this.batching=!1;this._flush()};this.state=t;this.options=e}}class a{constructor(){this.storage=[]}enqueue(t){this.storage.push(t)}dequeue(){return this.storage.shift()}peek(){return this.storage[0]}size(){return this.storage.length}}function l(){return new a}const c="addIdentityListener";class h{constructor({applicationController:e}){this.trackerCallbacks=l();this.identityListenerCallbacks=l();this.parentAnalytics=null;this.handleAnalyticsRecieved=t=>{this.parentAnalytics=t;this.flushQueues()};this.handlePushToHSQ=e=>{if("function"!=typeof e){Array.isArray(e)&&(e[0]===c&&"function"==typeof e[1]?this.identityListenerCallbacks.enqueue(e[1]):this.applicationController.sendMessage({type:t.PROXY_ANALYTICS,payload:{analytics:e}}));this.parentAnalytics&&this.flushQueues()}else this.trackerCallbacks.enqueue(e)};window._hsq=window._hsq||[];this.applicationController=e;this.registerAnalyticsHandler();this.proxyHsq()}registerAnalyticsHandler(){this.applicationController.registerHandler(t.RECEIVED_ANALYTICS,this.handleAnalyticsRecieved)}flushQueues(){if(this.parentAnalytics){do{const t=this.trackerCallbacks.dequeue();t&&t(this.tracker)}while(this.trackerCallbacks.peek());do{const t=this.identityListenerCallbacks.dequeue();t&&t(this.parentAnalytics.hstc,this.parentAnalytics.hssc,this.parentAnalytics.hsfp)}while(this.identityListenerCallbacks.peek())}}get tracker(){return this.parentAnalytics?{path:this.parentAnalytics.path,referrerPath:this.parentAnalytics.referrerPath,utk:{visitor:this.parentAnalytics.hutk,get:()=>this.parentAnalytics.hutk},pageId:this.parentAnalytics.pageId,_getFingerprint:()=>this.parentAnalytics.hsfp,canonicalUrl:this.parentAnalytics.canonicalUrl,contentType:this.parentAnalytics.contentType,session:{get:()=>this.parentAnalytics.hssc}}:null}proxyHsq(){window._hsq.push=this.handlePushToHSQ;window._hsq.forEach(this.handlePushToHSQ)}}function d(t){window.open(t,"_blank","noopener")}function u(t){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()}const p="data-container-navigation-controller";function m(){return Array.from(document.getElementsByTagName("a"))}function g(t){let e;try{e=new URL(t)}catch(t){return!1}return"http:"===e.protocol||"https:"===e.protocol||"tel:"===e.protocol||"mailto:"===e.protocol}class C{constructor({applicationController:t}){this.overrideAnchorTags=()=>{new MutationObserver((()=>{m().forEach((t=>{if(!t.hasAttribute(p)){t.setAttribute(p,"true");t.addEventListener("click",this.handleAnchorClick)}}))})).observe(document.body,{childList:!0,subtree:!0});m().forEach((t=>{t.setAttribute(p,"true");t.addEventListener("click",this.handleAnchorClick)}))};this.handleAnchorClick=t=>{t.preventDefault();if(!t.target)return;const e=t.currentTarget,i=g(e.href);this.applicationController.onLinkClick(e);if(!i)return;const s="_blank"===e.target||"blank"===e.target;this.navigatePage(e.href,s)};this.applicationController=t;u(this.overrideAnchorTags)}navigatePage(e,i=!1){i&&d(e);this.applicationController.sendMessage({type:t.NAVIGATE_PAGE,payload:{url:e,openNewTab:i}})}}function E(t){new ResizeObserver(t).observe(document.body)}class S{constructor({applicationController:e}){this.listenForResize=()=>{E((()=>this.handleResize()))};this.getNewHeight=()=>document.body.getBoundingClientRect().height;this.handleResize=()=>{this.applicationController.sendMessage({type:t.NEW_HEIGHT,payload:{height:this.getNewHeight()}})};this.applicationController=e;u(this.listenForResize)}}const y="web-interactives-external-style";class _{constructor({applicationController:t}){this.handleExtractedStyles=({extractedStyles:t})=>{let e="";for(const[i,s]of Object.entries(t.rules)){e+=`${i} { `;for(const[t,i]of Object.entries(s))e+=`${t}: ${i}; `;e+="} "}for(const[i,s]of Object.entries(t.keyframes)){e+=`@keyframes ${i} { `;for(const t of s){e+=`${t.keyText} { `;for(const[i,s]of Object.entries(t.style))e+=`${i}: ${s}; `;e+="} "}e+="} "}this.styleElement.innerHTML=e};this.applicationController=t;this.styleElement=document.getElementById(y)||document.createElement("style");this.styleElement.id=y;this.registerExternalStylesHandler();u((()=>{document.head.appendChild(this.styleElement)}))}registerExternalStylesHandler(){this.applicationController.registerHandler(t.SEND_EXTRACTED_STYLES,this.handleExtractedStyles)}}class A{constructor({ContainerResizeControllerClass:e=S}={}){this.queue=l();this.gates=[];this.gatesHydrated=!1;this.gatedCallbackQueue=[];this.eventEmitter=s();this.initPort=e=>{if(e.data.type===t.INIT){this.port=e.ports[0];this.port.onmessage=this.handleMessage;window.removeEventListener("message",this.initPort);this.flushQueue()}};this.handleMessage=t=>{const e=t.data;this.receivedMessage(e);this.eventEmitter.emit(e.type,e.payload)};this.handleIfUngated=(t,e)=>{const i=()=>{this.isUngatedFor(t)&&e()};this.gatesHydrated?i():this.gatedCallbackQueue.push(i)};this.isUngatedFor=t=>this.gates.includes(t);this.listenForPort();this.setRegisterHandlers();this.analyticsController=new h({applicationController:this});this.navigationController=new C({applicationController:this});this.resizeController=new e({applicationController:this});this.externalStylesController=new _({applicationController:this})}listenForPort(){window.addEventListener("message",this.initPort)}setGates(t=[]){this.gates=t;this.gatesHydrated=!0;this.gatedCallbackQueue.forEach((t=>t()))}sendMessage(t){this.port?this.port.postMessage(t):this.queue.enqueue(t)}fireContainerReady(){const e=this.getStartedMessagePayload();this.sendMessage({type:t.STARTED,payload:e})}navigatePage(t){this.navigationController.navigatePage(t)}setRegisterHandlers(){const t=this.registerMessageHandlers();Object.keys(t).forEach((e=>{const i=e,s=t[i];s&&this.registerHandler(i,s)}))}flushQueue(){do{const t=this.queue.dequeue();t&&this.sendMessage(t)}while(this.queue.peek())}registerHandler(t,e){this.eventEmitter.on(t,e)}receivedMessage(t){}registerMessageHandlers(){return{}}onLinkClick(t){}getStartedMessagePayload(){return{}}}const T="hubspotutk",f="__hstc",I="__hssc",b=t=>{const e=document.cookie.match(`(^|[^;]+)\\s*${t}\\s*=\\s*([^;]+)`);return e?e.pop():""},F=()=>b(T),w=()=>b(f),R=()=>b(I),N=(...t)=>{e("[models/Analytics]",...t)};class v{constructor(){this._handleFetchSucceded=t=>{this.store.setState((e=>{const i={};i.path=t.path;i.referrerPath=t.referrerPath;i.referrer="";i.analyticsPageId=t.pageId;i.hsfp=t._getFingerprint();i.canonicalUrl=t.canonicalUrl;i.contentType=t.contentType;i.pageId=v.getPageId()||t.pageId;t.session&&(i.hssc=t.session.get());if(t.utk){i.hstc=t.utk.get();i.hutk=t.utk.visitor}return Object.assign({},e,i,{isLoaded:!0})}))};window._hsq=window._hsq||[];const t={isLoaded:!1,pageUrl:window.location.href,pageTitle:window.document.title,referrer:window.document.referrer,userAgent:window.navigator.userAgent,hutk:F(),hssc:R(),hstc:w(),pageId:v.getPageId()};this.store=new r(t);this.fetchAnalytics()}fetchAnalytics(){this._analyticsQueue.push(this._handleFetchSucceded)}subscribe(t){return this.store.subscribe(t)}get analytics(){return this.store.state}track(t){N("Tracking analytics",t);this._analyticsQueue.push(t)}get _analyticsQueue(){return window._hsq}static getPageId(){const t=window.hsVars;return t&&t.analytics_page_id?t.analytics_page_id:t&&t.page_id?t.page_id:null}static getLanguage(){const t=window.hsVars;return t&&t.language?t.language:null}}new v;function O(t){const e=e=>{"Escape"===e.key&&t()};document.addEventListener("keydown",e);return()=>{document.removeEventListener("keydown",e)}}const H=(...t)=>{e("[clipboardUtils]",...t)};function M(t){return new Promise(((e,i)=>{if(navigator.clipboard)navigator.clipboard.writeText(t).then((()=>{H("Text successfully copied to clipboard");e()})).catch((t=>{H("Error copying text to clipboard:",t);i(t)}));else{H("Not supported on browser");i(new Error("Clipboard API not available"))}}))}const L=t=>null===t,D=t=>void 0===t,k=t=>"object"==typeof t,U=t=>"string"==typeof t,P=t=>k(t)&&0===Object.keys(t).length,x=t=>U(t)&&0===t.trim().length,V=t=>L(t)||D(t)||x(t)||P(t);function B(t,e,i){return new Promise(((s,n)=>{let o=0;const r=()=>{try{const e=t();s(e)}catch(t){o++;o>=e?n(t):setTimeout(r,i)}};r()}))}const G="interactive-close-button";function q(){return document.getElementById(G)}function Y(){try{return Array.from(document.querySelectorAll("a[href*='closeInteractive()'"))}catch(t){return[]}}class ${constructor({applicationController:t}){this.listenForCloseClick=()=>{const t=q();null==t||t.addEventListener("click",(()=>{this.applicationController.closeCTA()}));null==t||t.addEventListener("keypress",(t=>{"Enter"===t.key&&this.applicationController.closeCTA();"Space"===t.code&&this.applicationController.closeCTA()}));Y().forEach((t=>{t.addEventListener("click",(()=>{this.applicationController.closeCTA()}))}))};this.applicationController=t;u(this.listenForCloseClick);u(this.addA11yAttributes)}addA11yAttributes(){const t=q();null==t||t.setAttribute("tabindex","0")}}function W(t,e){if(!t||!t.parentElement)return null;const i=document.createElement(e);Array.from(t.attributes).forEach((t=>{i.setAttribute(t.name,t.value)}));i.innerHTML=t.innerHTML;t.parentElement.replaceChild(i,t);return i}const X=(...t)=>{e("[ContainerVideoController",...t)};class z{constructor({applicationController:t}){this.updateHubspotPlayerContainerStyles=()=>{const t=document.querySelector(".hs-video-container"),e=document.querySelector(".hs-video-wrapper"),i=document.querySelector(".hs-video-wrapper iframe");if(!e||!i)return;this.videoFrame=i;this.videoWrapper=e;let s=Number(i.dataset.hsvHeight),n=Number(i.dataset.hsvWidth);const o=t.style.maxWidth;let r=this.determineMaxWidthContainer(e);if(o){const t=Number(o.replace("px",""));r=r?Math.min(r,t):t}n=n?Math.min(r,n):r;s=s||this.determineHeightFromWidth(n);t.style.margin="0";e.style.height="100%";e.style.paddingBottom="0px";i.style.position="static";n&&(i.style.width=`${n}px`);s&&(i.style.height=`${s}px`)};this.determineMaxWidthContainer=t=>{let e=t,i=0;for(;e&&!i;){e.clientWidth&&(i=e.clientWidth);e=e.parentElement}return i};this.determineHeightFromWidth=t=>{const e=this.videoWrapper.style.paddingBottom;if(e){return t*(Number(e.replace("%",""))/100)}return 0};this.updateOembedPlayerContainerStyles=()=>{const t=document.createElement("style"),e=document.querySelector(".oembed_container, .embed_container");if(!e)return;e.classList.add("with-alignment","hs-video-dimension-override");const i=e.querySelector(".iframe_wrapper"),s=i.querySelector("iframe");s&&(this.videoFrame=s);const n=Number(s.height)/Number(s.width);let o,r,a=this.determineMaxWidthContainer(e.parentElement);const l=a*n;if(e.classList.contains("oembed_container--full-size")){o=l;r=a}else{const t=i.dataset.maxHeight||i.dataset.height||s.height;o=t?Number(t):0;const l=i.dataset.maxWidth||i.dataset.width||s.width;r=l?Number(l):0;const c=e.style.maxWidth,h=e.style.maxHeight;if(c&&h){const t=Number(c.replace("px",""));a=a?Math.min(a,t):t;r=r?Math.min(a,Number(r)):a;o=r*n}r=r?Math.min(a,Number(r)):a}let c="";r&&(c=`width: ${r}px!important;`);o&&(c=`${c}height:${o}px!important;`);t.innerHTML=`\n .oembed_custom-thumbnail {\n ${c};\n padding-bottom: 0px !important;\n padding-top: 0px !important;\n }\n .hs-video-dimension-override .iframe_wrapper {\n padding-bottom: 0px !important;\n padding-top: 0px !important;\n max-width: 100%!important;\n ${c}\n }\n .hs-video-dimension-override iframe {\n ${c}\n padding-bottom: 0px !important;\n padding-top: 0px !important;\n max-width: 100%!important\n }\n `;document.head.appendChild(t)};this.handleClose=()=>{if(window.hsVideoApi&&"function"==typeof window.hsVideoApi.pauseAllPlayers)window.hsVideoApi.pauseAllPlayers();else if(this.videoFrame){const t=W(this.videoFrame,"div");this.videoFrame=t}};this.handleShowing=()=>{if(this.videoFrame&&"DIV"===this.videoFrame.tagName){const t=W(this.videoFrame,"iframe");this.videoFrame=t}};this.applicationController=t;this.listenForCloseEvent();this.listenForShowingEvent();u((()=>{if(this.needsStyleUpdate()){X("Using flex styling, so need to override relative styling for video");this.listenForVideoPlayer();this.updateOembedPlayerContainerStyles()}else X("No need to override relative styling for video");this.isHubspotVideo()||this.setOEmbedElements()}))}needsStyleUpdate(){const t=1e3;let e=0;const i=document.querySelector(".oembed_container, .embed_container, .hs-video-wrapper");if(!i)return!1;let s=i;for(;s&&et.includes("-flexbox-positioning"))))return!0;s=s.parentElement;e++}return!1}listenForCloseEvent(){this.applicationController.registerHandler(t.HAS_CLOSED,this.handleClose)}listenForShowingEvent(){this.applicationController.registerHandler(t.SHOWING_CTA,this.handleShowing)}listenForVideoPlayer(){window._hsVideoReady=window._hsVideoReady||[];window._hsVideoReady.push(this.updateHubspotPlayerContainerStyles)}setOEmbedElements(){if(this.videoFrame)return;const t=document.querySelector(".oembed_container, .embed_container");if(!t)return;const e=t.querySelector(".iframe_wrapper").querySelector("iframe");e&&(this.videoFrame=e)}isHubspotVideo(){return Boolean(window.hsVideoApi)}}class j{constructor({applicationController:t}){this.handleClose=()=>{document.querySelectorAll("audio").forEach((t=>{t.pause()}))};this.applicationController=t;this.listenForCloseEvent()}listenForCloseEvent(){this.applicationController.registerHandler(t.HAS_CLOSED,this.handleClose)}}class Q{constructor({applicationController:t}){this.allowedOrigin=null;this.applicationController=t;this.extractAllowedOrigin();this.listenForMeetingsSuccess()}extractAllowedOrigin(){const t=document.querySelector(".meetings-iframe-container");if(t){const e=t.getAttribute("data-src");if(e)try{const t=new URL(e);this.allowedOrigin=t.origin}catch(t){}}}listenForMeetingsSuccess(){window.addEventListener("message",(t=>{const e=t.data;this.allowedOrigin&&t.origin!==this.allowedOrigin||e&&e.meetingBookSucceeded&&e.meetingsPayload&&this.handleMeetingsSuccess(e.meetingsPayload)}))}handleMeetingsSuccess(e){this.applicationController.sendMessage({type:t.MEETINGS_BOOKING_SUCCESS,payload:e})}}var K=" @media (max-width: 767px) {\n .row-depth-1 .row-fluid {\n width: 100%;\n flex-direction: column!important;\n }\n\n .row-depth-1 .row-fluid > .dnd-column {\n width: 100%;\n margin-left: 0;\n }\n\n .row-depth-1 .row-fluid > .dnd-column + .dnd-column {\n margin-top: 10px!important;\n }\n }\n";const J=(...t)=>{e("[ContainerVideoController",...t)};class Z{constructor({applicationController:e,handleResize:i}){this.handleSendStylesheets=()=>{const e={media:K};J("Sending stylesheets",e);this.applicationController.sendMessage({type:t.SEND_STYLESHEETS,payload:{stylesheetsHtml:e}})};this.handleReceiveUpdatedStylesheets=t=>{J("Stylesheets updated",t);Object.keys(this.initialStylesheets).forEach((e=>{const i=document.querySelector(`style[data-hs-id="${e}"]`);i&&(i.innerHTML=t.stylesheets[e]||this.initialStylesheets[e])}));this.handleResize()};this.applicationController=e;this.initialStylesheets={media:""};this.createMediaQueryStyle();this.handleResize=i;this.listenForStylesheetUpdates()}init(){u(this.handleSendStylesheets)}listenForStylesheetUpdates(){this.applicationController.registerHandler(t.RECEIVE_FILTERED_STYLESHEETS,this.handleReceiveUpdatedStylesheets)}createMediaQueryStyle(){J("Adding media query stylesheet");const t=document.createElement("style");t.dataset.hsId="media";document.head.appendChild(t)}}class tt extends S{constructor({applicationController:t}){super({applicationController:t});this.applicationController=t;const e=window.location.search.indexOf("enableResponsiveStyles")>-1;this.stylesheetSyncer=new Z({applicationController:this.applicationController,handleResize:this.handleResize});e&&this.stylesheetSyncer.init();this.listenForConfigs()}listenForConfigs(){this.applicationController.registerHandler(t.SEND_CTA_CONFIG,(t=>{t.containerStyles.useResponsiveStyling&&this.stylesheetSyncer.init();t.containerStyles.scaleHeightToFitContent||this.setBodyDimensions(t);this.hideScrollbar(t)}))}hideScrollbar(t){if(t.containerStyles.scaleHeightToFitContent||t.containerStyles.isSingleModuleOnly){const t=document.createElement("style");t.id="web-interactives-scroll-hide";t.innerHTML="body::-webkit-scrollbar{ display: none; }.body-wrapper::-webkit-scrollbar{ display: none; }";document.head.appendChild(t)}}setBodyDimensions(t){const e=t.containerStyles.height.value,i=t.containerStyles.width.value;if(window.frameElement){const t=getComputedStyle(window.frameElement);document.body.style.minHeight=`calc(${e}px - ${t.borderBottomWidth} - ${t.borderTopWidth})`;document.body.style.minWidth=`calc(${i}px - ${t.borderLeftWidth} - ${t.borderRightWidth})`}else{document.body.style.minHeight=`${e}px`;document.body.style.minWidth=`${i}px`}}}class et{constructor({handleClose:t}){this.listenForClose=()=>{O(this.handleClose)};this.handleClose=t;this.listenForClose()}}const it=(...t)=>{e("[populateLinksWithTrackingParams]",...t)},st=["currentUrl","referrer","canon","canonicalUrl","pageUrl","contentType","encryptedPayload","pageId","analyticsPageId","hutk","hstc","hssc","hsfp","utk","containerType","webInteractiveId","webInteractiveContentId","audienceId","campaignGuid","campaignId","userAgent","timeStarted","timeFinished","redirectUrl","skip","includeInitial","pageTitle","contentGroupId","portalId","hsCtaAttrib"],nt=`https://${(new Date).getTime()}-dummy.com`,ot=(t,e)=>{let i,s=!1;try{i=new URL(t)}catch(e){it("[populateLinksWithTrackingParams]","Checking for relative URL",t);s=!0}if(s)try{i=new URL(`${nt}${t.startsWith("/"),""}${t}`)}catch(e){it("Could not parse url for link",e);return t}Object.entries(e).forEach((([t,e])=>{st.includes(t)?null!=e&&i.searchParams.set(t,String(e)):it("Invalid analytics parameter passed",t)}));const n=i.href;return s?n.replace(nt,""):n};var rt=(t,e=[...document.querySelectorAll(".hs-web-interactive a")])=>{e.length&&e.forEach((e=>{const i=e.getAttribute("href");i&&!i.startsWith("javascript")&&e.setAttribute("href",ot(i,t))}))};const at="0-91";class lt{constructor({applicationController:e}){this.analyticsForForm={};this.listenForConfig=e=>{this.applicationController.registerHandler(t.SEND_CTA_CONFIG,(t=>{const{webInteractiveId:i,portalId:s}=t;e(Object.assign({},t,{callToActionId:this.getCallToActionId(i,s)}))}))};this.listenForAnalytics=e=>{this.applicationController.registerHandler(t.RECEIVED_ANALYTICS,(t=>e(this.extractAnalytics(t))))};this.handleFormReady=()=>{this.applicationController.fireContainerReady()};this.handleFormSubmit=({formId:e,redirectUrl:i,submissionValues:s,shouldCloseCTAOnFormSubmission:n})=>{this.applicationController.sendMessage({type:t.CTA_FORM_SUBMITTED,payload:{formId:e,submissionValues:s}});n?this.applicationController.closeCTA():i&&this.applicationController.navigatePage(i)};this.applicationController=e}extractAnalytics(t){return["hutk","canonicalUrl","contentType","pageId","path","referrerPath","referrer","pageUrl","pageTitle","userAgent"].reduce(((e,i)=>t[i]&&!V(t[i])?Object.assign({},e,{[i]:t[i]}):e),{})}getCallToActionId(t,e){return`${e}-${at}-${t}`}}function ct(){const t=document.querySelector('[class*="hs-content-id-"]');if(!t)return null;const e=t.className.match(/hs-content-id-(\d+)/);return e?Number(e[1]):null}function ht(){const t=ct();try{const e=window.location.href.match(/hs-web-interactive-[^-]*-(\d+)/);if(!e)return!1;const i=Number(e[1]);return!isNaN(i)&&t!==i}catch(t){return!1}}function dt(){return document.body.dataset.hsContainerType}const ut="closeOnCTASubmission",pt=(...t)=>{e("[ContainerFormControllerV3",...t)},mt={ON_FORM_SUBMITTED:"onFormSubmitted",ON_FORM_SUBMIT:"onFormSubmit",ON_FORM_READY:"onFormReady"},gt=5,Ct=200;class Et extends lt{constructor(t){super(t);this.callToActionId="";this.isActiveAbTest=!1;this.handleReceiveAnalytics=t=>{this.analyticsForForm=t};this.handleReceiveConfig=({pageUrl:t,pageTitle:e,pageId:i,callToActionId:s,hutk:n,isActiveAbTest:o})=>{this.callToActionId=s;t&&!this.analyticsForForm.pageUrl&&(this.analyticsForForm.pageUrl=t);e&&!this.analyticsForForm.pageTitle&&(this.analyticsForForm.pageTitle=e);i&&!this.analyticsForForm.pageId&&(this.analyticsForForm.pageId=i);n&&!this.analyticsForForm.hutk&&(this.analyticsForForm.hutk=n);this.isActiveAbTest=o};this.handlePresubmit=()=>{this.setFormContext()};this.initializeFormInstance();this.listenForConfig(this.handleReceiveConfig)}get shouldCloseOnCTASubmission(){var t;if("EMBED"===dt())return!1;return"true"===(null===(t=this.formInstance)||void 0===t?void 0:t.getMetaData(ut))}initializeFormInstance(){B((()=>{const t=window.HubSpotForms.getForms();if(0===t.length)throw new Error("No forms available");this.formInstance=t[0]}),gt,Ct).then((()=>{this.registerFormInstanceEvents();this.listenForAnalytics(this.handleReceiveAnalytics)})).catch((t=>{pt("Failed to initialize form instance:",t)}))}registerFormInstanceEvents(){if(this.formInstance){this.formInstance.isFormReady?this.handleFormReady():this.formInstance.on(mt.ON_FORM_READY,this.handleFormReady);this.formInstance.on(mt.ON_FORM_SUBMITTED,((t,{redirectUrl:e,submissionValues:i})=>{this.handleFormSubmit({formId:this.getFormId(),redirectUrl:e,submissionValues:i,shouldCloseCTAOnFormSubmission:this.shouldCloseOnCTASubmission})}));this.formInstance.on(mt.ON_FORM_SUBMIT,this.handlePresubmit)}}setFormContext(){const t=this.callToActionId,e=ct(),i={callToActionId:t};this.isActiveAbTest&&ht()&&e&&(i.callToActionContentId=e);this.formInstance.setContext(Object.assign({},this.formInstance.getContext(),this.analyticsForForm,{extraSubmissionMetadata:i,getExtraMetaDataBeforeSubmit:()=>i,__INTERNAL__CONTEXT:{disableRedirect:!0}}))}getFormId(){return this.formInstance?this.formInstance.id:""}}const St={ON_FORM_READY:"hs-form-event:on-ready",ON_FORM_SUBMISSION_SUCCESS:"hs-form-event:on-submission:success"};class yt extends lt{constructor(t){super(t);this.extraSubmissionMetadata=[];this.handleReceiveConfig=({pageUrl:t,pageTitle:e,pageId:i,callToActionId:s,isActiveAbTest:n})=>{const o=ct(),r=Object.assign({callToActionId:s},this.analyticsForForm.pageUrl?{}:{pageUrl:t},this.analyticsForForm.pageTitle?{}:{pageTitle:e},this.analyticsForForm.pageId?{}:{pageId:i});n&&ht()&&o&&(r.callToActionContentId=o);window.HubspotFormsV4?this.setExtraSubmissionMetadata(r):this.extraSubmissionMetadata.push(r)};this.handleReceiveAnalytics=t=>{this.analyticsForForm=t;window.HubspotFormsV4?this.setExtraSubmissionMetadata(t):this.extraSubmissionMetadata.push(t)};this.listenForGlobalEvents();this.listenForConfig(this.handleReceiveConfig)}listenForGlobalEvents(){this.listenForFormReady();this.listenForFormSubmissionSuccess()}listenForFormReady(){document.addEventListener(St.ON_FORM_READY,(()=>{this.handleFormReady();this.listenForAnalytics(this.handleReceiveAnalytics);this.flushExtraSubmissionMetadata()}))}listenForFormSubmissionSuccess(){document.addEventListener(St.ON_FORM_SUBMISSION_SUCCESS,(t=>{const{formId:e}=t.detail,i=window.HubspotFormsV4.getFormFromEvent(t);i.getFormFieldValues().then((t=>{this.handleFormSubmit({formId:e,redirectUrl:i.getRedirectUrl(),submissionValues:this.getSubmissionValues(t)})})).catch((()=>{}))}))}getSubmissionValues(t){return t.reduce(((t,{name:e,value:i})=>{t[e]="string"==typeof i?i:0===i.length?"":1===i.length?i[0]:i;return t}),{})}flushExtraSubmissionMetadata(){this.extraSubmissionMetadata.forEach((t=>this.setExtraSubmissionMetadata(t)));this.extraSubmissionMetadata=[]}setExtraSubmissionMetadata(t){const e=window;e.HubspotFormsV4&&e.HubspotFormsV4.getForms()[0].setExtraSubmissionMetadata(t)}}function _t(){return Boolean(window.HubSpotForms)}function At(){return Boolean(document.getElementsByClassName("hs-form-html")[0])}class Tt extends A{constructor(){super({ContainerResizeControllerClass:tt});this.shouldPopulateLinks=!0;this.closeCTA=()=>{this.sendMessage({type:t.CLOSE_INTERACTIVE,payload:{}})};this.overrideBodyHeight=()=>{document.body.style.height="fit-content"};this.closeButtonController=new $({applicationController:this});u((()=>{this.setupForms();this.overrideBodyHeight()}));this.listenForConfigs();this.listenForAnalytics();this.keyPressController=new et({handleClose:this.closeCTA});this.ContainerVideoController=new z({applicationController:this});this.containerAudioController=new j({applicationController:this});this.containerMeetingsController=new Q({applicationController:this})}triggerClickCTA(e){this.sendMessage({type:t.TRIGGER_CTA,payload:{triggerCTA:e}})}listenForConfigs(){this.registerHandler(t.SEND_CTA_CONFIG,(t=>{this.setGates(t.gates);if(t.shouldUseJsTracking){this.shouldPopulateLinks=!1;rt({hsCtaAttrib:t.contentModelId})}else rt({webInteractiveId:t.webInteractiveId,webInteractiveContentId:t.contentModelId,audienceId:t.audienceId,containerType:t.containerType,campaignId:t.campaignGuid,pageUrl:t.pageUrl,portalId:t.portalId},[...document.querySelectorAll("a")])}))}listenForAnalytics(){this.registerHandler(t.RECEIVED_ANALYTICS,(t=>{this.shouldPopulateLinks&&rt(t)}))}setupForms(){At()?this.containerFormControllerV4=new yt({applicationController:this}):_t()?this.containerFormControllerV3=new Et({applicationController:this}):this.fireContainerReady()}onLinkClick(t){t.dataset.ctaTrigger&&this.triggerClickCTA(parseInt(t.dataset.ctaTrigger,10));if(t.dataset.clickCopyValue)M(t.dataset.clickCopyValue);else if(t.parentNode&&t.parentNode.parentNode){const e=t.parentNode.parentNode;e&&e instanceof HTMLElement&&e.dataset.ctaTrigger&&this.triggerClickCTA(parseInt(e.dataset.ctaTrigger,10))}}getStartedMessagePayload(){return{contentId:ct(),containerStyles:window.hsInteractiveContainerStyles}}}function ft(){return new Tt}ft()}();