PageSourceSearch

https://theberkey.com/cdn/shopifycloud/checkout-web/assets/c1/ec391382.K2o3oZbF.js

js theberkey.com collected 2026-10-02 07:07:16 UTC 2,512 bytes, 1 lines download raw bytes

1import{q as u}from"./2c1ab0fe.BqEHHmaW.js";import{al as y,am as m,an as g,ao as _,ap as v,O as c,aq as w,ar as P}from"./4c290a1e.FJVsH4yi.js";import{u as b}from"./0a7dffce.BHf0S_6c.js";const S=/\.(shop\.dev|shop\.test|tunnel\.shopifycloud\.tech)$/,T=/-prod\.tunnel\.shopifycloud\.tech$/;function A(){if(typeof window>"u")return!1;const e=window.location.host;return S.test(e)&&!T.test(e)}const I=()=>/debug=yes/.test(window.location.href)||/debug=true/.test(window.location.href)||/debug=1/.test(window.location.href)?!0:/debug=no/.test(window.location.href)||/debug=false/.test(window.location.href)||/debug=0/.test(window.location.href)?!1:!!A(),M=[75664294112,62390304886,85847245104,86752461117,58033635374,66379940012,70551503014,70463455488,93853155640,80263414008,69293637654];function O(e){const r=k();return{flow_version:_()?"iframe":"popup",...r&&{shopId:r},debugMode:I(),os:g(),browser:m().name,entrypoint:y,...e&&{client_source:e}}}function k(){const e=v();if(e)return e&&M.includes(e)?String(e):"other"}const p={shippingAddressError:"$.cart.deliveryGroups[0].deliveryAddress",discountCodeError:void 0,generalError:"$.cart"};Object.values(p).filter(Boolean);function x(){const{observability:e,source:r}=c(),t=r.type==="shopPayExternal",n=w(),o=b();return u(()=>{if(!t)return;let a=!1,s=!1;for(const i of n.validationErrors.value)i.target===p.generalError?a=!0:i.target===p.shippingAddressError&&(s=!0);!a&&!s||e.counter({name:"shop_pay_external_checkout_with_address_errors",value:1,attributes:{hasGeneralError:a,hasDeliveryAddressError:s,...O(o?.clientSource)}})},[t,o?.clientSource,e,n.validationErrors])}function C({breadcrumbPrefix:e,isApplePay:r=!1}){const{observability:t,source:n,i18n:o,checkout:{identity:a,validation:s},shopPay:i}=c(),d=n.type==="simulated",h=a.current.value==="shopPay"&&!i?.user.phoneNumber.value?.trim(),f=u(()=>{const l=s.missingFields.phone.isValid.value;if(!l){const E=s.missingFields.phone.input.value;s.missingFields.phone.error.value=E?o.translate("field_errors.shipping_line_phone_invalid"):o.translate("field_errors.phone_blank")}return l},[s,o]);return u(()=>d?(t.leaveErrorBreadcrumb(`${e} - simulated`),!1):h&&r&&!f()?(t.leaveErrorBreadcrumb(`${e} - requires phone`),!1):(t.leaveErrorBreadcrumb(e),!0),[e,t,d,h,r,f])}function V(){const{userEvents:e,source:r,checkout:t,shop:n}=c(),o=x();return u(()=>{o(),e.monorailEvent({schemaId:"shopify_pay_payment_page_pay_now/2.1",payload:{...P(r,t,n),clientTimestampMs:Date.now()}})},[e,r,t,n,o])}export{C as a,V 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.