void 0===TCB_Front.js_modules.divider&&TCB_Front.setModuleLoadedStatus("divider",!1),((t,d)=>{if(TCB_Front.isModuleLoaded("divider"))return;const e={init(){d.addResizeCallback(e.customDividerStyle),e.customDividerStyle()},customDividerStyle(){t(".thrv-divider").each(function(){const i=t(this),s=i.find("hr");TCB_Front.Utils.windowWidth()>1023?e.removeOldClass(s).addClass(d.getMediaAttr(i,"data-style","desktop")):TCB_Front.Utils.windowWidth()>767?e.removeOldClass(s).addClass(d.getMediaAttr(i,"data-style","tablet")):e.removeOldClass(s).addClass(d.getMediaAttr(i,"data-style","mobile"))})},removeOldClass:t=>(t.removeClass(function(t,d){return(d.match(/(^|\s)tve_sep-\S+/g)||[]).join(" ")}),t)};t(window).on("tcb_after_dom_ready",()=>e.init()),window.addEventListener("load",()=>e.init()),TCB_Front.setModuleLoadedStatus("divider",!0)})(ThriveGlobal.$j,TCB_Front);
void 0===TCB_Front.js_modules["lead-generation"]&&TCB_Front.setModuleLoadedStatus("lead-generation",!1),((t,e)=>{if(e.isModuleLoaded("lead-generation"))return;t(window).on("tcb_after_dom_ready",()=>{const r=t(e.Utils.isEditorPage()?"#tve_editor":"body");a.initRadioInputs(r),a.initCheckboxInputs(r),e.Utils.isEditorPage()||(t(".thrv_lead_generation").tve_front_lead_generation(),a.initRecaptcha(),a.initTurnstile(),a.initCustomSpamPreventor())});const a={initRadioInputs(e){t('[data-default="1"]').closest(".tve_lg_radio_wrapper").addClass("tve-state-expanded"),e.off("change.inputradio").on("change.inputradio",".tve_lg_radio_wrapper input",function(){const e=t(this).closest(".tve_lg_radio_wrapper");e.siblings(".tve-state-expanded").removeClass("tve-state-expanded"),e.addClass("tve-state-expanded")})},initCheckboxInputs(e){e.off("change.inputcheckbox").on("change.inputcheckbox",".tve_lg_checkbox_wrapper input",function(){const e=t(this);e.closest(".tve_lg_checkbox_wrapper").toggleClass("tve-state-expanded",e.prop("checked"))})},initCustomSpamPreventor(){const e=t(".tve-thrive-sp-container");let a=500;e.filter(":not(.tve-sp-rendered)").each(function(){document.getElementById(this.id)&&(this.id=this.id+"-"+ ++a,t(this).addClass("tve-sp-rendered"))})},initTurnstile(){const e=t(".tve-turnstile-container");if(e.length&&0!==tve_dash_front.turnstile.length){let a=!1;window.tve_turnstile_api_loaded||(t.ajax({url:"https://challenges.cloudflare.com/turnstile/v0/api.js",dataType:"script",cache:!0}),a=!0,window.tve_turnstile_api_loaded=!0),a||function a(){"undefined"!=typeof turnstile&&turnstile.render?function(){let a=100;e.filter(":not(.tve-turnstile-rendered)").each(function(){if(document.getElementById(this.id)){this.id=this.id+"-"+ ++a;const e=t(this),r=window.innerWidth<400?"compact":e.attr("data-size");e.addClass("tve-turnstile-rendered");const n=this.id;e.data("turnstile-rendered")||tve_dash_front.turnstile.connection||(e.data("turnstile-rendered",!0),turnstile.render("#"+n,{sitekey:tve_dash_front.turnstile.site_key||e.attr("data-site-key"),theme:e.attr("data-theme"),type:e.attr("data-type"),appearance:"execute",size:r}))}})}():setTimeout(a,50)}()}},initRecaptcha(){const e=t(".tve-captcha-container");if(e.length&&0!==tve_dash_front.recaptcha.length){function a(){"undefined"!=typeof grecaptcha&&grecaptcha.render?function(){let a=100;e.filter(":not(.tve-recapcha-rendered)").each(function(){if(document.getElementById(this.id)){this.id=this.id+"-"+ ++a;const e=t(this),r=window.innerWidth<400?"compact":e.attr("data-size");e.addClass("tve-recaptcha-rendered"),e.data("grecaptcha-render")||tve_dash_front.recaptcha.connection&&(!tve_dash_front.recaptcha.connection||"v3"===tve_dash_front.recaptcha.connection.version)||(e.data("grecaptcha-render",!0),grecaptcha.render(this.id,{sitekey:tve_dash_front.recaptcha.site_key||e.attr("data-site-key"),theme:e.attr("data-theme"),type:e.attr("data-type"),size:r}))}})}():setTimeout(a,50)}let r=!1;const n=tve_dash_front.recaptcha.connection&&"v3"===tve_dash_front.recaptcha.connection.version&&!tve_dash_front.recaptcha.connection.browsing_history?tve_dash_front.recaptcha.site_key:"explicit";window.tve_gapi_loaded||(t.getScript("https://www.google.com/recaptcha/api.js?render="+n,a),r=!0,window.tve_gapi_loaded=!0),r||a()}},hasFileUpload:()=>e.isModuleLoaded("file-upload")};t.fn.tve_front_lead_generation=function(r={}){return window.TCB_PAGE_INDEX=window.TCB_PAGE_INDEX||1,this.each((n,i)=>{const o=t(i);let s=o.find("form");const l=s.find(".tve-f-a-hidden").val();if(0===s.length&&(o.find(".thrv_lead_generation_container").wrapInner('<form method="post"></form>'),s=o.find("form")),s.find(".tve_lg_textarea.tve-lg-show-counter textarea").off("input.textarea").on("input.textarea",function(){const e=t(this),a=e.val().length,r=Number(e.attr("maxlength")),n=Number(e.attr("data-min")),i=e.next().find(".tve-fill-text-dynamic");i.text(r?`${a} of ${r}`:a),i.toggleClass("tve-counter-error",!!(a&&n&&a<n))}),s.find('input[type="checkbox"],input[type="radio"]').each(function(){if(!this.id)return!0;t("#"+this.id).not(this).length&&(this.id=this.id+"-"+window.TCB_PAGE_INDEX++,t(this).next("label").attr("for",this.id))}),void 0!==l&&"#"===s.attr("action")&&s.attr("action",l),o.data("tve_lg_done"))return this;if(o.data("tve_lg_done",!0),void 0!==window.SegMet&&SegMet&&-1!==s[0].action.indexOf("infusionsoft")&&!s.data("tve-segmet-submit")){s.data("tve-segmet-submit",1);const t=s[0].submit;s[0].submit=function(){return s.data("tve-segmet-submitted")?t.call(s[0]):(s.data("tve-segmet-submitted",1),s.submit())}}const d={errClass:"tve-lg-error",errClassMultiple:"tve-lg-error-multiple",init(){this.container=s.closest(".thrv_lead_generation").find("#tve-lg-error-container"),this.container.length||(this.container=t('<div id="tve-lg-error-container"></div>').prependTo(s.parent()),this.container.on("click",".tve-lg-err-close",t.proxy(this.close,this))),this.container.empty().hide(),this.clear()},close(){this.container.fadeOut(200);let t=s.find("."+this.errClass);return t.length||(t=s.find("input,select,textarea")),t.first().trigger("focus"),!1},clear(){s.find("input,select,textarea").removeClass(this.errClass),s.find('[class^="tve_lg_"]').removeClass(this.errClassMultiple+" "+this.errClass),"function"==typeof r.clearErrors&&r.clearErrors.apply(this,arguments)},markApiError(e,a=t(),n=""){return"function"==typeof r.renderError?r.renderError(a,e,n):this.container.append('<div class="tve-lg-err-item tve-lg-ext-err">'+e+"</div>"),this},_markError(t,e,a){if("function"==typeof r.renderError)return r.renderError.call(this,t,e,a);if(t){const e=t.parent();e.removeClass("tcb-permanently-hidden"),e.closest("form").find(`[data-label-for="${e.attr("data-label")}"]`).removeClass("tcb-permanently-hidden"),t.addClass(this.errClass);let r=t.attr("data-field")?t.attr("data-field").replace("mapping_",""):t.attr("type");"gdpr"===r&&(r="checkbox"),["radio","checkbox"].includes(r)?t.closest(".tve_lg_"+r).addClass(this.errClassMultiple):"select"===r?t.closest(".tve_lg_dropdown").addClass(this.errClass):"country"===r?"no-country"===a&&t.closest(".tve_lg_country").addClass(this.errClass):"state"===r&&"no-state"===a&&t.closest(".tve_lg_state").addClass(this.errClass)}"required"===a&&this.container.find(".tve-lg-required").length||this.container.append('<div class="tve-lg-err-item tve-lg-'+a+'">'+e+"</div>")},show(){if("function"==typeof r.renderError)return;this.container.append('<a href="javascript:void(0)" class="tve-lg-err-close" title="Close"><span class="thrv-icon thrv-svg-icon">'+e.icons.get("cross")+"</span></a>");const t=this;setTimeout(function(){const e=s.offset(),a=parseInt(s.css("margin-top"));let r=-10-t.container.outerHeight(!0)-(isNaN(a)?0:a);s.parents(".thrv-ribbon").length?"bottom"===s.parents(".tve-leads-ribbon").attr("data-position")?r+=7:r=e.top+s.outerHeight():t.container.outerHeight(!0)>e.top&&(r=e.top+s.outerHeight()),t.container.css({top:r+"px",width:s.outerWidth()}).fadeIn(200)},50)},required(e,a){let r,n="required";const i=e.attr("type");if("hidden"===i)r=!0;else if("radio"===i)r=t('input[name="'+e.attr("name")+'"]').is(":checked");else if("checkbox"===i)r=t('input[name="'+e.attr("name")+'"]').is(":checked");else if(e.is("textarea[data-min]")){const i=t.trim(e.val()).length;r=i>=e.attr("data-min"),!r&&i&&(n="min-chars",a=tve_frontend_options.translations.min_chars.replace("%s",e.attr("data-min")))}else{const a=e.attr("value")?e.attr("value"):e.val();r=t.trim(a).length>0}return r||this._markError(e,a,n),r},validNumber(t){const e=parseFloat(t.attr("max")),a=parseFloat(t.attr("min")),r=parseFloat(t.val()),n=this.getErrors(o);let i=!0,s=n.min_value,l=n.max_value;if(void 0===s&&(s="The number field should be at least {min_value}"),void 0===l&&(l="The number field should be at most {max_value}"),!isNaN(a)&&!isNaN(r)&&r<a){i=!1;const e=s.replace(/{min_value}/g,a);this._markError(t,e,"min_value")}if(!isNaN(e)&&!isNaN(r)&&r>e){i=!1;const a=l.replace(/{max_value}/g,e);this._markError(t,a,"max_value")}return i},validCountry(e){if(!parseInt(e.attr("data-required")))return!0;let a=!0,r="",n="";const i=e.attr("value")?e.attr("value"):e.val();return a=t.trim(i).length>0,a||(r="Country field is required!",n="no-country",this._markError(e,r,n)),a},validState(e){if(!parseInt(e.attr("data-required")))return!0;let a=!0,r="",n="";const i=e.attr("value")?e.attr("value"):e.val();return a=t.trim(i).length>0,a||(r="State field is required!",n="no-state",this._markError(e,r,n)),a},password(t,e){let a=!0;return t.val()||1!==t.data("required")||(a=!1),!!a||(this._markError(t,e,"password"),!1)},mismatch(t,e){let a=!0;return t.password&&t.password.val()!==t.confirm_password.val()&&(a=!1),!!a||(this._markError(t.confirm_password,e,"passwordmismatch"),!1)},email(t,e){return!(t.val()&&!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t.val())&&(this._markError(t,e,"email"),1))},getErrors(t){try{return JSON.parse(t.find(".tve-lg-err-msg").val())}catch(t){return{file_extension:"Sorry, {fileextension} files are not allowed",file_size:"{file} exceeds the maximum file size of {filelimit}",required:"Please fill in all of the required fields",phone:"The phone number is not valid",email:"The email address is not valid",max_value:"The number field should be at most {max_value}",min_value:"The number field should be at least {min_value}"}}}};let c;a.hasFileUpload()&&(c=new e.FileUpload(o));const u=function(a,r){const n=t.extend({success:"Sign up successful",error:"Error!"},r),i=s.find("#_form_type").val(),o=s.find("input[name=name]").val()?s.find("input[name=name]").val():"",l=s.find("input[name=email]").val();if(a){s.parents(".tl-style").first().find(".tve_p_lb_close").trigger("click");const a=t.Event("leads_messages.tcb");s.trigger(a),"lead_generation"===i&&(s.find("input").val(""),s.parents(".tve_p_lb_content").find(".tve_p_lb_close").trigger("click")),n.success=n.success.replace("[lead_email]",l),n.success=n.success.replace("[lead_name]",o),e.notificationElement.toggle(n.success,"success","")}else{const t=s.parent(),a=t.parent(),r=a.find(".tve-error-wrapper"),i=s.find("#_error_message_option").val();if(1===parseInt(i))t.hide(),0===r.length?(a.append('<div class="tve-error-wrapper"><div class="tve-error-content"></div><button class="tve-close-error-message">Retry</button></div>'),n.error=n.error.replace("[lead_email]",l),n.error=n.error.replace("[lead_name]",o),a.find(".tve-error-content").append(n.error)):a.find(".tve-error-wrapper").show();else{if(_())return;e.notificationElement.toggle(n.success,"success",""),h(),f()}}s.tve_form_loading(!0)},p=function(t){return t&&t.length>0?t+",":""};function f(){s.find(".tve-state-expanded").removeClass("tve-state-expanded"),s.find(".tve_lg_dropdown:not(.tve_lg_country):not(.tve_lg_state)").each(function(){const e=t(this),a=e.attr("data-show-placeholder"),r=e.find('[data-default="1"]'),n=r.length?r:e.find(".tve-lg-dropdown-option,.tve-dynamic-dropdown-option").first(),i=e.find("input");a?(e.find(".tve-lg-dropdown-trigger .tve-disabled-text-inner").html(i.attr("data-placeholder")),i.removeAttr("value")):(e.find(".tve-lg-dropdown-trigger .tve-disabled-text-inner").html(n.text()),i.attr("value",n.attr("data-value")))}),s.find(".tve_lg_country").each(function(){const e=t(this),a=e.find("input:not(.tve-lg-dropdown-input)"),r=a.attr("default-value"),n=e.find(".tve-lg-dropdown-trigger"),i="include"===e.attr("data-display-type"),o=1===JSON.parse(e.attr("data-display-list")).length;if(n.find(".tve-disabled-text-inner").text("Select Country"),a[0].setAttribute("value",""),r)a[0].setAttribute("value",r),n.find(".tve-disabled-text-inner").text(r);else if(i&&o){const t=JSON.parse(e.attr("data-display-list"))[0];a[0].setAttribute("value",null==t?void 0:t.name),n.find(".tve-disabled-text-inner").text(null==t?void 0:t.name)}window.setTimeout(function(){a.trigger("input.tve")},0)}),s.find(".tve_lg_state").each(function(){const e=t(this),a=e.find("input:not(.tve-lg-dropdown-input)"),r=a.attr("default-value"),n=e.find(".tve-lg-dropdown-trigger");n.find(".tve-disabled-text-inner").text(a.attr("data-placeholder")),""!==r?(a.val(r),n.find(".tve-disabled-text-inner").text(r)):a.attr("value","")}),s.find(".tve_lg_date").each(function(){const e=t(this),a=e.find(".lg-date-picker");try{const t=e.data("date-configs"),r=Number(a.attr("data-is-limit-days")),n=Number(a.attr("data-is-limit-hours"));if(r){const e=JSON.parse(a.attr("data-limit-days")),{disable:r,locale:n}={disable:[function(t){return!e.includes(t.getDay())}],locale:{firstDayOfWeek:1}};t.disable=r,t.locale=n}if(n){const e=a.attr("data-start-hour"),r=a.attr("data-start-minute"),n=a.attr("data-start-meridiem");e&&(t.defaultHour="PM"===n?Number(e)+12:e),r&&(t.defaultMinute=r)}void 0!==window.TCB_DatePickerLocale&&window.TCB_DatePickerLocale.applyLocaleToConfig?window.TCB_DatePickerLocale.applyLocaleToConfig(t,t.locale||null).then(t=>{a.flatpickr(t)}):a.flatpickr(t)}catch(t){}}),s[0].reset(),s.find("textarea").trigger("input"),s.find('input[type="radio"][data-default="1"], input[type="checkbox"][data-default="1"] ').attr("checked","checked").closest(".tve_lg_radio_wrapper, .tve_lg_checkbox_wrapper").addClass("tve-state-expanded"),e.smartComplete.handleSmartComplete(s)}function _(a=!1,r="",n="",i=null){const o=s.find("#_error_message_option").val(),l=s.find("#_autofill").val(),d=s.find("#_submit_option").val(),c=l?s.find("input").not("input[type=hidden],input[type=password]").serializeArray():"",u=s.find("#_back_url_target").val();let p=!1;if(!d||"reload"===d&&(a||1!==o))p=!0,location.reload();else if("redirect"===d){let t=s.find("#_back_url").val();t=e.Utils.addHttp(t),l&&c&&!e.Utils.isExternal(t)&&e.setCookie("account_create_fields",JSON.stringify(c),{path:"/"}),"1"===s.find("#_sendParams").val()&&(t=e.Utils.appendFormParamsToURL(t,s));const r="_blank"===u;if(!t||!e.isValidUrl(t)||!a&&1===o)return i&&!i.closed&&i.close(),p;if(r)return p=!0,p;i&&!i.closed&&i.close(),location.href=t,p=!0}else if("state"===d&&a){const e=TL_Front.parent_state,a=s.find(".tve-switch-state-trigger"),r=-1!==a.attr("data-tcb-events").indexOf("tl_state_lightbox"),n=s.parents(".tve_post_lightbox").length>0;if(a.trigger("click"),s.tve_form_loading(!0),r)if(n)e&&(TL_Front.close_form(e),delete TL_Front.parent_state);else{const e=t.Event("leads_messages.tcb");e.lightbox_state=!0,s.trigger(e)}TL_Front.parent_state&&(s.parents(".tl-style").first().find(".tve_p_lb_close").trigger("click"),delete TL_Front.parent_state),p=!0}else"klicktipp-redirect"===d&&a?r&&e.isValidUrl(r)&&(location.href=r,p=!0):"page"===d&&a&&n&&e.isValidUrl(n)&&(location.href=n,p=!0);return p}function h(){t(".tve_p_lb_background.tve_lb_open .tve_p_lb_close").trigger("click")}!function(){const t=s.find("#_submit_option").val(),e=s.find("#_back_url_target").val();if("redirect"===t&&"_blank"===e)return;const a=o.data("form-target");a&&a.length&&o.find("form").attr("target",a)}(),function(){const a=e.queryString.get("affiliate");if(a){const e=t("<input/>");e.attr("type","hidden").attr("name","tve_affiliate").val(a),s.append(e)}}(),o.find(".tve-lg-err-msg").length&&function(){s.find(".tve_submit_container .thrv_icon").on("click",function(){s.submit()}),s.find(".tve-form-button .tve-form-button-submit").on("click",e=>(e.preventDefault(),e.stopPropagation(),s.submit(),0===s.find(".tve-lg-error").length&&s.find(".tve_lg_date").each(function(){t(this).find(".lg-date-picker").flatpickr().clear()}),!1));const n=d.getErrors(o),i=function(i,l,v){if(s.data("tve-force-submit"))return!0;const g=s.find(".consent-config");g.length&&!g.attr("value")&&"none"!==s.find(".tcb-lg-consent").css("display")&&s.find('[name="user_consent"]').attr("data-required",1);let m=!0;const b=t(l),y={};d.init(),b.find("input, select, textarea").each(function(){const e=t(this),a=e.data("validation"),r=parseInt(this.dataset.required);"password"===e.attr("type")&&(y[e.attr("name")]=e),"number"===e.attr("type")&&(d.validNumber(e)||(m=!1)),"country"===e.attr("data-field")&&(d.validCountry(e)||(m=!1)),"state"===e.attr("data-field")&&(d.validState(e)||(m=!1)),1===r&&(d.required(e,n.required)||(m=!1)),void 0!==a&&"none"!==a&&d[a]&&(d[a](e,n[a])||(m=!1))});const w=b.find('textarea[name="g-recaptcha-response"]');if(w.length>0&&(w.first().val()||(d.markApiError("Please validate captcha form",b.find(".tve-captcha-container"),"captcha"),setTimeout(function(){t("#tve-lg-error-container").fadeOut("slow")},5e3),m=!1)),2===Object.keys(y).length&&(d.mismatch(y,n.passwordmismatch)||(m=!1)),a.hasFileUpload()&&c){const t=c.isValid();!0!==t&&(m=!1,d.markApiError(t,c.$el,"upload"))}if(!m)return d.show(),s.find("."+d.errClass).first().trigger("focus"),!1;let k=null;const x=s.find("#_submit_option").val(),C=s.find("#_back_url_target").val(),E=s.find("#_back_url").val();if("redirect"===x&&"_blank"===C&&E){s.attr("target")&&s.removeAttr("target");let t=e.Utils.addHttp(E);"1"===s.find("#_sendParams").val()&&(t=e.Utils.appendFormParamsToURL(t,s));const a=e.Utils.isExternal(t)?"noopener,noreferrer":"noopener";k=window.open(t,"_blank",a)}"function"==typeof r.showFormLoader?r.showFormLoader():s.tve_form_loading();const T=s.parents(".thrv_lead_generation").attr("data-connection");if(["api","webhook"].includes(T)||s.parents(".tcb-registration-form").length){const l=s.find("#_autofill").val()?s.find("input").not("input[type=hidden],input[type=password]").serializeArray():"";if(o.attr("data-settings-id")||function(){const t=function(){let t="";return"true"===s.find(".tve_lg_radio").attr("data-answer-tag")?s.find(".tve_lg_radio input[type=radio]").each((e,a)=>{if(a.checked)if(a.attributes["data-custom-tag"]){const e=a.attributes["data-custom-tag"].value;t=t.length>0?t+","+e:e}else{const e=a.value;t=t.length>0?t+","+e:e}}):s.find(".tve_lg_radio input[type=radio]").each((e,a)=>{a.checked&&a.attributes["data-custom-tag"]&&(t=a.attributes["data-custom-tag"].value)}),t}(),e=function(){let t="";return"true"===s.find(".tve_lg_checkbox:not(.tcb-lg-consent)").attr("data-answer-tag")?s.find(".tve_lg_checkbox input[type=checkbox]").each((e,a)=>{if(a.checked)if(a.attributes["data-custom-tag"]){const e=a.attributes["data-custom-tag"].value;t=t.length>0?t+","+e:e}else{const e=a.value;t=t.length>0?t+","+e:e}}):s.find(".tve_lg_checkbox input[type=checkbox]").each((e,a)=>{if(a.checked&&a.attributes["data-custom-tag"]){const e=a.attributes["data-custom-tag"].value;t=t.length>0?t+","+e:e}}),t}(),a=function(){let t="";const e=s.find(".tve_lg_dropdown"),a=e.find(".tve-lg-dropdown-option.tve-state-active");return t="true"===e.attr("data-answer-tag")?a.attr("data-custom-tag")?a.length>0?a.attr("data-custom-tag"):"":a.length>0?a.attr("data-value"):"":a.length>0?a.attr("data-custom-tag"):"",t}(),r=p(t)+p(e)+p(a);var n;r.length&&(n=r,tve_frontend_options.lead_generation_custom_tag_apis.forEach(t=>{const e=s.find(`input[type=hidden]#${t}_tags`);let a=e.length>0?e.attr("value"):"";e.length&&(0===a.length&&","===n.slice(-1)&&(n=n.slice(0,-1)),a=n.replace(/['"`\\]/g,"")+a,e.attr("value",a))}))}(),"function"==typeof r.submitHandler){const t={autofillValues:l,token:v};return a.hasFileUpload()&&c&&(t.uploader=c),r.submitHandler.call(null,i,t)}const g={};t.each(s.serializeArray(),function(t,e){g[e.name]=e.value});let m=s.serialize()+"&action=tve_api_form_submit&url="+encodeURIComponent(location.href);const b=s.find("#_submit_option").val();m+="&_tcb_id="+(o.attr("data-settings-id")||"")+"&tcb_token="+(10*Date.now()).toString(32),s.find(".tve_lg_radio_wrapper input,.tve_lg_checkbox_wrapper input").each((t,e)=>{!e.name||g[e.name]||m.includes(e.name)||(g[e.name]="",m+=`&${e.name}=`)});const y=t.Event("form_conversion.tcb");s.trigger(y),y.post_data&&(m+="&"+t.param(y.post_data));const w=s.closest(".tar-main-content[data-post-id]"),x=w.length?w.attr("data-post-id"):tve_frontend_options.post_id,C=s.closest(".thrive-quiz-builder-shortcode").length>0;return x&&(m+=`&post_id=${x}`),m+=`&frontend_post_id=${tve_frontend_options.post_id}`,v&&(m+="&g-recaptcha-response="+v),a.hasFileUpload()&&c&&(m=c.appendExtraData(m)),t.ajax({type:"post",xhrFields:{withCredentials:!0},url:tve_frontend_options.ajaxurl,dataType:"json",data:m}).fail(function(){d.markApiError("An error occurred while submitting your data. Please try again").show(),s.tve_form_loading(!0)}).done(function(r){a.hasFileUpload()&&c&&c.clear(),s.find('input[type="password"]').trigger("keyup");let l="";try{var p=r.form_messages||{},v="";if(r.redirect&&(v=r.redirect,delete r.redirect),delete r.form_messages,r.variation&&delete r.variation,r.back_url){var m=r.back_url;delete r.back_url}var y=Object.keys(r).length>0&&!r.error;if("object"==typeof r.error_message&&r.error_message.length){const t=r.error_message;let a="";t.forEach(t=>{"string"==typeof t&&t.length&&(t=t.trim(),d.markApiError(t).show(),a+=t+"\n")}),s.tve_form_loading(!0),a.length&&(l=a,e.toast(a,!0))}if(r.error){if(r.error_code){const e=r.error_code,a=t.Event("lead_conversion_error_code.tcb",{form_data:g,$form:s,$leadGeneration:o,errorCode:e});if(s.trigger(a),"no_connection"===e&&C){const e=t.Event("skip_next_step.tcb",{$form:s,$leadGeneration:o});return s.trigger(e),i.preventDefault(),!1}}if("captcha"===r.field){const t=n.recaptcha||r.error;d.markApiError(t).show(),s.tve_form_loading(!0)}else u(y,p);return i.preventDefault(),!1}if(l.length)return s.tve_form_loading(!0),i.preventDefault(),!1}catch(t){console.log(t)}const w=t.Event("lead_conversion_success.tcb",{form_data:g,$form:s,$leadGeneration:o});return s.trigger(w),w.content_unlocked&&"message"!==b&&"state"!==b?(i.preventDefault(),!1):(h(),_(y,v,void 0!==m?m:"",k)?(s.tve_form_loading(!0),void f()):(f(),0===l.length&&u(y,p),!0))}).always(()=>{"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.reset&&(!tve_dash_front.recaptcha.connection||tve_dash_front.recaptcha.connection&&"v3"!==tve_dash_front.recaptcha.connection.version)&&grecaptcha.reset(),"undefined"!=typeof turnstile&&"function"==typeof turnstile.reset&&turnstile.reset()}),i.stopPropagation(),!1}const N=t.Event("should_submit_form.tcb");if(s.trigger(N),"1"!==s.find("input#_asset_option").val()&&!N.flag_need_data)return!0;let F=s.serialize()+"&action=tve_custom_form_submit&email="+function(t){if(t.find('[data-validation="email"]').length)return t.find('[data-validation="email"]').val();let e="";return t.find("input").each(function(){if(this.name&&this.name.match(/email/i))return e=this.value,!1}),e}(s)+"&name="+function(e){let a=!1;return e.find("input").each(function(){const e=t(this),r=e.attr("placeholder"),n=e.attr("name");if(r&&-1!==r.toLowerCase().indexOf("name")||n&&-1!==n.toLowerCase().indexOf("name"))return a=e,!1}),!1!==a?a.val():""}(s);const A=t.Event("form_conversion.tcb");return s.trigger(A),A.post_data&&(F+="&"+t.param(A.post_data)),tve_frontend_options.post_id&&(F+="&post_id="+tve_frontend_options.post_id),t.ajax({type:"post",xhrFields:{withCredentials:!0},url:tve_frontend_options.ajaxurl,data:F}).always(function(){s.find("input,select,textarea").removeAttr("disabled"),s.find(".tve-form-button").removeClass("tar-disabled"),s.data("tve-force-submit",!0).submit()}),!1};s.on("submit",function(e){const a=this;return t(this).find(".tve-captcha-container").length&&tve_dash_front.recaptcha.connection&&"v3"===tve_dash_front.recaptcha.connection.version?(grecaptcha.ready(function(){grecaptcha.execute(tve_dash_front.recaptcha.site_key,{action:"submit"}).then(function(t){i(e,a,t)})}),!1):i(e,a)})}()})},e.setModuleLoadedStatus("lead-generation",!0)})(ThriveGlobal.$j,TCB_Front);
void 0===TCB_Front.js_modules.dropdown&&TCB_Front.setModuleLoadedStatus("dropdown",!1),(t=>{if(TCB_Front.isModuleLoaded("dropdown"))return;const e=".tve_lg_dropdown, .tcb-form-dropdown, .tve-dynamic-dropdown";t(window).on("tcb_after_dom_ready",()=>{if(!TCB_Front.Utils.isEditorPage()){const e=t(TCB_Front.Utils.isEditorPage()?"#tve_editor":"body");TCB_Front.Utils.initDropdown(e)}}),TCB_Front.Utils.initDropdown=o=>{t(".tve_lg_dropdown .tve-lg-dropdown-trigger, .tcb-form-dropdown .tve-lg-dropdown-trigger, .tve-dynamic-dropdown .tve-lg-dropdown-trigger").each(function(){t(this).attr("tabindex",-1).removeAttr("href").siblings("input").attr("style","position: absolute; opacity: 0;").attr("autocomplete","off")});let n="";const d=function(){n="",t(".tve-lg-dropdown-search").length&&t(".tve-lg-dropdown-search").val(""),t(".tve-lg-dropdown-option.tve-state-hover,.tve-dynamic-dropdown-option.tve-state-hover").removeClass("tve-state-hover")},r=function(t,e){e.find(".tve-lg-dropdown-trigger").find(".tve-disabled-text-inner").html(t.text()),e.find("input").attr("value",t.attr("data-value")).val(t.attr("data-value")),e.find(".tve-state-active").removeClass("tve-state-active tve-state-hover"),t.addClass("tve-state-active tve-state-hover"),e.find(".tve-lg-dropdown-list").animate({scrollTop:t.prevAll().length*t.outerHeight()},100),e.find("input").trigger("change"),e.trigger("tcb.dropdown_value_changed")};o.off("mousedown.dropdownclick").on("mousedown.dropdownclick",e,function(o){const n=t(o.currentTarget).next();if(n.hasClass("tve-lg-dropdown-message-after")&&n.remove(),o.currentTarget.classList.contains("tve-lg-field-disabled")){if(o.currentTarget.dataset.tveMessages){const e=JSON.parse(o.currentTarget.dataset.tveMessages);if(e.disabledReasonMessage){const n=document.createElement("div");n.classList.add("tve-lg-dropdown-message-after"),n.innerHTML=e.disabledReasonMessage,t(n).insertAfter(o.currentTarget)}}return}if(o.target.classList.contains("tve-lg-dropdown-input"))return;const d=t(this).closest(e),r=d.find(".tve-lg-dropdown-search");if(d.toggleClass("tve-state-expanded"),d.hasClass("tve-state-expanded")&&(r.length>0?r.find("input").trigger("focus"):d.find("input").trigger("focus")),o.target.classList.contains("tve-lg-dropdown-list")||o.target.closest(".tve-lg-dropdown-search"))return d.find(".tve-lg-dropdown-search input").trigger("focus"),!1;d.find(".tve-lg-dropdown-search").toggleClass("tve_display"),r.length&&d.find(".tve-lg-dropdown-search input").val(""),o.stopPropagation(),o.preventDefault()}).off("blur.dropdownblur").on("blur.dropdownblur",".tve_lg_dropdown input, .tcb-form-dropdown input, .tve-dynamic-dropdown input",function(o){o.stopPropagation(),o.preventDefault(),d(),this.closest(e).classList.remove("tve-state-expanded"),t(this).closest(e).find(".tve-lg-dropdown-search").removeClass("tve_display")}).off("keydown.dropdownkeypress").on("keydown.dropdownkeypress",".tve_lg_dropdown input, .tcb-form-dropdown input, .tve-dynamic-dropdown input",function(t){if(13===t.keyCode)return t.preventDefault(),!1}).off("keyup.dropdownkeypress").on("keyup.dropdownkeypress",".tve_lg_dropdown input, .tcb-form-dropdown input, .tve-dynamic-dropdown input",function(o){const s=t(this).closest(e),a=s.find(".tve-state-active"),i=s.find(".tve-lg-dropdown-search");switch(0===i.length&&9!==o.keyCode&&(o.stopPropagation(),o.preventDefault()),o.keyCode){case 13:s.toggleClass("tve-state-expanded"),i.length&&i.toggleClass("tve_display"),d();break;case 38:0===a.length?r(s.find(".tve-lg-dropdown-option,.tve-dynamic-dropdown-option").last(),s):a.prev().length&&r(a.prev(),s);break;case 40:0===a.length?r(s.find(".tve-lg-dropdown-option,.tve-dynamic-dropdown-option").first(),s):a.next().length&&r(a.next(),s);break;default:if(0===i.length?n+=String.fromCharCode(o.keyCode).toLowerCase():n=s.find(".tve-lg-dropdown-input").val().toLowerCase(),t(".tve-lg-dropdown-option.tve-state-hover,.tve-dynamic-dropdown-option.tve-state-hover").removeClass("tve-state-hover"),""===n)s.find(".tve-lg-dropdown-list").animate({scrollTop:0},300);else{const e=".tve-lg-dropdown-option, .tve-dynamic-dropdown-option",o=t(".tve-lg-dropdown-list"),d=t=>{o.animate({scrollTop:t.prevAll().length*t.outerHeight()},100),t.addClass("tve-state-hover")},r=s.find(e).filter(function(){return this.dataset.value.toLowerCase().startsWith(n)}).first(),a=r.length?t():s.find(e).filter(function(){return this.dataset.value.toLowerCase().includes(n)}).first();r.length?d(r):a.length&&d(a)}}}),o.off("mousedown.dropdownoptionclick").on("mousedown.dropdownoptionclick",".tve-lg-dropdown-option,.tve-dynamic-dropdown-option",function(o){o.stopPropagation(),o.preventDefault();const n=t(this),d=n.closest(e);r(n,d),d.removeClass("tve-state-expanded"),this.dataset.customOption&&d.find("input").trigger("changevalue.tveDropdown",this)})},TCB_Front.setModuleLoadedStatus("dropdown",!0)})(ThriveGlobal.$j);
(()=>{window.TL_Front=window.TL_Front||{},window.ThriveGlobal=window.ThriveGlobal||{$j:jQuery.noConflict()};var e=".thrv_responsive_video iframe, .thrv_custom_html_shortcode iframe",t=".thrv_responsive_video video source",o=!1,r="undefined"!=typeof TL_Const&&TL_Const.trigger_based_form_types?TL_Const.trigger_based_form_types:["lightbox","screen_filler","slide_in","ribbon"],n=["shortcode_"];TL_Front.add_page_css=function(e){ThriveGlobal.$j.each(e,(function(e,t){if(e+="-css",-1!==(t=t.replace(/^http(s)?:\/\//,"//")).indexOf("thrive_flat")){var o=document.createElement("div");if(o.classList.add("tve-cb"),document.body.append(o),"both"===getComputedStyle(o).clear)return void o.remove();o.remove()}ThriveGlobal.$j("#"+e).length||ThriveGlobal.$j('link[href="http:'+t+'"]').length||ThriveGlobal.$j('link[href="https:'+t+'"]').length||ThriveGlobal.$j('<link rel="stylesheet" id="'+e+'" type="text/css" href="'+t+'"/>').prependTo("head")}))},TL_Front.lightspeed_assets=function(e){var t=function(){return ThriveGlobal.$j('link[href*="thrive_flat.css"]').length>0},r=[];if(e.css){if(e.css.files)for(var n in e.css.files){var i="flat"===n;(!t()&&i||!i)&&ThriveGlobal.$j('<link rel="stylesheet" href="'+e.css.files[n]+'"/>').prependTo("head")}e.css.inline&&e.css.inline.length&&e.css.inline.forEach((function(e){t()||ThriveGlobal.$j(e).prependTo("head")}))}if(e.js)for(var s in e.js)TCB_Front&&!TCB_Front.isModuleLoaded(s)&&r.push(s);!function t(){if(r.length){var n=r.shift();TL_Front.add_head_script(e.js[n],"tl-lightspeed-"+n,t)}else o=!0}()},TL_Front.conditional_display=function(e){void 0!==e&&e.lazy_load_conditional_preview&&tcb_condition_sets&&e.lazy_load_conditional_preview.forEach((function(e){-1===tcb_condition_sets.findIndex((function(t){return t.key===e.key}))&&tcb_condition_sets.push(e)}))},TL_Front.$document=ThriveGlobal.$j(document),TL_Front.extendConst=function(e){TL_Const.current_screen&&delete e.current_screen,ThriveGlobal.$j.extend(!0,TL_Const,e)},TL_Front.document_write=function(e){ThriveGlobal.$j("body").append(e)},TL_Front.add_head_script=function(e,t,o){var r=document.createElement("script"),n=ThriveGlobal.$j("head")[0];r.async=!0,"function"==typeof o&&(r.onload=r.onreadystatechange=o),void 0!==t&&(r.id=t),r.src=e,n.insertBefore(r,n.firstChild)},TL_Front.add_page_js=function(e,t){"function"!=typeof t&&(t=function(){});var o=0;ThriveGlobal.$j.each(e,(function(e,t){if("tve_frontend"===e&&"undefined"!=typeof TCB_Front)return!0;if(e+="-js",t&&!ThriveGlobal.$j("#"+e).length&&!ThriveGlobal.$j('script[src="'+t+'"]').length){if(o++,-1!==t.indexOf("connect.facebook.net"))return TL_Front.add_head_script(t,e,(function(){o--})),!0;ThriveGlobal.$j.getScript(t,(function(){o--}))}})),function e(){0!==o?setTimeout(e,50):t()}()},TL_Front.send_impression=function(e,t){if(e){t=t||{};var o={security:TL_Const.security,action:TL_Const.action_impression,tl_data:e,current_screen:TL_Const.current_screen};ThriveGlobal.$j.each(TL_Const.custom_post_data,(function(e,t){o[e]=t})),t.useBatching&&window.TVE_Dash&&!TVE_Dash.ajax_sent?TVE_Dash.add_load_item("tl_impression",o):ThriveGlobal.$j.post(TL_Const.ajax_url,o)}},TL_Front.isViewportBasedForm=function(e){return n.some((function(t){return 0===e.indexOf(t)}))},TL_Front.setupViewportImpressions=function(e){e&&0!==Object.keys(e).length&&(TL_Front.deferred_impressions=TL_Front.deferred_impressions||{},TL_Front.viewport_impressions=TL_Front.viewport_impressions||{},Object.keys(e).forEach((function(t){TL_Front.isViewportBasedForm(t)?TL_Front.viewport_impressions[t]=e[t]:-1!==r.indexOf(t)&&(TL_Front.deferred_impressions[t]=e[t])})))},TL_Front.do_impression=function(){if(TL_Front.impressions_data){var e={},t={};Object.keys(TL_Front.impressions_data).forEach((function(o){-1!==r.indexOf(o)||TL_Front.isViewportBasedForm(o)?t[o]=TL_Front.impressions_data[o]:e[o]=TL_Front.impressions_data[o]})),Object.keys(t).length>0&&(TL_Front.setupViewportImpressions(t),TL_Front.initViewportObservers()),Object.keys(e).length>0&&TL_Front.send_impression(e,{useBatching:!0})}},TL_Front.initViewportObservers=function(){TL_Front.viewport_impressions&&0!==Object.keys(TL_Front.viewport_impressions).length&&("IntersectionObserver"in window?(TL_Front.viewportObserver||(TL_Front.viewportObserverInitialCallbacks=TL_Front.viewportObserverInitialCallbacks||new WeakMap,TL_Front.viewportObservedElements=TL_Front.viewportObservedElements||new WeakSet,TL_Front.viewportObserver=new IntersectionObserver((function(e){e.forEach((function(e){var t=e.target;if(TL_Front.viewportObserverInitialCallbacks.has(t)){if(e.isIntersecting){var o=ThriveGlobal.$j(t),r=o.attr("data-tl-type")||o.closest(".tve-leads-conversion-object").attr("data-tl-type");r&&TL_Front.viewport_impressions[r]&&(TL_Front.trackViewportImpression(r),TL_Front.viewportObserver.unobserve(t),TL_Front.viewportObservedElements.delete(t))}}else TL_Front.viewportObserverInitialCallbacks.set(t,!0)}))}),{threshold:.5})),Object.keys(TL_Front.viewport_impressions).forEach((function(e){if(!TL_Front.viewport_impressions[e]._tracked){var t=ThriveGlobal.$j('.tve-leads-conversion-object[data-tl-type="'+e+'"]');if(t.length){var o=t[0];TL_Front.viewportObservedElements.has(o)||(TL_Front.viewportObservedElements.add(o),TL_Front.viewportObserver.observe(o))}}}))):Object.keys(TL_Front.viewport_impressions).forEach((function(e){TL_Front.trackViewportImpression(e)})))},TL_Front.trackViewportImpression=function(e){if(e&&TL_Front.viewport_impressions&&TL_Front.viewport_impressions[e]&&!TL_Front.viewport_impressions[e]._tracked){TL_Front.viewport_impressions[e]._tracked=!0;var t={};t[e]=TL_Front.viewport_impressions[e],TL_Front.send_impression(t)}},TL_Front.do_trigger_based_impression=function(e){if(e&&TL_Front.deferred_impressions&&TL_Front.deferred_impressions[e]&&!TL_Front.deferred_impressions[e]._tracked){TL_Front.deferred_impressions[e]._tracked=!0;var t={};t[e]=TL_Front.deferred_impressions[e],TL_Front.send_impression(t)}},TL_Front.do_two_step_impression=function(e){if(TL_Const&&TL_Const.forms&&TL_Const.forms[e]){var t=TL_Const.forms[e],o={};o[e]={group_id:t.main_group_id,form_type_id:t.form_type_id,variation_key:t._key,active_test_id:t.active_test_id||null},TL_Front.send_impression(o)}},TL_Front.maybe_track_two_step_impression=function(e){if(e&&-1!==e.indexOf("2step-")&&TL_Const&&TL_Const.forms){var t=e.replace("tve-leads-track-2step-",""),o=Object.keys(TL_Const.forms).find((function(e){return 0===e.indexOf("two_step_")&&TL_Const.forms[e]._key===t}));o&&TL_Front.do_two_step_impression(o)}},ThriveGlobal.$j((function(){if("undefined"!=typeof TL_Const){if(ThriveGlobal.$j(".tve-leads-screen-filler iframe, .tve-leads-ribbon iframe").not(".thrv_social_default iframe").not(".tcb-dr-done").each((function(){var e=ThriveGlobal.$j(this).addClass("tcb-dr-done");e.attr("src")&&e.attr("data-src",e.attr("src")),e.attr("src","")})),"undefined"!=typeof TCB_Front&&ThriveGlobal.$j(TCB_Front).on("content_loaded.thrive",(function(e,t){t.find(".tve-tl-anim").each((function(){var e=ThriveGlobal.$j(this);ThriveGlobal.$j(TL_Front).trigger("showform.thriveleads",{$target:e})}))})),ThriveGlobal.$j(window).on("tcb_after_dom_ready",(function(){if(!tve_frontend_options.is_editor_page){var e=TCB_Front.queryString.get("post_type");e&&"tve_lead_2s_lightbox"===e&&setTimeout((function(){TCB_Front.handleIframes(ThriveGlobal.$j(".tve_p_lb_content"))}),100)}})),ThriveGlobal.$j(TL_Front).on("showform.thriveleads",(function(o,n){var i,s=n.$target?n.$target:ThriveGlobal.$j("."+n.form_id);s.length&&(n.TargetEvent&&"exit"===n.TargetEvent.tve_trigger&&s.data("shown-on-exit")||(n.first&&(s=s.first()),s.attr("data-s-state")&&(s=s.closest(".tl-states-root").find('[data-state="'+s.attr("data-s-state")+'"] .tl-lb-target')),n&&n.$parentStateEl&&s.closest(".tl-style").first().data("parentStateEl",n.$parentStateEl),i=s.hasClass("tve-tl-anim")?s:s.find(".tve-tl-anim"),s.css("display",""),setTimeout((function(){i.addClass("tve-leads-triggered"),TL_Front.handle_typefocus(i,"start"),ThriveGlobal.$j(".tve_post_grid_masonry").length&&TCB_Front.postGridLayout()}),0),TL_Front.maybe_track_two_step_impression(n.form_id),n.form_type&&-1!==r.indexOf(n.form_type)&&TL_Front.do_trigger_based_impression(n.form_type),"function"==typeof TL_Front["open_"+n.form_type]?TL_Front["open_"+n.form_type](s,n.TargetEvent):s.show(),TCB_Front.resizePageSection(),s.on("switchstate",(function(e,t){t.offset().top-ThriveGlobal.$j(window).scrollTop()+t.outerHeight()<0&&ThriveGlobal.$j("html, body").animate({scrollTop:t.offset().top+"px"},50),TCB_Front.resizePageSection()})),setTimeout((function(){s.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src")&&e.attr("src",e.attr("data-src"))}))}),200)))})),ThriveGlobal.$j("body").on("click",".tve-ribbon-close",(function(){var o=ThriveGlobal.$j(this).closest(".tve-leads-ribbon"),r=o.data("position");o.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src",e.attr("src")),e.attr("src","")})),o.removeClass("tve-leads-triggered"),"top"===r?ThriveGlobal.$j("body").animate({marginTop:0},200,(function(){document.body.style.removeProperty("margin-top"),TCB_Front&&TCB_Front.$window&&TCB_Front.$window.trigger("scroll")})):"bottom"===r&&ThriveGlobal.$j("body").animate({marginBottom:"0px"},200,(function(){document.body.style.removeProperty("margin-bottom")})),TL_Front.handle_typefocus(o,"pause"),setTimeout((function(){o.css(r,"")}),400),ThriveGlobal.$j("#tve-lg-error-container").hide()})),ThriveGlobal.$j(window).on("conditional_display_loaded",(function(){var e=Object.keys(TL_Front.contentHtml||{});e.length&&e.forEach((function(e){var t=ThriveGlobal.$j(".tl-placeholder-f-type-".concat(e));if(t.length){var o=ThriveGlobal.$j(TL_Front.contentHtml[e]);t.replaceWith(o),setTimeout((function(){ThriveGlobal.$j(TL_Front).trigger("showform.thriveleads",{$target:o})}))}}))})),ThriveGlobal.$j(TCB_Front).on("tl-ajax-loaded",(function(){TL_Front.viewport_impressions&&Object.keys(TL_Front.viewport_impressions).length>0&&(window.requestAnimationFrame?requestAnimationFrame((function(){TL_Front.initViewportObservers()})):TL_Front.initViewportObservers())})),TL_Const.ajax_load||TL_Front.do_impression(),TL_Front.ajax_load_callback=function(e,t){if(t&&TL_Front.conditional_display(t),e&&e.res&&e.js&&e.html){var r,i;if(TL_Front.lightspeed_assets(e.lightspeed||{}),TL_Front.add_page_css(e.res.css),TL_Front.add_page_css(e.res.fonts),e.html&&(e.html.widget||ThriveGlobal.$j(".tl-widget-container").remove(),ThriveGlobal.$j.each(e.html,(function(t,o){if(!o)return!0;if(TL_Front.contentHtml=TL_Front.contentHtml||{},TL_Front.contentHtml[t]=o,"in_content"===t){var r=parseInt(e.in_content_pos),n="after",i=ThriveGlobal.$j(".tve-tl-cnt-wrap");i.length||(i=ThriveGlobal.$j("#tve_editor.tar-main-content")),i.length||(i=ThriveGlobal.$j("#post_content"));var s=i.find("p").filter(":visible").not(".thrv_table p, form p, .tcb-post-list p, .thrv_text_element div p, p.wp-caption-text, .thrv_responsive_video p, .thrv_header p");0===s.length&&0===r?i.prepend(o):(0===r&&(r=1,n="before"),s.eq(r-1)[n](o))}else{var a=ThriveGlobal.$j(".tl-placeholder-f-type-"+t);if(e.js[t]&&e.js[t].content_locking){var l=a.parents(".tve_content_lock").first();if(e.js[t].has_conversion)return a.remove(),l.removeClass("tve_lock_hide"),!0;"tve_lock_blur"===e.js[t].lock&&l.removeClass("tve_lock_hide").addClass(e.js[t].lock)}"widget"===t?a.hasClass("tl-preload-form")?a.first().replaceWith(ThriveGlobal.$j(o).addClass("tve-leads-triggered")):(a.replaceWith(o),ThriveGlobal.$j(".tl-widget-container").children().unwrap()):a.replaceWith(o),0===t.indexOf("two_step")&&(c=t,ThriveGlobal.$j(".tl-2step-trigger-".concat(c.replace("two_step_",""))).show())}var c})),i=-1,"Microsoft Internet Explorer"==navigator.appName?(r=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(i=parseFloat(RegExp.$1))):"Netscape"==navigator.appName&&(r=navigator.userAgent,null!==new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(i=parseFloat(RegExp.$1))),i>0&&setTimeout((function(){var e="";ThriveGlobal.$j("body style.tve_custom_style").each((function(){e=this.innerText,this.innerText=e}))}))),e.body_end){var a=ThriveGlobal.$j(e.body_end);a.find(".tve_wistia_popover").each((function(){ThriveGlobal.$j("#"+this.id).length&&this.parentNode.removeChild(this)})),a.filter("link[href]").each((function(){ThriveGlobal.$j('link[href="'+this.getAttribute("href")+'"]').length&&(a=a.not(this))})),a.filter("script[src]").each((function(){ThriveGlobal.$j('script[src="'+this.getAttribute("src")+'"]').length&&(a=a.not(this))}));try{ThriveGlobal.$j("body").append(a)}catch(e){console.log("Body append: "+e)}}void 0!==e.js.TVO_Form&&(TVO_Form=e.js.TVO_Form),TL_Front.add_page_js(e.res.js,(function(){n=!0})),setTimeout((function e(){n&&o?(TCB_Front.event_triggers(ThriveGlobal.$j("body")),TCB_Front.onDOMReady(),s(),ThriveGlobal.$j(TCB_Front).trigger("tl-ajax-loaded"),TCB_Front.add_scroll_callback((function(){var e=ThriveGlobal.$j('.tve-leads-ribbon[data-position="top"]'),t=e.find(".tve_shortcode_editor"),o=e.is(":visible")&&Number(e.css("opacity"))?Math.max(e.outerHeight(),t.outerHeight()):0,r=ThriveGlobal.$j('[data-elementor-type="header"] .elementor-top-section.elementor-sticky.elementor-sticky--active');r.length||(r=ThriveGlobal.$j(".she-header")),r.length&&r[0].style.setProperty("margin-top",o+"px","important")}))):setTimeout(e,50)}),50),TL_Const.forms=e.js,e.deferred_impressions&&TL_Front.setupViewportImpressions(e.deferred_impressions),setTimeout((function(){ThriveGlobal.$j(".tl-preload-form").remove()}),1e3)}},TL_Const.ajax_load){var n=!1,i=(ThriveGlobal.$j(".tve-leads-two-step-trigger").hide(),{tcb_js:"undefined"!=typeof TCB_Front?1:0,main_group_id:TL_Const.main_group_id,shortcode_ids:TL_Const.shortcode_ids,two_step_ids:TL_Const.two_step_ids,action:"tve_leads_ajax_load_forms",security:TL_Const.security,display_options:TL_Const.display_options,current_screen:TL_Const.current_screen});return ThriveGlobal.$j.each(TL_Const.custom_post_data,(function(e,t){i[e]=t})),void(window.TVE_Dash&&!TVE_Dash.ajax_sent?ThriveGlobal.$j(document).on("tve-dash.load",(function(e){TVE_Dash.add_load_item("tl_lazy_load",i,TL_Front.ajax_load_callback)})):ThriveGlobal.$j.ajax({url:TL_Const.ajax_url,type:"post",dataType:"json",data:i,xhrFields:{withCredentials:!0}}).done(TL_Front.ajax_load_callback))}s()}function s(){if(!TL_Const.forms)return!1;function e(e){if(e.find('[data-validation="email"]').length)return e.find('[data-validation="email"]').val();var t="";return e.find("input").each((function(){if(this.name&&this.name.match(/email/i))return t=this.value,!1})),t}ThriveGlobal.$j("body").on("submit",".tve-leads-conversion-object form",(function(t){var o=ThriveGlobal.$j(this),r=o.parents(".tve-leads-conversion-object").first().attr("data-tl-type"),n={};if(o.data("tve-force-submit")||o.closest(".thrv_custom_html_shortcode").length||o.data("tl-do-submit")||!r||!TL_Const.forms[r]||function(e){var t=e.attr("id"),o=window.fluentFormVars,r=!1;return o&&o.forms&&(r=o.forms.some((function(e){return e.form_id_selector===t}))),r}(o)||function(e){var t=e.attr("id");return t&&t.includes("happyforms")&&window.HappyForms}(o))return!0;o.tve_form_loading(),o.find("input").each((function(){var e=ThriveGlobal.$j(this),t=e.attr("name");void 0!==t&&-1===TL_Const.ignored_fields.indexOf(t)&&(n[e.attr("name")]=e.val())}));var i={security:TL_Const.security,action:TL_Const.action_conversion,type:r,tl_data:TL_Const.forms[r],custom_fields:n,email:e(o),current_screen:TL_Const.current_screen};return ThriveGlobal.$j.each(TL_Const.custom_post_data,(function(e,t){i[e]=t})),ThriveGlobal.$j.ajax({url:TL_Const.ajax_url,data:i,type:"post",xhrFields:{withCredentials:!0}}).always((function(){void 0===o.attr("action")?location.reload():o.data("tve-force-submit",!0).submit()})),!1})),ThriveGlobal.$j("body").on("form_conversion.tcb",".tve-leads-conversion-object form",(function(e){var t=ThriveGlobal.$j(this).parents(".tve-leads-conversion-object").first().attr("data-tl-type");if(!t||!TL_Const.hasOwnProperty("forms")||!TL_Const.forms[t])return!0;var o={type:t,tl_data:TL_Const.forms[t],current_screen:TL_Const.current_screen};ThriveGlobal.$j.each(TL_Const.custom_post_data,(function(e,t){o[e]=t})),e.post_data=e.post_data||{},e.post_data.thrive_leads=o})).on("lead_conversion_success.tcb",".tve_lead_lock_shortcode form, .tve_post_lightbox form",(function(e){var t=ThriveGlobal.$j(this),o=t.parents(".tve_content_lock");if(t.closest(".tve_post_lightbox").length){var r=t.closest(".tve-leads-conversion-object").attr("data-tl-type");TL_Front.parent_state&&TL_Front.parent_state.parent().hasClass("tve-leads-track-"+r)&&(o=TL_Front.parent_state.closest(".tve_content_lock"))}o.length&&o.hasClass("tve_content_lock")&&(o.removeClass("tve_lead_lock").find(".tve_lead_lock_shortcode").remove(),o.find(".tve_lead_locked_overlay").remove(),e.content_unlocked=!0)})).on("leads_states.tcb",".tve-leads-conversion-object form",(function(e,t){var o=ThriveGlobal.$j(this);switch(o.find("#_form_type").val()){case"ribbon":var r=o.parents(".tve-leads-ribbon");o.parents(".tve_shortcode_editor").empty().html(t),TL_Front.open_ribbon(r);break;case"lightbox":case"tve_lead_2s_lightbox":o.parents(".tve_p_lb_control").empty().html(t);break;case"widget":case"in-content":case"post-footer":case"php-insert":o.parents(".tve_shortcode_editor").empty().html(t);break;case"slide-in":var n=o.parents(".tve-leads-slide-in");o.parents(".tve_shortcode_editor").empty().html(t),TL_Front.open_slide_in(n);break;case"screen-filler-lightbox":var i=o.parents(".tve-leads-screen-filler");o.parents(".tve_shortcode_editor").empty().html(t),TL_Front.open_screen_filler(i);break;case"scroll-mat":r=o.parents(".tve-leads-greedy_ribbon"),o.parents(".tve_shortcode_editor").empty().html(t),TL_Front.open_ribbon(r);break;case"tve_lead_shortcode":o.parents(".tve-leads-shortcode").empty().html(t);break;default:e.change_states=!1}e.change_states=!0})).on("leads_messages.tcb",".tve-leads-conversion-object form",(function(e){var t=ThriveGlobal.$j(this);switch(t.find("#_form_type").val()){case"tve_lead_shortcode":e.lightbox_state&&t.parents(".tve-leads-shortcode").hide();break;case"ribbon":t.parents(".thrv-ribbon").find(".tve-ribbon-close").click();break;case"lightbox":case"tve_lead_2s_lightbox":t.parents(".tve_p_lb_content").find(".tve_p_lb_close").click(),t.parents(".tve-leads-screen-filler").find(".tve-screen-filler-close").click();break;case"slide-in":t.parents(".thrv-leads-slide-in").find(".tve-leads-close").click();break;case"screen-filler-lightbox":t.parents(".tve-leads-screen-filler").find(".tve-screen-filler-close").click();break;case"scroll-mat":t.parents(".thrv-greedy-ribbon").find(".tve_et_click").click();break;default:t.find('input:not(:hidden):not([type="checkbox"]):not([type="radio"])').val("")}t.parents(".tve-leads-conversion-object").find(".tve_ea_thrive_leads_form_close").click(),TL_Front.parent_state&&TL_Front.close_form(TL_Front.parent_state)})),TL_Front.$document.on("switchstate",(function(e,t){t.find("script.tcb-lazyload-template").each((function(){ThriveGlobal.$j(this).replaceWith(this.innerHTML)}))}))}})),TL_Front.switch_lightbox_state=function(e,t){return e.find(".tve_p_lb_overlay").css("opacity","0.8"),e.find(".tve_p_lb_content").css("top",t.find(".tve_p_lb_content").css("top")).addClass("tve-leads-triggered"),window.tve_lb_switch_state=!0,TL_Front.open_lightbox(e.find(".tl-lb-target"))},TL_Front.close_lightbox=function(){var o=ThriveGlobal.$j("body"),r=ThriveGlobal.$j("html"),n="tve-o-hidden tve-l-open tve-hide-overflow",i=arguments[0]||o.data("tl-open-lightbox");i&&i.length&&(i.find(".tve-tl-anim").removeClass("tve-leads-triggered"),window.tve_lb_switch_state||(1===ThriveGlobal.$j(".tve_lb_open").length&&(o.removeClass(n).css("padding-right",""),r.removeClass(n),i.data("doc-scroll-top")?(document.documentElement.scrollTop=i.data("doc-scroll-top"),i.data("doc-scroll-top","")):i.data("bdy-scroll-top")&&(document.body.scrollTop=i.data("bdy-scroll-top"),i.data("bdy-scroll-top",""))),r.removeClass(r.data("tl-anim-class"))),window.tve_lb_switch_state=!1,setTimeout((function(){i.addClass("tve_lb_closing"),i.removeClass("tve_lb_open tve_lb_opening tve_lb_closing tve_p_lb_background").css("display","none").find("tve_p_lb_content").trigger("tve.lightbox-close")}),200),i.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);"SOURCE"===this.tagName&&e.parent("video").trigger("pause"),e.attr("data-src",e.attr("src")),e.attr("src","")})),TL_Front.handle_typefocus(i,"pause"),ThriveGlobal.$j("#tve-lg-error-container").hide())},TL_Front.open_lightbox=function(o,r){if(!o.hasClass("tve_lb_open")&&!o.hasClass("tve_lb_opening")){var n=window.tve_lb_switch_state;ThriveGlobal.$j.fn.thrive_iphone_placeholder&&o.find("input[placeholder]").thrive_iphone_placeholder(),TL_Front.close_lightbox(ThriveGlobal.$j(".tve_p_lb_background.tve_lb_open")),o.css({visibility:"",position:"",left:"",display:""}).parents(".tl-style").css({visibility:"",position:"",left:"",display:""});var i,s,a,l,c,d=ThriveGlobal.$j("body"),_=ThriveGlobal.$j("html"),v="tve-o-hidden tve-l-open tve-hide-overflow",p=(i=ThriveGlobal.$j,s={border:"none",height:"200px",margin:"0",padding:"0",width:"200px"},a=i("<div>").css(i.extend({},s)),l=i("<div>").css(i.extend({left:"-1000px",overflow:"scroll",position:"absolute",top:"-1000px"},s)).append(a).appendTo("body").scrollLeft(1e3).scrollTop(1e3),c={height:l.offset().top-a.offset().top||0,width:l.offset().left-a.offset().left||0},l.remove(),c).width,h=parseInt(d.css("paddingRight")),f=ThriveGlobal.$j(".tve_p_lb_background.tve_lb_open").length;isNaN(h)&&(h=0),o.find(".tve_p_lb_close").off().on("click",(function(){return TL_Front.close_lightbox(),!1})),d.off("keyup.tve_lb_close").on("keyup.tve_lb_close",(function(e){if(27==e.which)return TL_Front.close_lightbox(),!1})),o.find(".tve_p_lb_overlay").off("click.tve_lb_close").on("click.tve_lb_close",(function(){return TL_Front.close_lightbox(),!1})),d.data("tl-open-lightbox",o),o.addClass("tve_p_lb_background"),o.data("doc-scroll-top",document.documentElement.scrollTop),o.data("bdy-scroll-top",document.body.scrollTop),d.addClass(v),_.addClass(v);var b=window.innerHeight<ThriveGlobal.$j(document).height();!n&&b&&d.css("padding-right",h+p+"px"),o.find(e+", "+t).each((function(){var e=jQuery(this);e.attr("data-src")&&e.attr("src",e.attr("data-src"))})),o.find(".thrv_responsive_video").each((function(){var e=ThriveGlobal.$j(this);TCB_Front.makeAutoplayVideo(e)}));var T="";ThriveGlobal.$j.each(o.parents(".tl-states-root").attr("class").split(" "),(function(e,t){if(0===t.indexOf("tl-anim"))return T=t,!1})),_.addClass(T).data("tl-anim-class",T),setTimeout((function(){function e(){var e=o.find(".tve_p_lb_content").outerHeight(!0)+2*parseInt(o.css("padding-top")),t=o.find(".tve_p_lb_content"),r=window.innerHeight,n=(r-e)/2;o.find(".tve_p_lb_overlay").css({height:e+80+"px","min-height":r+"px"}),f?t.animate({top:n<40?40:n},100):t.css("top",(n<40?40:n)+"px"),e+40>r&&o.addClass("tve-scroll")}setTimeout((function(){o.addClass("tve_lb_opening")}),0),o.find("iframe").not(".thrv_social_default iframe").each((function(){var e=ThriveGlobal.$j(this);!e.data("tve_ifr_loaded")&&e.attr("data-src")&&e.data("tve_ifr_loaded",1).attr("src",e.attr("data-src"))})),TCB_Front.resizePageSection(),e(),ThriveGlobal.$j(window).on("resize",e)}),20),setTimeout((function(){o.removeClass("tve_lb_opening").addClass("tve_lb_open").find(".tve_p_lb_content").trigger("tve.lightbox-open"),o.find("form").each((function(){ThriveGlobal.$j(this).find('input[required], textarea[required], select[required], input[data-required="true"], textarea[data-required="true"], select[data-required="true"]').each((function(){var e=ThriveGlobal.$j(this);"none"===e.css("display")&&e.show(),"hidden"===e.css("visibility")&&e.css("visibility","visible"),e.parentsUntil(".tve_p_lb_content").filter((function(){return"none"===ThriveGlobal.$j(this).css("display")||"hidden"===ThriveGlobal.$j(this).css("visibility")})).show().css("visibility","visible");var t=e.attr("tabindex");t&&parseInt(t)<0&&e.removeAttr("tabindex")}))})),ThriveGlobal.$j(window).trigger("scroll")}),300),r&&r.preventDefault&&(r.preventDefault(),r.stopPropagation()),o.parents(".tl-states-root").off("switchstate").on("switchstate",(function(e,t){var o=Array.prototype.slice.call(arguments,1);TL_Front.switch_lightbox_state.apply(TL_Front,o)})),r&&"exit"===r.tve_trigger&&o.data("shown-on-exit",!0),TCB_Front.$window.trigger("tl_after_lightbox_open",o),setTimeout((function(){TCB_Front.$window.trigger("tve_after_content_toggle",[o])}),500)}},TL_Front.open_two_step_lightbox=TL_Front.open_lightbox,TL_Front.open_ribbon=function(e){function t(){e.addClass("tve-leads-triggered");var t=e.find(".tve_shortcode_editor"),o=t.length?t.outerHeight():0,r=e.attr("data-position")||"top";switch(r){case"above":e.css("bottom","auto");case"top":e.css("top",ThriveGlobal.$j("#wpadminbar").length?"32px":"0px");break;case"bottom":e.css("bottom","0px"),e.css("top","auto")}var n=0,i=Math.max(e.outerHeight(),o),s=setInterval((function(){n++;var t=Math.max(e.outerHeight(),o);t==i&&10!=n||clearInterval(s),"top"===r?(ThriveGlobal.$j("body").animate({"margin-top":t+"px"},200,(function(){document.body.style.setProperty("margin-top",t+"px","important")})),TCB_Front&&TCB_Front.$window&&TCB_Front.$window.trigger("scroll")):"bottom"===r&&ThriveGlobal.$j("body").animate({"margin-bottom":t+"px"},200)}),100),a=ThriveGlobal.$j("body").find(".thrv_header.tve-scroll-sticky");if(a.length&&"top"===r){var l=parseFloat(TCB_Front.inlineCssVariable(a,"--tcb-header-extra-offset"))||0;TCB_Front.inlineCssVariable(a,"--tcb-header-extra-offset",l+i+"px")}e.off("switchstate").on("switchstate",(function(e,t){var o=Array.prototype.slice.call(arguments,1);TL_Front.switch_ribbon_state.apply(TL_Front,o)}))}TL_Const.forms.greedy_ribbon?(TL_Const.close_callbacks=TL_Const.close_callbacks||{},TL_Const.close_callbacks.greedy_ribbon=[t]):t()},TL_Front.switch_ribbon_state=function(e){var t=e.outerHeight(!0),o={};o["top"===e.parent().attr("data-position")?"margin-top":"margin-bottom"]=t+"px",e.find(".tve-tl-anim").removeClass((function(e,t){return(t.match(/(^|\s)tl-anim-\S+/g)||[]).join(" ")})).removeClass("tve-tl-anim"),ThriveGlobal.$j("body").animate(o,200)},TL_Front.open_greedy_ribbon=function(o){var r=ThriveGlobal.$j("body"),n=ThriveGlobal.$j(window),i=r.css("position");n.scrollTop(0),r.css("position","static"),r.addClass("tve-tl-gr-anim"),TCB_Front.$window.trigger("scroll"),o.css("top",ThriveGlobal.$j("#wpadminbar").length?"32px":"0px");var s=o.outerHeight();r[0].style.setProperty("margin-top",s+"px","important");var a=1;setTimeout((function(){ThriveGlobal.$j('.tve-leads-ribbon[data-position="top"]').removeClass("tve-leads-triggered")}),50),n.scroll((function(){var l=r.hasClass("tve-tl-gr-anim");if(a&&l){var c=n.scrollTop();if(c>s){(o.find(".tve_ea_thrive_wistia").length||o.find(".tve_with_wistia_popover"))&&ThriveGlobal.$j(".wistia_placebo_close_button").trigger("click"),r.removeClass("tve-tl-gr-anim"),o.addClass("tve-no-animation");var d=c-s;o.removeClass("tve-leads-triggered"),o.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src",e.attr("src")),e.attr("src","")})),r.css("margin-top",""),r.css("position",i),n.scrollTop(d),o.removeClass("tve-no-animation"),a=0,TL_Front.form_closed("greedy_ribbon"),TL_Const.forms.greedy_ribbon.allow_callbacks=!1}}})),o.off("switchstate").on("switchstate",(function(e,t){}))},TL_Front.open_screen_filler=function(o,r){var n="tve-so-hidden tve-sl-open tve-s-hide-overflow",i=ThriveGlobal.$j("html,body"),s=ThriveGlobal.$j("html");if(ThriveGlobal.$j.fn.thrive_iphone_placeholder&&o.find("input[placeholder]").thrive_iphone_placeholder(),o.css("top",ThriveGlobal.$j("#wpadminbar").length?"32px":"0px").css("visibility",""),!0===o.hasClass("stl-anim-slip_from_top")){var a=ThriveGlobal.$j(window).scrollTop();o.css("top",a).css("visibility","")}o.find(".tve-screen-filler-close").on("click",(function(){c(o)})),o.data("doc-scroll-top",document.documentElement.scrollTop),o.data("bdy-scroll-top",document.body.scrollTop),"none"!==o.find(".thrv-leads-screen-filler.thrv_wrapper ").css("display")&&i.addClass(n);var l="";function c(o){o.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src",e.attr("src")),e.attr("src","")})),o.removeClass("tve-leads-triggered"),TL_Front.handle_typefocus(o,"pause"),ThriveGlobal.$j(document).off("keyup.close-screenfiller"),0==ThriveGlobal.$j.find(".tve-leads-ribbon").length&&ThriveGlobal.$j("body").animate({"margin-top":"0px"},200),i.removeClass(n),s.removeClass(s.data("tl-s-anim-class")),setTimeout((function(){o.css("top","").hide(),"none"===o.css("display")&&(i.removeClass(n),o.removeClass("tve-leads-triggered"))}),400),o.data("doc-scroll-top")?(document.documentElement.scrollTop=o.data("doc-scroll-top"),o.data("doc-scroll-top","")):o.data("bdy-scroll-top")&&(document.body.scrollTop=o.data("bdy-scroll-top"),o.data("bdy-scroll-top","")),ThriveGlobal.$j("#tve-lg-error-container").hide()}ThriveGlobal.$j.each(o.attr("class").split(" "),(function(e,t){if(0===t.indexOf("stl-anim"))return l=t,!1})),s.addClass(l).data("tl-s-anim-class",l);var d=o.find("> .tl-style").hide(),_=o.find('> .tl-style[data-form-state="already_subscribed"]');_.length?_.show():d.first().show(),TL_Front.close_screen_filler=c,r&&r.preventDefault&&(r.preventDefault(),r.stopPropagation()),ThriveGlobal.$j(document).off("keyup.close-screenfiller").on("keyup.close-screenfiller",(function(e){27==e.which&&c(o)})),o.find(e+", "+t).each((function(){var e=jQuery(this);e.attr("data-src")&&e.attr("src",e.attr("data-src"))})),setTimeout((function(){TCB_Front.resizePageSection()}),500)},TL_Front.switch_slide_in_state=function(e){e.find(".tve-tl-anim").removeClass((function(e,t){return(t.match(/(^|\s)tl-anim-\S+/g)||[]).join(" ")})).removeClass("tve-tl-anim"),TL_Front.slide_in_position(e.find(".thrv-leads-slide-in"))},TL_Front.slide_in_position=function(e){var t=ThriveGlobal.$j(window),o=e.outerHeight();if(t.width()<=782||t.height()<o){e.parents(".tve-leads-slide-in").addClass("tve-lb");var r=t.height();setTimeout((function(){var t;t=e.parents(".tve-leads-slide-in").is('[class*="bot"]')?r-o:0,e.closest(".tve-leads-slide-in").data("doc-scroll-top",document.documentElement.scrollTop).data("bdy-scroll-top",document.body.scrollTop),e.parents(".tve-leads-conversion-object").first().css({height:o+80+"px","min-height":r+"px"}),e.css("top",(t<40?40:t)+"px"),o+40>r&&e.parents(".tve-leads-slide-in").css("overflow-y","scroll")}),0)}},TL_Front.open_slide_in=function(o,r){var n="tve-o-hidden tve-l-open tve-hide-overflow",i=ThriveGlobal.$j("body"),s=ThriveGlobal.$j("html");function a(r){r.removeClass("tve-leads-triggered"),TL_Front.handle_typefocus(r,"pause"),ThriveGlobal.$j(document).off("keyup.close-slidein"),ThriveGlobal.$j(".tve_lb_open").length||(i.removeClass(n),s.removeClass(n)),r.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src",e.attr("src")),e.attr("src","")})),ThriveGlobal.$j("#tve-lg-error-container").hide(),o.data("doc-scroll-top")?(document.documentElement.scrollTop=o.data("doc-scroll-top"),o.data("doc-scroll-top","")):o.data("bdy-scroll-top")&&(document.body.scrollTop=o.data("bdy-scroll-top"),o.data("bdy-scroll-top",""))}ThriveGlobal.$j.fn.thrive_iphone_placeholder&&o.find("input[placeholder]").thrive_iphone_placeholder(),TL_Front.slide_in_position(o.find(".thrv-leads-slide-in").filter(":visible")),o.off().on("click",".tve-leads-close",(function(){a(o)})),o.find(".tve_ea_thrive_leads_form_close").on("click",(function(){a(o)})),o.on("switchstate",(function(e,t){var o=Array.prototype.slice.call(arguments,1);TL_Front.switch_slide_in_state.apply(TL_Front,o)})),ThriveGlobal.$j(document).off("keyup.close-slidein").on("keyup.close-slidein",(function(e){27==e.which&&a(o)})),r&&r.preventDefault&&(r.preventDefault(),r.stopPropagation())},TL_Front.close_form=function(o,r,n,i){var s=ThriveGlobal.$j(o).parents(".tve-leads-triggered"),a=s.attr("data-tl-type");if(void 0===a&&s.hasClass("tve-leads-widget"))a="widget";else if(void 0===a&&s.hasClass("tve-leads-post-footer"))a="post-footer";else if(void 0===a&&s.hasClass("tve-leads-slide-in"))a="slide-in";else if(void 0===a&&s.hasClass("tve-leads-in-content"))a="in-content";else if(void 0===a&&s.hasClass("tve-leads-shortcode"))a="shortcode";else if(void 0===a&&s.hasClass("tve-leads-greedy_ribbon"))a="greedy_ribbon";else{if(void 0===a&&s.hasClass("tve_p_lb_content"))return TL_Front.close_lightbox(),!1;if(void 0===a&&s.hasClass("tve-leads-screen-filler"))return TL_Front.close_screen_filler(s),!1}switch(s.removeClass("tve-leads-triggered"),TL_Front.handle_typefocus(s,"pause"),a){case"ribbon":var l=s.find(".tve-ribbon-close");l.length||(l=jQuery('<span class="tve-ribbon-close" style="display: none"></span>').appendTo(s)),l.trigger("click");var c=ThriveGlobal.$j("body").find(".thrv_header.tve-scroll-sticky");if(c.length&&"top"===s.attr("data-position")){var d=parseFloat(TCB_Front.inlineCssVariable(c,"--tcb-header-extra-offset"))-s.outerHeight(!0)+"px";TCB_Front.inlineCssVariable(c,"--tcb-header-extra-offset",d)}break;case"slide-in":s.find(".tve_ea_thrive_leads_form_close").trigger("click"),s.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src",e.attr("src")),e.attr("src","")}));break;case"post-footer":case"in-content":case"shortcode":s.fadeOut(200,(function(){TL_Front.form_closed(a)}));break;case"widget":s.parent().slideUp(200);break;case"greedy_ribbon":var _=ThriveGlobal.$j("body"),v=ThriveGlobal.$j(window),p=_.css("margin-top");_[0].style.removeProperty("margin-top"),s.find(e+", "+t).each((function(){var e=ThriveGlobal.$j(this);e.attr("data-src",e.attr("src")),e.attr("src","")})),_.css("margin-top",p),v.scrollTop(0),_.animate({"margin-top":"0px"},300,"linear",(function(){TL_Front.form_closed(a)})).removeClass("tve-tl-gr-anim")}},TL_Front.form_closed=function(e){TL_Const.close_callbacks&&TL_Const.close_callbacks[e]&&ThriveGlobal.$j.each(TL_Const.close_callbacks[e],(function(e,t){ThriveGlobal.$j.isFunction(t)&&t()}))},TL_Front.handle_typefocus=function(e,t){e.find(".tve_typefocus").each((function(){jQuery(this).attr("data-typefocus",t)}))}})();
(()=>{if(window.TVE_Dash=window.TVE_Dash||{},!e||!e.$j){var a=window.$,e={$j:jQuery.noConflict()};a&&(window.$=a)}!function(a){TVE_Dash.ajax_sent=!1;var t={},s={};TVE_Dash.add_load_item=function(e,n,o){var r;if("function"!=typeof o&&(o=a.noop),TVE_Dash.ajax_sent){var i={},_={};return i[e]=n,_[e]=o,this.send_ajax(i,_),!0}return n?(t[e]&&"function"==typeof(null===(r=console)||void 0===r?void 0:r.warn)&&console.warn(e+" ajax action already defined"),t[e]=n,s[e]=o,!0):(console.error&&console.error("missing ajax data"),!1)},TVE_Dash.ajax_load_css=function(e){a.each(e,function(e,t){a("link#"+(e+="-css")).length||a('<link rel="stylesheet" id="'+e+'" type="text/css" href="'+t+'"/>').appendTo("head")})},TVE_Dash.ajax_load_js=function(e){var t=document.body;a.each(e,function(s,n){if(-1!==s.indexOf("_before"))return!0;var o=document.createElement("script");e[s+"_before"]&&a('<script type="text/javascript">'+e[s+"_before"]+"<\/script>").after(t.lastChild),s&&(o.id=s+"-script"),o.src=n,t.appendChild(o)})},TVE_Dash.send_ajax=function(t,s){a.ajax({url:tve_dash_front.ajaxurl,xhrFields:{withCredentials:!0},data:{post_id:tve_dash_front.post_id,action:"tve_dash_front_ajax",tve_dash_data:t},dataType:"json",type:"post"}).done(function(t){t&&a.isPlainObject(t)&&(t.__resources&&(t.__resources.css&&TVE_Dash.ajax_load_css(t.__resources.css),t.__resources.js&&TVE_Dash.ajax_load_js(t.__resources.js),delete t.__resources),a.each(t,function(a,e){if("function"!=typeof s[a])return!0;s[a].call(null,e,t)}),e.$j(window).trigger("tve_after_ajax_load"))})},TVE_Dash.forceImageLoad=function(a){Array.prototype.forEach.call(a.getElementsByTagName("img"),a=>{a.getAttribute("src").includes("data:image")&&a.setAttribute("src",a.getAttribute("data-opt-src")||a.getAttribute("data-src"))})},a(function(){window.TVE_Dash=window.TVE_Dash||TVE_Dash,setTimeout(function(){var e=new a.Event("tve-dash.load");return a(document).trigger(e),!a.isEmptyObject(t)&&!(!tve_dash_front.force_ajax_send&&tve_dash_front.is_crawler)&&(TVE_Dash.send_ajax(t,s),void(TVE_Dash.ajax_sent=!0))})})}(e.$j)})();
(()=>{var t={74208(t){void 0===TCB_Front.js_modules.menu&&TCB_Front.setModuleLoadedStatus("menu",!1),function(e,n){if(TCB_Front.isModuleLoaded("menu"))return;const i=t=>["auto","scroll","hidden"].includes(t.css("overflow"));let o;function s(t){return e(t).closest(".thrv_widget_menu")}const a={init(){tve_frontend_options.is_editor_page||a.frontendInit(),a.customMenuSwitchIcon(),o||(o=a.customMenuSwitchIcon.bind(this,!1),n.addResizeCallback(o)),a.zIndexOrder(),e(".thrv_widget_menu").each((t,e)=>{a.addMutationListener(e)}),a.handleHiddenItems()},handleHiddenItems(){e(".thrv_widget_menu ul").each((t,n)=>{const i=e(n),o=i.closest("li").find("> a .tve-item-dropdown-trigger"),s=this.hasVisibleItems(i);s||n.style.setProperty("display","none","important"),o.toggle(s)})},hasVisibleItems(t){let e=!1;return t.find("> li").each((t,n)=>{getComputedStyle(n).getPropertyValue("display").includes("none")||(e=!0)}),e},zIndexOrder(){const t=e("ul.tve_w_menu");n.highestZIndex=t.length+6;let i=n.highestZIndex;t.each(function(){this.style.zIndex=i+5;const t=e(this),n=t.closest("#content");t.find("ul").css("z-index",i+6).parent().addClass("menu-item-has-children"),t.parentsUntil("body,#wrapper,#tve_editor").each(function(){const t=e(this);let n=parseInt(t.css("z-index"));isNaN(n)&&(n=0),n=800===n?i+7:Math.max(n,i+7),"static"!==t.css("position")&&(this.style.setProperty("z-index",n,"important"),this.classList.add("tcb-mp"))}),n.length&&"static"!==n.css("position")&&n.css("z-index",i+7).addClass("tcb-mp"),i--})},frontendInit(t){const o=this;function s(t,i){const o=t.attr("href"),s=t[0]?t[0].hash:"",a=t.attr("target");if(s){let i;try{i=e(s)}catch(t){}i&&i.length&&n.jumpScrollTo(i,t[0])}a||i.ctrlKey||i.metaKey?window.open(o,a||"_blank"):location.href=o}(t=t||n.$document).off("click.menu-disable-links").on("click.menu-disable-links",".tve-active-disabled .tve_w_menu .tve-state-active",function(t){const n=e(this).closest("li");if(!a.isHamburger(this)||!n.hasClass("menu-item-has-children"))return t.tvePreventNavigation=!0,!1}),t.off("menu_item_anchor_clicked").on("menu_item_anchor_clicked",".tve_w_menu li",function(){const t=e(this);a.isHamburger(t)&&requestAnimationFrame(()=>{a.toggleState(t,!1)})}),t.off("click.menu_item_click").on("click.menu_item_click",".tve_w_menu li:not(.tve-regular .tcb-mega-drop li)",function(t){if(t.tvePreventNavigation)return!0;if(t.stopPropagation(),e(t.target).closest(".tve-regular .tcb-mega-drop").length)return!0;const n=e(this),l=n.children("a").first(),r=l[0],d=!!n.find("ul").length,c=e(t.target).closest(".tve-item-dropdown-trigger").length||e(t.clickedTarget).closest(".tve-item-dropdown-trigger").length,u=n.closest(".thrv_widget_menu").attr("class").includes("tve-custom-menu-switch-icon-"),h=n.closest(".tve_w_menu").hasClass("tve_vertical");if((u||h)&&d){if(!c&&n.hasClass("expand-children")&&function(t){const e=t.attr("href");return e&&"#"!==e&&0!==e.indexOf("javascript:")}(l))return l.hasClass("tve-jump-scroll")?l.trigger("click"):s(l,t),!1;n.toggleClass("expand-children");const e=n.find("ul").first(),a=n.hasClass("expand-children");o.hasVisibleItems(e)&&e[a?"slideDown":"slideUp"](100);const r=e.closest(".section-content,.tve-cb");if(i(r)){let t={top:"",left:"",width:""};if(a){const{top:n,left:i,width:o}=e[0].getBoundingClientRect();t={top:n,left:i,width:o},e.data("fixed-position",{top:n,scrollTop:r.scrollTop()})}e.toggleClass("fixed-menu-item",a).css(t)}return!1}if(d&&c)return!1;const m=n.children(".tve_et_click");return m.length>0?(m.trigger("click"),!0):!!l.attr("href")&&(l.hasClass("tve-jump-scroll")?(l.trigger("click"),!0):(s(l,t),void(a.isHamburger(n)&&r.pathname===window.location.pathname&&r.host===window.location.host&&r.protocol===window.location.protocol&&requestAnimationFrame(()=>{a.toggleState(n,!1)}))))}),t.off("click.prevent_navigation").on("click.prevent_navigation",".tve_w_menu li a:not(.thrv_text_element a):not(.tve-regular .tcb-mega-drop a)",function(t){t.preventDefault()}),t.off("click.custom_menu").on("click.custom_menu",".tve-m-trigger",function(){return a.toggleState(this),!1}),t.off("mousedown.close_menu").on("mousedown.close_menu",t=>{e(t.target).closest(".thrv_widget_menu").length||a.closeAll()}),n.addResizeCallback(a.customMenuResponsive),n.addResizeCallback(a.mobileResponsiveToggle),a.customMenuResponsive(),a.refreshActiveStates(t),TCB_Front.$window.off("hashchange.tcb").on("hashchange.tcb",a.refreshActiveStates.bind(a,TCB_Front.$body)),a.positionLogo(t),a.mobileResponsiveToggle(),t.find(".section-content,.tve-cb").each((t,n)=>{const o=e(n);i(o)&&o.off("scroll.menu").on("scroll.menu",t=>{o.find(".fixed-menu-item").each((n,i)=>{const o=e(i),s=o.data("fixed-position"),a=parseInt(s.top)+(s.scrollTop-t.currentTarget.scrollTop);o.css("top",`${a}px`)})})})},mobileResponsiveToggle(){"mobile"===n.getDisplayType()?(n.$body.find(".vmd-right").attr("data-toggle-dir","vmd-right").removeClass("vmd-right").addClass("vmd-toggle"),n.$body.find(".vmd-left").attr("data-toggle-dir","vmd-left").removeClass("vmd-left").addClass("vmd-toggle")):n.$body.find(".vmd-toggle").each((t,e)=>{const n=e.getAttribute("data-toggle-dir");n&&(e.classList.remove("vmd-toggle"),e.classList.add(n))})},refreshActiveStates(t=TCB_Front.$body){t.find(".tve-custom-menu-type li > a").each(function(){if(!this.getAttribute("href")||"#"===this.getAttribute("href")||0===this.getAttribute("href").indexOf("javascript"))return;const t=e(this),n=location.protocol===this.protocol&&location.hostname===this.hostname&&location.pathname===this.pathname&&location.hash===this.hash;t.toggleClass("tve-state-active",n),t.parent().toggleClass("tve-state-active",n)})},customMenuResponsive(){e(".tve-m-trigger:visible").length?e(".tve-m-trigger").each(function(){const t=e(this).parent().find("> ul");if(!t.data("tve-colors-added")&&t.find("ul a").attr("data-tve-custom-colour")){const n=t.find("ul a").attr("data-tve-custom-colour");t.find("> li > a").each(function(){const t=e(this);t.attr("data-tve-custom-colour")&&(t.attr("data-o-color",t.attr("data-tve-custom-colour")),t.attr("data-tve-custom-colour",n))})}t.data("tve-colors-added",!0)}):(e(".tve-m-expanded").removeClass("tve-m-expanded"),e(".tve-m-trigger").each(function(){const t=e(this).parent().find("> ul");if(!t.data("tve-colors-added")&&t.find("> li > a").attr("data-o-color")){const e=t.find("> li > a"),n=e.attr("data-o-color");e.attr("data-tve-custom-colour",n).removeAttr("data-o-color")}t.data("tve-colors-added",!1)}))},customMenuSwitchIcon(t=!0){const i=n.getDisplayType();e(".thrv_widget_menu").each(function(){const n=e(this),o=n.attr("data-tve-allhoriz");let s=n.attr("data-tve-switch-icon"),l=!1;const r=n.data("tve-frontend-init");n.data("tve-frontend-init",!0),s||o||(s="tablet,mobile");const d=s.split(","),c=n.hasClass("tve-regular")||!r&&!n.find(".tve-m-trigger").is(":visible");if(n.removeClass("tve-custom-menu-switch-icon-desktop tve-custom-menu-switch-icon-tablet tve-custom-menu-switch-icon-mobile"),t&&n.find("ul:not(.tcb-masonry.masonry)").removeAttr("style"),d.includes(i)?n.addClass(`tve-custom-menu-switch-icon-${i}`):l=!0,n.toggleClass("tve-regular",l),n.toggleClass("tve-dropdown",!l),n.find("li.menu-item").toggleClass("tcb-menu-img-hamburger",!l),r&&l&&c)return void a.ensureOnScreenDropdown(n);n.toggleClass("tve-regular",l),n.toggleClass("tve-dropdown",!l);const u=n.find(":not(.tve-ham-wrap) > ul.tve_w_menu, .tve-ham-wrap");if(l)a.ensureRegularLogoSplit(n),n.find("ul").removeAttr("style"),n.find("li").removeClass("expand-children"),n.find(".tve-m-expanded").removeClass("tve-m-expanded"),u.removeAttr("style"),setTimeout(()=>n.find(".tcb-masonry").masonry(),1e3);else{if(a.ensureHamburgerLogoSplit(n),n.find(".tcb-masonry").each(function(){const t=e(this);t.data("masonry")&&t.masonry("destroy")}),!n.data("calc-dimensions")){n.find(".sub-menu").slideDown(0).slideUp(0).removeAttr("style"),n.data("calc-dimensions",!0);const t=u.attr("style","height: auto !important;max-height:none !important").outerHeight();u.removeAttr("style"),n.data("calc-height",t)}t?a.toggleState(n,!1):a.reposition(n)}a.ensureOnScreenDropdown(n)})},isHamburger(t){const e=s(t);return e.length>0&&e.attr("class").includes("tve-custom-menu-switch-icon-")},isVertical(t){const e=s(t);return e.length>0&&e.find(".tve_vertical").length>0},toggleState(t,e,i=100){const o=s(t),l=o.find("ul").first();let r=o.find(".tve-ham-wrap");0===r.length&&(r=l);const d=r.hasClass("tve-m-expanded");let c=!d;if(!this.hasVisibleItems(l))return o;if(void 0!==e&&(c=e),c===d)return o;if(o.hasClass("tve-mobile-side-fullscreen")&&n.$body.toggleClass("tve-fullscreen-menu",c),o.find(".tve-m-trigger").toggleClass("tve-triggered-icon",e),c?o.parents(".tcb-mp").addBack().css("z-index",800):setTimeout(()=>{a.zIndexOrder()},100),!o.hasClass("tve-mobile-dropdown")){if(c&&tve_frontend_options.is_editor_page){const t=o.find(".tve-m-trigger");t.hasClass("close-offscreen-icon-available")||t.append(t.find(".tcb-icon-close").clone().removeClass("tcb-icon-close").addClass("tcb-icon-close-offscreen")).addClass("close-offscreen-icon-available ")}return r.toggleClass("tve-m-expanded",e).removeAttr("style"),o}if(c){r.css("display","flex");const t=this.getMenuPositionalParent(o),e=parseInt(o.data("calc-height")||"500")+"px",s=n.getDisplayType(),a=n.getMediaAttr(o,"data-dropdown-position",s),l="full"===a?window.innerWidth||document.documentElement.clientWidth:t.outerWidth(),d=this.getMenuDropdownPosition(o,r,l);r.attr("style",`visibility: visible;display: flex;margin-left: 0 !important;${d}width:${l}px !important;max-height:${e}px`),r.addClass("tve-m-expanded");const c=o.hasClass("tve-mobile-dropdown");"tablet"===s&&c&&["full","left","right","center"].includes(a)&&requestAnimationFrame(()=>{const t=r.outerWidth(),e=this.calculateViewportBasedPosition(a,t,l,o);r.css("left",`${e}px`)}),setTimeout(()=>{r.css("max-height","none")},i)}else o.data("calc-height",r.outerHeight()),r.stop().slideUp(i,()=>{r.removeClass("tve-m-expanded").removeAttr("style"),r.css("visibility","hidden")});return o},calculateViewportBasedPosition(t,e,n,i){const o=i.offset(),s=window.innerWidth||document.documentElement.clientWidth;let a;if("left"===t)a=-o.left;else if("right"===t)a=s-o.left-e;else if("full"===t&&e>=n)a=-o.left;else{const t=e/2;a=s/2-o.left-t}return a},getEffectiveMenuWidth(t,e){let n=e;const i=t.find(".tve_w_menu").first(),o=i.length>0?i:t;let s=o.css("max-width");if((!s||"none"===s)&&window.getComputedStyle&&o[0]){const t=window.getComputedStyle(o[0]).getPropertyValue("--tve-set-max-width");t&&(s=t.trim())}if(s&&"none"!==s){const t=parseFloat(s);!isNaN(t)&&t<e&&(n=t)}return n},getMenuDropdownPosition(t,e,i){const o=n.getDisplayType();let s=n.getMediaAttr(t,"data-dropdown-position",o);const a=t.find(".tve-m-trigger .tcb-icon-close"),l=a.offset(),r=t.offset();let d="";const c=t.hasClass("tve-mobile-dropdown");switch(e.is("ul")&&(e=this.getMenuPositionalParent(t),s="full"),"mobile"===o&&(s="full"),s){case"left":d="tablet"===o&&c?`left:${-r.left}px;right:unset;`:`right: ${parseInt(r.left+t.outerWidth()-l.left-a.outerWidth())}px;left: unset;`;break;case"right":if("tablet"===o&&c){const t=i;d=`left:${(window.innerWidth||document.documentElement.clientWidth)-r.left-t}px;right:unset;`}else d=`left: ${parseInt(l.left-r.left)}px;right:unset;`;break;case"full":if("tablet"===o&&c){const t=window.innerWidth||document.documentElement.clientWidth,n=this.getEffectiveMenuWidth(e,i);if(n>=i)d=`left:${-r.left}px;`;else{const e=n/2;d=`left:${t/2-r.left-e}px;`}}else d=`left:${this.getMenuPositionalParent(t).offset().left-r.left}px;`;break;default:if("tablet"===o&&c){const t=(window.innerWidth||document.documentElement.clientWidth)/2,n=this.getEffectiveMenuWidth(e,i)/2;d=`left:${t-r.left-n}px;`}else{if(void 0!==s&&1===parseInt(t.attr("data-offscreen-width-setup"))){let t=e.css("max-width");(t.includes("%")||"none"===t)&&(t=e.outerWidth()),i=Math.min(i,parseInt(t))}d=`left: ${parseInt(l.left-r.left-i/2+a.outerWidth()/2)}px;right:unset;`}}return d},getMenuPositionalParent:t=>t.closest(".tve-page-section-in, #tve_editor, #wrapper, .section-content"),reposition(t){const e=s(t),i=e.find(".tve-m-expanded").first(),o=i.length>0;if(e.find(".tve-m-trigger").toggleClass("tve-triggered-icon",o&&e.attr("class").includes("tve-mobile-")),o&&e.hasClass("tve-mobile-dropdown")){const t=this.getMenuPositionalParent(e),o=parseInt(e.data("calc-height")||"500")+"px",s=n.getDisplayType(),a=n.getMediaAttr(e,"data-dropdown-position",s),l="full"===a?window.innerWidth||document.documentElement.clientWidth:t.outerWidth(),r=this.getMenuDropdownPosition(e,i,l);let d=i.css("display");"none"===d&&(d="flex"),i.attr("style",`visibility: visible;margin-left: 0 !important;${r}width:${l}px !important;max-height:${o}px;display:${d}`);const c=e.hasClass("tve-mobile-dropdown");"tablet"===s&&c&&["full","left","right","center"].includes(a)&&requestAnimationFrame(()=>{const t=i.outerWidth(),n=this.calculateViewportBasedPosition(a,t,l,e);i.css("left",`${n}px`)}),setTimeout(()=>{i.css("max-height","none")},100)}return e},closeAll(){e(".thrv_widget_menu").each((t,e)=>{a.toggleState(e,!1)})},positionLogo(t){(t||n.$body).find(".tcb-menu-logo-wrap").each((t,n)=>{const i=e(n),o=i.siblings(),s=Math.floor(o.length/2);o.eq(s).before(i)})},ensureLogoSplit(t){const e=s(t);e.hasClass("tcb-logo-split")&&(a.isHamburger(e)?a.ensureHamburgerLogoSplit(t):a.ensureRegularLogoSplit(t))},ensureHamburgerLogoSplit(t,n=s(t).find("li.tcb-menu-logo-wrap")){const i=s(t);if(n.children().length){i.find(".tcb-hamburger-logo").remove();const t=e('<div class="tcb-hamburger-logo"></div>');t.append(n.children()),i.find(".thrive-shortcode-html").prepend(t)}},ensureRegularLogoSplit(t){const e=s(t),n=e.find(".tcb-hamburger-logo .tcb-logo"),i=e.find("li.tcb-menu-logo-wrap");n.length&&i.length&&i.empty().append(n),a.handleLogoOverflow(e)},handleLogoOverflow(t){const e=t.find("li.tcb-menu-logo-wrap");if(e.length)if(a.menuOverflows(t)){const t=e.outerHeight(!0),n=e.outerWidth();e.closest(".thrive-shortcode-html").css("padding-top",t+"px"),e.css({top:`-${t}px`,left:`calc(50% - ${Math.round(n/2)}px)`,position:"absolute"})}else e.removeAttr("style"),e.closest(".thrive-shortcode-html").css("padding-top","");else t.find(".thrive-shortcode-html").css("padding-top","")},menuOverflows(t){let n=0;return t.find(".tve_w_menu > li").each(function(){n+=e(this).outerWidth(!0)}),n>t.parent().width()-5},addMutationListener(t){const e=s(t);let i;const o=()=>{cancelAnimationFrame(i),i=requestAnimationFrame(a.handleLogoOverflow.bind(this,e))};if(window.ResizeObserver){const t=e.find("ul.tve_w_menu")[0];if(!t)return;const i=new ResizeObserver(o);if(!e.data("resize-observer")){i.observe(t),e.data("resize-observer",i);const n=new MutationObserver(t=>{Array.from(t).forEach(t=>{t.target.classList.contains("tcb-menu-logo-wrap")||"UL"===t.target.tagName&&"childList"===t.type&&t.addedNodes.length&&Array.from(t.addedNodes).forEach(t=>n.observe(t,{attributes:!0}))}),e.hasClass("tve-regular")&&o()});e.find(".tve_w_menu > li:not(.tcb-menu-logo-wrap)").each((t,e)=>{n.observe(e,{attributes:!0})})}const s=e.find("li.tcb-menu-logo-wrap");if(s.length&&!s.data("resize-observer")&&(s.data("resize-observer",i),i.observe(s[0])),e.hasClass("tcb-mega-std")&&!e.data("mega-resize-observer")){let t;const i=new ResizeObserver(()=>{cancelAnimationFrame(t),t=requestAnimationFrame(a.handleMegaMenuPosition.bind(this,e))});e.find(".tcb-mega-drop").each((t,e)=>{n.inlineCssVariable(e,"top","var(--mega-menu-top,100%)")}),i.observe(e[0]),e.data("mega-resize-observer",i)}}},handleMegaMenuPosition(t){const e=t.find(".tve_w_menu");if(e.length){const i=t[0].getBoundingClientRect().bottom,o=getComputedStyle(e[0]),s=parseInt(o.getPropertyValue("border-bottom-width"));t.find(".menu-item.menu-item-has-children.lvl-0").each((t,e)=>{const o=e.getBoundingClientRect().bottom,a=i-o-s;a>0?n.inlineCssVariable(e,"--mega-menu-top",`calc(100% - ${a}px)`):n.inlineCssVariable(e,"--mega-menu-top","")})}},ensureOnScreenDropdown(t){const i=s(t),o=i.hasClass("tve-regular"),a=i.hasClass("tve-vertical-menu"),l=i.offset().left+i.outerWidth();i.find("li:last-child > ul").each((t,n)=>{const i=e(n),s=i.offset().left+i.outerWidth();Math.ceil(s-l)>=0&&o&&s<i.outerWidth()?i.css({left:"auto",right:"0px"}):i.css({left:"",right:""})}),o||a?i.find(".tve_w_menu > li li").each((t,e)=>{let i;a&&(i=e.parentNode.closest("li"),i&&i.classList.add("expand-children"));const s=e.getBoundingClientRect();let l=parseFloat(e.getAttribute("data-init-width"));if(l||(l=s.width,e.setAttribute("data-init-width",l)),l+s.left>document.body.offsetWidth){const t=document.body.offsetWidth-s.left,i=l-t;o&&l>t&&n.inlineCssVariable(e.parentNode,{left:`calc(100% - ${i}px)`})}else n.inlineCssVariable(e,{"max-width":"","min-width":""});i&&i.classList.remove("expand-children")}):i.find(".tve_w_menu > li li").each((t,e)=>{n.inlineCssVariable(e,{"max-width":"","min-width":""})})}};e(window).on("tcb_after_dom_ready",()=>a.init()),window.addEventListener("load",()=>a.init()),window.TCB_Front.menu=a,t.exports=a,TCB_Front.setModuleLoadedStatus("menu",!0)}(ThriveGlobal.$j,TCB_Front)}},e={};!function n(i){var o=e[i];if(void 0!==o)return o.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,n),s.exports}(74208)})();