1import{o as onReady}from"./app-chunk-common-BPZAsnhF.js";import"./app-bundle.vendor.js";import"./app-chunk-vendor-modules-m0hYGuxH.js";const url="/pages/update-nuun-box-subscription",msg=`Your subscription will not ship until you update your payment method. Please <a href="${url}">update your payment method here</a>.`,paymentMsg=`To update your payment method please <a href="${url}">visit this page</a>.`,addressMsg=`To update your address please first <a href="${url}">update your payment details here</a>.`,isLegacyPaymentMethod=async()=>{const methods=(await window.ReCharge.Api.getPaymentMethods()).data.payment_methods;if(methods.length===0)return!0;for(let i=0;i<methods.length;i++)if(methods[i].processor_name==="shopify_payments")return!1;return!0},injectSubscriptionPageContent=async()=>{const content=document.querySelector(".rct_content");if(!content||!await isLegacyPaymentMethod())return;const el=document.createElement("div");el.className="nuun-recharge-portal__alert",el.innerHTML=msg;const firstChild=content.childNodes[0];content.insertBefore(el,firstChild)},injectMsg=async(selector,extraShowElements,msg2)=>{const content=document.querySelector(".rct_content"),showContent=()=>{if(document.querySelector(selector).style.display="block",extraShowElements){const otherElements=document.querySelectorAll(extraShowElements);for(let i=0;i<otherElements.length;i++){const el2=otherElements[i];el2.style.display="auto"}}};if(!content){showContent();return}if(await isLegacyPaymentMethod()===!1){showContent();return}const el=document.createElement("div");el.className="nuun-recharge-portal__alert",el.innerHTML=msg2;const firstChild=content.childNodes[0];content.insertBefore(el,firstChild)};var initRechargeCustomerPortal=()=>{window.location.pathname.endsWith("/subscriptions")&&injectSubscriptionPageContent(),window.location.pathname.endsWith("/payment_methods")&&injectMsg("#PaymentMethodsPage",null,paymentMsg),window.location.pathname.endsWith("/shipping")&&injectMsg("#ShippingPage",".add-shiping-info",addressMsg)};onReady(()=>{initRechargeCustomerPortal()}); 2//# sourceMappingURL=/cdn/shop/t/637/assets/app-bundle.recharge-portal.js.map?v=24578889599159141761790681180
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.