1import{f as p,q as d}from"./esnext-vendor.7EcvH7tF.js";import{S as c,dt as m,dh as w,Q as P,ax as C}from"./utilities-previous.BNOUhCqt.js";import{cm as v}from"./hydrate.CvWSYK3c.js";function y(e,o,{dismissible:t=!0,onCancel:i}={}){let n=null;const r=new Promise(s=>{n=s});e.setCrossBorderConfirmState({onConfirm:s=>{e.setCrossBorderConfirmState(null),s.setSelectedMethodTypes(["SHIPPING"]),o(),n?.()},...t&&{onCancel:()=>{e.setCrossBorderConfirmState(null),i?.(),n?.()}},modalPromise:r})}function x(){const{checkout:e}=P(),{locationAddress:o}=c(),t=v(),i=d(r=>{const s=o.fields.countryCode.value;return!!(t.value&&s&&r!==s)},[o,t]),n=d((r,{dismissible:s=!0,onCancel:f}={})=>{y(e,r,{dismissible:s,onCancel:f})},[e]);return{shouldGateCrossBorder:i,crossBorderGate:n}}function L(){const{shippingAddress:e}=c(),o=m();return p(()=>{const t=e.value?.countryCode;if(!t)return!1;const i=o.value;if(!i)return!1;const n=w(i)?.pickupLocation?.address.countryCode;return n?t!==n:!1})}const h=/Shop App\/[^/]+\/(?:iOS|Android)\//i;function a(e){return/Android/i.test(e)?"android":"ios"}function l(e=typeof window>"u"?"":window.navigator.userAgent,o,t){return t&&t!=="web"?a(e):o&&o!=="WEB"?/android/i.test(o)?"android":"ios":h.test(e)||typeof window<"u"&&window.ReactNativeWebView?a(e):"web"}function b(e){if(!/Macintosh/i.test(e)||typeof window>"u"||!window.navigator)return!1;const o=window.navigator.maxTouchPoints;return typeof o=="number"&&o>1}function S(e){return/iPad|Macintosh|Linux; Android/i.test(e)}function u(e){return/iPad/i.test(e)||/Android/i.test(e)&&!/Mobile/i.test(e)||b(e)}function B(e){return/iPhone|iPod/i.test(e)||/Android/i.test(e)&&/Mobile/i.test(e)}function M(e=typeof window>"u"?"":window.navigator.userAgent,o,t){return l(e,o,t)!=="web"?S(e)&&u(e)?"tablet":"mobile":u(e)?"tablet":B(e)?"mobile":"desktop"}function G(e,o,t,i={}){const{embedPlatform:n,shopAppSurface:r}=i;return{...C(e,o,t),platform:l(void 0,n,r),deviceType:M(void 0,n,r)}}export{L as a,G as g,x 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.