1(globalThis.webpackChunksage=globalThis.webpackChunksage||[]).push([[143],{958:(e,t,o)=>{"use strict";var n=o(194),a=(o(129),o(752),o(567)),r=o.n(a);function i(e){const t=Array.from(e.querySelectorAll("stop"));if(!t.length)return;const o=t.length;t.forEach((e,t)=>{const n=(e.getAttribute("offset")??"").trim(),a=n.endsWith("%")?parseFloat(n.slice(0,-1))/100:parseFloat(n);if(!Number.isFinite(a)){const n=1===o?0:t/(o-1);return void e.setAttribute("offset",String(n))}const r=(n.endsWith("%"),Math.min(1,Math.max(0,a)));r!==a&&e.setAttribute("offset",String(r))})}async function s(e){const t=await fetch(e,{credentials:"same-origin"}),o=await t.text(),n=(new DOMParser).parseFromString(o,"image/svg+xml");i(n);const a=(new XMLSerializer).serializeToString(n);return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(a)}`}function l(e){const t=/url\((['"]?)(.*?)\1\)/.exec(e||"");return t?.[2]||null}function c(e,t=!0){[{selector:".border-change",removeClass:t?"top-0":"top-1.5",addClass:t?"top-1.5":"top-0"},{selector:".font-change",removeClass:t?"bottom-0":"bottom-6",addClass:t?"bottom-6":"bottom-0"},{selector:".stat-change",removeClass:t?"bottom-0":"bottom-5",addClass:t?"bottom-5":"bottom-0"},{selector:".hs-change",removeClass:t?"top-0":"top-1",addClass:t?"top-1":"top-0"},{selector:".position-change",removeClass:t?"top-0":"top-6",addClass:t?"top-6":"top-0"}].forEach(t=>{e.querySelectorAll(t.selector).forEach(e=>{e.classList.remove(t.removeClass),e.classList.add(t.addClass)})})}function d(e){if(!e)return!1;const t=e.replace(/\s/g,"").toLowerCase();if("rgb(0,0,238)"===t||"rgb(0,0,255)"===t||"rgb(17,85,204)"===t)return!0;const o=/rgba?\((\d+),\s*(\d+),\s*(\d+)/.exec(e);if(!o)return!1;const n=Number(o[1]),a=Number(o[2]),r=Number(o[3]);return r>150&&r>n+20&&r>a}function u(e,t){const o=e.querySelector(t);if(!o)return"";const n=window.getComputedStyle(o).color;return n&&!d(n)?n:""}function p(e){const t=e.currentTarget||e.target.closest(".js-download-capture-image"),o=t?.getAttribute("data-target"),n=t?.closest(".pn-modal")||document,a=o?n.querySelector(o):null;if(!a||"function"!=typeof window.html2canvas)return void console.error("Download Image is not available:",{hasTarget:!!o,foundElement:!!a,hasHtml2canvas:"function"==typeof window.html2canvas});c(a,!0);const r=function(e){const t=[];return e.querySelectorAll(".capture-fade-overlay").forEach(e=>{const o=e.getAttribute("style")||"",n=document.createDocumentFragment();for(;e.firstChild;)n.appendChild(e.firstChild);t.push(()=>e.setAttribute("style",o)),t.push(()=>{for(e.replaceChildren();n.firstChild;)e.appendChild(n.firstChild)}),e.style.backgroundImage="none",e.style.minHeight="1px",e.style.background="transparent",e.style.display="flex",e.style.flexDirection="column",e.style.justifyContent="stretch",e.style.pointerEvents="none",[0,.08,.16,.28,.42,.58,.72,.85].forEach(t=>{const o=document.createElement("div");o.style.flex="1 1 0%",o.style.width="100%",o.style.background=`rgba(255,255,255,${t})`,e.appendChild(o)})}),()=>t.reverse().forEach(e=>e())}(a);(async function(e){const t=[];!function(e){Array.from(e.querySelectorAll("svg")).forEach(e=>{try{i(e)}catch(e){console.warn("Inline SVG sanitize skipped:",e)}})}(e);const o=Array.from(e.querySelectorAll("img"));for(const e of o){const o=e.getAttribute("src")||"",n=e.getAttribute("srcset")||"",a=e.getAttribute("sizes")||"",r=[e.currentSrc||"",o,...n.split(",").map(e=>e.trim().split(/\s+/)[0])].filter(Boolean).find(e=>/\.svg(\?|#|$)/i.test(e)||e.startsWith("data:image/svg+xml"));if(r)try{const i=r.startsWith("data:image/svg+xml")?r:await s(r);t.push(()=>{o?e.setAttribute("src",o):e.removeAttribute("src"),n?e.setAttribute("srcset",n):e.removeAttribute("srcset"),a?e.setAttribute("sizes",a):e.removeAttribute("sizes")}),e.setAttribute("src",i),e.removeAttribute("srcset"),e.removeAttribute("sizes")}catch(e){console.warn("SVG sanitize skipped (img):",r,e)}}const n=Array.from(e.querySelectorAll("*"));for(const e of n){const o=window.getComputedStyle(e),n=o?.backgroundImage;if(!n||"none"===n)continue;const a=l(n);if(a&&/\.svg(\?|#|$)/i.test(a))try{const o=await s(a),n=e.getAttribute("style")||"";t.push(()=>e.setAttribute("style",n)),e.style.backgroundImage=`url("${o}")`}catch(e){console.warn("SVG sanitize skipped (bg):",a,e)}}return()=>
1t.reverse().forEach(e=>e())})(a).then(e=>window.html2canvas(a,{useCORS:!0,scale:2,onclone:e=>function(e,t){const o=e.getElementById(t.id);if(!o)return;const n=getComputedStyle(document.documentElement).getPropertyValue("--site-primary").trim(),a=u(t,".text-gray-400"),r=u(t,".eval-text"),i=e.createElement("style");i.textContent="\n [data-share-capture-root] a,\n [data-share-capture-root] a:link,\n [data-share-capture-root] a:visited {\n color: inherit !important;\n text-decoration: none !important;\n pointer-events: none !important;\n }\n ",e.head.appendChild(i),o.setAttribute("data-share-capture-root","");const s=t.querySelectorAll("a");o.querySelectorAll("a").forEach((t,o)=>{const i=s[o],l=e.createElement("span");l.textContent=t.textContent;const c=t.closest(".eval-text")?r||a||n:a||n;l.style.color=function(e,t){if(!e)return t;const o=window.getComputedStyle(e).color;if(!d(o))return o;const n=window.getComputedStyle(e.parentElement).color;return n&&!d(n)?n:t}(i,c),l.style.textDecoration="none",t.replaceWith(l)});const l=t.querySelectorAll(".js-share-capture-footer");o.querySelectorAll(".js-share-capture-footer").forEach((e,t)=>{const o=l[t],a=o?window.getComputedStyle(o).color:n;a&&(e.style.color=a,e.style.setProperty("-webkit-text-fill-color",a)),e.style.textDecoration="none"})}(e,a)}).then(t=>({canvas:t,restoreSvg:e}))).then(({canvas:e,restoreSvg:t})=>{if(!e||!Number.isFinite(e.width)||!Number.isFinite(e.height)||e.width<=0||e.height<=0)throw new Error(`html2canvas returned an invalid canvas (${e?.width}x${e?.height})`);return function(e,t="image/png",o){return new Promise(n=>{if(!e||"function"!=typeof e.toBlob)return n(null);e.toBlob(e=>n(e),t,o)})}(e,"image/png").then(e=>{if(!e||0===e.size)throw new Error("Generated PNG blob is empty");const t=URL.createObjectURL(e),o=document.createElement("a");o.href=t,o.download="downloaded-image.png",document.body.appendChild(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(t),1e3)}).finally(()=>{t?.(),r?.(),c(a,!1)})}).catch(e=>{console.error("Error in downloading the image:",e),r?.(),c(a,!1)})}r()(function(){r()(document).on("click",".js-download-capture-image",p)});var m=o(567),f=o(567);function h(e,t,o,n=!1){var a;if(n||(n="; path=/"),o){var r=new Date;r.setTime(r.getTime()+24*o*60*60*1e3),a="; expires="+r.toGMTString()}else a="";document.cookie=e+"="+t+a+n}function g(e){var t=("; "+document.cookie).split("; "+e+"=");if(2==t.length)return t.pop().split(";").shift()}!function(){const e=new URLSearchParams(window.location.search).get("coupon");e&&h("tracked_coupon",e,7)}(),function(){const e=g("tracked_coupon");if(!e)return;const t=window.location.pathname,o=t.endsWith("/")?t:`${t}/`;if(["/subscribe/","/checkout/"].some(e=>o.endsWith(e))){const t=new URL(window.location.href);t.searchParams.has("coupon")||(t.searchParams.set("coupon",e),window.location.replace(t.toString()))}}(),(0,n.domReady)(async e=>{e&&console.error(e),m(document).ready(function(){m("#view-wrapper").css("visibility","")}),m('a[href^="#"]').not('a[href^="http"]').on("click",function(e){e.preventDefault();var t=this.hash,o=m(t);o.length&&m("html, body").stop().animate({scrollTop:o.offset().top},800,"swing",function(){window.location.hash=t})}),m(".copy-text").on("click",function(e){e.preventDefault();var t=e.target;console.log(t.innerHTML.trim()),navigator.clipboard.writeText(t.innerHTML.trim()),t.innerHTML="Copied"}),f(".slider:not(.slider-enabled)").each((e,t)=>{let o=f(t);o.addClass("slider-enabled").slick({arrows:o.data("arrows")||!1,prevArrow:'<button class="slick-prev slick-arrow" aria-label="Previous" type="button"><svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg" q:key="1x_0"><path clip-rule="evenodd" d="M11.7623 6.22456C11.5182 5.98048 11.1224 5.98048 10.8784 6.22456L8.13429 8.96864C7.56478 9.53815 7.56478 10.4615 8.13429 11.031L10.8784 13.7751C11.1224 14.0192 11.5182 14.0192 11.7623 13.7751C12.0063 13.531 12.0063 13.1353 11.7623 12.8912L9.01818 10.1472C8.93682 10.0658 8.93682 9.93388 9.01818 9.85252L11.7623 7.10845C12.0063 6.86437 12.0063 6.46864 11.7623 6.22456Z" fill="#11244A" fill-rule="evenodd"></path></svg>Previous</button>',nextArrow:'<button class="slick-next slick-arrow" aria-label="Next" type="button""><svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg" q:key="UQ_0"><path clip-rule="evenodd" d="M7.89009 6.22456C8.13417 5.98048 8.5299 5.98048 8.77397 6.22456L11.5181 8.96864C12.0876 9.53815 12.0876 10.4615 11.5181 11.031L8.77397 13.7751C8.5299 14.0192 8.13417 14.0192 7.89009 13.7751C7.64601 13.531 7.64601 13.1353 7.89009 12.8912L10.6342 10.1472
1C10.7155 10.0658 10.7155 9.93388 10.6342 9.85252L7.89009 7.10845C7.64601 6.86437 7.64601 6.46864 7.89009 6.22456Z" fill="#11244A" fill-rule="evenodd"></path></svg>Next</button>',dots:o.data("dots")||!1,slidesToShow:o.data("slides-to-show")||1,adaptiveHeight:o.data("adaptive-height")||1,centerMode:o.data("center-mode")||!1,centerPadding:"30px",autoplay:o.data("autoplay")||!1,autoplaySpeed:o.data("autoplay-speed")||3e3,infinite:void 0===o.data("infinite")||o.data("infinite"),responsive:[{breakpoint:1024,settings:{slidesToShow:o.data("slides-to-show")||1}},{breakpoint:900,settings:{slidesToShow:o.data("slides-to-show-medium")||2}},{breakpoint:480,settings:{slidesToShow:1}}]})})}),f(document).ready(function(e){var t,o,n;function a(t,o){if(e.trim(t).length>2){var n=o.data("state"),a=o.find(".search-next").val();o.find(".spinner-wrapper").removeClass("hidden"),o.find(".search-results-wrap .results").empty(),e.ajax({type:"POST",url:ajax_object.ajax_url,data:{state:n,next:a,security:ajax_object.ajax_nonce,search_text:t,action:"load_search_links"},success:function(e){o.find(".search-results-wrap .results").append(e),o.find(".spinner-wrapper").addClass("hidden")},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}else e.trim(t).length>0?(o.find(".search-results-wrap .results").append('<div class="search-results">Please type at least 3 characters to search.</div>'),o.find(".spinner-wrapper").addClass("hidden")):(o.find(".search-results-wrap .results").empty(),o.find(".spinner-wrapper").addClass("hidden"))}function r(t){t.hasClass("cookie-modal")&&h(t.data("cookie"),1,t.data("cookie-expire")?t.data("cookie-expire"):7),e("body").removeClass("overflow-hidden"),t.removeClass("opacity-100 h-full"),t.addClass("opacity-0 scale-95"),t.find("video").each(function(){this.pause(),this.currentTime=0}),t.find("iframe").each(function(){const e=this.src;this.src="",setTimeout(()=>{this.src=e},100)}),setTimeout(()=>{t.addClass("hidden"),e("body").removeClass("overflow-hidden"),t.hasClass("no-ajax")||t.remove()},300)}e(document).ready(function(){document.getElementsByTagName("svg")[0].style.visibility="visible"}),e(".state-search-wrapper .search-state").on("input",function(){o=e(this).val().toLowerCase(),n=e(this).closest(".state-search-wrapper"),clearTimeout(t),t=setTimeout(function(){a(o,n)},900)}),e(".state-search-wrapper").submit(function(t){t.preventDefault();var n=e(this);a(o=n.find(".search-state").val().toLowerCase(),n)}),e(document).on("click",".show-modal",function(t){t.preventDefault();var o=e(this).data("modal"),n=e(this).attr("data-ajax"),a=e(this).data("target"),r=e(this),i=r.html();if(e("body").addClass("overflow-hidden"),a){var s=e(a);s.length&&!s.parent().is("body")&&e("body").append(s),s.css("display","").removeAttr("style")}r.html('<span class="flex items-center gap-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> Processing...</span>'),null!=o&&""!==o&&"#video-hero"!==a?e.ajax({type:"POST",url:ajax_object.ajax_url,data:{modal:o,info:n?JSON.parse(n):"",action:"load_modal"},success:function(t){e(".pn-modal:not(.no-ajax)").remove(),"all-favorites"===o&&(window.favoritesModalInitialized=!1),e("body").append(t),a||(a=e(".pn-modal:not(.no-ajax)")),e(a).removeClass("hidden"),setTimeout(()=>{e(a).removeClass("opacity-0 scale-95"),e(a).addClass("opacity-100"),e(a).addClass("h-full")},10),r.html(i),void 0!==window.Alpine&&window.Alpine.initTree?setTimeout(()=>{const e=a.length?a[0]:document.querySelector(".pn-modal:not(.no-ajax)");e&&(window.Alpine.initTree(e),"all-favorites"===o&&setTimeout(()=>{f(document).trigger("favoritesModalReady")},200))},50):"all-favorites"===o&&setTimeout(()=>{f(document).trigger("favoritesModalReady")},200),"undefined"!=typeof acf&&acf.do_action("append",e(".acf-form"))},error:function(e,t,o){console.log(e),console.log(t),console.log(o),r.html(i)}}):(e(a).removeClass("hidden"),setTimeout(()=>
1{e(a).removeClass("opacity-0 scale-95"),e(a).addClass("opacity-100"),e(a).addClass("h-full")},10),r.html(i))}),e(document).on("click","#player-change-state-class-submit",function(t){if(t.preventDefault(),t.stopPropagation(),"undefined"!=typeof ajax_object){var o=e("#player-change-state-class-form"),n=e("#player-change-state-class-feedback"),a=e("#player-change-state-class-submit"),r=(o.find("#player-change-state-select").val()||"").trim(),i=(o.find("#player-change-class-select").val()||"").trim();if(r||i){if(n.removeClass("text-red-600 text-green-700").addClass("hidden").text(""),window.confirm("Updating this player's state or class may remove them from their current ranking. Continue?")){a.prop("disabled",!0);var s={action:"player_change_state_class",security:ajax_object.ajax_nonce,player_id:o.find('input[name="player_id"]').val(),player_change_state:r,player_change_class:i};e.post(ajax_object.ajax_url,s).done(function(e){e.success?(n.removeClass("hidden text-red-600").addClass("text-green-700").text(e.data&&e.data.message?e.data.message:"Saved."),setTimeout(function(){window.location.reload()},600)):(n.removeClass("hidden text-green-700").addClass("text-red-600").text(e.data&&e.data.message||"Something went wrong."),a.prop("disabled",!1))}).fail(function(){n.removeClass("hidden text-green-700").addClass("text-red-600").text("Request failed. Please try again."),a.prop("disabled",!1)})}}else n.removeClass("hidden text-green-700").addClass("text-red-600").text("Select a state or class to update.")}}),e(document).on("click",".pn-modal .modal-close, .pn-modal .close-video",function(){r(e(this).closest(".pn-modal"))});var i=null;if(e(document).on("mousedown",".pn-modal .modal-overlay",function(e){i=e.target}),e(document).on("mouseup",".pn-modal .modal-overlay",function(t){var o=e(t.target),n=e(i),a=!o.closest(".pn-modal-container").length,s=!n.closest(".pn-modal-container").length;if(a&&s){var l=e(this).closest(".pn-modal");if(l.hasClass("has-datepicker")||l.hasClass("no-overlay-close"))return void(i=null);r(l)}i=null}),e(document).on("keydown",function(t){"Escape"===t.key&&e(".pn-modal:not(.hidden)").length&&r(e(".pn-modal:not(.hidden)").first())}),e(document).on("DOMNodeRemoved",".pn-modal",function(){0===e(".pn-modal:not(.hidden)").length&&e("body").removeClass("overflow-hidden")}),"undefined"!=typeof MutationObserver){var s=new MutationObserver(function(t){t.forEach(function(t){if("attributes"===t.type&&"class"===t.attributeName){var o=e(t.target);o.hasClass("pn-modal")&&o.hasClass("hidden")&&setTimeout(function(){0===e(".pn-modal:not(.hidden)").length&&e("body").removeClass("overflow-hidden")},100)}if("childList"===t.type&&t.removedNodes.length>0)for(var n=0;n<t.removedNodes.length;n++){var a=t.removedNodes[n];1===a.nodeType&&e(a).hasClass("pn-modal")&&setTimeout(function(){0===e(".pn-modal:not(.hidden)").length&&e("body").removeClass("overflow-hidden")},100)}})});document.body&&s.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}function l(t,o,n){var a=f("#welcome-submit").data("slide");console.log(a),f(".onboarding-slide .spinner").show(),f.ajax({type:"POST",url:ajax_object.ajax_url,data:{type:t,year:o,state:n,action:"onboarding_save_user_info"},success:function(t){e(".onboarding-slide").attr("data-slide",a),e(".onboarding-wrapper .onboarding-slide").html(t),e(".card.steps-wrapper").hide(),window.scrollTo(0,0)},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}function c(){f(".onboarding-wrapper .event-wrap").length&&(console.log("slide on"),f(".onboarding-wrapper .event-wrap").slick({slidesToShow:3,slidesToScroll:1,autoplay:!1,centerMode:!1,centerPadding:0,prevArrow:'<button class="slick-prev slick-arrow" aria-label="Previous" type="button" style="display: block;"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 inline-block" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" /></svg>Previous</button>',nextArrow:'<button class="slick-next slick-arrow" aria-label="Next" type="button" style="display: block;"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 inline-block" viewB
1ox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" /></svg>Next</button>',responsive:[{breakpoint:1300,settings:{arrows:!0,centerMode:!1,centerPadding:0,slidesToShow:2}},{breakpoint:1e3,settings:{arrows:!0,centerMode:!1,centerPadding:0,slidesToShow:1,dots:!1}}]}))}e(".cookie-modal").length&&e(".cookie-modal").each(function(t,o){g(e(o).data("cookie"))||e(o).removeClass("hidden")}),e(document).on("click",".pn-modal-container",function(e){e.stopPropagation()}),e(".scroll-over").click(function(){var t=e(this).siblings(".market-menu-wrap");e(this).hasClass("scrolled")?(e(this).removeClass("scrolled").children("svg").css("transform",""),t.scrollLeft(0)):(e(this).addClass("scrolled").children("svg").css("transform","rotate(180deg)"),t.scrollLeft(t.innerWidth()))}),window.innerWidth<=1024?(e(".pn-player-link, .pn-program-link").click(function(){e("#tooltip-modal").length||e("body").append('<div id="tooltip-modal"><div class="tip-close">+</div><div class="tool-content"></div></div>');var t=e(this).find("a").attr("href"),o=e(this).find(".info-box").clone();o.append('<a href="'+t+'" class="btn-primary border-white border-2 mt-2 inline-block">View Player</a>'),e("#tooltip-modal .tool-content").html(o)}),e(document).on("click","#tooltip-modal .link-wrap",function(e){e.preventDefault()}),e(document).on("click","#tooltip-modal .tip-close",function(){e("#tooltip-modal").remove()})):(e(".pn-player-link, .pn-program-link").hover(function(){e(this).children(".info-box").addClass("show")},function(){e(this).children(".info-box").removeClass("show")}),e(".pn-player-link .name-pointer, .pn-program-link .name-pointer").click(function(){window.location.href=e(this).parent().find("a").attr("href")})),e(document).on("click","#user-favorites .add-favorite li, .add-favorite",function(){var t=e(this),o=t.data("post-id")||t.closest("[data-post-id]").data("post-id")||t.find("[data-post-id]").data("post-id");e.ajax({type:"POST",url:ajax_object.ajax_url,data:{action:"manage_favorite",favorite_action:"add",favorite_type:"player",item_id:o},success:function(o){e("#favorite-player-list").length&&e("#favorite-player-list").prepend(o),e(".follow-cta").length&&location.reload(),t.hasClass("fav-btn")&&(t.removeClass("add-favorite").addClass("remove-favorite"),t.text("Remove Favorite")),t.hasClass("favorite-toggle")&&(t.removeClass("add-favorite").addClass("remove-favorite bg-primary").attr("aria-pressed","true"),t.find('[data-favorite-icon="off"]').addClass("hidden"),t.find('[data-favorite-icon="on"]').removeClass("hidden"))},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e(document).on("click","#user-favorites .remove-favorite, .remove-favorite",function(){var t=e(this),o=t.data("post-id")||t.closest("[data-post-id]").data("post-id")||t.find("[data-post-id]").data("post-id");e.ajax({type:"POST",url:ajax_object.ajax_url,data:{action:"manage_favorite",favorite_action:"remove",favorite_type:"player",item_id:o},success:function(o){e("#favorite-player-list").length&&(t.parent().remove(),console.log(o)),t.hasClass("fav-btn")&&(t.removeClass("remove-favorite").addClass("add-favorite"),t.text("Add Favorite")),t.hasClass("favorite-toggle")&&(t.removeClass("remove-favorite bg-primary").addClass("add-favorite").attr("aria-pressed","false"),t.find('[data-favorite-icon="on"]').addClass("hidden"),t.find('[data-favorite-icon="off"]').removeClass("hidden"))},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e(document).on("click",".add-favorite-program",function(){console.log(ajax_object.ajax_url),e.ajax({type:"POST",url:ajax_object.ajax_url,data:{action:"manage_favorite",favorite_action:"add",favorite_type:"program",item_id:e(this).data("post-id")},success:function(t){e("#favorite-program-list").length&&e("#favorite-program-list").prepend(t)},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e(document).on("click",".remove-favorite-program",function(){var t=e(this);e.ajax({type:"POST",url:ajax_object.ajax_url,data:{action:"manage_favorite",favorite_action:"remove",favorite_type:"program",item_id:e(this).data("post-id")},success:function(o){e("#favorite-program-list").length&&(t.parent().remove(),console.log(o))},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e(document).on("click",".add-favorite-college",function(){e.ajax({type:"POST",url:ajax_object.ajax_url,data:{action:"manage_favorite",favorite_action:"add",favorite_type:"college",item_id:e(this).data("post-id")},success:function(e){console.log(e)},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e(document).on("click",".remove-favorite-college",function(){e.ajax({type:"POST",url:ajax_object.ajax_url,data:{action:"manage_favorite",favorite_action:"remove",favorite_type:"college",item_id:e(this).data("post-id")},success:function(e){console.log(e)},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e(document).on("click",".add-bookmark",function(){e.ajax({type:"POST",url:ajax_object.ajax_url,data:{postID:e(this).data("post-id"),action:"add_post_to_bookmarks"},success:function(t){e("#bookmarked-post-list").length&&e("#bookmarked-post-list").prepend(t)},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e(document).on("click",".remove-bookmark",function(){e.ajax({type:"POST",url:ajax_object.ajax_url,data:{postID:e(this).data("post-id"),action:"remove_post_from_bookmarks"},success:function(e){console.log(e)},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e(document).on("change",".onboarding-wrapper #welcome #user-type",function(){e(".onboarding-slide .spinner").show();var t=e(this).children(":selected").val(),o=e(this).children(":selected").data("class");t&&o?e.ajax({type:"POST",url:ajax_object.ajax_url,data:{selection:t,action:"load_user_type_classes"},success:function(t){e(".onboarding-wrapper #welcome #add-select").html(t),e(".onboarding-slide .spinner").hide()},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}}):(e(".onboarding-wrapper #welcome #add-select").empty(),e(".onboarding-slide .spinner").hide())}),e(document).on("click",".onboarding-wrapper #welcome-submit",function(){var t=e(".onboarding-wrapper #welcome #user-type").children(":selected").val(),o=e(".onboarding-wrapper #welcome #user-state"),n=e(".onboarding-wrapper #welcome #user-class"),a=!!n.length;t&&""!=o.val()?a?""!=n.val()?(l(t,n.val(),o.val()),e(".onboarding-wrapper #welcome .form-error").addClass("invisible")):e(".onboarding-wrapper #welcome .form-error").html("Please choose a class to continue.").removeClass("invisible"):(l(t,null,o.val()),e(".onboarding-wrapper #welcome .form-error").addClass("invisible")):e(".onboarding-wrapper #welcome .form-error").html("Please choose the value that best describes you.").removeClass("invisible")}),c(),e(document).on("click",".onboarding-nav .nav-btn",function(){e(".onboarding-slide .spinner").show();var t=e(this).data("slide");f.ajax({type:"POST",url:ajax_object.ajax_url,data:{slide:t,action:"onboarding_next_slide"}
1,success:function(o){e(".onboarding-slide").attr("data-slide",t),e(".onboarding-wrapper .onboarding-slide").html(o),e(".card.steps-wrapper").hide(),window.innerWidth>500?window.scrollTo(0,0):window.scrollTo(0,87),c(),"undefined"!=typeof acf&&acf.do_action("append",f(".acf-form"))},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e(document).on("click",".onboarding-slide .event-btn, #claim-modal .event-btn",function(){var t=e(this).data("name"),o=e(this).attr("href");f.ajax({type:"POST",url:ajax_object.ajax_url,data:{href:o,name:t,action:"onboarding_log_event"},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e(document).on("click",".onboarding-slide .dr-dish-btn",function(){f.ajax({type:"POST",url:ajax_object.ajax_url,data:{action:"onboarding_dr_dish"},success:function(t){e(".onboarding-nav .btn-primary").text("Next Step"),e(".onboarding-slide .dr-dish-btn").remove(),e("#dr-dish .slide-description").html(t)},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),setTimeout(function(){e(".onboarding-reminder").addClass("open"),setTimeout(function(){e(".onboarding-reminder").removeClass("open")},8e3)},800),e(".premium-sample-cta").length&&e(window).scroll(function(){var t=e(document).scrollTop(),o=e("#footer").offset().top,n=e(window).height();t>0&&t<o-n?e(".premium-sample-cta ").removeClass("translate-y-[135px]"):e(".premium-sample-cta ").addClass("translate-y-[135px]")}),e("#tagged-news .show-more-posts").click(function(){var t=e(this),o=t.closest("#tagged-news"),n=t.data("page"),a=t.data("max"),r=o.attr("data-entity-type"),i=o.attr("data-entity-id");t.data("page",n+1),e.ajax({type:"POST",url:ajax_object.ajax_url,data:{page:n,entity_type:r,entity_id:i,action:"getTaggedEntityNews"},success:function(e){o.find(".news-section").first().append(e.posts),n==a&&o.find(".show-more-posts").remove()},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e("#pn-registration").on("submit",function(t){t.preventDefault();var o=e("#pn-registration #role").val(),n=e("#pn-registration #email").val();if("coach"===o&&!n.includes(".edu"))return e("form#pn-registration .error-message").show().html('<p class="text-red-600 text-sm">Please enter a valid .edu email address.</p>'),void e("html, body").animate({scrollTop:0},"slow");if(10!==(e("#pn-registration #phone-number").val()||"").replace(/\D/g,"").length)return e("form#pn-registration .error-message").show().html('<p class="text-red-600 text-sm">Please enter a valid 10-digit phone number.</p>'),void e("html, body").animate({scrollTop:0},"slow");if(!e("#pn-registration #privacy-policy").is(":checked"))return e("form#pn-registration .error-message").show().html('<p class="text-red-600 text-sm">Please agree to the Terms of Service and Privacy Policy.</p>'),void e("html, body").animate({scrollTop:0},"slow");var a=new FormData(document.getElementById("pn-registration"));a.append("action","pn_registration_form"),e.ajax({type:"POST",url:ajax_object.ajax_url,data:a,contentType:!1,processData:!1,success:function(t){t.error?(e("form#pn-registration .error-message").show().html('<p class="text-red-600 text-sm">'+t.error+"</p>"),e("html, body").animate({scrollTop:0},"slow")):t.redirect?setTimeout(function(){window.location.href=t.redirect},500):location.reload()},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e("#program_director_phone").on("input",function(){var t=e(this).val(),o=e("#phone_error_label");t.startsWith("0")||10!==t.length?o.show():o.hide()});const d=e(".acf-field.phone input");d.length&&d.on("input",function(){let t=e(this).val().replace(/\D/g,"");t.length>10&&(t=t.substring(0,10));const o=t.replace(/^(\d{3})(\d{3})(\d{4})$/,"($1) $2-$3");e(this).val(o)}),e("#pn-registration #phone-number").on("input",function(){let t=e(this).val().replace(/\D/g,"");t.length>10&&(t=t.substring(0,10)),10===t.length?e(this).val(t.replace(/^(\d{3})(\d{3})(\d{4})$/,"($1) $2-$3")):e(this).val(t)}),e("#program_creation_form").on("submit",function(t){t.preventDefault();var o=e("#program_name").val(),n=e("#program_city").val(),a=e("#program_state").val();const r=document.getElementById("program_name"),i=document.getElementById("program_name_error");
1if(r.value.trim().split(/\s+/).length<2)return i.style.display="block",void e("p#program-name-message-text").text("For automated tagging purposes, all program names must contain at least two words. Please modify your program name and re-save. Suggested name: "+a+" "+o);i.style.display="none",e.ajax({type:"POST",url:ajax_object.ajax_url,data:{name:o,city:n,state:a,security:ajax_object.ajax_nonce,action:"find_existing_program"},dataType:"json",success:function(o){"error"===o.status?e("#program-exists-error").show():t.currentTarget.submit()},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),document.getElementById("program_creation_form")&&document.getElementById("program_creation_form").addEventListener("submit",function(e){const t=document.getElementById("program_name"),o=document.getElementById("program_name_error");2!==t.value.trim().split(/\s+/).length?(e.preventDefault(),o.style.display="block"):o.style.display="none"}),e(document).on("click","[data-braze]",function(){var t=e(this).data("braze");e.ajax({type:"POST",url:ajax_object.ajax_url,data:{event:t,security:ajax_object.ajax_nonce,action:"brazeEventTracking"},success:function(e){console.log(e)},error:function(e,t,o){console.log(e),console.log(t),console.log(o)}})}),e(document).on("click",".js-download-remote-image",async function(e){e.preventDefault();const t=e.currentTarget.dataset.downloadLink,o=e.currentTarget.dataset.downloadName;if(t)try{await async function(e,t){const o=new FormData;o.set("action","download_remote_image"),o.set("security",ajax_object.ajax_nonce),o.set("image_url",e),o.set("filename",t||"download.png");const n=await fetch(ajax_object.ajax_url,{method:"POST",body:o,credentials:"same-origin"}),a=n.headers.get("content-type")||"";if(!n.ok||-1!==a.indexOf("application/json")){let e="Download failed.";try{const t=await n.json();t&&t.data&&("string"==typeof t.data?e=t.data:t.data.message&&(e=t.data.message))}catch(e){}throw new Error(e)}const r=await n.blob(),i=URL.createObjectURL(r),s=document.createElement("a");s.href=i,s.download=t||"download.png",document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(i),1e3)}(t,o)}catch(e){console.error(e)}})})},752:()=>{var e,t={random:function(e,t){return Math.random()*(t-e)+e},arrayRandom:function(e){return e[Math.floor(Math.random()*e.length)]},interpolate:function(e,t,o){return e*(1-o)+t*o},rangePosition:function(e,t,o){return(o-e)/(t-e)},clamp:function(e,t,o){return Math.max(Math.min(e,o),t)},queryArray:function(e,t){return t||(t=document.body),Array.prototype.slice.call(t.querySelectorAll(e))},ready:function(e){"complete"==document.readyState?e():document.addEventListener("DOMContentLoaded",e)}};function o(e){function t(){r.vertShrink=(window.innerHeight-1e3)/-200,r.vertShrink=function(e){return Math.max(Math.min(e,1),0)}(r.vertShrink)}function o(){var e=r.container.getBoundingClientRect();(e.bottom<0||e.top>window.innerHeight)&&1==r.playing?r.playing=!1:e.bottom>0&&e.top<window.innerHeight&&0==r.playing&&(r.playing=!0,requestAnimationFrame(function(e){r.tick(e)}))}function n(e){var t=e.x+e.noiseX+r.scrollX,o=e.y+e.noiseY;o=function(e,t,o){return e*(1-o)+t*o}(o,r.containerHeight/2,r.vertShrink*r.maxShrink),t<-200&&(e.x+=r.containerWidth);var n=a(e.introProgress)/20+.95;n*=e.scale,e.el.style.opacity=a(e.introProgress),e.el.style.transform="translate("+t+"px, "+o+"px) scale("+n+")"}function a(e){return e<.5?2*e*e:(4-2*e)*e-1}var r=this;for(p in e)r[p]=e[p];r.container=document.querySelector(r.containerSelector),r.noiseT=0,r.scrollX=0,r.logos.forEach(function(e,t){r.logos[t]={index:t,title:e}}),function(e){var t=0,o=0,n=null;for(t=e.length-1;t>0;t-=1)o=Math.floor(Math.random()*(t+1)),n=e[t],e[t]=e[o],e[o]=n}(r.logos),r.vertShrink=0,t(),window.addEventListener("resize",t),r.playing=!1,o(),window.addEventListener("scroll",o),r.logosLoaded=!1;var i=document.querySelector(".IconsContainer"),l=JSON.parse(i.getAttribute("data-colleges")),c=[];for(var d in l)c.push(l[d]);c=c.filter(function(e,t){return void 0!==e&&c.indexOf(e)==t}),r.logosLoaded=!0;for(var u=r.bubbles.length-6,p=0;p<u;p++){var m=r.bubbles[p],f=p%r.logos.length;m.scale=m.s||1,m.seedX=1e4*Math.random(),m.seedY=1e4*Math.random(),m.noiseX=m.noiseY=0,m.introDelay=Math.random()*r.introDelay,m.introProgress=0,m.el=document.createElement("div"),m.el.className=r.classPrefix+p,m.el.setAttribute("data-bg-image",c[p]||""),m.el.style="background-image: none;",m.tagEl=document.createElement("span"),m.tagEl.innerHTML=r.logos[f].title,m.el.appendChild(m.tagEl),n(m),r.container.appendChild(m.el)}function h(){if(!r.imagesLazyLoaded){var e=r.container.querySelectorAll("[data-bg-image]");
10!==e.length?(r.imagesLazyLoaded=!0,e.forEach(function(e){var t=e.getAttribute("data-bg-image");if(t){var o=new Image;o.onload=function(){e.style.backgroundImage="url("+t+")",e.removeAttribute("data-bg-image")},o.src=t}})):r.imagesLazyLoaded=!0}}if(r.imagesLazyLoaded=!1,"IntersectionObserver"in window){var g=new IntersectionObserver(function(e){e.forEach(function(e){e.isIntersecting&&!r.imagesLazyLoaded&&(h(),g.disconnect())})},{rootMargin:"200px"});g.observe(r.container)}else h();r.firstTick=null,r.lastTick=0,r.tick=function(e){r.firstTick||(r.firstTick=e);var t=(e-=r.firstTick)-r.lastTick;r.lastTick=e,r.noiseT+=t*r.noiseSpeed,r.scrollX-=t*r.scrollSpeed;for(var o=0;o<u;o++){var a=r.bubbles[o];a.noiseX=s(a.seedX+r.noiseT)*r.noiseScale-r.noiseScale/2,a.noiseY=s(a.seedY+r.noiseT)*r.noiseScale-r.noiseScale/2,r.logosLoaded&&a.introProgress<1&&e>a.introDelay&&(a.introProgress=Math.min(1,a.introProgress+t/r.introDuration)),n(a)}r.playing&&requestAnimationFrame(r.tick)}}t.isRetina=window.devicePixelRatio>1.3,t.mobileViewportWidth=670,t.isMobileViewport=window.innerWidth<t.mobileViewportWidth,window.addEventListener("resize",function(){t.isMobileViewport=window.innerWidth<t.mobileViewportWidth}),t.touch={isSupported:"ontouchstart"in window||navigator.maxTouchPoints,isDragging:!1},document.addEventListener("DOMContentLoaded",function(){document.body.addEventListener("touchmove",function(){t.touch.isDragging=!0}),document.body.addEventListener("touchstart",function(){t.touch.isDragging=!1})}),t.load={images:function(e,t){"string"==typeof e&&(e=[e]);var o=-e.length;e.forEach(function(e){var n=new Image;n.src=e,n.onload=function(){0===++o&&t&&t()}})},css:function(e,t){var o=document.createElement("link"),n=(window.readConfig("strut_files")||{})[e];if(!n)throw new Error('CSS file "'+e+'" not found in strut_files config');o.href=n,o.rel="stylesheet",document.head.appendChild(o),t&&(o.onload=t)},js:function(e,t){var o=document.createElement("script"),n=(window.readConfig("strut_files")||{})[e];if(!n)throw new Error('Javascript file "'+e+'" not found in strut_files config');o.src=n,document.head.appendChild(o),t&&(o.onload=t)}},t.supports={es6:function(){try{return new Function("(a = 0) => a"),!0}catch(e){return!1}}(),pointerEvents:(e=document.createElement("a").style,e.cssText="pointer-events:auto","auto"===e.pointerEvents),positionSticky:function(){var e="position:",t="sticky",o=document.createElement("a").style,n=" -webkit- -moz- -o- -ms- ".split(" ");return o.cssText=e+n.join(t+";"+e).slice(0,-9),-1!==o.position.indexOf(t)}(),masks:!/MSIE|Trident|Edge/i.test(navigator.userAgent)};var n=[{s:.6,x:1134,y:45},{s:.6,x:1620,y:271},{s:.6,x:1761,y:372},{s:.6,x:2499,y:79},{s:.6,x:2704,y:334},{s:.6,x:2271,y:356},{s:.6,x:795,y:226},{s:.6,x:276,y:256},{s:.6,x:1210,y:365},{s:.6,x:444,y:193},{s:.6,x:2545,y:387},{s:.8,x:1303,y:193},{s:.8,x:907,y:88},{s:.8,x:633,y:320},{s:.8,x:323,y:60},{s:.8,x:129,y:357},{s:.8,x:1440,y:342},{s:.8,x:1929,y:293},{s:.8,x:2135,y:198},{s:.8,x:2276,y:82},{s:.8,x:2654,y:182},{s:.8,x:2783,y:60},{x:1519,y:118},{x:1071,y:233},{x:1773,y:148},{x:2098,y:385},{x:2423,y:244},{x:901,y:385},{x:624,y:111},{x:75,y:103},{x:413,y:367},{x:2895,y:271},{x:1990,y:75}],a=[""];t.ready(function(){var e=document.querySelector(".IconsContainer");if(e){var t=JSON.parse(e.getAttribute("data-colleges")||"{}");window.logoBubbles=new o({bubbles:n,logos:a,classPrefix:"Icon Icon-img",containerSelector:".IconsContainer",containerWidth:3e3,containerHeight:460,maxShrink:.2,noiseSpeed:55e-6,noiseScale:80,scrollSpeed:.0175,introDelay:1500,introDuration:1500,logoUrls:t})}});var r,i=function(e){return.5*(1-Math.cos(e*Math.PI))},s=function(e){if(null==r){r=new Array(4096);for(var t=0;t<4096;t++)r[t]=Math.random()}e<0&&(e=-e);for(var o,n,a=Math.floor(e),s=e-a,l=0,c=.5,d=0;d<4;d++)o=i(s),n=r[4095&a],l+=(n+=o*(r[a+1&4095]-n))*c,c*=.5,a<<=1,(s*=2)>=1&&(a++,s--);return l}},877:(e,t,o)=>{var n=o(567);"undefined"!=typeof recurly&&n(document).ready(function(e){recurly.configure(recurly_object.recurly_key);const t=recurly.Elements();t.CardElement().attach("#recurly-elements"),document.querySelector("#backup_payment_form")&&document.querySelector("#backup_payment_form").addEventListener("submit",function(o){o.preventDefault();var n=this,a=new FormData(n);recurly.token(t,n,function(t,o){if(t)if("validation"==t.code){var r=t.message+" Please correct the following fields: account "+t.fields.join(", ");
1t.fields.includes("number")&&(r="The card number entered is incorrect. Please double-check and re-enter your card details."),l(r)}else l(t.message);else{var i=document.getElementById("error-alert");i.style.display="none",o&&o.id&&(a.append("recurly_token",o.id),n.submit()),e.ajax({type:"POST",url:ajax_object.ajax_url,data:a,processData:!1,contentType:!1,success:function(e){e.success?i(e.message):(i("Error: "+e.message),l(e.error))}})}})});const o=recurly.Pricing.Checkout();var a=document.querySelector("#form-checkout");function r(e,t){"undefined"!=typeof grecaptcha?grecaptcha.ready(function(){grecaptcha.execute("6LenyfgqAAAAAPWT-3ghLdPFiLtKKWEh-XVCD2NT",{action:"submit"}).then(function(o){e.append("g-recaptcha-response",o),i(e,t)})}):i(e,t)}function i(e,t){n.ajax({type:"POST",url:ajax_object.ajax_url,data:e,processData:!1,contentType:!1,success:function(e){"success"==e.status?location.href=e.redirect:(l(e.error),s(t,"active"))}})}function s(e,t){return"disabled"==t&&(e.prop("disabled","true"),e.text("Processing...")),"active"==t&&(e.removeAttr("disabled"),e.text("Complete Purchase")),t}function l(e){var t=document.getElementById("error-alert");t.innerHTML="",t.style.display="block",t.innerHTML+='<li class="text-red-600 text-sm">'+e+"</li>"}function c(t,o,n){const a=e("#trial-disclaimer"),r=e("#trial-renewal-price"),i=e("#trial-duration");if(a.length)if(t){if(n&&i.length){const e=`${n.amount||7}-${n.unit||"day"}`;i.text(e)}let e=0;if(o)try{const t=o.price();t&&t.next&&t.next.total?e=parseFloat(t.next.total.replace(/[^0-9.]/g,"")).toFixed(2):t&&t.now&&t.now.subscriptions&&(e=parseFloat(t.now.subscriptions.replace(/[^0-9.]/g,"")).toFixed(2))}catch(e){}if(0===e||"0.00"===e){const t=document.querySelector(".plan-adjustment");if(t){const o=t.getAttribute("data-adjustment-amount");o&&(e=parseFloat(o).toFixed(2))}}if(0===e||"0.00"===e){const t=document.querySelector("#order-summary .item");if(t){const o=t.querySelector("span")?.textContent;if(o){const t=o.match(/\$?([\d,]+\.?\d*)/);t&&(e=parseFloat(t[1].replace(/,/g,"")).toFixed(2))}}}e>0&&"0.00"!==e?r.text(e):r.text("0.00"),a.removeClass("hidden")}else a.addClass("hidden")}a&&o.attach("#form-checkout"),a&&document.querySelector("#form-checkout").addEventListener("submit",function(e){e.preventDefault();const o=this,a=n("#form-checkout button[type=submit]");s(a,"disabled"),a.prop("disabled",!0);const i=o.querySelector("#tos-checkbox");if(i&&!i.checked)return l("Acknowledgement of Terms of Service must be checked."),void s(a,"active");const c=o.querySelector('input[name="role"]');if(c&&"coach"===c.value){const e=o.querySelector('input[name="acf[field_6467a519ae604][]"]');if(!e||!(e.value||"").trim())return l("Please select a school."),void s(a,"active")}recurly.token(t,o,function(e,t){if(e)if(s(a,"active"),"validation"==e.code||"invalid-parameter"==e.code){var n=e.message+" Please correct the following fields: account "+e.fields.join(", ");e.fields.includes("number")&&(n="The card number entered is incorrect. Please double-check and re-enter your card details."),l(n)}else l(e.message);else document.getElementById("error-alert").style.display="none",r(new FormData(o),a)})}),o.on("error.coupon",()=>{l('Sorry, this coupon is invalid. It may be expired, reached its usage limit, or is restricted to a specific plan. Please check the plan in your cart, or reach out to <a href="'+help_center+'" target="_blank" style="text-decoration: underline; font-weight: 600;">our support team</a> for assistance.'),c(!1,o)}),o.on("unset.coupon",()=>{e("#form-checkout").removeAttr("data-trial-coupon"),e("#form-checkout").removeAttr("data-trial-amount"),e("#form-checkout").removeAttr("data-trial-unit"),c(!1,o),e("#coupon-list").hide().empty()}),o.on("unset.coupon",()=>{e("#form-checkout").removeAttr("data-trial-coupon"),e("#form-checkout").removeAttr("data-trial-amount"),e("#form-checkout").removeAttr("data-trial-unit"),c(!1,o),e("#coupon-list").hide().empty()}),o.on("set.coupon",t=>{document.getElementById("error-alert").style.display="none",e("#coupon-list").empty();let n="";if("free_trial"===t.discount.type){const e=t.discount.trial?t.discount.trial.amount:"",o=t.discount.trial?t.discount.trial.unit:"";n=e&&o?`${e} ${o}${e>1?"s":""} free trial`:"Free trial"}else if("percent"===t.discount.type){const e="%";n=100*t.discount.rate+e}else n="$"+(t.discount.amount?t.discount.amount.USD:0);const a=function(e){return!(!e||!e.discount)&&"free_trial"===e.discount.type}(t);
1if(a){e("#form-checkout").attr("data-trial-coupon","true");let n=null;t.discount&&t.discount.trial&&(n={amount:t.discount.trial.amount,unit:t.discount.trial.unit},e("#form-checkout").attr("data-trial-amount",n.amount),e("#form-checkout").attr("data-trial-unit",n.unit)),e(document).trigger("trialCouponApplied",[t]),c(!0,o,n)}else e("#form-checkout").removeAttr("data-trial-coupon"),e("#form-checkout").removeAttr("data-trial-amount"),e("#form-checkout").removeAttr("data-trial-unit"),c(!1,o);e("#coupon-list").show().append(`<li class="flex py-4 px-4 sm:px-6">\n <div class="flex-1 flex flex-col">\n <div class="flex">\n <div class="min-w-0 flex-1">\n <h4 class="text-base font-medium text-gray-700">\n Coupon: ${t.name}\n </h4>\n </div>\n\n <div class="ml-4 flex-shrink-0 flow-root">\n <span>${a?"":"-"}${n}</span>\n </div>\n </div>\n </div>\n </li>`)}),o.on("change",t=>{const n=t.now&&t.now.total?parseFloat(t.now.total.replace(/[^0-9.]/g,"")):null,a="true"===e("#form-checkout").attr("data-trial-coupon");if(a&&null!==n&&0===n){const t=e("#form-checkout").attr("data-trial-amount"),n=e("#form-checkout").attr("data-trial-unit");let a=null;t&&n&&(a={amount:parseInt(t),unit:n}),c(!0,o,a)}else a&&null!==n&&n>0?(e("#form-checkout").removeAttr("data-trial-coupon"),e("#form-checkout").removeAttr("data-trial-amount"),e("#form-checkout").removeAttr("data-trial-unit"),c(!1,o)):a||c(!1,o)}),o.on("set.plan",t=>{const o=document.querySelectorAll(".plan-adjustment");var n=t.plan.code,a=null;if(o.forEach(function(e,o){var r=e.getAttribute("data-adjustment-code"),i=e.getAttribute("data-adjustment-amount");if(r==n){t.plan.price.USD.unit_amount=i;var s=parseFloat(i);Number.isNaN(s)||(a=s)}}),"true"===e("#form-checkout").attr("data-trial-coupon"))if(null!==a)e("#trial-renewal-price").text(a.toFixed(2));else{const o=t.plan.price.USD.unit_amount;o&&e("#trial-renewal-price").text((o/100).toFixed(2))}});const d=recurly.PayPal({display:{displayName:" My product "}});e("#paypal-checkout").on("click",function(t){let o=!0;if(e("#form-checkout").find("input").each(function(){if(!(e(this).prop("required")&&""!=e(this).prop("value")||"hidden"==e(this).prop("type")||"checkbox"==e(this).prop("type")||"coupon"==e(this).prop("id")))return o=!1,!1;o=!0}),1==o){const e=document.getElementById("tos-checkbox");if(e&&!e.checked)return void l("Acknowledgement of Terms of Service must be checked.");t.preventDefault(),d.start()}}),d.on("token",function(t){const o=document.querySelector("#form-checkout");e("#form-checkout").append('<input type="hidden" name="recurly-token" value="'+t.id+'" />');const a=n("#paypal-checkout");s(a,"disabled"),r(new FormData(o),a)}),d.on("error",function(e){l(e.message),s(n("#paypal-checkout"),"active")});const u=recurly.ApplePay({country:"US",currency:"USD",recurring:!0,label:"For My Subcription",pricing:o});u.ready(function(){e("#apple-pay-button").on("click",function(t){let o=!0;if(e("#form-checkout").find("input, select").each(function(){var t=e(this).prop("name");if(o=!0,"undefinded"!==t&&!1!==t&&("first-name"==t||"last-name"==t||"username"==t||"password"==t||"email"==t||"phone"==t||"state"==t)){if(e(this).prop("required")&&""==e(this).prop("value"))return o=!1,l("Please correct the missing "+e(this).prop("name")+" field above."),!1;if("phone"==t&&10!=e(this).prop("value").length)return o=!1,l("Please include at least 10 digits in the phone field above."),!1;if("email"==t&&-1==e(this).prop("value").indexOf("@"))return o=!1,l("Please enter a valid email address in the email field above."),!1;if("state"==t&&e(this).prop("value").length<2)return o=!1,l("Please select a state from the dropdown above."),!1}}),1==o){const e=document.getElementById("tos-checkbox");if(e&&!e.checked)return void l("Acknowledgement of Terms of Service must be checked.");t.preventDefault(),u.begin()}})}),u.on("error",function(e){"apple-pay-not-supported"!==e.code&&l(e.message)}),u.on("token",function(t){const o=document.querySelector("#form-checkout");e("#form-checkout").append('<input type="hidden" name="recurly-token" value="'+t.i
1d+'" />');const a=n("#apple-pay-button");r(new FormData(o),a)})})},402:()=>{},788:()=>{},567:e=>{"use strict";e.exports=window.jQuery}},e=>{var t=t=>e(e.s=t);e.O(0,[329],()=>(t(958),t(877),t(402),t(788))),e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.