1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["74775c2e.l94WGfPU.js","89a70c1b.CH-xVS8e.js"])))=>i.map(i=>d[i]); 2import{_ as I}from"./app.BDuyPyLD.js";import{N as w,A as v,h as E,q as _,T as R,r as V,g as k}from"./2c1ab0fe.BqEHHmaW.js";import{aT as A,O as T,P as B,ey as L,mn as j,eS as K,k9 as $,mo as M}from"./4c290a1e.BmtxTAo1.js";import{hW as x}from"./164ad2e3.B-RZxMRs.js";let b=null,P=null;function W(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})}E(()=>{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]),y=_(a=>{t!=null&&(t.updateRegionCode(a),u({type:"phone",phoneNumber:`+${t.countryCode}${t.getNationalNumber(p)}`}))},[t,p]),S=R(()=>t==null?"+1":`+${t.getCountryCodeFromRegionCode(l??d.current)}`,[t,l]);return{loading:f,formattedNumber:p,formattedNumberValueObject:n.phoneNumberValueObject,regionCode:l,prefix:S,setPhoneNumber:N,selectCountry:y}}function D(){return P||(P=(async()=>{const{default:e}=await V(()=>I(()=>import("./74775c2e.l94WGfPU.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}=A(),{checkout:r,router:o}=T(),{allViolations:c}=B(),n=L();return k(()=>{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(S=>$.has(S.code)),y=()=>n&&!e.value;return!!(t&&t!==M.PromptAllowed&&!l||u.searchParams.get("storefront_wallet")||N||y()||i)})}export{Y as a,W 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.