PageSourceSearch

https://lidomatrip.com/_next/static/chunks/6476-e822bd2ebe7751d7.js

js lidomatrip.com collected 2026-10-02 20:27:00 UTC 7,269 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6476],{86476:function(e,t,l){"use strict";var r=l(85893),a=l(35204),s=l(72563),o=l(23765),n=l(91879),i=l(85945),d=l(48228),u=l(29061),c=l(65527),h=l(47300),p=l(97049),g=l(68398),v=l(95517),m=l(5152),_=l.n(m),S=l(11163),f=l(67294),x=l(67970),b=l(55395),M=l(68002),N=l(45551);let w=_()(()=>l.e(9905).then(l.bind(l,99905)),{ssr:!0}),y=e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`;t.Z=function(e){let{showAsModal:t=!1}=e,l=(0,S.useRouter)(),m=(0,n.Gr)(),_=l.query.redirectTo,T=(0,i.NL)(),C=(0,f.useRef)(),[R,j]=(0,f.useState)(""),[P,U]=(0,f.useState)(5),[k,I]=(0,f.useState)(0),[E,D]=(0,f.useState)(0),[O,L]=(0,f.useState)(""),[Z,$]=(0,f.useState)(""),[A,F]=(0,f.useState)(0),B=(0,f.useRef)(""),G=()=>{t?(m.authModalsUtils.setShowOTPModal(!1),m.authModalsUtils.setShowEnterPhoneNumberModal(!0)):l.push(_?`/auth/enter_phone?redirectTo=${_}`:"/auth/enter_phone")};(0,f.useEffect)(()=>{let e=(0,b.T1)();if(!e.phone){G();return}j(e.phone),U(e.codeLength),I(e.resendAt),D(Date.now());let t=setInterval(()=>D(Date.now()),1e3);return()=>clearInterval(t)},[]);let J=Math.max(0,Math.ceil((k-E)/1e3)),z=E>0&&0===J,Q=(0,d.D)(async()=>{try{let e=await (0,b.pv)(R);I(Date.now()+1e3*e.resendInSeconds),D(Date.now()),U(e.codeLength),L(""),$(""),B.current="",F(e=>
1e+1),e.sent&&N.Z.message([{type:g.L.SUCCESS,title:"کد تأیید جدید ارسال شد."}])}catch(e){N.Z.message([{type:g.L.ERROR,title:(0,b.bc)(e,"مشکلی در ارسال کد پیش آمد. لطفاً دوباره تلاش کنید.")}])}}),q=(0,d.D)(e=>{let{product_id:t,product_type:l,residence_id:r,start_date:a,end_date:s,guests_count:n,guest:i}=e;return(0,o.Dq)({product_id:t,product_type:l,residence_id:r,start_date:a,end_date:s,guests_count:n,guest:i})},{onSuccess:e=>{if((null==e?void 0:e.status)==="error")N.Z.message([{type:g.L.ERROR,title:(null==e?void 0:e.err_msg)||g.i}]),localStorage.removeItem("Pending_Reserve_Details"),m.authModalsUtils.setShowOTPModal(!1),l.push(C.current);else{var t;N.Z.message([{type:g.L.SUCCESS,title:"رزرو شما با موفقیت ثبت شد."}]),localStorage.removeItem("Pending_Reserve_Details"),m.authModalsUtils.setShowOTPModal(!1),T.invalidateQueries(["getCalendarData"]),l.push(`/my-trips/${null==e?void 0:null===(t=e.params)||void 0===t?void 0:t.order_id}`)}}}),H=(0,d.D)(async e=>{var r,o,n,i,d;let c,{otpCode:h}=e;try{let e=await u.Z.post("/api/auth/otp/verify",{code:h,phone:localStorage.getItem(p.g.MIZBAN_PHONE_NUMBER)});c=null==e?void 0:e.data}catch(e){$((0,b.bc)(e)),L(""),B.current="";return}(0,b.zP)(),(0,M.dP)({accessToken:null==c?void 0:null===(r=c.data)||void 0===r?void 0:r.accessToken,refreshToken:null==c?void 0:null===(o=c.data)||void 0===o?void 0:o.refreshToken}),(0,x.Np)(null==c?void 0:null===(n=c.data)||void 0===n?void 0:n.accessToken),null==m||null===(i=m.profileQueryUtils)||void 0===i||null===(d=i.refetchCheckUserStatus)||void 0===d||d.call(i);let v=localStorage.getItem(p.g.IS_FROM_FORGET_PASSWORD);if(v&&"true"===v){let e=_?`/auth/forget-password?redirectTo=${_}`:"/auth/forget-password";t?(m.authModalsUtils.setShowOTPModal(!1),m.authModalsUtils.setShowForgetPasswordModal(!0)):l.push(e)}else{let e=localStorage.getItem(p.g.IS_SIGN_UP);if("true"===e){let e=_?`/auth/signup?redirectTo=${_}`:"/auth/signup";t?(m.authModalsUtils.setShowOTPModal(!1),m.authModalsUtils.setShowSignUpModal(!0)):l.push(e)}
1else{N.Z.message([{type:g.L.SUCCESS,title:"ورود شما با موفقیت انجام شد."}]),localStorage.removeItem(p.g.IS_SIGN_UP),localStorage.removeItem(p.g.MIZBAN_PHONE_NUMBER);let e=localStorage.getItem("Pending_Reserve_Details");if(e){let t=JSON.parse(e);C.current=null==t?void 0:t.product_page_url,q.mutate({product_id:null==t?void 0:t.product_id,product_type:null==t?void 0:t.product_type,residence_id:null==t?void 0:t.residence_id,start_date:null==t?void 0:t.start_date,end_date:null==t?void 0:t.end_date,guests_count:null==t?void 0:t.guests_count,guest:null==t?void 0:t.guest})}else if(t){m.authModalsUtils.setShowOTPModal(!1);let e=(0,s.RM)();e&&l.push(e)}else l.push((0,a.J1)(_))}}}),W=e=>{e.length===P&&B.current!==e&&(B.current=e,$(""),H.mutate({otpCode:e}))};return(0,f.useEffect)(()=>{if(!("OTPCredential"in window))return;let e=new AbortController;return navigator.credentials.get({otp:{transport:["sms"]},signal:e.signal}).then(e=>{if(null==e?void 0:e.code){let t=String(e.code);L(t),W(t)}}).catch(()=>void 0),()=>e.abort()},[A,P]),(0,r.jsx)("div",{children:(0,r.jsx)(v.Z,{title:"کد تأیید را وارد کنید",showAsModal:t,children:(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),W(O)},children:[(0,r.jsxs)("p",{className:"mb-16 text-12 leading-21 text-black text-center",children:["کد ارسال شده به شماره ",(0,r.jsx)("span",{dir:"ltr",children:R})," را وارد کنید"]}),(0,r.jsxs)("div",{className:"flex flex-col items-center mb-16",children:[(0,r.jsx)(c.Z,{length:P,value:O,autoFocus:!0,hasError:!!Z,disabled:H.isLoading,onChange:e=>{L(e),Z&&$("")},onComplete:W}),!!Z&&(0,r.jsx)(w,{errorMessage:Z,marginTopClass:"mt-8"})]}),(0,r.jsxs)("div",{className:"flex items-center justify-center mb-24",children:[(0,r.jsx)("button",{type:"button",className:"text-12 leading-21 text-black font-r border-l-1 border-solid border-l-black pl-12 cursor-pointer",onClick:G,children:"ویرایش شماره موبایل"}),(0,r.jsxs)("button",{type:"button",className:`flex items-center gap-x-6 pr-12 ${z?"cursor-pointer":"cursor-default"}`,disabled:!z||Q.isLoading,onClick:()=>Q.mutate(),children:[(0,r.jsx)("span",{className:`text-12 leading-21 font-r ${z?"text-primary-main underline underline-offset-4":"text-[rgba(28,52,84,0.26)]"}`,children:"ارسال مجدد کد"}),z?(0,r.jsx)("i",{className:"icon-Resend text-16 text-primary-main"}):E>0&&(0,r.jsx)("span",{dir:"ltr",className:"text-12 leading-21 text-[rgba(28,52,84,0.26)] font-r",children:y(J)})]})]}),(0,r.jsx)(h.z,{isFullWidth:!0,type:"submit",disabled:O.length<P,isLoading:H.isLoading,children:"ورود"})]})})})}},65527:function(e,t,l){"use strict";var r=l(85893),a=l(31130),s=l.n(a),o=l(67294),n=l(70707);t.Z=function(e){let{length:t,value:l,onChange:a,onComplete:i,hasError:d=!1,disabled:u=!1,autoFocus:c=!1}=e,h=(0,o.useRef)(null),[p,g]=(0,o.useState)(!1);(0,o.useEffect)(()=>{var e;c&&!u&&(null===(e=h.current)||void 0===e||e.focus())},[c,u]);let v=e=>{let l=(0,n.cQ)(e).replace(/\D/g,"").slice(0,t);a(l),l.length===t&&(null==i||i(l))},m=Math.min(l.length,t-1);return(0,r.jsxs)("div",{dir:"ltr",className:s().root,children:[Array.from({length:t},(e,t)=>(0,r.jsx)("div",{"aria-hidden":!0,className:`${s().box} ${d?s().error:p&&t===m?s().active:""}`,children:l[t]??""},t)),(0,r.jsx)("input",{ref:h,className:s().input,value:l,onChange:e=>v(e.target.value),onFocus:()=>g(!0),onBlur:()=>g(!1),onSelect:e=>{let t=e.currentTarget.value.length;e.currentTarget.selectionStart!==t&&e.currentTarget.setSelectionRange(t,t)},type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:"one-time-code",disabled:u,"aria-label":"کد تأیید"})]})}},31130:function(e){e.exports={root:"otp-code-boxes_root__u9viv",box:"otp-code-boxes_box__ck_CF",active:"otp-code-boxes_active__95Jk_",error:"otp-code-boxes_error__vJbsK",input:"otp-code-boxes_input__z2kSe"}}}]);

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.