PageSourceSearch

https://zmantov.co.il/_next/static/chunks/pages/app/signup-197a1b960e80f3f675c8.js

js zmantov.co.il collected 2026-09-24 14:03:05 UTC 14,601 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9813],{35212:function(e,t,n){"use strict";n(67294);var r=n(25135),s=n(57378),a=n(11163),i=n(3945),o=n(85893);t.Z=function(e){var t=e.children;if(!(0,a.useRouter)().pathname.includes("logout")){var n=(0,s.Z)({redirectTo:"/app/",redirectIfFound:!0}).user;if(!n||n.isLoggedIn)return(0,o.jsx)(i.Z,{})}return(0,o.jsx)(r.H,{children:(0,o.jsxs)("div",{children:[(0,o.jsx)("nav",{className:"bg-white shadow shadow-md sm:shadow-none",children:(0,o.jsx)("div",{className:"text-center py-3",children:(0,o.jsx)("img",{src:"/img/logo.png",className:"w-40 mx-auto",alt:"logo"})})}),(0,o.jsx)("div",{className:"mx-auto",children:(0,o.jsx)("main",{className:"py-10",children:t})})]})})}},49528:function(e,t,n){"use strict";var r=n(30266),s=n(809),a=n.n(s),i=n(67294),o=n(93181),c=n(30080),u=n(25135),l=n(85893);t.Z=function(e){var t=e.setSentCode,n=e.phone,s=e.setPhone,d=(0,u.a)(),p=d.loading,m=d.doSMSVerification,f=(0,i.useState)(""),x=f[0],h=f[1],g=function(){var e=(0,r.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h(t.target.value);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(){var e=(0,r.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),m(n,x);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white p-5 w-full sm:w-96 sm:shadow-md rounded-sm sm:border border-gray-100",children:[(0,l.jsxs)("h1",{className:"text-3xl font-semibold tracking-tight text-center flex flex-col items-center space-y-4",children:[(0,l.jsx)(c.iD0,{className:"text-gray-700",size:40}),(0,l.jsx)("div",{children:"\u05e7\u05d5\u05d3 \u05d0\u05d9\u05de\u05d5\u05ea"})]}),(0,l.jsxs)("p",{className:"py-3 sm:text-sm",children:["\u05d4\u05d6\u05d9\u05e0\u05d5 \u05d0\u05ea \u05e7\u05d5\u05d3 \u05d4\u05d0\u05d9\u05de\u05d5\u05ea \u05e9\u05e9\u05dc\u05d7\u05e0\u05d5 \u05dc\u05db\u05dd \u05d1\u05d4\u05d5\u05d3\u05e2\u05ea \u05e1\u05de\u05e1 \u05dc\u05de\u05e1\u05e4\u05e8 ",(0,l.jsx)("strong",{className:"text-gray-600",children:n})," \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05d4\u05ea\u05d7\u05d1\u05e8 \u05dc\u05d7\u05e9\u05d1\u05d5\u05e0\u05db\u05dd. \u05d4\u05e7\u05d5\u05d3 \u05d9\u05d2\u05d9\u05e2 \u05d1\u05e9\u05e0\u05d9\u05d5\u05ea \u05d4\u05e7\u05e8\u05d5\u05d1\u05d5\u05ea, \u05de\u05de\u05dc\u05d9\u05e6\u05d9\u05dd \u05dc\u05d7\u05db\u05d5\u05ea \u05d1\u05e1\u05d1\u05dc\u05e0\u05d5\u05ea :)"]}),(0,l.jsxs)("form",{autoComplete:"off",className:"space-y-3 mt-5",onSubmit:v,children:[(0,l.jsx)("input",{type:"text",pattern:"\\d*",value:x,name:"smsCode",maxLength:6,onChange:g,disabled:p,className:"w-full h-12 outline-none rounded px-3 direction-ltr text-center border text-lg",placeholder:"\u05e7\u05d5\u05d3 \u05d0\u05d9\u05de\u05d5\u05ea"}),(0,l.jsx)("button",{type:"submit",disabled:p||!x||x.length<6,className:"flex justify-center items-center disabled:opacity-50 text-center text-md w-full bg-green-500 h-12 rounded text-white py-3 font-medium outline-none focus:outline-none",children:p?(0,l.jsx)(o.frZ,{className:"mx-auto animate-spin",size:40}):(0,l.jsx)("span",{children:"\u05d4\u05ea\u05d7\u05d1\u05e8"})}),(0,l.jsx)("div",{className:"max-w-wd text-center px-5 text-gray-400 text-xs mt-5",children:(0,l.jsx)("p",{children:"\u05d1\u05d4\u05e8\u05e9\u05de\u05d4 \u05d0\u05d5 \u05d4\u05ea\u05d7\u05d1\u05e8\u05d5\u05ea \u05d0\u05ea\u05dd \u05de\u05e1\u05db\u05d9\u05de\u05d9\u05dd \u05dc\u05ea\u05e0\u05d0\u05d9 \u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d5\u05de\u05d3\u05d9\u05e0\u05d9\u05d5\u05ea \u05d4\u05e4\u05e8\u
105d8\u05d9\u05d5\u05ea \u05e9\u05dc\u05e0\u05d5."})})]})]}),(0,l.jsxs)("div",{className:"text-center font-medium",children:[(0,l.jsx)("div",{children:"\u05dc\u05d0 \u05e7\u05d9\u05d1\u05dc\u05ea \u05d0\u05ea \u05d4\u05e7\u05d5\u05d3?"}),(0,l.jsx)("a",{onClick:function(){t(!1),s()},className:"text-green-500 font-medium cursor-pointer",children:"\u05e0\u05e1\u05d4 \u05e9\u05d5\u05d1"})]})]})}},3945:function(e,t,n){"use strict";n(67294);var r=n(93181),s=n(85893);t.Z=function(){return(0,s.jsxs)("div",{className:"fixed inset-0 bg-white flex flex-col items-center justify-center space-y-4 text-2xl z-50",children:[(0,s.jsx)(r.frZ,{className:"mx-auto animate-spin text-green-600",size:60}),(0,s.jsx)("div",{children:"\u05d8\u05d5\u05e2\u05df..."})]})}},25135:function(e,t,n){"use strict";n.d(t,{H:function(){return m},a:function(){return f}});var r=n(30266),s=n(809),a=n.n(s),i=n(67294),o=n(11163),c=n(51721),u=n(57378),l=n(28739),d=n(85893),p=(0,i.createContext)({}),m=function(e){var t=e.children,n="/app/login";"/app/signup"===(0,o.useRouter)().pathname&&(n=null);var s=(0,u.Z)({redirectTo:n}),m=s.user,f=s.mutateUser,x=(0,i.useState)(null),h=x[0],g=x[1],v=(0,i.useState)(!1),w=v[0],b=v[1];(0,i.useEffect)((function(){m&&m.isLoggedIn&&g(m)}),[]);var j=function(){var e=(0,r.Z)(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/auth/login/",{phone:t});case 3:return n=e.sent,e.abrupt("return",n);case 7:e.prev=7,e.t0=e.catch(0),console.log("failed to login",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=(0,r.Z)(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.prev=1,e.next=4,c.ZP.post("/api/auth/signup/",t);case 4:if(!(n=e.sent).data){e.next=12;break}if(!n.data.sentCode){e.next=11;break}return b(!1),e.abrupt("return",!0);case 11:n.data.exists&&l.Am.error("\u05de\u05e1\u05f3 \u05d4\u05d8\u05dc\u05e4\u05d5\u05df \u05e9\u05d4\u05d5\u05d6\u05df \u05db\u05d1\u05e8 \u05de\u05e9\u05d5\u05d9\u05d9\u05da \u05dc\u05d7\u05e9\u05d1\u05d5\u05df \u05e2\u05e1\u05e7\u05d9 \u05d0\u05d7\u05e8.");case 12:b(!1),e.next=20;break;case 15:e.prev=15,e.t0=e.catch(1),console.log("signup failed",e.t0),l.Am.error("\u05d0\u05d5\u05e4\u05e1....\u05d1\u05d3\u05e7\u05d5 \u05e9\u05db\u05dc \u05d4\u05e4\u05e8\u
105d8\u05d9\u05dd \u05e9\u05d4\u05d6\u05e0\u05ea\u05dd \u05ea\u05e7\u05d9\u05e0\u05d9\u05dd \u05d5\u05e0\u05e1\u05d5 \u05e9\u05e0\u05d9\u05ea."),b(!1);case 20:case"end":return e.stop()}}),e,null,[[1,15]])})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=(0,r.Z)(a().mark((function e(t,n){var r,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.prev=1,e.next=4,c.ZP.post("/api/auth/verifySMS/",{phone:t,smsCode:n});case 4:if(!(r=e.sent).data||!r.data._id){e.next=10;break}return s=r.data,g(s),e.next=10,f(s);case 10:e.next=17;break;case 12:e.prev=12,e.t0=e.catch(1),console.log("login failed",e.t0),l.Am.error("\u05d4\u05e7\u05d5\u05d3 \u05e9\u05d4\u05d5\u05d6\u05df \u05d0\u05d9\u05e0\u05d5 \u05ea\u05d5\u05d0\u05dd \u05dc\u05e7\u05d5\u05d3 \u05e9\u05e9\u05dc\u05d7\u05e0\u05d5 \u05dc\u05da."),b(!1);case 17:case"end":return e.stop()}}),e,null,[[1,12]])})));return function(t,n){return e.apply(this,arguments)}}(),C=function(){var e=(0,r.Z)(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.ZP.post("/api/auth/logout/",{});case 3:if(!(t=e.sent).data||!1!==t.data.isLoggedIn){e.next=10;break}return console.log("logged out!"),o.default.replace("/app/login"),g({}),e.next=10,f({});case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.log("logout failed",e.t0);case 15:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}();return(0,d.jsx)(p.Provider,{value:{isAuthenticated:!!m||!!h,user:m,userSession:h,loading:w,doLogin:j,doSignup:N,doSMSVerification:y,doLogout:C},children:t})},f=function(){return(0,i.useContext)(p)}},57378:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(67294),s=n(11163),a=n(52503),i=n(96486),o=n.n(i),c=n(80008),u=n.n(c);function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.redirectTo,n=void 0!==t&&t,i=e.redirectIfFound,c=void 0!==i&&i,l=function(e){return fetch(e).then((function(e){return e.json()}))},d=(0,a.ZP)("/api/me/",l),p=d.data,m=d.mutate;return(0,r.useEffect)((function(){n&&p&&(n&&!c&&(null===p||void 0===p||!p.isLoggedIn)||c&&null!==p&&void 0!==p&&p.isLoggedIn)&&s.default.push(n)}),[p,c,n]),(0,r.useEffect)((function(){if(window.$zmantovMobile&&p&&p.isLoggedIn&&p._id){var e=localStorage.getItem("ztMobileUpdated");(!e||e&&u()().isAfter(u().unix(e)))&&(localStorage.setItem("ztMobileUpdated",u()().add(5,"m").unix().toString()),console.log("Mobile app update. Next update:",u()().add(5,"m").format("YYYY-MM-DDTHH:mm:ss.000Z")),console.log("postMessage ReactNative:",p),window.ReactNativeWebView.postMessage(JSON.stringify(p)))}if(p&&p.isLoggedIn&&p._id)try{window.$crisp=window.$crisp||[],$crisp.push(["set","user:email",[p.email]]),$crisp.push(["set","user:phone",["".concat(p.phone)]]),$crisp.push(["set","user:nickname",["".concat(p.firstName," ").concat(p.lastName)]]),$crisp.push(["set","user:company",[o().get(p,"business.details.name",""),{url:"https://zmantov.co.il/b/".concat(p.business.pageCode)}]]),$crisp.push(["set","session:data",[[["pageCode",p.business.pageCode],["businessId",p.business._id]]]]),window.clarity&&(window.clarity("identify",p.business._id),window.clarity("set","user",[p._id,p.email,p.phone,p.business.pageCode]))}catch(t){console.error(t)}}),[p]),{user:p,mutateUser:m}}},71603:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return v}});var r=n(67294),s=n(30266),a=n(809),i=n.n(a),o=n(9008),c=n(41664),u=n(93181),l=n(25135),d=n(49528),p=n(85893);var m=function(e){var t=e.setSentCode,n=e.setPhone,r=e.sourceCampaign,a=(0,l.a)(),o=a.loading,d=a.doSignup,m=function(){var e=(0,s.Z)(i().mark((function e(s){var a,o,c,u,l,p,m;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s.preventDefault(),a=s.target,o=a.phone.value,c=a.firstName.value,u=a.lastName.value,l=a.email.value,p={firstName:c,lastName:u,phone:o,email:l},r&&(p.sourceCampaignCode=r),e.next=10,d(p);case 10:m=e.sent,n(o),t(m);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"bg-white p-5 w-full sm:border border-gray-100 sm:w-96 sm:shadow-md rounded-sm",children:[(0,p.jsx)("h1",{className:"text-3xl font-semibold tracking-tight pb-2",children:"\u05d4\u05e6\u05d8\u05e8\u
105e4\u05d5 \u05dc\u05de\u05d4\u05e4\u05db\u05d4"}),(0,p.jsx)("p",{className:"sm:text-sm",children:"\u05d4\u05e9\u05dc\u05d9\u05de\u05d5 \u05d0\u05ea \u05d4\u05e4\u05e8\u05d8\u05d9\u05dd \u05d4\u05d1\u05d0\u05d9\u05dd \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05e6\u05e8\u05e3 \u05d0\u05ea \u05d4\u05e2\u05e1\u05e7 \u05e9\u05dc\u05db\u05dd \u05dc\u05e9\u05d9\u05e8\u05d5\u05ea, \u05d5\u05d1\u05e2\u05d5\u05d3 \u05db\u05de\u05d4 \u05d3\u05e7\u05d5\u05ea \u05ea\u05d5\u05db\u05dc\u05d5 \u05dc\u05d4\u05ea\u05d7\u05d9\u05dc \u05dc\u05e0\u05d4\u05dc \u05ea\u05d5\u05e8\u05d9\u05dd \u05d5\u05dc\u05e7\u05d5\u05d7\u05d5\u05ea \u05d1\u05e6\u05d5\u05e8\u05d4 \u05d9\u05e2\u05d9\u05dc\u05d4 \u05d5\u05d7\u05db\u05de\u05d4."}),(0,p.jsxs)("form",{autoComplete:"off",className:"space-y-3 mt-5",onSubmit:m,children:[(0,p.jsxs)("div",{className:"flex",children:[(0,p.jsx)("input",{type:"text",name:"firstName",disabled:o,className:"w-full h-12 outline-none border rounded px-3 ml-1 bg-white",placeholder:"\u05e9\u05dd \u05e4\u05e8\u05d8\u05d9",required:!0}),(0,p.jsx)("input",{type:"text",name:"lastName",disabled:o,className:"w-full h-12 outline-none border rounded px-3 mr-1 bg-white",placeholder:"\u05e9\u05dd \u05de\u05e9\u05e4\u05d7\u05d4",required:!0})]}),(0,p.jsx)("input",{type:"email",name:"email",disabled:o,className:"w-full h-12 outline-none border rounded px-3 bg-white",placeholder:"\u05db\u05ea\u05d5\u05d1\u05ea \u05d0\u05d9\u05de\u05d9\u05d9\u05dc"}),(0,p.jsx)("input",{required:!0,type:"text",pattern:"[0-9]*",inputMode:"numeric",minLength:"10",maxLength:"10",name:"phone",disabled:o,className:"w-full h-12 outline-none border rounded px-3 bg-white",placeholder:"\u05de\u05e1\u05f3 \u05d4\u05d8\u05dc\u05e4\u05d5\u05df \u05e9\u05dc\u05da"}),(0,p.jsx)("button",{type:"submit",disabled:o,className:"flex justify-center items-center disabled:opacity-50 text-center text-md w-full bg-green-500 h-12 rounded text-white py-3 font-medium outline-none focus:outline-none",children:o?(0,p.jsx)(u.frZ,{className:"mx-auto animate-spin",size:40}):(0,p.jsx)("span",{children:"\u05d4\u05de\u05e9\u05da"})}),(0,p.jsx)("div",{className:"max-w-wd text-center px-5 text-gray-400 text-xs mt-5",children:(0,p.jsx)("p",{children:"\u05d1\u05d4\u05e8\u05e9\u05de\u05d4 \u05d0\u05d5 \u05d4\u05ea\u05d7\u05d1\u05e8\u05d5\u05ea \u05d0\u05ea\u05dd \u05de\u05e1\u05db\u05d9\u05de\u05d9\u05dd \u05dc\u05ea\u05e0\u05d0\u05d9 \u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d5\u05de\u05d3\u05d9\u05e0\u05d9\u05d5\u05ea \u05d4\u05e4\u05e8\u
105d8\u05d9\u05d5\u05ea \u05e9\u05dc\u05e0\u05d5."})})]})]}),(0,p.jsxs)("div",{className:"w-full bg-gray-100 border-0 sm:w-96 sm:bg-white text-center font-medium sm:border-2 p-4 rounded border-dashed border-gray-300",children:[(0,p.jsx)("div",{children:"\u05db\u05d1\u05e8 \u05d9\u05e9 \u05dc\u05da \u05d7\u05e9\u05d1\u05d5\u05df?"}),(0,p.jsx)(c.default,{href:"/app/login/",children:(0,p.jsx)("a",{className:"text-green-500 font-medium",children:"\u05dc\u05d7\u05e5 \u05dc\u05d4\u05ea\u05d7\u05d1\u05e8\u05d5\u05ea"})})]})]})},f=function(e){var t=e.sourceCampaign,n=(0,r.useState)(!1),s=n[0],a=n[1],i=(0,r.useState)(""),c=i[0],u=i[1];return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(o.default,{children:(0,p.jsx)("title",{children:"\u05d6\u05de\u05df \u05d8\u05d5\u05d1 - \u05d4\u05e6\u05d8\u05e8\u05e4\u05d5\u05ea"})}),(0,p.jsx)("div",{className:"bg-white flex flex-col space-y-3 sm:space-y-8 justify-center items-center text-center",children:s?(0,p.jsx)(d.Z,{setSentCode:a,phone:c,setPhone:u}):(0,p.jsx)(m,{setSentCode:a,setPhone:u,sourceCampaign:t})})]})},x=n(35212),h=n(11163);function g(){var e,t=(0,h.useRouter)();return(0,p.jsx)(f,{sourceCampaign:(null===(e=t.query)||void 0===e?void 0:e.sourceCampaign)||null})}g.Layout=x.Z;var v=g},26038:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/signup",function(){return n(71603)}])}},function(e){e.O(0,[648,3662,4838,5800,9331,9774,2888,179],(function(){return t=26038,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
2//# sourceMappingURL=signup-197a1b960e80f3f675c8.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.