(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a3656e24"],{"00b4":function(t,e,r){"use strict";r("ac1f");var n=r("23e7"),i=r("861d"),a=function(){var t=!1,e=/[ac]/;return e.exec=function(){return t=!0,/./.exec.apply(this,arguments)},!0===e.test("abc")&&t}(),o=/./.test;n({target:"RegExp",proto:!0,forced:!a},{test:function(t){if("function"!==typeof this.exec)return o.call(this,t);var e=this.exec(t);if(null!==e&&!i(e))throw new Error("RegExp exec method returned something other than an Object or null");return!!e}})},"0759":function(t,e,r){"use strict";r.d(e,"a",(function(){return v}));var n=r("2b0e"),i=r("b42e"),a=r("c637"),o=r("a723"),c=r("992e"),s=r("d82f"),u=r("cf75"),l=r("fa73"),d=r("7386"),f=r("aa0d");function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e=t},m=[{name:"min"},{name:"max"}],g={validate:b,params:m},v=function(t,e){var r=e.target;return String(t)===String(r)},O=[{name:"target",isTarget:!0}],y={validate:v,params:O},j=function(t,e){var r=e.length;if(Array.isArray(t))return t.every((function(t){return j(t,{length:r})}));var n=String(t);return/^[0-9]*$/.test(n)&&n.length===r},w=[{name:"length",cast:function(t){return Number(t)}}],_={validate:j,params:w},x=function(t,e){var r=(void 0===e?{}:e).multiple,n=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return r&&!Array.isArray(t)&&(t=String(t).split(",").map((function(t){return t.trim()}))),Array.isArray(t)?t.every((function(t){return n.test(String(t))})):n.test(String(t))},$=[{name:"multiple",default:!1}],k={validate:x,params:$};function A(t){return null===t||void 0===t}function C(t){return Array.isArray(t)&&0===t.length}function P(t){return"function"===typeof t}function S(t){return P(Array.from)?Array.from(t):T(t)}function T(t){for(var e=[],r=t.length,n=0;n=r)},I=[{name:"length",cast:function(t){return Number(t)}}],R={validate:F,params:I},B=function(t,e){var r=e.regex;return Array.isArray(t)?t.every((function(t){return B(t,{regex:r})})):r.test(String(t))},D=[{name:"regex",cast:function(t){return"string"===typeof t?new RegExp(t):t}}],q={validate:B,params:D},V=function(t,e){var r=(void 0===e?{allowFalse:!0}:e).allowFalse,n={valid:!1,required:!0};return A(t)||C(t)?n:!1!==t||r?(n.valid=!!String(t).trim().length,n):n},N=!0,U=[{name:"allowFalse",default:!0}],W={validate:V,params:U,computesRequired:N}},"5e12":function(t,e,r){"use strict";r.d(e,"a",(function(){return m}));var n=r("2b0e"),i=r("b42e"),a=r("c637"),o=r("a723"),c=r("9b76"),s=r("8690"),u=r("365c"),l=r("cf75"),d=r("ccc0"),f=r("3656"),p=r("d190");function h(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var b=Object(l["d"])({append:Object(l["c"])(o["u"]),appendHtml:Object(l["c"])(o["u"]),id:Object(l["c"])(o["u"]),prepend:Object(l["c"])(o["u"]),prependHtml:Object(l["c"])(o["u"]),size:Object(l["c"])(o["u"]),tag:Object(l["c"])(o["u"],"div")},a["V"]),m=n["default"].extend({name:a["V"],functional:!0,props:b,render:function(t,e){var r=e.props,n=e.data,a=e.slots,o=e.scopedSlots,l=r.prepend,b=r.prependHtml,m=r.append,g=r.appendHtml,v=r.size,O=o||{},y=a(),j={},w=t(),_=Object(u["a"])(c["P"],O,y);(_||l||b)&&(w=t(f["a"],[_?Object(u["b"])(c["P"],j,O,y):t(p["a"],{domProps:Object(s["a"])(b,l)})]));var x=t(),$=Object(u["a"])(c["a"],O,y);return($||m||g)&&(x=t(d["a"],[$?Object(u["b"])(c["a"],j,O,y):t(p["a"],{domProps:Object(s["a"])(g,m)})])),t(r.tag,Object(i["a"])(n,{staticClass:"input-group",class:h({},"input-group-".concat(v),v),attrs:{id:r.id||null,role:"group"}}),[w,Object(u["b"])(c["h"],j,O,y),x])}})},7059:function(t,e,r){t.exports=r.p+"img/amera.f9e4e6e7.png"},"8d81":function(t,e,r){},"8f03":function(t,e,r){"use strict";r.d(e,"c",(function(){return d})),r.d(e,"b",(function(){return f})),r.d(e,"a",(function(){return p}));var n=r("7bb1"),i=r("4c93"),a=r("d4d7"),o=r("2593"),c=(r("ac1f"),r("00b4"),function(t){return t>=0}),s=function(t){var e=/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%&*()]).{8,}/,r=e.test(t);return r},u=function(t){var e=/^(?:3[47][0-9]{13})$/,r=e.test(t);return r},l=function(t){if(void 0===t||null===t||0===t.length)return!0;var e=/^(http[s]?:\/\/){0,1}(www\.){0,1}[a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,5}[\.]{0,1}/;return e.test(t)},d=Object(n["c"])("required",i["l"]),f=Object(n["c"])("email",i["g"]),p=(Object(n["c"])("min",i["j"]),Object(n["c"])("confirmed",i["e"]),Object(n["c"])("regex",i["k"]),Object(n["c"])("between",i["d"]),Object(n["c"])("alpha",i["a"]),Object(n["c"])("integer",i["h"]),Object(n["c"])("digits",i["f"]),Object(n["c"])("alpha-dash",i["b"]),Object(n["c"])("alpha-num",i["c"]));Object(n["c"])("length",i["i"]),Object(n["c"])("positive",{validate:c,message:"Please enter positive number!"}),Object(n["c"])("credit-card",{validate:u,message:"It is not valid credit card!"}),Object(n["c"])("password",{validate:s,message:"Your {_field_} must contain at least one uppercase, one lowercase, one special character and one digit"}),Object(n["c"])("url",{validate:l,message:"URL is invalid"});Object(n["d"])({en:{messages:o.messages,names:{email:"Email",password:"Password"},fields:{password:{min:"{_field_} is too short, you want to get hacked?"}}},ar:{messages:a.messages,names:{email:"البريد الإلكتروني",password:"كلمة السر"},fields:{password:{min:"كلمة السر قصيرة جداً سيتم اختراقك"}}}})},"96cf":function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(Z){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),o=new P(n||[]);return a._invoke=$(t,r,o),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(Z){return{type:"throw",arg:Z}}}t.wrap=u;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",b={};function m(){}function g(){}function v(){}var O={};s(O,a,(function(){return this}));var y=Object.getPrototypeOf,j=y&&y(y(S([])));j&&j!==r&&n.call(j,a)&&(O=j);var w=v.prototype=m.prototype=Object.create(O);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(i,a,o,c){var s=l(t[i],t,a);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"===typeof d&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,o,c)}),(function(t){r("throw",t,o,c)})):e.resolve(d).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,c)}))}c(s.arg)}var i;function a(t,n){function a(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(a,a):a()}this._invoke=a}function $(t,e,r){var n=d;return function(i,a){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===i)throw a;return T()}r.method=i,r.arg=a;while(1){var o=r.delegate;if(o){var c=k(o,r);if(c){if(c===b)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=l(t,e,r);if("normal"===s.type){if(n=r.done?h:f,s.arg===b)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=h,r.method="throw",r.arg=s.arg)}}}function k(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method))return b;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function S(t){if(t){var r=t[a];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){while(++i=0;--a){var o=this.tryEntries[a],c=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;C(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:S(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}(t.exports);try{regeneratorRuntime=n}catch(i){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},a55b:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"auth-wrapper auth-v2"},[r("b-row",{staticClass:"auth-inner m-0 container-logo-form"},[r("b-row",{staticClass:"main-logo-container"},[r("b-link",{staticClass:"brand-logo"},[r("vuexy-logo")],1)],1),r("b-col",{staticClass:"d-none d-lg-flex align-items-center p-5",attrs:{lg:"8",md:"7"}},[r("div",{staticClass:"w-100 d-lg-flex align-items-center justify-content-center px-5"},[r("b-img",{staticClass:"imgLogin",attrs:{fluid:"",src:t.imgUrl,alt:"Login V2"}})],1)]),r("b-col",{staticClass:"d-flex align-items-center auth-bg px-2 p-lg-5",attrs:{lg:"4",md:"12"}},[r("b-col",{staticClass:"px-xl-2 mx-auto form-login",attrs:{sm:"8",md:"6",lg:"12"}},[r("b-card-title",{staticClass:"font-weight-bold mb-1",attrs:{"title-tag":"h2"}},[t._v(" Welcome to Amera! ")]),r("b-card-text",{staticClass:"mb-2"}),r("transition",{attrs:{name:"fade",mode:"out-in"}},[r("validation-observer",{ref:"loginValidation"},[r("b-form",{staticClass:"auth-login-form mt-2",on:{submit:function(t){t.preventDefault()}}},[r("b-form-group",{attrs:{label:"Email","label-for":"login-email"}},[r("validation-provider",{attrs:{name:"Email",rules:"required|email"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.errors;return[r("b-form-input",{attrs:{id:"login-email",state:!(n.length>0)&&null,name:"login-email",placeholder:"john@example.com",type:"email"},model:{value:t.person.userEmail,callback:function(e){t.$set(t.person,"userEmail",e)},expression:"person.userEmail"}}),n[0]?r("small",{staticClass:"text-danger"},[t._v("This field is required, enter a valid email ")]):t._e()]}}])})],1),r("b-form-group",[r("div",{staticClass:"d-flex justify-content-between"},[r("label",{attrs:{for:"login-password"}},[t._v("Password")]),r("b-link",{attrs:{to:{name:"forgot-password"}}},[r("small",{staticClass:"colors-login"},[t._v("Forgot Password?")])])],1),r("validation-provider",{attrs:{name:"Password",rules:"required"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.errors;return[r("b-input-group",{staticClass:"input-group-merge",class:n.length>0?"is-invalid":null},[r("b-form-input",{staticClass:"form-control-merge",attrs:{id:"login-password",state:!(n.length>0)&&null,type:t.passwordFieldType,name:"login-password",placeholder:"············"},model:{value:t.person.password,callback:function(e){t.$set(t.person,"password",e)},expression:"person.password"}}),r("b-input-group-append",{attrs:{"is-text":""}},[r("feather-icon",{staticClass:"cursor-pointer",attrs:{icon:t.passwordToggleIcon},on:{click:t.togglePasswordVisibility}})],1)],1),n[0]?r("small",{staticClass:"text-danger"},[t._v("This field is required")]):t._e()]}}])})],1),r("b-form-group",[r("b-form-checkbox",{attrs:{id:"remember-me",name:"checkbox-1"},model:{value:t.status,callback:function(e){t.status=e},expression:"status"}},[t._v(" Remember Me ")])],1),r("b-button",{staticClass:"sigin",attrs:{type:"submit",variant:"primary",block:""},on:{click:t.validationForm}},[t._v(" Sign in ")])],1)],1)],1)],1)],1)],1)],1)},i=[],a=r("1da1"),o=(r("96cf"),r("d3b7"),r("7bb1")),c=r("088b"),s=r("a15b7"),u=r("b28b"),l=r("aa59"),d=r("8226"),f=r("4797"),p=r("ccc0"),h=r("5e12"),b=r("c3e6"),m=r("d6e4"),g=r("4968"),v=r("4918"),O=r("11de"),y=r("1947"),j=r("8f03"),w=r("b91d"),_=r("4360"),x=r("223c"),$=(r("bc3a"),r("ca6e")),k={components:{BRow:s["a"],BCol:u["a"],BLink:l["a"],BFormGroup:d["a"],BFormInput:f["a"],BInputGroupAppend:p["a"],BInputGroup:h["a"],BFormCheckbox:b["a"],BCardText:m["a"],BCardTitle:g["a"],BImg:v["a"],BForm:O["a"],BButton:y["a"],VuexyLogo:c["a"],ValidationProvider:o["b"],ValidationObserver:o["a"]},mixins:[w["a"]],data:function(){return{status:"",person:{password:"",userEmail:"",loginType:"",ipAddress:""},viewFormCorporate:!1,viewFormAdmin:!1,btnUser:"",atras:!1,sideImg:r("7059"),required:j["c"],email:j["b"]}},computed:{passwordToggleIcon:function(){return"password"===this.passwordFieldType?"EyeIcon":"EyeOffIcon"},imgUrl:function(){return"dark"===_["a"].state.appConfig.layout.skin?(this.sideImg=r("7059"),this.sideImg):this.sideImg}},watch:{btnUser:function(){this.person.loginType=this.btnUser}},methods:{getIpAddress:function(){return Object(a["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=null,t.next=3,fetch("https://api.ipify.org?format=json").then((function(t){return t.json()})).then((function(t){e=t.ip})).catch((function(t){console.error("Error fetching IP:",t)}));case 3:return t.abrupt("return",e);case 4:case"end":return t.stop()}}),t)})))()},setIpAddressPerson:function(){var t=this;return Object(a["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.getIpAddress();case 2:t.person.ipAddress=e.sent;case 3:case"end":return e.stop()}}),e)})))()},validationForm:function(){var t=this;return Object(a["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.setIpAddressPerson();case 2:t.$refs.loginValidation.validate(),""===t.person.userEmail||""===t.person.password?t.$swal({icon:"error",title:"Please fill out required fields",customClass:{confirmButton:"btn btn-primary"},buttonsStyling:!1}):(t.$swal({title:"Please, wait...",didOpen:function(){t.$swal.showLoading()},timer:1e3,customClass:{confirmButton:"btn btn-primary"},buttonsStyling:!1}),t.$store.dispatch("Users/retrieveToken",t.person).then((function(e){t.$toast({component:x["a"],props:{title:e.data.message,icon:"CheckIcon",variant:"success"}}),3===e.data.data.user.role.id?t.$router.push({name:"home-corporate-account"}):1===e.data.data.user.role.id?t.$router.push({name:"home-admin"}):1!==e.data.data.user.role.id&&3!==e.data.data.user.role.id&&t.$router.push({name:"home-user"})})).catch((function(e){t.$swal({title:Object($["d"])(e),icon:"error",customClass:{confirmButton:"btn btn-primary"},buttonsStyling:!1})})));case 4:case"end":return e.stop()}}),e)})))()},retornarInicio:function(){this.atras=!0,!0===this.atras&&(this.btnUser="",this.person.userEmail="",this.person.password="")}}},A=k,C=(r("206d6"),r("2877")),P=Object(C["a"])(A,n,i,!1,null,null,null);e["default"]=P.exports},a953:function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return c}));var n=r("2b0e"),i=r("a723"),a=r("cf75"),o=Object(a["d"])({plain:Object(a["c"])(i["g"],!1)},"formControls"),c=n["default"].extend({props:o,computed:{custom:function(){return!this.plain}}})},b549:function(t,e,r){"use strict";r("8d81")},b91d:function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n={data:function(){return{passwordFieldType:"password"}},methods:{togglePasswordVisibility:function(){this.passwordFieldType="password"===this.passwordFieldType?"text":"password"}}}},c3e6:function(t,e,r){"use strict";r.d(e,"a",(function(){return y}));var n,i=r("2b0e"),a=r("c637"),o=r("0056"),c=r("a723"),s=r("7b1e"),u=r("3c21"),l=function(t,e){for(var r=0;r-1:Object(u["a"])(e,t)},isRadio:function(){return!1}},watch:m({},g,(function(t,e){Object(u["a"])(t,e)||this.setIndeterminate(t)})),mounted:function(){this.setIndeterminate(this[g])},methods:{computedLocalCheckedWatcher:function(t,e){if(!Object(u["a"])(t,e)){this.$emit(p["a"],t);var r=this.$refs.input;r&&this.$emit(v,r.indeterminate)}},handleChange:function(t){var e=this,r=t.target,n=r.checked,i=r.indeterminate,a=this.value,c=this.uncheckedValue,u=this.computedLocalChecked;if(Object(s["a"])(u)){var d=l(u,a);n&&d<0?u=u.concat(a):!n&&d>-1&&(u=u.slice(0,d).concat(u.slice(d+1)))}else u=n?a:c;this.computedLocalChecked=u,this.$nextTick((function(){e.$emit(o["d"],u),e.isGroup&&e.bvGroup.$emit(o["d"],u),e.$emit(v,i)}))},setIndeterminate:function(t){Object(s["a"])(this.computedLocalChecked)&&(t=!1);var e=this.$refs.input;e&&(e.indeterminate=t,this.$emit(v,t))}}})},ccc0:function(t,e,r){"use strict";r.d(e,"a",(function(){return p}));var n=r("2b0e"),i=r("b42e"),a=r("c637"),o=r("d82f"),c=r("cf75"),s=r("46bc");function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e