{"version":3,"file":"login.6cb337e583ae8b7cd4c3.js","mappings":";;;;;;;;;;AAAA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;ACAA;AACA;AACA;;;;;;;;;;;;;;;ACFA;AACA;;;;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AClBA;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;;;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA","sources":["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","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"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","import loginModule from '../scripts/login/login.module.js';\nimport appDependency from '../scripts/appDependency.js';\nappDependency.addItem(loginModule);","import './styles/loginOpenId.scss';\nexport default 'loginOpenId';","class AppDependency {\n constructor() {\n if (!window.___appDependency) {\n window.___appDependency = this;\n window.___appDependencyList = [];\n }\n return window.___appDependency;\n }\n addItem(moduleName) {\n window.___appDependencyList.push(moduleName);\n }\n addList(moduleNameList) {\n window.___appDependencyList.push.apply(window.___appDependencyList, moduleNameList);\n }\n get() {\n return window.___appDependencyList;\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';\nconst moduleName = 'auth';\nangular.module(moduleName, []).controller('AuthCtrl', AuthCtrl).service('authService', authService);\nexport default moduleName;","AuthCtrl.$inject = [\"$window\", \"toaster\", \"authService\", \"$sce\"];\n/* @ngInject */\nfunction AuthCtrl($window, toaster, authService, $sce) {\n var ctrl = this;\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 if (result.requestCaptcha == true && ctrl.showCaptcha != result.requestCaptcha) {\n ctrl.showCaptcha = result.requestCaptcha;\n ctrl.initCaptcha();\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 && redirect.indexOf('/pay/') == -1) {\n redirect = result.redirectTo;\n }\n $window.location = redirect;\n } else {\n $window.location.reload();\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;\nexport default AuthCtrl;","authService.$inject = [\"$http\"];\n/* @ngInject */\nfunction authService($http) {\n var service = this;\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 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;\nexport default authService;","import '../../styles/partials/login.scss';\nimport '../../styles/views/login.scss';\nimport authModule from '../auth/auth.module.js';\nconst moduleName = 'login';\nangular.module('login', [authModule]).controller('LoginCtrl', function () {});\nexport default moduleName;"],"names":[],"sourceRoot":""}