1"use strict";(self.webpackChunkultimate_jekyll=self.webpackChunkultimate_jekyll||[]).push([[7881],{3345(e,t,n){n.d(t,{g:()=>o});var r=n(8129);function o(e,t){const n=document.querySelector(`#prerendered-icons [data-icon="${e}"]`);return n?t?n.innerHTML.replace('class="fa"',`class="fa ${r.A.utilities().escapeHTML(t)}"`):n.innerHTML:""}},7881(e,t,n){n.r(t);var r=n(200),o=n(3345),s=n(6451),a=n(8129);const i=()=>new Promise(async function(e){return await a.A.dom().ready(),function(){const e=new URL(window.location.href),t=c(e.searchParams.get("email")),n=c(e.searchParams.get("asmId")),i=(c(e.searchParams.get("templateId")),e.searchParams.get("sig")||""),u=document.getElementById("email-preferences-description"),d=document.getElementById("email-preferences-error"),l=document.getElementById("email-preferences-error-message"),m=document.getElementById("email-preferences-content"),f=document.getElementById("email-preferences-address"),p=document.getElementById("email-preferences-submit"),h=document.getElementById("email-preferences-info-unsubscribe"),y=document.getElementById("email-preferences-info-resubscribe"),b=document.querySelectorAll("[data-action]");if(!t||!n||!i)return u.textContent="Something went wrong.",l.textContent="This link is invalid or expired. Please try clicking the link in your email again.",void(d.hidden=!1);u.textContent="Confirm your email address to update your email preferences.",f.textContent=function(e){const[t,n]=e.split("@");if(!t||!n)return"***@***.***";const r=n.split("."),o=r.slice(0,-1).join("."),s=r.slice(-1)[0];return`${t.length<=3?t[0]+"*".repeat(t.length-1):t.slice(0,2)+"*".repeat(t.length-3)+t.slice(-1)}@${o.length<=2?o:o.slice(0,2)+"*".repeat(o.length-2)}.${s}`}(t),m.hidden=!1;let w="unsubscribe";b.forEach(e=>{e.addEventListener("click",()=>{w=e.dataset.action,b.forEach(e=>e.classList.remove("active")),e.classList.add("active"),h.hidden="unsubscribe"!==w,y.hidden="resubscribe"!==w,"unsubscribe"===w?(p.className="btn btn-danger w-100 mb-4",p.querySelector(".button-text").innerHTML=`${(0,o.g)("bell-slash","me-2")}Unsubscribe`):(p.className="btn btn-success w-100 mb-4",p.querySelector(".button-text").innerHTML=`${(0,o.g)("bell","me-2")}Resubscribe`)})});const g=new r.FormManager("#email-preferences-form",{autoReady:!1,allowResubmit:!1});g.on("validation",({data:e,setError:n})=>{e.email_confirm.toLowerCase().trim()!==t.toLowerCase().trim()&&n("email_confirm","Email does not match. Please enter the email address this was sent to.")}),g.on("submit",async({data:e})=>{const r=w;!function(e){gtag("event",`email_${e}`,{content_type:"email_preferences"}),fbq("trackCustom","unsubscribe"===e?"EmailUnsubscribe":"EmailResubscribe",{content_name:"Email Preferences"}),ttq.track("ViewContent",{content_id:`email-${e}`,content_type:"product"})}(r);try{await(0,s.A)(`${a.A.getApiUrl()}/backend-manager/marketing/email-preferences`,{method:"POST",response:"json",body:{email:t,asmId:n,action:r,sig:i},timeout:3e4}),"unsubscribe"===r?g.showSuccess("You have been successfully unsubscribed. You will no longer receive these emails."):g.showSuccess("You have been successfully resubscribed. You will start receiving these emails again.")}catch(e){throw a.A.sentry().captureException(new Error("Email preferences error",{cause:e})),new Error("An error occurred while processing your request. Please try again.")}}),g.ready()}(),e()});function c(e){if(!e)return"";try{return atob(decodeURIComponent(e))}catch(e){return""}}n.dn(i),n.d(t,["default",0,i])},6451(e,t,n){n.d(t,{A:()=>c});var r=(e=>"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(e,{get:(e,t)=>("undefined"!=typeof require?require:e)[t]}):e)(function(e){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});function o(e){const t={};return e&&e.headers?(e.headers.forEach(function(e,n){try{t[n]=JSON.parse(e)}catch(r){t[n]=e}}),t):t}function s(e,t,n){return"body"===n.output?t:{status:e.status,headers:o(e),body:t}}function a(e){return new Promise(function(t){setTimeout(t,e)})}async function i(e,t){const n=function(e,t){if(!(e=e||t.url))throw new Error("No URL provided.");return(t=t||{}).timeout=t.timeout||6e4,t.tries=void 0===t.tries?1:t.tries,t.log=void 0!==t.log&&t.log,t.method=(t.method||"get").toLowerCase(),t.cacheBreaker=void 0===t.cacheBreaker||t.cac
1heBreaker,t.contentType=(void 0===t.contentType?"":t.contentType).toLowerCase(),t.response=(void 0===t.response?"raw":t.response).toLowerCase(),t.output=void 0===t.output?"body":t.output,t.authorization=void 0!==t.authorization&&t.authorization,t.attachResponseHeaders=void 0!==t.attachResponseHeaders&&t.attachResponseHeaders,t.download=t.download||!1,t.headers=t.headers||{},t.query=t.query||{},t.body=t.body||null,{url:e,options:t}}(e,t);e=n.url,t=n.options;const{url:i,config:c}=function(e,t){const n=t.body&&"object"==typeof t.body,r=n&&"function"==typeof t.body.append,o={method:t.method.toUpperCase(),headers:{...t.headers},body:null};if(t.body&&(o.body=r?t.body:n?JSON.stringify(t.body):t.body),(n&&!r||"json"===t.contentType)&&(o.headers["Content-Type"]="application/json"),"GET"===o.method&&(delete o.body,delete o.headers["Content-Type"]),t.authorization){const e=t.authorization;o.headers.Authorization=e.match(/^Bearer |^Basic |^Digest /)?e:`Bearer ${e}`}const s=new URL(e);Object.keys(t.query).forEach(function(e){s.searchParams.set(e,t.query[e])});const a=!0===t.cacheBreaker?Math.floor(Date.now()/1e3):t.cacheBreaker;return a&&s.searchParams.set("cb",a),t.log&&console.log("Fetch configuration:",{bodyIsFormData:r,bodyIsObject:n,options:t,config:o}),{url:s.toString(),config:o}}(e,t);return async function(e,t){const n=t.tries,r=0===n;let o;for(let s=1;r||s<=n;s++){if(s>1){const e=Math.min(3e3*(s-1),6e4);await a(e)}let i,c;t.log&&console.log(`Fetch (${s}/${t.tries}): attempt`),t.timeout>0&&(i=new AbortController,c=setTimeout(function(){i.abort()},t.timeout));try{const t=await e(i?i.signal:void 0);return clearTimeout(c),t}catch(e){if(clearTimeout(c),o="AbortError"===e.name?new Error("Request timed out"):e,!r&&s>=n)throw o}}}(async function(e){const n={...c};e&&(n.signal=e);const a="undefined"!=typeof window&&window.fetch||globalThis.fetch;t.log&&console.log("Fetching:",i);const u=await a(i,n);if(u.ok&&t.download){const e=await function(e,t){const{Readable:n}=r("stream"),o=r("fs-jetpack"),s=r("mime-types"),a=r("path");return new Promise(function(r,i){const c=e.headers.get("content-type"),u=(s.extension(c)||"").replace("jpeg","jpg");if(!o.exists(t.download)){const e=a.dirname(t.download);o.dir(e)}a.extname(t.download)||(t.download+=`.${u}`);const d=n.fromWeb(e.body),l=o.createWriteStream(t.download);d.pipe(l),d.on("error",function(e){i(new Error(`Failed to download: ${e}`))}),l.on("finish",function(){r({res:e,path:t.download})})})}(u,t);return s(u,e,t)}if(!u.ok){const e=await function(e,t){const n=o(e);return e.text().then(function(r){const o=new Error(r||e.statusText||"Unknown error");if(o.status=e.status,n["bm-properties"])try{Object.keys(n["bm-properties"]).forEac
1h(function(e){o[e]=n["bm-properties"][e]})}catch(e){console.warn("Failed to add bm-properties to error object",e)}return t.attachResponseHeaders&&Object.keys(n).forEach(function(e){"bm-properties"!==e&&(o[e]=n[e])}),o})}(u,t);throw e}const d=await async function(e,t){if("raw"===t.response)return e;const n=await e.text();if("json"===t.response)try{return JSON.parse(n)}catch(e){throw new Error(`Response is not JSON: ${e}`)}return n}(u,t);return s(u,d,t)},t)}"undefined"!=typeof window&&(window.WonderfulFetch=i);var c=i}}]);
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.