1"use strict";(globalThis.webpackChunklightspeed_marketing=globalThis.webpackChunklightspeed_marketing||[]).push([[17,155,1219,4021,4477,6297,6355,7632,8619,8626],{76473(e,t,r){r.r(t),r.d(t,{default:()=>o});var n=r(96540);function o({message:e,showErrorMsg:t,errorId:r}){const[o,l]=(0,n.useState)(null);return(0,n.useEffect)(()=>{t&&e&&l(!0)},[t,e]),n.createElement(n.Fragment,null,o?n.createElement("span",{className:"".concat("tw:block tw:relative tw:right-0 tw:left-0 tw:text-xs tw:text-yellow-44 tw:bg-yellow-96 tw:border-2 tw:border-solid tw:border-alert-warning tw:rounded-md tw:w-full tw:text-center tw:z-1 tw:px-1.5"," ").concat("tw:before:content=[''] tw:before:absolute tw:before:left-[calc(50%-10px)] tw:before:right-[initial] tw:before:top-[-10px] tw:before:w-0 tw:before:h-0 tw:before:border-b-10 tw:before:border-b-solid tw:before:border-b-alert-warning tw:before:border-l-10 tw:before:border-l-solid tw:before:border-l-transparent tw:before:border-r-10 tw:before:border-r-solid tw:before:border-r-transparent"," ").concat(t&&e?"tw:animate-label-error-in":"tw:animate-label-error-out"),onAnimationEnd:e=>(e=>{"label-error-out"===e.animationName&&l(!1)})(e),id:r,dangerouslySetInnerHTML:{__html:e||""}}):null)}},77791(e,t,r){r.r(t),r.d(t,{default:()=>i});var n=r(96540),o=r(89458),l=r(68197),a=r(76473);function i({children:e,raiseLabel:t,isFieldValid:r,showErrorMsg:i,className:c,errorMsg:u,uniqueID:d,errorId:s}){const{type:f,name:m,required:b}=(0,n.useContext)(o.FieldConfigContext),{label:v}=(0,n.useContext)(l.LexicDataContext);return"checkbox"===f?n.createElement("div",{className:"gb-checkbox__container gb-checkbox__container--left"},n.createElement("div",{className:"gb-checkbox__fields gb-checkbox__fields--left"},n.createElement("div",{className:"tw:flex","data-formfield":"ls-form-field"},e,n.createElement("label",{className:"gb-checkbox__text text-left",htmlFor:"id_".concat(m,"_").concat(d)},v,b&&n.createElement("span",{className:"gb-checkbox__text--required"},"*"))))):n.createElement("div",{className:"gb-form__field gb-form__field-".concat(m," ").concat(null===r?"":"js-validated"," ").concat(c||"")},n.createElement("div",{className:"tw:relative tw:z-3"},e,n.createElement("label",{className:"gb-form__field-label tw:transform-(top) tw:transition-240 tw:transition-[cubic-bezier(0,.6,.6,1)] ".concat(t?"js-raised tw:top-1":"tw:top-[calc(50%-9px)]"),htmlFor:"id_".concat(m)},v)),n.createElement("div",{className:"gb-form__field-background tw:z-2"}),n.createElement(a.default,{message:u,showErrorMsg:i||!1,errorId:s}))}},30867(e,t,r){r.r(t),r.d(t,{default:()=>h});var n=r(96540),o=r(89458),l=r(67706),a=r(68197),i=r(1187),c=r(66135),u=r(96503),d=r(77791),s=r(39452),f=r(67024),m=r(35038),b=r(2567),v=r(96363);const g={en:b.en,fr:b.fr,nl:b.nl,no:b.no,es:b.es,de:b.de},w=()=>{var e,t;const r=null===(e=document.querySelector("html"))||void 0===e||null===(t=e.getAttribute("lang"))||void 0===t?void 0:t.slice(0,2);return r&&g[r]?g[r]:b.en},p=async()=>{try{return await r.e(6564).then(r.bind(r,24183))}catch(e){(0,f.Y)().logError(e,{searchTerm:"phone-library-init-error",tags:["forms","ui"],fileName:"PhoneTextInput.tsx",additionalData:{url:window.location.href}})}};function h(){var e,t,r;const{name:f,validation:b}=(0,n.useContext)(o.FieldConfigContext),{placeholder:g,error:h}=(0,n.useContext)(a.LexicDataContext),{isFormValidating:x,setInvalidFields:_}=(0,n.useContext)(l.FormSubmissionContext),E=(0,n.useRef)(null),C=(0,n.useRef)(null),N=(0,u.default)(f,null===(e=E.current)||void 0===e?void 0:e.getInput()),[I,k]=(0,n.useState)(N||""),[y,F]=(0,n.useState)(I.length>0),[M,V]=(0,n.useState)(null),[S,D]=(0,n.useState)(!1),{clearCustomError:L,setCustomError:T,errorMessage:j}=(0,i.default)({inputElement:null!==(t=null===(r=E.current)||void 0===r?void 0:r.getInput())&&void 0!==t?t:null,errorMsgObj:{default:h}}),q=()=>{var e,t;const r=null===(e=E.current)||void 0===e?void 0:e.getInstance(),n=null===(t=E.current)||void 0===t?void 0:t.getInput();if(L(),E.current&&r)if(C.current)V(!!r.isValidNumber()||null);else{if(null===C.current&&n){const e=r.isValidNumber()||n.checkValidity();return void V(!!e||null)}V(r.isValidNumber()),!r.isValidNumber()&&T()}},z=(0,c.default)(q),G=(0,n.useRef)(!0);(0,n.useEffect)(()=>{var e;!y&&I.length>0&&F(!0);const t=document.activeElement!==(null===(e=E.current)||void 0===e?void 0:e.getInput());return G.current&&I?(q(),void(G.current=!1)):t&&I?(q(),void(0,v.default)(null===(r=E.current)||void 0===r||null===(n=r.getInstance())||void 0===n?void 0:n.isValidNumber(),null===(o=E.current)||void 0===o?void 0:o.getInput())):void z();var r,n,o},[I]),(0,n.useEffect)(()=>{var e;const t=null===(e=E.current)||void 0===e?void 0:e.getInput();x&&t&&(!1===M?_(t):null===M&&(T(),V(!1),_(t)))},[x,M]);const O="".concat(f,"-error-message");return n.createElement("div",{className:"tw:relative tw:z-4"},n.createElement(d.default,{raiseLabel:y,isFieldValid:M,showErrorMsg:S,errorMsg:j,errorId:O},n.createElement(m.A,{ref:E,initialValue:I,onChangeNumber:e=>k(e),inputProps:{id:"id_".concat(f),name:f,type:"tel",placeholder:g,required:!0,pattern:b.pattern,maxLength:b.maxLength,autoComplete:b.autocomplete||"tel",onInvalid:e=>e.preventDefault(),onFocus:()=>(null===C.current&&(C.current=!0),F(!0),void D(!0)),onBlur:e=>(e=>{var t,r;C.current&&(C.current=!1),F(e.target.value.length>0),D(!1),q(),(0,v.default)(null===(t=E.current)||void 0===t||null===(r=t.getInstance())||void 0===r?void 0:r.isValidNumber(),e.target)})(e),"aria-invalid":null===M?void 0:!M,"aria-errormessage":!1===M?O:void 0},initOptions:{loadUtils:p,i18n:w(),hiddenInput:e=>({phone:e,country_code:w()}),allowDropdown:!0,fixDropdownWidth:!1,separateDialCode:!0,initialCountry:null!==(R=null===(A=(new s.N).getCookie("geoConfig"))||void 0===A||null===(U=A.country_code)||void 0===U?void 0:U.toLowerCase())&&void 0!==R?R:"us"}})));var R,A,U}},89458(e,t,r){r.r(t),r.d(t,{FieldConfigContext:()=>n});const n=(0,r(96540).createContext)({})},67706(e,t,r){r.r(t),r.d(t,{FormSubmissionContext:()=>n});const n=(0,r(96540).createContext)({})},68197(e,t,r){r.r(t),r.d(t,{LexicDataContext:()=>n});const n=(0,r(96540).createContext)({})},1187(e,t,r){r.r(t),r.d(t,{default:()=>o});var n=r(96540);function o({inputElement:e,errorMsgObj:t}
1){const[r,o]=(0,n.useState)("");return{clearCustomError:()=>{e&&(e.setCustomValidity(""),o(""))},setCustomError:(r="default")=>{if(e){const n=t[r];return e.setCustomValidity(n),o(n),n}},errorMessage:r}}},66135(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(96540),o=r(2543);function l(e){const t=(0,n.useMemo)(()=>(0,o.debounce)(()=>{e()},700),[e]);return(0,n.useEffect)(()=>()=>{t.cancel()},[t]),t}},96503(e,t,r){r.r(t),r.d(t,{default:()=>i});var n=r(96540),o=r(99243),l=r(21489),a=r(81785);function i(e,t){const r=(0,n.useRef)(!1),i=(e=>"estimated_annual_gtv"===e?"gtv":e)(e),c=function(e){const t=(0,l._G)(e);return null!=t?t:null}(i);return(0,n.useEffect)(()=>{if(c&&!r.current){const e=t?t.form:null;e&&(r.current=!0),((e,t)=>{if(!e)return;const r=new o.GU(e);a.d.sendEvent(r.getFormGTMObject("field_autocompleted","completed",t))})(e,i)}},[t]),c}},96363(e,t,r){r.r(t),r.d(t,{default:()=>a});var n=r(99243),o=r(94229),l=r(81785);const a=(e,t)=>{if(!t)return;const r=t.closest("form");if(!r)return;const a=new n.GU(r);l.d.sendEvent(a.getFormGTMObject(e?"field_completed":"field_validation_error",(0,o.Y)(t),t.name))}}}]); 2//# sourceMappingURL=forms-react-shared-Components-PhoneInput-PhoneInput.chunk.258c361d1a7507875e86.js.map
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.