(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6d95ecfe"],{1978:function(e,t,n){e.exports=n.p+"img/svensk-logo.0ceb2bf1.png"},2076:function(e,t,n){e.exports=n.p+"img/mapify-logo.00c03d10.png"},"20ea":function(e,t,n){"use strict";n("e74f")},"57a7":function(e,t,n){e.exports=n.p+"img/traxter-logo.6279b716.png"},"57fb":function(e,t,n){e.exports=n.p+"img/posiq-logo.fcbaf477.png"},7584:function(e,t,n){var r={"./mapify-logo.png":"2076","./posiq-logo.png":"57fb","./svensk-logo.png":"1978","./traxter-logo.png":"57a7","./user-avatar.png":"fa37"};function a(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=s,e.exports=a,a.id="7584"},"7c69":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}));n("dca8");var r=Object.freeze({UNKNOWN_ERROR:"Hoppsan! Något gick fel, försök igen!",INVALID_CREDENTIALS:"Fel inloggningsuppgifter!",BOX_ALREADY_EXISTS:"Detta IMEI-nummer finns redan i bruk!",VEHICLE_ALREADY_EXISTS:"Detta fordon finns redan!",USER_ALREADY_EXISTS:"Denna e-post används redan som användarnamn!",COMPANY_ALREADY_EXISTS:"Detta företag finns redan!",PASSWORD_RESET_SUCCESS:"En återställningslänk har skickats till din e-post!",BOX_DELETED:"Enheten togs bort!",SOMETHING_WENT_WRONG:"Hoppsan! Något gick fel, försök igen!"}),a=Object.freeze({ERR_0000:r.UNKNOWN_ERROR,ERR_0001:r.INVALID_CREDENTIALS,ERR_0002:r.BOX_ALREADY_EXISTS,ERR_0003:r.VEHICLE_ALREADY_EXISTS,ERR_0004:r.USER_ALREADY_EXISTS,ERR_0005:r.COMPANY_ALREADY_EXISTS}),s=function(e){return a[e]?a[e]:r.UNKNOWN_ERROR},o=function(e){var t=null===e||void 0===e?void 0:e.response.data,n=t.drivelogErrorCode;return s(n)}},bb2f:function(e,t,n){var r=n("d039");e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},dca8:function(e,t,n){var r=n("23e7"),a=n("bb2f"),s=n("d039"),o=n("861d"),i=n("f183").onFreeze,c=Object.freeze,u=s((function(){c(1)}));r({target:"Object",stat:!0,forced:u,sham:!a},{freeze:function(e){return c&&o(e)?c(i(e)):e}})},dd7b:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"auth-page d-flex"},[r("div",{staticClass:"auth-page__content"},[e.logo?r("img",{staticClass:"posiq-logo",attrs:{src:n("7584")("./"+e.logo),alt:"posiq-logo"}}):e._e(),e.showResetPassword?[r("div",{staticClass:"mb-4 mt-2 note-text"},[e._v(" En återställningslänk kommer att skickas till din e-post. ")]),r("validation-observer",{scopedSlots:e._u([{key:"default",fn:function(t){t.valid;return[r("validation-provider",{attrs:{rules:"required|email"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.invalid;return[r("input-field",{staticClass:"mb-4",attrs:{id:"E-post",type:"text",label:"E-post"},model:{value:e.resetEmail,callback:function(t){e.resetEmail=t},expression:"resetEmail"}}),r("app-button",{staticClass:"btn--block btn--primary mb-3",attrs:{disabled:n,loading:e.loading},on:{click:e.sendResetEmail}},[e._v("Återställ lösenord")])]}}],null,!0)})]}}])}),r("app-button",{staticClass:"btn--block btn--transparent",on:{click:function(t){e.showResetPassword=!1}}},[e._v("Tillbaka")])]:r("form",{on:{submit:function(t){return t.preventDefault(),e.login(t)}}},[r("input-field",{staticClass:"mb-4",attrs:{id:"username",type:"text",label:"Användarnamn"},model:{value:e.username,callback:function(t){e.username=t},expression:"username"}}),r("input-field",{staticClass:"mb-4",attrs:{id:"password",type:"password",label:"Lösenord"},scopedSlots:e._u([{key:"right-label",fn:function(){return[r("span",{staticClass:"action-small",on:{click:function(t){e.showResetPassword=!0}}},[e._v("Glömt lösenord?")])]},proxy:!0}],null,!1,30548781),model:{value:e.password,callback:function(t){e.password=t},expression:"password"}}),r("app-button",{staticClass:"btn--block btn--primary",attrs:{loading:e.loading}},[e._v("Logga in")])],1)],2)])},a=[],s=n("1da1"),o=(n("96cf"),n("a789")),i=n("5c40"),c=n("4eef"),u=n("1568"),l=n("7c69"),f={components:{AppButton:i["a"]},data:function(){return{loading:!1,username:"",password:"",resetEmail:"",showResetPassword:!1,logo:null}},methods:{login:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,t.next=4,o["a"].login(e.username,e.password);case 4:return n=t.sent,Object(c["c"])(n),e.$store.commit("setUser",n.access_token),t.next=9,e.$router.push("/");case 9:t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](0),e.$notify.error("Fel inloggningsuppgifter!");case 14:return t.prev=14,e.loading=!1,t.finish(14);case 17:case"end":return t.stop()}}),t,null,[[0,11,14,17]])})))()},sendResetEmail:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,o["a"].sendResetEmail(e.resetEmail);case 3:e.$notify.success(l["b"].PASSWORD_RESET_SUCCESS),t.next=9;break;case 6:t.prev=6,t.t0=t["catch"](0),e.$notify.error("E-posten finns inte!");case 9:case"end":return t.stop()}}),t,null,[[0,6]])})))()}},created:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(u["getThemePresets"])();case 2:n=t.sent,e.logo=n.logo;case 4:case"end":return t.stop()}}),t)})))()}},p=f,d=(n("20ea"),n("2877")),g=Object(d["a"])(p,r,a,!1,null,"27e77f0a",null);t["default"]=g.exports},e74f:function(e,t,n){},f183:function(e,t,n){var r=n("d012"),a=n("861d"),s=n("5135"),o=n("9bf2").f,i=n("90e3"),c=n("bb2f"),u=i("meta"),l=0,f=Object.isExtensible||function(){return!0},p=function(e){o(e,u,{value:{objectID:"O"+ ++l,weakData:{}}})},d=function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,u)){if(!f(e))return"F";if(!t)return"E";p(e)}return e[u].objectID},g=function(e,t){if(!s(e,u)){if(!f(e))return!0;if(!t)return!1;p(e)}return e[u].weakData},E=function(e){return c&&b.REQUIRED&&f(e)&&!s(e,u)&&p(e),e},b=e.exports={REQUIRED:!1,fastKey:d,getWeakData:g,onFreeze:E};r[u]=!0},fa37:function(e,t,n){e.exports=n.p+"img/user-avatar.f8a43d6c.png"}}]); //# sourceMappingURL=chunk-6d95ecfe.4943d5e1.js.map