PageSourceSearch

https://xtradegrok-flex.org/js/CM-4ZysQ.js?v=6d5203cb

js xtradegrok-flex.org collected 2026-10-08 16:19:09 UTC 28,276 bytes, 1 lines download raw bytes

1import{h as e,r as l,c as a,o as t,y as s,t as n,I as i,D as o,J as c,L as r,V as u,K as m,C as h,O as d,R as g,a1 as p,w as $,N as f,W as v,a8 as x,aa as L,A as w}from"./DdmQhDWx.js";import{H as y,u as k,f as b,i as E,I as D,J as I,K as C,L as _,M as A}from"./D-zbNKDM.js";import{o as M}from"./1lO56wOJ.js";const S={class:"gfug9zmymayky"},N={key:0,class:"x6n11"},P={class:"lx3et hima6m3"},T=["value"],U={class:"g17xt1lyh6"},R={class:"lx3et"},V={class:"odxpl4al2iww"},B=["value","placeholder"],F={class:"t3y7m065s7x1i"},W={class:"rkjp5"},j=["onClick"],H={class:"ya1s86"},K={class:"a01bzy"},z={key:1,class:"mjxa5ltp9lor1a"},G={key:2,class:"mjxa5ltp9lor1a"},O=e({__name:"PhoneInput",props:{modelValue:{},label:{},error:{},defaultCountry:{}},emits:["update:modelValue","country-change"],setup(e,{expose:C,emit:_}){const A=new Set(["IT","AT","IE","BE","PT"]),O=e,Z=_,q=y.map(e=>({code:e.iso.toUpperCase(),name:e.name,dialCode:e.code,iso:e.iso})),J=e=>e.length<=3?e:e.length<=6?`(${e.slice(0,3)}) ${e.slice(3)}`:e.length<=10?`(${e.slice(0,3)}) ${e.slice(3,6)}-${e.slice(6)}`:`(${e.slice(0,3)}) ${e.slice(3,6)}-${e.slice(6,10)}`,Q=e=>e.length<=2?e:e.length<=6?`${e.slice(0,2)} ${e.slice(2)}`:e.length<=10?`${e.slice(0,2)} ${e.slice(2,6)}-${e.slice(6)}`:`${e.slice(0,2)} ${e.slice(2,4)}-${e.slice(4,8)}-${e.slice(8,12)}`,Y=e=>e.length<=3?e:e.length<=6?`${e.slice(0,3)} ${e.slice(3)}`:e.length<=9?`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6)}`:`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6,9)}`,X=e=>e.length<=3?e:e.length<=6?`${e.slice(0,3)} ${e.slice(3)}`:e.length<=9?`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6)}`:`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6,9)}`,ee=e=>e.length<=2?e:e.length<=5?`${e.slice(0,2)} ${e.slice(2)}`:e.length<=9?`${e.slice(0,2)} ${e.slice(2,5)} ${e.slice(5)}`:`${e.slice(0,2)} ${e.slice(2,5)} ${e.slice(5,9)}`,le=e=>e.length<=2?e:e.length<=5?`${e.slice(0,2)} ${e.slice(2)}`:e.length<=7?`${e.slice(0,2)} ${e.slice(2,5)} ${e.slice(5)}`:e.length<=9?`${e.slice(0,2)} ${e.slice(2,5)} ${e.slice(5,7)} ${e.slice(7)}`:`${e.slice(0,2)} ${e.slice(2,5)} ${e.slice(5,7)} ${e.slice(7,9)}`,ae=e=>e.length<=4?e:e.length<=8?`${e.slice(0,4)} ${e.slice(4)}`:`${e.slice(0,4)} ${e.slice(4,8)}`,te=e=>e.length<=2?e:e.length<=4?`${e.slice(0,2)} ${e.slice(2)}`:e.length<=6?`${e.slice(0,2)} ${e.slice(2,4)} ${e.slice(4)}`:e.length<=8?`${e.slice(0,2)} ${e.slice(2,4)} ${e.slice(4,6)} ${e.slice(6)}`:`${e.slice(0,2)} ${e.slice(2,4)} ${e.slice(4,6)} ${e.slice(6,8)}`,se=e=>e.length<=3?e:e.length<=5?`${e.slice(0,3)} ${e.slice(3)}`:e.length<=7?`${e.slice(0,3)} ${e.slice(3,5)} ${e.slice(5)}`:e.length<=9?`${e.slice(0,3)} ${e.slice(3,5)} ${e.slice(5,7)} ${e.slice(7)}`:`${e.slice(0,3)} ${e.slice(3,5)} ${e.slice(5,7)} ${e.slice(7,9)}`,ne=e=>e.length<=3?e:e.length<=6?`${e.slice(0,3)} ${e.slice(3)}`:e.length<=10?`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6)}`:`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6,10)}`,ie={US:{placeholder:"(201) 555-0123",maxLength:14,format:J},CA:{placeholder:"(416) 555-0199",maxLength:14,format:J},MX:{placeholder:"55 1234 5678",maxLength:12,format:e=>e.length<=2?e:e.length<=6?`${e.slice(0,2)} ${e.slice(2)}`:e.length<=10?`${e.slice(0,2)} ${e.slice(2,6)} ${e.slice(6)}`:`${e.slice(0,2)} ${e.slice(2,6)} ${e.slice(6,10)}`},BR:{placeholder:"(11) 91234-5678",maxLength:16,format:e=>e.length<=2?e:e.length<=7?`(${e.slice(0,2)}) ${e.slice(2)}`:e.length<=11?`(${e.slice(0,2)}) ${e.slice(2,7)}-${e.slice(7)}`:`(${e.slice(0,2)}) ${e.slice(2,7)}-${e.slice(7,11)}`},AR:{placeholder:"9 11 2345-6789",maxLength:16,format:e=>e.startsWith("9")&&e.length>=11?`9 ${Q(e.slice(1,11))}`:e.startsWith("0")?new L("AR").input(e):Q(e.slice(0,12))},GB:{placeholder:"7911 123456",maxLength:11,format:e=>e.length<=4?e:e.length<=10?`${e.slice(0,4)} ${e.slice(4)}`:`${e.slice(0,4)} ${e.slice(4,10)}`},IE:{placeholder:"85 123 4567",maxLength:11,format:e=>e.length<=2?e:e.length<=5?`${e.slice(0,2)} ${e.slice(2)}`:e.length<=9?`${e.slice(0,2)} ${e.slice(2,5)} ${e.slice(5)}`:`${e.slice(0,2)} ${e.slice(2,5)} ${e.slice(5,9)}`},FR:{placeholder:"6 12 34 56 78",maxLength:14,format:e=>e.length<=1?e:e.length<=3?`${e.slice(0,1)} ${e.slice(1)}`:e.length<=5?`${e.slice(0,1)} ${e.slice(1,3)} ${e.slice(3)}`:e.length<=7?`${e.slice(0,1)} ${e.slice(1,3)} ${e.slice(3,5)} ${e.slice(5)}`:e.length<=9?`${e.slice(0,1)} ${e.slice(1,3)} ${e.slice(3,5)} ${e.slice(5,7)} ${e.slice(7)}`:`${e.slice(0,1)} ${e.slice(1,3)} ${e.slice(3,5)} ${e.slice(5,7)} ${e.slice(7,9)}`},ES:{placeholder:"612 345 678",maxLength:11,format:Y},PT:{placeholder:"912 345 678",maxLength:11,format:Y},IT:{placeholder:"312 345 6789",maxLength:14,format:e=>e.length<=3?e:e.length<=6?`${e.slice(0,3)} ${e.slice(3)}`:e.length<=10?`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6)}`:`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6,10)}`},DE:{placeholder:"151 23456789",maxLength:12,format:e=>e.length<=3?e:`${e.slice(0,3)} ${e.slice(3,11)}`},AT:{placeholder:"699 1234567",maxLength:11,format:e=>e.length<=3?e:e.length<=10?`${e.slice(0,3)} ${e.slice(3)}`:`${e.slice(0,3)} ${e.slice(3,10)}`},CH:{placeholder:"78 139 51 49",maxLength:12,format:le},NL:{placeholder:"6 1234 5678",maxLength:12,format:e=>e.length<=1?e:e.length<=5?`${e.slice(0,1)} ${e.slice(1)}`:e.length<=9?`${e.slice(0,1)} ${e.slice(1,5)} ${e.slice(5)}`:`${e.slice(0,1)} ${e.slice(1,5)} ${e.slice(5,9)}`},BE:{placeholder:"470 12 34 56",maxLength:12,format:se},NO:{placeholder:"412 34 567",maxLength:10,format:e=>e.length<=3?e:e.length<=5?`${e.slice(0,3)} ${e.slice(3)}`:e.length<=8?`${e.slice(0,3)} ${e.slice(3,5)} ${e.slice(5)}`:`${e.slice(0,3)} ${e.slice(3,5)} ${e.slice(5,8)}`},SE:{placeholder:"70 123 45 67",maxLength:12,format:le},DK:{placeholder:"20 12 34 56",maxLength:11,format:te},FI:{placeholder:"50 123 4567",maxLength:12,format:e=>e.length<=2?e:e.length<=5?`${e.slice(0,2)} ${e.slice(2)}`:e.length<=9?`${e.slice(0,2)} ${e.slice(2,5)} ${e.slice(5)}`:`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6,10)}`},PL:{placeholder:"512 345 678",maxLength:11,format:X},CZ:{placeholder:"601 123 456",maxLength:11,format:X},SK:{placeholder:"912 123 456",maxLength:11,format:X},HU:{placeholder:"20 123 4567",maxLength:11,format:ee},RO:{placeholder:"712 345 678",maxLength:11,format:X},BG:{placeholder:"48 123 4567",maxLength:11,format:ee},UA:{placeholder:"50 123 45 67",maxLength:12,format:le},RU:{placeholder:"(912) 345-67-89",maxLength:15,format:e=>e.length<=3?e:e.length<=6?`(${e.slice(0,3)}) ${e.slice(3)}`:e.length<=8?`(${e.slice(0,3)}) ${e.slice(3,6)}-${e.slice(6)}`:e.length<=10?`(${e.slice(0,3)}) ${e.slice(3,6)}-${e.slice(6,8)}-${e.slice(8)}`:`(${e.slice(0,3)}) ${e.slice(3,6)}-${e.slice(6,8)}-${e.slice(8,10)}`},GR:{placeholder:"691 234 5678",maxLength:12,format:ne},TR:{placeholder:"532 123 45 67",maxLength:13,format:e=>e.length<=3?e:e.length<=6?`${e.slice(0,3)} ${e.slice(3)}`:e.length<=8?`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6)}`:e.length<=10?`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6,8)} ${e.slice(8)}`:`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6,8)} ${e.slice(8,10)}`},IL:{placeholder:"50 123 4567",maxLength:11,format:ee},AE:{placeholder:"50 123 4567",maxLength:11,format:ee},SA:{placeholder:"50 123 4567",maxLength:11,format:ee},QA:{placeholder:"3312 4567",maxLength:9,format:ae},KW:{placeholder:"5001 2345",maxLength:9,format:ae},BH:{placeholder:"3600 1234",maxLength:9,format:ae},AU:{placeholder:"412 345 678",maxLength:11,format:e=>e.length<=3?e:e.length<=6?`${e.slice(0,3)} ${e.slice(3)}`:e.length<=9?`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6)}`:`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6,9)}`},NZ:{placeholder:"21 123 4567",maxLength:11,format:ee},JP:{placeholder:"90 1234 5678",maxLength:13,format:e=>e.length<=2?e:e.length<=6?`${e.slice(0,2)} ${e.slice(2)}`:e.length<=10?`${e.slice(0,2)} ${e.slice(2,6)} ${e.slice(6)}`:`${e.slice(0,2)} ${e.slice(2,6)} ${e.slice(6,10)}`},KR:{placeholder:"10 1234 5678",maxLength:13,format:e=>e.length<=2?e:e.length<=6?`${e.slice(0,2)} ${e.slice(2)}`:e.length<=10?`${e.slice(0,2)} ${e.slice(2,6)} ${e.slice(6)}`:`${e.slice(0,2)} ${e.slice(2,6)} ${e.slice(6,10)}`},CN:{placeholder:"131 2345 6789",maxLength:13,format:e=>e.length<=3?e:e.length<=7?`${e.slice(0,3)} ${e.slice(3)}`:e.length<=11?`${e.slice(0,3)} ${e.slice(3,7)} ${e.slice(7)}`:`${e.slice(0,3)} ${e.slice(3,7)} ${e.slice(7,11)}`},HK:{placeholder:"5123 4567",maxLength:9,format:ae},TW:{placeholder:"912 345 678",maxLength:11,format:X},SG:{placeholder:"8123 4567",maxLength:9,format:ae},MY:{placeholder:"12 345 6789",maxLength:12,format:e=>e.length<=2?e:e.length<=5?`${e.slice(0,2)} ${e.slice(2)}`:e.length<=9?`${e.slice(0,2)} ${e.slice(2,5)} ${e.slice(5)}`:`${e.slice(0,2)} ${e.slice(2,5)} ${e.slice(5,9)}`},TH:{placeholder:"81 234 5678",maxLength:11,format:ee},PH:{placeholder:"917 123 4567",maxLength:12,format:ne},ID:{placeholder:"812 345 6789",maxLength:12,format:ne},VN:{placeholder:"91 234 5678",maxLength:11,format:ee},IN:{placeholder:"98765 43210",maxLength:11,format:e=>e.length<=5?e:e.length<=10?`${e.slice(0,5)} ${e.slice(5)}`:`${e.slice(0,5)} ${e.slice(5,10)}`},ZA:{placeholder:"71 123 4567",maxLength:11,format:ee},KE:{placeholder:"712 345 678",maxLength:11,format:X},RE:{placeholder:"692 12 34 56",maxLength:12,format:se},GP:{placeholder:"690 12 34 56",maxLength:12,format:se},GF:{placeholder:"694 12 34 56",maxLength:12,format:se},MQ:{placeholder:"696 12 34 56",maxLength:12,format:se},NC:{placeholder:"75 12 34",maxLength:8,format:e=>e.length<=2?e:e.length<=4?`${e.slice(0,2)} ${e.slice(2)}`:e.length<=6?`${e.slice(0,2)} ${e.slice(2,4)} ${e.slice(4)}`:`${e.slice(0,2)} ${e.slice(2,4)} ${e.slice(4,6)}`},PF:{placeholder:"87 12 34 56",maxLength:11,format:te},MU:{placeholder:"5251 2345",maxLength:9,format:ae},GT:{placeholder:"5123 4567",maxLength:9,format:ae},PA:{placeholder:"6123 4567",maxLength:9,format:ae}},oe=M(),ce=k(),{locale:re}=b();function ue(){const e=ce.data?.customMessages;if(!e)return"Having trouble entering your phone number? Try again — we've removed the input restriction.";const l=re.value;return e[l]||e[l.split("-")[0]]||e.en||Object.values(e)[0]||""}const me=l(!1),he=l(!1),de=l(""),ge=l(q),pe=l(q.find(e=>e.iso===O.defaultCountry?.toLowerCase())||q.find(e=>"US"===e.code)||q[0]),$e=l({}),fe=l(null),ve=l(0),xe=l(!1),Le=l(""),we=l("");function ye(e){const l=e.target,a=l.value.replace(/[^\d+\-()\s–—]/g,"");Le.value=a,l.value=a,Z("update:modelValue",a)}const ke=a(()=>{const e=ie[pe.value?.code||"US"];return e?.placeholder||"Enter phone number"}),be=a(()=>{let e=we.value.replace(/\D/g,"");const l=pe.value?.dialCode||"+1";return"+1"===l&&e.startsWith("1")&&(e=e.replace(/^1+/,"")),["+33","+31","+44","+49","+61","+41","+81","+358"].includes(l)&&e.startsWith("0")&&(e=e.replace(/^0+/,"")),l+e}),Ee=a(()=>{const e=we.value.replace(/\D/g,"");if(!e)return"";const l=y.find(e=>e.iso===pe.value?.iso),a=pe.value?.iso,t=l?.minLength||8;if(e.length<t)return"";const s=pe.value?.dialCode||"";return E(s+e,a)?"":"Invalid phone number for this country"}),De=l(!1);function Ie(){if(!ce.isPhoneMaskFallbackEnabled)return;if(xe.value)return;if(De.value)return;const e=we.value.replace(/\D/g,""),l=Ce(pe.value?.code||"US");if(e.length<l)return;const a=(pe.value?.dialCode||"+1")+e;De.value=!0,I(a,pe.value?.iso).valid||(ve.value++,ve.value>=2&&(xe.value=!0,Le.value=we.value||"",he.value=!1,oe.notify({type:"warning",message:ue(),position:"top",timeout:5e3})))}function Ce(e){switch(e){case"AT":case"AR":return 13;case"IT":return 12;case"CN":case"BR":case"DE":return 11;case"IE":case"BE":case"FI":case"US":case"CA":case"GB":case"JP":case"KR":case"RU":case"TR":case"PH":case"ID":case"IN":case"MX":case"GR":default:return 10;case"AU":case"ES":case"FR":case"NL":case"MY":case"PL":case"SE":case"HU":case"BG":case"RO":case"CH":case"TH":case"UA":case"SA":case"AE":case"PT":case"SK":case"CZ":case"ZA":case"KE":case"TW":case"VN":case"NZ":case"IL":case"RE":case"GP":case"GF":case"MQ":return 9;
1case"NO":case"SG":case"QA":case"KW":case"DK":case"HK":case"BH":case"MU":case"PF":case"GT":case"PA":return 8;case"NC":return 6}}function _e(e,l){if(!e)return"";if(A.has(l))return new L(l).input(e);const a=ie[l];return a?.format?a.format(e):e.length<=3?e:e.length<=6?e.slice(0,3)+" "+e.slice(3):e.length<=10?e.slice(0,3)+" "+e.slice(3,6)+" "+e.slice(6):e.slice(0,3)+" "+e.slice(3,6)+" "+e.slice(6,10)}function Ae(e){e?.stopPropagation(),he.value=!he.value,he.value&&(de.value="",ge.value=q,Me(),w(()=>{Me()}))}function Me(){if(!fe.value)return;const e=fe.value.getBoundingClientRect(),l=window.innerHeight-e.bottom,a=e.top,t=l<200&&a>200,s=Math.min(320,window.innerWidth-24),n=Math.max(12,Math.min(e.left,window.innerWidth-s-12));$e.value={position:"fixed",width:`${s}px`,...t?{bottom:window.innerHeight-e.top+8+"px",top:"auto",maxHeight:`${Math.min(400,a-16)}px`}:{top:`${e.bottom+8}px`,bottom:"auto",maxHeight:`${Math.min(400,l-16)}px`},left:`${n}px`,zIndex:"99999",display:"block"}}function Se(e,l){const a=q.find(l=>l.iso===e);if(!a)return!1;const t=a.code!==pe.value?.code;pe.value=a,ve.value=0,De.value=!1;let s=l.replace(/\D/g,"");const n=Ce(a.code);return s.length>n&&(s=s.slice(0,n)),we.value=_e(s,a.code),t&&Z("country-change",a.iso),Ue(),!0}function Ne(e){if(xe.value)return;const l=e.clipboardData?.getData("text")??"";if(!l)return;const{isInternational:a,countryIso:t,nationalDigits:s}=D(l);if(a)if(e.preventDefault(),t)Se(t,s);else{const e=pe.value?.code||"US";let l=s.replace(/\D/g,"");const a=Ce(e);l.length>a&&(l=l.slice(0,a)),we.value=_e(l,e),Ue()}}function Pe(){const e=de.value.toLowerCase();ge.value=e?q.filter(l=>l.name.toLowerCase().includes(e)||l.dialCode.includes(e)||l.code.toLowerCase().includes(e)):q}function Te(e){const l=e.target,a=l.value;if(/^\s*(?:\+|00\d)/.test(a)&&a.replace(/\D/g,"").length>=8){const e=D(a);if(e.isInternational){if(e.countryIso)Se(e.countryIso,e.nationalDigits);else{const l=pe.value?.code||"US";let a=e.nationalDigits.replace(/\D/g,"");const t=Ce(l);a.length>t&&(a=a.slice(0,t)),we.value=_e(a,l),Ue()}return void(l.value=we.value)}}let t=a.replace(/\D/g,"");const s=pe.value?.dialCode||"+1";"+1"===s&&t.startsWith("1")&&(t=t.replace(/^1+/,"")),["+33","+31","+44","+49","+61","+41","+81","+358"].includes(s)&&t.startsWith("0")&&(t=t.replace(/^0+/,""));const n=pe.value?.code||"US",i=Ce(n),o=s.replace(/\D/g,"");t.length>i&&o&&t.startsWith(o)&&(t=t.slice(o.length)),t.length>i&&(t=t.slice(0,i));const c=we.value.replace(/\D/g,"");t.length!==c.length&&(De.value=!1);const r=_e(t,n);we.value=r,l.value=r,Ue(),t.length>=i&&Ie()}function Ue(){Z("update:modelValue",be.value)}function Re(e){if(xe.value)return;if(!ce.isPhoneMaskFallbackEnabled)return;const l=e.key;if(!/^\d$/.test(l))return;const a=we.value.replace(/\D/g,""),t=Ce(pe.value?.code||"US");a.length>=t&&Ie()}function Ve(){}function Be(){}function Fe(e){const l=e.target;l.closest(".phone-input-wrapper")||l.closest(".country-dropdown")||(he.value=!1)}function We(e){const l=(pe.value?.dialCode||"").replace(/\D/g,""),a=e.replace(/\D/g,"");return l&&a.startsWith(l)?a.slice(l.length):a}return t(()=>{me.value=!0,document.addEventListener("click",Fe),window.addEventListener("resize",Me),window.addEventListener("scroll",Me),O.modelValue&&(we.value=We(O.modelValue))}),s(()=>{document.removeEventListener("click",Fe),window.removeEventListener("resize",Me),window.removeEventListener("scroll",Me)}),n(()=>O.modelValue,e=>{e?e!==be.value&&(we.value=We(e)):we.value=""}),n(()=>O.defaultCountry,e=>{if(e){const l=q.find(l=>l.iso===e.toLowerCase());l&&l!==pe.value&&(pe.value=l,Z("country-change",l.iso),we.value&&(we.value=_e(we.value.replace(/\D/g,""),l.code)),Ue())}}),C({maskDisabled:xe}),(l,a)=>(o(),i("div",S,[e.label?(o(),i("label",N,r(e.label),1)):c("",!0),xe.value?(o(),i(u,{key:1},[m("div",P,[m("input",{value:Le.value,onInput:ye,type:"tel",name:"phone",autocomplete:"tel",placeholder:"Enter phone number",class:"dvixu7rhkv"},null,40,T)]),m("div",U,r(ue()),1)],64)):(o(),i(u,{key:2},[m("div",R,[m("div",{ref_key:"selectorRef",ref:fe,class:"likf3kkm086",onClick:Ae},[m("div",{class:d(["t4rck",{active:he.value}])},[m("span",{class:d(["iti__flag",`iti__${pe.value?.iso||"us"}`])},null,2),m("span",V,r(pe.value?.dialCode||"+1"),1),(o(),i("svg",{class:d(["y6jo52kmjh",{rotate:he.value}]),width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},[...a[3]||(a[3]=[m("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])],2))],2)],512),m("input",{value:we.value,type:"tel",name:"phone",autocomplete:"tel",placeholder:ke.value,onInput:Te,onPaste:Ne,onKeydown:Re,onFocus:Ve,onBlur:Be,class:"dvixu7rhkv"},null,40,B)]),me.value?(o(),h(x,{key:0,to:"#q-app"},[he.value?(o(),i("div",{key:0,class:"m5ac0s05",style:p($e.value),onClick:a[2]||(a[2]=g(()=>{},["stop"]))},[m("div",F,[$(m("input",{"onUpdate:modelValue":a[0]||(a[0]=e=>de.value=e),type:"text",placeholder:"Search countries...",onClick:a[1]||(a[1]=g(()=>{},["stop"])),onInput:Pe},null,544),[[f,de.value]])]),m("div",W,[(o(!0),i(u,null,v(ge.value,e=>(o(),i("div",{key:e.code,onClick:l=>function(e){pe.value=e,he.value=!1,Z("country-change",e.iso),ve.value=0,we.value&&(we.value=_e(we.value.replace(/\D/g,""),e.code)),Ue(),de.value=""}(e),class:d(["lq1x2az0yno",{active:e.code===pe.value?.code}])},[m("span",{class:d(["iti__flag",`iti__${e.iso}`])},null,2),m("span",H,r(e.name),1),m("span",K,r(e.dialCode),1)],10,j))),128))])],4)):c("",!0)])):c("",!0),Ee.value?(o(),i("div",z,r(Ee.value),1)):e.error?(o(),i("div",G,r(e.error),1)):c("",!0)],64))]))}}),Z={class:"n102nzmq"},q={class:"nmn30bttj"},J=["placeholder"],Q=["onMousedown","onMouseenter"],Y={key:0,class:"sl30d3np8ea"},X=e({__name:"EmailInput",props:{modelValue:{},label:{},error:{},required:{type:Boolean},errorMessages:{}},emits:["update:modelValue","blur"],setup(e,{expose:L,emit:y}){const k=e,E=y,{locale:D}=b(),I={"en-US":{domains:["gmail.com","hotmail.com","yahoo.com","outlook.com","icloud.com"],placeholder:"[email protected]"},"en-GB":{domains:["gmail.com","hotmail.co.uk","yahoo.co.uk","outlook.com","icloud.com"],placeholder:"[email protected]"},"en-IE":{domains:["gmail.com","hotmail.com","eircom.net","outlook.com","icloud.com"],placeholder:"[email protected]"},"en-CA":{domains:["gmail.com","hotmail.ca","yahoo.ca","outlook.com","icloud.com"],placeholder:"[email protected]"},"en-AU":{domains:["gmail.com","hotmail.com.au","outlook.com","bigpond.c
1om","icloud.com"],placeholder:"[email protected]"},"de-AT":{domains:["gmail.com","gmx.at","a1.net","hotmail.com","outlook.com"],placeholder:"[email protected]"},"es-ES":{domains:["gmail.com","hotmail.es","yahoo.es","outlook.es","terra.es"],placeholder:"[email protected]"},"fr-FR":{domains:["gmail.com","orange.fr","free.fr","hotmail.fr","laposte.net"],placeholder:"[email protected]"},"nl-NL":{domains:["gmail.com","hotmail.nl","ziggo.nl","xs4all.nl","live.nl"],placeholder:"[email protected]"},"no-NO":{domains:["gmail.com","hotmail.no","online.no","start.no","c2i.net"],placeholder:"[email protected]"},"ja-JP":{domains:["gmail.com","yahoo.co.jp","docomo.ne.jp","ezweb.ne.jp","softbank.ne.jp"],placeholder:"[email protected]"},"ko-KR":{domains:["gmail.com","naver.com","daum.net","hanmail.net","nate.com"],placeholder:"[email protected]"},"ms-MY":{domains:["gmail.com","hotmail.com","yahoo.com","outlook.com","icloud.com"],placeholder:"[email protected]"}},C={maxLength:254,maxLocalPartLength:64,maxDomainLength:253,minLength:5,maxTldLength:4,minTldLength:2,pattern:/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,4}$/,invalidPatterns:[/^\.+/,/\.+$/,/\.{2,}/,/@\.+/,/\.+@/,/@.*@/,/\s/,/[<>()[\]\\,;:"]/]},_=l(),A=l(k.modelValue||""),M=l(!1),S=l([]),N=l(-1),P=l(!1),T=l({}),U=l(!1),R=a(()=>I[D.value]||I["en-US"]),V=a(()=>k.error?k.error:P.value?W():""),B=a(()=>!!V.value&&P.value);function F(e){if(!e||0===e.trim().length)return[];const l=R.value;if(-1===e.indexOf("@"))return e.length>=2&&l?l.domains.slice(0,5).map(l=>`${e}@${l}`):[];const[a,t]=e.split("@");if(!a||0===a.length)return[];const s=l?.domains||[];return(t&&t.length>0?s.filter(e=>e.toLowerCase().startsWith(t.toLowerCase())):s).slice(0,5).map(e=>`${a}@${e}`)}function W(){const e=A.value.trim();if(!e)return k.required?k.errorMessages?.required||"Email is required":"";if(e.length<C.minLength)return k.errorMessages?.minLength||"Email is too short";if(e.length>C.maxLength)return k.errorMessages?.maxLength||"Email is too long";for(const i of C.invalidPatterns)if(i.test(e))return k.errorMessages?.invalidEmail||"Invalid email format";const l=e.indexOf("@");if(-1===l||0===l||l===e.length-1)return k.errorMessages?.invalidEmail||"Invalid email format";const a=e.substring(0,l),t=e.substring(l+1);if(a.length>C.maxLocalPartLength)return k.errorMessages?.invalidEmail||"Email local part is too long";if(t.length>C.maxDomainLength)return k.errorMessages?.invalidEmail||"Email domain is too long";if(!t.includes(".")||t.startsWith(".")||t.endsWith("."))return k.errorMessages?.invalidEmail||"Invalid domain format";const s=t.split("."),n=s[s.length-1];if(!n||n.length<C.minTldLength||n.length>C.maxTldLength)return k.errorMessages?.invalidEmail||"Invalid top-level domain";if(!/^[a-zA-Z]+$/.test(n))return k.errorMessages?.invalidEmail||"Top-level domain must contain only letters";for(const i of s){if(!i||0===i.length)return k.errorMessages?.invalidEmail||"Invalid domain format";if(i.startsWith("-")||i.endsWith("-"))return k.errorMessages?.invalidEmail||"Domain parts cannot start or end with hyphen"}return C.pattern.test(e)?"":k.errorMessages?.invalidEmail||"Invalid email format"}function j(e){e&&(A.value=e,E("update:modelValue",e),M.value=!1,_.value?.focus())}function H(){if(!_.value||!M.value)return;const e=_.value.getBoundingClientRect();T.value={position:"fixed",top:`${e.bottom+2}px`,left:`${e.left}px`,width:`${e.width}px`,zIndex:99999}}function K(e){let l=e.target.value;l.length>C.maxLength&&(l=l.slice(0,C.maxLength));const a=l.trim();a!==l&&l.length>0&&(l=a);const t=l.indexOf("@");if(-1!==t){const e=l.substring(0,t+1),a=l.substring(t+1);if(a.includes(".")){const t=a.split("."),s=t.length-1;t[s]&&(t[s]=t[s].replace(/[0-9]/g,"").slice(0,C.maxTldLength)),l=e+t.join(".")}}A.value=l,E("update:modelValue",l),S.value=F(l),S.value.length>0&&(M.value=!0,w(H))}function z(){S.value=F(A.value),S.value.length>0&&(M.value=!0,w(H))}function G(){setTimeout(()=>{M.value=!1,P.value=!0,E("blur")},150)}function O(e){if(M.value&&S.value.length>0)switch(e.key){case"ArrowDown":e.preventDefault(),N.value=Math.min(N.value+1,S.value.length-1);break;case"ArrowUp":e.preventDefault(),N.value=Math.max(N.value-1,-1);break;case"Enter":case"Tab":N.value>=0&&(e.preventDefault(),j(S.value[N.value]));break;case"Escape":M.value=!1}if(["<",">","(",")","[","]","\\",",",";
1",":",'"'," "].includes(e.key)&&e.preventDefault(),A.value.length>=C.maxLength&&1===e.key.length&&!["Backspace","Delete","Tab","Enter","ArrowLeft","ArrowRight","Home","End"].includes(e.key)&&e.preventDefault(),1===e.key.length){const l=e.target.selectionStart||0,a=A.value.indexOf("@");if(-1!==a&&l>a){const t=A.value.substring(a+1,l),s=t.lastIndexOf(".");if(-1!==s){const l=t.substring(s+1);(/[0-9]/.test(e.key)||l.length>=C.maxTldLength)&&e.preventDefault()}}}}function X(){H()}return n(()=>k.modelValue,e=>{e!==A.value&&(A.value=e)}),t(()=>{U.value=!0,window.addEventListener("resize",X),window.addEventListener("scroll",H,!0)}),s(()=>{window.removeEventListener("resize",X),window.removeEventListener("scroll",H,!0)}),L({isValid:()=>!W(),validate:()=>(P.value=!0,!W())}),(l,a)=>(o(),i("div",Z,[m("div",q,[$(m("input",{ref_key:"emailInput",ref:_,"onUpdate:modelValue":a[0]||(a[0]=e=>A.value=e),type:"email",placeholder:e.label,class:d(["iabgmqz1kictu",{error:B.value}]),onInput:K,onFocus:z,onBlur:G,onKeydown:O,autocomplete:"off",maxlength:"254"},null,42,J),[[f,A.value]]),U.value?(o(),h(x,{key:0,to:"#q-app"},[M.value&&S.value.length>0?(o(),i("div",{key:0,ref:"suggestionsDropdown",class:"ikax314rso4",style:p(T.value)},[(o(!0),i(u,null,v(S.value,(e,l)=>(o(),i("div",{key:l,class:d(["tt67drn2oy",{highlighted:l===N.value}]),onMousedown:g(l=>j(e),["prevent"]),onMouseenter:e=>N.value=l},r(e),43,Q))),128))],4)):c("",!0)])):c("",!0)]),B.value?(o(),i("p",Y,r(V.value),1)):c("",!0)]))}});function ee(e,l){try{if("undefined"==typeof window)return;const a=window,t=a.__an?.g;if(!t)return;const s=a[t];"function"==typeof s&&s(e,l)}catch{}}const le=new class{async getClientInfo(){const e=new URLSearchParams(window.location.search);let l="",a=null;try{const e=C("geo-locale","/api/geo-locale"),t=await _(e);t.success&&(l=t.data.ip||"",a=t.data.leadInfo||null)}catch{l=""}const t=function(){try{if("undefined"==typeof document)return null;const e=window.__an,l={},a=e=>{if(!e)return"";for(const l of document.cookie.split(";")){const a=l.indexOf("=");if(a<0)continue;if(l.slice(0,a).trim()!==e)continue;const t=l.slice(a+1).trim();return/^[A-Za-z0-9_-]{16,48}$/.test(t)?t:""}return""},t=a(e?.v),s=a(e?.s);t&&(l.vid=t),s&&(l.sid=s);const n=new URLSearchParams(window.location.search),i=n.get("gclid")||n.get("gbraid")||n.get("wbraid")||"";return i&&(l.gclid=i.slice(0,200)),Object.keys(l).length?l:null}catch{return null}}();return t&&(a={...a||{},...t}),{domain:window.location.hostname,page:window.location.pathname,source:"website_form",utm_source:e.get("utm_source")||"",utm_medium:e.get("utm_medium")||"",utm_campaign:e.get("utm_campaign")||"",utm_term:e.get("utm_term")||"",utm_content:e.get("utm_content")||"",ip:l,leadInfo:a}}formatPhoneNumber(e,l){if(!e)return"";const a=I(e,l);if(a.valid&&a.e164)return a.e164;let t=e.replace(/[^\d+]/g,"");return t=t.startsWith("+")?"+"+e.replace(/[^\d]/g,""):e.replace(/[^\d]/g,""),t}isValidEmail(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}isValidPhone(e,l){return!!e&&E(e,l)}async validateFormData(e,l=!1){const a=[],{firstName:t,lastName:s,email:n,phone:i,country_code:o}=e;return n&&!this.isValidEmail(n)&&a.push({field:"email",message:"Valid email format is required"}),l||!i||this.isValidPhone(i,o)||a.push({field:"phone",message:"Valid phone format is required"}),t&&"Не указано"!==t&&""!==t.trim()||a.push({field:"firstName",message:"First name is required"}),s&&""!==s.trim()||a.push({field:"lastName",message:"Last name is required"}),{isValid:0===a.length,errors:a}}async processFormSubmission(e,l="en-US",a,t=!1){try{const s=await this.getClientInfo(),n=this.formatPhoneNumber(e.phone||"",a),i={firstName:e.firstName||"",lastName:e.lastName||"",email:e.email||"",phone:n,message:e.message||"",company:e.company||"",locale:l,country_code:a||"",...s,...Object.keys(e).filter(e=>!["firstName","lastName","email","phone","message","company"].includes(e)).reduce((l,a)=>(l[a]=e[a],l),{})},o=await this.validateFormData(i,t);if(!o.isValid)return ee("ferr",{k:"valid",f:o.errors.map(e=>e.field).filter(Boolean).slice(0,5).join(","),m:o.errors.map(e=>e.message).join("; ").slice(0,140)}),{success:!1,message:o.errors.map(e=>e.message).join(", ")};const c="undefined"!=typeof window&&!0===window.__E2E_TEST__,r=c?"/api/leads/test":"/api/leads",u=c?{...i,firstName:"test",lastName:"test"}:i,m=await A.post(r,u);return c||ee("fok"),m.data?{success:!0,id:m.data.leadId||m.data.id||`sub_${Date.now()}`,message:m.data.message||"Form submitted successfully",redirectUrl:m.data.redirectUrl||null,leadId:m.data.leadId}:{success:!0,message:"Form submitted successfully",id:`sub_${Date.now()}`}}catch(s){if(s.response){const e=s.response.status,l=s.response.data;return 500===e&&l?.message&&(l.message.includes("invalid status code")||l.message.includes("json is not a function")||l.message.includes("Called reply with an invali
1d status code"))?{success:!0,message:"Form submitted successfully",id:`sub_${Date.now()}`}:(ee("ferr",{k:"http",s:e,m:String(l?.message||l?.error||"").slice(0,140),f:Array.isArray(l?.errors)?l.errors.map(e=>e?.field||e?.property).filter(Boolean).slice(0,5).join(","):void 0}),{success:!1,message:l?.message||`Server error: ${e}`})}return s.message&&s.message.includes("Called reply with an invalid status code")?{success:!0,message:"Form submitted successfully",id:`sub_${Date.now()}`}:(ee("ferr",{k:"net",m:String(s?.code||s?.message||"network").slice(0,140)}),{success:!1,message:"Network error. Please check your connection and try again."})}}};export{X as _,O as a,le as f,ee as t};

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.