PageSourceSearch

https://www.shipstation.com/wp-content/themes/shipstation-blocks/b…/view.js?ver=683df51f0cf476abfc9b

js shipstation.com collected 2026-10-01 07:01:41 UTC 77,902 bytes, 3 lines download raw bytes

1(()=>{"use strict";const e=window.wp.element,t=window.wp.i18n,n=e=>t=>e.includes(t.country),a=e=>t=>Boolean(t.backendError&&t.backendError.field===e),r=["US","CA","AU","GB","FR","DE","NZ","IT","NL","ES"];function o(e,t=""){const n=[],a=e||"";return t&&a.toLowerCase().includes(t.toLowerCase())&&""!==t.trim()&&n.push("Password cannot contain your email address"),/[A-Z]/.test(a)||n.push("Password must include an uppercase letter"),/[a-z]/.test(a)||n.push("Password must include a lowercase letter"),/\d/.test(a)||n.push("Password must include a number"),function(e){for(const t of e)if(" !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~".includes(t))return!0;return!1}(a)||n.push("Password must include a special character"),a.length<12&&n.push("Password must be at least 12 characters"),i(a)&&n.push("Password must not contain repeated characters"),s(a)&&n.push("Password must not contain sequential characters"),{valid:0===n.length,errors:n}}function i(e){return/(.)\1{2,}/.test(e)}function s(e){for(let t=0;t<e.length-2;t++){const n=e.charCodeAt(t),a=e.charCodeAt(t+1),r=e.charCodeAt(t+2);if(n+1===a&&n+2===r)return!0;if(n-1===a&&n-2===r)return!0}return!1}function l(e){const t=(e||"").trim();if(""===t)return null;const n="+"===t.charAt(0),a=t.replace(/\D/g,"");return 0===a.length?null:"1"===a.charAt(0)?11===a.length?null:"Please enter a valid 10-digit phone number (with or without the leading 1).":n?a.length>=7&&a.length<=15?null:"Please enter a valid international phone number (7–15 digits).":10===a.length?null:"Please enter a valid 10-digit phone number."}const c={required:(e="This field is required")=>({id:"required",message:e,validate:e=>""!==(e??"").trim()}),minLength:(e,t)=>({id:`minLength:${e}`,message:t??`Must be at least ${e} characters`,validate:t=>(t??"").length>=e}),countryAllowed:e=>({id:"country",message:e,validate:e=>{return t=e,r.includes(t);var t}}),notDefault:(e="Please select an option")=>({id:"notDefault",message:e,validate:e=>{return""!==(t=e)&&null!=t;var t}}),phoneNumber:(e="Please enter a valid phone number")=>({id:"phoneNumber",message:e,messageFor:t=>l(t.values.phone??"")??e,validate:e=>null===l(e)}),emailBlacklist:e=>({id:"emailBlacklist",message:e,messageFor:t=>t.config.i18n?.emailBlacklistError||e,validate:(e,t)=>function(e,t){if(!t||0===t.length)return!0;const n=(e||"").lastIndexOf("@");if(-1===n)return!0;const a=e.slice(n+1).toLowerCase();return!t.some((e=>{const t=e.trim().toLowerCase();return""!==t&&(t.endsWith(".*")?a.startsWith(t.slice(0,-1)):a===t)}))}(e,t.config.emailBlacklist?function(e){const t=e.config.emailBlacklistDomains;return Array.isArray(t)?t:[]}(t):[])}),passwordComplexity(){const e="Your password must be at least 12 characters long and contain at least one uppercase letter, one lowercase letter, one number, and one special character. It must not contain repetitive or sequential characters";return{id:"passwordComplexity",message:e,messageFor:t=>o(t.values.password??"",t.values.email??"").errors.join(". ")||e,validate:(e,t)=>o(e,t.values.email??"").valid}},strictPassword:e=>({id:"strictPassword",message:e,validate:e=>function(e){const t=e||"";return!(t.length<12||t.length>64||i(t)||s(t)||!/[A-Z]/.test(t)||!/[\W_]/.test(t))}(e)}),zipCode:(e="Please enter a valid ZIP code")=>({id:"zipCode",message:e,validate:e=>function(e){const t=(e||"").trim();return""===t||/^\d{5}(-\d{4})?$/.test(t)}(e)})};function u(e,t){if(e.alwaysRequired)return!0;if(!1!==e.canToggleRequired){const n=t.config.requiredOverrides?.[e.name];if("boolean"==typeof n)return n}return!!e.requiredWhen&&e.requiredWhen(t)}function d(e,t){return!e.visibleWhen||e.visibleWhen(t)}async function p(e,t,n){const a=u(e,n),r=""===(t??"").trim();if(a&&r)return{field:e.name,ruleId:"required",message:m(e)};if(r)return null;for(const a of e.rules??[])if("required"!==a.id&&(!a.when||a.when(n))&&!await a.validate(t,n))return{field:e.name,ruleId:a.id,message:a.messageFor?.(n)||a.message};return null}function m(e){const t=(e.rules??[]).find((e=>"required"===e.id));return t?.message??"This field is required"}async function h(e,t){const n=[];for(const a of e){if(!d(a,t)&&!0!==a.submitWhenHidden)continue;const e=await p(a,t.values[a.name]??"",t);e&&n.push(e)}return n}const f=[{value:"US",label:"United States"},{value:"CA",label:"Canada"},{value:"AU",label:"Australia"},{value:"NZ",label:"New Zealand"},{value:"GB",label:"United Kingdom"},{value:"FR",label:"France"},{value:"DE",label:"Germany"},{value:"IT",label:"Italy"},{value:"NL",label:"Netherlands"},{value:"ES",label:"Spain"}],g=["1","50","500","1000","2000","5000","7500","7501","0"],y=["1","50","500","3000","10000","10001"],b=["1","50","500","3000","7499","7501","0"],w=["1","50","500","1000","2000","5000","7500","0"],v={1:"I only need to ship one package",50:"50 shipments or less, I'm just getting started",500:"51-500 shipments",1e3:"501-1,000 shipments",2e3:"1,001-2,000 shipments",5e3:"2,001-5,000 shipments",7500:"7,501+ shipments",0:"I don't plan to ship anything"},_=["GB","FR","DE"],k=["AU","NZ"],C={1:"1 - 49",50:"50 - 499",500:"500 - 999",1e3:"1,000 - 1,999",2e3:"2,000 - 4,999",3e3:"3,000 - 9,999",5e3:"5,000 - 7,499",7499:"7,500 - 9,999",7500:"7,500+",7501:"10,000+",1e4:"10,000 - 24,999",10001:"25,000+",0:"Not shipping yet"};function x(e,t){return"LabelApi"===t?w:_.includes(e)?y:k.includes(e)?b:g}const S=["Search engine (Google, Bing, etc.)","Shopping Cart (Shopify, eBay, etc.)","Recommended by Friend","Received Mailer","Radio / Streaming Audio / SiriusXM","Podcast / Youtube","TV Commercial","Event / Tradeshow","Social Media Ad (Facebook, LinkedIn, etc.)","Influencer (Instagram/TikTok)","Banner Ad","Other"],A={other:"Other"},R=Object.entries({"Radio / Streaming Audio / SiriusXM":[{label:"Sirius XM",tags:["sirius","xm","satellite radio","radio"]},{label:"Pandora",tags:["pandora","radio","streaming","music"]},{label:"iHeartRadio",tags:["iheart","iheartradio","radio","streaming"]},{label:"Spotify",tags:["spotify","music","streaming","podcast"]},{label:"Radio Ad",tags:["radio","ad","advertisement","commercial"]}],"Podcast / Youtube":[{label:"The Business Movers Podcast",tags:["business movers","podcast","wondery"]}
1,{label:"How I Built This",tags:["how i built this","podcast","npr","guy raz"]},{label:"My First Million",tags:["my first million","podcast","sam parr","shaan puri"]},{label:"All-In Podcast",tags:["all in","podcast","tech","venture capital"]},{label:"Joe Rogan Experience",tags:["joe rogan","jre","podcast"]},{label:"Acquired Podcast",tags:["acquired","podcast","tech","business"]},{label:"Podcast",tags:["podcast","audio"]},{label:"YouTube",tags:["youtube","video","google"]},{label:"YouTube Ad",tags:["youtube","video","ad","streaming"]}],"Social Media Ad (Facebook, LinkedIn, etc.)":[{label:"Instagram",tags:["instagram","ig","insta","social media","meta"]},{label:"Facebook",tags:["facebook","fb","social media","meta"]},{label:"LinkedIn",tags:["linkedin","li","social media","professional"]},{label:"Twitter/X",tags:["twitter","x","social media"]},{label:"Reddit",tags:["reddit","social media","forum"]},{label:"Facebook Ad",tags:["facebook","fb","ad","social media","advertisement"]},{label:"Instagram Ad",tags:["instagram","ig","ad","social media","advertisement"]},{label:"LinkedIn Ad",tags:["linkedin","li","ad","social media","advertisement"]},{label:"Social Media Ad",tags:["social media","ad","advertisement"]}],"Influencer (Instagram/TikTok)":[{label:"TikTok",tags:["tiktok","social media","video"]},{label:"Influencer",tags:["influencer","social media","instagram","tiktok"]}],"Search engine (Google, Bing, etc.)":[{label:"Google",tags:["google","search","search engine"]},{label:"Google Search",tags:["google","search","search engine"]},{label:"Bing",tags:["bing","microsoft","search","search engine"]},{label:"DuckDuckGo",tags:["duckduckgo","ddg","search","privacy"]},{label:"Search Engine",tags:["search","search engine","seo"]},{label:"ChatGPT",tags:["chatgpt","chat gpt","gpt","ai","openai","artificial intelligence"]},{label:"Google Gemini",tags:["gemini","google","ai","bard","artificial intelligence"]},{label:"Microsoft Copilot",tags:["copilot","microsoft","ai","bing","artificial intelligence"]},{label:"Claude",tags:["claude","ai","anthropic","artificial intelligence"]},{label:"Perplexity",tags:["perplexity","ai","search","artificial intelligence"]}],"Shopping Cart (Shopify, eBay, etc.)":[{label:"Shopify",tags:["shopify","ecommerce","shopping cart","platform"]},{label:"Shopify App Store",tags:["shopify","app store","ecommerce","marketplace"]},{label:"Amazon",tags:["amazon","ecommerce","marketplace"]},{label:"eBay",tags:["ebay","ecommerce","marketplace","auction"]},{label:"Etsy",tags:["etsy","ecommerce","marketplace","handmade"]},{label:"WooCommerce",tags:["woocommerce","wordpress","ecommerce","plugin"]},{label:"BigCommerce",tags:["bigcommerce","ecommerce","platform"]},{label:"Magento",tags:["magento","adobe","ecommerce","platform"]},{label:"Wix",tags:["wix","website builder","ecommerce"]},{label:"Squarespace",tags:["squarespace","website builder","ecommerce"]}],"Event / Tradeshow":[{label:"Trade Show",tags:["trade show","tradeshow","event","conference","expo"]},{label:"Conference",tags:["conference","event","trade show"]},{label:"ShopTalk",tags:["shoptalk","conference","ecommerce","retail"]},{label:"IRCE",tags:["irce","conference","ecommerce","retail"]},{label:"Event",tags:["event","conference","trade show"]},{label:"Webinar",tags:["webinar","online","event","presentation"]}],"TV Commercial":[{label:"TV Commercial",tags:["tv","television","commercial","ad"]},{label:"TV",tags:["tv","television"]},{label:"Hulu Ad",tags:["hulu","streaming","tv","ad"]}],"Received Mailer":[{label:"Received Mailer",tags:["mailer","mail","postcard","direct mail"]},{label:"Direct Mail",tags:["direct mail","mailer","postcard"]}],"Banner Ad":[{label:"Banner Ad",tags:["banner","banner ad","display ad","online ad"]},{label:"Billboard",tags:["billboard","outdoor","advertising"]}],"Recommended by Friend":[{label:"Recommended by Friend",tags:["friend","referral","recommendation","word of mouth"]},{label:"Recommended by Colleague",tags:["colleague","coworker","referral","recommendation"]},{label:"Word of Mouth",tags:["word of mouth","referral","recommendation"]},{label:"Family Member",tags:["family","referral","recommendation"]}],Other:[{label:"Industry Publication",tags:["publication","magazine","journal","trade magazine"]},{label:"Business Partner",tags:["partner","business partner","vendor"]},{label:"Consultant",tags:["consultant","advisor","referral"]},{label:"Blog Article",tags:["blog","article","content"]},{label:"Newsletter",tags:["newsletter","email","subscription"]},{label:"Press Release",tags:["press release","news","pr"]},{label:"USPS",tags:["usps","post office","postal service","mail"]},{label:"UPS",tags:["ups","united parcel service","shipping"]},{label:"FedEx",tags:["fedex","shipping","freight"]},{label:"DHL",tags:["dhl","shipping","international"]},{label:"Shipping Carrier",tags:["carrier","shipping","logistics"]},{label:"Capterra",tags:["capterra","reviews","software"]},{label:"G2",tags:["g2","reviews","software"]},{label:"Trustpilot",tags:["trustpilot","reviews"]},{label:"Software Advice",tags:["software advice","reviews","gartner"]},{label:"GetApp",tags:["getapp","reviews","software"]},{label:"Medium",tags:["medium","blog","article","content"]},{label:"Substack",tags:["substack","newsletter","blog"]},{label:"Quora",tags:["quora","qa","forum"]},{label:"Email Campaign",tags:["email","campaign","marketing"]},{label:"Cold Email",tags:["cold email","email","outreach"]},{label:"Sales Rep",tags:["sales rep","salesperson","sales"]}
1,{label:"App Store",tags:["app store","apple","ios","mobile"]},{label:"Google Play Store",tags:["google play","android","mobile","app"]},{label:"Other",tags:["other"]}]}).flatMap((([e,t])=>t.map((t=>({...t,value:e}))))),E={ig:["instagram"],fb:["facebook"],li:["linkedin"],yt:["youtube"],gpt:["chatgpt"],ai:["chatgpt","gemini","copilot","claude","artificial intelligence"],rad:["radio"],pod:["podcast"],social:["social media","instagram","facebook","linkedin","tiktok"],ecom:["ecommerce","shopify","amazon"],search:["google","bing","search engine"]};function T(e){const t=e.toLowerCase().trim().split(/\s+/).filter(Boolean);return t.reduce(((e,t)=>e.concat(E[t]??[])),[...t])}function P(e,t){let n=0;const a=e.label.toLowerCase(),r=t.join(" ");for(const r of t)e.tags.some((e=>e===r))?n+=5:e.tags.some((e=>e.includes(r)))&&(n+=3),a.startsWith(r)?n+=4:a.includes(r)&&(n+=2);return a===r&&(n+=10),n}const N=["Radio / Streaming Audio / SiriusXM","TV Commercial","Podcast / Youtube"],U={firstName:{name:"firstName",domId:"reg-fname",type:"text",label:"firstName",group:"name",canHide:!0,rules:[c.required("Please enter your first name")],requiredWhen:()=>!0},lastName:{name:"lastName",domId:"reg-lname",type:"text",label:"lastName",group:"name",canHide:!0,rules:[c.required("Please enter your last name")],requiredWhen:()=>!0},email:{name:"email",domId:"email",type:"email",label:"email",alwaysRequired:!0,canHide:!1,rules:[c.required("Please enter your email address"),{...c.emailBlacklist("Please enter a valid business email address"),when:e=>Boolean(e.config.emailBlacklist)}]},country:{name:"country",inputName:"countryCode",domId:"country",type:"select",label:"countryLabel",canHide:!0,canToggleRequired:!1,mustRenderWhen:e=>"US"!==e.country,defaultValue:"US",rules:[c.countryAllowed("ShipStation only supports shippers in the United States, Canada, France, Australia and United Kingdom at this time. More countries coming soon.")]},company:{name:"company",inputName:"companyName",domId:"reg-compname",type:"text",label:"company",group:"company",canHide:!0,canToggleRequired:!1,requiredWhen:n(["FR","GB"]),mustRenderWhenRequired:!0,rules:[c.required("Please enter your company name")],readsValuesOf:["country"]},phone:{name:"phone",domId:"phone",type:"tel",label:"phone",canHide:!0,canToggleRequired:!1,consentFootnote:!0,requiredWhen:n(["GB"]),rules:[c.required("Phone Number is required"),c.phoneNumber()],readsValuesOf:["country"]},coupon:{name:"coupon",domId:"coupon",type:"text",label:"coupon",canHide:!0,visibleWhen:e=>!e.config.couponHiddenByReferral||N.includes(function(e){const t=(e??"").trim();if(0===t.length)return"";const n=t.toLowerCase(),a=R.find((e=>e.label.toLowerCase()===n));if(a)return a.value;if(S.includes(t))return t;const r=R.filter((e=>n.length>=3&&e.label.toLowerCase().startsWith(n)||e.tags.some((e=>e===n||e.length>=3&&n.includes(e)))));if(0===r.length)return"Other";const o=T(t);return r.map((e=>({s:e,score:P(e,o)}))).sort(((e,t)=>t.score-e.score))[0].s.value}(e.values.howDidYouHearAboutUs??"")),submitWhenHidden:!0,readsValuesOf:["howDidYouHearAboutUs"]},referralCode:{name:"referralCode",inputName:"referral_code",domId:"referral_code",type:"text",label:"referralCode",canHide:!0,canToggleRequired:!1,visibleWhen:e=>Boolean(e.config.requireReferralCode),requiredWhen:e=>Boolean(e.config.requireReferralCode),rules:[c.required("Please enter your referral code")]},password:{name:"password",domId:"password",type:"password",label:"password",alwaysRequired:!0,canHide:!1,rules:[c.required("Please enter a password"),c.minLength(12),{...c.passwordComplexity(),when:e=>"LabelApi"!==e.config.regType},{...c.strictPassword("Password must be 12–64 characters with an uppercase letter and a special character, and no repeated or sequential characters."),when:e=>"LabelApi"===e.config.regType}],readsValuesOf:["email"]},username:{name:"username",inputName:"username",domId:"username",type:"text",label:"username",canHide:!0,canToggleRequired:!1,visibleWhen:e=>"LabelApi"===e.config.regType&&a("username")(e),requiredWhen:e=>"LabelApi"===e.config.regType&&a("username")(e),rules:[c.required("Please choose a username")],revealedBySubmitError:!0},shipmentVolume:{name:"shipmentVolume",inputName:"shipment_volume",domId:"shipment_volume",type:"select",label:"shipmentVolume",canHide:!0,rules:[c.required(),c.notDefault()],requiredWhen:()=>!0},shipsFreight:{name:"shipsFreight",inputName:"ships_freight",domId:"ships_freight",type:"select",label:"shipsFreight",canHide:!0,canToggleRequired:!1,defaultValue:"null",submitWhenHidden:!0,visibleWhen:e=>Boolean(e.config.showShipsFreight)&&n(["US"])(e),requiredWhen:e=>Boolean(e.config.showShipsFreight)&&n(["US"])(e),rules:[c.required(),{id:"notDefault",message:"Please select an option",validate:e=>""!==e&&"null"!==e,when:e=>Boolean(e.config.showShipsFreight)&&n(["US"])(e)}],readsValuesOf:["country"]},zip:{name:"zip",domId:"zip",type:"text",label:"zip",canHide:!1,canToggleRequired:!1,hiddenByDefault:!0,rules:[c.zipCode()]},howDidYouHearAboutUs:{name:"howDidYouHearAboutUs",inputName:"answers[0]",domId:"howdidyouhearaboutus",type:"select",label:"howDidYouHearAboutUs",placeholder:"TV, ChatGPT, The Business Movers Podcast, Shopify App Store?",canHide:!0,suggest:"hdyhau",requiredWhen:e=>Boolean(e.config.requireHowDidYouHearAboutUs),rules:[c.notDefault()]},salesRepCode:{name:"salesRepCode",inputName:"sales_rep_code",domId:"sales_rep_code",type:"text",label:"uspsReferralCode",canHide:!0,visibleWhen:e=>Boolean(e.config.uspsRep)},optinConsent:{name:"optinConsent",inputName:"optin_consent",domId:"optin_consent",type:"checkbox",label:"optinConsent",group:"consent",canHide:!1,canToggleRequired:!1,defaultValue:"on",visibleWhen:n(["GB","FR","DE"]),readsValuesOf:["country"]}},L=[{name:"tos",type:"checkbox",label:"",defaultValue:"tos"},{name:"affiliate",type:"hidden",label:""},{name:"referrer",type:"hidden",label:""},{name:"referral_code",type:"hidden",label:""},{name:"plan_profile_code",type:"hidden",label:""},{name:"utcoffset",type:"hidden",label:""},{name:"hubspot_cookie",type:"hidden",label:""},{name:"experiments",type:"hidden",label:""},{name:"gclid_field",type:"hidden",label:""},{name:"ioBlackBox",type:"hidden",label:""},{name:"token_payload",type:"hidden",label:""},{name:"registration_payload",type:"hidden",label:""},{name:"routing_owner_id",type:"hidden",label:""},{name:"onboardingVariant",type:"hidden",label:"",defaultValue:"0"},{name:"lead_source",type:"hidden",label:""},{name:"journey_id",type:"hidden",label:""},{name:"device_type",type:"hidden",label:""},{name:"AI_comms_opt_in",type:"hidden",label:""},{name:"targetApp",type:"hidden",label:"",defaultValue:"default"},{name:"plan",type:"hidden",label:""},{name:"leadSource",type:"hidden",label:""},{name:"leadSourceDetail",type:"hidden",label:""}],j=["country","firstName","lastName","company","email","username","password","phone","referralCode","coupon","shipmentVolume","shipsFreight","zip","howDidYouHearAboutUs","salesRepCode","optinConsent"];function F(e,t){const n=e.fields.length?e.fields:Object.keys(U),a=new Set(I(n,e.hideFields??[],t).map((e=>e.name))),r=[];for(const e of n){const n=U[e];n&&((a.has(n.name)&&d(n,t)||!0===n.submitWhenHidden)&&r.push(n))}return r}function I(e,t=[],n){const a=new Set(t.map((e=>e.toLowerCase()))),r=[];for(const t of e){const e=U[t];if(!e)continue;const o=!0===e.mustRenderWhenRequired&&void 0!==n&&u(e,n)||void 0!==e.mustRenderWhen&&void 0!==n&&e.mustRenderWhen(n);!0===e.canHide&&!o&&a.has(t.toLowerCase())||r.push(e)}if(n){const e=new Set(r.map((e=>e.name)));for(const[t,a]of Object.entries(U)){if(e.has(t)||void 0===a.mustRen
1derWhen)continue;if(!a.mustRenderWhen(n))continue;const o=j.indexOf(t),i=r.findIndex((e=>j.indexOf(e.name)>o));-1===i?r.push(a):r.splice(i,0,a)}}return r}const B={FR:"",US:"FREE30",GB:"FREE30",CA:"FREE30",AU:"FREE30",NZ:"",Other:"FREE30"};function D(e){const t="undefined"!=typeof globalThis?globalThis.crypto:void 0;if(!t||!t.getRandomValues)throw new Error("Secure RNG unavailable — cannot generate a password.");const n=Math.floor(4294967296/e)*e,a=new Uint32Array(1);let r;do{t.getRandomValues(a),r=a[0]}while(r>=n);return r%e}function q(e=16){const t="ABCDEFGHJKLMNPQRSTUVWXYZ",n="abcdefghijkmnpqrstuvwxyz",a="23456789",r="!#$%*+-=?",o=t+n+a+r,i=e=>e.charAt(D(e.length)),s=[i(t),i(n),i(a),i(r)];for(let t=s.length;t<Math.max(12,e);t++)s.push(i(o));for(let e=s.length-1;e>0;e--){const t=D(e+1);[s[e],s[t]]=[s[t],s[e]]}return s.join("")}function M(e){return parseInt(String(e??""),16)}function O(e,t){return Boolean(e.buyNow||"true"===t.isBuyNow)}function H(e){return"LabelApi"===e.regType}function V(e,t,n,a={}){const r={event:"account_created",brand:H(t)?"ShipEngine":"ShipStation",userId:e.userId,email:n.email??"",home_country:t.country??"",orderId:e.refno,affiliate:n.affiliate??"",referrer:n.referrer??"",referral_code:n.referral_code??"",coupon:n.coupon??"",phonenumber:n.phone??"",company:n.company??"",howdidyouhearaboutus:n.howDidYouHearAboutUs??"",shipment_volume:n.shipmentVolume??"",sellerId_int:M(e.refno),experiments_object:a.experimentsObject??null,experiments_string:a.experimentsString??"",last_visited_page:a.lastVisitedPage??"",isBuyNow:O(t,n)};return H(t)&&(r.regType="LabelApi",r.code=n.plan??""),r}function $(e,t,n,a={},r=1){const o={brand:H(t)?"ShipEngine":"ShipStation",total_form_steps:r,utm_medium:a.utm?.medium??"",utm_source:a.utm?.source??"",utm_campaign:a.utm?.campaign??"",utm_term:a.utm?.term??"",utm_content:a.utm?.content??"",referral_code:n.referral_code??"",coupon:n.coupon??"",email:n.email??"",home_country:t.country??"",affiliate:n.affiliate??"",referrer:n.referrer??"",phoneNumber:n.phone??"",company:n.company??"",howdidyouhearaboutus:n.howDidYouHearAboutUs??"",fb__fbp:a.fbp??"",fb_fbc:a.fbc??"",fb_event_id:e.userId,cje_cookie
1:a.cje??"",customer_id:M(e.refno),seller_id_hex:e.refno,last_visited_page:a.lastVisitedPage??"",gclid_value:a.gclid??"",shipment_volume:n.shipmentVolume??"",order_id:M(e.refno),currency:"USD",isBuyNow:O(t,n),ships_freight:n.shipsFreight??"null",zip_code:n.zip??""};return H(t)&&(o.first_name=n.firstName??"",o.last_name=n.lastName??""),o}function W(e,t){const n={email:t.email??"",home_country:e.country??""};return H(e)&&(n.first_name=t.firstName??"",n.last_name=t.lastName??"",n.company=t.company??"",n.phone=t.phone??"",n.country=e.country??""),n}const z=new Set(["email","password","home_country","coupon","referral_code","userId","refno","is_fraud","captcha_score"]);function G(e){"undefined"!=typeof window&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push(e))}function Y(e,t,n,a){"undefined"!=typeof window&&window.analytics&&t.email&&(window.analytics.identify(t.email,function(e,t){return{email:t.email??"",home_country:e.country??""}}(e,t)),window.analytics.track("Registration Step Completed",function(e,t,n,a){return{brand:H(e)?"ShipEngine":"ShipStation",step_count:n,total_form_steps:a,form_variant:e.variant,home_country:e.country??"",email:t.email??"",first_name:t.firstName??"",last_name:t.lastName??"",company:t.company??"",phoneNumber:t.phone??"",referral_code:t.referral_code??"",coupon:t.coupon??"",howdidyouhearaboutus:t.howDidYouHearAboutUs??"",shipment_volume:t.shipmentVolume??""}}(e,t,n,a)))}function Z(e,t={}){if("undefined"!=typeof window){if(t.debug){const t=function(e){try{const t=new URL(e);return["a","nonce","authToken"].forEach((e=>{t.searchParams.has(e)&&t.searchParams.set(e,"REDACTED")})),t.toString()}catch{return"[unparseable redirect url]"}}(e);return console.info("[ss-registration] redirect (debug; secrets redacted):",t),void("function"==typeof window.alert&&window.alert("Registration redirect URL (secrets redacted):\n"+t))}window.setTimeout((()=>{window.location.replace(e)}),t.delayMs??1e3)}}function K(e){const t=new URLSearchParams(e||""),n="show"===t.get("debug")||"true"===t.get("debugshow");return{forceLegacy:"true"===t.get("forcelegacy"),debug:n}}const J="referral_code",Q="gclid";function X(e){return"undefined"!=typeof window&&"function"==typeof window.ss_get_cookie?window.ss_get_cookie(e)??null:function(e){if("undefined"==typeof document||!document.cookie)return null;const t=encodeURIComponent(e)+"=",n=e+"=";for(const e of document.cookie.split("; ")){if(e.startsWith(t))return decodeURIComponent(e.slice(t.length));if(e.startsWith(n))return decodeURIComponent(e.slice(n.length))}return null}(e)}function ee(e,t,n={}){if("undefined"==typeof document)return;let a=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;const{expires:r,domain:o,path:i="/",secure:s,sameSite:l}=n;void 0!==r&&(a+=`; expires=${(r instanceof Date?r:new Date(Date.now()+864e5*r)).toUTCString()}`),i&&(a+=`; path=${i}`),o&&(a+=`; domain=${o}`),l&&(a+=`; samesite=${l}`),s&&(a+="; secure"),document.cookie=a}function te(e=("undefined"!=typeof location?location.hostname:"")){const t=e.match(/shipstation\.[a-z.]+$/i);return t?"."+t[0]:""}function ne(e,t=("undefined"!=typeof location?location.hostname:"")){const n=te(t);e.username&&ee("signup_email",e.username,{path:"/",domain:n||void 0,sameSite:"None",secure:!0}),e.refno&&ee("orderId",e.refno,{path:"/",domain:".shipstation.com",expires:60})}function ae(e){const t=e.success;if("cookieHandoff"!==t.kind||!t.cookie||!t.fromParam||!t.fromCookie)return;const n="undefined"!=typeof location?new URLSearchParams(location.search).get(t.fromParam)??"":"",a=X(t.fromCookie)??"";ee(t.cookie,`${n}.${a}`,{domain:".shipstation.com",path:"/",expires:1,sameSite:"None",secure:!0}),function(e,t={}){ee(e,"",{...t,expires:new Date(0)})}(t.fromCookie,{domain:".shipstation.com",path:"/"})}function re(){return"undefined"==typeof window?{}:window}function oe(){const e=re().ssHomeCountry;if("string"!=typeof e)return null;const t=e.trim();return""===t?null:t.toUpperCase()}function ie(){const e=re().ssGeoCountry;if("string"!=typeof e)return null;const t=e.trim();return""===t?null:t.toUpperCase()}const se=["1","50"],le=["US"];function ce(e,t,n){const a=se.includes(e??""),r=le.includes((t??"").toUpperCase()),o="500"===e&&function(e){const t=e?.getExperimentStates?.()?.[5774645624832e3],n=t?.variation?.id;return void 0!==n&&"6377530184171520"===String(n)}(n);return a&&r||o?"lite":"default"}function ue(e){if(!e?.getActiveExperimentIds||!e?.getExperimentStates)return"";const t=e.getActiveExperimentIds()||[],n=e.getExperimentStates()||{};return t.map((e=>{const t=n[e];if(!t)return"";const a=t.experimentName||t.name||"",r=t.variation?.id?String(t.variation.id):"";return a?r?`${a} + ${r}`:a:""}
1)).filter(Boolean).join(", ")}function de(e,t){if("boolean"==typeof t)return t;const n=e.getFullYear(),a=new Date(n,0,1).getTimezoneOffset(),r=new Date(n,6,1).getTimezoneOffset();return e.getTimezoneOffset()<Math.max(a,r)}function pe(){return"undefined"!=typeof window?window:{}}function me(){try{const e=pe().optimizely?.get;return"function"==typeof e?e("state"):null}catch{return null}}function he(){try{const e=pe().optimizely?.get,t="function"==typeof e?e("visitor"):null;return t?.visitorId??""}catch{return""}}function fe(){try{const e=pe().UAParser;return e?(new e).getDevice().type||"desktop":""}catch{return""}}function ge(){try{const e=pe().gaData?.["UA-25912405-1"]?.experiments;return e?JSON.stringify(e):""}catch{return""}}async function ye(){try{const e=pe().analyticsModule?.getLastVisitedPageForGTM;if(!e)return"";const t=await e();return t?.last_visited_page??""}catch{return""}}function be(e){const t=e.getCookie??X,n=new URLSearchParams(e.search??""),a=function(){if("undefined"==typeof document)return"";const e=document.getElementById("ioBlackBox");return e?.value??""}();a||G({event:"registration_missing_iovation",iovation_status:"undefined"!=typeof document&&document.getElementById("ioBlackBox")?"input_present_but_empty":"input_missing"});const r=new Date;return{device_type:fe(),ioBlackBox:a,experiments:ge(),gclid_field:t(Q)??"",isDST:String(de(r,pe().luxon?.DateTime.local().isInDST)),hs_language:"undefined"!=typeof navigator?(navigator.language||"en-us").toLowerCase():"en-us",optimizely_id_station:he(),optimizely_experiment_name:ue(me()),routing_owner_id:n.get("routing_owner_id")??"",lead_source:n.get("lead_source")??"",onboardingVariant:n.get("variant")??"0",targetApp:ce(e.values.shipmentVolume??"",n.get("home_country")??ie()??"",me())}}function we(e="",t=X){const n=new URLSearchParams(e),a=e=>t(e)??"";return{plan:n.get("code")??"",leadSource:n.get("lead_source")||"Trial Registration",leadSourceDetail:n.get("lead_source_detail")||"signup",utm_source:a("utm_source"),utm_medium:a("utm_medium"),utm_campaign:a("utm_campaign"),utm_term:a("utm_term")}}function ve(e){const t=new Set(e.map((e=>e.name)));return["form-layout","ss-registration-row",t.has("firstName")&&t.has("lastName")?"form-names":""].filter(Boolean).join(" ")}const _e={id:"default",regType:"fulfillment",countries:["US","CA","AU","NZ","GB","FR","DE"]},ke={default:_e,shopify:{id:"shopify",extends:"default",hiddenFields:{partner:"shopify"},oauthInstallFlowElsewhere:!0},bigcommerce:{id:"bigcommerce",extends:"default",hiddenFields:{partner:"bigcommerce"},oauthInstallFlowElsewhere:!0},walmart:{id:"walmart",extends:"default",hiddenFields:{partner:"walmart"},oauthInstallFlowElsewhere:!0},wix:{id:"wix",extends:"default",hiddenFields:{partner:"wix"},oauthInstallFlowElsewhere:!0},ecwid:{id:"ecwid",extends:"default",hiddenFields:{registration_channel:"ecwid"}},square:{id:"square",extends:"default",hiddenFields:{registration_channel:"square"}},weebly:{id:"weebly",extends:"default",hiddenFields:{registration_channel:"weebly"}},usps:{id:"usps",extends:"default",hiddenFields:{registration_channel:"usps"},autoPassword:!0},upsReady:{id:"upsReady",extends:"default",hiddenFields:{registration_channel:"ups"},countries:["US"]},salesforce:{id:"salesforce",extends:"default",hiddenFields:{registration_channel:"salesforce"},autoPassword:!0,requireReferralCode:!0,countries:["US","CA","AU","NZ","GB","FR","DE"]},upsRate:{id:"upsRate",extends:"default",hiddenFields:{registration_channel:"ups"},autoPassword:!0,requireReferralCode:!0,countries:["US","CA","AU","GB"]},sales:{id:"sales",extends:"default",hiddenFields:{registration_channel:"sales"},autoPassword:!0,requireReferralCode:!0},landingPageModule:{id:"landingPageModule",extends:"default",autoPassword:!0},tiktok:{id:"tiktok",extends:"default",hiddenFields:{partner:"tiktok"},oauthInstallFlowElsewhere:!0},tiktok_uk:{id:"tiktok_uk",oauthInstallFlowElsewhere:!0,extends:"default",hiddenFields:{partner:"tiktok_uk"},countries:["GB"]},neto:{id:"neto",extends:"default",hiddenFields:{partner:"neto"},oauthInstallFlowElsewhere:!0},klaviyo:{id:"klaviyo",extends:"default",hiddenFields:{partner:"klaviyo"},oauthInstallFlowElsewhere:!0},labelApi:{id:"labelApi",extends:"default",regType:"LabelApi",payloadMap:{company:["company","companyName"],coupon:["coupon","offer_code__c"]},tray:"api",countries:["US","CA","GB","AU","NZ","DE","FR","IT","NL","ES"]}};function Ce(e){const t=ke[e]??_e;return t.extends?(n=Ce(t.extends),a=t,{...n,...a,hiddenFields:{...n.hiddenFields??{},...a.hiddenFields??{}},fieldOverrides:{...n.fieldOverrides??{},...a.fieldOverrides??{}},payloadMap:{...n.payloadMap??{},...a.payloadMap??{}}
1,fields:a.fields??n.fields,countries:a.countries??n.countries,autoPassword:a.autoPassword??n.autoPassword,requireReferralCode:a.requireReferralCode??n.requireReferralCode}):t;var n,a}const xe={IE:"GB","FR-CA":"CA",FR_CA:"CA"},Se=["firstName","lastName","company","email","phone","shipmentVolume","howDidYouHearAboutUs"];function Ae(e,t){const n=e.get(t.toLowerCase());return n?decodeURIComponent(n):""}function Re(e){if(!e)return null;const t=e.toUpperCase(),n=xe[t]??t;return r.includes(n)?n:null}const Ee={twoStep:[["country","firstName","lastName","email","password"],["shipmentVolume","company","phone","coupon","howDidYouHearAboutUs"]],threeStep:[["country","firstName","lastName","email"],["password","shipmentVolume"],["company","phone","coupon","howDidYouHearAboutUs"]]};function Te(e,t){return e.findIndex((e=>e.some((e=>e.name===t))))}const Pe=["email","firstName","lastName","company","phone","country","shipmentVolume","coupon","howDidYouHearAboutUs","referralCode","salesRepCode"];function Ne(e,t,n){const a={};for(const e of Pe){const n=U[e]?.inputName??e,r=t[e];r&&(a[n]=r)}return a.form_step=String(n),a.variant_id=e.variant??"",a}const Ue="https://ss15.shipstation.com",Le="https://ss8.shipstation.com",je=["GB","FR","DE"],Fe=["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","GB"];function Ie(e){return Fe.includes(e)?Le:Ue}const Be={walmart:{channel:"walmart",affiliate:"Walmart",referralCookie:"partner-walmart",payloadParams:{walmartCallbackUri:"walmart_callback_uri",clientType:"walmart_client_type"},success:{kind:"oauthAccept",route:"/api/datadriven/oauth/accept/ordersource/walmart",forward:["walmartCallbackUri","clientType"]},login:{kind:"loginQuery",marketplace:"walmart",forward:["walmartCallbackUri","clientType"]}},tiktok:{channel:"tiktok",affiliate:"TikTok",referralCookie:"partner-tiktok",success:{kind:"oauthAccept",route:"/api/datadriven/oauth/accept/ordersource/tiktok",forward:["code","app_key","locale","shop_region"]},login:{kind:"loginQuery",marketplace:"tiktok",forward:["code","app_key","locale","shop_region"]}},tiktok_uk:{channel:"tiktok_uk",affiliate:"TikTokUK",referralCookie:"partner-tiktok-uk",success:{kind:"oauthAccept",route:"/api/datadriven/oauth/accept/ordersource/tiktok_uk",forward:["code","app_key","locale","shop_region"],euAware:!0},login:{kind:"loginQuery",marketplace:"tiktok_uk",forward:["code","app_key","locale","shop_region"]}},neto:{channel:"neto-by-Maropost",affiliate:"Neto",referralCookie:"partner-neto-by-maropost",success:{kind:"oauthAccept",route:"/api/datadriven/oauth/accept/ordersource/maropost",forward:["code"],euAware:!0},login:{kind:"loginQuery",marketplace:"neto"}},klaviyo:{channel:"klaviyo",affiliate:"Klaviyo",referralCookie:"partner-klaviyo",success:{kind:"oauthAccept",route:"/api/datadriven/oauth/accept/IntegratedApp/klaviyo",forward:["code","state"],euAware:!0},login:{kind:"targetUrl",route:"https://ss.shipstation.com/api/datadriven/oauth/accept/IntegratedApp/klaviyo",forward:["code","state"]}},wix:{channel:"wix",success:{kind:"partnerUrlParam",param:"wixUrl"},login:{kind:"jsonCookie",cookie:"wix-token",params:["code","state","instanceId"],redirectUrl:"https://ss.shipstation.com"}},bigcommerce:{channel:"bigcommerce",success:{kind:"cookieHandoff",cookie:"bigcommerce-token",fromParam:"context",fromCookie:"bc-t"},login:{kind:"cookieHandoff",redirectUrl:"https://ss.shipstation.com"}},shopify:{channel:"shopify",affiliate:"Shopify",referralCookie:"Shopify",referralAuthoritative:!0,connectedMarketplaceId:"14",writeAuthCookie:!0,payloadDefaults:{"answers[0]":"Shopping Cart (Shopify, eBay, etc.)"},payloadParams:{shop:"registration_payload"},preExchange:{route:"/api/shopify/settoken",params:["code","shop"],map:{"data.token":"token_payload","data.email":"email"}},success:{kind:"loginHandoff"},login:{kind:"shopifyExchange",cookie:"shopify-token",redirectUrl:"https://ship.shipstation.com/add-store"}}};function De(e){return Be[e]}function qe(e,t){const n=new URLSearchParams(t||""),a={registration_channel:e.channel};e.affiliate&&(a.affiliate=e.affiliate),e.referralAuthoritative&&e.referralCookie&&(a.referral_code=e.referralCookie);for(const[t,r]of Object.entries(e.payloadParams??{})){const e=n.get(t);e&&(a[r]=e)}return a}function Me(e){if(!e)return null;let t;try{t=new URL(e)}catch{return null}return"https:"!==t.protocol||t.username||t.password?null:t}function Oe(e,t){const n=e.partitionId?String(e.partitionId):"",a=/^\d{1,3}$/.test(n)?n:"";if(e.autoLoginNonce&&!t.forceLegacy){const t=new URL(`https://ship${a||"14"}.shipstation.com`);return t.searchParams.set("onboarding","true"),t.searchParams.set("username",String(e.username??"")),t.searchParams.set("nonce",String(e.autoLoginNonce)),t.toString()}
1const r=new URL(Ie(t.country));return a&&e.authToken&&(r.hostname=r.hostname.replace(/^ss\d+\./,`ss${a}.`)),r.pathname="/login",r.searchParams.set("firsttime","true"),a&&e.authToken&&r.searchParams.set("a",String(e.authToken)),r.toString()}function He(e,t){let n=e;for(const e of t.split(".")){if(!n||"object"!=typeof n)return"";n=n[e]}return"string"==typeof n||"number"==typeof n?String(n):""}function Ve(e,t){if(!e.preExchange)return!1;const n=new URLSearchParams(t||"");return e.preExchange.params.every((e=>Boolean(n.get(e))))}const $e=["1","7"],We=["20","27","30","31","32","33","34","36","39","40","41","43","44","45","46","47","48","49","51","52","53","54","55","56","57","58","60","61","62","63","64","65","66","81","82","84","86","90","91","92","93","94","95","98"],ze=["350","351","352","353","354","355","356","357","358","359","370","371","372","373","374","375","376","377","378","380","381","382","383","385","386","387","389","852","853","855","856","880","886","960","961","962","963","964","965","966","967","968","970","971","972","973","974","975","976","977","992","993","994","995","996","998"],Ge=Array.from(new Set(ze.map((e=>e.slice(0,2))))),Ye=Array.from(new Set(We.concat(ze).map((e=>e.charAt(0)))));function Ze(e){return e.length>6?`(${e.slice(0,3)}) ${e.slice(3,6)}-${e.slice(6)}`:e.length>3?`(${e.slice(0,3)}) ${e.slice(3)}`:e.length>0?`(${e}`:""}const Ke=window.ReactJSXRuntime;function Je({id:n,name:a,value:r,placeholder:o,required:i,autoFocus:s,describedBy:l,invalid:c,onChange:u,onBlur:d}){const[p,m]=(0,e.useState)(!1),[h,f]=(0,e.useState)(-1),g=`${n}-suggestions`,y=(0,e.useMemo)((()=>p?function(e){if(!e||0===e.trim().length)return[];const t=T(e);return R.map((e=>({suggestion:e,score:P(e,t)}))).filter((e=>e.score>0)).sort(((e,t)=>t.score-e.score)).slice(0,8).map((e=>e.suggestion))}(r):[]),[p,r]),b=e=>{m(!1),f(-1),u(e.label)};return(0,Ke.jsxs)("div",{className:"hdyhau-autocomplete-wrapper",children:[(0,Ke.jsx)("input",{id:n,name:a,type:"text",maxLength:100,autoComplete:"off",role:"combobox","aria-expanded":p&&y.length>0,"aria-controls":g,"aria-autocomplete":"list","aria-activedescendant":h>=0?`${g}-${h}`:void 0,"aria-invalid":!!c||void 0,"aria-describedby":l,"aria-required":i||void 0,autoFocus:s||void 0,placeholder:o,value:r,onChange:e=>{m(!0),f(-1),u(e.target.value)},onKeyDown:e=>"ArrowDown"===e.key&&y.length?(e.preventDefault(),m(!0),void f((e=>(e+1)%y.length))):"ArrowUp"===e.key&&y.length?(e.preventDefault(),void f((e=>e<=0?y.length-1:e-1))):void("Enter"!==e.key?"Escape"===e.key&&(m(!1),f(-1)):h>=0&&y[h]?(e.preventDefault(),b(y[h])):m(!1)),onBlur:()=>{m(!1),f(-1),d()}}),p&&y.length>0&&(0,Ke.jsx)("div",{id:g,className:"hdyhau-suggestions",role:"listbox",style:{display:"block",position:"absolute",top:"100%",left:0,right:0,width:"auto"},children:y.map(((e,t)=>(0,Ke.jsx)("div",{id:`${g}-${t}`,role:"option","aria-selected":t===h,className:["hdyhau-suggestion-item",t===h?"active":""].filter(Boolean).join(" "),onMouseDown:e=>e.preventDefault(),onClick:()=>b(e),children:e.label},e.label)))}),(0,Ke.jsx)("input",{type:"hidden",name:"questions[0]",value:(0,t.__)("How did you hear about us?","shipstation")})]})}function Qe(){return(0,Ke.jsx)("svg",{width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:(0,Ke.jsx)("path",{d:"M8.99998 2.5C8.66877 2.50518 8.34001 2.5578 8.02373 2.65625C8.17003 2.91354 8.24793 3.20403 8.24998 3.5C8.24998 3.72981 8.20472 3.95738 8.11677 4.1697C8.02882 4.38202 7.89992 4.57493 7.73742 4.73744C7.57492 4.89994 7.382 5.02884 7.16968 5.11679C6.95736 5.20474 6.7298 5.25 6.49998 5.25C6.20402 5.24795 5.91352 5.17005 5.65623 5.02375C5.45324 5.72775 5.4769 6.47777 5.72386 7.16757C5.97081 7.85738 6.42855 8.452 7.03222 8.8672C7.6359 9.28241 8.35491 9.49715 9.08741 9.48101C9.81991 9.46487 10.5288 9.21867 11.1136 8.77728C11.6984 8.33589 12.1295 7.72169 12.3458 7.02168C12.5621 6.32167 12.5527 5.57133 12.3189 4.87696C12.0852 4.18258 11.6388 3.57937 11.0431 3.15277C10.4475 2.72616 9.73266 2.49779 8.99998 2.5ZM17.8912 5.54375C16.1965 2.23719 12.8415 0 8.99998 0C5.15842 0 1.80248 2.23875 0.108733 5.54406C0.037246 5.68547 0 5.8417 0 6.00016C0 6.15861 0.037246 6.31484 0.108733 6.45625C1.80342 9.76281 5.15842 12 8.99998 12C12.8415 12 16.1975 9.76125 17.8912 6.45594C17.9627 6.31453 18 6.1583 18 5.99984C18 5.84139 17.9627 5.68516 17.8912 5.54375ZM8.99998 10.5C5.91717 10.5 3.09092 8.78125 1.56467 6C3.09092 3.21875 5.91686 1.5 8.99998 1.5C12.0831 1.5 14.909 3.21875 16.4353 6C14.9094 8.78125 12.0831 10.5 8.99998 10.5Z",fill:"#637381"})})}function Xe(){return(0,Ke.jsx)("svg",{width:"18",height:"15",viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:(0,Ke.jsx)("path",{d:"M8.99991 11.25C6.86664 11.25 5.13977 9.59883 4.98086 7.50633L2.03056 5.22625C1.64272 5.71281 1.28581 6.22721 0.997811 6.78971C0.933473 6.91698 0.899952 7.
105759 0.899952 7.20019C0.899952 7.3428 0.933473 7.48341 0.997811 7.61068C2.52303 10.5866 5.54252 12.6 8.99991 12.6C9.75675 12.6 10.4869 12.4875 11.1906 12.3058L9.73116 11.1766C9.49014 11.2232 9.24538 11.2478 8.99991 11.25ZM17.8261 12.8841L14.7169 10.4811C15.6613 9.68514 16.4381 8.70932 17.002 7.61039C17.0664 7.48313 17.0999 7.34252 17.0999 7.19991C17.0999 7.0573 17.0664 6.9167 17.002 6.78943C15.4768 3.81353 12.4573 1.80007 8.99991 1.80007C7.5519 1.80182 6.12741 2.16636 4.85655 2.86038L1.2785 0.0948548C1.23184 0.0585476 1.17848 0.0317904 1.12148 0.0161121C1.06448 0.000433765 1.00494 -0.00385832 0.946279 0.00348108C0.887616 0.0108205 0.830974 0.0296475 0.77959 0.0588864C0.728206 0.0881252 0.683088 0.127203 0.646812 0.173886L0.0947201 0.884602C0.0214824 0.978816 -0.0113349 1.09826 0.00348583 1.21667C0.0183066 1.33508 0.0795517 1.44275 0.173751 1.51601L16.7213 14.3052C16.768 14.3416 16.8213 14.3683 16.8783 14.384C16.9353 14.3997 16.9949 14.404 17.0535 14.3966C17.1122 14.3893 17.1688 14.3705 17.2202 14.3412C17.2716 14.312 17.3167 14.2729 17.353 14.2262L17.9054 13.5155C17.9786 13.4213 18.0114 13.3018 17.9965 13.1834C17.9816 13.065 17.9203 12.9573 17.8261 12.8841ZM12.659 8.89036L11.5537 8.03592C11.6467 7.7669 11.6961 7.4847 11.6999 7.20005C11.7054 6.78331 11.6131 6.3711 11.4303 5.99651C11.2476 5.62193 10.9796 5.29542 10.6478 5.04321C10.316 4.79101 9.92967 4.62013 9.51985 4.54431C9.11003 4.46849 8.68814 4.48984 8.28807 4.60665C8.45767 4.83646 8.54941 5.11444 8.54991 5.40006C8.54572 5.4951 8.53119 5.5894 8.5066 5.68131L6.43633 4.08128C7.15547 3.48031 8.06271 3.15076 8.99991 3.15006C9.53185 3.14977 10.0586 3.25432 10.5501 3.45775C11.0416 3.66117 11.4882 3.95948 11.8643 4.33562C12.2405 4.71175 12.5388 5.15834 12.7422 5.64984C12.9456 6.14134 13.0502 6.66812 13.0499 7.20005C13.0499 7.80839 12.9011 8.37539 12.659 8.89064V8.89036Z",fill:"#637381"})})}function et({field:n,value:a,error:r,required:o,options:i,i18n:s,language:l,autoFocus:c,labelOverride:u,placeholderOverride:d,helpText:p,consentFootnote:m,onChange:h,onBlur:f}){const[g,y]=(0,e.useState)(!1),b=`ss-${n.name}`,w=`${b}-error`,v=`${b}-help`,_=`${b}-hint`,k=u??function(e,n){const a=n?.labels?.[e];return a&&""!==a.trim()?a:function(e){switch(e){case"firstName":return(0,t.__)("First name","shipstation");case"lastName":return(0,t.__)("Last name","shipstation");case"email":return(0,t.__)("Email","shipstation");case"countryLabel":return(0,t.__)("Country","shipstation");case"company":return(0,t.__)("Company name","shipstation");case"phone":return(0,t.__)("Phone number","shipstation");case"coupon":return(0,t.__)("Coupon code","shipstation");case"password":return(0,t.__)("Password","shipstation");case"shipmentVolume":return(0,t.__)("Monthly shipment volume","shipstation");case"howDidYouHearAboutUs":return(0,t.__)("How did you hear about us?","shipstation");case"shipsFreight":return(0,t.__)("Select your current number of LTL shipments per month","shipstation");case"zip":return(0,t.__)("ZIP code","shipstation");case"uspsReferralCode":return(0,t.__)("USPS referral code","shipstation");case"referralCode":return(0,t.__)("Referral code","shipstation");case"username":return(0,t.__)("Username","shipstation");case"optinConsent":return(0,t.__)("I agree to receive marketing communications from ShipStation.","shipstation");default:return e}}(e)}(n.label,s),C=d||function(e,t){const n=t?.placeholders?.[e];return n&&""!==n.trim()?n:""}(n.name,s)||n.placeholder||"",x=s?.labels?.showPassword,S=(l??"en-US").toLowerCase().startsWith("en"),A=["tel"===n.type?_:"",p?v:"",r?w:""].filter(Boolean).join(" ")||void 0,R={id:b,name:n.inputName??n.name,value:a,autoFocus:c||void 0,"aria-invalid":!!r||void 0,"aria-describedby":A,"aria-required":o||void 0,onBlur:f},E=(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)("span",{children:k}),m&&(0,Ke.jsx)("sup",{className:"consent-marker",children:"†"}),o&&(0,Ke.jsx)("em",{children:" *"})]});return"checkbox"===n.type?(0,Ke.jsxs)("div",{"data-field-name":n.name,className:["row error-container ss-registration-field ss-registration-field--checkbox",n.hiddenByDefault?"ss-registration-field--hidden":""].filter(
1Boolean).join(" "),children:[(0,Ke.jsxs)("label",{htmlFor:b,children:[(0,Ke.jsx)("input",{...R,type:"checkbox",checked:"on"===a||"true"===a,onChange:e=>h(e.target.checked?"on":"")}),(0,Ke.jsx)("span",{children:k})]}),p&&(0,Ke.jsx)("p",{id:v,className:"ss-registration-help",children:p}),r&&(0,Ke.jsx)("p",{id:w,className:"error ss-registration-error",role:"alert",children:r})]}):(0,Ke.jsxs)("div",{"data-field-name":n.name,className:["row error-container ss-registration-field","password"===n.type?"relative password-container":"",n.hiddenByDefault?"ss-registration-field--hidden":""].filter(Boolean).join(" "),children:[(0,Ke.jsx)("label",{htmlFor:b,children:E}),"hdyhau"===n.suggest&&S?(0,Ke.jsx)(Je,{id:b,name:n.inputName??n.name,value:a,placeholder:d||n.placeholder||C,required:o,autoFocus:c,describedBy:A,invalid:Boolean(r),onChange:h,onBlur:f}):"select"===n.type?(0,Ke.jsxs)("select",{...R,onChange:e=>h(e.target.value),children:[(0,Ke.jsx)("option",{value:"",disabled:!0,children:C||(0,t.__)("Please select…","shipstation")}),(i??[]).map((e=>(0,Ke.jsx)("option",{value:e.value,children:e.label},e.value)))]}):"password"===n.type?(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)("input",{...R,type:g?"text":"password",className:"password-input pr-12",placeholder:C,autoComplete:"new-password",onChange:e=>h(e.target.value)}),(0,Ke.jsx)("button",{type:"button",className:"toggle-password ss-registration-password-toggle","aria-label":g?(0,t.__)("Hide password","shipstation"):x||(0,t.__)("Show password","shipstation"),onClick:()=>y((e=>!e)),children:g?(0,Ke.jsx)(Xe,{}):(0,Ke.jsx)(Qe,{})})]}):"tel"===n.type?(0,Ke.jsx)("input",{...R,type:"tel",inputMode:"tel",placeholder:C,onChange:e=>{const t=e.target,{value:n,cursor:r}=function(e,t,n){const a="+"===e.charAt(0),r=e.replace(/\D/g,"");if(r.length>function(e){const t="+"===e.charAt(0),n=e.replace(/\D/g,"");return t&&"1"!==n.charAt(0)?15:"1"===n.charAt(0)?11:10}(e))return{value:n,cursor:t};const o=e.slice(0,t).replace(/[^\d]/g,"").length,i=a&&t>0,s=function(e){const t="+"===e.charAt(0);let n=e.replace(/\D/g,"");if(t&&0===n.length)return"+";if(!t||"1"===n.charAt(0)){if("1"===n.charAt(0)){const e=n.slice(1,11);let a=(t?"+":"")+"1";return e.length>0&&(a+=" "+Ze(e)),a}return Ze(n.slice(0,10))}n=n.slice(0,15);let a=function(e){if(e.length>=3&&ze.includes(e.slice(0,3)))return 3;if(e.length>=2){if(We.includes(e.slice(0,2)))return 2;if(Ge.includes(e.slice(0,2)))return-1}if(e.length>=1){if($e.includes(e.charAt(0)))return 1;if(Ye.includes(e.charAt(0)))return-1}return 0}(n);if(-1===a)return"+"+n;0===a&&(a=Math.min(n.length,2));const r=n.slice(0,a),o=n.slice(a);return 0===o.length?"+"+r:"+"+r+" "+function(e){let t="";for(let n=0;n<e.length;n++)n>0&&n%4==0&&(t+=" "),t+=e[n];return t}(o)}((a?"+":"")+r);let l=0,c=s.length;for(let e=0;e<s.length;e++)if((0!==e||"+"!==s.charAt(0))&&/\d/.test(s.charAt(e))&&(l++,l===o)){c=e+1;break}return 0===o&&(c=i?1:0),{value:s,cursor:c}}(t.value,t.selectionStart??t.value.length,a);h(n),window.requestAnimationFrame((()=>{try{t.setSelectionRange(r,r)}catch{}}))}}):(0,Ke.jsx)("input",{...R,type:n.type,placeholder:C,onChange:e=>h(e.target.value)}),"tel"===n.type&&(0,Ke.jsx)("div",{id:_,className:"phone-format-hint",children:(0,t.__)("For phone numbers outside the US, start with a + and your country code.","shipstation")}),p&&(0,Ke.jsx)("p",{id:v,className:"ss-registration-help",children:p}),r&&(0,Ke.jsx)("p",{id:w,className:"error ss-registration-error",role:"alert",children:r})]})}function tt(e,t=""){return e&&""!==e.trim()?e:t}function nt({i18n:e,disclaimerText:n}){const a=e?.tos??{},r=e?.tosUrls??{},o=tt(a.tos1,"By clicking 'Get Started', you agree to our"),i=tt(a.termsText,"Terms"),s=tt(a.tos2,"&"),l=tt(a.privacyText,"Privacy Policy"),c=tt(a.tos3),u=tt(a.carriersText),d=tt(a.phoneConsent),p=e?.recaptchaLegal;return(0,Ke.jsxs)("div",{className:"ss-registration-legal",children:[(0,Ke.jsxs)("p",{className:"terms ss-registration-terms",children:[o," ",(0,Ke.jsx)("a",{href:tt(r.terms,"/terms-of-service"),target:"_blank",rel:"noreferrer",children:i})," ",s," ",(0,Ke.jsx)("a",{href:tt(r.privacy,"/privacy-policy"),target:"_blank",rel:"noreferrer",children:l}),u&&(0,Ke.jsxs)(Ke.Fragment,{children:[c?` ${c} `:" ",(0,Ke.jsx)("a",{href:tt(r.carriers,"/carriers-terms-of-service/"),target:"_blank",rel:"noreferrer",children:u})]}),"."]}),d&&(0,Ke.jsx)("p",{className:"terms ss-registration-phone-consent",children:d}),n&&(0,Ke.jsx)("p",{className:"disclaimer_text ss-registration-disclaimer",children:n}),(0,Ke.jsxs)("p",{className:"terms ss-registration-recaptcha-legal",children:[tt(p?.intro,(0,t.__)("This site is protected by reCAPTCHA and the Google","shipstation"))," ",(0,Ke.jsx)("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:tt(p?.privacy,(0,t.__)("Privacy Policy","shipstation"))})," ",(0,t.__)("and","shipstation")," ",(0,Ke.jsx)("a",{href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:tt(p?.terms,(0,t.__)("Terms of Service apply.","shipstation"))})]})]})}function at({onDismiss:n,loginUrl:a}){const r=(0,e.useRef)(null);return(0,e.useEffect)((()=>{const e=document.activeElement,t=setTimeout((()=>{r.current?.focus()}),0),n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{clearTimeout(t),document.body.style.overflow=n,e?.focus()}}),[]),(0,e.useEffect)((()=>{const e=e=>{if("Escape"===e.key)return void n();if("Tab"!==e.key||!r.current)return;const t=r.current.querySelectorAll("button, a[href]");if(0===t.length)return;const a=t[0],o=t[t.length-1];e.shiftKey&&document.activeElement===a?(e.preventDefault(),o.focus()):e.shiftKey||document.activeElement!==o||(e.preventDefault(),a.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n]),(0,Ke.jsx)("div",{className:"ss-registration-modal-backdrop",onClick:n,children:(0,Ke.jsxs)("div",{ref:r,className:"ss-registration-modal",role:"dialog","aria-modal":"true","aria-labelledby":"ss-registration-modal-title",tabIndex:-1,onClick:e=>e.stopPropagation(),children:[(0,Ke.jsx)("button",{type:"button",className:"ss-registration-modal__close","aria-label":(0,t.__)("Close","shipstation"),onClick:n,children:"×"}),(0,Ke.jsx)("h2",{id:"ss-registration-modal-title",children:(0,t.__)("Already have an account?","shipstation")}),(0,Ke.jsx)("p",{children:(0,t.__)("That email is already registered — you don't need to change anything above to keep using it.","shipstation")}),(0,Ke.jsx)("a",{className:"btn ss-registration-modal__signin",href:a,children:(0,t.__)("Sign in","shipstation")})]})})}function rt({config:e,onClick:n}){return e.authMethods?.includes("google")?(0,Ke.jsx)("div",{className:"ss-registration-auth-methods",children:(0,Ke.jsx)("button",{type:"button",className:"ss-registration-google-button",disabled:!n,onClick:n,title:(0,t.__)("Google sign-up is coming soon.","shipstation"),children:(0,t.__)("Sign up with Google","shipstation")})}):null}function ot(){return(0,Ke.jsx)("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:(0,Ke.jsx)("path",{d:"M3.5 8L0 4.5L1.4 3.1L3.5 5.2L8.6 0.1L10 1.5L3.5 8Z",fill:"#FFFFFF"})})}function it({stepIndex:e,stepCount:n}){return 0===e?null:(0,Ke.jsx)("div",{className:"ss-registration-steps-indicator","aria-hidden":"true",title:(0,t.__)("Registration progress","shipstation"),children:Array.from({length:n}).map(((t,a)=>{const r=a<e?"done":a===e?"active":"upcoming";return(0,Ke.jsxs)("div",{className:"ss-registration-steps-indicator__item",children:[(0,Ke.jsx)("div",{className:`ss-registration-steps-indicator__dot ss-registration-steps-indicator__dot--${r}`,children:"done"===r?(0,Ke.jsx)(ot,{}):a+1}),a<n-1&&(0,Ke.jsx)("div",{className:"ss-registration-steps-indicator__connector"})]},a)}))})}
1class st extends Error{}function lt(e,t,n){return"country"===e?function(e,t){const n=t=>({value:t.value,label:e?.countryOptions?.[t.value]??t.label});return t&&t.length?t.map((e=>f.find((t=>t.value===e)))).filter((e=>Boolean(e))).map(n):f.map(n)}(n.i18n,n.countries):"shipmentVolume"===e?function(e,t,n){const a=x(e,n),r="LabelApi"===n?v:C;return a.map((e=>({value:e,label:t?.shipmentVolumeOptions?.[e]??r[e]??e})))}(t,n.i18n,n.regType):"howDidYouHearAboutUs"===e?function(e){const t=e?.hdyhauOptions;return t&&Object.keys(t).length?Object.entries(t).map((([e,t])=>({value:A[e]??e,label:t}))):S.map((e=>({value:e,label:"Other"===e?"Other (Please specify below)":e})))}(n.i18n):"shipsFreight"===e?[{value:"0",label:"0 shipments"},{value:"5",label:"1-20 shipments"},{value:"10",label:"21-40 shipments"},{value:"11",label:"41+ shipments"}]:void 0}function ct({config:n,initialValues:a={},isEditor:r=!1}){const[o,i]=(0,e.useState)((()=>{const e={},t=(t,n)=>{e[t]=a[t]??("string"==typeof n?n:"")};return Object.values(U).forEach((e=>t(e.name,e.defaultValue))),L.forEach((e=>t(e.name,e.defaultValue))),e.country=a.country??n.country??"US",e})),[s,l]=(0,e.useState)({}),[c,m]=(0,e.useState)(null),[f,g]=(0,e.useState)(!1),[y,b]=(0,e.useState)(""),[w,v]=(0,e.useState)(!1),[_,k]=(0,e.useState)(0),[C,x]=(0,e.useState)(!1),S=(0,e.useRef)(new Set),A=(0,e.useRef)(!1),R=(0,e.useRef)(null),E=(0,e.useRef)(!1),T=(0,e.useRef)(null),P=(0,e.useRef)(!1),N=o.country??n.country??"US",D="LabelApi"===n.regType,M=De(n.variant),O=(0,e.useMemo)((()=>Ce(n.variant)),[n.variant]),H=(0,e.useRef)(null),oe=()=>{if(!H.current){const e="undefined"!=typeof location?location.search:"",t=async function(e,t,n){const a=De(e);if(!a?.preExchange)return null;const r=new URLSearchParams(t||""),o=new URLSearchParams({partner:e});for(const e of a.preExchange.params){const t=r.get(e);t&&o.set(e,t)}try{const e=await fetch(n||"/wp-json/ss/v1/partner/oauth-exchange",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:o.toString()}),t=await e.json();if(!t?.success)return null;const r=function(e,t){const n={};for(const[a,r]of Object.entries(e.preExchange?.map??{})){const e=He(t,a);e&&(n[r]=e)}return n}(a,t);return Object.keys(r).length?r:null}catch{return null}}(n.variant,e,n.exchangeUrl);H.current=t,t.then((e=>{e||H.current!==t||(H.current=null)}))}return H.current};(0,e.useEffect)((()=>{if(r||!M?.preExchange)return;const e="undefined"!=typeof location?location.search:"";if(!Ve(M,e))return;let t=!1;return oe().then((e=>{!t&&e?.email&&i((t=>t.email?t:{...t,email:e.email}))})),()=>{t=!0}}),[r,M]),(0,e.useEffect)((()=>{!r&&M?.referralCookie&&function(e,t=!1){!e||!t&&X(J)||ee(J,e,{domain:".shipstation.com",path:"/",expires:30})}(M.referralCookie,!0===M.referralAuthoritative)}),[r,M]),(0,e.useEffect)((()=>{if(r||!M?.login||"undefined"==typeof document)return;const e=M.login,n=new Set,a=async n=>{n.preventDefault();const a="undefined"!=typeof location?location.search:"";try{if("shopifyExchange"===e.kind){const e=Ve(M,a),n=e?await oe():null,r=function(e,t){if(!e.login||"shopifyExchange"!==e.login.kind)return{kind:"abort"};if(t.needsExchange&&!t.exchanged)return{kind:"abort"};const n=qe(e,t.search);return{kind:"navigate",cookie:e.login.cookie,cookieValue:(a={token_payload:t.exchanged?.token_payload,registration_payload:n.registration_payload},`${a.token_payload??""}|${a.registration_payload??""}`),redirectUrl:e.login.redirectUrl};var a}(M,{search:a,needsExchange:e,exchanged:n});return"abort"===r.kind?void b((0,t.__)("We could not confirm your store authorization. Please start the install again from your store’s app page.","shipstation")):(ee(r.cookie,r.cookieValue,{domain:".shipstation.com",path:"/",expires:1,sameSite:"Lax",secure:!0}),void window.location.assign(r.redirectUrl))}"cookieHandoff"===e.kind?ae(M):"jsonCookie"===e.kind&&function(e,t){const n=e.login;if(!n||"jsonCookie"!==n.kind||!n.cookie||!n.params)return;const a=new URLSearchParams(t.search||""),r={};for(const e of n.params)r[e]=a.get(e)??"";ee(n.cookie,JSON.stringify(r),{domain:".shipstation.com",path:"/",expires:1,sameSite:"Lax",secure:!0})}(M,{search:a});const n=function(e,t){if(!e.login)return null;const n=new URLSearchParams(t.search||"");switch(e.login.kind){case"targetUrl":{const t=new URL(e.login.route);for(const a of e.login.forward??[]){const e=n.get(a);e&&t.searchParams.set(a,e)}const a=new URL("https://ship.shipstation.com/");return a.searchParams.set("targetUrl",t.toString()),a.toString()}case"loginQuery":{const t=new URL("https://ship.shipstation.com/login");t.searchParams.set("marketplace",e.login.marketplace);for(const a of e.login.forward??[]){const e=n.get(a);e&&t.searchParams.set(a,e)}return t.toString()}case"cookieHandoff":case"jsonCookie":return e.login.redirectUrl;case"shopifyExchange":return null}}(M,{search:a});n&&window.location.assign(n)}catch(e){console.error("Partner login handoff failed.",e),b((0,t.__)("We could not confirm your store authorization. Please start the install again from your store’s app page.","shipstation"))}},o=e=>{n.has(e)||(n.add(e),e.addEventListener("click",a))},i=()=>{document.querySelectorAll("a#loginButton, .loginButton").forEach(o)};i();const s=new MutationObserver(i);return s.observe(document.body,{childList:!0,subtree:!0}),()=>
1{s.disconnect(),n.forEach((e=>e.removeEventListener("click",a)))}}),[r,M]),(0,e.useEffect)((()=>{r||"undefined"==typeof document||document.dispatchEvent(new CustomEvent("ss:registration-form-ready",{detail:{formId:T.current?.id||"registration-form"}}))}),[r]),(0,e.useEffect)((()=>{r||function(){const e=re().ssOnHomeCountry;if("function"!=typeof e)return!1;try{return e((e=>{if(P.current)return;const t=Re(e);t&&i((e=>(e.country??"")===t?e:{...e,country:t}))})),!0}catch{return!1}}()}),[r]);const ie=(0,e.useMemo)((()=>({country:N,values:o,config:n,backendError:c})),[N,o,n,c]),se=(0,e.useMemo)((()=>I(n.fields&&n.fields.length?n.fields:j,n.hideFields??[],ie).filter((e=>!(n.autoPassword&&"password"===e.name)))),[n.fields,n.hideFields,n.autoPassword,ie]),le=(0,e.useMemo)((()=>se.filter((e=>d(e,ie)))),[se,ie]),ce=(0,e.useMemo)((()=>function(e){return!0!==e.oauthInstallFlowElsewhere}(O)?function(e){return Array.isArray(e.steps)&&e.steps.length?e.steps:"twoStep"===(t=e.stepsTemplate)||"threeStep"===t?Ee[t]:void 0;var t}(n):void 0),[O,n.steps,n.stepsTemplate]),fe=(0,e.useMemo)((()=>{const e=function(e,t){const n=(t??[]).filter(Array.isArray);if(!n.length)return[e];const a=new Map;n.forEach(((e,t)=>{for(const n of e)"string"!=typeof n||a.has(n)||a.set(n,t)}));const r=n.length-1,o=n.map((()=>[]));for(const t of e){const e=a.get(t.name);o[void 0!==e?e:r].push(t)}return o.some((e=>0===e.length))?[e]:o}(le,ce);if(e.length<=1)return{steps:e,violations:[]};const t=function(e,t){const n=[];for(const a of e){const e=Te(t,a.name);if(-1!==e){for(const r of a.readsValuesOf??[]){const o=Te(t,r);-1!==o&&o>e&&n.push({writer:r,reader:a.name,writerStep:o,readerStep:e})}a.revealedBySubmitError&&e!==t.length-1&&n.push({writer:"(submit error)",reader:a.name,writerStep:t.length-1,readerStep:e})}}return n}(le,e);return t.length?{steps:[le],violations:t}:{steps:e,violations:[]}}),[le,ce]),ge=fe.steps,_e=ge.length>1,ke=Math.min(_,ge.length-1),xe=ke===ge.length-1,Se=ge[ke]??le;(0,e.useEffect)((()=>{r||"undefined"==typeof document||document.dispatchEvent(new CustomEvent("ss:registration-step-change",{detail:{formId:T.current?.id||"registration-form",formEl:T.current,stepIndex:ke,stepCount:ge.length,isLastStep:xe}}))}),[r,ke,ge.length,xe]),(0,e.useEffect)((()=>{fe.violations.length&&!A.current&&(A.current=!0,console.error("Invalid multi-step registration config — falling back to single-step.",fe.violations),G({event:"registration_step_config_invalid",form_variant:n.variant}))}),[fe.violations,n.variant]),(0,e.useEffect)((()=>{if(r)return;if(R.current){const e=R.current;return R.current=null,void T.current?.querySelector(`#ss-${e}`)?.focus()}if(!E.current)return void(E.current=!0);const e=Se[0];e&&T.current?.querySelector(`#ss-${e.name}`)?.focus()}),[ke]);const Ae=(0,e.useMemo)((()=>ge.map((e=>function(e,t=[]){const n=new Map(e.map((e=>[e.name,e]))),a=new Map;t.forEach(((e,t)=>{if(Array.isArray(e))for(const n of e)"string"!=typeof n||a.has(n)||a.set(n,t)}));const r=new Set,o=[];for(const i of e){if(r.has(i.name))continue;const e=a.get(i.name);if(void 0===e){r.add(i.name),o.push([i]);continue}const s=[];for(const o of t[e])a.get(o)!==e||r.has(o)||!n.has(o)||s.length>=4||s.push(n.get(o));s.length?(s.forEach((e=>r.add(e.name))),o.push(s)):r.add(i.name)}return o}(e,n.fieldRows)))),[ge,n.fieldRows]),Pe=r?Ae:[Ae[ke]??[]],Fe=e=>{if(!_e)return;const t=Te(ge,e);-1!==t&&t!==ke&&(R.current=e,k(t))},Be=async()=>{if(C)return;x(!0);const e=await h(Se,ie);if(e.length){l((t=>{const n={...t};return e.forEach((e=>{n[e.field]=e.message})),n})),x(!1);const t=e[0];T.current?.querySelector(`#ss-${t.field}`)?.focus()}else n.leadCaptureUrl&&fetch(n.leadCaptureUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ne(n,o,ke+1))}).catch((()=>{})),Y(n,o,ke+1,ge.length),S.current.has(ke)||(S.current.add(ke),G({event:"registration_step_complete",step:ke+1,step_count:ge.length,form_variant:n.variant,home_country:N})),x(!1),k(ke+1)},$e=async(e,t)=>{const n=U[e];if(!n)return;const a=t??o[e]??"",r=void 0===t?ie:{...ie,values:{...ie.values,[e]:t}},i=await p(n,a,r);l((t=>{const n={...t};return i?n[e]=i.message:c?.field===e&&a===(o[e]??"")||delete n[e],n}))},We=async(e,a)=>{if(Boolean(e.success)&&Boolean(e.userId||e.refno)){const o=function(e){const t=e.getCookie??X,n=e=>t(e)??"",a=e.now??Date.now(),r=new Date(a),o=function(e){return e?e.split(".").slice(2).join().split("!").map((e=>{const t=e.split(",");return{id:t[0],variant:t[t.length-1]}})):null}(t("_gaexp")),i=me(),{trialActivationDate:s,trialEndDate:l}=function(e){const t=864e5,n=e.now-e.now%t+t;let a="";if(null!=e.respTrialEndDate&&""!==e.respTrialEndDate){const n=Number(e.respTrialEndDate);a=Number.isFinite(n)?String(n-n%t):""}return"14daytrial"!==e.referralCode||e.coupon||(a=String(n+13*t)),{trialActivationDate:String(n),trialEndDate:a}}({now:a,respTrialEndDate:e.respTrialEndDate,referralCode:t(J)??"",coupon:e.values.coupon??""});return{pageURL:"undefined"!=typeof location?location.href:"",lastVisitedPage:e.lastVisitedPage??"",utm:{medium:n("utm_medium"),source:n("utm_source"),campaign:n("utm_campaign"),term:n("utm_term"),content:n("utm_content")},fbp:n("_fbp"),fbc:n("_fbc"),cje:n("cje"),gclid:n(Q),captchaScore:e.captchaScore??"",optimizelyId:he(),optimizelyExperimentName:ue(i),trialActivationDate:s,trialEndDate:l,browserLanguage:"undefined"!=typeof navigator?(navigator.language||"en-us").toLowerCase():"en-us",utcOffsetInMinutes:String(-1*r.getTimezoneOffset()),isDST:String(de(r,pe().luxon?.DateTime.local().isInDST)),experimentsObject:o,experimentsString:JSON.stringify(o??"")}}({config:n,values:a,respTrialEndDate:e.trialEndDate,lastVisitedPage:await ye()});if(G(V(e,n,a,o)),function(e,t,n){"undefined"!=typeof window&&window.analytics&&(window.analytics.identify(e.userId,t),window.analytics.track("Account Created",
1n))}(e,W(n,a),function(e,t,n="exp_"){if(!t)return e;const a={...e};for(const[r,o]of Object.entries(t))r.startsWith(n)&&(r in e||z.has(r)||(a[r]=o));return a}($(e,n,a,o,ge.length),function(){if("undefined"!=typeof window)return window.ssRegistration?.extraFields}())),M){ne(e),M.writeAuthCookie&&e.username&&(r=e.authToken)&&ee("auth",r,{path:"/",domain:".shipstation.com",sameSite:"Lax",secure:!0}),M.connectedMarketplaceId&&e.username&&function(e,t=("undefined"!=typeof location?location.hostname:"")){e&&ee("datadrivenoauth-token",e,{path:"/",domain:te(t)||void 0,expires:1,sameSite:"Lax",secure:!0})}(M.connectedMarketplaceId),"cookieHandoff"===M.success.kind&&ae(M);const a=!0===n.isProduction?{forceLegacy:!1,debug:!1}:K("undefined"!=typeof location?location.search:""),o=function(e,t){const n=new URLSearchParams(t.search||"");switch(e.success.kind){case"none":case"partnerUrlParam":return{kind:"none"};case"loginHandoff":return{kind:"auto",url:Oe(t.response??{},{country:t.country,forceLegacy:t.forceLegacy})};case"cookieHandoff":return{kind:"auto",url:Ie(t.country)};case"oauthAccept":{const a=!0===e.success.euAware&&je.includes(t.country)?Le:Ue,r=new URL(a+e.success.route);for(const t of e.success.forward??[]){const e=n.get(t);e&&(!/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(e)&&!e.startsWith("//")||Me(e))&&r.searchParams.set(t,e)}return{kind:"auto",url:r.toString()}}}}(M,{search:"undefined"!=typeof location?location.search:"",country:N,response:e,forceLegacy:a.forceLegacy});switch(g(!1),o.kind){case"auto":Z(o.url,{debug:a.debug});break;case"none":b((0,t.__)("Your account is ready. Return to your store to finish connecting it.","shipstation"))}return}if(D)return void Z(n.successUrl||"/thanks-for-signing-up");ne(e);const i=!0===n.isProduction,s=String(e.host||(i?"https://ship.shipstation.com/login":"https://ship0.shipstation.com/login")),l=/^https?:\/\//.test(s)?s:`https://${s}/login`,c=i?{forceLegacy:!1,debug:!1}:K("undefined"!=typeof location?location.search:"");return void Z(function(e,t){return e.autoLoginNonce&&!t.forceLegacy?function(e,t){const n=new URL(e);return n.search="",n.pathname=n.pathname.replace(/\/login\/?$/,""),n.searchParams.set("onboarding",t.onboarding??"true"),n.searchParams.set("username",t.username),n.searchParams.set("firsttime","true"),n.searchParams.set("nonce",t.nonce),n.toString()}(t.baseUrl,{username:String(e.username??""),nonce:String(e.autoLoginNonce),onboarding:t.onboarding}):function(e,t){const n=new URL(e),a=Boolean(t.partitionId&&t.authToken);if(a){const e=String(t.partitionId);n.hostname=n.hostname.replace(/^ship\./,`ship${e}.`).replace(/^ss\d+\./,`ss${e}.`)}return n.searchParams.set("firsttime","true"),a&&n.searchParams.set("a",String(t.authToken)),n.toString()}(t.baseUrl,{partitionId:e.partitionId??null,authToken:e.authToken??null})}(e,{baseUrl:l,forceLegacy:c.forceLegacy,onboarding:n.ssoOnboarding?"false":void 0}),{debug:c.debug})}var r;g(!1);const o=e.message||(0,t.__)("Registration failed.","shipstation");e.field?(m({field:e.field,message:o}),l((t=>({...t,[e.field]:o}))),Fe(e.field)):/password/i.test(o)?(m({field:"password",message:o}),l((e=>({...e,password:o}))),Fe("password")):!D&&/already (exists|in use|registered|taken)|account already/i.test(o)?(m({field:"email",message:o}),l((e=>({...e,email:o}))),Fe("email"),n.hideAccountExistsModal||v(!0)):D?(m({field:"username",message:o}),l((e=>({...e,username:o}))),Fe("username")):b(o)};return(0,Ke.jsxs)(e.Fragment,{children:[(0,Ke.jsxs)("form",{ref:T,id:"registration-form",className:"ss-registration-form",noValidate:!0,onSubmit:async e=>{if(e.preventDefault(),r||f)return;b("");const a=await h(F(n,ie),ie);if(a.length){const e={};a.forEach((t=>e[t.field]=t.message)),l(e);const t=a[0];if(_e){const e=Te(ge,t.field);if(-1!==e&&e!==ke)return R.current=t.field,void k(e)}const n=T.current?.querySelector(`#ss-${t.field}`);n?n.focus():b(t.message)}else{g(!0);try{const e=await async function(){const e=window.RecaptchaLazyLoader;if(!e?.execute)throw new st("RecaptchaLazyLoader unavailable");let t;try{t=await e.execute("submit")}catch(e){throw new st(e instanceof Error?e.message:"reCAPTCHA execution failed")}if(!t)throw new st("empty reCAPTCHA token");return t}();n.captchaCheckUrl&&fetch(n.captchaCheckUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({country:N,recaptchaToken:e})}).catch((()=>{}));const a=function(){if("undefined"==typeof window)return"";try{return window.YofiTelemetry?.getJourneyId?.()??""}catch{return""}}(),r=n.autoPassword?{...o,password:q()}:o,i="undefined"!=typeof location?location.search:"";let s={};if(M&&(s=qe(M,i),Ve(M,i))){const e=await oe();if(!e)return g(!1),void b((0,t.__)("We could not confirm your store authorization. Please start the install again from your store’s app page.","shipstation"));const{email:n,...a}=e;s={...s,...a}}const l={journey_id:a,utcoffset:String(-1*(new Date).getTimezoneOffset()),...n.buyNow?{isBuyNow:"true"}:{},...be({config:n,values:r,search:i}),..."LabelApi"===n.regType?we(i):{},...s},u=function(e,t,n={},a="",r=null){const o={},i=t.country??e.country??"US",s={country:i,values:t,config:e,backendError:r};for(const e of L){const n=e.inputName??e.name;o[n]=t[e.name]??("string"==typeof e.defaultValue?e.defaultValue:"")}for(const n of F(e,s)){const e=n.inputName??n.name,a="function"==typeof n.defaultValue?n.defaultValue(s):n.defaultValue;o[e]=t[n.name]??a??""}Object.assign(o,e.hiddenFields??{});for(const[e,t]of Object.entries(n))void 0!==t&&(o[e]=t);o[U.country.inputName??"country"]=i,"LabelApi"===e.regType&&(o.regType="LabelApi");const{coupon:l,referralCode:c}=function(e){let t=e.coupon??"",n=e.referralCode??"";const a=e.country;return"FREE30"!==t&&"FREETRIAL"!==t||(t=""),"FR"===a&&""===t&&(t=function(e,t=""){return"14daytrial"===t?"FREETRIAL":e in B?B[e]:"FREE30"}(a,n)),"14daytrial"!==n||"US"===a&&""===t||(n=""),e.url.includes("/toyota-parts-center-online")&&""!==t&&(n=`dealer-code-${t}`,t="TOYOTASTANDARD500"),{coupon:t,referralCode:n}}({coupon:o.coupon??"",referralCode:o.referral_code??"",country:i,url:a});o.coupon=l,o.referral_code=c,o.plan_profile_code=function(e){return"NZ"===e?"ss_anz_q12023":"FR"===e||"DE"===e?"ss_eu_byoa_2023_q2":""}(i),o.AI_comms_opt_in=(o.phone??"").trim()?"Consented":"Not Consented",o.targetApp||(o.targetApp="default");for(const[n,a]of Object.entries(e.payloadMap??{})){const e=o[U[n]?.inputName??n]??t[n]??"";
1(Array.isArray(a)?a:[a]).forEach((t=>{o[t]=e}))}return o}(n,r,l,"undefined"!=typeof location?location.href:"",c);for(const[e,t]of Object.entries(M?.payloadDefaults??{}))u[e]||(u[e]=t);const d=n.restUrl||"/wp-json/ss/v1/register",p=await async function(e,t,n=""){const a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",reCAPTCHAresponseToken:n},body:new URLSearchParams(t).toString()});return await a.json()}(d,u,e);await We(p,r)}catch(e){if(g(!1),e instanceof st)return G({event:"registration_no_recaptcha",recaptcha_status:"unavailable_at_submit"}),void b((0,t.__)("Security verification is required but unavailable. Please check your internet connection and ad-blocker settings, then try again.","shipstation"));b((0,t.__)("Something went wrong submitting your registration. Please try again.","shipstation"))}}},onKeyDown:e=>{"Enter"!==e.key||!_e||xe||r||(e.preventDefault(),Be())},"data-active-step":ke+1,"data-total-form-steps":ge.length,"data-brand":D?"ShipEngine":"ShipStation",children:[(0,Ke.jsx)(rt,{config:n}),n.title&&(0,Ke.jsx)("h3",{className:"ss-registration-title",children:n.title}),!r&&_e&&(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)(it,{stepIndex:ke,stepCount:ge.length}),(0,Ke.jsx)("p",{className:"ss-registration-step-status",role:"status","aria-live":"polite",children:(0,t.sprintf)(/* translators: 1: current step number, 2: total step count */ /* translators: 1: current step number, 2: total step count */
2(0,t.__)("Step %1$d of %2$d","shipstation"),ke+1,ge.length)})]}),!r&&(0,Ke.jsx)("input",{type:"hidden",id:"ioBlackBox",name:"ioBlackBox"}),Pe.map(((a,l)=>(0,Ke.jsxs)(e.Fragment,{children:[r&&_e&&l>0&&(0,Ke.jsx)("hr",{className:"ss-registration-step-divider"}),r&&_e&&(0,Ke.jsx)("p",{className:"ss-registration-step-label",children:(0,t.sprintf)(/* translators: 1: current step number, 2: total step count */ /* translators: 1: current step number, 2: total step count */
3(0,t.__)("Step %1$d of %2$d","shipstation"),l+1,ge.length)}),a.map(((t,a)=>{const l=t.map((e=>(0,Ke.jsx)(et,{field:e,autoFocus:!0===n.focus&&0===ke&&0===a&&t[0]===e&&!r,value:o[e.name]??"",error:s[e.name],required:u(e,ie),options:lt(e.name,N,n),i18n:n.i18n,language:n.language,labelOverride:n.fieldOverrides?.[e.name]?.label,placeholderOverride:n.fieldOverrides?.[e.name]?.placeholder,helpText:n.fieldOverrides?.[e.name]?.helpText,consentFootnote:!0===e.consentFootnote&&Boolean(n.i18n?.tos?.phoneConsent),onChange:t=>{return n=e.name,a=t,"country"===n&&(P.current=!0),i((e=>({...e,[n]:a}))),void(s[n]&&$e(n,a));var n,a},onBlur:()=>$e(e.name)},e.name)));return function(e){return e.length>1}(t)?(0,Ke.jsx)("div",{className:ve(t),children:l},`row-${t.map((e=>e.name)).join("-")}`):(0,Ke.jsx)(e.Fragment,{children:l},`row-${t[0].name}`)}))]},`step-${l}`))),y&&(0,Ke.jsx)("p",{className:"ss-registration-form-message",role:"alert",children:y}),(0,Ke.jsxs)("div",{id:"reg-submit",className:"row registration-submit-row",children:[r||xe||!_e?(0,Ke.jsx)("button",{type:"submit",id:"save-button",className:"btn ss-registration-submit",disabled:f,children:f?(0,t.__)("Submitting…","shipstation"):n.submitText||n.i18n?.submitButton||(0,t.__)("Get Started","shipstation")},"save-button-submit"):(0,Ke.jsx)("button",{type:"button",id:"save-button",className:"btn ss-registration-submit",disabled:C,onClick:Be,children:(0,t.__)("Continue","shipstation")},"save-button-continue"),!r&&_e&&ke>0&&(0,Ke.jsx)("button",{type:"button",className:"ss-registration-back",onClick:()=>k((e=>Math.max(0,e-1))),children:(0,t.__)("Back","shipstation")}),(r||xe||!_e)&&!n.hideTerms&&(0,Ke.jsx)(nt,{i18n:n.i18n,disclaimerText:n.disclaimerText})]}),r&&(0,Ke.jsxs)("p",{className:"ss-registration-editor-note",children:[(0,t.__)("Editor preview — variant:","shipstation")," ",n.variant]})]}),w&&(0,Ke.jsx)(at,{onDismiss:()=>v(!1),loginUrl:!0===n.isProduction?"https://ship.shipstation.com/login":"https://ship0.shipstation.com/login"})]})}function ut(t){if(t.dataset.ssMounted)return;t.dataset.ssMounted="1";const{config:n,initialValues:a}=function(e,t={}){const n=t.search??("undefined"!=typeof location?location.search:""),a=t.getCookie??X,r
3=function(e){const t=new URLSearchParams(e||""),n=new URLSearchParams;for(const[e,a]of t)n.append(e.toLowerCase(),a);return n}(n),o=Ae(r,"hideFields"),i=Array.from(new Set([...e.hideFields??[],...o?o.split(","):[]].map((e=>e.trim())).filter(Boolean))),s=Re(Ae((l={params:r,resolvedHomeCountry:t.resolvedHomeCountry??null,cookieHomeCountry:a("home_country"),configCountry:e.country??null}).params,"country")||Ae(l.params,"home_country"))||Re(l.resolvedHomeCountry)||Re(l.cookieHomeCountry)||Re(l.configCountry)||"US";var l;const c=a(J)??"",u=Ae(r,"coupon")||a("coupon")||e.coupon||"",d=u||"FREE30",p=!u&&(c.includes("gppc")||c.includes("bppc")),m={variant:e.variant??"default",regType:e.regType??"fulfillment",restUrl:e.restUrl,isProduction:e.isProduction,successUrl:e.successUrl,exchangeUrl:e.exchangeUrl,fields:e.fields??[],fieldOverrides:e.fieldOverrides,requiredOverrides:e.requiredOverrides,fieldRows:e.fieldRows,hideFields:i,hiddenFields:e.hiddenFields,country:s,language:e.language,i18n:e.i18n,coupon:d,couponHiddenByReferral:p,couponLabel:e.couponLabel??null,referralCode:c||e.referralCode||null,partner:e.partner??null,title:e.title,submitText:e.submitText,disclaimerText:e.disclaimerText,backgroundColor:e.backgroundColor,textColor:e.textColor,headingColor:e.headingColor,requireHowDidYouHearAboutUs:e.requireHowDidYouHearAboutUs,useAutocomplete:e.useAutocomplete,ssoOnboarding:e.ssoOnboarding,buyNow:e.buyNow,emailBlacklist:e.emailBlacklist,emailBlacklistDomains:e.emailBlacklistDomains,uspsRep:e.uspsRep,showShipsFreight:e.showShipsFreight,focus:e.focus,hideTerms:e.hideTerms,hideAccountExistsModal:e.hideAccountExistsModal,authMethods:e.authMethods??["password"],steps:e.steps,stepsTemplate:e.stepsTemplate,leadCaptureUrl:e.leadCaptureUrl,captchaCheckUrl:e.captchaCheckUrl},h=function(e,t){return{...e,regType:t.regType??e.regType,fields:t.fields&&t.fields.length?t.fields:e.fields,hiddenFields:{...t.hiddenFields??{},...e.hiddenFields??{}},fieldOverrides:{...t.fieldOverrides??{},...e.fieldOverrides??{}},countries:t.countries??e.countries,autoPassword:t.autoPassword??e.autoPassword,requireReferralCode:t.requireReferralCode??e.requireReferralCode,payloadMap:t.payloadMap??e.payloadMap,partner:e.partner??t.hiddenFields?.partner??e.partner}}(m,Ce(m.variant));let f=h.country??s;h.countries&&h.countries.length&&!h.countries.includes(f)&&(f=h.countries[0]),h.country=f;const g={};for(const e of Se){const t=Ae(r,e);t&&(g[e]=t)}if(g.shipmentVolume){const e=function(e,t,n){const a=e?parseInt(e,10):NaN;if(isNaN(a))return"";const r=x(t,n).filter((e=>"0"!==e)).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))).sort(((e,t)=>e-t));if(!r.length)return"";const o=r.find((e=>e>=a));return String(o??r[r.length-1])}(g.shipmentVolume,f,h.regType);e&&(g.shipmentVolume=e)}g.country=f,g.coupon=d,h.referralCode&&(g.referral_code=h.referralCode);const y=a("hubspotutk");y&&(g.hubspot_cookie=y);const b=a("affiliate");b&&(g.affiliate=b);const w=a("referrer");w&&(g.referrer=w);const v=a("ssbc-payload");return v&&(g.token_payload=v),{config:h,initialValues:g,hideCoupon:p}}(function(e){try{return JSON.parse(e.dataset.config||"{}")}catch{return{}}}(t),{resolvedHomeCountry:oe()});(0,e.createRoot)(t).render((0,Ke.jsx)(ct,{config:n,initialValues:a})),function(e){const t=window.RecaptchaLazyLoader;if(t?.init){e.id||(e.id=`ss-registration-${Math.random().toString(36).slice(2,10)}`);try{t.init(`#${e.id}`,{rootMargin:"200px",loadOnInteraction:!0,interactionEvents:["focus","click","touchstart"]})}catch{}}}(t)}function dt(){document.querySelectorAll(".ss-registration").forEach(ut)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",dt):dt()})();

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.