1 line
30 KiB
JavaScript
1 line
30 KiB
JavaScript
"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3723],{855:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(7208),a=n(76475),o=n(44414);function i(e){var t,n;let i,s,{children:l,type:c="scale",direction:u="right",offset:d=10,scale:p={hover:1.05,tap:.95}}=e;switch(u){case"up":case"left":i=d,s=0;break;default:i=0,s=d}const[f,h]=(0,r.Y)(i,s),[v,g]=(0,r.Y)(i,s);switch(c){case"rotate":return(0,o.jsx)(a.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:l});case"slide":return"up"===u||"down"===u?(0,o.jsx)(a.P.div,{animate:{y:void 0!==v?v:""},onHoverEnd:()=>g(),onHoverStart:()=>g(),children:l}):(0,o.jsx)(a.P.div,{animate:{x:void 0!==f?f:""},onHoverEnd:()=>h(),onHoverStart:()=>h(),children:l});default:return"number"===typeof p&&(p={hover:p,tap:p}),(0,o.jsx)(a.P.div,{whileHover:{scale:null===(t=p)||void 0===t?void 0:t.hover},whileTap:{scale:null===(n=p)||void 0===n?void 0:n.tap},children:l})}}},2046:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(98587),a=n(58168),o=n(9950),i=n(72004),s=n(3484),l=n(89548),c=n(82053),u=n(15866),d=n(39766),p=n(59254),f=n(45558),h=n(1614);function v(e){return(0,h.Ay)("MuiInputAdornment",e)}const g=(0,f.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var y,m=n(18463),b=n(44414);const A=["children","className","component","disablePointerEvents","disableTypography","position","variant"],x=(0,p.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,l.A)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{["&.".concat(g.positionStart,"&:not(.").concat(g.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),j=o.forwardRef((function(e,t){const n=(0,m.b)({props:e,name:"MuiInputAdornment"}),{children:p,className:f,component:h="div",disablePointerEvents:g=!1,disableTypography:j=!1,position:S,variant:w}=n,C=(0,r.A)(n,A),k=(0,d.A)()||{};let O=w;w&&k.variant,k&&!O&&(O=k.variant);const I=(0,a.A)({},n,{hiddenLabel:k.hiddenLabel,size:k.size,disablePointerEvents:g,position:S,variant:O}),D=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:a,size:o,variant:i}=e,c={root:["root",n&&"disablePointerEvents",a&&"position".concat((0,l.A)(a)),i,r&&"hiddenLabel",o&&"size".concat((0,l.A)(o))]};return(0,s.A)(c,v,t)})(I);return(0,b.jsx)(u.A.Provider,{value:null,children:(0,b.jsx)(x,(0,a.A)({as:h,ownerState:I,className:(0,i.A)(D.root,f),ref:t},C,{children:"string"!==typeof p||j?(0,b.jsxs)(o.Fragment,{children:["start"===S?y||(y=(0,b.jsx)("span",{className:"notranslate",children:"\u200b"})):null,p]}):(0,b.jsx)(c.A,{color:"text.secondary",children:p})}))})}))},8457:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALEAAABFCAYAAAAFKgfKAAAQE0lEQVR4Ae2dS4wcRxmA/6p5GLxEHiuHRILgtpx1wslrDjwuZDdcAduckTyrxOsIFNl7Q1HsnbVz4YC8IQoku4685sjFNnCMtGMuICTkzQWIdy23RZDgABlAgL0zXcX/Vz+mp6cf1Y/ZJUl90u70zHTXdNf8/df/qhoAg8FgMBgMBoPBYDAYDIa9hEEJ2lan1WzWzoGUbXxqSYAeNrkJIK+vbV1cB4NhFygsxO1nO1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bnecNg5zY6y6UaEjxH0i1VV3JTk90COuYYqWdPgH1bZJpFWDVmHiua1UewYnbxuTidv7LOFFA8w9UzC/BwUJPQj6rrXRgutbBRfaIXP4E2cvodU9uTp8XdYMcctCwYn8Jy6kJPwtJ8iU4iyAgVUr5w31Ux9JyE5FFwPT9UfO1jTC/UhJw9jtndKxY5VIZA63VaRlYZCAmzFvG3TP69DIufIZihMV0SQuaolyUjyJnwD6JVvQkmCqM7oB85wxnJPAfKnVNF22SlEcaADdyNL0GMOSnUlucyZck6DnDy0THI5eVEHLvzbHjxn6C5NgMlJoeVb6Q+jFAfjnRYSZKWRKxmdNLCLTLCNQtOq4P8bGyaAvyQCF0LMq/UHMLSkpu6QTRo4BPmHOncqjSysXbzfvFNgmEjbpMgSYHJSwq/R870UZOrjIlOV4lAjh8xejWnPkJVEOSJtsmCybD1pYbfzJb5EIeWi7lD2qDY4jA+Bxg/bYeTVkjBlDe95BdiHXkc7/tC4HV/ctEhDRQyUsyxuTaEjWeV6D57X38U+wxAjPxbjze8FFH69XnHUR7W5fyACR1wzap0f3ZSmFDC/ds9dR4EEOGqH0RKgaSsopgkwpY7Xti/MQQquN8024ouV5OZOX44Ictzq7Fkrwhsmi27JaW6oQEjmKOogYaJlsbynNpk4+/viYFEBJgGcGjiZwzUJKAlqvAm06zayoQATE2JXe4lFyKju8usnGg33NzIo7YvCe/wqDo9pw22WAEerz7LO1QjyR5eJCTFBQW2qUOI1cZjMgrh1DPyYIYPaOT/tu1LCBs4rwD5GkD+61GEX8CIO9KdMA++HYWYo9Qj+cklS3NJxACYhwD5q3TRV1snujLfvOnv5ir4MBoPBYDAYDAaDwWAwZPI/iTTgFxK8/KcAAAAASUVORK5CYII="},20466:(e,t,n)=>{n.d(t,{k:()=>a});var r=n(8881);const a=(e,t,n)=>(0,r.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:n||2e3})},21862:(e,t,n)=>{var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==y(e)&&"function"!==typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(9950)),a=["placeholder","separator","isLastChild","ariaLabelOverride","shouldRender","inputStyle","focus","isDisabled","hasErrored","errorStyle","isSuccessed","successStyle","focusStyle","disabledStyle","shouldAutoFocus","isInputNum","index","value","className","isInputSecure","onSubmit"];function o(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function s(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function f(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var a=v(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}(this,n)}}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}var m=function(e){return"object"===y(e)},b=function(e){d(n,e);var t=f(n);function n(e){var a;return l(this,n),g(h(a=t.call(this,e)),"getClasses",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return!m(e)&&!1!==e})).join(" ")})),g(h(a),"getType",(function(){var e=a.props,t=e.isInputSecure,n=e.isInputNum;return t?"password":n?"tel":"text"})),g(h(a),"getAriaLabel",(function(e,t){var n=a.props.ariaLabelOverride;return n||"".concat(0===e?"Please enter verification code. ":"").concat(t?"Digit":"Character"," ").concat(e+1)})),a.input=r.default.createRef(),a}return u(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.focus,n=e.shouldAutoFocus,r=this.input.current;r&&t&&n&&r.focus()}},{key:"componentDidUpdate",value:function(e){var t=this.props.focus,n=this.input.current;e.focus!==t&&n&&t&&(n.focus(),n.select())}},{key:"render",value:function(){var e=this.props,t=e.placeholder,n=e.separator,o=e.isLastChild,l=(e.ariaLabelOverride,e.shouldRender),c=e.inputStyle,u=e.focus,d=e.isDisabled,p=e.hasErrored,f=e.errorStyle,h=e.isSuccessed,v=e.successStyle,g=e.focusStyle,y=e.disabledStyle,b=(e.shouldAutoFocus,e.isInputNum),A=e.index,x=e.value,j=e.className,S=(e.isInputSecure,e.onSubmit,s(e,a));return r.default.createElement("div",{className:j,style:{display:"flex",alignItems:"center"}},r.default.createElement("input",i({"aria-label":this.getAriaLabel(A,b),style:Object.assign({width:"1em",textAlign:"center",padding:0},m(c)&&c,u&&m(g)&&g,d&&m(y)&&y,p&&!h&&m(f)&&f,h&&!p&&m(v)&&v),placeholder:t,className:this.getClasses(c,u&&g,d&&y,p&&!h&&f,h&&!p&&v),type:this.getType(),ref:this.input,disabled:d,value:x||""},S)),!o&&l&&n)}}]),n}(r.PureComponent),A=function(e){d(n,e);var t=f(n);function n(){var e;l(this,n);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return g(h(e=t.call.apply(t,[this].concat(o))),"state",{activeInput:0}),g(h(e),"getOtpValue",(function(){return e.props.value?e.props.value.toString().split(""):[]})),g(h(e),"getPlaceholderValue",(function(){var t=e.props,n=t.placeholder,r=t.numInputs;if("string"===typeof n){if(n.length===r)return n;n.length>0&&console.error("Length of the placeholder should be equal to the number of inputs.")}})),g(h(e),"handleOtpChange",(function(t){(0,e.props.onChange)(t.join(""))})),g(h(e),"isInputValueValid",(function(t){return(e.props.isInputNum?!isNaN(parseInt(t,10)):"string"===typeof t)&&1===t.trim().length})),g(h(e),"focusInput",(function(t){var n=e.props.numInputs,r=Math.max(Math.min(n-1,t),0);e.setState({activeInput:r})})),g(h(e),"focusNextInput",(function(){var t=e.state.activeInput;e.focusInput(t+1)})),g(h(e),"focusPrevInput",(function(){var t=e.state.activeInput;e.focusInput(t-1)})),g(h(e),"changeCodeAtFocus",(function(t){var n=e.state.activeInput,r=e.getOtpValue();r[n]=t[0],e.handleOtpChange(r)})),g(h(e),"handleOnPaste",(function(t){t.preventDefault();var n=e.state.activeInput,r=e.props,a=r.numInputs;if(!r.isDisabled){for(var o=e.getOtpValue(),i=n,s=t.clipboardData.getData("text/plain"),l=(e.props.isInputNum?s.replace(/\D/g,""):s).slice(0,a-n).split(""),c=0;c<a;++c)c>=n&&l.length>0&&(o[c]=l.shift(),i++);e.setState({activeInput:i},(function(){e.focusInput(i),e.handleOtpChange(o)}))}})),g(h(e),"handleOnChange",(function(t){var n=t.target.value;e.isInputValueValid(n)&&e.changeCodeAtFocus(n)})),g(h(e),"handleOnKeyDown",(function(t){8===t.keyCode||"Backspace"===t.key?(t.preventDefault(),e.changeCodeAtFocus(""),e.focusInput(e.state.activeInput-1)):46===t.keyCode||"Delete"===t.key?(t.preventDefault(),e.changeCodeAtFocus("")):37===t.keyCode||"ArrowLeft"===t.key?(t.preventDefault(),e.focusPrevInput()):39===t.keyCode||"ArrowRight"===t.key?(t.preventDefault(),e.focusNextInput()):32===t.keyCode||" "===t.key||"Spacebar"===t.key||"Space"===t.key?t.preventDefault():13!==t.keyCode&&"Enter"!==t.key||e.props.onSubmit()})),g(h(e),"handleOnInput",(function(t){var n=t.target.value;if(t.target.value)if(t.target.value&&t.target.value.length>1){t.preventDefault();for(var r=e.props.numInputs,a=e.state.activeInput,o=e.getOtpValue(),i=t.target.value.slice(0,r-a).split(""),s=0;s<r;++s)s>=a&&i.length>0&&(o[s]=i.shift());e.handleOtpChange(o),e.focusInput(e.props.numInputs)}else if(n&&n.trim().length>1)t.clipboardData={getData:function(){return n.trim()}},e.handleOnPaste(t);else if(e.isInputValueValid(t.target.value))e.focusNextInput();else if(!e.props.isInputNum){var l=t.nativeEvent;null===l.data&&"deleteContentBackward"===l.inputType&&(t.preventDefault(),e.changeCodeAtFocus(""),e.focusPrevInput())}})),g(h(e),"renderInputs",(function(){for(var t=e.state.activeInput,n=e.props,a=n.id,o=n.autoComplete,s=n.numInputs,l=n.inputStyle,c=n.focusStyle,u=n.separator,d=n.separateAfter,p=void 0===d?1:d,f=n.isDisabled,h=n.disabledStyle,v=n.hasErrored,g=n.errorStyle,y=n.isSuccessed,m=n.successStyle,A=n.shouldAutoFocus,x=n.isInputNum,j=n.isInputSecure,S=n.className,w=n.inputProps,C=n.onSubmit,k=[],O=e.getOtpValue(),I=e.getPlaceholderValue(),D=e.props["data-cy"],N=e.props["data-testid"],E=e.props["custom-test-attr"],P=e.props["custom-test-id"],M=function(n){var d=void 0;d=(n+1)%parseInt(p)===0;var M={};E&&(M[E]=P&&"".concat(P,"-").concat(n));var F={};w&&(Array.isArray(w)?w[n]&&(F=w[n]):F=w),k.push(r.default.createElement(b,i({id:a&&"".concat(a,"-").concat(n),autoComplete:null!==o&&void 0!==o?o:"off",placeholder:I&&I[n],key:n,index:n,focus:t===n,value:O&&O[n],onChange:e.handleOnChange,onKeyDown:e.handleOnKeyDown,onInput:e.handleOnInput,onPaste:e.handleOnPaste,onFocus:function(t){e.setState({activeInput:n}),t.target.select()},onBlur:function(){return e.setState({activeInput:-1})},separator:u,inputStyle:l,focusStyle:c,isLastChild:n===s-1,isDisabled:f,disabledStyle:h,hasErrored:v,errorStyle:g,isSuccessed:y,successStyle:m,shouldAutoFocus:A,isInputNum:x,isInputSecure:j,className:S,"data-cy":D&&"".concat(D,"-").concat(n),"data-testid":N&&"".concat(N,"-").concat(n),shouldRender:d,onSubmit:C},F,M)))},F=0;F<s;F++)M(F);return k})),e}return u(n,[{key:"componentDidUpdate",value:function(){var e=this.props.value,t=this.state.activeInput;""==e&&t>0&&this.setState({activeInput:0})}},{key:"render",value:function(){var e=this.props.containerStyle;return r.default.createElement("div",{style:Object.assign({display:"flex"},m(e)&&e),className:m(e)?"":e},this.renderInputs())}}]),n}(r.Component);g(A,"defaultProps",{numInputs:4,onChange:function(e){return console.log(e)},isDisabled:!1,shouldAutoFocus:!1,value:"",isInputSecure:!1,onSubmit:function(e){return console.log(e)}})},23723:(e,t,n)=>{n.r(t),n.d(t,{default:()=>I});var r=n(9950),a=n(8881),o=n(855),i=(n(21862),n(16491)),s=n(82053),l=n(93230),c=n(48089),u=n(50704),d=n(29925),p=n(2046),f=n(25333),h=n(29277),v=n(36080),g=n(82223),y=n(14857),m=n(26910),b=n(28429),A=n(52351),x=n(8457),j=n(82569),S=n(20466),w=(n(45669),n(62375)),C=n(62462),k=n(68889),O=n(44414);const I=()=>{const e=(0,j.wA)(),t=(0,j.d4)((e=>e.fcm)),n=((0,j.d4)((e=>e.fcm.permission)),(0,y.A)()),[I,D]=(0,r.useState)(!1);let N=(0,b.Zp)();const[E,P]=(0,r.useState)(""),[M,F]=(0,r.useState)(""),[Y,T]=(0,r.useState)({}),[R,V]=(0,r.useState)(""),[z,L]=(0,r.useState)(0),[B,U]=(0,r.useState)(""),[q,J]=(0,r.useState)(""),[Q,W]=(0,r.useState)(!1),[H,G]=(0,r.useState)(!1),[K,Z]=(0,r.useState)(!1),[X,_]=(0,r.useState)(0);(0,r.useEffect)((()=>{localStorage.getItem("firstname")&&N("/nearle/dispatch")}),[]);const $=async()=>{if(D(!0),!R)return ee("Fill All required fields"),void D(!1);try{const n=await m.A.post("https://jupiter.nearle.app/live/api/v1/users/console/login",{authname:R,configid:9,userfcmtoken:null===t||void 0===t?void 0:t.token,password:B});if(409!=n.data.code||n.data.status)if(403==n.data.code)(0,S.k)(n.data.message,"warning",3e3);else if(409==n.data.code&&n.data.status)L(1),_(n.data.details.userid),(0,S.k)("User Found","success",3e3),(0,S.k)(n.data.message,"success",3e3);else if(401!=n.data.code||n.data.status)if(401==n.data.code&&n.data.status)(0,S.k)(n.data.message,"success",3e3),te(n.data.userid),L(2);else if(200==n.data.code&&n.data.status){(0,S.k)(n.data.message,"success",1e3),T(n.data.details);const t=n.data.details;e((0,k.FN)(t)),localStorage.setItem("firstname",t.firstname),localStorage.setItem("authname",t.authname),localStorage.setItem("roleid",t.roleid),localStorage.setItem("tenantid",t.tenantid),localStorage.setItem("partnerid",t.partnerid),localStorage.setItem("applocationid",t.applocationid),localStorage.setItem("userid",t.userid),localStorage.setItem("userfcmtoken",t.userfcmtoken),te(t.userid),N("/nearle/dispatch")}else(0,S.k)(n.data.message,"error",3e3);else(0,S.k)(n.data.message,"error",3e3);else(0,S.k)(n.data.message,"error",3e3)}catch(n){console.error(n),(0,S.k)(n.message,"error",5e3)}finally{D(!1)}},ee=e=>{(0,a.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1500})},te=async e=>{const t=[...(await m.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e))).data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(t))};return(0,O.jsxs)(i.A,{sx:{minHeight:"100vh",display:"flex",bgcolor:"#f8fafc"},children:[I&&(0,O.jsx)(A.A,{}),(0,O.jsxs)(i.A,{sx:{display:{xs:"none",md:"flex"},position:"relative",overflow:"hidden",flexBasis:"46%",flexDirection:"column",justifyContent:"space-between",color:"#fff",p:6,background:"linear-gradient(150deg, #4D1C61 0%, #662582 52%, #9255AB 100%)"},children:[(0,O.jsx)(i.A,{sx:{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:"50%",background:"radial-gradient(circle, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 70%)"}}),(0,O.jsx)(i.A,{sx:{position:"absolute",bottom:-150,left:-110,width:440,height:440,borderRadius:"50%",background:"radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%)"}}),(0,O.jsx)(i.A,{sx:{position:"relative"},children:(0,O.jsx)(i.A,{sx:{bgcolor:"#fff",borderRadius:2,px:1.5,py:.75,display:"inline-flex",boxShadow:"0 8px 20px rgba(0,0,0,0.18)"},children:(0,O.jsx)("img",{src:x,alt:"NearlExpress",style:{height:30,display:"block"}})})}),(0,O.jsxs)(i.A,{sx:{position:"relative"},children:[(0,O.jsxs)(s.A,{sx:{fontSize:34,fontWeight:700,lineHeight:1.18,letterSpacing:"-0.02em",mb:2},children:["Operate your dispatch,",(0,O.jsx)("br",{}),"end to end."]}),(0,O.jsx)(s.A,{sx:{fontSize:16,color:"rgba(255,255,255,0.82)",maxWidth:430,lineHeight:1.6},children:"Orders, AI route optimisation, live rider tracking and billing \u2014 all in the NearlExpress operator console."})]}),(0,O.jsx)(l.A,{spacing:1.25,sx:{position:"relative"},children:["Real-time fleet visibility","AI-optimised dispatch routes","Tenant, pricing & invoice control"].map((e=>(0,O.jsxs)(l.A,{direction:"row",spacing:1.25,alignItems:"center",children:[(0,O.jsx)(i.A,{sx:{width:22,height:22,borderRadius:"50%",bgcolor:"rgba(255,255,255,0.18)",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700},children:"\u2713"}),(0,O.jsx)(s.A,{sx:{fontSize:14.5,color:"rgba(255,255,255,0.9)"},children:e})]},e)))})]}),(0,O.jsx)(i.A,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",p:{xs:2.5,sm:4}},children:(0,O.jsxs)(i.A,{sx:{width:"100%",maxWidth:420},children:[(0,O.jsxs)(c.A,{sx:{width:"100%",borderRadius:3,border:"1px solid ".concat(n.palette.divider),boxShadow:"0 14px 40px rgba(15, 23, 42, 0.10)",p:{xs:2.5,sm:4}},children:[(0,O.jsx)(l.A,{alignItems:"center",mb:2.5,children:(0,O.jsx)("img",{src:x,alt:"loginpagelogo",style:{maxHeight:48}})}),(0,O.jsx)(s.A,{variant:"h3",textAlign:"center",sx:{fontWeight:700,mb:.5},children:"Welcome back"}),(0,O.jsx)(s.A,{variant:"body2",textAlign:"center",sx:{color:"#64748b",mb:3},children:"Sign in to the NearlExpress console"}),(0,O.jsx)(u.A,{sx:{p:0},children:(0,O.jsx)("form",{noValidate:!0,onSubmit:e=>{e.preventDefault(),0==z?$():1==z?B&&q&&B==q?(async()=>{const e=await m.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/users/update"),{userid:X,password:B});e.data.status&&((0,S.k)(e.data.message,"success",3e3),(0,S.k)("Enter Password to Login","success",3e3),L(2),U(""))})():(0,S.k)("Check Password","warning",3e3):2==z&&(B||(0,S.k)("Invalid Password","warning",3e3),$())},children:(0,O.jsxs)(l.A,{spacing:3,children:[(0,O.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"E-mail Address",variant:"outlined",autoComplete:"email",required:!0,value:R,onChange:e=>V(e.target.value.toLocaleLowerCase()),InputProps:{readOnly:z}}),1==z&&(0,O.jsxs)(l.A,{display:"flex",flexDirection:"column",spacing:3,children:[(0,O.jsx)(s.A,{variant:"h4",textAlign:"start",mb:3,children:"Setup Password"}),(0,O.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"Enter New Password",variant:"outlined",required:!0,type:H?"text":"password",value:B,onChange:e=>U(e.target.value),InputProps:{endAdornment:(0,O.jsx)(p.A,{position:"end",children:(0,O.jsx)(f.A,{onClick:()=>G((e=>!e)),edge:"end",children:H?(0,O.jsx)(C.A,{}):(0,O.jsx)(w.A,{})})})}}),(0,O.jsx)(d.A,{error:""!==q&&B!==q,fullWidth:!0,label:"Re-Enter Password",variant:"outlined",required:!0,type:K?"text":"password",value:q,onChange:e=>J(e.target.value),InputProps:{endAdornment:(0,O.jsx)(p.A,{position:"end",children:(0,O.jsx)(f.A,{onClick:()=>Z((e=>!e)),edge:"end",children:K?(0,O.jsx)(C.A,{}):(0,O.jsx)(w.A,{})})})}})]}),2==z&&(0,O.jsxs)(l.A,{display:"flex",flexDirection:"column",spacing:3,children:[(0,O.jsx)(s.A,{variant:"h4",textAlign:"start",mb:3,children:"Enter Password"}),(0,O.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"Enter Password",variant:"outlined",required:!0,type:H?"text":"password",value:B,onChange:e=>U(e.target.value),InputProps:{endAdornment:(0,O.jsx)(p.A,{position:"end",children:(0,O.jsx)(f.A,{onClick:()=>G((e=>!e)),edge:"end",children:H?(0,O.jsx)(C.A,{}):(0,O.jsx)(w.A,{})})})}})]}),Q&&(0,O.jsxs)(l.A,{spacing:1.5,children:[(0,O.jsxs)(l.A,{direction:"row",justifyContent:"space-between",children:[(0,O.jsx)(h.A,{children:"Enter Password"}),(0,O.jsx)(v.A,{variant:"body2",sx:{cursor:"pointer"},onClick:()=>{P(""),$()},children:"Retry"})]}),(0,O.jsx)(d.A,{type:"passowrd",value:B,onChange:e=>U(e.target.value)})]}),(0,O.jsx)(o.A,{children:(0,O.jsx)(g.A,{fullWidth:!0,size:"large",type:"submit",variant:"contained",color:"primary",children:"Continue"})})]})})})]}),(0,O.jsxs)(l.A,{direction:"row",justifyContent:"center",alignItems:"center",flexWrap:"wrap",useFlexGap:!0,spacing:2,sx:{mt:3},children:[(0,O.jsx)(s.A,{variant:"caption",component:v.A,href:"https://nearle.in",target:"_blank",sx:{color:"#94a3b8",textDecoration:"none",fontWeight:600,"&:hover":{color:"#662582"}},children:"\xa9 All rights reserved"}),(0,O.jsx)(s.A,{variant:"caption",component:v.A,href:"https://nearle.in/terms",target:"_blank",sx:{color:"#94a3b8",textDecoration:"none",fontWeight:600,"&:hover":{color:"#662582"}},children:"Terms and Conditions"}),(0,O.jsx)(s.A,{variant:"caption",component:v.A,href:"https://nearle.in/privacy",target:"_blank",sx:{color:"#94a3b8",textDecoration:"none",fontWeight:600,"&:hover":{color:"#662582"}},children:"Privacy Policy"})]})]})})]})}},36080:(e,t,n)=>{n.d(t,{A:()=>C});var r=n(98587),a=n(58168),o=n(9950),i=n(72004),s=n(3484),l=n(89548),c=n(59254),u=n(18463),d=n(52695),p=n(31506),f=n(82053),h=n(45558),v=n(1614);function g(e){return(0,v.Ay)("MuiLink",e)}const y=(0,h.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var m=n(12703),b=n(99269);const A={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},x=e=>{let{theme:t,ownerState:n}=e;const r=(e=>A[e]||e)(n.color),a=(0,m.Yn)(t,"palette.".concat(r),!1)||n.color,o=(0,m.Yn)(t,"palette.".concat(r,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,b.X4)(a,.4)};var j=n(44414);const S=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],w=(0,c.Ay)(f.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,l.A)(n.underline))],"button"===n.component&&t.button]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,a.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:x({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(y.focusVisible)]:{outline:"auto"}})})),C=o.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiLink"}),{className:c,color:f="primary",component:h="a",onBlur:v,onFocus:y,TypographyClasses:m,underline:b="always",variant:x="inherit",sx:C}=n,k=(0,r.A)(n,S),{isFocusVisibleRef:O,onBlur:I,onFocus:D,ref:N}=(0,d.A)(),[E,P]=o.useState(!1),M=(0,p.A)(t,N),F=(0,a.A)({},n,{color:f,component:h,focusVisible:E,underline:b,variant:x}),Y=(e=>{const{classes:t,component:n,focusVisible:r,underline:a}=e,o={root:["root","underline".concat((0,l.A)(a)),"button"===n&&"button",r&&"focusVisible"]};return(0,s.A)(o,g,t)})(F);return(0,j.jsx)(w,(0,a.A)({color:f,className:(0,i.A)(Y.root,c),classes:m,component:h,onBlur:e=>{I(e),!1===O.current&&P(!1),v&&v(e)},onFocus:e=>{D(e),!0===O.current&&P(!0),y&&y(e)},ref:M,ownerState:F,variant:x,sx:[...Object.keys(A).includes(f)?[]:[{color:f}],...Array.isArray(C)?C:[C]]},k))}))},62375:(e,t,n)=>{var r=n(24994);t.A=void 0;var a=r(n(79526)),o=n(44414);t.A=(0,a.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},62462:(e,t,n)=>{var r=n(24994);t.A=void 0;var a=r(n(79526)),o=n(44414);t.A=(0,a.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")}}]); |