PageSourceSearch

https://www.primary.com/cdn/shopifycloud/checkout-web/assets/c1/2fdb3dd3.Dk6unqUy.js

js primary.com collected 2026-10-01 10:42:24 UTC 3,673 bytes, 1 lines download raw bytes

1import{O as e,bd as a,be as s,bf as n,bg as t,Q as r,aT as o,bh as c,bi as i,bj as u,bk as l,bl as d}from"./4c290a1e.D9lE9kmU.js";import{b9 as h,ba as p,bb as v,e as m,bc as f,h as g,bd as k,be as b,bf as P,bg as _}from"./164ad2e3.DgUUtBtV.js";import{T as E,h as T,f as M,A as w,o as S,G as y,e as N}from"./2c1ab0fe.D_oO1jU7.js";import{u as R}from"./53bbdad9.Bipg1_Lt.js";const U="placement-reference";function x(){const{router:r}=e(),o=r.currentUrl.value.searchParams.get(U),{supported:c}=v(),i=m(),u=E((()=>{const e=f(i.value);if(!o){const e=a(s.PlacementReference);return c.has(e)?e:void 0}return c.has(o)?o:(console.error(new n(`'${o}' is not a valid placement reference, falling back to '${e}'. Please see https://shopify.dev/apps/checkout/test-ui-extensions#dynamic-extension-points`)),e)}),[o,c,i.value]);return T((()=>{u&&t(s.PlacementReference,u)}),[u]),u??void 0}function A(){const e=h(),a=x(),s=e.workspace?.root?.url||e.workspace?.queryUrl;return E((()=>{const e=new URLSearchParams;return s&&e.set(p,s),a&&e.set(U,a),e}),[s,a])}function C(){const{acceptSmsMarketing:a,phone:s,smsMarketingPhone:n,shippingAddress:t}=r(),{negotiate:o}=g(),c=t.fields.phone.value,i=n.value,{checkout:u}=e(),l=0===(u.proposal.negotiated.fields.availableDeliveryAddresses.value??[]).length?c:"",d=i||s.value||l||"";return{handleSmsMarketingConsent:e=>{n.value="",a.value=e,e?n.value=d:o({include:[],silenceViolations:["all"]})}}}function I(){const{shippingAddress:e,locationAddress:a}=r();return M((()=>{const s=e.value,n=a.value;return k(s,n)}))}function O(){const{smsMarketingPhone:a}=r(),{validatePhoneNumber:s}=R(),{negotiate:n}=g(),t=I(),{i18n:c,checkout:{wallets:i}}=e(),{marketingPhoneInputError:u}=o(),l=w(!1);S((()=>{const e=a.value,r=t.value,o=u.peek();if(!l.current)return void(l.current=!0);const d=s(e,r??"ZZ")?void 0:c.translate("field_errors.address_phone_blank");d?o||(u.value=d):u.value=void 0,d||i.activeSession.value||y((()=>{n({include:[],silenceViolations:["all"]})}
1))}))}function j(e){return!0===e?.includes("marketingConsent")||!0===e?.includes("messagingMarketingConsent")}const D=new Set(["BUYER_IDENTITY_MARKETING_CONSENT_PHONE_NUMBER_DOES_NOT_MATCH_EXPECTED_PATTERN"]);function $(a){const{smsMarketingPhone:s,acceptSmsMarketing:n}=r(),{marketingPhoneInputError:t}=o(),{checkout:{wallets:l}}=e(),d=w();function h(){void 0!==d.current&&d.current===s.peek()&&(t.value=void 0,d.current=void 0)}b((e=>{if("success"===e.type)return void h();if("error"!==e.type)return;let n=!1;for(const r of e.violations){if("UnprocessableTermViolation"!==r.__typename||!D.has(r.code)||!j(r.target))continue;n=!0;const e=a||(r.localizedMessage??r.nonLocalizedMessage);t.value=e,d.current=s.peek()}n||h()}));const p=N(void 0),v=n.value?t:p;return c(s,v,(()=>{}),i.InvalidOptInPhone,(()=>Boolean(l.activeSession.value))),u(s,t)}function B(a){const{checkout:s,router:n}=e(),{origin:t,prefix:r,searchParams:o}=n.currentUrl.value,c=A(),i=P().current.token,u=_(),h=o.get("shop_client_uuid")??o.get("client_uuid"),p=s.checkpointToken.value,v=s.configuration.renderContextToken.token.value;return E((()=>{const e=o.get("channel"),s=o.get("preview_theme_id"),n=new URL(`${t}${r}`);n.searchParams.set("payment","shop_pay");for(const[a,t]of c.entries())n.searchParams.set(a,t);return i&&n.searchParams.set(l,i),a&&n.searchParams.set("redirect_source",a),p&&n.searchParams.set(d,p),e&&n.searchParams.set("channel",e),s&&n.searchParams.set("preview_theme_id",s),h&&n.searchParams.set("shop_client_uuid",h),v?n.searchParams.set("rctx",v):n.searchParams.delete("rctx"),u(n.searchParams,o),n.toString()}),[o,t,r,i,a,p,c,u,h,v])}export{x as a,I as b,C as c,O as d,$ as e,B as f,j as i,A as u};

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.