1import{e as s,w as b}from"./ScrollTrigger.js";const E={DEVICE_TYPE_DESKTOP:"desktop",DEVICE_TYPE_MOBILE:"mobile",PDP_SIGNUP_FLOW_SOLD_OUT:"soldOut"};let d="";const u=()=>window.ALLBIRDS?.settings?.iterable?.enabled===!0;document.addEventListener("DOMContentLoaded",()=>{const{env:e,types:r}=window.ALLBIRDS.environment,i=window.ALLBIRDS.Iterable||{},n=i.prodKey||"",t=i.stagingKey||"";d=e===r.STAGING||e===r.DEVELOPMENT?t:n});const w=e=>{if(!u())return;if(!e){b("[Allbirds pixel] - Iterable - Error: Payload is null or undefined",{},new Error("Payload is null or undefined"));return}const{email:r,signupSource:i}=e;if(!d){s("[Allbirds pixel] - Iterable - Error: No API KEY configured",{},new Error("No API KEY configured"));return}if(!r){s("[Allbirds pixel] - Iterable - Error: Email is required",{},new Error("Email is required"));return}if(!i){s("[Allbirds pixel] - Iterable - Error: Signup source is required",{},new Error("Signup source is required"));return}try{window._iaq=window._iaq||[],window._iaq.push(["account",d]),window._iaq.push(["identify",r,e]),window._iaq.push(["track",i,{signupChannel:"web"}])}catch(n){s("[Allbirds pixel] - Iterable - Error: Failed to push signup data",{signupSource:i},n)}},_=({productColor:e="",productEdition:r="",productGender:i="",productMaster:n="",productMaterial:t="",productName:l="",productSilhouette:o="",sku:a=""})=>u()?{categories:{allbirdsEdition:r,allbirdsGender:i,allbirdsHue:e,allbirdsMaster:n,allbirdsMaterial:t,allbirdsSilhouette:o},name:l,sku:a}:null,p=({email:e,isMobile:r,pdpSignupFlow:i,placementSource:n,productData:t=null})=>{if(!u())return null;let l={};try{const{shopId:o}=window.ALLBIRDS.environment,a=window.ALLBIRDS.environment.defaultLocale,c=window.location.pathname;l={accepts_marketing:!0,deviceType:r.value?E.DEVICE_TYPE_MOBILE:E.DEVICE_TYPE_DESKTOP,email:e,locale:a,pdpSignupFlow:i,signupSource:n,signupSourceURL:c,siteRegion:o},t&&Object.keys(t).length>0&&(l={...l,productData:t})}catch(o){s("[Allbirds pixel] - Iterable - Error: Failed to build payload",{isMobile:r,placementSource:n},o)}return l};export{E as A,_ as a,p as b,w as p};
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.