PageSourceSearch

https://myedgelearning.com/_next/static/chunks/4824-22dde596e666e84e.js

js myedgelearning.com collected 2026-10-02 01:37:00 UTC 8,523 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4824],{15725:function(t,e,n){var r=n(83454);Object.defineProperty(e,"__esModule",{value:!0});var i=n(60932).Z,s=n(50337).Z,o=n(49961).Z,a=n(32401).Z,u="https://myedgelearning.com",c="true"===r.env.DOCKER_STORAGE_REWRITE,l=r.env.DOCKER_BACKEND_INTERNAL_URL||"https://myedgelearning.com",f={trailingSlash:!0,basePath:"",env:{api:"https://myedgelearning.com/api",FRONTEND_URL:u},rewrites:function(){return i((function(){return a(this,(function(t){return c?[2,[{source:"/storage/:path*",destination:"".concat(l,"/storage/:path*")}]]:[2,[]]}))}))()},webpack:function(t,e){return e.dev&&(t.watchOptions={poll:1e3,aggregateTimeout:300}),t.watchOptions=o(s({},t.watchOptions),{ignored:["**/node_modules","**/public/bibi-bookshelf/**","**/public/storage/**"]}),t}};f.assetPrefix=u,t.exports=f},78904:function(t,e,n){n.d(e,{D:function(){return s}});var r=n(85893),i=n(15725);e.Z=function(t){return(0,r.jsx)("img",{src:"".concat(i.basePath,"/myedgeLogo.png"),style:{width:null===t||void 0===t?void 0:t.width}})};var s=function(t){return(0,r.jsx)("img",{src:"".concat(i.basePath,"/AbivaLogo.png"),style:{width:null===t||void 0===t?void 0:t.width}})}},16037:function(t,e,n){n.d(e,{a:function(){return p}});var r=n(47568),i=n(41799),s=n(99534),o=n(97582),a=n(8100),u=n(76906),c=n(67294),l=n(11163),f=n(15725),d=n(86455),h=n.n(d),p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.middleware,n=t.redirectIfAuthenticated,d=(0,l.useRouter)(),p=(0,a.ZP)("/api/user",(function(){return u.Z.get("/api/user").then((function(t){var e,n,r=null===(n=null===t||void 0===t||null===(e=t.data)||void 0===e?void 0:e.session[0])||void 0===n?void 0:n.token;return localStorage.getItem("token")&&r&&r!=localStorage.getItem("token")&&j(),localStorage.setItem("token",r),t.data}
1)).catch((function(t){if(404===t.response.status&&j(),409!==t.response.status)throw t;d.push("/verify-email")}))}),{revalidateOnFocus:!1,revalidateOnMount:!0,revalidateOnReconnect:!1,refreshWhenOffline:!1,refreshWhenHidden:!1,refreshInterval:1e4}),v=p.data,g=p.isValidating,m=p.error,y=p.mutate,_=function(){return u.Z.get("/sanctum/csrf-cookie")},b=function(t,e){h().fire({position:"center",icon:"success",title:t,text:e,showConfirmButton:!0})},w=function(t,e){var n=null===e||void 0===e?void 0:e.replace(/ *\([^)]*\) */g,"").replace("values)","");h().fire({position:"center",icon:"error",title:t,text:n,showConfirmButton:!0})},Z=function(){var t=(0,r.Z)((function(t){var e,n,i;return(0,o.__generator)(this,(function(a){switch(a.label){case 0:return e=t.setErrors,n=t.setLoading,i=(0,s.Z)(t,["setErrors","setLoading"]),[4,_()];case 1:return a.sent(),e([]),u.Z.post("/test-register",i).then((0,r.Z)((function(){return(0,o.__generator)(this,(function(t){switch(t.label){case 0:return[4,b("Registration Successful","OTP has been sent to your email. Please verify your email to login.")];case 1:return t.sent(),d.push("/login"),[2]}}))}))).catch((function(t){var n,r;w("Registration Failed",null===(n=t.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.message),e(Object.values(t.response.data.errors).flat())})).finally((function(){n(!1)})),[2]}}))}));return function(e){return t.apply(this,arguments)}}(),E=function(){var t=(0,r.Z)((function(t){var e,n,i;return(0,o.__generator)(this,(function(s){switch(s.label){case 0:return e=t.setLoading,n=t.token,i=t.otp,[4,_()];case 1:return s.sent(),u.Z.post("/test-verify",{token:n,otp:i}).then((0,r.Z)((function(){return(0,o.__generator)(this,(function(t){return b("Email Verified","You have successfully verified your email. You can now login."),d.push("/login"),[2]}))}))).catch((function(t){w("Email Verification Failed",t.response.data.message)})).finally((function(){e(!1)})),[2]}}))}));return function(e){return t.apply(this,arguments)}}(),O=function(){var t=(0,r.Z)((function(t){var e,n;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return e=t.setLoading,n=t.token,[4,_()];case 1:return i.sent(),u.Z.post("/test-resend",{token:n}).then((0,r.Z)((function(){return(0,o.__generator)(this,(function(t){return b("Resend Email Success","OTP has been sent to your email. Please verify your email to login."),[2]}))}))).catch((function(t){var e,n;w("Registration Failed",null===(e=t.response)||void 0===e||null===(n=e.data)||void 0===n?void 0:n.message),setErrors(Object.values(t.response.data.errors).flat())})).finally((function(){e(!1)})),[2]}}))}));return function(e){return t.apply(this,arguments)}}(),R=function(){var t=(0,r.Z)((function(t){var e,n,r,i;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return e=t.setErrors,n=t.setStatus,r=t.setLoading,i=(0,s.Z)(t,["setErrors","setStatus","setLoading"]),[4,_()];case 1:return o.sent(),e([]),n(null),u.Z.post("/login",i).then((function(){return y()})).catch((function(t){if(422!==t.response.status)throw t;e(Object.values(t.response.data.errors).flat())})).finally((function(){r(!1)})),[2]}}))}));return function(e){return t.apply(this,arguments)}}(),k=function(){var t=(0,r.Z)((function(t){var e,n,r,i;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return e=t.setErrors,n=t.setLoading,r=(0,s.Z)(t,["setErrors","setLoading"]),[4,_()];case 1:return o.sent(),e([]),i=!0,u.Z.post("/update-profile",r).then((function(){return y()})).catch((function(t){var e,n,r=null===t||void 0===t||null===(e=t.response)||void 0===e||null===(n=e.data)||void 0===n?void 0:n.message;w("Profile Update Failed",r),i=!1})).finally((function(){n(!1),i&&b("Profile Updated","You have successfully updated your profile")})),[2]}}))}));return function(e){return t.apply(this,arguments)}}(),L=function(){var t=(0,r.Z)((function(t){var e,n,r,i;return(0,o.__generator)(this,(function(s){switch(s.label){case 0:return e=t.setErrors,n=t.setStatus,r=t.setLoading,i=t.email,[4,_()];case 1:return s.sent(),e([]),n(null),u.Z.post("/forgot-password",{email:i}).then((function(t){return n(t.data.status)})).catch((function(t){if(422!==t.response.status)throw t;e(Object.values(t.response.data.errors).flat())})).finally((function(){r(!1)})),[2]}}))}));return function(e){return t.apply(this,arguments)}}(),P=function(){var t=(0,r.Z)((function(t){var e,n,r,a;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return e=t.setErrors,n=t.setStatus,r=t.setLoading,a=(0,s.Z)(t,["setErrors","setStatus","setLoading"]),[4,_()];case 1:return o.sent(),e([]),n(null),u.Z.post("/reset-password",(0,i.Z)({token:d.query.token},a)).then((function(t){return d.push("/login?reset="+btoa(t.data.status))})).catch((function(t){if(422!==t.response.status)throw t;e(Object.values(t.response.data.errors).flat())})).finally((function(){r(!1)})),[2]}}))}));return function(e){return t.apply(this,arguments)}}(),S=function(){var t=(0,r.Z)((function(t){var e,n;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return e=t.setStatus,(n=t.setLoading)(!0),[4,u.Z.post("/test-resend-mail").then(function(){var t=(0,r.Z)((function(t){return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return e(t.data.status),[4,b("Resend Email Success","Email OTP link has been sent to your email. Please verify your email to login.")];case 1:return n.sent(),[2]}}))}));return function(e){return t.apply(this,arguments)}}()).catch((function(t){var e,n;w("Resend Email Failed",null===(e=t.response)||void 0===e||null===(n=e.data)||void 0===n?void 0:n.message)})).finally((function(){n(!1)}))];case 1:return i.sent(),[2]}}))}));return function(e){return t.apply(this,arguments)}}(),j=function(){var t=(0,r.Z)((function(){return(0,o.__generator)(this,(function(t){switch(t.label){case 0:return m?[3,2]:[4,u.Z.post("/logout").then((function(){return y()}))];case 1:t.sent(),t.label=2;case 2:return window.location.pathname="".concat(f.basePath,"/login"),[2]}}))}));return function(){return t.apply(this,arguments)}}();return(0,c.useEffect)((function(){"admin"===e&&3!==(null===v||void 0===v?void 0:v.access_id)&&d.push("/access-denied"),"guest"===e&&n&&v&&d.push(3!==(null===v||void 0===v?void 0:v.access_id)||(null===v||void 0===v?void 0:v.is_intern)?"/ebook":n),"auth"!==e&&"admin"!==e||!m||j()}),[v,m]),{user:v,isValidating:g,register:Z,verify:E,resendVerification:O,login:R,updateProfile:k,forgotPassword:L,resetPassword:P,resendEmailVerification:S,logout:j}}},76906:function(t,e,n){var r,i=n(9669),s=n.n(i)().create({baseURL:(r="https://myedgelearning.com/api",r.replace(/\/$/,"")),headers:{"X-Requested-With":"XMLHttpRequest"},withCredentials:!0});e.Z=s}}]);

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.