From 02c8197678325e28808ffa820d19efed94b2f105 Mon Sep 17 00:00:00 2001 From: omkieit Date: Wed, 23 Oct 2024 23:25:15 +0530 Subject: [PATCH] done --- ef-ui/dist/assets/{index-DLb2856w.js => index-DjwKvwco.js} | 2 +- ef-ui/dist/index.html | 2 +- ef-ui/src/redux/features/fundSlice.js | 2 +- ef-ui/src/redux/features/propertySlice.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename ef-ui/dist/assets/{index-DLb2856w.js => index-DjwKvwco.js} (99%) diff --git a/ef-ui/dist/assets/index-DLb2856w.js b/ef-ui/dist/assets/index-DjwKvwco.js similarity index 99% rename from ef-ui/dist/assets/index-DLb2856w.js rename to ef-ui/dist/assets/index-DjwKvwco.js index 07909c9..4203954 100644 --- a/ef-ui/dist/assets/index-DLb2856w.js +++ b/ef-ui/dist/assets/index-DjwKvwco.js @@ -50,7 +50,7 @@ Error generating stack: `+i.message+` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[np]=this[np]={accessors:{}}).accessors,s=this.prototype;function i(a){const l=Ro(a);o[l]||(k0(s,a),o[l]=!0)}return z.isArray(t)?t.forEach(i):i(t),this}}at.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(at.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});z.freezeMethods(at);function Hl(e,t){const n=this||Ts,o=t||n,s=at.from(o.headers);let i=o.data;return z.forEach(e,function(l){i=l.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function jv(e){return!!(e&&e.__CANCEL__)}function mo(e,t,n){se.call(this,e??"canceled",se.ERR_CANCELED,t,n),this.name="CanceledError"}z.inherits(mo,se,{__CANCEL__:!0});function Nv(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new se("Request failed with status code "+n.status,[se.ERR_BAD_REQUEST,se.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function P0(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function _0(e,t){e=e||10;const n=new Array(e),o=new Array(e);let s=0,i=0,a;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),d=o[i];a||(a=c),n[s]=u,o[s]=c;let f=i,g=0;for(;f!==s;)g+=n[f++],f=f%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-a{n=d,s=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const d=Date.now(),f=d-n;f>=o?a(c,d):(s=c,i||(i=setTimeout(()=>{i=null,a(s)},o-f)))},()=>s&&a(s)]}const la=(e,t,n=3)=>{let o=0;const s=_0(50,250);return O0(i=>{const a=i.loaded,l=i.lengthComputable?i.total:void 0,u=a-o,c=s(u),d=a<=l;o=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:u,rate:c||void 0,estimated:c&&l&&d?(l-a)/c:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},rp=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},op=e=>(...t)=>z.asap(()=>e(...t)),T0=it.hasStandardBrowserEnv?function(){const t=it.navigator&&/(msie|trident)/i.test(it.navigator.userAgent),n=document.createElement("a");let o;function s(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=s(window.location.href),function(a){const l=z.isString(a)?s(a):a;return l.protocol===o.protocol&&l.host===o.host}}():function(){return function(){return!0}}(),R0=it.hasStandardBrowserEnv?{write(e,t,n,o,s,i){const a=[e+"="+encodeURIComponent(t)];z.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),z.isString(o)&&a.push("path="+o),z.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function A0(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function I0(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Cv(e,t){return e&&!A0(t)?I0(e,t):t}const sp=e=>e instanceof at?{...e}:e;function Cr(e,t){t=t||{};const n={};function o(c,d,f){return z.isPlainObject(c)&&z.isPlainObject(d)?z.merge.call({caseless:f},c,d):z.isPlainObject(d)?z.merge({},d):z.isArray(d)?d.slice():d}function s(c,d,f){if(z.isUndefined(d)){if(!z.isUndefined(c))return o(void 0,c,f)}else return o(c,d,f)}function i(c,d){if(!z.isUndefined(d))return o(void 0,d)}function a(c,d){if(z.isUndefined(d)){if(!z.isUndefined(c))return o(void 0,c)}else return o(void 0,d)}function l(c,d,f){if(f in t)return o(c,d);if(f in e)return o(void 0,c)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(c,d)=>s(sp(c),sp(d),!0)};return z.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=u[d]||s,g=f(e[d],t[d],d);z.isUndefined(g)&&f!==l||(n[d]=g)}),n}const bv=e=>{const t=Cr({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:l}=t;t.headers=a=at.from(a),t.url=gv(Cv(t.baseURL,t.url),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(z.isFormData(n)){if(it.hasStandardBrowserEnv||it.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[c,...d]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(it.hasStandardBrowserEnv&&(o&&z.isFunction(o)&&(o=o(t)),o||o!==!1&&T0(t.url))){const c=s&&i&&R0.read(i);c&&a.set(s,c)}return t},D0=typeof XMLHttpRequest<"u",F0=D0&&function(e){return new Promise(function(n,o){const s=bv(e);let i=s.data;const a=at.from(s.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:c}=s,d,f,g,C,x;function N(){C&&C(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function h(){if(!b)return;const m=at.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),E={data:!l||l==="text"||l==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:m,config:e,request:b};Nv(function(T){n(T),N()},function(T){o(T),N()},E),b=null}"onloadend"in b?b.onloadend=h:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(h)},b.onabort=function(){b&&(o(new se("Request aborted",se.ECONNABORTED,e,b)),b=null)},b.onerror=function(){o(new se("Network Error",se.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let y=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const E=s.transitional||xv;s.timeoutErrorMessage&&(y=s.timeoutErrorMessage),o(new se(y,E.clarifyTimeoutError?se.ETIMEDOUT:se.ECONNABORTED,e,b)),b=null},i===void 0&&a.setContentType(null),"setRequestHeader"in b&&z.forEach(a.toJSON(),function(y,E){b.setRequestHeader(E,y)}),z.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),l&&l!=="json"&&(b.responseType=s.responseType),c&&([g,x]=la(c,!0),b.addEventListener("progress",g)),u&&b.upload&&([f,C]=la(u),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",C)),(s.cancelToken||s.signal)&&(d=m=>{b&&(o(!m||m.type?new mo(null,e,b):m),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const v=P0(s.url);if(v&&it.protocols.indexOf(v)===-1){o(new se("Unsupported protocol "+v+":",se.ERR_BAD_REQUEST,e));return}b.send(i||null)})},M0=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,s;const i=function(c){if(!s){s=!0,l();const d=c instanceof Error?c:this.reason;o.abort(d instanceof se?d:new mo(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,i(new se(`timeout ${t} of ms exceeded`,se.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:u}=o;return u.unsubscribe=()=>z.asap(l),u}},L0=function*(e,t){let n=e.byteLength;if(!t||n{const s=B0(e,t);let i=0,a,l=u=>{a||(a=!0,o&&o(u))};return new ReadableStream({async pull(u){try{const{done:c,value:d}=await s.next();if(c){l(),u.close();return}let f=d.byteLength;if(n){let g=i+=f;n(g)}u.enqueue(new Uint8Array(d))}catch(c){throw l(c),c}},cancel(u){return l(u),s.return()}},{highWaterMark:2})},Ua=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",wv=Ua&&typeof ReadableStream=="function",$0=Ua&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Sv=(e,...t)=>{try{return!!e(...t)}catch{return!1}},W0=wv&&Sv(()=>{let e=!1;const t=new Request(it.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ap=64*1024,ru=wv&&Sv(()=>z.isReadableStream(new Response("").body)),ca={stream:ru&&(e=>e.body)};Ua&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ca[t]&&(ca[t]=z.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new se(`Response type '${t}' is not supported`,se.ERR_NOT_SUPPORT,o)})})})(new Response);const U0=async e=>{if(e==null)return 0;if(z.isBlob(e))return e.size;if(z.isSpecCompliantForm(e))return(await new Request(it.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(z.isArrayBufferView(e)||z.isArrayBuffer(e))return e.byteLength;if(z.isURLSearchParams(e)&&(e=e+""),z.isString(e))return(await $0(e)).byteLength},q0=async(e,t)=>{const n=z.toFiniteNumber(e.getContentLength());return n??U0(t)},V0=Ua&&(async e=>{let{url:t,method:n,data:o,signal:s,cancelToken:i,timeout:a,onDownloadProgress:l,onUploadProgress:u,responseType:c,headers:d,withCredentials:f="same-origin",fetchOptions:g}=bv(e);c=c?(c+"").toLowerCase():"text";let C=M0([s,i&&i.toAbortSignal()],a),x;const N=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let b;try{if(u&&W0&&n!=="get"&&n!=="head"&&(b=await q0(d,o))!==0){let E=new Request(t,{method:"POST",body:o,duplex:"half"}),k;if(z.isFormData(o)&&(k=E.headers.get("content-type"))&&d.setContentType(k),E.body){const[T,O]=rp(b,la(op(u)));o=ip(E.body,ap,T,O)}}z.isString(f)||(f=f?"include":"omit");const h="credentials"in Request.prototype;x=new Request(t,{...g,signal:C,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:o,duplex:"half",credentials:h?f:void 0});let v=await fetch(x);const m=ru&&(c==="stream"||c==="response");if(ru&&(l||m&&N)){const E={};["status","statusText","headers"].forEach(B=>{E[B]=v[B]});const k=z.toFiniteNumber(v.headers.get("content-length")),[T,O]=l&&rp(k,la(op(l),!0))||[];v=new Response(ip(v.body,ap,T,()=>{O&&O(),N&&N()}),E)}c=c||"text";let y=await ca[z.findKey(ca,c)||"text"](v,e);return!m&&N&&N(),await new Promise((E,k)=>{Nv(E,k,{data:y,headers:at.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:x})})}catch(h){throw N&&N(),h&&h.name==="TypeError"&&/fetch/i.test(h.message)?Object.assign(new se("Network Error",se.ERR_NETWORK,e,x),{cause:h.cause||h}):se.from(h,h&&h.code,e,x)}}),ou={http:i0,xhr:F0,fetch:V0};z.forEach(ou,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const lp=e=>`- ${e}`,H0=e=>z.isFunction(e)||e===null||e===!1,Ev={getAdapter:e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let n,o;const s={};for(let i=0;i`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since : `+i.map(lp).join(` `):" "+lp(i[0]):"as no adapter specified";throw new se("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:ou};function Kl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new mo(null,e)}function cp(e){return Kl(e),e.headers=at.from(e.headers),e.data=Hl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ev.getAdapter(e.adapter||Ts.adapter)(e).then(function(o){return Kl(e),o.data=Hl.call(e,e.transformResponse,o),o.headers=at.from(o.headers),o},function(o){return jv(o)||(Kl(e),o&&o.response&&(o.response.data=Hl.call(e,e.transformResponse,o.response),o.response.headers=at.from(o.response.headers))),Promise.reject(o)})}const kv="1.7.7",xd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{xd[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const up={};xd.transitional=function(t,n,o){function s(i,a){return"[Axios v"+kv+"] Transitional option '"+i+"'"+a+(o?". "+o:"")}return(i,a,l)=>{if(t===!1)throw new se(s(a," has been removed"+(n?" in "+n:"")),se.ERR_DEPRECATED);return n&&!up[a]&&(up[a]=!0,console.warn(s(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,l):!0}};function K0(e,t,n){if(typeof e!="object")throw new se("options must be an object",se.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let s=o.length;for(;s-- >0;){const i=o[s],a=t[i];if(a){const l=e[i],u=l===void 0||a(l,i,e);if(u!==!0)throw new se("option "+i+" must be "+u,se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new se("Unknown option "+i,se.ERR_BAD_OPTION)}}const su={assertOptions:K0,validators:xd},yn=su.validators;class fr{constructor(t){this.defaults=t,this.interceptors={request:new tp,response:new tp}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{o.stack?i&&!String(o.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(o.stack+=` -`+i):o.stack=i}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Cr(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:i}=n;o!==void 0&&su.assertOptions(o,{silentJSONParsing:yn.transitional(yn.boolean),forcedJSONParsing:yn.transitional(yn.boolean),clarifyTimeoutError:yn.transitional(yn.boolean)},!1),s!=null&&(z.isFunction(s)?n.paramsSerializer={serialize:s}:su.assertOptions(s,{encode:yn.function,serialize:yn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&z.merge(i.common,i[n.method]);i&&z.forEach(["delete","get","head","post","put","patch","common"],x=>{delete i[x]}),n.headers=at.concat(a,i);const l=[];let u=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(n)===!1||(u=u&&N.synchronous,l.unshift(N.fulfilled,N.rejected))});const c=[];this.interceptors.response.forEach(function(N){c.push(N.fulfilled,N.rejected)});let d,f=0,g;if(!u){const x=[cp.bind(this),void 0];for(x.unshift.apply(x,l),x.push.apply(x,c),g=x.length,d=Promise.resolve(n);f{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](s);o._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(l=>{o.subscribe(l),i=l}).then(s);return a.cancel=function(){o.unsubscribe(i)},a},t(function(i,a,l){o.reason||(o.reason=new mo(i,a,l),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new yd(function(s){t=s}),cancel:t}}}function Y0(e){return function(n){return e.apply(null,n)}}function G0(e){return z.isObject(e)&&e.isAxiosError===!0}const iu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(iu).forEach(([e,t])=>{iu[t]=e});function Pv(e){const t=new fr(e),n=sv(fr.prototype.request,t);return z.extend(n,fr.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Pv(Cr(e,s))},n}const ve=Pv(Ts);ve.Axios=fr;ve.CanceledError=mo;ve.CancelToken=yd;ve.isCancel=jv;ve.VERSION=kv;ve.toFormData=Wa;ve.AxiosError=se;ve.Cancel=ve.CanceledError;ve.all=function(t){return Promise.all(t)};ve.spread=Y0;ve.isAxiosError=G0;ve.mergeConfig=Cr;ve.AxiosHeaders=at;ve.formToJSON=e=>yv(z.isHTMLForm(e)?new FormData(e):e);ve.getAdapter=Ev.getAdapter;ve.HttpStatusCode=iu;ve.default=ve;const Q0="http://67.225.129.127:3002",mn=ve.create({baseURL:Q0});mn.interceptors.request.use(e=>(localStorage.getItem("profile")&&(e.headers.Authorization=`Bearer ${JSON.parse(localStorage.getItem("profile")).token}`),e));const X0=e=>mn.post("/users/signup",e),J0=e=>mn.post("/users/signin",e),Z0=(e,t,n)=>mn.get(`/users/${e}/verify/${t}`,n),eN=e=>mn.post("/properties",e),tN=(e,t,n)=>mn.get(`/properties/user/${e}?page=${t}&limit=${n}`,e),nN=e=>mn.get(`/properties/${e}`,e),rN=(e,t)=>mn.put(`/properties/${e}`,t),oN=e=>mn.get(`/users/${e}`),sN="http://67.225.129.127:3002",Ni=Et("auth/login",async({formValue:e,navigate:t},{rejectWithValue:n})=>{try{const o=await J0(e);return t("/dashboard"),o.data}catch(o){return n(o.response.data)}}),Ci=Et("auth/register",async({formValue:e,navigate:t,toast:n},{rejectWithValue:o})=>{try{const s=await X0(e);return console.log("response",s),n.success("Register Successfully"),t("/registrationsuccess"),s.data}catch(s){return o(s.response.data)}}),bi=Et("auth/updateUser",async({formData:e,toast:t,navigate:n},{rejectWithValue:o})=>{try{const s=await ve.put(`${sN}/users/update`,e);return t.success("Updated Successfully"),n("/login"),s.data}catch(s){return o(s.response.data)}}),_v=La({name:"auth",initialState:{user:null,error:"",loading:!1,isLoading:!1},reducers:{setUser:(e,t)=>{e.user=t.payload},setLogout:e=>{localStorage.clear(),e.user=null},setUserDetails:(e,t)=>{e.user=t.payload},updateUser:(e,t)=>{const n=t.payload;e.user={...e.user,...n}}},extraReducers:e=>{e.addCase(Ni.pending,t=>{t.loading=!0}).addCase(Ni.fulfilled,(t,n)=>{t.loading=!1,localStorage.setItem("profile",JSON.stringify({...n.payload})),t.user=n.payload}).addCase(Ni.rejected,(t,n)=>{t.loading=!1,t.error=n.payload.message}).addCase(Ci.pending,t=>{t.loading=!0}).addCase(Ci.fulfilled,(t,n)=>{t.loading=!1,localStorage.setItem("profile",JSON.stringify({...n.payload})),t.user=n.payload}).addCase(Ci.rejected,(t,n)=>{t.loading=!1,t.error=n.payload.message}).addCase(bi.pending,t=>{t.isLoading=!0}).addCase(bi.fulfilled,(t,n)=>{t.isLoading=!1,t.user=n.payload}).addCase(bi.rejected,(t,n)=>{t.isLoading=!1,t.error=n.payload})}}),{setUser:Gw,setLogout:iN,setUserDetails:Qw}=_v.actions,aN=_v.reducer,wi=Et("user/showUser",async(e,{rejectWithValue:t})=>{try{return(await oN(e)).data}catch(n){return t(n.response.data)}}),Si=Et("user/verifyEmail",async({id:e,token:t,data:n},{rejectWithValue:o})=>{try{return(await Z0(e,t,n)).data.message}catch(s){return o(s.response.data)}}),lN=La({name:"user",initialState:{users:[],error:"",loading:!1,verified:!1,user:{}},reducers:{},extraReducers:e=>{e.addCase(wi.pending,t=>{t.loading=!0,t.error=null}).addCase(wi.fulfilled,(t,n)=>{t.loading=!1,t.user=n.payload}).addCase(wi.rejected,(t,n)=>{t.loading=!1,t.error=n.payload}).addCase(Si.pending,t=>{t.loading=!0,t.error=null}).addCase(Si.fulfilled,(t,n)=>{t.loading=!1,t.verified=n.payload==="Email verified successfully"}).addCase(Si.rejected,(t,n)=>{t.loading=!1,t.error=n.error.message})}}),cN=lN.reducer,Ei=Et("property/submitProperty",async(e,{rejectWithValue:t})=>{try{return(await eN(e)).data}catch(n){return t(n.response.data)}}),ki=Et("property/fetchUserProperties",async({userId:e,page:t,limit:n},{rejectWithValue:o})=>{try{return(await tN(e,t,n)).data}catch(s){return o(s.response.data)}}),Go=Et("property/fetchPropertyById",async(e,{rejectWithValue:t})=>{try{return(await nN(e)).data}catch(n){return t(n.response.data)}}),Pi=Et("property/updateProperty",async({id:e,propertyData:t},{rejectWithValue:n})=>{try{return(await rN(e,t)).data}catch(o){return n(o.response.data)}}),_i=Et("property/addFundDetails",async({id:e,fundDetails:t,toast:n},{rejectWithValue:o})=>{try{const s=await ve.put(`http://localhost:3002/properties/${e}/fund-details`,t);return n.success("Submitted Successfully"),s.data}catch(s){return o(s.response.data)}}),Qo=Et("properties/getProperties",async({page:e,limit:t,keyword:n=""})=>(await ve.get(`http://67.225.129.127:3002/properties?page=${e}&limit=${t}&keyword=${n}`)).data),uN=La({name:"property",initialState:{property:{},status:"idle",error:null,userProperties:[],selectedProperty:null,totalPages:0,currentPage:1,loading:!1,properties:[]},reducers:{},extraReducers:e=>{e.addCase(Ei.pending,t=>{t.status="loading"}).addCase(Ei.fulfilled,(t,n)=>{t.status="succeeded",t.property=n.payload}).addCase(Ei.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(ki.pending,t=>{t.loading=!0}).addCase(ki.fulfilled,(t,{payload:n})=>{t.loading=!1,t.userProperties=n.properties,t.totalPages=n.totalPages,t.currentPage=n.currentPage}).addCase(ki.rejected,(t,{payload:n})=>{t.loading=!1,t.error=n}).addCase(Go.pending,t=>{t.status="loading"}).addCase(Go.fulfilled,(t,n)=>{t.status="succeeded",t.selectedProperty=n.payload}).addCase(Go.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(Pi.pending,t=>{t.status="loading"}).addCase(Pi.fulfilled,(t,n)=>{t.status="succeeded",t.selectedProperty=n.payload}).addCase(Pi.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(Qo.pending,t=>{t.loading=!0}).addCase(Qo.fulfilled,(t,n)=>{t.loading=!1,t.properties=n.payload.data,t.totalPages=n.payload.totalPages,t.currentPage=n.payload.currentPage}).addCase(Qo.rejected,(t,n)=>{t.loading=!1,t.error=n.error.message}).addCase(_i.pending,t=>{t.loading=!0}).addCase(_i.fulfilled,(t,n)=>{t.loading=!1,t.property=n.payload.property}).addCase(_i.rejected,(t,n)=>{t.loading=!1,t.error=n.payload})}}),dN=uN.reducer,Xo=Et("fundDetails/fetchFundDetails",async(e,{rejectWithValue:t})=>{try{return(await ve.get(`http://localhost:3002/properties/${e}/fund-details`)).data.fundDetails}catch(n){return t(n.response.data)}}),fN=La({name:"fundDetails",initialState:{fundDetails:[],loading:!1,error:null},reducers:{},extraReducers:e=>{e.addCase(Xo.pending,t=>{t.loading=!0}).addCase(Xo.fulfilled,(t,n)=>{t.loading=!1,t.fundDetails=n.payload}).addCase(Xo.rejected,(t,n)=>{t.loading=!1,t.error=n.payload})}}),pN=fN.reducer,mN=t1({reducer:{auth:aN,user:cN,property:dN,fundDetails:pN}});/** +`+i):o.stack=i}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Cr(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:i}=n;o!==void 0&&su.assertOptions(o,{silentJSONParsing:yn.transitional(yn.boolean),forcedJSONParsing:yn.transitional(yn.boolean),clarifyTimeoutError:yn.transitional(yn.boolean)},!1),s!=null&&(z.isFunction(s)?n.paramsSerializer={serialize:s}:su.assertOptions(s,{encode:yn.function,serialize:yn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&z.merge(i.common,i[n.method]);i&&z.forEach(["delete","get","head","post","put","patch","common"],x=>{delete i[x]}),n.headers=at.concat(a,i);const l=[];let u=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(n)===!1||(u=u&&N.synchronous,l.unshift(N.fulfilled,N.rejected))});const c=[];this.interceptors.response.forEach(function(N){c.push(N.fulfilled,N.rejected)});let d,f=0,g;if(!u){const x=[cp.bind(this),void 0];for(x.unshift.apply(x,l),x.push.apply(x,c),g=x.length,d=Promise.resolve(n);f{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](s);o._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(l=>{o.subscribe(l),i=l}).then(s);return a.cancel=function(){o.unsubscribe(i)},a},t(function(i,a,l){o.reason||(o.reason=new mo(i,a,l),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new yd(function(s){t=s}),cancel:t}}}function Y0(e){return function(n){return e.apply(null,n)}}function G0(e){return z.isObject(e)&&e.isAxiosError===!0}const iu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(iu).forEach(([e,t])=>{iu[t]=e});function Pv(e){const t=new fr(e),n=sv(fr.prototype.request,t);return z.extend(n,fr.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Pv(Cr(e,s))},n}const ve=Pv(Ts);ve.Axios=fr;ve.CanceledError=mo;ve.CancelToken=yd;ve.isCancel=jv;ve.VERSION=kv;ve.toFormData=Wa;ve.AxiosError=se;ve.Cancel=ve.CanceledError;ve.all=function(t){return Promise.all(t)};ve.spread=Y0;ve.isAxiosError=G0;ve.mergeConfig=Cr;ve.AxiosHeaders=at;ve.formToJSON=e=>yv(z.isHTMLForm(e)?new FormData(e):e);ve.getAdapter=Ev.getAdapter;ve.HttpStatusCode=iu;ve.default=ve;const Q0="http://67.225.129.127:3002",mn=ve.create({baseURL:Q0});mn.interceptors.request.use(e=>(localStorage.getItem("profile")&&(e.headers.Authorization=`Bearer ${JSON.parse(localStorage.getItem("profile")).token}`),e));const X0=e=>mn.post("/users/signup",e),J0=e=>mn.post("/users/signin",e),Z0=(e,t,n)=>mn.get(`/users/${e}/verify/${t}`,n),eN=e=>mn.post("/properties",e),tN=(e,t,n)=>mn.get(`/properties/user/${e}?page=${t}&limit=${n}`,e),nN=e=>mn.get(`/properties/${e}`,e),rN=(e,t)=>mn.put(`/properties/${e}`,t),oN=e=>mn.get(`/users/${e}`),sN="http://67.225.129.127:3002",Ni=Et("auth/login",async({formValue:e,navigate:t},{rejectWithValue:n})=>{try{const o=await J0(e);return t("/dashboard"),o.data}catch(o){return n(o.response.data)}}),Ci=Et("auth/register",async({formValue:e,navigate:t,toast:n},{rejectWithValue:o})=>{try{const s=await X0(e);return console.log("response",s),n.success("Register Successfully"),t("/registrationsuccess"),s.data}catch(s){return o(s.response.data)}}),bi=Et("auth/updateUser",async({formData:e,toast:t,navigate:n},{rejectWithValue:o})=>{try{const s=await ve.put(`${sN}/users/update`,e);return t.success("Updated Successfully"),n("/login"),s.data}catch(s){return o(s.response.data)}}),_v=La({name:"auth",initialState:{user:null,error:"",loading:!1,isLoading:!1},reducers:{setUser:(e,t)=>{e.user=t.payload},setLogout:e=>{localStorage.clear(),e.user=null},setUserDetails:(e,t)=>{e.user=t.payload},updateUser:(e,t)=>{const n=t.payload;e.user={...e.user,...n}}},extraReducers:e=>{e.addCase(Ni.pending,t=>{t.loading=!0}).addCase(Ni.fulfilled,(t,n)=>{t.loading=!1,localStorage.setItem("profile",JSON.stringify({...n.payload})),t.user=n.payload}).addCase(Ni.rejected,(t,n)=>{t.loading=!1,t.error=n.payload.message}).addCase(Ci.pending,t=>{t.loading=!0}).addCase(Ci.fulfilled,(t,n)=>{t.loading=!1,localStorage.setItem("profile",JSON.stringify({...n.payload})),t.user=n.payload}).addCase(Ci.rejected,(t,n)=>{t.loading=!1,t.error=n.payload.message}).addCase(bi.pending,t=>{t.isLoading=!0}).addCase(bi.fulfilled,(t,n)=>{t.isLoading=!1,t.user=n.payload}).addCase(bi.rejected,(t,n)=>{t.isLoading=!1,t.error=n.payload})}}),{setUser:Gw,setLogout:iN,setUserDetails:Qw}=_v.actions,aN=_v.reducer,wi=Et("user/showUser",async(e,{rejectWithValue:t})=>{try{return(await oN(e)).data}catch(n){return t(n.response.data)}}),Si=Et("user/verifyEmail",async({id:e,token:t,data:n},{rejectWithValue:o})=>{try{return(await Z0(e,t,n)).data.message}catch(s){return o(s.response.data)}}),lN=La({name:"user",initialState:{users:[],error:"",loading:!1,verified:!1,user:{}},reducers:{},extraReducers:e=>{e.addCase(wi.pending,t=>{t.loading=!0,t.error=null}).addCase(wi.fulfilled,(t,n)=>{t.loading=!1,t.user=n.payload}).addCase(wi.rejected,(t,n)=>{t.loading=!1,t.error=n.payload}).addCase(Si.pending,t=>{t.loading=!0,t.error=null}).addCase(Si.fulfilled,(t,n)=>{t.loading=!1,t.verified=n.payload==="Email verified successfully"}).addCase(Si.rejected,(t,n)=>{t.loading=!1,t.error=n.error.message})}}),cN=lN.reducer,Ei=Et("property/submitProperty",async(e,{rejectWithValue:t})=>{try{return(await eN(e)).data}catch(n){return t(n.response.data)}}),ki=Et("property/fetchUserProperties",async({userId:e,page:t,limit:n},{rejectWithValue:o})=>{try{return(await tN(e,t,n)).data}catch(s){return o(s.response.data)}}),Go=Et("property/fetchPropertyById",async(e,{rejectWithValue:t})=>{try{return(await nN(e)).data}catch(n){return t(n.response.data)}}),Pi=Et("property/updateProperty",async({id:e,propertyData:t},{rejectWithValue:n})=>{try{return(await rN(e,t)).data}catch(o){return n(o.response.data)}}),_i=Et("property/addFundDetails",async({id:e,fundDetails:t,toast:n},{rejectWithValue:o})=>{try{const s=await ve.put(`http://67.225.129.127:3002/properties/${e}/fund-details`,t);return n.success("Submitted Successfully"),s.data}catch(s){return o(s.response.data)}}),Qo=Et("properties/getProperties",async({page:e,limit:t,keyword:n=""})=>(await ve.get(`http://67.225.129.127:3002/properties?page=${e}&limit=${t}&keyword=${n}`)).data),uN=La({name:"property",initialState:{property:{},status:"idle",error:null,userProperties:[],selectedProperty:null,totalPages:0,currentPage:1,loading:!1,properties:[]},reducers:{},extraReducers:e=>{e.addCase(Ei.pending,t=>{t.status="loading"}).addCase(Ei.fulfilled,(t,n)=>{t.status="succeeded",t.property=n.payload}).addCase(Ei.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(ki.pending,t=>{t.loading=!0}).addCase(ki.fulfilled,(t,{payload:n})=>{t.loading=!1,t.userProperties=n.properties,t.totalPages=n.totalPages,t.currentPage=n.currentPage}).addCase(ki.rejected,(t,{payload:n})=>{t.loading=!1,t.error=n}).addCase(Go.pending,t=>{t.status="loading"}).addCase(Go.fulfilled,(t,n)=>{t.status="succeeded",t.selectedProperty=n.payload}).addCase(Go.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(Pi.pending,t=>{t.status="loading"}).addCase(Pi.fulfilled,(t,n)=>{t.status="succeeded",t.selectedProperty=n.payload}).addCase(Pi.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(Qo.pending,t=>{t.loading=!0}).addCase(Qo.fulfilled,(t,n)=>{t.loading=!1,t.properties=n.payload.data,t.totalPages=n.payload.totalPages,t.currentPage=n.payload.currentPage}).addCase(Qo.rejected,(t,n)=>{t.loading=!1,t.error=n.error.message}).addCase(_i.pending,t=>{t.loading=!0}).addCase(_i.fulfilled,(t,n)=>{t.loading=!1,t.property=n.payload.property}).addCase(_i.rejected,(t,n)=>{t.loading=!1,t.error=n.payload})}}),dN=uN.reducer,Xo=Et("fundDetails/fetchFundDetails",async(e,{rejectWithValue:t})=>{try{return(await ve.get(`http://67.225.129.127:3002/properties/${e}/fund-details`)).data.fundDetails}catch(n){return t(n.response.data)}}),fN=La({name:"fundDetails",initialState:{fundDetails:[],loading:!1,error:null},reducers:{},extraReducers:e=>{e.addCase(Xo.pending,t=>{t.loading=!0}).addCase(Xo.fulfilled,(t,n)=>{t.loading=!1,t.fundDetails=n.payload}).addCase(Xo.rejected,(t,n)=>{t.loading=!1,t.error=n.payload})}}),pN=fN.reducer,mN=t1({reducer:{auth:aN,user:cN,property:dN,fundDetails:pN}});/** * @remix-run/router v1.19.1 * * Copyright (c) Remix Software Inc. diff --git a/ef-ui/dist/index.html b/ef-ui/dist/index.html index 09b6e2f..a271a5f 100644 --- a/ef-ui/dist/index.html +++ b/ef-ui/dist/index.html @@ -45,7 +45,7 @@ - + diff --git a/ef-ui/src/redux/features/fundSlice.js b/ef-ui/src/redux/features/fundSlice.js index cd6d6bf..11c4572 100644 --- a/ef-ui/src/redux/features/fundSlice.js +++ b/ef-ui/src/redux/features/fundSlice.js @@ -6,7 +6,7 @@ export const fetchFundDetails = createAsyncThunk( 'fundDetails/fetchFundDetails', async (id, { rejectWithValue }) => { try { - const response = await axios.get(`http://localhost:3002/properties/${id}/fund-details`); + const response = await axios.get(`${import.meta.env.VITE_REACT_APP_SECRET}/properties/${id}/fund-details`); return response.data.fundDetails; } catch (error) { return rejectWithValue(error.response.data); diff --git a/ef-ui/src/redux/features/propertySlice.js b/ef-ui/src/redux/features/propertySlice.js index c00ce3d..1585498 100644 --- a/ef-ui/src/redux/features/propertySlice.js +++ b/ef-ui/src/redux/features/propertySlice.js @@ -70,7 +70,7 @@ export const addFundDetails = createAsyncThunk( async ({ id, fundDetails, toast }, { rejectWithValue }) => { try { const response = await axios.put( - `http://localhost:3002/properties/${id}/fund-details`, + `${import.meta.env.VITE_REACT_APP_SECRET}/properties/${id}/fund-details`, fundDetails); toast.success("Submitted Successfully"); return response.data;