{"version":3,"sources":["config.js","controllers/adminAuditController.js","controllers/adminSalesController.js","controllers/adminSearchController.js","controllers/adminSettingCreateController.js","controllers/adminSettingsController.js","controllers/adminTransactionsController.js","controllers/adminUserAuditController.js","controllers/confirmController.js","controllers/errorController.js","controllers/helpController.js","controllers/homeController.js","controllers/loginController.js","controllers/mainController.js","controllers/menuController.js","controllers/myAccountController.js","controllers/myCardsController.js","controllers/productsController.js","controllers/rechargePassController.js","controllers/rechargePurseController.js","controllers/rechargeTripController.js","controllers/recoverPasswordConfirmController.js","controllers/recoverPasswordController.js","controllers/registerConfirmController.js","controllers/registerController.js","controllers/textController.js","controllers/transactionHistoryController.js","controllers/transactionStatusHistoryController.js","directives/compareTo.js","directives/minDigits.js","directives/minLetters.js","directives/validDecimal.js","services/ExceptionInterceptor.js","services/loginService.js","services/skayoLocaleService.js"],"names":[],"mappings":"AAAA;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;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;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;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;AC/JA;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;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxJA;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;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;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;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;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;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;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;AC9RA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxGA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnEA;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;ACnCA;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;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;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;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;AC9JA;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;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;ACJA;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;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;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;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;AC9EA;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;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;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;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;AACA;AACA;AACA;AACA;AChLA;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;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;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnLA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvDA;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;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;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;AACA;AClIA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrGA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7FA;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;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjBA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/FA;AACA;AACA;AACA;AACA;ACJA;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;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;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;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;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;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpBA;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;ACrCA;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;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;AC7CA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrDA;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;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;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;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;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;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;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;AClSA;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;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;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;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;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;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;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;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;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;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;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;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;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","file":"app.js","sourcesContent":["var app = angular.module('uti.skayo.onlinesale', ['uti.skayo.onlinesale.views', 'ngRoute', 'gettext', 'ngCookies', 'ui.bootstrap', 'blockUI', 'ngFlag', 'ngMessages', 'oitozero.ngSweetAlert', 'ngCookies']);\r\n\r\napp.run(function (gettextCatalog, blockUIConfig, gettext, SkayoLocaleService) {\r\n\r\n    var lang = localStorage.getItem(\"skayo-client-language\");\r\n    if (!lang) {\r\n        lang = \"ro\";\r\n        localStorage.setItem(\"skayo-client-language\" , lang);\r\n    }\r\n\r\n    gettextCatalog.setCurrentLanguage(lang); //should be 'ro' for\r\n    SkayoLocaleService.setLocale(lang);\r\n    //gettextCatalog.debug = true;\r\n    blockUIConfig.message = gettextCatalog.getString(\"Please wait\");\r\n\r\n});\r\n\r\napp.config(function ($routeProvider, $httpProvider, $logProvider) {\r\n\r\n    $logProvider.debugEnabled(true);\r\n    $httpProvider.interceptors.push('Http401Interceptor');\r\n    $httpProvider.interceptors.push('Http500Interceptor');\r\n\r\n    var lang = null;\r\n    try {\r\n        lang = localStorage.getItem(\"skayo-client-language\");\r\n    }\r\n    catch (exception) { }\r\n    lang = lang || \"ro\";\r\n    var faqTemplate = '/app/views/faq_' + lang + \".html\";\r\n    var homeTemplate = '/app/views/home_' + lang + '.html';\r\n\r\n    //$locationProvider.html5Mode(true);\r\n    $routeProvider\r\n        .when(\"/login\",\r\n        {\r\n            templateUrl: \"/app/views/login.html\",\r\n            controller: \"LoginController\"\r\n        })\r\n        //.when(\"/home\",\r\n        //{\r\n        //    templateUrl: \"/app/views/home.html\",\r\n        //    controller: \"HomeController\"\r\n        //})\r\n        .when(\"/home\",\r\n        {\r\n                templateUrl: homeTemplate,\r\n                controller: \"HomeController\"\r\n        })\r\n        .when(\"/home_en_US\",\r\n        {\r\n            templateUrl: \"/app/views/home_en_US.html\",\r\n            controller: \"HomeController\"\r\n        })\r\n        .when(\"/myCards\",\r\n        {\r\n            templateUrl: \"/app/views/myCards.html\",\r\n            controller: \"MyCardsController\"\r\n        })\r\n        .when(\"/transactionHistory\",\r\n        {\r\n            templateUrl: \"/app/views/transactionHistory.html\",\r\n            controller: \"TransactionHistoryController\"\r\n        })\r\n        .when(\"/products\",\r\n        {\r\n            templateUrl: \"/app/views/products.html\",\r\n            controller: \"ProductsController\"\r\n        })\r\n        .when(\"/myAccount\",\r\n        {\r\n            templateUrl: \"/app/views/myAccount.html\",\r\n            controller: \"MyAccountController\"\r\n        })\r\n\r\n        .when(\"/register\", {\r\n            templateUrl: \"/app/views/register.html\",\r\n            controller: \"RegisterController\"\r\n        })\r\n\r\n        .when(\"/registerConfirm/:code\", {\r\n            templateUrl: \"/app/views/registerConfirm.html\",\r\n            controller: \"RegisterConfirmController\"\r\n        })\r\n\r\n        .when(\"/recoverPassword\", {\r\n            templateUrl: \"/app/views/recoverPassword.html\",\r\n            controller: \"RecoverPasswordController\"\r\n        })\r\n\r\n        .when(\"/recoverPasswordConfirm/:code\", {\r\n            templateUrl: \"/app/views/recoverPasswordConfirm.html\",\r\n            controller: \"RecoverPasswordConfirmController\"\r\n        })\r\n\r\n        .when(\"/error\", {\r\n            templateUrl: \"/app/views/error.html\",\r\n            controller: \"ErrorController\"\r\n        })\r\n\r\n        .when(\"/help\", {\r\n            templateUrl: \"/app/views/help.html\",\r\n            controller: \"HelpController\"\r\n        })\r\n        \r\n        //static stuff\r\n        .when(\"/contact\", { templateUrl: \"/app/views/contact.html\" })\r\n        .when(\"/faq\",\r\n        {\r\n            templateUrl: faqTemplate\r\n        })\r\n        .when(\"/faq_en_US\", { templateUrl: \"/app/views/faq_en_US.html\" })\r\n        .when(\"/faq_bg\", { templateUrl: \"/app/views/faq_bg.html\" })\r\n        .when(\"/faq_ru\", { templateUrl: \"/app/views/faq_ru.html\" })\r\n        .when(\"/faq_ro\", { templateUrl: \"/app/views/faq_ro.html\" })\r\n        .when(\"/consumerProtection\", { templateUrl: \"/app/views/consumerProtection.html\" })\r\n\r\n        .when(\"/transactions\", {\r\n            templateUrl: \"/app/views/admin/transactions.html\",\r\n            controller: \"TransactionsController\"\r\n        })\r\n\r\n        //administration\r\n        .when('/adminSearch', {\r\n            templateUrl: \"/app/views/adminSearch.html\",\r\n            controller: \"AdminSearchController\"\r\n        })\r\n\r\n        .when('/adminTransactions', {\r\n            templateUrl: \"/app/views/adminTransactions.html\",\r\n            controller: \"AdminTransactionsController\"\r\n        })\r\n\r\n        .when('/adminAuditLog', {\r\n            templateUrl: \"/app/views/adminAuditLog.html\",\r\n            controller: \"AdminAuditController\"\r\n        })\r\n\r\n        .when('/userAuditLog', {\r\n            templateUrl: \"/app/views/adminUserAuditLog.html\",\r\n            controller: \"AdminUserAuditController\"\r\n        })\r\n\r\n        .when('/adminSales', {\r\n            templateUrl: \"/app/views/adminSales.html\",\r\n            controller: \"AdminSalesController\"\r\n        })\r\n\r\n        .when('/adminSettings', {\r\n            templateUrl: \"/app/views/adminSettings.html\",\r\n            controller: \"AdminSettingsController\"\r\n        })\r\n\r\n        .when('/adminSettingCreate', {\r\n            templateUrl: \"/app/views/adminSettingCreate.html\",\r\n            controller: \"AdminSettingCreateController\"\r\n        })\r\n    .otherwise({ redirectTo: function () { return document.cookie.includes('login') ? '/home' : '/login'; } });\r\n\r\n});","angular.module('uti.skayo.onlinesale').controller('AdminAuditController', function ($scope, $http) {\r\n    $scope.AdminEmail = '';\r\n    $scope.UserEmail = '';\r\n    $scope.UserFirstName = '';\r\n    $scope.UserLastName = '';\r\n    $scope.AuditList = null;\r\n    $scope.Action = null;\r\n    $scope.actionList = [];\r\n\r\n    //\r\n    // Date Range Functionality\r\n    $scope.setInitialDateRange = function () {\r\n        var fromDate = new Date();\r\n        var toDate = new Date();\r\n\r\n        fromDate.setDate(fromDate.getDate() - 7);\r\n        fromDate.setHours(0, 0, 0, 0);\r\n        $scope.StartDate = fromDate;\n        toDate.setHours(23, 59, 59, 999);\r\n        $scope.EndDate = toDate;\r\n    }\r\n    $scope.setInitialDateRange();\n\n    //\n    // Action type filter\n    $scope.fillActionList = function () {\r\n        $http\r\n            .post('/api/adminAudit/ActionList', {})\r\n            .then(function (result) { $scope.actionList = result.data; })\r\n            .catch(function (error) { $scope.actionList = []; });\r\n    };\n    $scope.fillActionList();\n\n    $scope.dateOptions = {\r\n        maxDate: new Date(),\r\n        showWeeks: false,\r\n    };\r\n\r\n    $scope.endDatePopupOpen = function () {\r\n        $scope.endDatePopup.opened = true;\r\n    };\r\n\r\n    $scope.startDatePopupOpen = function () {\r\n        $scope.startDatePopup.opened = true;\r\n    };\r\n\r\n    $scope.startDatePopup = {\r\n        opened: false\r\n    };\r\n\r\n    $scope.endDatePopup = {\r\n        opened: false\r\n    };\r\n\r\n    // \r\n    // -- Paging Functionality --\r\n    $scope.paging = {};\r\n    $scope.paging.pageSizeList = [5, 10, 15, 20, 50];\r\n    $scope.paging.itemsPerPage = 15;\r\n    $scope.paging.maxSize = 10;\r\n\r\n    $scope.paging.clearPaging = function ()\r\n    {\r\n        $scope.paging.currentPage = 0;\r\n        $scope.paging.totalItems = 0;\r\n    }\r\n    $scope.paging.clearPaging();\r\n\r\n    $scope.paging.pageRange = function () {\r\n        var rangeSize = $scope.paging.maxSize;\r\n        var start = $scope.paging.currentPage;\r\n        var pages = $scope.paging.totalPages();\r\n        var range = [];\r\n\r\n        rangeSize = (pages < rangeSize) ? pages : rangeSize;\r\n        start = (start > pages - rangeSize) ? pages - rangeSize :\r\n                    (start < rangeSize) ? 0 : start;\r\n\r\n        for (var i = start; i < start + rangeSize; i++) {\r\n            range.push(i);\r\n        }\r\n        return range;\r\n    };\r\n\r\n    $scope.paging.totalPages = function () {\r\n        return Math.ceil($scope.paging.totalItems / $scope.paging.itemsPerPage);\r\n    };\r\n\r\n    $scope.paging.setPage = function (n) {\r\n        if (n >= 0 && n < $scope.paging.totalPages()) {\r\n            $scope.paging.currentPage = n;\r\n        }\r\n    };\r\n\r\n    $scope.$watch(\"paging.currentPage\", function (newValue, oldValue) {\r\n        if ($scope.paging.totalItems !== 0) {\r\n            $scope.search(newValue);\r\n        }\r\n    });\r\n\r\n    $scope.$watch(\"paging.itemsPerPage\", function (newValue, oldValue) {\r\n        if ($scope.paging.totalItems !== 0) {\r\n            $scope.search(-1);\r\n        }\r\n    });\r\n\r\n    $scope.getDateString = function (dateObject, beginning) {\r\n        var day = dateObject.getDate();\r\n        var month = dateObject.getMonth() + 1;\r\n        var year = dateObject.getFullYear();\r\n\r\n        return (day < 10 ? \"0\" + day : day) + \"/\"\r\n            + (month < 10 ? \"0\" + month : month) + \"/\"\r\n            + year\r\n            + (beginning === true ? \" 00:00:00\" : \" 23:59:59\");\r\n    }\r\n\r\n    $scope.search = function (pageNumber) {\r\n        if (pageNumber < 0) {\r\n            $scope.paging.clearPaging();\r\n            pageNumber = 0;\r\n        }\r\n\r\n        var startDateString = $scope.getDateString($scope.StartDate, true);\r\n        var endDateString = $scope.getDateString($scope.EndDate, false);\r\n\r\n        $http\r\n            .post('/api/adminAudit/AuditList', {\r\n                AdminEmail: $scope.AdminEmail,\r\n                UserEmail: $scope.UserEmail,\r\n                UserFirstName: $scope.UserFirstName,\r\n                UserLastName: $scope.UserLastName,\r\n                StartDate: startDateString,\r\n                EndDate: endDateString,\r\n                Action: $scope.Action != null ? $scope.Action.Id : null,\r\n                PageNumber: pageNumber,\r\n                ItemsPerPage: $scope.paging.itemsPerPage\r\n            })\r\n            .then(function (result) { $scope.AuditList = result.data.Audits; $scope.paging.totalItems = result.data.Total; })\r\n            .catch(function (error) { $scope.AuditList = null; $scope.paging.totalItems = 0; });\r\n    };\r\n\r\n    $scope.clear = function () {\r\n        $scope.AdminEmail = '';\r\n        $scope.UserEmail = '';\r\n        $scope.UserFirstName = '';\r\n        $scope.UserLastName = '';\r\n        $scope.AuditList = null;\r\n        $scope.Action = null;\r\n        $scope.setInitialDateRange();\r\n        $scope.paging.clearPaging();\r\n    };\r\n})","angular.module('uti.skayo.onlinesale').controller('AdminSalesController', function ($scope, $http) {\r\n    $scope.salesOverview = true;\r\n    $scope.moreDetails = false;\r\n\r\n    // Sales Overview \r\n    $scope.sales = {};\r\n    $scope.sales.productList = [];\r\n    $scope.sales.data = [];\r\n    $scope.sales.filter = \"\";\r\n    $scope.sales.yearRange = [];\r\n    $scope.sales.maxYears = 10;\r\n    \r\n    var saveOptions = Highcharts.getOptions().exporting.buttons.contextButton.menuItems;\r\n\r\n    for (var i=0; i<saveOptions.length; i++) {\r\n        if (saveOptions[i].textKey !== undefined && saveOptions[i].textKey.slice(-3) === \"SVG\") {\r\n            saveOptions.splice(i, 1);\r\n            break;\r\n        }\r\n    }\r\n\r\n    $scope.sales.chartOptions = {\r\n        chart: {\r\n            plotBorderWidth: 0\r\n        },\r\n        title: {\r\n            text: '<span translate>Vanzari lunare</span>',\r\n        },\r\n        subtitle: {\r\n            text: '<span translate>Toate produsele</span>'\r\n        },\r\n        xAxis: {\r\n            categories: [\r\n                '<span translate>Jan</span>',\r\n                '<span translate>Feb</span>',\r\n                '<span translate>Mar</span>',\r\n                '<span translate>Apr</span>',\r\n                '<span translate>May</span>',\r\n                '<span translate>Jun</span>',\r\n                '<span translate>Jul</span>',\r\n                '<span translate>Aug</span>',\r\n                '<span translate>Sep</span>',\r\n                '<span translate>Oct</span>',\r\n                '<span translate>Nov</span>',\r\n                '<span translate>Dec</span>'\r\n            ],\r\n            crosshair: true\r\n        },\r\n        yAxis: {\r\n            className: 'highcharts-color-0',\r\n            min: 0,\r\n            title: {\r\n                text: '<span translate>Sales Amount</span>'\r\n            }\r\n        },\r\n        legend: {\r\n            enabled: false,\r\n        },\r\n        plotOptions: {\r\n            column: {\r\n                pointPadding: 0.1,\r\n                borderWidth: 0\r\n            },\r\n            series: {\r\n                shadow: true,\r\n                cursor: 'pointer',\r\n                events: {\r\n                    click: function (event) {\r\n                        var fromDate = new Date($scope.sales.currentYear, event.point.index, 1, 0, 0, 0, 0);\r\n                        var toDate = new Date($scope.sales.currentYear, event.point.index + 1, 1, 23, 59, 59, 999);\r\n                        toDate.setDate(toDate.getDate() - 1);\r\n                        $('#details-tab')[0].click();\r\n                        $scope.moreDetails = true;\r\n                        $scope.StartDate = fromDate;\n                        $scope.EndDate = toDate;\r\n                        $scope.search();\r\n                    }\r\n                }\r\n            }\r\n        },\r\n        series: [{\r\n            name: $scope.sales.filter,\r\n            data: $scope.sales.data\r\n        }],\r\n        credits: {\r\n            enabled: false\r\n        },\r\n        exporting: {\r\n            buttons: {\r\n                contextButton: {\r\n                    menuItems: saveOptions\r\n                }\r\n            }\r\n        }\r\n    };\r\n\r\n    $scope.sales.chartOptions.chart.renderTo = 'salesOverview';\r\n    $scope.sales.chartOptions.chart.type = 'column';\r\n    \r\n    $scope.fillProductList = function (productYear) {\r\n        var currentProduct = $scope.sales.filter === null || $scope.sales.filter === \"\" ? 0 : $scope.sales.filter.ProductId;\r\n        $http\r\n            .post('/api/adminSales/ProductList', { ProductYear: productYear })\r\n            .then(function (result)\r\n            {\r\n                $scope.sales.productList = result.data;\r\n\r\n                var prod;\r\n                for (var i = 0; i < $scope.sales.productList.length; i++) {\r\n                    if ($scope.sales.productList[i].ProductId === currentProduct) {\r\n                        prod = $scope.sales.productList[i];\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (prod === undefined && ($scope.sales.filter === null || $scope.sales.filter === \"\")) {\r\n                    $scope.sales.getData(productYear);\r\n                }\r\n                else {\r\n                    $scope.sales.filter = prod === undefined ? \"\" : prod;\r\n                }\r\n            })\r\n            .catch(function (error)\r\n            {\r\n                $scope.sales.productList = [];\r\n                $scope.sales.filter = \"\";\r\n            });\r\n    };\r\n\r\n    $scope.sales.currentYear = (new Date()).getFullYear() - 1; // Start the report based on last year.\r\n    $scope.fillProductList($scope.sales.currentYear);\r\n\r\n    $scope.sales.setYear = function (n) {\r\n        if (n >= $scope.sales.firstYear && n <= $scope.sales.lastYear) {\r\n            $scope.sales.currentYear = n;\r\n        }\r\n    };\r\n\r\n    $scope.sales.displayYears = function () {\r\n        var rangeSize = $scope.sales.maxYears;\r\n        var totalYears = 1 + +$scope.sales.lastYear + -$scope.sales.firstYear;\r\n        var startYear = $scope.sales.firstYear;\r\n        var currentYear = $scope.sales.currentYear;\r\n        var endYear = $scope.sales.lastYear;\r\n        var range = [];\r\n\r\n        rangeSize = (totalYears < rangeSize) ? totalYears : rangeSize;\r\n        startYear = (currentYear > endYear - rangeSize + 1) ? endYear - rangeSize + 1 :\r\n                    (currentYear < startYear + rangeSize) ? startYear : currentYear;\r\n\r\n        for (var i = startYear; i < startYear + rangeSize; i++) {\r\n            range.push(i);\r\n        }\r\n        return range;\r\n    };\r\n\r\n    $scope.$watch(\"sales.yearRange\", function (newValue, oldValue) {\r\n        var salesYears = $scope.sales.yearRange.length;\r\n        if (salesYears > 0) {\r\n            $scope.sales.firstYear = $scope.sales.yearRange[0].Year;\r\n            $scope.sales.lastYear = $scope.sales.yearRange[salesYears - 1].Year;\r\n        }\r\n        else {\r\n            $scope.sales.firstYear = $scope.sales.currentYear;\r\n            $scope.sales.lastYear = $scope.sales.currentYear;\r\n        }\r\n    });\r\n\r\n    $scope.$watch(\"sales.currentYear\", function (newValue, oldValue) {\r\n        if (typeof oldValue !== 'undefined' && oldValue !== newValue) {\r\n            $scope.fillProductList(newValue);\r\n        }\r\n    });\r\n\r\n    $scope.$watch(\"sales.filter\", function (newValue, oldValue) {\r\n        if (typeof oldValue !== 'undefined' && oldValue !== newValue) {\r\n            $scope.sales.getData($scope.sales.currentYear);\r\n        }\r\n        $scope.sales.displayYears();\r\n    });\r\n\r\n    $scope.sales.getData = function (year) {\r\n        var productId = $scope.sales.filter === null || $scope.sales.filter === \"\" ? 0 : $scope.sales.filter.ProductId;\r\n        $http\r\n            .post('/api/adminSales/GetSalesData', {\r\n                CurrentYear: year,\r\n                ProductId: productId\r\n            })\r\n            .then(function (result) {\r\n                $scope.sales.data = result.data.SalesInfo;\r\n                $scope.sales.yearRange = result.data.YearRange;\r\n                $scope.sales.chartOptions.series[0].name = $scope.sales.filter !== null && $scope.sales.filter !== \"\" ? $scope.sales.filter.Name : '<span translate>All Products</span>';\r\n                $scope.sales.chartOptions.subtitle.text = $scope.sales.filter !== null && $scope.sales.filter !== \"\" ? $scope.sales.filter.Name : '<span translate>All Products</span>';\r\n                $scope.sales.chartOptions.series[0].data = $scope.sales.data;\r\n                var chart1 = new Highcharts.Chart($scope.sales.chartOptions);\r\n            })\r\n            .catch(function (error) { $scope.sales.data = null; $scope.sales.yearRange = []; });\r\n    };\r\n\r\n    // Sales Details\r\n    $scope.TransactionList = null;\r\n\r\n    // Date Range Functionality\r\n    $scope.setInitialDateRange = function () {\r\n        var fromDate = new Date();\r\n        var toDate = new Date();\r\n\r\n        fromDate.setDate(fromDate.getDate() - 7);\r\n        fromDate.setHours(0, 0, 0, 0);\r\n        $scope.StartDate = fromDate;\n        toDate.setHours(23, 59, 59, 999);\r\n        $scope.EndDate = toDate;\n    }\r\n    $scope.setInitialDateRange();\n\n    $scope.dateOptions = {\r\n        maxDate: new Date(),\r\n        showWeeks: false,\r\n    };\r\n\r\n    $scope.endDatePopupOpen = function () {\r\n        $scope.endDatePopup.opened = true;\r\n    };\r\n\r\n    $scope.startDatePopupOpen = function () {\r\n        $scope.startDatePopup.opened = true;\r\n    };\r\n\r\n    $scope.startDatePopup = {\r\n        opened: false\r\n    };\r\n\r\n    $scope.endDatePopup = {\r\n        opened: false\r\n    };\r\n\r\n    $scope.clearOverview = function () {\r\n        $scope.salesOverview = true;\r\n        $scope.sales.currentYear = (new Date()).getFullYear() - 1;\r\n        $scope.moreDetails = false;\r\n    };\r\n\r\n    $scope.backToOverview = function () {\r\n        $scope.salesOverview = true;\r\n        $scope.moreDetails = false;\r\n    };\r\n\r\n    $scope.clearDetails = function () {\r\n        $scope.salesOverview = false;\r\n        $scope.TransactionList = null;\r\n        $scope.setInitialDateRange();\r\n        $scope.moreDetails = false;\r\n    };\r\n\r\n    $scope.getDateString = function (dateObject, beginning) {\r\n        var day = dateObject.getDate();       \r\n        var month = dateObject.getMonth() + 1;\r\n        var year = dateObject.getFullYear();\r\n\r\n        return (day < 10 ? \"0\" + day : day) + \"/\" \r\n            + (month < 10 ? \"0\" + month : month) + \"/\" \r\n            + year \r\n            + (beginning === true ? \" 00:00:00\" : \" 23:59:59\");\r\n    }\r\n\r\n    $scope.search = function () {\r\n        var startDateString = $scope.getDateString($scope.StartDate, true);\r\n        var endDateString = $scope.getDateString($scope.EndDate, false);\r\n\r\n        $http\r\n            .post('/api/adminSales/GetTransactionList', {\r\n                StartDate: startDateString,\r\n                EndDate: endDateString\r\n            })\r\n            .then(function (result) { \r\n                $scope.TransactionList = result.data.Transactions; \r\n                $scope.transactionCount = result.data.Transactions.length;\r\n                $scope.totalAmount = result.data.Total;\r\n                $scope.avgAmount = result.data.Total / $scope.transactionCount\r\n                $scope.amountCurrency = result.data.Currency;\r\n            })\r\n            .catch(function (error) {\r\n                $scope.clearDetails();\r\n            });\r\n    };\r\n})\r\n","angular.module('uti.skayo.onlinesale').controller('AdminSearchController', function (LoginService, $scope, $http, $location) {\r\n    var loginService = LoginService;\r\n\r\n    $scope.Email = '';\r\n    $scope.CNP = '';\r\n    $scope.FirstName = '';\r\n    $scope.LastName = '';\r\n    $scope.OnlyAdmin = false;\r\n    $scope.UserList = null;\r\n\r\n    // \r\n    // -- Paging Functionality --\r\n    $scope.paging = {};\r\n    $scope.paging.pageSizeList = [5, 10, 15, 20, 50];\r\n    $scope.paging.itemsPerPage = 15;\r\n    $scope.paging.maxSize = 10;\r\n\r\n    $scope.paging.clearPaging = function () {\r\n        $scope.paging.currentPage = 0;\r\n        $scope.paging.totalItems = 0;\r\n    }\r\n\r\n    $scope.paging.clearPaging();\r\n\r\n    $scope.paging.pageRange = function () {\r\n        var rangeSize = $scope.paging.maxSize;\r\n        var start = $scope.paging.currentPage;\r\n        var pages = $scope.paging.totalPages();\r\n        var range = [];\r\n\r\n        rangeSize = (pages < rangeSize) ? pages : rangeSize;\r\n        start = (start > pages - rangeSize) ? pages - rangeSize :\r\n                    (start < rangeSize) ? 0 : start;\r\n\r\n        for (var i = start; i < start + rangeSize; i++) {\r\n            range.push(i);\r\n        }\r\n        return range;\r\n    };\r\n\r\n    $scope.paging.totalPages = function () {\r\n        return Math.ceil($scope.paging.totalItems / $scope.paging.itemsPerPage);\r\n    };\r\n\r\n    $scope.paging.setPage = function (n) {\r\n        if (n >= 0 && n < $scope.paging.totalPages()) {\r\n            $scope.paging.currentPage = n;\r\n        }\r\n    };\r\n\r\n    $scope.$watch(\"paging.currentPage\", function (newValue, oldValue) {\r\n        if ($scope.paging.totalItems != 0) {\r\n            $scope.search(newValue);\r\n        }\r\n    });\r\n\r\n    $scope.$watch(\"paging.itemsPerPage\", function (newValue, oldValue) {\r\n        if ($scope.paging.totalItems != 0) {\r\n            $scope.search(-1);\r\n        }\r\n    });\r\n\r\n    $scope.search = function (pageNumber) {\r\n        if (pageNumber < 0) {\r\n            $scope.paging.clearPaging();\r\n            pageNumber = 0;\r\n        }\r\n        $http\r\n            .post('/api/adminSearch/UserList', {\r\n                Email: $scope.Email,\r\n                CNP: $scope.CNP,\r\n                FirstName: $scope.FirstName,\r\n                LastName: $scope.LastName,\r\n                OnlyAdmin: $scope.OnlyAdmin,\r\n                PageNumber: pageNumber,\r\n                ItemsPerPage: $scope.paging.itemsPerPage\r\n            })\r\n            .then(function (result) { $scope.UserList = result.data.Users; $scope.paging.totalItems = result.data.Total; })\r\n            .catch(function (error) { $scope.UserList = null; $scope.paging.totalItems = 0; });\r\n    };\r\n\r\n    $scope.clear = function () {\r\n        $scope.Email = '';\r\n        $scope.CNP = '';\r\n        $scope.FirstName = '';\r\n        $scope.LastName = '';\r\n        $scope.OnlyAdmin = false;\r\n        $scope.UserList = null;\r\n        $scope.paging.clearPaging();\r\n    };\r\n\r\n    $scope.impersonate = function (user) {\r\n        $http\r\n            .post('/api/adminSearch/Impersonate', {\r\n                Email: user.Email\r\n            })\r\n            .then(function (result) {\r\n                var adminUser = loginService.getCurrentUser();\r\n                loginService.loginByProxy(adminUser.Email, result.data.Email).then(function(){\r\n                    $location.path('/myAccount');\r\n                });\r\n            })\r\n            .catch(function (error) { debugger; });\r\n    };\r\n})","angular.module('uti.skayo.onlinesale').controller('AdminSettingCreateController', function ($scope, $http, $location, gettextCatalog) {\r\n    $scope.errors = null;\r\n    $scope.types = ['BOOL', 'DATE', 'DECIMAL', 'INT', 'RADIO', 'STRING'];\r\n    $scope.param = {\r\n        Id: null,\r\n        Type: null,\r\n        Key: null,\r\n        ValueBOOL: null,\r\n        ValueINT: null,\r\n        ValueDECIMAL: null,\r\n        ValueSTRING: null,\r\n        ValueDATE: null,\r\n        ValueRADIO: null\r\n    };\r\n\r\n    $scope.save = function () {\r\n        $http.post('api/adminSettingCreate', $scope.param)\r\n             .then(function (data) {\r\n                 debugger;\r\n                 if (data.data.Errors.length === 0)\r\n                     $location.path('/adminSettings');\r\n                 else\r\n                     $scope.errors = data.data.Errors;\r\n             })\r\n             .catch(function (error) {\r\n                 $scope.errors = [error];\r\n             });\r\n    }\r\n\r\n    $scope.updateType = function () {\r\n        $scope.param.ValueBOOL = null;\r\n        $scope.param.ValueINT = null;\r\n        $scope.param.ValueDECIMAL = null;\r\n        $scope.param.ValueSTRING = null;\r\n        $scope.param.ValueDATE = null;\r\n        $scope.param.ValueRADIO = null;\r\n\r\n        switch ($scope.param.Type) {\r\n            case 'BOOL': $scope.param.ValueBOOL = false; break;\r\n            case 'INT': $scope.param.ValueINT = 0; break;\r\n            case 'DECIMAL': $scope.param.ValueDECIMAL = 0; break;\r\n            case 'STRING': $scope.param.ValueSTRING = ''; break;\r\n            case 'DATE': {\r\n                var now = new Date();\r\n                $scope.param.ValueDATE = now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate();\r\n                break;\r\n            }\r\n            case 'RADIO': $scope.param.ValueRADIO = { Options: [] }; break;\r\n        }\r\n    }\r\n\r\n    $scope.newOption = { Value: '', Text: '' };\r\n\r\n    $scope.addOption = function () {\r\n        $scope.param.ValueRADIO.Options.push({ Value: $scope.newOption.Value, Text: $scope.newOption.Text });\r\n        $scope.newOption.Value = '';\r\n        $scope.newOption.Text = '';\r\n    }\r\n\r\n    $scope.removeOption = function (option) {\r\n        var index = $scope.param.ValueRADIO.Options.indexOf(option);\r\n        $scope.param.ValueRADIO.Options.splice(index, 1);\r\n    }\r\n\r\n    $scope.getTranslation = function (text) {\r\n        return gettextCatalog.getString(text);\r\n    }\r\n})","angular.module('uti.skayo.onlinesale').controller('AdminSettingsController', function ($scope, $http, $location, blockUI, SweetAlert) {\r\n    $scope.config = null;\r\n    $scope.errors = null;\r\n\r\n    $scope.loadSettings = function () {\r\n        blockUI.start();\r\n        $http.get('api/adminGetSettings')\r\n             .then(function (data) {\r\n                 blockUI.stop();\r\n                 $scope.config = data.data;\r\n\r\n                 if ($scope.form)\r\n                     $scope.form.$setPristine();\r\n             })\r\n             .catch(function (error) { blockUI.stop(); $scope.errors = ['Communication error !'] });\r\n    }\r\n\r\n    $scope.loadSettings();\r\n\r\n    $scope.save = function () {\r\n        blockUI.start();\r\n        $http.post('api/adminSaveSettings', $scope.config)\r\n             .then(function (data) {\r\n                 blockUI.stop();\r\n                 if (data.data.Errors.length === 0)\r\n                     $scope.loadSettings();\r\n                 else\r\n                     $scope.errors = data.data.Errors;\r\n             })\r\n             .catch(function (error) { blockUI.stop(); $scope.errors = ['Communication error !']; });\r\n    }\r\n\r\n    $scope.create = function () {\r\n        $location.path('/adminSettingCreate');\r\n    }\r\n})","angular.module('uti.skayo.onlinesale').controller('AdminTransactionsController', function (LoginService, $scope, $http, $location, $uibModal, gettextCatalog) {\r\n    //\r\n    // Search Criteria\r\n    $scope.Email = '';\r\n    $scope.CardNumber = '';\r\n    $scope.RechargeStatus = '';\r\n    $scope.PaymentStatus = '';\r\n    $scope.TransactionList = null;\r\n    $scope.rechargeStatusList = [];\r\n    $scope.paymentStatusList = [];\r\n\r\n    $scope.fillRechargeStatusList = function () {\r\n        $http\r\n            .post('/api/adminTransaction/RechargeStatusList', {})\r\n            .then(function (result) { $scope.rechargeStatusList = result.data; })\r\n            .catch(function (error) { $scope.rechargeStatusList = []; });\r\n    };\r\n\r\n    $scope.fillPaymentStatusList = function () {\r\n        $http\r\n            .post('/api/adminTransaction/PaymentStatusList', {})\r\n            .then(function (result) { $scope.paymentStatusList = result.data; })\r\n            .catch(function (error) { $scope.paymentStatusList = []; });\r\n    };\r\n\r\n    $scope.fillRechargeStatusList();\r\n    $scope.fillPaymentStatusList();\r\n\r\n    //\r\n    // Date Range Functionality\r\n    $scope.setInitialDateRange = function () {\r\n        var fromDate = new Date();\r\n        var toDate = new Date();\r\n\r\n        fromDate.setDate(fromDate.getDate() - 7);\r\n        fromDate.setHours(0, 0, 0, 0);\r\n        $scope.StartDate = fromDate;\n        toDate.setHours(23, 59, 59, 999);\r\n        $scope.EndDate = toDate;\n    }\r\n    $scope.setInitialDateRange();\n\n    $scope.dateOptions = {\r\n        maxDate: new Date(),\r\n        showWeeks: false,\r\n    };\r\n\r\n    $scope.endDatePopupOpen = function () {\r\n        $scope.endDatePopup.opened = true;\r\n    };\r\n\r\n    $scope.startDatePopupOpen = function () {\r\n        $scope.startDatePopup.opened = true;\r\n    };\r\n\r\n    $scope.startDatePopup = {\r\n        opened: false\r\n    };\r\n\r\n    $scope.endDatePopup = {\r\n        opened: false\r\n    };\r\n\r\n    // \r\n    // -- Paging Functionality --\r\n    $scope.paging = {};\r\n    $scope.paging.pageSizeList = [5, 10, 15, 20, 50];\r\n    $scope.paging.itemsPerPage = 15;\r\n    $scope.paging.maxSize = 10;\r\n\r\n    $scope.paging.clearPaging = function () {\r\n        $scope.paging.currentPage = 0;\r\n        $scope.paging.totalItems = 0;\r\n    }\r\n    $scope.paging.clearPaging();\r\n\r\n    $scope.paging.pageRange = function () {\r\n        var rangeSize = $scope.paging.maxSize;\r\n        var start = $scope.paging.currentPage;\r\n        var pages = $scope.paging.totalPages();\r\n        var range = [];\r\n\r\n        rangeSize = (pages < rangeSize) ? pages : rangeSize;\r\n        start = (start > pages - rangeSize) ? pages - rangeSize :\r\n                    (start < rangeSize) ? 0 : start;\r\n\r\n        for (var i = start; i < start + rangeSize; i++) {\r\n            range.push(i);\r\n        }\r\n        return range;\r\n    };\r\n\r\n    $scope.paging.totalPages = function () {\r\n        return Math.ceil($scope.paging.totalItems / $scope.paging.itemsPerPage);\r\n    };\r\n\r\n    $scope.paging.setPage = function (n) {\r\n        if (n >= 0 && n < $scope.paging.totalPages()) {\r\n            $scope.paging.currentPage = n;\r\n        }\r\n    };\r\n\r\n    $scope.$watch(\"paging.currentPage\", function (newValue, oldValue) {\r\n        if ($scope.paging.totalItems !== 0) {\r\n            $scope.search(newValue);\r\n        }\r\n    });\r\n\r\n    $scope.$watch(\"paging.itemsPerPage\", function (newValue, oldValue) {\r\n        if ($scope.paging.totalItems !== 0) {\r\n            $scope.search(-1);\r\n        }\r\n    });\r\n\r\n    $scope.getDateString = function (dateObject, beginning) {\r\n        var day = dateObject.getDate();       \r\n        var month = dateObject.getMonth() + 1;\r\n        var year = dateObject.getFullYear();\r\n\r\n        return (day < 10 ? \"0\" + day : day) + \"/\" \r\n            + (month < 10 ? \"0\" + month : month) + \"/\" \r\n            + year \r\n            + (beginning === true ? \" 00:00:00\" : \" 23:59:59\");\r\n    }\r\n\r\n    $scope.search = function (pageNumber) {\r\n        if (pageNumber < 0) {\r\n            $scope.paging.clearPaging();\r\n            pageNumber = 0;\r\n        }\r\n\r\n        var startDateString = $scope.getDateString($scope.StartDate, true);\r\n        var endDateString = $scope.getDateString($scope.EndDate, false);\r\n\r\n        $http\r\n            .post('/api/adminTransaction/TransactionList', {\r\n                Email: $scope.Email,\r\n                CardNumber: $scope.CardNumber,\r\n                RechargeStatus: $scope.RechargeStatus,\r\n                PaymentStatus: $scope.PaymentStatus,\r\n                StartDate: startDateString,\r\n                EndDate: endDateString,\r\n                PageNumber: pageNumber,\r\n                ItemsPerPage: $scope.paging.itemsPerPage\r\n            })\r\n            .then(function (result) { $scope.TransactionList = result.data.Transactions; $scope.paging.totalItems = result.data.Total; })\r\n            .catch(function (error) { $scope.TransactionList = null; $scope.paging.totalItems = 0; });\r\n    };\r\n\r\n    $scope.clear = function () {\r\n        $scope.Email = '';\r\n        $scope.CardNumber = '';\r\n        $scope.RechargeStatus = '';\r\n        $scope.PaymentStatus = '';\r\n        $scope.TransactionList = null;\r\n        $scope.setInitialDateRange();\r\n        $scope.paging.clearPaging();\r\n    };\r\n})","angular.module('uti.skayo.onlinesale').controller('AdminUserAuditController', function ($scope, $http) {\r\n    $scope.UserEmail = '';\r\n    $scope.UserFirstName = '';\r\n    $scope.UserLastName = '';\r\n    $scope.AuditList = null;\r\n    $scope.Action = null;\r\n    $scope.actionList = [];\r\n\r\n    //\r\n    // Date Range Functionality\r\n    $scope.setInitialDateRange = function () {\r\n        var fromDate = new Date();\r\n        var toDate = new Date();\r\n\r\n        fromDate.setDate(fromDate.getDate() - 7);\r\n        fromDate.setHours(0, 0, 0, 0);\r\n        $scope.StartDate = fromDate;\n        toDate.setHours(23, 59, 59, 999);\r\n        $scope.EndDate = toDate;\r\n    }\r\n    $scope.setInitialDateRange();\n\n    //\n    // Action type filter\n    $scope.fillActionList = function () {\r\n        $http\r\n            .post('/api/adminUserAudit/ActionList', {})\r\n            .then(function (result) { $scope.actionList = result.data; })\r\n            .catch(function (error) { $scope.actionList = []; });\r\n    };\n    $scope.fillActionList();\n\n    $scope.dateOptions = {\r\n        maxDate: new Date(),\r\n        showWeeks: false,\r\n    };\r\n\r\n    $scope.endDatePopupOpen = function () {\r\n        $scope.endDatePopup.opened = true;\r\n    };\r\n\r\n    $scope.startDatePopupOpen = function () {\r\n        $scope.startDatePopup.opened = true;\r\n    };\r\n\r\n    $scope.startDatePopup = {\r\n        opened: false\r\n    };\r\n\r\n    $scope.endDatePopup = {\r\n        opened: false\r\n    };\r\n\r\n    // \r\n    // -- Paging Functionality --\r\n    $scope.paging = {};\r\n    $scope.paging.pageSizeList = [5, 10, 15, 20, 50];\r\n    $scope.paging.itemsPerPage = 15;\r\n    $scope.paging.maxSize = 10;\r\n\r\n    $scope.paging.clearPaging = function () {\r\n        $scope.paging.currentPage = 0;\r\n        $scope.paging.totalItems = 0;\r\n    }\r\n    $scope.paging.clearPaging();\r\n\r\n    $scope.paging.pageRange = function () {\r\n        var rangeSize = $scope.paging.maxSize;\r\n        var start = $scope.paging.currentPage;\r\n        var pages = $scope.paging.totalPages();\r\n        var range = [];\r\n\r\n        rangeSize = (pages < rangeSize) ? pages : rangeSize;\r\n        start = (start > pages - rangeSize) ? pages - rangeSize :\r\n                    (start < rangeSize) ? 0 : start;\r\n\r\n        for (var i = start; i < start + rangeSize; i++) {\r\n            range.push(i);\r\n        }\r\n        return range;\r\n    };\r\n\r\n    $scope.paging.totalPages = function () {\r\n        return Math.ceil($scope.paging.totalItems / $scope.paging.itemsPerPage);\r\n    };\r\n\r\n    $scope.paging.setPage = function (n) {\r\n        if (n >= 0 && n < $scope.paging.totalPages()) {\r\n            $scope.paging.currentPage = n;\r\n        }\r\n    };\r\n\r\n    $scope.$watch(\"paging.currentPage\", function (newValue, oldValue) {\r\n        if ($scope.paging.totalItems !== 0) {\r\n            $scope.search(newValue);\r\n        }\r\n    });\r\n\r\n    $scope.$watch(\"paging.itemsPerPage\", function (newValue, oldValue) {\r\n        if ($scope.paging.totalItems !== 0) {\r\n            $scope.search(-1);\r\n        }\r\n    });\r\n\r\n    $scope.getDateString = function (dateObject, beginning) {\r\n        var day = dateObject.getDate();\r\n        var month = dateObject.getMonth() + 1;\r\n        var year = dateObject.getFullYear();\r\n\r\n        return (day < 10 ? \"0\" + day : day) + \"/\"\r\n            + (month < 10 ? \"0\" + month : month) + \"/\"\r\n            + year\r\n            + (beginning === true ? \" 00:00:00\" : \" 23:59:59\");\r\n    }\r\n\r\n    $scope.search = function (pageNumber) {\r\n        if (pageNumber < 0) {\r\n            $scope.paging.clearPaging();\r\n            pageNumber = 0;\r\n        }\r\n\r\n        var startDateString = $scope.getDateString($scope.StartDate, true);\r\n        var endDateString = $scope.getDateString($scope.EndDate, false);\r\n\r\n        $http\r\n            .post('/api/adminUserAudit/AuditList', {\r\n                UserEmail: $scope.UserEmail,\r\n                UserFirstName: $scope.UserFirstName,\r\n                UserLastName: $scope.UserLastName,\r\n                StartDate: startDateString,\r\n                EndDate: endDateString,\r\n                Action: $scope.Action != null ? $scope.Action.Id : null,\r\n                PageNumber: pageNumber,\r\n                ItemsPerPage: $scope.paging.itemsPerPage\r\n            })\r\n            .then(function (result) { $scope.AuditList = result.data.Audits; $scope.paging.totalItems = result.data.Total; })\r\n            .catch(function (error) { $scope.AuditList = null; $scope.paging.totalItems = 0; });\r\n    };\r\n\r\n    $scope.clear = function () {\r\n        $scope.UserEmail = '';\r\n        $scope.UserFirstName = '';\r\n        $scope.UserLastName = '';\r\n        $scope.AuditList = null;\r\n        $scope.Action = null;\r\n        $scope.setInitialDateRange();\r\n        $scope.paging.clearPaging();\r\n    };\r\n})","angular.module('uti.skayo.onlinesale').controller('ConfirmController', function ($scope, $uibModalInstance, message) {\r\n\r\n    $scope.message = message;\r\n\r\n    $scope.ok = function () {\r\n        $uibModalInstance.close(true);\r\n    };\r\n\r\n    $scope.cancel = function () {\r\n        $uibModalInstance.dismiss(false);\r\n    };\r\n});","angular.module('uti.skayo.onlinesale').controller('ErrorController', function ($scope, $routeParams, $http) {\r\n    $scope.errorMessage = $routeParams.errorMessage;\r\n\r\n    $http.get('api/error').then(function(msg){\r\n        $scope.errorMessage = msg.data;\r\n    });\r\n\r\n});","angular.module('uti.skayo.onlinesale').controller('HelpController', function ($scope, $routeParams, $http) {\r\n\r\n\r\n});","angular.module('uti.skayo.onlinesale').controller('HomeController', function ($scope, $http) {\r\n    $http.get('api/home').success(function (data) {\r\n        $scope.validSession = data;\r\n    });\r\n});","angular.module('uti.skayo.onlinesale').controller('LoginController', function (LoginService, $scope, $location, blockUI, SweetAlert, gettextCatalog) {\r\n    var loginService = LoginService;\r\n    $scope.email = '';\r\n    $scope.password = '';\r\n    $scope.rememberLastLogin = false;\r\n\r\n    var previousEmail = loginService.previousEmail();\r\n    if (previousEmail !== null) {\r\n        $scope.rememberLastLogin = true;\r\n        $scope.email = previousEmail;\r\n    }\r\n    \r\n    $scope.login = function () {\r\n        blockUI.start();\r\n        loginService.login($scope.email, $scope.password, $scope.rememberLastLogin, localStorage.getItem(\"skayo-client-language\"))\r\n            .then(function () {\r\n                if (loginService.isSuperAdmin() === true) {\r\n                    $location.path('/adminSearch');\r\n                } else {\r\n                    $location.path('/home');\r\n                }\r\n            },function(){\r\n                SweetAlert.swal({\r\n                        title: '',\r\n                        text: gettextCatalog.getString('Wrong username or password'),\r\n                        type: 'error'\r\n                    });\r\n            })\r\n            .finally(function(){\r\n                blockUI.stop();\r\n            });\r\n    };\r\n\r\n    $scope.onKeyUp = function (event) { if (event.which === 13) $scope.login(); } // Login with enter key\r\n});","angular.module('uti.skayo.onlinesale').controller('MainController', function (LoginService, $scope, $location, blockUI, SweetAlert, gettextCatalog) {\r\n    $scope.getBodyClass = function(){\r\n        if ($location.$$path == '/login')\r\n            return 'login';\r\n        return '';\r\n    }\r\n});\r\n","angular.module('uti.skayo.onlinesale').controller('MenuController', function (LoginService, $rootScope, $scope, $http, $location, gettextCatalog, $uibModal, $window) {\r\n    var loginService = LoginService;\r\n\r\n    $scope.navCollapsed = true;\r\n\r\n    $scope.isLoggedIn = function () {\r\n        return loginService.isLoggedIn();\r\n    };\r\n\r\n    $scope.isSuperAdmin = function () {\r\n        return loginService.isSuperAdmin();\r\n    };\r\n\r\n    $scope.isAdmin = function () {\r\n        return loginService.isAdmin();\r\n    };\r\n\r\n    $scope.isImpersonating = function () {\r\n        return loginService.isImpersonating();\r\n    };\r\n\r\n    $scope.currentUser = function () {\r\n        return loginService.getCurrentUser();\r\n    };\r\n\r\n    $scope.impersonatingUser = function () {\r\n        return loginService.getImpersonatingUser();\r\n    };\r\n\r\n    var languages = {\r\n        en_US: 'English',\r\n        ro: 'Română'\r\n    };\r\n\r\n    $scope.logout = function(){\r\n        var modalInstance = $uibModal.open({\r\n            //animation: $scope.animationsEnabled,\r\n            templateUrl: '/app/views/confirm.html',\r\n            controller: 'ConfirmController',\r\n            windowClass: 'center-modal',\r\n            //size: 'lg',\r\n            resolve: {\r\n                message: function () {\r\n                    return gettextCatalog.getString(\"Are you sure you want to quit?\");\r\n                }\r\n            }\r\n        });\r\n\r\n        modalInstance.result.then(function(res) {\r\n            if (res === true) {\r\n                loginService.logout();\r\n            }\r\n        });\r\n\r\n    };\r\n\r\n    $scope.isActive = function (viewLocation) {\r\n        return viewLocation === $location.path();\r\n    };\r\n\r\n    $scope.getLanguage = function () {\r\n        var languageCode = gettextCatalog.getCurrentLanguage();\r\n        return languages[languageCode];\r\n    };\r\n\r\n    $scope.setLanguage = function (language) {\r\n        localStorage.setItem(\"skayo-client-language\", language);\r\n\r\n        if (loginService.isLoggedIn()) {\r\n            $http.post('api/myAccount/setlanguage', { Language: language }).then(function () {\r\n                $window.location.reload();\r\n            });\r\n        } else {\r\n            $window.location.reload();\r\n        }\r\n    };\r\n});\r\n\r\n","angular.module('uti.skayo.onlinesale').controller('MyAccountController',function($scope, $http, gettextCatalog, LoginService, SweetAlert){\r\n    var loginService = LoginService;\r\n\r\n    $scope.message = \"\";\r\n\r\n    $scope.oldPassword = \"\";\r\n    $scope.password = \"\";\r\n    $scope.passwordConfirm = \"\";\r\n\r\n    $scope.passwordForEmail = '';\r\n    $scope.user = loginService.getActiveUser(); // CurrentUser() or ImpersonatingUser() (as relevant)\r\n    $scope.savedAdminRights = $scope.user.IsAdmin;\r\n    $scope.savedEmailAddress = $scope.user.Email;\r\n\r\n    $scope.postalAddress = loginService.getPostalAddress();\r\n    $scope.subscriptions = [];\r\n\r\n    $http.get('api/myAccount/subscriptions').then(function (msg) {\r\n        $scope.subscriptions = msg.data;\r\n        /*for (var i=0;i<msg.data.length;i++){\r\n            $scope.subscriptions[i].Description =gettextCatalog.getString($scope.subscriptions[i].Description);\r\n        }*/\r\n    });\r\n\r\n    $http.get('api/myAccount/getPersonName').success(function (data) {\r\n        $scope.firstName = data.FirstName;\r\n        $scope.lastName = data.LastName;\r\n    }).error(function (errorMessage) {\r\n        console.log(errorMessage);\r\n    });\r\n\r\n    $http.get('api/myAccount/getCardList').success(function (data) {\r\n        $scope.cardList = data.Cards.join(', ');\r\n    }).error(function (errorMessage) {\r\n        console.log(errorMessage);\r\n    });\r\n\r\n    $scope.getTranslation = function(text){\r\n        return gettextCatalog.getString(text);\r\n    }\r\n\r\n    $scope.clearPasswordFields = function () {\r\n        $scope.oldPassword = \"\";\r\n        $scope.password = \"\";\r\n        $scope.passwordConfirm = \"\";\r\n    }\r\n\r\n    $scope.emptyPasswordFields = function () {\r\n        return $scope.oldPassword == \"\"\r\n            || $scope.password == \"\"\r\n            || $scope.passwordConfirm == \"\";\r\n    }\r\n\r\n    $scope.changePassword = function () {\r\n        $scope.form.$setSubmitted();\r\n        if (!$scope.emptyPasswordFields() && $scope.form.$valid) {\r\n            $http.post('api/myAccount/changePassword', { oldPassword: $scope.oldPassword, newPassword: $scope.password })\r\n                .then(function () {\r\n                    showSuccess(gettextCatalog.getString(\"The password has been successfully changed\"));\r\n                    $scope.clearPasswordFields();\r\n                    $scope.form.$setUntouched();\r\n                    $scope.form.$setPristine();\r\n                });\r\n        }\r\n    };\r\n\r\n    $scope.updatePersonName = function () {\r\n        if ($scope.firstName != \"\" && $scope.firstName != undefined && $scope.lastName != \"\" && $scope.lastName != undefined) {\r\n            $http.post('api/myAccount/updatePersonName', { firstName: $scope.firstName, lastName: $scope.lastName })\r\n                .then(function () {\r\n                    showSuccess(gettextCatalog.getString(\"First name and last name have been successfully changed\"));\r\n                });\r\n        }\r\n    }\r\n\r\n    $scope.saveInfo = function () {\r\n        $scope.formInfo.$setSubmitted();\r\n        if ($scope.user.Email != $scope.savedEmailAddress) {\r\n            if ($scope.formInfo.$valid) {\r\n                $http.post('api/myAccount/saveInfo', { newEmail: $scope.user.Email })\r\n                   .then(function () {\r\n                       showSuccess(gettextCatalog.getString(\"Success\"));\r\n                       $scope.formInfo.$setUntouched();\r\n                       $scope.formInfo.$setPristine();\r\n                       loginService.updateImpersonation($scope.user.Email);\r\n                       $scope.savedEmailAddress = $scope.user.Email;\r\n                   });\r\n            }\r\n        }\r\n    };\r\n\r\n    $scope.toggleAdminRights = function () {\r\n        if ($scope.user.IsAdmin != $scope.savedAdminRights) {\r\n            var confirmMessage = \"Are you sure you want to \";\r\n            confirmMessage += $scope.user.IsAdmin ? \"Grant\" : \"Revoke\";\r\n            confirmMessage += \" Administrator Rights for \";\r\n            confirmMessage += $scope.user.Name;\r\n            confirmMessage += \"?\";\r\n\r\n            SweetAlert.swal({\r\n                title: \"Administrator Rights\",\r\n                text: confirmMessage,\r\n                type: \"warning\",\r\n                showCancelButton: true,\r\n                confirmButtonClass: \"btn-danger\",\r\n                confirmButtonText: \"Yes\",\r\n                cancelButtonText: \"No\",\r\n                closeOnConfirm: false,\r\n                closeOnCancel: false\r\n            },\r\n            function (isConfirm) {\r\n                if (isConfirm) {\r\n                    swal(\"Change Verified\", \"Please save your changes.\", \"success\");\r\n                    $scope.formAdmin.$setDirty();\r\n                } else {\r\n                    swal(\"Change Cancelled\", \"\", \"error\");\r\n                    $scope.user.IsAdmin = $scope.savedAdminRights;\r\n                    $scope.formAdmin.$setUntouched();\r\n                    $scope.formAdmin.$setPristine();\r\n                }\r\n            });\r\n        }\r\n    };\r\n\r\n    $scope.updateAdmin = function () {\r\n        if ($scope.savedAdminRights != $scope.user.IsAdmin) {\r\n            $http.post('api/myAccount/updateAdmin')\r\n               .then(function () {\r\n                   showSuccess(gettextCatalog.getString(\"Success\"));\r\n                   $scope.formAdmin.$setUntouched();\r\n                   $scope.formAdmin.$setPristine();\r\n                   $scope.savedAdminRights = $scope.user.IsAdmin;\r\n               });\r\n        }\r\n    };\r\n\r\n    $scope.updateNotifications = function(){\r\n        $http.post('api/myAccount/subscriptions',$scope.subscriptions).then(function(){\r\n            showSuccess(gettextCatalog.getString(\"Email notifications have been successfully updated\"));\r\n        })\r\n    };\r\n\r\n    $scope.validation = {\r\n        getRequiredText : function(){ return gettextCatalog.getString(\"Required field\"); },\r\n        getInvalidEmailText : function() { return gettextCatalog.getString(\"Invalid email\"); },\r\n        getSameText: function() { return gettextCatalog.getString(\"This field needs to be the same as the previous one\"); },\r\n        getTooShortText : function(){ return gettextCatalog.getString(\"Field too short\");},\r\n        getTooLongText: function() { return gettextCatalog.getString(\"Field too long\");},\r\n\t\tgetMinLettersText: function(minLettersValue) { return gettextCatalog.getString(\"The field must contain at least {{value}} letters.\", {value: minLettersValue || 2});},\r\n        getMinDigitsText: function (minDigitsValue) { return gettextCatalog.getString(\"The field must contain at least {{value}} digits.\", { value: minDigitsValue || 2 }); },\r\n        agreeCheck: function () { return gettextCatalog.getString(\"You must agree terms and conditions\"); }\r\n    }\r\n\r\n    $scope.isSuperAdmin = function () {\r\n        return (loginService.isSuperAdmin() && !loginService.isImpersonating());\r\n    };\r\n\r\n    $scope.isImpersonating = function () {\r\n        return (loginService.isImpersonating());\r\n    };\r\n\r\n    $scope.updatePostalAddress = function () {\r\n        loginService.updatePostalAddress($scope.postalAddress, function () {\r\n            showSuccess(gettextCatalog.getString(\"The address associated with your account has been successfully changed\"));\r\n        });\r\n    }\r\n\r\n    var showSuccess = function(text)\r\n    {\r\n        SweetAlert.swal({\r\n                title: gettextCatalog.getString('Success'),\r\n                text: text,\r\n                type: \"success\"}\r\n        );\r\n    }\r\n\r\n});","angular.module('uti.skayo.onlinesale').controller('MyCardsController', function (LoginService, $scope, $http, $uibModal, SweetAlert, $routeParams, gettextCatalog, $location) {\r\n    var loginService = LoginService;\r\n\r\n    $scope.cards = [];\r\n    $scope.loaded = false;\r\n\r\n    var isImpersonating = loginService.isImpersonating();\r\n    $scope.globalRechargeOptions = (loginService.allowAdminActions() && isImpersonating) || !isImpersonating;\r\n\r\n    if ($routeParams.paymentResult) {\r\n        var result = JSON.parse($routeParams.paymentResult);\r\n        if (result) {\r\n            if (result.Success) {\r\n\r\n                var text = gettextCatalog.getString(\"PAYMENT_SUCCESS\", result);\r\n\r\n                SweetAlert.swal({\r\n                    title: gettextCatalog.getString('Success'),\r\n                    text: text,\r\n                    type: \"success\"\r\n                },\r\n                    function () {\r\n                        //redirect to login\r\n                        $location.url($location.path());\r\n                    }\r\n                );\r\n            }\r\n            if (!result.Success) {\r\n                var text = \"\";\r\n                if (result.ErrorCode) {\r\n                    text = gettextCatalog.getString(\"Error_\" + result.ErrorCode, result);\r\n                }\r\n                else {\r\n                    var text = gettextCatalog.getString(\"An error was encountered in processing the payment. Please try again later.\");\r\n                }\r\n\r\n                SweetAlert.swal({\r\n                    title: \"\",\r\n                    text: text,\r\n                    type: \"error\"\r\n                },\r\n                    function () {\r\n                        //redirect to login\r\n                        $location.url($location.path());\r\n                    }\r\n                );\r\n            }\r\n            return;\r\n        }\r\n    }\r\n\r\n    $scope.getLocalizationText = function (localization, language) {\r\n        if (!localization)  \r\n            return null;\r\n        var text = null;\r\n        for (var i = 0; i < localization.length; i++) {\r\n            if (localization[i].Language == language) {\r\n                text = localization[i].Text;\r\n                break;\r\n            }\r\n        }\r\n        return text;\r\n    }\r\n\r\n    $scope.getAppName = function (app) {\r\n        var language = gettextCatalog.getCurrentLanguage().replace('_', '-');\r\n        if (app.Localization == null) {\r\n            return \"\";\r\n        }\r\n        var text = $scope.getLocalizationText(app.Localization, language);\r\n        if (!text)\r\n            text = $scope.getLocalizationText(app.Localization, \"Default\");\r\n        return text || app.Name;\r\n    };\r\n\r\n  $http.get('api/myCards').success(function (data) {\r\n\r\n        $scope.loaded = true;\r\n        $scope.cards = data;\r\n        //filter special dates (1900-01-01T00:00:00) (ugly)\r\n        for (var i = 0; i < $scope.cards.length; i++) {\r\n            var card = $scope.cards[i];\r\n            for (var j = 0; j < card.Applications.length; j++) {\r\n                var application = card.Applications[j];\r\n                if (application.LastReloadDate == '1900-01-01T00:00:00')\r\n                    application.LastReloadDate = '';\r\n                if (application.LastValidationDate == '1900-01-01T00:00:00')\r\n                    application.LastValidationDate = '';\r\n\r\n\r\n                if (application.IsPass && application.TransportApplication != null) {\r\n                    if (!application.TransportApplication.HasValidPeriods) {\r\n                        application.Sold = gettextCatalog.getString('Expired');\r\n                    }\r\n                    else {\r\n                        var validPeriods = application.TransportApplication.ValidPeriods.length;\r\n\r\n                    }\r\n                    application.Sold = application.CurrentBalance;\r\n                }\r\n                else if (application.IsPurse) {\r\n                    application.Sold = application.CurrentBalance;\r\n                }\r\n            }\r\n        }\r\n    });\r\n\r\n    $scope.recharge = function (app, card) {\r\n        var controller = \"\";\r\n        var templateUrl = \"\";\r\n\r\n        //decide what interface to show\r\n        if (app.IsPurse) {\r\n            templateUrl = '/app/views/rechargePurse.html';\r\n            controller = 'RechargePurseController';\r\n        }\r\n        else if (app.IsPass) {\r\n            templateUrl = '/app/views/rechargePass.html';\r\n            controller = 'RechargePassController';\r\n        }\r\n        else if (app.IsTrip) {\r\n            templateUrl = '/app/views/rechargeTrip.html';\r\n            controller = 'RechargeTripController';\r\n        }\r\n\r\n\r\n        var modalInstance = $uibModal.open({\r\n            templateUrl: templateUrl,\r\n            //size: 'lg',\r\n            windowClass: 'center-modal',\r\n            controller: controller,\r\n            resolve: {\r\n                application: app,\r\n                card: card\r\n            }\r\n        });\r\n    }\r\n\r\n    $scope.allowRecharge = function (app, card) {\r\n        if (!card.AllowedAppKeys)\r\n            return false;\r\n\r\n        var supportedApp = card.AllowedAppKeys.indexOf(app.ApplicationKey) !== -1;\r\n        return app.ShowRechargeOption && supportedApp;\r\n    }\r\n\r\n    $scope.blockCard = function (cardLogicalSerial) {\r\n        swal({\r\n            title: gettextCatalog.getString(\"Block card\"),\r\n            text: gettextCatalog.getString(\"Blocking the card can be useful when it gets stolen or lost. The remaining amount can be translated at a point of sale.\"),\r\n            type: \"input\",\r\n            inputPlaceholder: gettextCatalog.getString(\"Reason\"),\r\n            showCancelButton: true,\r\n            showLoaderOnConfirm: true,\r\n            closeOnConfirm: false\r\n        }, function (inputValue) {\r\n            if (inputValue === false)\r\n                return false;\r\n            if (inputValue === \"\") {\r\n                swal.showInputError(gettextCatalog.getString(\"A reason is needed\"));\r\n                return false\r\n            }\r\n            $http.post('api/myCards/block', { CardLogicalSerial: cardLogicalSerial, Reason: inputValue }).then(function () {\r\n                swal(gettextCatalog.getString(\"The card has been successfully blocked\"));\r\n                $location.url($location.path()); //hope this works (it should refresh the page?\r\n            });\r\n\r\n        });\r\n    }\r\n\r\n    $scope.getCurrentBalanceText = function (item) {\r\n        if (item.CurrentBalanceInfo && item.CurrentBalanceInfo.Format) {\r\n            return gettextCatalog.getString(item.CurrentBalanceInfo.Format, item.CurrentBalanceInfo.Scope || null);\r\n        }\r\n        else {\r\n            return item.CurrentBalance;\r\n        }\r\n    }\r\n});\r\n","angular.module('uti.skayo.onlinesale').controller('ProductsController',function($scope, $http,gettextCatalog){\r\n    $scope.products = []\r\n\r\n    $http.get('api/products').success(function(data){\r\n        $scope.products = data.sort((a, b) => a.Price - b.Price);\r\n    });\r\n\r\n    $scope.getLocalizationText = function (localization, language) {\r\n        if (!localization)\r\n            return null;\r\n        var text = null;\r\n        for (var i = 0; i < localization.length; i++) {\r\n            if (localization[i].Language == language) {\r\n                text = localization[i].Text;\r\n                break;\r\n            }\r\n        }\r\n        return text;\r\n    }\r\n\r\n    $scope.getProductName = function(product){\r\n        var language = gettextCatalog.getCurrentLanguage().replace('_', '-');\r\n        var localization = product.Localization;\r\n        var text = $scope.getLocalizationText(localization, language);\r\n        if (!text)\r\n            text = $scope.getLocalizationText(localization, \"Default\");\r\n        return text || product.Name;\r\n    };\r\n\r\n    $scope.getProductValidity = function(p){\r\n\r\n        //for purse, there is no expiration date, return ''\r\n        if (p.IsPurse){\r\n            return '';\r\n        }\r\n\r\n        var count = p.Duration;\r\n        var timeUnit = p.TimeUnit;\r\n        var validityType = p.ValidityType;\r\n        var text = \"\";\r\n        if (validityType == \"timeunit\") {\r\n            var pluralString = '{{$count}} ' + timeUnit;\r\n            text = gettextCatalog.getPlural(count, timeUnit, pluralString, { $count: count });\r\n        }\r\n\r\n        if (validityType == \"enddate\") {\r\n            var until = 'until';\r\n            text = gettextCatalog.getString(until) + \" \" + p.EndDate;\r\n        }\r\n\r\n        if (validityType == \"unlimited\") {\r\n            text = gettextCatalog.getString(\"unlimited\");\r\n        }\r\n        return text;\r\n    };\r\n});","angular.module('uti.skayo.onlinesale').controller('RechargePassController', function ($scope, $uibModalInstance, application, card, gettextCatalog, $http) {\r\n\r\n\r\n    Date.prototype.addDays = function (days) {\r\n        this.setDate(this.getDate() + parseInt(days));\r\n        return this;\r\n    };\r\n\r\n    Date.prototype.toShortDateString = function () {\r\n        return this.getDate() + '.' + (this.getMonth() + 1) + '.' + this.getFullYear();\r\n    };\r\n\r\n    $scope.validationMessage = '';\r\n    $scope.message = 'Super';\r\n    $scope.application = application;\r\n    $scope.card = card;\r\n    $scope.startDate = null;\r\n\r\n    $scope.rechargeDate = new Date().addDays(1);\r\n    //set date of tomorrow\r\n    //$scope.rechargeDate.setDate($scope.rechargeDate.getDate() + 1);\r\n    $scope.validationMessage = '';\r\n\r\n\r\n    if (application.MaxValidEndDate)\r\n//        $scope.minDate = new Date(application.MaxValidEndDate).addDays(1);\r\n        $scope.minDate = new Date(application.MaxValidEndDate);\r\n    else\r\n        $scope.minDate = new Date().addDays(1);\r\n    $scope.dateOptions = {\r\n        minDate: new Date()\r\n    };\r\n    $scope.maxDate = new Date().addDays(60);\r\n\r\n    $scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];\r\n    $scope.format = $scope.formats[2];\r\n    $scope.startDate = $scope.minDate;\r\n\r\n\r\n    $scope.isValid = function () {\r\n        if (!$scope.startDate) {\r\n            $scope.validationMessage = gettextCatalog.getString('Enter a valid date');\r\n            return false;\r\n        }\r\n        if (application.MaxValidEndDate && $scope.startDate < new Date(application.MaxValidEndDate)) {\r\n            $scope.validationMessage = gettextCatalog.getString('The date cannot be before {{minDate}}', { minDate: $scope.minDate.toShortDateString() });\r\n            return false;\r\n        }\r\n\r\n        var maxDate = new Date($scope.maxDate).addDays(1);\r\n        if ($scope.startDate > maxDate) {\r\n            $scope.validationMessage = gettextCatalog.getString('The date cannot be after {{maxDate}}', { maxDate: $scope.maxDate.toShortDateString() });\r\n            return false;\r\n        }\r\n\r\n        $scope.validationMessage = '';\r\n        return true;\r\n    }\r\n\r\n\r\n    $scope.status = {\r\n        opened: false\r\n    };\r\n    $scope.open = function ($event) {\r\n        $scope.status.opened = true;\r\n    };\r\n\r\n    $scope.ok = function () {\r\n\r\n        if (!$scope.isValid()) \r\n            return;\r\n        $uibModalInstance.dismiss(false);\r\n        /*\r\n        const day = String($scope.startDate.getDate()).padStart(2, '0');\r\n        const month = String($scope.startDate.getMonth() + 1).padStart(2, '0');\r\n        const year = $scope.startDate.getFullYear();\r\n\r\n        const formattedDate = `${day}/${month}/${year}`;\r\n        */\r\n        var rechargeInfo = { cardIdentifier: card.PhysicalSerialNo, applicationIndex: application.Index, startDate: $scope.startDate.toLocaleDateString('en-US') };\r\n\r\n\r\n        $http.post('api/rechargeValidation', rechargeInfo).then(function () {\r\n            post('api/recharge', rechargeInfo);\r\n        });\r\n\r\n    };\r\n\r\n    $scope.cancel = function () {\r\n        $uibModalInstance.dismiss(false);\r\n    };\r\n\r\n\r\n\r\n    //Method to post with redirect (full form post, not ajax...)\r\n    var post = function (path, params, method) {\r\n        method = method || \"post\"; // Set method to post by default if not specified.\r\n\r\n        // The rest of this code assumes you are not using a library.\r\n        // It can be made less wordy if you use one.\r\n        var form = document.createElement(\"form\");\r\n        form.setAttribute(\"method\", method);\r\n        form.setAttribute(\"action\", path);\r\n\r\n        for (var key in params) {\r\n            if (params.hasOwnProperty(key)) {\r\n                var hiddenField = document.createElement(\"input\");\r\n                hiddenField.setAttribute(\"type\", \"hidden\");\r\n                hiddenField.setAttribute(\"name\", key);\r\n                hiddenField.setAttribute(\"value\", params[key]);\r\n\r\n                form.appendChild(hiddenField);\r\n            }\r\n        }\r\n\r\n        document.body.appendChild(form);\r\n        form.submit();\r\n    }\r\n\r\n\r\n\r\n    $scope.getCurrentBalanceText = function (item) {\r\n        if (item.CurrentBalanceInfo && item.CurrentBalanceInfo.Format) {\r\n            return gettextCatalog.getString(item.CurrentBalanceInfo.Format, item.CurrentBalanceInfo.Scope || null);\r\n        }\r\n        else {\r\n            return item.CurrentBalance;\r\n        }\r\n    }\r\n});\r\n","angular.module('uti.skayo.onlinesale').controller('RechargePurseController',function($scope, $uibModalInstance, application, card, gettextCatalog, $http, $filter){\r\n\r\n    $scope.application = application;\r\n    $scope.card = card;\r\n    $scope.quantity = null;\r\n    $scope.rechargeDate =  new Date();\r\n    //set date of tomorrow\r\n    $scope.rechargeDate.setDate($scope.rechargeDate.getDate() + 1);\r\n    $scope.validationMessage = '';\r\n\r\n    $scope.ok = function () {\r\n        if ($scope.isValid() == false)\r\n            return;\r\n\r\n        $uibModalInstance.dismiss(false);\r\n\r\n        var clientLanguage = gettextCatalog.getCurrentLanguage() || \"EN\";\r\n        var rechargeInfo = {cardIdentifier: card.PhysicalSerialNo, applicationIndex :application.Index, quantity:$scope.quantity, clientLanguage:clientLanguage};\r\n\r\n        $http.post('api/rechargeValidation',rechargeInfo).then(function(){\r\n            post('api/recharge', rechargeInfo);\r\n        });\r\n\r\n    };\r\n\r\n    $scope.cancel = function () {\r\n        $uibModalInstance.dismiss(false);\r\n    };\r\n\r\n    $scope.isValid = function(){\r\n        if (!$scope.quantity){\r\n            $scope.validationMessage = gettextCatalog.getString('Please enter an amount');\r\n            return false;\r\n        }\r\n\r\n        if ((($scope.quantity*100) % 1) != 0 || $scope.quantity <= 0){\r\n            $scope.validationMessage = gettextCatalog.getString('Invalid amount');\r\n            return false;\r\n        }\r\n\r\n        if ($scope.quantity>application.MaxReloadQuantity){\r\n            $scope.validationMessage = gettextCatalog.getString('Maximum value for a recharge is {{maxReloadQuantity}}', {maxReloadQuantity: $filter('number')(application.MaxReloadQuantity)});\r\n            return false;\r\n        };\r\n\r\n        if (parseInt($scope.quantity) + application.CurrentBalanceCount > application.MaxQuantity){\r\n            $scope.validationMessage = gettextCatalog.getString('Maximum total value cannot be bigger than {{maxQuantity}}. With the current recharge, it will be {{invalidQuantity}}',\r\n                {\r\n                    maxQuantity: $filter('number')(application.MaxQuantity),\r\n                    invalidQuantity: $filter('number')($scope.quantity + application.CurrentBalanceCount)\r\n            });\r\n            return false;\r\n        }\r\n\r\n\r\n        $scope.validationMessage = '';\r\n        return true;\r\n    }\r\n\r\n\r\n\r\n\r\n    //Method to post with redirect (full form post, not ajax...)\r\n    var post = function(path, params, method) {\r\n        method = method || \"post\"; // Set method to post by default if not specified.\r\n\r\n        // The rest of this code assumes you are not using a library.\r\n        // It can be made less wordy if you use one.\r\n        var form = document.createElement(\"form\");\r\n        form.setAttribute(\"method\", method);\r\n        form.setAttribute(\"action\", path);\r\n\r\n        for(var key in params) {\r\n            if(params.hasOwnProperty(key)) {\r\n                var hiddenField = document.createElement(\"input\");\r\n                hiddenField.setAttribute(\"type\", \"hidden\");\r\n                hiddenField.setAttribute(\"name\", key);\r\n                hiddenField.setAttribute(\"value\", params[key]);\r\n\r\n                form.appendChild(hiddenField);\r\n            }\r\n        }\r\n\r\n        document.body.appendChild(form);\r\n        form.submit();\r\n    }\r\n\r\n\r\n\r\n    $scope.getCurrentBalanceText = function (item) {\r\n        if (item.CurrentBalanceInfo && item.CurrentBalanceInfo.Format) {\r\n            return gettextCatalog.getString(item.CurrentBalanceInfo.Format, item.CurrentBalanceInfo.Scope || null);\r\n        }\r\n        else {\r\n            return item.CurrentBalance;\r\n        }\r\n    }\r\n\r\n    $scope.getTotalPrice = function () {\r\n        return $scope.application.Price * $scope.quantity;\r\n    }\r\n});","angular.module('uti.skayo.onlinesale').controller('RechargeTripController', function ($scope, $uibModalInstance, application, card, gettextCatalog, $http) {\r\n\r\n    $scope.application = application;\r\n    $scope.card = card;\r\n    $scope.quantity = null;\r\n    $scope.rechargeDate = new Date();\r\n    //set date of tomorrow\r\n    $scope.rechargeDate.setDate($scope.rechargeDate.getDate() + 1);\r\n    $scope.validationMessage = '';\r\n\r\n    $scope.ok = function () {\r\n        if ($scope.isValid() == false)\r\n            return;\r\n\r\n        $uibModalInstance.dismiss(false);\r\n\r\n        var rechargeInfo = { cardIdentifier: card.PhysicalSerialNo, applicationIndex: application.Index, quantity: $scope.quantity };\r\n\r\n        $http.post('api/rechargeValidation', rechargeInfo).then(function () {\r\n            post('api/recharge', rechargeInfo);\r\n        });\r\n\r\n    };\r\n\r\n    $scope.cancel = function () {\r\n        $uibModalInstance.dismiss(false);\r\n    };\r\n\r\n    $scope.isValid = function () {\r\n        $scope.quantity = 1;\r\n        if (!$scope.quantity) {\r\n            $scope.validationMessage = gettextCatalog.getString('Please enter an amount');\r\n            return false;\r\n        }\r\n\r\n        if ($scope.quantity % 1 != 0) {\r\n            $scope.validationMessage = gettextCatalog.getString('Invalid amount');\r\n            return false;\r\n        }\r\n\r\n        if ($scope.quantity > application.MaxReloadQuantity) {\r\n            $scope.validationMessage = gettextCatalog.getString('Maximum value for a recharge is {{maxReloadQuantity}}', { maxReloadQuantity: application.MaxReloadQuantity });\r\n            return false;\r\n        };\r\n\r\n        if (parseInt($scope.quantity) + application.CurrentBalanceCount > application.MaxQuantity) {\r\n            $scope.validationMessage = gettextCatalog.getString('Maximum total value cannot be bigger than {{maxQuantity}}. With the current recharge, it will be {{invalidQuantity}}', { maxQuantity: application.MaxQuantity, invalidQuantity: $scope.quantity + application.CurrentBalanceCount });\r\n            return false;\r\n        }\r\n\r\n\r\n        $scope.validationMessage = '';\r\n        return true;\r\n    }\r\n\r\n    $scope.getCurrentBalanceText = function (item) {\r\n        if (item.CurrentBalanceInfo && item.CurrentBalanceInfo.Format) {\r\n            return gettextCatalog.getString(item.CurrentBalanceInfo.Format, item.CurrentBalanceInfo.Scope || null);\r\n        }\r\n        else {\r\n            return item.CurrentBalance;\r\n        }\r\n    }\r\n\r\n    $scope.getTotalPrice = function () {\r\n        return $scope.application.Price * $scope.quantity;\r\n    }\r\n\r\n    //Method to post with redirect (full form post, not ajax...)\r\n    var post = function (path, params, method) {\r\n        method = method || \"post\"; // Set method to post by default if not specified.\r\n\r\n        // The rest of this code assumes you are not using a library.\r\n        // It can be made less wordy if you use one.\r\n        var form = document.createElement(\"form\");\r\n        form.setAttribute(\"method\", method);\r\n        form.setAttribute(\"action\", path);\r\n\r\n        for (var key in params) {\r\n            if (params.hasOwnProperty(key)) {\r\n                var hiddenField = document.createElement(\"input\");\r\n                hiddenField.setAttribute(\"type\", \"hidden\");\r\n                hiddenField.setAttribute(\"name\", key);\r\n                hiddenField.setAttribute(\"value\", params[key]);\r\n\r\n                form.appendChild(hiddenField);\r\n            }\r\n        }\r\n\r\n        document.body.appendChild(form);\r\n        form.submit();\r\n    }\r\n\r\n});","/**\r\n * Created by Mike on 10/20/2015.\r\n */\r\nangular.module('uti.skayo.onlinesale').controller('RecoverPasswordConfirmController',function($scope, $http, $routeParams, gettextCatalog, SweetAlert,$location ){\r\n\r\n    //show password ui only after the code has been checked\r\n    $scope.showPasswordUI = false;\r\n    $scope.message = \"\";\r\n\r\n    $scope.password = \"\";\r\n    $scope.passwordConfirm = \"\";\r\n    $scope.code = $routeParams.code;\r\n\r\n    $http.get('api/passwordRecoverConfirm/'+$routeParams.code)\r\n        .then(function(){\r\n            $scope.showPasswordUI = true;\r\n        });\r\n\r\n    $scope.changePassword = function(){\r\n        $http.post('api/passwordRecoverConfirm', { code : $scope.code, password: $scope.password, passwordConfirm: $scope.passwordConfirm})\r\n            .then(function(){\r\n                SweetAlert.swal({\r\n                    title: '',\r\n                    text: gettextCatalog.getString('The password has been successfully changed')\r\n                },function(){\r\n                    //redirect to login\r\n                    $location.path('/login');\r\n                });\r\n            });\r\n    };\r\n\r\n    $scope.validation = {\r\n        getRequiredText : function(){ return gettextCatalog.getString(\"Required field\"); },\r\n        getInvalidEmailText : function() { return gettextCatalog.getString(\"Invalid email\"); },\r\n        getSameText: function() { return gettextCatalog.getString(\"This field needs to be the same as the previous one\"); },\r\n        getTooShortText : function(){ return gettextCatalog.getString(\"Field too short\");},\r\n        getTooLongText: function() { return gettextCatalog.getString(\"Field too long\");},\r\n\t\tgetMinLettersText: function(minLettersValue) { return gettextCatalog.getString(\"The field must contain at least {{value}} letters.\", {value: minLettersValue || 2});},\r\n\t\tgetMinDigitsText: function(minDigitsValue) { return gettextCatalog.getString(\"The field must contain at least {{value}} digits.\", {value: minDigitsValue || 2});}\r\n    }\r\n});\r\n","angular.module('uti.skayo.onlinesale').controller('RecoverPasswordController', function($scope, $http, SweetAlert, gettextCatalog, $location){\r\n    $scope.email = '';\r\n    $scope.captchaSrc = \"api/captcha\";\r\n    $scope.captcha = '';\r\n\r\n    $scope.recover = function(){\r\n        $http.post('api/passwordRecover',{email: $scope.email, captcha: $scope.captcha})\r\n            .then(function(){\r\n                SweetAlert.swal({\r\n                    title: gettextCatalog.getString('Success'),\r\n                    text: gettextCatalog.getString('Your registration has been saved. In order to confirm, you will receive an email.  Please, check also your SPAM folder.')\r\n                },function(){\r\n                    //redirect to login\r\n                    $location.path('/login');\r\n                });\r\n            }, function(error){\r\n                //refresh captcha\r\n                $scope.captchaSrc = 'api/captcha?_ts=' + new Date().getTime();\r\n            });\r\n    }\r\n\r\n});\r\n","angular.module('uti.skayo.onlinesale').controller('RegisterConfirmController',function($scope, $routeParams, $http, gettextCatalog){\r\n    //alert($routeParams.code);\r\n\r\n    $scope.message = '';\r\n\r\n    $http.get('api/register/'+$routeParams.code)\r\n        .then(function(email){\r\n            $scope.message = gettextCatalog.getString('Email confirmat cu succes. Va puteti loga pe pagina principala');\r\n            //success\r\n        }, function(response){\r\n            //some error\r\n            if (response.data && response.data.ExceptionMessage && response.data.ExceptionType == \"Uti.Skayo.OnlineSale.DomainModel.RegistrationException\"){\r\n                $scope.message = gettextCatalog.getString(response.data.ExceptionMessage);\r\n            }\r\n\r\n        });\r\n});\r\n","/**\r\n * Created by Mike on 12.09.2015.\r\n */\r\n\r\nangular.module('uti.skayo.onlinesale').controller('RegisterController', function (LoginService, $scope, $uibModal, $location, blockUI, $http, gettextCatalog,SweetAlert) {\r\n    $scope.lastName = \"\";\r\n    $scope.firstName = \"\";\r\n    $scope.identification = \"\";\r\n    $scope.cardId = \"\";\r\n    $scope.email = \"\";\r\n    $scope.password = \"\";\r\n    $scope.passwordConfirm = \"\";\r\n    $scope.captcha = \"\";\r\n    $scope.captchaSrc = \"api/captcha\";\r\n\r\n    $scope.countrySelect = {};\r\n    $scope.countrySelect.CountryCode = \"RO\";\r\n\r\n    $http.get('api/register/countries').success(function (data) {\r\n        $scope.countrySelect.countries = data;\r\n    });\r\n\r\n    $scope.emptyRegistrationFields = function () {\r\n        return $scope.lastName == \"\"\r\n            || $scope.firstName == \"\"\r\n            || $scope.identification == \"\"\r\n            || $scope.cardId == \"\"\r\n            || $scope.email == \"\"\r\n            || $scope.password == \"\"\r\n            || $scope.passwordConfirm == \"\"\r\n            || $scope.captcha == \"\"\r\n            || $scope.country == \"\";\r\n    }\r\n\r\n    $scope.register = function(){\r\n        $scope.form.$setSubmitted();\r\n        if (!$scope.emptyRegistrationFields() && $scope.form.$valid) {\r\n            $http.post('api/register', {\r\n                captcha: $scope.captcha,\r\n                lastName: $scope.lastName,\r\n                firstName: $scope.firstName,\r\n                identification: $scope.identification,\r\n                cardId: $scope.cardId,\r\n                countryCode: $scope.countrySelect.CountryCode,\r\n                email: $scope.email,\r\n                password: $scope.password,\r\n                language: localStorage.getItem(\"skayo-client-language\")\r\n            }).then(function (response) {\r\n                SweetAlert.swal({\r\n                    title: gettextCatalog.getString('Success'),\r\n                    text: gettextCatalog.getString('Your registration has been saved. In order to confirm, you will receive an email.  Please, check also your SPAM folder.'),\r\n                    type: \"success\"\r\n                },\r\n                        function () {\r\n                            //redirect to login\r\n                            $location.path('/login');\r\n                        }\r\n                );\r\n            }, function (error) {\r\n                $scope.captchaSrc = 'api/captcha?_ts=' + new Date().getTime();\r\n            });\r\n        }\r\n    }\r\n    \r\n\r\n    $scope.showTerms = function () {\r\n        var languageCode = \"en_US\";\r\n        try {\r\n            languageCode = gettextCatalog.getCurrentLanguage();\r\n            if (languageCode == \"ru\")\r\n                languageCode = \"en_US\";\r\n        }\r\n        catch(exception) {\r\n            console.error(exception);\r\n        }\r\n        languageCode = languageCode || \"en\";\r\n        var terms = '/app/views/terms_' + languageCode + \".html\";\r\n        var modalInstance = $uibModal.open({\r\n            templateUrl: terms,\r\n            size: 'lg'\r\n        });\r\n    }\r\n\r\n    $scope.validation = {\r\n        getRequiredText : function(){ return gettextCatalog.getString(\"Required field\"); },\r\n        getInvalidEmailText : function() { return gettextCatalog.getString(\"Invalid email\"); },\r\n        getSameText: function() { return gettextCatalog.getString(\"This field needs to be the same as the previous one\"); },\r\n        getTooShortText : function(){ return gettextCatalog.getString(\"Field too short\");},\r\n        getTooLongText: function() { return gettextCatalog.getString(\"Field too long\");},\r\n\t\tgetMinLettersText: function(minLettersValue) { return gettextCatalog.getString(\"The field must contain at least {{value}} letters.\", {value: minLettersValue || 2});},\r\n        getMinDigitsText: function (minDigitsValue) { return gettextCatalog.getString(\"The field must contain at least {{value}} digits.\", { value: minDigitsValue || 2 }); },\r\n        agreeCheck: function () { return gettextCatalog.getString(\"You must agree terms and conditions\"); }\r\n    }\r\n\r\n});\r\n","angular.module('uti.skayo.onlinesale').controller('TextController', function ($scope, $routeParams, $http) {\r\n\r\n    gettextCatalog.getString('Transaction pending payment ');\r\n\r\n});","angular.module('uti.skayo.onlinesale').controller('TransactionHistoryController', function ($scope, $http, $uibModal, gettextCatalog, SweetAlert) {\r\n    $scope.TransactionList = [];\r\n\r\n    $scope.getTransactions = function (pageNumber) {\r\n        $http\r\n            .post('api/transactionHistory/TransactionList', {\r\n                PageNumber: pageNumber,\r\n                ItemsPerPage: $scope.paging.itemsPerPage\r\n            })\r\n            .then(function (result) { $scope.TransactionList = result.data.Transactions; $scope.paging.totalItems = result.data.Total; })\r\n            .catch(function (error) { $scope.TransactionList = null; $scope.paging.totalItems = 0; });\r\n    };\r\n\r\n    $scope.getStatus = function (item) {\r\n        return gettextCatalog.getString(item.CurrentStatus);\r\n    }\r\n\r\n    $scope.getLocalizationText = function (localization, language) {\r\n        if (!localization)\r\n            return null;\r\n        var text = null;\r\n        for (var i = 0; i < localization.length; i++) {\r\n            if (localization[i].Language === language) {\r\n                text = localization[i].Text;\r\n                break;\r\n            }\r\n        }\r\n        return text;\r\n    }\r\n\r\n    $scope.getProductName = function(product){\r\n        var language = gettextCatalog.getCurrentLanguage().replace('_','-');\r\n        var localization = product.Localization;\r\n        var text = $scope.getLocalizationText(localization, language);\r\n        if (!text)\r\n            text = $scope.getLocalizationText(localization, \"Default\");\r\n        return text || product.Name;\r\n    };\r\n\r\n    $scope.showStatusHistory = function (transaction) {\r\n        var modalInstance = $uibModal.open({\r\n            templateUrl: '/app/views/transactionStatusHistory.html',\r\n            windowClass: 'center-modal',\r\n            controller: 'TransactionStatusHistoryController',\r\n            resolve: {\r\n                transaction: transaction\r\n            }\r\n        });\r\n    }\r\n\r\n    $scope.generateInvoice = function (orderNo) {\r\n        $http\r\n            .post('api/receipts/IsValidPostalAddress')\r\n            .then(\r\n                function (response) {\r\n                    $http\r\n                        .post('api/receipts/GenerateInvoice/' + orderNo)\r\n                        .then(\r\n                            function (response) {\r\n                                $scope.showNotification('success', 'The invoice has been generated and can be downloaded');\r\n                                $scope.getTransactions($scope.paging.currentPage);\r\n                            },\r\n                            function (response) {\r\n                                switch (response.data.Message) {\r\n                                    case 'AlreadyExists': $scope.showNotification('error', 'The invoice has already been generated'); break;\r\n                                    case 'CannotGenerate': $scope.showNotification('error', 'The invoice could not be generated'); break;\r\n                                    default:\r\n                                        $scope.showNotification('error', 'Communication error !'); break;\r\n                                }\r\n                            });\r\n                },\r\n                function (error) {\r\n                    $scope.showNotification('error', 'Please fill your postal address on \"My account\" page, in order to be able to generate the invoice');\r\n                });\r\n    }\r\n\r\n    $scope.downloadInvoice = function (orderNo) {\r\n        $http\r\n            .post('api/receipts/IsValidPostalAddress')\r\n            .then(\r\n                function (response) {\r\n                    $http\r\n                        .post('api/receipts/CheckDownloadInvoice/' + orderNo)\r\n                        .then(\r\n                            function (response) {\r\n                                window.location.href = '/api/receipts/DownloadInvoice/' + orderNo;\r\n                            },\r\n                            function (response) {\r\n                                switch (response.status) {\r\n                                    case 400: $scope.showNotification('error', 'The invoice has not been generated'); break;\r\n                                    case 500:\r\n                                    default:\r\n                                        $scope.showNotification('error', 'Communication error !'); break;\r\n                                }\r\n                            });\r\n                },\r\n                function (error) {\r\n                    $scope.showNotification('error', 'Please fill your postal address on \"My account\" page, in order to be able to generate the invoice');\r\n                });\r\n    }\r\n\r\n    $scope.downloadReceipt = function (orderNo) {\r\n\r\n\r\n                    $http\r\n                        .post('api/receipts/CheckDownloadReceipt/' + orderNo)\r\n                        .then(\r\n                            function (response) {\r\n                                window.location.href = '/api/receipts/DownloadReceipt/' + orderNo;\r\n                            },\r\n                            function (response) {\r\n                                switch (response.status) {\r\n                                case 400: $scope.showNotification('error', 'The receipt has not been generated'); break;\r\n                                case 500:\r\n                                default:\r\n                                    $scope.showNotification('error', 'Communication error !'); break;\r\n                                }\r\n                            });\r\n                }\r\n\r\n\r\n    $scope.downloadProofOfPayment = function (orderNo) {\r\n\r\n        var language = gettextCatalog.getCurrentLanguage().replace('_', '-');\r\n\r\n        $http\r\n            .post('api/receipts/CheckProofOfPayment/' + orderNo)\r\n            .then(\r\n                function (response) {\r\n                    window.location.href = '/api/receipts/DownloadProofOfPayment/' + orderNo;\r\n                },\r\n                function (response) {\r\n                    switch (response.status) {\r\n                        case 400: $scope.showNotification('Error', 'Error generating Proof o payment!'); break;\r\n                        case 500:\r\n                        default:\r\n                            $scope.showNotification('Error', 'Communication error !'); break;\r\n                    }\r\n                });\r\n    }\r\n\r\n\r\n    $scope.showNotification = function (type, text) {\r\n        SweetAlert.swal({\r\n            title: '',\r\n            text: gettextCatalog.getString(text),\r\n            type: type\r\n        });\r\n    }\r\n\r\n    // \r\n    // -- Paging Functionality --\r\n    $scope.paging = {};\r\n    $scope.paging.pageSizeList = [5, 10, 15, 20, 50];\r\n    $scope.paging.itemsPerPage = 15;\r\n    $scope.paging.maxSize = 10;\r\n\r\n    $scope.paging.clearPaging = function () {\r\n        $scope.paging.currentPage = 0;\r\n        $scope.paging.totalItems = 0;\r\n    }\r\n    $scope.paging.clearPaging();\r\n\r\n    $scope.paging.pageRange = function () {\r\n        var rangeSize = $scope.paging.maxSize;\r\n        var start = $scope.paging.currentPage;\r\n        var pages = $scope.paging.totalPages();\r\n        var range = [];\r\n\r\n        rangeSize = (pages < rangeSize) ? pages : rangeSize;\r\n        start = (start > pages - rangeSize) ? pages - rangeSize :\r\n                    (start < rangeSize) ? 0 : start;\r\n\r\n        for (var i = start; i < start + rangeSize; i++) {\r\n            range.push(i);\r\n        }\r\n        return range;\r\n    };\r\n\r\n    $scope.paging.totalPages = function () {\r\n        return Math.ceil($scope.paging.totalItems / $scope.paging.itemsPerPage);\r\n    };\r\n\r\n    $scope.paging.setPage = function (n) {\r\n        if (n >= 0 && n < $scope.paging.totalPages()) {\r\n            $scope.paging.currentPage = n;\r\n        }\r\n    };\r\n\r\n    $scope.$watch(\"paging.currentPage\", function (newValue, oldValue) {\r\n        $scope.getTransactions(newValue);\r\n    });\r\n\r\n    $scope.$watch(\"paging.itemsPerPage\", function (newValue, oldValue) {\r\n        $scope.getTransactions(0);\r\n    });\r\n\r\n});","angular.module('uti.skayo.onlinesale').controller('TransactionStatusHistoryController', function ($scope, $http, $uibModalInstance, transaction, gettextCatalog) {\r\n    $scope.items = null;\r\n\r\n    $http.get('api/transactionHistory/' + transaction.SaleTransactionId).then(\r\n        function(data) {\r\n             $scope.items = data.data;\r\n        },\r\n        function (error) { $scope.items = null; }\r\n    );\r\n\r\n    $scope.closeDialog = function () {\r\n        $uibModalInstance.dismiss(false);\r\n    }\r\n})","var compareTo = function() {\r\n    return {\r\n        require: \"ngModel\",\r\n        scope: {\r\n            otherModelValue: \"=compareTo\"\r\n        },\r\n        link: function(scope, element, attributes, ngModel) {\r\n\r\n            ngModel.$validators.compareTo = function(modelValue) {\r\n                return modelValue == scope.otherModelValue;\r\n            };\r\n\r\n            scope.$watch(\"otherModelValue\", function() {\r\n                ngModel.$validate();\r\n            });\r\n        }\r\n    };\r\n};\r\n\r\nangular.module('uti.skayo.onlinesale').directive(\"compareTo\", compareTo);\r\n","var minDigits = function() {\r\n\tvar allDigits ={};\r\n\tfor(var i=0;i<=9;i++) {\r\n\t\tallDigits[''+i] = true;\r\n\t}\r\n    return {\r\n\t\trestrict: \"A\",\r\n        require: \"ngModel\",\r\n\t\tscope: false,\r\n        link: function(scope, element, attributes, ngModel) {\r\n\t\t\tvar minDigitsValue = Number(attributes.minDigits);\r\n\t\t\tminDigitsValue = isFinite(minDigitsValue) ? minDigitsValue : 3;\r\n            ngModel.$validators.minDigits = function(modelValue) {\r\n                if(!attributes.minDigits || angular.isUndefined(modelValue) || modelValue === \"\" || modelValue === null) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar sValue = modelValue + \"\";\r\n\t\t\t\tvar count =0;\r\n\t\t\t\tfor(var i=0;i<sValue.length;i++) {\r\n\t\t\t\t\tvar c = sValue.charAt(i);\r\n\t\t\t\t\tif(allDigits[c]) {\r\n\t\t\t\t\t\t++count;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(count >= minDigitsValue) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t\t\r\n            };\r\n        }\r\n    };\r\n};\r\n\r\nangular.module('uti.skayo.onlinesale').directive(\"minDigits\", minDigits);\r\n","var minLetters = function() {\r\n\tvar alphabet = 'abcdefghijklmnopqrstuvwxyz';\r\n\tvar allLetters = {};\r\n\tfor(var i=0;i<alphabet.length;i++) {\r\n\t\tallLetters[alphabet.charAt(i)] = true;\r\n\t}\r\n    return {\r\n\t\trestrict: \"A\",\r\n        require: \"ngModel\",\r\n\t\tscope: false,\r\n        link: function(scope, element, attributes, ngModel) {\r\n\t\t\tvar minValue = Number(attributes.minLetters);\r\n\t\t\tminValue = isFinite(minValue) ? minValue : 3;\r\n            ngModel.$validators.minLetters = function(modelValue) {\r\n                if(!attributes.minLetters || angular.isUndefined(modelValue) || modelValue === \"\" || modelValue === null) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar sValue = modelValue + \"\";\r\n\t\t\t\tvar count =0;\r\n\t\t\t\tfor(var i=0;i<sValue.length;i++) {\r\n\t\t\t\t\tvar c = sValue.charAt(i).toLowerCase();\r\n\t\t\t\t\tif(allLetters[c]) {\r\n\t\t\t\t\t\t++count;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(count >= minValue) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t\t\r\n            };\r\n        }\r\n    };\r\n};\r\n\r\nangular.module('uti.skayo.onlinesale').directive(\"minLetters\", minLetters);\r\n","var validDecimal = function () {\r\n    return {\r\n        require: '?ngModel',\r\n        link: function (scope, element, attrs, ngModelCtrl) {\r\n            if (!ngModelCtrl) {\r\n                return;\r\n            }\r\n\r\n            ngModelCtrl.$parsers.push(function (val) {\r\n                if (angular.isUndefined(val)) {\r\n                    var val = '';\r\n                }\r\n\r\n                var clean = val.replace(/[^-0-9\\.]/g, '');\r\n                var negativeCheck = clean.split('-');\r\n                var decimalCheck = clean.split('.');\r\n                if (!angular.isUndefined(negativeCheck[1])) {\r\n                    negativeCheck[1] = negativeCheck[1].slice(0, negativeCheck[1].length);\r\n                    clean = negativeCheck[0] + '-' + negativeCheck[1];\r\n                    if (negativeCheck[0].length > 0) {\r\n                        clean = negativeCheck[0];\r\n                    }\r\n                }\r\n\r\n                if (!angular.isUndefined(decimalCheck[1])) {\r\n                    decimalCheck[1] = decimalCheck[1].slice(0, 2);\r\n                    clean = decimalCheck[0] + '.' + decimalCheck[1];\r\n                }\r\n\r\n                if (val !== clean) {\r\n                    ngModelCtrl.$setViewValue(clean);\r\n                    ngModelCtrl.$render();\r\n                }\r\n                return clean;\r\n            });\r\n\r\n            element.bind('keypress', function (event) {\r\n                if (event.keyCode === 32) {\r\n                    event.preventDefault();\r\n                }\r\n            });\r\n        }\r\n    };\r\n};\r\n\r\nangular.module('uti.skayo.onlinesale').directive(\"validDecimal\", validDecimal);","angular.module('uti.skayo.onlinesale').service('Http500Interceptor', function($injector,SweetAlert, $q) {\r\n    var service = this;\r\n\r\n    service.request = function(config) {\r\n        return config;\r\n    };\r\n\r\n    service.responseError = function(response) {\r\n        var gettextCatalog = $injector.get('gettextCatalog');\r\n\r\n        if (response.status === 500) {\r\n            if (response.data && response.data.ExceptionMessage && response.data.ExceptionType == \"Uti.Skayo.OnlineSale.DomainModel.BusinessException\")\r\n            {\r\n                //display \"business exception\"\r\n                var message = response.data.ExceptionMessage;\r\n\r\n                //in case of multiple messages\r\n                messages = message.split(';');\r\n                messageHtml = '';\r\n\r\n                for (var i=0;i<messages.length;i++)\r\n                    messageHtml = messageHtml+gettextCatalog.getString(messages[i])+\"<br/>\";\r\n\r\n                SweetAlert.swal({\r\n                    title:gettextCatalog.getString(\"Warning\"),\r\n                    text: messageHtml ,\r\n                    type: \"error\",\r\n                    html: true});\r\n            }\r\n            else if (response.data.ExceptionMessage != null) {\r\n                if (response.data.ExceptionMessage.includes(\"already has a pending recharge\")) {\r\n                    SweetAlert.swal({\r\n                        title: gettextCatalog.getString(\"System error\"),\r\n                        text: \"Exist� deja o re�nc�rcare �n a?teptare pentru aceast� aplica?ie!\",\r\n                        type: \"error\",\r\n                        html: true\r\n                    });\r\n                }\r\n            }\r\n\r\n            else {\r\n\r\n                SweetAlert.swal({\r\n                    title: gettextCatalog.getString(\"System error\"),\r\n                    text: gettextCatalog.getString(\"Sorry, a technical error occured.\"),\r\n                    type: \"error\",\r\n                    html: true\r\n                });\r\n            }\r\n        }\r\n        return $q.reject(response);\r\n    };\r\n\r\n})","angular.module('uti.skayo.onlinesale').service('LoginService', function ($cookies, $log, $http, $q, $location, $timeout) {\r\n    var currentUser = null;\r\n    var impersonatingUser = null;\r\n    var self = this;\r\n\r\n    this.login = function (email, password, rememberLastLogin, language) {\r\n        var deferred = $q.defer();\r\n        $log.info('Trying to log in as ' + email + ' (Remember Me: ' + rememberLastLogin + ')');\r\n\r\n        $cookies.remove('impersonate');\r\n        $cookies.remove('previousLogin');\r\n        $cookies.remove('login');\r\n\r\n        $http.post('api/login', { email: email, password: password, rememberLastLogin: rememberLastLogin, language: language })\r\n            .success(function (data) {\r\n                var loginExpires = new Date();\r\n                var rememberExpires = new Date();\r\n                if (rememberLastLogin) {\r\n                    rememberExpires.setMonth(rememberExpires.getMonth() + 6);\r\n                }\r\n                loginExpires.setMinutes(loginExpires.getMinutes() + 30);\r\n                \r\n                if (data) {\r\n                    $log.info('Logged in as ' + email);\r\n                    $cookies.put('previousLogin', JSON.stringify(data), { expires: rememberExpires });\r\n                    $cookies.put('login', JSON.stringify(data), { expires: loginExpires });\r\n                    deferred.resolve(data);\r\n                }\r\n                deferred.reject();\r\n                //TODO: check if received data is correct, and contains desired fields (email, etc...)\r\n            })\r\n            .error(function (data, status, headers, config) {\r\n                deferred.reject('Error! ' + data);\r\n            });\r\n        return deferred.promise;\r\n    };\r\n\r\n    this.loginByProxy = function (adminEmail, userEmail) {\r\n        sessionStorage.removeItem('updatedPostalAddress');\r\n        var deferred = $q.defer();\r\n        self.getCurrentUser();\r\n\r\n        $log.info(currentUser.Email + ' attempting to impersonate ' + userEmail);\r\n        $cookies.remove('impersonate');\r\n\r\n        $http.post('api/Login/Proxy', { adminEmail: adminEmail, userEmail: userEmail })\r\n            .success(function (data) {\r\n                var loginExpires = new Date();\r\n                loginExpires.setMinutes(loginExpires.getMinutes() + 30);\r\n\r\n                if (data) {\r\n                    $log.info(currentUser.Email + ' successfully impersonating ' + userEmail);\r\n                    $cookies.put('impersonate', JSON.stringify(data), { expires: loginExpires });\r\n                    deferred.resolve(data);\r\n                }\r\n                deferred.reject();\r\n            })\r\n            .error(function (data, status, headers, config) {\r\n                deferred.reject('Error! ' + data);\r\n            });\r\n        return deferred.promise;\r\n    };\r\n\r\n    this.refreshAuthCookie = function (cookieName, userObject) {\r\n        var loginExpires = new Date();\r\n\r\n        $cookies.remove(cookieName);\r\n        loginExpires.setMinutes(loginExpires.getMinutes() + 30);\r\n        $cookies.put(cookieName, JSON.stringify(userObject), { expires: loginExpires });\r\n    }\r\n\r\n    this.updateImpersonation = function (userEmail) {\r\n        self.getCurrentUser();\r\n        if (self.getImpersonatingUser() !== null)\r\n        {\r\n            $log.info(currentUser.Email + ' updated impersonated user\\'s email: ' + userEmail);\r\n            impersonatingUser.Email = userEmail;\r\n            self.refreshAuthCookie('impersonate', impersonatingUser);\r\n        }\r\n    };\r\n\r\n    this.validateAuthentication = function () {\r\n        $log.info('Validating authentication...');\r\n        var user = self.getCurrentUser();\r\n        var proxy = self.getImpersonatingUser();\r\n\r\n        return ($q.when($http.post('api/Login/Validate', {\r\n                    email: !!user ? user.Email : null,\r\n                    password: '',\r\n                    rememberLastLogin: ''\r\n                }).then(function (response) {\r\n                    if (response.data) {\r\n                        $log.info('Authentication valid. Refreshing cookies.');\r\n                        self.refreshAuthCookie('login', user);\r\n                        if (!!proxy) {\r\n                            self.refreshAuthCookie('impersonate', proxy);\r\n                        }\r\n                        return $q.when(true);\r\n                    } else {\r\n                        $log.info('Authentication invalid. Removing cookies.');\r\n                        $cookies.remove('login');\r\n                        if (!!proxy) {\r\n                            $cookies.remove('impersonate');\r\n                        }\r\n                        return $q.when(false);\r\n                    }\r\n                }))\r\n        );\r\n    };\r\n\r\n    this.logout = function () {\r\n        if (!self.isImpersonating())\r\n        {\r\n            currentUser = null;\r\n            $cookies.remove('login');\r\n            $location.path('/login');\r\n            $http.post('api/Login/Logout');\r\n        }\r\n        else\r\n        {\r\n            impersonatingUser = null;\r\n            $cookies.remove('impersonate');\r\n            $location.path('/adminSearch');\r\n            $http.post('api/Login/ProxyLogout');\r\n        }\r\n\r\n        sessionStorage.removeItem('updatedPostalAddress');\r\n    };\r\n\r\n    this.getCurrentUser = function () {\r\n        currentUser = null;\r\n        var user = $cookies.get('login');\r\n        if (user) {\r\n            currentUser = JSON.parse(user);\r\n        }\r\n        return currentUser;\r\n    };\r\n\r\n    this.getImpersonatingUser = function () {\r\n        impersonatingUser = null;\r\n        var user = $cookies.get('impersonate');\r\n        if (user) {\r\n            impersonatingUser = JSON.parse(user);\r\n        }\r\n        return impersonatingUser;\r\n    };\r\n\r\n    this.getActiveUser = function () {\r\n        var user = self.getImpersonatingUser();\r\n        return user === null ? self.getCurrentUser() : user;\r\n    };\r\n\r\n    this.isLoggedIn = function () {\r\n        return self.getCurrentUser() !== null;\r\n    };\r\n\r\n    this.previousEmail = function () {\r\n        previousUser = null;\r\n        var user = $cookies.get('previousLogin');\r\n        if (user) {\r\n            previousUser = JSON.parse(user);\r\n        }\r\n\r\n        if (previousUser !== null && previousUser.RememberLogin === true) {\r\n            return previousUser.Email;\r\n        } else {\r\n            return null;\r\n        }\r\n    };\r\n\r\n    this.isSuperAdmin = function () {\r\n        return self.getCurrentUser() !== null && currentUser.IsSuperAdmin === true;\r\n    };\r\n\r\n    this.isAdmin = function () {\r\n        return self.getCurrentUser() !== null && currentUser.IsAdmin === true;\r\n    };\r\n\r\n    this.isImpersonating = function () {\r\n        return self.getImpersonatingUser() !== null;\r\n    };\r\n\r\n    this.allowAdminActions = function () {\r\n        return self.getCurrentUser() !== null && currentUser.AllowAdminActions === true;\r\n    };\r\n\r\n    this.getPostalAddress = function () {\r\n        var address = sessionStorage.getItem('updatedPostalAddress');\r\n        if (address)\r\n            return address;\r\n\r\n        return self.getActiveUser().PostalAddress;\r\n    };\r\n\r\n    this.updatePostalAddress = function (address, callback) {\r\n        sessionStorage.setItem('updatedPostalAddress', address);\r\n\r\n        $http\r\n            .post('api/myAccount/postaladdress', { PostalAddress: address })\r\n            .then(callback);\r\n    };\r\n});\r\n\r\n\r\nangular.module('uti.skayo.onlinesale').service('Http401Interceptor', function ($rootScope, $location, $cookies, $q) {\r\n    var service = this;\r\n\r\n    service.request = function (config) {\r\n        return config;\r\n    };\r\n\r\n    service.responseError = function (response) {\r\n        if (response.status === 401) {\r\n            $cookies.remove('login');\r\n            $location.path('/login');\r\n        }\r\n        return $q.reject(response);\r\n    };\r\n});\r\n\r\n\r\n//\r\n// If the user is not logged in, and if they are not already on a public page (login, register), \r\n// then redirect them to the login page.\r\n//\r\nangular.module(\"uti.skayo.onlinesale\").run(function ($rootScope, $window, $route, $location, $q, LoginService) {\r\n    var loginService = LoginService;\r\n\r\n    var noAuthenticationRequired = ['/login','/register','/contact','/faq','/recoverPassword'];\r\n    var publicRoute = function (route) {\r\n        var isPublic = false;\r\n        noAuthenticationRequired.forEach(function (item, index) {\r\n            isPublic = route === item ? true : isPublic;\r\n        });\r\n        return isPublic;\r\n    };\r\n\r\n    loginService.validateAuthentication().then(function (response) {\r\n        var authenticated = response === null || typeof (response) === \"undefined\" ? false\r\n                : typeof (response) === \"object\" ? response.data\r\n                : response;\r\n\r\n        if ($location.url() == \"/contact\" || $location.url() == \"/faq\" || $location.url().includes(\"/recoverPasswordConfirm\"))\r\n            return;\r\n\r\n        var authRequired = !publicRoute($location.url());\r\n        if (authRequired && !authenticated) {\r\n            $q.when($location.path(\"/login\"));\r\n        } else if (authenticated && !authRequired) {\r\n            event.preventDefault();\r\n            if (!loginService.isSuperAdmin()) {\r\n                $q.when($location.path(\"/home\"));\r\n            }\r\n            else {\r\n                $q.when($location.path(\"/adminSearch\"));\r\n            }\r\n        }\r\n        else if (authenticated && !loginService.isAdmin() && next.templateUrl.indexOf(\"admin\") > -1) {\r\n            event.preventDefault();\r\n            loginService.logout();\r\n        }\r\n    });\r\n\r\n    $rootScope.$on(\"$routeChangeStart\", function (event, next, current) {\r\n        loginService.validateAuthentication().then(function (response) {\r\n            var authenticated = response === null || typeof(response) === \"undefined\" ? false \r\n                    : typeof(response) === \"object\" ? response.data \r\n                    : response;\r\n\r\n            if ($location.url() == \"/contact\" || $location.url() == \"/faq\" || $location.url().includes(\"/recoverPasswordConfirm\"))\r\n                return;\r\n\r\n            var authRequired = !publicRoute($location.url());\r\n            if (authRequired && !authenticated) {\r\n                $q.when($location.path(\"/login\"));\r\n            } else if (authenticated && !authRequired) {\r\n                event.preventDefault();\r\n                if (!loginService.isSuperAdmin()) {\r\n                    $q.when($location.path(\"/home\"));\r\n                }\r\n                else {\r\n                    $q.when($location.path(\"/adminSearch\"));\r\n                }\r\n            }\r\n            else if (authenticated && !loginService.isAdmin() && next.templateUrl.indexOf(\"admin\") > -1) {\r\n                event.preventDefault();\r\n                loginService.logout();\r\n            }\r\n        });\r\n    });\r\n});","angular.module('uti.skayo.onlinesale').service('SkayoLocaleService', function ($locale) {\r\n    var PLURAL_CATEGORY = { ZERO: \"zero\", ONE: \"one\", TWO: \"two\", FEW: \"few\", MANY: \"many\", OTHER: \"other\" };\r\n\r\n    var getEnUs = function () {\r\n        var PLURAL_CATEGORY = { ZERO: \"zero\", ONE: \"one\", TWO: \"two\", FEW: \"few\", MANY: \"many\", OTHER: \"other\" };\r\n        function getDecimals(n) {\r\n            n = n + '';\r\n            var i = n.indexOf('.');\r\n            return (i == -1) ? 0 : n.length - i - 1;\r\n        }\r\n\r\n        function getVF(n, opt_precision) {\r\n            debugger;\r\n            var v = opt_precision;\r\n\r\n            if (undefined === v) {\r\n                v = Math.min(getDecimals(n), 3);\r\n            }\r\n\r\n            var base = Math.pow(10, v);\r\n            var f = ((n * base) | 0) % base;\r\n            return { v: v, f: f };\r\n        }\r\n\r\n        return {\r\n            \"DATETIME_FORMATS\": {\r\n                \"AMPMS\": [\r\n                  \"AM\",\r\n                  \"PM\"\r\n                ],\r\n                \"DAY\": [\r\n                  \"Sunday\",\r\n                  \"Monday\",\r\n                  \"Tuesday\",\r\n                  \"Wednesday\",\r\n                  \"Thursday\",\r\n                  \"Friday\",\r\n                  \"Saturday\"\r\n                ],\r\n                \"ERANAMES\": [\r\n                  \"Before Christ\",\r\n                  \"Anno Domini\"\r\n                ],\r\n                \"ERAS\": [\r\n                  \"BC\",\r\n                  \"AD\"\r\n                ],\r\n                \"FIRSTDAYOFWEEK\": 6,\r\n                \"MONTH\": [\r\n                  \"January\",\r\n                  \"February\",\r\n                  \"March\",\r\n                  \"April\",\r\n                  \"May\",\r\n                  \"June\",\r\n                  \"July\",\r\n                  \"August\",\r\n                  \"September\",\r\n                  \"October\",\r\n                  \"November\",\r\n                  \"December\"\r\n                ],\r\n                \"SHORTDAY\": [\r\n                  \"Sun\",\r\n                  \"Mon\",\r\n                  \"Tue\",\r\n                  \"Wed\",\r\n                  \"Thu\",\r\n                  \"Fri\",\r\n                  \"Sat\"\r\n                ],\r\n                \"SHORTMONTH\": [\r\n                  \"Jan\",\r\n                  \"Feb\",\r\n                  \"Mar\",\r\n                  \"Apr\",\r\n                  \"May\",\r\n                  \"Jun\",\r\n                  \"Jul\",\r\n                  \"Aug\",\r\n                  \"Sep\",\r\n                  \"Oct\",\r\n                  \"Nov\",\r\n                  \"Dec\"\r\n                ],\r\n                \"STANDALONEMONTH\": [\r\n                  \"January\",\r\n                  \"February\",\r\n                  \"March\",\r\n                  \"April\",\r\n                  \"May\",\r\n                  \"June\",\r\n                  \"July\",\r\n                  \"August\",\r\n                  \"September\",\r\n                  \"October\",\r\n                  \"November\",\r\n                  \"December\"\r\n                ],\r\n                \"WEEKENDRANGE\": [\r\n                  5,\r\n                  6\r\n                ],\r\n                \"fullDate\": \"EEEE, MMMM d, y\",\r\n                \"longDate\": \"MMMM d, y\",\r\n                \"medium\": \"MMM d, y h:mm:ss a\",\r\n                \"mediumDate\": \"MMM d, y\",\r\n                \"mediumTime\": \"h:mm:ss a\",\r\n                \"short\": \"M/d/yy h:mm a\",\r\n                \"shortDate\": \"M/d/yy\",\r\n                \"shortTime\": \"h:mm a\"\r\n            },\r\n            \"NUMBER_FORMATS\": {\r\n                \"CURRENCY_SYM\": \"$\",\r\n                \"DECIMAL_SEP\": \".\",\r\n                \"GROUP_SEP\": \",\",\r\n                \"PATTERNS\": [\r\n                  {\r\n                      \"gSize\": 3,\r\n                      \"lgSize\": 3,\r\n                      \"maxFrac\": 3,\r\n                      \"minFrac\": 0,\r\n                      \"minInt\": 1,\r\n                      \"negPre\": \"-\",\r\n                      \"negSuf\": \"\",\r\n                      \"posPre\": \"\",\r\n                      \"posSuf\": \"\"\r\n                  },\r\n                  {\r\n                      \"gSize\": 3,\r\n                      \"lgSize\": 3,\r\n                      \"maxFrac\": 2,\r\n                      \"minFrac\": 2,\r\n                      \"minInt\": 1,\r\n                      \"negPre\": \"-\\u00a4\",\r\n                      \"negSuf\": \"\",\r\n                      \"posPre\": \"\\u00a4\",\r\n                      \"posSuf\": \"\"\r\n                  }\r\n                ]\r\n            },\r\n            \"id\": \"en-us\",\r\n            \"localeID\": \"en_US\",\r\n            \"pluralCat\": function (n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER; }\r\n        };\r\n    };\r\n\r\n    var getRu = function() {\r\n        var PLURAL_CATEGORY = {ZERO: \"zero\", ONE: \"one\", TWO: \"two\", FEW: \"few\", MANY: \"many\", OTHER: \"other\"};\r\n        function getDecimals(n) {\r\n            n = n + '';\r\n            var i = n.indexOf('.');\r\n            return (i == -1) ? 0 : n.length - i - 1;\r\n        }\r\n\r\n        function getVF(n, opt_precision) {\r\n            var v = opt_precision;\r\n\r\n            if (undefined === v) {\r\n                v = Math.min(getDecimals(n), 3);\r\n            }\r\n\r\n            var base = Math.pow(10, v);\r\n            var f = ((n * base) | 0) % base;\r\n            return {v: v, f: f};\r\n        }\r\n\r\n        return {\r\n            \"DATETIME_FORMATS\": {\r\n                \"AMPMS\": [\r\n                  \"\\u0414\\u041f\",\r\n                  \"\\u041f\\u041f\"\r\n                ],\r\n                \"DAY\": [\r\n                  \"\\u0432\\u043e\\u0441\\u043a\\u0440\\u0435\\u0441\\u0435\\u043d\\u044c\\u0435\",\r\n                  \"\\u043f\\u043e\\u043d\\u0435\\u0434\\u0435\\u043b\\u044c\\u043d\\u0438\\u043a\",\r\n                  \"\\u0432\\u0442\\u043e\\u0440\\u043d\\u0438\\u043a\",\r\n                  \"\\u0441\\u0440\\u0435\\u0434\\u0430\",\r\n                  \"\\u0447\\u0435\\u0442\\u0432\\u0435\\u0440\\u0433\",\r\n                  \"\\u043f\\u044f\\u0442\\u043d\\u0438\\u0446\\u0430\",\r\n                  \"\\u0441\\u0443\\u0431\\u0431\\u043e\\u0442\\u0430\"\r\n                ],\r\n                \"ERANAMES\": [\r\n                  \"\\u0434\\u043e \\u0420\\u043e\\u0436\\u0434\\u0435\\u0441\\u0442\\u0432\\u0430 \\u0425\\u0440\\u0438\\u0441\\u0442\\u043e\\u0432\\u0430\",\r\n                  \"\\u043e\\u0442 \\u0420\\u043e\\u0436\\u0434\\u0435\\u0441\\u0442\\u0432\\u0430 \\u0425\\u0440\\u0438\\u0441\\u0442\\u043e\\u0432\\u0430\"\r\n                ],\r\n                \"ERAS\": [\r\n                  \"\\u0434\\u043e \\u043d. \\u044d.\",\r\n                  \"\\u043d. \\u044d.\"\r\n                ],\r\n                \"FIRSTDAYOFWEEK\": 0,\r\n                \"MONTH\": [\r\n                  \"\\u044f\\u043d\\u0432\\u0430\\u0440\\u044f\",\r\n                  \"\\u0444\\u0435\\u0432\\u0440\\u0430\\u043b\\u044f\",\r\n                  \"\\u043c\\u0430\\u0440\\u0442\\u0430\",\r\n                  \"\\u0430\\u043f\\u0440\\u0435\\u043b\\u044f\",\r\n                  \"\\u043c\\u0430\\u044f\",\r\n                  \"\\u0438\\u044e\\u043d\\u044f\",\r\n                  \"\\u0438\\u044e\\u043b\\u044f\",\r\n                  \"\\u0430\\u0432\\u0433\\u0443\\u0441\\u0442\\u0430\",\r\n                  \"\\u0441\\u0435\\u043d\\u0442\\u044f\\u0431\\u0440\\u044f\",\r\n                  \"\\u043e\\u043a\\u0442\\u044f\\u0431\\u0440\\u044f\",\r\n                  \"\\u043d\\u043e\\u044f\\u0431\\u0440\\u044f\",\r\n                  \"\\u0434\\u0435\\u043a\\u0430\\u0431\\u0440\\u044f\"\r\n                ],\r\n                \"SHORTDAY\": [\r\n                  \"\\u0432\\u0441\",\r\n                  \"\\u043f\\u043d\",\r\n                  \"\\u0432\\u0442\",\r\n                  \"\\u0441\\u0440\",\r\n                  \"\\u0447\\u0442\",\r\n                  \"\\u043f\\u0442\",\r\n                  \"\\u0441\\u0431\"\r\n                ],\r\n                \"SHORTMONTH\": [\r\n                  \"\\u044f\\u043d\\u0432.\",\r\n                  \"\\u0444\\u0435\\u0432\\u0440.\",\r\n                  \"\\u043c\\u0430\\u0440.\",\r\n                  \"\\u0430\\u043f\\u0440.\",\r\n                  \"\\u043c\\u0430\\u044f\",\r\n                  \"\\u0438\\u044e\\u043d.\",\r\n                  \"\\u0438\\u044e\\u043b.\",\r\n                  \"\\u0430\\u0432\\u0433.\",\r\n                  \"\\u0441\\u0435\\u043d\\u0442.\",\r\n                  \"\\u043e\\u043a\\u0442.\",\r\n                  \"\\u043d\\u043e\\u044f\\u0431.\",\r\n                  \"\\u0434\\u0435\\u043a.\"\r\n                ],\r\n                \"STANDALONEMONTH\": [\r\n                  \"\\u044f\\u043d\\u0432\\u0430\\u0440\\u044c\",\r\n                  \"\\u0444\\u0435\\u0432\\u0440\\u0430\\u043b\\u044c\",\r\n                  \"\\u043c\\u0430\\u0440\\u0442\",\r\n                  \"\\u0430\\u043f\\u0440\\u0435\\u043b\\u044c\",\r\n                  \"\\u043c\\u0430\\u0439\",\r\n                  \"\\u0438\\u044e\\u043d\\u044c\",\r\n                  \"\\u0438\\u044e\\u043b\\u044c\",\r\n                  \"\\u0430\\u0432\\u0433\\u0443\\u0441\\u0442\",\r\n                  \"\\u0441\\u0435\\u043d\\u0442\\u044f\\u0431\\u0440\\u044c\",\r\n                  \"\\u043e\\u043a\\u0442\\u044f\\u0431\\u0440\\u044c\",\r\n                  \"\\u043d\\u043e\\u044f\\u0431\\u0440\\u044c\",\r\n                  \"\\u0434\\u0435\\u043a\\u0430\\u0431\\u0440\\u044c\"\r\n                ],\r\n                \"WEEKENDRANGE\": [\r\n                  5,\r\n                  6\r\n                ],\r\n                \"fullDate\": \"EEEE, d MMMM y '\\u0433'.\",\r\n                \"longDate\": \"d MMMM y '\\u0433'.\",\r\n                \"medium\": \"d MMM y '\\u0433'. H:mm:ss\",\r\n                \"mediumDate\": \"d MMM y '\\u0433'.\",\r\n                \"mediumTime\": \"H:mm:ss\",\r\n                \"short\": \"dd.MM.y H:mm\",\r\n                \"shortDate\": \"dd.MM.y\",\r\n                \"shortTime\": \"H:mm\"\r\n            },\r\n            \"NUMBER_FORMATS\": {\r\n                \"CURRENCY_SYM\": \"\\u20bd\",\r\n                \"DECIMAL_SEP\": \",\",\r\n                \"GROUP_SEP\": \"\\u00a0\",\r\n                \"PATTERNS\": [\r\n                  {\r\n                      \"gSize\": 3,\r\n                      \"lgSize\": 3,\r\n                      \"maxFrac\": 3,\r\n                      \"minFrac\": 0,\r\n                      \"minInt\": 1,\r\n                      \"negPre\": \"-\",\r\n                      \"negSuf\": \"\",\r\n                      \"posPre\": \"\",\r\n                      \"posSuf\": \"\"\r\n                  },\r\n                  {\r\n                      \"gSize\": 3,\r\n                      \"lgSize\": 3,\r\n                      \"maxFrac\": 2,\r\n                      \"minFrac\": 2,\r\n                      \"minInt\": 1,\r\n                      \"negPre\": \"-\",\r\n                      \"negSuf\": \"\\u00a0\\u00a4\",\r\n                      \"posPre\": \"\",\r\n                      \"posSuf\": \"\\u00a0\\u00a4\"\r\n                  }\r\n                ]\r\n            },\r\n            \"id\": \"ru\",\r\n            \"localeID\": \"ru\",\r\n            \"pluralCat\": function (n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER; }\r\n        };\r\n    };\r\n\r\n    var getRo = function () {\r\n        var PLURAL_CATEGORY = { ZERO: \"zero\", ONE: \"one\", TWO: \"two\", FEW: \"few\", MANY: \"many\", OTHER: \"other\" };\r\n        function getDecimals(n) {\r\n            n = n + '';\r\n            var i = n.indexOf('.');\r\n            return (i == -1) ? 0 : n.length - i - 1;\r\n        }\r\n\r\n        function getVF(n, opt_precision) {\r\n            var v = opt_precision;\r\n\r\n            if (undefined === v) {\r\n                v = Math.min(getDecimals(n), 3);\r\n            }\r\n\r\n            var base = Math.pow(10, v);\r\n            var f = ((n * base) | 0) % base;\r\n            return { v: v, f: f };\r\n        }\r\n        return {\r\n            \"DATETIME_FORMATS\": {\r\n                \"AMPMS\": [\r\n                    \"a.m.\",\r\n                    \"p.m.\"\r\n                ],\r\n                \"DAY\": [\r\n                    \"duminic\\u0103\",\r\n                    \"luni\",\r\n                    \"mar\\u021bi\",\r\n                    \"miercuri\",\r\n                    \"joi\",\r\n                    \"vineri\",\r\n                    \"s\\u00e2mb\\u0103t\\u0103\"\r\n                ],\r\n                \"ERANAMES\": [\r\n                    \"\\u00eenainte de Hristos\",\r\n                    \"dup\\u0103 Hristos\"\r\n                ],\r\n                \"ERAS\": [\r\n                    \"\\u00ee.Hr.\",\r\n                    \"d.Hr.\"\r\n                ],\r\n                \"FIRSTDAYOFWEEK\": 0,\r\n                \"MONTH\": [\r\n                    \"ianuarie\",\r\n                    \"februarie\",\r\n                    \"martie\",\r\n                    \"aprilie\",\r\n                    \"mai\",\r\n                    \"iunie\",\r\n                    \"iulie\",\r\n                    \"august\",\r\n                    \"septembrie\",\r\n                    \"octombrie\",\r\n                    \"noiembrie\",\r\n                    \"decembrie\"\r\n                ],\r\n                \"SHORTDAY\": [\r\n                    \"Dum\",\r\n                    \"Lun\",\r\n                    \"Mar\",\r\n                    \"Mie\",\r\n                    \"Joi\",\r\n                    \"Vin\",\r\n                    \"S\\u00e2m\"\r\n                ],\r\n                \"SHORTMONTH\": [\r\n                    \"ian.\",\r\n                    \"feb.\",\r\n                    \"mar.\",\r\n                    \"apr.\",\r\n                    \"mai\",\r\n                    \"iun.\",\r\n                    \"iul.\",\r\n                    \"aug.\",\r\n                    \"sept.\",\r\n                    \"oct.\",\r\n                    \"nov.\",\r\n                    \"dec.\"\r\n                ],\r\n                \"WEEKENDRANGE\": [\r\n                    5,\r\n                    6\r\n                ],\r\n                \"fullDate\": \"EEEE, d MMMM y\",\r\n                \"longDate\": \"d MMMM y\",\r\n                \"medium\": \"d MMM y HH:mm:ss\",\r\n                \"mediumDate\": \"d MMM y\",\r\n                \"mediumTime\": \"HH:mm:ss\",\r\n                \"short\": \"dd.MM.y HH:mm\",\r\n                \"shortDate\": \"dd.MM.y\",\r\n                \"shortTime\": \"HH:mm\"\r\n            },\r\n            \"NUMBER_FORMATS\": {\r\n                \"CURRENCY_SYM\": \"RON\",\r\n                \"DECIMAL_SEP\": \",\",\r\n                \"GROUP_SEP\": \".\",\r\n                \"PATTERNS\": [\r\n                    {\r\n                        \"gSize\": 3,\r\n                        \"lgSize\": 3,\r\n                        \"maxFrac\": 3,\r\n                        \"minFrac\": 0,\r\n                        \"minInt\": 1,\r\n                        \"negPre\": \"-\",\r\n                        \"negSuf\": \"\",\r\n                        \"posPre\": \"\",\r\n                        \"posSuf\": \"\"\r\n                    },\r\n                    {\r\n                        \"gSize\": 3,\r\n                        \"lgSize\": 3,\r\n                        \"maxFrac\": 2,\r\n                        \"minFrac\": 2,\r\n                        \"minInt\": 1,\r\n                        \"negPre\": \"-\",\r\n                        \"negSuf\": \"\\u00a0\\u00a4\",\r\n                        \"posPre\": \"\",\r\n                        \"posSuf\": \"\\u00a0\\u00a4\"\r\n                    }\r\n                ]\r\n            },\r\n            \"id\": \"ro\",\r\n            \"localeID\": \"ro\",\r\n            \"pluralCat\": function (n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v != 0 || n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER; }\r\n        };\r\n     \r\n    };\r\n\r\n    var locales = {\r\n        bg: {\r\n            \"DATETIME_FORMATS\": {\r\n                \"AMPMS\": [\r\n                  \"\\u043f\\u0440.\\u043e\\u0431.\",\r\n                  \"\\u0441\\u043b.\\u043e\\u0431.\"\r\n                ],\r\n                \"DAY\": [\r\n                  \"\\u043d\\u0435\\u0434\\u0435\\u043b\\u044f\",\r\n                  \"\\u043f\\u043e\\u043d\\u0435\\u0434\\u0435\\u043b\\u043d\\u0438\\u043a\",\r\n                  \"\\u0432\\u0442\\u043e\\u0440\\u043d\\u0438\\u043a\",\r\n                  \"\\u0441\\u0440\\u044f\\u0434\\u0430\",\r\n                  \"\\u0447\\u0435\\u0442\\u0432\\u044a\\u0440\\u0442\\u044a\\u043a\",\r\n                  \"\\u043f\\u0435\\u0442\\u044a\\u043a\",\r\n                  \"\\u0441\\u044a\\u0431\\u043e\\u0442\\u0430\"\r\n                ],\r\n                \"ERANAMES\": [\r\n                  \"\\u043f\\u0440\\u0435\\u0434\\u0438 \\u0425\\u0440\\u0438\\u0441\\u0442\\u0430\",\r\n                  \"\\u0441\\u043b\\u0435\\u0434 \\u0425\\u0440\\u0438\\u0441\\u0442\\u0430\"\r\n                ],\r\n                \"ERAS\": [\r\n                  \"\\u043f\\u0440.\\u0425\\u0440.\",\r\n                  \"\\u0441\\u043b.\\u0425\\u0440.\"\r\n                ],\r\n                \"FIRSTDAYOFWEEK\": 0,\r\n                \"MONTH\": [\r\n                  \"\\u044f\\u043d\\u0443\\u0430\\u0440\\u0438\",\r\n                  \"\\u0444\\u0435\\u0432\\u0440\\u0443\\u0430\\u0440\\u0438\",\r\n                  \"\\u043c\\u0430\\u0440\\u0442\",\r\n                  \"\\u0430\\u043f\\u0440\\u0438\\u043b\",\r\n                  \"\\u043c\\u0430\\u0439\",\r\n                  \"\\u044e\\u043d\\u0438\",\r\n                  \"\\u044e\\u043b\\u0438\",\r\n                  \"\\u0430\\u0432\\u0433\\u0443\\u0441\\u0442\",\r\n                  \"\\u0441\\u0435\\u043f\\u0442\\u0435\\u043c\\u0432\\u0440\\u0438\",\r\n                  \"\\u043e\\u043a\\u0442\\u043e\\u043c\\u0432\\u0440\\u0438\",\r\n                  \"\\u043d\\u043e\\u0435\\u043c\\u0432\\u0440\\u0438\",\r\n                  \"\\u0434\\u0435\\u043a\\u0435\\u043c\\u0432\\u0440\\u0438\"\r\n                ],\r\n                \"SHORTDAY\": [\r\n                  \"\\u043d\\u0434\",\r\n                  \"\\u043f\\u043d\",\r\n                  \"\\u0432\\u0442\",\r\n                  \"\\u0441\\u0440\",\r\n                  \"\\u0447\\u0442\",\r\n                  \"\\u043f\\u0442\",\r\n                  \"\\u0441\\u0431\"\r\n                ],\r\n                \"SHORTMONTH\": [\r\n                  \"\\u044f\\u043d\\u0443\",\r\n                  \"\\u0444\\u0435\\u0432\",\r\n                  \"\\u043c\\u0430\\u0440\\u0442\",\r\n                  \"\\u0430\\u043f\\u0440\",\r\n                  \"\\u043c\\u0430\\u0439\",\r\n                  \"\\u044e\\u043d\\u0438\",\r\n                  \"\\u044e\\u043b\\u0438\",\r\n                  \"\\u0430\\u0432\\u0433\",\r\n                  \"\\u0441\\u0435\\u043f\",\r\n                  \"\\u043e\\u043a\\u0442\",\r\n                  \"\\u043d\\u043e\\u0435\",\r\n                  \"\\u0434\\u0435\\u043a\"\r\n                ],\r\n                \"STANDALONEMONTH\": [\r\n                  \"\\u044f\\u043d\\u0443\\u0430\\u0440\\u0438\",\r\n                  \"\\u0444\\u0435\\u0432\\u0440\\u0443\\u0430\\u0440\\u0438\",\r\n                  \"\\u043c\\u0430\\u0440\\u0442\",\r\n                  \"\\u0430\\u043f\\u0440\\u0438\\u043b\",\r\n                  \"\\u043c\\u0430\\u0439\",\r\n                  \"\\u044e\\u043d\\u0438\",\r\n                  \"\\u044e\\u043b\\u0438\",\r\n                  \"\\u0430\\u0432\\u0433\\u0443\\u0441\\u0442\",\r\n                  \"\\u0441\\u0435\\u043f\\u0442\\u0435\\u043c\\u0432\\u0440\\u0438\",\r\n                  \"\\u043e\\u043a\\u0442\\u043e\\u043c\\u0432\\u0440\\u0438\",\r\n                  \"\\u043d\\u043e\\u0435\\u043c\\u0432\\u0440\\u0438\",\r\n                  \"\\u0434\\u0435\\u043a\\u0435\\u043c\\u0432\\u0440\\u0438\"\r\n                ],\r\n                \"WEEKENDRANGE\": [\r\n                  5,\r\n                  6\r\n                ],\r\n                \"fullDate\": \"EEEE, d MMMM y '\\u0433'.\",\r\n                \"longDate\": \"d MMMM y '\\u0433'.\",\r\n                \"medium\": \"d.MM.y '\\u0433'. H:mm:ss\",\r\n                \"mediumDate\": \"d.MM.y '\\u0433'.\",\r\n                \"mediumTime\": \"H:mm:ss\",\r\n                \"short\": \"d.MM.yy '\\u0433'. H:mm\",\r\n                \"shortDate\": \"d.MM.yy '\\u0433'.\",\r\n                \"shortTime\": \"H:mm\"\r\n            },\r\n            \"NUMBER_FORMATS\": {\r\n                \"CURRENCY_SYM\": \"lev\",\r\n                \"DECIMAL_SEP\": \",\",\r\n                \"GROUP_SEP\": \"\\u00a0\",\r\n                \"PATTERNS\": [\r\n                  {\r\n                      \"gSize\": 3,\r\n                      \"lgSize\": 3,\r\n                      \"maxFrac\": 3,\r\n                      \"minFrac\": 0,\r\n                      \"minInt\": 1,\r\n                      \"negPre\": \"-\",\r\n                      \"negSuf\": \"\",\r\n                      \"posPre\": \"\",\r\n                      \"posSuf\": \"\"\r\n                  },\r\n                  {\r\n                      \"gSize\": 0,\r\n                      \"lgSize\": 0,\r\n                      \"maxFrac\": 2,\r\n                      \"minFrac\": 2,\r\n                      \"minInt\": 1,\r\n                      \"negPre\": \"-\",\r\n                      \"negSuf\": \"\\u00a0\\u00a4\",\r\n                      \"posPre\": \"\",\r\n                      \"posSuf\": \"\\u00a0\\u00a4\"\r\n                  }\r\n                ]\r\n            },\r\n            \"id\": \"bg-bg\",\r\n            \"localeID\": \"bg_BG\",\r\n            \"pluralCat\": function (n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER; }\r\n        },\r\n        en_US: getEnUs(),\r\n        ru: getRu(),\r\n        ro: getRo()\r\n    };\r\n\r\n    this.setLocale = function (key) {\r\n        if(locales[key])\r\n            angular.copy(locales[key], $locale);\r\n        else\r\n            angular.copy(locales[\"en_US\"], $locale);\r\n    }\r\n});\r\n\r\n"]}