"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6641],{15494:function(e,t,n){n.d(t,{Z:function(){return b}});var r=n(30266),o=n(68216),c=n(25997),a=n(92809),i=n(809),s=n.n(i),u=n(9669),f=n.n(u),p=n(351),l=n(50169),h=n(84290),d=n(92953),v=n(18726);function y(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=(0,d.Z)(e);if(t){var o=(0,d.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,h.Z)(this,n)}}var R=function(e){(0,l.Z)(n,e);var t=y(n);function n(e,r,c,a,i){return(0,o.Z)(this,n),t.call(this,e,r,c,a,i)}return n}(v.Z);function E(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=(0,d.Z)(e);if(t){var o=(0,d.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,h.Z)(this,n)}}var _=function(e){(0,l.Z)(n,e);var t=E(n);function n(e,r,c,a,i){return(0,o.Z)(this,n),t.call(this,e,r,c,a,i)}return n}(v.Z);function Z(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=(0,d.Z)(e);if(t){var o=(0,d.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,h.Z)(this,n)}}var O=function(e){(0,l.Z)(n,e);var t=Z(n);function n(e,r,c,a,i){return(0,o.Z)(this,n),t.call(this,e,r,c,a,i)}return n}(v.Z);function g(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=(0,d.Z)(e);if(t){var o=(0,d.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,h.Z)(this,n)}}var C=function(e){(0,l.Z)(n,e);var t=g(n);function n(e,r,c,a,i){return(0,o.Z)(this,n),t.call(this,e,r,c,a,i)}return n}(v.Z);function m(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=(0,d.Z)(e);if(t){var o=(0,d.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,h.Z)(this,n)}}var T=function(e){(0,l.Z)(n,e);var t=m(n);function n(e,r,c,a,i){return(0,o.Z)(this,n),t.call(this,e,r,c,a,i)}return n}(v.Z);function w(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=(0,d.Z)(e);if(t){var o=(0,d.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,h.Z)(this,n)}}var I=function(e){(0,l.Z)(n,e);var t=w(n);function n(e,r,c,a,i){return(0,o.Z)(this,n),t.call(this,e,r,c,a,i)}return n}(v.Z);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var N={},b=function(){function e(t,n){(0,o.Z)(this,e),(0,a.Z)(this,"endPoint",void 0),(0,a.Z)(this,"baseURL",void 0),f().interceptors.request.use((function(e){if(e.baseURL=t,e.headers&&(0,p.U2)("token")){var n,r=JSON.parse(null!==(n=(0,p.U2)("token"))&&void 0!==n?n:"");e.headers.Authorization="Bearer ".concat(r.accessToken)}return e})),this.endPoint=n,this.baseURL=t}return(0,c.Z)(e,[{key:"get",value:function(){var e=(0,r.Z)(s().mark((function e(t){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f().get("".concat(this.endPoint).concat(this.getUrlParam(t)),N).then(this.handleResponse).catch(this.handleCatch);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=(0,r.Z)(s().mark((function e(t){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f().delete("".concat(this.endPoint).concat(this.getUrlParam(t)),N).then(this.handleResponse).catch(this.handleCatch);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"head",value:function(){var e=(0,r.Z)(s().mark((function e(t){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f().head("".concat(this.endPoint).concat(this.getUrlParam(t)),N).then(this.handleResponse).catch(this.handleCatch);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"post",value:function(){var e=(0,r.Z)(s().mark((function e(t,n){var r,o,c;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=N,n&&(r=k(k({},r),n)),o=this.baseURL?this.baseURL:"",e.next=5,f().post("".concat(o+this.endPoint),t,r).then(this.handleResponse).catch(this.handleCatch);case 5:return c=e.sent,e.abrupt("return",c);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"put",value:function(){var e=(0,r.Z)(s().mark((function e(t){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f().put("".concat(this.endPoint),t,N).then(this.handleResponse).catch(this.handleCatch);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"patch",value:function(){var e=(0,r.Z)(s().mark((function e(t){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f().patch("".concat(this.endPoint),t,k(k({},N),{},{headers:{"Content-Type":"application/json-patch+json"}})).then(this.handleResponse).catch(this.handleCatch);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleResponse",value:function(e){if(null==e.data)throw new R("CustomError",e.config,"",null,e);return e.data}},{key:"handleCatch",value:function(){var e=(0,r.Z)(s().mark((function e(t){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=window.location.pathname.split("/")[1],"UnexpectedError"!==t.type){e.next=3;break}throw new _("UnexpectedError",t.response.config,"",null,t.response);case 3:if("CustomError"!==t.type){e.next=5;break}throw new R("CustomError",t.response.config,"",null,t.response);case 5:if(null!=t.response){e.next=7;break}throw new O("NetworkError",t.config,"",null,t.response);case 7:e.t0=t.response.status,e.next=400===e.t0?10:401===e.t0?11:403===e.t0?14:500===e.t0?15:16;break;case 10:throw new C("BadRequestError",t.response.config,"",null,t.response);case 11:t.response.config,(0,p.U2)("token"),"message.error.invalidToken"==t.response.data.operationCode||("message.error.tokenNotProvided"==t.response.data.operationCode||"message.error.unauthorized"==t.response.data.operationCode||"message.error.invalidRefreshToken"==t.response.data.operationCode?window.location.href="/login/".concat(t.response.data.data.CollectionId,"/").concat(n):t.response.data.operationCode);case 14:throw new T("ForbiddenError",t.response.config,"",null,t.response);case 15:throw new I("ServerError",t.response.config,"",null,t.response);case 16:throw new _("UnexpectedError",t.response.config,"",null,t.response);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"getUrlParam",value:function(e){var t="";return e&&(Object.keys(e).length>0?(t="?",Object.keys(e).forEach((function(n,r){void 0!==e[r]&&null!==e[r]&&(t+="".concat(r,"=").concat(e[r],"&"))}))):t="/".concat(e)),t}}]),e}()},44013:function(e,t){t.Z={BASE_PATH:"https://share.minicoursegenerator.com/",GATEWAY_URL:"https://gateway.minicoursegenerator.com/",CDN_URL:"https://cdn.minicoursegenerator.com/",ADMIN_URL:"https://admin.minicoursegenerator.com/",GET_PRE_INFO:"api/Course/getPreInfo",GET_CARD_BY_CODE:"api/Course/getCardByCode",GET_COURSE_BY_COLLECTION_ID:"api/Course/GetCoursesByCollectionId",VERIFY_PAYMENT_CODE:"api/Course/verifyPaymentCode",SET_ANSWER:"api/Course/SetAnswer",SITEMAP:"api/course/sitemap",PAYMENT_INTENT_FOR_CARD:"api/Payment/createPaymentIntentForCard",VERIFY_PAYMENT_INTENT:"api/Payment/verifyPaymentIntent",SEND_SERTIFIER_DELIVERY:"api/Integration/SendSertifierDelivery",LEARNER_AUTH_LOGIN:"api/learner-auth/{collectionId}/login",LEARNER_AUTH_VERIFY:"api/learner-auth/confirm-magic-link",LEARNER_AUTH_REFRESH_TOKEN:"api/auth/refresh",GET_INFO_WITH_PAYMENT_ORDER:"api/order/{orderId}",CONFIRM_ORDER:"api/order/{orderId}/confirm",GET_COURSE_COUNT_BY_COLLECTION_ID:"api/coursecollection/templates/list",GET_USER_BADGE_INFO:"api/Badge/user-info",GET_BADGE_SHARE_INFO:"api/badge/share-info",GET_LOCALIZATION_STRING_OF_TYPE:"api/Localization/GetLocalizationStringOfType?Type={type}",LEARNER_AUTH_PROFILE:"api/learner-auth/profile",LEARNER_AUTH_LOGOUT:"api/auth/logout",CERTIFICATE_USER_INFO:"api/certificate/{collectionId}/user-info",CERTIFICATE_SHARE_INFO:"api/certificate/{certificateId}/share-info",GENERATE_ACCESS_INFO:"api/learner-auth/generate-access-info"}},18726:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(68216),o=n(25997),c=n(92809),a=function(){function e(t,n,o,a,i){(0,r.Z)(this,e),(0,c.Z)(this,"_type",void 0),(0,c.Z)(this,"_config",void 0),(0,c.Z)(this,"_code",void 0),(0,c.Z)(this,"_request",void 0),(0,c.Z)(this,"_response",void 0),this._config=n,this._code=o,this._request=a,this._response=i,this._type=t}return(0,o.Z)(e,[{key:"type",get:function(){return this._type}},{key:"config",get:function(){return this._config}},{key:"code",get:function(){return this._code}},{key:"request",get:function(){return this._request}},{key:"response",get:function(){return this._response}}]),e}()}}]);