PageSourceSearch

https://saya.pk/cdn/shopifycloud/checkout-web/assets/c1/hooks-useSuppressShopPayModalOnLoad.DFOLDSdS.js

js saya.pk collected 2026-09-25 18:50:19 UTC 2,612 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["component-PhoneNumberFormatter.6-emdPAH.js","exports-getCountryCallingCode.B1Uy0QN5.js"])))=>i.map(i=>d[i]);
2import{_ as I}from"./app.DbSrjjlA.js";import{N as w,A as v,h as A,q as _,T as E,r as R,f as V}from"./esnext-vendor.B9Da21W6.js";import{an as k,S as B,a4 as L,eO as T,mz as j,f7 as K,kn as $,mA as M}from"./addresses-is-address-empty.Bn2lNY_L.js";import{i9 as x}from"./hydrate.DZ4YTm7p.js";let b=null,P=null;function G(e,r="",o,c){const[n,u]=w(({formatter:a,regionCode:s,phoneNumber:g},h)=>{switch(h.type){case"reset":return h.state;case"formatter":{const{PhoneNumberFormatter:m}=h,O=new m(s);return C(g,s,O,o)}case"phone":return C(h.phoneNumber,s,a)}},{phoneNumber:r,regionCode:e,loading:!0},({regionCode:a,phoneNumber:s})=>F(s,a,c,o));let{phoneNumber:p,regionCode:l,formatter:t}=n;const f=n.loading,i=v(r),d=v(e);if(i.current!==r||d.current!==e){const a=d.current!==e,s=/^\+\d/.test(r),g=!a&&s;i.current=r,d.current=e;const m=F(r,g?l??e:e,n.formatter);p=m.phoneNumber,l=m.regionCode,t=m.formatter,u({type:"reset",state:m})}A(()=>{let a=!0;return(async function(){if(t)return;const s=await D();a&&u({type:"formatter",PhoneNumberFormatter:s})})(),()=>{a=!1}},[t]);const N=_(a=>{t&&!/^\+\d/.test(a)&&t.updateRegionCode(e),u({type:"phone",phoneNumber:a})},[t,e]),S=_(a=>{t!=null&&(t.updateRegionCode(a),u({type:"phone",phoneNumber:`+${t.countryCode}${t.getNationalNumber(p)}`}))},[t,p]),y=E(()=>t==null?"+1":`+${t.getCountryCodeFromRegionCode(l??d.current)}`,[t,l]);return{loading:f,formattedNumber:p,formattedNumberValueObject:n.phoneNumberValueObject,regionCode:l,prefix:y,setPhoneNumber:N,selectCountry:S}}function D(){return P||(P=(async()=>{const{default:e}=await R(()=>I(()=>import("./component-PhoneNumberFormatter.6-emdPAH.js"),__vite__mapDeps([0,1])));return b=e,b})(),P)}function C(e,r,o,c){if(o==null)return{phoneNumber:e,phoneNumberValueObject:{value:e},regionCode:r,loading:!0};const n=o.format(e||(c?`+${o.countryCode}`:""));return{formatter:o,phoneNumber:n,phoneNumberValueObject:{value:n},regionCode:o?.regionCode,loading:!1}}function F(e,r,o,c){let n;return o?(o.updateRegionCode(r),n=o):n=b?new b(r):void 0,C(e,r,n,c)}function Y(){const{checkoutProtocolPresentedSignal:e}=k(),{checkout:r,router:o}=B(),{allViolations:c}=L(),n=T();return V(()=>{const u=o.currentUrl.value,l=u.searchParams.get(j)==="false",t=u.searchParams.get(K),f=r.latestReceipt.value,i=f?x(f):!1,N=c.value?.some(y=>$.has(y.code)),S=()=>n&&!e.value;return!!(t&&t!==M.PromptAllowed&&!l||u.searchParams.get("storefront_wallet")||N||S()||i)})}export{Y as a,G 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.