{"version":3,"file":"login.2d996a31113543153d70.js","mappings":";;;;;;;;;;;;AAAA;AACA;AACA;;;;;;;;;;;;ACFA;AACA;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACLA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA","sources":["webpack://advantshop/./bundle_config/login.js","webpack://advantshop/./scripts/_partials/login-open-id/loginOpenId.module.js","webpack://advantshop/./scripts/appDependency.js","webpack://advantshop/./scripts/auth/auth.module.js","webpack://advantshop/./scripts/auth/controllers/authController.js","webpack://advantshop/./scripts/auth/services/authService.js","webpack://advantshop/./scripts/login/login.module.js","webpack://advantshop/./scripts/_partials/login-open-id/styles/loginOpenId.scss?aa16","webpack://advantshop/./styles/partials/login.scss?3db1","webpack://advantshop/./styles/views/login.scss?e21f"],"sourcesContent":["import loginModule from '../scripts/login/login.module.js';\nimport appDependency from '../scripts/appDependency.js';\nappDependency.addItem(loginModule);","import './styles/loginOpenId.scss';\nexport default 'loginOpenId';","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar AppDependency = /*#__PURE__*/function () {\n function AppDependency() {\n _classCallCheck(this, AppDependency);\n\n if (!window.___appDependency) {\n window.___appDependency = this;\n window.___appDependencyList = [];\n }\n\n return window.___appDependency;\n }\n\n _createClass(AppDependency, [{\n key: \"addItem\",\n value: function addItem(moduleName) {\n window.___appDependencyList.push(moduleName);\n }\n }, {\n key: \"addList\",\n value: function addList(moduleNameList) {\n window.___appDependencyList = window.___appDependencyList.concat(moduleNameList);\n }\n }, {\n key: \"get\",\n value: function get() {\n return window.___appDependencyList;\n }\n }]);\n\n return AppDependency;\n}();\n\nexport default new AppDependency();","import AuthCtrl from './controllers/authController.js';\nimport authService from './services/authService.js';\nimport loginOpenId from '../../scripts/_partials/login-open-id/loginOpenId.module.js';\nvar moduleName = 'auth';\nangular.module(moduleName, []).controller('AuthCtrl', AuthCtrl).service('authService', authService);\nexport default moduleName;","AuthCtrl.$inject = [\"$window\", \"toaster\", \"authService\", \"$sce\"];\n\n/* @ngInject */\nfunction AuthCtrl($window, toaster, authService, $sce) {\n var ctrl = this;\n\n ctrl.login = function (email, password, redirect, forceRedirect) {\n var captchaExist = typeof CaptchaSource != \"undefined\" && CaptchaSource != null;\n var captchaInstanceId = captchaExist ? CaptchaSource.InstanceId : null;\n authService.login(email, password, ctrl.captchaCode, captchaInstanceId).then(function (result) {\n if (result.error != null && result.error.length > 0) {\n toaster.pop('error', result.error);\n\n if (result.requestCaptcha == true && ctrl.showCaptcha != result.requestCaptcha) {\n ctrl.showCaptcha = result.requestCaptcha;\n ctrl.initCaptcha();\n }\n\n if (captchaExist) {\n CaptchaSource.ReloadImage();\n }\n } else {\n if (redirect != null && redirect.length > 0) {\n if (!forceRedirect && result.redirectTo != null && redirect.indexOf('checkout') == -1) {\n redirect = result.redirectTo;\n }\n\n $window.location = redirect;\n } else {\n $window.location.reload();\n }\n }\n });\n };\n\n ctrl.initCaptcha = function () {\n authService.getCaptchaHtml(\"auth.captchaCode\").then(function (result) {\n ctrl.captchaHtml = $sce.trustAsHtml(result);\n });\n };\n}\n\n;\nexport default AuthCtrl;","authService.$inject = [\"$http\"];\n\n/* @ngInject */\nfunction authService($http) {\n var service = this;\n\n service.login = function (email, password, captchaCode, captchaSource) {\n return $http.post('/user/loginjson', {\n email: email,\n password: password,\n captchaCode: captchaCode,\n captchaSource: captchaSource\n }).then(function (response) {\n return response.data;\n });\n };\n\n service.getCaptchaHtml = function (ngModel) {\n return $http.post('/commonExt/getCaptchaHtml', {\n ngModel: ngModel\n }).then(function (response) {\n return response.data;\n });\n };\n}\n\n;\nexport default authService;","import '../../styles/partials/login.scss';\nimport '../../styles/views/login.scss';\nimport authModule from '../auth/auth.module.js';\nvar moduleName = 'login';\nangular.module('login', [authModule]).controller('LoginCtrl', function () {});\nexport default moduleName;","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};"],"names":[],"sourceRoot":""}