PageSourceSearch

https://www.lightspeedhq.com/wp-content/themes/ls/dist/js/forms-re…put-TextInput.chunk.5419010b595a2aed26db.js

js lightspeedhq.com collected 2026-10-09 21:34:11 UTC 6,187 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunklightspeed_marketing=globalThis.webpackChunklightspeed_marketing||[]).push([[17,1219,4021,4477,6297,6355,7489,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,a]=(0,n.useState)(null);return(0,n.useEffect)(()=>{t&&e&&a(!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&&a(!1)})(e),id:r,dangerouslySetInnerHTML:{__html:e||""}}):null)}},77791(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(96540),o=r(89458),a=r(68197),l=r(76473);function c({children:e,raiseLabel:t,isFieldValid:r,showErrorMsg:c,className:i,errorMsg:s,uniqueID:u,errorId:d}){const{type:f,name:m,required:b}=(0,n.useContext)(o.FieldConfigContext),{label:g}=(0,n.useContext)(a.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(u)},g,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(i||"")},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)},g)),n.createElement("div",{className:"gb-form__field-background tw:z-2"}),n.createElement(l.default,{message:s,showErrorMsg:c||!1,errorId:d}))}},60841(e,t,r){r.r(t),r.d(t,{default:()=>f});var n=r(96540),o=r(89458),a=r(67706),l=r(68197),c=r(1187),i=r(66135),s=r(96503),u=r(77791),d=r(96363);function f(){const{name:e,validation:t,required:r}=(0,n.useContext)(o.FieldConfigContext),{placeholder:f,error:m}=(0,n.useContext)(l.LexicDataContext),{isFormValidating:b,setInvalidFields:g}=(0,n.useContext)(a.FormSubmissionContext),w=(0,n.useRef)(null),v=(0,n.useRef)(null),x=(0,s.default)(e,w.current),[h,_]=(0,n.use
1State)(x||""),[p,E]=(0,n.useState)(h.length>0),[C,k]=(0,n.useState)(null),[F,M]=(0,n.useState)(!1),{clearCustomError:N,setCustomError:y,errorMessage:L}=(0,c.default)({inputElement:w.current,errorMsgObj:{default:m}}),V=()=>{N(),w.current&&(v.current||null===v.current?k(!!w.current.checkValidity()||null):(k(w.current.checkValidity()),!w.current.checkValidity()&&y()))},S=(0,i.default)(V),I=(0,n.useRef)(!0);(0,n.useEffect)(()=>{!p&&h.length>0&&E(!0);const e=document.activeElement!==w.current;return I.current&&h?(V(),void(I.current=!1)):e&&h?(V(),void(0,d.default)(null===(t=w.current)||void 0===t?void 0:t.checkValidity(),w.current)):void S();var t},[h]),(0,n.useEffect)(()=>{b&&w.current&&(!1===C?g(w.current):null===C&&(y(),k(!1),g(w.current)))},[b,C]);const j="".concat(e,"-error-message");return n.createElement(u.default,{raiseLabel:p,isFieldValid:C,showErrorMsg:F,errorMsg:L,errorId:j},n.createElement("input",{ref:w,className:"gb-form__field-text tw:z-3",id:"id_".concat(e),name:e,type:"text",value:h,placeholder:f,onFocus:()=>(null===v.current&&(v.current=!0),E(!0),void M(!0)),onChange:e=>_(e.target.value),onBlur:e=>(e=>{var t;v.current&&(v.current=!1),E(e.target.value.length>0),M(!1),V(),(0,d.default)(null===(t=w.current)||void 0===t?void 0:t.checkValidity(),e.target)})(e),onInvalid:e=>e.preventDefault(),pattern:t.pattern,minLength:t.minLength,maxLength:t.maxLength,required:r,"aria-invalid":null===C?void 0:!C,"aria-errormessage":!1===C?j:void 0,autoCapitalize:"none",autoCorrect:"off",autoComplete:t.autocomplete||"off",spellCheck:"false"}))}},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}){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:()=>a});var n=r(96540),o=r(2543);function a(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:()=>c});var n=r(96540),o=r(99243),a=r(21489),l=r(81785);function c(e,t){const r=(0,n.useRef)(!1),c=(e=>"estimated_annual_gtv"===e?"gtv":e)(e),i=function(e){const t=(0,a._G)(e);return null!=t?t:null}(c);return(0,n.useEffect)(()=>{if(i&&!r.current){const e=t?t.form:null;e&&(r.current=!0),((e,t)=>{if(!e)return;const r=new o.GU(e);l.d.sendEvent(r.getFormGTMObject("field_autocompleted","completed",t))})(e,c)}},[t]),i}},96363(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(99243),o=r(94229),a=r(81785);const l=(e,t)=>{if(!t)return;const r=t.closest("form");if(!r)return;const l=new n.GU(r);a.d.sendEvent(l.getFormGTMObject(e?"field_completed":"field_validation_error",(0,o.Y)(t),t.name))}}}]);
2//# sourceMappingURL=forms-react-shared-Components-TextInput-TextInput.chunk.5419010b595a2aed26db.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.