PageSourceSearch

https://gioia.ai/cdn/shopifycloud/checkout-web/assets/c1/47b970b2.B0ETP_eT.js

js gioia.ai collected 2026-10-05 12:06:52 UTC 3,935 bytes, 1 lines download raw bytes

1import{o as e,h as n,u as t,m as r,z as o,g as a,q as c,S as s}from"./2c1ab0fe.XVnTovwp.js";import{_ as u}from"./app.Bke-0Cv3.js";import{a as i}from"./f67abd2c.DYpmk7mw.js";import{T as l,a0 as m,S as d}from"./164ad2e3.hrg71Gqs.js";import{u as f}from"./a9fa9fda.DndAb0hJ.js";import{a as g}from"./22345fd4.DGbyKJ7j.js";var p={FlagIcon:"sgqviy0 _1fragem5u _1fragemve _1fragemvo",sizeVariant:{base:"sgqviy1",small:"sgqviy2"}};function v({accessibilityLabel:o,countryCode:a,size:c}){const s=e(void 0);n(()=>{let e=!1;return async function(){const{ALL_FLAG_ICON_BY_COUNTRY_CODE:n}=await u(async()=>{const{ALL_FLAG_ICON_BY_COUNTRY_CODE:e}=await(import("./13fd900f.BGrsw7az.js"));return{ALL_FLAG_ICON_BY_COUNTRY_CODE:e}},[]);e||(s.value={countryCode:a,src:n[a]})}().catch(()=>{e||(s.value={countryCode:a,src:void 0})}),()=>{e=!0}},[a,s]);const i=s.value?.countryCode===a?s.value.src:void 0;return t("img",{alt:o??"",className:r(p.FlagIcon,c&&p.sizeVariant[c]),src:i??"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20640%20480'/%3E",role:"img"})}function C(e){return e.replace(/[^+\d]/g,"")}const h=/[()\-._ ]+/g,_="text";function y({countryCode:e,value:s,onChange:u,onFocus:l,onInput:f,disableFormatting:p=!1,hideCountries:h=!1,prefillCountryCode:y,requireCountryCode:L=!1,onInputValueChange:O,onSelectedCountryChange:E,caretPosition:F,accessoryEnd:I,autocomplete:x="tel",onBlur:A,required:j,type:B,icon:P,...T}){const q=null==s?void 0:s,{i18n:z}=i(),[U,R]=o(!1),V=a(null),Y=a(!1),D=g(e,q,y||L),{formattedNumber:$,formattedNumberValueObject:G,regionCode:S,prefix:K,loading:M}=D,k=$.replace(/\D/g,"").length<4;n(()=>{if(Y.current){Y.current=!1;const e=C($);f?.(e),u?.(e)}},[$,u,f]);const H=r("Ls4zP",U&&"gqw6M"),W=!h&&S&&$&&$.length>1,Z=S??e;n(()=>{Z!==e&&E?.(Z.toUpperCase(),$)},[E,Z,e,$]);const J=c(e=>{u?.(C(e))},[u]),Q=!M&&(W||L)&&!k&&t("div",{className:H,children:[t("div",{className:"wTRvB",children:t(v,{countryCode:Z.toLowerCase(),accessibilityLabel:Z.toUpperCase()})}),t(m,{type:"chevron-down",size:"small-200",tone:U?"accent":void 0}),t("select",{"aria-label":z.translate("contact.phone_country_code_label"),className:"KHvfK",value:Z.toUpperCase(),onBlur:()=>R(!1),onFocus:()=>R(!0),name:"phone_country_select",onChange:e=>{Y.current=!0,D.selectCountry(e.target.value),V.current&&V.current.focus()},children:t(w,{})})]}),X=a(null),ee=(I||Q)&&t(d,{direction:"inline",gap:"base",alignItems:"center",children:[I,Q]});return{...T,icon:"mobile"===B?"mobile":P,onChange:u&&J,required:j||L,onInputCommit:e=>{const n=function(e){return L&&!e.includes("+")?`${K}${e}`:e}(e);V?.current&&V.current.value!==n&&(V.current.value=n);const t=C(n),r=V?.current?.selectionEnd||0,o=C(n.slice(0,r));null!=X.current&&clearTimeout(X.current),X.current=setTimeout(()=>{const e=V.current?.type;"tel"!==e&&e!==_||V.current?.value&&N(function(e,n){let t=0,r=e;for(const o of n){if(!r&&!b(o))break;o===r[0]&&(r=r.substring(1)),t++}return t}(o,V.current.value),V.current)}),p?(O?.(n,r),f?.(n)):t!==C($)&&(O?.(t,r),f?.(t)),(/[a-zA-Z]/.test(n)||t!==C($))&&D.setPhoneNumber(t)},ref:V,autocomplete:x,value:q,controlledValue:p?void 0:G,onFocus:()=>{void 0!==F&&V.current&&void 0!==q&&F<q.length&&N(F,V.current),l?.()},accessoryEnd:ee||void 0,type:p?_:"tel",name:T.name??"phone",onBlur:A}}function b(e){return e.search(h)>-1}function N(e,n){document.activeElement===n&&(n.focus(),n.setSelectionRange(e,e))}function L(e){const n=y(e);return t(l,{...n})}function w(){const{fetchCountriesWithPhoneNumberPrefix:e}=f(),[r,a]=o([]),{observability:c,i18n:{locale:u}}=i();return n(()=>{e(u).then(e=>{a(e)}).catch(e=>{c.log("atlas_fetch_countries_error",`Unable to fetch countries with phone number prefix: ${e.name}: ${e.message}`,{errorName:e.name,errorMessage:e.message,locale:u})})},[e,u,c]),t(s,{children:r.map(({code:e,name:n,phoneNumberPrefix:r})=>t("option",{value:e,children:[n,"(+",r,")"]},e))})}export{v as F,L as P,C as s,y 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.